agentfootprint 10.3.1 → 10.4.0
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.
- package/AGENTS.md +2 -2
- package/CAPABILITIES.md +6 -0
- package/README.md +44 -0
- package/ai-instructions/claude-code/SKILL.md +2 -2
- package/dist/adapters/mcp/agentcoreRuntime/errorType.js +24 -0
- package/dist/adapters/mcp/agentcoreRuntime/errorType.js.map +1 -0
- package/dist/adapters/mcp/agentcoreRuntime/invoke.js +265 -0
- package/dist/adapters/mcp/agentcoreRuntime/invoke.js.map +1 -0
- package/dist/adapters/mcp/agentcoreRuntime/safeAnswer.js +415 -0
- package/dist/adapters/mcp/agentcoreRuntime/safeAnswer.js.map +1 -0
- package/dist/adapters/mcp/agentcoreRuntime/session.js +179 -0
- package/dist/adapters/mcp/agentcoreRuntime/session.js.map +1 -0
- package/dist/adapters/mcp/agentcoreRuntime/sessionBusy.js +117 -0
- package/dist/adapters/mcp/agentcoreRuntime/sessionBusy.js.map +1 -0
- package/dist/adapters/mcp/agentcoreRuntime/strictJson.js +220 -0
- package/dist/adapters/mcp/agentcoreRuntime/strictJson.js.map +1 -0
- package/dist/adapters/mcp/agentcoreRuntime/transport.js +204 -0
- package/dist/adapters/mcp/agentcoreRuntime/transport.js.map +1 -0
- package/dist/adapters/memory/agentcore.js +435 -20
- package/dist/adapters/memory/agentcore.js.map +1 -1
- package/dist/adapters/memory/memoryBank.js +16 -3
- package/dist/adapters/memory/memoryBank.js.map +1 -1
- package/dist/adapters/memory/pgVector.js +10 -4
- package/dist/adapters/memory/pgVector.js.map +1 -1
- package/dist/adapters/memory/redis.js +11 -3
- package/dist/adapters/memory/redis.js.map +1 -1
- package/dist/adapters/memory/s3Vectors.js +8 -3
- package/dist/adapters/memory/s3Vectors.js.map +1 -1
- package/dist/adapters/memory/sqliteVector.js +10 -4
- package/dist/adapters/memory/sqliteVector.js.map +1 -1
- package/dist/ag-ui/adapter.js +71 -0
- package/dist/ag-ui/adapter.js.map +1 -0
- package/dist/ag-ui/framing.js +66 -0
- package/dist/ag-ui/framing.js.map +1 -0
- package/dist/ag-ui/frontendTools.js +69 -0
- package/dist/ag-ui/frontendTools.js.map +1 -0
- package/dist/ag-ui/ids.js +54 -0
- package/dist/ag-ui/ids.js.map +1 -0
- package/dist/ag-ui/index.js +27 -0
- package/dist/ag-ui/index.js.map +1 -0
- package/dist/ag-ui/request.js +356 -0
- package/dist/ag-ui/request.js.map +1 -0
- package/dist/ag-ui/serializer.js +899 -0
- package/dist/ag-ui/serializer.js.map +1 -0
- package/dist/ag-ui/types.js +22 -0
- package/dist/ag-ui/types.js.map +1 -0
- package/dist/core/Agent.js +38 -5
- package/dist/core/Agent.js.map +1 -1
- package/dist/core/RunnerBase.js +16 -2
- package/dist/core/RunnerBase.js.map +1 -1
- package/dist/core/agent/buildAgentChart.js +4 -0
- package/dist/core/agent/buildAgentChart.js.map +1 -1
- package/dist/core/agent/buildDynamicAgentChart.js +4 -0
- package/dist/core/agent/buildDynamicAgentChart.js.map +1 -1
- package/dist/core/agent/callerIdentity.js +2 -1
- package/dist/core/agent/callerIdentity.js.map +1 -1
- package/dist/core/agent/stages/routeTurn.js +3 -3
- package/dist/core/agent/stages/routeTurn.js.map +1 -1
- package/dist/core/agent/stages/seed.js +49 -8
- package/dist/core/agent/stages/seed.js.map +1 -1
- package/dist/core/agent/stages/timeLayer.js +2 -2
- package/dist/core/agent/stages/timeLayer.js.map +1 -1
- package/dist/core/agent/stages/toolCalls.js +26 -5
- package/dist/core/agent/stages/toolCalls.js.map +1 -1
- package/dist/core/memberRun.js +244 -0
- package/dist/core/memberRun.js.map +1 -0
- package/dist/core/slots/buildToolsSlot.js +1 -1
- package/dist/core/slots/buildToolsSlot.js.map +1 -1
- package/dist/core-flow/Conditional.js +29 -8
- package/dist/core-flow/Conditional.js.map +1 -1
- package/dist/core-flow/Graph.js +38 -13
- package/dist/core-flow/Graph.js.map +1 -1
- package/dist/core-flow/Loop.js +29 -9
- package/dist/core-flow/Loop.js.map +1 -1
- package/dist/core-flow/Parallel.js +35 -14
- package/dist/core-flow/Parallel.js.map +1 -1
- package/dist/core-flow/Sequence.js +29 -8
- package/dist/core-flow/Sequence.js.map +1 -1
- package/dist/core-flow/Workflow.js +34 -10
- package/dist/core-flow/Workflow.js.map +1 -1
- package/dist/doors/ag-ui.js +36 -0
- package/dist/doors/ag-ui.js.map +1 -0
- package/dist/esm/adapters/mcp/agentcoreRuntime/errorType.d.ts +12 -0
- package/dist/esm/adapters/mcp/agentcoreRuntime/errorType.js +20 -0
- package/dist/esm/adapters/mcp/agentcoreRuntime/errorType.js.map +1 -0
- package/dist/esm/adapters/mcp/agentcoreRuntime/invoke.d.ts +116 -0
- package/dist/esm/adapters/mcp/agentcoreRuntime/invoke.js +260 -0
- package/dist/esm/adapters/mcp/agentcoreRuntime/invoke.js.map +1 -0
- package/dist/esm/adapters/mcp/agentcoreRuntime/safeAnswer.d.ts +49 -0
- package/dist/esm/adapters/mcp/agentcoreRuntime/safeAnswer.js +409 -0
- package/dist/esm/adapters/mcp/agentcoreRuntime/safeAnswer.js.map +1 -0
- package/dist/esm/adapters/mcp/agentcoreRuntime/session.d.ts +80 -0
- package/dist/esm/adapters/mcp/agentcoreRuntime/session.js +175 -0
- package/dist/esm/adapters/mcp/agentcoreRuntime/session.js.map +1 -0
- package/dist/esm/adapters/mcp/agentcoreRuntime/sessionBusy.d.ts +61 -0
- package/dist/esm/adapters/mcp/agentcoreRuntime/sessionBusy.js +112 -0
- package/dist/esm/adapters/mcp/agentcoreRuntime/sessionBusy.js.map +1 -0
- package/dist/esm/adapters/mcp/agentcoreRuntime/strictJson.d.ts +37 -0
- package/dist/esm/adapters/mcp/agentcoreRuntime/strictJson.js +215 -0
- package/dist/esm/adapters/mcp/agentcoreRuntime/strictJson.js.map +1 -0
- package/dist/esm/adapters/mcp/agentcoreRuntime/transport.d.ts +176 -0
- package/dist/esm/adapters/mcp/agentcoreRuntime/transport.js +199 -0
- package/dist/esm/adapters/mcp/agentcoreRuntime/transport.js.map +1 -0
- package/dist/esm/adapters/memory/agentcore.d.ts +152 -7
- package/dist/esm/adapters/memory/agentcore.js +433 -19
- package/dist/esm/adapters/memory/agentcore.js.map +1 -1
- package/dist/esm/adapters/memory/memoryBank.d.ts +3 -2
- package/dist/esm/adapters/memory/memoryBank.js +16 -3
- package/dist/esm/adapters/memory/memoryBank.js.map +1 -1
- package/dist/esm/adapters/memory/pgVector.js +10 -4
- package/dist/esm/adapters/memory/pgVector.js.map +1 -1
- package/dist/esm/adapters/memory/redis.d.ts +8 -3
- package/dist/esm/adapters/memory/redis.js +11 -3
- package/dist/esm/adapters/memory/redis.js.map +1 -1
- package/dist/esm/adapters/memory/s3Vectors.js +8 -3
- package/dist/esm/adapters/memory/s3Vectors.js.map +1 -1
- package/dist/esm/adapters/memory/sqliteVector.js +10 -4
- package/dist/esm/adapters/memory/sqliteVector.js.map +1 -1
- package/dist/esm/ag-ui/adapter.d.ts +68 -0
- package/dist/esm/ag-ui/adapter.js +67 -0
- package/dist/esm/ag-ui/adapter.js.map +1 -0
- package/dist/esm/ag-ui/framing.d.ts +51 -0
- package/dist/esm/ag-ui/framing.js +62 -0
- package/dist/esm/ag-ui/framing.js.map +1 -0
- package/dist/esm/ag-ui/frontendTools.d.ts +37 -0
- package/dist/esm/ag-ui/frontendTools.js +64 -0
- package/dist/esm/ag-ui/frontendTools.js.map +1 -0
- package/dist/esm/ag-ui/ids.d.ts +43 -0
- package/dist/esm/ag-ui/ids.js +49 -0
- package/dist/esm/ag-ui/ids.js.map +1 -0
- package/dist/esm/ag-ui/index.d.ts +17 -0
- package/dist/esm/ag-ui/index.js +17 -0
- package/dist/esm/ag-ui/index.js.map +1 -0
- package/dist/esm/ag-ui/request.d.ts +72 -0
- package/dist/esm/ag-ui/request.js +350 -0
- package/dist/esm/ag-ui/request.js.map +1 -0
- package/dist/esm/ag-ui/serializer.d.ts +173 -0
- package/dist/esm/ag-ui/serializer.js +895 -0
- package/dist/esm/ag-ui/serializer.js.map +1 -0
- package/dist/esm/ag-ui/types.d.ts +305 -0
- package/dist/esm/ag-ui/types.js +19 -0
- package/dist/esm/ag-ui/types.js.map +1 -0
- package/dist/esm/core/Agent.d.ts +2 -0
- package/dist/esm/core/Agent.js +38 -5
- package/dist/esm/core/Agent.js.map +1 -1
- package/dist/esm/core/RunnerBase.js +17 -3
- package/dist/esm/core/RunnerBase.js.map +1 -1
- package/dist/esm/core/agent/buildAgentChart.js +4 -0
- package/dist/esm/core/agent/buildAgentChart.js.map +1 -1
- package/dist/esm/core/agent/buildDynamicAgentChart.js +4 -0
- package/dist/esm/core/agent/buildDynamicAgentChart.js.map +1 -1
- package/dist/esm/core/agent/callerIdentity.js +2 -1
- package/dist/esm/core/agent/callerIdentity.js.map +1 -1
- package/dist/esm/core/agent/stages/routeTurn.d.ts +1 -1
- package/dist/esm/core/agent/stages/routeTurn.js +3 -3
- package/dist/esm/core/agent/stages/routeTurn.js.map +1 -1
- package/dist/esm/core/agent/stages/seed.d.ts +11 -1
- package/dist/esm/core/agent/stages/seed.js +49 -8
- package/dist/esm/core/agent/stages/seed.js.map +1 -1
- package/dist/esm/core/agent/stages/timeLayer.js +2 -2
- package/dist/esm/core/agent/stages/timeLayer.js.map +1 -1
- package/dist/esm/core/agent/stages/toolCalls.d.ts +11 -1
- package/dist/esm/core/agent/stages/toolCalls.js +26 -5
- package/dist/esm/core/agent/stages/toolCalls.js.map +1 -1
- package/dist/esm/core/agent/types.d.ts +16 -6
- package/dist/esm/core/memberRun.d.ts +132 -0
- package/dist/esm/core/memberRun.js +227 -0
- package/dist/esm/core/memberRun.js.map +1 -0
- package/dist/esm/core/slots/buildToolsSlot.d.ts +1 -1
- package/dist/esm/core/slots/buildToolsSlot.js +1 -1
- package/dist/esm/core/slots/buildToolsSlot.js.map +1 -1
- package/dist/esm/core-flow/Conditional.d.ts +8 -0
- package/dist/esm/core-flow/Conditional.js +29 -8
- package/dist/esm/core-flow/Conditional.js.map +1 -1
- package/dist/esm/core-flow/Graph.js +38 -13
- package/dist/esm/core-flow/Graph.js.map +1 -1
- package/dist/esm/core-flow/Loop.d.ts +8 -0
- package/dist/esm/core-flow/Loop.js +29 -9
- package/dist/esm/core-flow/Loop.js.map +1 -1
- package/dist/esm/core-flow/Parallel.d.ts +8 -0
- package/dist/esm/core-flow/Parallel.js +35 -14
- package/dist/esm/core-flow/Parallel.js.map +1 -1
- package/dist/esm/core-flow/Sequence.d.ts +8 -0
- package/dist/esm/core-flow/Sequence.js +29 -8
- package/dist/esm/core-flow/Sequence.js.map +1 -1
- package/dist/esm/core-flow/Workflow.js +34 -10
- package/dist/esm/core-flow/Workflow.js.map +1 -1
- package/dist/esm/doors/ag-ui.d.ts +19 -0
- package/dist/esm/doors/ag-ui.js +20 -0
- package/dist/esm/doors/ag-ui.js.map +1 -0
- package/dist/esm/hosting/envelope.js +5 -0
- package/dist/esm/hosting/envelope.js.map +1 -1
- package/dist/esm/hosting/httpHost.js +5 -78
- package/dist/esm/hosting/httpHost.js.map +1 -1
- package/dist/esm/hosting/index.d.ts +4 -1
- package/dist/esm/hosting/index.js +2 -0
- package/dist/esm/hosting/index.js.map +1 -1
- package/dist/esm/hosting/pendingAsk.d.ts +19 -0
- package/dist/esm/hosting/pendingAsk.js +38 -0
- package/dist/esm/hosting/pendingAsk.js.map +1 -0
- package/dist/esm/hosting/protocolAdapter.d.ts +229 -0
- package/dist/esm/hosting/protocolAdapter.js +23 -0
- package/dist/esm/hosting/protocolAdapter.js.map +1 -0
- package/dist/esm/hosting/refusalStatus.d.ts +30 -0
- package/dist/esm/hosting/refusalStatus.js +81 -0
- package/dist/esm/hosting/refusalStatus.js.map +1 -0
- package/dist/esm/hosting/standingAgent.js +1 -31
- package/dist/esm/hosting/standingAgent.js.map +1 -1
- package/dist/esm/hosting/stream.d.ts +39 -0
- package/dist/esm/hosting/stream.js +34 -2
- package/dist/esm/hosting/stream.js.map +1 -1
- package/dist/esm/hosting/streamHandler.d.ts +134 -0
- package/dist/esm/hosting/streamHandler.js +493 -0
- package/dist/esm/hosting/streamHandler.js.map +1 -0
- package/dist/esm/hosting/types.d.ts +15 -0
- package/dist/esm/hosting/types.js.map +1 -1
- package/dist/esm/hosting/verifiedThreads.d.ts +29 -0
- package/dist/esm/hosting/verifiedThreads.js +46 -0
- package/dist/esm/hosting/verifiedThreads.js.map +1 -0
- package/dist/esm/index.d.ts +1 -0
- package/dist/esm/index.js +3 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/lib/humanizeLLMError.d.ts +15 -0
- package/dist/esm/lib/humanizeLLMError.js +22 -7
- package/dist/esm/lib/humanizeLLMError.js.map +1 -1
- package/dist/esm/mcp/throttleRetry.d.ts +51 -0
- package/dist/esm/mcp/throttleRetry.js +37 -4
- package/dist/esm/mcp/throttleRetry.js.map +1 -1
- package/dist/esm/memory/define.js +45 -1
- package/dist/esm/memory/define.js.map +1 -1
- package/dist/esm/memory/define.types.d.ts +24 -0
- package/dist/esm/memory/define.types.js.map +1 -1
- package/dist/esm/memory/stages/formatDefault.js +3 -1
- package/dist/esm/memory/stages/formatDefault.js.map +1 -1
- package/dist/esm/memory/store/InMemoryStore.d.ts +8 -3
- package/dist/esm/memory/store/InMemoryStore.js +12 -3
- package/dist/esm/memory/store/InMemoryStore.js.map +1 -1
- package/dist/esm/memory/store/index.d.ts +1 -0
- package/dist/esm/memory/store/index.js +5 -0
- package/dist/esm/memory/store/index.js.map +1 -1
- package/dist/esm/memory/store/types.d.ts +38 -4
- package/dist/esm/memory/store/writeOptions.d.ts +118 -0
- package/dist/esm/memory/store/writeOptions.js +242 -0
- package/dist/esm/memory/store/writeOptions.js.map +1 -0
- package/dist/esm/memory-providers.d.ts +1 -1
- package/dist/esm/memory-providers.js +4 -1
- package/dist/esm/memory-providers.js.map +1 -1
- package/dist/esm/patterns/MapReduce.js +8 -2
- package/dist/esm/patterns/MapReduce.js.map +1 -1
- package/dist/esm/tool-providers/index.d.ts +5 -0
- package/dist/esm/tool-providers/index.js +6 -0
- package/dist/esm/tool-providers/index.js.map +1 -1
- package/dist/esm/trace-toolpack/selfExplain.d.ts +8 -0
- package/dist/esm/trace-toolpack/selfExplain.js +25 -2
- package/dist/esm/trace-toolpack/selfExplain.js.map +1 -1
- package/dist/hosting/envelope.js +5 -0
- package/dist/hosting/envelope.js.map +1 -1
- package/dist/hosting/httpHost.js +5 -78
- package/dist/hosting/httpHost.js.map +1 -1
- package/dist/hosting/index.js +9 -3
- package/dist/hosting/index.js.map +1 -1
- package/dist/hosting/pendingAsk.js +42 -0
- package/dist/hosting/pendingAsk.js.map +1 -0
- package/dist/hosting/protocolAdapter.js +24 -0
- package/dist/hosting/protocolAdapter.js.map +1 -0
- package/dist/hosting/refusalStatus.js +84 -0
- package/dist/hosting/refusalStatus.js.map +1 -0
- package/dist/hosting/standingAgent.js +2 -32
- package/dist/hosting/standingAgent.js.map +1 -1
- package/dist/hosting/stream.js +35 -3
- package/dist/hosting/stream.js.map +1 -1
- package/dist/hosting/streamHandler.js +497 -0
- package/dist/hosting/streamHandler.js.map +1 -0
- package/dist/hosting/types.js.map +1 -1
- package/dist/hosting/verifiedThreads.js +50 -0
- package/dist/hosting/verifiedThreads.js.map +1 -0
- package/dist/index.js +9 -3
- package/dist/index.js.map +1 -1
- package/dist/lib/humanizeLLMError.js +23 -8
- package/dist/lib/humanizeLLMError.js.map +1 -1
- package/dist/mcp/throttleRetry.js +41 -6
- package/dist/mcp/throttleRetry.js.map +1 -1
- package/dist/memory/define.js +45 -1
- package/dist/memory/define.js.map +1 -1
- package/dist/memory/define.types.js.map +1 -1
- package/dist/memory/stages/formatDefault.js +3 -1
- package/dist/memory/stages/formatDefault.js.map +1 -1
- package/dist/memory/store/InMemoryStore.js +12 -3
- package/dist/memory/store/InMemoryStore.js.map +1 -1
- package/dist/memory/store/index.js +11 -1
- package/dist/memory/store/index.js.map +1 -1
- package/dist/memory/store/writeOptions.js +250 -0
- package/dist/memory/store/writeOptions.js.map +1 -0
- package/dist/memory-providers.js +4 -1
- package/dist/memory-providers.js.map +1 -1
- package/dist/patterns/MapReduce.js +8 -2
- package/dist/patterns/MapReduce.js.map +1 -1
- package/dist/tool-providers/index.js +10 -1
- package/dist/tool-providers/index.js.map +1 -1
- package/dist/trace-toolpack/selfExplain.js +25 -2
- package/dist/trace-toolpack/selfExplain.js.map +1 -1
- package/dist/types/adapters/mcp/agentcoreRuntime/errorType.d.ts +13 -0
- package/dist/types/adapters/mcp/agentcoreRuntime/errorType.d.ts.map +1 -0
- package/dist/types/adapters/mcp/agentcoreRuntime/invoke.d.ts +117 -0
- package/dist/types/adapters/mcp/agentcoreRuntime/invoke.d.ts.map +1 -0
- package/dist/types/adapters/mcp/agentcoreRuntime/safeAnswer.d.ts +50 -0
- package/dist/types/adapters/mcp/agentcoreRuntime/safeAnswer.d.ts.map +1 -0
- package/dist/types/adapters/mcp/agentcoreRuntime/session.d.ts +81 -0
- package/dist/types/adapters/mcp/agentcoreRuntime/session.d.ts.map +1 -0
- package/dist/types/adapters/mcp/agentcoreRuntime/sessionBusy.d.ts +62 -0
- package/dist/types/adapters/mcp/agentcoreRuntime/sessionBusy.d.ts.map +1 -0
- package/dist/types/adapters/mcp/agentcoreRuntime/strictJson.d.ts +38 -0
- package/dist/types/adapters/mcp/agentcoreRuntime/strictJson.d.ts.map +1 -0
- package/dist/types/adapters/mcp/agentcoreRuntime/transport.d.ts +177 -0
- package/dist/types/adapters/mcp/agentcoreRuntime/transport.d.ts.map +1 -0
- package/dist/types/adapters/memory/agentcore.d.ts +152 -7
- package/dist/types/adapters/memory/agentcore.d.ts.map +1 -1
- package/dist/types/adapters/memory/memoryBank.d.ts +3 -2
- package/dist/types/adapters/memory/memoryBank.d.ts.map +1 -1
- package/dist/types/adapters/memory/pgVector.d.ts.map +1 -1
- package/dist/types/adapters/memory/redis.d.ts +8 -3
- package/dist/types/adapters/memory/redis.d.ts.map +1 -1
- package/dist/types/adapters/memory/s3Vectors.d.ts.map +1 -1
- package/dist/types/adapters/memory/sqliteVector.d.ts.map +1 -1
- package/dist/types/ag-ui/adapter.d.ts +69 -0
- package/dist/types/ag-ui/adapter.d.ts.map +1 -0
- package/dist/types/ag-ui/framing.d.ts +52 -0
- package/dist/types/ag-ui/framing.d.ts.map +1 -0
- package/dist/types/ag-ui/frontendTools.d.ts +38 -0
- package/dist/types/ag-ui/frontendTools.d.ts.map +1 -0
- package/dist/types/ag-ui/ids.d.ts +44 -0
- package/dist/types/ag-ui/ids.d.ts.map +1 -0
- package/dist/types/ag-ui/index.d.ts +18 -0
- package/dist/types/ag-ui/index.d.ts.map +1 -0
- package/dist/types/ag-ui/request.d.ts +73 -0
- package/dist/types/ag-ui/request.d.ts.map +1 -0
- package/dist/types/ag-ui/serializer.d.ts +174 -0
- package/dist/types/ag-ui/serializer.d.ts.map +1 -0
- package/dist/types/ag-ui/types.d.ts +306 -0
- package/dist/types/ag-ui/types.d.ts.map +1 -0
- package/dist/types/core/Agent.d.ts +2 -0
- package/dist/types/core/Agent.d.ts.map +1 -1
- package/dist/types/core/RunnerBase.d.ts.map +1 -1
- package/dist/types/core/agent/buildAgentChart.d.ts.map +1 -1
- package/dist/types/core/agent/buildDynamicAgentChart.d.ts.map +1 -1
- package/dist/types/core/agent/callerIdentity.d.ts.map +1 -1
- package/dist/types/core/agent/stages/routeTurn.d.ts +1 -1
- package/dist/types/core/agent/stages/routeTurn.d.ts.map +1 -1
- package/dist/types/core/agent/stages/seed.d.ts +11 -1
- package/dist/types/core/agent/stages/seed.d.ts.map +1 -1
- package/dist/types/core/agent/stages/toolCalls.d.ts +11 -1
- package/dist/types/core/agent/stages/toolCalls.d.ts.map +1 -1
- package/dist/types/core/agent/types.d.ts +16 -6
- package/dist/types/core/agent/types.d.ts.map +1 -1
- package/dist/types/core/memberRun.d.ts +133 -0
- package/dist/types/core/memberRun.d.ts.map +1 -0
- package/dist/types/core/slots/buildToolsSlot.d.ts +1 -1
- package/dist/types/core/slots/buildToolsSlot.d.ts.map +1 -1
- package/dist/types/core-flow/Conditional.d.ts +8 -0
- package/dist/types/core-flow/Conditional.d.ts.map +1 -1
- package/dist/types/core-flow/Graph.d.ts.map +1 -1
- package/dist/types/core-flow/Loop.d.ts +8 -0
- package/dist/types/core-flow/Loop.d.ts.map +1 -1
- package/dist/types/core-flow/Parallel.d.ts +8 -0
- package/dist/types/core-flow/Parallel.d.ts.map +1 -1
- package/dist/types/core-flow/Sequence.d.ts +8 -0
- package/dist/types/core-flow/Sequence.d.ts.map +1 -1
- package/dist/types/core-flow/Workflow.d.ts.map +1 -1
- package/dist/types/doors/ag-ui.d.ts +20 -0
- package/dist/types/doors/ag-ui.d.ts.map +1 -0
- package/dist/types/hosting/httpHost.d.ts.map +1 -1
- package/dist/types/hosting/index.d.ts +4 -1
- package/dist/types/hosting/index.d.ts.map +1 -1
- package/dist/types/hosting/pendingAsk.d.ts +20 -0
- package/dist/types/hosting/pendingAsk.d.ts.map +1 -0
- package/dist/types/hosting/protocolAdapter.d.ts +230 -0
- package/dist/types/hosting/protocolAdapter.d.ts.map +1 -0
- package/dist/types/hosting/refusalStatus.d.ts +31 -0
- package/dist/types/hosting/refusalStatus.d.ts.map +1 -0
- package/dist/types/hosting/standingAgent.d.ts.map +1 -1
- package/dist/types/hosting/stream.d.ts +39 -0
- package/dist/types/hosting/stream.d.ts.map +1 -1
- package/dist/types/hosting/streamHandler.d.ts +135 -0
- package/dist/types/hosting/streamHandler.d.ts.map +1 -0
- package/dist/types/hosting/types.d.ts +15 -0
- package/dist/types/hosting/types.d.ts.map +1 -1
- package/dist/types/hosting/verifiedThreads.d.ts +30 -0
- package/dist/types/hosting/verifiedThreads.d.ts.map +1 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/lib/humanizeLLMError.d.ts +15 -0
- package/dist/types/lib/humanizeLLMError.d.ts.map +1 -1
- package/dist/types/mcp/throttleRetry.d.ts +51 -0
- package/dist/types/mcp/throttleRetry.d.ts.map +1 -1
- package/dist/types/memory/define.d.ts.map +1 -1
- package/dist/types/memory/define.types.d.ts +24 -0
- package/dist/types/memory/define.types.d.ts.map +1 -1
- package/dist/types/memory/stages/formatDefault.d.ts.map +1 -1
- package/dist/types/memory/store/InMemoryStore.d.ts +8 -3
- package/dist/types/memory/store/InMemoryStore.d.ts.map +1 -1
- package/dist/types/memory/store/index.d.ts +1 -0
- package/dist/types/memory/store/index.d.ts.map +1 -1
- package/dist/types/memory/store/types.d.ts +38 -4
- package/dist/types/memory/store/types.d.ts.map +1 -1
- package/dist/types/memory/store/writeOptions.d.ts +119 -0
- package/dist/types/memory/store/writeOptions.d.ts.map +1 -0
- package/dist/types/memory-providers.d.ts +1 -1
- package/dist/types/memory-providers.d.ts.map +1 -1
- package/dist/types/patterns/MapReduce.d.ts.map +1 -1
- package/dist/types/tool-providers/index.d.ts +5 -0
- package/dist/types/tool-providers/index.d.ts.map +1 -1
- package/dist/types/trace-toolpack/selfExplain.d.ts +8 -0
- package/dist/types/trace-toolpack/selfExplain.d.ts.map +1 -1
- package/package.json +25 -1
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ids — every id the AG-UI adapter mints, from ONE grammar.
|
|
3
|
+
*
|
|
4
|
+
* <run>/<kind>/<n>/<address>
|
|
5
|
+
*
|
|
6
|
+
* run the AG-UI `runId`, through `encodeIdentityField` — `%` and `/`
|
|
7
|
+
* escaped, so it holds no `/`;
|
|
8
|
+
* kind one of {@link AgUiIdKind} — no `/`;
|
|
9
|
+
* n a decimal ordinal — no `/`;
|
|
10
|
+
* address the agentfootprint `runtimeStageId` of the event that opened the
|
|
11
|
+
* entity (`call-llm#18`, `step-p/x/tool-calls#97`) — any string.
|
|
12
|
+
*
|
|
13
|
+
* INJECTIVE by construction: the first three `/` end the three segments that
|
|
14
|
+
* cannot hold one, so two different (run, kind, n, address) tuples never spell
|
|
15
|
+
* the same id. `test/ag-ui/ids.test.ts` pins it with a property test.
|
|
16
|
+
*
|
|
17
|
+
* WHY THE ADDRESS, NOT THE PROVIDER'S ID. A model's tool-call id is not unique
|
|
18
|
+
* in a run: a provider may reuse it across iterations, and two parallel branches
|
|
19
|
+
* routinely mint the same one (`call_1`, `c1`). An AG-UI client finds a tool
|
|
20
|
+
* call by its id across the WHOLE conversation, so a reused id would land a new
|
|
21
|
+
* call's arguments on an old message. And under a redaction policy the record
|
|
22
|
+
* serves every id as the placeholder. The address — the stage execution that
|
|
23
|
+
* produced the entity, unique within a run — is unique, survives redaction (it
|
|
24
|
+
* is the record's own key, never a value a policy selects) and lines up with the
|
|
25
|
+
* recording; the run segment makes it unique across the thread. The provider's
|
|
26
|
+
* id, as the record serves it, rides `metadata.agentfootprint.toolCallId`.
|
|
27
|
+
*/
|
|
28
|
+
/** The kinds of entity the adapter mints ids for. */
|
|
29
|
+
export type AgUiIdKind = 'text' | 'reasoning' | 'tool' | 'result' | 'agent' | 'interrupt';
|
|
30
|
+
/** One run's minter: ordinals counted per (kind, address), ids spelled by {@link agUiId}. */
|
|
31
|
+
export interface AgUiIdMinter {
|
|
32
|
+
/** The next id of `kind` at `address` — `n` counts up from 0 per (kind, address). */
|
|
33
|
+
next(kind: AgUiIdKind, address: string): {
|
|
34
|
+
readonly id: string;
|
|
35
|
+
readonly n: number;
|
|
36
|
+
};
|
|
37
|
+
/** The id of `kind` at `address` with a KNOWN ordinal — a tool result reuses its call's. */
|
|
38
|
+
at(kind: AgUiIdKind, n: number, address: string): string;
|
|
39
|
+
}
|
|
40
|
+
/** Spell one id. Exported for the property test; the minter is the only caller. */
|
|
41
|
+
export declare function agUiId(runId: string, kind: AgUiIdKind, n: number, address: string): string;
|
|
42
|
+
/** A minter for the AG-UI run `runId`. Refuses an empty run id: it would mint `_` ids. */
|
|
43
|
+
export declare function agUiIdMinter(runId: string): AgUiIdMinter;
|
|
44
|
+
//# sourceMappingURL=ids.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ids.d.ts","sourceRoot":"","sources":["../../../src/ag-ui/ids.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAIH,qDAAqD;AACrD,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,WAAW,GAAG,MAAM,GAAG,QAAQ,GAAG,OAAO,GAAG,WAAW,CAAC;AAE1F,6FAA6F;AAC7F,MAAM,WAAW,YAAY;IAC3B,qFAAqF;IACrF,IAAI,CAAC,IAAI,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,GAAG;QAAE,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IACrF,4FAA4F;IAC5F,EAAE,CAAC,IAAI,EAAE,UAAU,EAAE,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAAC;CAC1D;AAED,mFAAmF;AACnF,wBAAgB,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAE1F;AAED,0FAA0F;AAC1F,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,YAAY,CAgBxD"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ag-ui — the AG-UI protocol adapter over agentfootprint's event stream.
|
|
3
|
+
*
|
|
4
|
+
* `agUi()` is the adapter a host takes (`streamHandler` on
|
|
5
|
+
* `agentfootprint/hosting`): it reads an untrusted `RunAgentInput`, plans the
|
|
6
|
+
* turn against what the server holds, and translates the run.
|
|
7
|
+
* `agUiSerializer` turns one run's served events into AG-UI events; `agUiSse`
|
|
8
|
+
* frames them for the wire with the official `@ag-ui/encoder`. Published
|
|
9
|
+
* through the `agentfootprint/ag-ui` door. The fixed sentences and the id
|
|
10
|
+
* grammar stay internal — tests import them by module path.
|
|
11
|
+
*/
|
|
12
|
+
export { agUiSerializer, AG_UI_CUSTOM_EVENTS, type AgUiCustomContext, type AgUiCustomProjection, type AgUiSerializerOptions, type AgUiTranslation, } from './serializer.js';
|
|
13
|
+
export { agUiSse, type AgUiEncoderModule, type AgUiSseOptions } from './framing.js';
|
|
14
|
+
export { agUi, type AgUiOptions } from './adapter.js';
|
|
15
|
+
export type { AgUiFrontendTool } from './frontendTools.js';
|
|
16
|
+
export { AG_UI_MAX_ID_LENGTH, readAgUiRunInput, type AgUiValidator } from './request.js';
|
|
17
|
+
export { AG_UI_PROTOCOL_VERSION, type AgUiAddress, type AgUiEvent, type AgUiEventType, type AgUiInterrupt, type AgUiMessage, type AgUiMetadata, type AgUiResumeEntry, type AgUiRunInput, type AgUiRunOutcome, type AgUiSuspendedCall, type AgUiSuspendedScope, type AgUiSuspension, } from './types.js';
|
|
18
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ag-ui/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EACL,cAAc,EACd,mBAAmB,EACnB,KAAK,iBAAiB,EACtB,KAAK,oBAAoB,EACzB,KAAK,qBAAqB,EAC1B,KAAK,eAAe,GACrB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,OAAO,EAAE,KAAK,iBAAiB,EAAE,KAAK,cAAc,EAAE,MAAM,cAAc,CAAC;AACpF,OAAO,EAAE,IAAI,EAAE,KAAK,WAAW,EAAE,MAAM,cAAc,CAAC;AACtD,YAAY,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,KAAK,aAAa,EAAE,MAAM,cAAc,CAAC;AACzF,OAAO,EACL,sBAAsB,EACtB,KAAK,WAAW,EAChB,KAAK,SAAS,EACd,KAAK,aAAa,EAClB,KAAK,aAAa,EAClB,KAAK,WAAW,EAChB,KAAK,YAAY,EACjB,KAAK,eAAe,EACpB,KAAK,YAAY,EACjB,KAAK,cAAc,EACnB,KAAK,iBAAiB,EACtB,KAAK,kBAAkB,EACvB,KAAK,cAAc,GACpB,MAAM,YAAY,CAAC"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* request — an AG-UI request (`RunAgentInput`) read as UNTRUSTED browser input,
|
|
3
|
+
* and the one turn it may ask for.
|
|
4
|
+
*
|
|
5
|
+
* Two steps, each refusing by NAME (a `WireRequestRefusal`: its own status and
|
|
6
|
+
* code; the field named, the value never quoted back):
|
|
7
|
+
*
|
|
8
|
+
* readAgUiRunInput the body's SHAPE, field by field, and the ids' FORMAT
|
|
9
|
+
* and length — nothing here is trusted, nothing the
|
|
10
|
+
* server holds is read;
|
|
11
|
+
* planAgUiTurn the turn, from the request AND what the server holds
|
|
12
|
+
* for the bound conversation.
|
|
13
|
+
*
|
|
14
|
+
* WHAT A REQUEST MAY DECIDE, and what it may not:
|
|
15
|
+
* - the newest USER message is the run's message. Nothing else the browser
|
|
16
|
+
* sends is ever conversation: its assistant and tool messages are its own
|
|
17
|
+
* copy of what the server said, and the server's copy is the one kept
|
|
18
|
+
* (`sessions`, or the agent's memory under the bound session). A system or
|
|
19
|
+
* developer message is refused — the agent's instructions are its own;
|
|
20
|
+
* - an ANSWER is taken only for the pause the server is keeping, matched to
|
|
21
|
+
* the ids that pause handed out (`AgUiSuspension`): a resume entry naming
|
|
22
|
+
* its interrupt, or the tool message answering the frontend tool call it is
|
|
23
|
+
* waiting on. Any other tool result is refused — never folded in;
|
|
24
|
+
* - a frontend tool runs only when the app allow-listed its NAME — with the
|
|
25
|
+
* app's own description and schema, never the page's (a description the
|
|
26
|
+
* model reads is an instruction) — and only on a host that keeps the paused
|
|
27
|
+
* run until the page answers;
|
|
28
|
+
* - `state` and `context` reach the agent only through the app's validators;
|
|
29
|
+
* without one, a request carrying either is refused;
|
|
30
|
+
* - identity, credentials and redaction never come from a request: the host
|
|
31
|
+
* binds the thread to the caller the app authenticates (`ThreadBinder`).
|
|
32
|
+
* `forwardedProps` is never read.
|
|
33
|
+
*/
|
|
34
|
+
import type { HeldConversation, PlanFacts, ProtocolPlan, ThreadBinding } from '../hosting/protocolAdapter.js';
|
|
35
|
+
import type { Tool } from '../tools/tools.js';
|
|
36
|
+
import type { AgUiRunInput, AgUiSuspension } from './types.js';
|
|
37
|
+
/** The longest thread or run id read — longer is refused, never truncated. */
|
|
38
|
+
export declare const AG_UI_MAX_ID_LENGTH = 128;
|
|
39
|
+
/**
|
|
40
|
+
* Read one AG-UI request body — its shape and its ids — refusing what the
|
|
41
|
+
* protocol does not allow by the field's NAME, never by its value.
|
|
42
|
+
*
|
|
43
|
+
* @throws WireRequestRefusal (400, `ERR_INVALID_RUN_INPUT`)
|
|
44
|
+
*/
|
|
45
|
+
export declare function readAgUiRunInput(body: unknown): AgUiRunInput;
|
|
46
|
+
/** What a page's `state` or `context` is checked by before the agent may see it. */
|
|
47
|
+
export type AgUiValidator = (value: unknown, at: {
|
|
48
|
+
/** The conversation the request was bound to — whose state this claims to be. */
|
|
49
|
+
readonly thread?: ThreadBinding;
|
|
50
|
+
readonly headers: Readonly<Record<string, string>>;
|
|
51
|
+
}) => unknown;
|
|
52
|
+
/** The rules one adapter plans by — built from `agUi()`'s options. */
|
|
53
|
+
export interface AgUiTurnRules {
|
|
54
|
+
/** The frontend tools the app allow-listed, by name: each builds the tool the agent is given. */
|
|
55
|
+
readonly frontendTools: ReadonlyMap<string, () => Tool>;
|
|
56
|
+
readonly accept: {
|
|
57
|
+
readonly state?: AgUiValidator;
|
|
58
|
+
readonly context?: AgUiValidator;
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Plan one turn: the request (read by {@link readAgUiRunInput}) against what
|
|
63
|
+
* the server holds for its bound conversation.
|
|
64
|
+
*
|
|
65
|
+
* @throws WireRequestRefusal — by name, for everything a page may not decide.
|
|
66
|
+
*/
|
|
67
|
+
export declare function planAgUiTurn(input: AgUiRunInput, held: HeldConversation, facts: PlanFacts, rules: AgUiTurnRules): ProtocolPlan;
|
|
68
|
+
/**
|
|
69
|
+
* A stored suspension record, checked — the store holds bytes; a record that
|
|
70
|
+
* is not one this adapter wrote is `undefined`, and nothing is matched to it.
|
|
71
|
+
*/
|
|
72
|
+
export declare function readAgUiSuspension(value: unknown): AgUiSuspension | undefined;
|
|
73
|
+
//# sourceMappingURL=request.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"request.d.ts","sourceRoot":"","sources":["../../../src/ag-ui/request.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAGH,OAAO,KAAK,EACV,gBAAgB,EAChB,SAAS,EACT,YAAY,EAEZ,aAAa,EACd,MAAM,+BAA+B,CAAC;AACvC,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,KAAK,EAIV,YAAY,EAEZ,cAAc,EACf,MAAM,YAAY,CAAC;AAEpB,8EAA8E;AAC9E,eAAO,MAAM,mBAAmB,MAAM,CAAC;AA0GvC;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,OAAO,GAAG,YAAY,CAuC5D;AAED,oFAAoF;AACpF,MAAM,MAAM,aAAa,GAAG,CAC1B,KAAK,EAAE,OAAO,EACd,EAAE,EAAE;IACF,iFAAiF;IACjF,QAAQ,CAAC,MAAM,CAAC,EAAE,aAAa,CAAC;IAChC,QAAQ,CAAC,OAAO,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;CACpD,KACE,OAAO,CAAC;AAEb,sEAAsE;AACtE,MAAM,WAAW,aAAa;IAC5B,iGAAiG;IACjG,QAAQ,CAAC,aAAa,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,IAAI,CAAC,CAAC;IACxD,QAAQ,CAAC,MAAM,EAAE;QACf,QAAQ,CAAC,KAAK,CAAC,EAAE,aAAa,CAAC;QAC/B,QAAQ,CAAC,OAAO,CAAC,EAAE,aAAa,CAAC;KAClC,CAAC;CACH;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAC1B,KAAK,EAAE,YAAY,EACnB,IAAI,EAAE,gBAAgB,EACtB,KAAK,EAAE,SAAS,EAChB,KAAK,EAAE,aAAa,GACnB,YAAY,CAyBd;AAyKD;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,OAAO,GAAG,cAAc,GAAG,SAAS,CAuB7E"}
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* serializer — one run's served agentfootprint events → AG-UI events.
|
|
3
|
+
*
|
|
4
|
+
* Pattern: a per-run state machine (`RunTranslation`), pure — no I/O, no clock,
|
|
5
|
+
* no import of `@ag-ui/*`. Frames are the framing strategy's job
|
|
6
|
+
* (`framing.ts`); reading a request is the adapter's (`adapter.ts`).
|
|
7
|
+
* Role: the Lens over a run for an AG-UI reader. It composes what that reader
|
|
8
|
+
* is served, from the RECORD only: every value it writes comes from a
|
|
9
|
+
* served event (the placeholder wherever a redaction policy selected a
|
|
10
|
+
* value), from the record's address (`meta.runtimeStageId`,
|
|
11
|
+
* `meta.subflowPath` — never selected by a policy), or from the
|
|
12
|
+
* AG-UI request's own ids. It never reads the run's live values, so
|
|
13
|
+
* nothing a policy hides can reach an AG-UI event. The record's own
|
|
14
|
+
* run id is never written: it counts every run the process made.
|
|
15
|
+
*
|
|
16
|
+
* THE MAPPING
|
|
17
|
+
* agent.turn_start (nested) → SUBAGENT_STARTED (a sub-agent's turn)
|
|
18
|
+
* agent.turn_end → SUBAGENT_FINISHED / the root answer
|
|
19
|
+
* agent.iteration_start/_end → STEP_STARTED/_FINISHED `iteration <n>`
|
|
20
|
+
* composition.enter/exit → STEP_STARTED/_FINISHED `<Kind>[:<mount>]`
|
|
21
|
+
* stream.token → TEXT_MESSAGE_START/CONTENT/END
|
|
22
|
+
* stream.llm_end (no agent around) → one whole TEXT message (an LLM call that streams nothing)
|
|
23
|
+
* stream.thinking_delta/_end → REASONING_START … REASONING_END (only with `reasoning: true`)
|
|
24
|
+
* stream.tool_start → TOOL_CALL_START + TOOL_CALL_ARGS + TOOL_CALL_END
|
|
25
|
+
* stream.tool_end → TOOL_CALL_RESULT
|
|
26
|
+
* pause.request + settle('paused') → RUN_FINISHED { outcome: interrupt }
|
|
27
|
+
* settle('paused', awaiting caller) → RUN_FINISHED { outcome: success, pendingToolCallIds }
|
|
28
|
+
* (a tool the client runs: its call is left to answer)
|
|
29
|
+
* error.fatal + settle('failed') → RUN_ERROR — the served error.fatal's words when they
|
|
30
|
+
* are a fixed sentence, else "The run failed."
|
|
31
|
+
* an allow-listed event → CUSTOM { name: <event type>, value: <its listed fields> }
|
|
32
|
+
* anything else → nothing
|
|
33
|
+
*
|
|
34
|
+
* WHAT LEAVES THE PROCESS. An AG-UI stream goes to a browser, so nothing goes
|
|
35
|
+
* out by default that a person is not meant to read. Every value comes from a
|
|
36
|
+
* served payload; `CUSTOM` carries only the event types on an allow-list, each
|
|
37
|
+
* with the fields its projection picks ({@link AG_UI_CUSTOM_EVENTS} — the whole
|
|
38
|
+
* record, such as `context.injected`'s assembled prompt or `error.retried`'s
|
|
39
|
+
* raw error, stays off the wire unless the app lists it); the model's
|
|
40
|
+
* reasoning goes out only when the app says so; and a failure is described by
|
|
41
|
+
* the record, never by the thrown value. Identity on the meta (`principal`,
|
|
42
|
+
* `tenant`, `sessionId`) is never written.
|
|
43
|
+
*
|
|
44
|
+
* WHO OWNS AN EVENT. Each agent's turn opens a SCOPE at its mount — the
|
|
45
|
+
* subflow path its `turn_start` fired at (`[]` for the root agent, `step-p/x`
|
|
46
|
+
* for an agent in a parallel branch). An event belongs to the deepest open scope
|
|
47
|
+
* whose mount prefixes its own subflow path, segment by segment, and carries
|
|
48
|
+
* that scope's `subagentRunId`. Parallel branches have different mounts, so
|
|
49
|
+
* their interleaved events can never be attributed to each other.
|
|
50
|
+
*
|
|
51
|
+
* A RUN THAT CONTINUES A PAUSE. A paused run hands back `suspension()` — the
|
|
52
|
+
* ids it gave the client (the interrupt, the open call) and every scope and
|
|
53
|
+
* step open at the pause. The run that continues it passes that as `resume`:
|
|
54
|
+
* the same sub-agents re-open (AG-UI: "a later run may continue the same
|
|
55
|
+
* invocation"), their steps re-open, and the first result in the paused call's
|
|
56
|
+
* scope answers that call under its own id — or, for a tool the client ran, is
|
|
57
|
+
* not written at all, because the client holds the result it sent.
|
|
58
|
+
*
|
|
59
|
+
* TEXT. The reply is what the record streamed (`stream.token`) — the channel
|
|
60
|
+
* `toSSE({ format: 'text' })` and a hosted reply read. An agent turn whose
|
|
61
|
+
* answer streamed no token (a provider without `stream()`) is written whole
|
|
62
|
+
* from `turn_end.finalContent`, unless the record marks it refused. An
|
|
63
|
+
* agent's `llm_end.content` is a DRAFT the library may be holding back
|
|
64
|
+
* (answer validation, an output policy) and is never written.
|
|
65
|
+
*/
|
|
66
|
+
import type { AgentfootprintEvent } from '../events/registry.js';
|
|
67
|
+
import type { RunTranslation } from '../hosting/protocolAdapter.js';
|
|
68
|
+
import { type AgUiEvent, type AgUiSuspension } from './types.js';
|
|
69
|
+
/** What a CUSTOM projection is told beside the payload: where the event landed. */
|
|
70
|
+
export interface AgUiCustomContext {
|
|
71
|
+
/** The AG-UI id of the tool call open where the event happened, when one is. */
|
|
72
|
+
readonly toolCallId?: string;
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* One allow-listed event's `CUSTOM` value: the fields of its SERVED payload
|
|
76
|
+
* that go out (the payload is the one every listener receives — the
|
|
77
|
+
* placeholder wherever a redaction policy selected a value). Return only what
|
|
78
|
+
* a person using the frontend is meant to read.
|
|
79
|
+
*/
|
|
80
|
+
export type AgUiCustomProjection = (payload: Readonly<Record<string, unknown>>, at: AgUiCustomContext) => unknown;
|
|
81
|
+
/**
|
|
82
|
+
* The agentfootprint events that go out as AG-UI `CUSTOM` by default, each with
|
|
83
|
+
* the fields it carries: progress (which call, which iteration), spend, the
|
|
84
|
+
* loop's route, the answer's standing and a provider's retries — counts and the
|
|
85
|
+
* library's own words. Content (a tool's own progress `payload`,
|
|
86
|
+
* `context.injected`'s assembled prompt, `error.retried`'s raw error, memory,
|
|
87
|
+
* permission and credential facts) stays off the wire unless an app lists it:
|
|
88
|
+
* `agUiSerializer({ ..., custom: { ...AG_UI_CUSTOM_EVENTS, [type]: projection } })`.
|
|
89
|
+
*/
|
|
90
|
+
export declare const AG_UI_CUSTOM_EVENTS: Readonly<Record<string, AgUiCustomProjection>>;
|
|
91
|
+
/** Options for {@link agUiSerializer}. */
|
|
92
|
+
export interface AgUiSerializerOptions {
|
|
93
|
+
/** The conversation this run belongs to — `RunAgentInput.threadId`. */
|
|
94
|
+
readonly threadId: string;
|
|
95
|
+
/** This run's AG-UI id — `RunAgentInput.runId`. Every id the run mints is under it. */
|
|
96
|
+
readonly runId: string;
|
|
97
|
+
/**
|
|
98
|
+
* The events with no AG-UI equivalent that go out as `CUSTOM`, keyed by event
|
|
99
|
+
* type, each with the projection that picks its fields. Default
|
|
100
|
+
* {@link AG_UI_CUSTOM_EVENTS}; `{}` sends none. An event not listed sends
|
|
101
|
+
* nothing. Events the mapping consumes (tokens, tool calls, turns,
|
|
102
|
+
* iterations, compositions, the pause and the fatal error) are never CUSTOM.
|
|
103
|
+
*/
|
|
104
|
+
readonly custom?: Readonly<Record<string, AgUiCustomProjection>>;
|
|
105
|
+
/**
|
|
106
|
+
* Write the model's reasoning — `REASONING_*` events from the served
|
|
107
|
+
* `stream.thinking_*` events. Default `false`: a model's chain of thought is
|
|
108
|
+
* shown to a person only when the app decides it is.
|
|
109
|
+
*/
|
|
110
|
+
readonly reasoning?: boolean;
|
|
111
|
+
/**
|
|
112
|
+
* What a FAILED tool call's result says. Default `'withheld'`: the fixed words
|
|
113
|
+
* "The tool failed." — the record's result for a failed call is the thrown
|
|
114
|
+
* text, which may hold a connection string, a path or a provider's response.
|
|
115
|
+
* `'served'` sends the record's own result (still the served value: the
|
|
116
|
+
* placeholder wherever a redaction policy selected one).
|
|
117
|
+
*/
|
|
118
|
+
readonly toolErrors?: 'withheld' | 'served';
|
|
119
|
+
/**
|
|
120
|
+
* Which served events are this run's. Default: the events of the first run
|
|
121
|
+
* an event names (plus events that name no run). Pass it when the listener
|
|
122
|
+
* can hear more than one run — an instance several callers share — so the
|
|
123
|
+
* translation never binds to whichever run spoke first.
|
|
124
|
+
*/
|
|
125
|
+
readonly owns?: (event: AgentfootprintEvent) => boolean;
|
|
126
|
+
/**
|
|
127
|
+
* The paused run this one continues — what that run's translation returned
|
|
128
|
+
* from `suspension()` after it settled `'paused'`. Its suspended sub-agents
|
|
129
|
+
* and open steps re-open under the same ids, and the call it stopped in is
|
|
130
|
+
* answered under its own id (or, for a frontend tool, not at all: the client
|
|
131
|
+
* already holds the result it sent).
|
|
132
|
+
*/
|
|
133
|
+
readonly resume?: AgUiSuspension;
|
|
134
|
+
}
|
|
135
|
+
/** One run's AG-UI translation — and, once it pauses, what its continuation needs. */
|
|
136
|
+
export interface AgUiTranslation extends RunTranslation<AgUiEvent> {
|
|
137
|
+
/**
|
|
138
|
+
* The record to `resume` from. Before settling, what a `'paused'` settlement
|
|
139
|
+
* with the same `awaiting` will hand out (keep it first, then settle); after
|
|
140
|
+
* `settle({ kind: 'paused' })`, what it handed out; after any other ending,
|
|
141
|
+
* `undefined`.
|
|
142
|
+
*/
|
|
143
|
+
suspension(awaiting?: 'person' | 'caller'): AgUiSuspension | undefined;
|
|
144
|
+
}
|
|
145
|
+
/** Said by `TOOL_CALL_RESULT` for a failed call, unless `toolErrors: 'served'`. */
|
|
146
|
+
export declare const AG_UI_TOOL_FAILED = "The tool failed.";
|
|
147
|
+
/** Said by `RUN_ERROR` when the run's `error.fatal` is not one of the record's fixed sentences. */
|
|
148
|
+
export declare const AG_UI_RUN_FAILED = "The run failed.";
|
|
149
|
+
/** Said by `SUBAGENT_ERROR` for a sub-agent whose turn ended without an answer. */
|
|
150
|
+
export declare const AG_UI_SUBAGENT_UNFINISHED = "The sub-agent's turn ended without an answer.";
|
|
151
|
+
/** Said by `SUBAGENT_ERROR` for a sub-agent still running when its run was cancelled. */
|
|
152
|
+
export declare const AG_UI_SUBAGENT_CANCELLED = "The run was cancelled before this sub-agent finished.";
|
|
153
|
+
/**
|
|
154
|
+
* The AG-UI serializer for ONE run: feed it every served agentfootprint event
|
|
155
|
+
* of the run, in order, then settle it once. `RUN_STARTED` comes before the
|
|
156
|
+
* first event it returns; `RUN_FINISHED` or `RUN_ERROR` is the last thing
|
|
157
|
+
* `settle` returns, with everything still open closed before it.
|
|
158
|
+
*
|
|
159
|
+
* @example
|
|
160
|
+
* ```ts
|
|
161
|
+
* const ag = agUiSerializer({ threadId, runId });
|
|
162
|
+
* const off = agent.on('*', (event) => send(ag.event(event)));
|
|
163
|
+
* try {
|
|
164
|
+
* const out = await agent.run({ message });
|
|
165
|
+
* send(ag.settle({ kind: isPaused(out) ? 'paused' : 'finished' }));
|
|
166
|
+
* } catch {
|
|
167
|
+
* send(ag.settle({ kind: 'failed' })); // described by the record, never by the thrown value
|
|
168
|
+
* } finally {
|
|
169
|
+
* off();
|
|
170
|
+
* }
|
|
171
|
+
* ```
|
|
172
|
+
*/
|
|
173
|
+
export declare function agUiSerializer(options: AgUiSerializerOptions): AgUiTranslation;
|
|
174
|
+
//# sourceMappingURL=serializer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"serializer.d.ts","sourceRoot":"","sources":["../../../src/ag-ui/serializer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgEG;AAEH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAEjE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAIpE,OAAO,EAGL,K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F;AACnF,eAAO,MAAM,iBAAiB,qBAAqB,CAAC;AAEpD,mGAAmG;AACnG,eAAO,MAAM,gBAAgB,oBAAoB,CAAC;AAMlD,mFAAmF;AACnF,eAAO,MAAM,yBAAyB,kDAAkD,CAAC;AAEzF,yFAAyF;AACzF,eAAO,MAAM,wBAAwB,0DAA0D,CAAC;AAyFhG;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,qBAAqB,GAAG,eAAe,CAgvB9E"}
|
|
@@ -0,0 +1,306 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* types — the AG-UI events this adapter writes, as plain structural types.
|
|
3
|
+
*
|
|
4
|
+
* AG-UI (the Agent–User Interaction protocol, `@ag-ui/core`) is an OPTIONAL
|
|
5
|
+
* peer of this package, so no declaration here imports it: a consumer who
|
|
6
|
+
* only reads these types compiles without it, and nothing in `dist/` names a
|
|
7
|
+
* module they may not have installed. The shapes mirror protocol 1.0 field
|
|
8
|
+
* for field — `test/type-regressions/AgUiEvents.assignability.test.ts`
|
|
9
|
+
* compiles every one of them against `@ag-ui/core`'s own `Event` union, and
|
|
10
|
+
* `test/ag-ui/contract.test.ts` validates every event a real run produces with
|
|
11
|
+
* `@ag-ui/core/schemas` and the official client's verifier.
|
|
12
|
+
*
|
|
13
|
+
* Only the fields this adapter sets are declared. `type` is a string literal
|
|
14
|
+
* here where `@ag-ui/core` uses its `EventType` enum; the wire values are the
|
|
15
|
+
* same strings.
|
|
16
|
+
*/
|
|
17
|
+
/** The AG-UI protocol version this adapter speaks — stated on `RUN_STARTED`. */
|
|
18
|
+
export declare const AG_UI_PROTOCOL_VERSION = "1.0";
|
|
19
|
+
/**
|
|
20
|
+
* Extra information on an event — AG-UI's open `metadata` object. This adapter
|
|
21
|
+
* writes one key, `agentfootprint`, holding the record's ADDRESS for the event
|
|
22
|
+
* (see {@link AgUiAddress}); the key `ag-ui` is the protocol's own.
|
|
23
|
+
*/
|
|
24
|
+
export interface AgUiMetadata {
|
|
25
|
+
readonly agentfootprint?: AgUiAddress;
|
|
26
|
+
readonly [key: string]: unknown;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Where an AG-UI event came from in agentfootprint's record: the stage
|
|
30
|
+
* execution and the subflow path — the coordinates a recording, a trace or a
|
|
31
|
+
* commit log is keyed by within its run. Address only: a redaction policy never
|
|
32
|
+
* selects any of it, so it reads the same with or without one. The record's
|
|
33
|
+
* own run id is never written: it counts every run the PROCESS made, and a
|
|
34
|
+
* browser must not learn how many other callers ran.
|
|
35
|
+
*/
|
|
36
|
+
export interface AgUiAddress {
|
|
37
|
+
/** The stage execution that emitted the source event (`meta.runtimeStageId`). */
|
|
38
|
+
readonly runtimeStageId?: string;
|
|
39
|
+
/** The subflow path of that stage, outermost first (`meta.subflowPath`). */
|
|
40
|
+
readonly subflowPath?: readonly string[];
|
|
41
|
+
/** The tool call's id as the record serves it — the placeholder under a policy. */
|
|
42
|
+
readonly toolCallId?: string;
|
|
43
|
+
}
|
|
44
|
+
interface AgUiEventBase<T extends string> {
|
|
45
|
+
readonly type: T;
|
|
46
|
+
/** Milliseconds since the epoch — the source event's wall clock. */
|
|
47
|
+
readonly timestamp?: number;
|
|
48
|
+
readonly metadata?: AgUiMetadata;
|
|
49
|
+
}
|
|
50
|
+
/** Everything a subagent can own carries its invocation handle; absent = the parent agent. */
|
|
51
|
+
interface Attributable {
|
|
52
|
+
readonly subagentRunId?: string;
|
|
53
|
+
}
|
|
54
|
+
export interface AgUiRunStartedEvent extends AgUiEventBase<'RUN_STARTED'> {
|
|
55
|
+
readonly threadId: string;
|
|
56
|
+
readonly runId: string;
|
|
57
|
+
readonly protocolVersion?: string;
|
|
58
|
+
}
|
|
59
|
+
/** Something a paused run is waiting for. */
|
|
60
|
+
export interface AgUiInterrupt extends Attributable {
|
|
61
|
+
readonly id: string;
|
|
62
|
+
readonly reason: string;
|
|
63
|
+
readonly message?: string;
|
|
64
|
+
readonly toolCallId?: string;
|
|
65
|
+
readonly metadata?: AgUiMetadata;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Why a run ended — absent means success. A success may leave tool calls for
|
|
69
|
+
* the application to answer (a frontend tool): `pendingToolCallIds` names them.
|
|
70
|
+
*/
|
|
71
|
+
export type AgUiRunOutcome = {
|
|
72
|
+
readonly type: 'success';
|
|
73
|
+
readonly pendingToolCallIds?: readonly string[];
|
|
74
|
+
} | {
|
|
75
|
+
readonly type: 'interrupt';
|
|
76
|
+
readonly interrupts: readonly AgUiInterrupt[];
|
|
77
|
+
} | {
|
|
78
|
+
readonly type: 'cancelled';
|
|
79
|
+
};
|
|
80
|
+
/** A tool call still open where a run paused. */
|
|
81
|
+
export interface AgUiSuspendedCall {
|
|
82
|
+
/** Its AG-UI id — answered under it in the run that continues. */
|
|
83
|
+
readonly toolCallId: string;
|
|
84
|
+
/** Answered by the CLIENT (a frontend tool): its result is never written back. */
|
|
85
|
+
readonly client: boolean;
|
|
86
|
+
}
|
|
87
|
+
/** One scope open where a run paused — the root, or a sub-agent's turn — and what is open in it. */
|
|
88
|
+
export interface AgUiSuspendedScope {
|
|
89
|
+
/** The scope's mount: the subflow path its turn opened at (`[]` for the root). */
|
|
90
|
+
readonly mount: readonly string[];
|
|
91
|
+
/** The sub-agent invocation — absent for the root. */
|
|
92
|
+
readonly subagentRunId?: string;
|
|
93
|
+
/** The sub-agent's name as `SUBAGENT_STARTED` gave it. */
|
|
94
|
+
readonly name?: string;
|
|
95
|
+
/** The sub-agent that spawned it, when one did. */
|
|
96
|
+
readonly parentSubagentRunId?: string;
|
|
97
|
+
/** Its open steps, in the order they opened. */
|
|
98
|
+
readonly steps: readonly string[];
|
|
99
|
+
/**
|
|
100
|
+
* Its open tool calls — the one the pause is about, and a parallel sibling's
|
|
101
|
+
* that paused with it and waits its turn — each answered under its own id.
|
|
102
|
+
*/
|
|
103
|
+
readonly calls: readonly AgUiSuspendedCall[];
|
|
104
|
+
/** The assistant message its current model response's calls belong to. */
|
|
105
|
+
readonly messageId?: string;
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* What a PAUSED run's translation hands the run that continues it
|
|
109
|
+
* (`agUiSerializer({ resume })`): the ids the paused run gave the client, so the
|
|
110
|
+
* answer can be matched and the continuation is the same invocation —
|
|
111
|
+
* suspended sub-agents re-open under their own `subagentRunId`, open steps
|
|
112
|
+
* re-open, and the call the run stopped in is answered under its own id.
|
|
113
|
+
*
|
|
114
|
+
* Plain JSON — keep it with the paused run (a host stores it beside the
|
|
115
|
+
* checkpoint). It holds ids and step names only, never a value of the run.
|
|
116
|
+
*/
|
|
117
|
+
export interface AgUiSuspension {
|
|
118
|
+
readonly version: 1;
|
|
119
|
+
/** The AG-UI run that paused. */
|
|
120
|
+
readonly runId: string;
|
|
121
|
+
/** The interrupt the run waits on — absent when it waits on a frontend tool's result. */
|
|
122
|
+
readonly interruptId?: string;
|
|
123
|
+
/**
|
|
124
|
+
* The call the pause is about: its AG-UI id, where it is, and whether the
|
|
125
|
+
* CLIENT answers it (a frontend tool — `pendingToolCallIds`) rather than the
|
|
126
|
+
* run continuing it after the interrupt. It is also among its scope's `calls`.
|
|
127
|
+
*/
|
|
128
|
+
readonly call?: AgUiSuspendedCall & {
|
|
129
|
+
readonly mount: readonly string[];
|
|
130
|
+
};
|
|
131
|
+
/** The run's root is an agent's turn (its answer is the run's result). */
|
|
132
|
+
readonly rootAgent: boolean;
|
|
133
|
+
/** The scopes open at the pause, outermost first — the root always first. */
|
|
134
|
+
readonly scopes: readonly AgUiSuspendedScope[];
|
|
135
|
+
}
|
|
136
|
+
export interface AgUiRunFinishedEvent extends AgUiEventBase<'RUN_FINISHED'> {
|
|
137
|
+
readonly threadId: string;
|
|
138
|
+
readonly runId: string;
|
|
139
|
+
readonly result?: unknown;
|
|
140
|
+
readonly outcome?: AgUiRunOutcome;
|
|
141
|
+
}
|
|
142
|
+
export interface AgUiRunErrorEvent extends AgUiEventBase<'RUN_ERROR'> {
|
|
143
|
+
readonly message: string;
|
|
144
|
+
readonly code?: string;
|
|
145
|
+
}
|
|
146
|
+
export interface AgUiStepStartedEvent extends AgUiEventBase<'STEP_STARTED'>, Attributable {
|
|
147
|
+
readonly stepName: string;
|
|
148
|
+
}
|
|
149
|
+
export interface AgUiStepFinishedEvent extends AgUiEventBase<'STEP_FINISHED'>, Attributable {
|
|
150
|
+
readonly stepName: string;
|
|
151
|
+
}
|
|
152
|
+
export interface AgUiTextMessageStartEvent extends AgUiEventBase<'TEXT_MESSAGE_START'>, Attributable {
|
|
153
|
+
readonly messageId: string;
|
|
154
|
+
readonly role: 'assistant';
|
|
155
|
+
}
|
|
156
|
+
export interface AgUiTextMessageContentEvent extends AgUiEventBase<'TEXT_MESSAGE_CONTENT'>, Attributable {
|
|
157
|
+
readonly messageId: string;
|
|
158
|
+
readonly delta: string;
|
|
159
|
+
}
|
|
160
|
+
export interface AgUiTextMessageEndEvent extends AgUiEventBase<'TEXT_MESSAGE_END'>, Attributable {
|
|
161
|
+
readonly messageId: string;
|
|
162
|
+
}
|
|
163
|
+
export interface AgUiToolCallStartEvent extends AgUiEventBase<'TOOL_CALL_START'>, Attributable {
|
|
164
|
+
readonly toolCallId: string;
|
|
165
|
+
readonly toolCallName: string;
|
|
166
|
+
readonly parentMessageId?: string;
|
|
167
|
+
}
|
|
168
|
+
export interface AgUiToolCallArgsEvent extends AgUiEventBase<'TOOL_CALL_ARGS'>, Attributable {
|
|
169
|
+
readonly toolCallId: string;
|
|
170
|
+
readonly delta: string;
|
|
171
|
+
}
|
|
172
|
+
export interface AgUiToolCallEndEvent extends AgUiEventBase<'TOOL_CALL_END'>, Attributable {
|
|
173
|
+
readonly toolCallId: string;
|
|
174
|
+
}
|
|
175
|
+
export interface AgUiToolCallResultEvent extends AgUiEventBase<'TOOL_CALL_RESULT'>, Attributable {
|
|
176
|
+
readonly messageId: string;
|
|
177
|
+
readonly toolCallId: string;
|
|
178
|
+
readonly content: string;
|
|
179
|
+
readonly role: 'tool';
|
|
180
|
+
}
|
|
181
|
+
export interface AgUiReasoningStartEvent extends AgUiEventBase<'REASONING_START'>, Attributable {
|
|
182
|
+
readonly messageId: string;
|
|
183
|
+
}
|
|
184
|
+
export interface AgUiReasoningMessageStartEvent extends AgUiEventBase<'REASONING_MESSAGE_START'>, Attributable {
|
|
185
|
+
readonly messageId: string;
|
|
186
|
+
readonly role: 'reasoning';
|
|
187
|
+
}
|
|
188
|
+
export interface AgUiReasoningMessageContentEvent extends AgUiEventBase<'REASONING_MESSAGE_CONTENT'>, Attributable {
|
|
189
|
+
readonly messageId: string;
|
|
190
|
+
readonly delta: string;
|
|
191
|
+
}
|
|
192
|
+
export interface AgUiReasoningMessageEndEvent extends AgUiEventBase<'REASONING_MESSAGE_END'>, Attributable {
|
|
193
|
+
readonly messageId: string;
|
|
194
|
+
}
|
|
195
|
+
export interface AgUiReasoningEndEvent extends AgUiEventBase<'REASONING_END'>, Attributable {
|
|
196
|
+
readonly messageId: string;
|
|
197
|
+
}
|
|
198
|
+
export interface AgUiSubagentStartedEvent extends AgUiEventBase<'SUBAGENT_STARTED'> {
|
|
199
|
+
readonly subagentRunId: string;
|
|
200
|
+
readonly name: string;
|
|
201
|
+
readonly parentSubagentRunId?: string;
|
|
202
|
+
}
|
|
203
|
+
export interface AgUiSubagentFinishedEvent extends AgUiEventBase<'SUBAGENT_FINISHED'> {
|
|
204
|
+
readonly subagentRunId: string;
|
|
205
|
+
readonly result?: unknown;
|
|
206
|
+
readonly outcome?: {
|
|
207
|
+
readonly type: 'success';
|
|
208
|
+
} | {
|
|
209
|
+
readonly type: 'suspended';
|
|
210
|
+
readonly interruptIds?: readonly string[];
|
|
211
|
+
};
|
|
212
|
+
}
|
|
213
|
+
export interface AgUiSubagentErrorEvent extends AgUiEventBase<'SUBAGENT_ERROR'> {
|
|
214
|
+
readonly subagentRunId: string;
|
|
215
|
+
readonly message: string;
|
|
216
|
+
readonly code?: string;
|
|
217
|
+
}
|
|
218
|
+
export interface AgUiCustomEvent extends AgUiEventBase<'CUSTOM'>, Attributable {
|
|
219
|
+
readonly name: string;
|
|
220
|
+
readonly value: unknown;
|
|
221
|
+
}
|
|
222
|
+
/** Every AG-UI event this adapter writes. */
|
|
223
|
+
export type AgUiEvent = AgUiRunStartedEvent | AgUiRunFinishedEvent | AgUiRunErrorEvent | AgUiStepStartedEvent | AgUiStepFinishedEvent | AgUiTextMessageStartEvent | AgUiTextMessageContentEvent | AgUiTextMessageEndEvent | AgUiToolCallStartEvent | AgUiToolCallArgsEvent | AgUiToolCallEndEvent | AgUiToolCallResultEvent | AgUiReasoningStartEvent | AgUiReasoningMessageStartEvent | AgUiReasoningMessageContentEvent | AgUiReasoningMessageEndEvent | AgUiReasoningEndEvent | AgUiSubagentStartedEvent | AgUiSubagentFinishedEvent | AgUiSubagentErrorEvent | AgUiCustomEvent;
|
|
224
|
+
/** The `type` of every AG-UI event this adapter writes. */
|
|
225
|
+
export type AgUiEventType = AgUiEvent['type'];
|
|
226
|
+
/** A text part of a message body. */
|
|
227
|
+
export interface AgUiTextPart {
|
|
228
|
+
readonly type: 'text';
|
|
229
|
+
readonly text: string;
|
|
230
|
+
}
|
|
231
|
+
/** A part of a message body: text, or a media part (named so it can be refused by name). */
|
|
232
|
+
export type AgUiContentPart = AgUiTextPart | {
|
|
233
|
+
readonly type: 'image' | 'audio' | 'video' | 'document';
|
|
234
|
+
readonly [key: string]: unknown;
|
|
235
|
+
};
|
|
236
|
+
/** A call an assistant message made. */
|
|
237
|
+
export interface AgUiToolCall {
|
|
238
|
+
readonly id: string;
|
|
239
|
+
readonly type: 'function';
|
|
240
|
+
readonly function: {
|
|
241
|
+
readonly name: string;
|
|
242
|
+
readonly arguments: string;
|
|
243
|
+
};
|
|
244
|
+
}
|
|
245
|
+
/** A message of the conversation a request carries, by role. */
|
|
246
|
+
export type AgUiMessage = {
|
|
247
|
+
readonly id: string;
|
|
248
|
+
readonly role: 'user';
|
|
249
|
+
readonly content: string | readonly AgUiContentPart[];
|
|
250
|
+
} | {
|
|
251
|
+
readonly id: string;
|
|
252
|
+
readonly role: 'assistant';
|
|
253
|
+
readonly content?: string;
|
|
254
|
+
readonly toolCalls?: readonly AgUiToolCall[];
|
|
255
|
+
} | {
|
|
256
|
+
readonly id: string;
|
|
257
|
+
readonly role: 'tool';
|
|
258
|
+
readonly toolCallId: string;
|
|
259
|
+
readonly content: string | readonly AgUiContentPart[];
|
|
260
|
+
} | {
|
|
261
|
+
readonly id: string;
|
|
262
|
+
readonly role: 'system' | 'developer';
|
|
263
|
+
readonly content: string;
|
|
264
|
+
} | {
|
|
265
|
+
readonly id: string;
|
|
266
|
+
readonly role: 'reasoning';
|
|
267
|
+
readonly content: string;
|
|
268
|
+
} | {
|
|
269
|
+
readonly id: string;
|
|
270
|
+
readonly role: 'activity';
|
|
271
|
+
readonly activityType: string;
|
|
272
|
+
readonly content: Readonly<Record<string, unknown>>;
|
|
273
|
+
};
|
|
274
|
+
/** An answer to one interrupt, sent on the run that continues from it. */
|
|
275
|
+
export interface AgUiResumeEntry {
|
|
276
|
+
readonly interruptId: string;
|
|
277
|
+
readonly status: 'resolved' | 'cancelled';
|
|
278
|
+
readonly payload?: unknown;
|
|
279
|
+
}
|
|
280
|
+
/**
|
|
281
|
+
* An AG-UI request (`RunAgentInput`) as the browser sent it — UNTRUSTED. Read
|
|
282
|
+
* by `readAgUiRunInput` (shape and id format), then planned against what the
|
|
283
|
+
* server holds: only the newest USER message, an answer to the pause the
|
|
284
|
+
* server is keeping, the names of tools the app allow-listed, and the
|
|
285
|
+
* `state`/`context` the app's own validators accept are ever used.
|
|
286
|
+
*/
|
|
287
|
+
export interface AgUiRunInput {
|
|
288
|
+
readonly threadId: string;
|
|
289
|
+
readonly runId: string;
|
|
290
|
+
readonly protocolVersion?: string;
|
|
291
|
+
readonly parentRunId?: string;
|
|
292
|
+
readonly messages: readonly AgUiMessage[];
|
|
293
|
+
readonly tools: readonly {
|
|
294
|
+
readonly name: string;
|
|
295
|
+
readonly description?: string;
|
|
296
|
+
}[];
|
|
297
|
+
readonly context: readonly {
|
|
298
|
+
readonly description: string;
|
|
299
|
+
readonly value: string;
|
|
300
|
+
}[];
|
|
301
|
+
readonly state?: unknown;
|
|
302
|
+
readonly forwardedProps?: unknown;
|
|
303
|
+
readonly resume?: readonly AgUiResumeEntry[];
|
|
304
|
+
}
|
|
305
|
+
export {};
|
|
306
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/ag-ui/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,gFAAgF;AAChF,eAAO,MAAM,sBAAsB,QAAQ,CAAC;AAE5C;;;;GAIG;AACH,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,cAAc,CAAC,EAAE,WAAW,CAAC;IACtC,QAAQ,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACjC;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,WAAW;IAC1B,iFAAiF;IACjF,QAAQ,CAAC,cAAc,CAAC,EAAE,MAAM,CAAC;IACjC,4EAA4E;IAC5E,QAAQ,CAAC,WAAW,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IACzC,mFAAmF;IACnF,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;CAC9B;AAED,UAAU,aAAa,CAAC,CAAC,SAAS,MAAM;IACtC,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC;IACjB,oEAAoE;IACpE,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,QAAQ,CAAC,EAAE,YAAY,CAAC;CAClC;AAED,8FAA8F;AAC9F,UAAU,YAAY;IACpB,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;CACjC;AAED,MAAM,WAAW,mBAAoB,SAAQ,aAAa,CAAC,aAAa,CAAC;IACvE,QAAQ,CAAC,QAAQ,EA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