stitchkit 0.106.1 → 0.108.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.
Files changed (147) hide show
  1. package/CHANGELOG.md +151 -0
  2. package/README.md +2 -0
  3. package/darwin-native.cjs +17 -4
  4. package/dist/agent-runtime/deferred-tool-types.d.ts +6 -27
  5. package/dist/agent-runtime/deferred-tool-types.d.ts.map +1 -1
  6. package/dist/browser/stream.d.ts +38 -12
  7. package/dist/browser/stream.d.ts.map +1 -1
  8. package/dist/entrypoints/agent-runtime/browser.js +2 -3
  9. package/dist/entrypoints/agent-runtime/coding-tools.js +6 -8
  10. package/dist/entrypoints/agent-runtime/harness.js +7 -11
  11. package/dist/entrypoints/agent-runtime/realtime.js +2 -3
  12. package/dist/entrypoints/agent-runtime/sandbox.js +6 -8
  13. package/dist/entrypoints/agent-runtime.d.ts +2 -1
  14. package/dist/entrypoints/agent-runtime.d.ts.map +1 -1
  15. package/dist/entrypoints/agent-runtime.js +20 -23
  16. package/dist/entrypoints/application/diagnostic-journal.js +3 -3
  17. package/dist/entrypoints/application/directory-inbox.js +8 -9
  18. package/dist/entrypoints/application/grammy.js +3 -3
  19. package/dist/entrypoints/application.js +7 -8
  20. package/dist/entrypoints/bin/upgrade-cli.d.ts +32 -0
  21. package/dist/entrypoints/bin/upgrade-cli.d.ts.map +1 -1
  22. package/dist/entrypoints/bin/upgrade-cli.js +451 -8
  23. package/dist/entrypoints/cli/publish.js +10 -11
  24. package/dist/entrypoints/cli.js +12 -16
  25. package/dist/entrypoints/contract.js +1 -1
  26. package/dist/entrypoints/files/packaging.d.ts +3 -1
  27. package/dist/entrypoints/files/packaging.d.ts.map +1 -1
  28. package/dist/entrypoints/files/packaging.js +171 -55
  29. package/dist/entrypoints/files.js +16 -16
  30. package/dist/entrypoints/index.d.ts +1 -1
  31. package/dist/entrypoints/index.d.ts.map +1 -1
  32. package/dist/entrypoints/index.js +47 -41
  33. package/dist/entrypoints/node.js +27 -29
  34. package/dist/entrypoints/observability.js +10 -12
  35. package/dist/entrypoints/process.js +2 -2
  36. package/dist/entrypoints/react.js +3 -4
  37. package/dist/entrypoints/remote.js +8 -9
  38. package/dist/entrypoints/server.js +48 -51
  39. package/dist/entrypoints/telegram/html.js +3 -3
  40. package/dist/entrypoints/telegram/screens.js +6 -6
  41. package/dist/entrypoints/telegram.d.ts +2 -0
  42. package/dist/entrypoints/telegram.d.ts.map +1 -1
  43. package/dist/entrypoints/telegram.js +344 -11
  44. package/dist/entrypoints/testing.d.ts +1 -0
  45. package/dist/entrypoints/testing.d.ts.map +1 -1
  46. package/dist/entrypoints/testing.js +138 -11
  47. package/dist/entrypoints/tools/connections.js +11 -11
  48. package/dist/entrypoints/tools/invoker.js +5 -9
  49. package/dist/entrypoints/tools/mcp.js +8 -14
  50. package/dist/entrypoints/tools.js +19 -25
  51. package/dist/entrypoints/tracking.js +3 -3
  52. package/dist/files/native-artifact.d.ts +14 -0
  53. package/dist/files/native-artifact.d.ts.map +1 -0
  54. package/dist/files/native-packaging-layout.d.ts +11 -2
  55. package/dist/files/native-packaging-layout.d.ts.map +1 -1
  56. package/dist/files/native-packaging-plugin.d.ts +53 -0
  57. package/dist/files/native-packaging-plugin.d.ts.map +1 -0
  58. package/dist/files/native-packaging.d.ts +44 -43
  59. package/dist/files/native-packaging.d.ts.map +1 -1
  60. package/dist/{index-v5ee8ath.js → index-1h2zv8rx.js} +10 -40
  61. package/dist/index-2kbysk9s.js +42 -0
  62. package/dist/{index-wbhdzxar.js → index-2s6fpehp.js} +5 -5
  63. package/dist/{index-ksfagmyz.js → index-4qh90tyw.js} +8 -8
  64. package/dist/{index-yvfk3y36.js → index-636mggad.js} +4 -3
  65. package/dist/{index-f199nfq5.js → index-6y9t2fwz.js} +7 -7
  66. package/dist/{index-w8etpm8j.js → index-9j2atjte.js} +1 -1
  67. package/dist/index-a5qr2rj6.js +26 -0
  68. package/dist/{index-azx12jgv.js → index-bh2ht9y5.js} +13 -7
  69. package/dist/{index-pz3y6b6g.js → index-cx2nh595.js} +3 -3
  70. package/dist/{index-2k91mewf.js → index-dm2fv45z.js} +9 -9
  71. package/dist/{index-9bskshe3.js → index-dwf0gymy.js} +10 -10
  72. package/dist/{index-qaqbdm7s.js → index-h7qms8f9.js} +8 -8
  73. package/dist/{index-drs41arz.js → index-ktjmgq9p.js} +1 -1
  74. package/dist/{index-916yh4e2.js → index-mep4sb48.js} +14 -14
  75. package/dist/{index-wdy68sh6.js → index-njs9gvrh.js} +17 -17
  76. package/dist/{index-1ptj98e0.js → index-nx49x0tw.js} +2 -2
  77. package/dist/{index-1pwwan01.js → index-p5kx5vqd.js} +214 -59
  78. package/dist/{index-sj28htvf.js → index-pvh3z03x.js} +1 -1
  79. package/dist/{index-r393tnfp.js → index-q6crhe1n.js} +4 -4
  80. package/dist/{index-dsnjzb62.js → index-t2bsd0hm.js} +1 -1
  81. package/dist/{index-4vsby8n8.js → index-w9mqgnz9.js} +1 -1
  82. package/dist/{index-z23rfxhj.js → index-xmgjtkvr.js} +1 -1
  83. package/dist/{index-e05cjgtf.js → index-xvj9h8yh.js} +28 -1
  84. package/dist/{index-gr5g3xfw.js → index-yz8x0hbx.js} +1 -1
  85. package/dist/{index-gxm9rc97.js → index-zrtrjkbf.js} +1 -1
  86. package/dist/internal/bounded-lines.d.ts +46 -2
  87. package/dist/internal/bounded-lines.d.ts.map +1 -1
  88. package/dist/internal/darwin-binding-error.d.ts +9 -1
  89. package/dist/internal/darwin-binding-error.d.ts.map +1 -1
  90. package/dist/internal/darwin-binding.d.ts.map +1 -1
  91. package/dist/internal/process-identity.d.ts.map +1 -1
  92. package/dist/internal/until-aborted.d.ts +9 -0
  93. package/dist/internal/until-aborted.d.ts.map +1 -0
  94. package/dist/internal/upgrade-affects.d.ts +58 -0
  95. package/dist/internal/upgrade-affects.d.ts.map +1 -0
  96. package/dist/internal/upgrade-plan.d.ts +20 -0
  97. package/dist/internal/upgrade-plan.d.ts.map +1 -1
  98. package/dist/internal/upgrade-usage.d.ts +61 -0
  99. package/dist/internal/upgrade-usage.d.ts.map +1 -0
  100. package/dist/telegram/bot-api.d.ts +10 -4
  101. package/dist/telegram/bot-api.d.ts.map +1 -1
  102. package/dist/telegram/broadcast.d.ts +2 -1
  103. package/dist/telegram/broadcast.d.ts.map +1 -1
  104. package/dist/telegram/not-dispatched.d.ts +26 -0
  105. package/dist/telegram/not-dispatched.d.ts.map +1 -0
  106. package/dist/telegram/operator-channel.d.ts +2 -1
  107. package/dist/telegram/operator-channel.d.ts.map +1 -1
  108. package/dist/telegram/send-failure.d.ts +4 -3
  109. package/dist/telegram/send-failure.d.ts.map +1 -1
  110. package/dist/telegram/transport-connect.d.ts +38 -0
  111. package/dist/telegram/transport-connect.d.ts.map +1 -0
  112. package/dist/telegram/transport.d.ts +43 -0
  113. package/dist/telegram/transport.d.ts.map +1 -0
  114. package/dist/telegram/webhook.d.ts +2 -1
  115. package/dist/telegram/webhook.d.ts.map +1 -1
  116. package/dist/testing/manual-clock.d.ts +82 -0
  117. package/dist/testing/manual-clock.d.ts.map +1 -0
  118. package/dist/tools/internal/surface-projector.d.ts +0 -7
  119. package/dist/tools/internal/surface-projector.d.ts.map +1 -1
  120. package/dist/tools/runtime-tool-declaration.d.ts +11 -0
  121. package/dist/tools/runtime-tool-declaration.d.ts.map +1 -1
  122. package/dist/tools/runtime-tool.d.ts +2 -3
  123. package/dist/tools/runtime-tool.d.ts.map +1 -1
  124. package/llms/files-packaging.txt +13 -6
  125. package/llms/process.txt +71 -15
  126. package/llms/stitchkit.2.txt +211 -628
  127. package/llms/stitchkit.txt +635 -10
  128. package/llms/telegram.txt +36 -3
  129. package/llms/testing.txt +47 -0
  130. package/llms/{upgrading-0.96.0-0.106.0.txt → upgrading-0.100.0-0.108.0.txt} +112 -144
  131. package/llms/{upgrading-0.37.0-0.53.0.txt → upgrading-0.37.0-0.58.0.txt} +209 -3
  132. package/llms/{upgrading-0.55.0-0.68.0.txt → upgrading-0.59.0-0.71.0.txt} +149 -209
  133. package/llms/{upgrading-0.69.0-0.95.0.txt → upgrading-0.72.0-0.99.0.txt} +137 -149
  134. package/llms/upgrading.txt +36 -4
  135. package/llms-full.txt +360 -39
  136. package/llms.txt +10 -10
  137. package/package.json +2 -1
  138. package/llms/stitchkit.3.txt +0 -177
  139. package/dist/{index-cazts87s.js → index-07dcf2yn.js} +3 -3
  140. package/dist/{index-n1nszyk0.js → index-7jvwrjqa.js} +3 -3
  141. package/dist/{index-cmzvhhtd.js → index-85qve8mq.js} +3 -3
  142. package/dist/{index-rpzewktb.js → index-fynr93w4.js} +3 -3
  143. package/dist/{index-37asdw3a.js → index-k7qdkh3n.js} +3 -3
  144. package/dist/{index-x7w1z6pf.js → index-q4hjtyye.js} +4 -4
  145. package/dist/{index-7n68nmc6.js → index-y3nemndz.js} +3 -3
  146. package/dist/{index-12zsej7b.js → index-y70v24cw.js} +3 -3
  147. package/dist/{index-pzb63z66.js → index-ykdcnq1f.js} +3 -3
@@ -1,8 +1,6 @@
1
- // src/files/native-packaging.ts
2
- import { existsSync, readFileSync } from "node:fs";
3
- import { dirname, relative, resolve } from "node:path";
4
- import { fileURLToPath } from "node:url";
5
- import { z as z2 } from "zod";
1
+ import {
2
+ NATIVE_NOT_PACKAGED
3
+ } from "../../index-1h2zv8rx.js";
6
4
 
7
5
  // src/files/native-packaging-layout.ts
8
6
  import { createHash } from "node:crypto";
@@ -30,18 +28,37 @@ var NativeAssetManifestSchema = z.strictObject({
30
28
  function nativeAssetDigest(bytes) {
31
29
  return { size: bytes.byteLength, sha256: createHash("sha256").update(bytes).digest("hex") };
32
30
  }
31
+ var LOADER_MARK = ["stitchkit", "native", "loader"].join("-");
32
+ function nativeLoaderMarker(state) {
33
+ return `${LOADER_MARK}:${state}`;
34
+ }
35
+ var NOT_PACKAGED_MESSAGE = "The Darwin addon is not packaged into this bundle: build it with createNativePackaging from stitchkit/files/packaging";
33
36
  var templateText = (value) => value.replaceAll("\\", "\\\\").replaceAll("`", "\\`").replaceAll("${", "\\${");
34
37
  function nativeLoaderSource(assets, resolution) {
35
38
  const quote = (value) => `'${JSON.stringify(value).slice(1, -1).replaceAll("'", "\\'")}'`;
36
- const target = (asset) => resolution === "static" ? quote(asset) : `\`\${__dirname}/${templateText(asset.replace(/^\.\//, ""))}\``;
39
+ const target = (asset) => resolution === "static" ? quote(asset) : `\`\${directory}/${templateText(asset.replace(/^\.\//, ""))}\``;
37
40
  const branches = Object.entries(assets).map(([architecture, asset]) => ` if (process.arch === ${quote(architecture)}) return require(${target(asset)});`);
38
41
  return [
39
42
  "/** Generated from the owning native asset graph. Loading remains lazy. */",
40
43
  ...resolution === "static" ? [] : [
41
- "// The addon path is computed, so a bundler never follows or embeds it. A packaging",
42
- "// plugin replaces this file with a static loader when an artifact must carry the addon."
44
+ "// The addon path is computed from this file's own location, so a bundler never follows",
45
+ "// or embeds it and the build machine never becomes a literal of the artifact. Inside a",
46
+ "// bundle the file has no location (`module.filename` is not absolute there): loading",
47
+ "// refuses and names the packaging plugin, which replaces this file with a static loader",
48
+ "// when an artifact must carry the addon."
43
49
  ],
44
50
  "module.exports = function loadDarwinAddon() {",
51
+ ...resolution === "static" ? [] : [
52
+ " const location = module.filename;",
53
+ " if (typeof location !== 'string' || !location.startsWith('/')) {",
54
+ " const refusal = new Error(",
55
+ ` ${quote(NOT_PACKAGED_MESSAGE)},`,
56
+ " );",
57
+ ` refusal.code = ${quote(NATIVE_NOT_PACKAGED)};`,
58
+ " throw refusal;",
59
+ " }",
60
+ " const directory = location.slice(0, location.lastIndexOf('/'));"
61
+ ],
45
62
  " try {",
46
63
  ...branches,
47
64
  " throw new Error('Unsupported Darwin addon architecture');",
@@ -49,11 +66,102 @@ function nativeLoaderSource(assets, resolution) {
49
66
  " throw new Error('Darwin addon loading failed', { cause });",
50
67
  " }",
51
68
  "};",
69
+ `module.exports.stitchkitNativeLoader = ${quote(nativeLoaderMarker(resolution === "static" ? "packaged" : "unpackaged"))};`,
52
70
  ""
53
71
  ].join(`
54
72
  `);
55
73
  }
56
74
 
75
+ // src/files/native-artifact.ts
76
+ function contains(bytes, text) {
77
+ const haystack = Buffer.from(bytes.buffer, bytes.byteOffset, bytes.byteLength);
78
+ return haystack.includes(Buffer.from(text, "latin1")) || haystack.includes(Buffer.from(text, "utf16le"));
79
+ }
80
+ function inspectNativeArtifact(bytes) {
81
+ if (contains(bytes, nativeLoaderMarker("unpackaged")))
82
+ return "unpackaged";
83
+ if (contains(bytes, nativeLoaderMarker("packaged")))
84
+ return "packaged";
85
+ return "no-loader";
86
+ }
87
+ // src/files/native-packaging.ts
88
+ import { existsSync as existsSync2, readFileSync as readFileSync2 } from "node:fs";
89
+ import { dirname, relative, resolve } from "node:path";
90
+ import { fileURLToPath } from "node:url";
91
+ import { z as z2 } from "zod";
92
+
93
+ // src/files/native-packaging-plugin.ts
94
+ import { existsSync, readFileSync, realpathSync } from "node:fs";
95
+ import { basename, join } from "node:path";
96
+ var realpath = (path) => {
97
+ try {
98
+ return realpathSync(path);
99
+ } catch {
100
+ return path;
101
+ }
102
+ };
103
+ function loaderInstallation(path, loaderName) {
104
+ const suffix = `/${loaderName}`;
105
+ if (!path.endsWith(suffix))
106
+ return;
107
+ const root = path.slice(0, -suffix.length);
108
+ const manifest = join(root, "package.json");
109
+ if (!existsSync(manifest))
110
+ return;
111
+ try {
112
+ const parsed = JSON.parse(readFileSync(manifest, "utf8"));
113
+ if (typeof parsed !== "object" || parsed === null)
114
+ return;
115
+ const name = Reflect.get(parsed, "name");
116
+ const version = Reflect.get(parsed, "version");
117
+ if (name !== "stitchkit")
118
+ return;
119
+ return { root, version: typeof version === "string" ? version : "unknown" };
120
+ } catch {
121
+ return;
122
+ }
123
+ }
124
+ function nativePlugin(owner, specifiers, embedded, companionEntry) {
125
+ const contents = nativeLoaderSource(specifiers, "static");
126
+ const external = new Set(Object.values(specifiers));
127
+ const ownLoader = realpath(owner.loaderPath);
128
+ const loaderFile = basename(owner.loaderName);
129
+ return {
130
+ name: "stitchkit-native-packaging",
131
+ setup(build) {
132
+ if (companionEntry !== undefined) {
133
+ if (build.config.entrypoints.length !== 1)
134
+ throw new Error("Native companion packaging requires exactly one entrypoint");
135
+ if (build.config.splitting)
136
+ throw new Error("Native companion packaging requires splitting: false");
137
+ const naming = build.config.naming;
138
+ const entry = typeof naming === "string" ? naming : naming?.entry;
139
+ if (entry !== companionEntry)
140
+ throw new Error("Native companion packaging naming.entry must match entryPath");
141
+ }
142
+ build.onLoad({ filter: /\.[cm]?js$/ }, (args) => {
143
+ if (args.path === owner.loaderPath)
144
+ return { contents, loader: "js" };
145
+ if (basename(args.path) !== loaderFile)
146
+ return;
147
+ if (realpath(args.path) === ownLoader)
148
+ return { contents, loader: "js" };
149
+ const foreign = loaderInstallation(args.path, owner.loaderName);
150
+ if (!foreign)
151
+ return;
152
+ throw new Error(`Native packaging of stitchkit ${owner.version} (${owner.root}) met the Darwin loader of ` + `stitchkit ${foreign.version} (${foreign.root}): the entry imports another installation, ` + "whose loader this plugin cannot package. Call createNativePackaging from the stitchkit " + "the entry imports.");
153
+ });
154
+ if (embedded.size > 0)
155
+ build.onLoad({ filter: /\.node$/ }, (args) => {
156
+ const bytes = embedded.get(args.path);
157
+ return bytes ? { contents: bytes, loader: "napi" } : undefined;
158
+ });
159
+ if (companionEntry !== undefined)
160
+ build.onResolve({ filter: /./ }, (args) => (args.importer === owner.loaderPath || realpath(args.importer) === ownLoader) && external.has(args.path) ? { path: args.path, external: true } : undefined);
161
+ }
162
+ };
163
+ }
164
+
57
165
  // src/files/native-packaging.ts
58
166
  var PackageManifestSchema = z2.object({
59
167
  name: z2.literal("stitchkit"),
@@ -71,16 +179,21 @@ var AssetPathSchema = RelativePathSchema.refine((value) => !/[[\]]/.test(value.r
71
179
  var SingleOptionsSchema = z2.object({
72
180
  ...CommonOptions,
73
181
  architecture: z2.string().min(1),
74
- delivery: z2.enum(["companion", "embedded"]),
182
+ delivery: z2.literal("companion"),
75
183
  assetPath: AssetPathSchema
76
184
  });
185
+ var EmbeddedOptionsSchema = z2.strictObject({
186
+ platform: PlatformSchema,
187
+ architecture: z2.string().min(1),
188
+ delivery: z2.literal("embedded")
189
+ });
77
190
  var MultipleOptionsSchema = z2.object({
78
191
  ...CommonOptions,
79
192
  architecture: z2.array(z2.string().min(1)).refine((targets) => targets.length > 0),
80
193
  delivery: z2.literal("companion"),
81
194
  assetPath: z2.record(z2.string().min(1), AssetPathSchema)
82
195
  });
83
- var OptionsSchema = z2.union([SingleOptionsSchema, MultipleOptionsSchema]).check((ctx) => {
196
+ var CompanionOptionsSchema = z2.union([SingleOptionsSchema, MultipleOptionsSchema]).check((ctx) => {
84
197
  const input = ctx.value;
85
198
  const targets = typeof input.architecture === "string" ? [input.architecture] : input.architecture;
86
199
  if (new Set(targets).size !== targets.length)
@@ -112,12 +225,12 @@ var OptionsSchema = z2.union([SingleOptionsSchema, MultipleOptionsSchema]).check
112
225
  }
113
226
  }
114
227
  });
115
- var AssetSchema = z2.object({
116
- outputPath: z2.string(),
228
+ var EmbeddedAssetSchema = z2.object({
117
229
  size: z2.int().nonnegative(),
118
230
  sha256: z2.string().regex(/^[a-f0-9]{64}$/),
119
231
  bytes: z2.custom((value) => value instanceof Uint8Array)
120
232
  });
233
+ var AssetSchema = EmbeddedAssetSchema.extend({ outputPath: z2.string() });
121
234
  var TargetAssetSchema = AssetSchema.extend({ architecture: ArchitectureSchema });
122
235
  var DigestSchema = z2.object({
123
236
  size: z2.int().nonnegative(),
@@ -170,7 +283,7 @@ function resolveTargets(platform, declared) {
170
283
  function installedPackageRoot() {
171
284
  let directory = dirname(fileURLToPath(import.meta.url));
172
285
  for (let depth = 0;depth < 64; depth++) {
173
- if (existsSync(resolve(directory, "native-assets.json")))
286
+ if (existsSync2(resolve(directory, "native-assets.json")))
174
287
  return directory;
175
288
  const parent = dirname(directory);
176
289
  if (parent === directory)
@@ -188,7 +301,7 @@ function readVerifiedAsset(root, published, platform, architecture) {
188
301
  const sourcePath = resolve(root, published.path);
189
302
  let bytes;
190
303
  try {
191
- bytes = readFileSync(sourcePath);
304
+ bytes = readFileSync2(sourcePath);
192
305
  } catch (cause) {
193
306
  if (cause instanceof Error && "code" in cause && cause.code === "ENOENT")
194
307
  return missing;
@@ -208,72 +321,75 @@ function readVerifiedAsset(root, published, platform, architecture) {
208
321
  };
209
322
  return { sourcePath, bytes, size: published.size, sha256: published.sha256 };
210
323
  }
211
- function createNativePackaging(options) {
212
- const input = OptionsSchema.parse(options);
324
+ function installedPackage() {
325
+ const root = installedPackageRoot();
326
+ const published = NativeAssetManifestSchema.parse(JSON.parse(readFileSync2(resolve(root, "native-assets.json"), "utf8")));
327
+ const manifest = PackageManifestSchema.parse(JSON.parse(readFileSync2(resolve(root, "package.json"), "utf8")));
328
+ return {
329
+ root,
330
+ published,
331
+ version: manifest.version,
332
+ loaderPath: resolve(root, published.loader),
333
+ loaderName: published.loader
334
+ };
335
+ }
336
+ function embedNative(input) {
337
+ const resolved = resolveTargets(input.platform, [input.architecture]);
338
+ if ("refusal" in resolved)
339
+ return resolved.refusal;
340
+ const [architecture] = resolved.targets;
341
+ const installed = installedPackage();
342
+ const verified = readVerifiedAsset(installed.root, installed.published.assets[architecture], input.platform, architecture);
343
+ if ("refusal" in verified)
344
+ return verified.refusal;
345
+ const { sourcePath, bytes, size, sha256 } = verified;
346
+ return {
347
+ state: "ready",
348
+ platform: "darwin",
349
+ architecture,
350
+ packageVersion: installed.version,
351
+ assets: [{ size, sha256, bytes }],
352
+ plugin: nativePlugin(installed, { [architecture]: sourcePath }, new Map([[sourcePath, new Uint8Array(bytes)]]), undefined)
353
+ };
354
+ }
355
+ function packageCompanion(input) {
213
356
  const declared = typeof input.architecture === "string" ? [input.architecture] : input.architecture;
214
357
  const resolved = resolveTargets(input.platform, declared);
215
358
  if ("refusal" in resolved)
216
359
  return resolved.refusal;
217
360
  const architectures = resolved.targets;
218
- const root = installedPackageRoot();
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);
361
+ const installed = installedPackage();
222
362
  const assets = [];
223
363
  const specifiers = {};
224
- const embedded = new Map;
225
364
  for (const architecture of architectures) {
226
365
  const template = typeof input.assetPath === "string" ? input.assetPath : input.assetPath[architecture];
227
366
  if (!template)
228
367
  throw new Error("Declared architecture has no output path");
229
- const verified = readVerifiedAsset(root, published.assets[architecture], input.platform, architecture);
368
+ const verified = readVerifiedAsset(installed.root, installed.published.assets[architecture], input.platform, architecture);
230
369
  if ("refusal" in verified)
231
370
  return verified.refusal;
232
- const { sourcePath, bytes, size, sha256 } = verified;
371
+ const { size, sha256, bytes } = verified;
233
372
  const outputPath = template.replaceAll(ASSET_HASH_TOKEN, sha256.slice(0, ASSET_HASH_LENGTH));
234
373
  if (assets.some((asset) => asset.outputPath === outputPath))
235
374
  throw new Error("Addons must have distinct output paths");
236
- if (input.delivery === "embedded")
237
- embedded.set(sourcePath, new Uint8Array(bytes));
238
- const outputSpecifier = relative(dirname(input.entryPath), outputPath).split("\\").join("/");
239
- specifiers[architecture] = input.delivery === "embedded" ? sourcePath : outputSpecifier.startsWith(".") ? outputSpecifier : `./${outputSpecifier}`;
375
+ const specifier = relative(dirname(input.entryPath), outputPath).split("\\").join("/");
376
+ specifiers[architecture] = specifier.startsWith(".") ? specifier : `./${specifier}`;
240
377
  const asset = { outputPath, size, sha256, bytes };
241
378
  assets.push(typeof input.architecture === "string" ? asset : { ...asset, architecture });
242
379
  }
243
- const contents = nativeLoaderSource(specifiers, "static");
244
- const external = new Set(Object.values(specifiers));
245
380
  return {
246
381
  state: "ready",
247
382
  platform: "darwin",
248
383
  architecture: typeof input.architecture === "string" ? architectures[0] : architectures,
249
- packageVersion: manifest.version,
384
+ packageVersion: installed.version,
250
385
  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
- }
386
+ plugin: nativePlugin(installed, specifiers, new Map, input.entryPath)
275
387
  };
276
388
  }
389
+ function createNativePackaging(options) {
390
+ return options.delivery === "embedded" ? embedNative(EmbeddedOptionsSchema.parse(options)) : packageCompanion(CompanionOptionsSchema.parse(options));
391
+ }
277
392
  export {
278
- createNativePackaging
393
+ createNativePackaging,
394
+ inspectNativeArtifact
279
395
  };
@@ -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-bh2ht9y5.js";
7
+ import"../index-t2bsd0hm.js";
5
8
  import {
6
- stagingPath,
7
- isAtomicStagingName2,
8
- sweepAtomicStaging2
9
- } from "../index-j4zh647a.js";
9
+ ExclusiveLockError2,
10
+ withExclusiveLock2
11
+ } from "../index-w9mqgnz9.js";
10
12
  import {
11
13
  ManagedFileError2,
12
14
  createManagedFileBoundary2
13
- } from "../index-w8etpm8j.js";
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-cazts87s.js";
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 {
@@ -11,7 +11,7 @@ export { createSessionScope, SessionExpiredError, type SessionOperation, type Se
11
11
  export { createSessionCredentials, type SessionCredentials, type SessionCredentialsConfig, } from '../browser/session-credentials.js';
12
12
  export type { RealtimeClient, RealtimeClientOptions, SocketEventMap, SocketIOClient, SocketIOClientConfig, SocketIOClientPeerLoaders, } from '../browser/socket-io.js';
13
13
  export { createRealtimeClient, createSocketIOClient } from '../browser/socket-io.js';
14
- export { type ParseNDJSONOptions, type ParseSSEOptions, parseNDJSON, parseSSE, } from '../browser/stream.js';
14
+ export { createNDJSONDecoder, type NDJSONDecoder, type ParseNDJSONOptions, type ParseSSEOptions, parseNDJSON, parseSSE, type StreamByteSource, StreamLineLimitError, StreamTruncatedLineError, } from '../browser/stream.js';
15
15
  export { type Backoff, type BackoffPolicy, BackoffPolicySchema, createBackoff, } from '../internal/backoff.js';
16
16
  export type { StitchLogger } from '../internal/logger.js';
17
17
  export { formatZodError, type ZodIssueSummary, zodIssues } from '../internal/zod-issues.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/entrypoints/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EACL,KAA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AAkB,EAClB,mBAAmB,EACnB,KAAK,gBAAgB,EACrB,KAAK,YAAY,GAClB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,wBAAwB,EACxB,KAAK,kBAAkB,EACvB,KAAK,wBAAwB,GAC9B,MAAM,gCAAgC,CAAC;AACxC,YAAY,EACV,cAAc,EACd,qBAAqB,EACrB,cAAc,EACd,cAAc,EACd,oBAAoB,EACpB,yBAAyB,GAC1B,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAClF,OAAO,EACL,mBAAmB,EACnB,KAAK,aAAa,EAClB,KAAK,kBAAkB,EACvB,KAAK,eAAe,EACpB,WAAW,EACX,QAAQ,EACR,KAAK,gBAAgB,EACrB,oBAAoB,EACpB,wBAAwB,GACzB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,KAAK,OAAO,EACZ,KAAK,aAAa,EAClB,mBAAmB,EACnB,aAAa,GACd,MAAM,qBAAqB,CAAC;AAC7B,YAAY,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAKvD,OAAO,EAAE,cAAc,EAAE,KAAK,eAAe,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAGzF,OAAO,EACL,SAAS,EACT,kBAAkB,EAClB,iBAAiB,EACjB,gBAAgB,EAChB,KAAK,YAAY,GAClB,MAAM,wBAAwB,CAAC;AAChC,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC"}
@@ -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-n1nszyk0.js";
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-pzb63z66.js";
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-x7w1z6pf.js";
47
+ } from "../index-q4hjtyye.js";
86
48
  import {
87
49
  ManagedFilePathSchema2,
88
50
  ManagedFileRefSchema2
@@ -90,12 +52,34 @@ 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
+ StreamLineLimitError2,
62
+ StreamTruncatedLineError2,
63
+ parseNDJSON2,
64
+ createNDJSONDecoder2,
65
+ parseSSE2,
66
+ contractEndpointMatchers2,
67
+ createClient2,
68
+ createClients2,
69
+ createScopedClients2,
70
+ createUrlBuilder2,
71
+ createUrlBuilders2,
72
+ createScopedUrlBuilders2
73
+ } from "../index-p5kx5vqd.js";
93
74
  import {
94
75
  isModuleNotFound
95
76
  } from "../index-srs8hj9c.js";
96
77
  import {
97
78
  withDeadline
98
79
  } from "../index-9tqbxv5p.js";
80
+ import {
81
+ ApiError2
82
+ } from "../index-kfjkb396.js";
99
83
  import {
100
84
  sleep
101
85
  } from "../index-eemvahkc.js";
@@ -103,6 +87,25 @@ import {
103
87
  zodIssues2,
104
88
  formatZodError2
105
89
  } from "../index-1eeqpadm.js";
90
+ import {
91
+ AppError2,
92
+ notFound2,
93
+ badRequest2,
94
+ unauthorized2,
95
+ forbidden2,
96
+ conflict2,
97
+ rateLimited2,
98
+ STITCH_ERROR_STATUS2,
99
+ isRetryableStatus2,
100
+ isStitchErrorCode2,
101
+ appError2
102
+ } from "../index-j9gxbztg.js";
103
+ import {
104
+ createTraceContext2,
105
+ parseTraceparent2,
106
+ formatTraceparent2,
107
+ childSpan2
108
+ } from "../index-yex7eg1v.js";
106
109
  // src/browser/chunked-upload.ts
107
110
  function isRetryableUploadFailure(error) {
108
111
  if (ApiError2.is(error)) {
@@ -764,6 +767,8 @@ export {
764
767
  RealtimeRequestTimeoutError2 as RealtimeRequestTimeoutError,
765
768
  STITCH_ERROR_STATUS2 as STITCH_ERROR_STATUS,
766
769
  SessionExpiredError,
770
+ StreamLineLimitError2 as StreamLineLimitError,
771
+ StreamTruncatedLineError2 as StreamTruncatedLineError,
767
772
  TOOL_TRANSPORTS2 as TOOL_TRANSPORTS,
768
773
  appError2 as appError,
769
774
  asRealtimeRejection2 as asRealtimeRejection,
@@ -778,6 +783,7 @@ export {
778
783
  createContractFactory2 as createContractFactory,
779
784
  createHttpClient2 as createHttpClient,
780
785
  createLiveStateController2 as createLiveStateController,
786
+ createNDJSONDecoder2 as createNDJSONDecoder,
781
787
  createRealtimeClient,
782
788
  createRetainedTopics,
783
789
  createScopedClients2 as createScopedClients,
@@ -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-m38ej7e5.js";
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-x7w1z6pf.js";
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-z23rfxhj.js";
28
+ } from "../index-xmgjtkvr.js";
41
29
  import {
42
30
  createMultipartStream2,
43
31
  implement2,
44
32
  createImplement2,
45
33
  createScopedImplement2
46
- } from "../index-cmzvhhtd.js";
47
- import"../index-7n68nmc6.js";
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-rpzewktb.js";
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-7n68nmc6.js";
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";