Documentation
¶
Overview ¶
Package itemorigin carries, on a context, WHERE a needs-you row is being made: the officer instance whose tool call is running, its chat session and the moment in it (migration 0185's origin_* columns on attention_asks and plugin_reply_drafts).
🔴 ONLY THE OFFICER TOOL DISPATCHER INSTALLS ONE (internal/api officerToolCall), FROM ITS BOUND CALLER — the agent whose token made the call — and never from anything in the call's arguments. The stores that write the columns (attention.PGStore.Create, plugins.PGStore's outbound draft) read it from the context and nowhere else, so a value a caller supplies cannot reach them: there is no field to put one in.
It is a RESOLVER, run once at the insert, so a tool call that makes no such row costs no read.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Origin ¶
type Origin struct {
// AgentID is the officer instance (agents.id).
AgentID int64
// SessionID is its chat session (chat_sessions.id) the call was made in;
// 0 when it has none.
SessionID int64
// MessageID is the chat_messages row of the TURN the call was made in —
// its own prompt row (the per-turn record, internal/api turnInputOf): the
// moment; 0 when the turn is not known.
MessageID int64
}
Origin is where a row was made.