stitchkit 0.103.8 → 0.103.10

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 (79) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/dist/agent-runtime/sandbox-process.d.ts +2 -2
  3. package/dist/agent-runtime/sandbox-process.d.ts.map +1 -1
  4. package/dist/agent-runtime/store-conformance-lifecycle.d.ts +10 -10
  5. package/dist/durability/contract.d.ts +3 -2
  6. package/dist/durability/contract.d.ts.map +1 -1
  7. package/dist/durability/effect.d.ts.map +1 -1
  8. package/dist/durability/engine.d.ts.map +1 -1
  9. package/dist/durability/json.d.ts.map +1 -1
  10. package/dist/entrypoints/agent-runtime/harness.js +2 -2
  11. package/dist/entrypoints/agent-runtime/sandbox.js +29 -81
  12. package/dist/entrypoints/agent-runtime.js +2 -2
  13. package/dist/entrypoints/application/diagnostic-journal.js +2 -1
  14. package/dist/entrypoints/cli.js +1 -1
  15. package/dist/entrypoints/files.d.ts +2 -0
  16. package/dist/entrypoints/files.d.ts.map +1 -1
  17. package/dist/entrypoints/files.js +14 -6
  18. package/dist/entrypoints/primitives.js +77 -57
  19. package/dist/entrypoints/process.d.ts +5 -0
  20. package/dist/entrypoints/process.d.ts.map +1 -0
  21. package/dist/entrypoints/process.js +20 -0
  22. package/dist/entrypoints/tools.js +12 -3
  23. package/dist/files/boundary.d.ts +19 -1
  24. package/dist/files/boundary.d.ts.map +1 -1
  25. package/dist/files/file-io.d.ts +5 -1
  26. package/dist/files/file-io.d.ts.map +1 -1
  27. package/dist/files/read.d.ts +13 -0
  28. package/dist/files/read.d.ts.map +1 -0
  29. package/dist/index-12m2v2a9.js +98 -0
  30. package/dist/index-6m6a9ty4.js +285 -0
  31. package/dist/index-8a9ksm91.js +95 -0
  32. package/dist/{index-90ppdx3q.js → index-9jb61j5a.js} +1 -1
  33. package/dist/{index-5vyd0fkb.js → index-ary5s7k0.js} +40 -61
  34. package/dist/index-c1jmtxa0.js +74 -0
  35. package/dist/index-ga597cvy.js +184 -0
  36. package/dist/index-mbnnw3f2.js +25 -0
  37. package/dist/index-nybn2err.js +213 -0
  38. package/dist/{index-v4a2fjtk.js → index-sybedc8b.js} +124 -55
  39. package/dist/internal/abort-race.d.ts +3 -0
  40. package/dist/internal/abort-race.d.ts.map +1 -0
  41. package/dist/internal/atomic-file.d.ts +20 -2
  42. package/dist/internal/atomic-file.d.ts.map +1 -1
  43. package/dist/internal/atomic-publication.d.ts +19 -0
  44. package/dist/internal/atomic-publication.d.ts.map +1 -0
  45. package/dist/internal/exclusive-lock.d.ts +2 -1
  46. package/dist/internal/exclusive-lock.d.ts.map +1 -1
  47. package/dist/internal/json-data.d.ts +8 -0
  48. package/dist/internal/json-data.d.ts.map +1 -0
  49. package/dist/internal/process-instance.d.ts +46 -9
  50. package/dist/internal/process-instance.d.ts.map +1 -1
  51. package/dist/internal/with-exclusive-lock.d.ts +4 -3
  52. package/dist/internal/with-exclusive-lock.d.ts.map +1 -1
  53. package/dist/primitives/canonical-json.d.ts +11 -0
  54. package/dist/primitives/canonical-json.d.ts.map +1 -0
  55. package/dist/primitives/index.d.ts +1 -0
  56. package/dist/primitives/index.d.ts.map +1 -1
  57. package/dist/process/command-owner.d.ts +13 -0
  58. package/dist/process/command-owner.d.ts.map +1 -0
  59. package/dist/process/command.d.ts +3 -0
  60. package/dist/process/command.d.ts.map +1 -0
  61. package/dist/process/contract.d.ts +45 -0
  62. package/dist/process/contract.d.ts.map +1 -0
  63. package/dist/process/group.d.ts +6 -0
  64. package/dist/process/group.d.ts.map +1 -0
  65. package/dist/process/leader-settlement.d.ts +4 -0
  66. package/dist/process/leader-settlement.d.ts.map +1 -0
  67. package/dist/tools/transfer/managed-file-error.d.ts.map +1 -1
  68. package/llms/files.txt +9 -1
  69. package/llms/primitives.txt +31 -1
  70. package/llms/process.txt +242 -0
  71. package/llms/stitchkit.txt +1 -0
  72. package/llms/tools.txt +18 -0
  73. package/llms-full.txt +292 -2
  74. package/llms.txt +6 -4
  75. package/native/darwin-arm64.node +0 -0
  76. package/native/darwin-x64.node +0 -0
  77. package/package.json +5 -1
  78. package/dist/index-7kxw1awn.js +0 -328
  79. package/dist/index-aan6hqb9.js +0 -65
@@ -0,0 +1,5 @@
1
+ /** POSIX Node/Bun finite native commands, independent of the agent runtime. */
2
+ export { observeProcessInstance, type ProcessInstance, type ProcessInstanceObservation, ProcessInstanceSchema, type ProcessOwnerEvidence, probeProcessOwner, } from '../internal/process-instance.js';
3
+ export { runNativeCommand } from '../process/command.js';
4
+ export { NativeCommandError, type NativeCommandOptions, type NativeCommandResult, type NativeCommandSettlement, } from '../process/contract.js';
5
+ //# sourceMappingURL=process.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"process.d.ts","sourceRoot":"","sources":["../../src/entrypoints/process.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAE/E,OAAO,EACL,sBAAsB,EACtB,KAAK,eAAe,EACpB,KAAK,0BAA0B,EAC/B,qBAAqB,EACrB,KAAK,oBAAoB,EACzB,iBAAiB,GAClB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EACL,kBAAkB,EAClB,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,EACxB,KAAK,uBAAuB,GAC7B,MAAM,qBAAqB,CAAC"}
@@ -0,0 +1,20 @@
1
+ import {
2
+ ProcessInstanceSchema2,
3
+ observeProcessInstance2,
4
+ probeProcessOwner2
5
+ } from "../index-nybn2err.js";
6
+ import {
7
+ NativeCommandError2,
8
+ startNativeCommand
9
+ } from "../index-6m6a9ty4.js";
10
+ // src/process/command.ts
11
+ function runNativeCommand(input) {
12
+ return startNativeCommand(input).result;
13
+ }
14
+ export {
15
+ NativeCommandError2 as NativeCommandError,
16
+ ProcessInstanceSchema2 as ProcessInstanceSchema,
17
+ observeProcessInstance2 as observeProcessInstance,
18
+ probeProcessOwner2 as probeProcessOwner,
19
+ runNativeCommand
20
+ };
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  EffectUnresolvedError2,
3
3
  createLocalStepDurability2
4
- } from "../index-5vyd0fkb.js";
4
+ } from "../index-ary5s7k0.js";
5
5
  import {
6
6
  AppError2,
7
7
  STITCH_ERROR_STATUS2
@@ -84,7 +84,7 @@ import {
84
84
  } from "../index-xqhede6x.js";
85
85
  import {
86
86
  ManagedFileError2
87
- } from "../index-v4a2fjtk.js";
87
+ } from "../index-sybedc8b.js";
88
88
  import {
89
89
  composeToolLifecycle2
90
90
  } from "../index-ze1eph1k.js";
@@ -2508,12 +2508,21 @@ var SAFE_MANAGED_FILE_MESSAGES = {
2508
2508
  FILE_NOT_REGULAR: "Managed path is not a regular file",
2509
2509
  FILE_INSPECTION_REJECTED: "Managed file rejected by inspection",
2510
2510
  FILE_TOO_LARGE: "Managed file exceeds the configured size limit",
2511
- FILE_EXISTS: "Managed file already exists"
2511
+ FILE_EXISTS: "Managed file already exists",
2512
+ FILE_UNSAFE_LINK: "Managed file link policy rejected",
2513
+ FILE_CHANGED: "Managed file changed during read",
2514
+ FILE_UNSUPPORTED: "Managed file capability unavailable"
2512
2515
  };
2513
2516
  function managedFileAppError(error) {
2514
2517
  if (!(error instanceof ManagedFileError2))
2515
2518
  return null;
2516
2519
  switch (error.code) {
2520
+ case "FILE_UNSAFE_LINK":
2521
+ return new AppError2("FORBIDDEN", SAFE_MANAGED_FILE_MESSAGES[error.code], 403);
2522
+ case "FILE_CHANGED":
2523
+ return new AppError2("CONFLICT", SAFE_MANAGED_FILE_MESSAGES[error.code], 409);
2524
+ case "FILE_UNSUPPORTED":
2525
+ return new AppError2("NOT_IMPLEMENTED", SAFE_MANAGED_FILE_MESSAGES[error.code], 501);
2517
2526
  case "FILE_INVALID_PATH":
2518
2527
  case "FILE_OUTSIDE_ROOT":
2519
2528
  case "FILE_NOT_FOUND":
@@ -1,5 +1,5 @@
1
1
  import { type ManagedFileRef } from '../contract/file-ref.js';
2
- export type ManagedFileErrorCode = 'FILE_INVALID_PATH' | 'FILE_NOT_FOUND' | 'FILE_NOT_REGULAR' | 'FILE_OUTSIDE_ROOT' | 'FILE_TOO_LARGE' | 'FILE_EXISTS' | 'FILE_INSPECTION_REJECTED' | 'FILE_IO_ERROR';
2
+ export type ManagedFileErrorCode = 'FILE_INVALID_PATH' | 'FILE_NOT_FOUND' | 'FILE_NOT_REGULAR' | 'FILE_OUTSIDE_ROOT' | 'FILE_TOO_LARGE' | 'FILE_EXISTS' | 'FILE_INSPECTION_REJECTED' | 'FILE_UNSAFE_LINK' | 'FILE_CHANGED' | 'FILE_UNSUPPORTED' | 'FILE_IO_ERROR';
3
3
  export declare class ManagedFileError extends Error {
4
4
  readonly code: ManagedFileErrorCode;
5
5
  constructor(code: ManagedFileErrorCode, message: string, options?: ErrorOptions);
@@ -27,6 +27,14 @@ export interface ManagedFileBoundaryConfig {
27
27
  onCleanupError?: (error: unknown) => void;
28
28
  }
29
29
  export interface ManagedFileReadOptions {
30
+ /** Include descriptor metadata in the result; default false keeps transport sources unchanged. */
31
+ observe?: boolean;
32
+ /** Refuse a symlink at the requested leaf. Ancestors remain trusted. */
33
+ rejectSymlinks?: boolean;
34
+ /** Require descriptor nlink===1; transient publication links are also refused. */
35
+ singleLink?: boolean;
36
+ /** Compare descriptor metadata around byte read; not a hostile-writer snapshot. */
37
+ stable?: boolean;
30
38
  maxBytes?: number;
31
39
  signal?: AbortSignal;
32
40
  }
@@ -38,9 +46,19 @@ export interface ManagedFileWriteOptions {
38
46
  name?: string;
39
47
  signal?: AbortSignal;
40
48
  }
49
+ export interface FileObservation {
50
+ dev: number;
51
+ ino: number;
52
+ size: number;
53
+ nlink: number;
54
+ mtimeMs: number;
55
+ ctimeMs: number;
56
+ }
41
57
  export interface ManagedFileSource {
42
58
  ref: ManagedFileRef;
43
59
  bytes: Uint8Array;
60
+ /** Included by createManagedFileBoundary when observe is true; custom sources may omit it. */
61
+ observation?: FileObservation;
44
62
  }
45
63
  export interface ManagedFileBoundary {
46
64
  read(path: string, options?: ManagedFileReadOptions): Promise<ManagedFileSource>;
@@ -1 +1 @@
1
- {"version":3,"file":"boundary.d.ts","sourceRoot":"","sources":["../../src/files/boundary.ts"],"names":[],"mappings":"AAIA,OAAO,EAAyB,KAAK,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAkBlF,MAAM,MAAM,oBAAoB,GAC5B,mBAAmB,GACnB,gBAAgB,GAChB,kBAAkB,GAClB,mBAAmB,GACnB,gBAAgB,GAChB,aAAa,GACb,0BAA0B,GAC1B,eAAe,CAAC;AAEpB,qBAAa,gBAAiB,SAAQ,KAAK;aAEvB,IAAI,EAAE,oBAAoB;IAD5C,YACkB,IAAI,EAAE,oBAAoB,EAC1C,OAAO,EAAE,MAAM,EACf,OAAO,CAAC,EAAE,YAAY,EAIvB;CACF;AAED,MAAM,WAAW,0BAA0B;IACzC,MAAM,EAAE,UAAU,CAAC;IACnB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,oEAAoE;IACpE,MAAM,EAAE,WAAW,CAAC;CACrB;AAED,MAAM,MAAM,qBAAqB,GAAG,IAAI,CAAC,cAAc,EAAE,WAAW,GAAG,MAAM,CAAC,CAAC;AAE/E,MAAM,MAAM,oBAAoB,GAAG,CACjC,KAAK,EAAE,0BAA0B,KAC9B,qBAAqB,GAAG,OAAO,CAAC,qBAAqB,CAAC,CAAC;AAE5D,MAAM,WAAW,yBAAyB;IACxC,0EAA0E;IAC1E,IAAI,EAAE,MAAM,CAAC;IACb,uFAAuF;IACvF,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,wEAAwE;IACxE,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,OAAO,CAAC,EAAE,oBAAoB,CAAC;IAC/B,cAAc,CAAC,E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tB;AAED,MAAM,WAAW,uBAAuB;IACtC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,WAAW,CAAC;CACtB;AAED,MAAM,WAAW,eAAe;IAC9B,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,iBAAiB;IAChC,GAAG,EAAE,cAAc,CAAC;IACpB,KAAK,EAAE,UAAU,CAAC;IAClB,8FAA8F;IAC9F,WAAW,CAAC,EAAE,eAAe,CAAC;CAC/B;AAED,MAAM,WAAW,mBAAmB;IAClC,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,sBAAsB,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;IACjF,KAAK,CACH,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,UAAU,GAAG,cAAc,CAAC,UAAU,CAAC,EAC/C,OAAO,CAAC,EAAE,uBAAuB,GAChC,OAAO,CAAC,cAAc,CAAC,CAAC;CAC5B;AA2GD;;;;GAIG;AACH,wBAAsB,yBAAyB,CAC7C,MAAM,EAAE,yBAAyB,GAChC,OAAO,CAAC,mBAAmB,CAAC,CAsJ9B"}
@@ -6,7 +6,11 @@ export declare function inspectedRef(path: string, size: number, inspection: Man
6
6
  mediaType?: string;
7
7
  name?: string;
8
8
  }): ManagedFileRef;
9
- export declare function readHandle(handle: Awaited<ReturnType<typeof open>>, maxBytes: number, signal?: AbortSignal): Promise<Uint8Array>;
9
+ export declare function readHandle(handle: {
10
+ read(buffer: Uint8Array, offset: number, length: number): Promise<{
11
+ bytesRead: number;
12
+ }>;
13
+ }, maxBytes: number, signal?: AbortSignal): Promise<Uint8Array>;
10
14
  export declare function writeSource(handle: Awaited<ReturnType<typeof open>>, source: Uint8Array | ReadableStream<Uint8Array>, maxBytes: number, inspectionBytes: number, signal?: AbortSignal): Promise<{
11
15
  size: number;
12
16
  prefix: Uint8Array;
@@ -1 +1 @@
1
- {"version":3,"file":"file-io.d.ts","sourceRoot":"","sources":["../../src/files/file-io.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,KAAK,cAAc,EAAwB,MAAM,sBAAsB,CAAC;AACjF,OAAO,EAEL,KAAK,qBAAqB,EAC1B,KAAK,0BAA0B,EAC/B,KAAK,oBAAoB,EAC1B,MAAM,YAAY,CAAC;AA+BpB,wBAAsB,WAAW,CAC/B,SAAS,EAAE,oBAAoB,GAAG,SAAS,EAC3C,KAAK,EAAE,IAAI,CAAC,0BAA0B,EAAE,QAAQ,CAAC,EACjD,SAAS,EAAE,MAAM,EACjB,WAAW,CAAC,EAAE,WAAW,GACxB,OAAO,CAAC,qBAAqB,CAAC,CAmBhC;AAED,wBAAgB,YAAY,CAC1B,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,EACZ,UAAU,EAAE,qBAAqB,EACjC,QAAQ,GAAE;IAAE,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAO,GACnD,cAAc,CAiBhB;AAED,wBAAsB,UAAU,CAC9B,MAAM,EAAE,OAAO,CAAC,UAAU,CAAC,OAAO,IAAI,CAAC,CAAC,EACxC,QAAQ,EAAE,MAAM,EAChB,MAAM,CAAC,EAAE,WAAW,GACnB,OAAO,CAAC,UAAU,CAAC,CAyBrB;AAcD,wBAAsB,WAAW,CAC/B,MAAM,EAAE,OAAO,CAAC,UAAU,CAAC,OAAO,IAAI,CAAC,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U,CAAC,CAkCrB;AAcD,wBAAsB,WAAW,CAC/B,MAAM,EAAE,OAAO,CAAC,UAAU,CAAC,OAAO,IAAI,CAAC,CAAC,EACxC,MAAM,EAAE,UAAU,GAAG,cAAc,CAAC,UAAU,CAAC,EAC/C,QAAQ,EAAE,MAAM,EAChB,eAAe,EAAE,MAAM,EACvB,MAAM,CAAC,EAAE,WAAW,GACnB,OAAO,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,UAAU,CAAA;CAAE,CAAC,CA2C/C"}
@@ -0,0 +1,13 @@
1
+ import { type Stats } from 'node:fs';
2
+ import { type FileHandle } from 'node:fs/promises';
3
+ import type { ManagedFileInspector } from './boundary.js';
4
+ import { type ManagedFileReadOptions, type ManagedFileSource } from './boundary.js';
5
+ /** The descriptor, rather than a preceding path stat, decides kind/link/stability. */
6
+ export declare function readManagedDescriptor(target: string, path: string, maxBytes: number, options: ManagedFileReadOptions, inspection: {
7
+ inspect?: ManagedFileInspector;
8
+ bytes: number;
9
+ timeoutMs: number;
10
+ }, openDescriptor?: (path: string, flags: number) => Promise<Pick<FileHandle, 'read' | 'close'> & {
11
+ stat(): Promise<Stats>;
12
+ }>): Promise<ManagedFileSource>;
13
+ //# sourceMappingURL=read.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"read.d.ts","sourceRoot":"","sources":["../../src/files/read.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,KAAK,KAAK,EAAE,MAAM,SAAS,CAAC;AAChD,OAAO,EAAE,KAAK,UAAU,EAAQ,MAAM,kBAAkB,CAAC;AAEzD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AACvD,OAAO,EAEL,KAAK,sBAAsB,EAC3B,KAAK,iBAAiB,EACvB,MAAM,YAAY,CAAC;AAGpB,sFAAsF;AACtF,wBAAsB,qBAAqB,CACzC,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,sBAAsB,EAC/B,UAAU,EAAE;IAAE,OAAO,CAAC,EAAE,oBAAoB,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,EAChF,cAAc,GAAE,CACd,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,MAAM,KACV,OAAO,CAAC,IAAI,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG;IAAE,IAAI,IAAI,OAAO,CAAC,KAAK,CAAC,CAAA;CAAE,CAAQ,GACnF,OAAO,CAAC,iBAAiB,CAAC,CAyE5B"}
@@ -0,0 +1,98 @@
1
+ import {
2
+ publishAtomicFile,
3
+ publishAtomicFileSync
4
+ } from "./index-8a9ksm91.js";
5
+
6
+ // src/internal/atomic-file.ts
7
+ import { randomBytes } from "node:crypto";
8
+ import { closeSync, fchmodSync, fsyncSync, openSync, unlinkSync, writeSync } from "node:fs";
9
+ import { open, unlink } from "node:fs/promises";
10
+ import { basename, dirname, join } from "node:path";
11
+ var DEFAULT_MODE = 384;
12
+ function stagingPath(target) {
13
+ return join(dirname(target), `.${basename(target)}.${randomBytes(12).toString("hex")}.tmp`);
14
+ }
15
+ function bytesOf(data) {
16
+ return typeof data === "string" ? new TextEncoder().encode(data) : data;
17
+ }
18
+ async function writeFileAtomic2(target, data, options = {}) {
19
+ return writeAtomicFileData(target, data, options);
20
+ }
21
+ async function writeAtomicFileData(target, data, options, io = { open, unlink, publish: publishAtomicFile }) {
22
+ const mode = options.mode ?? DEFAULT_MODE;
23
+ const staged = stagingPath(target);
24
+ const handle = await io.open(staged, "wx", mode);
25
+ try {
26
+ let failed = false;
27
+ let failure;
28
+ try {
29
+ await handle.writeFile(bytesOf(data));
30
+ await handle.chmod(mode);
31
+ if (options.durability !== "none")
32
+ await handle.sync();
33
+ } catch (error) {
34
+ failed = true;
35
+ failure = error;
36
+ } finally {
37
+ try {
38
+ await handle.close();
39
+ } catch (error) {
40
+ if (!failed) {
41
+ failed = true;
42
+ failure = error;
43
+ }
44
+ }
45
+ }
46
+ if (failed)
47
+ throw failure;
48
+ await io.publish(staged, target, options.replace ?? true, options.durability === "directory");
49
+ } catch (error) {
50
+ await io.unlink(staged).catch(() => {
51
+ return;
52
+ });
53
+ throw error;
54
+ }
55
+ }
56
+ function writeFileAtomicSync2(target, data, options = {}) {
57
+ const mode = options.mode ?? DEFAULT_MODE;
58
+ const bytes = bytesOf(data);
59
+ const staged = stagingPath(target);
60
+ const handle = openSync(staged, "wx", mode);
61
+ try {
62
+ let failed = false;
63
+ let failure;
64
+ try {
65
+ for (let offset = 0;offset < bytes.byteLength; ) {
66
+ const written = writeSync(handle, bytes, offset, bytes.byteLength - offset);
67
+ if (written === 0)
68
+ throw new Error("zero-byte atomic-file write");
69
+ offset += written;
70
+ }
71
+ fchmodSync(handle, mode);
72
+ if (options.durability !== "none")
73
+ fsyncSync(handle);
74
+ } catch (error) {
75
+ failed = true;
76
+ failure = error;
77
+ } finally {
78
+ try {
79
+ closeSync(handle);
80
+ } catch (error) {
81
+ if (!failed) {
82
+ failed = true;
83
+ failure = error;
84
+ }
85
+ }
86
+ }
87
+ if (failed)
88
+ throw failure;
89
+ publishAtomicFileSync(staged, target, options.replace ?? true, options.durability === "directory");
90
+ } catch (error) {
91
+ try {
92
+ unlinkSync(staged);
93
+ } catch {}
94
+ throw error;
95
+ }
96
+ }
97
+
98
+ export { writeFileAtomic2, writeFileAtomicSync2 };
@@ -0,0 +1,285 @@
1
+ import {
2
+ raceAbort
3
+ } from "./index-mbnnw3f2.js";
4
+
5
+ // src/process/contract.ts
6
+ import { z } from "zod";
7
+ var NativeCommandSettlementSchema = z.discriminatedUnion("kind", [
8
+ z.object({
9
+ kind: z.literal("exit"),
10
+ exitCode: z.number().int().nullable(),
11
+ signal: z.string().nullable()
12
+ }),
13
+ z.object({ kind: z.literal("error"), cause: z.unknown() })
14
+ ]);
15
+ var NativeCommandOptionsSchema = z.strictObject({
16
+ executable: z.string().min(1),
17
+ args: z.array(z.string()).default([]),
18
+ cwd: z.string().optional(),
19
+ env: z.record(z.string(), z.string()).optional(),
20
+ envPolicy: z.enum(["declared-only", "ambient"]).default("declared-only"),
21
+ signal: z.custom((v) => v instanceof AbortSignal).optional(),
22
+ timeoutMs: z.number().int().positive().max(2147483647).optional(),
23
+ maxOutputBytes: z.number().int().positive().optional(),
24
+ capture: z.boolean().default(false),
25
+ stdin: z.custom((v) => v instanceof Uint8Array).optional(),
26
+ maxStdinBytes: z.number().int().positive().default(1024 * 1024),
27
+ onOutput: z.custom((v) => typeof v === "function").optional(),
28
+ onLeaderSettled: z.custom((v) => typeof v === "function").optional(),
29
+ killGraceMs: z.number().int().nonnegative().max(1e4).default(100),
30
+ cleanupTimeoutMs: z.number().int().positive().max(30000).default(2000)
31
+ }).superRefine((input, ctx) => {
32
+ if (!input.signal && input.timeoutMs === undefined)
33
+ ctx.addIssue({ code: "custom", message: "Declare a caller signal or a finite timeout" });
34
+ if (input.capture && input.maxOutputBytes === undefined)
35
+ ctx.addIssue({
36
+ code: "custom",
37
+ message: "Capture requires a finite combined output budget"
38
+ });
39
+ if (input.stdin && input.stdin.byteLength > input.maxStdinBytes)
40
+ ctx.addIssue({ code: "custom", message: "stdin exceeds maxStdinBytes" });
41
+ });
42
+ var NativeCommandResultSchema = z.object({
43
+ exitCode: z.number().int().nullable(),
44
+ signal: z.string().nullable(),
45
+ stdout: z.instanceof(Uint8Array),
46
+ stderr: z.instanceof(Uint8Array)
47
+ });
48
+
49
+ class NativeCommandError2 extends Error {
50
+ code;
51
+ constructor(code, message, options) {
52
+ super(message, options);
53
+ this.code = code;
54
+ this.name = "NativeCommandError";
55
+ }
56
+ }
57
+
58
+ // src/process/command-owner.ts
59
+ import { spawn } from "node:child_process";
60
+
61
+ // src/process/group.ts
62
+ function deniedOnDarwin(error) {
63
+ return process.platform === "darwin" && error instanceof Error && "code" in error && error.code === "EPERM";
64
+ }
65
+ function signalGroup(pid, signal) {
66
+ if (pid === undefined)
67
+ return;
68
+ try {
69
+ process.kill(-pid, signal);
70
+ } catch (error) {
71
+ if (!(error instanceof Error && ("code" in error) && error.code === "ESRCH"))
72
+ throw error;
73
+ }
74
+ }
75
+ function exists(pid) {
76
+ if (pid === undefined)
77
+ return false;
78
+ try {
79
+ process.kill(-pid, 0);
80
+ return true;
81
+ } catch (error) {
82
+ if (error instanceof Error && "code" in error && error.code === "ESRCH")
83
+ return false;
84
+ if (deniedOnDarwin(error))
85
+ return true;
86
+ throw error;
87
+ }
88
+ }
89
+ async function signalUntilSettled(pid, signal, deadline) {
90
+ for (;; ) {
91
+ try {
92
+ signalGroup(pid, signal);
93
+ return;
94
+ } catch (error) {
95
+ if (!deniedOnDarwin(error) || Date.now() >= deadline)
96
+ throw error;
97
+ await new Promise((resolve) => setTimeout(resolve, Math.min(10, deadline - Date.now())));
98
+ }
99
+ }
100
+ }
101
+ async function stopCommandGroup(pid, graceMs, cleanupTimeoutMs = 2000) {
102
+ const deadline = Date.now() + graceMs + cleanupTimeoutMs;
103
+ await signalUntilSettled(pid, "SIGTERM", deadline);
104
+ const until = Date.now() + graceMs;
105
+ while (Date.now() < until && exists(pid))
106
+ await new Promise((resolve) => setTimeout(resolve, Math.min(10, until - Date.now())));
107
+ await signalUntilSettled(pid, "SIGKILL", deadline);
108
+ }
109
+ function commandCleanupError(cause) {
110
+ return new NativeCommandError2("COMMAND_CLEANUP", "Command cleanup did not complete", {
111
+ cause
112
+ });
113
+ }
114
+ function waitForCommandClose(closed, timeoutMs) {
115
+ return raceAbort(closed, AbortSignal.timeout(timeoutMs));
116
+ }
117
+
118
+ // src/process/leader-settlement.ts
119
+ function createLeaderSettlement(options, signal) {
120
+ let pending;
121
+ return (event) => {
122
+ if (pending)
123
+ return pending;
124
+ pending = (async () => {
125
+ if (!options.onLeaderSettled)
126
+ return;
127
+ const controller = new AbortController;
128
+ const timer = setTimeout(() => controller.abort(new Error("Leader settlement deadline exceeded")), options.cleanupTimeoutMs);
129
+ const abort = () => controller.abort(signal.reason);
130
+ if (!signal.aborted)
131
+ signal.addEventListener("abort", abort, { once: true });
132
+ try {
133
+ await raceAbort(Promise.resolve(options.onLeaderSettled(event, controller.signal)), controller.signal);
134
+ } catch (cause) {
135
+ if (signal.aborted && cause === signal.reason)
136
+ throw cause;
137
+ throw commandCleanupError(new AggregateError([event, cause], "Leader settlement failed"));
138
+ } finally {
139
+ clearTimeout(timer);
140
+ signal.removeEventListener("abort", abort);
141
+ controller.abort(new Error("Leader settlement completed"));
142
+ }
143
+ })();
144
+ pending.catch(() => {
145
+ return;
146
+ });
147
+ return pending;
148
+ };
149
+ }
150
+
151
+ // src/process/command-owner.ts
152
+ function startNativeCommand(input, onSpawn) {
153
+ const options = NativeCommandOptionsSchema.parse(input);
154
+ options.signal?.throwIfAborted();
155
+ if (process.platform === "win32")
156
+ throw new NativeCommandError2("COMMAND_UNAVAILABLE", "POSIX process groups are required");
157
+ const controller = new AbortController;
158
+ const abort = () => controller.abort(options.signal?.reason);
159
+ options.signal?.addEventListener("abort", abort, { once: true });
160
+ if (options.signal?.aborted)
161
+ abort();
162
+ const timer = options.timeoutMs === undefined ? undefined : setTimeout(() => controller.abort(new NativeCommandError2("COMMAND_LIMIT", "Command deadline exceeded")), options.timeoutMs);
163
+ let child;
164
+ try {
165
+ child = spawn(options.executable, options.args, {
166
+ cwd: options.cwd,
167
+ env: options.envPolicy === "ambient" ? { ...process.env, ...options.env } : options.env ?? {},
168
+ detached: true,
169
+ stdio: ["pipe", "pipe", "pipe"]
170
+ });
171
+ } catch (cause) {
172
+ if (timer !== undefined)
173
+ clearTimeout(timer);
174
+ options.signal?.removeEventListener("abort", abort);
175
+ throw new NativeCommandError2("COMMAND_UNAVAILABLE", "Command could not start", { cause });
176
+ }
177
+ const stdout = [];
178
+ const stderr = [];
179
+ let total = 0;
180
+ let finished = false;
181
+ let spawnFailure;
182
+ const settle = createLeaderSettlement(options, controller.signal);
183
+ const leader = new Promise((resolve) => {
184
+ child.once("exit", (exitCode, signal) => resolve({ kind: "exit", exitCode, signal }));
185
+ child.once("error", (cause) => resolve({ kind: "error", cause }));
186
+ });
187
+ const pendingHandles = new Set(["leader", "stdin", "stdout", "stderr"]);
188
+ const released = Promise.all([
189
+ leader.then(() => pendingHandles.delete("leader")),
190
+ ...["stdin", "stdout", "stderr"].map((name) => new Promise((resolve) => child[name].once("close", () => {
191
+ pendingHandles.delete(name);
192
+ resolve();
193
+ })))
194
+ ]);
195
+ const closed = new Promise((resolve) => {
196
+ child.once("error", (error) => {
197
+ spawnFailure = new NativeCommandError2("COMMAND_UNAVAILABLE", "Command could not start", {
198
+ cause: error
199
+ });
200
+ controller.abort(spawnFailure);
201
+ });
202
+ child.once("close", (exitCode, signal) => resolve({ exitCode, signal }));
203
+ });
204
+ child.stdin.on("error", (error) => {
205
+ if (!(("code" in error) && error.code === "EPIPE"))
206
+ controller.abort(error);
207
+ });
208
+ const drain = async (stream, channel, captured) => {
209
+ for await (const chunk of stream) {
210
+ controller.signal.throwIfAborted();
211
+ if (!(chunk instanceof Uint8Array))
212
+ throw new TypeError("Expected binary command output");
213
+ total += chunk.byteLength;
214
+ if (options.maxOutputBytes !== undefined && total > options.maxOutputBytes)
215
+ throw new NativeCommandError2("COMMAND_LIMIT", "Command output budget exceeded");
216
+ if (options.capture)
217
+ captured.push(Uint8Array.from(chunk));
218
+ if (options.onOutput)
219
+ await raceAbort(Promise.resolve().then(() => {
220
+ controller.signal.throwIfAborted();
221
+ return options.onOutput?.(chunk, channel, controller.signal);
222
+ }), controller.signal);
223
+ }
224
+ };
225
+ const result = (async () => {
226
+ try {
227
+ onSpawn?.(child);
228
+ child.stdin.end(options.stdin);
229
+ const drains = Promise.all([
230
+ drain(child.stdout, "stdout", stdout),
231
+ drain(child.stderr, "stderr", stderr)
232
+ ]);
233
+ await raceAbort(Promise.all([drains, leader.then(settle)]), controller.signal);
234
+ const status = await raceAbort(closed, controller.signal);
235
+ if (spawnFailure !== undefined)
236
+ throw spawnFailure;
237
+ return { ...status, stdout: Buffer.concat(stdout), stderr: Buffer.concat(stderr) };
238
+ } catch (error) {
239
+ controller.abort(error);
240
+ child.stdin.destroy();
241
+ child.stdout.destroy();
242
+ child.stderr.destroy();
243
+ const cleanup = await Promise.allSettled([
244
+ settle({ kind: "error", cause: error }),
245
+ stopCommandGroup(child.pid, options.killGraceMs, options.cleanupTimeoutMs).then(async () => {
246
+ try {
247
+ await waitForCommandClose(released, options.cleanupTimeoutMs);
248
+ } catch (cause) {
249
+ throw new Error(`Command handles remained open: ${[...pendingHandles].join(", ")}`, {
250
+ cause
251
+ });
252
+ }
253
+ })
254
+ ]);
255
+ const failures = cleanup.flatMap((item) => item.status === "rejected" && item.reason !== error ? [item.reason] : []);
256
+ if (failures.length) {
257
+ throw commandCleanupError(new AggregateError([error, ...failures], "Command failed and cleanup failed"));
258
+ }
259
+ throw error;
260
+ } finally {
261
+ finished = true;
262
+ if (timer !== undefined)
263
+ clearTimeout(timer);
264
+ options.signal?.removeEventListener("abort", abort);
265
+ controller.abort(new Error("Command completed"));
266
+ }
267
+ })();
268
+ result.catch(() => {
269
+ return;
270
+ });
271
+ return {
272
+ result,
273
+ async stop() {
274
+ if (!finished)
275
+ controller.abort(new DOMException("Command stopped", "AbortError"));
276
+ await result.then(() => {
277
+ return;
278
+ }, () => {
279
+ return;
280
+ });
281
+ }
282
+ };
283
+ }
284
+
285
+ export { NativeCommandError2, startNativeCommand };
@@ -0,0 +1,95 @@
1
+ // src/internal/atomic-publication.ts
2
+ import { closeSync, fsyncSync, linkSync, openSync, renameSync, unlinkSync } from "node:fs";
3
+ import { link, open, rename, unlink } from "node:fs/promises";
4
+ import { dirname } from "node:path";
5
+
6
+ class AtomicFilePublicationError2 extends Error {
7
+ phase;
8
+ published = true;
9
+ constructor(phase, cause) {
10
+ super(`File published but ${phase} failed`, { cause });
11
+ this.phase = phase;
12
+ this.name = "AtomicFilePublicationError";
13
+ }
14
+ }
15
+ var native = { rename, link, unlink, open };
16
+ async function publishAtomicFile(staged, target, replace, directorySync, io = native) {
17
+ if (directorySync && process.platform === "win32")
18
+ throw new Error("Directory durability is unsupported on Windows");
19
+ const directory = directorySync ? await io.open(dirname(target), "r") : undefined;
20
+ let failed = false;
21
+ let failure;
22
+ try {
23
+ if (replace)
24
+ await io.rename(staged, target);
25
+ else {
26
+ await io.link(staged, target);
27
+ try {
28
+ await io.unlink(staged);
29
+ } catch (error) {
30
+ throw new AtomicFilePublicationError2("cleanup", error);
31
+ }
32
+ }
33
+ try {
34
+ await directory?.sync();
35
+ } catch (error) {
36
+ throw new AtomicFilePublicationError2("directory-sync", error);
37
+ }
38
+ } catch (error) {
39
+ failed = true;
40
+ failure = error;
41
+ } finally {
42
+ try {
43
+ await directory?.close();
44
+ } catch (error) {
45
+ if (!failed) {
46
+ failed = true;
47
+ failure = new AtomicFilePublicationError2("directory-close", error);
48
+ }
49
+ }
50
+ }
51
+ if (failed)
52
+ throw failure;
53
+ }
54
+ function publishAtomicFileSync(staged, target, replace, directorySync) {
55
+ if (directorySync && process.platform === "win32")
56
+ throw new Error("Directory durability is unsupported on Windows");
57
+ const directory = directorySync ? openSync(dirname(target), "r") : undefined;
58
+ let failed = false;
59
+ let failure;
60
+ try {
61
+ if (replace)
62
+ renameSync(staged, target);
63
+ else {
64
+ linkSync(staged, target);
65
+ try {
66
+ unlinkSync(staged);
67
+ } catch (error) {
68
+ throw new AtomicFilePublicationError2("cleanup", error);
69
+ }
70
+ }
71
+ try {
72
+ if (directory !== undefined)
73
+ fsyncSync(directory);
74
+ } catch (error) {
75
+ throw new AtomicFilePublicationError2("directory-sync", error);
76
+ }
77
+ } catch (error) {
78
+ failed = true;
79
+ failure = error;
80
+ } finally {
81
+ try {
82
+ if (directory !== undefined)
83
+ closeSync(directory);
84
+ } catch (error) {
85
+ if (!failed) {
86
+ failed = true;
87
+ failure = new AtomicFilePublicationError2("directory-close", error);
88
+ }
89
+ }
90
+ }
91
+ if (failed)
92
+ throw failure;
93
+ }
94
+
95
+ export { AtomicFilePublicationError2, publishAtomicFile, publishAtomicFileSync };
@@ -20,7 +20,7 @@ import {
20
20
  } from "./index-mnkk1ffz.js";
21
21
  import {
22
22
  createLocalStepDurability2
23
- } from "./index-5vyd0fkb.js";
23
+ } from "./index-ary5s7k0.js";
24
24
  import {
25
25
  isAgentToolError2,
26
26
  createToolDurabilityContext