Documentation
¶
Index ¶
- Constants
- func NormalizeRequest(req *agent.RequestContext)
- func ShouldRunLearningCheck(req *agent.RequestContext, result *agent.RunResult, ...) bool
- type ArtifactBaselineStep
- type ArtifactReconcileStep
- type ArtifactRecorder
- type ArtifactStep
- type AuthorizeStep
- type ContextBuilder
- type ContextStep
- type ExecuteStep
- type JournalStep
- type LearningService
- func (s *LearningService) AfterRunLearning(ctx context.Context, req *agent.RequestContext, result *agent.RunResult, ...) error
- func (s *LearningService) BeforeCompact(ctx context.Context, req *agent.RequestContext) error
- func (s *LearningService) BeforeReset(ctx context.Context, req *agent.RequestContext) error
- type LearningStep
- type ModelStep
- type NormalizeStep
- type PersistStep
- type Pipeline
- type SessionCompleteStep
- type StartEventStep
- type State
- type Step
- type ToolAvailability
- type WorkspaceArtifactRecorder
Constants ¶
const DefaultExecuteTimeout = 2 * time.Hour
DefaultExecuteTimeout is the hard timeout for the runtime execution step.
const (
ToolNameMemory = "memory"
)
Variables ¶
This section is empty.
Functions ¶
func NormalizeRequest ¶
func NormalizeRequest(req *agent.RequestContext)
func ShouldRunLearningCheck ¶
func ShouldRunLearningCheck(req *agent.RequestContext, result *agent.RunResult, trace *lifecyclejournal.RunTrace) bool
ShouldRunLearningCheck 根据运行结果和 trace 判断是否值得启动一次学习检查。
Types ¶
type ArtifactBaselineStep ¶
type ArtifactBaselineStep struct{}
ArtifactBaselineStep captures a file snapshot of the repo directory before agent execution. The baseline is written to the turn directory so that a later ArtifactReconcileStep can detect files created or modified during the run.
func (ArtifactBaselineStep) Name ¶
func (ArtifactBaselineStep) Name() string
type ArtifactReconcileStep ¶
type ArtifactReconcileStep struct{}
ArtifactReconcileStep compares the current repo state against the baseline and populates the artifact manifest with any auto-detected file changes. It skips reconciliation when the manifest already contains final entries (explicitly declared artifacts take priority).
func (ArtifactReconcileStep) Name ¶
func (ArtifactReconcileStep) Name() string
type ArtifactRecorder ¶
type ArtifactRecorder interface {
Record(ctx context.Context, req *agent.RequestContext) ([]events.ArtifactPayload, error)
}
ArtifactRecorder 记录已声明的产物并返回公开的事件负载。
type ArtifactStep ¶
type ArtifactStep struct {
Recorder ArtifactRecorder
}
ArtifactStep 在终端运行事件发送前记录 manifest 中的产物。
func (ArtifactStep) Name ¶
func (ArtifactStep) Name() string
type AuthorizeStep ¶
type AuthorizeStep struct{}
func (AuthorizeStep) Name ¶
func (AuthorizeStep) Name() string
type ContextBuilder ¶
type ContextBuilder interface {
Prepare(ctx context.Context, req *agent.RequestContext) (*agent.RequestContext, error)
}
type ContextStep ¶
type ContextStep struct {
Builder ContextBuilder
}
func (ContextStep) Name ¶
func (ContextStep) Name() string
type ExecuteStep ¶
func (ExecuteStep) Name ¶
func (ExecuteStep) Name() string
type JournalStep ¶
type JournalStep struct{}
func (JournalStep) Name ¶
func (JournalStep) Name() string
type LearningService ¶
type LearningService struct {
Builder ContextBuilder
Delegate agent.Runner
ToolAvailability ToolAvailability
}
func (*LearningService) AfterRunLearning ¶
func (s *LearningService) AfterRunLearning(ctx context.Context, req *agent.RequestContext, result *agent.RunResult, trace *lifecyclejournal.RunTrace) error
AfterRunLearning 在主任务完成后触发学习检查,让 agent 判断是否需要沉淀长期记忆或技能流程。
func (*LearningService) BeforeCompact ¶
func (s *LearningService) BeforeCompact(ctx context.Context, req *agent.RequestContext) error
BeforeCompact 在上下文压缩前尝试刷新长期记忆,避免稳定偏好或项目事实随上下文丢失。
func (*LearningService) BeforeReset ¶
func (s *LearningService) BeforeReset(ctx context.Context, req *agent.RequestContext) error
BeforeReset 在会话重置前尝试刷新长期记忆,保留后续会话仍有价值的信息。
type LearningStep ¶
type LearningStep struct {
Service *LearningService
}
func (LearningStep) Name ¶
func (LearningStep) Name() string
type ModelStep ¶
type ModelStep struct{}
It writes the real upstream configuration to modelrouter store and modifies the request's BaseURL to use the built-in worker model proxy.
type NormalizeStep ¶
type NormalizeStep struct{}
func (NormalizeStep) Name ¶
func (NormalizeStep) Name() string
type PersistStep ¶
type PersistStep struct{}
func (PersistStep) Name ¶
func (PersistStep) Name() string
type SessionCompleteStep ¶
type SessionCompleteStep struct {
Provider lifecyclecontext.SessionMessageProvider
}
func (SessionCompleteStep) Name ¶
func (SessionCompleteStep) Name() string
type StartEventStep ¶
type StartEventStep struct{}
func (StartEventStep) Name ¶
func (StartEventStep) Name() string
type State ¶
type State struct {
OriginalRequest *agent.RequestContext
Request *agent.RequestContext
Journal *lifecyclejournal.RunJournal
Result *agent.RunResult
Err error
StartedAt time.Time
Skipped bool
}
type ToolAvailability ¶
type WorkspaceArtifactRecorder ¶
type WorkspaceArtifactRecorder struct{}
WorkspaceArtifactRecorder 收集运行工作区 manifest 中声明的产物。
func NewWorkspaceArtifactRecorder ¶
func NewWorkspaceArtifactRecorder() *WorkspaceArtifactRecorder
NewWorkspaceArtifactRecorder 创建基于 manifest 的产物记录器。
func (*WorkspaceArtifactRecorder) Record ¶
func (r *WorkspaceArtifactRecorder) Record(ctx context.Context, req *agent.RequestContext) ([]events.ArtifactPayload, error)
Record 收集单次运行的最终 manifest 产物。