stitchkit 0.106.0 → 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.
Files changed (98) hide show
  1. package/CHANGELOG.md +65 -0
  2. package/darwin-native.cjs +16 -4
  3. package/dist/agent-runtime/deferred-tool-types.d.ts +6 -27
  4. package/dist/agent-runtime/deferred-tool-types.d.ts.map +1 -1
  5. package/dist/entrypoints/agent-runtime/browser.js +2 -3
  6. package/dist/entrypoints/agent-runtime/coding-tools.js +6 -8
  7. package/dist/entrypoints/agent-runtime/harness.js +7 -11
  8. package/dist/entrypoints/agent-runtime/realtime.js +2 -3
  9. package/dist/entrypoints/agent-runtime/sandbox.js +6 -8
  10. package/dist/entrypoints/agent-runtime.d.ts +2 -1
  11. package/dist/entrypoints/agent-runtime.d.ts.map +1 -1
  12. package/dist/entrypoints/agent-runtime.js +20 -23
  13. package/dist/entrypoints/application/diagnostic-journal.js +3 -3
  14. package/dist/entrypoints/application/directory-inbox.js +8 -9
  15. package/dist/entrypoints/application/grammy.js +3 -3
  16. package/dist/entrypoints/application.js +7 -8
  17. package/dist/entrypoints/cli/publish.js +10 -11
  18. package/dist/entrypoints/cli.js +12 -16
  19. package/dist/entrypoints/contract.js +1 -1
  20. package/dist/entrypoints/files/packaging.d.ts +1 -1
  21. package/dist/entrypoints/files/packaging.d.ts.map +1 -1
  22. package/dist/entrypoints/files/packaging.js +99 -47
  23. package/dist/entrypoints/files.js +16 -16
  24. package/dist/entrypoints/index.js +41 -41
  25. package/dist/entrypoints/node.js +27 -29
  26. package/dist/entrypoints/observability.js +10 -12
  27. package/dist/entrypoints/process.js +2 -2
  28. package/dist/entrypoints/react.js +3 -4
  29. package/dist/entrypoints/remote.js +8 -9
  30. package/dist/entrypoints/server.js +48 -51
  31. package/dist/entrypoints/telegram/html.js +3 -3
  32. package/dist/entrypoints/telegram/screens.js +5 -5
  33. package/dist/entrypoints/telegram.js +9 -10
  34. package/dist/entrypoints/testing.js +8 -11
  35. package/dist/entrypoints/tools/connections.js +11 -11
  36. package/dist/entrypoints/tools/invoker.js +5 -9
  37. package/dist/entrypoints/tools/mcp.js +8 -14
  38. package/dist/entrypoints/tools.js +19 -25
  39. package/dist/entrypoints/tracking.js +3 -3
  40. package/dist/files/native-packaging-layout.d.ts +6 -2
  41. package/dist/files/native-packaging-layout.d.ts.map +1 -1
  42. package/dist/files/native-packaging.d.ts +45 -10
  43. package/dist/files/native-packaging.d.ts.map +1 -1
  44. package/dist/{index-v5ee8ath.js → index-1h2zv8rx.js} +10 -40
  45. package/dist/index-2kbysk9s.js +42 -0
  46. package/dist/{index-wbhdzxar.js → index-2s6fpehp.js} +5 -5
  47. package/dist/{index-4vsby8n8.js → index-4f37d3bg.js} +1 -1
  48. package/dist/{index-ksfagmyz.js → index-4qh90tyw.js} +8 -8
  49. package/dist/{index-yvfk3y36.js → index-636mggad.js} +4 -3
  50. package/dist/{index-f199nfq5.js → index-6y9t2fwz.js} +7 -7
  51. package/dist/{index-azx12jgv.js → index-7r74re56.js} +1 -1
  52. package/dist/{index-w8etpm8j.js → index-9j2atjte.js} +1 -1
  53. package/dist/{index-dsnjzb62.js → index-bnf8s6v3.js} +1 -1
  54. package/dist/{index-pz3y6b6g.js → index-cx2nh595.js} +3 -3
  55. package/dist/{index-2k91mewf.js → index-dm2fv45z.js} +9 -9
  56. package/dist/{index-9bskshe3.js → index-dwf0gymy.js} +10 -10
  57. package/dist/{index-qaqbdm7s.js → index-h7qms8f9.js} +8 -8
  58. package/dist/{index-drs41arz.js → index-ktjmgq9p.js} +1 -1
  59. package/dist/{index-1ptj98e0.js → index-mbf4h8kp.js} +2 -2
  60. package/dist/{index-916yh4e2.js → index-mep4sb48.js} +14 -14
  61. package/dist/{index-wdy68sh6.js → index-njs9gvrh.js} +17 -17
  62. package/dist/{index-sj28htvf.js → index-pvh3z03x.js} +1 -1
  63. package/dist/{index-r393tnfp.js → index-q6crhe1n.js} +4 -4
  64. package/dist/{index-z23rfxhj.js → index-xmgjtkvr.js} +1 -1
  65. package/dist/{index-gr5g3xfw.js → index-yz8x0hbx.js} +1 -1
  66. package/dist/{index-gxm9rc97.js → index-zrtrjkbf.js} +1 -1
  67. package/dist/{index-1pwwan01.js → index-zsqt5q98.js} +5 -5
  68. package/dist/internal/darwin-binding-error.d.ts +9 -1
  69. package/dist/internal/darwin-binding-error.d.ts.map +1 -1
  70. package/dist/internal/darwin-binding.d.ts.map +1 -1
  71. package/dist/process/contract.d.ts +4 -2
  72. package/dist/process/contract.d.ts.map +1 -1
  73. package/dist/tools/internal/surface-projector.d.ts +0 -7
  74. package/dist/tools/internal/surface-projector.d.ts.map +1 -1
  75. package/dist/tools/runtime-tool-declaration.d.ts +11 -0
  76. package/dist/tools/runtime-tool-declaration.d.ts.map +1 -1
  77. package/dist/tools/runtime-tool.d.ts +2 -3
  78. package/dist/tools/runtime-tool.d.ts.map +1 -1
  79. package/llms/files-packaging.txt +10 -6
  80. package/llms/process.txt +64 -20
  81. package/llms/stitchkit.txt +3 -3
  82. package/llms/{upgrading-0.37.0-0.53.0.txt → upgrading-0.37.0-0.58.0.txt} +209 -3
  83. package/llms/{upgrading-0.55.0-0.68.0.txt → upgrading-0.59.0-0.71.0.txt} +149 -209
  84. package/llms/{upgrading-0.69.0-0.95.0.txt → upgrading-0.72.0-0.97.0.txt} +76 -149
  85. package/llms/{upgrading-0.96.0-0.106.0.txt → upgrading-0.98.0-0.107.0.txt} +56 -83
  86. package/llms/upgrading.txt +4 -4
  87. package/llms-full.txt +130 -36
  88. package/llms.txt +6 -6
  89. package/package.json +4 -3
  90. package/dist/{index-cazts87s.js → index-07dcf2yn.js} +3 -3
  91. package/dist/{index-n1nszyk0.js → index-7jvwrjqa.js} +3 -3
  92. package/dist/{index-cmzvhhtd.js → index-85qve8mq.js} +3 -3
  93. package/dist/{index-rpzewktb.js → index-fynr93w4.js} +3 -3
  94. package/dist/{index-37asdw3a.js → index-k7qdkh3n.js} +3 -3
  95. package/dist/{index-x7w1z6pf.js → index-q4hjtyye.js} +4 -4
  96. package/dist/{index-7n68nmc6.js → index-y3nemndz.js} +3 -3
  97. package/dist/{index-12zsej7b.js → index-y70v24cw.js} +3 -3
  98. package/dist/{index-pzb63z66.js → index-ykdcnq1f.js} +3 -3
@@ -1,14 +1,14 @@
1
- // src/internal/darwin-binding.ts
2
- import loadDarwinAddon from "#stitchkit-darwin-native";
3
-
4
1
  // src/internal/darwin-binding-error.ts
2
+ var NATIVE_NOT_PACKAGED = "STITCHKIT_NATIVE_NOT_PACKAGED";
5
3
  var messages = {
6
4
  architecture: "The packaged Darwin backend does not support this architecture",
5
+ packaging: "The Darwin backend is not packaged into this bundle: build it with createNativePackaging from stitchkit/files/packaging",
7
6
  resolve: "The packaged Darwin backend is missing",
8
7
  load: "The packaged Darwin backend could not be loaded",
9
8
  surface: "The packaged Darwin backend has an invalid surface"
10
9
  };
11
10
  var nativeCodes = new Set([
11
+ NATIVE_NOT_PACKAGED,
12
12
  "MODULE_NOT_FOUND",
13
13
  "ERR_MODULE_NOT_FOUND",
14
14
  "ERR_DLOPEN_FAILED",
@@ -28,6 +28,12 @@ function darwinNativeCode(cause) {
28
28
  }
29
29
  return;
30
30
  }
31
+ function darwinLoadStage(cause) {
32
+ const code = darwinNativeCode(cause);
33
+ if (code === NATIVE_NOT_PACKAGED)
34
+ return "packaging";
35
+ return code === "MODULE_NOT_FOUND" || code === "ERR_MODULE_NOT_FOUND" || code === "ENOENT" ? "resolve" : "load";
36
+ }
31
37
 
32
38
  class DarwinBackendError extends Error {
33
39
  stage;
@@ -49,40 +55,4 @@ class DarwinBackendError extends Error {
49
55
  }
50
56
  }
51
57
 
52
- // src/internal/darwin-binding.ts
53
- function hasFunctions(value, names) {
54
- return typeof value === "object" && value !== null && names.every((name) => typeof Reflect.get(value, name) === "function");
55
- }
56
- var darwinBinding;
57
- function loadDarwinBinding() {
58
- if (darwinBinding)
59
- return darwinBinding;
60
- if (process.arch !== "arm64" && process.arch !== "x64") {
61
- throw new DarwinBackendError("architecture");
62
- }
63
- let loaded;
64
- try {
65
- loaded = loadDarwinAddon();
66
- } catch (cause) {
67
- const code = darwinNativeCode(cause);
68
- throw new DarwinBackendError(code === "MODULE_NOT_FOUND" || code === "ERR_MODULE_NOT_FOUND" || code === "ENOENT" ? "resolve" : "load", cause);
69
- }
70
- const methods = [
71
- "openDirectoryAt",
72
- "openFileAt",
73
- "createFileAt",
74
- "createDirectoryAt",
75
- "statAt",
76
- "listAt",
77
- "renameAt",
78
- "unlinkAt",
79
- "processIdentity"
80
- ];
81
- if (!hasFunctions(loaded, methods)) {
82
- throw new DarwinBackendError("surface");
83
- }
84
- darwinBinding = loaded;
85
- return darwinBinding;
86
- }
87
-
88
- export { loadDarwinBinding };
58
+ export { NATIVE_NOT_PACKAGED, darwinLoadStage, DarwinBackendError };
@@ -0,0 +1,42 @@
1
+ import {
2
+ darwinLoadStage,
3
+ DarwinBackendError
4
+ } from "./index-1h2zv8rx.js";
5
+
6
+ // src/internal/darwin-binding.ts
7
+ import loadDarwinAddon from "#stitchkit-darwin-native";
8
+ function hasFunctions(value, names) {
9
+ return typeof value === "object" && value !== null && names.every((name) => typeof Reflect.get(value, name) === "function");
10
+ }
11
+ var darwinBinding;
12
+ function loadDarwinBinding() {
13
+ if (darwinBinding)
14
+ return darwinBinding;
15
+ if (process.arch !== "arm64" && process.arch !== "x64") {
16
+ throw new DarwinBackendError("architecture");
17
+ }
18
+ let loaded;
19
+ try {
20
+ loaded = loadDarwinAddon();
21
+ } catch (cause) {
22
+ throw new DarwinBackendError(darwinLoadStage(cause), cause);
23
+ }
24
+ const methods = [
25
+ "openDirectoryAt",
26
+ "openFileAt",
27
+ "createFileAt",
28
+ "createDirectoryAt",
29
+ "statAt",
30
+ "listAt",
31
+ "renameAt",
32
+ "unlinkAt",
33
+ "processIdentity"
34
+ ];
35
+ if (!hasFunctions(loaded, methods)) {
36
+ throw new DarwinBackendError("surface");
37
+ }
38
+ darwinBinding = loaded;
39
+ return darwinBinding;
40
+ }
41
+
42
+ export { loadDarwinBinding };
@@ -1,16 +1,16 @@
1
- import {
2
- isRetryableStatus2
3
- } from "./index-j9gxbztg.js";
4
1
  import {
5
2
  rebuildObject,
6
3
  mergeSchemas,
7
4
  assertToolExtensionCompatible,
8
5
  projectToolSurface
9
- } from "./index-r393tnfp.js";
6
+ } from "./index-q6crhe1n.js";
10
7
  import {
11
8
  toolErrorFromResult,
12
9
  executeToolMethod
13
- } from "./index-2k91mewf.js";
10
+ } from "./index-dm2fv45z.js";
11
+ import {
12
+ isRetryableStatus2
13
+ } from "./index-j9gxbztg.js";
14
14
 
15
15
  // src/tools/mount.ts
16
16
  import { z } from "zod";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  attemptExclusiveLock
3
- } from "./index-dsnjzb62.js";
3
+ } from "./index-bnf8s6v3.js";
4
4
  import {
5
5
  sleep
6
6
  } from "./index-eemvahkc.js";
@@ -1,10 +1,6 @@
1
1
  import {
2
2
  validateDeclaredOutput
3
- } from "./index-rpzewktb.js";
4
- import {
5
- toolResultFromError,
6
- toolErrorFromResult
7
- } from "./index-2k91mewf.js";
3
+ } from "./index-fynr93w4.js";
8
4
  import {
9
5
  coerceJsonArgs2
10
6
  } from "./index-6yxhe58g.js";
@@ -15,11 +11,15 @@ import {
15
11
  objectShapeKeys,
16
12
  assertUniqueToolName,
17
13
  buildToolPresentationSchema
18
- } from "./index-r393tnfp.js";
14
+ } from "./index-q6crhe1n.js";
15
+ import {
16
+ toolResultFromError,
17
+ toolErrorFromResult
18
+ } from "./index-dm2fv45z.js";
19
19
  import {
20
20
  createToolRunner,
21
21
  formatToolError
22
- } from "./index-wbhdzxar.js";
22
+ } from "./index-2s6fpehp.js";
23
23
  import {
24
24
  fetchGuarded,
25
25
  readCapped
@@ -32,7 +32,7 @@ import {
32
32
  } from "./index-eemvahkc.js";
33
33
  import {
34
34
  collectToolSurface
35
- } from "./index-pz3y6b6g.js";
35
+ } from "./index-cx2nh595.js";
36
36
  import {
37
37
  formatZodError2
38
38
  } from "./index-1eeqpadm.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  projectRuntimeTool
3
- } from "./index-r393tnfp.js";
3
+ } from "./index-q6crhe1n.js";
4
4
  import {
5
5
  isRecord
6
6
  } from "./index-9jfdm5tg.js";
@@ -97,10 +97,11 @@ function executableAgentRuntimeTools(tools) {
97
97
  if (typeof tool.handler !== "function") {
98
98
  throw new TypeError(`Runtime tool "${tool.name}" must provide a handler`);
99
99
  }
100
- if (tool.present?.agent !== undefined && typeof tool.present.agent !== "function") {
100
+ const presenter = isRecord(tool.present) ? tool.present.agent : undefined;
101
+ if (presenter !== undefined && typeof presenter !== "function") {
101
102
  throw new TypeError(`Runtime tool "${tool.name}" Agent presenter must be a function`);
102
103
  }
103
- if (tool.present?.agent !== undefined && tool.output === undefined) {
104
+ if (presenter !== undefined && tool.output === undefined) {
104
105
  throw new TypeError(`Runtime tool "${tool.name}" Agent presenter requires an output schema`);
105
106
  }
106
107
  }
@@ -1,16 +1,16 @@
1
1
  import {
2
- AppError2
3
- } from "./index-j9gxbztg.js";
2
+ assertUniqueToolName
3
+ } from "./index-q6crhe1n.js";
4
4
  import {
5
5
  toolErrorFromResult
6
- } from "./index-2k91mewf.js";
7
- import {
8
- assertUniqueToolName
9
- } from "./index-r393tnfp.js";
6
+ } from "./index-dm2fv45z.js";
10
7
  import {
11
8
  collectTools2,
12
9
  createToolRunner
13
- } from "./index-wbhdzxar.js";
10
+ } from "./index-2s6fpehp.js";
11
+ import {
12
+ AppError2
13
+ } from "./index-j9gxbztg.js";
14
14
 
15
15
  // src/tools/invoker.ts
16
16
  function createToolInvoker2(services, config) {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  loadDarwinBinding
3
- } from "./index-v5ee8ath.js";
3
+ } from "./index-2kbysk9s.js";
4
4
  import {
5
5
  isRecord
6
6
  } from "./index-9jfdm5tg.js";
@@ -15,7 +15,7 @@ import {
15
15
  import {
16
16
  writeAllBytes,
17
17
  writeAtomicFileStaged
18
- } from "./index-cazts87s.js";
18
+ } from "./index-07dcf2yn.js";
19
19
  import {
20
20
  AtomicFilePublicationError2
21
21
  } from "./index-b56nnscm.js";
@@ -3,7 +3,7 @@ import {
3
3
  ProcessInstanceSchema2,
4
4
  readProcessInstance,
5
5
  probeProcessOwner2
6
- } from "./index-azx12jgv.js";
6
+ } from "./index-7r74re56.js";
7
7
  import {
8
8
  BoundedFileReadError,
9
9
  readBoundedFile
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  projectToolSurface
3
- } from "./index-r393tnfp.js";
3
+ } from "./index-q6crhe1n.js";
4
4
  import {
5
5
  contractToolMountable
6
- } from "./index-wbhdzxar.js";
6
+ } from "./index-2s6fpehp.js";
7
7
  import {
8
8
  runtimeToolMountable
9
- } from "./index-yvfk3y36.js";
9
+ } from "./index-636mggad.js";
10
10
 
11
11
  // src/tools/surface.ts
12
12
  function collectToolSurface({
@@ -1,13 +1,7 @@
1
- import {
2
- AppError2,
3
- STITCH_ERROR_STATUS2,
4
- isRetryableStatus2,
5
- isStitchErrorCode2
6
- } from "./index-j9gxbztg.js";
7
1
  import {
8
2
  normalizeError2,
9
3
  validateDeclaredOutput
10
- } from "./index-rpzewktb.js";
4
+ } from "./index-fynr93w4.js";
11
5
  import {
12
6
  coerceJsonArgs2
13
7
  } from "./index-6yxhe58g.js";
@@ -15,17 +9,23 @@ import {
15
9
  applyToolViewDefaults,
16
10
  projectToolView,
17
11
  objectShapeKeys
18
- } from "./index-r393tnfp.js";
12
+ } from "./index-q6crhe1n.js";
19
13
  import {
20
14
  projectedToolError
21
15
  } from "./index-556g5hsh.js";
22
16
  import {
23
17
  runWithRequestContext2,
24
18
  getRequestContext2
25
- } from "./index-7n68nmc6.js";
19
+ } from "./index-y3nemndz.js";
26
20
  import {
27
21
  formatZodError2
28
22
  } from "./index-1eeqpadm.js";
23
+ import {
24
+ AppError2,
25
+ STITCH_ERROR_STATUS2,
26
+ isRetryableStatus2,
27
+ isStitchErrorCode2
28
+ } from "./index-j9gxbztg.js";
29
29
  import {
30
30
  isUnsafeKey
31
31
  } from "./index-zsarb5xp.js";
@@ -1,13 +1,6 @@
1
- import {
2
- forbidden2,
3
- conflict2
4
- } from "./index-j9gxbztg.js";
5
1
  import {
6
2
  loadDarwinBinding
7
- } from "./index-v5ee8ath.js";
8
- import {
9
- stagingName
10
- } from "./index-j4zh647a.js";
3
+ } from "./index-2kbysk9s.js";
11
4
  import {
12
5
  NativeCommandError2,
13
6
  CommandStopped,
@@ -33,10 +26,17 @@ import {
33
26
  openContainedParentFile,
34
27
  readContainedUtf8Handle,
35
28
  scanContainedFiles
36
- } from "./index-gxm9rc97.js";
29
+ } from "./index-zrtrjkbf.js";
30
+ import {
31
+ stagingName
32
+ } from "./index-j4zh647a.js";
37
33
  import {
38
34
  defineRuntimeTool2
39
- } from "./index-yvfk3y36.js";
35
+ } from "./index-636mggad.js";
36
+ import {
37
+ forbidden2,
38
+ conflict2
39
+ } from "./index-j9gxbztg.js";
40
40
 
41
41
  // src/agent-runtime/coding-tool-contract.ts
42
42
  import { z } from "zod";
@@ -1,22 +1,22 @@
1
- import {
2
- AgentToolError2,
3
- resolveToolDurability
4
- } from "./index-c17xcx4k.js";
5
1
  import {
6
2
  toolResultFromError,
7
3
  toolCauseFromResult,
8
4
  isToolExecutionControlError2
9
- } from "./index-2k91mewf.js";
5
+ } from "./index-dm2fv45z.js";
10
6
  import {
11
7
  createToolRunner,
12
8
  formatToolError
13
- } from "./index-wbhdzxar.js";
9
+ } from "./index-2s6fpehp.js";
10
+ import {
11
+ AgentToolError2,
12
+ resolveToolDurability
13
+ } from "./index-c17xcx4k.js";
14
14
  import {
15
15
  collectToolSurface
16
- } from "./index-pz3y6b6g.js";
16
+ } from "./index-cx2nh595.js";
17
17
  import {
18
18
  agentPresenterOf
19
- } from "./index-yvfk3y36.js";
19
+ } from "./index-636mggad.js";
20
20
  import {
21
21
  isRecord
22
22
  } from "./index-9jfdm5tg.js";
@@ -11,7 +11,7 @@ import {
11
11
  } from "./index-b0kddvzw.js";
12
12
  import {
13
13
  writeFileAtomicSync2
14
- } from "./index-cazts87s.js";
14
+ } from "./index-07dcf2yn.js";
15
15
  import {
16
16
  assertPositiveSafeInteger
17
17
  } from "./index-0s4xebbg.js";
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  withExclusiveLock2
3
- } from "./index-4vsby8n8.js";
3
+ } from "./index-4f37d3bg.js";
4
4
  import {
5
5
  readBoundedFile
6
6
  } from "./index-m616f0yz.js";
7
7
  import {
8
8
  writeAtomicFileData
9
- } from "./index-cazts87s.js";
9
+ } from "./index-07dcf2yn.js";
10
10
  import {
11
11
  publishAtomicFile
12
12
  } from "./index-b56nnscm.js";
@@ -1,12 +1,6 @@
1
1
  import {
2
2
  toJsonSchema
3
3
  } from "./index-ct75c3at.js";
4
- import {
5
- AppError2
6
- } from "./index-j9gxbztg.js";
7
- import {
8
- resolvePropagationContext2
9
- } from "./index-yex7eg1v.js";
10
4
  import {
11
5
  toolSurfaceOutputSchema,
12
6
  staticInputRounds,
@@ -14,23 +8,20 @@ import {
14
8
  validateResolvedInputRounds,
15
9
  presentationMetadata,
16
10
  prepareProjectedMcpTools
17
- } from "./index-r393tnfp.js";
11
+ } from "./index-q6crhe1n.js";
18
12
  import {
19
13
  parseToolCallArguments,
20
14
  toolResultFromError,
21
15
  observed
22
- } from "./index-2k91mewf.js";
16
+ } from "./index-dm2fv45z.js";
23
17
  import {
24
18
  collectTools2,
25
19
  createToolRunner,
26
20
  formatToolError
27
- } from "./index-wbhdzxar.js";
28
- import {
29
- redact2
30
- } from "./index-e6c2spsd.js";
21
+ } from "./index-2s6fpehp.js";
31
22
  import {
32
23
  collectToolSurface
33
- } from "./index-pz3y6b6g.js";
24
+ } from "./index-cx2nh595.js";
34
25
  import {
35
26
  DEFAULT_CORS_ALLOW_HEADERS2,
36
27
  DEFAULT_PROCESS_SIGNALS,
@@ -38,17 +29,26 @@ import {
38
29
  reportSignalError,
39
30
  guardSignalCallback
40
31
  } from "./index-yk4g8805.js";
32
+ import {
33
+ redact2
34
+ } from "./index-e6c2spsd.js";
41
35
  import {
42
36
  argumentsDigest
43
37
  } from "./index-r7a7r7ha.js";
44
38
  import {
45
39
  runWithRequestContext2,
46
40
  getRequestContext2
47
- } from "./index-7n68nmc6.js";
41
+ } from "./index-y3nemndz.js";
42
+ import {
43
+ AppError2
44
+ } from "./index-j9gxbztg.js";
48
45
  import {
49
46
  compareCodeUnits,
50
47
  serializeCanonicalJson
51
48
  } from "./index-zsvzhjtk.js";
49
+ import {
50
+ resolvePropagationContext2
51
+ } from "./index-yex7eg1v.js";
52
52
  import {
53
53
  isRecord
54
54
  } from "./index-9jfdm5tg.js";
@@ -1,23 +1,9 @@
1
- import {
2
- AppError2,
3
- badRequest2,
4
- forbidden2
5
- } from "./index-j9gxbztg.js";
6
- import {
7
- isStreamCancellation,
8
- ownHttpStream,
9
- settleStreamCleanup,
10
- ShutdownOptionsSchema2
11
- } from "./index-q0th8q0z.js";
12
1
  import {
13
2
  errorCode2,
14
3
  recordedErrorMessage,
15
4
  normalizeError2,
16
5
  validateDeclaredOutput
17
- } from "./index-rpzewktb.js";
18
- import {
19
- resolveTraceContext2
20
- } from "./index-yex7eg1v.js";
6
+ } from "./index-fynr93w4.js";
21
7
  import {
22
8
  DEFAULT_CONTRACT_STREAM_FRAME_BYTES2
23
9
  } from "./index-h2fhjqy7.js";
@@ -25,6 +11,12 @@ import {
25
11
  joinRoutePath,
26
12
  parseTrailingWildcard
27
13
  } from "./index-m38ej7e5.js";
14
+ import {
15
+ isStreamCancellation,
16
+ ownHttpStream,
17
+ settleStreamCleanup,
18
+ ShutdownOptionsSchema2
19
+ } from "./index-q0th8q0z.js";
28
20
  import {
29
21
  RELEASE_HEADER2
30
22
  } from "./index-n15jny5b.js";
@@ -34,7 +26,7 @@ import {
34
26
  import {
35
27
  bindContract,
36
28
  mediaTypeEssence
37
- } from "./index-cmzvhhtd.js";
29
+ } from "./index-85qve8mq.js";
38
30
  import {
39
31
  assertPositiveSafeInteger
40
32
  } from "./index-0s4xebbg.js";
@@ -54,7 +46,7 @@ import {
54
46
  getRequestContext2,
55
47
  setRequestEndpoint2,
56
48
  setRequestError2
57
- } from "./index-7n68nmc6.js";
49
+ } from "./index-y3nemndz.js";
58
50
  import {
59
51
  resolveTraceId2,
60
52
  resolveSocketIp2,
@@ -62,6 +54,14 @@ import {
62
54
  getClientInfo2,
63
55
  parseQueryParams
64
56
  } from "./index-kw1ws0cs.js";
57
+ import {
58
+ AppError2,
59
+ badRequest2,
60
+ forbidden2
61
+ } from "./index-j9gxbztg.js";
62
+ import {
63
+ resolveTraceContext2
64
+ } from "./index-yex7eg1v.js";
65
65
  import {
66
66
  isUnsafeKey,
67
67
  safeJsonParse
@@ -2,7 +2,7 @@ import {
2
2
  parseRealtimeRequestArguments,
3
3
  parseRealtimeRequestAcknowledgement,
4
4
  createValidatedRealtimeSocket
5
- } from "./index-pzb63z66.js";
5
+ } from "./index-ykdcnq1f.js";
6
6
  import {
7
7
  randomHex
8
8
  } from "./index-c9d05kvt.js";
@@ -1,12 +1,12 @@
1
- import {
2
- AppError2
3
- } from "./index-j9gxbztg.js";
4
1
  import {
5
2
  validateDeclaredOutput
6
- } from "./index-rpzewktb.js";
3
+ } from "./index-fynr93w4.js";
7
4
  import {
8
5
  toJsonSchema
9
6
  } from "./index-ct75c3at.js";
7
+ import {
8
+ AppError2
9
+ } from "./index-j9gxbztg.js";
10
10
  import {
11
11
  serializeCanonicalJson
12
12
  } from "./index-zsvzhjtk.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  createValidatedRealtimeSocket
3
- } from "./index-pzb63z66.js";
3
+ } from "./index-ykdcnq1f.js";
4
4
 
5
5
  // src/server/realtime.ts
6
6
  function bindRealtimeServer2(contract, handle, options = {}) {
@@ -14,7 +14,7 @@ import {
14
14
  import {
15
15
  ToolExecutionControlError2,
16
16
  isToolExecutionControlError2
17
- } from "./index-2k91mewf.js";
17
+ } from "./index-dm2fv45z.js";
18
18
  import {
19
19
  agentDurableEventId2
20
20
  } from "./index-mnkk1ffz.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  loadDarwinBinding
3
- } from "./index-v5ee8ath.js";
3
+ } from "./index-2kbysk9s.js";
4
4
 
5
5
  // src/agent-runtime/contained-scan.ts
6
6
  import path2 from "node:path";
@@ -1,7 +1,3 @@
1
- import {
2
- ApiError2,
3
- refuseLocally
4
- } from "./index-kfjkb396.js";
5
1
  import {
6
2
  parseTrailingWildcard
7
3
  } from "./index-m38ej7e5.js";
@@ -17,10 +13,14 @@ import {
17
13
  uploadProgressRoute,
18
14
  withUploadProgress,
19
15
  parseApiErrorBody
20
- } from "./index-n1nszyk0.js";
16
+ } from "./index-7jvwrjqa.js";
21
17
  import {
22
18
  inputIsQuery
23
19
  } from "./index-xhzq2qvj.js";
20
+ import {
21
+ ApiError2,
22
+ refuseLocally
23
+ } from "./index-kfjkb396.js";
24
24
  import {
25
25
  assertPositiveSafeInteger
26
26
  } from "./index-0s4xebbg.js";
@@ -1,11 +1,19 @@
1
+ /** Error code of a generated beside-loader that runs inside a bundle built without the packaging plugin. */
2
+ export declare const NATIVE_NOT_PACKAGED = "STITCHKIT_NATIVE_NOT_PACKAGED";
1
3
  declare const messages: {
2
4
  architecture: string;
5
+ packaging: string;
3
6
  resolve: string;
4
7
  load: string;
5
8
  surface: string;
6
9
  };
7
10
  type Stage = keyof typeof messages;
8
11
  export declare function darwinNativeCode(cause: unknown): string | undefined;
12
+ /**
13
+ * Which stage a failed addon load stopped at: a bundle built without the packaging plugin, an
14
+ * addon that is not where the loader looked, or one that was found and did not load.
15
+ */
16
+ export declare function darwinLoadStage(cause: unknown): 'packaging' | 'resolve' | 'load';
9
17
  /** Live callers retain the original Error; operator JSON only carries safe loader evidence. */
10
18
  export declare class DarwinBackendError extends Error {
11
19
  readonly stage: Stage;
@@ -14,7 +22,7 @@ export declare class DarwinBackendError extends Error {
14
22
  toJSON(): {
15
23
  name: string;
16
24
  code: string;
17
- stage: "architecture" | "load" | "resolve" | "surface";
25
+ stage: "architecture" | "load" | "packaging" | "resolve" | "surface";
18
26
  architecture: NodeJS.Architecture;
19
27
  message: string;
20
28
  nativeCode: string | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"darwin-binding-error.d.ts","sourceRoot":"","sources":["../../src/internal/darwin-binding-error.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,QAAQ;IACZ,YAAY;IACZ,OAAO;IACP,IAAI;IACJ,OAAO;CACR,CAAC;AACF,KAAK,KAAK,GAAG,MAAM,OAAO,QAAQ,CAAC;AAYnC,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CAanE;AAED,+FAA+F;AAC/F,qBAAa,kBAAmB,SAAQ,KAAK;IAGzC,QAAQ,CAAC,KAAK,EAAE,KAAK;IAFvB,QAAQ,CAAC,IAAI,gCAAgC;IAC7C,YACW,KAAK,EAAE,KAAK,EACrB,KAAK,CAAC,EAAE,OAAO,EAIhB;IACD,MAAM;;;;;;;MASL;CACF"}
1
+ {"version":3,"file":"darwin-binding-error.d.ts","sourceRoot":"","sources":["../../src/internal/darwin-binding-error.ts"],"names":[],"mappings":"AAAA,4GAA4G;AAC5G,eAAO,MAAM,mBAAmB,kCAAkC,CAAC;AAEnE,QAAA,MAAM,QAAQ;IACZ,YAAY;IACZ,SAAS;IAET,OAAO;IACP,IAAI;IACJ,OAAO;CACR,CAAC;AACF,KAAK,KAAK,GAAG,MAAM,OAAO,QAAQ,CAAC;AAanC,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CAanE;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,OAAO,GAAG,WAAW,GAAG,SAAS,GAAG,MAAM,CAMhF;AAED,+FAA+F;AAC/F,qBAAa,kBAAmB,SAAQ,KAAK;IAGzC,QAAQ,CAAC,KAAK,EAAE,KAAK;IA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