subagents/host
Import
Section titled “Import”import * as api from "@fungi.computer/shiitake-extensions/subagents/host";Exports
Section titled “Exports”| Kind | Export | Description |
|---|---|---|
| type alias | SubagentRecord | A footer row for an ordinary Agent created by the current Agent. |
| type alias | SubagentAgent | Owner reads used for status and exact delegated command settlement. |
| type alias | SubagentSource | The host’s read-only facts. read returns ordinary created Agents, at most
limit, with a count of the rest; open is the host’s existing per-operation
Agent access (an AgentControlDirectory’s open fits), and releasing it never
stops the Agent’s work. |
| type alias | SubagentTiming | Private resource ceilings; none of them is product policy. |
| constant | subagentsGrant | Host admission for the read-only created-Agent footer and human toggle. |
| function | subagentsExtension() | The read-only footer: ordinary Agents created by this Agent, one row each, with
their live status. It owns neither relationships nor durable state; the Agent
directory owns immutable creation attribution. Its one command, /agents, only
expands or collapses the footer rows. |
SubagentRecordtype alias
Section titled “SubagentRecord”type SubagentRecord = Readonly<{ agentId: string; name: string; sessionId: string | null;}>;A footer row for an ordinary Agent created by the current Agent.
SubagentAgenttype alias
Section titled “SubagentAgent”type SubagentAgent = Readonly<{ listSessions: ShiitakeAgent["listSessions"]; session: ( sessionId, ) => Pick<ShiitakeSession, "read" | "readSettlement" | "extension">;}>;Owner reads used for status and exact delegated command settlement.
SubagentSourcetype alias
Section titled “SubagentSource”type SubagentSource = Readonly<{ hasLiveChildCommand: (sessionId) => boolean; read: ( sessionId, limit, ) => Promise< Readonly<{ agents: readonly SubagentRecord[]; more: number; }> >; open: ( agentId, signal, ) => Promise< Readonly<{ agent: SubagentAgent; release: () => Promise<void>; }> >;}>;The host’s read-only facts. read returns ordinary created Agents, at most
limit, with a count of the rest; open is the host’s existing per-operation
Agent access (an AgentControlDirectory’s open fits), and releasing it never
stops the Agent’s work.
SubagentTimingtype alias
Section titled “SubagentTiming”type SubagentTiming = Readonly<{ refreshMs: number; pollMs: number; interestMs: number;}>;Private resource ceilings; none of them is product policy.
subagentsGrantconstant
Section titled “subagentsGrant”const subagentsGrant: ExtensionGrantV0;Host admission for the read-only created-Agent footer and human toggle.
subagentsExtension()function
Section titled “subagentsExtension()”function subagentsExtension(options): RosteredExtensionV0;The read-only footer: ordinary Agents created by this Agent, one row each, with
their live status. It owns neither relationships nor durable state; the Agent
directory owns immutable creation attribution. Its one command, /agents, only
expands or collapses the footer rows.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
options |
Readonly<{ source: SubagentSource; timing?: SubagentTiming; }> |
Returns
Section titled “Returns”RosteredExtensionV0