Documentation
¶
Overview ¶
Package docs holds the built-in conversation documents of src/harness/agent.ts and provider.ts that no machine owns: pi.agent and pi.provider, and the conversation-creation step for pi.agent.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var AgentDef = &session.DocDef{ Kind: "pi.agent", Version: 1, Scope: session.ScopeConversation, History: session.HistoryRewindable, Fork: session.ForkAsOf, Initial: func(any) *jv.Object { return jv.NewObject() }, CheckpointWhen: func(*jv.Object, []delta.Op, int) bool { return true }, }
AgentDef is AgentDoc: the conversation's agent state, rewindable so forks start from the agent at their fork entry. Its value holds the model, thinkingLevel, extensions, tools, instructions and cwd that are set. Read-only: assigned once at initialization.
Functions ¶
func AddTools ¶
AddTools is agent.ts addTools, the effect of a tool round's `addTools` controls, applied to `tools` and `modelTools`: an array gets each name it lacks appended, and `{remove}` loses the names. An unset `tools` already enables every tool, so nothing is written for it. An unset or object `modelTools` also gets each name appended to its `add`, which loads deferred tools and has no effect for others. By name, without the registry: a tool that is not registered now, such as one of an MCP server that is reconnecting, is offered once it is again.
func CreateAgent ¶
CreateAgent is createAgent, the built-in part of every commit that creates or forks a conversation, for pi.agent: a fork keeps its asOf copy; a new task-owned conversation copies the stored agent of its owner task's conversation; a new ownerless one starts empty.
func ProviderDef ¶
ProviderDef is ProviderDoc: the stable provider-facing identity of one conversation, {sessionId}. A fork starts with a fresh identity instead of copying its parent's. newID is the Session's UUIDv7 source.
Types ¶
This section is empty.