stitchkit 0.87.1 → 0.89.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 +190 -0
- package/dist/agent-runtime/child-blocking.d.ts +17 -0
- package/dist/agent-runtime/child-blocking.d.ts.map +1 -0
- package/dist/agent-runtime/child-budget-policy.d.ts +23 -0
- package/dist/agent-runtime/child-budget-policy.d.ts.map +1 -0
- package/dist/agent-runtime/children-contract.d.ts +155 -0
- package/dist/agent-runtime/children-contract.d.ts.map +1 -0
- package/dist/agent-runtime/children.d.ts +4 -99
- package/dist/agent-runtime/children.d.ts.map +1 -1
- package/dist/agent-runtime/coding-shell-process.d.ts +33 -0
- package/dist/agent-runtime/coding-shell-process.d.ts.map +1 -0
- package/dist/agent-runtime/coding-tool-contract.d.ts +18 -0
- package/dist/agent-runtime/coding-tool-contract.d.ts.map +1 -1
- package/dist/agent-runtime/coding-tool-files.d.ts.map +1 -1
- package/dist/agent-runtime/coding-tool-listing.d.ts.map +1 -1
- package/dist/agent-runtime/coding-tool-paths.d.ts +1 -1
- package/dist/agent-runtime/coding-tool-paths.d.ts.map +1 -1
- package/dist/agent-runtime/coding-tool-search-patch.d.ts.map +1 -1
- package/dist/agent-runtime/coding-tool-shell.d.ts.map +1 -1
- package/dist/agent-runtime/coding-tool-utf8.d.ts +28 -0
- package/dist/agent-runtime/coding-tool-utf8.d.ts.map +1 -0
- package/dist/agent-runtime/contained-files.d.ts +20 -0
- package/dist/agent-runtime/contained-files.d.ts.map +1 -1
- package/dist/agent-runtime/durability-contract.d.ts +176 -0
- package/dist/agent-runtime/durability-contract.d.ts.map +1 -0
- package/dist/agent-runtime/durability-json.d.ts +3 -0
- package/dist/agent-runtime/durability-json.d.ts.map +1 -0
- package/dist/agent-runtime/durability-ledger.d.ts +16 -0
- package/dist/agent-runtime/durability-ledger.d.ts.map +1 -0
- package/dist/agent-runtime/durability-scheduler.d.ts +29 -0
- package/dist/agent-runtime/durability-scheduler.d.ts.map +1 -0
- package/dist/agent-runtime/durability.d.ts +14 -0
- package/dist/agent-runtime/durability.d.ts.map +1 -0
- package/dist/agent-runtime/event-search.d.ts.map +1 -1
- package/dist/agent-runtime/harness-contract.d.ts +37 -0
- package/dist/agent-runtime/harness-contract.d.ts.map +1 -1
- package/dist/agent-runtime/harness.d.ts +8 -0
- package/dist/agent-runtime/harness.d.ts.map +1 -1
- package/dist/agent-runtime/models.d.ts +14 -0
- package/dist/agent-runtime/models.d.ts.map +1 -1
- package/dist/agent-runtime/observability.d.ts +8 -0
- package/dist/agent-runtime/observability.d.ts.map +1 -1
- package/dist/agent-runtime/owned-provider-stream.d.ts +16 -0
- package/dist/agent-runtime/owned-provider-stream.d.ts.map +1 -0
- package/dist/agent-runtime/prompt.d.ts +23 -0
- package/dist/agent-runtime/prompt.d.ts.map +1 -1
- package/dist/agent-runtime/run-execution.d.ts.map +1 -1
- package/dist/agent-runtime/runtime-internals.d.ts +16 -0
- package/dist/agent-runtime/runtime-internals.d.ts.map +1 -1
- package/dist/agent-runtime/runtime.d.ts +25 -0
- package/dist/agent-runtime/runtime.d.ts.map +1 -1
- package/dist/agent-runtime/sandbox-broker.d.ts +7 -0
- package/dist/agent-runtime/sandbox-broker.d.ts.map +1 -0
- package/dist/agent-runtime/sandbox-bubblewrap-args.d.ts +9 -0
- package/dist/agent-runtime/sandbox-bubblewrap-args.d.ts.map +1 -0
- package/dist/agent-runtime/sandbox-bubblewrap-storage.d.ts +22 -0
- package/dist/agent-runtime/sandbox-bubblewrap-storage.d.ts.map +1 -0
- package/dist/agent-runtime/sandbox-bubblewrap.d.ts +14 -0
- package/dist/agent-runtime/sandbox-bubblewrap.d.ts.map +1 -0
- package/dist/agent-runtime/sandbox-coding-adapter.d.ts +15 -0
- package/dist/agent-runtime/sandbox-coding-adapter.d.ts.map +1 -0
- package/dist/agent-runtime/sandbox-coding.d.ts +15 -0
- package/dist/agent-runtime/sandbox-coding.d.ts.map +1 -0
- package/dist/agent-runtime/sandbox-contract.d.ts +93 -0
- package/dist/agent-runtime/sandbox-contract.d.ts.map +1 -0
- package/dist/agent-runtime/sandbox-process-owner.d.ts +11 -0
- package/dist/agent-runtime/sandbox-process-owner.d.ts.map +1 -0
- package/dist/agent-runtime/sandbox-process.d.ts +8 -0
- package/dist/agent-runtime/sandbox-process.d.ts.map +1 -0
- package/dist/agent-runtime/sandbox-session.d.ts +5 -0
- package/dist/agent-runtime/sandbox-session.d.ts.map +1 -0
- package/dist/agent-runtime/sandbox.d.ts +19 -0
- package/dist/agent-runtime/sandbox.d.ts.map +1 -1
- package/dist/agent-runtime/schemas.d.ts +6 -0
- package/dist/agent-runtime/schemas.d.ts.map +1 -1
- package/dist/agent-runtime/sqlite-purge.d.ts.map +1 -1
- package/dist/agent-runtime/sqlite.d.ts.map +1 -1
- package/dist/agent-runtime/store-driver.d.ts +127 -0
- package/dist/agent-runtime/store-driver.d.ts.map +1 -1
- package/dist/agent-runtime/store-events.d.ts +106 -0
- package/dist/agent-runtime/store-events.d.ts.map +1 -1
- package/dist/agent-runtime/store-migrations/v2-to-v3.d.ts +14 -0
- package/dist/agent-runtime/store-migrations/v2-to-v3.d.ts.map +1 -0
- package/dist/agent-runtime/store.d.ts +115 -0
- package/dist/agent-runtime/store.d.ts.map +1 -1
- package/dist/agent-runtime-browser.js +5 -3
- package/dist/agent-runtime-coding-tools.js +11 -1236
- package/dist/agent-runtime-harness.d.ts +1 -1
- package/dist/agent-runtime-harness.d.ts.map +1 -1
- package/dist/agent-runtime-harness.js +69 -19
- package/dist/agent-runtime-openrouter.d.ts +3 -12
- package/dist/agent-runtime-openrouter.d.ts.map +1 -1
- package/dist/agent-runtime-openrouter.js +22 -9
- package/dist/agent-runtime-sandbox.d.ts +5 -0
- package/dist/agent-runtime-sandbox.d.ts.map +1 -0
- package/dist/agent-runtime-sandbox.js +797 -0
- package/dist/agent-runtime-sqlite-bun.js +5 -5
- package/dist/agent-runtime-sqlite-node.js +5 -5
- package/dist/agent-runtime.d.ts +6 -5
- package/dist/agent-runtime.d.ts.map +1 -1
- package/dist/agent-runtime.js +266 -69
- package/dist/application.js +26 -26
- package/dist/cli.js +8 -8
- package/dist/{index-rcgsnrr6.js → index-31jw8fjq.js} +3 -3
- package/dist/{index-9hw9eq48.js → index-7601qfg1.js} +14 -14
- package/dist/{index-3xnq72rz.js → index-7rkhw9ec.js} +14 -1
- package/dist/{index-0vfdh685.js → index-8c3a7m4g.js} +1 -1
- package/dist/{index-t7gh5w3v.js → index-bn2cjajt.js} +27 -6
- package/dist/{index-z2452tsw.js → index-bt14acb5.js} +2 -2
- package/dist/index-cp20z0n6.js +1351 -0
- package/dist/{index-9553432s.js → index-crykmqkr.js} +1 -1
- package/dist/{index-6g273pqx.js → index-fadnxwna.js} +89 -7
- package/dist/{index-p1b1y93x.js → index-gtj3zc53.js} +5 -1
- package/dist/{index-5wezxcxx.js → index-hrbajay7.js} +107 -5
- package/dist/{index-35aefxby.js → index-hw2chdvy.js} +768 -49
- package/dist/{index-0ydchz76.js → index-mnm4qp0p.js} +5 -5
- package/dist/{index-tg3m2ec5.js → index-mqv3b5rh.js} +4 -1
- package/dist/{index-1szetq6f.js → index-q3ve2d1k.js} +30 -8
- package/dist/{index-hkm6wysp.js → index-y64k3s0h.js} +1 -1
- package/dist/{index-z1m86vc8.js → index-zwkgfq1s.js} +97 -86
- package/dist/{index-wn9cb82y.js → index-zyvby92n.js} +12 -9
- package/dist/index.js +13 -13
- package/dist/server/index.js +9 -9
- package/dist/testing/agent-store-conformance.d.ts.map +1 -1
- package/dist/testing.js +69 -24
- package/dist/tool-invoker.js +6 -6
- package/dist/tools/agent.d.ts +6 -0
- package/dist/tools/agent.d.ts.map +1 -1
- package/dist/tools/connections/define.d.ts +6 -0
- package/dist/tools/connections/define.d.ts.map +1 -0
- package/dist/tools/connections/errors.d.ts +50 -0
- package/dist/tools/connections/errors.d.ts.map +1 -0
- package/dist/tools/connections/http.d.ts +3 -0
- package/dist/tools/connections/http.d.ts.map +1 -0
- package/dist/tools/connections/index.d.ts +19 -0
- package/dist/tools/connections/index.d.ts.map +1 -0
- package/dist/tools/connections/index.js +1047 -0
- package/dist/tools/connections/instance.d.ts +3 -0
- package/dist/tools/connections/instance.d.ts.map +1 -0
- package/dist/tools/connections/json-rpc.d.ts +8 -0
- package/dist/tools/connections/json-rpc.d.ts.map +1 -0
- package/dist/tools/connections/limits.d.ts +36 -0
- package/dist/tools/connections/limits.d.ts.map +1 -0
- package/dist/tools/connections/mcp-client.d.ts +44 -0
- package/dist/tools/connections/mcp-client.d.ts.map +1 -0
- package/dist/tools/connections/mcp.d.ts +5 -0
- package/dist/tools/connections/mcp.d.ts.map +1 -0
- package/dist/tools/connections/mount.d.ts +12 -0
- package/dist/tools/connections/mount.d.ts.map +1 -0
- package/dist/tools/connections/openapi-document.d.ts +4 -0
- package/dist/tools/connections/openapi-document.d.ts.map +1 -0
- package/dist/tools/connections/openapi.d.ts +5 -0
- package/dist/tools/connections/openapi.d.ts.map +1 -0
- package/dist/tools/connections/runtime.d.ts +29 -0
- package/dist/tools/connections/runtime.d.ts.map +1 -0
- package/dist/tools/connections/schema-budget.d.ts +8 -0
- package/dist/tools/connections/schema-budget.d.ts.map +1 -0
- package/dist/tools/connections/sse-frames.d.ts +7 -0
- package/dist/tools/connections/sse-frames.d.ts.map +1 -0
- package/dist/tools/connections/sse-session.d.ts +26 -0
- package/dist/tools/connections/sse-session.d.ts.map +1 -0
- package/dist/tools/connections/ssrf.d.ts +15 -0
- package/dist/tools/connections/ssrf.d.ts.map +1 -0
- package/dist/tools/connections/types.d.ts +60 -0
- package/dist/tools/connections/types.d.ts.map +1 -0
- package/dist/tools/durability-context.d.ts +7 -0
- package/dist/tools/durability-context.d.ts.map +1 -0
- package/dist/tools/execute.d.ts +2 -0
- package/dist/tools/execute.d.ts.map +1 -1
- package/dist/tools/registry.d.ts +38 -0
- package/dist/tools/registry.d.ts.map +1 -0
- package/dist/tools/runtime-tool.d.ts +4 -0
- package/dist/tools/runtime-tool.d.ts.map +1 -1
- package/dist/tools.d.ts +1 -0
- package/dist/tools.d.ts.map +1 -1
- package/dist/tools.js +83 -26
- package/llms-full.txt +329 -14
- package/llms.txt +1 -0
- package/package.json +9 -1
- package/dist/{index-evcnmsc3.js → index-t7fkyxcr.js} +3 -3
package/dist/tools.js
CHANGED
|
@@ -21,8 +21,8 @@ import {
|
|
|
21
21
|
buildToolManifest,
|
|
22
22
|
describeToolCatalog,
|
|
23
23
|
mountAgent
|
|
24
|
-
} from "./index-
|
|
25
|
-
import"./index-
|
|
24
|
+
} from "./index-q3ve2d1k.js";
|
|
25
|
+
import"./index-7rkhw9ec.js";
|
|
26
26
|
import {
|
|
27
27
|
argumentsDigest
|
|
28
28
|
} from "./index-a916km3r.js";
|
|
@@ -37,7 +37,7 @@ import {
|
|
|
37
37
|
} from "./index-4fpa9dy2.js";
|
|
38
38
|
import {
|
|
39
39
|
createToolInvoker
|
|
40
|
-
} from "./index-
|
|
40
|
+
} from "./index-mnm4qp0p.js";
|
|
41
41
|
import {
|
|
42
42
|
WaitTimeoutError,
|
|
43
43
|
createCli,
|
|
@@ -46,47 +46,28 @@ import {
|
|
|
46
46
|
fetchPinnedDocument,
|
|
47
47
|
readCapped,
|
|
48
48
|
runWaitOperation
|
|
49
|
-
} from "./index-
|
|
49
|
+
} from "./index-7601qfg1.js";
|
|
50
50
|
import"./index-sbdmyz75.js";
|
|
51
51
|
import {
|
|
52
52
|
collectToolSurface
|
|
53
|
-
} from "./index-
|
|
54
|
-
import {
|
|
55
|
-
createRuntimeToolFactory,
|
|
56
|
-
defineRuntimeTool
|
|
57
|
-
} from "./index-kc6h6hg0.js";
|
|
53
|
+
} from "./index-31jw8fjq.js";
|
|
58
54
|
import {
|
|
59
55
|
collectTools,
|
|
60
56
|
createToolRunner,
|
|
61
57
|
formatToolError
|
|
62
|
-
} from "./index-
|
|
58
|
+
} from "./index-8c3a7m4g.js";
|
|
63
59
|
import {
|
|
64
60
|
ToolExecutionControlError,
|
|
65
61
|
executeToolMethod,
|
|
66
62
|
isToolExecutionControlError,
|
|
67
63
|
toolResultFromError
|
|
68
|
-
} from "./index-
|
|
64
|
+
} from "./index-zyvby92n.js";
|
|
69
65
|
import {
|
|
70
66
|
getRequestContext,
|
|
71
67
|
getTraceId,
|
|
72
68
|
runWithRequestContext
|
|
73
69
|
} from "./index-vsbzgd7b.js";
|
|
74
70
|
import"./index-f9mb610r.js";
|
|
75
|
-
import {
|
|
76
|
-
PORTABLE_JSON_SCHEMA_FORMATS,
|
|
77
|
-
assertToolName,
|
|
78
|
-
assertUniqueToolName,
|
|
79
|
-
findNonPortableFormats,
|
|
80
|
-
findUntypedProperties,
|
|
81
|
-
flattenToolJsonSchema,
|
|
82
|
-
prepareProjectedMcpTools,
|
|
83
|
-
presentationMetadata,
|
|
84
|
-
validateMcpRoundPolicy
|
|
85
|
-
} from "./index-r159gjwy.js";
|
|
86
|
-
import"./index-cby4ar3v.js";
|
|
87
|
-
import {
|
|
88
|
-
coerceJsonArgs
|
|
89
|
-
} from "./index-7zbps32p.js";
|
|
90
71
|
import {
|
|
91
72
|
normalizeError
|
|
92
73
|
} from "./index-7evdsyez.js";
|
|
@@ -104,7 +85,26 @@ import {
|
|
|
104
85
|
import {
|
|
105
86
|
resolvePropagationContext
|
|
106
87
|
} from "./index-zcgf3gqf.js";
|
|
88
|
+
import {
|
|
89
|
+
coerceJsonArgs
|
|
90
|
+
} from "./index-7zbps32p.js";
|
|
107
91
|
import"./index-kzfs85xp.js";
|
|
92
|
+
import {
|
|
93
|
+
createRuntimeToolFactory,
|
|
94
|
+
defineRuntimeTool
|
|
95
|
+
} from "./index-kc6h6hg0.js";
|
|
96
|
+
import {
|
|
97
|
+
PORTABLE_JSON_SCHEMA_FORMATS,
|
|
98
|
+
assertToolName,
|
|
99
|
+
assertUniqueToolName,
|
|
100
|
+
findNonPortableFormats,
|
|
101
|
+
findUntypedProperties,
|
|
102
|
+
flattenToolJsonSchema,
|
|
103
|
+
prepareProjectedMcpTools,
|
|
104
|
+
presentationMetadata,
|
|
105
|
+
validateMcpRoundPolicy
|
|
106
|
+
} from "./index-r159gjwy.js";
|
|
107
|
+
import"./index-cby4ar3v.js";
|
|
108
108
|
import {
|
|
109
109
|
isRecord
|
|
110
110
|
} from "./index-77fekveh.js";
|
|
@@ -2521,6 +2521,62 @@ function mountOAuthProvider(config) {
|
|
|
2521
2521
|
};
|
|
2522
2522
|
return dcrEnabled ? [metadataRoute, registerRoute, authorizeRoute, tokenRoute] : [metadataRoute, authorizeRoute, tokenRoute];
|
|
2523
2523
|
}
|
|
2524
|
+
// src/tools/registry.ts
|
|
2525
|
+
function defineToolRegistry(input) {
|
|
2526
|
+
const defaults = [...input.defaults];
|
|
2527
|
+
const slots = new Set;
|
|
2528
|
+
for (const tool of defaults) {
|
|
2529
|
+
if (!tool.name)
|
|
2530
|
+
throw new Error("A default tool must carry a non-empty name");
|
|
2531
|
+
if (slots.has(tool.name))
|
|
2532
|
+
throw new Error(`Duplicate default tool name: ${tool.name}`);
|
|
2533
|
+
slots.add(tool.name);
|
|
2534
|
+
}
|
|
2535
|
+
const disabled = new Set;
|
|
2536
|
+
const replacements = new Map;
|
|
2537
|
+
const assertKnown = (name, verb) => {
|
|
2538
|
+
if (!slots.has(name)) {
|
|
2539
|
+
throw new Error(`Tool registry ${verb}("${name}") names no default; declared: ${[...slots].sort().join(", ") || "(none)"}`);
|
|
2540
|
+
}
|
|
2541
|
+
};
|
|
2542
|
+
const builder = {
|
|
2543
|
+
replace(name, tool) {
|
|
2544
|
+
assertKnown(name, "replace");
|
|
2545
|
+
if (disabled.has(name)) {
|
|
2546
|
+
throw new Error(`Tool registry cannot replace "${name}": it is disabled`);
|
|
2547
|
+
}
|
|
2548
|
+
if (replacements.has(name)) {
|
|
2549
|
+
throw new Error(`Tool registry already replaced "${name}"`);
|
|
2550
|
+
}
|
|
2551
|
+
if (tool.name !== name) {
|
|
2552
|
+
throw new Error(`A replacement for "${name}" must carry that name, not "${tool.name}"`);
|
|
2553
|
+
}
|
|
2554
|
+
replacements.set(name, tool);
|
|
2555
|
+
return builder;
|
|
2556
|
+
},
|
|
2557
|
+
disable(name) {
|
|
2558
|
+
assertKnown(name, "disable");
|
|
2559
|
+
disabled.add(name);
|
|
2560
|
+
return builder;
|
|
2561
|
+
},
|
|
2562
|
+
build() {
|
|
2563
|
+
const tools = [];
|
|
2564
|
+
const seen = new Set;
|
|
2565
|
+
for (const tool of defaults) {
|
|
2566
|
+
if (disabled.has(tool.name))
|
|
2567
|
+
continue;
|
|
2568
|
+
const effective = replacements.get(tool.name) ?? tool;
|
|
2569
|
+
if (seen.has(effective.name)) {
|
|
2570
|
+
throw new Error(`Duplicate composed tool name: ${effective.name}`);
|
|
2571
|
+
}
|
|
2572
|
+
seen.add(effective.name);
|
|
2573
|
+
tools.push(effective);
|
|
2574
|
+
}
|
|
2575
|
+
return { tools, names: tools.map((tool) => tool.name) };
|
|
2576
|
+
}
|
|
2577
|
+
};
|
|
2578
|
+
return builder;
|
|
2579
|
+
}
|
|
2524
2580
|
// src/tools/tool-logger.ts
|
|
2525
2581
|
function createToolLogger(config = {}) {
|
|
2526
2582
|
const log = config.log ?? ((line) => console.error(line));
|
|
@@ -2646,6 +2702,7 @@ export {
|
|
|
2646
2702
|
defineWaitTool,
|
|
2647
2703
|
defineViewFileTool,
|
|
2648
2704
|
defineUploadTool,
|
|
2705
|
+
defineToolRegistry,
|
|
2649
2706
|
defineRuntimeTool,
|
|
2650
2707
|
defineDownloadTool,
|
|
2651
2708
|
defineCliCommand,
|