stitchkit 0.74.1 → 0.75.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/dist/agent-runtime/sqlite-purge.d.ts +3 -3
- package/dist/agent-runtime/sqlite-purge.d.ts.map +1 -1
- package/dist/agent-runtime/sqlite.d.ts +5 -17
- package/dist/agent-runtime/sqlite.d.ts.map +1 -1
- package/dist/agent-runtime-coding-tools.js +2 -1
- package/dist/agent-runtime-harness.js +5 -4
- package/dist/agent-runtime-sqlite-bun.d.ts +1 -1
- package/dist/agent-runtime-sqlite-bun.d.ts.map +1 -1
- package/dist/agent-runtime-sqlite-node.d.ts +1 -1
- package/dist/agent-runtime-sqlite-node.d.ts.map +1 -1
- package/dist/agent-runtime.js +8 -7
- package/dist/application/keyspace-sqlite.d.ts +31 -0
- package/dist/application/keyspace-sqlite.d.ts.map +1 -0
- package/dist/application/keyspace.d.ts +142 -0
- package/dist/application/keyspace.d.ts.map +1 -0
- package/dist/application/watch-hub.d.ts +113 -0
- package/dist/application/watch-hub.d.ts.map +1 -0
- package/dist/application.d.ts +4 -0
- package/dist/application.d.ts.map +1 -1
- package/dist/application.js +455 -0
- package/dist/cli.js +7 -6
- package/dist/contract/index.js +2 -1
- package/dist/{index-aczggrty.js → index-28jsdwt1.js} +1 -1
- package/dist/index-35z5h2ty.js +594 -0
- package/dist/{index-f6n5n7nz.js → index-4kp4fxvp.js} +4 -18
- package/dist/{index-118v0z41.js → index-52400rdd.js} +8 -3
- package/dist/{index-da1aqnhb.js → index-65kathdm.js} +6 -4
- package/dist/{index-jqtsc9mj.js → index-6wr9f6qm.js} +2 -2
- package/dist/{index-7qy2ex0m.js → index-885chjxq.js} +1 -1
- package/dist/{index-k2zczx1g.js → index-9c5dbr5q.js} +1 -1
- package/dist/{index-s2rchahr.js → index-9my2n66s.js} +4 -4
- package/dist/{index-nemjkxjp.js → index-e0a57ymn.js} +1 -1
- package/dist/{index-vbf2p6me.js → index-endzd8sj.js} +1 -1
- package/dist/{index-vj3vvpaa.js → index-hsz2mmk0.js} +1 -17
- package/dist/{index-s4c8wy8m.js → index-k68e5jz0.js} +2 -2
- package/dist/index-rxfy4cq7.js +17 -0
- package/dist/{index-58jzmnn4.js → index-v5dm4bwq.js} +1 -1
- package/dist/{index-m668wzyc.js → index-v7xjfy10.js} +1 -1
- package/dist/index-vdvmcy7r.js +22 -0
- package/dist/{index-ezmn6ac6.js → index-xgahrwdf.js} +3 -3
- package/dist/index.js +26 -611
- package/dist/internal/sqlite.d.ts +27 -0
- package/dist/internal/sqlite.d.ts.map +1 -0
- package/dist/internal/stable-digest.d.ts +24 -0
- package/dist/internal/stable-digest.d.ts.map +1 -0
- package/dist/live/events.d.ts +155 -0
- package/dist/live/events.d.ts.map +1 -0
- package/dist/live/watch-client.d.ts +66 -0
- package/dist/live/watch-client.d.ts.map +1 -0
- package/dist/live/watch-contract.d.ts +157 -0
- package/dist/live/watch-contract.d.ts.map +1 -0
- package/dist/live.d.ts +18 -0
- package/dist/live.d.ts.map +1 -0
- package/dist/live.js +284 -0
- package/dist/node.js +5 -4
- package/dist/observability/index.js +4 -3
- package/dist/primitives.js +2 -1
- package/dist/remote.js +3 -2
- package/dist/server/create.d.ts.map +1 -1
- package/dist/server/event-bus.d.ts +49 -1
- package/dist/server/event-bus.d.ts.map +1 -1
- package/dist/server/index.d.ts +2 -1
- package/dist/server/index.d.ts.map +1 -1
- package/dist/server/index.js +224 -12
- package/dist/server/middleware/trust-fence.d.ts +116 -0
- package/dist/server/middleware/trust-fence.d.ts.map +1 -0
- package/dist/server/types.d.ts +16 -1
- package/dist/server/types.d.ts.map +1 -1
- package/dist/testing.js +3 -2
- package/dist/tool-invoker.js +6 -5
- package/dist/tools/mcp-round.d.ts.map +1 -1
- package/dist/tools.js +15 -30
- package/llms-full.txt +412 -4
- package/llms.txt +1 -0
- package/package.json +6 -2
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
collectToolSurface
|
|
3
|
-
} from "./index-
|
|
3
|
+
} from "./index-9c5dbr5q.js";
|
|
4
4
|
import {
|
|
5
5
|
createToolRunner,
|
|
6
6
|
formatToolError
|
|
7
|
-
} from "./index-
|
|
7
|
+
} from "./index-885chjxq.js";
|
|
8
8
|
import {
|
|
9
9
|
coerceJsonArgs,
|
|
10
10
|
toolResultFromError
|
|
11
|
-
} from "./index-
|
|
11
|
+
} from "./index-k68e5jz0.js";
|
|
12
12
|
import {
|
|
13
13
|
isWithinDir
|
|
14
14
|
} from "./index-sbdmyz75.js";
|
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
import {
|
|
28
28
|
isUnsafeKey,
|
|
29
29
|
safeJsonParse
|
|
30
|
-
} from "./index-
|
|
30
|
+
} from "./index-hsz2mmk0.js";
|
|
31
31
|
import {
|
|
32
32
|
isRecord
|
|
33
33
|
} from "./index-qyrqwr4c.js";
|
|
@@ -272,22 +272,6 @@ function mergeMeta(contractMeta, endpointMeta) {
|
|
|
272
272
|
import { z as z2 } from "zod";
|
|
273
273
|
// src/contract/pagination.ts
|
|
274
274
|
import { z as z3 } from "zod";
|
|
275
|
-
|
|
276
|
-
// src/internal/base64url.ts
|
|
277
|
-
function bytesToBase64Url(bytes) {
|
|
278
|
-
let binary = "";
|
|
279
|
-
for (const byte of bytes)
|
|
280
|
-
binary += String.fromCharCode(byte);
|
|
281
|
-
return btoa(binary).replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/, "");
|
|
282
|
-
}
|
|
283
|
-
function base64UrlToBytes(segment) {
|
|
284
|
-
if (!/^[A-Za-z0-9_-]*$/.test(segment) || segment.length % 4 === 1) {
|
|
285
|
-
throw new Error("invalid base64url segment");
|
|
286
|
-
}
|
|
287
|
-
const b64 = segment.replace(/-/g, "+").replace(/_/g, "/");
|
|
288
|
-
const padded = b64.padEnd(Math.ceil(b64.length / 4) * 4, "=");
|
|
289
|
-
return Uint8Array.from(atob(padded), (c) => c.charCodeAt(0));
|
|
290
|
-
}
|
|
291
275
|
// src/contract/stream.ts
|
|
292
276
|
import { z as z4 } from "zod";
|
|
293
277
|
var DEFAULT_CONTRACT_STREAM_FRAME_BYTES = 256 * 1024;
|
|
@@ -304,4 +288,4 @@ var ContractStreamFrameSchema = z4.discriminatedUnion("type", [
|
|
|
304
288
|
}).strict(),
|
|
305
289
|
z4.object({ type: z4.literal("end") }).strict()
|
|
306
290
|
]);
|
|
307
|
-
export { joinRoutePath, parseTrailingWildcard, isUnsafeKey, safeJsonParse, defineContract, mergeMeta,
|
|
291
|
+
export { joinRoutePath, parseTrailingWildcard, isUnsafeKey, safeJsonParse, defineContract, mergeMeta, DEFAULT_CONTRACT_STREAM_FRAME_BYTES, ContractStreamFrameSchema };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getRequestContext,
|
|
3
3
|
runWithRequestContext
|
|
4
|
-
} from "./index-
|
|
4
|
+
} from "./index-e0a57ymn.js";
|
|
5
5
|
import {
|
|
6
6
|
objectShapeKeys
|
|
7
7
|
} from "./index-22by16v6.js";
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
import {
|
|
14
14
|
isUnsafeKey,
|
|
15
15
|
safeJsonParse
|
|
16
|
-
} from "./index-
|
|
16
|
+
} from "./index-hsz2mmk0.js";
|
|
17
17
|
import {
|
|
18
18
|
AppError,
|
|
19
19
|
STITCH_ERROR_STATUS,
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// src/internal/base64url.ts
|
|
2
|
+
function bytesToBase64Url(bytes) {
|
|
3
|
+
let binary = "";
|
|
4
|
+
for (const byte of bytes)
|
|
5
|
+
binary += String.fromCharCode(byte);
|
|
6
|
+
return btoa(binary).replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/, "");
|
|
7
|
+
}
|
|
8
|
+
function base64UrlToBytes(segment) {
|
|
9
|
+
if (!/^[A-Za-z0-9_-]*$/.test(segment) || segment.length % 4 === 1) {
|
|
10
|
+
throw new Error("invalid base64url segment");
|
|
11
|
+
}
|
|
12
|
+
const b64 = segment.replace(/-/g, "+").replace(/_/g, "/");
|
|
13
|
+
const padded = b64.padEnd(Math.ceil(b64.length / 4) * 4, "=");
|
|
14
|
+
return Uint8Array.from(atob(padded), (c) => c.charCodeAt(0));
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export { bytesToBase64Url, base64UrlToBytes };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import {
|
|
2
|
+
bytesToBase64Url
|
|
3
|
+
} from "./index-rxfy4cq7.js";
|
|
4
|
+
|
|
5
|
+
// src/internal/stable-digest.ts
|
|
6
|
+
function stableValue(value) {
|
|
7
|
+
if (Array.isArray(value))
|
|
8
|
+
return value.map(stableValue);
|
|
9
|
+
if (value === null || typeof value !== "object")
|
|
10
|
+
return value;
|
|
11
|
+
const result = {};
|
|
12
|
+
for (const key of Object.keys(value).sort()) {
|
|
13
|
+
result[key] = stableValue(Reflect.get(value, key));
|
|
14
|
+
}
|
|
15
|
+
return result;
|
|
16
|
+
}
|
|
17
|
+
async function argumentsDigest(args) {
|
|
18
|
+
const bytes = new TextEncoder().encode(JSON.stringify(stableValue(args)));
|
|
19
|
+
return bytesToBase64Url(new Uint8Array(await crypto.subtle.digest("SHA-256", bytes)));
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export { stableValue, argumentsDigest };
|
|
@@ -3,15 +3,15 @@ import {
|
|
|
3
3
|
} from "./index-3xnq72rz.js";
|
|
4
4
|
import {
|
|
5
5
|
collectToolSurface
|
|
6
|
-
} from "./index-
|
|
6
|
+
} from "./index-9c5dbr5q.js";
|
|
7
7
|
import {
|
|
8
8
|
createToolRunner,
|
|
9
9
|
formatToolError
|
|
10
|
-
} from "./index-
|
|
10
|
+
} from "./index-885chjxq.js";
|
|
11
11
|
import {
|
|
12
12
|
isToolExecutionControlError,
|
|
13
13
|
toolResultFromError
|
|
14
|
-
} from "./index-
|
|
14
|
+
} from "./index-k68e5jz0.js";
|
|
15
15
|
import {
|
|
16
16
|
isRecord
|
|
17
17
|
} from "./index-qyrqwr4c.js";
|