stitchkit 0.120.0 → 0.122.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.
- package/CHANGELOG.md +83 -0
- package/dist/agent-runtime/browser-control-contract.d.ts +12 -0
- package/dist/agent-runtime/browser-control-contract.d.ts.map +1 -1
- package/dist/agent-runtime/coding-discovery.d.ts +25 -0
- package/dist/agent-runtime/coding-discovery.d.ts.map +1 -0
- package/dist/agent-runtime/coding-search-automaton.d.ts +37 -0
- package/dist/agent-runtime/coding-search-automaton.d.ts.map +1 -0
- package/dist/agent-runtime/coding-search-case-fold.d.ts +4 -0
- package/dist/agent-runtime/coding-search-case-fold.d.ts.map +1 -0
- package/dist/agent-runtime/coding-search-class-ranges.d.ts +10 -0
- package/dist/agent-runtime/coding-search-class-ranges.d.ts.map +1 -0
- package/dist/agent-runtime/coding-search-contract.d.ts +86 -0
- package/dist/agent-runtime/coding-search-contract.d.ts.map +1 -0
- package/dist/agent-runtime/coding-search-limits.d.ts +13 -0
- package/dist/agent-runtime/coding-search-limits.d.ts.map +1 -0
- package/dist/agent-runtime/coding-search-matcher.d.ts +33 -0
- package/dist/agent-runtime/coding-search-matcher.d.ts.map +1 -0
- package/dist/agent-runtime/coding-search-output.d.ts +5 -0
- package/dist/agent-runtime/coding-search-output.d.ts.map +1 -0
- package/dist/agent-runtime/coding-search-regex-syntax.d.ts +39 -0
- package/dist/agent-runtime/coding-search-regex-syntax.d.ts.map +1 -0
- package/dist/agent-runtime/coding-search-unit-classes.d.ts +31 -0
- package/dist/agent-runtime/coding-search-unit-classes.d.ts.map +1 -0
- package/dist/agent-runtime/coding-shell-process.d.ts +1 -0
- package/dist/agent-runtime/coding-shell-process.d.ts.map +1 -1
- package/dist/agent-runtime/coding-tool-contract.d.ts +8 -3
- package/dist/agent-runtime/coding-tool-contract.d.ts.map +1 -1
- package/dist/agent-runtime/coding-tool-files.d.ts.map +1 -1
- package/dist/agent-runtime/coding-tool-listing.d.ts +1 -11
- package/dist/agent-runtime/coding-tool-listing.d.ts.map +1 -1
- package/dist/agent-runtime/coding-tool-paths.d.ts +6 -2
- package/dist/agent-runtime/coding-tool-paths.d.ts.map +1 -1
- package/dist/agent-runtime/coding-tool-refusals.d.ts +6 -0
- package/dist/agent-runtime/coding-tool-refusals.d.ts.map +1 -1
- package/dist/agent-runtime/coding-tool-search-patch.d.ts.map +1 -1
- package/dist/agent-runtime/coding-tool-search.d.ts +113 -0
- package/dist/agent-runtime/coding-tool-search.d.ts.map +1 -0
- package/dist/agent-runtime/coding-tool-shell.d.ts.map +1 -1
- package/dist/agent-runtime/contained-scan-budget.d.ts +32 -0
- package/dist/agent-runtime/contained-scan-budget.d.ts.map +1 -0
- package/dist/agent-runtime/contained-scan-contract.d.ts +52 -0
- package/dist/agent-runtime/contained-scan-contract.d.ts.map +1 -0
- package/dist/agent-runtime/contained-scan.d.ts +48 -13
- package/dist/agent-runtime/contained-scan.d.ts.map +1 -1
- package/dist/agent-runtime/control-schema.d.ts +27 -4
- package/dist/agent-runtime/control-schema.d.ts.map +1 -1
- package/dist/agent-runtime/event-schema.d.ts +33 -0
- package/dist/agent-runtime/event-schema.d.ts.map +1 -1
- package/dist/agent-runtime/run-acquisition.d.ts.map +1 -1
- package/dist/agent-runtime/run-execution-state.d.ts +6 -0
- package/dist/agent-runtime/run-execution-state.d.ts.map +1 -1
- package/dist/agent-runtime/run-model-attempts.d.ts.map +1 -1
- package/dist/agent-runtime/run-stream-parts.d.ts +11 -0
- package/dist/agent-runtime/run-stream-parts.d.ts.map +1 -1
- package/dist/agent-runtime/sandbox.d.ts +5 -1
- package/dist/agent-runtime/sandbox.d.ts.map +1 -1
- package/dist/agent-runtime/tool-progress.d.ts +21 -0
- package/dist/agent-runtime/tool-progress.d.ts.map +1 -0
- package/dist/agent-runtime/workspace-glob.d.ts +6 -0
- package/dist/agent-runtime/workspace-glob.d.ts.map +1 -0
- package/dist/entrypoints/agent-runtime/browser.js +7 -3
- package/dist/entrypoints/agent-runtime/coding-tools.js +7 -7
- package/dist/entrypoints/agent-runtime/harness.js +8 -8
- package/dist/entrypoints/agent-runtime/realtime.js +5 -5
- package/dist/entrypoints/agent-runtime/sandbox.js +7 -7
- package/dist/entrypoints/agent-runtime/sqlite/bun.js +9 -9
- package/dist/entrypoints/agent-runtime/sqlite/node.js +9 -9
- package/dist/entrypoints/agent-runtime/testing.js +9 -9
- package/dist/entrypoints/agent-runtime.d.ts +1 -1
- package/dist/entrypoints/agent-runtime.d.ts.map +1 -1
- package/dist/entrypoints/agent-runtime.js +15 -13
- package/dist/entrypoints/application/diagnostic-journal.js +3 -3
- package/dist/entrypoints/application/directory-inbox.js +5 -5
- package/dist/entrypoints/cli/publish.js +4 -4
- package/dist/entrypoints/cli.js +4 -4
- package/dist/entrypoints/files.js +4 -4
- package/dist/entrypoints/process/owner-loss.js +2 -1
- package/dist/entrypoints/process.js +4 -4
- package/dist/entrypoints/server.d.ts +1 -0
- package/dist/entrypoints/server.d.ts.map +1 -1
- package/dist/entrypoints/server.js +112 -47
- package/dist/entrypoints/telegram.js +3 -3
- package/dist/entrypoints/tools/agent.js +1 -1
- package/dist/entrypoints/tools/toolkit.js +5 -5
- package/dist/{index-yb9n4pgj.js → index-10rg78vf.js} +1 -1
- package/dist/{index-7zwtbak8.js → index-1fyea34p.js} +9 -4
- package/dist/{index-3yb5kft5.js → index-4tyt1qya.js} +1 -1
- package/dist/{index-8xyf8h2k.js → index-6j15ktag.js} +1 -1
- package/dist/{index-zrdcmg6j.js → index-72xtvcvr.js} +40 -6
- package/dist/{index-4qnzda76.js → index-7qyv50r4.js} +1 -1
- package/dist/{index-qctbzmg9.js → index-am1h8c9v.js} +69 -27
- package/dist/{index-e452syyh.js → index-aqmadanx.js} +2 -2
- package/dist/{index-yt7gyg5x.js → index-b51tzcgh.js} +1 -1
- package/dist/{index-aw6zahv1.js → index-dqpesdck.js} +2 -2
- package/dist/{index-1jwsfkfz.js → index-eeahxwvg.js} +60 -76
- package/dist/{index-sb9dr3tq.js → index-eh71zr32.js} +4 -4
- package/dist/{index-nyyam9ce.js → index-f6pw75e1.js} +1 -1
- package/dist/{index-qevqn3d3.js → index-gq3fnq3f.js} +1 -1
- package/dist/{index-bz479f0x.js → index-gtx3eknx.js} +1 -1
- package/dist/{index-mnkk1ffz.js → index-hs76yzt7.js} +13 -1
- package/dist/{index-nn9qvkww.js → index-j95jp7ee.js} +45 -9
- package/dist/{index-2kbysk9s.js → index-m5m9rmvt.js} +2 -0
- package/dist/{index-r3db01kh.js → index-nwm3ww60.js} +1 -1
- package/dist/index-qaqxdbxf.js +2857 -0
- package/dist/index-s9a0fjh3.js +305 -0
- package/dist/{index-b0w7rbpt.js → index-t05a2ry4.js} +39 -3
- package/dist/{index-pq2m7t46.js → index-v8yqk4w7.js} +22 -8
- package/dist/internal/contained-directory.d.ts +1 -1
- package/dist/internal/contained-directory.d.ts.map +1 -1
- package/dist/internal/contained-files.d.ts +18 -51
- package/dist/internal/contained-files.d.ts.map +1 -1
- package/dist/internal/contained-read.d.ts +17 -0
- package/dist/internal/contained-read.d.ts.map +1 -0
- package/dist/internal/darwin-binding.d.ts +3 -1
- package/dist/internal/darwin-binding.d.ts.map +1 -1
- package/dist/process/bun-child.d.ts.map +1 -1
- package/dist/process/command-owner.d.ts.map +1 -1
- package/dist/process/group.d.ts +2 -0
- package/dist/process/group.d.ts.map +1 -1
- package/dist/process/launch.d.ts +1 -0
- package/dist/process/launch.d.ts.map +1 -1
- package/dist/process/owned-child.d.ts.map +1 -1
- package/dist/process/owner-loss-guard.d.ts.map +1 -1
- package/dist/process/owner-loss-protocol.d.ts +1 -0
- package/dist/process/owner-loss-protocol.d.ts.map +1 -1
- package/dist/server/openapi-security.d.ts +73 -0
- package/dist/server/openapi-security.d.ts.map +1 -0
- package/dist/server/openapi.d.ts +12 -0
- package/dist/server/openapi.d.ts.map +1 -1
- package/dist/tools/agent.d.ts.map +1 -1
- package/dist/tools/cli/format.d.ts +11 -2
- package/dist/tools/cli/format.d.ts.map +1 -1
- package/dist/tools/cli/repeatable-read.d.ts +9 -0
- package/dist/tools/cli/repeatable-read.d.ts.map +1 -0
- package/dist/tools/cli/run-managed.d.ts.map +1 -1
- package/dist/tools/cli/run-native.d.ts.map +1 -1
- package/dist/tools/runtime-call-context.d.ts +15 -0
- package/dist/tools/runtime-call-context.d.ts.map +1 -0
- package/llms/agent-runtime-browser.txt +4 -1
- package/llms/agent-runtime-coding-tools.txt +9 -9
- package/llms/agent-runtime.2.txt +30 -108
- package/llms/agent-runtime.3.txt +111 -1
- package/llms/agent-runtime.txt +59 -24
- package/llms/application.3.txt +5 -2
- package/llms/cli.txt +21 -9
- package/llms/contract.txt +1 -1
- package/llms/process.txt +3 -1
- package/llms/server.2.txt +48 -0
- package/llms/server.5.txt +4 -0
- package/llms/stitchkit.txt +3 -3
- package/llms/tools.txt +4 -1
- package/llms/{upgrading-0.106.0-0.120.0.txt → upgrading-0.106.0-0.122.0.txt} +81 -3
- package/llms/upgrading.txt +1 -1
- package/llms-full.txt +255 -35
- package/llms.txt +7 -7
- package/native/darwin-arm64.node +0 -0
- package/native/darwin-x64.node +0 -0
- package/native-assets.json +4 -4
- package/package.json +2 -1
- package/dist/index-0qyrcjfs.js +0 -1478
- package/dist/index-aa50qwv4.js +0 -107
- package/dist/tools/durability-context.d.ts +0 -7
- package/dist/tools/durability-context.d.ts.map +0 -1
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
|
|
87
|
+
| `stitchkit/observability` | server | stable<br>_redefined in 2 of the 67 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
|
|
93
|
+
| `stitchkit/agent-runtime` | server | evolving<br>_redefined in 26 of the 67 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
|
|
105
|
+
| `stitchkit/application` | browser + server | evolving<br>_redefined in 14 of the 67 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 |
|
|
@@ -2698,6 +2698,54 @@ const internal = openApiRoute('/internal/openapi.json', fullDoc) // behind aut
|
|
|
2698
2698
|
const publicSpec = openApiRoute('/openapi.json', publicDoc) // curated
|
|
2699
2699
|
```
|
|
2700
2700
|
|
|
2701
|
+
### Security schemes — `security`
|
|
2702
|
+
|
|
2703
|
+
A generic client reads the spec to learn how to authenticate, and a scope name
|
|
2704
|
+
alone does not tell it which header to send. Pass `security` to describe that in
|
|
2705
|
+
standard OpenAPI terms: named schemes become `components.securitySchemes`, and
|
|
2706
|
+
every protected operation gets a `security` requirement. It is keyed by the
|
|
2707
|
+
scopes your contracts already declare, so there is no second list of which
|
|
2708
|
+
endpoint is protected:
|
|
2709
|
+
|
|
2710
|
+
```ts
|
|
2711
|
+
const publicDoc = generateOpenApiDocument({
|
|
2712
|
+
info: { title: 'Public API', version: '1.0.0' },
|
|
2713
|
+
services: [account],
|
|
2714
|
+
includeMethod: (m) => m.meta?.public === true,
|
|
2715
|
+
security: {
|
|
2716
|
+
schemes: {
|
|
2717
|
+
apiKey: { type: 'http', scheme: 'bearer', description: 'An account API key' },
|
|
2718
|
+
},
|
|
2719
|
+
// Each protected scope → the schemes that satisfy it, any one of them.
|
|
2720
|
+
scopes: { account: ['apiKey'] },
|
|
2721
|
+
},
|
|
2722
|
+
})
|
|
2723
|
+
```
|
|
2724
|
+
|
|
2725
|
+
A scheme is `{ type: 'http', scheme: 'bearer' | 'basic' }` or
|
|
2726
|
+
`{ type: 'apiKey', in: 'header' | 'query' | 'cookie', name }` (a session cookie
|
|
2727
|
+
is the `cookie` form). An operation is described by the scope the auth hook
|
|
2728
|
+
checks it under:
|
|
2729
|
+
|
|
2730
|
+
| The operation's scope | In the document |
|
|
2731
|
+
|---|---|
|
|
2732
|
+
| `'public'` | no `security`, no 401/403 |
|
|
2733
|
+
| listed in `scopes` with schemes | `security: [{ apiKey: [] }, …]` and 401/403 |
|
|
2734
|
+
| listed with an empty list — a custom scope whose rule is `'public'` | no `security`, no 401/403 |
|
|
2735
|
+
| not listed | generation throws, naming the operation |
|
|
2736
|
+
| none of its own | read as `defaultScope` — pass the same value as `createAuthHook({ defaultScope })` |
|
|
2737
|
+
|
|
2738
|
+
Generation refuses a protected scope it cannot describe instead of emitting the
|
|
2739
|
+
operation as open — a client would otherwise call it without a credential. Only
|
|
2740
|
+
the operations the document advertises need a mapping: a method `includeMethod`
|
|
2741
|
+
filters out is never checked. A scheme `scopes` names but `schemes` does not
|
|
2742
|
+
declare, and an entry for `'public'`, are refused the same way.
|
|
2743
|
+
|
|
2744
|
+
The metadata describes your policy; it does not enforce it. The auth hook is
|
|
2745
|
+
still the only gate, and removing `security` changes the document, never a
|
|
2746
|
+
401 or 403. Credential values never belong here: describe where the key goes,
|
|
2747
|
+
not what it is.
|
|
2748
|
+
|
|
2701
2749
|
|
|
2702
2750
|
==============================================================================
|
|
2703
2751
|
# Guide: Typed client (docs/guide/client.md)
|
|
@@ -4315,7 +4363,10 @@ render: async (ctx) => {
|
|
|
4315
4363
|
|
|
4316
4364
|
`reportProgress` is present on every **tool** call — MCP, agent and CLI — so a
|
|
4317
4365
|
handler never branches on transport, and it does nothing wherever nobody is
|
|
4318
|
-
listening.
|
|
4366
|
+
listening. Under the agent runtime somebody is: each report becomes a transient
|
|
4367
|
+
`tool-progress` event of the run, so the person watching the agent sees the
|
|
4368
|
+
stage while the model still reads only the tool's result (see
|
|
4369
|
+
[Agent runtime → events](./agent-runtime.md)). It is absent on the HTTP transport, which has no channel for it, so a
|
|
4319
4370
|
handler that also serves HTTP writes `ctx.reportProgress?.(…)`. It never throws and never
|
|
4320
4371
|
rejects: a message about work must not be able to kill the work it describes, so
|
|
4321
4372
|
a refused notification leaves the host exactly where a host that never asked for
|
|
@@ -5800,14 +5851,26 @@ outermost first, stopping at the first refusal; discovery rooted at `.` also ask
|
|
|
5800
5851
|
Thus denying `credentials` denies everything
|
|
5801
5852
|
under it. The comparison is segment-wise, so it does not deny `credentials-backup`, and a path of
|
|
5802
5853
|
depth N costs N questions for direct access. Directory decisions happen before descent; file decisions and
|
|
5803
|
-
`search_files.include` happen before opening content.
|
|
5854
|
+
`search_files.include` happen before opening content. Incompatible glob directory prefixes are
|
|
5855
|
+
pruned before policy or directory opens. Requested paths use `/`: a backslash is
|
|
5804
5856
|
refused rather than normalised, because the workspace walk reads it as a separator and every
|
|
5805
5857
|
authorization callback would otherwise be asked about a different decomposition than the one opened. File paths are relative, bounded and contained after
|
|
5806
5858
|
descriptor-relative resolution: each ancestor is opened without following symlinks. Reads and edits
|
|
5807
5859
|
stay pinned through authorization; `write_file` plans before it and opens the parent after, because
|
|
5808
5860
|
the parent it creates does not exist yet. Reads revalidate the pinned file identity;
|
|
5809
5861
|
writes and patches revalidate the pinned parent identity; search and resource discovery descend
|
|
5810
|
-
only through opened directories.
|
|
5862
|
+
only through opened directories. Every filesystem tool selects its root capability before operation or path authorization and retains
|
|
5863
|
+
that identity if a callback replaces the root path or configured alias. On Linux the ordinary
|
|
5864
|
+
command launcher spawns the command with the pinned directory's `/proc` descriptor link as its cwd;
|
|
5865
|
+
on macOS it inherits the pinned cwd through an isolated guard — one short-lived guard process per
|
|
5866
|
+
command, tens of milliseconds, outside `shellTimeoutMs`, which counts from the command's start. The
|
|
5867
|
+
application process never changes cwd. Where
|
|
5868
|
+
contained descriptors are unavailable (Windows), `run_command` accepts a cwd whose realpath is
|
|
5869
|
+
that same name under the root — a symlink segment refuses there too — and checks the directory's
|
|
5870
|
+
identity again immediately before launch, after every host decision.
|
|
5871
|
+
A custom sandbox launcher owns atomic cwd capture at its pathname handoff; the SDK refuses a
|
|
5872
|
+
changed identity after policy/prepare and immediately before that handoff. A path that changed
|
|
5873
|
+
during direct-access authorization refuses with `CONFLICT`.
|
|
5811
5874
|
A path spelled differently from the name stored on disk refuses before any policy reads it, so on a
|
|
5812
5875
|
case-insensitive volume a rule on `credentials` cannot be passed by asking for `CREDENTIALS`.
|
|
5813
5876
|
NUL bytes are refused before either host policy sees a path.
|
|
@@ -5861,11 +5924,51 @@ crosses a process boundary and is rebuilt from the wire.
|
|
|
5861
5924
|
excluded directory is not "no files", and a model told only "nothing found" concludes the wrong
|
|
5862
5925
|
thing. `search_files` takes `regex`, `context` lines and an anchored `include` pattern matched
|
|
5863
5926
|
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
|
|
5865
|
-
|
|
5866
|
-
|
|
5867
|
-
|
|
5868
|
-
|
|
5927
|
+
`**/`; `scannedFiles` counts files admitted by both that filter and host authorization that reached
|
|
5928
|
+
comparison. One finite glob automaton matches files and prunes incompatible directory prefixes;
|
|
5929
|
+
`glob` also confines its walk to the requested path. A `hint` can explain include filtering or
|
|
5930
|
+
pruning, without counting files below unopened directories.
|
|
5931
|
+
|
|
5932
|
+
Search processes one file at a time. List, glob and search share directory, entry, serialized-output,
|
|
5933
|
+
timeout and cancellation budgets, including canonical spelling checks before path authorization.
|
|
5934
|
+
`list_directory` caps raw enumeration at the smaller of `maxListEntries` and `maxSearchEntries`;
|
|
5935
|
+
its coverage scope lists symlinks while glob/search skip them. Glob patterns are limited to 4,096
|
|
5936
|
+
UTF-16 units. A scoped glob measures depth from its requested base directory. In addition to `maxSearchFiles` (10,000), `maxSearchDepth`
|
|
5937
|
+
(32), `maxSearchResults` (100) and `maxReadBytes` (262,144), hosts can configure
|
|
5938
|
+
`maxSearchDirectories` (1,000 directory-open attempts, root included), `maxSearchEntries`
|
|
5939
|
+
(20,000 entries observed by bounded readers), `maxSearchBytes` (16,777,216 aggregate content
|
|
5940
|
+
bytes, including rejected UTF-8), `maxSearchOutputBytes` (65,536 bytes for the entire serialized
|
|
5941
|
+
UTF-8 JSON, minimum 1,024) and `searchTimeoutMs` (5,000). An input whose minimum coverage
|
|
5942
|
+
envelope cannot fit the output ceiling refuses before filesystem access. Directory readers cap
|
|
5943
|
+
enumeration before materialization and sorting; reaching an entry or result ceiling is
|
|
5944
|
+
conservatively partial, without reading a lookahead entry or match.
|
|
5945
|
+
|
|
5946
|
+
`list_directory`, `glob` and `search_files` return `coverage.complete` and `coverage.reasons`
|
|
5947
|
+
to distinguish full empty results from partial work. Glob `resultTruncated` conservatively marks
|
|
5948
|
+
the result ceiling even when no extra match was read.
|
|
5949
|
+
Coverage names the include/exclusion/symlink scope, directory and entry counters, actual content
|
|
5950
|
+
bytes and elapsed milliseconds. Limits, cancellation, denial, unreadable files and oversized
|
|
5951
|
+
lines are explicit reasons. `errors` names only a workspace-relative path, operation and safe code;
|
|
5952
|
+
`errorsTruncated` and `deniedTruncated` report shortened diagnostics. Excluded directories and
|
|
5953
|
+
symlinks are outside the declared search scope. The caller's signal and deadline reach host
|
|
5954
|
+
authorization, file reads and traversal; CPU checkpoints and asynchronous races stop further work.
|
|
5955
|
+
Late opened handles are closed, while already-running kernel calls may finish later. Directory
|
|
5956
|
+
enumeration and glob matching have internal checkpoints; cancellation stops their producer loops.
|
|
5957
|
+
Host policy and visitor exceptions propagate to error hooks with their original cause, rather
|
|
5958
|
+
than becoming filesystem diagnostics. Diagnostic byte admission is linear and checks the deadline
|
|
5959
|
+
even for an empty result.
|
|
5960
|
+
|
|
5961
|
+
Regex searches use JavaScript `RegExp` syntax without flags — groups, alternation, classes,
|
|
5962
|
+
anchors, `\b`, quantifiers and `(?ims-ims:…)` modifiers — with bounded cost per line. A line
|
|
5963
|
+
whose backtracking work (paths × longest path × line length × (number of groups + 1), every
|
|
5964
|
+
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
|
|
5965
|
+
lines keep native speed and the deadline is observed between lines; any other line runs on a
|
|
5966
|
+
cached linear automaton, so `(a+)+$` on a long line costs the same as `a+` and the deadline is
|
|
5967
|
+
observed inside the line. Backreferences and
|
|
5968
|
+
lookaround refuse before I/O; lines over 8,192 UTF-8 bytes are skipped with incomplete coverage.
|
|
5969
|
+
Literal queries allow up to 8,192 UTF-16 units and include patterns up to 4,096.
|
|
5970
|
+
|
|
5971
|
+
With an optional `AgentCodingArtifactStore`, shell output beyond the inline
|
|
5869
5972
|
preview continues into an opaque bounded artifact and `read_output` reads slices without
|
|
5870
5973
|
exposing a host path. Without a store, the previous finite output-limit behavior is unchanged.
|
|
5871
5974
|
|
|
@@ -6733,6 +6836,19 @@ or it keeps the failed attempt's partial text on screen.
|
|
|
6733
6836
|
start and output on completion. A mounted typed failure carries the same safe
|
|
6734
6837
|
`{ error, retryable, details?, _hint? }` envelope as the durable result; an unknown
|
|
6735
6838
|
internal cause remains generic and stays in local observability only;
|
|
6839
|
+
- `tool-progress` is transient: what a running tool handler reported through
|
|
6840
|
+
`ctx.reportProgress` — `message`, `progress` and `total`, the fields an MCP host
|
|
6841
|
+
receives — with the call's `callId` and `toolName`. It never enters the
|
|
6842
|
+
model's input or the durable history. A message longer than
|
|
6843
|
+
`AGENT_TOOL_PROGRESS_MESSAGE_MAX` (280) is cut, reports of one call closer
|
|
6844
|
+
than 250 ms apart are dropped, and a report after the call's terminal
|
|
6845
|
+
`tool-status` or after its attempt was abandoned is dropped; the terminal
|
|
6846
|
+
status carries the final word. `reduceAgentControlEvent` keeps the last
|
|
6847
|
+
report of each running call in `transientByRun[runId].tools[callId]` and
|
|
6848
|
+
removes it on that call's `completed`, `failed` or `interrupted`. The runtime
|
|
6849
|
+
hands its reporter to a call through the SDK tool context, beside its step
|
|
6850
|
+
ledger; a tool that declares its own `contextSchema` keeps that contract and
|
|
6851
|
+
reports nowhere;
|
|
6736
6852
|
- `terminal` follows the winning terminal CAS.
|
|
6737
6853
|
|
|
6738
6854
|
`loop.checkpointEveryEvents` batches ordinary stream parts (default `20`) and
|
|
@@ -8913,7 +9029,9 @@ concurrently or cancel the stream you ignore. Cancelling a stream drops its late
|
|
|
8913
9029
|
command fails or is stopped, both streams error and the bytes still queued are dropped.
|
|
8914
9030
|
|
|
8915
9031
|
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).
|
|
9032
|
+
range; a larger value is refused, never turned into 1 ms). `timeoutMs` counts from the moment the
|
|
9033
|
+
command started. A guarded command (`ownerLoss: 'terminate'`) first starts its guard; that start is
|
|
9034
|
+
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
9035
|
with no hidden 60-second timeout or 1 MiB output limit. `capture` defaults to false; `true` requires
|
|
8918
9036
|
`maxOutputBytes` for the combined stdout and stderr. The limit counts source bytes; the API returns
|
|
8919
9037
|
`Uint8Array` and does not decode invalid UTF-8. The result holds the observed `exitCode: number | null`
|
|
@@ -10713,15 +10831,27 @@ Rules worth knowing before you rely on them:
|
|
|
10713
10831
|
A failed call still reports its own error and exit code. An aggregate over an
|
|
10714
10832
|
error is not an answer to the question that was asked.
|
|
10715
10833
|
|
|
10716
|
-
If the command succeeds but its requested view cannot be built, the CLI writes
|
|
10717
|
-
|
|
10718
|
-
|
|
10719
|
-
`
|
|
10720
|
-
|
|
10721
|
-
|
|
10722
|
-
|
|
10723
|
-
|
|
10724
|
-
|
|
10834
|
+
If the command succeeds but its requested view cannot be built, the CLI writes a
|
|
10835
|
+
structured `CLI_PRESENTATION_FAILED` diagnostic to stderr and exits with `8`,
|
|
10836
|
+
configurable through `exitCodes`. Its `details.operationSucceeded: true` and
|
|
10837
|
+
`retryable: false` distinguish a presentation refusal from a failed operation;
|
|
10838
|
+
`details.cause` preserves the safe reason, such as the misspelled field and the
|
|
10839
|
+
fields that are there. Domain retry hints are not appended to this diagnostic.
|
|
10840
|
+
|
|
10841
|
+
What reaches stdout depends on whether the command can be called again for its answer,
|
|
10842
|
+
and `details.resultOnStdout` states which case occurred:
|
|
10843
|
+
|
|
10844
|
+
| Command | stdout | Recover the answer by |
|
|
10845
|
+
|---|---|---|
|
|
10846
|
+
| has an effect | the complete original result in the normal JSON format (`--json` still selects compact output) | reading stdout — never by repeating the mutation |
|
|
10847
|
+
| only reads | nothing | repeating the command with a corrected view |
|
|
10848
|
+
|
|
10849
|
+
A managed command only reads when its tool declares `annotations.readOnlyHint: true`,
|
|
10850
|
+
or declares no `readOnlyHint` and its method is `GET`. `readOnlyHint: false` on a `GET`
|
|
10851
|
+
endpoint keeps the result on stdout. A native `defineCliCommand` declares neither fact,
|
|
10852
|
+
so a failed `present` always keeps the validated result on stdout.
|
|
10853
|
+
|
|
10854
|
+
CLI argument errors detected before execution still exit with `2`
|
|
10725
10855
|
and have no successful result to preserve.
|
|
10726
10856
|
|
|
10727
10857
|
## Named profiles
|
|
@@ -17149,6 +17279,84 @@ charts, no merged cells and no streaming: an application that needs them takes a
|
|
|
17149
17279
|
|
|
17150
17280
|
# Upgrading stitchkit
|
|
17151
17281
|
|
|
17282
|
+
## Released migration: 0.122.0
|
|
17283
|
+
|
|
17284
|
+
### read-view-refusal
|
|
17285
|
+
|
|
17286
|
+
**Who must act:** scripts and agents that read stdout after a managed CLI command exits with
|
|
17287
|
+
`CLI_PRESENTATION_FAILED` (`8` by default) when that command is a `GET` endpoint or a tool
|
|
17288
|
+
declaring `annotations.readOnlyHint: true`. Commands with an effect and native
|
|
17289
|
+
`defineCliCommand` presenters change nothing.
|
|
17290
|
+
|
|
17291
|
+
A read no longer prints its complete result when the requested view is refused; stdout is
|
|
17292
|
+
empty and the diagnostic carries `details.resultOnStdout: false`.
|
|
17293
|
+
|
|
17294
|
+
```sh
|
|
17295
|
+
# before: the full list arrived on stdout beside the diagnostic
|
|
17296
|
+
app user_list --table id,nosuchcolumn > users.json # exit 8, users.json holds every record
|
|
17297
|
+
|
|
17298
|
+
# after: repeat the read with a field the diagnostic names
|
|
17299
|
+
app user_list --table id,nosuchcolumn # exit 8, stdout empty
|
|
17300
|
+
app user_list --table id,name
|
|
17301
|
+
```
|
|
17302
|
+
|
|
17303
|
+
A `GET` endpoint whose call has an effect that must not be repeated declares it, and keeps
|
|
17304
|
+
its result on stdout:
|
|
17305
|
+
|
|
17306
|
+
```ts
|
|
17307
|
+
tool: { name: 'token_rotate', annotations: { readOnlyHint: false } }
|
|
17308
|
+
```
|
|
17309
|
+
|
|
17310
|
+
## Released migration: 0.121.0
|
|
17311
|
+
|
|
17312
|
+
### bounded-coding-search
|
|
17313
|
+
|
|
17314
|
+
**Who must act:** hosts that construct a complete `AgentCodingToolLimits` value, inspect exact
|
|
17315
|
+
`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.
|
|
17316
|
+
|
|
17317
|
+
Partial `limits` still fill finite defaults. Complete values add:
|
|
17318
|
+
|
|
17319
|
+
```ts
|
|
17320
|
+
maxSearchDirectories: 1_000,
|
|
17321
|
+
maxSearchEntries: 20_000,
|
|
17322
|
+
maxSearchBytes: 16_777_216,
|
|
17323
|
+
maxSearchOutputBytes: 65_536,
|
|
17324
|
+
searchTimeoutMs: 5_000,
|
|
17325
|
+
```
|
|
17326
|
+
|
|
17327
|
+
Read `coverage.complete` on list, glob and search before interpreting an empty result.
|
|
17328
|
+
List raw enumeration is also capped by `maxListEntries`; glob patterns have a 4,096-unit ceiling.
|
|
17329
|
+
The ordinary command cwd is a pinned directory, so descendant symlink cwd aliases are refused;
|
|
17330
|
+
use the real relative directory name. Custom sandbox launchers own atomic cwd capture.
|
|
17331
|
+
`coverage.reasons` names stopped
|
|
17332
|
+
budgets, cancellation, denial, unreadable files and lines beyond the searchable byte ceiling.
|
|
17333
|
+
`coverage.scope` names the workspace-relative include, exclusion policy and symlink policy;
|
|
17334
|
+
directory/entry/read-byte counters report work reached by the bounded reader. Denied and error
|
|
17335
|
+
lists can themselves be truncated. The entire UTF-8 JSON result fits `maxSearchOutputBytes`
|
|
17336
|
+
(minimum 1,024); an input whose minimum envelope cannot fit refuses before I/O.
|
|
17337
|
+
|
|
17338
|
+
Regex queries keep JavaScript syntax, `(?ims-ims:…)` modifiers and Annex B forms, and their
|
|
17339
|
+
cost is bounded per line: a line whose backtracking work, repetition capped at the line's length,
|
|
17340
|
+
stays within 2^24 steps runs natively, any other line in linear time. Named backreferences,
|
|
17341
|
+
counted repetition above 1,000 and patterns needing the automaton with more than 16,384 automaton states, 65,536
|
|
17342
|
+
construction steps (nested repetition of an empty group such as `(?:(?:){1000}){1000}`) or
|
|
17343
|
+
4,194,304 overlapping character-set memberships now return `BAD_REQUEST`
|
|
17344
|
+
before authorization or file access, as
|
|
17345
|
+
numbered backreferences and lookaround already did. Spell the repeated text out, for example
|
|
17346
|
+
replace `{ query: '(?<w>ab)\\k<w>', regex: true }` with `{ query: '(ab)ab', regex: true }`.
|
|
17347
|
+
|
|
17348
|
+
`glob` with a `path` that is missing, a file or a symlink now refuses (`NOT_FOUND` or
|
|
17349
|
+
`BAD_REQUEST`, with a hint) instead of returning no paths; treat that refusal as "nothing
|
|
17350
|
+
there". `run_command` refuses such a `cwd` the same way.
|
|
17351
|
+
|
|
17352
|
+
Glob matching preserves `**`, `*`, `?` and literal punctuation, including embedded `**`.
|
|
17353
|
+
A pattern that prunes directories may produce an explanatory `hint` without counting unseen
|
|
17354
|
+
files. `glob` confines traversal to its requested path and viable pattern prefixes.
|
|
17355
|
+
|
|
17356
|
+
Traversal checks cancellation and deadlines at CPU checkpoints and races asynchronous waits.
|
|
17357
|
+
Late opened handles are closed; in-flight operating-system calls are not claimed to be interrupted.
|
|
17358
|
+
Reaching an entry or result ceiling conservatively reports partial coverage without a lookahead.
|
|
17359
|
+
|
|
17152
17360
|
## Released migration: 0.120.0
|
|
17153
17361
|
|
|
17154
17362
|
### tools-barrel-subpaths
|
|
@@ -22625,7 +22833,7 @@ from the root `stitchkit`.
|
|
|
22625
22833
|
| `McpProgressUpdate` | _type_ | one mid-call progress update — `message`, and `progress`/`total` when the operation knows a scale |
|
|
22626
22834
|
| `McpReportProgress` | _type_ | `ctx.reportProgress` — sends one update to the host that asked for progress; a no-op when none did, and never throws |
|
|
22627
22835
|
| `McpRoundOutcome` | _type_ | managed multi-round attempt outcome |
|
|
22628
|
-
| `
|
|
22836
|
+
| `HandlerContext` | _type_ | contract handler's fully inferred params, input, files and runtime context |
|
|
22629
22837
|
| `EndpointFn` | _type_ | the call signature of one client method |
|
|
22630
22838
|
| `TypedClient` | _type_ | the full typed client for a contract |
|
|
22631
22839
|
| `TypedHttpClient` | _type_ | the typed client, HTTP endpoints only (`= ScopedHttpClient<C, unknown>`) |
|
|
@@ -22780,6 +22988,8 @@ schedules, transports and file generation remain application-owned.
|
|
|
22780
22988
|
|
|
22781
22989
|
## `stitchkit/server`
|
|
22782
22990
|
|
|
22991
|
+
`EndpointHandlerContext` is the server endpoint handler’s inferred params, input, files and runtime context.
|
|
22992
|
+
|
|
22783
22993
|
Server-only. Builds and runs the HTTP server, and carries the server primitives.
|
|
22784
22994
|
Also re-exports the error helpers from `stitchkit/contract`.
|
|
22785
22995
|
|
|
@@ -22995,6 +23205,8 @@ Also re-exports the error helpers from `stitchkit/contract`.
|
|
|
22995
23205
|
| `OpenApiConfig` | _type_ | config for `generateOpenApiDocument` (incl. `includeMethod` — curate a public subset) — [guide](../guide/server.md#curating-the-spec--includemethod) |
|
|
22996
23206
|
| `OpenApiDocument` | _type_ | the generated document |
|
|
22997
23207
|
| `OpenApiInfo` | _type_ | the spec `info` block |
|
|
23208
|
+
| `OpenApiSecurity` | _type_ | `OpenApiConfig.security` — named schemes and the schemes each protected scope accepts — [guide](../guide/server.md#security-schemes--security) |
|
|
23209
|
+
| `OpenApiSecurityScheme` | _type_ | one way a caller presents its credential: HTTP bearer or basic, or an API key in a header, query or cookie |
|
|
22998
23210
|
| `OpenApiServer` | _type_ | a spec `servers` entry |
|
|
22999
23211
|
|
|
23000
23212
|
---
|
|
@@ -23016,6 +23228,8 @@ lane never reaches the hooks on either runtime.
|
|
|
23016
23228
|
|
|
23017
23229
|
## `stitchkit/application`
|
|
23018
23230
|
|
|
23231
|
+
Construct a directory inbox with `createDirectoryInbox` from `stitchkit/application/directory-inbox`.
|
|
23232
|
+
|
|
23019
23233
|
`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
23234
|
|
|
23021
23235
|
|
|
@@ -23041,7 +23255,7 @@ cutovers are covered by the executable
|
|
|
23041
23255
|
| `NotificationOutboxItem` / `NotificationOutboxReceipt` / `NotificationOutboxState` / `NotificationSend` / `NotificationFailureClassification` / `DroppedNotification` / `EnqueueNotification` | _type_ | versioned queue records, stable send identity and delivery decisions |
|
|
23042
23256
|
| `notificationOutboxStateSchema` | function | strict persisted-state schema over an application payload schema |
|
|
23043
23257
|
| `notificationOutboxResource` / `NotificationOutboxResource` / `NotificationOutboxResourceConfig` | function / _type_ | thin managed-resource scheduler over an outbox handle |
|
|
23044
|
-
| `
|
|
23258
|
+
| `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
23259
|
| `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
23260
|
| `StateStoreUpdateContext` | _type_ | real active protected transaction: `assertHeld()` refuses after ownership loss or completion; custom adapters supply this context to their transition |
|
|
23047
23261
|
| `DirectoryInboxStateSchema` / `DirectoryInboxState` / `DirectoryInboxRejection` / `DirectoryInboxRejectionReasonSchema` / `DirectoryInboxRejectionReason` | schema / _type_ | the inbox's claims, receipts and rejections (`invalid`, `too-large`, `attempt-limit`) |
|
|
@@ -23124,9 +23338,10 @@ cutovers are covered by the executable
|
|
|
23124
23338
|
|
|
23125
23339
|
### Bounded diagnostic journal
|
|
23126
23340
|
|
|
23341
|
+
Construct the writer with `createDiagnosticJournal` from `stitchkit/application/diagnostic-journal`.
|
|
23342
|
+
|
|
23127
23343
|
| Export | Kind | Summary |
|
|
23128
23344
|
|--------|------|---------|
|
|
23129
|
-
| `createDiagnosticJournal` | function | create one schema-owned FIFO JSONL writer with bounded retained memory, exclusive local path ownership and finite rotation |
|
|
23130
23345
|
| `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
23346
|
| `DiagnosticJournalLimitsSchema` / `DiagnosticJournalLimits` | schema / _type_ | positive event, pending-item, pending-byte, file-byte and retained-file limits |
|
|
23132
23347
|
| `DiagnosticJournalLockPolicySchema` / `DiagnosticJournalLockPolicy` | schema / _type_ | `refuse` (default) or `reclaim-stale`, which reclaims only a lock whose recorded owner is provably gone |
|
|
@@ -23625,7 +23840,9 @@ Delivery exports are `AgentAdmissionEventSchema`, `AgentAttemptResetEventSchema`
|
|
|
23625
23840
|
`AgentRunStateEventSchema`, `AgentRunOperationEventSchema`, `AgentTerminalEventSchema`,
|
|
23626
23841
|
`AgentTransientDeltaEventSchema`,
|
|
23627
23842
|
`AgentReasoningStartEventSchema`, `AgentReasoningDeltaEventSchema`,
|
|
23628
|
-
`AgentReasoningEndEventSchema`, `AgentToolStatusEventSchema`, `
|
|
23843
|
+
`AgentReasoningEndEventSchema`, `AgentToolStatusEventSchema`, `AgentToolProgressEventSchema` (what a
|
|
23844
|
+
running tool reported through `ctx.reportProgress`, transient and never part of the model's input),
|
|
23845
|
+
`AgentRuntimeEvent`,
|
|
23629
23846
|
`AgentRuntimeEventCursor`, `AgentRuntimeEventCursorSchema`, `AgentRuntimeCursorAdvance`,
|
|
23630
23847
|
`advanceAgentRuntimeEventCursor`, `agentDurableEventId`, `AgentRuntimeEventSink`,
|
|
23631
23848
|
`AgentRuntimeEventSinkConfig` and `createAgentRuntimeEventSink`. Cursor gaps require a canonical
|
|
@@ -23732,28 +23949,28 @@ artifact store is supplied, `read_output`.
|
|
|
23732
23949
|
| Export | Kind | Summary |
|
|
23733
23950
|
|--------|------|---------|
|
|
23734
23951
|
| `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
23952
|
| `AgentCodingToolDefinition` | _type_ | peer-free structural direct-tool shape accepted by the canonical runtime-tool surface |
|
|
23737
23953
|
| `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
23954
|
| `AgentCodingToolAuthorizationSchema` / `AgentCodingToolAuthorization` | schema / _type_ | discriminated read/write/search/patch/shell/artifact decision presented to host policy before effect |
|
|
23739
23955
|
| `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 |
|
|
23956
|
+
| `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
23957
|
| `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
23958
|
|
|
23746
|
-
File/search operations pin directory descriptors across authorization and the actual effect;
|
|
23959
|
+
File/search operations select a root descriptor before both policy callback kinds and pin directory descriptors across authorization and the actual effect;
|
|
23747
23960
|
resource discovery uses the same ancestor-safe traversal. This closes parent rename/symlink races
|
|
23748
|
-
without claiming an executable sandbox. The
|
|
23961
|
+
without claiming an executable sandbox. The ordinary command launcher passes a pinned cwd to its
|
|
23962
|
+
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
|
|
23963
|
+
are capped by maxListEntries and maxSearchEntries, and glob patterns by 4,096 UTF-16 units.
|
|
23964
|
+
The default ceilings are 4,096 path bytes, 256 KiB read/write/output, 128 shell arguments, 64 KiB
|
|
23749
23965
|
of aggregate argument text, 4 MiB per artifact and 30 seconds. The root is a path-resolution
|
|
23750
23966
|
boundary, not an OS sandbox; executable behavior, process
|
|
23751
23967
|
isolation, credentials and external-effect idempotency remain host responsibilities.
|
|
23752
23968
|
|
|
23753
23969
|
When `authorizePath` denies a path, direct read/write/edit returns `FORBIDDEN`, while
|
|
23754
23970
|
`list_directory`, `glob` and `search_files` omit it. Denial is recursive: direct access and
|
|
23755
|
-
discovery base paths
|
|
23756
|
-
|
|
23971
|
+
discovery base paths check every named ancestor, outermost first and segment-wise; `.` is
|
|
23972
|
+
checked only when the requested base itself is `.`, so subtree allowlists remain usable. Thus
|
|
23973
|
+
denying `credentials` denies `credentials/token.txt` but not `credentials-backup`. Directory
|
|
23757
23974
|
admission happens before descent and file admission before opening; `search_files.include` is also
|
|
23758
23975
|
applied before content is read. Requested paths must use `/` — a backslash is refused, because the
|
|
23759
23976
|
containment walk reads it as a separator while a callback would read it as one name.
|
|
@@ -23779,7 +23996,10 @@ including `AgentAttemptResetEventSchema` for `attempt-reset`),
|
|
|
23779
23996
|
`AgentControlErrorCodeSchema` / `AgentControlErrorCode` (the one vocabulary of every control
|
|
23780
23997
|
error code: `FORBIDDEN`, `CONNECTION_CLOSED`, `REQUEST_CAPACITY`, `ATTACHMENT_CAPACITY`,
|
|
23781
23998
|
`LEASE_CONFLICT`, `EVENT_OVERFLOW` and the rest), `AgentMultiSessionCursorSchema` /
|
|
23782
|
-
`AgentMultiSessionCursor`, `AgentConversationView`, `AgentControlView`,
|
|
23999
|
+
`AgentMultiSessionCursor`, `AgentConversationView`, `AgentControlView`, `AgentRunTransient` (a
|
|
24000
|
+
run's streamed text, reasoning and running tool calls before its next checkpoint),
|
|
24001
|
+
`AgentToolActivity` (one running call with its last reported progress),
|
|
24002
|
+
`AGENT_TOOL_PROGRESS_MESSAGE_MAX` (the longest progress message a run publishes),
|
|
23783
24003
|
`advanceAgentMultiSessionCursor`, `createAgentControlView`, `reduceAgentControlSnapshot`,
|
|
23784
24004
|
`reduceAgentControlEvent` and
|
|
23785
24005
|
`agentDurableEventId`. It imports no model provider, executor, store, event sink
|
package/llms.txt
CHANGED
|
@@ -14,25 +14,25 @@ Load the slice for each entrypoint your code imports — `import … from 'stitc
|
|
|
14
14
|
- **stitchkit/react**: [llms/react.txt](llms/react.txt) 8.7 KB
|
|
15
15
|
- **stitchkit/react/keyboard**: [llms/react-keyboard.txt](llms/react-keyboard.txt) 22.7 KB
|
|
16
16
|
- **stitchkit/react/keyboard/testing**: [llms/react-keyboard-testing.txt](llms/react-keyboard-testing.txt) 1.9 KB
|
|
17
|
-
- **stitchkit/tools**: [llms/tools.txt](llms/tools.txt)
|
|
17
|
+
- **stitchkit/tools**: [llms/tools.txt](llms/tools.txt) 47.0 KB → [llms/tools.2.txt](llms/tools.2.txt) 30.5 KB → [llms/tools.3.txt](llms/tools.3.txt) 21.0 KB
|
|
18
18
|
- **stitchkit/tools/mcp**: [llms/tools-mcp.txt](llms/tools-mcp.txt) 6.6 KB
|
|
19
19
|
- **stitchkit/tools/agent**: [llms/tools-agent.txt](llms/tools-agent.txt) 1.1 KB
|
|
20
20
|
- **stitchkit/tools/toolkit**: [llms/tools-toolkit.txt](llms/tools-toolkit.txt) 0.9 KB
|
|
21
21
|
- **stitchkit/tools/contract**: [llms/tools-contract.txt](llms/tools-contract.txt) 0.2 KB
|
|
22
22
|
- **stitchkit/tools/invoker**: [llms/tools-invoker.txt](llms/tools-invoker.txt) 0.2 KB
|
|
23
23
|
- **stitchkit/tools/connections**: [llms/tools-connections.txt](llms/tools-connections.txt) 3.9 KB
|
|
24
|
-
- **stitchkit/cli**: [llms/cli.txt](llms/cli.txt)
|
|
24
|
+
- **stitchkit/cli**: [llms/cli.txt](llms/cli.txt) 37.2 KB → [llms/cli.2.txt](llms/cli.2.txt) 36.4 KB
|
|
25
25
|
- **stitchkit/cli/publish**: [llms/cli-publish.txt](llms/cli-publish.txt) 1.5 KB
|
|
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)
|
|
29
|
+
- **stitchkit/server**: [llms/server.txt](llms/server.txt) 44.2 KB → [llms/server.2.txt](llms/server.2.txt) 23.1 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.5 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)
|
|
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) 43.3 KB → [llms/agent-runtime.3.txt](llms/agent-runtime.3.txt) 45.1 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
|
|
35
|
-
- **stitchkit/agent-runtime/browser**: [llms/agent-runtime-browser.txt](llms/agent-runtime-browser.txt)
|
|
35
|
+
- **stitchkit/agent-runtime/browser**: [llms/agent-runtime-browser.txt](llms/agent-runtime-browser.txt) 4.0 KB
|
|
36
36
|
- **stitchkit/agent-runtime/openrouter**: [llms/agent-runtime-openrouter.txt](llms/agent-runtime-openrouter.txt) 1.1 KB
|
|
37
37
|
- **stitchkit/agent-runtime/sqlite/bun**: [llms/agent-runtime-sqlite-bun.txt](llms/agent-runtime-sqlite-bun.txt) 1.8 KB
|
|
38
38
|
- **stitchkit/agent-runtime/sqlite/node**: [llms/agent-runtime-sqlite-node.txt](llms/agent-runtime-sqlite-node.txt) 1.7 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.
|
|
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.
|
|
75
|
+
- **Upgrading 0.106.0 → 0.122.0**: [llms/upgrading-0.106.0-0.122.0.txt](llms/upgrading-0.106.0-0.122.0.txt) 34.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
|
package/native/darwin-arm64.node
CHANGED
|
Binary file
|
package/native/darwin-x64.node
CHANGED
|
Binary file
|
package/native-assets.json
CHANGED
|
@@ -4,13 +4,13 @@
|
|
|
4
4
|
"assets": {
|
|
5
5
|
"arm64": {
|
|
6
6
|
"path": "native/darwin-arm64.node",
|
|
7
|
-
"size":
|
|
8
|
-
"sha256": "
|
|
7
|
+
"size": 53152,
|
|
8
|
+
"sha256": "2dcbf34310db6cd32d2bc1f3ffad4a1924b84b9107f97d81f5616909dbf61507"
|
|
9
9
|
},
|
|
10
10
|
"x64": {
|
|
11
11
|
"path": "native/darwin-x64.node",
|
|
12
|
-
"size":
|
|
13
|
-
"sha256": "
|
|
12
|
+
"size": 23984,
|
|
13
|
+
"sha256": "0c052fb61b4d744fba091ac40f4e3cac6bf1d5eac8ca884648661023e4e36a94"
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
16
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "stitchkit",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.122.0",
|
|
4
4
|
"description": "Contract-first backend framework — one defineContract() into an HTTP API, MCP tools, AI-agent tools and a typed client. Bun and Node.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"bun",
|
|
@@ -405,6 +405,7 @@
|
|
|
405
405
|
"@modelcontextprotocol/server": "^2.4.0",
|
|
406
406
|
"@openrouter/ai-sdk-provider": "^3.1.0",
|
|
407
407
|
"@opentelemetry/api": "^1.10.0",
|
|
408
|
+
"@seriousme/openapi-schema-validator": "^2.11.0",
|
|
408
409
|
"@socket.io/bun-engine": "^0.1.2",
|
|
409
410
|
"@socket.io/component-emitter": "^3.1.2",
|
|
410
411
|
"@tanstack/react-query": "5.105.3",
|