@agno-hq/chat-react 0.1.1 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,102 @@
1
+ // src/core/types.ts
2
+ var RunEvent = /* @__PURE__ */ ((RunEvent2) => {
3
+ RunEvent2["RunStarted"] = "RunStarted";
4
+ RunEvent2["RunContent"] = "RunContent";
5
+ RunEvent2["RunContentCompleted"] = "RunContentCompleted";
6
+ RunEvent2["RunIntermediateContent"] = "RunIntermediateContent";
7
+ RunEvent2["RunCompleted"] = "RunCompleted";
8
+ RunEvent2["RunError"] = "RunError";
9
+ RunEvent2["RunCancelled"] = "RunCancelled";
10
+ RunEvent2["RunPaused"] = "RunPaused";
11
+ RunEvent2["RunContinued"] = "RunContinued";
12
+ RunEvent2["PreHookStarted"] = "PreHookStarted";
13
+ RunEvent2["PreHookCompleted"] = "PreHookCompleted";
14
+ RunEvent2["PostHookStarted"] = "PostHookStarted";
15
+ RunEvent2["PostHookCompleted"] = "PostHookCompleted";
16
+ RunEvent2["ToolCallStarted"] = "ToolCallStarted";
17
+ RunEvent2["ToolCallCompleted"] = "ToolCallCompleted";
18
+ RunEvent2["ToolCallError"] = "ToolCallError";
19
+ RunEvent2["ReasoningStarted"] = "ReasoningStarted";
20
+ RunEvent2["ReasoningStep"] = "ReasoningStep";
21
+ RunEvent2["ReasoningContentDelta"] = "ReasoningContentDelta";
22
+ RunEvent2["ReasoningCompleted"] = "ReasoningCompleted";
23
+ RunEvent2["MemoryUpdateStarted"] = "MemoryUpdateStarted";
24
+ RunEvent2["MemoryUpdateCompleted"] = "MemoryUpdateCompleted";
25
+ RunEvent2["SessionSummaryStarted"] = "SessionSummaryStarted";
26
+ RunEvent2["SessionSummaryCompleted"] = "SessionSummaryCompleted";
27
+ RunEvent2["ParserModelResponseStarted"] = "ParserModelResponseStarted";
28
+ RunEvent2["ParserModelResponseCompleted"] = "ParserModelResponseCompleted";
29
+ RunEvent2["OutputModelResponseStarted"] = "OutputModelResponseStarted";
30
+ RunEvent2["OutputModelResponseCompleted"] = "OutputModelResponseCompleted";
31
+ RunEvent2["ModelRequestStarted"] = "ModelRequestStarted";
32
+ RunEvent2["ModelRequestCompleted"] = "ModelRequestCompleted";
33
+ RunEvent2["CompressionStarted"] = "CompressionStarted";
34
+ RunEvent2["CompressionCompleted"] = "CompressionCompleted";
35
+ RunEvent2["FollowupsStarted"] = "FollowupsStarted";
36
+ RunEvent2["FollowupsCompleted"] = "FollowupsCompleted";
37
+ RunEvent2["CustomEvent"] = "CustomEvent";
38
+ return RunEvent2;
39
+ })(RunEvent || {});
40
+ var TeamRunEvent = /* @__PURE__ */ ((TeamRunEvent2) => {
41
+ TeamRunEvent2["TeamRunStarted"] = "TeamRunStarted";
42
+ TeamRunEvent2["TeamRunContent"] = "TeamRunContent";
43
+ TeamRunEvent2["TeamRunIntermediateContent"] = "TeamRunIntermediateContent";
44
+ TeamRunEvent2["TeamRunContentCompleted"] = "TeamRunContentCompleted";
45
+ TeamRunEvent2["TeamRunCompleted"] = "TeamRunCompleted";
46
+ TeamRunEvent2["TeamRunError"] = "TeamRunError";
47
+ TeamRunEvent2["TeamRunCancelled"] = "TeamRunCancelled";
48
+ TeamRunEvent2["TeamRunPaused"] = "TeamRunPaused";
49
+ TeamRunEvent2["TeamRunContinued"] = "TeamRunContinued";
50
+ TeamRunEvent2["TeamToolCallStarted"] = "TeamToolCallStarted";
51
+ TeamRunEvent2["TeamToolCallCompleted"] = "TeamToolCallCompleted";
52
+ TeamRunEvent2["TeamToolCallError"] = "TeamToolCallError";
53
+ TeamRunEvent2["TeamReasoningStarted"] = "TeamReasoningStarted";
54
+ TeamRunEvent2["TeamReasoningStep"] = "TeamReasoningStep";
55
+ TeamRunEvent2["TeamReasoningContentDelta"] = "TeamReasoningContentDelta";
56
+ TeamRunEvent2["TeamReasoningCompleted"] = "TeamReasoningCompleted";
57
+ TeamRunEvent2["TeamMemoryUpdateStarted"] = "TeamMemoryUpdateStarted";
58
+ TeamRunEvent2["TeamMemoryUpdateCompleted"] = "TeamMemoryUpdateCompleted";
59
+ TeamRunEvent2["TeamFollowupsStarted"] = "TeamFollowupsStarted";
60
+ TeamRunEvent2["TeamFollowupsCompleted"] = "TeamFollowupsCompleted";
61
+ TeamRunEvent2["TeamTaskIterationStarted"] = "TeamTaskIterationStarted";
62
+ TeamRunEvent2["TeamTaskIterationCompleted"] = "TeamTaskIterationCompleted";
63
+ TeamRunEvent2["TeamTaskStateUpdated"] = "TeamTaskStateUpdated";
64
+ TeamRunEvent2["TeamTaskCreated"] = "TeamTaskCreated";
65
+ TeamRunEvent2["TeamTaskUpdated"] = "TeamTaskUpdated";
66
+ return TeamRunEvent2;
67
+ })(TeamRunEvent || {});
68
+ var WorkflowRunEvent = /* @__PURE__ */ ((WorkflowRunEvent2) => {
69
+ WorkflowRunEvent2["WorkflowStarted"] = "WorkflowStarted";
70
+ WorkflowRunEvent2["WorkflowCompleted"] = "WorkflowCompleted";
71
+ WorkflowRunEvent2["WorkflowPaused"] = "WorkflowPaused";
72
+ WorkflowRunEvent2["WorkflowCancelled"] = "WorkflowCancelled";
73
+ WorkflowRunEvent2["WorkflowError"] = "WorkflowError";
74
+ WorkflowRunEvent2["WorkflowAgentStarted"] = "WorkflowAgentStarted";
75
+ WorkflowRunEvent2["WorkflowAgentCompleted"] = "WorkflowAgentCompleted";
76
+ WorkflowRunEvent2["StepStarted"] = "StepStarted";
77
+ WorkflowRunEvent2["StepCompleted"] = "StepCompleted";
78
+ WorkflowRunEvent2["StepPaused"] = "StepPaused";
79
+ WorkflowRunEvent2["StepContinued"] = "StepContinued";
80
+ WorkflowRunEvent2["StepError"] = "StepError";
81
+ WorkflowRunEvent2["StepOutput"] = "StepOutput";
82
+ WorkflowRunEvent2["StepOutputReview"] = "StepOutputReview";
83
+ WorkflowRunEvent2["LoopExecutionStarted"] = "LoopExecutionStarted";
84
+ WorkflowRunEvent2["LoopIterationStarted"] = "LoopIterationStarted";
85
+ WorkflowRunEvent2["LoopIterationCompleted"] = "LoopIterationCompleted";
86
+ WorkflowRunEvent2["LoopExecutionCompleted"] = "LoopExecutionCompleted";
87
+ WorkflowRunEvent2["ParallelExecutionStarted"] = "ParallelExecutionStarted";
88
+ WorkflowRunEvent2["ParallelExecutionCompleted"] = "ParallelExecutionCompleted";
89
+ WorkflowRunEvent2["ConditionExecutionStarted"] = "ConditionExecutionStarted";
90
+ WorkflowRunEvent2["ConditionExecutionCompleted"] = "ConditionExecutionCompleted";
91
+ WorkflowRunEvent2["ConditionPaused"] = "ConditionPaused";
92
+ WorkflowRunEvent2["RouterExecutionStarted"] = "RouterExecutionStarted";
93
+ WorkflowRunEvent2["RouterExecutionCompleted"] = "RouterExecutionCompleted";
94
+ WorkflowRunEvent2["RouterPaused"] = "RouterPaused";
95
+ WorkflowRunEvent2["StepsExecutionStarted"] = "StepsExecutionStarted";
96
+ WorkflowRunEvent2["StepsExecutionCompleted"] = "StepsExecutionCompleted";
97
+ return WorkflowRunEvent2;
98
+ })(WorkflowRunEvent || {});
99
+
100
+ export { RunEvent, TeamRunEvent, WorkflowRunEvent };
101
+ //# sourceMappingURL=chunk-RE7ZT73K.js.map
102
+ //# sourceMappingURL=chunk-RE7ZT73K.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/core/types.ts"],"names":["RunEvent","TeamRunEvent","WorkflowRunEvent"],"mappings":";AAYO,IAAK,QAAA,qBAAAA,SAAAA,KAAL;AACL,EAAAA,UAAA,YAAA,CAAA,GAAa,YAAA;AACb,EAAAA,UAAA,YAAA,CAAA,GAAa,YAAA;AACb,EAAAA,UAAA,qBAAA,CAAA,GAAsB,qBAAA;AACtB,EAAAA,UAAA,wBAAA,CAAA,GAAyB,wBAAA;AACzB,EAAAA,UAAA,cAAA,CAAA,GAAe,cAAA;AACf,EAAAA,UAAA,UAAA,CAAA,GAAW,UAAA;AACX,EAAAA,UAAA,cAAA,CAAA,GAAe,cAAA;AACf,EAAAA,UAAA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AAA,CAAA,GAA8B,6BAAA;AAC9B,EAAAA,kBAAA,iBAAA,CAAA,GAAkB,iBAAA;AAElB,EAAAA,kBAAA,wBAAA,CAAA,GAAyB,wBAAA;AACzB,EAAAA,kBAAA,0BAAA,CAAA,GAA2B,0BAAA;AAC3B,EAAAA,kBAAA,cAAA,CAAA,GAAe,cAAA;AAEf,EAAAA,kBAAA,uBAAA,CAAA,GAAwB,uBAAA;AACxB,EAAAA,kBAAA,yBAAA,CAAA,GAA0B,yBAAA;AAnChB,EAAA,OAAAA,iBAAAA;AAAA,CAAA,EAAA,gBAAA,IAAA,EAAA","file":"chunk-RE7ZT73K.js","sourcesContent":["/**\n * Types for AgentOS run events, messages, and entities.\n *\n * These mirror the wire format emitted by Agno's AgentOS when streaming a run\n * for an agent, team, or workflow. Field names match the JSON sent on the wire.\n */\n\n/* ------------------------------------------------------------------ */\n/* Run event names */\n/* ------------------------------------------------------------------ */\n\n/** Agent run event names. */\nexport enum RunEvent {\n RunStarted = 'RunStarted',\n RunContent = 'RunContent',\n RunContentCompleted = 'RunContentCompleted',\n RunIntermediateContent = 'RunIntermediateContent',\n RunCompleted = 'RunCompleted',\n RunError = 'RunError',\n RunCancelled = 'RunCancelled',\n RunPaused = 'RunPaused',\n RunContinued = 'RunContinued',\n\n PreHookStarted = 'PreHookStarted',\n PreHookCompleted = 'PreHookCompleted',\n PostHookStarted = 'PostHookStarted',\n PostHookCompleted = 'PostHookCompleted',\n\n ToolCallStarted = 'ToolCallStarted',\n ToolCallCompleted = 'ToolCallCompleted',\n ToolCallError = 'ToolCallError',\n\n ReasoningStarted = 'ReasoningStarted',\n ReasoningStep = 'ReasoningStep',\n ReasoningContentDelta = 'ReasoningContentDelta',\n ReasoningCompleted = 'ReasoningCompleted',\n\n MemoryUpdateStarted = 'MemoryUpdateStarted',\n MemoryUpdateCompleted = 'MemoryUpdateCompleted',\n\n SessionSummaryStarted = 'SessionSummaryStarted',\n SessionSummaryCompleted = 'SessionSummaryCompleted',\n\n ParserModelResponseStarted = 'ParserModelResponseStarted',\n ParserModelResponseCompleted = 'ParserModelResponseCompleted',\n OutputModelResponseStarted = 'OutputModelResponseStarted',\n OutputModelResponseCompleted = 'OutputModelResponseCompleted',\n\n ModelRequestStarted = 'ModelRequestStarted',\n ModelRequestCompleted = 'ModelRequestCompleted',\n\n CompressionStarted = 'CompressionStarted',\n CompressionCompleted = 'CompressionCompleted',\n\n FollowupsStarted = 'FollowupsStarted',\n FollowupsCompleted = 'FollowupsCompleted',\n\n CustomEvent = 'CustomEvent',\n}\n\n/** Team run event names. */\nexport enum TeamRunEvent {\n TeamRunStarted = 'TeamRunStarted',\n TeamRunContent = 'TeamRunContent',\n TeamRunIntermediateContent = 'TeamRunIntermediateContent',\n TeamRunContentCompleted = 'TeamRunContentCompleted',\n TeamRunCompleted = 'TeamRunCompleted',\n TeamRunError = 'TeamRunError',\n TeamRunCancelled = 'TeamRunCancelled',\n TeamRunPaused = 'TeamRunPaused',\n TeamRunContinued = 'TeamRunContinued',\n\n TeamToolCallStarted = 'TeamToolCallStarted',\n TeamToolCallCompleted = 'TeamToolCallCompleted',\n TeamToolCallError = 'TeamToolCallError',\n\n TeamReasoningStarted = 'TeamReasoningStarted',\n TeamReasoningStep = 'TeamReasoningStep',\n TeamReasoningContentDelta = 'TeamReasoningContentDelta',\n TeamReasoningCompleted = 'TeamReasoningCompleted',\n\n TeamMemoryUpdateStarted = 'TeamMemoryUpdateStarted',\n TeamMemoryUpdateCompleted = 'TeamMemoryUpdateCompleted',\n\n TeamFollowupsStarted = 'TeamFollowupsStarted',\n TeamFollowupsCompleted = 'TeamFollowupsCompleted',\n\n TeamTaskIterationStarted = 'TeamTaskIterationStarted',\n TeamTaskIterationCompleted = 'TeamTaskIterationCompleted',\n TeamTaskStateUpdated = 'TeamTaskStateUpdated',\n TeamTaskCreated = 'TeamTaskCreated',\n TeamTaskUpdated = 'TeamTaskUpdated',\n}\n\n/** Workflow run event names. */\nexport enum WorkflowRunEvent {\n WorkflowStarted = 'WorkflowStarted',\n WorkflowCompleted = 'WorkflowCompleted',\n WorkflowPaused = 'WorkflowPaused',\n WorkflowCancelled = 'WorkflowCancelled',\n WorkflowError = 'WorkflowError',\n\n WorkflowAgentStarted = 'WorkflowAgentStarted',\n WorkflowAgentCompleted = 'WorkflowAgentCompleted',\n\n StepStarted = 'StepStarted',\n StepCompleted = 'StepCompleted',\n StepPaused = 'StepPaused',\n StepContinued = 'StepContinued',\n StepError = 'StepError',\n StepOutput = 'StepOutput',\n StepOutputReview = 'StepOutputReview',\n\n LoopExecutionStarted = 'LoopExecutionStarted',\n LoopIterationStarted = 'LoopIterationStarted',\n LoopIterationCompleted = 'LoopIterationCompleted',\n LoopExecutionCompleted = 'LoopExecutionCompleted',\n\n ParallelExecutionStarted = 'ParallelExecutionStarted',\n ParallelExecutionCompleted = 'ParallelExecutionCompleted',\n\n ConditionExecutionStarted = 'ConditionExecutionStarted',\n ConditionExecutionCompleted = 'ConditionExecutionCompleted',\n ConditionPaused = 'ConditionPaused',\n\n RouterExecutionStarted = 'RouterExecutionStarted',\n RouterExecutionCompleted = 'RouterExecutionCompleted',\n RouterPaused = 'RouterPaused',\n\n StepsExecutionStarted = 'StepsExecutionStarted',\n StepsExecutionCompleted = 'StepsExecutionCompleted',\n}\n\n/** Any run event name, across agents, teams and workflows. */\nexport type AnyRunEventName = RunEvent | TeamRunEvent | WorkflowRunEvent | string\n\n/* ------------------------------------------------------------------ */\n/* Tool calls */\n/* ------------------------------------------------------------------ */\n\nexport interface UserInputField {\n name: string\n field_type?: string\n description?: string\n value?: unknown\n}\n\nexport interface ToolExecution {\n tool_call_id?: string\n tool_name?: string\n tool_args?: Record<string, unknown>\n tool_call_error?: boolean\n result?: string\n metrics?: { time?: number }\n created_at?: number\n stop_after_tool_call?: boolean\n\n // Human-in-the-loop\n requires_confirmation?: boolean\n confirmed?: boolean\n confirmation_note?: string\n requires_user_input?: boolean\n user_input_schema?: UserInputField[]\n answered?: boolean\n external_execution_required?: boolean\n\n // present on a few content payloads under the legacy `role`/`content` shape\n role?: string\n content?: string | null\n}\n\n/* ------------------------------------------------------------------ */\n/* Reasoning, references, media */\n/* ------------------------------------------------------------------ */\n\nexport interface ReasoningStep {\n title?: string\n action?: string\n result?: string\n reasoning?: string\n confidence?: number\n next_action?: string\n}\n\nexport interface Reference {\n content: string\n name?: string\n meta_data?: Record<string, unknown>\n}\n\nexport interface ReferenceData {\n query: string\n references: Reference[]\n time?: number\n}\n\nexport interface ImageData {\n url?: string\n revised_prompt?: string\n content?: string\n}\n\nexport interface VideoData {\n id?: number | string\n url?: string\n eta?: number\n}\n\nexport interface AudioData {\n id?: string\n url?: string\n base64_audio?: string\n mime_type?: string\n content?: string\n transcript?: string\n channels?: number\n sample_rate?: number\n}\n\nexport interface Citations {\n raw?: unknown\n urls?: Array<{ url?: string; title?: string }>\n}\n\n/* ------------------------------------------------------------------ */\n/* The raw streamed event */\n/* ------------------------------------------------------------------ */\n\n/**\n * A single run event off the wire, normalised to a flat object. The `event`\n * field is the discriminator; other fields depend on the event type. This is a\n * permissive superset — most fields are optional and present only for the\n * events that carry them.\n */\nexport interface RunEventData {\n event: AnyRunEventName\n created_at?: number\n run_id?: string\n parent_run_id?: string\n session_id?: string\n agent_id?: string\n agent_name?: string\n team_id?: string\n team_name?: string\n workflow_id?: string\n workflow_name?: string\n\n content?: string | object | null\n content_type?: string\n reasoning_content?: string\n\n tool?: ToolExecution\n tools?: ToolExecution[]\n\n reasoning_steps?: ReasoningStep[]\n references?: ReferenceData[]\n citations?: Citations\n\n /** `FollowupsCompleted`: the suggested next prompts. */\n followups?: string[]\n\n images?: ImageData[]\n videos?: VideoData[]\n audio?: AudioData[]\n response_audio?: AudioData\n\n // workflow / step context\n step_name?: string\n step_index?: number | [number, number]\n iteration?: number\n max_iterations?: number\n\n // pause / human-in-the-loop\n requirements?: RunRequirement[]\n requires_confirmation?: boolean\n confirmation_message?: string\n requires_user_input?: boolean\n user_input_message?: string\n user_input_schema?: UserInputField[]\n available_choices?: string[]\n allow_multiple_selections?: boolean\n\n // error\n error?: string\n error_type?: string\n\n // model metrics\n model?: string\n model_provider?: string\n input_tokens?: number\n output_tokens?: number\n total_tokens?: number\n\n metrics?: Record<string, unknown>\n extra_data?: {\n reasoning_steps?: ReasoningStep[]\n references?: ReferenceData[]\n }\n\n // allow forward-compatible access to any other field\n [key: string]: unknown\n}\n\n/* ------------------------------------------------------------------ */\n/* Human-in-the-loop requirement */\n/* ------------------------------------------------------------------ */\n\nexport type PauseType = 'confirmation' | 'user_input' | 'user_feedback' | 'external_execution'\n\nexport interface RunRequirement {\n id: string\n tool_execution?: ToolExecution\n confirmation?: boolean\n confirmation_note?: string\n user_input_schema?: UserInputField[]\n external_execution_result?: string\n member_agent_id?: string\n member_agent_name?: string\n pause_type?: PauseType\n}\n\n/* ------------------------------------------------------------------ */\n/* Chat message (the accumulated, render-ready view of a run) */\n/* ------------------------------------------------------------------ */\n\nexport type ChatRole = 'user' | 'agent' | 'system'\n\nexport type ChatStatus = 'idle' | 'streaming' | 'paused' | 'completed' | 'error' | 'cancelled'\n\nexport type SubRunStatus = 'running' | 'completed' | 'error'\n\n/**\n * A nested run inside a team or workflow run — a team member's turn, or the\n * agent/team that executes a workflow step. Accumulated from events that carry\n * a `parent_run_id`.\n */\nexport interface SubRun {\n run_id: string\n kind: 'member' | 'executor'\n name?: string\n agent_id?: string\n content: string\n tool_calls?: ToolExecution[]\n status: SubRunStatus\n}\n\n/** A workflow step and its output, accumulated from `Step*` events. */\nexport interface WorkflowStep {\n key: string\n name?: string\n index?: number | [number, number]\n status: SubRunStatus\n content?: string\n error?: string\n}\n\nexport interface ChatMessage {\n id: string\n role: ChatRole\n content: string\n created_at: number\n\n /** Set while this message is being streamed. */\n streaming?: boolean\n /** Run-level status, set for agent messages. */\n status?: ChatStatus\n error?: string\n\n run_id?: string\n session_id?: string\n\n tool_calls?: ToolExecution[]\n reasoning_steps?: ReasoningStep[]\n references?: ReferenceData[]\n citations?: Citations\n\n /**\n * Suggested next prompts, when the agent was built with `followups=True`.\n * Rendered under the latest answer as \"Related questions\".\n */\n followups?: string[]\n\n images?: ImageData[]\n videos?: VideoData[]\n audio?: AudioData[]\n response_audio?: AudioData\n\n /** Live \"what is it doing right now\" label, e.g. \"Calling get_weather\". */\n activity?: string\n\n /** Pause requirements when the run is waiting for a human. */\n requirements?: RunRequirement[]\n\n /** Team member turns / workflow step executors (nested runs). */\n members?: SubRun[]\n\n /** Workflow steps and their outputs. */\n steps?: WorkflowStep[]\n\n /** Every raw event that contributed to this message, in order. */\n events?: RunEventData[]\n}\n\n/* ------------------------------------------------------------------ */\n/* Entities (agents / teams / workflows) and sessions */\n/* ------------------------------------------------------------------ */\n\nexport interface Model {\n name?: string\n model?: string\n provider?: string\n}\n\nexport type EntityType = 'agent' | 'team' | 'workflow'\n\nexport interface Entity {\n type: EntityType\n id: string\n name: string\n description?: string\n model?: Model\n db_id?: string\n}\n\nexport interface SessionEntry {\n session_id: string\n session_name?: string\n /** Unix seconds, Unix milliseconds, or an ISO date string, depending on the backend. */\n created_at: number | string\n updated_at?: number | string\n}\n\nexport interface Pagination {\n page: number\n limit: number\n total_pages: number\n total_count: number\n}\n\nexport interface SessionsResponse {\n data: SessionEntry[]\n meta?: Pagination\n}\n"]}
@@ -0,0 +1,413 @@
1
+ /**
2
+ * Types for AgentOS run events, messages, and entities.
3
+ *
4
+ * These mirror the wire format emitted by Agno's AgentOS when streaming a run
5
+ * for an agent, team, or workflow. Field names match the JSON sent on the wire.
6
+ */
7
+ /** Agent run event names. */
8
+ declare enum RunEvent {
9
+ RunStarted = "RunStarted",
10
+ RunContent = "RunContent",
11
+ RunContentCompleted = "RunContentCompleted",
12
+ RunIntermediateContent = "RunIntermediateContent",
13
+ RunCompleted = "RunCompleted",
14
+ RunError = "RunError",
15
+ RunCancelled = "RunCancelled",
16
+ RunPaused = "RunPaused",
17
+ RunContinued = "RunContinued",
18
+ PreHookStarted = "PreHookStarted",
19
+ PreHookCompleted = "PreHookCompleted",
20
+ PostHookStarted = "PostHookStarted",
21
+ PostHookCompleted = "PostHookCompleted",
22
+ ToolCallStarted = "ToolCallStarted",
23
+ ToolCallCompleted = "ToolCallCompleted",
24
+ ToolCallError = "ToolCallError",
25
+ ReasoningStarted = "ReasoningStarted",
26
+ ReasoningStep = "ReasoningStep",
27
+ ReasoningContentDelta = "ReasoningContentDelta",
28
+ ReasoningCompleted = "ReasoningCompleted",
29
+ MemoryUpdateStarted = "MemoryUpdateStarted",
30
+ MemoryUpdateCompleted = "MemoryUpdateCompleted",
31
+ SessionSummaryStarted = "SessionSummaryStarted",
32
+ SessionSummaryCompleted = "SessionSummaryCompleted",
33
+ ParserModelResponseStarted = "ParserModelResponseStarted",
34
+ ParserModelResponseCompleted = "ParserModelResponseCompleted",
35
+ OutputModelResponseStarted = "OutputModelResponseStarted",
36
+ OutputModelResponseCompleted = "OutputModelResponseCompleted",
37
+ ModelRequestStarted = "ModelRequestStarted",
38
+ ModelRequestCompleted = "ModelRequestCompleted",
39
+ CompressionStarted = "CompressionStarted",
40
+ CompressionCompleted = "CompressionCompleted",
41
+ FollowupsStarted = "FollowupsStarted",
42
+ FollowupsCompleted = "FollowupsCompleted",
43
+ CustomEvent = "CustomEvent"
44
+ }
45
+ /** Team run event names. */
46
+ declare enum TeamRunEvent {
47
+ TeamRunStarted = "TeamRunStarted",
48
+ TeamRunContent = "TeamRunContent",
49
+ TeamRunIntermediateContent = "TeamRunIntermediateContent",
50
+ TeamRunContentCompleted = "TeamRunContentCompleted",
51
+ TeamRunCompleted = "TeamRunCompleted",
52
+ TeamRunError = "TeamRunError",
53
+ TeamRunCancelled = "TeamRunCancelled",
54
+ TeamRunPaused = "TeamRunPaused",
55
+ TeamRunContinued = "TeamRunContinued",
56
+ TeamToolCallStarted = "TeamToolCallStarted",
57
+ TeamToolCallCompleted = "TeamToolCallCompleted",
58
+ TeamToolCallError = "TeamToolCallError",
59
+ TeamReasoningStarted = "TeamReasoningStarted",
60
+ TeamReasoningStep = "TeamReasoningStep",
61
+ TeamReasoningContentDelta = "TeamReasoningContentDelta",
62
+ TeamReasoningCompleted = "TeamReasoningCompleted",
63
+ TeamMemoryUpdateStarted = "TeamMemoryUpdateStarted",
64
+ TeamMemoryUpdateCompleted = "TeamMemoryUpdateCompleted",
65
+ TeamFollowupsStarted = "TeamFollowupsStarted",
66
+ TeamFollowupsCompleted = "TeamFollowupsCompleted",
67
+ TeamTaskIterationStarted = "TeamTaskIterationStarted",
68
+ TeamTaskIterationCompleted = "TeamTaskIterationCompleted",
69
+ TeamTaskStateUpdated = "TeamTaskStateUpdated",
70
+ TeamTaskCreated = "TeamTaskCreated",
71
+ TeamTaskUpdated = "TeamTaskUpdated"
72
+ }
73
+ /** Workflow run event names. */
74
+ declare enum WorkflowRunEvent {
75
+ WorkflowStarted = "WorkflowStarted",
76
+ WorkflowCompleted = "WorkflowCompleted",
77
+ WorkflowPaused = "WorkflowPaused",
78
+ WorkflowCancelled = "WorkflowCancelled",
79
+ WorkflowError = "WorkflowError",
80
+ WorkflowAgentStarted = "WorkflowAgentStarted",
81
+ WorkflowAgentCompleted = "WorkflowAgentCompleted",
82
+ StepStarted = "StepStarted",
83
+ StepCompleted = "StepCompleted",
84
+ StepPaused = "StepPaused",
85
+ StepContinued = "StepContinued",
86
+ StepError = "StepError",
87
+ StepOutput = "StepOutput",
88
+ StepOutputReview = "StepOutputReview",
89
+ LoopExecutionStarted = "LoopExecutionStarted",
90
+ LoopIterationStarted = "LoopIterationStarted",
91
+ LoopIterationCompleted = "LoopIterationCompleted",
92
+ LoopExecutionCompleted = "LoopExecutionCompleted",
93
+ ParallelExecutionStarted = "ParallelExecutionStarted",
94
+ ParallelExecutionCompleted = "ParallelExecutionCompleted",
95
+ ConditionExecutionStarted = "ConditionExecutionStarted",
96
+ ConditionExecutionCompleted = "ConditionExecutionCompleted",
97
+ ConditionPaused = "ConditionPaused",
98
+ RouterExecutionStarted = "RouterExecutionStarted",
99
+ RouterExecutionCompleted = "RouterExecutionCompleted",
100
+ RouterPaused = "RouterPaused",
101
+ StepsExecutionStarted = "StepsExecutionStarted",
102
+ StepsExecutionCompleted = "StepsExecutionCompleted"
103
+ }
104
+ /** Any run event name, across agents, teams and workflows. */
105
+ type AnyRunEventName = RunEvent | TeamRunEvent | WorkflowRunEvent | string;
106
+ interface UserInputField {
107
+ name: string;
108
+ field_type?: string;
109
+ description?: string;
110
+ value?: unknown;
111
+ }
112
+ interface ToolExecution {
113
+ tool_call_id?: string;
114
+ tool_name?: string;
115
+ tool_args?: Record<string, unknown>;
116
+ tool_call_error?: boolean;
117
+ result?: string;
118
+ metrics?: {
119
+ time?: number;
120
+ };
121
+ created_at?: number;
122
+ stop_after_tool_call?: boolean;
123
+ requires_confirmation?: boolean;
124
+ confirmed?: boolean;
125
+ confirmation_note?: string;
126
+ requires_user_input?: boolean;
127
+ user_input_schema?: UserInputField[];
128
+ answered?: boolean;
129
+ external_execution_required?: boolean;
130
+ role?: string;
131
+ content?: string | null;
132
+ }
133
+ interface ReasoningStep {
134
+ title?: string;
135
+ action?: string;
136
+ result?: string;
137
+ reasoning?: string;
138
+ confidence?: number;
139
+ next_action?: string;
140
+ }
141
+ interface Reference {
142
+ content: string;
143
+ name?: string;
144
+ meta_data?: Record<string, unknown>;
145
+ }
146
+ interface ReferenceData {
147
+ query: string;
148
+ references: Reference[];
149
+ time?: number;
150
+ }
151
+ interface ImageData {
152
+ url?: string;
153
+ revised_prompt?: string;
154
+ content?: string;
155
+ }
156
+ interface VideoData {
157
+ id?: number | string;
158
+ url?: string;
159
+ eta?: number;
160
+ }
161
+ interface AudioData {
162
+ id?: string;
163
+ url?: string;
164
+ base64_audio?: string;
165
+ mime_type?: string;
166
+ content?: string;
167
+ transcript?: string;
168
+ channels?: number;
169
+ sample_rate?: number;
170
+ }
171
+ interface Citations {
172
+ raw?: unknown;
173
+ urls?: Array<{
174
+ url?: string;
175
+ title?: string;
176
+ }>;
177
+ }
178
+ /**
179
+ * A single run event off the wire, normalised to a flat object. The `event`
180
+ * field is the discriminator; other fields depend on the event type. This is a
181
+ * permissive superset — most fields are optional and present only for the
182
+ * events that carry them.
183
+ */
184
+ interface RunEventData {
185
+ event: AnyRunEventName;
186
+ created_at?: number;
187
+ run_id?: string;
188
+ parent_run_id?: string;
189
+ session_id?: string;
190
+ agent_id?: string;
191
+ agent_name?: string;
192
+ team_id?: string;
193
+ team_name?: string;
194
+ workflow_id?: string;
195
+ workflow_name?: string;
196
+ content?: string | object | null;
197
+ content_type?: string;
198
+ reasoning_content?: string;
199
+ tool?: ToolExecution;
200
+ tools?: ToolExecution[];
201
+ reasoning_steps?: ReasoningStep[];
202
+ references?: ReferenceData[];
203
+ citations?: Citations;
204
+ /** `FollowupsCompleted`: the suggested next prompts. */
205
+ followups?: string[];
206
+ images?: ImageData[];
207
+ videos?: VideoData[];
208
+ audio?: AudioData[];
209
+ response_audio?: AudioData;
210
+ step_name?: string;
211
+ step_index?: number | [number, number];
212
+ iteration?: number;
213
+ max_iterations?: number;
214
+ requirements?: RunRequirement[];
215
+ requires_confirmation?: boolean;
216
+ confirmation_message?: string;
217
+ requires_user_input?: boolean;
218
+ user_input_message?: string;
219
+ user_input_schema?: UserInputField[];
220
+ available_choices?: string[];
221
+ allow_multiple_selections?: boolean;
222
+ error?: string;
223
+ error_type?: string;
224
+ model?: string;
225
+ model_provider?: string;
226
+ input_tokens?: number;
227
+ output_tokens?: number;
228
+ total_tokens?: number;
229
+ metrics?: Record<string, unknown>;
230
+ extra_data?: {
231
+ reasoning_steps?: ReasoningStep[];
232
+ references?: ReferenceData[];
233
+ };
234
+ [key: string]: unknown;
235
+ }
236
+ type PauseType = 'confirmation' | 'user_input' | 'user_feedback' | 'external_execution';
237
+ interface RunRequirement {
238
+ id: string;
239
+ tool_execution?: ToolExecution;
240
+ confirmation?: boolean;
241
+ confirmation_note?: string;
242
+ user_input_schema?: UserInputField[];
243
+ external_execution_result?: string;
244
+ member_agent_id?: string;
245
+ member_agent_name?: string;
246
+ pause_type?: PauseType;
247
+ }
248
+ type ChatRole = 'user' | 'agent' | 'system';
249
+ type ChatStatus = 'idle' | 'streaming' | 'paused' | 'completed' | 'error' | 'cancelled';
250
+ type SubRunStatus = 'running' | 'completed' | 'error';
251
+ /**
252
+ * A nested run inside a team or workflow run — a team member's turn, or the
253
+ * agent/team that executes a workflow step. Accumulated from events that carry
254
+ * a `parent_run_id`.
255
+ */
256
+ interface SubRun {
257
+ run_id: string;
258
+ kind: 'member' | 'executor';
259
+ name?: string;
260
+ agent_id?: string;
261
+ content: string;
262
+ tool_calls?: ToolExecution[];
263
+ status: SubRunStatus;
264
+ }
265
+ /** A workflow step and its output, accumulated from `Step*` events. */
266
+ interface WorkflowStep {
267
+ key: string;
268
+ name?: string;
269
+ index?: number | [number, number];
270
+ status: SubRunStatus;
271
+ content?: string;
272
+ error?: string;
273
+ }
274
+ interface ChatMessage {
275
+ id: string;
276
+ role: ChatRole;
277
+ content: string;
278
+ created_at: number;
279
+ /** Set while this message is being streamed. */
280
+ streaming?: boolean;
281
+ /** Run-level status, set for agent messages. */
282
+ status?: ChatStatus;
283
+ error?: string;
284
+ run_id?: string;
285
+ session_id?: string;
286
+ tool_calls?: ToolExecution[];
287
+ reasoning_steps?: ReasoningStep[];
288
+ references?: ReferenceData[];
289
+ citations?: Citations;
290
+ /**
291
+ * Suggested next prompts, when the agent was built with `followups=True`.
292
+ * Rendered under the latest answer as "Related questions".
293
+ */
294
+ followups?: string[];
295
+ images?: ImageData[];
296
+ videos?: VideoData[];
297
+ audio?: AudioData[];
298
+ response_audio?: AudioData;
299
+ /** Live "what is it doing right now" label, e.g. "Calling get_weather". */
300
+ activity?: string;
301
+ /** Pause requirements when the run is waiting for a human. */
302
+ requirements?: RunRequirement[];
303
+ /** Team member turns / workflow step executors (nested runs). */
304
+ members?: SubRun[];
305
+ /** Workflow steps and their outputs. */
306
+ steps?: WorkflowStep[];
307
+ /** Every raw event that contributed to this message, in order. */
308
+ events?: RunEventData[];
309
+ }
310
+ interface Model {
311
+ name?: string;
312
+ model?: string;
313
+ provider?: string;
314
+ }
315
+ type EntityType = 'agent' | 'team' | 'workflow';
316
+ interface Entity {
317
+ type: EntityType;
318
+ id: string;
319
+ name: string;
320
+ description?: string;
321
+ model?: Model;
322
+ db_id?: string;
323
+ }
324
+ interface SessionEntry {
325
+ session_id: string;
326
+ session_name?: string;
327
+ /** Unix seconds, Unix milliseconds, or an ISO date string, depending on the backend. */
328
+ created_at: number | string;
329
+ updated_at?: number | string;
330
+ }
331
+ interface Pagination {
332
+ page: number;
333
+ limit: number;
334
+ total_pages: number;
335
+ total_count: number;
336
+ }
337
+ interface SessionsResponse {
338
+ data: SessionEntry[];
339
+ meta?: Pagination;
340
+ }
341
+
342
+ /**
343
+ * Thin client for an AgentOS HTTP backend.
344
+ *
345
+ * Wraps the discovery, run, continue, cancel and session endpoints. Streaming
346
+ * runs are handled by `streamRun` from ./stream; everything else is plain JSON.
347
+ */
348
+
349
+ /** Normalise a base URL: add a scheme for bare hosts, strip trailing slash. */
350
+ declare function normaliseBaseUrl(value: string | null | undefined): string;
351
+ interface AgnoClientOptions {
352
+ /** AgentOS base URL, e.g. "http://localhost:7777". */
353
+ baseUrl: string;
354
+ /** Optional headers (e.g. Authorization) added to every request. */
355
+ headers?: Record<string, string>;
356
+ /** Default db_id used for session listing where the backend requires it. */
357
+ dbId?: string;
358
+ }
359
+ interface RunArgs {
360
+ type: EntityType;
361
+ id: string;
362
+ message?: string;
363
+ sessionId?: string;
364
+ userId?: string;
365
+ files?: File[];
366
+ /** Extra form fields appended verbatim. */
367
+ extra?: Record<string, string>;
368
+ signal?: AbortSignal;
369
+ onEvent: (event: RunEventData) => void;
370
+ onError: (error: Error) => void;
371
+ onComplete: () => void;
372
+ }
373
+ interface ContinueArgs {
374
+ type: EntityType;
375
+ id: string;
376
+ runId: string;
377
+ sessionId?: string;
378
+ userId?: string;
379
+ /** Resolved tool executions (agents/teams human-in-the-loop). */
380
+ tools?: ToolExecution[];
381
+ /** Resolved step requirements (workflow human-in-the-loop). */
382
+ stepRequirements?: unknown[];
383
+ signal?: AbortSignal;
384
+ onEvent: (event: RunEventData) => void;
385
+ onError: (error: Error) => void;
386
+ onComplete: () => void;
387
+ }
388
+ declare class AgnoClient {
389
+ readonly baseUrl: string;
390
+ readonly headers: Record<string, string>;
391
+ readonly dbId?: string;
392
+ constructor(options: AgnoClientOptions);
393
+ private getJson;
394
+ /** Liveness check against /health. Returns the HTTP status code. */
395
+ health(): Promise<number>;
396
+ getAgents(): Promise<Entity[]>;
397
+ getTeams(): Promise<Entity[]>;
398
+ getWorkflows(): Promise<Entity[]>;
399
+ /** All runnable entities (agents, teams, workflows) in one list. */
400
+ getEntities(): Promise<Entity[]>;
401
+ getSessions(type: EntityType, componentId: string, dbId?: string): Promise<SessionsResponse>;
402
+ /** Runs (with messages/tools/events) for a session — used to rehydrate chat history. */
403
+ getSessionRuns(type: EntityType, sessionId: string, dbId?: string): Promise<any[]>;
404
+ deleteSession(sessionId: string, dbId?: string): Promise<boolean>;
405
+ /** Start a streaming run for an agent, team or workflow. */
406
+ run(args: RunArgs): Promise<void>;
407
+ /** Continue a paused run (resolving a human-in-the-loop requirement). */
408
+ continueRun(args: ContinueArgs): Promise<void>;
409
+ /** Cancel an in-flight run. */
410
+ cancelRun(type: EntityType, id: string, runId: string, sessionId?: string): Promise<boolean>;
411
+ }
412
+
413
+ export { AgnoClient as A, type ChatMessage as C, type Entity as E, type ImageData as I, type Model as M, type Pagination as P, type ReasoningStep as R, type SessionEntry as S, TeamRunEvent as T, type UserInputField as U, type VideoData as V, WorkflowRunEvent as W, type AgnoClientOptions as a, type AnyRunEventName as b, type AudioData as c, type ChatRole as d, type ChatStatus as e, type Citations as f, type EntityType as g, type PauseType as h, type Reference as i, type ReferenceData as j, RunEvent as k, type RunEventData as l, type RunRequirement as m, type SessionsResponse as n, type SubRun as o, type SubRunStatus as p, type ToolExecution as q, type WorkflowStep as r, normaliseBaseUrl as s };