stitchkit 0.88.0 → 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 +126 -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-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/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 +4 -0
- package/dist/agent-runtime/runtime-internals.d.ts.map +1 -1
- package/dist/agent-runtime/runtime.d.ts +13 -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/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 +104 -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-coding-tools.js +11 -1247
- 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 +65 -15
- 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 +10 -7
- 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 +3 -3
- package/dist/agent-runtime-sqlite-node.js +3 -3
- package/dist/agent-runtime.d.ts +5 -4
- package/dist/agent-runtime.d.ts.map +1 -1
- package/dist/agent-runtime.js +259 -65
- 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-cp20z0n6.js +1351 -0
- package/dist/{index-qp3vshvc.js → index-fadnxwna.js} +87 -5
- package/dist/{index-v1qk37y9.js → index-hrbajay7.js} +106 -4
- package/dist/{index-p86mxmpp.js → index-hw2chdvy.js} +646 -43
- package/dist/{index-0ydchz76.js → index-mnm4qp0p.js} +5 -5
- package/dist/{index-1szetq6f.js → index-q3ve2d1k.js} +30 -8
- package/dist/{index-6krwcdcf.js → index-zwkgfq1s.js} +95 -85
- 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 +57 -23
- 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 +246 -7
- package/llms.txt +1 -0
- package/package.json +9 -1
- package/dist/{index-evcnmsc3.js → index-t7fkyxcr.js} +3 -3
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Typed failures of the external-connection surface.
|
|
3
|
+
*
|
|
4
|
+
* These are deliberately not `AppError`s: a connection failure is not a
|
|
5
|
+
* contract error and must not be confused with one by an in-process caller.
|
|
6
|
+
* The reauthorization signal is distinct because it is recoverable — the
|
|
7
|
+
* application starts its existing flow — while every other status is terminal
|
|
8
|
+
* for the call.
|
|
9
|
+
*/
|
|
10
|
+
/** A `401`: the current credential was rejected and must be re-obtained. */
|
|
11
|
+
export declare class ConnectionAuthorizationRequiredError extends Error {
|
|
12
|
+
readonly connectionName: string;
|
|
13
|
+
readonly instanceId: string;
|
|
14
|
+
constructor(connectionName: string, instanceId: string);
|
|
15
|
+
}
|
|
16
|
+
/** Any non-2xx response other than the reauthorization signal. */
|
|
17
|
+
export declare class ConnectionRequestError extends Error {
|
|
18
|
+
readonly connectionName: string;
|
|
19
|
+
readonly status: number;
|
|
20
|
+
readonly body: string;
|
|
21
|
+
constructor(connectionName: string, status: number, body: string);
|
|
22
|
+
}
|
|
23
|
+
/** A URL the SSRF guard refused before any request left the process. */
|
|
24
|
+
export declare class ConnectionUrlError extends Error {
|
|
25
|
+
readonly url: string;
|
|
26
|
+
constructor(message: string, url: string);
|
|
27
|
+
}
|
|
28
|
+
/** The mount would expose more foreign tools than its declared budget. */
|
|
29
|
+
export declare class ConnectionBudgetExceededError extends Error {
|
|
30
|
+
readonly limit: number;
|
|
31
|
+
readonly actual: number;
|
|
32
|
+
constructor(limit: number, actual: number, unit?: string);
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* A request exceeded the connection's declared deadline. This is not exported
|
|
36
|
+
* from the public subexport; it is a typed boundary between the transport and
|
|
37
|
+
* the caller, so an application can still tell a timeout from a network error.
|
|
38
|
+
*/
|
|
39
|
+
export declare class ConnectionTimeoutError extends Error {
|
|
40
|
+
readonly connectionName: string;
|
|
41
|
+
readonly timeoutMs: number;
|
|
42
|
+
constructor(connectionName: string, timeoutMs: number);
|
|
43
|
+
}
|
|
44
|
+
/** A response exceeded the connection's declared byte ceiling. Internal. */
|
|
45
|
+
export declare class ConnectionResponseTooLargeError extends Error {
|
|
46
|
+
readonly connectionName: string;
|
|
47
|
+
readonly maxBytes: number;
|
|
48
|
+
constructor(connectionName: string, maxBytes: number);
|
|
49
|
+
}
|
|
50
|
+
//# sourceMappingURL=errors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../src/tools/connections/errors.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,4EAA4E;AAC5E,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AKnD;CACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"http.d.ts","sourceRoot":"","sources":["../../../src/tools/connections/http.ts"],"names":[],"mappings":"AAGA,iEAAiE;AACjE,wBAAsB,eAAe,CACnC,MAAM,EAAE,GAAG,GAAG,MAAM,EACpB,IAAI,EAAE,WAAW,EACjB,YAAY,EAAE,WAAW,CAAC,MAAM,CAAC,EACjC,cAAc,EAAE,MAAM,GACrB,OAAO,CAAC,QAAQ,CAAC,CAYnB"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `stitchkit/tools/connections` — consume external MCP servers and OpenAPI
|
|
3
|
+
* specs as typed tools.
|
|
4
|
+
*
|
|
5
|
+
* This is a server-only subexport of `stitchkit/tools`: a connection pulls in no
|
|
6
|
+
* peer package into the stable tools import, but mounts its foreign operations
|
|
7
|
+
* as plain `RuntimeToolDefinition`s, so `mountAgent({ runtimeTools })` runs them
|
|
8
|
+
* through the same lifecycle, hooks and approval path as our own.
|
|
9
|
+
*
|
|
10
|
+
* A connection URL is application configuration, not a trust boundary: every
|
|
11
|
+
* outbound request is checked against the connection's own host (plus any
|
|
12
|
+
* explicit `allowHosts`), and credentials are resolved separately for each call.
|
|
13
|
+
*/
|
|
14
|
+
export { defineMcpClientConnection, defineOpenApiConnection } from './define.js';
|
|
15
|
+
export { ConnectionAuthorizationRequiredError, ConnectionBudgetExceededError, ConnectionRequestError, ConnectionUrlError, } from './errors.js';
|
|
16
|
+
export { mountConnections } from './mount.js';
|
|
17
|
+
export type { ConnectionTokenProvider } from './runtime.js';
|
|
18
|
+
export type { ConnectionBudget, ConnectionDefinition, ConnectionMountOptions, McpClientConnection, McpClientConnectionConfig, McpConnectionTransport, McpToolFilter, OpenApiConnection, OpenApiConnectionConfig, } from './types.js';
|
|
19
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tools/connections/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,yBAAyB,EAAE,uBAAuB,EAAE,MAAM,UAAU,CAAC;AAC9E,OAAO,EACL,oCAAoC,EACpC,6BAA6B,EAC7B,sBAAsB,EACtB,kBAAkB,GACnB,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAC3C,YAAY,EAAE,uBAAuB,EAAE,MAAM,WAAW,CAAC;AACzD,YAAY,EACV,gBAAgB,EAChB,oBAAoB,EACpB,sBAAsB,EACtB,mBAAmB,EACnB,yBAAyB,EACzB,sBAAsB,EACtB,aAAa,EACb,iBAAiB,EACjB,uBAAuB,GACxB,MAAM,SAAS,CAAC"}
|