Documentation
¶
Index ¶
- type AskUserHandler
- type AskUserResponse
- type AskUserTool
- func (t *AskUserTool) Description() string
- func (t *AskUserTool) Execute(ctx context.Context, args json.RawMessage) (json.RawMessage, error)
- func (t *AskUserTool) Label() string
- func (t *AskUserTool) Name() string
- func (t *AskUserTool) Schema() map[string]any
- func (t *AskUserTool) SetHandler(h AskUserHandler)
- type CheckConsistencyTool
- func (t *CheckConsistencyTool) Description() string
- func (t *CheckConsistencyTool) Execute(_ context.Context, args json.RawMessage) (json.RawMessage, error)
- func (t *CheckConsistencyTool) Label() string
- func (t *CheckConsistencyTool) Name() string
- func (t *CheckConsistencyTool) Schema() map[string]any
- type CommitChapterTool
- type ContextTool
- func (t *ContextTool) ContextSummary() string
- func (t *ContextTool) Description() string
- func (t *ContextTool) Execute(_ context.Context, args json.RawMessage) (json.RawMessage, error)
- func (t *ContextTool) Label() string
- func (t *ContextTool) Name() string
- func (t *ContextTool) Schema() map[string]any
- type DraftChapterTool
- type Option
- type PlanChapterTool
- type Question
- type ReadChapterTool
- type References
- type SaveArcSummaryTool
- type SaveFoundationTool
- type SaveReviewTool
- type SaveVolumeSummaryTool
- func (t *SaveVolumeSummaryTool) Description() string
- func (t *SaveVolumeSummaryTool) Execute(_ context.Context, args json.RawMessage) (json.RawMessage, error)
- func (t *SaveVolumeSummaryTool) Label() string
- func (t *SaveVolumeSummaryTool) Name() string
- func (t *SaveVolumeSummaryTool) Schema() map[string]any
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AskUserHandler ¶
type AskUserHandler func(ctx context.Context, questions []Question) (*AskUserResponse, error)
AskUserHandler 阻塞等待用户回答,由 CLI 或 TUI 注入具体实现。
type AskUserResponse ¶
type AskUserResponse struct {
Answers map[string]string // question text → 用户选择的答案
Notes map[string]string // question text → 自定义输入(选"其他"时)
}
AskUserResponse 用户回答结果。
type AskUserTool ¶
type AskUserTool struct {
// contains filtered or unexported fields
}
AskUserTool 让 LLM 向用户提出结构化问题。
func NewAskUserTool ¶
func NewAskUserTool() *AskUserTool
func (*AskUserTool) Description ¶
func (t *AskUserTool) Description() string
func (*AskUserTool) Execute ¶
func (t *AskUserTool) Execute(ctx context.Context, args json.RawMessage) (json.RawMessage, error)
func (*AskUserTool) Label ¶
func (t *AskUserTool) Label() string
func (*AskUserTool) Name ¶
func (t *AskUserTool) Name() string
func (*AskUserTool) Schema ¶
func (t *AskUserTool) Schema() map[string]any
func (*AskUserTool) SetHandler ¶
func (t *AskUserTool) SetHandler(h AskUserHandler)
SetHandler 注入 UI 回调,CLI 和 TUI 各自实现。
type CheckConsistencyTool ¶
type CheckConsistencyTool struct {
// contains filtered or unexported fields
}
CheckConsistencyTool 返回章节内容和全部状态数据,供 Agent 自行对照判断。 纯 IO 工具:只负责加载数据,不注入指令。
func NewCheckConsistencyTool ¶
func NewCheckConsistencyTool(store *store.Store) *CheckConsistencyTool
func (*CheckConsistencyTool) Description ¶
func (t *CheckConsistencyTool) Description() string
func (*CheckConsistencyTool) Execute ¶
func (t *CheckConsistencyTool) Execute(_ context.Context, args json.RawMessage) (json.RawMessage, error)
func (*CheckConsistencyTool) Label ¶
func (t *CheckConsistencyTool) Label() string
func (*CheckConsistencyTool) Name ¶
func (t *CheckConsistencyTool) Name() string
func (*CheckConsistencyTool) Schema ¶
func (t *CheckConsistencyTool) Schema() map[string]any
type CommitChapterTool ¶
type CommitChapterTool struct {
// contains filtered or unexported fields
}
CommitChapterTool 提交章节:加载正文 → 保存终稿 → 生成摘要 → 更新状态 → 更新进度。
func NewCommitChapterTool ¶
func NewCommitChapterTool(store *store.Store) *CommitChapterTool
func (*CommitChapterTool) Description ¶
func (t *CommitChapterTool) Description() string
func (*CommitChapterTool) Execute ¶
func (t *CommitChapterTool) Execute(_ context.Context, args json.RawMessage) (json.RawMessage, error)
func (*CommitChapterTool) Label ¶
func (t *CommitChapterTool) Label() string
func (*CommitChapterTool) Name ¶
func (t *CommitChapterTool) Name() string
func (*CommitChapterTool) Schema ¶
func (t *CommitChapterTool) Schema() map[string]any
type ContextTool ¶
type ContextTool struct {
// contains filtered or unexported fields
}
ContextTool 组装当前章节所需上下文。
func NewContextTool ¶
func NewContextTool(store *store.Store, refs References, style string) *ContextTool
func (*ContextTool) ContextSummary ¶
func (t *ContextTool) ContextSummary() string
ContextSummary 返回当前状态的简要摘要(供日志使用)。
func (*ContextTool) Description ¶
func (t *ContextTool) Description() string
func (*ContextTool) Execute ¶
func (t *ContextTool) Execute(_ context.Context, args json.RawMessage) (json.RawMessage, error)
func (*ContextTool) Label ¶
func (t *ContextTool) Label() string
func (*ContextTool) Name ¶
func (t *ContextTool) Name() string
func (*ContextTool) Schema ¶
func (t *ContextTool) Schema() map[string]any
type DraftChapterTool ¶
type DraftChapterTool struct {
// contains filtered or unexported fields
}
DraftChapterTool 写入整章草稿,替代旧的 write_scene + polish_chapter 流水线。 Agent 自主决定一次写完还是分批续写。
func NewDraftChapterTool ¶
func NewDraftChapterTool(store *store.Store) *DraftChapterTool
func (*DraftChapterTool) Description ¶
func (t *DraftChapterTool) Description() string
func (*DraftChapterTool) Execute ¶
func (t *DraftChapterTool) Execute(_ context.Context, args json.RawMessage) (json.RawMessage, error)
func (*DraftChapterTool) Label ¶
func (t *DraftChapterTool) Label() string
func (*DraftChapterTool) Name ¶
func (t *DraftChapterTool) Name() string
func (*DraftChapterTool) Schema ¶
func (t *DraftChapterTool) Schema() map[string]any
type PlanChapterTool ¶
type PlanChapterTool struct {
// contains filtered or unexported fields
}
PlanChapterTool 保存章节构思,Agent 自主决定规划粒度。
func NewPlanChapterTool ¶
func NewPlanChapterTool(store *store.Store) *PlanChapterTool
func (*PlanChapterTool) Description ¶
func (t *PlanChapterTool) Description() string
func (*PlanChapterTool) Execute ¶
func (t *PlanChapterTool) Execute(_ context.Context, args json.RawMessage) (json.RawMessage, error)
func (*PlanChapterTool) Label ¶
func (t *PlanChapterTool) Label() string
func (*PlanChapterTool) Name ¶
func (t *PlanChapterTool) Name() string
func (*PlanChapterTool) Schema ¶
func (t *PlanChapterTool) Schema() map[string]any
type Question ¶
type Question struct {
Question string `json:"question"`
Header string `json:"header"`
Options []Option `json:"options"`
MultiSelect bool `json:"multiSelect"`
}
Question 单个问题。
type ReadChapterTool ¶
type ReadChapterTool struct {
// contains filtered or unexported fields
}
ReadChapterTool 读取章节原文,让 Agent 能回读自己和前文的文字。
func NewReadChapterTool ¶
func NewReadChapterTool(store *store.Store) *ReadChapterTool
func (*ReadChapterTool) Description ¶
func (t *ReadChapterTool) Description() string
func (*ReadChapterTool) Execute ¶
func (t *ReadChapterTool) Execute(_ context.Context, args json.RawMessage) (json.RawMessage, error)
func (*ReadChapterTool) Label ¶
func (t *ReadChapterTool) Label() string
func (*ReadChapterTool) Name ¶
func (t *ReadChapterTool) Name() string
func (*ReadChapterTool) Schema ¶
func (t *ReadChapterTool) Schema() map[string]any
type References ¶
type References struct {
// V0
ChapterGuide string
HookTechniques string
QualityChecklist string
OutlineTemplate string
CharacterTemplate string
ChapterTemplate string
// V1
Consistency string
ContentExpansion string
DialogueWriting string
// V2
StyleReference string // 风格补充参考(可为空)
LongformPlanning string // 通用长篇规划参考
Differentiation string // 通用差异化设计参考
}
References 嵌入的参考资料。
type SaveArcSummaryTool ¶
type SaveArcSummaryTool struct {
// contains filtered or unexported fields
}
SaveArcSummaryTool 保存弧级摘要和角色快照,Editor 在弧结束时调用。
func NewSaveArcSummaryTool ¶
func NewSaveArcSummaryTool(store *store.Store) *SaveArcSummaryTool
func (*SaveArcSummaryTool) Description ¶
func (t *SaveArcSummaryTool) Description() string
func (*SaveArcSummaryTool) Execute ¶
func (t *SaveArcSummaryTool) Execute(_ context.Context, args json.RawMessage) (json.RawMessage, error)
func (*SaveArcSummaryTool) Label ¶
func (t *SaveArcSummaryTool) Label() string
func (*SaveArcSummaryTool) Name ¶
func (t *SaveArcSummaryTool) Name() string
func (*SaveArcSummaryTool) Schema ¶
func (t *SaveArcSummaryTool) Schema() map[string]any
type SaveFoundationTool ¶
type SaveFoundationTool struct {
// contains filtered or unexported fields
}
SaveFoundationTool 保存基础设定(premise/outline/characters),Architect 专用。
func NewSaveFoundationTool ¶
func NewSaveFoundationTool(store *store.Store) *SaveFoundationTool
func (*SaveFoundationTool) Description ¶
func (t *SaveFoundationTool) Description() string
func (*SaveFoundationTool) Execute ¶
func (t *SaveFoundationTool) Execute(_ context.Context, args json.RawMessage) (json.RawMessage, error)
func (*SaveFoundationTool) Label ¶
func (t *SaveFoundationTool) Label() string
func (*SaveFoundationTool) Name ¶
func (t *SaveFoundationTool) Name() string
func (*SaveFoundationTool) Schema ¶
func (t *SaveFoundationTool) Schema() map[string]any
type SaveReviewTool ¶
type SaveReviewTool struct {
// contains filtered or unexported fields
}
SaveReviewTool 保存 Editor 的审阅结果。
func NewSaveReviewTool ¶
func NewSaveReviewTool(store *store.Store) *SaveReviewTool
func (*SaveReviewTool) Description ¶
func (t *SaveReviewTool) Description() string
func (*SaveReviewTool) Execute ¶
func (t *SaveReviewTool) Execute(_ context.Context, args json.RawMessage) (json.RawMessage, error)
func (*SaveReviewTool) Label ¶
func (t *SaveReviewTool) Label() string
func (*SaveReviewTool) Name ¶
func (t *SaveReviewTool) Name() string
func (*SaveReviewTool) Schema ¶
func (t *SaveReviewTool) Schema() map[string]any
type SaveVolumeSummaryTool ¶
type SaveVolumeSummaryTool struct {
// contains filtered or unexported fields
}
SaveVolumeSummaryTool 保存卷级摘要,Editor 在卷结束时调用。
func NewSaveVolumeSummaryTool ¶
func NewSaveVolumeSummaryTool(store *store.Store) *SaveVolumeSummaryTool
func (*SaveVolumeSummaryTool) Description ¶
func (t *SaveVolumeSummaryTool) Description() string
func (*SaveVolumeSummaryTool) Execute ¶
func (t *SaveVolumeSummaryTool) Execute(_ context.Context, args json.RawMessage) (json.RawMessage, error)
func (*SaveVolumeSummaryTool) Label ¶
func (t *SaveVolumeSummaryTool) Label() string
func (*SaveVolumeSummaryTool) Name ¶
func (t *SaveVolumeSummaryTool) Name() string
func (*SaveVolumeSummaryTool) Schema ¶
func (t *SaveVolumeSummaryTool) Schema() map[string]any