Documentation
¶
Overview ¶
Package agentcontext 实现 permission-first bounded context compilation。
Compiler 分阶段执行: 1. capability/permission 过滤 2. scope 继承 3. lifecycle/source visibility 4. ranking merge 5. budget truncation 6. safe next actions
输出 ContextPack 不包含完整 note body;preview 受 budget 约束。
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Compiler ¶
type Compiler struct {
// contains filtered or unexported fields
}
Compiler 编译 bounded context pack。
func NewCompiler ¶
func NewCompiler(store *agentmemory.Store, policy agentmemory.Policy) *Compiler
NewCompiler 构造 compiler。
func (*Compiler) Compile ¶
func (c *Compiler) Compile(ctx context.Context, req agentprotocol.ContextRequest) (agentprotocol.ContextPack, error)
Compile 执行 context compilation 管线。
func (*Compiler) CompileMemories ¶
func (c *Compiler) CompileMemories(_ context.Context, req agentprotocol.ContextRequest, memories []agentprotocol.MemoryRecord) (agentprotocol.ContextPack, error)
CompileMemories 对已检索的 memories 执行 ranking/budget/next-action 管线。 用于合并 legacy + new memories 后的编译,避免重复查询。
Click to show internal directories.
Click to hide internal directories.