reminder

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 24, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package reminder 管理 Coordinator / SubAgent 的 StopGuard 与可选的每轮 reminder。

重构说明(2026-04-20):

  • 原有 flow / queue_guard / book_complete 三条每轮 reminder 已被 Host Flow Router 取代 (`internal/host/flow/`)。
  • 这里保留 Aggregate/Default 的装配点,方便未来新增无法用路由表达的"事实提醒"。
  • StopGuard(Coordinator + 三个子代理)仍由本包对外暴露,见 stop_guard.go / subagent_guards.go。

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Aggregate

func Aggregate(st *store.Store, gens ...Generator) agentcore.ReminderGenerator

Aggregate 把一组 Generator 组合成 agentcore.ReminderGenerator。 每轮一次性拉快照,按注册顺序逐个询问;相同 Source 后写覆盖先写。

func NewArchitectStopGuard

func NewArchitectStopGuard(st *store.Store) agentcore.StopGuard

NewArchitectStopGuard 要求 architect 本轮至少落盘一次 save_foundation。

func NewEditorStopGuard

func NewEditorStopGuard(st *store.Store) agentcore.StopGuard

NewEditorStopGuard 要求 editor 本轮至少落盘一次审阅或摘要。

func NewStopGuard

func NewStopGuard(st *store.Store, onBlock func(reason string, consecutive int32)) agentcore.StopGuard

NewStopGuard 构造 Coordinator 专用 StopGuard。 onBlock 可选,非 nil 时每次阻拦调一次,用于审计。

func NewWriterStopGuard

func NewWriterStopGuard(st *store.Store) agentcore.StopGuard

NewWriterStopGuard 要求 writer 本轮至少产生一次成功的 commit_chapter。

Types

type Generator

type Generator interface {
	Source() string
	Generate(ctx context.Context, state State) string
}

Generator 是每轮 reminder 生成函数的抽象。返回空串表示本轮不注入。

func Default

func Default() []Generator

Default 返回默认启用的 Generator。当前没有任何每轮 reminder—— 全部流程决策由 Host Flow Router 负责。保留此函数是装配点的稳定约定。

type State

type State struct {
	Progress          *domain.Progress
	FoundationMissing []string
	TurnIndex         int
}

State 是 Generator 在本轮可读的 store 快照。

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL