stitchkit 0.108.0 → 0.108.2

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 (34) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/dist/agent-runtime/sandbox-process-owner.d.ts +3 -3
  3. package/dist/agent-runtime/sandbox-process-owner.d.ts.map +1 -1
  4. package/dist/agent-runtime/sandbox-process.d.ts +2 -2
  5. package/dist/agent-runtime/sandbox-process.d.ts.map +1 -1
  6. package/dist/agent-runtime/store-conformance-support.d.ts +5 -5
  7. package/dist/entrypoints/agent-runtime/coding-tools.js +2 -2
  8. package/dist/entrypoints/agent-runtime/sandbox.js +2 -2
  9. package/dist/entrypoints/process.js +1 -1
  10. package/dist/{index-4q9jvqg7.js → index-k0kzhdw9.js} +550 -22
  11. package/dist/{index-dwf0gymy.js → index-vyaehh67.js} +1 -1
  12. package/dist/process/bun-child.d.ts +48 -0
  13. package/dist/process/bun-child.d.ts.map +1 -0
  14. package/dist/process/command-owner.d.ts +2 -2
  15. package/dist/process/command-owner.d.ts.map +1 -1
  16. package/dist/process/contract.d.ts +5 -0
  17. package/dist/process/contract.d.ts.map +1 -1
  18. package/dist/process/launch.d.ts +3 -3
  19. package/dist/process/launch.d.ts.map +1 -1
  20. package/dist/process/owned-child.d.ts +5 -1
  21. package/dist/process/owned-child.d.ts.map +1 -1
  22. package/dist/process/owner-loss-control.d.ts +15 -0
  23. package/dist/process/owner-loss-control.d.ts.map +1 -0
  24. package/dist/process/owner-loss-guard.d.ts +3 -0
  25. package/dist/process/owner-loss-guard.d.ts.map +1 -0
  26. package/dist/process/owner-loss-protocol.d.ts +10 -0
  27. package/dist/process/owner-loss-protocol.d.ts.map +1 -0
  28. package/dist/process/owner-loss-socket.d.ts +4 -0
  29. package/dist/process/owner-loss-socket.d.ts.map +1 -0
  30. package/llms/process.txt +25 -10
  31. package/llms/stitchkit.txt +1 -1
  32. package/llms-full.txt +26 -11
  33. package/llms.txt +1 -1
  34. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -15,6 +15,31 @@ additive**; the first breaking change landed in 0.10.0. Grep the file for
15
15
 
16
16
  ## [Unreleased]
17
17
 
18
+ ## [0.108.2] - 2026-10-09
19
+
20
+ ### Added
21
+
22
+ - `stitchkit/process` — `runNativeCommand` takes `ownerLoss: 'terminate'`: on Linux and Darwin under
23
+ Bun or Node, a package-owned per-command guard binds the command's process group to a private
24
+ inherited kernel channel. If the JavaScript caller is killed or crashes, channel EOF makes the
25
+ guard KILL its own group without polling, `finally` or PID reclamation. The option requires
26
+ `group: 'own'`; unsupported platforms refuse with `COMMAND_UNAVAILABLE`. It is opt-in because each
27
+ guarded call uses one extra short-lived process and descriptor. Output, stdin, target exit status,
28
+ deadlines and cancellation retain the existing contract; `onLeaderStarted` reports the guard that
29
+ leads the owned group. → ADR 0255
30
+
31
+ ## [0.108.1] - 2026-10-07
32
+
33
+ ### Fixed
34
+
35
+ - `stitchkit/process` — **under Bun, `runNativeCommand` no longer waits for its deadline on a command
36
+ that has already exited.** Bun's `node:child_process` can lose a child's `exit` event while the host
37
+ is heavily loaded inside `bun test` (a bare `spawn` of `sh -c 'echo x; exit 1'` received no event at
38
+ all in 4 of 30 parallel runs at load average ~90), so the call hung until `timeoutMs` and failed with
39
+ `Command deadline exceeded`. Under Bun a command is now launched through `Bun.spawn`, presented to the
40
+ command owner with the same events, streams, group ownership and failure reporting; Node still uses
41
+ `node:child_process`. The deadline, stop policy and process-group cleanup are unchanged.
42
+
18
43
  ## [0.108.0] - 2026-10-06
19
44
 
20
45
  ### ⚠️ Breaking changes
@@ -1,4 +1,4 @@
1
- import type { ChildProcessWithoutNullStreams } from 'node:child_process';
1
+ import type { OwnedChild } from '../process/bun-child.js';
2
2
  import type { AgentProcessSandbox } from './sandbox.js';
3
3
  /**
4
4
  * All entry paths share one command admission limit and one shutdown barrier.
@@ -11,9 +11,9 @@ import type { AgentProcessSandbox } from './sandbox.js';
11
11
  */
12
12
  export declare function sandboxProcessOwner(assertActive: () => void, maximum: number): {
13
13
  admit: () => void;
14
- track: (child: ChildProcessWithoutNullStreams) => void;
14
+ track: (child: OwnedChild) => void;
15
15
  readonly size: number;
16
- spawn(input: Parameters<AgentProcessSandbox['prepare']>[0]): ChildProcessWithoutNullStreams;
16
+ spawn(input: Parameters<AgentProcessSandbox['prepare']>[0]): OwnedChild;
17
17
  stop(): Promise<void>;
18
18
  };
19
19
  //# sourceMappingURL=sandbox-process-owner.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"sandbox-process-owner.d.ts","sourceRoot":"","sources":["../../src/agent-runtime/sandbox-process-owner.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,oBAAoB,CAAC;AAKzE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC;AAGrD;;;;;;;;GAQG;AACH,wBAAgB,mBAAmB,CAAC,YAAY,EAAE,MAAM,IAAI,EAAE,OAAO,EAAE,MAAM;;mBAarD,8BAA8B;;iBAsCrC,UAAU,CAAC,mBAAmB,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC;;EAqB7D"}
1
+ {"version":3,"file":"sandbox-process-owner.d.ts","sourceRoot":"","sources":["../../src/agent-runtime/sandbox-process-owner.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAKvD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC;AAGrD;;;;;;;;GAQG;AACH,wBAAgB,mBAAmB,CAAC,YAAY,EAAE,MAAM,IAAI,EAAE,OAAO,EAAE,MAAM;;mBAUrD,UAAU;;iBAsCjB,UAAU,CAAC,mBAAmB,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC;;EAqB7D"}
@@ -1,8 +1,8 @@
1
- import type { ChildProcessWithoutNullStreams } from 'node:child_process';
1
+ import type { OwnedChild } from '../process/bun-child.js';
2
2
  import { type SandboxProcess, type SandboxRunOptions } from './sandbox-contract.js';
3
3
  /** Sandbox admission and mandatory caps adapt the shared native command owner. */
4
4
  export declare function spawnSandboxProcess(executable: string, args: string[], limits: {
5
5
  timeoutMs: number;
6
6
  maxOutputBytes: number;
7
- }, options?: SandboxRunOptions, onSpawn?: (child: ChildProcessWithoutNullStreams) => void): SandboxProcess;
7
+ }, options?: SandboxRunOptions, onSpawn?: (child: OwnedChild) => void): SandboxProcess;
8
8
  //# sourceMappingURL=sandbox-process.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"sandbox-process.d.ts","sourceRoot":"","sources":["../../src/agent-runtime/sandbox-process.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,oBAAoB,CAAC;AAGzE,OAAO,EAAgB,KAAK,cAAc,EAAE,KAAK,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAE/F,kFAAkF;AAClF,wBAAgB,mBAAmB,CACjC,UAAU,EAAE,MAAM,EAClB,IAAI,EAAE,MAAM,EAAE,EACd,MAAM,EAAE;IAAE,SAAS,EAAE,MAAM,CAAC;IAAC,cAAc,EAAE,MAAM,CAAA;CAAE,EACrD,OAAO,GAAE,iBAAsB,EAC/B,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,8BAA8B,KAAK,IAAI,GACxD,cAAc,CA8ChB"}
1
+ {"version":3,"file":"sandbox-process.d.ts","sourceRoot":"","sources":["../../src/agent-runtime/sandbox-process.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAGvD,OAAO,EAAgB,KAAK,cAAc,EAAE,KAAK,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAE/F,kFAAkF;AAClF,wBAAgB,mBAAmB,CACjC,UAAU,EAAE,MAAM,EAClB,IAAI,EAAE,MAAM,EAAE,EACd,MAAM,EAAE;IAAE,SAAS,EAAE,MAAM,CAAC;IAAC,cAAc,EAAE,MAAM,CAAA;CAAE,EACrD,OAAO,GAAE,iBAAsB,EAC/B,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,IAAI,GACpC,cAAc,CA8ChB"}
@@ -8,11 +8,6 @@ export declare function userMessage(conversationId: string, id: string): {
8
8
  parts: ({
9
9
  type: "text";
10
10
  text: string;
11
- } | {
12
- type: "file";
13
- mediaType: string;
14
- reference: string;
15
- filename?: string | undefined;
16
11
  } | {
17
12
  type: "reasoning";
18
13
  text: string;
@@ -21,6 +16,11 @@ export declare function userMessage(conversationId: string, id: string): {
21
16
  provider: string;
22
17
  data: Record<string, import("zod").JSONType>;
23
18
  } | undefined;
19
+ } | {
20
+ type: "file";
21
+ mediaType: string;
22
+ reference: string;
23
+ filename?: string | undefined;
24
24
  } | {
25
25
  type: "source";
26
26
  sourceId: string;
@@ -6,9 +6,9 @@ import {
6
6
  AgentCodingToolAuthorizationSchema2,
7
7
  AgentCodingToolPathAuthorizationSchema2,
8
8
  createAgentCodingTools2
9
- } from "../../index-dwf0gymy.js";
9
+ } from "../../index-vyaehh67.js";
10
10
  import"../../index-2kbysk9s.js";
11
- import"../../index-4q9jvqg7.js";
11
+ import"../../index-k0kzhdw9.js";
12
12
  import"../../index-8ks9b85e.js";
13
13
  import"../../index-zrtrjkbf.js";
14
14
  import"../../index-636mggad.js";
@@ -8,7 +8,7 @@ import"../../index-q6crhe1n.js";
8
8
  import"../../index-fynr93w4.js";
9
9
  import {
10
10
  createAgentCodingTools2
11
- } from "../../index-dwf0gymy.js";
11
+ } from "../../index-vyaehh67.js";
12
12
  import"../../index-2kbysk9s.js";
13
13
  import {
14
14
  COMMAND_CLEANUP_TIMEOUT_MS,
@@ -17,7 +17,7 @@ import {
17
17
  nativeCommandOwner,
18
18
  terminateOwnedGroup,
19
19
  startNativeCommand
20
- } from "../../index-4q9jvqg7.js";
20
+ } from "../../index-k0kzhdw9.js";
21
21
  import"../../index-zrtrjkbf.js";
22
22
  import {
23
23
  MAX_TIMER_MS
@@ -7,7 +7,7 @@ import {
7
7
  import {
8
8
  NativeCommandError2,
9
9
  startNativeCommand
10
- } from "../index-4q9jvqg7.js";
10
+ } from "../index-k0kzhdw9.js";
11
11
  // src/process/command.ts
12
12
  function runNativeCommand(input) {
13
13
  return startNativeCommand(input).result;