stitchkit 0.120.0 → 0.121.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 (114) hide show
  1. package/CHANGELOG.md +42 -0
  2. package/dist/agent-runtime/coding-discovery.d.ts +25 -0
  3. package/dist/agent-runtime/coding-discovery.d.ts.map +1 -0
  4. package/dist/agent-runtime/coding-search-automaton.d.ts +37 -0
  5. package/dist/agent-runtime/coding-search-automaton.d.ts.map +1 -0
  6. package/dist/agent-runtime/coding-search-case-fold.d.ts +4 -0
  7. package/dist/agent-runtime/coding-search-case-fold.d.ts.map +1 -0
  8. package/dist/agent-runtime/coding-search-class-ranges.d.ts +10 -0
  9. package/dist/agent-runtime/coding-search-class-ranges.d.ts.map +1 -0
  10. package/dist/agent-runtime/coding-search-contract.d.ts +86 -0
  11. package/dist/agent-runtime/coding-search-contract.d.ts.map +1 -0
  12. package/dist/agent-runtime/coding-search-limits.d.ts +13 -0
  13. package/dist/agent-runtime/coding-search-limits.d.ts.map +1 -0
  14. package/dist/agent-runtime/coding-search-matcher.d.ts +33 -0
  15. package/dist/agent-runtime/coding-search-matcher.d.ts.map +1 -0
  16. package/dist/agent-runtime/coding-search-output.d.ts +5 -0
  17. package/dist/agent-runtime/coding-search-output.d.ts.map +1 -0
  18. package/dist/agent-runtime/coding-search-regex-syntax.d.ts +39 -0
  19. package/dist/agent-runtime/coding-search-regex-syntax.d.ts.map +1 -0
  20. package/dist/agent-runtime/coding-search-unit-classes.d.ts +31 -0
  21. package/dist/agent-runtime/coding-search-unit-classes.d.ts.map +1 -0
  22. package/dist/agent-runtime/coding-shell-process.d.ts +1 -0
  23. package/dist/agent-runtime/coding-shell-process.d.ts.map +1 -1
  24. package/dist/agent-runtime/coding-tool-contract.d.ts +8 -3
  25. package/dist/agent-runtime/coding-tool-contract.d.ts.map +1 -1
  26. package/dist/agent-runtime/coding-tool-files.d.ts.map +1 -1
  27. package/dist/agent-runtime/coding-tool-listing.d.ts +1 -11
  28. package/dist/agent-runtime/coding-tool-listing.d.ts.map +1 -1
  29. package/dist/agent-runtime/coding-tool-paths.d.ts +6 -2
  30. package/dist/agent-runtime/coding-tool-paths.d.ts.map +1 -1
  31. package/dist/agent-runtime/coding-tool-refusals.d.ts +6 -0
  32. package/dist/agent-runtime/coding-tool-refusals.d.ts.map +1 -1
  33. package/dist/agent-runtime/coding-tool-search-patch.d.ts.map +1 -1
  34. package/dist/agent-runtime/coding-tool-search.d.ts +113 -0
  35. package/dist/agent-runtime/coding-tool-search.d.ts.map +1 -0
  36. package/dist/agent-runtime/coding-tool-shell.d.ts.map +1 -1
  37. package/dist/agent-runtime/contained-scan-budget.d.ts +32 -0
  38. package/dist/agent-runtime/contained-scan-budget.d.ts.map +1 -0
  39. package/dist/agent-runtime/contained-scan-contract.d.ts +52 -0
  40. package/dist/agent-runtime/contained-scan-contract.d.ts.map +1 -0
  41. package/dist/agent-runtime/contained-scan.d.ts +48 -13
  42. package/dist/agent-runtime/contained-scan.d.ts.map +1 -1
  43. package/dist/agent-runtime/sandbox.d.ts +5 -1
  44. package/dist/agent-runtime/sandbox.d.ts.map +1 -1
  45. package/dist/agent-runtime/workspace-glob.d.ts +6 -0
  46. package/dist/agent-runtime/workspace-glob.d.ts.map +1 -0
  47. package/dist/entrypoints/agent-runtime/coding-tools.js +7 -7
  48. package/dist/entrypoints/agent-runtime/harness.js +3 -3
  49. package/dist/entrypoints/agent-runtime/sandbox.js +7 -7
  50. package/dist/entrypoints/agent-runtime/sqlite/bun.js +9 -9
  51. package/dist/entrypoints/agent-runtime/sqlite/node.js +9 -9
  52. package/dist/entrypoints/agent-runtime/testing.js +9 -9
  53. package/dist/entrypoints/agent-runtime.js +9 -9
  54. package/dist/entrypoints/application/diagnostic-journal.js +3 -3
  55. package/dist/entrypoints/application/directory-inbox.js +5 -5
  56. package/dist/entrypoints/cli/publish.js +4 -4
  57. package/dist/entrypoints/cli.js +4 -4
  58. package/dist/entrypoints/files.js +4 -4
  59. package/dist/entrypoints/process/owner-loss.js +2 -1
  60. package/dist/entrypoints/process.js +4 -4
  61. package/dist/entrypoints/server.js +5 -5
  62. package/dist/entrypoints/telegram.js +3 -3
  63. package/dist/entrypoints/tools/toolkit.js +4 -4
  64. package/dist/{index-pq2m7t46.js → index-0fra8xvy.js} +2 -2
  65. package/dist/{index-yb9n4pgj.js → index-10rg78vf.js} +1 -1
  66. package/dist/{index-3yb5kft5.js → index-4tyt1qya.js} +1 -1
  67. package/dist/{index-8xyf8h2k.js → index-6j15ktag.js} +1 -1
  68. package/dist/{index-zrdcmg6j.js → index-72xtvcvr.js} +40 -6
  69. package/dist/{index-e452syyh.js → index-aqmadanx.js} +2 -2
  70. package/dist/{index-1jwsfkfz.js → index-eeahxwvg.js} +60 -76
  71. package/dist/{index-nyyam9ce.js → index-f6pw75e1.js} +1 -1
  72. package/dist/{index-qevqn3d3.js → index-gq3fnq3f.js} +1 -1
  73. package/dist/{index-bz479f0x.js → index-gtx3eknx.js} +1 -1
  74. package/dist/{index-nn9qvkww.js → index-j95jp7ee.js} +45 -9
  75. package/dist/{index-2kbysk9s.js → index-m5m9rmvt.js} +2 -0
  76. package/dist/{index-r3db01kh.js → index-nwm3ww60.js} +1 -1
  77. package/dist/index-qaqxdbxf.js +2857 -0
  78. package/dist/index-s9a0fjh3.js +305 -0
  79. package/dist/internal/contained-directory.d.ts +1 -1
  80. package/dist/internal/contained-directory.d.ts.map +1 -1
  81. package/dist/internal/contained-files.d.ts +18 -51
  82. package/dist/internal/contained-files.d.ts.map +1 -1
  83. package/dist/internal/contained-read.d.ts +17 -0
  84. package/dist/internal/contained-read.d.ts.map +1 -0
  85. package/dist/internal/darwin-binding.d.ts +3 -1
  86. package/dist/internal/darwin-binding.d.ts.map +1 -1
  87. package/dist/process/bun-child.d.ts.map +1 -1
  88. package/dist/process/command-owner.d.ts.map +1 -1
  89. package/dist/process/group.d.ts +2 -0
  90. package/dist/process/group.d.ts.map +1 -1
  91. package/dist/process/launch.d.ts +1 -0
  92. package/dist/process/launch.d.ts.map +1 -1
  93. package/dist/process/owned-child.d.ts.map +1 -1
  94. package/dist/process/owner-loss-guard.d.ts.map +1 -1
  95. package/dist/process/owner-loss-protocol.d.ts +1 -0
  96. package/dist/process/owner-loss-protocol.d.ts.map +1 -1
  97. package/llms/agent-runtime-coding-tools.txt +9 -9
  98. package/llms/agent-runtime.2.txt +17 -0
  99. package/llms/agent-runtime.txt +59 -24
  100. package/llms/application.3.txt +5 -2
  101. package/llms/contract.txt +1 -1
  102. package/llms/process.txt +3 -1
  103. package/llms/server.5.txt +2 -0
  104. package/llms/stitchkit.txt +3 -3
  105. package/llms/{upgrading-0.106.0-0.120.0.txt → upgrading-0.106.0-0.121.0.txt} +53 -3
  106. package/llms/upgrading.txt +1 -1
  107. package/llms-full.txt +132 -23
  108. package/llms.txt +4 -4
  109. package/native/darwin-arm64.node +0 -0
  110. package/native/darwin-x64.node +0 -0
  111. package/native-assets.json +4 -4
  112. package/package.json +1 -1
  113. package/dist/index-0qyrcjfs.js +0 -1478
  114. package/dist/index-aa50qwv4.js +0 -107
@@ -14,6 +14,23 @@ Parts of this slice:
14
14
  # Guide: Agent application runtime (docs/guide/agent-runtime.md) (continued)
15
15
  ==============================================================================
16
16
 
17
+ ## Durable order
18
+
19
+ `acceptInputAndAssignRun` is one atomic operation. It is followed by ownership
20
+ acquisition, revision-checked assistant checkpoints and one terminal CAS. The
21
+ process-local coordinator releases its lane only after terminal commit.
22
+
23
+ A queued admission is durable immediately, even if its predecessor is still awaiting ownership
24
+ or its first checkpoint. Snapshots expose causal turn order rather than physical append order:
25
+ the predecessor's assigned input(s) and assistant come before the successor input(s). Execution
26
+ uses the same run boundary, so neither `prompt({ snapshot })` nor default/custom history
27
+ projection can see inputs assigned to a later run. `inject` remains the explicit path that moves
28
+ a successor input into the run already in flight.
29
+
30
+ ```text
31
+ input + queued run → running → execution settled → terminal CAS → successor
32
+ ```
33
+
17
34
  ## What happens to a run when new input arrives
18
35
 
19
36
  `runs.inputPolicy` decides. It takes five values, or a function returning one:
@@ -304,14 +304,26 @@ outermost first, stopping at the first refusal; discovery rooted at `.` also ask
304
304
  Thus denying `credentials` denies everything
305
305
  under it. The comparison is segment-wise, so it does not deny `credentials-backup`, and a path of
306
306
  depth N costs N questions for direct access. Directory decisions happen before descent; file decisions and
307
- `search_files.include` happen before opening content. Requested paths use `/`: a backslash is
307
+ `search_files.include` happen before opening content. Incompatible glob directory prefixes are
308
+ pruned before policy or directory opens. Requested paths use `/`: a backslash is
308
309
  refused rather than normalised, because the workspace walk reads it as a separator and every
309
310
  authorization callback would otherwise be asked about a different decomposition than the one opened. File paths are relative, bounded and contained after
310
311
  descriptor-relative resolution: each ancestor is opened without following symlinks. Reads and edits
311
312
  stay pinned through authorization; `write_file` plans before it and opens the parent after, because
312
313
  the parent it creates does not exist yet. Reads revalidate the pinned file identity;
313
314
  writes and patches revalidate the pinned parent identity; search and resource discovery descend
314
- only through opened directories. A path that changed during authorization refuses with `CONFLICT`.
315
+ only through opened directories. Every filesystem tool selects its root capability before operation or path authorization and retains
316
+ that identity if a callback replaces the root path or configured alias. On Linux the ordinary
317
+ command launcher spawns the command with the pinned directory's `/proc` descriptor link as its cwd;
318
+ on macOS it inherits the pinned cwd through an isolated guard — one short-lived guard process per
319
+ command, tens of milliseconds, outside `shellTimeoutMs`, which counts from the command's start. The
320
+ application process never changes cwd. Where
321
+ contained descriptors are unavailable (Windows), `run_command` accepts a cwd whose realpath is
322
+ that same name under the root — a symlink segment refuses there too — and checks the directory's
323
+ identity again immediately before launch, after every host decision.
324
+ A custom sandbox launcher owns atomic cwd capture at its pathname handoff; the SDK refuses a
325
+ changed identity after policy/prepare and immediately before that handoff. A path that changed
326
+ during direct-access authorization refuses with `CONFLICT`.
315
327
  A path spelled differently from the name stored on disk refuses before any policy reads it, so on a
316
328
  case-insensitive volume a rule on `credentials` cannot be passed by asking for `CREDENTIALS`.
317
329
  NUL bytes are refused before either host policy sees a path.
@@ -365,11 +377,51 @@ crosses a process boundary and is rebuilt from the wire.
365
377
  excluded directory is not "no files", and a model told only "nothing found" concludes the wrong
366
378
  thing. `search_files` takes `regex`, `context` lines and an anchored `include` pattern matched
367
379
  against the whole workspace-relative path. `*` does not cross `/`, so files in subdirectories need
368
- `**/`; `scannedFiles` counts files admitted by both that filter and host authorization. A `hint`
369
- explains the zero only when the filter produced it, rejecting every file the scan reached; an empty
370
- tree and a host refusal return the same empty result without blaming the pattern. Regex is bounded by
371
- refusing backreferences and lookaround and capping line length rather than by a timeout, because a
372
- JavaScript `RegExp` cannot be interrupted once it starts backtracking. With an optional `AgentCodingArtifactStore`, shell output beyond the inline
380
+ `**/`; `scannedFiles` counts files admitted by both that filter and host authorization that reached
381
+ comparison. One finite glob automaton matches files and prunes incompatible directory prefixes;
382
+ `glob` also confines its walk to the requested path. A `hint` can explain include filtering or
383
+ pruning, without counting files below unopened directories.
384
+
385
+ Search processes one file at a time. List, glob and search share directory, entry, serialized-output,
386
+ timeout and cancellation budgets, including canonical spelling checks before path authorization.
387
+ `list_directory` caps raw enumeration at the smaller of `maxListEntries` and `maxSearchEntries`;
388
+ its coverage scope lists symlinks while glob/search skip them. Glob patterns are limited to 4,096
389
+ UTF-16 units. A scoped glob measures depth from its requested base directory. In addition to `maxSearchFiles` (10,000), `maxSearchDepth`
390
+ (32), `maxSearchResults` (100) and `maxReadBytes` (262,144), hosts can configure
391
+ `maxSearchDirectories` (1,000 directory-open attempts, root included), `maxSearchEntries`
392
+ (20,000 entries observed by bounded readers), `maxSearchBytes` (16,777,216 aggregate content
393
+ bytes, including rejected UTF-8), `maxSearchOutputBytes` (65,536 bytes for the entire serialized
394
+ UTF-8 JSON, minimum 1,024) and `searchTimeoutMs` (5,000). An input whose minimum coverage
395
+ envelope cannot fit the output ceiling refuses before filesystem access. Directory readers cap
396
+ enumeration before materialization and sorting; reaching an entry or result ceiling is
397
+ conservatively partial, without reading a lookahead entry or match.
398
+
399
+ `list_directory`, `glob` and `search_files` return `coverage.complete` and `coverage.reasons`
400
+ to distinguish full empty results from partial work. Glob `resultTruncated` conservatively marks
401
+ the result ceiling even when no extra match was read.
402
+ Coverage names the include/exclusion/symlink scope, directory and entry counters, actual content
403
+ bytes and elapsed milliseconds. Limits, cancellation, denial, unreadable files and oversized
404
+ lines are explicit reasons. `errors` names only a workspace-relative path, operation and safe code;
405
+ `errorsTruncated` and `deniedTruncated` report shortened diagnostics. Excluded directories and
406
+ symlinks are outside the declared search scope. The caller's signal and deadline reach host
407
+ authorization, file reads and traversal; CPU checkpoints and asynchronous races stop further work.
408
+ Late opened handles are closed, while already-running kernel calls may finish later. Directory
409
+ enumeration and glob matching have internal checkpoints; cancellation stops their producer loops.
410
+ Host policy and visitor exceptions propagate to error hooks with their original cause, rather
411
+ than becoming filesystem diagnostics. Diagnostic byte admission is linear and checks the deadline
412
+ even for an empty result.
413
+
414
+ Regex searches use JavaScript `RegExp` syntax without flags — groups, alternation, classes,
415
+ anchors, `\b`, quantifiers and `(?ims-ims:…)` modifiers — with bounded cost per line. A line
416
+ whose backtracking work (paths × longest path × line length × (number of groups + 1), every
417
+ repetition capped at the line length beyond the iterations it requires) stays within 2^24 steps runs on the native engine, so ordinary `.*` searches over code
418
+ lines keep native speed and the deadline is observed between lines; any other line runs on a
419
+ cached linear automaton, so `(a+)+$` on a long line costs the same as `a+` and the deadline is
420
+ observed inside the line. Backreferences and
421
+ lookaround refuse before I/O; lines over 8,192 UTF-8 bytes are skipped with incomplete coverage.
422
+ Literal queries allow up to 8,192 UTF-16 units and include patterns up to 4,096.
423
+
424
+ With an optional `AgentCodingArtifactStore`, shell output beyond the inline
373
425
  preview continues into an opaque bounded artifact and `read_output` reads slices without
374
426
  exposing a host path. Without a store, the previous finite output-limit behavior is unchanged.
375
427
 
@@ -768,20 +820,3 @@ as `lost`, not misreported as a provider failure.
768
820
  `createAgentChildTools` adds `subagent`, `subagent_fork`, `list_agents`,
769
821
  `send_message` and `interrupt_agent`; final output stays behind its bounded
770
822
  result locator.
771
-
772
- ## Durable order
773
-
774
- `acceptInputAndAssignRun` is one atomic operation. It is followed by ownership
775
- acquisition, revision-checked assistant checkpoints and one terminal CAS. The
776
- process-local coordinator releases its lane only after terminal commit.
777
-
778
- A queued admission is durable immediately, even if its predecessor is still awaiting ownership
779
- or its first checkpoint. Snapshots expose causal turn order rather than physical append order:
780
- the predecessor's assigned input(s) and assistant come before the successor input(s). Execution
781
- uses the same run boundary, so neither `prompt({ snapshot })` nor default/custom history
782
- projection can see inputs assigned to a later run. `inject` remains the explicit path that moves
783
- a successor input into the run already in flight.
784
-
785
- ```text
786
- input + queued run → running → execution settled → terminal CAS → successor
787
- ```
@@ -14,6 +14,8 @@ Parts of this slice:
14
14
 
15
15
  ## `stitchkit/application`
16
16
 
17
+ Construct a directory inbox with `createDirectoryInbox` from `stitchkit/application/directory-inbox`.
18
+
17
19
  `StartFact` also carries `previousDrainUpperBoundMs`: the time from a predecessor's recorded admission stop to this start when its exit is `interrupted`, otherwise `null`. This is an upper bound, and does not identify a kill signal or supervisor deadline.
18
20
 
19
21
 
@@ -39,7 +41,7 @@ cutovers are covered by the executable
39
41
  | `NotificationOutboxItem` / `NotificationOutboxReceipt` / `NotificationOutboxState` / `NotificationSend` / `NotificationFailureClassification` / `DroppedNotification` / `EnqueueNotification` | _type_ | versioned queue records, stable send identity and delivery decisions |
40
42
  | `notificationOutboxStateSchema` | function | strict persisted-state schema over an application payload schema |
41
43
  | `notificationOutboxResource` / `NotificationOutboxResource` / `NotificationOutboxResourceConfig` | function / _type_ | thin managed-resource scheduler over an outbox handle |
42
- | `createDirectoryInbox` (from `stitchkit/application/directory-inbox`) / `DirectoryInbox` / `DirectoryInboxConfig` / `DirectoryInboxDelivery` / `DirectoryInboxResource` | function / _type_ | one managed directory inbox for files or durable `accept({ source, key, entry })` (`entry` is the schema's input, stored as given); a hard-linked file is set aside as `invalid`; first payload wins, bounded capacity/bytes/receipts and renewable fenced leases; delivery begins after readiness and effects remain at least once |
44
+ | `DirectoryInbox` / `DirectoryInboxConfig` / `DirectoryInboxDelivery` / `DirectoryInboxResource` | _type_ | one managed directory inbox for files or durable `accept({ source, key, entry })` (`entry` is the schema's input, stored as given); a hard-linked file is set aside as `invalid`; first payload wins, bounded capacity/bytes/receipts and renewable fenced leases; delivery begins after readiness and effects remain at least once |
43
45
  | `DirectoryInboxIdentitySchema` / `DirectoryInboxIdentity` / `DirectoryInboxAccept` / `DirectoryInboxAcceptResultSchema` / `DirectoryInboxAcceptResult` | schema / _type_ | validated source/key, typed entry and durable accepted/duplicate result with filename; duplicates do not replace the first payload |
44
46
  | `StateStoreUpdateContext` | _type_ | real active protected transaction: `assertHeld()` refuses after ownership loss or completion; custom adapters supply this context to their transition |
45
47
  | `DirectoryInboxStateSchema` / `DirectoryInboxState` / `DirectoryInboxRejection` / `DirectoryInboxRejectionReasonSchema` / `DirectoryInboxRejectionReason` | schema / _type_ | the inbox's claims, receipts and rejections (`invalid`, `too-large`, `attempt-limit`) |
@@ -122,9 +124,10 @@ cutovers are covered by the executable
122
124
 
123
125
  ### Bounded diagnostic journal
124
126
 
127
+ Construct the writer with `createDiagnosticJournal` from `stitchkit/application/diagnostic-journal`.
128
+
125
129
  | Export | Kind | Summary |
126
130
  |--------|------|---------|
127
- | `createDiagnosticJournal` | function | create one schema-owned FIFO JSONL writer with bounded retained memory, exclusive local path ownership and finite rotation |
128
131
  | `DiagnosticJournalConfig` / `DiagnosticJournal` | _type_ | owner schema/path/limits/failure observer, `startupScan` (`tails` by default, or `full`), `onStartupRefusal` (`quarantine` by default, or `fail`) and the synchronous `submit`, bounded-wait `flush`/`close`, status handle |
129
132
  | `DiagnosticJournalLimitsSchema` / `DiagnosticJournalLimits` | schema / _type_ | positive event, pending-item, pending-byte, file-byte and retained-file limits |
130
133
  | `DiagnosticJournalLockPolicySchema` / `DiagnosticJournalLockPolicy` | schema / _type_ | `refuse` (default) or `reclaim-stale`, which reclaims only a lock whose recorded owner is provably gone |
package/llms/contract.txt CHANGED
@@ -567,7 +567,7 @@ from the root `stitchkit`.
567
567
  | `McpProgressUpdate` | _type_ | one mid-call progress update — `message`, and `progress`/`total` when the operation knows a scale |
568
568
  | `McpReportProgress` | _type_ | `ctx.reportProgress` — sends one update to the host that asked for progress; a no-op when none did, and never throws |
569
569
  | `McpRoundOutcome` | _type_ | managed multi-round attempt outcome |
570
- | `EndpointHandlerContext` | _type_ | one endpoint handler's fully inferred params, input, files and runtime context |
570
+ | `HandlerContext` | _type_ | contract handler's fully inferred params, input, files and runtime context |
571
571
  | `EndpointFn` | _type_ | the call signature of one client method |
572
572
  | `TypedClient` | _type_ | the full typed client for a contract |
573
573
  | `TypedHttpClient` | _type_ | the typed client, HTTP endpoints only (`= ScopedHttpClient<C, unknown>`) |
package/llms/process.txt CHANGED
@@ -172,7 +172,9 @@ concurrently or cancel the stream you ignore. Cancelling a stream drops its late
172
172
  command fails or is stopped, both streams error and the bytes still queued are dropped.
173
173
 
174
174
  A command needs a caller `signal` or a finite `timeoutMs` (1 to 2147483647 ms, the native timer
175
- range; a larger value is refused, never turned into 1 ms). Streaming runs for the caller's lifetime,
175
+ range; a larger value is refused, never turned into 1 ms). `timeoutMs` counts from the moment the
176
+ command started. A guarded command (`ownerLoss: 'terminate'`) first starts its guard; that start is
177
+ bounded by `timeoutMs` or 5 seconds, whichever is longer, and does not use the command's budget. Streaming runs for the caller's lifetime,
176
178
  with no hidden 60-second timeout or 1 MiB output limit. `capture` defaults to false; `true` requires
177
179
  `maxOutputBytes` for the combined stdout and stderr. The limit counts source bytes; the API returns
178
180
  `Uint8Array` and does not decode invalid UTF-8. The result holds the observed `exitCode: number | null`
package/llms/server.5.txt CHANGED
@@ -19,6 +19,8 @@ Also read:
19
19
 
20
20
  ## `stitchkit/server`
21
21
 
22
+ `EndpointHandlerContext` is the server endpoint handler’s inferred params, input, files and runtime context.
23
+
22
24
  Server-only. Builds and runs the HTTP server, and carries the server primitives.
23
25
  Also re-exports the error helpers from `stitchkit/contract`.
24
26
 
@@ -92,13 +92,13 @@ own, recorded as an ADR.
92
92
  | `stitchkit/xlsx` | browser **and** server | evolving | a workbook from rows and typed columns, with no dependency; text never runs as a formula |
93
93
  | `stitchkit/oauth` | browser **and** server | evolving | provider-neutral Authorization Code + PKCE request and one-shot callback transaction mechanics |
94
94
  | `stitchkit/google` | server (Bun or Node) | evolving | optional Google code exchange and verified OIDC identity adapter |
95
- | `stitchkit/observability` | server | stable<br>_redefined in 2 of the 65 minors since 0.56.2, most recently 0.92.0_ | request/tool event projections — `createObservability`, trace context, sanitisation |
95
+ | `stitchkit/observability` | server | stable<br>_redefined in 2 of the 66 minors since 0.56.2, most recently 0.92.0_ | request/tool event projections — `createObservability`, trace context, sanitisation |
96
96
  | `stitchkit/testing` | tests on Bun or Node | stable | in-process generated clients over a real Fetch handler, the managed-resource conformance kit and manual time for schedules and retries |
97
97
  | `stitchkit/declaration` | browser + build and deployment tooling (Bun or Node) | evolving | `ProjectDeclarationSchema` — the one machine-readable statement a repository makes about itself |
98
98
  | `stitchkit/react` | browser + server rendering | stable | `createCursorQuery`, `createCacheBridge`, QueryClient and `ApiError` retry policy |
99
99
  | `stitchkit/react/keyboard` | browser | evolving | which part of a screen gets a key — ordered layers, one Escape per level, list zones with real focus; see [keyboard guide](keyboard.md) |
100
100
  | `stitchkit/react/keyboard/testing` | server (Bun or Node) | evolving | the keyboard layers and zones without a DOM — fakes for the window, elements and key events beside the two engines, to test the order of layers, `scope`/`inert` and the edges of a zone in milliseconds |
101
- | `stitchkit/agent-runtime` | server | evolving<br>_redefined in 25 of the 65 minors since 0.56.2, most recently 0.115.0_ | optional durable conversation/run loop, history, models, prompts, fencing and events |
101
+ | `stitchkit/agent-runtime` | server | evolving<br>_redefined in 26 of the 66 minors since 0.56.2, most recently 0.121.0_ | optional durable conversation/run loop, history, models, prompts, fencing and events |
102
102
  | `stitchkit/agent-runtime/sandbox` | server | evolving | optional Linux Bubblewrap sessions, durable workspaces and a host HTTP credential gateway; see [sandbox guide](sandbox.md) |
103
103
  | `stitchkit/agent-runtime/testing` | tests on Bun or Node | evolving | credential-free replay, scripted provider faults, deterministic race controls and the agent-store conformance kit |
104
104
  | `stitchkit/agent-runtime/harness` | server | evolving | resource-aware process-local facade over the canonical Agent runtime; supervision stays outside |
@@ -110,7 +110,7 @@ own, recorded as an ADR.
110
110
  | `stitchkit/agent-runtime/sqlite/bun` | server (Bun) | evolving | durable built-in SQLite store for the agent runtime |
111
111
  | `stitchkit/agent-runtime/sqlite/node` | server (Node ≥ 22.5) | evolving | durable built-in SQLite store for the agent runtime |
112
112
  | `stitchkit-tui` | terminal (Bun) | evolving | optional official OpenTUI host over a caller-composed headless runtime |
113
- | `stitchkit/application` | browser + server | evolving<br>_redefined in 14 of the 65 minors since 0.56.2, most recently 0.110.0_ | managed resource graph, readiness, admission, schedules, subtree restart and bounded shutdown |
113
+ | `stitchkit/application` | browser + server | evolving<br>_redefined in 14 of the 66 minors since 0.56.2, most recently 0.110.0_ | managed resource graph, readiness, admission, schedules, subtree restart and bounded shutdown |
114
114
  | `stitchkit/application/grammy` | server | evolving | a grammY bot as application resources — configuration, then polling with updates admitted by batch — and the webhook adapter |
115
115
  | `stitchkit/application/opentelemetry` | server | evolving | maps application snapshots onto an injected OpenTelemetry `Meter` |
116
116
  | `stitchkit/application/schemas` | browser + server | evolving | the application's snapshot, health and shutdown schemas alone, without the kernel |
@@ -1,14 +1,64 @@
1
- # Upgrading 0.106.0 → 0.120.0 — stitchkit docs slice
1
+ # Upgrading 0.106.0 → 0.121.0 — stitchkit docs slice
2
2
 
3
3
  > Generated from the `docs/` tree by `bun run gen:llms`. The index of all slices is
4
4
  > `llms.txt` in this package.
5
5
 
6
- Contains: Guide: Upgrading, 0.106.0 → 0.120.0 (docs/guide/upgrading.md)
6
+ Contains: Guide: Upgrading, 0.106.0 → 0.121.0 (docs/guide/upgrading.md)
7
7
 
8
8
  ==============================================================================
9
- # Guide: Upgrading, 0.106.0 → 0.120.0 (docs/guide/upgrading.md)
9
+ # Guide: Upgrading, 0.106.0 → 0.121.0 (docs/guide/upgrading.md)
10
10
  ==============================================================================
11
11
 
12
+ ## Released migration: 0.121.0
13
+
14
+ ### bounded-coding-search
15
+
16
+ **Who must act:** hosts that construct a complete `AgentCodingToolLimits` value, inspect exact
17
+ `list_directory`, `glob` or `search_files` output objects, rely on symlink cwd aliases, call `glob` on a path that may not exist, or send regex named backreferences or counted repetition above 1,000.
18
+
19
+ Partial `limits` still fill finite defaults. Complete values add:
20
+
21
+ ```ts
22
+ maxSearchDirectories: 1_000,
23
+ maxSearchEntries: 20_000,
24
+ maxSearchBytes: 16_777_216,
25
+ maxSearchOutputBytes: 65_536,
26
+ searchTimeoutMs: 5_000,
27
+ ```
28
+
29
+ Read `coverage.complete` on list, glob and search before interpreting an empty result.
30
+ List raw enumeration is also capped by `maxListEntries`; glob patterns have a 4,096-unit ceiling.
31
+ The ordinary command cwd is a pinned directory, so descendant symlink cwd aliases are refused;
32
+ use the real relative directory name. Custom sandbox launchers own atomic cwd capture.
33
+ `coverage.reasons` names stopped
34
+ budgets, cancellation, denial, unreadable files and lines beyond the searchable byte ceiling.
35
+ `coverage.scope` names the workspace-relative include, exclusion policy and symlink policy;
36
+ directory/entry/read-byte counters report work reached by the bounded reader. Denied and error
37
+ lists can themselves be truncated. The entire UTF-8 JSON result fits `maxSearchOutputBytes`
38
+ (minimum 1,024); an input whose minimum envelope cannot fit refuses before I/O.
39
+
40
+ Regex queries keep JavaScript syntax, `(?ims-ims:…)` modifiers and Annex B forms, and their
41
+ cost is bounded per line: a line whose backtracking work, repetition capped at the line's length,
42
+ stays within 2^24 steps runs natively, any other line in linear time. Named backreferences,
43
+ counted repetition above 1,000 and patterns needing the automaton with more than 16,384 automaton states, 65,536
44
+ construction steps (nested repetition of an empty group such as `(?:(?:){1000}){1000}`) or
45
+ 4,194,304 overlapping character-set memberships now return `BAD_REQUEST`
46
+ before authorization or file access, as
47
+ numbered backreferences and lookaround already did. Spell the repeated text out, for example
48
+ replace `{ query: '(?<w>ab)\\k<w>', regex: true }` with `{ query: '(ab)ab', regex: true }`.
49
+
50
+ `glob` with a `path` that is missing, a file or a symlink now refuses (`NOT_FOUND` or
51
+ `BAD_REQUEST`, with a hint) instead of returning no paths; treat that refusal as "nothing
52
+ there". `run_command` refuses such a `cwd` the same way.
53
+
54
+ Glob matching preserves `**`, `*`, `?` and literal punctuation, including embedded `**`.
55
+ A pattern that prunes directories may produce an explanatory `hint` without counting unseen
56
+ files. `glob` confines traversal to its requested path and viable pattern prefixes.
57
+
58
+ Traversal checks cancellation and deadlines at CPU checkpoints and races asynchronous waits.
59
+ Late opened handles are closed; in-flight operating-system calls are not claimed to be interrupted.
60
+ Reaching an entry or result ceiling conservatively reports partial coverage without a lookahead.
61
+
12
62
  ## Released migration: 0.120.0
13
63
 
14
64
  ### tools-barrel-subpaths
@@ -11,7 +11,7 @@ Contains: Guide: Upgrading, general (docs/guide/upgrading.md)
11
11
 
12
12
  Load this slice, then every range slice between your installed version and the target:
13
13
 
14
- - 0.106.0 → 0.120.0: `llms/upgrading-0.106.0-0.120.0.txt`
14
+ - 0.106.0 → 0.121.0: `llms/upgrading-0.106.0-0.121.0.txt`
15
15
  - 0.96.0 → 0.105.0: `llms/upgrading-0.96.0-0.105.0.txt`
16
16
  - 0.69.0 → 0.95.0: `llms/upgrading-0.69.0-0.95.0.txt`
17
17
  - 0.55.0 → 0.68.0: `llms/upgrading-0.55.0-0.68.0.txt`
package/llms-full.txt CHANGED
@@ -84,13 +84,13 @@ own, recorded as an ADR.
84
84
  | `stitchkit/xlsx` | browser **and** server | evolving | a workbook from rows and typed columns, with no dependency; text never runs as a formula |
85
85
  | `stitchkit/oauth` | browser **and** server | evolving | provider-neutral Authorization Code + PKCE request and one-shot callback transaction mechanics |
86
86
  | `stitchkit/google` | server (Bun or Node) | evolving | optional Google code exchange and verified OIDC identity adapter |
87
- | `stitchkit/observability` | server | stable<br>_redefined in 2 of the 65 minors since 0.56.2, most recently 0.92.0_ | request/tool event projections — `createObservability`, trace context, sanitisation |
87
+ | `stitchkit/observability` | server | stable<br>_redefined in 2 of the 66 minors since 0.56.2, most recently 0.92.0_ | request/tool event projections — `createObservability`, trace context, sanitisation |
88
88
  | `stitchkit/testing` | tests on Bun or Node | stable | in-process generated clients over a real Fetch handler, the managed-resource conformance kit and manual time for schedules and retries |
89
89
  | `stitchkit/declaration` | browser + build and deployment tooling (Bun or Node) | evolving | `ProjectDeclarationSchema` — the one machine-readable statement a repository makes about itself |
90
90
  | `stitchkit/react` | browser + server rendering | stable | `createCursorQuery`, `createCacheBridge`, QueryClient and `ApiError` retry policy |
91
91
  | `stitchkit/react/keyboard` | browser | evolving | which part of a screen gets a key — ordered layers, one Escape per level, list zones with real focus; see [keyboard guide](keyboard.md) |
92
92
  | `stitchkit/react/keyboard/testing` | server (Bun or Node) | evolving | the keyboard layers and zones without a DOM — fakes for the window, elements and key events beside the two engines, to test the order of layers, `scope`/`inert` and the edges of a zone in milliseconds |
93
- | `stitchkit/agent-runtime` | server | evolving<br>_redefined in 25 of the 65 minors since 0.56.2, most recently 0.115.0_ | optional durable conversation/run loop, history, models, prompts, fencing and events |
93
+ | `stitchkit/agent-runtime` | server | evolving<br>_redefined in 26 of the 66 minors since 0.56.2, most recently 0.121.0_ | optional durable conversation/run loop, history, models, prompts, fencing and events |
94
94
  | `stitchkit/agent-runtime/sandbox` | server | evolving | optional Linux Bubblewrap sessions, durable workspaces and a host HTTP credential gateway; see [sandbox guide](sandbox.md) |
95
95
  | `stitchkit/agent-runtime/testing` | tests on Bun or Node | evolving | credential-free replay, scripted provider faults, deterministic race controls and the agent-store conformance kit |
96
96
  | `stitchkit/agent-runtime/harness` | server | evolving | resource-aware process-local facade over the canonical Agent runtime; supervision stays outside |
@@ -102,7 +102,7 @@ own, recorded as an ADR.
102
102
  | `stitchkit/agent-runtime/sqlite/bun` | server (Bun) | evolving | durable built-in SQLite store for the agent runtime |
103
103
  | `stitchkit/agent-runtime/sqlite/node` | server (Node ≥ 22.5) | evolving | durable built-in SQLite store for the agent runtime |
104
104
  | `stitchkit-tui` | terminal (Bun) | evolving | optional official OpenTUI host over a caller-composed headless runtime |
105
- | `stitchkit/application` | browser + server | evolving<br>_redefined in 14 of the 65 minors since 0.56.2, most recently 0.110.0_ | managed resource graph, readiness, admission, schedules, subtree restart and bounded shutdown |
105
+ | `stitchkit/application` | browser + server | evolving<br>_redefined in 14 of the 66 minors since 0.56.2, most recently 0.110.0_ | managed resource graph, readiness, admission, schedules, subtree restart and bounded shutdown |
106
106
  | `stitchkit/application/grammy` | server | evolving | a grammY bot as application resources — configuration, then polling with updates admitted by batch — and the webhook adapter |
107
107
  | `stitchkit/application/opentelemetry` | server | evolving | maps application snapshots onto an injected OpenTelemetry `Meter` |
108
108
  | `stitchkit/application/schemas` | browser + server | evolving | the application's snapshot, health and shutdown schemas alone, without the kernel |
@@ -5800,14 +5800,26 @@ outermost first, stopping at the first refusal; discovery rooted at `.` also ask
5800
5800
  Thus denying `credentials` denies everything
5801
5801
  under it. The comparison is segment-wise, so it does not deny `credentials-backup`, and a path of
5802
5802
  depth N costs N questions for direct access. Directory decisions happen before descent; file decisions and
5803
- `search_files.include` happen before opening content. Requested paths use `/`: a backslash is
5803
+ `search_files.include` happen before opening content. Incompatible glob directory prefixes are
5804
+ pruned before policy or directory opens. Requested paths use `/`: a backslash is
5804
5805
  refused rather than normalised, because the workspace walk reads it as a separator and every
5805
5806
  authorization callback would otherwise be asked about a different decomposition than the one opened. File paths are relative, bounded and contained after
5806
5807
  descriptor-relative resolution: each ancestor is opened without following symlinks. Reads and edits
5807
5808
  stay pinned through authorization; `write_file` plans before it and opens the parent after, because
5808
5809
  the parent it creates does not exist yet. Reads revalidate the pinned file identity;
5809
5810
  writes and patches revalidate the pinned parent identity; search and resource discovery descend
5810
- only through opened directories. A path that changed during authorization refuses with `CONFLICT`.
5811
+ only through opened directories. Every filesystem tool selects its root capability before operation or path authorization and retains
5812
+ that identity if a callback replaces the root path or configured alias. On Linux the ordinary
5813
+ command launcher spawns the command with the pinned directory's `/proc` descriptor link as its cwd;
5814
+ on macOS it inherits the pinned cwd through an isolated guard — one short-lived guard process per
5815
+ command, tens of milliseconds, outside `shellTimeoutMs`, which counts from the command's start. The
5816
+ application process never changes cwd. Where
5817
+ contained descriptors are unavailable (Windows), `run_command` accepts a cwd whose realpath is
5818
+ that same name under the root — a symlink segment refuses there too — and checks the directory's
5819
+ identity again immediately before launch, after every host decision.
5820
+ A custom sandbox launcher owns atomic cwd capture at its pathname handoff; the SDK refuses a
5821
+ changed identity after policy/prepare and immediately before that handoff. A path that changed
5822
+ during direct-access authorization refuses with `CONFLICT`.
5811
5823
  A path spelled differently from the name stored on disk refuses before any policy reads it, so on a
5812
5824
  case-insensitive volume a rule on `credentials` cannot be passed by asking for `CREDENTIALS`.
5813
5825
  NUL bytes are refused before either host policy sees a path.
@@ -5861,11 +5873,51 @@ crosses a process boundary and is rebuilt from the wire.
5861
5873
  excluded directory is not "no files", and a model told only "nothing found" concludes the wrong
5862
5874
  thing. `search_files` takes `regex`, `context` lines and an anchored `include` pattern matched
5863
5875
  against the whole workspace-relative path. `*` does not cross `/`, so files in subdirectories need
5864
- `**/`; `scannedFiles` counts files admitted by both that filter and host authorization. A `hint`
5865
- explains the zero only when the filter produced it, rejecting every file the scan reached; an empty
5866
- tree and a host refusal return the same empty result without blaming the pattern. Regex is bounded by
5867
- refusing backreferences and lookaround and capping line length rather than by a timeout, because a
5868
- JavaScript `RegExp` cannot be interrupted once it starts backtracking. With an optional `AgentCodingArtifactStore`, shell output beyond the inline
5876
+ `**/`; `scannedFiles` counts files admitted by both that filter and host authorization that reached
5877
+ comparison. One finite glob automaton matches files and prunes incompatible directory prefixes;
5878
+ `glob` also confines its walk to the requested path. A `hint` can explain include filtering or
5879
+ pruning, without counting files below unopened directories.
5880
+
5881
+ Search processes one file at a time. List, glob and search share directory, entry, serialized-output,
5882
+ timeout and cancellation budgets, including canonical spelling checks before path authorization.
5883
+ `list_directory` caps raw enumeration at the smaller of `maxListEntries` and `maxSearchEntries`;
5884
+ its coverage scope lists symlinks while glob/search skip them. Glob patterns are limited to 4,096
5885
+ UTF-16 units. A scoped glob measures depth from its requested base directory. In addition to `maxSearchFiles` (10,000), `maxSearchDepth`
5886
+ (32), `maxSearchResults` (100) and `maxReadBytes` (262,144), hosts can configure
5887
+ `maxSearchDirectories` (1,000 directory-open attempts, root included), `maxSearchEntries`
5888
+ (20,000 entries observed by bounded readers), `maxSearchBytes` (16,777,216 aggregate content
5889
+ bytes, including rejected UTF-8), `maxSearchOutputBytes` (65,536 bytes for the entire serialized
5890
+ UTF-8 JSON, minimum 1,024) and `searchTimeoutMs` (5,000). An input whose minimum coverage
5891
+ envelope cannot fit the output ceiling refuses before filesystem access. Directory readers cap
5892
+ enumeration before materialization and sorting; reaching an entry or result ceiling is
5893
+ conservatively partial, without reading a lookahead entry or match.
5894
+
5895
+ `list_directory`, `glob` and `search_files` return `coverage.complete` and `coverage.reasons`
5896
+ to distinguish full empty results from partial work. Glob `resultTruncated` conservatively marks
5897
+ the result ceiling even when no extra match was read.
5898
+ Coverage names the include/exclusion/symlink scope, directory and entry counters, actual content
5899
+ bytes and elapsed milliseconds. Limits, cancellation, denial, unreadable files and oversized
5900
+ lines are explicit reasons. `errors` names only a workspace-relative path, operation and safe code;
5901
+ `errorsTruncated` and `deniedTruncated` report shortened diagnostics. Excluded directories and
5902
+ symlinks are outside the declared search scope. The caller's signal and deadline reach host
5903
+ authorization, file reads and traversal; CPU checkpoints and asynchronous races stop further work.
5904
+ Late opened handles are closed, while already-running kernel calls may finish later. Directory
5905
+ enumeration and glob matching have internal checkpoints; cancellation stops their producer loops.
5906
+ Host policy and visitor exceptions propagate to error hooks with their original cause, rather
5907
+ than becoming filesystem diagnostics. Diagnostic byte admission is linear and checks the deadline
5908
+ even for an empty result.
5909
+
5910
+ Regex searches use JavaScript `RegExp` syntax without flags — groups, alternation, classes,
5911
+ anchors, `\b`, quantifiers and `(?ims-ims:…)` modifiers — with bounded cost per line. A line
5912
+ whose backtracking work (paths × longest path × line length × (number of groups + 1), every
5913
+ repetition capped at the line length beyond the iterations it requires) stays within 2^24 steps runs on the native engine, so ordinary `.*` searches over code
5914
+ lines keep native speed and the deadline is observed between lines; any other line runs on a
5915
+ cached linear automaton, so `(a+)+$` on a long line costs the same as `a+` and the deadline is
5916
+ observed inside the line. Backreferences and
5917
+ lookaround refuse before I/O; lines over 8,192 UTF-8 bytes are skipped with incomplete coverage.
5918
+ Literal queries allow up to 8,192 UTF-16 units and include patterns up to 4,096.
5919
+
5920
+ With an optional `AgentCodingArtifactStore`, shell output beyond the inline
5869
5921
  preview continues into an opaque bounded artifact and `read_output` reads slices without
5870
5922
  exposing a host path. Without a store, the previous finite output-limit behavior is unchanged.
5871
5923
 
@@ -8913,7 +8965,9 @@ concurrently or cancel the stream you ignore. Cancelling a stream drops its late
8913
8965
  command fails or is stopped, both streams error and the bytes still queued are dropped.
8914
8966
 
8915
8967
  A command needs a caller `signal` or a finite `timeoutMs` (1 to 2147483647 ms, the native timer
8916
- range; a larger value is refused, never turned into 1 ms). Streaming runs for the caller's lifetime,
8968
+ range; a larger value is refused, never turned into 1 ms). `timeoutMs` counts from the moment the
8969
+ command started. A guarded command (`ownerLoss: 'terminate'`) first starts its guard; that start is
8970
+ bounded by `timeoutMs` or 5 seconds, whichever is longer, and does not use the command's budget. Streaming runs for the caller's lifetime,
8917
8971
  with no hidden 60-second timeout or 1 MiB output limit. `capture` defaults to false; `true` requires
8918
8972
  `maxOutputBytes` for the combined stdout and stderr. The limit counts source bytes; the API returns
8919
8973
  `Uint8Array` and does not decode invalid UTF-8. The result holds the observed `exitCode: number | null`
@@ -17149,6 +17203,56 @@ charts, no merged cells and no streaming: an application that needs them takes a
17149
17203
 
17150
17204
  # Upgrading stitchkit
17151
17205
 
17206
+ ## Released migration: 0.121.0
17207
+
17208
+ ### bounded-coding-search
17209
+
17210
+ **Who must act:** hosts that construct a complete `AgentCodingToolLimits` value, inspect exact
17211
+ `list_directory`, `glob` or `search_files` output objects, rely on symlink cwd aliases, call `glob` on a path that may not exist, or send regex named backreferences or counted repetition above 1,000.
17212
+
17213
+ Partial `limits` still fill finite defaults. Complete values add:
17214
+
17215
+ ```ts
17216
+ maxSearchDirectories: 1_000,
17217
+ maxSearchEntries: 20_000,
17218
+ maxSearchBytes: 16_777_216,
17219
+ maxSearchOutputBytes: 65_536,
17220
+ searchTimeoutMs: 5_000,
17221
+ ```
17222
+
17223
+ Read `coverage.complete` on list, glob and search before interpreting an empty result.
17224
+ List raw enumeration is also capped by `maxListEntries`; glob patterns have a 4,096-unit ceiling.
17225
+ The ordinary command cwd is a pinned directory, so descendant symlink cwd aliases are refused;
17226
+ use the real relative directory name. Custom sandbox launchers own atomic cwd capture.
17227
+ `coverage.reasons` names stopped
17228
+ budgets, cancellation, denial, unreadable files and lines beyond the searchable byte ceiling.
17229
+ `coverage.scope` names the workspace-relative include, exclusion policy and symlink policy;
17230
+ directory/entry/read-byte counters report work reached by the bounded reader. Denied and error
17231
+ lists can themselves be truncated. The entire UTF-8 JSON result fits `maxSearchOutputBytes`
17232
+ (minimum 1,024); an input whose minimum envelope cannot fit refuses before I/O.
17233
+
17234
+ Regex queries keep JavaScript syntax, `(?ims-ims:…)` modifiers and Annex B forms, and their
17235
+ cost is bounded per line: a line whose backtracking work, repetition capped at the line's length,
17236
+ stays within 2^24 steps runs natively, any other line in linear time. Named backreferences,
17237
+ counted repetition above 1,000 and patterns needing the automaton with more than 16,384 automaton states, 65,536
17238
+ construction steps (nested repetition of an empty group such as `(?:(?:){1000}){1000}`) or
17239
+ 4,194,304 overlapping character-set memberships now return `BAD_REQUEST`
17240
+ before authorization or file access, as
17241
+ numbered backreferences and lookaround already did. Spell the repeated text out, for example
17242
+ replace `{ query: '(?<w>ab)\\k<w>', regex: true }` with `{ query: '(ab)ab', regex: true }`.
17243
+
17244
+ `glob` with a `path` that is missing, a file or a symlink now refuses (`NOT_FOUND` or
17245
+ `BAD_REQUEST`, with a hint) instead of returning no paths; treat that refusal as "nothing
17246
+ there". `run_command` refuses such a `cwd` the same way.
17247
+
17248
+ Glob matching preserves `**`, `*`, `?` and literal punctuation, including embedded `**`.
17249
+ A pattern that prunes directories may produce an explanatory `hint` without counting unseen
17250
+ files. `glob` confines traversal to its requested path and viable pattern prefixes.
17251
+
17252
+ Traversal checks cancellation and deadlines at CPU checkpoints and races asynchronous waits.
17253
+ Late opened handles are closed; in-flight operating-system calls are not claimed to be interrupted.
17254
+ Reaching an entry or result ceiling conservatively reports partial coverage without a lookahead.
17255
+
17152
17256
  ## Released migration: 0.120.0
17153
17257
 
17154
17258
  ### tools-barrel-subpaths
@@ -22625,7 +22729,7 @@ from the root `stitchkit`.
22625
22729
  | `McpProgressUpdate` | _type_ | one mid-call progress update — `message`, and `progress`/`total` when the operation knows a scale |
22626
22730
  | `McpReportProgress` | _type_ | `ctx.reportProgress` — sends one update to the host that asked for progress; a no-op when none did, and never throws |
22627
22731
  | `McpRoundOutcome` | _type_ | managed multi-round attempt outcome |
22628
- | `EndpointHandlerContext` | _type_ | one endpoint handler's fully inferred params, input, files and runtime context |
22732
+ | `HandlerContext` | _type_ | contract handler's fully inferred params, input, files and runtime context |
22629
22733
  | `EndpointFn` | _type_ | the call signature of one client method |
22630
22734
  | `TypedClient` | _type_ | the full typed client for a contract |
22631
22735
  | `TypedHttpClient` | _type_ | the typed client, HTTP endpoints only (`= ScopedHttpClient<C, unknown>`) |
@@ -22780,6 +22884,8 @@ schedules, transports and file generation remain application-owned.
22780
22884
 
22781
22885
  ## `stitchkit/server`
22782
22886
 
22887
+ `EndpointHandlerContext` is the server endpoint handler’s inferred params, input, files and runtime context.
22888
+
22783
22889
  Server-only. Builds and runs the HTTP server, and carries the server primitives.
22784
22890
  Also re-exports the error helpers from `stitchkit/contract`.
22785
22891
 
@@ -23016,6 +23122,8 @@ lane never reaches the hooks on either runtime.
23016
23122
 
23017
23123
  ## `stitchkit/application`
23018
23124
 
23125
+ Construct a directory inbox with `createDirectoryInbox` from `stitchkit/application/directory-inbox`.
23126
+
23019
23127
  `StartFact` also carries `previousDrainUpperBoundMs`: the time from a predecessor's recorded admission stop to this start when its exit is `interrupted`, otherwise `null`. This is an upper bound, and does not identify a kill signal or supervisor deadline.
23020
23128
 
23021
23129
 
@@ -23041,7 +23149,7 @@ cutovers are covered by the executable
23041
23149
  | `NotificationOutboxItem` / `NotificationOutboxReceipt` / `NotificationOutboxState` / `NotificationSend` / `NotificationFailureClassification` / `DroppedNotification` / `EnqueueNotification` | _type_ | versioned queue records, stable send identity and delivery decisions |
23042
23150
  | `notificationOutboxStateSchema` | function | strict persisted-state schema over an application payload schema |
23043
23151
  | `notificationOutboxResource` / `NotificationOutboxResource` / `NotificationOutboxResourceConfig` | function / _type_ | thin managed-resource scheduler over an outbox handle |
23044
- | `createDirectoryInbox` (from `stitchkit/application/directory-inbox`) / `DirectoryInbox` / `DirectoryInboxConfig` / `DirectoryInboxDelivery` / `DirectoryInboxResource` | function / _type_ | one managed directory inbox for files or durable `accept({ source, key, entry })` (`entry` is the schema's input, stored as given); a hard-linked file is set aside as `invalid`; first payload wins, bounded capacity/bytes/receipts and renewable fenced leases; delivery begins after readiness and effects remain at least once |
23152
+ | `DirectoryInbox` / `DirectoryInboxConfig` / `DirectoryInboxDelivery` / `DirectoryInboxResource` | _type_ | one managed directory inbox for files or durable `accept({ source, key, entry })` (`entry` is the schema's input, stored as given); a hard-linked file is set aside as `invalid`; first payload wins, bounded capacity/bytes/receipts and renewable fenced leases; delivery begins after readiness and effects remain at least once |
23045
23153
  | `DirectoryInboxIdentitySchema` / `DirectoryInboxIdentity` / `DirectoryInboxAccept` / `DirectoryInboxAcceptResultSchema` / `DirectoryInboxAcceptResult` | schema / _type_ | validated source/key, typed entry and durable accepted/duplicate result with filename; duplicates do not replace the first payload |
23046
23154
  | `StateStoreUpdateContext` | _type_ | real active protected transaction: `assertHeld()` refuses after ownership loss or completion; custom adapters supply this context to their transition |
23047
23155
  | `DirectoryInboxStateSchema` / `DirectoryInboxState` / `DirectoryInboxRejection` / `DirectoryInboxRejectionReasonSchema` / `DirectoryInboxRejectionReason` | schema / _type_ | the inbox's claims, receipts and rejections (`invalid`, `too-large`, `attempt-limit`) |
@@ -23124,9 +23232,10 @@ cutovers are covered by the executable
23124
23232
 
23125
23233
  ### Bounded diagnostic journal
23126
23234
 
23235
+ Construct the writer with `createDiagnosticJournal` from `stitchkit/application/diagnostic-journal`.
23236
+
23127
23237
  | Export | Kind | Summary |
23128
23238
  |--------|------|---------|
23129
- | `createDiagnosticJournal` | function | create one schema-owned FIFO JSONL writer with bounded retained memory, exclusive local path ownership and finite rotation |
23130
23239
  | `DiagnosticJournalConfig` / `DiagnosticJournal` | _type_ | owner schema/path/limits/failure observer, `startupScan` (`tails` by default, or `full`), `onStartupRefusal` (`quarantine` by default, or `fail`) and the synchronous `submit`, bounded-wait `flush`/`close`, status handle |
23131
23240
  | `DiagnosticJournalLimitsSchema` / `DiagnosticJournalLimits` | schema / _type_ | positive event, pending-item, pending-byte, file-byte and retained-file limits |
23132
23241
  | `DiagnosticJournalLockPolicySchema` / `DiagnosticJournalLockPolicy` | schema / _type_ | `refuse` (default) or `reclaim-stale`, which reclaims only a lock whose recorded owner is provably gone |
@@ -23732,28 +23841,28 @@ artifact store is supplied, `read_output`.
23732
23841
  | Export | Kind | Summary |
23733
23842
  |--------|------|---------|
23734
23843
  | `createAgentCodingTools` | function | construct direct host-authorized bounded file, listing, glob, search, exact-snippet edit, shell and artifact runtime-tool definitions; `edit_file` inserts `newText` literally in both single and `replaceAll` modes; every ordinary refusal is a typed code with an instructive `hint`, and filesystem operations use Linux `/proc/self/fd` or the packaged macOS Node-API backend and otherwise fail closed |
23735
- | `AGENT_CODING_TOOL_NAMES` | const | the mounted tool names — `read_file`, `write_file`, `edit_file`, `list_directory`, `glob`, `search_files`, `run_command`, `read_output` |
23736
23844
  | `AgentCodingToolDefinition` | _type_ | peer-free structural direct-tool shape accepted by the canonical runtime-tool surface |
23737
23845
  | `AgentCodingToolConfig` | _type_ | absolute root, required operation authorization, optional async/sync `authorizePath({ path })` shared by direct file effects and discovery, finite executable alias map, exact child environment and optional limits |
23738
23846
  | `AgentCodingToolAuthorizationSchema` / `AgentCodingToolAuthorization` | schema / _type_ | discriminated read/write/search/patch/shell/artifact decision presented to host policy before effect |
23739
23847
  | `AgentCodingToolPathAuthorizationSchema` / `AgentCodingToolPathAuthorization` | schema / _type_ | strict workspace-relative path presented to the shared path policy before disclosure, opening or mutation |
23740
- | `AgentCodingToolLimitsSchema` / `AgentCodingToolLimits` | schema / _type_ | explicit path/read/write/argument-count/argument-byte/output/artifact/timeout/termination-grace ceilings |
23848
+ | `AgentCodingToolLimitsSchema` / `AgentCodingToolLimits` | schema / _type_ | explicit path/read/write/argument-count/argument-byte/output/artifact/timeout/termination-grace ceilings; shared discovery directory/entry/serialized-output/deadline ceilings, aggregate search-read ceiling and measured coverage |
23741
23849
  | `AgentCodingArtifactStore` | _type_ | host-owned opaque artifact write and bounded read boundary |
23742
- | `FileReadInputSchema` / `FileReadOutputSchema` | schema | bounded strict-UTF-8 byte slice; offsets must align with UTF-8 code-point boundaries |
23743
- | `FileWriteInputSchema` / `FileWriteOutputSchema` | schema | create-only by default or explicit atomic replacement; symlink targets fail closed |
23744
- | `createShellInputSchema` / `ShellOutputSchema` | schema | enumerated executable alias plus arguments and concrete relative cwd; explicit exited/timeout/output-limit/cancelled outcome |
23745
23850
 
23746
- File/search operations pin directory descriptors across authorization and the actual effect;
23851
+ File/search operations select a root descriptor before both policy callback kinds and pin directory descriptors across authorization and the actual effect;
23747
23852
  resource discovery uses the same ancestor-safe traversal. This closes parent rename/symlink races
23748
- without claiming an executable sandbox. The default ceilings are 4,096 path bytes, 256 KiB read/write/output, 128 shell arguments, 64 KiB
23853
+ without claiming an executable sandbox. The ordinary command launcher passes a pinned cwd to its
23854
+ isolated guard (inherited fd 4); a custom sandbox launcher owns atomic capture of its pathname cwd. List/glob/search report coverage; canonical spelling work consumes the same budget. List raw entries
23855
+ are capped by maxListEntries and maxSearchEntries, and glob patterns by 4,096 UTF-16 units.
23856
+ The default ceilings are 4,096 path bytes, 256 KiB read/write/output, 128 shell arguments, 64 KiB
23749
23857
  of aggregate argument text, 4 MiB per artifact and 30 seconds. The root is a path-resolution
23750
23858
  boundary, not an OS sandbox; executable behavior, process
23751
23859
  isolation, credentials and external-effect idempotency remain host responsibilities.
23752
23860
 
23753
23861
  When `authorizePath` denies a path, direct read/write/edit returns `FORBIDDEN`, while
23754
23862
  `list_directory`, `glob` and `search_files` omit it. Denial is recursive: direct access and
23755
- discovery base paths are checked against `.` and every ancestor, outermost first and segment-wise,
23756
- so denying `credentials` denies `credentials/token.txt` but not `credentials-backup`. Directory
23863
+ discovery base paths check every named ancestor, outermost first and segment-wise; `.` is
23864
+ checked only when the requested base itself is `.`, so subtree allowlists remain usable. Thus
23865
+ denying `credentials` denies `credentials/token.txt` but not `credentials-backup`. Directory
23757
23866
  admission happens before descent and file admission before opening; `search_files.include` is also
23758
23867
  applied before content is read. Requested paths must use `/` — a backslash is refused, because the
23759
23868
  containment walk reads it as a separator while a callback would read it as one name.
package/llms.txt CHANGED
@@ -26,9 +26,9 @@ Load the slice for each entrypoint your code imports — `import … from 'stitc
26
26
  - **stitchkit/remote**: [llms/remote.txt](llms/remote.txt) 1.0 KB
27
27
  - **stitchkit/contract**: [llms/contract.txt](llms/contract.txt) 33.8 KB
28
28
  - **stitchkit/primitives**: [llms/primitives.txt](llms/primitives.txt) 13.2 KB
29
- - **stitchkit/server**: [llms/server.txt](llms/server.txt) 44.2 KB → [llms/server.2.txt](llms/server.2.txt) 20.9 KB → [llms/server.3.txt](llms/server.3.txt) 47.0 KB → [llms/server.4.txt](llms/server.4.txt) 38.6 KB → [llms/server.5.txt](llms/server.5.txt) 23.1 KB
29
+ - **stitchkit/server**: [llms/server.txt](llms/server.txt) 44.2 KB → [llms/server.2.txt](llms/server.2.txt) 20.9 KB → [llms/server.3.txt](llms/server.3.txt) 47.0 KB → [llms/server.4.txt](llms/server.4.txt) 38.6 KB → [llms/server.5.txt](llms/server.5.txt) 23.2 KB
30
30
  - **stitchkit/observability**: [llms/observability.txt](llms/observability.txt) 46.9 KB
31
- - **stitchkit/agent-runtime**: [llms/agent-runtime.txt](llms/agent-runtime.txt) 44.3 KB → [llms/agent-runtime.2.txt](llms/agent-runtime.2.txt) 46.8 KB → [llms/agent-runtime.3.txt](llms/agent-runtime.3.txt) 39.7 KB → [llms/agent-runtime.4.txt](llms/agent-runtime.4.txt) 11.7 KB
31
+ - **stitchkit/agent-runtime**: [llms/agent-runtime.txt](llms/agent-runtime.txt) 47.6 KB → [llms/agent-runtime.2.txt](llms/agent-runtime.2.txt) 47.6 KB → [llms/agent-runtime.3.txt](llms/agent-runtime.3.txt) 39.7 KB → [llms/agent-runtime.4.txt](llms/agent-runtime.4.txt) 11.7 KB
32
32
  - **stitchkit/agent-runtime/testing**: [llms/agent-runtime-testing.txt](llms/agent-runtime-testing.txt) 2.6 KB
33
33
  - **stitchkit/agent-runtime/harness**: [llms/agent-runtime-harness.txt](llms/agent-runtime-harness.txt) 11.0 KB
34
34
  - **stitchkit/agent-runtime/coding-tools**: [llms/agent-runtime-coding-tools.txt](llms/agent-runtime-coding-tools.txt) 5.0 KB
@@ -64,7 +64,7 @@ Load the slice for each entrypoint your code imports — `import … from 'stitc
64
64
  - **stitchkit/node**: [llms/node.txt](llms/node.txt) 3.1 KB
65
65
  - **stitchkit/agent-runtime/react**: [llms/agent-runtime-react.txt](llms/agent-runtime-react.txt) 1.0 KB
66
66
  - **stitchkit/agent-runtime/realtime**: [llms/agent-runtime-realtime.txt](llms/agent-runtime-realtime.txt) 2.6 KB
67
- - **stitchkit/process**: [llms/process.txt](llms/process.txt) 44.5 KB → [llms/process.2.txt](llms/process.2.txt) 4.3 KB
67
+ - **stitchkit/process**: [llms/process.txt](llms/process.txt) 44.7 KB → [llms/process.2.txt](llms/process.2.txt) 4.3 KB
68
68
  - **stitchkit/process/owner-loss**: [llms/process-owner-loss.txt](llms/process-owner-loss.txt) 0.9 KB
69
69
  - **stitchkit/files/packaging**: [llms/files-packaging.txt](llms/files-packaging.txt) 3.5 KB
70
70
  - **stitchkit/http**: [llms/http.txt](llms/http.txt) 0.9 KB
@@ -72,7 +72,7 @@ Load the slice for each entrypoint your code imports — `import … from 'stitc
72
72
 
73
73
  ## Upgrading slices
74
74
  - **Upgrading — how to move across versions**: [llms/upgrading.txt](llms/upgrading.txt) 12.7 KB
75
- - **Upgrading 0.106.0 → 0.120.0**: [llms/upgrading-0.106.0-0.120.0.txt](llms/upgrading-0.106.0-0.120.0.txt) 30.5 KB
75
+ - **Upgrading 0.106.0 → 0.121.0**: [llms/upgrading-0.106.0-0.121.0.txt](llms/upgrading-0.106.0-0.121.0.txt) 33.4 KB
76
76
  - **Upgrading 0.96.0 → 0.105.0**: [llms/upgrading-0.96.0-0.105.0.txt](llms/upgrading-0.96.0-0.105.0.txt) 45.8 KB
77
77
  - **Upgrading 0.69.0 → 0.95.0**: [llms/upgrading-0.69.0-0.95.0.txt](llms/upgrading-0.69.0-0.95.0.txt) 46.6 KB
78
78
  - **Upgrading 0.55.0 → 0.68.0**: [llms/upgrading-0.55.0-0.68.0.txt](llms/upgrading-0.55.0-0.68.0.txt) 47.0 KB