stitchkit 0.113.2 → 0.113.3
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/CHANGELOG.md +7 -0
- package/dist/contract/errors.d.ts +1 -0
- package/dist/contract/errors.d.ts.map +1 -1
- package/dist/entrypoints/agent-runtime/browser.js +2 -2
- package/dist/entrypoints/agent-runtime/coding-tools.js +4 -4
- package/dist/entrypoints/agent-runtime/harness.js +5 -5
- package/dist/entrypoints/agent-runtime/realtime.js +2 -2
- package/dist/entrypoints/agent-runtime/sandbox.js +4 -4
- package/dist/entrypoints/agent-runtime/sqlite/bun.js +6 -6
- package/dist/entrypoints/agent-runtime/sqlite/node.js +6 -6
- package/dist/entrypoints/agent-runtime/testing.js +6 -6
- package/dist/entrypoints/agent-runtime.js +11 -11
- package/dist/entrypoints/application/grammy.js +1 -1
- package/dist/entrypoints/application.js +2 -2
- package/dist/entrypoints/cli.js +8 -8
- package/dist/entrypoints/contract.js +2 -2
- package/dist/entrypoints/files.js +1 -1
- package/dist/entrypoints/index.js +5 -5
- package/dist/entrypoints/node.js +7 -7
- package/dist/entrypoints/observability.js +1 -1
- package/dist/entrypoints/realtime.js +3 -3
- package/dist/entrypoints/remote.js +1 -1
- package/dist/entrypoints/server.js +8 -8
- package/dist/entrypoints/testing.js +3 -3
- package/dist/entrypoints/tools/connections.js +5 -5
- package/dist/entrypoints/tools/invoker.js +5 -5
- package/dist/entrypoints/tools/mcp.js +7 -7
- package/dist/entrypoints/tools.js +13 -13
- package/dist/{index-cn7xenet.js → index-095ya5hm.js} +5 -5
- package/dist/{index-6ez1r4j2.js → index-1csp1hwm.js} +4 -4
- package/dist/{index-sps9s3aj.js → index-2bqf0a74.js} +1 -1
- package/dist/{index-grn4brx1.js → index-3za04re9.js} +1 -1
- package/dist/{index-09dyy94r.js → index-523tq7y4.js} +1 -1
- package/dist/{index-8swt2h9y.js → index-7fc0c2np.js} +1 -1
- package/dist/{index-2s7wv547.js → index-86nbfysb.js} +3 -3
- package/dist/{index-5gmrx6sc.js → index-98hv3sba.js} +1 -1
- package/dist/{index-4e36ts8b.js → index-9dyd8xzf.js} +1 -1
- package/dist/{index-zbs0g0v2.js → index-aykhzcnf.js} +1 -1
- package/dist/{index-0pfk3c1p.js → index-bjcjqj46.js} +1 -1
- package/dist/{index-vgtzdykw.js → index-cqmqyjax.js} +1 -1
- package/dist/{index-bv51s0f4.js → index-ega3yz4c.js} +1 -1
- package/dist/{index-awbed0mk.js → index-fy4av0hq.js} +1 -1
- package/dist/{index-0gbn42hr.js → index-htxh46ej.js} +3 -3
- package/dist/{index-shg5xc9t.js → index-jk29rwkr.js} +1 -1
- package/dist/{index-e40rzw1m.js → index-k42ckyzx.js} +1 -1
- package/dist/{index-xtc8k5n9.js → index-k7z3j3hr.js} +47 -16
- package/dist/{index-pd578538.js → index-qcn84byh.js} +1 -0
- package/dist/{index-vf9c59t3.js → index-rhzkndr5.js} +2 -2
- package/dist/{index-z8fnfj42.js → index-tpwbct8j.js} +1 -1
- package/dist/{index-7ysby53h.js → index-v1tswj0z.js} +1 -1
- package/dist/{index-a31p9ekx.js → index-v6vb5qx8.js} +4 -4
- package/dist/{index-5zxe0f3h.js → index-vtann8bz.js} +3 -3
- package/dist/{index-kvga921h.js → index-vwhrnp67.js} +4 -4
- package/dist/{index-ptjx84pr.js → index-zktz242w.js} +2 -2
- package/dist/tools/cli/command.d.ts +2 -1
- package/dist/tools/cli/command.d.ts.map +1 -1
- package/dist/tools/cli/format.d.ts +5 -1
- package/dist/tools/cli/format.d.ts.map +1 -1
- package/dist/tools/cli/run-native.d.ts.map +1 -1
- package/llms/cli.2.txt +281 -0
- package/llms/cli.txt +18 -285
- package/llms/server.4.txt +1 -1
- package/llms-full.txt +19 -5
- package/llms.txt +1 -1
- package/package.json +1 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import"../../index-ct75c3at.js";
|
|
2
|
-
import"../../index-
|
|
2
|
+
import"../../index-k42ckyzx.js";
|
|
3
3
|
import"../../index-dsa676h8.js";
|
|
4
4
|
import"../../index-rbzq0q16.js";
|
|
5
|
-
import"../../index-
|
|
6
|
-
import"../../index-
|
|
7
|
-
import"../../index-
|
|
5
|
+
import"../../index-rhzkndr5.js";
|
|
6
|
+
import"../../index-v6vb5qx8.js";
|
|
7
|
+
import"../../index-htxh46ej.js";
|
|
8
8
|
import {
|
|
9
9
|
RESOURCE_MIME_TYPE2,
|
|
10
10
|
EXT_APPS_BUNDLE_PLACEHOLDER2,
|
|
@@ -20,9 +20,9 @@ import {
|
|
|
20
20
|
createMcpHttpRoute2,
|
|
21
21
|
createStdioMcpServer2,
|
|
22
22
|
bindStdioProcessSignals2
|
|
23
|
-
} from "../../index-
|
|
24
|
-
import"../../index-
|
|
25
|
-
import"../../index-
|
|
23
|
+
} from "../../index-095ya5hm.js";
|
|
24
|
+
import"../../index-86nbfysb.js";
|
|
25
|
+
import"../../index-ega3yz4c.js";
|
|
26
26
|
export {
|
|
27
27
|
EXT_APPS_BUNDLE_PLACEHOLDER2 as EXT_APPS_BUNDLE_PLACEHOLDER,
|
|
28
28
|
MCP_CATALOG_META_KEY2 as MCP_CATALOG_META_KEY,
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
} from "../index-56yx8dxp.js";
|
|
9
9
|
import {
|
|
10
10
|
normalizeError2
|
|
11
|
-
} from "../index-
|
|
11
|
+
} from "../index-k42ckyzx.js";
|
|
12
12
|
import"../index-dsa676h8.js";
|
|
13
13
|
import {
|
|
14
14
|
coerceJsonArgs2
|
|
@@ -21,19 +21,19 @@ import {
|
|
|
21
21
|
findNonPortableFormats2,
|
|
22
22
|
flattenToolJsonSchema2,
|
|
23
23
|
findUntypedProperties2
|
|
24
|
-
} from "../index-
|
|
24
|
+
} from "../index-rhzkndr5.js";
|
|
25
25
|
import {
|
|
26
26
|
ToolExecutionControlError2,
|
|
27
27
|
isToolExecutionControlError2
|
|
28
|
-
} from "../index-
|
|
28
|
+
} from "../index-v6vb5qx8.js";
|
|
29
29
|
import {
|
|
30
30
|
collectTools2
|
|
31
|
-
} from "../index-
|
|
31
|
+
} from "../index-htxh46ej.js";
|
|
32
32
|
import {
|
|
33
33
|
mountAgent2,
|
|
34
34
|
describeToolCatalog2,
|
|
35
35
|
buildToolManifest2
|
|
36
|
-
} from "../index-
|
|
36
|
+
} from "../index-1csp1hwm.js";
|
|
37
37
|
import"../index-m38ej7e5.js";
|
|
38
38
|
import {
|
|
39
39
|
ALL_TRANSPORTS2,
|
|
@@ -60,7 +60,7 @@ import {
|
|
|
60
60
|
createMcpHttpRoute2,
|
|
61
61
|
createStdioMcpServer2,
|
|
62
62
|
bindStdioProcessSignals2
|
|
63
|
-
} from "../index-
|
|
63
|
+
} from "../index-095ya5hm.js";
|
|
64
64
|
import {
|
|
65
65
|
AsyncOperationCancelResultSchema2,
|
|
66
66
|
createAsyncOperationSnapshotSchema2,
|
|
@@ -74,7 +74,7 @@ import {
|
|
|
74
74
|
WaitTimeoutError,
|
|
75
75
|
runWaitOperation,
|
|
76
76
|
createCli2
|
|
77
|
-
} from "../index-
|
|
77
|
+
} from "../index-k7z3j3hr.js";
|
|
78
78
|
import {
|
|
79
79
|
ManagedFilePathSchema2,
|
|
80
80
|
ManagedFileRefSchema2
|
|
@@ -82,14 +82,14 @@ import {
|
|
|
82
82
|
import {
|
|
83
83
|
signJwt2,
|
|
84
84
|
verifyPkce2
|
|
85
|
-
} from "../index-
|
|
85
|
+
} from "../index-9dyd8xzf.js";
|
|
86
86
|
import {
|
|
87
87
|
contractOnlyService,
|
|
88
88
|
mediaTypeEssence
|
|
89
|
-
} from "../index-
|
|
89
|
+
} from "../index-cqmqyjax.js";
|
|
90
90
|
import {
|
|
91
91
|
createToolInvoker2
|
|
92
|
-
} from "../index-
|
|
92
|
+
} from "../index-vwhrnp67.js";
|
|
93
93
|
import {
|
|
94
94
|
ManagedFileError2
|
|
95
95
|
} from "../index-2f9r0jgr.js";
|
|
@@ -111,21 +111,21 @@ import {
|
|
|
111
111
|
} from "../index-yk4g8805.js";
|
|
112
112
|
import {
|
|
113
113
|
collectToolSurface
|
|
114
|
-
} from "../index-
|
|
114
|
+
} from "../index-86nbfysb.js";
|
|
115
115
|
import {
|
|
116
116
|
getTraceId2
|
|
117
117
|
} from "../index-r6v4mc67.js";
|
|
118
118
|
import {
|
|
119
119
|
defineRuntimeTool2,
|
|
120
120
|
createRuntimeToolFactory2
|
|
121
|
-
} from "../index-
|
|
121
|
+
} from "../index-ega3yz4c.js";
|
|
122
122
|
import {
|
|
123
123
|
formatZodError2
|
|
124
124
|
} from "../index-1eeqpadm.js";
|
|
125
125
|
import {
|
|
126
126
|
AppError2,
|
|
127
127
|
STITCH_ERROR_STATUS2
|
|
128
|
-
} from "../index-
|
|
128
|
+
} from "../index-qcn84byh.js";
|
|
129
129
|
import {
|
|
130
130
|
isRecord
|
|
131
131
|
} from "../index-9jfdm5tg.js";
|
|
@@ -8,17 +8,17 @@ import {
|
|
|
8
8
|
validateResolvedInputRounds,
|
|
9
9
|
presentationMetadata,
|
|
10
10
|
prepareProjectedMcpTools
|
|
11
|
-
} from "./index-
|
|
11
|
+
} from "./index-rhzkndr5.js";
|
|
12
12
|
import {
|
|
13
13
|
parseToolCallArguments,
|
|
14
14
|
toolResultFromError,
|
|
15
15
|
observed
|
|
16
|
-
} from "./index-
|
|
16
|
+
} from "./index-v6vb5qx8.js";
|
|
17
17
|
import {
|
|
18
18
|
collectTools2,
|
|
19
19
|
createToolRunner,
|
|
20
20
|
formatToolError
|
|
21
|
-
} from "./index-
|
|
21
|
+
} from "./index-htxh46ej.js";
|
|
22
22
|
import {
|
|
23
23
|
DEFAULT_CORS_ALLOW_HEADERS2,
|
|
24
24
|
DEFAULT_PROCESS_SIGNALS,
|
|
@@ -31,7 +31,7 @@ import {
|
|
|
31
31
|
} from "./index-e6c2spsd.js";
|
|
32
32
|
import {
|
|
33
33
|
collectToolSurface
|
|
34
|
-
} from "./index-
|
|
34
|
+
} from "./index-86nbfysb.js";
|
|
35
35
|
import {
|
|
36
36
|
runWithRequestContext2,
|
|
37
37
|
getRequestContext2
|
|
@@ -41,7 +41,7 @@ import {
|
|
|
41
41
|
} from "./index-a5qr2rj6.js";
|
|
42
42
|
import {
|
|
43
43
|
AppError2
|
|
44
|
-
} from "./index-
|
|
44
|
+
} from "./index-qcn84byh.js";
|
|
45
45
|
import {
|
|
46
46
|
argumentsDigest
|
|
47
47
|
} from "./index-r7a7r7ha.js";
|
|
@@ -2,21 +2,21 @@ import {
|
|
|
2
2
|
toolResultFromError,
|
|
3
3
|
toolCauseFromResult,
|
|
4
4
|
isToolExecutionControlError2
|
|
5
|
-
} from "./index-
|
|
5
|
+
} from "./index-v6vb5qx8.js";
|
|
6
6
|
import {
|
|
7
7
|
createToolRunner,
|
|
8
8
|
formatToolError
|
|
9
|
-
} from "./index-
|
|
9
|
+
} from "./index-htxh46ej.js";
|
|
10
10
|
import {
|
|
11
11
|
AgentToolError2,
|
|
12
12
|
resolveToolDurability
|
|
13
13
|
} from "./index-56yx8dxp.js";
|
|
14
14
|
import {
|
|
15
15
|
collectToolSurface
|
|
16
|
-
} from "./index-
|
|
16
|
+
} from "./index-86nbfysb.js";
|
|
17
17
|
import {
|
|
18
18
|
agentPresenterOf
|
|
19
|
-
} from "./index-
|
|
19
|
+
} from "./index-ega3yz4c.js";
|
|
20
20
|
import {
|
|
21
21
|
isRecord
|
|
22
22
|
} from "./index-9jfdm5tg.js";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
projectToolSurface
|
|
3
|
-
} from "./index-
|
|
3
|
+
} from "./index-rhzkndr5.js";
|
|
4
4
|
import {
|
|
5
5
|
contractToolMountable
|
|
6
|
-
} from "./index-
|
|
6
|
+
} from "./index-htxh46ej.js";
|
|
7
7
|
import {
|
|
8
8
|
runtimeToolMountable
|
|
9
|
-
} from "./index-
|
|
9
|
+
} from "./index-ega3yz4c.js";
|
|
10
10
|
|
|
11
11
|
// src/tools/surface.ts
|
|
12
12
|
function collectToolSurface({
|
|
@@ -3,14 +3,14 @@ import {
|
|
|
3
3
|
mergeSchemas,
|
|
4
4
|
assertToolExtensionCompatible,
|
|
5
5
|
projectToolSurface
|
|
6
|
-
} from "./index-
|
|
6
|
+
} from "./index-rhzkndr5.js";
|
|
7
7
|
import {
|
|
8
8
|
toolErrorFromResult,
|
|
9
9
|
executeToolMethod
|
|
10
|
-
} from "./index-
|
|
10
|
+
} from "./index-v6vb5qx8.js";
|
|
11
11
|
import {
|
|
12
12
|
isRetryableStatus2
|
|
13
|
-
} from "./index-
|
|
13
|
+
} from "./index-qcn84byh.js";
|
|
14
14
|
|
|
15
15
|
// src/tools/mount.ts
|
|
16
16
|
import { z } from "zod";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
validateDeclaredOutput
|
|
3
|
-
} from "./index-
|
|
3
|
+
} from "./index-k42ckyzx.js";
|
|
4
4
|
import {
|
|
5
5
|
jsonSchemaObjectCoercionMembers
|
|
6
6
|
} from "./index-dsa676h8.js";
|
|
@@ -14,15 +14,15 @@ import {
|
|
|
14
14
|
objectShapeKeys,
|
|
15
15
|
assertUniqueToolName,
|
|
16
16
|
buildToolPresentationSchema
|
|
17
|
-
} from "./index-
|
|
17
|
+
} from "./index-rhzkndr5.js";
|
|
18
18
|
import {
|
|
19
19
|
toolResultFromError,
|
|
20
20
|
toolErrorFromResult
|
|
21
|
-
} from "./index-
|
|
21
|
+
} from "./index-v6vb5qx8.js";
|
|
22
22
|
import {
|
|
23
23
|
createToolRunner,
|
|
24
24
|
formatToolError
|
|
25
|
-
} from "./index-
|
|
25
|
+
} from "./index-htxh46ej.js";
|
|
26
26
|
import {
|
|
27
27
|
fetchGuarded,
|
|
28
28
|
readCapped
|
|
@@ -35,7 +35,7 @@ import {
|
|
|
35
35
|
} from "./index-eemvahkc.js";
|
|
36
36
|
import {
|
|
37
37
|
collectToolSurface
|
|
38
|
-
} from "./index-
|
|
38
|
+
} from "./index-86nbfysb.js";
|
|
39
39
|
import {
|
|
40
40
|
isUnsafeKey,
|
|
41
41
|
safeJsonParse
|
|
@@ -46,7 +46,7 @@ import {
|
|
|
46
46
|
import {
|
|
47
47
|
AppError2,
|
|
48
48
|
STITCH_ERROR_STATUS2
|
|
49
|
-
} from "./index-
|
|
49
|
+
} from "./index-qcn84byh.js";
|
|
50
50
|
import {
|
|
51
51
|
isRecord
|
|
52
52
|
} from "./index-9jfdm5tg.js";
|
|
@@ -69,17 +69,28 @@ function prepareCliCommandEmission(definition, result, options) {
|
|
|
69
69
|
if (!result.ok || definition.output === undefined) {
|
|
70
70
|
return { result, successExitCode: 0 };
|
|
71
71
|
}
|
|
72
|
+
let successExitCode;
|
|
72
73
|
try {
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
74
|
+
successExitCode = cliCommandSuccessExitCode(definition, result.data);
|
|
75
|
+
} catch (error) {
|
|
76
|
+
return {
|
|
77
|
+
result: toolResultFromError(new Error("CLI result policy failed", { cause: error })),
|
|
78
|
+
successExitCode: 0
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
try {
|
|
82
|
+
if (definition.present === undefined)
|
|
83
|
+
return { result, successExitCode };
|
|
84
|
+
const presentation = definition.present({ result: result.data, options });
|
|
85
|
+
if (typeof presentation !== "string") {
|
|
76
86
|
throw new Error("CLI result presenter must return a string");
|
|
77
87
|
}
|
|
78
88
|
return { result, presentation, successExitCode };
|
|
79
89
|
} catch (error) {
|
|
80
90
|
return {
|
|
81
|
-
result
|
|
82
|
-
|
|
91
|
+
result,
|
|
92
|
+
presentationFailure: toolResultFromError(new Error("CLI result presentation failed", { cause: error })),
|
|
93
|
+
successExitCode
|
|
83
94
|
};
|
|
84
95
|
}
|
|
85
96
|
}
|
|
@@ -142,6 +153,7 @@ var DEFAULT_EXIT_CODES2 = {
|
|
|
142
153
|
UPSTREAM_TOOL_ERROR: 1,
|
|
143
154
|
WAIT_FAILED: 1,
|
|
144
155
|
CLI_COMMAND_UNAVAILABLE: 1,
|
|
156
|
+
CLI_PRESENTATION_FAILED: 8,
|
|
145
157
|
INTERNAL_SERVER_ERROR: 1
|
|
146
158
|
};
|
|
147
159
|
function cliExitCode2(result, exitCodes) {
|
|
@@ -165,6 +177,21 @@ function emitResult2(result, writers, opts) {
|
|
|
165
177
|
`);
|
|
166
178
|
return cliExitCode2(result, opts.exitCodes);
|
|
167
179
|
}
|
|
180
|
+
function emitPresentationFailure(result, failure, writers, opts) {
|
|
181
|
+
emitResult2(result, writers, opts);
|
|
182
|
+
return emitResult2({
|
|
183
|
+
ok: false,
|
|
184
|
+
code: "CLI_PRESENTATION_FAILED",
|
|
185
|
+
retryable: false,
|
|
186
|
+
details: {
|
|
187
|
+
message: "The command completed successfully, but its result presentation failed.",
|
|
188
|
+
command: opts.toolName,
|
|
189
|
+
operationSucceeded: true,
|
|
190
|
+
cause: formatToolError(failure)
|
|
191
|
+
},
|
|
192
|
+
hint: "The complete, unformatted result is on stdout. Do not repeat the command to recover its result."
|
|
193
|
+
}, writers, { json: opts.json, toolName: opts.toolName, exitCodes: opts.exitCodes });
|
|
194
|
+
}
|
|
168
195
|
|
|
169
196
|
// src/tools/cli/argument-error.ts
|
|
170
197
|
class CliArgumentError2 extends Error {
|
|
@@ -2257,11 +2284,12 @@ async function emitManagedResult(session, command, initial, options) {
|
|
|
2257
2284
|
try {
|
|
2258
2285
|
viewed = renderCliView2(result.data, options.view);
|
|
2259
2286
|
} catch (error) {
|
|
2260
|
-
|
|
2261
|
-
|
|
2262
|
-
|
|
2263
|
-
|
|
2264
|
-
|
|
2287
|
+
const failure = error instanceof CliArgumentError2 ? {
|
|
2288
|
+
ok: false,
|
|
2289
|
+
code: "BAD_REQUEST",
|
|
2290
|
+
details: { message: error.message }
|
|
2291
|
+
} : toolResultFromError(error);
|
|
2292
|
+
return exit(emitPresentationFailure(result, failure, { stdout, stderr }, emitOptionsFor(config, options.json, command)));
|
|
2265
2293
|
}
|
|
2266
2294
|
if (viewed.kind === "text") {
|
|
2267
2295
|
stdout(viewed.text);
|
|
@@ -2318,6 +2346,9 @@ async function runNativeCommand2(session, route, command, native) {
|
|
|
2318
2346
|
}
|
|
2319
2347
|
const result = await executeCliCommand(native, toolArgs, options, { stdout, stderr }, config.coerceJsonArgs ?? true, globals);
|
|
2320
2348
|
const emission = prepareCliCommandEmission(native, result, options);
|
|
2349
|
+
if (emission.result.ok && emission.presentationFailure !== undefined) {
|
|
2350
|
+
return exit(emitPresentationFailure(emission.result, emission.presentationFailure, { stdout, stderr }, emitOptionsFor(config, options.json, command)));
|
|
2351
|
+
}
|
|
2321
2352
|
let emittedExitCode;
|
|
2322
2353
|
if (emission.result.ok && emission.presentation !== undefined) {
|
|
2323
2354
|
stdout(emission.presentation);
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
validateDeclaredOutput
|
|
3
|
-
} from "./index-
|
|
3
|
+
} from "./index-k42ckyzx.js";
|
|
4
4
|
import {
|
|
5
5
|
toJsonSchema
|
|
6
6
|
} from "./index-ct75c3at.js";
|
|
7
7
|
import {
|
|
8
8
|
AppError2
|
|
9
|
-
} from "./index-
|
|
9
|
+
} from "./index-qcn84byh.js";
|
|
10
10
|
import {
|
|
11
11
|
serializeCanonicalJson
|
|
12
12
|
} from "./index-zsvzhjtk.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
normalizeError2,
|
|
3
3
|
validateDeclaredOutput
|
|
4
|
-
} from "./index-
|
|
4
|
+
} from "./index-k42ckyzx.js";
|
|
5
5
|
import {
|
|
6
6
|
localVerdict
|
|
7
7
|
} from "./index-dsa676h8.js";
|
|
@@ -12,14 +12,14 @@ import {
|
|
|
12
12
|
applyToolViewDefaults,
|
|
13
13
|
projectToolView,
|
|
14
14
|
objectShapeKeys
|
|
15
|
-
} from "./index-
|
|
15
|
+
} from "./index-rhzkndr5.js";
|
|
16
16
|
import {
|
|
17
17
|
runWithRequestContext2,
|
|
18
18
|
getRequestContext2
|
|
19
19
|
} from "./index-r6v4mc67.js";
|
|
20
20
|
import {
|
|
21
21
|
projectedToolError
|
|
22
|
-
} from "./index-
|
|
22
|
+
} from "./index-98hv3sba.js";
|
|
23
23
|
import {
|
|
24
24
|
isUnsafeKey
|
|
25
25
|
} from "./index-zsarb5xp.js";
|
|
@@ -31,7 +31,7 @@ import {
|
|
|
31
31
|
STITCH_ERROR_STATUS2,
|
|
32
32
|
isRetryableStatus2,
|
|
33
33
|
isStitchErrorCode2
|
|
34
|
-
} from "./index-
|
|
34
|
+
} from "./index-qcn84byh.js";
|
|
35
35
|
import {
|
|
36
36
|
isRecord
|
|
37
37
|
} from "./index-9jfdm5tg.js";
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
recordedErrorMessage,
|
|
4
4
|
normalizeError2,
|
|
5
5
|
validateDeclaredOutput
|
|
6
|
-
} from "./index-
|
|
6
|
+
} from "./index-k42ckyzx.js";
|
|
7
7
|
import {
|
|
8
8
|
DEFAULT_CONTRACT_STREAM_FRAME_BYTES2
|
|
9
9
|
} from "./index-h2fhjqy7.js";
|
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
import {
|
|
27
27
|
bindContract,
|
|
28
28
|
mediaTypeEssence
|
|
29
|
-
} from "./index-
|
|
29
|
+
} from "./index-cqmqyjax.js";
|
|
30
30
|
import {
|
|
31
31
|
readBoundedChunks,
|
|
32
32
|
concatChunks,
|
|
@@ -71,7 +71,7 @@ import {
|
|
|
71
71
|
AppError2,
|
|
72
72
|
badRequest2,
|
|
73
73
|
forbidden2
|
|
74
|
-
} from "./index-
|
|
74
|
+
} from "./index-qcn84byh.js";
|
|
75
75
|
import {
|
|
76
76
|
resolveTraceContext2
|
|
77
77
|
} from "./index-yex7eg1v.js";
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
assertUniqueToolName
|
|
3
|
-
} from "./index-
|
|
3
|
+
} from "./index-rhzkndr5.js";
|
|
4
4
|
import {
|
|
5
5
|
toolErrorFromResult
|
|
6
|
-
} from "./index-
|
|
6
|
+
} from "./index-v6vb5qx8.js";
|
|
7
7
|
import {
|
|
8
8
|
collectTools2,
|
|
9
9
|
createToolRunner
|
|
10
|
-
} from "./index-
|
|
10
|
+
} from "./index-htxh46ej.js";
|
|
11
11
|
import {
|
|
12
12
|
AppError2
|
|
13
|
-
} from "./index-
|
|
13
|
+
} from "./index-qcn84byh.js";
|
|
14
14
|
|
|
15
15
|
// src/tools/invoker.ts
|
|
16
16
|
function createToolInvoker2(services, config) {
|
|
@@ -27,13 +27,13 @@ import {
|
|
|
27
27
|
} from "./index-j4zh647a.js";
|
|
28
28
|
import {
|
|
29
29
|
defineRuntimeTool2
|
|
30
|
-
} from "./index-
|
|
30
|
+
} from "./index-ega3yz4c.js";
|
|
31
31
|
import {
|
|
32
32
|
AppError2,
|
|
33
33
|
forbidden2,
|
|
34
34
|
conflict2,
|
|
35
35
|
STITCH_ERROR_STATUS2
|
|
36
|
-
} from "./index-
|
|
36
|
+
} from "./index-qcn84byh.js";
|
|
37
37
|
|
|
38
38
|
// src/agent-runtime/coding-tool-contract.ts
|
|
39
39
|
import { z } from "zod";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ZodObject, ZodType, z } from 'zod';
|
|
2
|
-
import { type ToolResult } from '../execute-result.js';
|
|
2
|
+
import { type ToolFailure, type ToolResult } from '../execute-result.js';
|
|
3
3
|
import type { CliRunOptions } from './args.js';
|
|
4
4
|
import type { CliWriters } from './format.js';
|
|
5
5
|
export interface CliCommandContext<TInput extends ZodObject> extends CliWriters {
|
|
@@ -42,6 +42,7 @@ export declare function defineCliCommand<TInput extends ZodObject>(definition: C
|
|
|
42
42
|
export interface PreparedCliCommandEmission {
|
|
43
43
|
result: ToolResult;
|
|
44
44
|
presentation?: string;
|
|
45
|
+
presentationFailure?: ToolFailure;
|
|
45
46
|
successExitCode: number;
|
|
46
47
|
}
|
|
47
48
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"command.d.ts","sourceRoot":"","sources":["../../../src/tools/cli/command.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGjD,OAAO,EAAE,KAAK,UAAU,EAAuB,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"command.d.ts","sourceRoot":"","sources":["../../../src/tools/cli/command.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGjD,OAAO,EAAE,KAAK,WAAW,EAAE,KAAK,UAAU,EAAuB,MAAM,mBAAmB,CAAC;AAG3F,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AAC5C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAE3C,MAAM,WAAW,iBAAiB,CAAC,MAAM,SAAS,SAAS,CAAE,SAAQ,UAAU;IAC7E,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IACxB,OAAO,EAAE,QAAQ,CAAC,aAAa,CAAC,CAAC;IACjC;;;;;OAKG;IACH,OAAO,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;CAC5C;AAED,MAAM,WAAW,wBAAwB,CAAC,MAAM,SAAS,SAAS;IAChE,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,8BAA8B,CAC7C,MAAM,SAAS,SAAS,EACxB,OAAO,SAAS,OAAO,CACvB,SAAQ,wBAAwB,CAAC,MAAM,CAAC;IACxC,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,CACP,OAAO,EAAE,iBAAiB,CAAC,MAAM,CAAC,KAC/B,CAAC,CAAC,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