stitchkit 0.118.1 → 0.120.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/CHANGELOG.md +92 -0
- package/README.md +10 -7
- package/dist/browser/http.d.ts.map +1 -1
- package/dist/contract/client-types.d.ts +6 -3
- package/dist/contract/client-types.d.ts.map +1 -1
- package/dist/contract/define-validation.d.ts.map +1 -1
- package/dist/contract/define.d.ts +18 -12
- package/dist/contract/define.d.ts.map +1 -1
- package/dist/contract/endpoint-capabilities.d.ts +28 -0
- package/dist/contract/endpoint-capabilities.d.ts.map +1 -0
- package/dist/contract/factory.d.ts +49 -19
- package/dist/contract/factory.d.ts.map +1 -1
- package/dist/contract/tool-view.d.ts +1 -1
- package/dist/contract/tool-view.d.ts.map +1 -1
- package/dist/contract/transports.d.ts +5 -0
- package/dist/contract/transports.d.ts.map +1 -0
- package/dist/entrypoints/agent-runtime/coding-tools.js +9 -8
- package/dist/entrypoints/agent-runtime/harness.js +9 -8
- package/dist/entrypoints/agent-runtime/realtime.js +3 -3
- package/dist/entrypoints/agent-runtime/sandbox.js +10 -9
- package/dist/entrypoints/agent-runtime/sqlite/bun.js +12 -11
- package/dist/entrypoints/agent-runtime/sqlite/node.js +12 -11
- package/dist/entrypoints/agent-runtime/testing.js +12 -11
- package/dist/entrypoints/agent-runtime.js +22 -19
- package/dist/entrypoints/application/diagnostic-journal.js +3 -3
- package/dist/entrypoints/application/directory-inbox.js +4 -4
- package/dist/entrypoints/application/opentelemetry.js +1 -1
- package/dist/entrypoints/application.js +10 -10
- package/dist/entrypoints/cli/publish.js +4 -4
- package/dist/entrypoints/cli.js +13 -12
- package/dist/entrypoints/contract.d.ts +1 -1
- package/dist/entrypoints/contract.d.ts.map +1 -1
- package/dist/entrypoints/contract.js +6 -4
- package/dist/entrypoints/files.js +3 -3
- package/dist/entrypoints/geo/contract.d.ts +7 -0
- package/dist/entrypoints/geo/contract.d.ts.map +1 -0
- package/dist/entrypoints/geo/contract.js +6 -0
- package/dist/entrypoints/geo.js +60 -23
- package/dist/entrypoints/http.js +3 -3
- package/dist/entrypoints/index.js +9 -7
- package/dist/entrypoints/live.js +1 -1
- package/dist/entrypoints/node.js +7 -6
- package/dist/entrypoints/primitives.js +1 -1
- package/dist/entrypoints/process/owner-loss.js +1 -1
- package/dist/entrypoints/process.js +3 -3
- package/dist/entrypoints/react.js +1 -1
- package/dist/entrypoints/remote.js +4 -3
- package/dist/entrypoints/server.js +16 -15
- package/dist/entrypoints/telegram/screens.js +5 -5
- package/dist/entrypoints/telegram.js +7 -7
- package/dist/entrypoints/testing.js +7 -6
- package/dist/entrypoints/tools/agent.d.ts +9 -0
- package/dist/entrypoints/tools/agent.d.ts.map +1 -0
- package/dist/entrypoints/tools/agent.js +16 -0
- package/dist/entrypoints/tools/connections.js +7 -6
- package/dist/entrypoints/tools/contract.js +1 -1
- package/dist/entrypoints/tools/invoker.js +5 -4
- package/dist/entrypoints/tools/mcp.js +110 -9
- package/dist/entrypoints/tools/toolkit.d.ts +9 -0
- package/dist/entrypoints/tools/toolkit.d.ts.map +1 -0
- package/dist/entrypoints/tools/toolkit.js +40 -0
- package/dist/entrypoints/tools.d.ts +0 -10
- package/dist/entrypoints/tools.d.ts.map +1 -1
- package/dist/entrypoints/tools.js +38 -80
- package/dist/entrypoints/tracking/contract.js +5 -3
- package/dist/entrypoints/tracking/performance.js +3 -3
- package/dist/entrypoints/tracking.d.ts +1 -1
- package/dist/entrypoints/tracking.d.ts.map +1 -1
- package/dist/entrypoints/tracking.js +63 -83
- package/dist/entrypoints/xlsx.js +1 -1
- package/dist/geo/index.d.ts +2 -1
- package/dist/geo/index.d.ts.map +1 -1
- package/dist/geo/record.d.ts +8 -0
- package/dist/geo/record.d.ts.map +1 -0
- package/dist/geo/resolver.d.ts +1 -3
- package/dist/geo/resolver.d.ts.map +1 -1
- package/dist/geo/schema.d.ts +44 -0
- package/dist/geo/schema.d.ts.map +1 -0
- package/dist/geo/types.d.ts +2 -13
- package/dist/geo/types.d.ts.map +1 -1
- package/dist/{index-n5sv4z0w.js → index-0qyrcjfs.js} +16 -18
- package/dist/index-1psbyyhj.js +21 -0
- package/dist/{index-tsngj2b5.js → index-2fc1k9k2.js} +206 -206
- package/dist/index-3prvb42w.js +30 -0
- package/dist/{index-073nw9qr.js → index-3yb5kft5.js} +524 -522
- package/dist/{index-d9hq291n.js → index-4jpykzvw.js} +70 -81
- package/dist/index-568w258r.js +76 -0
- package/dist/index-69t14s4a.js +39 -0
- package/dist/{index-dky0dcmf.js → index-72r9k0av.js} +6 -2
- package/dist/{index-6p3frkv5.js → index-7zwtbak8.js} +9 -50
- package/dist/{index-90p34rts.js → index-8ryydawp.js} +7 -5
- package/dist/{index-vv1sch8a.js → index-8vzh5wpv.js} +13 -8
- package/dist/{index-75ns2ybj.js → index-8xyf8h2k.js} +1 -1
- package/dist/{index-xx1j310k.js → index-8yxgcyt6.js} +171 -169
- package/dist/{index-p6apg0jg.js → index-9frf01t9.js} +16 -9
- package/dist/{index-q0th8q0z.js → index-9mjrnqxs.js} +1 -3
- package/dist/{index-6f49krb5.js → index-aa50qwv4.js} +1 -1
- package/dist/{index-ega3yz4c.js → index-aqwg2dm5.js} +1 -1
- package/dist/{index-p0rf7sq9.js → index-bgcwxhxh.js} +225 -223
- package/dist/index-bph35vpy.js +77 -0
- package/dist/{index-tdpmfks8.js → index-bz479f0x.js} +1 -1
- package/dist/index-d3xdyjt6.js +38 -0
- package/dist/{index-q968hy6y.js → index-e452syyh.js} +1 -1
- package/dist/{index-86nbfysb.js → index-ff39f9dr.js} +3 -3
- package/dist/index-h1j71dr1.js +48 -0
- package/dist/{index-mgb7r8b8.js → index-jswst0h3.js} +1 -1
- package/dist/{index-095ya5hm.js → index-knmnj11j.js} +22 -191
- package/dist/{index-vwhrnp67.js → index-kz9734jc.js} +3 -3
- package/dist/{index-txg1npmg.js → index-mtwh9hyp.js} +1 -1
- package/dist/{index-dr3t5n1v.js → index-nn9qvkww.js} +46 -46
- package/dist/{index-ghtpfz4z.js → index-nyyam9ce.js} +2 -2
- package/dist/{index-qezhmp51.js → index-nz06qw5a.js} +3 -1
- package/dist/{index-1bx1xv1k.js → index-pfvde2fz.js} +5 -2
- package/dist/{index-w7jq3fz9.js → index-pq2m7t46.js} +1142 -1212
- package/dist/{index-yk4g8805.js → index-pq7rkwkk.js} +1 -30
- package/dist/{index-s80awwsw.js → index-qch1vcaa.js} +3 -1
- package/dist/{index-hdjmdwsj.js → index-qctbzmg9.js} +521 -511
- package/dist/{index-n8z3rvzw.js → index-qevqn3d3.js} +3 -5
- package/dist/{index-nqxrm176.js → index-r3db01kh.js} +1 -1
- package/dist/{index-v6vb5qx8.js → index-s3yxw6kt.js} +1 -1
- package/dist/{index-cqmqyjax.js → index-sa99p98w.js} +1 -1
- package/dist/index-sb9dr3tq.js +14 -0
- package/dist/{index-0gxvns6s.js → index-sba3e6m4.js} +1 -0
- package/dist/{index-f24bdt13.js → index-v1swr26p.js} +3 -1
- package/dist/{index-rhzkndr5.js → index-x4p3kw1p.js} +533 -530
- package/dist/{index-cycp3r3e.js → index-yb9n4pgj.js} +2 -2
- package/dist/{index-htxh46ej.js → index-ycqhyars.js} +2 -2
- package/dist/{index-9bwcthxw.js → index-yj6saztf.js} +31 -13
- package/dist/{index-f6m4c545.js → index-zrdcmg6j.js} +4 -6
- package/dist/{index-tvtacc9a.js → index-zyc64nbh.js} +1 -34
- package/dist/process/bun-child.d.ts +3 -2
- package/dist/process/bun-child.d.ts.map +1 -1
- package/dist/server/contract-method.d.ts.map +1 -1
- package/dist/tools/internal/surface-projector.d.ts.map +1 -1
- package/dist/tools/operations/async-operation-canonical-types.d.ts +1 -1
- package/dist/tracking/attribution.d.ts +21 -25
- package/dist/tracking/attribution.d.ts.map +1 -1
- package/dist/tracking/client-visit.d.ts +5 -7
- package/dist/tracking/client-visit.d.ts.map +1 -1
- package/dist/tracking/client.d.ts +2 -2
- package/dist/tracking/client.d.ts.map +1 -1
- package/dist/tracking/contract.d.ts +1 -1
- package/dist/tracking/host.d.ts +0 -1
- package/dist/tracking/host.d.ts.map +1 -1
- package/dist/tracking/privacy.d.ts +6 -0
- package/dist/tracking/privacy.d.ts.map +1 -1
- package/dist/tracking/schemas.d.ts +2 -2
- package/dist/tracking/schemas.d.ts.map +1 -1
- package/llms/agent-runtime-harness.txt +4 -3
- package/llms/agent-runtime-sandbox.txt +1 -1
- package/llms/agent-runtime.2.txt +3 -2
- package/llms/agent-runtime.3.txt +4 -46
- package/llms/agent-runtime.4.txt +113 -0
- package/llms/agent-runtime.txt +11 -13
- package/llms/cli.txt +1 -1
- package/llms/contract.txt +46 -24
- package/llms/geo-contract.txt +23 -0
- package/llms/geo.txt +40 -4
- package/llms/stitchkit.txt +16 -9
- package/llms/testing.txt +4 -6
- package/llms/tools-agent.txt +24 -0
- package/llms/tools-mcp.txt +71 -6
- package/llms/tools-toolkit.txt +23 -0
- package/llms/tools.2.txt +8 -5
- package/llms/tools.3.txt +9 -78
- package/llms/tools.txt +8 -8
- package/llms/tracking-contract.txt +1 -1
- package/llms/tracking.txt +27 -5
- package/llms/{upgrading-0.105.0-0.118.0.txt → upgrading-0.106.0-0.120.0.txt} +152 -410
- package/llms/upgrading-0.37.0-0.53.0.txt +969 -0
- package/llms/{upgrading-0.44.0-0.62.0.txt → upgrading-0.55.0-0.68.0.txt} +509 -528
- package/llms/{upgrading-0.63.0-0.83.0.txt → upgrading-0.69.0-0.95.0.txt} +506 -509
- package/llms/{upgrading-0.84.0-0.104.0.txt → upgrading-0.96.0-0.105.0.txt} +410 -506
- package/llms/upgrading.txt +5 -5
- package/llms-full.txt +475 -154
- package/llms.txt +17 -14
- package/package.json +32 -20
- package/llms/upgrading-0.37.0-0.44.0.txt +0 -444
- package/dist/{index-arjmb6de.js → index-1jwsfkfz.js} +0 -0
- package/dist/{index-qndsr7f0.js → index-5efrpfmj.js} +3 -3
|
@@ -2,9 +2,10 @@ import"../../index-ct75c3at.js";
|
|
|
2
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-x4p3kw1p.js";
|
|
6
|
+
import"../../index-s3yxw6kt.js";
|
|
7
|
+
import"../../index-69t14s4a.js";
|
|
8
|
+
import"../../index-ycqhyars.js";
|
|
8
9
|
import {
|
|
9
10
|
RESOURCE_MIME_TYPE2,
|
|
10
11
|
EXT_APPS_BUNDLE_PLACEHOLDER2,
|
|
@@ -18,16 +19,116 @@ import {
|
|
|
18
19
|
mountMcpResource2,
|
|
19
20
|
createMcpHandler2,
|
|
20
21
|
createMcpHttpRoute2,
|
|
21
|
-
createStdioMcpServer2
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
22
|
+
createStdioMcpServer2
|
|
23
|
+
} from "../../index-knmnj11j.js";
|
|
24
|
+
import {
|
|
25
|
+
DEFAULT_PROCESS_SIGNALS,
|
|
26
|
+
defaultSignalSource,
|
|
27
|
+
reportSignalError,
|
|
28
|
+
guardSignalCallback
|
|
29
|
+
} from "../../index-3prvb42w.js";
|
|
30
|
+
import"../../index-ff39f9dr.js";
|
|
31
|
+
import"../../index-aqwg2dm5.js";
|
|
32
|
+
// src/tools/mcp/stdio-signals.ts
|
|
33
|
+
var bound = new WeakSet;
|
|
34
|
+
function bindStdioProcessSignals(handle, options = {}) {
|
|
35
|
+
if (bound.has(handle)) {
|
|
36
|
+
throw new Error("[stitchkit] bindStdioProcessSignals: this stdio handle is already bound; close the first binding before creating another");
|
|
37
|
+
}
|
|
38
|
+
bound.add(handle);
|
|
39
|
+
const signals = [...new Set(options.signals ?? DEFAULT_PROCESS_SIGNALS)];
|
|
40
|
+
const source = options.signalSource ?? defaultSignalSource;
|
|
41
|
+
const handlers = [];
|
|
42
|
+
let started = false;
|
|
43
|
+
let sameTurnAsStart = false;
|
|
44
|
+
let closed = false;
|
|
45
|
+
let resolveChain = () => {
|
|
46
|
+
return;
|
|
47
|
+
};
|
|
48
|
+
let rejectChain = () => {
|
|
49
|
+
return;
|
|
50
|
+
};
|
|
51
|
+
const promise = new Promise((resolve, reject) => {
|
|
52
|
+
resolveChain = resolve;
|
|
53
|
+
rejectChain = reject;
|
|
54
|
+
});
|
|
55
|
+
promise.catch(() => {
|
|
56
|
+
return;
|
|
57
|
+
});
|
|
58
|
+
const removeListeners = () => {
|
|
59
|
+
if (closed)
|
|
60
|
+
return;
|
|
61
|
+
closed = true;
|
|
62
|
+
for (const [signal, handler] of handlers)
|
|
63
|
+
source.off(signal, handler);
|
|
64
|
+
if (!started)
|
|
65
|
+
bound.delete(handle);
|
|
66
|
+
};
|
|
67
|
+
const close = () => {
|
|
68
|
+
const hadStarted = started;
|
|
69
|
+
removeListeners();
|
|
70
|
+
if (!hadStarted)
|
|
71
|
+
resolveChain();
|
|
72
|
+
};
|
|
73
|
+
const run = async (signal) => {
|
|
74
|
+
try {
|
|
75
|
+
await options.onClose?.(signal);
|
|
76
|
+
} catch (error) {
|
|
77
|
+
reportSignalError("prepare", error, options.onError);
|
|
78
|
+
}
|
|
79
|
+
try {
|
|
80
|
+
await handle.close();
|
|
81
|
+
} catch (error) {
|
|
82
|
+
rejectChain(error);
|
|
83
|
+
reportSignalError("close", error, options.onError);
|
|
84
|
+
removeListeners();
|
|
85
|
+
return;
|
|
86
|
+
}
|
|
87
|
+
resolveChain();
|
|
88
|
+
try {
|
|
89
|
+
await options.onComplete?.();
|
|
90
|
+
} catch (error) {
|
|
91
|
+
reportSignalError("complete", error, options.onError);
|
|
92
|
+
} finally {
|
|
93
|
+
removeListeners();
|
|
94
|
+
}
|
|
95
|
+
};
|
|
96
|
+
const onSignal = (signal) => {
|
|
97
|
+
if (!started) {
|
|
98
|
+
started = true;
|
|
99
|
+
sameTurnAsStart = true;
|
|
100
|
+
queueMicrotask(() => {
|
|
101
|
+
sameTurnAsStart = false;
|
|
102
|
+
});
|
|
103
|
+
run(signal).catch((error) => reportSignalError("close", error, options.onError));
|
|
104
|
+
return;
|
|
105
|
+
}
|
|
106
|
+
if (sameTurnAsStart)
|
|
107
|
+
return;
|
|
108
|
+
removeListeners();
|
|
109
|
+
guardSignalCallback(() => options.onRepeatedSignal?.(signal), "close", options.onError);
|
|
110
|
+
let restored = false;
|
|
111
|
+
try {
|
|
112
|
+
restored = source.raiseDefault(signal);
|
|
113
|
+
} catch (error) {
|
|
114
|
+
reportSignalError("close", error, options.onError);
|
|
115
|
+
}
|
|
116
|
+
if (!restored) {
|
|
117
|
+
guardSignalCallback(() => options.onEscalationBlocked?.(signal), "close", options.onError);
|
|
118
|
+
}
|
|
119
|
+
};
|
|
120
|
+
for (const signal of signals) {
|
|
121
|
+
const handler = () => onSignal(signal);
|
|
122
|
+
handlers.push([signal, handler]);
|
|
123
|
+
source.on(signal, handler);
|
|
124
|
+
}
|
|
125
|
+
return { promise, close };
|
|
126
|
+
}
|
|
26
127
|
export {
|
|
27
128
|
EXT_APPS_BUNDLE_PLACEHOLDER2 as EXT_APPS_BUNDLE_PLACEHOLDER,
|
|
28
129
|
MCP_CATALOG_META_KEY2 as MCP_CATALOG_META_KEY,
|
|
29
130
|
RESOURCE_MIME_TYPE2 as RESOURCE_MIME_TYPE,
|
|
30
|
-
|
|
131
|
+
bindStdioProcessSignals,
|
|
31
132
|
buildMcpServer2 as buildMcpServer,
|
|
32
133
|
createMcpHandler2 as createMcpHandler,
|
|
33
134
|
createMcpHttpRoute2 as createMcpHttpRoute,
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `stitchkit/tools/toolkit` — one tool set served over MCP and to an AI SDK agent.
|
|
3
|
+
*
|
|
4
|
+
* The toolkit composes both adapters, so this subpath needs both optional peers,
|
|
5
|
+
* `@modelcontextprotocol/server` and `ai`. A server that needs only one of them
|
|
6
|
+
* imports `stitchkit/tools/mcp` or `stitchkit/tools/agent`. → ADR 0284.
|
|
7
|
+
*/
|
|
8
|
+
export { createToolkit, type Toolkit } from '../../tools/toolkit.js';
|
|
9
|
+
//# sourceMappingURL=toolkit.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toolkit.d.ts","sourceRoot":"","sources":["../../../src/entrypoints/tools/toolkit.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EAAE,aAAa,EAAE,KAAK,OAAO,EAAE,MAAM,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import"../../index-k42ckyzx.js";
|
|
2
|
+
import"../../index-dsa676h8.js";
|
|
3
|
+
import"../../index-rbzq0q16.js";
|
|
4
|
+
import"../../index-ct75c3at.js";
|
|
5
|
+
import"../../index-x4p3kw1p.js";
|
|
6
|
+
import"../../index-s3yxw6kt.js";
|
|
7
|
+
import"../../index-69t14s4a.js";
|
|
8
|
+
import"../../index-ycqhyars.js";
|
|
9
|
+
import {
|
|
10
|
+
mountAgent2
|
|
11
|
+
} from "../../index-7zwtbak8.js";
|
|
12
|
+
import {
|
|
13
|
+
createCli2
|
|
14
|
+
} from "../../index-pq2m7t46.js";
|
|
15
|
+
import"../../index-2kbysk9s.js";
|
|
16
|
+
import {
|
|
17
|
+
mountMcp2,
|
|
18
|
+
buildMcpServer2,
|
|
19
|
+
createMcpHandler2,
|
|
20
|
+
createStdioMcpServer2
|
|
21
|
+
} from "../../index-knmnj11j.js";
|
|
22
|
+
import"../../index-e452syyh.js";
|
|
23
|
+
import"../../index-1jwsfkfz.js";
|
|
24
|
+
import"../../index-ff39f9dr.js";
|
|
25
|
+
import"../../index-aqwg2dm5.js";
|
|
26
|
+
|
|
27
|
+
// src/tools/toolkit.ts
|
|
28
|
+
function createToolkit() {
|
|
29
|
+
return {
|
|
30
|
+
mountMcp: (server, services, config) => mountMcp2(server, services, config),
|
|
31
|
+
mountAgent: (services, config) => mountAgent2(services, config),
|
|
32
|
+
buildMcpServer: (config, auth) => buildMcpServer2(config, auth),
|
|
33
|
+
createMcpHandler: (config) => createMcpHandler2(config),
|
|
34
|
+
createStdioMcpServer: (config) => createStdioMcpServer2(config),
|
|
35
|
+
createCli: (config) => createCli2(config)
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
export {
|
|
39
|
+
createToolkit
|
|
40
|
+
};
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
export type { McpServer } from '@modelcontextprotocol/server';
|
|
2
1
|
export { createLocalStepDurability, type EffectHandlers, type EffectOutcome, type EffectRunOptions, EffectUnresolvedError, type LocalStepDurability, type LocalStepDurabilityOptions, type StepDurabilityLedger, } from '../durability/engine.js';
|
|
3
2
|
export type { AgentStoreEventEnvelope, AgentStoreEventPage, AppendAgentStoreEvent, ReadAgentStoreEvents, } from '../durability/events.js';
|
|
4
3
|
export type { ManagedFileBoundary, ManagedFileReadOptions, ManagedFileSource, ManagedFileWriteOptions, } from '../files/boundary.js';
|
|
@@ -6,7 +5,6 @@ export { type CimdCacheEvent, type CimdCachePolicy, type CimdClientMetadata, typ
|
|
|
6
5
|
export { oauthProtectedResourceRoute, PROTECTED_RESOURCE_PATH, type ProtectedResourceConfig, protectedResourceMetadataUrl, wwwAuthenticateHeader, } from '../server/oauth/metadata.js';
|
|
7
6
|
export { type ApplicationType, type AuthCodeData, type AuthRequest, type ClientMetadata, mountOAuthProvider, type OAuthClientRegistrationConfig, type OAuthProviderConfig, type RefreshData, type RegisteredClient, } from '../server/oauth/provider.js';
|
|
8
7
|
export type { OperationIdentity } from '../server/types.js';
|
|
9
|
-
export { type AgentContext, type AgentMountConfig, mountAgent } from '../tools/agent.js';
|
|
10
8
|
export { AgentToolError, isAgentToolError } from '../tools/agent-tool-error.js';
|
|
11
9
|
export type { DurableJsonValue, ToolDurability, ToolDurabilityFactory, } from '../tools/durability-port.js';
|
|
12
10
|
export type { ToolExecutionControlReason, ToolOperation } from '../tools/execute.js';
|
|
@@ -18,13 +16,6 @@ export { createToolInvoker, type ToolInvocationOptions, type ToolInvoker, type T
|
|
|
18
16
|
export { composeToolLifecycle } from '../tools/lifecycle.js';
|
|
19
17
|
export { listContractToolNames, listToolNames, type ToolNameEntry, } from '../tools/list-names.js';
|
|
20
18
|
export { buildToolManifest, describeToolCatalog, type ToolCatalogConfig, type ToolCatalogEntry, type ToolManifestConfig, type ToolManifestEntry, } from '../tools/manifest.js';
|
|
21
|
-
export { EXT_APPS_BUNDLE_PLACEHOLDER, inlineMcpAppBundle, type McpAppCsp, type McpAppResourceMeta, type McpResourceDef, RESOURCE_MIME_TYPE, } from '../tools/mcp/app.js';
|
|
22
|
-
export { MCP_CATALOG_META_KEY, type McpCatalogStamp, mcpCatalogMeta, readMcpCatalogStamp, } from '../tools/mcp/catalog.js';
|
|
23
|
-
export { createMcpHandler, createMcpHttpRoute, type McpHandlerConfig, type McpHttpConfig, type McpHttpHandler, type McpHttpSecurityConfig, type McpLegacyPolicy, } from '../tools/mcp/handler.js';
|
|
24
|
-
export { buildMcpServer, type DirectMcpSurfaceConfig, type FiniteMcpSurfaceConfig, type McpMountConfig, type McpServerBuildConfig, type McpServerSharedConfig, mountMcp, mountMcpResource, validateMcpSchemas, } from '../tools/mcp/mount.js';
|
|
25
|
-
export type { IncompatibleSchemaPolicy, McpSchemaValidationConfig, McpSurfaceDefinition, McpSurfaceRegistry, ValidateMcpSchemasConfig, } from '../tools/mcp/prepare.js';
|
|
26
|
-
export { createStdioMcpServer, type McpStdioHandle, type StdioAuthConfig, type StdioMcpServerConfig, } from '../tools/mcp/stdio.js';
|
|
27
|
-
export { bindStdioProcessSignals, type StdioCloseTarget, type StdioProcessSignalsBinding, type StdioProcessSignalsErrorPhase, type StdioProcessSignalsOptions, } from '../tools/mcp/stdio-signals.js';
|
|
28
19
|
export { type CollectToolsConfig, collectTools, type MountableTool, type ToolExtend, } from '../tools/mount.js';
|
|
29
20
|
export type { ManagedNativeToolConfig, NativeToolIdentity, } from '../tools/native-definition.js';
|
|
30
21
|
export { bindContractAsyncOperation } from '../tools/operations/async-operation-binding.js';
|
|
@@ -42,7 +33,6 @@ export { flattenToolJsonSchema, type ToolPresentationSchema, } from '../tools/sc
|
|
|
42
33
|
export { findNonPortableFormats, type NonPortableFormat, PORTABLE_JSON_SCHEMA_FORMATS, } from '../tools/schema/portable-formats.js';
|
|
43
34
|
export { findUntypedProperties, type UntypedProperty, } from '../tools/schema/untyped-properties.js';
|
|
44
35
|
export { createToolLogger, type ToolCallRecord, type ToolLoggerConfig, } from '../tools/tool-logger.js';
|
|
45
|
-
export { createToolkit, type Toolkit } from '../tools/toolkit.js';
|
|
46
36
|
export { type DefineDownloadToolConfig, defineDownloadTool, } from '../tools/transfer/define-download-tool.js';
|
|
47
37
|
export { type DefineUploadToolConfig, defineUploadTool, UploadToolInputSchema, } from '../tools/transfer/define-upload-tool.js';
|
|
48
38
|
export { type DefineViewFileToolConfig, defineViewFileTool, } from '../tools/transfer/define-view-file-tool.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../../src/entrypoints/tools.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../../src/entrypoints/tools.ts"],"names":[],"mappings":"AAOA,OAAO,EACL,yBAAyB,EACzB,KAAK,cAAc,EACnB,KAAK,aAAa,EAClB,KAAK,gBAAgB,EACrB,qBAAqB,EACrB,KAAK,mBAAmB,EACxB,KAAK,0BAA0B,EAC/B,KAAK,oBAAoB,GAC1B,MAAM,sBAAsB,CAAC;AAC9B,YAAY,EACV,uBAAuB,EACvB,mBAAmB,EACnB,qBAAqB,EACrB,oBAAoB,GACrB,MAAM,sBAAsB,CAAC;AAC9B,YAAY,EACV,mBAAmB,EACnB,sBAAsB,EACtB,iBAAiB,EACjB,uBAAuB,GACxB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,KAAK,cAAc,EACnB,KAAK,eAAe,EACpB,KAAK,kBAAkB,EACvB,KAAK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e,EACpB,KAAK,gBAAgB,GACtB,MAAM,qBAAqB,CAAC;AAC7B,cAAc,kBAAkB,CAAC"}
|
|
@@ -2,10 +2,8 @@ import {
|
|
|
2
2
|
EffectUnresolvedError2
|
|
3
3
|
} from "../index-snef22zr.js";
|
|
4
4
|
import {
|
|
5
|
-
createLocalStepDurability2
|
|
6
|
-
|
|
7
|
-
isAgentToolError2
|
|
8
|
-
} from "../index-tvtacc9a.js";
|
|
5
|
+
createLocalStepDurability2
|
|
6
|
+
} from "../index-zyc64nbh.js";
|
|
9
7
|
import {
|
|
10
8
|
normalizeError2
|
|
11
9
|
} from "../index-k42ckyzx.js";
|
|
@@ -21,46 +19,22 @@ import {
|
|
|
21
19
|
findNonPortableFormats2,
|
|
22
20
|
flattenToolJsonSchema2,
|
|
23
21
|
findUntypedProperties2
|
|
24
|
-
} from "../index-
|
|
22
|
+
} from "../index-x4p3kw1p.js";
|
|
25
23
|
import {
|
|
26
24
|
ToolExecutionControlError2,
|
|
27
25
|
isToolExecutionControlError2
|
|
28
|
-
} from "../index-
|
|
26
|
+
} from "../index-s3yxw6kt.js";
|
|
29
27
|
import {
|
|
30
|
-
|
|
31
|
-
|
|
28
|
+
ALL_TRANSPORTS2,
|
|
29
|
+
TOOL_TRANSPORTS2
|
|
30
|
+
} from "../index-69t14s4a.js";
|
|
32
31
|
import {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
buildToolManifest2
|
|
36
|
-
} from "../index-6p3frkv5.js";
|
|
32
|
+
collectTools2
|
|
33
|
+
} from "../index-ycqhyars.js";
|
|
37
34
|
import"../index-m38ej7e5.js";
|
|
38
35
|
import {
|
|
39
|
-
ALL_TRANSPORTS2,
|
|
40
|
-
TOOL_TRANSPORTS2,
|
|
41
36
|
defineContract2
|
|
42
|
-
} from "../index-
|
|
43
|
-
import {
|
|
44
|
-
PROTECTED_RESOURCE_PATH2,
|
|
45
|
-
protectedResourceMetadataUrl2,
|
|
46
|
-
wwwAuthenticateHeader2,
|
|
47
|
-
oauthProtectedResourceRoute2,
|
|
48
|
-
RESOURCE_MIME_TYPE2,
|
|
49
|
-
EXT_APPS_BUNDLE_PLACEHOLDER2,
|
|
50
|
-
inlineMcpAppBundle2,
|
|
51
|
-
MCP_CATALOG_META_KEY2,
|
|
52
|
-
mcpCatalogMeta2,
|
|
53
|
-
readMcpCatalogStamp2,
|
|
54
|
-
createMcpProgressReporter,
|
|
55
|
-
validateMcpSchemas2,
|
|
56
|
-
mountMcp2,
|
|
57
|
-
buildMcpServer2,
|
|
58
|
-
mountMcpResource2,
|
|
59
|
-
createMcpHandler2,
|
|
60
|
-
createMcpHttpRoute2,
|
|
61
|
-
createStdioMcpServer2,
|
|
62
|
-
bindStdioProcessSignals2
|
|
63
|
-
} from "../index-095ya5hm.js";
|
|
37
|
+
} from "../index-4jpykzvw.js";
|
|
64
38
|
import {
|
|
65
39
|
AsyncOperationCancelResultSchema2,
|
|
66
40
|
createAsyncOperationSnapshotSchema2,
|
|
@@ -69,13 +43,7 @@ import {
|
|
|
69
43
|
ViewFileErrorSchema2,
|
|
70
44
|
ViewFileOutputSchema2,
|
|
71
45
|
ViewFileInputSchema2
|
|
72
|
-
} from "../index-
|
|
73
|
-
import {
|
|
74
|
-
WaitTimeoutError,
|
|
75
|
-
runWaitOperation,
|
|
76
|
-
createCli2
|
|
77
|
-
} from "../index-w7jq3fz9.js";
|
|
78
|
-
import"../index-2kbysk9s.js";
|
|
46
|
+
} from "../index-sba3e6m4.js";
|
|
79
47
|
import {
|
|
80
48
|
ManagedFilePathSchema2,
|
|
81
49
|
ManagedFileRefSchema2
|
|
@@ -87,25 +55,43 @@ import {
|
|
|
87
55
|
import {
|
|
88
56
|
contractOnlyService,
|
|
89
57
|
mediaTypeEssence
|
|
90
|
-
} from "../index-
|
|
58
|
+
} from "../index-sa99p98w.js";
|
|
59
|
+
import"../index-pfvde2fz.js";
|
|
60
|
+
import {
|
|
61
|
+
describeToolCatalog2,
|
|
62
|
+
buildToolManifest2
|
|
63
|
+
} from "../index-h1j71dr1.js";
|
|
64
|
+
import {
|
|
65
|
+
PROTECTED_RESOURCE_PATH2,
|
|
66
|
+
protectedResourceMetadataUrl2,
|
|
67
|
+
wwwAuthenticateHeader2,
|
|
68
|
+
oauthProtectedResourceRoute2,
|
|
69
|
+
createMcpProgressReporter
|
|
70
|
+
} from "../index-568w258r.js";
|
|
91
71
|
import {
|
|
92
72
|
DEFAULT_CORS_ALLOW_HEADERS2
|
|
93
|
-
} from "../index-
|
|
73
|
+
} from "../index-pq7rkwkk.js";
|
|
74
|
+
import {
|
|
75
|
+
AgentToolError2,
|
|
76
|
+
isAgentToolError2
|
|
77
|
+
} from "../index-1psbyyhj.js";
|
|
94
78
|
import {
|
|
95
79
|
createToolInvoker2
|
|
96
|
-
} from "../index-
|
|
97
|
-
import
|
|
98
|
-
|
|
80
|
+
} from "../index-kz9734jc.js";
|
|
81
|
+
import {
|
|
82
|
+
WaitTimeoutError,
|
|
83
|
+
runWaitOperation
|
|
84
|
+
} from "../index-bph35vpy.js";
|
|
99
85
|
import {
|
|
100
86
|
collectToolSurface
|
|
101
|
-
} from "../index-
|
|
87
|
+
} from "../index-ff39f9dr.js";
|
|
102
88
|
import {
|
|
103
89
|
getTraceId2
|
|
104
90
|
} from "../index-r6v4mc67.js";
|
|
105
91
|
import {
|
|
106
92
|
defineRuntimeTool2,
|
|
107
93
|
createRuntimeToolFactory2
|
|
108
|
-
} from "../index-
|
|
94
|
+
} from "../index-aqwg2dm5.js";
|
|
109
95
|
import {
|
|
110
96
|
ManagedFileError2
|
|
111
97
|
} from "../index-364k2zwa.js";
|
|
@@ -113,12 +99,11 @@ import {
|
|
|
113
99
|
fetchGuarded,
|
|
114
100
|
fetchPinnedDocument,
|
|
115
101
|
readCapped
|
|
116
|
-
} from "../index-
|
|
117
|
-
import"../index-1bx1xv1k.js";
|
|
102
|
+
} from "../index-jswst0h3.js";
|
|
118
103
|
import {
|
|
119
104
|
readBoundedChunks,
|
|
120
105
|
concatChunks
|
|
121
|
-
} from "../index-
|
|
106
|
+
} from "../index-5efrpfmj.js";
|
|
122
107
|
import {
|
|
123
108
|
assertPositiveSafeInteger
|
|
124
109
|
} from "../index-0s4xebbg.js";
|
|
@@ -1422,17 +1407,6 @@ function createToolLogger(config = {}) {
|
|
|
1422
1407
|
}
|
|
1423
1408
|
};
|
|
1424
1409
|
}
|
|
1425
|
-
// src/tools/toolkit.ts
|
|
1426
|
-
function createToolkit() {
|
|
1427
|
-
return {
|
|
1428
|
-
mountMcp: (server, services, config) => mountMcp2(server, services, config),
|
|
1429
|
-
mountAgent: (services, config) => mountAgent2(services, config),
|
|
1430
|
-
buildMcpServer: (config, auth) => buildMcpServer2(config, auth),
|
|
1431
|
-
createMcpHandler: (config) => createMcpHandler2(config),
|
|
1432
|
-
createStdioMcpServer: (config) => createStdioMcpServer2(config),
|
|
1433
|
-
createCli: (config) => createCli2(config)
|
|
1434
|
-
};
|
|
1435
|
-
}
|
|
1436
1410
|
// src/tools/transfer/download-core.ts
|
|
1437
1411
|
import { basename, extname } from "node:path";
|
|
1438
1412
|
var DEFAULT_MAX_BYTES = 100 * 1024 * 1024;
|
|
@@ -1969,36 +1943,27 @@ function summarizeTransports(surface) {
|
|
|
1969
1943
|
export {
|
|
1970
1944
|
AgentToolError2 as AgentToolError,
|
|
1971
1945
|
AsyncOperationCancelResultSchema2 as AsyncOperationCancelResultSchema,
|
|
1972
|
-
EXT_APPS_BUNDLE_PLACEHOLDER2 as EXT_APPS_BUNDLE_PLACEHOLDER,
|
|
1973
1946
|
EffectUnresolvedError2 as EffectUnresolvedError,
|
|
1974
|
-
MCP_CATALOG_META_KEY2 as MCP_CATALOG_META_KEY,
|
|
1975
1947
|
McpAnnotationsSchema2 as McpAnnotationsSchema,
|
|
1976
1948
|
McpMediaContentSchema2 as McpMediaContentSchema,
|
|
1977
1949
|
PORTABLE_JSON_SCHEMA_FORMATS2 as PORTABLE_JSON_SCHEMA_FORMATS,
|
|
1978
1950
|
PROTECTED_RESOURCE_PATH2 as PROTECTED_RESOURCE_PATH,
|
|
1979
|
-
RESOURCE_MIME_TYPE2 as RESOURCE_MIME_TYPE,
|
|
1980
1951
|
ToolExecutionControlError2 as ToolExecutionControlError,
|
|
1981
1952
|
UploadToolInputSchema,
|
|
1982
1953
|
ViewFileErrorSchema2 as ViewFileErrorSchema,
|
|
1983
1954
|
ViewFileInputSchema2 as ViewFileInputSchema,
|
|
1984
1955
|
ViewFileOutputSchema2 as ViewFileOutputSchema,
|
|
1985
1956
|
bindContractAsyncOperation,
|
|
1986
|
-
bindStdioProcessSignals2 as bindStdioProcessSignals,
|
|
1987
|
-
buildMcpServer2 as buildMcpServer,
|
|
1988
1957
|
buildToolManifest2 as buildToolManifest,
|
|
1989
1958
|
coerceJsonArgs2 as coerceJsonArgs,
|
|
1990
1959
|
collectTools2 as collectTools,
|
|
1991
1960
|
composeToolLifecycle,
|
|
1992
1961
|
createAsyncOperationSnapshotSchema2 as createAsyncOperationSnapshotSchema,
|
|
1993
1962
|
createLocalStepDurability2 as createLocalStepDurability,
|
|
1994
|
-
createMcpHandler2 as createMcpHandler,
|
|
1995
|
-
createMcpHttpRoute2 as createMcpHttpRoute,
|
|
1996
1963
|
createRuntimeToolFactory2 as createRuntimeToolFactory,
|
|
1997
1964
|
createSecureClientMetadataFetcher,
|
|
1998
|
-
createStdioMcpServer2 as createStdioMcpServer,
|
|
1999
1965
|
createToolInvoker2 as createToolInvoker,
|
|
2000
1966
|
createToolLogger,
|
|
2001
|
-
createToolkit,
|
|
2002
1967
|
defineAsyncOperation,
|
|
2003
1968
|
defineAsyncOperationContract,
|
|
2004
1969
|
defineDownloadTool,
|
|
@@ -2011,25 +1976,18 @@ export {
|
|
|
2011
1976
|
findNonPortableFormats2 as findNonPortableFormats,
|
|
2012
1977
|
findUntypedProperties2 as findUntypedProperties,
|
|
2013
1978
|
flattenToolJsonSchema2 as flattenToolJsonSchema,
|
|
2014
|
-
inlineMcpAppBundle2 as inlineMcpAppBundle,
|
|
2015
1979
|
isAgentToolError2 as isAgentToolError,
|
|
2016
1980
|
isToolExecutionControlError2 as isToolExecutionControlError,
|
|
2017
1981
|
listContractToolNames,
|
|
2018
1982
|
listToolNames,
|
|
2019
|
-
mcpCatalogMeta2 as mcpCatalogMeta,
|
|
2020
|
-
mountAgent2 as mountAgent,
|
|
2021
1983
|
mountDownload,
|
|
2022
|
-
mountMcp2 as mountMcp,
|
|
2023
|
-
mountMcpResource2 as mountMcpResource,
|
|
2024
1984
|
mountOAuthProvider,
|
|
2025
1985
|
mountUpload,
|
|
2026
1986
|
mountViewFile,
|
|
2027
1987
|
mountWait,
|
|
2028
1988
|
oauthProtectedResourceRoute2 as oauthProtectedResourceRoute,
|
|
2029
1989
|
protectedResourceMetadataUrl2 as protectedResourceMetadataUrl,
|
|
2030
|
-
readMcpCatalogStamp2 as readMcpCatalogStamp,
|
|
2031
1990
|
resolveMedia,
|
|
2032
1991
|
summarizeTransports,
|
|
2033
|
-
validateMcpSchemas2 as validateMcpSchemas,
|
|
2034
1992
|
wwwAuthenticateHeader2 as wwwAuthenticateHeader
|
|
2035
1993
|
};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import"../../index-m38ej7e5.js";
|
|
2
|
+
import"../../index-69t14s4a.js";
|
|
2
3
|
import {
|
|
3
4
|
defineContract2
|
|
4
|
-
} from "../../index-
|
|
5
|
+
} from "../../index-4jpykzvw.js";
|
|
5
6
|
|
|
6
7
|
// src/tracking/schemas.ts
|
|
7
8
|
import { z } from "zod";
|
|
@@ -14,6 +15,7 @@ var UtmDataSchema = z.object({
|
|
|
14
15
|
});
|
|
15
16
|
var AttributionDataSchema = z.object({
|
|
16
17
|
utm: UtmDataSchema.optional(),
|
|
18
|
+
clickId: z.string().min(1).max(200).optional(),
|
|
17
19
|
referrer: z.string().optional(),
|
|
18
20
|
landingPage: z.string().optional()
|
|
19
21
|
});
|
|
@@ -57,6 +59,7 @@ function visitEntryContextShape(buildIdPattern) {
|
|
|
57
59
|
landingPath: z.string().startsWith("/").max(300).regex(/^[^?#]*$/),
|
|
58
60
|
referrer: z.url().max(2000).optional(),
|
|
59
61
|
utm: UtmDataSchema.optional(),
|
|
62
|
+
clickId: AttributionDataSchema.shape.clickId,
|
|
60
63
|
displayMode: z.enum(["browser", "standalone"]),
|
|
61
64
|
screenWidth: z.number().int().positive().max(20000),
|
|
62
65
|
screenHeight: z.number().int().positive().max(20000),
|
|
@@ -75,8 +78,7 @@ function createTrackingSchemas(config) {
|
|
|
75
78
|
event,
|
|
76
79
|
request: z.object({
|
|
77
80
|
buildId: z.string().regex(buildIdPattern),
|
|
78
|
-
events: z.array(event).min(1).max(maxEvents)
|
|
79
|
-
utm: UtmDataSchema.optional()
|
|
81
|
+
events: z.array(event).min(1).max(maxEvents)
|
|
80
82
|
}),
|
|
81
83
|
response: TrackEventsResponseSchema,
|
|
82
84
|
disposition: TrackingDispositionSchema,
|
|
@@ -2,9 +2,9 @@ import {
|
|
|
2
2
|
DEFAULT_BOT_USER_AGENT_PATTERN2
|
|
3
3
|
} from "../../index-1f40z584.js";
|
|
4
4
|
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
} from "../../index-
|
|
5
|
+
redactTrackingText2,
|
|
6
|
+
sendUnloadBeacon2
|
|
7
|
+
} from "../../index-8vzh5wpv.js";
|
|
8
8
|
|
|
9
9
|
// src/tracking/performance/collector.ts
|
|
10
10
|
var DEFAULT_EARLY_DELAY_MS = 5000;
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* `stitchkit/tracking/contract`, the server half `stitchkit/tracking/server`.
|
|
9
9
|
* → ADR 0166, ADR 0280.
|
|
10
10
|
*/
|
|
11
|
-
export { type AttributionStorage,
|
|
11
|
+
export { type AttributionStorage, parseUtmFromSearch, type ResolveAttributionInput, type ResolvedAttribution, resolveAttribution, } from '../tracking/attribution.js';
|
|
12
12
|
export { sendUnloadBeacon } from '../tracking/beacon.js';
|
|
13
13
|
export { type ClickTarget, type ResolveTrackedClickOptions, resolveTrackedClick, type TrackedClick, type TrackedClickAttributes, } from '../tracking/clicks.js';
|
|
14
14
|
export { type BuiltinTrackingEventTypes, CONVENTIONAL_TRACKING_EVENT_TYPES, createTrackingClient, type EventsWithMetadata, type EventsWithoutMetadata, type TrackFn, type TrackingClient, type TrackingClientConfig, } from '../tracking/client.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tracking.d.ts","sourceRoot":"","sources":["../../src/entrypoints/tracking.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,EACL,KAAK,kBAAkB,EACvB,
|
|
1
|
+
{"version":3,"file":"tracking.d.ts","sourceRoot":"","sources":["../../src/entrypoints/tracking.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,EACL,KAAK,kBAAkB,EACvB,kBAAkB,EAClB,KAAK,uBAAuB,EAC5B,KAAK,mBAAmB,EACxB,kBAAkB,GACnB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EACL,KAAK,WAAW,EAChB,KAAK,0BAA0B,EAC/B,mBAAmB,EACnB,KAAK,YAAY,EACjB,KAAK,sBAAsB,GAC5B,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,KAAK,yBAAyB,EAC9B,iCAAiC,EACjC,oBAAoB,EACpB,KAAK,kBAAkB,EACvB,KAAK,qBAAqB,EAC1B,KAAK,OAAO,EACZ,KAAK,cAAc,EACnB,KAAK,oBAAoB,GAC1B,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,oBAAoB,EACpB,KAAK,uBAAuB,EAC5B,KAAK,uBAAuB,GAC7B,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,mBAAmB,EACnB,KAAK,YAAY,EACjB,KAAK,mBAAmB,GACzB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,iBAAiB,EAAE,KAAK,WAAW,EAAE,MAAM,2BAA2B,C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