stitchkit 0.113.0 → 0.113.2
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 +14 -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 +7 -7
- 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 +13 -13
- package/dist/entrypoints/application/grammy.js +1 -1
- package/dist/entrypoints/application.js +2 -2
- package/dist/entrypoints/cli.js +10 -10
- 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 +8 -8
- package/dist/entrypoints/tools/contract.js +2 -2
- package/dist/entrypoints/tools/invoker.js +7 -7
- package/dist/entrypoints/tools/mcp.js +9 -9
- package/dist/entrypoints/tools.js +15 -15
- package/dist/{index-yjnmac9b.js → index-09dyy94r.js} +1 -1
- package/dist/{index-zm1k7hhv.js → index-0gbn42hr.js} +3 -3
- package/dist/{index-86sxnvpr.js → index-0pfk3c1p.js} +1 -1
- package/dist/{index-eddzs589.js → index-2s7wv547.js} +3 -3
- package/dist/{index-h1spd9kv.js → index-4e36ts8b.js} +1 -1
- package/dist/{index-556g5hsh.js → index-5gmrx6sc.js} +1 -1
- package/dist/{index-2qymcsq2.js → index-5zxe0f3h.js} +3 -3
- package/dist/{index-5jjda9a4.js → index-6ez1r4j2.js} +4 -4
- package/dist/{index-8asb62xn.js → index-7ysby53h.js} +1 -1
- package/dist/{index-ppf5nerp.js → index-8swt2h9y.js} +1 -1
- package/dist/{index-z4ga1fa1.js → index-a31p9ekx.js} +6 -6
- package/dist/{index-k8fbzggr.js → index-awbed0mk.js} +1 -1
- package/dist/{index-nk1mh535.js → index-bv51s0f4.js} +1 -1
- package/dist/{index-54q2mghq.js → index-cn7xenet.js} +5 -5
- package/dist/{index-epmnrnth.js → index-dsa676h8.js} +24 -7
- package/dist/{index-fynr93w4.js → index-e40rzw1m.js} +1 -1
- package/dist/{index-ykdcnq1f.js → index-grn4brx1.js} +1 -1
- package/dist/{index-4dh3hfs7.js → index-kvga921h.js} +4 -4
- package/dist/{index-j9gxbztg.js → index-pd578538.js} +1 -0
- package/dist/{index-dsxrcseb.js → index-ptjx84pr.js} +2 -2
- package/dist/{index-jy9wq8tp.js → index-rbzq0q16.js} +1 -1
- package/dist/{index-pvh3z03x.js → index-shg5xc9t.js} +1 -1
- package/dist/{index-xmgjtkvr.js → index-sps9s3aj.js} +1 -1
- package/dist/{index-jgwqc38k.js → index-vf9c59t3.js} +2 -2
- package/dist/{index-pzw0fpek.js → index-vgtzdykw.js} +1 -1
- package/dist/{index-gpbk7yse.js → index-xtc8k5n9.js} +172 -117
- package/dist/{index-k0zfcxf5.js → index-z8fnfj42.js} +1 -1
- package/dist/{index-gz9jf461.js → index-zbs0g0v2.js} +1 -1
- package/dist/tools/cli/command-shape.d.ts +4 -0
- package/dist/tools/cli/command-shape.d.ts.map +1 -0
- package/dist/tools/cli/format.d.ts.map +1 -1
- package/dist/tools/cli/help.d.ts.map +1 -1
- package/dist/tools/cli/invoke.d.ts +1 -1
- package/dist/tools/cli/invoke.d.ts.map +1 -1
- package/dist/tools/cli/managed-surface.d.ts +3 -2
- package/dist/tools/cli/managed-surface.d.ts.map +1 -1
- package/dist/tools/cli/policy.d.ts +2 -0
- package/dist/tools/cli/policy.d.ts.map +1 -1
- package/dist/tools/cli/run-managed.d.ts.map +1 -1
- package/dist/tools/cli/session.d.ts +0 -1
- package/dist/tools/cli/session.d.ts.map +1 -1
- package/dist/tools/cli/unavailable.d.ts +10 -0
- package/dist/tools/cli/unavailable.d.ts.map +1 -0
- package/dist/tools/connections/runtime.d.ts +1 -1
- package/dist/tools/schema/json-schema-origin.d.ts +6 -5
- package/dist/tools/schema/json-schema-origin.d.ts.map +1 -1
- package/llms/cli.2.txt +15 -4
- package/llms/cli.txt +31 -2
- package/llms/server.4.txt +1 -1
- package/llms/tools-connections.txt +1 -1
- package/llms-full.txt +48 -8
- package/llms.txt +2 -2
- package/package.json +1 -1
|
@@ -2,12 +2,12 @@ import"../../index-ct75c3at.js";
|
|
|
2
2
|
import {
|
|
3
3
|
declaresDraft07,
|
|
4
4
|
withDraft2020Keywords
|
|
5
|
-
} from "../../index-
|
|
6
|
-
import"../../index-
|
|
5
|
+
} from "../../index-vf9c59t3.js";
|
|
6
|
+
import"../../index-e40rzw1m.js";
|
|
7
7
|
import {
|
|
8
8
|
markJsonSchemaObjectGuards,
|
|
9
|
-
|
|
10
|
-
} from "../../index-
|
|
9
|
+
markRemoteSchemaVerdict
|
|
10
|
+
} from "../../index-dsa676h8.js";
|
|
11
11
|
import {
|
|
12
12
|
withSignalDeadline
|
|
13
13
|
} from "../../index-9tqbxv5p.js";
|
|
@@ -26,10 +26,10 @@ import {
|
|
|
26
26
|
} from "../../index-0s4xebbg.js";
|
|
27
27
|
import {
|
|
28
28
|
defineRuntimeTool2
|
|
29
|
-
} from "../../index-
|
|
29
|
+
} from "../../index-bv51s0f4.js";
|
|
30
30
|
import {
|
|
31
31
|
TOOL_ERROR_PROJECTION
|
|
32
|
-
} from "../../index-
|
|
32
|
+
} from "../../index-5gmrx6sc.js";
|
|
33
33
|
import {
|
|
34
34
|
safeJsonParse
|
|
35
35
|
} from "../../index-zsarb5xp.js";
|
|
@@ -37,7 +37,7 @@ import {
|
|
|
37
37
|
AppError2,
|
|
38
38
|
STITCH_ERROR_STATUS2,
|
|
39
39
|
isRetryableStatus2
|
|
40
|
-
} from "../../index-
|
|
40
|
+
} from "../../index-pd578538.js";
|
|
41
41
|
import {
|
|
42
42
|
isRecord
|
|
43
43
|
} from "../../index-9jfdm5tg.js";
|
|
@@ -847,7 +847,7 @@ function zodObjectFromJsonSchema(schema) {
|
|
|
847
847
|
const parsed = z.fromJSONSchema(reconcileDialect(schema));
|
|
848
848
|
if (parsed instanceof z.ZodObject) {
|
|
849
849
|
markJsonSchemaObjectGuards(parsed);
|
|
850
|
-
|
|
850
|
+
markRemoteSchemaVerdict(parsed);
|
|
851
851
|
return parsed;
|
|
852
852
|
}
|
|
853
853
|
return z.looseObject({});
|
|
@@ -9,8 +9,8 @@ import {
|
|
|
9
9
|
} from "../../index-0gxvns6s.js";
|
|
10
10
|
import {
|
|
11
11
|
coerceJsonArgs2
|
|
12
|
-
} from "../../index-
|
|
13
|
-
import"../../index-
|
|
12
|
+
} from "../../index-rbzq0q16.js";
|
|
13
|
+
import"../../index-dsa676h8.js";
|
|
14
14
|
export {
|
|
15
15
|
AsyncOperationCancelResultSchema2 as AsyncOperationCancelResultSchema,
|
|
16
16
|
McpAnnotationsSchema2 as McpAnnotationsSchema,
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import"../../index-
|
|
2
|
-
import"../../index-
|
|
3
|
-
import"../../index-
|
|
1
|
+
import"../../index-e40rzw1m.js";
|
|
2
|
+
import"../../index-dsa676h8.js";
|
|
3
|
+
import"../../index-rbzq0q16.js";
|
|
4
4
|
import"../../index-ct75c3at.js";
|
|
5
|
-
import"../../index-
|
|
6
|
-
import"../../index-
|
|
7
|
-
import"../../index-
|
|
5
|
+
import"../../index-vf9c59t3.js";
|
|
6
|
+
import"../../index-a31p9ekx.js";
|
|
7
|
+
import"../../index-0gbn42hr.js";
|
|
8
8
|
import {
|
|
9
9
|
createToolInvoker2
|
|
10
|
-
} from "../../index-
|
|
10
|
+
} from "../../index-kvga921h.js";
|
|
11
11
|
export {
|
|
12
12
|
createToolInvoker2 as createToolInvoker
|
|
13
13
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import"../../index-ct75c3at.js";
|
|
2
|
-
import"../../index-
|
|
3
|
-
import"../../index-
|
|
4
|
-
import"../../index-
|
|
5
|
-
import"../../index-
|
|
6
|
-
import"../../index-
|
|
7
|
-
import"../../index-
|
|
2
|
+
import"../../index-e40rzw1m.js";
|
|
3
|
+
import"../../index-dsa676h8.js";
|
|
4
|
+
import"../../index-rbzq0q16.js";
|
|
5
|
+
import"../../index-vf9c59t3.js";
|
|
6
|
+
import"../../index-a31p9ekx.js";
|
|
7
|
+
import"../../index-0gbn42hr.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-cn7xenet.js";
|
|
24
|
+
import"../../index-2s7wv547.js";
|
|
25
|
+
import"../../index-bv51s0f4.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,11 +8,11 @@ import {
|
|
|
8
8
|
} from "../index-56yx8dxp.js";
|
|
9
9
|
import {
|
|
10
10
|
normalizeError2
|
|
11
|
-
} from "../index-
|
|
12
|
-
import"../index-
|
|
11
|
+
} from "../index-e40rzw1m.js";
|
|
12
|
+
import"../index-dsa676h8.js";
|
|
13
13
|
import {
|
|
14
14
|
coerceJsonArgs2
|
|
15
|
-
} from "../index-
|
|
15
|
+
} from "../index-rbzq0q16.js";
|
|
16
16
|
import"../index-ct75c3at.js";
|
|
17
17
|
import {
|
|
18
18
|
assertToolName,
|
|
@@ -21,19 +21,19 @@ import {
|
|
|
21
21
|
findNonPortableFormats2,
|
|
22
22
|
flattenToolJsonSchema2,
|
|
23
23
|
findUntypedProperties2
|
|
24
|
-
} from "../index-
|
|
24
|
+
} from "../index-vf9c59t3.js";
|
|
25
25
|
import {
|
|
26
26
|
ToolExecutionControlError2,
|
|
27
27
|
isToolExecutionControlError2
|
|
28
|
-
} from "../index-
|
|
28
|
+
} from "../index-a31p9ekx.js";
|
|
29
29
|
import {
|
|
30
30
|
collectTools2
|
|
31
|
-
} from "../index-
|
|
31
|
+
} from "../index-0gbn42hr.js";
|
|
32
32
|
import {
|
|
33
33
|
mountAgent2,
|
|
34
34
|
describeToolCatalog2,
|
|
35
35
|
buildToolManifest2
|
|
36
|
-
} from "../index-
|
|
36
|
+
} from "../index-6ez1r4j2.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-cn7xenet.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-xtc8k5n9.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-4e36ts8b.js";
|
|
86
86
|
import {
|
|
87
87
|
contractOnlyService,
|
|
88
88
|
mediaTypeEssence
|
|
89
|
-
} from "../index-
|
|
89
|
+
} from "../index-vgtzdykw.js";
|
|
90
90
|
import {
|
|
91
91
|
createToolInvoker2
|
|
92
|
-
} from "../index-
|
|
92
|
+
} from "../index-kvga921h.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-2s7wv547.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-bv51s0f4.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-pd578538.js";
|
|
129
129
|
import {
|
|
130
130
|
isRecord
|
|
131
131
|
} from "../index-9jfdm5tg.js";
|
|
@@ -3,14 +3,14 @@ import {
|
|
|
3
3
|
mergeSchemas,
|
|
4
4
|
assertToolExtensionCompatible,
|
|
5
5
|
projectToolSurface
|
|
6
|
-
} from "./index-
|
|
6
|
+
} from "./index-vf9c59t3.js";
|
|
7
7
|
import {
|
|
8
8
|
toolErrorFromResult,
|
|
9
9
|
executeToolMethod
|
|
10
|
-
} from "./index-
|
|
10
|
+
} from "./index-a31p9ekx.js";
|
|
11
11
|
import {
|
|
12
12
|
isRetryableStatus2
|
|
13
|
-
} from "./index-
|
|
13
|
+
} from "./index-pd578538.js";
|
|
14
14
|
|
|
15
15
|
// src/tools/mount.ts
|
|
16
16
|
import { z } from "zod";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
projectToolSurface
|
|
3
|
-
} from "./index-
|
|
3
|
+
} from "./index-vf9c59t3.js";
|
|
4
4
|
import {
|
|
5
5
|
contractToolMountable
|
|
6
|
-
} from "./index-
|
|
6
|
+
} from "./index-0gbn42hr.js";
|
|
7
7
|
import {
|
|
8
8
|
runtimeToolMountable
|
|
9
|
-
} from "./index-
|
|
9
|
+
} from "./index-bv51s0f4.js";
|
|
10
10
|
|
|
11
11
|
// src/tools/surface.ts
|
|
12
12
|
function collectToolSurface({
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
recordedErrorMessage,
|
|
4
4
|
normalizeError2,
|
|
5
5
|
validateDeclaredOutput
|
|
6
|
-
} from "./index-
|
|
6
|
+
} from "./index-e40rzw1m.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-vgtzdykw.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-pd578538.js";
|
|
75
75
|
import {
|
|
76
76
|
resolveTraceContext2
|
|
77
77
|
} from "./index-yex7eg1v.js";
|
|
@@ -2,21 +2,21 @@ import {
|
|
|
2
2
|
toolResultFromError,
|
|
3
3
|
toolCauseFromResult,
|
|
4
4
|
isToolExecutionControlError2
|
|
5
|
-
} from "./index-
|
|
5
|
+
} from "./index-a31p9ekx.js";
|
|
6
6
|
import {
|
|
7
7
|
createToolRunner,
|
|
8
8
|
formatToolError
|
|
9
|
-
} from "./index-
|
|
9
|
+
} from "./index-0gbn42hr.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-2s7wv547.js";
|
|
17
17
|
import {
|
|
18
18
|
agentPresenterOf
|
|
19
|
-
} from "./index-
|
|
19
|
+
} from "./index-bv51s0f4.js";
|
|
20
20
|
import {
|
|
21
21
|
isRecord
|
|
22
22
|
} from "./index-9jfdm5tg.js";
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
import {
|
|
2
2
|
normalizeError2,
|
|
3
3
|
validateDeclaredOutput
|
|
4
|
-
} from "./index-
|
|
4
|
+
} from "./index-e40rzw1m.js";
|
|
5
5
|
import {
|
|
6
6
|
localVerdict
|
|
7
|
-
} from "./index-
|
|
7
|
+
} from "./index-dsa676h8.js";
|
|
8
8
|
import {
|
|
9
9
|
coerceJsonArgs2
|
|
10
|
-
} from "./index-
|
|
10
|
+
} from "./index-rbzq0q16.js";
|
|
11
11
|
import {
|
|
12
12
|
applyToolViewDefaults,
|
|
13
13
|
projectToolView,
|
|
14
14
|
objectShapeKeys
|
|
15
|
-
} from "./index-
|
|
15
|
+
} from "./index-vf9c59t3.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-5gmrx6sc.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-pd578538.js";
|
|
35
35
|
import {
|
|
36
36
|
isRecord
|
|
37
37
|
} from "./index-9jfdm5tg.js";
|
|
@@ -8,17 +8,17 @@ import {
|
|
|
8
8
|
validateResolvedInputRounds,
|
|
9
9
|
presentationMetadata,
|
|
10
10
|
prepareProjectedMcpTools
|
|
11
|
-
} from "./index-
|
|
11
|
+
} from "./index-vf9c59t3.js";
|
|
12
12
|
import {
|
|
13
13
|
parseToolCallArguments,
|
|
14
14
|
toolResultFromError,
|
|
15
15
|
observed
|
|
16
|
-
} from "./index-
|
|
16
|
+
} from "./index-a31p9ekx.js";
|
|
17
17
|
import {
|
|
18
18
|
collectTools2,
|
|
19
19
|
createToolRunner,
|
|
20
20
|
formatToolError
|
|
21
|
-
} from "./index-
|
|
21
|
+
} from "./index-0gbn42hr.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-2s7wv547.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-pd578538.js";
|
|
45
45
|
import {
|
|
46
46
|
argumentsDigest
|
|
47
47
|
} from "./index-r7a7r7ha.js";
|
|
@@ -82,9 +82,9 @@ function markJsonSchemaObjectGuards(schema) {
|
|
|
82
82
|
};
|
|
83
83
|
visit(schema);
|
|
84
84
|
}
|
|
85
|
-
var
|
|
86
|
-
function
|
|
87
|
-
Reflect.defineProperty(schema,
|
|
85
|
+
var REMOTE_SCHEMA_VERDICT = Symbol.for("stitchkit.tools.json-schema-remote-verdict.v1");
|
|
86
|
+
function markRemoteSchemaVerdict(schema) {
|
|
87
|
+
Reflect.defineProperty(schema, REMOTE_SCHEMA_VERDICT, {
|
|
88
88
|
configurable: false,
|
|
89
89
|
enumerable: false,
|
|
90
90
|
value: true,
|
|
@@ -92,12 +92,29 @@ function markRemoteUnionVerdict(schema) {
|
|
|
92
92
|
});
|
|
93
93
|
}
|
|
94
94
|
function localVerdict(schema, error) {
|
|
95
|
-
if (Reflect.get(schema,
|
|
95
|
+
if (Reflect.get(schema, REMOTE_SCHEMA_VERDICT) !== true)
|
|
96
96
|
return error;
|
|
97
|
-
const local = error.issues
|
|
97
|
+
const local = localIssues(error.issues);
|
|
98
98
|
if (local.length === 0)
|
|
99
99
|
return null;
|
|
100
|
-
return local
|
|
100
|
+
return sameIssues(local, error.issues) ? error : new z.ZodError(local);
|
|
101
|
+
}
|
|
102
|
+
function sameIssues(left, right) {
|
|
103
|
+
return left.length === right.length && left.every((issue, index) => issue === right[index]);
|
|
104
|
+
}
|
|
105
|
+
function localIssues(issues) {
|
|
106
|
+
return issues.flatMap((issue) => {
|
|
107
|
+
if (issue.code === "invalid_union" || issue.code === "invalid_format")
|
|
108
|
+
return [];
|
|
109
|
+
if (issue.code === "invalid_key") {
|
|
110
|
+
const children = localIssues(issue.issues);
|
|
111
|
+
if (children.length === 0)
|
|
112
|
+
return [];
|
|
113
|
+
if (!sameIssues(children, issue.issues))
|
|
114
|
+
return [{ ...issue, issues: children }];
|
|
115
|
+
}
|
|
116
|
+
return [issue];
|
|
117
|
+
});
|
|
101
118
|
}
|
|
102
119
|
function jsonSchemaObjectCoercionMembers(schema) {
|
|
103
120
|
if (Reflect.get(schema, JSON_SCHEMA_OBJECT_GUARD) !== true)
|
|
@@ -114,4 +131,4 @@ function jsonSchemaObjectCoercionMembers(schema) {
|
|
|
114
131
|
return;
|
|
115
132
|
}
|
|
116
133
|
|
|
117
|
-
export { markJsonSchemaObjectGuards,
|
|
134
|
+
export { markJsonSchemaObjectGuards, markRemoteSchemaVerdict, localVerdict, jsonSchemaObjectCoercionMembers };
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
assertUniqueToolName
|
|
3
|
-
} from "./index-
|
|
3
|
+
} from "./index-vf9c59t3.js";
|
|
4
4
|
import {
|
|
5
5
|
toolErrorFromResult
|
|
6
|
-
} from "./index-
|
|
6
|
+
} from "./index-a31p9ekx.js";
|
|
7
7
|
import {
|
|
8
8
|
collectTools2,
|
|
9
9
|
createToolRunner
|
|
10
|
-
} from "./index-
|
|
10
|
+
} from "./index-0gbn42hr.js";
|
|
11
11
|
import {
|
|
12
12
|
AppError2
|
|
13
|
-
} from "./index-
|
|
13
|
+
} from "./index-pd578538.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-bv51s0f4.js";
|
|
31
31
|
import {
|
|
32
32
|
AppError2,
|
|
33
33
|
forbidden2,
|
|
34
34
|
conflict2,
|
|
35
35
|
STITCH_ERROR_STATUS2
|
|
36
|
-
} from "./index-
|
|
36
|
+
} from "./index-pd578538.js";
|
|
37
37
|
|
|
38
38
|
// src/agent-runtime/coding-tool-contract.ts
|
|
39
39
|
import { z } from "zod";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
validateDeclaredOutput
|
|
3
|
-
} from "./index-
|
|
3
|
+
} from "./index-e40rzw1m.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-pd578538.js";
|
|
10
10
|
import {
|
|
11
11
|
serializeCanonicalJson
|
|
12
12
|
} from "./index-zsvzhjtk.js";
|