@truefoundry/trueforge-core 0.0.0 → 0.1.0-rc.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/LICENSE +21 -0
- package/dist/agent-session/ITurnResourceResolver.d.ts +69 -0
- package/dist/agent-session/ITurnResourceResolver.d.ts.map +1 -0
- package/dist/agent-session/ITurnResourceResolver.js +19 -0
- package/dist/agent-session/ITurnResourceResolver.js.map +1 -0
- package/dist/agent-session/ITurnResourceResolver.mjs +1 -0
- package/dist/agent-session/ITurnResourceResolver.mjs.map +1 -0
- package/dist/agent-session/SessionHandle.d.ts +81 -0
- package/dist/agent-session/SessionHandle.d.ts.map +1 -0
- package/dist/agent-session/SessionHandle.js +392 -0
- package/dist/agent-session/SessionHandle.js.map +1 -0
- package/dist/agent-session/SessionHandle.mjs +371 -0
- package/dist/agent-session/SessionHandle.mjs.map +1 -0
- package/dist/agent-session/Sessions.d.ts +25 -0
- package/dist/agent-session/Sessions.d.ts.map +1 -0
- package/dist/agent-session/Sessions.js +71 -0
- package/dist/agent-session/Sessions.js.map +1 -0
- package/dist/agent-session/Sessions.mjs +46 -0
- package/dist/agent-session/Sessions.mjs.map +1 -0
- package/dist/agent-session/TurnHandle.d.ts +88 -0
- package/dist/agent-session/TurnHandle.d.ts.map +1 -0
- package/dist/agent-session/TurnHandle.js +490 -0
- package/dist/agent-session/TurnHandle.js.map +1 -0
- package/dist/agent-session/TurnHandle.mjs +469 -0
- package/dist/agent-session/TurnHandle.mjs.map +1 -0
- package/dist/agent-session/TurnResourceResolver.d.ts +154 -0
- package/dist/agent-session/TurnResourceResolver.d.ts.map +1 -0
- package/dist/agent-session/TurnResourceResolver.js +178 -0
- package/dist/agent-session/TurnResourceResolver.js.map +1 -0
- package/dist/agent-session/TurnResourceResolver.mjs +153 -0
- package/dist/agent-session/TurnResourceResolver.mjs.map +1 -0
- package/dist/agent-session/builtinsFromSpec.d.ts +19 -0
- package/dist/agent-session/builtinsFromSpec.d.ts.map +1 -0
- package/dist/agent-session/builtinsFromSpec.js +73 -0
- package/dist/agent-session/builtinsFromSpec.js.map +1 -0
- package/dist/agent-session/builtinsFromSpec.mjs +48 -0
- package/dist/agent-session/builtinsFromSpec.mjs.map +1 -0
- package/dist/agent-session/index.d.ts +29 -0
- package/dist/agent-session/index.d.ts.map +1 -0
- package/dist/agent-session/index.js +117 -0
- package/dist/agent-session/index.js.map +1 -0
- package/dist/agent-session/index.mjs +84 -0
- package/dist/agent-session/index.mjs.map +1 -0
- package/dist/agent-session/models/SessionRecord.d.ts +34 -0
- package/dist/agent-session/models/SessionRecord.d.ts.map +1 -0
- package/dist/agent-session/models/SessionRecord.js +19 -0
- package/dist/agent-session/models/SessionRecord.js.map +1 -0
- package/dist/agent-session/models/SessionRecord.mjs +1 -0
- package/dist/agent-session/models/SessionRecord.mjs.map +1 -0
- package/dist/agent-session/models/TurnRecord.d.ts +37 -0
- package/dist/agent-session/models/TurnRecord.d.ts.map +1 -0
- package/dist/agent-session/models/TurnRecord.js +31 -0
- package/dist/agent-session/models/TurnRecord.js.map +1 -0
- package/dist/agent-session/models/TurnRecord.mjs +6 -0
- package/dist/agent-session/models/TurnRecord.mjs.map +1 -0
- package/dist/agent-session/schemas/agentSpec.d.ts +142 -0
- package/dist/agent-session/schemas/agentSpec.d.ts.map +1 -0
- package/dist/agent-session/schemas/agentSpec.js +170 -0
- package/dist/agent-session/schemas/agentSpec.js.map +1 -0
- package/dist/agent-session/schemas/agentSpec.mjs +154 -0
- package/dist/agent-session/schemas/agentSpec.mjs.map +1 -0
- package/dist/agent-session/schemas/events.d.ts +1037 -0
- package/dist/agent-session/schemas/events.d.ts.map +1 -0
- package/dist/agent-session/schemas/events.js +80 -0
- package/dist/agent-session/schemas/events.js.map +1 -0
- package/dist/agent-session/schemas/events.mjs +69 -0
- package/dist/agent-session/schemas/events.mjs.map +1 -0
- package/dist/agent-session/schemas/pagination.d.ts +9 -0
- package/dist/agent-session/schemas/pagination.d.ts.map +1 -0
- package/dist/agent-session/schemas/pagination.js +36 -0
- package/dist/agent-session/schemas/pagination.js.map +1 -0
- package/dist/agent-session/schemas/pagination.mjs +11 -0
- package/dist/agent-session/schemas/pagination.mjs.map +1 -0
- package/dist/agent-session/schemas/session.d.ts +319 -0
- package/dist/agent-session/schemas/session.d.ts.map +1 -0
- package/dist/agent-session/schemas/session.js +58 -0
- package/dist/agent-session/schemas/session.js.map +1 -0
- package/dist/agent-session/schemas/session.mjs +30 -0
- package/dist/agent-session/schemas/session.mjs.map +1 -0
- package/dist/agent-session/schemas/turn.d.ts +494 -0
- package/dist/agent-session/schemas/turn.d.ts.map +1 -0
- package/dist/agent-session/schemas/turn.js +131 -0
- package/dist/agent-session/schemas/turn.js.map +1 -0
- package/dist/agent-session/schemas/turn.mjs +102 -0
- package/dist/agent-session/schemas/turn.mjs.map +1 -0
- package/dist/agent-session/store/ISessionStore.d.ts +310 -0
- package/dist/agent-session/store/ISessionStore.d.ts.map +1 -0
- package/dist/agent-session/store/ISessionStore.js +19 -0
- package/dist/agent-session/store/ISessionStore.js.map +1 -0
- package/dist/agent-session/store/ISessionStore.mjs +1 -0
- package/dist/agent-session/store/ISessionStore.mjs.map +1 -0
- package/dist/agent-session/store/InMemorySessionStore.d.ts +55 -0
- package/dist/agent-session/store/InMemorySessionStore.d.ts.map +1 -0
- package/dist/agent-session/store/InMemorySessionStore.js +475 -0
- package/dist/agent-session/store/InMemorySessionStore.js.map +1 -0
- package/dist/agent-session/store/InMemorySessionStore.mjs +461 -0
- package/dist/agent-session/store/InMemorySessionStore.mjs.map +1 -0
- package/dist/agent-session/store/OffsetPageToken.d.ts +13 -0
- package/dist/agent-session/store/OffsetPageToken.d.ts.map +1 -0
- package/dist/agent-session/store/OffsetPageToken.js +60 -0
- package/dist/agent-session/store/OffsetPageToken.js.map +1 -0
- package/dist/agent-session/store/OffsetPageToken.mjs +32 -0
- package/dist/agent-session/store/OffsetPageToken.mjs.map +1 -0
- package/dist/agent-session/store/PageToken.d.ts +4 -0
- package/dist/agent-session/store/PageToken.d.ts.map +1 -0
- package/dist/agent-session/store/PageToken.js +45 -0
- package/dist/agent-session/store/PageToken.js.map +1 -0
- package/dist/agent-session/store/PageToken.mjs +19 -0
- package/dist/agent-session/store/PageToken.mjs.map +1 -0
- package/dist/agent-session/store/SessionEventPageToken.d.ts +14 -0
- package/dist/agent-session/store/SessionEventPageToken.d.ts.map +1 -0
- package/dist/agent-session/store/SessionEventPageToken.js +70 -0
- package/dist/agent-session/store/SessionEventPageToken.js.map +1 -0
- package/dist/agent-session/store/SessionEventPageToken.mjs +42 -0
- package/dist/agent-session/store/SessionEventPageToken.mjs.map +1 -0
- package/dist/agent-session/store/SessionListPageToken.d.ts +24 -0
- package/dist/agent-session/store/SessionListPageToken.d.ts.map +1 -0
- package/dist/agent-session/store/SessionListPageToken.js +66 -0
- package/dist/agent-session/store/SessionListPageToken.js.map +1 -0
- package/dist/agent-session/store/SessionListPageToken.mjs +38 -0
- package/dist/agent-session/store/SessionListPageToken.mjs.map +1 -0
- package/dist/agent-session/store/SessionStoreErrors.d.ts +43 -0
- package/dist/agent-session/store/SessionStoreErrors.d.ts.map +1 -0
- package/dist/agent-session/store/SessionStoreErrors.js +126 -0
- package/dist/agent-session/store/SessionStoreErrors.js.map +1 -0
- package/dist/agent-session/store/SessionStoreErrors.mjs +92 -0
- package/dist/agent-session/store/SessionStoreErrors.mjs.map +1 -0
- package/dist/agent-session/store/assertCreateTurnThreadDelta.d.ts +18 -0
- package/dist/agent-session/store/assertCreateTurnThreadDelta.d.ts.map +1 -0
- package/dist/agent-session/store/assertCreateTurnThreadDelta.js +67 -0
- package/dist/agent-session/store/assertCreateTurnThreadDelta.js.map +1 -0
- package/dist/agent-session/store/assertCreateTurnThreadDelta.mjs +42 -0
- package/dist/agent-session/store/assertCreateTurnThreadDelta.mjs.map +1 -0
- package/dist/core/InstructionBuilder.d.ts +71 -0
- package/dist/core/InstructionBuilder.d.ts.map +1 -0
- package/dist/core/InstructionBuilder.js +95 -0
- package/dist/core/InstructionBuilder.js.map +1 -0
- package/dist/core/InstructionBuilder.mjs +69 -0
- package/dist/core/InstructionBuilder.mjs.map +1 -0
- package/dist/core/capabilities/AgentCapability.d.ts +32 -0
- package/dist/core/capabilities/AgentCapability.d.ts.map +1 -0
- package/dist/core/capabilities/AgentCapability.js +19 -0
- package/dist/core/capabilities/AgentCapability.js.map +1 -0
- package/dist/core/capabilities/AgentCapability.mjs +1 -0
- package/dist/core/capabilities/AgentCapability.mjs.map +1 -0
- package/dist/core/capabilities/AgentContextProcessor.d.ts +30 -0
- package/dist/core/capabilities/AgentContextProcessor.d.ts.map +1 -0
- package/dist/core/capabilities/AgentContextProcessor.js +19 -0
- package/dist/core/capabilities/AgentContextProcessor.js.map +1 -0
- package/dist/core/capabilities/AgentContextProcessor.mjs +1 -0
- package/dist/core/capabilities/AgentContextProcessor.mjs.map +1 -0
- package/dist/core/capabilities/ToolResponseProcessor.d.ts +12 -0
- package/dist/core/capabilities/ToolResponseProcessor.d.ts.map +1 -0
- package/dist/core/capabilities/ToolResponseProcessor.js +19 -0
- package/dist/core/capabilities/ToolResponseProcessor.js.map +1 -0
- package/dist/core/capabilities/ToolResponseProcessor.mjs +1 -0
- package/dist/core/capabilities/ToolResponseProcessor.mjs.map +1 -0
- package/dist/core/capabilities/builtins/AskUserQuestion.d.ts +11 -0
- package/dist/core/capabilities/builtins/AskUserQuestion.d.ts.map +1 -0
- package/dist/core/capabilities/builtins/AskUserQuestion.js +90 -0
- package/dist/core/capabilities/builtins/AskUserQuestion.js.map +1 -0
- package/dist/core/capabilities/builtins/AskUserQuestion.mjs +64 -0
- package/dist/core/capabilities/builtins/AskUserQuestion.mjs.map +1 -0
- package/dist/core/capabilities/builtins/ContextCompaction.d.ts +23 -0
- package/dist/core/capabilities/builtins/ContextCompaction.d.ts.map +1 -0
- package/dist/core/capabilities/builtins/ContextCompaction.js +235 -0
- package/dist/core/capabilities/builtins/ContextCompaction.js.map +1 -0
- package/dist/core/capabilities/builtins/ContextCompaction.mjs +208 -0
- package/dist/core/capabilities/builtins/ContextCompaction.mjs.map +1 -0
- package/dist/core/capabilities/builtins/CurrentDateTime.d.ts +17 -0
- package/dist/core/capabilities/builtins/CurrentDateTime.d.ts.map +1 -0
- package/dist/core/capabilities/builtins/CurrentDateTime.js +75 -0
- package/dist/core/capabilities/builtins/CurrentDateTime.js.map +1 -0
- package/dist/core/capabilities/builtins/CurrentDateTime.mjs +47 -0
- package/dist/core/capabilities/builtins/CurrentDateTime.mjs.map +1 -0
- package/dist/core/capabilities/builtins/DynamicSubAgents.d.ts +39 -0
- package/dist/core/capabilities/builtins/DynamicSubAgents.d.ts.map +1 -0
- package/dist/core/capabilities/builtins/DynamicSubAgents.js +176 -0
- package/dist/core/capabilities/builtins/DynamicSubAgents.js.map +1 -0
- package/dist/core/capabilities/builtins/DynamicSubAgents.mjs +134 -0
- package/dist/core/capabilities/builtins/DynamicSubAgents.mjs.map +1 -0
- package/dist/core/capabilities/builtins/LargeToolResponse.d.ts +40 -0
- package/dist/core/capabilities/builtins/LargeToolResponse.d.ts.map +1 -0
- package/dist/core/capabilities/builtins/LargeToolResponse.js +225 -0
- package/dist/core/capabilities/builtins/LargeToolResponse.js.map +1 -0
- package/dist/core/capabilities/builtins/LargeToolResponse.mjs +186 -0
- package/dist/core/capabilities/builtins/LargeToolResponse.mjs.map +1 -0
- package/dist/core/capabilities/builtins/OpenUI.d.ts +31 -0
- package/dist/core/capabilities/builtins/OpenUI.d.ts.map +1 -0
- package/dist/core/capabilities/builtins/OpenUI.js +376 -0
- package/dist/core/capabilities/builtins/OpenUI.js.map +1 -0
- package/dist/core/capabilities/builtins/OpenUI.mjs +326 -0
- package/dist/core/capabilities/builtins/OpenUI.mjs.map +1 -0
- package/dist/core/errors.d.ts +33 -0
- package/dist/core/errors.d.ts.map +1 -0
- package/dist/core/errors.js +88 -0
- package/dist/core/errors.js.map +1 -0
- package/dist/core/errors.mjs +57 -0
- package/dist/core/errors.mjs.map +1 -0
- package/dist/core/events/PassthroughEvents.d.ts +30 -0
- package/dist/core/events/PassthroughEvents.d.ts.map +1 -0
- package/dist/core/events/PassthroughEvents.js +19 -0
- package/dist/core/events/PassthroughEvents.js.map +1 -0
- package/dist/core/events/PassthroughEvents.mjs +1 -0
- package/dist/core/events/PassthroughEvents.mjs.map +1 -0
- package/dist/core/events/schema.d.ts +1103 -0
- package/dist/core/events/schema.d.ts.map +1 -0
- package/dist/core/events/schema.js +337 -0
- package/dist/core/events/schema.js.map +1 -0
- package/dist/core/events/schema.mjs +283 -0
- package/dist/core/events/schema.mjs.map +1 -0
- package/dist/core/index.d.ts +60 -0
- package/dist/core/index.d.ts.map +1 -0
- package/dist/core/index.js +209 -0
- package/dist/core/index.js.map +1 -0
- package/dist/core/index.mjs +144 -0
- package/dist/core/index.mjs.map +1 -0
- package/dist/core/llm/ILLM.d.ts +15 -0
- package/dist/core/llm/ILLM.d.ts.map +1 -0
- package/dist/core/llm/ILLM.js +19 -0
- package/dist/core/llm/ILLM.js.map +1 -0
- package/dist/core/llm/ILLM.mjs +1 -0
- package/dist/core/llm/ILLM.mjs.map +1 -0
- package/dist/core/llm/LLMTypes.d.ts +369 -0
- package/dist/core/llm/LLMTypes.d.ts.map +1 -0
- package/dist/core/llm/LLMTypes.js +170 -0
- package/dist/core/llm/LLMTypes.js.map +1 -0
- package/dist/core/llm/LLMTypes.mjs +133 -0
- package/dist/core/llm/LLMTypes.mjs.map +1 -0
- package/dist/core/llm/VercelAILLM.d.ts +228 -0
- package/dist/core/llm/VercelAILLM.d.ts.map +1 -0
- package/dist/core/llm/VercelAILLM.js +1042 -0
- package/dist/core/llm/VercelAILLM.js.map +1 -0
- package/dist/core/llm/VercelAILLM.mjs +999 -0
- package/dist/core/llm/VercelAILLM.mjs.map +1 -0
- package/dist/core/llm/openaiSchemas.d.ts +190 -0
- package/dist/core/llm/openaiSchemas.d.ts.map +1 -0
- package/dist/core/llm/openaiSchemas.js +144 -0
- package/dist/core/llm/openaiSchemas.js.map +1 -0
- package/dist/core/llm/openaiSchemas.mjs +107 -0
- package/dist/core/llm/openaiSchemas.mjs.map +1 -0
- package/dist/core/llm/responseFormat.d.ts +25 -0
- package/dist/core/llm/responseFormat.d.ts.map +1 -0
- package/dist/core/llm/responseFormat.js +58 -0
- package/dist/core/llm/responseFormat.js.map +1 -0
- package/dist/core/llm/responseFormat.mjs +32 -0
- package/dist/core/llm/responseFormat.mjs.map +1 -0
- package/dist/core/llm/toOpenAIChatMessage.d.ts +11 -0
- package/dist/core/llm/toOpenAIChatMessage.d.ts.map +1 -0
- package/dist/core/llm/toOpenAIChatMessage.js +95 -0
- package/dist/core/llm/toOpenAIChatMessage.js.map +1 -0
- package/dist/core/llm/toOpenAIChatMessage.mjs +70 -0
- package/dist/core/llm/toOpenAIChatMessage.mjs.map +1 -0
- package/dist/core/llm/usage.d.ts +4 -0
- package/dist/core/llm/usage.d.ts.map +1 -0
- package/dist/core/llm/usage.js +52 -0
- package/dist/core/llm/usage.js.map +1 -0
- package/dist/core/llm/usage.mjs +26 -0
- package/dist/core/llm/usage.mjs.map +1 -0
- package/dist/core/mcp/ClientSideTool.d.ts +10 -0
- package/dist/core/mcp/ClientSideTool.d.ts.map +1 -0
- package/dist/core/mcp/ClientSideTool.js +56 -0
- package/dist/core/mcp/ClientSideTool.js.map +1 -0
- package/dist/core/mcp/ClientSideTool.mjs +31 -0
- package/dist/core/mcp/ClientSideTool.mjs.map +1 -0
- package/dist/core/mcp/IMCPServer.d.ts +78 -0
- package/dist/core/mcp/IMCPServer.d.ts.map +1 -0
- package/dist/core/mcp/IMCPServer.js +63 -0
- package/dist/core/mcp/IMCPServer.js.map +1 -0
- package/dist/core/mcp/IMCPServer.mjs +33 -0
- package/dist/core/mcp/IMCPServer.mjs.map +1 -0
- package/dist/core/mcp/LocalToolMCP.d.ts +39 -0
- package/dist/core/mcp/LocalToolMCP.d.ts.map +1 -0
- package/dist/core/mcp/LocalToolMCP.js +121 -0
- package/dist/core/mcp/LocalToolMCP.js.map +1 -0
- package/dist/core/mcp/LocalToolMCP.mjs +98 -0
- package/dist/core/mcp/LocalToolMCP.mjs.map +1 -0
- package/dist/core/mcp/RemoteMCP.d.ts +67 -0
- package/dist/core/mcp/RemoteMCP.d.ts.map +1 -0
- package/dist/core/mcp/RemoteMCP.js +244 -0
- package/dist/core/mcp/RemoteMCP.js.map +1 -0
- package/dist/core/mcp/RemoteMCP.mjs +222 -0
- package/dist/core/mcp/RemoteMCP.mjs.map +1 -0
- package/dist/core/mcp/ToolSelectorPolicy.d.ts +52 -0
- package/dist/core/mcp/ToolSelectorPolicy.d.ts.map +1 -0
- package/dist/core/mcp/ToolSelectorPolicy.js +108 -0
- package/dist/core/mcp/ToolSelectorPolicy.js.map +1 -0
- package/dist/core/mcp/ToolSelectorPolicy.mjs +90 -0
- package/dist/core/mcp/ToolSelectorPolicy.mjs.map +1 -0
- package/dist/core/mcp/ToolSet.d.ts +31 -0
- package/dist/core/mcp/ToolSet.d.ts.map +1 -0
- package/dist/core/mcp/ToolSet.js +119 -0
- package/dist/core/mcp/ToolSet.js.map +1 -0
- package/dist/core/mcp/ToolSet.mjs +98 -0
- package/dist/core/mcp/ToolSet.mjs.map +1 -0
- package/dist/core/mcp/convertMCPServers.d.ts +22 -0
- package/dist/core/mcp/convertMCPServers.d.ts.map +1 -0
- package/dist/core/mcp/convertMCPServers.js +89 -0
- package/dist/core/mcp/convertMCPServers.js.map +1 -0
- package/dist/core/mcp/convertMCPServers.mjs +64 -0
- package/dist/core/mcp/convertMCPServers.mjs.map +1 -0
- package/dist/core/mcp/executeToolCalls.d.ts +31 -0
- package/dist/core/mcp/executeToolCalls.d.ts.map +1 -0
- package/dist/core/mcp/executeToolCalls.js +168 -0
- package/dist/core/mcp/executeToolCalls.js.map +1 -0
- package/dist/core/mcp/executeToolCalls.mjs +149 -0
- package/dist/core/mcp/executeToolCalls.mjs.map +1 -0
- package/dist/core/mcp/pagination.d.ts +11 -0
- package/dist/core/mcp/pagination.d.ts.map +1 -0
- package/dist/core/mcp/pagination.js +49 -0
- package/dist/core/mcp/pagination.js.map +1 -0
- package/dist/core/mcp/pagination.mjs +24 -0
- package/dist/core/mcp/pagination.mjs.map +1 -0
- package/dist/core/mcp/remoteMcpClient.d.ts +36 -0
- package/dist/core/mcp/remoteMcpClient.d.ts.map +1 -0
- package/dist/core/mcp/remoteMcpClient.js +138 -0
- package/dist/core/mcp/remoteMcpClient.js.map +1 -0
- package/dist/core/mcp/remoteMcpClient.mjs +112 -0
- package/dist/core/mcp/remoteMcpClient.mjs.map +1 -0
- package/dist/core/mcp/toolNames.d.ts +6 -0
- package/dist/core/mcp/toolNames.d.ts.map +1 -0
- package/dist/core/mcp/toolNames.js +59 -0
- package/dist/core/mcp/toolNames.js.map +1 -0
- package/dist/core/mcp/toolNames.mjs +33 -0
- package/dist/core/mcp/toolNames.mjs.map +1 -0
- package/dist/core/mcp/toolSelectors.d.ts +28 -0
- package/dist/core/mcp/toolSelectors.d.ts.map +1 -0
- package/dist/core/mcp/toolSelectors.js +113 -0
- package/dist/core/mcp/toolSelectors.js.map +1 -0
- package/dist/core/mcp/toolSelectors.mjs +78 -0
- package/dist/core/mcp/toolSelectors.mjs.map +1 -0
- package/dist/core/runtime/AgentDefinition.d.ts +23 -0
- package/dist/core/runtime/AgentDefinition.d.ts.map +1 -0
- package/dist/core/runtime/AgentDefinition.js +19 -0
- package/dist/core/runtime/AgentDefinition.js.map +1 -0
- package/dist/core/runtime/AgentDefinition.mjs +1 -0
- package/dist/core/runtime/AgentDefinition.mjs.map +1 -0
- package/dist/core/runtime/AgentThread.d.ts +64 -0
- package/dist/core/runtime/AgentThread.d.ts.map +1 -0
- package/dist/core/runtime/AgentThread.js +1065 -0
- package/dist/core/runtime/AgentThread.js.map +1 -0
- package/dist/core/runtime/AgentThread.mjs +1062 -0
- package/dist/core/runtime/AgentThread.mjs.map +1 -0
- package/dist/core/runtime/AgentThread.types.d.ts +123 -0
- package/dist/core/runtime/AgentThread.types.d.ts.map +1 -0
- package/dist/core/runtime/AgentThread.types.js +46 -0
- package/dist/core/runtime/AgentThread.types.js.map +1 -0
- package/dist/core/runtime/AgentThread.types.mjs +20 -0
- package/dist/core/runtime/AgentThread.types.mjs.map +1 -0
- package/dist/core/runtime/AgentThreadOrchestrator.d.ts +35 -0
- package/dist/core/runtime/AgentThreadOrchestrator.d.ts.map +1 -0
- package/dist/core/runtime/AgentThreadOrchestrator.js +433 -0
- package/dist/core/runtime/AgentThreadOrchestrator.js.map +1 -0
- package/dist/core/runtime/AgentThreadOrchestrator.mjs +418 -0
- package/dist/core/runtime/AgentThreadOrchestrator.mjs.map +1 -0
- package/dist/core/runtime/CreateDynamicSubAgentThread.d.ts +11 -0
- package/dist/core/runtime/CreateDynamicSubAgentThread.d.ts.map +1 -0
- package/dist/core/runtime/CreateDynamicSubAgentThread.js +19 -0
- package/dist/core/runtime/CreateDynamicSubAgentThread.js.map +1 -0
- package/dist/core/runtime/CreateDynamicSubAgentThread.mjs +1 -0
- package/dist/core/runtime/CreateDynamicSubAgentThread.mjs.map +1 -0
- package/dist/core/runtime/DeferredTool.d.ts +34 -0
- package/dist/core/runtime/DeferredTool.d.ts.map +1 -0
- package/dist/core/runtime/DeferredTool.js +321 -0
- package/dist/core/runtime/DeferredTool.js.map +1 -0
- package/dist/core/runtime/DeferredTool.mjs +287 -0
- package/dist/core/runtime/DeferredTool.mjs.map +1 -0
- package/dist/core/runtime/OpenToolCallCloser.d.ts +21 -0
- package/dist/core/runtime/OpenToolCallCloser.d.ts.map +1 -0
- package/dist/core/runtime/OpenToolCallCloser.js +92 -0
- package/dist/core/runtime/OpenToolCallCloser.js.map +1 -0
- package/dist/core/runtime/OpenToolCallCloser.mjs +66 -0
- package/dist/core/runtime/OpenToolCallCloser.mjs.map +1 -0
- package/dist/core/runtime/UserInputMessage.d.ts +16 -0
- package/dist/core/runtime/UserInputMessage.d.ts.map +1 -0
- package/dist/core/runtime/UserInputMessage.js +183 -0
- package/dist/core/runtime/UserInputMessage.js.map +1 -0
- package/dist/core/runtime/UserInputMessage.mjs +157 -0
- package/dist/core/runtime/UserInputMessage.mjs.map +1 -0
- package/dist/core/runtime/contextUsage.d.ts +17 -0
- package/dist/core/runtime/contextUsage.d.ts.map +1 -0
- package/dist/core/runtime/contextUsage.js +56 -0
- package/dist/core/runtime/contextUsage.js.map +1 -0
- package/dist/core/runtime/contextUsage.mjs +28 -0
- package/dist/core/runtime/contextUsage.mjs.map +1 -0
- package/dist/core/runtime/contextUtils.d.ts +30 -0
- package/dist/core/runtime/contextUtils.d.ts.map +1 -0
- package/dist/core/runtime/contextUtils.js +198 -0
- package/dist/core/runtime/contextUtils.js.map +1 -0
- package/dist/core/runtime/contextUtils.mjs +148 -0
- package/dist/core/runtime/contextUtils.mjs.map +1 -0
- package/dist/core/runtime/metrics.d.ts +22 -0
- package/dist/core/runtime/metrics.d.ts.map +1 -0
- package/dist/core/runtime/metrics.js +89 -0
- package/dist/core/runtime/metrics.js.map +1 -0
- package/dist/core/runtime/metrics.mjs +61 -0
- package/dist/core/runtime/metrics.mjs.map +1 -0
- package/dist/core/sandbox/Sandbox.d.ts +121 -0
- package/dist/core/sandbox/Sandbox.d.ts.map +1 -0
- package/dist/core/sandbox/Sandbox.js +572 -0
- package/dist/core/sandbox/Sandbox.js.map +1 -0
- package/dist/core/sandbox/Sandbox.mjs +536 -0
- package/dist/core/sandbox/Sandbox.mjs.map +1 -0
- package/dist/core/sandbox/SandboxErrors.d.ts +30 -0
- package/dist/core/sandbox/SandboxErrors.d.ts.map +1 -0
- package/dist/core/sandbox/SandboxErrors.js +102 -0
- package/dist/core/sandbox/SandboxErrors.js.map +1 -0
- package/dist/core/sandbox/SandboxErrors.mjs +71 -0
- package/dist/core/sandbox/SandboxErrors.mjs.map +1 -0
- package/dist/core/sandbox/SandboxNatsBridge.d.ts +33 -0
- package/dist/core/sandbox/SandboxNatsBridge.d.ts.map +1 -0
- package/dist/core/sandbox/SandboxNatsBridge.js +222 -0
- package/dist/core/sandbox/SandboxNatsBridge.js.map +1 -0
- package/dist/core/sandbox/SandboxNatsBridge.mjs +201 -0
- package/dist/core/sandbox/SandboxNatsBridge.mjs.map +1 -0
- package/dist/core/sandbox/constants.d.ts +10 -0
- package/dist/core/sandbox/constants.d.ts.map +1 -0
- package/dist/core/sandbox/constants.js +37 -0
- package/dist/core/sandbox/constants.js.map +1 -0
- package/dist/core/sandbox/constants.mjs +10 -0
- package/dist/core/sandbox/constants.mjs.map +1 -0
- package/dist/core/sandbox/provider/DaytonaProvider.d.ts +80 -0
- package/dist/core/sandbox/provider/DaytonaProvider.d.ts.map +1 -0
- package/dist/core/sandbox/provider/DaytonaProvider.js +346 -0
- package/dist/core/sandbox/provider/DaytonaProvider.js.map +1 -0
- package/dist/core/sandbox/provider/DaytonaProvider.mjs +326 -0
- package/dist/core/sandbox/provider/DaytonaProvider.mjs.map +1 -0
- package/dist/core/sandbox/provider/Provider.d.ts +83 -0
- package/dist/core/sandbox/provider/Provider.d.ts.map +1 -0
- package/dist/core/sandbox/provider/Provider.js +43 -0
- package/dist/core/sandbox/provider/Provider.js.map +1 -0
- package/dist/core/sandbox/provider/Provider.mjs +17 -0
- package/dist/core/sandbox/provider/Provider.mjs.map +1 -0
- package/dist/core/sandbox/provider/TFYSandboxProvider.d.ts +41 -0
- package/dist/core/sandbox/provider/TFYSandboxProvider.d.ts.map +1 -0
- package/dist/core/sandbox/provider/TFYSandboxProvider.js +180 -0
- package/dist/core/sandbox/provider/TFYSandboxProvider.js.map +1 -0
- package/dist/core/sandbox/provider/TFYSandboxProvider.mjs +147 -0
- package/dist/core/sandbox/provider/TFYSandboxProvider.mjs.map +1 -0
- package/dist/core/sandbox/sandboxImage.d.ts +6 -0
- package/dist/core/sandbox/sandboxImage.d.ts.map +1 -0
- package/dist/core/sandbox/sandboxImage.js +31 -0
- package/dist/core/sandbox/sandboxImage.js.map +1 -0
- package/dist/core/sandbox/sandboxImage.mjs +6 -0
- package/dist/core/sandbox/sandboxImage.mjs.map +1 -0
- package/dist/core/sandbox/sandboxScripts.gen.d.ts +5 -0
- package/dist/core/sandbox/sandboxScripts.gen.d.ts.map +1 -0
- package/dist/core/sandbox/sandboxScripts.gen.js +343 -0
- package/dist/core/sandbox/sandboxScripts.gen.js.map +1 -0
- package/dist/core/sandbox/sandboxScripts.gen.mjs +318 -0
- package/dist/core/sandbox/sandboxScripts.gen.mjs.map +1 -0
- package/dist/core/sandbox/skills/ISkillMounter.d.ts +7 -0
- package/dist/core/sandbox/skills/ISkillMounter.d.ts.map +1 -0
- package/dist/core/sandbox/skills/ISkillMounter.js +19 -0
- package/dist/core/sandbox/skills/ISkillMounter.js.map +1 -0
- package/dist/core/sandbox/skills/ISkillMounter.mjs +1 -0
- package/dist/core/sandbox/skills/ISkillMounter.mjs.map +1 -0
- package/dist/core/sandbox/skills/SkillMounter.d.ts +17 -0
- package/dist/core/sandbox/skills/SkillMounter.d.ts.map +1 -0
- package/dist/core/sandbox/skills/SkillMounter.js +73 -0
- package/dist/core/sandbox/skills/SkillMounter.js.map +1 -0
- package/dist/core/sandbox/skills/SkillMounter.mjs +48 -0
- package/dist/core/sandbox/skills/SkillMounter.mjs.map +1 -0
- package/dist/core/sandbox/skills/constants.d.ts +10 -0
- package/dist/core/sandbox/skills/constants.d.ts.map +1 -0
- package/dist/core/sandbox/skills/constants.js +56 -0
- package/dist/core/sandbox/skills/constants.js.map +1 -0
- package/dist/core/sandbox/skills/constants.mjs +28 -0
- package/dist/core/sandbox/skills/constants.mjs.map +1 -0
- package/dist/core/sandbox/skills/index.d.ts +5 -0
- package/dist/core/sandbox/skills/index.d.ts.map +1 -0
- package/dist/core/sandbox/skills/index.js +40 -0
- package/dist/core/sandbox/skills/index.js.map +1 -0
- package/dist/core/sandbox/skills/index.mjs +11 -0
- package/dist/core/sandbox/skills/index.mjs.map +1 -0
- package/dist/core/tracing/AgentTracing.d.ts +38 -0
- package/dist/core/tracing/AgentTracing.d.ts.map +1 -0
- package/dist/core/tracing/AgentTracing.js +19 -0
- package/dist/core/tracing/AgentTracing.js.map +1 -0
- package/dist/core/tracing/AgentTracing.mjs +1 -0
- package/dist/core/tracing/AgentTracing.mjs.map +1 -0
- package/dist/core/tracing/NoopAgentTracing.d.ts +3 -0
- package/dist/core/tracing/NoopAgentTracing.d.ts.map +1 -0
- package/dist/core/tracing/NoopAgentTracing.js +79 -0
- package/dist/core/tracing/NoopAgentTracing.js.map +1 -0
- package/dist/core/tracing/NoopAgentTracing.mjs +54 -0
- package/dist/core/tracing/NoopAgentTracing.mjs.map +1 -0
- package/dist/core/util/abort.d.ts +2 -0
- package/dist/core/util/abort.d.ts.map +1 -0
- package/dist/core/util/abort.js +38 -0
- package/dist/core/util/abort.js.map +1 -0
- package/dist/core/util/abort.mjs +13 -0
- package/dist/core/util/abort.mjs.map +1 -0
- package/dist/core/util/errorLogFields.d.ts +6 -0
- package/dist/core/util/errorLogFields.d.ts.map +1 -0
- package/dist/core/util/errorLogFields.js +36 -0
- package/dist/core/util/errorLogFields.js.map +1 -0
- package/dist/core/util/errorLogFields.mjs +11 -0
- package/dist/core/util/errorLogFields.mjs.map +1 -0
- package/dist/core/util/promiseUtils.d.ts +7 -0
- package/dist/core/util/promiseUtils.d.ts.map +1 -0
- package/dist/core/util/promiseUtils.js +82 -0
- package/dist/core/util/promiseUtils.js.map +1 -0
- package/dist/core/util/promiseUtils.mjs +55 -0
- package/dist/core/util/promiseUtils.mjs.map +1 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +44 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +8 -0
- package/dist/index.mjs.map +1 -0
- package/dist/package.json +3 -0
- package/dist/request-reply/client.d.ts +21 -0
- package/dist/request-reply/client.d.ts.map +1 -0
- package/dist/request-reply/client.js +92 -0
- package/dist/request-reply/client.js.map +1 -0
- package/dist/request-reply/client.mjs +67 -0
- package/dist/request-reply/client.mjs.map +1 -0
- package/dist/request-reply/errors.d.ts +23 -0
- package/dist/request-reply/errors.d.ts.map +1 -0
- package/dist/request-reply/errors.js +66 -0
- package/dist/request-reply/errors.js.map +1 -0
- package/dist/request-reply/errors.mjs +39 -0
- package/dist/request-reply/errors.mjs.map +1 -0
- package/dist/request-reply/executor.d.ts +70 -0
- package/dist/request-reply/executor.d.ts.map +1 -0
- package/dist/request-reply/executor.js +267 -0
- package/dist/request-reply/executor.js.map +1 -0
- package/dist/request-reply/executor.mjs +232 -0
- package/dist/request-reply/executor.mjs.map +1 -0
- package/dist/request-reply/index.d.ts +16 -0
- package/dist/request-reply/index.d.ts.map +1 -0
- package/dist/request-reply/index.js +47 -0
- package/dist/request-reply/index.js.map +1 -0
- package/dist/request-reply/index.mjs +16 -0
- package/dist/request-reply/index.mjs.map +1 -0
- package/dist/request-reply/router.d.ts +20 -0
- package/dist/request-reply/router.d.ts.map +1 -0
- package/dist/request-reply/router.js +55 -0
- package/dist/request-reply/router.js.map +1 -0
- package/dist/request-reply/router.mjs +30 -0
- package/dist/request-reply/router.mjs.map +1 -0
- package/dist/request-reply/types.d.ts +25 -0
- package/dist/request-reply/types.d.ts.map +1 -0
- package/dist/request-reply/types.js +54 -0
- package/dist/request-reply/types.js.map +1 -0
- package/dist/request-reply/types.mjs +28 -0
- package/dist/request-reply/types.mjs.map +1 -0
- package/dist/request-reply/utils.d.ts +9 -0
- package/dist/request-reply/utils.d.ts.map +1 -0
- package/dist/request-reply/utils.js +51 -0
- package/dist/request-reply/utils.js.map +1 -0
- package/dist/request-reply/utils.mjs +22 -0
- package/dist/request-reply/utils.mjs.map +1 -0
- package/package.json +127 -6
- package/README.md +0 -4
- package/index.js +0 -1
|
@@ -0,0 +1,1037 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Turn/session event product schemas. Event payloads come from the harness; this
|
|
3
|
+
* module owns turn lifecycle events (turn.created / turn.done) and the persisted
|
|
4
|
+
* event unions the store writes. SSE streaming envelopes stay in server/schemas.
|
|
5
|
+
*/
|
|
6
|
+
import { z } from '@hono/zod-openapi';
|
|
7
|
+
import type { WithRegisteredPassthrough } from '../../core/events/PassthroughEvents';
|
|
8
|
+
/** Harness event types plus the turn lifecycle types owned by agentSession. */
|
|
9
|
+
export declare const EventType: {
|
|
10
|
+
readonly AGENT_CONTEXT_OVERWRITE: 'agent.context.overwrite';
|
|
11
|
+
readonly MCP_AUTH_REQUIRED: 'mcp.auth_required';
|
|
12
|
+
readonly MCP_INITIALIZE: 'mcp.initialize';
|
|
13
|
+
readonly MODEL_MESSAGE: 'model.message';
|
|
14
|
+
readonly MODEL_MESSAGE_DELTA: 'model.message.delta';
|
|
15
|
+
readonly SANDBOX_CREATED: 'sandbox.created';
|
|
16
|
+
readonly THREAD_CREATED: 'thread.created';
|
|
17
|
+
readonly THREAD_DONE: 'thread.done';
|
|
18
|
+
readonly TOOL_RESPONSE: 'tool.response';
|
|
19
|
+
readonly TOOL_APPROVAL_REQUIRED: 'tool.approval_required';
|
|
20
|
+
readonly TOOL_RESPONSE_REQUIRED: 'tool.response_required';
|
|
21
|
+
readonly USER_TOOL_APPROVAL: 'user.tool_approval';
|
|
22
|
+
readonly USER_TOOL_RESPONSE: 'user.tool_response';
|
|
23
|
+
readonly USER_MESSAGE: 'user.message';
|
|
24
|
+
readonly TURN_CREATED: 'turn.created';
|
|
25
|
+
readonly TURN_DONE: 'turn.done';
|
|
26
|
+
};
|
|
27
|
+
export declare const TurnCreatedEventSchema: z.ZodObject<{
|
|
28
|
+
type: z.ZodLiteral<"turn.created">;
|
|
29
|
+
id: z.ZodString;
|
|
30
|
+
turn_id: z.ZodString;
|
|
31
|
+
previous_turn_id: z.ZodNullable<z.ZodString>;
|
|
32
|
+
input: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
33
|
+
type: z.ZodLiteral<"user.message">;
|
|
34
|
+
content: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
35
|
+
type: z.ZodLiteral<"text">;
|
|
36
|
+
text: z.ZodString;
|
|
37
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
38
|
+
type: z.ZodLiteral<"file">;
|
|
39
|
+
name: z.ZodString;
|
|
40
|
+
data: z.ZodString;
|
|
41
|
+
}, z.core.$strip>], "type">>]>;
|
|
42
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
43
|
+
type: z.ZodLiteral<"user.tool_approval">;
|
|
44
|
+
thread_id: z.ZodString;
|
|
45
|
+
tool_call_id: z.ZodString;
|
|
46
|
+
approval: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
47
|
+
status: z.ZodLiteral<"allow">;
|
|
48
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
49
|
+
status: z.ZodLiteral<"deny">;
|
|
50
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
51
|
+
}, z.core.$strip>], "status">;
|
|
52
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
53
|
+
type: z.ZodLiteral<"user.tool_response">;
|
|
54
|
+
thread_id: z.ZodString;
|
|
55
|
+
tool_call_id: z.ZodString;
|
|
56
|
+
content: z.ZodString;
|
|
57
|
+
}, z.core.$strip>], "type">>>;
|
|
58
|
+
state: z.ZodObject<{
|
|
59
|
+
status: z.ZodLiteral<"running">;
|
|
60
|
+
}, z.core.$strip>;
|
|
61
|
+
created_at: z.ZodString;
|
|
62
|
+
thread_id: z.ZodNullable<z.ZodString>;
|
|
63
|
+
}, z.core.$strip>;
|
|
64
|
+
export declare const TurnDoneEventSchema: z.ZodObject<{
|
|
65
|
+
type: z.ZodLiteral<"turn.done">;
|
|
66
|
+
id: z.ZodString;
|
|
67
|
+
state: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
68
|
+
status: z.ZodLiteral<"done">;
|
|
69
|
+
output: z.ZodUnion<readonly [z.ZodObject<{
|
|
70
|
+
content: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
71
|
+
type: z.ZodLiteral<"text">;
|
|
72
|
+
text: z.ZodString;
|
|
73
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
74
|
+
type: z.ZodLiteral<"refusal">;
|
|
75
|
+
refusal: z.ZodString;
|
|
76
|
+
}, z.core.$strip>]>>]>>>;
|
|
77
|
+
name: z.ZodOptional<z.ZodString>;
|
|
78
|
+
refusal: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
79
|
+
reasoning_content: z.ZodOptional<z.ZodString>;
|
|
80
|
+
tool_calls: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
81
|
+
id: z.ZodString;
|
|
82
|
+
type: z.ZodLiteral<"function">;
|
|
83
|
+
function: z.ZodObject<{
|
|
84
|
+
name: z.ZodString;
|
|
85
|
+
arguments: z.ZodString;
|
|
86
|
+
}, z.core.$strip>;
|
|
87
|
+
provider_specific_fields: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
88
|
+
tool_info: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
89
|
+
type: z.ZodLiteral<"truefoundry-system">;
|
|
90
|
+
name: z.ZodString;
|
|
91
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
92
|
+
type: z.ZodLiteral<"mcp">;
|
|
93
|
+
server_id: z.ZodString;
|
|
94
|
+
server_name: z.ZodString;
|
|
95
|
+
name: z.ZodString;
|
|
96
|
+
}, z.core.$strip>], "type">;
|
|
97
|
+
}, z.core.$strip>>>;
|
|
98
|
+
type: z.ZodLiteral<"model.message">;
|
|
99
|
+
id: z.ZodString;
|
|
100
|
+
thread_id: z.ZodString;
|
|
101
|
+
finish_reason: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
102
|
+
content_filter: "content_filter";
|
|
103
|
+
function_call: "function_call";
|
|
104
|
+
length: "length";
|
|
105
|
+
stop: "stop";
|
|
106
|
+
tool_calls: "tool_calls";
|
|
107
|
+
}>, z.ZodNull]>>;
|
|
108
|
+
created_at: z.ZodString;
|
|
109
|
+
usage: z.ZodOptional<z.ZodObject<{
|
|
110
|
+
input_tokens: z.ZodNumber;
|
|
111
|
+
output_tokens: z.ZodNumber;
|
|
112
|
+
cache_read_tokens: z.ZodOptional<z.ZodNumber>;
|
|
113
|
+
cache_write_tokens: z.ZodOptional<z.ZodNumber>;
|
|
114
|
+
input_tokens_breakdown: z.ZodObject<{
|
|
115
|
+
harness: z.ZodNumber;
|
|
116
|
+
skills: z.ZodNumber;
|
|
117
|
+
instructions: z.ZodNumber;
|
|
118
|
+
tool_definitions: z.ZodNumber;
|
|
119
|
+
messages: z.ZodNumber;
|
|
120
|
+
}, z.core.$strip>;
|
|
121
|
+
}, z.core.$strip>>;
|
|
122
|
+
}, z.core.$strip>, z.ZodNull]>;
|
|
123
|
+
required_actions: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
124
|
+
type: z.ZodLiteral<"tool.approval_required">;
|
|
125
|
+
id: z.ZodString;
|
|
126
|
+
created_at: z.ZodString;
|
|
127
|
+
thread_id: z.ZodString;
|
|
128
|
+
tool_calls: z.ZodArray<z.ZodObject<{
|
|
129
|
+
id: z.ZodString;
|
|
130
|
+
source_event_id: z.ZodString;
|
|
131
|
+
}, z.core.$strip>>;
|
|
132
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
133
|
+
type: z.ZodLiteral<"tool.response_required">;
|
|
134
|
+
id: z.ZodString;
|
|
135
|
+
created_at: z.ZodString;
|
|
136
|
+
thread_id: z.ZodString;
|
|
137
|
+
tool_calls: z.ZodArray<z.ZodObject<{
|
|
138
|
+
id: z.ZodString;
|
|
139
|
+
source_event_id: z.ZodString;
|
|
140
|
+
}, z.core.$strip>>;
|
|
141
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
142
|
+
id: z.ZodString;
|
|
143
|
+
created_at: z.ZodString;
|
|
144
|
+
thread_id: z.ZodNullable<z.ZodString>;
|
|
145
|
+
type: z.ZodLiteral<"mcp.auth_required">;
|
|
146
|
+
mcp_servers: z.ZodArray<z.ZodObject<{
|
|
147
|
+
id: z.ZodString;
|
|
148
|
+
name: z.ZodString;
|
|
149
|
+
auth_url: z.ZodString;
|
|
150
|
+
}, z.core.$strip>>;
|
|
151
|
+
}, z.core.$strip>], "type">>;
|
|
152
|
+
completed_at: z.ZodString;
|
|
153
|
+
metrics: z.ZodOptional<z.ZodObject<{
|
|
154
|
+
total_input_tokens: z.ZodOptional<z.ZodNumber>;
|
|
155
|
+
total_output_tokens: z.ZodOptional<z.ZodNumber>;
|
|
156
|
+
total_tokens: z.ZodOptional<z.ZodNumber>;
|
|
157
|
+
total_cache_read_tokens: z.ZodOptional<z.ZodNumber>;
|
|
158
|
+
total_cache_write_tokens: z.ZodOptional<z.ZodNumber>;
|
|
159
|
+
total_reasoning_tokens: z.ZodOptional<z.ZodNumber>;
|
|
160
|
+
total_cost_in_usd: z.ZodOptional<z.ZodNumber>;
|
|
161
|
+
}, z.core.$strip>>;
|
|
162
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
163
|
+
status: z.ZodLiteral<"cancelled">;
|
|
164
|
+
reason: z.ZodEnum<typeof import("./turn").CancellationReason>;
|
|
165
|
+
completed_at: z.ZodString;
|
|
166
|
+
metrics: z.ZodOptional<z.ZodObject<{
|
|
167
|
+
total_input_tokens: z.ZodOptional<z.ZodNumber>;
|
|
168
|
+
total_output_tokens: z.ZodOptional<z.ZodNumber>;
|
|
169
|
+
total_tokens: z.ZodOptional<z.ZodNumber>;
|
|
170
|
+
total_cache_read_tokens: z.ZodOptional<z.ZodNumber>;
|
|
171
|
+
total_cache_write_tokens: z.ZodOptional<z.ZodNumber>;
|
|
172
|
+
total_reasoning_tokens: z.ZodOptional<z.ZodNumber>;
|
|
173
|
+
total_cost_in_usd: z.ZodOptional<z.ZodNumber>;
|
|
174
|
+
}, z.core.$strip>>;
|
|
175
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
176
|
+
status: z.ZodLiteral<"error">;
|
|
177
|
+
message: z.ZodString;
|
|
178
|
+
completed_at: z.ZodString;
|
|
179
|
+
metrics: z.ZodOptional<z.ZodObject<{
|
|
180
|
+
total_input_tokens: z.ZodOptional<z.ZodNumber>;
|
|
181
|
+
total_output_tokens: z.ZodOptional<z.ZodNumber>;
|
|
182
|
+
total_tokens: z.ZodOptional<z.ZodNumber>;
|
|
183
|
+
total_cache_read_tokens: z.ZodOptional<z.ZodNumber>;
|
|
184
|
+
total_cache_write_tokens: z.ZodOptional<z.ZodNumber>;
|
|
185
|
+
total_reasoning_tokens: z.ZodOptional<z.ZodNumber>;
|
|
186
|
+
total_cost_in_usd: z.ZodOptional<z.ZodNumber>;
|
|
187
|
+
}, z.core.$strip>>;
|
|
188
|
+
}, z.core.$strip>], "status">;
|
|
189
|
+
created_at: z.ZodString;
|
|
190
|
+
thread_id: z.ZodNullable<z.ZodString>;
|
|
191
|
+
}, z.core.$strip>;
|
|
192
|
+
/** Built-in durable turn events — lifecycle + content; no deltas, no passthrough. */
|
|
193
|
+
export declare const SessionEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
194
|
+
type: z.ZodLiteral<"turn.created">;
|
|
195
|
+
id: z.ZodString;
|
|
196
|
+
turn_id: z.ZodString;
|
|
197
|
+
previous_turn_id: z.ZodNullable<z.ZodString>;
|
|
198
|
+
input: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
199
|
+
type: z.ZodLiteral<"user.message">;
|
|
200
|
+
content: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
201
|
+
type: z.ZodLiteral<"text">;
|
|
202
|
+
text: z.ZodString;
|
|
203
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
204
|
+
type: z.ZodLiteral<"file">;
|
|
205
|
+
name: z.ZodString;
|
|
206
|
+
data: z.ZodString;
|
|
207
|
+
}, z.core.$strip>], "type">>]>;
|
|
208
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
209
|
+
type: z.ZodLiteral<"user.tool_approval">;
|
|
210
|
+
thread_id: z.ZodString;
|
|
211
|
+
tool_call_id: z.ZodString;
|
|
212
|
+
approval: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
213
|
+
status: z.ZodLiteral<"allow">;
|
|
214
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
215
|
+
status: z.ZodLiteral<"deny">;
|
|
216
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
217
|
+
}, z.core.$strip>], "status">;
|
|
218
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
219
|
+
type: z.ZodLiteral<"user.tool_response">;
|
|
220
|
+
thread_id: z.ZodString;
|
|
221
|
+
tool_call_id: z.ZodString;
|
|
222
|
+
content: z.ZodString;
|
|
223
|
+
}, z.core.$strip>], "type">>>;
|
|
224
|
+
state: z.ZodObject<{
|
|
225
|
+
status: z.ZodLiteral<"running">;
|
|
226
|
+
}, z.core.$strip>;
|
|
227
|
+
created_at: z.ZodString;
|
|
228
|
+
thread_id: z.ZodNullable<z.ZodString>;
|
|
229
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
230
|
+
type: z.ZodLiteral<"turn.done">;
|
|
231
|
+
id: z.ZodString;
|
|
232
|
+
state: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
233
|
+
status: z.ZodLiteral<"done">;
|
|
234
|
+
output: z.ZodUnion<readonly [z.ZodObject<{
|
|
235
|
+
content: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
236
|
+
type: z.ZodLiteral<"text">;
|
|
237
|
+
text: z.ZodString;
|
|
238
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
239
|
+
type: z.ZodLiteral<"refusal">;
|
|
240
|
+
refusal: z.ZodString;
|
|
241
|
+
}, z.core.$strip>]>>]>>>;
|
|
242
|
+
name: z.ZodOptional<z.ZodString>;
|
|
243
|
+
refusal: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
244
|
+
reasoning_content: z.ZodOptional<z.ZodString>;
|
|
245
|
+
tool_calls: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
246
|
+
id: z.ZodString;
|
|
247
|
+
type: z.ZodLiteral<"function">;
|
|
248
|
+
function: z.ZodObject<{
|
|
249
|
+
name: z.ZodString;
|
|
250
|
+
arguments: z.ZodString;
|
|
251
|
+
}, z.core.$strip>;
|
|
252
|
+
provider_specific_fields: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
253
|
+
tool_info: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
254
|
+
type: z.ZodLiteral<"truefoundry-system">;
|
|
255
|
+
name: z.ZodString;
|
|
256
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
257
|
+
type: z.ZodLiteral<"mcp">;
|
|
258
|
+
server_id: z.ZodString;
|
|
259
|
+
server_name: z.ZodString;
|
|
260
|
+
name: z.ZodString;
|
|
261
|
+
}, z.core.$strip>], "type">;
|
|
262
|
+
}, z.core.$strip>>>;
|
|
263
|
+
type: z.ZodLiteral<"model.message">;
|
|
264
|
+
id: z.ZodString;
|
|
265
|
+
thread_id: z.ZodString;
|
|
266
|
+
finish_reason: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
267
|
+
content_filter: "content_filter";
|
|
268
|
+
function_call: "function_call";
|
|
269
|
+
length: "length";
|
|
270
|
+
stop: "stop";
|
|
271
|
+
tool_calls: "tool_calls";
|
|
272
|
+
}>, z.ZodNull]>>;
|
|
273
|
+
created_at: z.ZodString;
|
|
274
|
+
usage: z.ZodOptional<z.ZodObject<{
|
|
275
|
+
input_tokens: z.ZodNumber;
|
|
276
|
+
output_tokens: z.ZodNumber;
|
|
277
|
+
cache_read_tokens: z.ZodOptional<z.ZodNumber>;
|
|
278
|
+
cache_write_tokens: z.ZodOptional<z.ZodNumber>;
|
|
279
|
+
input_tokens_breakdown: z.ZodObject<{
|
|
280
|
+
harness: z.ZodNumber;
|
|
281
|
+
skills: z.ZodNumber;
|
|
282
|
+
instructions: z.ZodNumber;
|
|
283
|
+
tool_definitions: z.ZodNumber;
|
|
284
|
+
messages: z.ZodNumber;
|
|
285
|
+
}, z.core.$strip>;
|
|
286
|
+
}, z.core.$strip>>;
|
|
287
|
+
}, z.core.$strip>, z.ZodNull]>;
|
|
288
|
+
required_actions: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
289
|
+
type: z.ZodLiteral<"tool.approval_required">;
|
|
290
|
+
id: z.ZodString;
|
|
291
|
+
created_at: z.ZodString;
|
|
292
|
+
thread_id: z.ZodString;
|
|
293
|
+
tool_calls: z.ZodArray<z.ZodObject<{
|
|
294
|
+
id: z.ZodString;
|
|
295
|
+
source_event_id: z.ZodString;
|
|
296
|
+
}, z.core.$strip>>;
|
|
297
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
298
|
+
type: z.ZodLiteral<"tool.response_required">;
|
|
299
|
+
id: z.ZodString;
|
|
300
|
+
created_at: z.ZodString;
|
|
301
|
+
thread_id: z.ZodString;
|
|
302
|
+
tool_calls: z.ZodArray<z.ZodObject<{
|
|
303
|
+
id: z.ZodString;
|
|
304
|
+
source_event_id: z.ZodString;
|
|
305
|
+
}, z.core.$strip>>;
|
|
306
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
307
|
+
id: z.ZodString;
|
|
308
|
+
created_at: z.ZodString;
|
|
309
|
+
thread_id: z.ZodNullable<z.ZodString>;
|
|
310
|
+
type: z.ZodLiteral<"mcp.auth_required">;
|
|
311
|
+
mcp_servers: z.ZodArray<z.ZodObject<{
|
|
312
|
+
id: z.ZodString;
|
|
313
|
+
name: z.ZodString;
|
|
314
|
+
auth_url: z.ZodString;
|
|
315
|
+
}, z.core.$strip>>;
|
|
316
|
+
}, z.core.$strip>], "type">>;
|
|
317
|
+
completed_at: z.ZodString;
|
|
318
|
+
metrics: z.ZodOptional<z.ZodObject<{
|
|
319
|
+
total_input_tokens: z.ZodOptional<z.ZodNumber>;
|
|
320
|
+
total_output_tokens: z.ZodOptional<z.ZodNumber>;
|
|
321
|
+
total_tokens: z.ZodOptional<z.ZodNumber>;
|
|
322
|
+
total_cache_read_tokens: z.ZodOptional<z.ZodNumber>;
|
|
323
|
+
total_cache_write_tokens: z.ZodOptional<z.ZodNumber>;
|
|
324
|
+
total_reasoning_tokens: z.ZodOptional<z.ZodNumber>;
|
|
325
|
+
total_cost_in_usd: z.ZodOptional<z.ZodNumber>;
|
|
326
|
+
}, z.core.$strip>>;
|
|
327
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
328
|
+
status: z.ZodLiteral<"cancelled">;
|
|
329
|
+
reason: z.ZodEnum<typeof import("./turn").CancellationReason>;
|
|
330
|
+
completed_at: z.ZodString;
|
|
331
|
+
metrics: z.ZodOptional<z.ZodObject<{
|
|
332
|
+
total_input_tokens: z.ZodOptional<z.ZodNumber>;
|
|
333
|
+
total_output_tokens: z.ZodOptional<z.ZodNumber>;
|
|
334
|
+
total_tokens: z.ZodOptional<z.ZodNumber>;
|
|
335
|
+
total_cache_read_tokens: z.ZodOptional<z.ZodNumber>;
|
|
336
|
+
total_cache_write_tokens: z.ZodOptional<z.ZodNumber>;
|
|
337
|
+
total_reasoning_tokens: z.ZodOptional<z.ZodNumber>;
|
|
338
|
+
total_cost_in_usd: z.ZodOptional<z.ZodNumber>;
|
|
339
|
+
}, z.core.$strip>>;
|
|
340
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
341
|
+
status: z.ZodLiteral<"error">;
|
|
342
|
+
message: z.ZodString;
|
|
343
|
+
completed_at: z.ZodString;
|
|
344
|
+
metrics: z.ZodOptional<z.ZodObject<{
|
|
345
|
+
total_input_tokens: z.ZodOptional<z.ZodNumber>;
|
|
346
|
+
total_output_tokens: z.ZodOptional<z.ZodNumber>;
|
|
347
|
+
total_tokens: z.ZodOptional<z.ZodNumber>;
|
|
348
|
+
total_cache_read_tokens: z.ZodOptional<z.ZodNumber>;
|
|
349
|
+
total_cache_write_tokens: z.ZodOptional<z.ZodNumber>;
|
|
350
|
+
total_reasoning_tokens: z.ZodOptional<z.ZodNumber>;
|
|
351
|
+
total_cost_in_usd: z.ZodOptional<z.ZodNumber>;
|
|
352
|
+
}, z.core.$strip>>;
|
|
353
|
+
}, z.core.$strip>], "status">;
|
|
354
|
+
created_at: z.ZodString;
|
|
355
|
+
thread_id: z.ZodNullable<z.ZodString>;
|
|
356
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
357
|
+
content: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
358
|
+
type: z.ZodLiteral<"text">;
|
|
359
|
+
text: z.ZodString;
|
|
360
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
361
|
+
type: z.ZodLiteral<"refusal">;
|
|
362
|
+
refusal: z.ZodString;
|
|
363
|
+
}, z.core.$strip>]>>]>>>;
|
|
364
|
+
name: z.ZodOptional<z.ZodString>;
|
|
365
|
+
refusal: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
366
|
+
reasoning_content: z.ZodOptional<z.ZodString>;
|
|
367
|
+
tool_calls: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
368
|
+
id: z.ZodString;
|
|
369
|
+
type: z.ZodLiteral<"function">;
|
|
370
|
+
function: z.ZodObject<{
|
|
371
|
+
name: z.ZodString;
|
|
372
|
+
arguments: z.ZodString;
|
|
373
|
+
}, z.core.$strip>;
|
|
374
|
+
provider_specific_fields: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
375
|
+
tool_info: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
376
|
+
type: z.ZodLiteral<"truefoundry-system">;
|
|
377
|
+
name: z.ZodString;
|
|
378
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
379
|
+
type: z.ZodLiteral<"mcp">;
|
|
380
|
+
server_id: z.ZodString;
|
|
381
|
+
server_name: z.ZodString;
|
|
382
|
+
name: z.ZodString;
|
|
383
|
+
}, z.core.$strip>], "type">;
|
|
384
|
+
}, z.core.$strip>>>;
|
|
385
|
+
type: z.ZodLiteral<"model.message">;
|
|
386
|
+
id: z.ZodString;
|
|
387
|
+
thread_id: z.ZodString;
|
|
388
|
+
finish_reason: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
389
|
+
content_filter: "content_filter";
|
|
390
|
+
function_call: "function_call";
|
|
391
|
+
length: "length";
|
|
392
|
+
stop: "stop";
|
|
393
|
+
tool_calls: "tool_calls";
|
|
394
|
+
}>, z.ZodNull]>>;
|
|
395
|
+
created_at: z.ZodString;
|
|
396
|
+
usage: z.ZodOptional<z.ZodObject<{
|
|
397
|
+
input_tokens: z.ZodNumber;
|
|
398
|
+
output_tokens: z.ZodNumber;
|
|
399
|
+
cache_read_tokens: z.ZodOptional<z.ZodNumber>;
|
|
400
|
+
cache_write_tokens: z.ZodOptional<z.ZodNumber>;
|
|
401
|
+
input_tokens_breakdown: z.ZodObject<{
|
|
402
|
+
harness: z.ZodNumber;
|
|
403
|
+
skills: z.ZodNumber;
|
|
404
|
+
instructions: z.ZodNumber;
|
|
405
|
+
tool_definitions: z.ZodNumber;
|
|
406
|
+
messages: z.ZodNumber;
|
|
407
|
+
}, z.core.$strip>;
|
|
408
|
+
}, z.core.$strip>>;
|
|
409
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
410
|
+
tool_call_id: z.ZodString;
|
|
411
|
+
content: z.ZodString;
|
|
412
|
+
type: z.ZodLiteral<"tool.response">;
|
|
413
|
+
id: z.ZodString;
|
|
414
|
+
thread_id: z.ZodString;
|
|
415
|
+
created_at: z.ZodString;
|
|
416
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
417
|
+
type: z.ZodLiteral<"thread.created">;
|
|
418
|
+
id: z.ZodString;
|
|
419
|
+
agent_info: z.ZodObject<{
|
|
420
|
+
type: z.ZodLiteral<"dynamic">;
|
|
421
|
+
name: z.ZodString;
|
|
422
|
+
input: z.ZodString;
|
|
423
|
+
model: z.ZodOptional<z.ZodString>;
|
|
424
|
+
}, z.core.$strip>;
|
|
425
|
+
created_at: z.ZodString;
|
|
426
|
+
parent: z.ZodObject<{
|
|
427
|
+
thread_id: z.ZodString;
|
|
428
|
+
tool_call_id: z.ZodString;
|
|
429
|
+
}, z.core.$strip>;
|
|
430
|
+
thread_id: z.ZodString;
|
|
431
|
+
title: z.ZodString;
|
|
432
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
433
|
+
parent: z.ZodOptional<z.ZodObject<{
|
|
434
|
+
thread_id: z.ZodString;
|
|
435
|
+
tool_call_id: z.ZodString;
|
|
436
|
+
}, z.core.$strip>>;
|
|
437
|
+
thread_id: z.ZodString;
|
|
438
|
+
title: z.ZodString;
|
|
439
|
+
type: z.ZodLiteral<"thread.done">;
|
|
440
|
+
id: z.ZodString;
|
|
441
|
+
created_at: z.ZodString;
|
|
442
|
+
state: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
443
|
+
status: z.ZodLiteral<"done">;
|
|
444
|
+
output: z.ZodObject<{
|
|
445
|
+
content: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
446
|
+
type: z.ZodLiteral<"text">;
|
|
447
|
+
text: z.ZodString;
|
|
448
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
449
|
+
type: z.ZodLiteral<"refusal">;
|
|
450
|
+
refusal: z.ZodString;
|
|
451
|
+
}, z.core.$strip>]>>]>>>;
|
|
452
|
+
name: z.ZodOptional<z.ZodString>;
|
|
453
|
+
refusal: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
454
|
+
reasoning_content: z.ZodOptional<z.ZodString>;
|
|
455
|
+
tool_calls: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
456
|
+
id: z.ZodString;
|
|
457
|
+
type: z.ZodLiteral<"function">;
|
|
458
|
+
function: z.ZodObject<{
|
|
459
|
+
name: z.ZodString;
|
|
460
|
+
arguments: z.ZodString;
|
|
461
|
+
}, z.core.$strip>;
|
|
462
|
+
provider_specific_fields: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
463
|
+
tool_info: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
464
|
+
type: z.ZodLiteral<"truefoundry-system">;
|
|
465
|
+
name: z.ZodString;
|
|
466
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
467
|
+
type: z.ZodLiteral<"mcp">;
|
|
468
|
+
server_id: z.ZodString;
|
|
469
|
+
server_name: z.ZodString;
|
|
470
|
+
name: z.ZodString;
|
|
471
|
+
}, z.core.$strip>], "type">;
|
|
472
|
+
}, z.core.$strip>>>;
|
|
473
|
+
type: z.ZodLiteral<"model.message">;
|
|
474
|
+
id: z.ZodString;
|
|
475
|
+
thread_id: z.ZodString;
|
|
476
|
+
finish_reason: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
477
|
+
content_filter: "content_filter";
|
|
478
|
+
function_call: "function_call";
|
|
479
|
+
length: "length";
|
|
480
|
+
stop: "stop";
|
|
481
|
+
tool_calls: "tool_calls";
|
|
482
|
+
}>, z.ZodNull]>>;
|
|
483
|
+
created_at: z.ZodString;
|
|
484
|
+
usage: z.ZodOptional<z.ZodObject<{
|
|
485
|
+
input_tokens: z.ZodNumber;
|
|
486
|
+
output_tokens: z.ZodNumber;
|
|
487
|
+
cache_read_tokens: z.ZodOptional<z.ZodNumber>;
|
|
488
|
+
cache_write_tokens: z.ZodOptional<z.ZodNumber>;
|
|
489
|
+
input_tokens_breakdown: z.ZodObject<{
|
|
490
|
+
harness: z.ZodNumber;
|
|
491
|
+
skills: z.ZodNumber;
|
|
492
|
+
instructions: z.ZodNumber;
|
|
493
|
+
tool_definitions: z.ZodNumber;
|
|
494
|
+
messages: z.ZodNumber;
|
|
495
|
+
}, z.core.$strip>;
|
|
496
|
+
}, z.core.$strip>>;
|
|
497
|
+
}, z.core.$strip>;
|
|
498
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
499
|
+
status: z.ZodLiteral<"error">;
|
|
500
|
+
error: z.ZodString;
|
|
501
|
+
output: z.ZodOptional<z.ZodObject<{
|
|
502
|
+
content: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
503
|
+
type: z.ZodLiteral<"text">;
|
|
504
|
+
text: z.ZodString;
|
|
505
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
506
|
+
type: z.ZodLiteral<"refusal">;
|
|
507
|
+
refusal: z.ZodString;
|
|
508
|
+
}, z.core.$strip>]>>]>>>;
|
|
509
|
+
name: z.ZodOptional<z.ZodString>;
|
|
510
|
+
refusal: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
511
|
+
reasoning_content: z.ZodOptional<z.ZodString>;
|
|
512
|
+
tool_calls: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
513
|
+
id: z.ZodString;
|
|
514
|
+
type: z.ZodLiteral<"function">;
|
|
515
|
+
function: z.ZodObject<{
|
|
516
|
+
name: z.ZodString;
|
|
517
|
+
arguments: z.ZodString;
|
|
518
|
+
}, z.core.$strip>;
|
|
519
|
+
provider_specific_fields: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
520
|
+
tool_info: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
521
|
+
type: z.ZodLiteral<"truefoundry-system">;
|
|
522
|
+
name: z.ZodString;
|
|
523
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
524
|
+
type: z.ZodLiteral<"mcp">;
|
|
525
|
+
server_id: z.ZodString;
|
|
526
|
+
server_name: z.ZodString;
|
|
527
|
+
name: z.ZodString;
|
|
528
|
+
}, z.core.$strip>], "type">;
|
|
529
|
+
}, z.core.$strip>>>;
|
|
530
|
+
type: z.ZodLiteral<"model.message">;
|
|
531
|
+
id: z.ZodString;
|
|
532
|
+
thread_id: z.ZodString;
|
|
533
|
+
finish_reason: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
534
|
+
content_filter: "content_filter";
|
|
535
|
+
function_call: "function_call";
|
|
536
|
+
length: "length";
|
|
537
|
+
stop: "stop";
|
|
538
|
+
tool_calls: "tool_calls";
|
|
539
|
+
}>, z.ZodNull]>>;
|
|
540
|
+
created_at: z.ZodString;
|
|
541
|
+
usage: z.ZodOptional<z.ZodObject<{
|
|
542
|
+
input_tokens: z.ZodNumber;
|
|
543
|
+
output_tokens: z.ZodNumber;
|
|
544
|
+
cache_read_tokens: z.ZodOptional<z.ZodNumber>;
|
|
545
|
+
cache_write_tokens: z.ZodOptional<z.ZodNumber>;
|
|
546
|
+
input_tokens_breakdown: z.ZodObject<{
|
|
547
|
+
harness: z.ZodNumber;
|
|
548
|
+
skills: z.ZodNumber;
|
|
549
|
+
instructions: z.ZodNumber;
|
|
550
|
+
tool_definitions: z.ZodNumber;
|
|
551
|
+
messages: z.ZodNumber;
|
|
552
|
+
}, z.core.$strip>;
|
|
553
|
+
}, z.core.$strip>>;
|
|
554
|
+
}, z.core.$strip>>;
|
|
555
|
+
}, z.core.$strip>], "status">;
|
|
556
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
557
|
+
id: z.ZodString;
|
|
558
|
+
created_at: z.ZodString;
|
|
559
|
+
thread_id: z.ZodNullable<z.ZodString>;
|
|
560
|
+
type: z.ZodLiteral<"mcp.auth_required">;
|
|
561
|
+
mcp_servers: z.ZodArray<z.ZodObject<{
|
|
562
|
+
id: z.ZodString;
|
|
563
|
+
name: z.ZodString;
|
|
564
|
+
auth_url: z.ZodString;
|
|
565
|
+
}, z.core.$strip>>;
|
|
566
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
567
|
+
type: z.ZodLiteral<"mcp.initialize">;
|
|
568
|
+
id: z.ZodString;
|
|
569
|
+
created_at: z.ZodString;
|
|
570
|
+
thread_id: z.ZodString;
|
|
571
|
+
mcp_servers: z.ZodArray<z.ZodObject<{
|
|
572
|
+
id: z.ZodString;
|
|
573
|
+
name: z.ZodString;
|
|
574
|
+
session_id: z.ZodOptional<z.ZodString>;
|
|
575
|
+
transport_type: z.ZodOptional<z.ZodEnum<{
|
|
576
|
+
sse: "sse";
|
|
577
|
+
"streamable-http": "streamable-http";
|
|
578
|
+
}>>;
|
|
579
|
+
}, z.core.$strip>>;
|
|
580
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
581
|
+
type: z.ZodLiteral<"sandbox.created">;
|
|
582
|
+
id: z.ZodString;
|
|
583
|
+
created_at: z.ZodString;
|
|
584
|
+
sandbox_id: z.ZodString;
|
|
585
|
+
thread_id: z.ZodNullable<z.ZodString>;
|
|
586
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
587
|
+
type: z.ZodLiteral<"tool.approval_required">;
|
|
588
|
+
id: z.ZodString;
|
|
589
|
+
created_at: z.ZodString;
|
|
590
|
+
thread_id: z.ZodString;
|
|
591
|
+
tool_calls: z.ZodArray<z.ZodObject<{
|
|
592
|
+
id: z.ZodString;
|
|
593
|
+
source_event_id: z.ZodString;
|
|
594
|
+
}, z.core.$strip>>;
|
|
595
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
596
|
+
type: z.ZodLiteral<"tool.response_required">;
|
|
597
|
+
id: z.ZodString;
|
|
598
|
+
created_at: z.ZodString;
|
|
599
|
+
thread_id: z.ZodString;
|
|
600
|
+
tool_calls: z.ZodArray<z.ZodObject<{
|
|
601
|
+
id: z.ZodString;
|
|
602
|
+
source_event_id: z.ZodString;
|
|
603
|
+
}, z.core.$strip>>;
|
|
604
|
+
}, z.core.$strip>], "type">;
|
|
605
|
+
/** One row on the session timeline: which turn emitted the event plus the event payload. */
|
|
606
|
+
export declare const SessionEventItemSchema: z.ZodObject<{
|
|
607
|
+
turn_id: z.ZodString;
|
|
608
|
+
event: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
609
|
+
type: z.ZodLiteral<"turn.created">;
|
|
610
|
+
id: z.ZodString;
|
|
611
|
+
turn_id: z.ZodString;
|
|
612
|
+
previous_turn_id: z.ZodNullable<z.ZodString>;
|
|
613
|
+
input: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
614
|
+
type: z.ZodLiteral<"user.message">;
|
|
615
|
+
content: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
616
|
+
type: z.ZodLiteral<"text">;
|
|
617
|
+
text: z.ZodString;
|
|
618
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
619
|
+
type: z.ZodLiteral<"file">;
|
|
620
|
+
name: z.ZodString;
|
|
621
|
+
data: z.ZodString;
|
|
622
|
+
}, z.core.$strip>], "type">>]>;
|
|
623
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
624
|
+
type: z.ZodLiteral<"user.tool_approval">;
|
|
625
|
+
thread_id: z.ZodString;
|
|
626
|
+
tool_call_id: z.ZodString;
|
|
627
|
+
approval: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
628
|
+
status: z.ZodLiteral<"allow">;
|
|
629
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
630
|
+
status: z.ZodLiteral<"deny">;
|
|
631
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
632
|
+
}, z.core.$strip>], "status">;
|
|
633
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
634
|
+
type: z.ZodLiteral<"user.tool_response">;
|
|
635
|
+
thread_id: z.ZodString;
|
|
636
|
+
tool_call_id: z.ZodString;
|
|
637
|
+
content: z.ZodString;
|
|
638
|
+
}, z.core.$strip>], "type">>>;
|
|
639
|
+
state: z.ZodObject<{
|
|
640
|
+
status: z.ZodLiteral<"running">;
|
|
641
|
+
}, z.core.$strip>;
|
|
642
|
+
created_at: z.ZodString;
|
|
643
|
+
thread_id: z.ZodNullable<z.ZodString>;
|
|
644
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
645
|
+
type: z.ZodLiteral<"turn.done">;
|
|
646
|
+
id: z.ZodString;
|
|
647
|
+
state: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
648
|
+
status: z.ZodLiteral<"done">;
|
|
649
|
+
output: z.ZodUnion<readonly [z.ZodObject<{
|
|
650
|
+
content: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
651
|
+
type: z.ZodLiteral<"text">;
|
|
652
|
+
text: z.ZodString;
|
|
653
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
654
|
+
type: z.ZodLiteral<"refusal">;
|
|
655
|
+
refusal: z.ZodString;
|
|
656
|
+
}, z.core.$strip>]>>]>>>;
|
|
657
|
+
name: z.ZodOptional<z.ZodString>;
|
|
658
|
+
refusal: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
659
|
+
reasoning_content: z.ZodOptional<z.ZodString>;
|
|
660
|
+
tool_calls: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
661
|
+
id: z.ZodString;
|
|
662
|
+
type: z.ZodLiteral<"function">;
|
|
663
|
+
function: z.ZodObject<{
|
|
664
|
+
name: z.ZodString;
|
|
665
|
+
arguments: z.ZodString;
|
|
666
|
+
}, z.core.$strip>;
|
|
667
|
+
provider_specific_fields: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
668
|
+
tool_info: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
669
|
+
type: z.ZodLiteral<"truefoundry-system">;
|
|
670
|
+
name: z.ZodString;
|
|
671
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
672
|
+
type: z.ZodLiteral<"mcp">;
|
|
673
|
+
server_id: z.ZodString;
|
|
674
|
+
server_name: z.ZodString;
|
|
675
|
+
name: z.ZodString;
|
|
676
|
+
}, z.core.$strip>], "type">;
|
|
677
|
+
}, z.core.$strip>>>;
|
|
678
|
+
type: z.ZodLiteral<"model.message">;
|
|
679
|
+
id: z.ZodString;
|
|
680
|
+
thread_id: z.ZodString;
|
|
681
|
+
finish_reason: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
682
|
+
content_filter: "content_filter";
|
|
683
|
+
function_call: "function_call";
|
|
684
|
+
length: "length";
|
|
685
|
+
stop: "stop";
|
|
686
|
+
tool_calls: "tool_calls";
|
|
687
|
+
}>, z.ZodNull]>>;
|
|
688
|
+
created_at: z.ZodString;
|
|
689
|
+
usage: z.ZodOptional<z.ZodObject<{
|
|
690
|
+
input_tokens: z.ZodNumber;
|
|
691
|
+
output_tokens: z.ZodNumber;
|
|
692
|
+
cache_read_tokens: z.ZodOptional<z.ZodNumber>;
|
|
693
|
+
cache_write_tokens: z.ZodOptional<z.ZodNumber>;
|
|
694
|
+
input_tokens_breakdown: z.ZodObject<{
|
|
695
|
+
harness: z.ZodNumber;
|
|
696
|
+
skills: z.ZodNumber;
|
|
697
|
+
instructions: z.ZodNumber;
|
|
698
|
+
tool_definitions: z.ZodNumber;
|
|
699
|
+
messages: z.ZodNumber;
|
|
700
|
+
}, z.core.$strip>;
|
|
701
|
+
}, z.core.$strip>>;
|
|
702
|
+
}, z.core.$strip>, z.ZodNull]>;
|
|
703
|
+
required_actions: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
704
|
+
type: z.ZodLiteral<"tool.approval_required">;
|
|
705
|
+
id: z.ZodString;
|
|
706
|
+
created_at: z.ZodString;
|
|
707
|
+
thread_id: z.ZodString;
|
|
708
|
+
tool_calls: z.ZodArray<z.ZodObject<{
|
|
709
|
+
id: z.ZodString;
|
|
710
|
+
source_event_id: z.ZodString;
|
|
711
|
+
}, z.core.$strip>>;
|
|
712
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
713
|
+
type: z.ZodLiteral<"tool.response_required">;
|
|
714
|
+
id: z.ZodString;
|
|
715
|
+
created_at: z.ZodString;
|
|
716
|
+
thread_id: z.ZodString;
|
|
717
|
+
tool_calls: z.ZodArray<z.ZodObject<{
|
|
718
|
+
id: z.ZodString;
|
|
719
|
+
source_event_id: z.ZodString;
|
|
720
|
+
}, z.core.$strip>>;
|
|
721
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
722
|
+
id: z.ZodString;
|
|
723
|
+
created_at: z.ZodString;
|
|
724
|
+
thread_id: z.ZodNullable<z.ZodString>;
|
|
725
|
+
type: z.ZodLiteral<"mcp.auth_required">;
|
|
726
|
+
mcp_servers: z.ZodArray<z.ZodObject<{
|
|
727
|
+
id: z.ZodString;
|
|
728
|
+
name: z.ZodString;
|
|
729
|
+
auth_url: z.ZodString;
|
|
730
|
+
}, z.core.$strip>>;
|
|
731
|
+
}, z.core.$strip>], "type">>;
|
|
732
|
+
completed_at: z.ZodString;
|
|
733
|
+
metrics: z.ZodOptional<z.ZodObject<{
|
|
734
|
+
total_input_tokens: z.ZodOptional<z.ZodNumber>;
|
|
735
|
+
total_output_tokens: z.ZodOptional<z.ZodNumber>;
|
|
736
|
+
total_tokens: z.ZodOptional<z.ZodNumber>;
|
|
737
|
+
total_cache_read_tokens: z.ZodOptional<z.ZodNumber>;
|
|
738
|
+
total_cache_write_tokens: z.ZodOptional<z.ZodNumber>;
|
|
739
|
+
total_reasoning_tokens: z.ZodOptional<z.ZodNumber>;
|
|
740
|
+
total_cost_in_usd: z.ZodOptional<z.ZodNumber>;
|
|
741
|
+
}, z.core.$strip>>;
|
|
742
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
743
|
+
status: z.ZodLiteral<"cancelled">;
|
|
744
|
+
reason: z.ZodEnum<typeof import("./turn").CancellationReason>;
|
|
745
|
+
completed_at: z.ZodString;
|
|
746
|
+
metrics: z.ZodOptional<z.ZodObject<{
|
|
747
|
+
total_input_tokens: z.ZodOptional<z.ZodNumber>;
|
|
748
|
+
total_output_tokens: z.ZodOptional<z.ZodNumber>;
|
|
749
|
+
total_tokens: z.ZodOptional<z.ZodNumber>;
|
|
750
|
+
total_cache_read_tokens: z.ZodOptional<z.ZodNumber>;
|
|
751
|
+
total_cache_write_tokens: z.ZodOptional<z.ZodNumber>;
|
|
752
|
+
total_reasoning_tokens: z.ZodOptional<z.ZodNumber>;
|
|
753
|
+
total_cost_in_usd: z.ZodOptional<z.ZodNumber>;
|
|
754
|
+
}, z.core.$strip>>;
|
|
755
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
756
|
+
status: z.ZodLiteral<"error">;
|
|
757
|
+
message: z.ZodString;
|
|
758
|
+
completed_at: z.ZodString;
|
|
759
|
+
metrics: z.ZodOptional<z.ZodObject<{
|
|
760
|
+
total_input_tokens: z.ZodOptional<z.ZodNumber>;
|
|
761
|
+
total_output_tokens: z.ZodOptional<z.ZodNumber>;
|
|
762
|
+
total_tokens: z.ZodOptional<z.ZodNumber>;
|
|
763
|
+
total_cache_read_tokens: z.ZodOptional<z.ZodNumber>;
|
|
764
|
+
total_cache_write_tokens: z.ZodOptional<z.ZodNumber>;
|
|
765
|
+
total_reasoning_tokens: z.ZodOptional<z.ZodNumber>;
|
|
766
|
+
total_cost_in_usd: z.ZodOptional<z.ZodNumber>;
|
|
767
|
+
}, z.core.$strip>>;
|
|
768
|
+
}, z.core.$strip>], "status">;
|
|
769
|
+
created_at: z.ZodString;
|
|
770
|
+
thread_id: z.ZodNullable<z.ZodString>;
|
|
771
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
772
|
+
content: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
773
|
+
type: z.ZodLiteral<"text">;
|
|
774
|
+
text: z.ZodString;
|
|
775
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
776
|
+
type: z.ZodLiteral<"refusal">;
|
|
777
|
+
refusal: z.ZodString;
|
|
778
|
+
}, z.core.$strip>]>>]>>>;
|
|
779
|
+
name: z.ZodOptional<z.ZodString>;
|
|
780
|
+
refusal: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
781
|
+
reasoning_content: z.ZodOptional<z.ZodString>;
|
|
782
|
+
tool_calls: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
783
|
+
id: z.ZodString;
|
|
784
|
+
type: z.ZodLiteral<"function">;
|
|
785
|
+
function: z.ZodObject<{
|
|
786
|
+
name: z.ZodString;
|
|
787
|
+
arguments: z.ZodString;
|
|
788
|
+
}, z.core.$strip>;
|
|
789
|
+
provider_specific_fields: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
790
|
+
tool_info: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
791
|
+
type: z.ZodLiteral<"truefoundry-system">;
|
|
792
|
+
name: z.ZodString;
|
|
793
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
794
|
+
type: z.ZodLiteral<"mcp">;
|
|
795
|
+
server_id: z.ZodString;
|
|
796
|
+
server_name: z.ZodString;
|
|
797
|
+
name: z.ZodString;
|
|
798
|
+
}, z.core.$strip>], "type">;
|
|
799
|
+
}, z.core.$strip>>>;
|
|
800
|
+
type: z.ZodLiteral<"model.message">;
|
|
801
|
+
id: z.ZodString;
|
|
802
|
+
thread_id: z.ZodString;
|
|
803
|
+
finish_reason: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
804
|
+
content_filter: "content_filter";
|
|
805
|
+
function_call: "function_call";
|
|
806
|
+
length: "length";
|
|
807
|
+
stop: "stop";
|
|
808
|
+
tool_calls: "tool_calls";
|
|
809
|
+
}>, z.ZodNull]>>;
|
|
810
|
+
created_at: z.ZodString;
|
|
811
|
+
usage: z.ZodOptional<z.ZodObject<{
|
|
812
|
+
input_tokens: z.ZodNumber;
|
|
813
|
+
output_tokens: z.ZodNumber;
|
|
814
|
+
cache_read_tokens: z.ZodOptional<z.ZodNumber>;
|
|
815
|
+
cache_write_tokens: z.ZodOptional<z.ZodNumber>;
|
|
816
|
+
input_tokens_breakdown: z.ZodObject<{
|
|
817
|
+
harness: z.ZodNumber;
|
|
818
|
+
skills: z.ZodNumber;
|
|
819
|
+
instructions: z.ZodNumber;
|
|
820
|
+
tool_definitions: z.ZodNumber;
|
|
821
|
+
messages: z.ZodNumber;
|
|
822
|
+
}, z.core.$strip>;
|
|
823
|
+
}, z.core.$strip>>;
|
|
824
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
825
|
+
tool_call_id: z.ZodString;
|
|
826
|
+
content: z.ZodString;
|
|
827
|
+
type: z.ZodLiteral<"tool.response">;
|
|
828
|
+
id: z.ZodString;
|
|
829
|
+
thread_id: z.ZodString;
|
|
830
|
+
created_at: z.ZodString;
|
|
831
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
832
|
+
type: z.ZodLiteral<"thread.created">;
|
|
833
|
+
id: z.ZodString;
|
|
834
|
+
agent_info: z.ZodObject<{
|
|
835
|
+
type: z.ZodLiteral<"dynamic">;
|
|
836
|
+
name: z.ZodString;
|
|
837
|
+
input: z.ZodString;
|
|
838
|
+
model: z.ZodOptional<z.ZodString>;
|
|
839
|
+
}, z.core.$strip>;
|
|
840
|
+
created_at: z.ZodString;
|
|
841
|
+
parent: z.ZodObject<{
|
|
842
|
+
thread_id: z.ZodString;
|
|
843
|
+
tool_call_id: z.ZodString;
|
|
844
|
+
}, z.core.$strip>;
|
|
845
|
+
thread_id: z.ZodString;
|
|
846
|
+
title: z.ZodString;
|
|
847
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
848
|
+
parent: z.ZodOptional<z.ZodObject<{
|
|
849
|
+
thread_id: z.ZodString;
|
|
850
|
+
tool_call_id: z.ZodString;
|
|
851
|
+
}, z.core.$strip>>;
|
|
852
|
+
thread_id: z.ZodString;
|
|
853
|
+
title: z.ZodString;
|
|
854
|
+
type: z.ZodLiteral<"thread.done">;
|
|
855
|
+
id: z.ZodString;
|
|
856
|
+
created_at: z.ZodString;
|
|
857
|
+
state: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
858
|
+
status: z.ZodLiteral<"done">;
|
|
859
|
+
output: z.ZodObject<{
|
|
860
|
+
content: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
861
|
+
type: z.ZodLiteral<"text">;
|
|
862
|
+
text: z.ZodString;
|
|
863
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
864
|
+
type: z.ZodLiteral<"refusal">;
|
|
865
|
+
refusal: z.ZodString;
|
|
866
|
+
}, z.core.$strip>]>>]>>>;
|
|
867
|
+
name: z.ZodOptional<z.ZodString>;
|
|
868
|
+
refusal: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
869
|
+
reasoning_content: z.ZodOptional<z.ZodString>;
|
|
870
|
+
tool_calls: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
871
|
+
id: z.ZodString;
|
|
872
|
+
type: z.ZodLiteral<"function">;
|
|
873
|
+
function: z.ZodObject<{
|
|
874
|
+
name: z.ZodString;
|
|
875
|
+
arguments: z.ZodString;
|
|
876
|
+
}, z.core.$strip>;
|
|
877
|
+
provider_specific_fields: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
878
|
+
tool_info: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
879
|
+
type: z.ZodLiteral<"truefoundry-system">;
|
|
880
|
+
name: z.ZodString;
|
|
881
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
882
|
+
type: z.ZodLiteral<"mcp">;
|
|
883
|
+
server_id: z.ZodString;
|
|
884
|
+
server_name: z.ZodString;
|
|
885
|
+
name: z.ZodString;
|
|
886
|
+
}, z.core.$strip>], "type">;
|
|
887
|
+
}, z.core.$strip>>>;
|
|
888
|
+
type: z.ZodLiteral<"model.message">;
|
|
889
|
+
id: z.ZodString;
|
|
890
|
+
thread_id: z.ZodString;
|
|
891
|
+
finish_reason: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
892
|
+
content_filter: "content_filter";
|
|
893
|
+
function_call: "function_call";
|
|
894
|
+
length: "length";
|
|
895
|
+
stop: "stop";
|
|
896
|
+
tool_calls: "tool_calls";
|
|
897
|
+
}>, z.ZodNull]>>;
|
|
898
|
+
created_at: z.ZodString;
|
|
899
|
+
usage: z.ZodOptional<z.ZodObject<{
|
|
900
|
+
input_tokens: z.ZodNumber;
|
|
901
|
+
output_tokens: z.ZodNumber;
|
|
902
|
+
cache_read_tokens: z.ZodOptional<z.ZodNumber>;
|
|
903
|
+
cache_write_tokens: z.ZodOptional<z.ZodNumber>;
|
|
904
|
+
input_tokens_breakdown: z.ZodObject<{
|
|
905
|
+
harness: z.ZodNumber;
|
|
906
|
+
skills: z.ZodNumber;
|
|
907
|
+
instructions: z.ZodNumber;
|
|
908
|
+
tool_definitions: z.ZodNumber;
|
|
909
|
+
messages: z.ZodNumber;
|
|
910
|
+
}, z.core.$strip>;
|
|
911
|
+
}, z.core.$strip>>;
|
|
912
|
+
}, z.core.$strip>;
|
|
913
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
914
|
+
status: z.ZodLiteral<"error">;
|
|
915
|
+
error: z.ZodString;
|
|
916
|
+
output: z.ZodOptional<z.ZodObject<{
|
|
917
|
+
content: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
918
|
+
type: z.ZodLiteral<"text">;
|
|
919
|
+
text: z.ZodString;
|
|
920
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
921
|
+
type: z.ZodLiteral<"refusal">;
|
|
922
|
+
refusal: z.ZodString;
|
|
923
|
+
}, z.core.$strip>]>>]>>>;
|
|
924
|
+
name: z.ZodOptional<z.ZodString>;
|
|
925
|
+
refusal: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
926
|
+
reasoning_content: z.ZodOptional<z.ZodString>;
|
|
927
|
+
tool_calls: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
928
|
+
id: z.ZodString;
|
|
929
|
+
type: z.ZodLiteral<"function">;
|
|
930
|
+
function: z.ZodObject<{
|
|
931
|
+
name: z.ZodString;
|
|
932
|
+
arguments: z.ZodString;
|
|
933
|
+
}, z.core.$strip>;
|
|
934
|
+
provider_specific_fields: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
935
|
+
tool_info: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
936
|
+
type: z.ZodLiteral<"truefoundry-system">;
|
|
937
|
+
name: z.ZodString;
|
|
938
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
939
|
+
type: z.ZodLiteral<"mcp">;
|
|
940
|
+
server_id: z.ZodString;
|
|
941
|
+
server_name: z.ZodString;
|
|
942
|
+
name: z.ZodString;
|
|
943
|
+
}, z.core.$strip>], "type">;
|
|
944
|
+
}, z.core.$strip>>>;
|
|
945
|
+
type: z.ZodLiteral<"model.message">;
|
|
946
|
+
id: z.ZodString;
|
|
947
|
+
thread_id: z.ZodString;
|
|
948
|
+
finish_reason: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
949
|
+
content_filter: "content_filter";
|
|
950
|
+
function_call: "function_call";
|
|
951
|
+
length: "length";
|
|
952
|
+
stop: "stop";
|
|
953
|
+
tool_calls: "tool_calls";
|
|
954
|
+
}>, z.ZodNull]>>;
|
|
955
|
+
created_at: z.ZodString;
|
|
956
|
+
usage: z.ZodOptional<z.ZodObject<{
|
|
957
|
+
input_tokens: z.ZodNumber;
|
|
958
|
+
output_tokens: z.ZodNumber;
|
|
959
|
+
cache_read_tokens: z.ZodOptional<z.ZodNumber>;
|
|
960
|
+
cache_write_tokens: z.ZodOptional<z.ZodNumber>;
|
|
961
|
+
input_tokens_breakdown: z.ZodObject<{
|
|
962
|
+
harness: z.ZodNumber;
|
|
963
|
+
skills: z.ZodNumber;
|
|
964
|
+
instructions: z.ZodNumber;
|
|
965
|
+
tool_definitions: z.ZodNumber;
|
|
966
|
+
messages: z.ZodNumber;
|
|
967
|
+
}, z.core.$strip>;
|
|
968
|
+
}, z.core.$strip>>;
|
|
969
|
+
}, z.core.$strip>>;
|
|
970
|
+
}, z.core.$strip>], "status">;
|
|
971
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
972
|
+
id: z.ZodString;
|
|
973
|
+
created_at: z.ZodString;
|
|
974
|
+
thread_id: z.ZodNullable<z.ZodString>;
|
|
975
|
+
type: z.ZodLiteral<"mcp.auth_required">;
|
|
976
|
+
mcp_servers: z.ZodArray<z.ZodObject<{
|
|
977
|
+
id: z.ZodString;
|
|
978
|
+
name: z.ZodString;
|
|
979
|
+
auth_url: z.ZodString;
|
|
980
|
+
}, z.core.$strip>>;
|
|
981
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
982
|
+
type: z.ZodLiteral<"mcp.initialize">;
|
|
983
|
+
id: z.ZodString;
|
|
984
|
+
created_at: z.ZodString;
|
|
985
|
+
thread_id: z.ZodString;
|
|
986
|
+
mcp_servers: z.ZodArray<z.ZodObject<{
|
|
987
|
+
id: z.ZodString;
|
|
988
|
+
name: z.ZodString;
|
|
989
|
+
session_id: z.ZodOptional<z.ZodString>;
|
|
990
|
+
transport_type: z.ZodOptional<z.ZodEnum<{
|
|
991
|
+
sse: "sse";
|
|
992
|
+
"streamable-http": "streamable-http";
|
|
993
|
+
}>>;
|
|
994
|
+
}, z.core.$strip>>;
|
|
995
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
996
|
+
type: z.ZodLiteral<"sandbox.created">;
|
|
997
|
+
id: z.ZodString;
|
|
998
|
+
created_at: z.ZodString;
|
|
999
|
+
sandbox_id: z.ZodString;
|
|
1000
|
+
thread_id: z.ZodNullable<z.ZodString>;
|
|
1001
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1002
|
+
type: z.ZodLiteral<"tool.approval_required">;
|
|
1003
|
+
id: z.ZodString;
|
|
1004
|
+
created_at: z.ZodString;
|
|
1005
|
+
thread_id: z.ZodString;
|
|
1006
|
+
tool_calls: z.ZodArray<z.ZodObject<{
|
|
1007
|
+
id: z.ZodString;
|
|
1008
|
+
source_event_id: z.ZodString;
|
|
1009
|
+
}, z.core.$strip>>;
|
|
1010
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1011
|
+
type: z.ZodLiteral<"tool.response_required">;
|
|
1012
|
+
id: z.ZodString;
|
|
1013
|
+
created_at: z.ZodString;
|
|
1014
|
+
thread_id: z.ZodString;
|
|
1015
|
+
tool_calls: z.ZodArray<z.ZodObject<{
|
|
1016
|
+
id: z.ZodString;
|
|
1017
|
+
source_event_id: z.ZodString;
|
|
1018
|
+
}, z.core.$strip>>;
|
|
1019
|
+
}, z.core.$strip>], "type">;
|
|
1020
|
+
}, z.core.$strip>;
|
|
1021
|
+
export type TurnCreatedEvent = z.infer<typeof TurnCreatedEventSchema>;
|
|
1022
|
+
export type TurnDoneEvent = z.infer<typeof TurnDoneEventSchema>;
|
|
1023
|
+
export type SessionEvent = z.infer<typeof SessionEventSchema>;
|
|
1024
|
+
/**
|
|
1025
|
+
* Durable turn event log entries: {@link SessionEvent} plus any registered
|
|
1026
|
+
* passthrough events. Every merged event must carry its monotonic ULID and
|
|
1027
|
+
* creation timestamp; shared by append and list operations.
|
|
1028
|
+
*/
|
|
1029
|
+
export type PersistedTurnEvent = WithRegisteredPassthrough<SessionEvent> & {
|
|
1030
|
+
id: string;
|
|
1031
|
+
created_at: string;
|
|
1032
|
+
};
|
|
1033
|
+
export interface SessionEventItem {
|
|
1034
|
+
turn_id: string;
|
|
1035
|
+
event: PersistedTurnEvent;
|
|
1036
|
+
}
|
|
1037
|
+
//# sourceMappingURL=events.d.ts.map
|