@truefoundry/trueforge-core 0.1.0-rc.0 → 0.1.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/dist/core/index.d.ts +9 -3
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +25 -0
- package/dist/core/index.js.map +1 -1
- package/dist/core/index.mjs +24 -2
- package/dist/core/index.mjs.map +1 -1
- package/dist/core/llm/VercelAILLM.d.ts +1 -0
- package/dist/core/llm/VercelAILLM.d.ts.map +1 -1
- package/dist/core/llm/VercelAILLM.js +9 -14
- package/dist/core/llm/VercelAILLM.js.map +1 -1
- package/dist/core/llm/VercelAILLM.mjs +9 -15
- package/dist/core/llm/VercelAILLM.mjs.map +1 -1
- package/dist/core/runtime/AgentThread.d.ts.map +1 -1
- package/dist/core/runtime/AgentThread.js +3 -1
- package/dist/core/runtime/AgentThread.js.map +1 -1
- package/dist/core/runtime/AgentThread.mjs +3 -1
- package/dist/core/runtime/AgentThread.mjs.map +1 -1
- package/dist/core/sandbox/Sandbox.d.ts +7 -9
- package/dist/core/sandbox/Sandbox.d.ts.map +1 -1
- package/dist/core/sandbox/Sandbox.js +45 -61
- package/dist/core/sandbox/Sandbox.js.map +1 -1
- package/dist/core/sandbox/Sandbox.mjs +46 -62
- package/dist/core/sandbox/Sandbox.mjs.map +1 -1
- package/dist/core/sandbox/codeMode/CodeModeDispatcher.d.ts +29 -0
- package/dist/core/sandbox/codeMode/CodeModeDispatcher.d.ts.map +1 -0
- package/dist/core/sandbox/codeMode/CodeModeDispatcher.js +128 -0
- package/dist/core/sandbox/codeMode/CodeModeDispatcher.js.map +1 -0
- package/dist/core/sandbox/codeMode/CodeModeDispatcher.mjs +107 -0
- package/dist/core/sandbox/codeMode/CodeModeDispatcher.mjs.map +1 -0
- package/dist/core/sandbox/codeMode/CodeModeTransport.d.ts +21 -0
- package/dist/core/sandbox/codeMode/CodeModeTransport.d.ts.map +1 -0
- package/dist/core/sandbox/codeMode/CodeModeTransport.js +19 -0
- package/dist/core/sandbox/codeMode/CodeModeTransport.js.map +1 -0
- package/dist/core/sandbox/codeMode/CodeModeTransport.mjs +1 -0
- package/dist/core/sandbox/codeMode/CodeModeTransport.mjs.map +1 -0
- package/dist/core/sandbox/codeMode/nats/CodeModeNatsTransport.d.ts +34 -0
- package/dist/core/sandbox/codeMode/nats/CodeModeNatsTransport.d.ts.map +1 -0
- package/dist/core/sandbox/codeMode/nats/CodeModeNatsTransport.js +187 -0
- package/dist/core/sandbox/codeMode/nats/CodeModeNatsTransport.js.map +1 -0
- package/dist/core/sandbox/codeMode/nats/CodeModeNatsTransport.mjs +162 -0
- package/dist/core/sandbox/codeMode/nats/CodeModeNatsTransport.mjs.map +1 -0
- package/dist/core/sandbox/codeMode/types.d.ts +34 -0
- package/dist/core/sandbox/codeMode/types.d.ts.map +1 -0
- package/dist/core/sandbox/codeMode/types.js +59 -0
- package/dist/core/sandbox/codeMode/types.js.map +1 -0
- package/dist/core/sandbox/codeMode/types.mjs +32 -0
- package/dist/core/sandbox/codeMode/types.mjs.map +1 -0
- package/dist/core/sandbox/provider/DaytonaProvider.d.ts +2 -1
- package/dist/core/sandbox/provider/DaytonaProvider.d.ts.map +1 -1
- package/dist/core/sandbox/provider/DaytonaProvider.js +13 -6
- package/dist/core/sandbox/provider/DaytonaProvider.js.map +1 -1
- package/dist/core/sandbox/provider/DaytonaProvider.mjs +13 -6
- package/dist/core/sandbox/provider/DaytonaProvider.mjs.map +1 -1
- package/dist/core/sandbox/provider/Provider.d.ts +4 -3
- package/dist/core/sandbox/provider/Provider.d.ts.map +1 -1
- package/dist/core/sandbox/provider/Provider.js.map +1 -1
- package/dist/core/sandbox/provider/Provider.mjs.map +1 -1
- package/dist/core/sandbox/provider/TFYSandboxProvider.d.ts +2 -1
- package/dist/core/sandbox/provider/TFYSandboxProvider.d.ts.map +1 -1
- package/dist/core/sandbox/provider/TFYSandboxProvider.js +8 -2
- package/dist/core/sandbox/provider/TFYSandboxProvider.js.map +1 -1
- package/dist/core/sandbox/provider/TFYSandboxProvider.mjs +8 -2
- package/dist/core/sandbox/provider/TFYSandboxProvider.mjs.map +1 -1
- package/dist/core/sandbox/sandboxImage.d.ts +1 -1
- package/dist/core/sandbox/sandboxImage.d.ts.map +1 -1
- package/dist/core/sandbox/sandboxImage.js +1 -1
- package/dist/core/sandbox/sandboxImage.js.map +1 -1
- package/dist/core/sandbox/sandboxImage.mjs +1 -1
- package/dist/core/sandbox/sandboxImage.mjs.map +1 -1
- package/dist/core/sandbox/sandboxScripts.gen.d.ts +1 -1
- package/dist/core/sandbox/sandboxScripts.gen.d.ts.map +1 -1
- package/dist/core/sandbox/sandboxScripts.gen.js +8 -8
- package/dist/core/sandbox/sandboxScripts.gen.js.map +1 -1
- package/dist/core/sandbox/sandboxScripts.gen.mjs +8 -8
- package/dist/core/sandbox/sandboxScripts.gen.mjs.map +1 -1
- package/dist/core/util/errorLogFields.d.ts +5 -0
- package/dist/core/util/errorLogFields.d.ts.map +1 -1
- package/dist/core/util/errorLogFields.js +38 -2
- package/dist/core/util/errorLogFields.js.map +1 -1
- package/dist/core/util/errorLogFields.mjs +37 -2
- package/dist/core/util/errorLogFields.mjs.map +1 -1
- package/package.json +1 -1
- package/dist/core/sandbox/SandboxNatsBridge.d.ts +0 -33
- package/dist/core/sandbox/SandboxNatsBridge.d.ts.map +0 -1
- package/dist/core/sandbox/SandboxNatsBridge.js +0 -222
- package/dist/core/sandbox/SandboxNatsBridge.js.map +0 -1
- package/dist/core/sandbox/SandboxNatsBridge.mjs +0 -201
- package/dist/core/sandbox/SandboxNatsBridge.mjs.map +0 -1
package/dist/core/index.d.ts
CHANGED
|
@@ -44,15 +44,21 @@ export { AgentThreadMetricsSchema } from './runtime/metrics';
|
|
|
44
44
|
export type { AgentThreadMetrics } from './runtime/metrics';
|
|
45
45
|
export type { AgentExecutionTrace, AgentLocalToolTrace, AgentRemoteMcpToolTrace, AgentTracing, } from './tracing/AgentTracing';
|
|
46
46
|
export { AgentHarnessError, McpConnectionError, McpDcrConfigurationError } from './errors';
|
|
47
|
-
export { extractErrorLogFields } from './util/errorLogFields';
|
|
47
|
+
export { describeUnknownError, extractErrorLogFields } from './util/errorLogFields';
|
|
48
48
|
export { PromiseTimeoutError, withTimeout } from './util/promiseUtils';
|
|
49
|
+
export { CodeModeDispatcher } from './sandbox/codeMode/CodeModeDispatcher';
|
|
50
|
+
export type { CodeModeLogger } from './sandbox/codeMode/CodeModeDispatcher';
|
|
51
|
+
export type { CodeModeTransport } from './sandbox/codeMode/CodeModeTransport';
|
|
52
|
+
export { CodeModeErrorSourceSchema, CodeModeReplySchema, CodeModeRequestSchema } from './sandbox/codeMode/types';
|
|
53
|
+
export type { CodeModeErrorSource, CodeModeReply, CodeModeRequest } from './sandbox/codeMode/types';
|
|
49
54
|
export { DaytonaSandboxProvider } from './sandbox/provider/DaytonaProvider';
|
|
50
55
|
export type { DaytonaSandboxProviderOptions } from './sandbox/provider/DaytonaProvider';
|
|
51
|
-
export
|
|
56
|
+
export { ensureExecSuccess, shellEscape } from './sandbox/provider/Provider';
|
|
57
|
+
export type { ExecErrorResult, ExecResult, ExecSuccessResult, SandboxBuild, SandboxBuildMetadata, SandboxBuildStatus, SandboxExecParams, SandboxInit, SandboxProvider, } from './sandbox/provider/Provider';
|
|
52
58
|
export { TFYSandboxProvider } from './sandbox/provider/TFYSandboxProvider';
|
|
53
59
|
export { SKILL_DOWNLOAD_TIMEOUT_SECONDS, Sandbox, buildWriteAndRunScriptCommand } from './sandbox/Sandbox';
|
|
54
60
|
export type { SandboxInfo } from './sandbox/Sandbox';
|
|
55
|
-
export { SandboxError, validateNoPathTraversal, validateSandboxOwnedByTenant } from './sandbox/SandboxErrors';
|
|
61
|
+
export { SandboxError, SandboxFileNotFoundError, SandboxFileTooLargeError, SandboxNotAvailableError, SandboxPathIsDirectoryError, validateNoPathTraversal, validateSandboxOwnedByTenant, } from './sandbox/SandboxErrors';
|
|
56
62
|
export { SANDBOX_IMAGE_URI } from './sandbox/sandboxImage';
|
|
57
63
|
export { InstructionBuilder } from './InstructionBuilder';
|
|
58
64
|
export { SKILLS_PREAMBLE, SkillMounter, getSkillPath, renderSkillPromptBody } from './sandbox/skills';
|
package/dist/core/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/core/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,YAAY,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAC9E,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,YAAY,EACV,SAAS,EACT,WAAW,EACX,cAAc,EACd,wBAAwB,EACxB,yBAAyB,EACzB,gBAAgB,EAChB,yBAAyB,EACzB,0BAA0B,EAC1B,wBAAwB,GACzB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,uBAAuB,EAAE,MAAM,mCAAmC,CAAC;AAC5E,YAAY,EAAE,2BAA2B,EAAE,MAAM,uCAAuC,CAAC;AACzF,OAAO,EAAE,uBAAuB,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAC/G,YAAY,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AAGxE,YAAY,EAAE,eAAe,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAClG,YAAY,EACV,2BAA2B,EAC3B,2BAA2B,EAC3B,iCAAiC,EACjC,oCAAoC,GACrC,MAAM,sCAAsC,CAAC;AAG9C,OAAO,EAAE,eAAe,EAAE,MAAM,yCAAyC,CAAC;AAC1E,OAAO,EACL,2CAA2C,EAC3C,iBAAiB,GAClB,MAAM,2CAA2C,CAAC;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,yCAAyC,CAAC;AAC1E,OAAO,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,0CAA0C,CAAC;AAChG,OAAO,EACL,uCAA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,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC7E,YAAY,EACV,eAAe,EACf,UAAU,EACV,iBAAiB,EACjB,YAAY,EACZ,oBAAoB,EACpB,kBAAkB,EAClB,iBAAiB,EACjB,WAAW,EACX,eAAe,GAChB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,kBAAkB,EAAE,MAAM,uCAAuC,CAAC;AAC3E,OAAO,EAAE,8BAA8B,EAAE,OAAO,EAAE,6BAA6B,EAAE,MAAM,mBAAmB,CAAC;AAC3G,YAAY,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,EACL,YAAY,EACZ,wBAAwB,EACxB,wBAAwB,EACxB,wBAAwB,EACxB,2BAA2B,EAC3B,uBAAuB,EACvB,4BAA4B,GAC7B,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAG3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,YAAY,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AACtG,YAAY,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC"}
|
package/dist/core/index.js
CHANGED
|
@@ -27,6 +27,10 @@ __export(core_exports, {
|
|
|
27
27
|
AgentThreadMetricsSchema: () => import_metrics.AgentThreadMetricsSchema,
|
|
28
28
|
AgentThreadOrchestrator: () => import_AgentThreadOrchestrator.AgentThreadOrchestrator,
|
|
29
29
|
ClientSideTool: () => import_ClientSideTool.ClientSideTool,
|
|
30
|
+
CodeModeDispatcher: () => import_CodeModeDispatcher.CodeModeDispatcher,
|
|
31
|
+
CodeModeErrorSourceSchema: () => import_types.CodeModeErrorSourceSchema,
|
|
32
|
+
CodeModeReplySchema: () => import_types.CodeModeReplySchema,
|
|
33
|
+
CodeModeRequestSchema: () => import_types.CodeModeRequestSchema,
|
|
30
34
|
CompletionUsageSchema: () => import_LLMTypes.CompletionUsageSchema,
|
|
31
35
|
DEFAULT_CONTEXT_COMPACTION_THRESHOLD_TOKENS: () => import_ContextCompaction.DEFAULT_CONTEXT_COMPACTION_THRESHOLD_TOKENS,
|
|
32
36
|
DEFAULT_DISABLE_TOOLS: () => import_toolSelectors.DEFAULT_DISABLE_TOOLS,
|
|
@@ -60,6 +64,10 @@ __export(core_exports, {
|
|
|
60
64
|
Sandbox: () => import_Sandbox.Sandbox,
|
|
61
65
|
SandboxCreatedEventSchema: () => import_schema.SandboxCreatedEventSchema,
|
|
62
66
|
SandboxError: () => import_SandboxErrors.SandboxError,
|
|
67
|
+
SandboxFileNotFoundError: () => import_SandboxErrors.SandboxFileNotFoundError,
|
|
68
|
+
SandboxFileTooLargeError: () => import_SandboxErrors.SandboxFileTooLargeError,
|
|
69
|
+
SandboxNotAvailableError: () => import_SandboxErrors.SandboxNotAvailableError,
|
|
70
|
+
SandboxPathIsDirectoryError: () => import_SandboxErrors.SandboxPathIsDirectoryError,
|
|
63
71
|
SkillMounter: () => import_skills.SkillMounter,
|
|
64
72
|
TFYSandboxProvider: () => import_TFYSandboxProvider.TFYSandboxProvider,
|
|
65
73
|
TOOLS_SELECTOR_TAGS: () => import_toolSelectors.TOOLS_SELECTOR_TAGS,
|
|
@@ -79,7 +87,9 @@ __export(core_exports, {
|
|
|
79
87
|
contextCompaction: () => import_ContextCompaction.contextCompaction,
|
|
80
88
|
currentDateTime: () => import_CurrentDateTime.currentDateTime,
|
|
81
89
|
defineTool: () => import_LocalToolMCP.defineTool,
|
|
90
|
+
describeUnknownError: () => import_errorLogFields.describeUnknownError,
|
|
82
91
|
dynamicSubAgents: () => import_DynamicSubAgents.dynamicSubAgents,
|
|
92
|
+
ensureExecSuccess: () => import_Provider.ensureExecSuccess,
|
|
83
93
|
extractErrorLogFields: () => import_errorLogFields.extractErrorLogFields,
|
|
84
94
|
getSkillPath: () => import_skills.getSkillPath,
|
|
85
95
|
isAgentInputUserMessage: () => import_UserInputMessage.isAgentInputUserMessage,
|
|
@@ -90,6 +100,7 @@ __export(core_exports, {
|
|
|
90
100
|
newEventId: () => import_schema.newEventId,
|
|
91
101
|
openUI: () => import_OpenUI.openUI,
|
|
92
102
|
renderSkillPromptBody: () => import_skills.renderSkillPromptBody,
|
|
103
|
+
shellEscape: () => import_Provider.shellEscape,
|
|
93
104
|
toOpenAIResponseFormat: () => import_responseFormat.toOpenAIResponseFormat,
|
|
94
105
|
toolResultResponse: () => import_IMCPServer.toolResultResponse,
|
|
95
106
|
validateNoPathTraversal: () => import_SandboxErrors.validateNoPathTraversal,
|
|
@@ -121,7 +132,10 @@ var import_metrics = require("./runtime/metrics.js");
|
|
|
121
132
|
var import_errors = require("./errors.js");
|
|
122
133
|
var import_errorLogFields = require("./util/errorLogFields.js");
|
|
123
134
|
var import_promiseUtils = require("./util/promiseUtils.js");
|
|
135
|
+
var import_CodeModeDispatcher = require("./sandbox/codeMode/CodeModeDispatcher.js");
|
|
136
|
+
var import_types = require("./sandbox/codeMode/types.js");
|
|
124
137
|
var import_DaytonaProvider = require("./sandbox/provider/DaytonaProvider.js");
|
|
138
|
+
var import_Provider = require("./sandbox/provider/Provider.js");
|
|
125
139
|
var import_TFYSandboxProvider = require("./sandbox/provider/TFYSandboxProvider.js");
|
|
126
140
|
var import_Sandbox = require("./sandbox/Sandbox.js");
|
|
127
141
|
var import_SandboxErrors = require("./sandbox/SandboxErrors.js");
|
|
@@ -137,6 +151,10 @@ var import_skills = require("./sandbox/skills/index.js");
|
|
|
137
151
|
AgentThreadMetricsSchema,
|
|
138
152
|
AgentThreadOrchestrator,
|
|
139
153
|
ClientSideTool,
|
|
154
|
+
CodeModeDispatcher,
|
|
155
|
+
CodeModeErrorSourceSchema,
|
|
156
|
+
CodeModeReplySchema,
|
|
157
|
+
CodeModeRequestSchema,
|
|
140
158
|
CompletionUsageSchema,
|
|
141
159
|
DEFAULT_CONTEXT_COMPACTION_THRESHOLD_TOKENS,
|
|
142
160
|
DEFAULT_DISABLE_TOOLS,
|
|
@@ -170,6 +188,10 @@ var import_skills = require("./sandbox/skills/index.js");
|
|
|
170
188
|
Sandbox,
|
|
171
189
|
SandboxCreatedEventSchema,
|
|
172
190
|
SandboxError,
|
|
191
|
+
SandboxFileNotFoundError,
|
|
192
|
+
SandboxFileTooLargeError,
|
|
193
|
+
SandboxNotAvailableError,
|
|
194
|
+
SandboxPathIsDirectoryError,
|
|
173
195
|
SkillMounter,
|
|
174
196
|
TFYSandboxProvider,
|
|
175
197
|
TOOLS_SELECTOR_TAGS,
|
|
@@ -189,7 +211,9 @@ var import_skills = require("./sandbox/skills/index.js");
|
|
|
189
211
|
contextCompaction,
|
|
190
212
|
currentDateTime,
|
|
191
213
|
defineTool,
|
|
214
|
+
describeUnknownError,
|
|
192
215
|
dynamicSubAgents,
|
|
216
|
+
ensureExecSuccess,
|
|
193
217
|
extractErrorLogFields,
|
|
194
218
|
getSkillPath,
|
|
195
219
|
isAgentInputUserMessage,
|
|
@@ -200,6 +224,7 @@ var import_skills = require("./sandbox/skills/index.js");
|
|
|
200
224
|
newEventId,
|
|
201
225
|
openUI,
|
|
202
226
|
renderSkillPromptBody,
|
|
227
|
+
shellEscape,
|
|
203
228
|
toOpenAIResponseFormat,
|
|
204
229
|
toolResultResponse,
|
|
205
230
|
validateNoPathTraversal,
|
package/dist/core/index.js.map
CHANGED
|
@@ -1 +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 {
|
|
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 { describeUnknownError, extractErrorLogFields } from './util/errorLogFields';\nexport { PromiseTimeoutError, withTimeout } from './util/promiseUtils';\n\n// Sandbox (concrete implementation; provider details exported for composition)\nexport { CodeModeDispatcher } from './sandbox/codeMode/CodeModeDispatcher';\nexport type { CodeModeLogger } from './sandbox/codeMode/CodeModeDispatcher';\nexport type { CodeModeTransport } from './sandbox/codeMode/CodeModeTransport';\nexport { CodeModeErrorSourceSchema, CodeModeReplySchema, CodeModeRequestSchema } from './sandbox/codeMode/types';\nexport type { CodeModeErrorSource, CodeModeReply, CodeModeRequest } from './sandbox/codeMode/types';\nexport { DaytonaSandboxProvider } from './sandbox/provider/DaytonaProvider';\nexport type { DaytonaSandboxProviderOptions } from './sandbox/provider/DaytonaProvider';\nexport { ensureExecSuccess, shellEscape } from './sandbox/provider/Provider';\nexport type {\n ExecErrorResult,\n ExecResult,\n ExecSuccessResult,\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 {\n SandboxError,\n SandboxFileNotFoundError,\n SandboxFileTooLargeError,\n SandboxNotAvailableError,\n SandboxPathIsDirectoryError,\n validateNoPathTraversal,\n validateSandboxOwnedByTenant,\n} 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;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,4BAA4D;AAC5D,0BAAiD;AAGjD,gCAAmC;AAGnC,mBAAsF;AAEtF,6BAAuC;AAEvC,sBAA+C;AAY/C,gCAAmC;AACnC,qBAAuF;AAEvF,2BAQO;AACP,0BAAkC;AAGlC,gCAAmC;AACnC,oBAAmF;","names":["import_AgentThread"]}
|
package/dist/core/index.mjs
CHANGED
|
@@ -55,12 +55,23 @@ import { CompletionUsageSchema } from "./llm/LLMTypes.mjs";
|
|
|
55
55
|
import { InternalEventType } from "./runtime/AgentThread.types.mjs";
|
|
56
56
|
import { AgentThreadMetricsSchema } from "./runtime/metrics.mjs";
|
|
57
57
|
import { AgentHarnessError, McpConnectionError, McpDcrConfigurationError } from "./errors.mjs";
|
|
58
|
-
import { extractErrorLogFields } from "./util/errorLogFields.mjs";
|
|
58
|
+
import { describeUnknownError, extractErrorLogFields } from "./util/errorLogFields.mjs";
|
|
59
59
|
import { PromiseTimeoutError, withTimeout } from "./util/promiseUtils.mjs";
|
|
60
|
+
import { CodeModeDispatcher } from "./sandbox/codeMode/CodeModeDispatcher.mjs";
|
|
61
|
+
import { CodeModeErrorSourceSchema, CodeModeReplySchema, CodeModeRequestSchema } from "./sandbox/codeMode/types.mjs";
|
|
60
62
|
import { DaytonaSandboxProvider } from "./sandbox/provider/DaytonaProvider.mjs";
|
|
63
|
+
import { ensureExecSuccess, shellEscape } from "./sandbox/provider/Provider.mjs";
|
|
61
64
|
import { TFYSandboxProvider } from "./sandbox/provider/TFYSandboxProvider.mjs";
|
|
62
65
|
import { SKILL_DOWNLOAD_TIMEOUT_SECONDS, Sandbox, buildWriteAndRunScriptCommand } from "./sandbox/Sandbox.mjs";
|
|
63
|
-
import {
|
|
66
|
+
import {
|
|
67
|
+
SandboxError,
|
|
68
|
+
SandboxFileNotFoundError,
|
|
69
|
+
SandboxFileTooLargeError,
|
|
70
|
+
SandboxNotAvailableError,
|
|
71
|
+
SandboxPathIsDirectoryError,
|
|
72
|
+
validateNoPathTraversal,
|
|
73
|
+
validateSandboxOwnedByTenant
|
|
74
|
+
} from "./sandbox/SandboxErrors.mjs";
|
|
64
75
|
import { SANDBOX_IMAGE_URI } from "./sandbox/sandboxImage.mjs";
|
|
65
76
|
import { InstructionBuilder } from "./InstructionBuilder.mjs";
|
|
66
77
|
import { SKILLS_PREAMBLE, SkillMounter, getSkillPath, renderSkillPromptBody } from "./sandbox/skills/index.mjs";
|
|
@@ -72,6 +83,10 @@ export {
|
|
|
72
83
|
AgentThreadMetricsSchema,
|
|
73
84
|
AgentThreadOrchestrator,
|
|
74
85
|
ClientSideTool,
|
|
86
|
+
CodeModeDispatcher,
|
|
87
|
+
CodeModeErrorSourceSchema,
|
|
88
|
+
CodeModeReplySchema,
|
|
89
|
+
CodeModeRequestSchema,
|
|
75
90
|
CompletionUsageSchema,
|
|
76
91
|
DEFAULT_CONTEXT_COMPACTION_THRESHOLD_TOKENS,
|
|
77
92
|
DEFAULT_DISABLE_TOOLS,
|
|
@@ -105,6 +120,10 @@ export {
|
|
|
105
120
|
Sandbox,
|
|
106
121
|
SandboxCreatedEventSchema,
|
|
107
122
|
SandboxError,
|
|
123
|
+
SandboxFileNotFoundError,
|
|
124
|
+
SandboxFileTooLargeError,
|
|
125
|
+
SandboxNotAvailableError,
|
|
126
|
+
SandboxPathIsDirectoryError,
|
|
108
127
|
SkillMounter,
|
|
109
128
|
TFYSandboxProvider,
|
|
110
129
|
TOOLS_SELECTOR_TAGS,
|
|
@@ -124,7 +143,9 @@ export {
|
|
|
124
143
|
contextCompaction,
|
|
125
144
|
currentDateTime,
|
|
126
145
|
defineTool,
|
|
146
|
+
describeUnknownError,
|
|
127
147
|
dynamicSubAgents,
|
|
148
|
+
ensureExecSuccess,
|
|
128
149
|
extractErrorLogFields,
|
|
129
150
|
getSkillPath,
|
|
130
151
|
isAgentInputUserMessage,
|
|
@@ -135,6 +156,7 @@ export {
|
|
|
135
156
|
newEventId,
|
|
136
157
|
openUI,
|
|
137
158
|
renderSkillPromptBody,
|
|
159
|
+
shellEscape,
|
|
138
160
|
toOpenAIResponseFormat,
|
|
139
161
|
toolResultResponse,
|
|
140
162
|
validateNoPathTraversal,
|
package/dist/core/index.mjs.map
CHANGED
|
@@ -1 +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 {
|
|
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 { describeUnknownError, extractErrorLogFields } from './util/errorLogFields';\nexport { PromiseTimeoutError, withTimeout } from './util/promiseUtils';\n\n// Sandbox (concrete implementation; provider details exported for composition)\nexport { CodeModeDispatcher } from './sandbox/codeMode/CodeModeDispatcher';\nexport type { CodeModeLogger } from './sandbox/codeMode/CodeModeDispatcher';\nexport type { CodeModeTransport } from './sandbox/codeMode/CodeModeTransport';\nexport { CodeModeErrorSourceSchema, CodeModeReplySchema, CodeModeRequestSchema } from './sandbox/codeMode/types';\nexport type { CodeModeErrorSource, CodeModeReply, CodeModeRequest } from './sandbox/codeMode/types';\nexport { DaytonaSandboxProvider } from './sandbox/provider/DaytonaProvider';\nexport type { DaytonaSandboxProviderOptions } from './sandbox/provider/DaytonaProvider';\nexport { ensureExecSuccess, shellEscape } from './sandbox/provider/Provider';\nexport type {\n ExecErrorResult,\n ExecResult,\n ExecSuccessResult,\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 {\n SandboxError,\n SandboxFileNotFoundError,\n SandboxFileTooLargeError,\n SandboxNotAvailableError,\n SandboxPathIsDirectoryError,\n validateNoPathTraversal,\n validateSandboxOwnedByTenant,\n} 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,sBAAsB,6BAA6B;AAC5D,SAAS,qBAAqB,mBAAmB;AAGjD,SAAS,0BAA0B;AAGnC,SAAS,2BAA2B,qBAAqB,6BAA6B;AAEtF,SAAS,8BAA8B;AAEvC,SAAS,mBAAmB,mBAAmB;AAY/C,SAAS,0BAA0B;AACnC,SAAS,gCAAgC,SAAS,qCAAqC;AAEvF;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,yBAAyB;AAGlC,SAAS,0BAA0B;AACnC,SAAS,iBAAiB,cAAc,cAAc,6BAA6B;","names":[]}
|
|
@@ -195,6 +195,7 @@ export declare function normalizeUsage(usage: {
|
|
|
195
195
|
* `APICallError`) — plain objects would otherwise stringify to "[object Object]".
|
|
196
196
|
*/
|
|
197
197
|
export declare function describeStreamError(raw: unknown): string;
|
|
198
|
+
export declare function toStreamError(raw: unknown): Error;
|
|
198
199
|
export declare function mapFinishReason(reason: FinishReason): RawAssistantMessageWithUsage['finish_reason'];
|
|
199
200
|
/**
|
|
200
201
|
* Where the SDK reports what it changed about our request: an effort a model cannot honour and so
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VercelAILLM.d.ts","sourceRoot":"","sources":["../../../src/core/llm/VercelAILLM.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,KAAK,EAAE,eAAe,EAAiB,MAAM,wBAAwB,CAAC;AAC7E,OAAO,KAAK,EAEV,WAAW,EACX,QAAQ,EACR,YAAY,EAEZ,aAAa,EACb,wBAAwB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c,CAAC,2BAA2B,EAAE,4BAA4B,EAAE,OAAO,CAAC,CAoGpF;IAEK,eAAe,CAAC,IAAI,EAAE,eAAe,GAAG,OAAO,CAAC,4BAA4B,CAAC,CAQlF;CACF"}
|
|
@@ -39,6 +39,7 @@ __export(VercelAILLM_exports, {
|
|
|
39
39
|
toAssistantModelMessage: () => toAssistantModelMessage,
|
|
40
40
|
toFilePart: () => toFilePart,
|
|
41
41
|
toReasoningLevel: () => toReasoningLevel,
|
|
42
|
+
toStreamError: () => toStreamError,
|
|
42
43
|
toStructuredOutputSpec: () => toStructuredOutputSpec,
|
|
43
44
|
toUserContent: () => toUserContent
|
|
44
45
|
});
|
|
@@ -632,18 +633,11 @@ function describeStreamError(raw) {
|
|
|
632
633
|
}
|
|
633
634
|
return raw.message;
|
|
634
635
|
}
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
return message;
|
|
641
|
-
}
|
|
642
|
-
try {
|
|
643
|
-
return JSON.stringify(raw);
|
|
644
|
-
} catch {
|
|
645
|
-
return `unserialisable provider error (${Object.keys(raw).join(", ")})`;
|
|
646
|
-
}
|
|
636
|
+
return (0, import_errorLogFields.describeUnknownError)(raw);
|
|
637
|
+
}
|
|
638
|
+
function toStreamError(raw) {
|
|
639
|
+
if (raw instanceof Error) return raw;
|
|
640
|
+
return new Error(describeStreamError(raw), { cause: raw });
|
|
647
641
|
}
|
|
648
642
|
function mapFinishReason(reason) {
|
|
649
643
|
switch (reason) {
|
|
@@ -973,7 +967,7 @@ var VercelAILLM = class {
|
|
|
973
967
|
} else {
|
|
974
968
|
this.logger.error("Error creating streaming chat completion", (0, import_errorLogFields.extractErrorLogFields)(error));
|
|
975
969
|
}
|
|
976
|
-
throw error;
|
|
970
|
+
throw toStreamError(error);
|
|
977
971
|
}
|
|
978
972
|
void streamResult.warnings.then(
|
|
979
973
|
(warnings) => {
|
|
@@ -1003,7 +997,7 @@ var VercelAILLM = class {
|
|
|
1003
997
|
} else {
|
|
1004
998
|
this.logger.error("Error reading LLM stream", (0, import_errorLogFields.extractErrorLogFields)(error));
|
|
1005
999
|
}
|
|
1006
|
-
throw error;
|
|
1000
|
+
throw toStreamError(error);
|
|
1007
1001
|
}
|
|
1008
1002
|
}
|
|
1009
1003
|
async createNonStream(body) {
|
|
@@ -1036,6 +1030,7 @@ var VercelAILLM = class {
|
|
|
1036
1030
|
toAssistantModelMessage,
|
|
1037
1031
|
toFilePart,
|
|
1038
1032
|
toReasoningLevel,
|
|
1033
|
+
toStreamError,
|
|
1039
1034
|
toStructuredOutputSpec,
|
|
1040
1035
|
toUserContent
|
|
1041
1036
|
});
|