stitchkit 0.106.1 → 0.107.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 +52 -0
- package/darwin-native.cjs +16 -4
- package/dist/agent-runtime/deferred-tool-types.d.ts +6 -27
- package/dist/agent-runtime/deferred-tool-types.d.ts.map +1 -1
- package/dist/entrypoints/agent-runtime/browser.js +2 -3
- package/dist/entrypoints/agent-runtime/coding-tools.js +6 -8
- package/dist/entrypoints/agent-runtime/harness.js +7 -11
- package/dist/entrypoints/agent-runtime/realtime.js +2 -3
- package/dist/entrypoints/agent-runtime/sandbox.js +6 -8
- package/dist/entrypoints/agent-runtime.d.ts +2 -1
- package/dist/entrypoints/agent-runtime.d.ts.map +1 -1
- package/dist/entrypoints/agent-runtime.js +20 -23
- package/dist/entrypoints/application/diagnostic-journal.js +3 -3
- package/dist/entrypoints/application/directory-inbox.js +8 -9
- package/dist/entrypoints/application/grammy.js +3 -3
- package/dist/entrypoints/application.js +7 -8
- package/dist/entrypoints/cli/publish.js +10 -11
- package/dist/entrypoints/cli.js +12 -16
- package/dist/entrypoints/contract.js +1 -1
- package/dist/entrypoints/files/packaging.d.ts +1 -1
- package/dist/entrypoints/files/packaging.d.ts.map +1 -1
- package/dist/entrypoints/files/packaging.js +99 -47
- package/dist/entrypoints/files.js +16 -16
- package/dist/entrypoints/index.js +41 -41
- package/dist/entrypoints/node.js +27 -29
- package/dist/entrypoints/observability.js +10 -12
- package/dist/entrypoints/process.js +2 -2
- package/dist/entrypoints/react.js +3 -4
- package/dist/entrypoints/remote.js +8 -9
- package/dist/entrypoints/server.js +48 -51
- package/dist/entrypoints/telegram/html.js +3 -3
- package/dist/entrypoints/telegram/screens.js +5 -5
- package/dist/entrypoints/telegram.js +9 -10
- package/dist/entrypoints/testing.js +8 -11
- package/dist/entrypoints/tools/connections.js +11 -11
- package/dist/entrypoints/tools/invoker.js +5 -9
- package/dist/entrypoints/tools/mcp.js +8 -14
- package/dist/entrypoints/tools.js +19 -25
- package/dist/entrypoints/tracking.js +3 -3
- package/dist/files/native-packaging-layout.d.ts +6 -2
- package/dist/files/native-packaging-layout.d.ts.map +1 -1
- package/dist/files/native-packaging.d.ts +45 -10
- package/dist/files/native-packaging.d.ts.map +1 -1
- package/dist/{index-v5ee8ath.js → index-1h2zv8rx.js} +10 -40
- package/dist/index-2kbysk9s.js +42 -0
- package/dist/{index-wbhdzxar.js → index-2s6fpehp.js} +5 -5
- package/dist/{index-4vsby8n8.js → index-4f37d3bg.js} +1 -1
- package/dist/{index-ksfagmyz.js → index-4qh90tyw.js} +8 -8
- package/dist/{index-yvfk3y36.js → index-636mggad.js} +4 -3
- package/dist/{index-f199nfq5.js → index-6y9t2fwz.js} +7 -7
- package/dist/{index-azx12jgv.js → index-7r74re56.js} +1 -1
- package/dist/{index-w8etpm8j.js → index-9j2atjte.js} +1 -1
- package/dist/{index-dsnjzb62.js → index-bnf8s6v3.js} +1 -1
- package/dist/{index-pz3y6b6g.js → index-cx2nh595.js} +3 -3
- package/dist/{index-2k91mewf.js → index-dm2fv45z.js} +9 -9
- package/dist/{index-9bskshe3.js → index-dwf0gymy.js} +10 -10
- package/dist/{index-qaqbdm7s.js → index-h7qms8f9.js} +8 -8
- package/dist/{index-drs41arz.js → index-ktjmgq9p.js} +1 -1
- package/dist/{index-1ptj98e0.js → index-mbf4h8kp.js} +2 -2
- package/dist/{index-916yh4e2.js → index-mep4sb48.js} +14 -14
- package/dist/{index-wdy68sh6.js → index-njs9gvrh.js} +17 -17
- package/dist/{index-sj28htvf.js → index-pvh3z03x.js} +1 -1
- package/dist/{index-r393tnfp.js → index-q6crhe1n.js} +4 -4
- package/dist/{index-z23rfxhj.js → index-xmgjtkvr.js} +1 -1
- package/dist/{index-gr5g3xfw.js → index-yz8x0hbx.js} +1 -1
- package/dist/{index-gxm9rc97.js → index-zrtrjkbf.js} +1 -1
- package/dist/{index-1pwwan01.js → index-zsqt5q98.js} +5 -5
- package/dist/internal/darwin-binding-error.d.ts +9 -1
- package/dist/internal/darwin-binding-error.d.ts.map +1 -1
- package/dist/internal/darwin-binding.d.ts.map +1 -1
- package/dist/tools/internal/surface-projector.d.ts +0 -7
- package/dist/tools/internal/surface-projector.d.ts.map +1 -1
- package/dist/tools/runtime-tool-declaration.d.ts +11 -0
- package/dist/tools/runtime-tool-declaration.d.ts.map +1 -1
- package/dist/tools/runtime-tool.d.ts +2 -3
- package/dist/tools/runtime-tool.d.ts.map +1 -1
- package/llms/files-packaging.txt +10 -6
- package/llms/process.txt +57 -15
- package/llms/stitchkit.txt +3 -3
- package/llms/{upgrading-0.37.0-0.53.0.txt → upgrading-0.37.0-0.58.0.txt} +209 -3
- package/llms/{upgrading-0.55.0-0.68.0.txt → upgrading-0.59.0-0.71.0.txt} +149 -209
- package/llms/{upgrading-0.69.0-0.95.0.txt → upgrading-0.72.0-0.97.0.txt} +76 -149
- package/llms/{upgrading-0.96.0-0.106.0.txt → upgrading-0.98.0-0.107.0.txt} +56 -83
- package/llms/upgrading.txt +4 -4
- package/llms-full.txt +123 -31
- package/llms.txt +6 -6
- package/package.json +2 -1
- package/dist/{index-cazts87s.js → index-07dcf2yn.js} +3 -3
- package/dist/{index-n1nszyk0.js → index-7jvwrjqa.js} +3 -3
- package/dist/{index-cmzvhhtd.js → index-85qve8mq.js} +3 -3
- package/dist/{index-rpzewktb.js → index-fynr93w4.js} +3 -3
- package/dist/{index-37asdw3a.js → index-k7qdkh3n.js} +3 -3
- package/dist/{index-x7w1z6pf.js → index-q4hjtyye.js} +4 -4
- package/dist/{index-7n68nmc6.js → index-y3nemndz.js} +3 -3
- package/dist/{index-12zsej7b.js → index-y70v24cw.js} +3 -3
- package/dist/{index-pzb63z66.js → index-ykdcnq1f.js} +3 -3
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
import {
|
|
2
|
+
NATIVE_NOT_PACKAGED
|
|
3
|
+
} from "../../index-1h2zv8rx.js";
|
|
4
|
+
|
|
1
5
|
// src/files/native-packaging.ts
|
|
2
6
|
import { existsSync, readFileSync } from "node:fs";
|
|
3
7
|
import { dirname, relative, resolve } from "node:path";
|
|
@@ -30,18 +34,33 @@ var NativeAssetManifestSchema = z.strictObject({
|
|
|
30
34
|
function nativeAssetDigest(bytes) {
|
|
31
35
|
return { size: bytes.byteLength, sha256: createHash("sha256").update(bytes).digest("hex") };
|
|
32
36
|
}
|
|
37
|
+
var NOT_PACKAGED_MESSAGE = "The Darwin addon is not packaged into this bundle: build it with createNativePackaging from stitchkit/files/packaging";
|
|
33
38
|
var templateText = (value) => value.replaceAll("\\", "\\\\").replaceAll("`", "\\`").replaceAll("${", "\\${");
|
|
34
39
|
function nativeLoaderSource(assets, resolution) {
|
|
35
40
|
const quote = (value) => `'${JSON.stringify(value).slice(1, -1).replaceAll("'", "\\'")}'`;
|
|
36
|
-
const target = (asset) => resolution === "static" ? quote(asset) : `\`\${
|
|
41
|
+
const target = (asset) => resolution === "static" ? quote(asset) : `\`\${directory}/${templateText(asset.replace(/^\.\//, ""))}\``;
|
|
37
42
|
const branches = Object.entries(assets).map(([architecture, asset]) => ` if (process.arch === ${quote(architecture)}) return require(${target(asset)});`);
|
|
38
43
|
return [
|
|
39
44
|
"/** Generated from the owning native asset graph. Loading remains lazy. */",
|
|
40
45
|
...resolution === "static" ? [] : [
|
|
41
|
-
"// The addon path is computed, so a bundler never follows
|
|
42
|
-
"//
|
|
46
|
+
"// The addon path is computed from this file's own location, so a bundler never follows",
|
|
47
|
+
"// or embeds it and the build machine never becomes a literal of the artifact. Inside a",
|
|
48
|
+
"// bundle the file has no location (`module.filename` is not absolute there): loading",
|
|
49
|
+
"// refuses and names the packaging plugin, which replaces this file with a static loader",
|
|
50
|
+
"// when an artifact must carry the addon."
|
|
43
51
|
],
|
|
44
52
|
"module.exports = function loadDarwinAddon() {",
|
|
53
|
+
...resolution === "static" ? [] : [
|
|
54
|
+
" const location = module.filename;",
|
|
55
|
+
" if (typeof location !== 'string' || !location.startsWith('/')) {",
|
|
56
|
+
" const refusal = new Error(",
|
|
57
|
+
` ${quote(NOT_PACKAGED_MESSAGE)},`,
|
|
58
|
+
" );",
|
|
59
|
+
` refusal.code = ${quote(NATIVE_NOT_PACKAGED)};`,
|
|
60
|
+
" throw refusal;",
|
|
61
|
+
" }",
|
|
62
|
+
" const directory = location.slice(0, location.lastIndexOf('/'));"
|
|
63
|
+
],
|
|
45
64
|
" try {",
|
|
46
65
|
...branches,
|
|
47
66
|
" throw new Error('Unsupported Darwin addon architecture');",
|
|
@@ -71,16 +90,21 @@ var AssetPathSchema = RelativePathSchema.refine((value) => !/[[\]]/.test(value.r
|
|
|
71
90
|
var SingleOptionsSchema = z2.object({
|
|
72
91
|
...CommonOptions,
|
|
73
92
|
architecture: z2.string().min(1),
|
|
74
|
-
delivery: z2.
|
|
93
|
+
delivery: z2.literal("companion"),
|
|
75
94
|
assetPath: AssetPathSchema
|
|
76
95
|
});
|
|
96
|
+
var EmbeddedOptionsSchema = z2.strictObject({
|
|
97
|
+
platform: PlatformSchema,
|
|
98
|
+
architecture: z2.string().min(1),
|
|
99
|
+
delivery: z2.literal("embedded")
|
|
100
|
+
});
|
|
77
101
|
var MultipleOptionsSchema = z2.object({
|
|
78
102
|
...CommonOptions,
|
|
79
103
|
architecture: z2.array(z2.string().min(1)).refine((targets) => targets.length > 0),
|
|
80
104
|
delivery: z2.literal("companion"),
|
|
81
105
|
assetPath: z2.record(z2.string().min(1), AssetPathSchema)
|
|
82
106
|
});
|
|
83
|
-
var
|
|
107
|
+
var CompanionOptionsSchema = z2.union([SingleOptionsSchema, MultipleOptionsSchema]).check((ctx) => {
|
|
84
108
|
const input = ctx.value;
|
|
85
109
|
const targets = typeof input.architecture === "string" ? [input.architecture] : input.architecture;
|
|
86
110
|
if (new Set(targets).size !== targets.length)
|
|
@@ -112,12 +136,12 @@ var OptionsSchema = z2.union([SingleOptionsSchema, MultipleOptionsSchema]).check
|
|
|
112
136
|
}
|
|
113
137
|
}
|
|
114
138
|
});
|
|
115
|
-
var
|
|
116
|
-
outputPath: z2.string(),
|
|
139
|
+
var EmbeddedAssetSchema = z2.object({
|
|
117
140
|
size: z2.int().nonnegative(),
|
|
118
141
|
sha256: z2.string().regex(/^[a-f0-9]{64}$/),
|
|
119
142
|
bytes: z2.custom((value) => value instanceof Uint8Array)
|
|
120
143
|
});
|
|
144
|
+
var AssetSchema = EmbeddedAssetSchema.extend({ outputPath: z2.string() });
|
|
121
145
|
var TargetAssetSchema = AssetSchema.extend({ architecture: ArchitectureSchema });
|
|
122
146
|
var DigestSchema = z2.object({
|
|
123
147
|
size: z2.int().nonnegative(),
|
|
@@ -208,72 +232,100 @@ function readVerifiedAsset(root, published, platform, architecture) {
|
|
|
208
232
|
};
|
|
209
233
|
return { sourcePath, bytes, size: published.size, sha256: published.sha256 };
|
|
210
234
|
}
|
|
211
|
-
function
|
|
212
|
-
const
|
|
235
|
+
function installedPackage() {
|
|
236
|
+
const root = installedPackageRoot();
|
|
237
|
+
const published = NativeAssetManifestSchema.parse(JSON.parse(readFileSync(resolve(root, "native-assets.json"), "utf8")));
|
|
238
|
+
const manifest = PackageManifestSchema.parse(JSON.parse(readFileSync(resolve(root, "package.json"), "utf8")));
|
|
239
|
+
return {
|
|
240
|
+
root,
|
|
241
|
+
published,
|
|
242
|
+
version: manifest.version,
|
|
243
|
+
loaderPath: resolve(root, published.loader)
|
|
244
|
+
};
|
|
245
|
+
}
|
|
246
|
+
function nativePlugin(loaderPath, specifiers, embedded, companionEntry) {
|
|
247
|
+
const contents = nativeLoaderSource(specifiers, "static");
|
|
248
|
+
const external = new Set(Object.values(specifiers));
|
|
249
|
+
return {
|
|
250
|
+
name: "stitchkit-native-packaging",
|
|
251
|
+
setup(build) {
|
|
252
|
+
if (companionEntry !== undefined) {
|
|
253
|
+
if (build.config.entrypoints.length !== 1)
|
|
254
|
+
throw new Error("Native companion packaging requires exactly one entrypoint");
|
|
255
|
+
if (build.config.splitting)
|
|
256
|
+
throw new Error("Native companion packaging requires splitting: false");
|
|
257
|
+
const naming = build.config.naming;
|
|
258
|
+
const entry = typeof naming === "string" ? naming : naming?.entry;
|
|
259
|
+
if (entry !== companionEntry)
|
|
260
|
+
throw new Error("Native companion packaging naming.entry must match entryPath");
|
|
261
|
+
}
|
|
262
|
+
build.onLoad({ filter: /\.[cm]?js$/ }, (args) => args.path === loaderPath ? { contents, loader: "js" } : undefined);
|
|
263
|
+
if (embedded.size > 0)
|
|
264
|
+
build.onLoad({ filter: /\.node$/ }, (args) => {
|
|
265
|
+
const bytes = embedded.get(args.path);
|
|
266
|
+
return bytes ? { contents: bytes, loader: "napi" } : undefined;
|
|
267
|
+
});
|
|
268
|
+
if (companionEntry !== undefined)
|
|
269
|
+
build.onResolve({ filter: /./ }, (args) => args.importer === loaderPath && external.has(args.path) ? { path: args.path, external: true } : undefined);
|
|
270
|
+
}
|
|
271
|
+
};
|
|
272
|
+
}
|
|
273
|
+
function embedNative(input) {
|
|
274
|
+
const resolved = resolveTargets(input.platform, [input.architecture]);
|
|
275
|
+
if ("refusal" in resolved)
|
|
276
|
+
return resolved.refusal;
|
|
277
|
+
const [architecture] = resolved.targets;
|
|
278
|
+
const installed = installedPackage();
|
|
279
|
+
const verified = readVerifiedAsset(installed.root, installed.published.assets[architecture], input.platform, architecture);
|
|
280
|
+
if ("refusal" in verified)
|
|
281
|
+
return verified.refusal;
|
|
282
|
+
const { sourcePath, bytes, size, sha256 } = verified;
|
|
283
|
+
return {
|
|
284
|
+
state: "ready",
|
|
285
|
+
platform: "darwin",
|
|
286
|
+
architecture,
|
|
287
|
+
packageVersion: installed.version,
|
|
288
|
+
assets: [{ size, sha256, bytes }],
|
|
289
|
+
plugin: nativePlugin(installed.loaderPath, { [architecture]: sourcePath }, new Map([[sourcePath, new Uint8Array(bytes)]]), undefined)
|
|
290
|
+
};
|
|
291
|
+
}
|
|
292
|
+
function packageCompanion(input) {
|
|
213
293
|
const declared = typeof input.architecture === "string" ? [input.architecture] : input.architecture;
|
|
214
294
|
const resolved = resolveTargets(input.platform, declared);
|
|
215
295
|
if ("refusal" in resolved)
|
|
216
296
|
return resolved.refusal;
|
|
217
297
|
const architectures = resolved.targets;
|
|
218
|
-
const
|
|
219
|
-
const published = NativeAssetManifestSchema.parse(JSON.parse(readFileSync(resolve(root, "native-assets.json"), "utf8")));
|
|
220
|
-
const manifest = PackageManifestSchema.parse(JSON.parse(readFileSync(resolve(root, "package.json"), "utf8")));
|
|
221
|
-
const loaderPath = resolve(root, published.loader);
|
|
298
|
+
const installed = installedPackage();
|
|
222
299
|
const assets = [];
|
|
223
300
|
const specifiers = {};
|
|
224
|
-
const embedded = new Map;
|
|
225
301
|
for (const architecture of architectures) {
|
|
226
302
|
const template = typeof input.assetPath === "string" ? input.assetPath : input.assetPath[architecture];
|
|
227
303
|
if (!template)
|
|
228
304
|
throw new Error("Declared architecture has no output path");
|
|
229
|
-
const verified = readVerifiedAsset(root, published.assets[architecture], input.platform, architecture);
|
|
305
|
+
const verified = readVerifiedAsset(installed.root, installed.published.assets[architecture], input.platform, architecture);
|
|
230
306
|
if ("refusal" in verified)
|
|
231
307
|
return verified.refusal;
|
|
232
|
-
const {
|
|
308
|
+
const { size, sha256, bytes } = verified;
|
|
233
309
|
const outputPath = template.replaceAll(ASSET_HASH_TOKEN, sha256.slice(0, ASSET_HASH_LENGTH));
|
|
234
310
|
if (assets.some((asset) => asset.outputPath === outputPath))
|
|
235
311
|
throw new Error("Addons must have distinct output paths");
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
const outputSpecifier = relative(dirname(input.entryPath), outputPath).split("\\").join("/");
|
|
239
|
-
specifiers[architecture] = input.delivery === "embedded" ? sourcePath : outputSpecifier.startsWith(".") ? outputSpecifier : `./${outputSpecifier}`;
|
|
312
|
+
const specifier = relative(dirname(input.entryPath), outputPath).split("\\").join("/");
|
|
313
|
+
specifiers[architecture] = specifier.startsWith(".") ? specifier : `./${specifier}`;
|
|
240
314
|
const asset = { outputPath, size, sha256, bytes };
|
|
241
315
|
assets.push(typeof input.architecture === "string" ? asset : { ...asset, architecture });
|
|
242
316
|
}
|
|
243
|
-
const contents = nativeLoaderSource(specifiers, "static");
|
|
244
|
-
const external = new Set(Object.values(specifiers));
|
|
245
317
|
return {
|
|
246
318
|
state: "ready",
|
|
247
319
|
platform: "darwin",
|
|
248
320
|
architecture: typeof input.architecture === "string" ? architectures[0] : architectures,
|
|
249
|
-
packageVersion:
|
|
321
|
+
packageVersion: installed.version,
|
|
250
322
|
assets,
|
|
251
|
-
plugin:
|
|
252
|
-
name: "stitchkit-native-packaging",
|
|
253
|
-
setup(build) {
|
|
254
|
-
if (input.delivery === "companion") {
|
|
255
|
-
if (build.config.entrypoints.length !== 1)
|
|
256
|
-
throw new Error("Native companion packaging requires exactly one entrypoint");
|
|
257
|
-
if (build.config.splitting)
|
|
258
|
-
throw new Error("Native companion packaging requires splitting: false");
|
|
259
|
-
const naming = build.config.naming;
|
|
260
|
-
const entry = typeof naming === "string" ? naming : naming?.entry;
|
|
261
|
-
if (entry !== input.entryPath)
|
|
262
|
-
throw new Error("Native companion packaging naming.entry must match entryPath");
|
|
263
|
-
}
|
|
264
|
-
build.onLoad({ filter: /\.[cm]?js$/ }, (args) => args.path === loaderPath ? { contents, loader: "js" } : undefined);
|
|
265
|
-
if (embedded.size > 0)
|
|
266
|
-
build.onLoad({ filter: /\.node$/ }, (args) => {
|
|
267
|
-
const bytes = embedded.get(args.path);
|
|
268
|
-
return bytes ? { contents: bytes, loader: "napi" } : undefined;
|
|
269
|
-
});
|
|
270
|
-
if (input.delivery === "companion") {
|
|
271
|
-
build.onResolve({ filter: /./ }, (args) => args.importer === loaderPath && external.has(args.path) ? { path: args.path, external: true } : undefined);
|
|
272
|
-
}
|
|
273
|
-
}
|
|
274
|
-
}
|
|
323
|
+
plugin: nativePlugin(installed.loaderPath, specifiers, new Map, input.entryPath)
|
|
275
324
|
};
|
|
276
325
|
}
|
|
326
|
+
function createNativePackaging(options) {
|
|
327
|
+
return options.delivery === "embedded" ? embedNative(EmbeddedOptionsSchema.parse(options)) : packageCompanion(CompanionOptionsSchema.parse(options));
|
|
328
|
+
}
|
|
277
329
|
export {
|
|
278
330
|
createNativePackaging
|
|
279
331
|
};
|
|
@@ -2,32 +2,32 @@ import {
|
|
|
2
2
|
ManagedFilePathSchema2,
|
|
3
3
|
ManagedFileRefSchema2
|
|
4
4
|
} from "../index-xqhede6x.js";
|
|
5
|
+
import"../index-2kbysk9s.js";
|
|
6
|
+
import"../index-7r74re56.js";
|
|
7
|
+
import"../index-bnf8s6v3.js";
|
|
5
8
|
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
} from "../index-j4zh647a.js";
|
|
9
|
+
ExclusiveLockError2,
|
|
10
|
+
withExclusiveLock2
|
|
11
|
+
} from "../index-4f37d3bg.js";
|
|
10
12
|
import {
|
|
11
13
|
ManagedFileError2,
|
|
12
14
|
createManagedFileBoundary2
|
|
13
|
-
} from "../index-
|
|
14
|
-
import {
|
|
15
|
-
AppError2
|
|
16
|
-
} from "../index-j9gxbztg.js";
|
|
17
|
-
import"../index-dsnjzb62.js";
|
|
18
|
-
import"../index-azx12jgv.js";
|
|
19
|
-
import"../index-v5ee8ath.js";
|
|
20
|
-
import {
|
|
21
|
-
ExclusiveLockError2,
|
|
22
|
-
withExclusiveLock2
|
|
23
|
-
} from "../index-4vsby8n8.js";
|
|
15
|
+
} from "../index-9j2atjte.js";
|
|
24
16
|
import {
|
|
25
17
|
writeFileAtomic2,
|
|
26
18
|
writeFileAtomicSync2
|
|
27
|
-
} from "../index-
|
|
19
|
+
} from "../index-07dcf2yn.js";
|
|
28
20
|
import {
|
|
29
21
|
AtomicFilePublicationError2
|
|
30
22
|
} from "../index-b56nnscm.js";
|
|
23
|
+
import {
|
|
24
|
+
stagingPath,
|
|
25
|
+
isAtomicStagingName2,
|
|
26
|
+
sweepAtomicStaging2
|
|
27
|
+
} from "../index-j4zh647a.js";
|
|
28
|
+
import {
|
|
29
|
+
AppError2
|
|
30
|
+
} from "../index-j9gxbztg.js";
|
|
31
31
|
// src/files/chunk-spool.ts
|
|
32
32
|
import { createHash } from "node:crypto";
|
|
33
33
|
import {
|
|
@@ -1,31 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
ApiError2
|
|
3
|
-
} from "../index-kfjkb396.js";
|
|
4
1
|
import"../index-m38ej7e5.js";
|
|
5
2
|
import {
|
|
6
3
|
DEFAULT_CONTRACT_STREAM_FRAME_BYTES2,
|
|
7
4
|
ContractStreamFrameSchema2
|
|
8
5
|
} from "../index-h2fhjqy7.js";
|
|
9
|
-
import {
|
|
10
|
-
parseNDJSON2,
|
|
11
|
-
parseSSE2,
|
|
12
|
-
contractEndpointMatchers2,
|
|
13
|
-
createClient2,
|
|
14
|
-
createClients2,
|
|
15
|
-
createScopedClients2,
|
|
16
|
-
createUrlBuilder2,
|
|
17
|
-
createUrlBuilders2,
|
|
18
|
-
createScopedUrlBuilders2
|
|
19
|
-
} from "../index-1pwwan01.js";
|
|
20
|
-
import {
|
|
21
|
-
createTraceContext2,
|
|
22
|
-
parseTraceparent2,
|
|
23
|
-
formatTraceparent2,
|
|
24
|
-
childSpan2
|
|
25
|
-
} from "../index-yex7eg1v.js";
|
|
26
6
|
import {
|
|
27
7
|
createHttpClient2
|
|
28
|
-
} from "../index-
|
|
8
|
+
} from "../index-7jvwrjqa.js";
|
|
29
9
|
import"../index-w0eqdhyd.js";
|
|
30
10
|
import {
|
|
31
11
|
LiveStatePhaseSchema2,
|
|
@@ -33,23 +13,10 @@ import {
|
|
|
33
13
|
LiveStateControllerStatusSchema2,
|
|
34
14
|
createLiveStateController2
|
|
35
15
|
} from "../index-rfkh44ss.js";
|
|
36
|
-
import {
|
|
37
|
-
AppError2,
|
|
38
|
-
notFound2,
|
|
39
|
-
badRequest2,
|
|
40
|
-
unauthorized2,
|
|
41
|
-
forbidden2,
|
|
42
|
-
conflict2,
|
|
43
|
-
rateLimited2,
|
|
44
|
-
STITCH_ERROR_STATUS2,
|
|
45
|
-
isRetryableStatus2,
|
|
46
|
-
isStitchErrorCode2,
|
|
47
|
-
appError2
|
|
48
|
-
} from "../index-j9gxbztg.js";
|
|
49
16
|
import {
|
|
50
17
|
REALTIME_REJECTION_KEY2,
|
|
51
18
|
asRealtimeRejection2
|
|
52
|
-
} from "../index-
|
|
19
|
+
} from "../index-ykdcnq1f.js";
|
|
53
20
|
import {
|
|
54
21
|
RealtimeRequestPhaseSchema2,
|
|
55
22
|
RealtimeRequestPhaseEventSchema2,
|
|
@@ -58,11 +25,6 @@ import {
|
|
|
58
25
|
RealtimeRequestInvalidAcknowledgementError2,
|
|
59
26
|
RealtimeRequestRejectedError2
|
|
60
27
|
} from "../index-4s0fep5q.js";
|
|
61
|
-
import {
|
|
62
|
-
realtimeRequestTraces,
|
|
63
|
-
createRequestTracer,
|
|
64
|
-
bindRealtimeClient2
|
|
65
|
-
} from "../index-sj28htvf.js";
|
|
66
28
|
import {
|
|
67
29
|
BackoffPolicySchema2,
|
|
68
30
|
createBackoff2
|
|
@@ -82,7 +44,7 @@ import {
|
|
|
82
44
|
paginatedSchema2,
|
|
83
45
|
encodeCursor2,
|
|
84
46
|
decodeCursor2
|
|
85
|
-
} from "../index-
|
|
47
|
+
} from "../index-q4hjtyye.js";
|
|
86
48
|
import {
|
|
87
49
|
ManagedFilePathSchema2,
|
|
88
50
|
ManagedFileRefSchema2
|
|
@@ -90,12 +52,31 @@ import {
|
|
|
90
52
|
import {
|
|
91
53
|
createMutationQueue
|
|
92
54
|
} from "../index-sykb5ag7.js";
|
|
55
|
+
import {
|
|
56
|
+
realtimeRequestTraces,
|
|
57
|
+
createRequestTracer,
|
|
58
|
+
bindRealtimeClient2
|
|
59
|
+
} from "../index-pvh3z03x.js";
|
|
60
|
+
import {
|
|
61
|
+
parseNDJSON2,
|
|
62
|
+
parseSSE2,
|
|
63
|
+
contractEndpointMatchers2,
|
|
64
|
+
createClient2,
|
|
65
|
+
createClients2,
|
|
66
|
+
createScopedClients2,
|
|
67
|
+
createUrlBuilder2,
|
|
68
|
+
createUrlBuilders2,
|
|
69
|
+
createScopedUrlBuilders2
|
|
70
|
+
} from "../index-zsqt5q98.js";
|
|
93
71
|
import {
|
|
94
72
|
isModuleNotFound
|
|
95
73
|
} from "../index-srs8hj9c.js";
|
|
96
74
|
import {
|
|
97
75
|
withDeadline
|
|
98
76
|
} from "../index-9tqbxv5p.js";
|
|
77
|
+
import {
|
|
78
|
+
ApiError2
|
|
79
|
+
} from "../index-kfjkb396.js";
|
|
99
80
|
import {
|
|
100
81
|
sleep
|
|
101
82
|
} from "../index-eemvahkc.js";
|
|
@@ -103,6 +84,25 @@ import {
|
|
|
103
84
|
zodIssues2,
|
|
104
85
|
formatZodError2
|
|
105
86
|
} from "../index-1eeqpadm.js";
|
|
87
|
+
import {
|
|
88
|
+
AppError2,
|
|
89
|
+
notFound2,
|
|
90
|
+
badRequest2,
|
|
91
|
+
unauthorized2,
|
|
92
|
+
forbidden2,
|
|
93
|
+
conflict2,
|
|
94
|
+
rateLimited2,
|
|
95
|
+
STITCH_ERROR_STATUS2,
|
|
96
|
+
isRetryableStatus2,
|
|
97
|
+
isStitchErrorCode2,
|
|
98
|
+
appError2
|
|
99
|
+
} from "../index-j9gxbztg.js";
|
|
100
|
+
import {
|
|
101
|
+
createTraceContext2,
|
|
102
|
+
parseTraceparent2,
|
|
103
|
+
formatTraceparent2,
|
|
104
|
+
childSpan2
|
|
105
|
+
} from "../index-yex7eg1v.js";
|
|
106
106
|
// src/browser/chunked-upload.ts
|
|
107
107
|
function isRetryableUploadFailure(error) {
|
|
108
108
|
if (ApiError2.is(error)) {
|
package/dist/entrypoints/node.js
CHANGED
|
@@ -1,26 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
AppError2,
|
|
3
|
-
notFound2,
|
|
4
|
-
badRequest2,
|
|
5
|
-
unauthorized2,
|
|
6
|
-
forbidden2,
|
|
7
|
-
conflict2,
|
|
8
|
-
rateLimited2,
|
|
9
|
-
appError2
|
|
10
|
-
} from "../index-j9gxbztg.js";
|
|
11
|
-
import"../index-yex7eg1v.js";
|
|
12
|
-
import {
|
|
13
|
-
createHandler2,
|
|
14
|
-
createScopedImplementRegistry2,
|
|
15
|
-
implementRegistry2,
|
|
16
|
-
createImplementRegistry2,
|
|
17
|
-
bindProcessSignals2,
|
|
18
|
-
createSocketIOServer2,
|
|
19
|
-
UnixClientTransportError2,
|
|
20
|
-
createUnixClientTransport2
|
|
21
|
-
} from "../index-wdy68sh6.js";
|
|
22
|
-
import"../index-rpzewktb.js";
|
|
1
|
+
import"../index-fynr93w4.js";
|
|
23
2
|
import"../index-h2fhjqy7.js";
|
|
3
|
+
import"../index-m38ej7e5.js";
|
|
24
4
|
import {
|
|
25
5
|
ShutdownStateSchema2,
|
|
26
6
|
ShutdownOptionsSchema2,
|
|
@@ -28,23 +8,41 @@ import {
|
|
|
28
8
|
ShutdownResultSchema2,
|
|
29
9
|
createServerLifecycle
|
|
30
10
|
} from "../index-q0th8q0z.js";
|
|
31
|
-
import"../index-
|
|
32
|
-
import"../index-1bx1xv1k.js";
|
|
33
|
-
import"../index-pzb63z66.js";
|
|
11
|
+
import"../index-ykdcnq1f.js";
|
|
34
12
|
import"../index-4s0fep5q.js";
|
|
35
13
|
import"../index-fsw1ybf3.js";
|
|
36
|
-
import"../index-
|
|
14
|
+
import"../index-q4hjtyye.js";
|
|
37
15
|
import"../index-xqhede6x.js";
|
|
16
|
+
import {
|
|
17
|
+
createHandler2,
|
|
18
|
+
createScopedImplementRegistry2,
|
|
19
|
+
implementRegistry2,
|
|
20
|
+
createImplementRegistry2,
|
|
21
|
+
bindProcessSignals2,
|
|
22
|
+
createSocketIOServer2,
|
|
23
|
+
UnixClientTransportError2,
|
|
24
|
+
createUnixClientTransport2
|
|
25
|
+
} from "../index-njs9gvrh.js";
|
|
38
26
|
import {
|
|
39
27
|
bindRealtimeServer2
|
|
40
|
-
} from "../index-
|
|
28
|
+
} from "../index-xmgjtkvr.js";
|
|
41
29
|
import {
|
|
42
30
|
createMultipartStream2,
|
|
43
31
|
implement2,
|
|
44
32
|
createImplement2,
|
|
45
33
|
createScopedImplement2
|
|
46
|
-
} from "../index-
|
|
47
|
-
import"../index-
|
|
34
|
+
} from "../index-85qve8mq.js";
|
|
35
|
+
import"../index-1bx1xv1k.js";
|
|
36
|
+
import {
|
|
37
|
+
AppError2,
|
|
38
|
+
notFound2,
|
|
39
|
+
badRequest2,
|
|
40
|
+
unauthorized2,
|
|
41
|
+
forbidden2,
|
|
42
|
+
conflict2,
|
|
43
|
+
rateLimited2,
|
|
44
|
+
appError2
|
|
45
|
+
} from "../index-j9gxbztg.js";
|
|
48
46
|
// src/server/node.ts
|
|
49
47
|
import { serve } from "srvx/node";
|
|
50
48
|
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import"../index-j9gxbztg.js";
|
|
2
1
|
import {
|
|
3
2
|
recordedErrorMessage
|
|
4
|
-
} from "../index-
|
|
3
|
+
} from "../index-fynr93w4.js";
|
|
5
4
|
import {
|
|
6
5
|
ObservabilitySinkStatusSchema2,
|
|
7
6
|
ObservabilityStatusSchema2,
|
|
@@ -11,15 +10,6 @@ import {
|
|
|
11
10
|
withinBound,
|
|
12
11
|
createBoundedSinkManager
|
|
13
12
|
} from "../index-qaet40b2.js";
|
|
14
|
-
import {
|
|
15
|
-
createTraceContext2,
|
|
16
|
-
parseTraceparent2,
|
|
17
|
-
formatTraceparent2,
|
|
18
|
-
resolveTraceContext2,
|
|
19
|
-
childSpan2,
|
|
20
|
-
resolvePropagationContext2
|
|
21
|
-
} from "../index-yex7eg1v.js";
|
|
22
|
-
import"../index-sznqf8fx.js";
|
|
23
13
|
import {
|
|
24
14
|
redact2,
|
|
25
15
|
truncatePreview2,
|
|
@@ -36,7 +26,15 @@ import {
|
|
|
36
26
|
setRequestDimensions2,
|
|
37
27
|
setRequestError2,
|
|
38
28
|
wrapInRequestContext2
|
|
39
|
-
} from "../index-
|
|
29
|
+
} from "../index-y3nemndz.js";
|
|
30
|
+
import {
|
|
31
|
+
createTraceContext2,
|
|
32
|
+
parseTraceparent2,
|
|
33
|
+
formatTraceparent2,
|
|
34
|
+
resolveTraceContext2,
|
|
35
|
+
childSpan2,
|
|
36
|
+
resolvePropagationContext2
|
|
37
|
+
} from "../index-yex7eg1v.js";
|
|
40
38
|
import {
|
|
41
39
|
isRecord
|
|
42
40
|
} from "../index-9jfdm5tg.js";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import"../index-
|
|
1
|
+
import"../index-2kbysk9s.js";
|
|
2
2
|
import {
|
|
3
3
|
ProcessInstanceSchema2,
|
|
4
4
|
observeProcessInstance2,
|
|
5
5
|
probeProcessOwner2
|
|
6
|
-
} from "../index-
|
|
6
|
+
} from "../index-7r74re56.js";
|
|
7
7
|
import {
|
|
8
8
|
NativeCommandError2,
|
|
9
9
|
startNativeCommand
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
+
import {
|
|
2
|
+
isAbortLikeError
|
|
3
|
+
} from "../index-7jvwrjqa.js";
|
|
1
4
|
import {
|
|
2
5
|
ApiError2
|
|
3
6
|
} from "../index-kfjkb396.js";
|
|
4
|
-
import"../index-yex7eg1v.js";
|
|
5
|
-
import {
|
|
6
|
-
isAbortLikeError
|
|
7
|
-
} from "../index-n1nszyk0.js";
|
|
8
7
|
import {
|
|
9
8
|
isRecord
|
|
10
9
|
} from "../index-9jfdm5tg.js";
|
|
@@ -1,21 +1,20 @@
|
|
|
1
|
-
import {
|
|
2
|
-
ApiError2
|
|
3
|
-
} from "../index-kfjkb396.js";
|
|
4
1
|
import"../index-m38ej7e5.js";
|
|
5
2
|
import"../index-h2fhjqy7.js";
|
|
3
|
+
import"../index-7jvwrjqa.js";
|
|
6
4
|
import {
|
|
7
5
|
endpointHasArguments,
|
|
8
6
|
createClient2
|
|
9
|
-
} from "../index-
|
|
10
|
-
import"../index-yex7eg1v.js";
|
|
11
|
-
import"../index-n1nszyk0.js";
|
|
7
|
+
} from "../index-zsqt5q98.js";
|
|
12
8
|
import {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
} from "../index-j9gxbztg.js";
|
|
9
|
+
ApiError2
|
|
10
|
+
} from "../index-kfjkb396.js";
|
|
16
11
|
import {
|
|
17
12
|
contractMethodFields
|
|
18
13
|
} from "../index-1bx1xv1k.js";
|
|
14
|
+
import {
|
|
15
|
+
AppError2,
|
|
16
|
+
STITCH_ERROR_STATUS2
|
|
17
|
+
} from "../index-j9gxbztg.js";
|
|
19
18
|
import {
|
|
20
19
|
isRecord
|
|
21
20
|
} from "../index-9jfdm5tg.js";
|