@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 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/core/index.ts"],"sourcesContent":["/**\n * Public agent execution harness.\n * Intentional consumer-facing exports only (production API).\n */\n\n// Runtime\nexport type { AgentDefinition, ModelParams } from './runtime/AgentDefinition';\nexport { AgentThread } from './runtime/AgentThread';\nexport type {\n AgentInfo,\n AgentParent,\n AgentSendInput,\n AgentThreadAppendContext,\n AgentThreadCreateSubAgent,\n AgentThreadEvent,\n AgentThreadExecutionEvent,\n AgentThreadExecutionResult,\n SubAgentCompletionMarker,\n} from './runtime/AgentThread.types';\nexport { AgentThreadOrchestrator } from './runtime/AgentThreadOrchestrator';\nexport type { CreateDynamicSubAgentThread } from './runtime/CreateDynamicSubAgentThread';\nexport { isAgentInputUserMessage, isEmptyMessageContent, isFileContentPart } from './runtime/UserInputMessage';\nexport type { AgentInputUserMessage } from './runtime/UserInputMessage';\n\n// Capability contracts\nexport type { AgentCapability, CapabilityState, JsonValue } from './capabilities/AgentCapability';\nexport type {\n AgentContextProcessorOutput,\n AgentThreadExecutionContext,\n PostToolCallAgentContextProcessor,\n PreLLMEphemeralAgentContextProcessor,\n} from './capabilities/AgentContextProcessor';\n\n// Built-in factories\nexport { askUserQuestion } from './capabilities/builtins/AskUserQuestion';\nexport {\n DEFAULT_CONTEXT_COMPACTION_THRESHOLD_TOKENS,\n contextCompaction,\n} from './capabilities/builtins/ContextCompaction';\nexport { currentDateTime } from './capabilities/builtins/CurrentDateTime';\nexport { SUB_AGENT_IDENTITY, dynamicSubAgents } from './capabilities/builtins/DynamicSubAgents';\nexport {\n DEFAULT_INDIVIDUAL_TOOL_TOKEN_THRESHOLD,\n DEFAULT_PREVIEW_NUMBER_OF_CHARACTERS,\n DEFAULT_TOTAL_TOOL_TOKEN_THRESHOLD,\n largeToolResponse,\n} from './capabilities/builtins/LargeToolResponse';\nexport { openUI } from './capabilities/builtins/OpenUI';\n\n// MCP contracts\nexport type { ApprovalDecision } from './events/schema';\nexport { ClientSideTool } from './mcp/ClientSideTool';\nexport { isAuthRequired, toolResultResponse } from './mcp/IMCPServer';\nexport type {\n AgentToolSchema,\n AuthRequiredResponse,\n CallToolResponse,\n IToolSet,\n ListToolsResponse,\n MCPAuthRequired,\n ToolSource,\n} from './mcp/IMCPServer';\nexport { LocalToolMCP, defineTool } from './mcp/LocalToolMCP';\nexport type { ToolDefinition } from './mcp/LocalToolMCP';\n\n// Remote MCP server, split into a shared, policy-free connection (`RemoteMCP`) and a per-agent policy\n// wrapper (`ToolSet`). `RemoteMCP` connects itself from a `url` + `headers`; the networking helpers\n// live in the harness-internal `remoteMcpClient` module.\nexport { RemoteMCP } from './mcp/RemoteMCP';\nexport type { RemoteMcpHeaders, ResolveHeadersResult } from './mcp/RemoteMCP';\nexport type { RemoteMcpConnection, RemoteMcpTransportType } from './mcp/remoteMcpClient';\nexport type { ToolSelectorConfig } from './mcp/ToolSelectorPolicy';\nexport {\n DEFAULT_DISABLE_TOOLS,\n DEFAULT_ENABLE_TOOLS,\n DEFAULT_PRELOAD_TOOLS,\n DEFAULT_REQUIRE_APPROVAL_FOR_TOOLS,\n REQUIRE_APPROVAL_TOOLS_SELECTOR_TAGS,\n TOOLS_SELECTOR_TAGS,\n} from './mcp/toolSelectors';\nexport { ToolSet } from './mcp/ToolSet';\n\n// LLM contracts\nexport type { AgentMetadata, ILLM, LLMCreateParams, LLMCreateParamsStreaming } from './llm/ILLM';\nexport { ResponseFormatSchema, toOpenAIResponseFormat } from './llm/responseFormat';\nexport type { ResponseFormat } from './llm/responseFormat';\nexport { SUPPORTED_REASONING_EFFORTS, VERCEL_AI_PROVIDER_NAMES, VercelAILLM } from './llm/VercelAILLM';\nexport type { VercelAILLMConfig, VercelAIProviderConfig, VercelAIProviderName } from './llm/VercelAILLM';\n\n// Event contracts\nexport {\n ActionRequiredEventSchema,\n AgentInputUserMessageSchema,\n EventIdSchema,\n EventType,\n MCPAuthRequiredEventSchema,\n MCPInitializeEventSchema,\n ModelMessageDeltaEventSchema,\n ModelMessageEventSchema,\n SandboxCreatedEventSchema,\n ThreadCreatedEventSchema,\n ThreadDoneEventSchema,\n ThreadOverwriteContextEventSchema,\n ToolApprovalRequiredEventSchema,\n ToolResponseEventSchema,\n ToolResponseRequiredEventSchema,\n UserToolApprovalMessageSchema,\n UserToolResponseMessageSchema,\n newEventId,\n} from './events/schema';\nexport type {\n AgentOutputEvent,\n MCPAuthRequiredEvent,\n MCPServerAuthInfo,\n MCPServerInitInfo,\n ThreadDoneEvent,\n ThreadOverwriteContextEvent,\n} from './events/schema';\nexport { CompletionUsageSchema } from './llm/LLMTypes';\nexport type { CompletionUsage } from './llm/LLMTypes';\nexport { InternalEventType } from './runtime/AgentThread.types';\nexport type { AgentThreadSendBatch, ContextMessage } from './runtime/AgentThread.types';\nexport { AgentThreadMetricsSchema } from './runtime/metrics';\nexport type { AgentThreadMetrics } from './runtime/metrics';\n\n// Tracing\nexport type {\n AgentExecutionTrace,\n AgentLocalToolTrace,\n AgentRemoteMcpToolTrace,\n AgentTracing,\n} from './tracing/AgentTracing';\n\n// Errors / utils\nexport { AgentHarnessError, McpConnectionError, McpDcrConfigurationError } from './errors';\nexport { extractErrorLogFields } from './util/errorLogFields';\nexport { PromiseTimeoutError, withTimeout } from './util/promiseUtils';\n\n// Sandbox (concrete implementation; provider details exported for composition)\nexport { DaytonaSandboxProvider } from './sandbox/provider/DaytonaProvider';\nexport type { DaytonaSandboxProviderOptions } from './sandbox/provider/DaytonaProvider';\nexport type {\n SandboxBuild,\n SandboxBuildMetadata,\n SandboxBuildStatus,\n SandboxExecParams,\n SandboxInit,\n SandboxProvider,\n} from './sandbox/provider/Provider';\nexport { TFYSandboxProvider } from './sandbox/provider/TFYSandboxProvider';\nexport { SKILL_DOWNLOAD_TIMEOUT_SECONDS, Sandbox, buildWriteAndRunScriptCommand } from './sandbox/Sandbox';\nexport type { SandboxInfo } from './sandbox/Sandbox';\nexport { SandboxError, validateNoPathTraversal, validateSandboxOwnedByTenant } from './sandbox/SandboxErrors';\nexport { SANDBOX_IMAGE_URI } from './sandbox/sandboxImage';\n\n// Skills: the ISkillMounter seam lets hosts plug in their own skill sources\nexport { InstructionBuilder } from './InstructionBuilder';\nexport { SKILLS_PREAMBLE, SkillMounter, getSkillPath, renderSkillPromptBody } from './sandbox/skills';\nexport type { GitSkill, ISkillMounter } from './sandbox/skills';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAOA,yBAA4B;AAY5B,qCAAwC;AAExC,8BAAkF;AAalF,6BAAgC;AAChC,+BAGO;AACP,6BAAgC;AAChC,8BAAqD;AACrD,+BAKO;AACP,oBAAuB;AAIvB,4BAA+B;AAC/B,wBAAmD;AAUnD,0BAAyC;AAMzC,uBAA0B;AAI1B,2BAOO;AACP,qBAAwB;AAIxB,4BAA6D;AAE7D,yBAAmF;AAInF,oBAmBO;AASP,sBAAsC;AAEtC,IAAAA,sBAAkC;AAElC,qBAAyC;AAYzC,oBAAgF;AAChF,4BAAsC;AACtC,0BAAiD;AAGjD,6BAAuC;AAUvC,gCAAmC;AACnC,qBAAuF;AAEvF,2BAAoF;AACpF,0BAAkC;AAGlC,gCAAmC;AACnC,oBAAmF;","names":["import_AgentThread"]}
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
// src/core/index.ts
|
|
2
|
+
import { AgentThread } from "./runtime/AgentThread.mjs";
|
|
3
|
+
import { AgentThreadOrchestrator } from "./runtime/AgentThreadOrchestrator.mjs";
|
|
4
|
+
import { isAgentInputUserMessage, isEmptyMessageContent, isFileContentPart } from "./runtime/UserInputMessage.mjs";
|
|
5
|
+
import { askUserQuestion } from "./capabilities/builtins/AskUserQuestion.mjs";
|
|
6
|
+
import {
|
|
7
|
+
DEFAULT_CONTEXT_COMPACTION_THRESHOLD_TOKENS,
|
|
8
|
+
contextCompaction
|
|
9
|
+
} from "./capabilities/builtins/ContextCompaction.mjs";
|
|
10
|
+
import { currentDateTime } from "./capabilities/builtins/CurrentDateTime.mjs";
|
|
11
|
+
import { SUB_AGENT_IDENTITY, dynamicSubAgents } from "./capabilities/builtins/DynamicSubAgents.mjs";
|
|
12
|
+
import {
|
|
13
|
+
DEFAULT_INDIVIDUAL_TOOL_TOKEN_THRESHOLD,
|
|
14
|
+
DEFAULT_PREVIEW_NUMBER_OF_CHARACTERS,
|
|
15
|
+
DEFAULT_TOTAL_TOOL_TOKEN_THRESHOLD,
|
|
16
|
+
largeToolResponse
|
|
17
|
+
} from "./capabilities/builtins/LargeToolResponse.mjs";
|
|
18
|
+
import { openUI } from "./capabilities/builtins/OpenUI.mjs";
|
|
19
|
+
import { ClientSideTool } from "./mcp/ClientSideTool.mjs";
|
|
20
|
+
import { isAuthRequired, toolResultResponse } from "./mcp/IMCPServer.mjs";
|
|
21
|
+
import { LocalToolMCP, defineTool } from "./mcp/LocalToolMCP.mjs";
|
|
22
|
+
import { RemoteMCP } from "./mcp/RemoteMCP.mjs";
|
|
23
|
+
import {
|
|
24
|
+
DEFAULT_DISABLE_TOOLS,
|
|
25
|
+
DEFAULT_ENABLE_TOOLS,
|
|
26
|
+
DEFAULT_PRELOAD_TOOLS,
|
|
27
|
+
DEFAULT_REQUIRE_APPROVAL_FOR_TOOLS,
|
|
28
|
+
REQUIRE_APPROVAL_TOOLS_SELECTOR_TAGS,
|
|
29
|
+
TOOLS_SELECTOR_TAGS
|
|
30
|
+
} from "./mcp/toolSelectors.mjs";
|
|
31
|
+
import { ToolSet } from "./mcp/ToolSet.mjs";
|
|
32
|
+
import { ResponseFormatSchema, toOpenAIResponseFormat } from "./llm/responseFormat.mjs";
|
|
33
|
+
import { SUPPORTED_REASONING_EFFORTS, VERCEL_AI_PROVIDER_NAMES, VercelAILLM } from "./llm/VercelAILLM.mjs";
|
|
34
|
+
import {
|
|
35
|
+
ActionRequiredEventSchema,
|
|
36
|
+
AgentInputUserMessageSchema,
|
|
37
|
+
EventIdSchema,
|
|
38
|
+
EventType,
|
|
39
|
+
MCPAuthRequiredEventSchema,
|
|
40
|
+
MCPInitializeEventSchema,
|
|
41
|
+
ModelMessageDeltaEventSchema,
|
|
42
|
+
ModelMessageEventSchema,
|
|
43
|
+
SandboxCreatedEventSchema,
|
|
44
|
+
ThreadCreatedEventSchema,
|
|
45
|
+
ThreadDoneEventSchema,
|
|
46
|
+
ThreadOverwriteContextEventSchema,
|
|
47
|
+
ToolApprovalRequiredEventSchema,
|
|
48
|
+
ToolResponseEventSchema,
|
|
49
|
+
ToolResponseRequiredEventSchema,
|
|
50
|
+
UserToolApprovalMessageSchema,
|
|
51
|
+
UserToolResponseMessageSchema,
|
|
52
|
+
newEventId
|
|
53
|
+
} from "./events/schema.mjs";
|
|
54
|
+
import { CompletionUsageSchema } from "./llm/LLMTypes.mjs";
|
|
55
|
+
import { InternalEventType } from "./runtime/AgentThread.types.mjs";
|
|
56
|
+
import { AgentThreadMetricsSchema } from "./runtime/metrics.mjs";
|
|
57
|
+
import { AgentHarnessError, McpConnectionError, McpDcrConfigurationError } from "./errors.mjs";
|
|
58
|
+
import { extractErrorLogFields } from "./util/errorLogFields.mjs";
|
|
59
|
+
import { PromiseTimeoutError, withTimeout } from "./util/promiseUtils.mjs";
|
|
60
|
+
import { DaytonaSandboxProvider } from "./sandbox/provider/DaytonaProvider.mjs";
|
|
61
|
+
import { TFYSandboxProvider } from "./sandbox/provider/TFYSandboxProvider.mjs";
|
|
62
|
+
import { SKILL_DOWNLOAD_TIMEOUT_SECONDS, Sandbox, buildWriteAndRunScriptCommand } from "./sandbox/Sandbox.mjs";
|
|
63
|
+
import { SandboxError, validateNoPathTraversal, validateSandboxOwnedByTenant } from "./sandbox/SandboxErrors.mjs";
|
|
64
|
+
import { SANDBOX_IMAGE_URI } from "./sandbox/sandboxImage.mjs";
|
|
65
|
+
import { InstructionBuilder } from "./InstructionBuilder.mjs";
|
|
66
|
+
import { SKILLS_PREAMBLE, SkillMounter, getSkillPath, renderSkillPromptBody } from "./sandbox/skills/index.mjs";
|
|
67
|
+
export {
|
|
68
|
+
ActionRequiredEventSchema,
|
|
69
|
+
AgentHarnessError,
|
|
70
|
+
AgentInputUserMessageSchema,
|
|
71
|
+
AgentThread,
|
|
72
|
+
AgentThreadMetricsSchema,
|
|
73
|
+
AgentThreadOrchestrator,
|
|
74
|
+
ClientSideTool,
|
|
75
|
+
CompletionUsageSchema,
|
|
76
|
+
DEFAULT_CONTEXT_COMPACTION_THRESHOLD_TOKENS,
|
|
77
|
+
DEFAULT_DISABLE_TOOLS,
|
|
78
|
+
DEFAULT_ENABLE_TOOLS,
|
|
79
|
+
DEFAULT_INDIVIDUAL_TOOL_TOKEN_THRESHOLD,
|
|
80
|
+
DEFAULT_PRELOAD_TOOLS,
|
|
81
|
+
DEFAULT_PREVIEW_NUMBER_OF_CHARACTERS,
|
|
82
|
+
DEFAULT_REQUIRE_APPROVAL_FOR_TOOLS,
|
|
83
|
+
DEFAULT_TOTAL_TOOL_TOKEN_THRESHOLD,
|
|
84
|
+
DaytonaSandboxProvider,
|
|
85
|
+
EventIdSchema,
|
|
86
|
+
EventType,
|
|
87
|
+
InstructionBuilder,
|
|
88
|
+
InternalEventType,
|
|
89
|
+
LocalToolMCP,
|
|
90
|
+
MCPAuthRequiredEventSchema,
|
|
91
|
+
MCPInitializeEventSchema,
|
|
92
|
+
McpConnectionError,
|
|
93
|
+
McpDcrConfigurationError,
|
|
94
|
+
ModelMessageDeltaEventSchema,
|
|
95
|
+
ModelMessageEventSchema,
|
|
96
|
+
PromiseTimeoutError,
|
|
97
|
+
REQUIRE_APPROVAL_TOOLS_SELECTOR_TAGS,
|
|
98
|
+
RemoteMCP,
|
|
99
|
+
ResponseFormatSchema,
|
|
100
|
+
SANDBOX_IMAGE_URI,
|
|
101
|
+
SKILLS_PREAMBLE,
|
|
102
|
+
SKILL_DOWNLOAD_TIMEOUT_SECONDS,
|
|
103
|
+
SUB_AGENT_IDENTITY,
|
|
104
|
+
SUPPORTED_REASONING_EFFORTS,
|
|
105
|
+
Sandbox,
|
|
106
|
+
SandboxCreatedEventSchema,
|
|
107
|
+
SandboxError,
|
|
108
|
+
SkillMounter,
|
|
109
|
+
TFYSandboxProvider,
|
|
110
|
+
TOOLS_SELECTOR_TAGS,
|
|
111
|
+
ThreadCreatedEventSchema,
|
|
112
|
+
ThreadDoneEventSchema,
|
|
113
|
+
ThreadOverwriteContextEventSchema,
|
|
114
|
+
ToolApprovalRequiredEventSchema,
|
|
115
|
+
ToolResponseEventSchema,
|
|
116
|
+
ToolResponseRequiredEventSchema,
|
|
117
|
+
ToolSet,
|
|
118
|
+
UserToolApprovalMessageSchema,
|
|
119
|
+
UserToolResponseMessageSchema,
|
|
120
|
+
VERCEL_AI_PROVIDER_NAMES,
|
|
121
|
+
VercelAILLM,
|
|
122
|
+
askUserQuestion,
|
|
123
|
+
buildWriteAndRunScriptCommand,
|
|
124
|
+
contextCompaction,
|
|
125
|
+
currentDateTime,
|
|
126
|
+
defineTool,
|
|
127
|
+
dynamicSubAgents,
|
|
128
|
+
extractErrorLogFields,
|
|
129
|
+
getSkillPath,
|
|
130
|
+
isAgentInputUserMessage,
|
|
131
|
+
isAuthRequired,
|
|
132
|
+
isEmptyMessageContent,
|
|
133
|
+
isFileContentPart,
|
|
134
|
+
largeToolResponse,
|
|
135
|
+
newEventId,
|
|
136
|
+
openUI,
|
|
137
|
+
renderSkillPromptBody,
|
|
138
|
+
toOpenAIResponseFormat,
|
|
139
|
+
toolResultResponse,
|
|
140
|
+
validateNoPathTraversal,
|
|
141
|
+
validateSandboxOwnedByTenant,
|
|
142
|
+
withTimeout
|
|
143
|
+
};
|
|
144
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/core/index.ts"],"sourcesContent":["/**\n * Public agent execution harness.\n * Intentional consumer-facing exports only (production API).\n */\n\n// Runtime\nexport type { AgentDefinition, ModelParams } from './runtime/AgentDefinition';\nexport { AgentThread } from './runtime/AgentThread';\nexport type {\n AgentInfo,\n AgentParent,\n AgentSendInput,\n AgentThreadAppendContext,\n AgentThreadCreateSubAgent,\n AgentThreadEvent,\n AgentThreadExecutionEvent,\n AgentThreadExecutionResult,\n SubAgentCompletionMarker,\n} from './runtime/AgentThread.types';\nexport { AgentThreadOrchestrator } from './runtime/AgentThreadOrchestrator';\nexport type { CreateDynamicSubAgentThread } from './runtime/CreateDynamicSubAgentThread';\nexport { isAgentInputUserMessage, isEmptyMessageContent, isFileContentPart } from './runtime/UserInputMessage';\nexport type { AgentInputUserMessage } from './runtime/UserInputMessage';\n\n// Capability contracts\nexport type { AgentCapability, CapabilityState, JsonValue } from './capabilities/AgentCapability';\nexport type {\n AgentContextProcessorOutput,\n AgentThreadExecutionContext,\n PostToolCallAgentContextProcessor,\n PreLLMEphemeralAgentContextProcessor,\n} from './capabilities/AgentContextProcessor';\n\n// Built-in factories\nexport { askUserQuestion } from './capabilities/builtins/AskUserQuestion';\nexport {\n DEFAULT_CONTEXT_COMPACTION_THRESHOLD_TOKENS,\n contextCompaction,\n} from './capabilities/builtins/ContextCompaction';\nexport { currentDateTime } from './capabilities/builtins/CurrentDateTime';\nexport { SUB_AGENT_IDENTITY, dynamicSubAgents } from './capabilities/builtins/DynamicSubAgents';\nexport {\n DEFAULT_INDIVIDUAL_TOOL_TOKEN_THRESHOLD,\n DEFAULT_PREVIEW_NUMBER_OF_CHARACTERS,\n DEFAULT_TOTAL_TOOL_TOKEN_THRESHOLD,\n largeToolResponse,\n} from './capabilities/builtins/LargeToolResponse';\nexport { openUI } from './capabilities/builtins/OpenUI';\n\n// MCP contracts\nexport type { ApprovalDecision } from './events/schema';\nexport { ClientSideTool } from './mcp/ClientSideTool';\nexport { isAuthRequired, toolResultResponse } from './mcp/IMCPServer';\nexport type {\n AgentToolSchema,\n AuthRequiredResponse,\n CallToolResponse,\n IToolSet,\n ListToolsResponse,\n MCPAuthRequired,\n ToolSource,\n} from './mcp/IMCPServer';\nexport { LocalToolMCP, defineTool } from './mcp/LocalToolMCP';\nexport type { ToolDefinition } from './mcp/LocalToolMCP';\n\n// Remote MCP server, split into a shared, policy-free connection (`RemoteMCP`) and a per-agent policy\n// wrapper (`ToolSet`). `RemoteMCP` connects itself from a `url` + `headers`; the networking helpers\n// live in the harness-internal `remoteMcpClient` module.\nexport { RemoteMCP } from './mcp/RemoteMCP';\nexport type { RemoteMcpHeaders, ResolveHeadersResult } from './mcp/RemoteMCP';\nexport type { RemoteMcpConnection, RemoteMcpTransportType } from './mcp/remoteMcpClient';\nexport type { ToolSelectorConfig } from './mcp/ToolSelectorPolicy';\nexport {\n DEFAULT_DISABLE_TOOLS,\n DEFAULT_ENABLE_TOOLS,\n DEFAULT_PRELOAD_TOOLS,\n DEFAULT_REQUIRE_APPROVAL_FOR_TOOLS,\n REQUIRE_APPROVAL_TOOLS_SELECTOR_TAGS,\n TOOLS_SELECTOR_TAGS,\n} from './mcp/toolSelectors';\nexport { ToolSet } from './mcp/ToolSet';\n\n// LLM contracts\nexport type { AgentMetadata, ILLM, LLMCreateParams, LLMCreateParamsStreaming } from './llm/ILLM';\nexport { ResponseFormatSchema, toOpenAIResponseFormat } from './llm/responseFormat';\nexport type { ResponseFormat } from './llm/responseFormat';\nexport { SUPPORTED_REASONING_EFFORTS, VERCEL_AI_PROVIDER_NAMES, VercelAILLM } from './llm/VercelAILLM';\nexport type { VercelAILLMConfig, VercelAIProviderConfig, VercelAIProviderName } from './llm/VercelAILLM';\n\n// Event contracts\nexport {\n ActionRequiredEventSchema,\n AgentInputUserMessageSchema,\n EventIdSchema,\n EventType,\n MCPAuthRequiredEventSchema,\n MCPInitializeEventSchema,\n ModelMessageDeltaEventSchema,\n ModelMessageEventSchema,\n SandboxCreatedEventSchema,\n ThreadCreatedEventSchema,\n ThreadDoneEventSchema,\n ThreadOverwriteContextEventSchema,\n ToolApprovalRequiredEventSchema,\n ToolResponseEventSchema,\n ToolResponseRequiredEventSchema,\n UserToolApprovalMessageSchema,\n UserToolResponseMessageSchema,\n newEventId,\n} from './events/schema';\nexport type {\n AgentOutputEvent,\n MCPAuthRequiredEvent,\n MCPServerAuthInfo,\n MCPServerInitInfo,\n ThreadDoneEvent,\n ThreadOverwriteContextEvent,\n} from './events/schema';\nexport { CompletionUsageSchema } from './llm/LLMTypes';\nexport type { CompletionUsage } from './llm/LLMTypes';\nexport { InternalEventType } from './runtime/AgentThread.types';\nexport type { AgentThreadSendBatch, ContextMessage } from './runtime/AgentThread.types';\nexport { AgentThreadMetricsSchema } from './runtime/metrics';\nexport type { AgentThreadMetrics } from './runtime/metrics';\n\n// Tracing\nexport type {\n AgentExecutionTrace,\n AgentLocalToolTrace,\n AgentRemoteMcpToolTrace,\n AgentTracing,\n} from './tracing/AgentTracing';\n\n// Errors / utils\nexport { AgentHarnessError, McpConnectionError, McpDcrConfigurationError } from './errors';\nexport { extractErrorLogFields } from './util/errorLogFields';\nexport { PromiseTimeoutError, withTimeout } from './util/promiseUtils';\n\n// Sandbox (concrete implementation; provider details exported for composition)\nexport { DaytonaSandboxProvider } from './sandbox/provider/DaytonaProvider';\nexport type { DaytonaSandboxProviderOptions } from './sandbox/provider/DaytonaProvider';\nexport type {\n SandboxBuild,\n SandboxBuildMetadata,\n SandboxBuildStatus,\n SandboxExecParams,\n SandboxInit,\n SandboxProvider,\n} from './sandbox/provider/Provider';\nexport { TFYSandboxProvider } from './sandbox/provider/TFYSandboxProvider';\nexport { SKILL_DOWNLOAD_TIMEOUT_SECONDS, Sandbox, buildWriteAndRunScriptCommand } from './sandbox/Sandbox';\nexport type { SandboxInfo } from './sandbox/Sandbox';\nexport { SandboxError, validateNoPathTraversal, validateSandboxOwnedByTenant } from './sandbox/SandboxErrors';\nexport { SANDBOX_IMAGE_URI } from './sandbox/sandboxImage';\n\n// Skills: the ISkillMounter seam lets hosts plug in their own skill sources\nexport { InstructionBuilder } from './InstructionBuilder';\nexport { SKILLS_PREAMBLE, SkillMounter, getSkillPath, renderSkillPromptBody } from './sandbox/skills';\nexport type { GitSkill, ISkillMounter } from './sandbox/skills';\n"],"mappings":";AAOA,SAAS,mBAAmB;AAY5B,SAAS,+BAA+B;AAExC,SAAS,yBAAyB,uBAAuB,yBAAyB;AAalF,SAAS,uBAAuB;AAChC;AAAA,EACE;AAAA,EACA;AAAA,OACK;AACP,SAAS,uBAAuB;AAChC,SAAS,oBAAoB,wBAAwB;AACrD;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,cAAc;AAIvB,SAAS,sBAAsB;AAC/B,SAAS,gBAAgB,0BAA0B;AAUnD,SAAS,cAAc,kBAAkB;AAMzC,SAAS,iBAAiB;AAI1B;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,eAAe;AAIxB,SAAS,sBAAsB,8BAA8B;AAE7D,SAAS,6BAA6B,0BAA0B,mBAAmB;AAInF;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AASP,SAAS,6BAA6B;AAEtC,SAAS,yBAAyB;AAElC,SAAS,gCAAgC;AAYzC,SAAS,mBAAmB,oBAAoB,gCAAgC;AAChF,SAAS,6BAA6B;AACtC,SAAS,qBAAqB,mBAAmB;AAGjD,SAAS,8BAA8B;AAUvC,SAAS,0BAA0B;AACnC,SAAS,gCAAgC,SAAS,qCAAqC;AAEvF,SAAS,cAAc,yBAAyB,oCAAoC;AACpF,SAAS,yBAAyB;AAGlC,SAAS,0BAA0B;AACnC,SAAS,iBAAiB,cAAc,cAAc,6BAA6B;","names":[]}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { ChatCompletionCreateParams, ChatCompletionCreateParamsStreaming } from 'openai/resources/chat';
|
|
2
|
+
import type { ExtendedChatCompletionChunk, RawAssistantMessageWithUsage } from './LLMTypes';
|
|
3
|
+
export type AgentMetadata = Record<string, string>;
|
|
4
|
+
/**
|
|
5
|
+
* OpenAI chat-completion request shapes with `model` removed.
|
|
6
|
+
* The bound ILLM client owns model identity (e.g. VercelAILLM providerConfig);
|
|
7
|
+
* callers must not invent a model string just to satisfy OpenAI's required field.
|
|
8
|
+
*/
|
|
9
|
+
export type LLMCreateParams = Omit<ChatCompletionCreateParams, 'model'>;
|
|
10
|
+
export type LLMCreateParamsStreaming = Omit<ChatCompletionCreateParamsStreaming, 'model'>;
|
|
11
|
+
export interface ILLM {
|
|
12
|
+
create(body: LLMCreateParamsStreaming): AsyncGenerator<ExtendedChatCompletionChunk, RawAssistantMessageWithUsage, unknown>;
|
|
13
|
+
createNonStream(body: LLMCreateParams): Promise<RawAssistantMessageWithUsage>;
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=ILLM.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ILLM.d.ts","sourceRoot":"","sources":["../../../src/core/llm/ILLM.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,0BAA0B,EAAE,mCAAmC,EAAE,MAAM,uBAAuB,CAAC;AAC7G,OAAO,KAAK,EAAE,2BAA2B,EAAE,4BAA4B,EAAE,MAAM,YAAY,CAAC;AAE5F,MAAM,MAAM,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAEnD;;;;GAIG;AACH,MAAM,MAAM,eAAe,GAAG,IAAI,CAAC,0BAA0B,EAAE,OAAO,CAAC,CAAC;AACxE,MAAM,MAAM,wBAAwB,GAAG,IAAI,CAAC,mCAAmC,EAAE,OAAO,CAAC,CAAC;AAE1F,MAAM,WAAW,IAAI;IACnB,MAAM,CACJ,IAAI,EAAE,wBAAwB,GAC7B,cAAc,CAAC,2BAA2B,EAAE,4BAA4B,EAAE,OAAO,CAAC,CAAC;IACtF,eAAe,CAAC,IAAI,EAAE,eAAe,GAAG,OAAO,CAAC,4BAA4B,CAAC,CAAC;CAC/E"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __copyProps = (to, from, except, desc) => {
|
|
7
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
+
for (let key of __getOwnPropNames(from))
|
|
9
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
+
}
|
|
12
|
+
return to;
|
|
13
|
+
};
|
|
14
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
15
|
+
|
|
16
|
+
// src/core/llm/ILLM.ts
|
|
17
|
+
var ILLM_exports = {};
|
|
18
|
+
module.exports = __toCommonJS(ILLM_exports);
|
|
19
|
+
//# sourceMappingURL=ILLM.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/core/llm/ILLM.ts"],"sourcesContent":["import type { ChatCompletionCreateParams, ChatCompletionCreateParamsStreaming } from 'openai/resources/chat';\nimport type { ExtendedChatCompletionChunk, RawAssistantMessageWithUsage } from './LLMTypes';\n\nexport type AgentMetadata = Record<string, string>;\n\n/**\n * OpenAI chat-completion request shapes with `model` removed.\n * The bound ILLM client owns model identity (e.g. VercelAILLM providerConfig);\n * callers must not invent a model string just to satisfy OpenAI's required field.\n */\nexport type LLMCreateParams = Omit<ChatCompletionCreateParams, 'model'>;\nexport type LLMCreateParamsStreaming = Omit<ChatCompletionCreateParamsStreaming, 'model'>;\n\nexport interface ILLM {\n create(\n body: LLMCreateParamsStreaming,\n ): AsyncGenerator<ExtendedChatCompletionChunk, RawAssistantMessageWithUsage, unknown>;\n createNonStream(body: LLMCreateParams): Promise<RawAssistantMessageWithUsage>;\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=ILLM.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,369 @@
|
|
|
1
|
+
import { z } from '@hono/zod-openapi';
|
|
2
|
+
import type { ChatCompletionChunk } from 'openai/resources/chat';
|
|
3
|
+
export declare const ThinkingBlockSchema: z.ZodObject<{
|
|
4
|
+
type: z.ZodLiteral<"thinking">;
|
|
5
|
+
thinking: z.ZodString;
|
|
6
|
+
signature: z.ZodOptional<z.ZodString>;
|
|
7
|
+
}, z.core.$strip>;
|
|
8
|
+
export declare const RedactedThinkingBlockSchema: z.ZodObject<{
|
|
9
|
+
type: z.ZodLiteral<"redacted_thinking">;
|
|
10
|
+
data: z.ZodString;
|
|
11
|
+
}, z.core.$strip>;
|
|
12
|
+
export declare const ThinkingBlockUnionSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
13
|
+
type: z.ZodLiteral<"thinking">;
|
|
14
|
+
thinking: z.ZodString;
|
|
15
|
+
signature: z.ZodOptional<z.ZodString>;
|
|
16
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
17
|
+
type: z.ZodLiteral<"redacted_thinking">;
|
|
18
|
+
data: z.ZodString;
|
|
19
|
+
}, z.core.$strip>]>;
|
|
20
|
+
export declare const InternalToolCallInfoSchema: z.ZodObject<{
|
|
21
|
+
type: z.ZodEnum<{
|
|
22
|
+
mcp: "mcp";
|
|
23
|
+
"truefoundry-system": "truefoundry-system";
|
|
24
|
+
}>;
|
|
25
|
+
mcp_server_id: z.ZodString;
|
|
26
|
+
mcp_server_name: z.ZodString;
|
|
27
|
+
original_tool_name: z.ZodString;
|
|
28
|
+
is_approval_required: z.ZodOptional<z.ZodBoolean>;
|
|
29
|
+
is_deferred: z.ZodOptional<z.ZodBoolean>;
|
|
30
|
+
is_client_side: z.ZodOptional<z.ZodBoolean>;
|
|
31
|
+
is_thread_creation: z.ZodOptional<z.ZodBoolean>;
|
|
32
|
+
}, z.core.$strip>;
|
|
33
|
+
export declare const TrueFoundrySystemToolInfoSchema: z.ZodObject<{
|
|
34
|
+
type: z.ZodLiteral<"truefoundry-system">;
|
|
35
|
+
name: z.ZodString;
|
|
36
|
+
}, z.core.$strip>;
|
|
37
|
+
export declare const MCPToolInfoSchema: z.ZodObject<{
|
|
38
|
+
type: z.ZodLiteral<"mcp">;
|
|
39
|
+
server_id: z.ZodString;
|
|
40
|
+
server_name: z.ZodString;
|
|
41
|
+
name: z.ZodString;
|
|
42
|
+
}, z.core.$strip>;
|
|
43
|
+
export declare const RawToolCallSchema: z.ZodObject<{
|
|
44
|
+
id: z.ZodString;
|
|
45
|
+
type: z.ZodLiteral<"function">;
|
|
46
|
+
function: z.ZodObject<{
|
|
47
|
+
name: z.ZodString;
|
|
48
|
+
arguments: z.ZodString;
|
|
49
|
+
}, z.core.$strip>;
|
|
50
|
+
provider_specific_fields: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
51
|
+
}, z.core.$strip>;
|
|
52
|
+
export declare const InternalEnrichedToolCallSchema: z.ZodObject<{
|
|
53
|
+
id: z.ZodString;
|
|
54
|
+
type: z.ZodLiteral<"function">;
|
|
55
|
+
function: z.ZodObject<{
|
|
56
|
+
name: z.ZodString;
|
|
57
|
+
arguments: z.ZodString;
|
|
58
|
+
}, z.core.$strip>;
|
|
59
|
+
provider_specific_fields: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
60
|
+
tool_info: z.ZodObject<{
|
|
61
|
+
type: z.ZodEnum<{
|
|
62
|
+
mcp: "mcp";
|
|
63
|
+
"truefoundry-system": "truefoundry-system";
|
|
64
|
+
}>;
|
|
65
|
+
mcp_server_id: z.ZodString;
|
|
66
|
+
mcp_server_name: z.ZodString;
|
|
67
|
+
original_tool_name: z.ZodString;
|
|
68
|
+
is_approval_required: z.ZodOptional<z.ZodBoolean>;
|
|
69
|
+
is_deferred: z.ZodOptional<z.ZodBoolean>;
|
|
70
|
+
is_client_side: z.ZodOptional<z.ZodBoolean>;
|
|
71
|
+
is_thread_creation: z.ZodOptional<z.ZodBoolean>;
|
|
72
|
+
}, z.core.$strip>;
|
|
73
|
+
}, z.core.$strip>;
|
|
74
|
+
export declare const ToolInfoSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
75
|
+
type: z.ZodLiteral<"truefoundry-system">;
|
|
76
|
+
name: z.ZodString;
|
|
77
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
78
|
+
type: z.ZodLiteral<"mcp">;
|
|
79
|
+
server_id: z.ZodString;
|
|
80
|
+
server_name: z.ZodString;
|
|
81
|
+
name: z.ZodString;
|
|
82
|
+
}, z.core.$strip>], "type">;
|
|
83
|
+
export declare const EnrichedToolCallSchema: z.ZodObject<{
|
|
84
|
+
id: z.ZodString;
|
|
85
|
+
type: z.ZodLiteral<"function">;
|
|
86
|
+
function: z.ZodObject<{
|
|
87
|
+
name: z.ZodString;
|
|
88
|
+
arguments: z.ZodString;
|
|
89
|
+
}, z.core.$strip>;
|
|
90
|
+
provider_specific_fields: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
91
|
+
tool_info: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
92
|
+
type: z.ZodLiteral<"truefoundry-system">;
|
|
93
|
+
name: z.ZodString;
|
|
94
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
95
|
+
type: z.ZodLiteral<"mcp">;
|
|
96
|
+
server_id: z.ZodString;
|
|
97
|
+
server_name: z.ZodString;
|
|
98
|
+
name: z.ZodString;
|
|
99
|
+
}, z.core.$strip>], "type">;
|
|
100
|
+
}, z.core.$strip>;
|
|
101
|
+
export declare const RawAssistantMessageSchema: z.ZodObject<{
|
|
102
|
+
role: z.ZodLiteral<"assistant">;
|
|
103
|
+
content: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
104
|
+
type: z.ZodLiteral<"text">;
|
|
105
|
+
text: z.ZodString;
|
|
106
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
107
|
+
type: z.ZodLiteral<"refusal">;
|
|
108
|
+
refusal: z.ZodString;
|
|
109
|
+
}, z.core.$strip>]>>]>>>;
|
|
110
|
+
name: z.ZodOptional<z.ZodString>;
|
|
111
|
+
refusal: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
112
|
+
tool_calls: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
113
|
+
id: z.ZodString;
|
|
114
|
+
type: z.ZodLiteral<"function">;
|
|
115
|
+
function: z.ZodObject<{
|
|
116
|
+
name: z.ZodString;
|
|
117
|
+
arguments: z.ZodString;
|
|
118
|
+
}, z.core.$strip>;
|
|
119
|
+
provider_specific_fields: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
120
|
+
}, z.core.$strip>>>;
|
|
121
|
+
thinking_blocks: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
122
|
+
type: z.ZodLiteral<"thinking">;
|
|
123
|
+
thinking: z.ZodString;
|
|
124
|
+
signature: z.ZodOptional<z.ZodString>;
|
|
125
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
126
|
+
type: z.ZodLiteral<"redacted_thinking">;
|
|
127
|
+
data: z.ZodString;
|
|
128
|
+
}, z.core.$strip>]>>>;
|
|
129
|
+
reasoning_content: z.ZodOptional<z.ZodString>;
|
|
130
|
+
source: z.ZodOptional<z.ZodString>;
|
|
131
|
+
}, z.core.$strip>;
|
|
132
|
+
export declare const InternalEnrichedAssistantMessageSchema: z.ZodObject<{
|
|
133
|
+
role: z.ZodLiteral<"assistant">;
|
|
134
|
+
content: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
135
|
+
type: z.ZodLiteral<"text">;
|
|
136
|
+
text: z.ZodString;
|
|
137
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
138
|
+
type: z.ZodLiteral<"refusal">;
|
|
139
|
+
refusal: z.ZodString;
|
|
140
|
+
}, z.core.$strip>]>>]>>>;
|
|
141
|
+
name: z.ZodOptional<z.ZodString>;
|
|
142
|
+
refusal: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
143
|
+
thinking_blocks: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
144
|
+
type: z.ZodLiteral<"thinking">;
|
|
145
|
+
thinking: z.ZodString;
|
|
146
|
+
signature: z.ZodOptional<z.ZodString>;
|
|
147
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
148
|
+
type: z.ZodLiteral<"redacted_thinking">;
|
|
149
|
+
data: z.ZodString;
|
|
150
|
+
}, z.core.$strip>]>>>;
|
|
151
|
+
reasoning_content: z.ZodOptional<z.ZodString>;
|
|
152
|
+
source: z.ZodOptional<z.ZodString>;
|
|
153
|
+
tool_calls: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
154
|
+
id: z.ZodString;
|
|
155
|
+
type: z.ZodLiteral<"function">;
|
|
156
|
+
function: z.ZodObject<{
|
|
157
|
+
name: z.ZodString;
|
|
158
|
+
arguments: z.ZodString;
|
|
159
|
+
}, z.core.$strip>;
|
|
160
|
+
provider_specific_fields: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
161
|
+
tool_info: z.ZodObject<{
|
|
162
|
+
type: z.ZodEnum<{
|
|
163
|
+
mcp: "mcp";
|
|
164
|
+
"truefoundry-system": "truefoundry-system";
|
|
165
|
+
}>;
|
|
166
|
+
mcp_server_id: z.ZodString;
|
|
167
|
+
mcp_server_name: z.ZodString;
|
|
168
|
+
original_tool_name: z.ZodString;
|
|
169
|
+
is_approval_required: z.ZodOptional<z.ZodBoolean>;
|
|
170
|
+
is_deferred: z.ZodOptional<z.ZodBoolean>;
|
|
171
|
+
is_client_side: z.ZodOptional<z.ZodBoolean>;
|
|
172
|
+
is_thread_creation: z.ZodOptional<z.ZodBoolean>;
|
|
173
|
+
}, z.core.$strip>;
|
|
174
|
+
}, z.core.$strip>>>;
|
|
175
|
+
}, z.core.$strip>;
|
|
176
|
+
export declare const EnrichedAssistantMessageSchema: z.ZodObject<{
|
|
177
|
+
role: z.ZodLiteral<"assistant">;
|
|
178
|
+
content: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
179
|
+
type: z.ZodLiteral<"text">;
|
|
180
|
+
text: z.ZodString;
|
|
181
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
182
|
+
type: z.ZodLiteral<"refusal">;
|
|
183
|
+
refusal: z.ZodString;
|
|
184
|
+
}, z.core.$strip>]>>]>>>;
|
|
185
|
+
name: z.ZodOptional<z.ZodString>;
|
|
186
|
+
refusal: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
187
|
+
reasoning_content: z.ZodOptional<z.ZodString>;
|
|
188
|
+
tool_calls: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
189
|
+
id: z.ZodString;
|
|
190
|
+
type: z.ZodLiteral<"function">;
|
|
191
|
+
function: z.ZodObject<{
|
|
192
|
+
name: z.ZodString;
|
|
193
|
+
arguments: z.ZodString;
|
|
194
|
+
}, z.core.$strip>;
|
|
195
|
+
provider_specific_fields: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
196
|
+
tool_info: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
197
|
+
type: z.ZodLiteral<"truefoundry-system">;
|
|
198
|
+
name: z.ZodString;
|
|
199
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
200
|
+
type: z.ZodLiteral<"mcp">;
|
|
201
|
+
server_id: z.ZodString;
|
|
202
|
+
server_name: z.ZodString;
|
|
203
|
+
name: z.ZodString;
|
|
204
|
+
}, z.core.$strip>], "type">;
|
|
205
|
+
}, z.core.$strip>>>;
|
|
206
|
+
}, z.core.$strip>;
|
|
207
|
+
export declare const ExtendedChunkDeltaToolCallSchema: z.ZodObject<{
|
|
208
|
+
index: z.ZodNumber;
|
|
209
|
+
id: z.ZodOptional<z.ZodString>;
|
|
210
|
+
type: z.ZodOptional<z.ZodLiteral<"function">>;
|
|
211
|
+
function: z.ZodOptional<z.ZodObject<{
|
|
212
|
+
name: z.ZodOptional<z.ZodString>;
|
|
213
|
+
arguments: z.ZodOptional<z.ZodString>;
|
|
214
|
+
}, z.core.$strip>>;
|
|
215
|
+
tool_info: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
216
|
+
type: z.ZodLiteral<"truefoundry-system">;
|
|
217
|
+
name: z.ZodString;
|
|
218
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
219
|
+
type: z.ZodLiteral<"mcp">;
|
|
220
|
+
server_id: z.ZodString;
|
|
221
|
+
server_name: z.ZodString;
|
|
222
|
+
name: z.ZodString;
|
|
223
|
+
}, z.core.$strip>], "type">>;
|
|
224
|
+
provider_specific_fields: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
225
|
+
}, z.core.$strip>;
|
|
226
|
+
export declare const ExtendedChunkDeltaSchema: z.ZodObject<{
|
|
227
|
+
content: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
228
|
+
refusal: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
229
|
+
role: z.ZodOptional<z.ZodEnum<{
|
|
230
|
+
assistant: "assistant";
|
|
231
|
+
developer: "developer";
|
|
232
|
+
system: "system";
|
|
233
|
+
tool: "tool";
|
|
234
|
+
user: "user";
|
|
235
|
+
}>>;
|
|
236
|
+
function_call: z.ZodOptional<z.ZodObject<{
|
|
237
|
+
name: z.ZodOptional<z.ZodString>;
|
|
238
|
+
arguments: z.ZodOptional<z.ZodString>;
|
|
239
|
+
}, z.core.$strip>>;
|
|
240
|
+
tool_calls: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
241
|
+
index: z.ZodNumber;
|
|
242
|
+
id: z.ZodOptional<z.ZodString>;
|
|
243
|
+
type: z.ZodOptional<z.ZodLiteral<"function">>;
|
|
244
|
+
function: z.ZodOptional<z.ZodObject<{
|
|
245
|
+
name: z.ZodOptional<z.ZodString>;
|
|
246
|
+
arguments: z.ZodOptional<z.ZodString>;
|
|
247
|
+
}, z.core.$strip>>;
|
|
248
|
+
tool_info: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
249
|
+
type: z.ZodLiteral<"truefoundry-system">;
|
|
250
|
+
name: z.ZodString;
|
|
251
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
252
|
+
type: z.ZodLiteral<"mcp">;
|
|
253
|
+
server_id: z.ZodString;
|
|
254
|
+
server_name: z.ZodString;
|
|
255
|
+
name: z.ZodString;
|
|
256
|
+
}, z.core.$strip>], "type">>;
|
|
257
|
+
provider_specific_fields: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
258
|
+
}, z.core.$strip>>>;
|
|
259
|
+
thinking_blocks: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
260
|
+
type: z.ZodLiteral<"thinking">;
|
|
261
|
+
thinking: z.ZodString;
|
|
262
|
+
signature: z.ZodOptional<z.ZodString>;
|
|
263
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
264
|
+
type: z.ZodLiteral<"redacted_thinking">;
|
|
265
|
+
data: z.ZodString;
|
|
266
|
+
}, z.core.$strip>]>>>;
|
|
267
|
+
reasoning_content: z.ZodOptional<z.ZodString>;
|
|
268
|
+
}, z.core.$strip>;
|
|
269
|
+
export declare const LLMUserMessageSchema: z.ZodObject<{
|
|
270
|
+
role: z.ZodLiteral<"user">;
|
|
271
|
+
content: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
272
|
+
type: z.ZodLiteral<"text">;
|
|
273
|
+
text: z.ZodString;
|
|
274
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
275
|
+
type: z.ZodLiteral<"image_url">;
|
|
276
|
+
image_url: z.ZodObject<{
|
|
277
|
+
url: z.ZodString;
|
|
278
|
+
detail: z.ZodOptional<z.ZodEnum<{
|
|
279
|
+
auto: "auto";
|
|
280
|
+
high: "high";
|
|
281
|
+
low: "low";
|
|
282
|
+
}>>;
|
|
283
|
+
}, z.core.$strip>;
|
|
284
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
285
|
+
type: z.ZodLiteral<"input_audio">;
|
|
286
|
+
input_audio: z.ZodObject<{
|
|
287
|
+
data: z.ZodString;
|
|
288
|
+
format: z.ZodEnum<{
|
|
289
|
+
mp3: "mp3";
|
|
290
|
+
wav: "wav";
|
|
291
|
+
}>;
|
|
292
|
+
}, z.core.$strip>;
|
|
293
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
294
|
+
type: z.ZodLiteral<"file">;
|
|
295
|
+
file: z.ZodObject<{
|
|
296
|
+
file_data: z.ZodOptional<z.ZodString>;
|
|
297
|
+
file_id: z.ZodOptional<z.ZodString>;
|
|
298
|
+
filename: z.ZodOptional<z.ZodString>;
|
|
299
|
+
}, z.core.$strip>;
|
|
300
|
+
}, z.core.$strip>]>>]>;
|
|
301
|
+
}, z.core.$strip>;
|
|
302
|
+
export declare const LLMToolMessageSchema: z.ZodObject<{
|
|
303
|
+
role: z.ZodLiteral<"tool">;
|
|
304
|
+
tool_call_id: z.ZodString;
|
|
305
|
+
content: z.ZodString;
|
|
306
|
+
}, z.core.$strip>;
|
|
307
|
+
export declare const CompletionUsageSchema: z.ZodObject<{
|
|
308
|
+
input_tokens: z.ZodNumber;
|
|
309
|
+
output_tokens: z.ZodNumber;
|
|
310
|
+
total_tokens: z.ZodNumber;
|
|
311
|
+
cache_read_tokens: z.ZodOptional<z.ZodNumber>;
|
|
312
|
+
cache_write_tokens: z.ZodOptional<z.ZodNumber>;
|
|
313
|
+
reasoning_tokens: z.ZodOptional<z.ZodNumber>;
|
|
314
|
+
cost_in_usd: z.ZodOptional<z.ZodNumber>;
|
|
315
|
+
}, z.core.$strip>;
|
|
316
|
+
export declare const FinishReasonSchema: z.ZodEnum<{
|
|
317
|
+
content_filter: "content_filter";
|
|
318
|
+
function_call: "function_call";
|
|
319
|
+
length: "length";
|
|
320
|
+
stop: "stop";
|
|
321
|
+
tool_calls: "tool_calls";
|
|
322
|
+
}>;
|
|
323
|
+
export type ThinkingBlock = z.infer<typeof ThinkingBlockSchema>;
|
|
324
|
+
export type RedactedThinkingBlock = z.infer<typeof RedactedThinkingBlockSchema>;
|
|
325
|
+
export type InternalToolCallInfo = z.infer<typeof InternalToolCallInfoSchema>;
|
|
326
|
+
export type TrueFoundrySystemToolInfo = z.infer<typeof TrueFoundrySystemToolInfoSchema>;
|
|
327
|
+
export type MCPToolInfo = z.infer<typeof MCPToolInfoSchema>;
|
|
328
|
+
export type ToolInfo = z.infer<typeof ToolInfoSchema>;
|
|
329
|
+
export type InternalEnrichedToolCall = z.infer<typeof InternalEnrichedToolCallSchema>;
|
|
330
|
+
export type EnrichedToolCall = z.infer<typeof EnrichedToolCallSchema>;
|
|
331
|
+
export type RawAssistantMessage = z.infer<typeof RawAssistantMessageSchema>;
|
|
332
|
+
export type InternalEnrichedAssistantMessage = z.infer<typeof InternalEnrichedAssistantMessageSchema>;
|
|
333
|
+
export type EnrichedAssistantMessage = z.infer<typeof EnrichedAssistantMessageSchema>;
|
|
334
|
+
export type ExtendedDeltaToolCall = z.infer<typeof ExtendedChunkDeltaToolCallSchema>;
|
|
335
|
+
export type ExtendedDelta = z.infer<typeof ExtendedChunkDeltaSchema>;
|
|
336
|
+
export type LLMUserMessage = z.infer<typeof LLMUserMessageSchema>;
|
|
337
|
+
export type LLMToolMessage = z.infer<typeof LLMToolMessageSchema>;
|
|
338
|
+
export type CompletionUsage = z.infer<typeof CompletionUsageSchema>;
|
|
339
|
+
export type FinishReason = z.infer<typeof FinishReasonSchema>;
|
|
340
|
+
export declare function getEmptyUsage(): CompletionUsage;
|
|
341
|
+
/**
|
|
342
|
+
* Extended choice type that includes thought_signature in the delta.
|
|
343
|
+
*/
|
|
344
|
+
interface ExtendedChoice extends Omit<ChatCompletionChunk.Choice, 'delta'> {
|
|
345
|
+
/**
|
|
346
|
+
* A chat completion delta generated by streamed model responses, with thought_signature support.
|
|
347
|
+
*/
|
|
348
|
+
delta: ExtendedDelta;
|
|
349
|
+
}
|
|
350
|
+
/**
|
|
351
|
+
* Extended chat completion chunk that includes thought_signature in tool calls.
|
|
352
|
+
* `usage` is harness-normalized; the LLM adapter maps the wire `usage` payload at the adapter boundary.
|
|
353
|
+
*/
|
|
354
|
+
export interface ExtendedChatCompletionChunk extends Omit<ChatCompletionChunk, 'choices' | 'usage'> {
|
|
355
|
+
/**
|
|
356
|
+
* A list of chat completion choices, with thought_signature support in deltas.
|
|
357
|
+
*/
|
|
358
|
+
choices: ExtendedChoice[];
|
|
359
|
+
usage?: CompletionUsage | null;
|
|
360
|
+
}
|
|
361
|
+
export interface RawAssistantMessageWithUsage {
|
|
362
|
+
output: RawAssistantMessage;
|
|
363
|
+
usage: CompletionUsage;
|
|
364
|
+
/** null when the stream ended without a finish_reason chunk (e.g. provider omitted it). */
|
|
365
|
+
finish_reason: FinishReason | null;
|
|
366
|
+
}
|
|
367
|
+
export declare const UNKNOWN_TOOL_NAME = "unknown";
|
|
368
|
+
export {};
|
|
369
|
+
//# sourceMappingURL=LLMTypes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LLMTypes.d.ts","sourceRoot":"","sources":["../../../src/core/llm/LLMTypes.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,CAAC,EAAE,MAAM,mBAAmB,CAAC;AACtC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAWjE,eAAO,MAAM,mBAAmB;;;;iBAML,CAAC;AAE5B,eAAO,MAAM,2BAA2B;;;iBAKL,CAAC;AAEpC,eAAO,MAAM,wBAAwB;;;;;;;mBAA8D,CAAC;AAEpG,eAAO,MAAM,0BAA0B;;;;;;;;;;;;iBAUrC,CAAC;AAEH,eAAO,MAAM,+BAA+B;;;iBAKL,CAAC;AAExC,eAAO,MAAM,iBAAiB;;;;;iBAOL,CAAC;AAE1B,eAAO,MAAM,iBAAiB;;;;;;;;iBAEL,CAAC;AAE1B,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;;;iBAEzC,CAAC;AAEH,eAAO,MAAM,cAAc;;;;;;;;2BAEL,CAAC;AAEvB,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;iBAEb,CAAC;AAEvB,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAaL,CAAC;AAElC,eAAO,MAAM,sCAAsC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAIjD,CAAC;AAGH,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAQL,CAAC;AAEvC,eAAO,MAAM,gCAAgC;;;;;;;;;;;;;;;;;;iBAGL,CAAC;AAEzC,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAQL,CAAC;AAEjC,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAGL,CAAC;AAE7B,eAAO,MAAM,oBAAoB;;;;iBAKL,CAAC;AAE7B,eAAO,MAAM,qBAAqB;;;;;;;;iBAUL,CAAC;AAE9B,eAAO,MAAM,kBAAkB;;;;;;EAAgE,CAAC;AAEhG,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAChE,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAChF,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAC9E,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,+BAA+B,CAAC,CAAC;AACxF,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAC5D,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AACtD,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,8BAA8B,CAAC,CAAC;AACtF,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AACtE,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAC5E,MAAM,MAAM,gCAAgC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sCAAsC,CAAC,CAAC;AACtG,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,8BAA8B,CAAC,CAAC;AACtF,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gCAAgC,CAAC,CAAC;AACrF,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AACrE,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAClE,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAClE,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AACpE,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAE9D,wBAAgB,aAAa,IAAI,eAAe,CAE/C;AAED;;GAEG;AACH,UAAU,cAAe,SAAQ,IAAI,CAAC,mBAAmB,CAAC,MAAM,EAAE,OAAO,CAAC;IACxE;;OAEG;IACH,KAAK,EAAE,aAAa,CAAC;CACtB;AAED;;;GAGG;AACH,MAAM,WAAW,2BAA4B,SAAQ,IAAI,CAAC,mBAAmB,EAAE,SAAS,GAAG,OAAO,CAAC;IACjG;;OAEG;IACH,OAAO,EAAE,cAAc,EAAE,CAAC;IAC1B,KAAK,CAAC,EAAE,eAAe,GAAG,IAAI,CAAC;CAChC;AAED,MAAM,WAAW,4BAA4B;IAC3C,MAAM,EAAE,mBAAmB,CAAC;IAC5B,KAAK,EAAE,eAAe,CAAC;IACvB,2FAA2F;IAC3F,aAAa,EAAE,YAAY,GAAG,IAAI,CAAC;CACpC;AAED,eAAO,MAAM,iBAAiB,YAAY,CAAC"}
|