subagents/contract
Import
Section titled “Import”import * as api from "@fungi.computer/shiitake-extensions/subagents";Exports
Section titled “Exports”| Kind | Export | Description |
|---|---|---|
| type alias | SubagentState | Display state of one created Agent’s conversation. |
| type alias | Subagent | Decoded footer row for a created Agent. |
| type alias | SubagentsProjection | Decoded list and expansion state projected into the footer. |
| constant | maximumSubagents | The most Agents one conversation’s footer lists; the rest are counted. |
| constant | SubagentState | What the human sees for one ordinary created Agent. waiting_on_agent is an
open question that waits on the Agent that sent the work, calm until it is
escalated; needs_you is attention that waits on a person; unavailable means
its status could not be read, and is never shown as idle. |
| constant | Subagent | A footer row for an ordinary Agent created by this Agent, never merely sent work. |
| constant | SubagentsProjection | This Agent’s created Agents and how many are not listed. expanded is whether
the footer lists each one; a person toggles it with /agents, and a collapsed
footer keeps one summary row. |
| constant | AnswerChildInput | The question flow’s own steps, each naming the child whose Ask they answer. The footer owns the conversation; the child’s question owner commits it. |
| constant | subagentsContract | Created-Agent footer control and its visible projection. |
SubagentStatetype alias
Section titled “SubagentState”type SubagentState = typeof SubagentState.Type;Display state of one created Agent’s conversation.
Subagenttype alias
Section titled “Subagent”type Subagent = typeof Subagent.Type;Decoded footer row for a created Agent.
SubagentsProjectiontype alias
Section titled “SubagentsProjection”type SubagentsProjection = typeof SubagentsProjection.Type;Decoded list and expansion state projected into the footer.
maximumSubagentsconstant
Section titled “maximumSubagents”const maximumSubagents: 16 = 16;The most Agents one conversation’s footer lists; the rest are counted.
SubagentStateconstant
Section titled “SubagentState”const SubagentState: Literals< readonly [ "working", "waiting_on_agent", "needs_you", "idle", "failed", "unavailable", ]>;What the human sees for one ordinary created Agent. waiting_on_agent is an
open question that waits on the Agent that sent the work, calm until it is
escalated; needs_you is attention that waits on a person; unavailable means
its status could not be read, and is never shown as idle.
Subagentconstant
Section titled “Subagent”const Subagent: Struct<{ agentId: String; name: String; sessionId: NullOr<String>; state: Literals<readonly ["working", "waiting_on_agent", "needs_you", "idle", "failed", "unavailable"]>; attention: optionalKey<String>; waitingOn: optionalKey<String>; ask: optionalKey<Struct<{ askId: String; questions: $Array<Struct<{ id: String; header: String; question: String; options: $Array<Struct<{ label: ...; description: ...; }>>; multiple: optionalKey<Boolean>; }>>; }>>;}>;A footer row for an ordinary Agent created by this Agent, never merely sent work.
SubagentsProjectionconstant
Section titled “SubagentsProjection”const SubagentsProjection: Struct<{ agents: $Array<Struct<{ agentId: String; name: String; sessionId: NullOr<String>; state: Literals<readonly ["working", "waiting_on_agent", "needs_you", "idle", "failed", "unavailable"]>; attention: optionalKey<String>; waitingOn: optionalKey<String>; ask: optionalKey<Struct<{ askId: String; questions: $Array<Struct<{ id: ...; header: ...; question: ...; options: ...; multiple: ...; }>>; }>>; }>>; more: Int; expanded: Boolean;}>;This Agent’s created Agents and how many are not listed. expanded is whether
the footer lists each one; a person toggles it with /agents, and a collapsed
footer keeps one summary row.
AnswerChildInputconstant
Section titled “AnswerChildInput”const AnswerChildInput: Union< Struct< | { askId: String; requestId: String; index: Number; answers: $Record< String, Struct<{ selected: $Array<String>; text: optionalKey<String>; }> >; stage: Literal<"decision">; answer: Struct<{ selected: $Array<String>; text: optionalKey<String>; }>; agentId: String; sessionId: String; } | { askId: String; agentId: String; sessionId: String; } | { agentId: String; sessionId: String; } >[]>;The question flow’s own steps, each naming the child whose Ask they answer. The footer owns the conversation; the child’s question owner commits it.
subagentsContractconstant
Section titled “subagentsContract”const subagentsContract: object;Created-Agent footer control and its visible projection.