stitchkit 0.114.2 → 0.115.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 +29 -0
- package/dist/agent-runtime/coding-tool-files.d.ts.map +1 -1
- package/dist/agent-runtime/coding-tool-listing.d.ts.map +1 -1
- 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/contained-scan.d.ts +1 -1
- package/dist/agent-runtime/contained-scan.d.ts.map +1 -1
- package/dist/agent-runtime/sandbox-broker.d.ts.map +1 -1
- package/dist/agent-runtime/sandbox-bubblewrap-storage.d.ts.map +1 -1
- package/dist/application/directory-inbox-files.d.ts.map +1 -1
- package/dist/application/file-state-store.d.ts.map +1 -1
- package/dist/entrypoints/agent-runtime/coding-tools.js +6 -4
- package/dist/entrypoints/agent-runtime/harness.js +2 -1
- package/dist/entrypoints/agent-runtime/sandbox.js +13 -8
- package/dist/entrypoints/agent-runtime/sqlite/bun.js +8 -6
- package/dist/entrypoints/agent-runtime/sqlite/node.js +8 -6
- package/dist/entrypoints/agent-runtime/testing.js +8 -6
- package/dist/entrypoints/agent-runtime.js +8 -6
- package/dist/entrypoints/application/diagnostic-journal.js +2 -2
- package/dist/entrypoints/application/directory-inbox.js +10 -7
- package/dist/entrypoints/cli/publish.js +11 -8
- package/dist/entrypoints/cli.js +6 -3
- package/dist/entrypoints/files.js +10 -7
- package/dist/entrypoints/process/owner-loss.js +1 -1
- package/dist/entrypoints/process.js +3 -3
- package/dist/entrypoints/react/keyboard/testing.js +1 -1
- package/dist/entrypoints/react/keyboard.js +11 -11
- package/dist/entrypoints/server.js +4 -4
- package/dist/entrypoints/telegram.js +8 -5
- package/dist/entrypoints/tools.js +5 -2
- package/dist/files/chunk-spool.d.ts.map +1 -1
- package/dist/{index-2f9r0jgr.js → index-364k2zwa.js} +4 -4
- package/dist/{index-tnxsq7cw.js → index-3qqdqwxe.js} +90 -35
- package/dist/{index-s47ac8zt.js → index-7yx8j6ay.js} +133 -156
- package/dist/{index-912sza5h.js → index-90p34rts.js} +1 -1
- package/dist/{index-a3462dqf.js → index-944x38nv.js} +1 -1
- package/dist/{index-07dcf2yn.js → index-ac6vvm30.js} +5 -2
- package/dist/{index-qj1sy4ep.js → index-crmswbrt.js} +1 -1
- package/dist/{index-7r4knwf8.js → index-dr3t5n1v.js} +14 -4
- package/dist/{index-dc9ere5p.js → index-dx5cm9pc.js} +1 -1
- package/dist/{index-84bf5spd.js → index-f6m4c545.js} +5 -2
- package/dist/{index-hy802jnr.js → index-fdk4r4r6.js} +6 -3
- package/dist/index-j8kf56wx.js +100 -0
- package/dist/index-jj9228tt.js +6 -0
- package/dist/{index-bh2ht9y5.js → index-n8z3rvzw.js} +4 -1
- package/dist/index-nregbbsc.js +107 -0
- package/dist/{index-j4zh647a.js → index-tt30h7mr.js} +4 -1
- package/dist/{index-zrtrjkbf.js → index-x0ddbj85.js} +148 -172
- package/dist/{index-p02zgk8x.js → index-y4rxnvgp.js} +6 -0
- package/dist/{index-5v5a9k2n.js → index-z3d6smer.js} +1 -1
- package/dist/{index-6b3pcq5z.js → index-zqkz4af9.js} +1 -1
- package/dist/internal/atomic-file.d.ts.map +1 -1
- package/dist/internal/atomic-staging.d.ts.map +1 -1
- package/dist/internal/contained-directory.d.ts +20 -0
- package/dist/internal/contained-directory.d.ts.map +1 -0
- package/dist/{agent-runtime → internal}/contained-files.d.ts +14 -13
- package/dist/internal/contained-files.d.ts.map +1 -0
- package/dist/internal/contained-handle.d.ts +30 -0
- package/dist/internal/contained-handle.d.ts.map +1 -0
- package/dist/internal/contained-write.d.ts +12 -0
- package/dist/internal/contained-write.d.ts.map +1 -0
- package/dist/internal/darwin-binding.d.ts +1 -1
- package/dist/internal/darwin-binding.d.ts.map +1 -1
- package/dist/internal/errno.d.ts +3 -0
- package/dist/internal/errno.d.ts.map +1 -0
- package/dist/internal/process-instance.d.ts.map +1 -1
- package/dist/internal/write-download.d.ts +5 -14
- package/dist/internal/write-download.d.ts.map +1 -1
- package/dist/process/group-diagnostics.d.ts +1 -0
- package/dist/process/group-diagnostics.d.ts.map +1 -1
- package/dist/process/group-settlement.d.ts +2 -0
- package/dist/process/group-settlement.d.ts.map +1 -1
- package/dist/process/group.d.ts.map +1 -1
- package/dist/process/owner-loss-control.d.ts.map +1 -1
- package/dist/react/keyboard/hooks.d.ts +2 -2
- package/dist/react/keyboard/hooks.d.ts.map +1 -1
- package/dist/react/keyboard/layers.d.ts +2 -0
- package/dist/react/keyboard/layers.d.ts.map +1 -1
- package/dist/telegram/broadcast-state.d.ts.map +1 -1
- package/dist/tools/cli/download.d.ts.map +1 -1
- package/dist/tools/cli/publication-storage.d.ts.map +1 -1
- package/dist/tools/cli/publication.d.ts.map +1 -1
- package/dist/tools/cli/view.d.ts.map +1 -1
- package/llms/agent-runtime.txt +16 -6
- package/llms/cli.txt +34 -2
- package/llms/process.txt +2 -2
- package/llms/react-keyboard.txt +18 -2
- package/llms/stitchkit.txt +3 -3
- package/llms/{upgrading-0.104.0-0.114.0.txt → upgrading-0.104.0-0.115.0.txt} +62 -3
- package/llms/upgrading.txt +1 -1
- package/llms-full.txt +132 -15
- package/llms.txt +5 -5
- package/native/darwin-arm64.node +0 -0
- package/native/darwin-x64.node +0 -0
- package/native-assets.json +4 -4
- package/package.json +1 -1
- package/dist/agent-runtime/contained-darwin.d.ts +0 -21
- package/dist/agent-runtime/contained-darwin.d.ts.map +0 -1
- package/dist/agent-runtime/contained-files.d.ts.map +0 -1
- package/dist/agent-runtime/contained-write.d.ts +0 -9
- package/dist/agent-runtime/contained-write.d.ts.map +0 -1
package/llms-full.txt
CHANGED
|
@@ -78,13 +78,13 @@ own, recorded as an ADR.
|
|
|
78
78
|
| `stitchkit/geo` | server (Bun or Node) | evolving | managed GeoIP reader generations, last-known-good reload and the optional MaxMind adapter |
|
|
79
79
|
| `stitchkit/oauth` | browser **and** server | evolving | provider-neutral Authorization Code + PKCE request and one-shot callback transaction mechanics |
|
|
80
80
|
| `stitchkit/google` | server (Bun or Node) | evolving | optional Google code exchange and verified OIDC identity adapter |
|
|
81
|
-
| `stitchkit/observability` | server | stable<br>_redefined in 2 of the
|
|
81
|
+
| `stitchkit/observability` | server | stable<br>_redefined in 2 of the 60 minors since 0.56.2, most recently 0.92.0_ | request/tool event projections — `createObservability`, trace context, sanitisation |
|
|
82
82
|
| `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 |
|
|
83
83
|
| `stitchkit/declaration` | browser + build and deployment tooling (Bun or Node) | evolving | `ProjectDeclarationSchema` — the one machine-readable statement a repository makes about itself |
|
|
84
84
|
| `stitchkit/react` | browser + server rendering | stable | `createCursorQuery`, `createCacheBridge`, QueryClient and `ApiError` retry policy |
|
|
85
85
|
| `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) |
|
|
86
86
|
| `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 |
|
|
87
|
-
| `stitchkit/agent-runtime` | server | evolving<br>_redefined in
|
|
87
|
+
| `stitchkit/agent-runtime` | server | evolving<br>_redefined in 25 of the 60 minors since 0.56.2, most recently 0.115.0_ | optional durable conversation/run loop, history, models, prompts, fencing and events |
|
|
88
88
|
| `stitchkit/agent-runtime/sandbox` | server | evolving | optional Linux Bubblewrap sessions, durable workspaces and a host HTTP credential gateway; see [sandbox guide](sandbox.md) |
|
|
89
89
|
| `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 |
|
|
90
90
|
| `stitchkit/agent-runtime/harness` | server | evolving | resource-aware process-local facade over the canonical Agent runtime; supervision stays outside |
|
|
@@ -96,7 +96,7 @@ own, recorded as an ADR.
|
|
|
96
96
|
| `stitchkit/agent-runtime/sqlite/bun` | server (Bun) | evolving | durable built-in SQLite store for the agent runtime |
|
|
97
97
|
| `stitchkit/agent-runtime/sqlite/node` | server (Node ≥ 22.5) | evolving | durable built-in SQLite store for the agent runtime |
|
|
98
98
|
| `stitchkit-tui` | terminal (Bun) | evolving | optional official OpenTUI host over a caller-composed headless runtime |
|
|
99
|
-
| `stitchkit/application` | browser + server | evolving<br>_redefined in 14 of the
|
|
99
|
+
| `stitchkit/application` | browser + server | evolving<br>_redefined in 14 of the 60 minors since 0.56.2, most recently 0.110.0_ | managed resource graph, readiness, admission, schedules, subtree restart and bounded shutdown |
|
|
100
100
|
| `stitchkit/application/grammy` | server | evolving | a grammY bot as application resources — configuration, then polling with updates admitted by batch — and the webhook adapter |
|
|
101
101
|
| `stitchkit/application/opentelemetry` | server | evolving | maps application snapshots onto an injected OpenTelemetry `Meter` |
|
|
102
102
|
| `stitchkit/application/schemas` | browser + server | evolving | the application's snapshot, health and shutdown schemas alone, without the kernel |
|
|
@@ -5658,17 +5658,27 @@ approval input fails the run with a private diagnostic rather than starting a fr
|
|
|
5658
5658
|
`read_output`. Every call passes a required host authorization callback. An optional async/sync
|
|
5659
5659
|
`authorizePath({ path })` is the one operation-independent policy for direct file access and
|
|
5660
5660
|
discovery: direct read/write/edit refuses a denied path, while listing, glob and search omit it.
|
|
5661
|
-
Denial is recursive on every surface — direct access
|
|
5662
|
-
|
|
5661
|
+
Denial is recursive on every surface — direct access asks about each named ancestor and the file,
|
|
5662
|
+
outermost first, stopping at the first refusal; discovery rooted at `.` also asks about `.`.
|
|
5663
|
+
Thus denying `credentials` denies everything
|
|
5663
5664
|
under it. The comparison is segment-wise, so it does not deny `credentials-backup`, and a path of
|
|
5664
|
-
depth N costs N
|
|
5665
|
+
depth N costs N questions for direct access. Directory decisions happen before descent; file decisions and
|
|
5665
5666
|
`search_files.include` happen before opening content. Requested paths use `/`: a backslash is
|
|
5666
5667
|
refused rather than normalised, because the workspace walk reads it as a separator and every
|
|
5667
5668
|
authorization callback would otherwise be asked about a different decomposition than the one opened. File paths are relative, bounded and contained after
|
|
5668
|
-
descriptor-relative resolution: each ancestor is opened without following symlinks and
|
|
5669
|
-
pinned through authorization
|
|
5669
|
+
descriptor-relative resolution: each ancestor is opened without following symlinks. Reads and edits
|
|
5670
|
+
stay pinned through authorization; `write_file` plans before it and opens the parent after, because
|
|
5671
|
+
the parent it creates does not exist yet. Reads revalidate the pinned file identity;
|
|
5670
5672
|
writes and patches revalidate the pinned parent identity; search and resource discovery descend
|
|
5671
|
-
only through opened directories.
|
|
5673
|
+
only through opened directories. A path that changed during authorization refuses with `CONFLICT`.
|
|
5674
|
+
Policies compare path strings, so on a case-insensitive filesystem such as default macOS volumes a
|
|
5675
|
+
rule on `credentials` does not match `CREDENTIALS`; such a host must normalize in its own policy.
|
|
5676
|
+
NUL bytes are refused before either host policy sees a path.
|
|
5677
|
+
Reads and edits open file candidates without blocking on special files, then require a regular
|
|
5678
|
+
file. A writerless FIFO therefore refuses instead of occupying a filesystem worker. `write_file`
|
|
5679
|
+
supplies the exact missing-directory plan as `createsDirectories` to host authorization; the
|
|
5680
|
+
descriptor walk may create only those entries. An ancestor that disappears after approval refuses
|
|
5681
|
+
with `CONFLICT`, without expanding that plan. Linux traverses `/proc/self/fd`; macOS uses the package's
|
|
5672
5682
|
architecture-specific Node-API `openat` backend. Unsupported platforms, including FreeBSD until a
|
|
5673
5683
|
real backend is qualified, fail closed. The package needs no install-time compiler or script.
|
|
5674
5684
|
Other platforms fail these filesystem operations closed because Node exposes no equivalent
|
|
@@ -9072,8 +9082,8 @@ a static loader enters a bundle.
|
|
|
9072
9082
|
|
|
9073
9083
|
Only these calls load the addon, and only on macOS: process identity (`observeProcessInstance`
|
|
9074
9084
|
and `probeProcessOwner`), every exclusive lock (`withExclusiveLock` and what is built on it, such
|
|
9075
|
-
as the file state store and the diagnostic journal)
|
|
9076
|
-
coding tools
|
|
9085
|
+
as the file state store and the diagnostic journal), the contained file operations of the Agent
|
|
9086
|
+
coding tools and `--output-dir` downloads of `stitchkit/cli`. Without the addon a download refuses, and a lock still works, but it cannot record or check its owner's
|
|
9077
9087
|
identity, so a lock held by a crashed owner is not reclaimed. The managed file boundary
|
|
9078
9088
|
(`createManagedFileBoundary` and the transfer tools built on it), atomic writes and the chunk
|
|
9079
9089
|
spool never load it, on any operating system. The package is free of import side effects
|
|
@@ -10415,6 +10425,29 @@ myapp generate "a fox" --wait --output-dir ./out
|
|
|
10415
10425
|
myapp generate "a fox" --wait --json > result.json &
|
|
10416
10426
|
```
|
|
10417
10427
|
|
|
10428
|
+
### Download filesystem boundary
|
|
10429
|
+
|
|
10430
|
+
`--output-dir` resolves the explicitly configured root once before fetching and pins that
|
|
10431
|
+
one directory for the whole batch. An initial root alias (including a symbolic link) selects
|
|
10432
|
+
its canonical directory; missing components are created through pinned parents. The root
|
|
10433
|
+
capability continues to name the same directory if another actor renames it or replaces its
|
|
10434
|
+
pathname. The original spelling printed in `saved` is a display path, not a re-open of the root.
|
|
10435
|
+
|
|
10436
|
+
Each media name becomes a direct child. Downloads atomically replace an existing file,
|
|
10437
|
+
symbolic link (including a dangling link), or hard link without changing the inode a link
|
|
10438
|
+
points to. An existing directory refuses replacement. Ordinary files retain their permission
|
|
10439
|
+
bits; new files use `0666 & ~umask`. Replacing writes a new file beside the old one, so it needs
|
|
10440
|
+
write permission on the directory, gives the file to the process user, replaces a read-only
|
|
10441
|
+
file, and refuses a bind-mounted one. Symlinks inside a contained parent path are never followed.
|
|
10442
|
+
The successful operation's JSON remains on stdout when a download fails; per-file diagnostics
|
|
10443
|
+
go to stderr and any failed file makes the exit non-zero. Already saved files remain saved.
|
|
10444
|
+
|
|
10445
|
+
This filesystem protection supports Linux and macOS. On Linux it uses directory descriptors;
|
|
10446
|
+
on macOS it uses the packaged native backend. A bundled or compiled macOS CLI must use
|
|
10447
|
+
[`createNativePackaging`](./native-io.md) from `stitchkit/files/packaging` at build
|
|
10448
|
+
time. Missing native support and unsupported platforms, including Windows, refuse the download;
|
|
10449
|
+
CLI commands without downloads continue to work. There is no weaker path-based fallback.
|
|
10450
|
+
|
|
10418
10451
|
## Aggregate views
|
|
10419
10452
|
|
|
10420
10453
|
The CLI's audience is agents, scripts and `jq`, so output is JSON. That settles
|
|
@@ -10455,11 +10488,20 @@ value for the sort field sorts **last in both directions**: it is not the
|
|
|
10455
10488
|
smallest, it is not on the scale at all, and letting it lead an ascending list
|
|
10456
10489
|
would answer a question nobody asked.
|
|
10457
10490
|
|
|
10458
|
-
|
|
10491
|
+
Rules worth knowing before you rely on them:
|
|
10459
10492
|
|
|
10460
|
-
- **A field
|
|
10493
|
+
- **A field no record carries in a nonempty collection is a presentation error.** A group of zero
|
|
10461
10494
|
over a misspelled field is indistinguishable from a true empty answer, and the
|
|
10462
10495
|
caller reads it as data. The message names the fields that *are* there.
|
|
10496
|
+
Plain and dotted field paths read own properties only at every segment; inherited
|
|
10497
|
+
properties are not record data. Own keys named `constructor`, `prototype` or `toString`
|
|
10498
|
+
are ordinary fields.
|
|
10499
|
+
- **An empty collection is a successful answer.** Count and grouped sums return `{}`,
|
|
10500
|
+
an ungrouped sum returns `0`, and sorted records return `[]`. Tables keep their header
|
|
10501
|
+
and separator without data rows. This applies both to a direct `[]` and to the single
|
|
10502
|
+
array field of an envelope such as `{ items: [], total: 0 }`. With no records, field
|
|
10503
|
+
presence cannot be checked, so a misspelled field answers empty too; malformed paths, unsafe
|
|
10504
|
+
`__proto__` segments and a field of the envelope itself (`--sum total` here) still refuse.
|
|
10463
10505
|
- **An aggregate needs a collection** — the result itself when it is an array,
|
|
10464
10506
|
or the single array field of a result object. An aggregate over a scalar, or
|
|
10465
10507
|
over an object with two array fields, is refused rather than guessed.
|
|
@@ -15342,6 +15384,17 @@ together, only `scope` tells the stack which one is inside.
|
|
|
15342
15384
|
**`active`** (default `true`) switches a layer off without unmounting it;
|
|
15343
15385
|
becoming active again puts it on top of its kind.
|
|
15344
15386
|
|
|
15387
|
+
Layers register, adopt options and clean up in the browser's layout-effect phase.
|
|
15388
|
+
Call the hook before a layout effect that dispatches a key: that effect sees the
|
|
15389
|
+
committed `active`, handler and scope immediately, without waiting for passive
|
|
15390
|
+
effects. Rendering alone never changes the stack; an abandoned render leaves the
|
|
15391
|
+
last committed layer intact. A Suspense boundary that hides committed content
|
|
15392
|
+
disconnects its layout effects, so a layer behind the fallback goes quiet and
|
|
15393
|
+
returns to its place on reveal. The same lifecycle backs `useEscapeLayer` and a
|
|
15394
|
+
zone's outside-key layer. Server rendering installs no listener and does not
|
|
15395
|
+
access `window`. The browser phase is chosen when the module loads, so a test
|
|
15396
|
+
that installs a DOM does so before it imports these hooks.
|
|
15397
|
+
|
|
15345
15398
|
**Fields keep their keys.** Keys pressed in an input, a text area, a select, an
|
|
15346
15399
|
editable region, a combobox, a slider or any area marked `data-local-keys` do not
|
|
15347
15400
|
reach layers — except Escape, which a field that wants it keeps with
|
|
@@ -15393,6 +15446,11 @@ function ChatList({ chats, openId, open }) {
|
|
|
15393
15446
|
| `ignore(event)` | — | a key that is the application's own right now — return `true` and the zone leaves it whole; see [dragging](#a-zone-inside-a-drag-and-drop-list) |
|
|
15394
15447
|
| `onReveal(id)` | — | focus went to an item with no element yet — a row of a virtualized list outside the rendered range; scroll it in, and focus lands on it when it mounts |
|
|
15395
15448
|
|
|
15449
|
+
`role: 'none'` adds neither a container/item role nor `aria-orientation` or
|
|
15450
|
+
`aria-selected`; native links and buttons keep their semantics. The orientation
|
|
15451
|
+
still controls which arrows move focus. Only listbox and tablist zones emit
|
|
15452
|
+
`aria-orientation` (vertical by default).
|
|
15453
|
+
|
|
15396
15454
|
The callbacks return `false` to leave the key to the page, anything else takes
|
|
15397
15455
|
it. A key the zone does not take bubbles on to the layers — in a vertical list
|
|
15398
15456
|
← and → are not the list's keys, so the section switch above hears them.
|
|
@@ -16728,6 +16786,65 @@ analytics policy belong to the application.
|
|
|
16728
16786
|
|
|
16729
16787
|
# Upgrading stitchkit
|
|
16730
16788
|
|
|
16789
|
+
## Released migration: 0.115.0
|
|
16790
|
+
|
|
16791
|
+
### contained-cli-downloads
|
|
16792
|
+
|
|
16793
|
+
**Who must act:** a CLI that uses `--output-dir` on Windows, from a macOS bundle or compiled binary
|
|
16794
|
+
built without `createNativePackaging`, into a directory it cannot write or over bind-mounted files;
|
|
16795
|
+
a coding-tools host that allows `edit` but refuses `read` for a path; and code or CSS that reads
|
|
16796
|
+
`aria-orientation` of a `role: 'none'` zone. A CLI writing into its own directory on Linux or
|
|
16797
|
+
unbundled macOS, and every CLI command without a download, need no change.
|
|
16798
|
+
|
|
16799
|
+
`--output-dir` now writes through a pinned directory descriptor
|
|
16800
|
+
([ADR 0276](../decisions/0276-a-download-writes-through-its-root-capability.md)). There is no
|
|
16801
|
+
path-based fallback, so a platform without that backend refuses the download: the operation still
|
|
16802
|
+
succeeds, its result stays on stdout, stderr names the refusal and the exit is non-zero.
|
|
16803
|
+
|
|
16804
|
+
1. On macOS, build a bundled or compiled CLI with the native packaging plugin:
|
|
16805
|
+
|
|
16806
|
+
```ts
|
|
16807
|
+
// before
|
|
16808
|
+
await Bun.build({
|
|
16809
|
+
entrypoints: ['src/cli.ts'],
|
|
16810
|
+
compile: { target: 'bun-darwin-arm64', outfile: 'dist/cli' },
|
|
16811
|
+
})
|
|
16812
|
+
// after
|
|
16813
|
+
import { createNativePackaging } from 'stitchkit/files/packaging'
|
|
16814
|
+
|
|
16815
|
+
const native = createNativePackaging({
|
|
16816
|
+
platform: 'darwin', architecture: 'arm64', delivery: 'embedded',
|
|
16817
|
+
})
|
|
16818
|
+
if (native.state !== 'ready') throw new Error(native.code)
|
|
16819
|
+
await Bun.build({
|
|
16820
|
+
entrypoints: ['src/cli.ts'],
|
|
16821
|
+
compile: { target: 'bun-darwin-arm64', outfile: 'dist/cli' },
|
|
16822
|
+
plugins: [native.plugin],
|
|
16823
|
+
})
|
|
16824
|
+
```
|
|
16825
|
+
|
|
16826
|
+
A JS bundle uses `delivery: 'companion'`; every shape is in the [native I/O guide](./native-io.md). Search pattern:
|
|
16827
|
+
`createCli` with a `download` option in a project that runs `bun build` for macOS.
|
|
16828
|
+
2. On Windows, run the download through Linux or macOS, or read the URLs from the operation's
|
|
16829
|
+
JSON result and fetch them yourself. Stitchkit offers no weaker path on that platform.
|
|
16830
|
+
3. A download now replaces a file rather than rewriting it. Give the process write permission on
|
|
16831
|
+
the output directory, and do not point it at a bind-mounted file: that refuses with `EBUSY`. A
|
|
16832
|
+
replaced file belongs to the process user, and a read-only file is replaced like any other.
|
|
16833
|
+
4. Read the orientation you configured. A zone with `role: 'none'` has no attribute, and a default
|
|
16834
|
+
would silently turn a horizontal zone vertical:
|
|
16835
|
+
|
|
16836
|
+
```ts
|
|
16837
|
+
// before
|
|
16838
|
+
const axis: ZoneOrientation = zone.zoneProps['aria-orientation']
|
|
16839
|
+
// after
|
|
16840
|
+
const axis: ZoneOrientation = options.orientation ?? 'vertical'
|
|
16841
|
+
```
|
|
16842
|
+
|
|
16843
|
+
Search pattern: `aria-orientation` next to `useNavZone`, and `[aria-orientation]` in CSS and
|
|
16844
|
+
test selectors. Type-check: a read typed as `ZoneOrientation` fails to compile.
|
|
16845
|
+
5. In a coding-tools `authorize`, answer `read` for every path you answer `edit` for. `edit_file`
|
|
16846
|
+
asks both, `read` first.
|
|
16847
|
+
|
|
16731
16848
|
## Released migration: 0.114.0
|
|
16732
16849
|
|
|
16733
16850
|
**Who must act:** code with an exhaustive `switch` or `Record` over
|
|
@@ -24193,9 +24310,9 @@ no component, no styles, no router — see the [keyboard guide](../guide/keyboar
|
|
|
24193
24310
|
|
|
24194
24311
|
| Export | Kind | Summary |
|
|
24195
24312
|
|--------|------|---------|
|
|
24196
|
-
| `useKeyLayer` | hook | put a layer on the window's one key stack
|
|
24313
|
+
| `useKeyLayer` | hook | put a layer on the window's one key stack; registration, options and cleanup follow the browser layout-effect phase, before later layout effects in the caller; asked `overlay` → `local` → `route` → `zone` → `global`, innermost first within a kind |
|
|
24197
24314
|
| `useEscapeLayer` | hook | an `overlay`, `local` or `route` layer for Escape: one press closes one level |
|
|
24198
|
-
| `useNavZone` | hook | a list zone — roving tab stop, arrows move DOM focus, select, highlight or focus mode, cross-axis enter/exit, boundaries, `ignore` for a key the application is using; props carry no key without a value |
|
|
24315
|
+
| `useNavZone` | hook | a list zone — roving tab stop, arrows move DOM focus, select, highlight or focus mode, cross-axis enter/exit, boundaries, `ignore` for a key the application is using; props carry no key without a value; `role: 'none'` omits roles, `aria-orientation` and `aria-selected`, preserving native link/button semantics |
|
|
24199
24316
|
| `nextZoneIndex` | function | where a move lands in a list of a given length: an index, `'before-start'` or `'after-end'` |
|
|
24200
24317
|
| `isKeyFieldTarget` | function | whether a key was pressed in a field or a `data-local-keys` area, the test layers use |
|
|
24201
24318
|
| `KeyLayerOptions` | _type_ | `kind`, `onKey`, `active`, `scope`, `fields`, `phase` — `'capture'` is for a `local` layer only: it hears a key before the element that has focus does, as a menu over a text field must, and a key it takes goes no further |
|
package/llms.txt
CHANGED
|
@@ -12,21 +12,21 @@ Load the slice for each entrypoint your code imports — `import … from 'stitc
|
|
|
12
12
|
- **stitchkit**: [llms/stitchkit.txt](llms/stitchkit.txt) 43.2 KB → [llms/stitchkit.2.txt](llms/stitchkit.2.txt) 43.1 KB
|
|
13
13
|
- **stitchkit/live**: [llms/live.txt](llms/live.txt) 21.2 KB
|
|
14
14
|
- **stitchkit/react**: [llms/react.txt](llms/react.txt) 8.7 KB
|
|
15
|
-
- **stitchkit/react/keyboard**: [llms/react-keyboard.txt](llms/react-keyboard.txt)
|
|
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
17
|
- **stitchkit/tools**: [llms/tools.txt](llms/tools.txt) 46.7 KB → [llms/tools.2.txt](llms/tools.2.txt) 30.4 KB → [llms/tools.3.txt](llms/tools.3.txt) 26.3 KB
|
|
18
18
|
- **stitchkit/tools/mcp**: [llms/tools-mcp.txt](llms/tools-mcp.txt) 1.8 KB
|
|
19
19
|
- **stitchkit/tools/contract**: [llms/tools-contract.txt](llms/tools-contract.txt) 0.2 KB
|
|
20
20
|
- **stitchkit/tools/invoker**: [llms/tools-invoker.txt](llms/tools-invoker.txt) 0.2 KB
|
|
21
21
|
- **stitchkit/tools/connections**: [llms/tools-connections.txt](llms/tools-connections.txt) 3.9 KB
|
|
22
|
-
- **stitchkit/cli**: [llms/cli.txt](llms/cli.txt)
|
|
22
|
+
- **stitchkit/cli**: [llms/cli.txt](llms/cli.txt) 36.3 KB → [llms/cli.2.txt](llms/cli.2.txt) 36.4 KB
|
|
23
23
|
- **stitchkit/cli/publish**: [llms/cli-publish.txt](llms/cli-publish.txt) 1.5 KB
|
|
24
24
|
- **stitchkit/remote**: [llms/remote.txt](llms/remote.txt) 1.0 KB
|
|
25
25
|
- **stitchkit/contract**: [llms/contract.txt](llms/contract.txt) 31.9 KB
|
|
26
26
|
- **stitchkit/primitives**: [llms/primitives.txt](llms/primitives.txt) 11.7 KB
|
|
27
27
|
- **stitchkit/server**: [llms/server.txt](llms/server.txt) 44.2 KB → [llms/server.2.txt](llms/server.2.txt) 20.5 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) 22.9 KB
|
|
28
28
|
- **stitchkit/observability**: [llms/observability.txt](llms/observability.txt) 46.9 KB
|
|
29
|
-
- **stitchkit/agent-runtime**: [llms/agent-runtime.txt](llms/agent-runtime.txt)
|
|
29
|
+
- **stitchkit/agent-runtime**: [llms/agent-runtime.txt](llms/agent-runtime.txt) 44.1 KB → [llms/agent-runtime.2.txt](llms/agent-runtime.2.txt) 45.9 KB → [llms/agent-runtime.3.txt](llms/agent-runtime.3.txt) 42.2 KB
|
|
30
30
|
- **stitchkit/agent-runtime/testing**: [llms/agent-runtime-testing.txt](llms/agent-runtime-testing.txt) 2.6 KB
|
|
31
31
|
- **stitchkit/agent-runtime/harness**: [llms/agent-runtime-harness.txt](llms/agent-runtime-harness.txt) 11.0 KB
|
|
32
32
|
- **stitchkit/agent-runtime/coding-tools**: [llms/agent-runtime-coding-tools.txt](llms/agent-runtime-coding-tools.txt) 5.0 KB
|
|
@@ -58,7 +58,7 @@ Load the slice for each entrypoint your code imports — `import … from 'stitc
|
|
|
58
58
|
- **stitchkit/node**: [llms/node.txt](llms/node.txt) 3.1 KB
|
|
59
59
|
- **stitchkit/agent-runtime/react**: [llms/agent-runtime-react.txt](llms/agent-runtime-react.txt) 1.0 KB
|
|
60
60
|
- **stitchkit/agent-runtime/realtime**: [llms/agent-runtime-realtime.txt](llms/agent-runtime-realtime.txt) 2.6 KB
|
|
61
|
-
- **stitchkit/process**: [llms/process.txt](llms/process.txt) 44.
|
|
61
|
+
- **stitchkit/process**: [llms/process.txt](llms/process.txt) 44.5 KB → [llms/process.2.txt](llms/process.2.txt) 4.3 KB
|
|
62
62
|
- **stitchkit/process/owner-loss**: [llms/process-owner-loss.txt](llms/process-owner-loss.txt) 0.9 KB
|
|
63
63
|
- **stitchkit/files/packaging**: [llms/files-packaging.txt](llms/files-packaging.txt) 3.5 KB
|
|
64
64
|
- **stitchkit/http**: [llms/http.txt](llms/http.txt) 0.9 KB
|
|
@@ -66,7 +66,7 @@ Load the slice for each entrypoint your code imports — `import … from 'stitc
|
|
|
66
66
|
|
|
67
67
|
## Upgrading slices
|
|
68
68
|
- **Upgrading — how to move across versions**: [llms/upgrading.txt](llms/upgrading.txt) 12.7 KB
|
|
69
|
-
- **Upgrading 0.104.0 → 0.
|
|
69
|
+
- **Upgrading 0.104.0 → 0.115.0**: [llms/upgrading-0.104.0-0.115.0.txt](llms/upgrading-0.104.0-0.115.0.txt) 46.3 KB
|
|
70
70
|
- **Upgrading 0.79.0 → 0.103.13**: [llms/upgrading-0.79.0-0.103.13.txt](llms/upgrading-0.79.0-0.103.13.txt) 46.3 KB
|
|
71
71
|
- **Upgrading 0.62.0 → 0.78.0**: [llms/upgrading-0.62.0-0.78.0.txt](llms/upgrading-0.62.0-0.78.0.txt) 42.2 KB
|
|
72
72
|
- **Upgrading 0.44.0 → 0.61.0**: [llms/upgrading-0.44.0-0.61.0.txt](llms/upgrading-0.44.0-0.61.0.txt) 41.4 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": 52912,
|
|
8
|
+
"sha256": "abd9f0dcebb9330cc7206d7b7c735e3af5f54436393f482adc8e73e3373bbdf1"
|
|
9
9
|
},
|
|
10
10
|
"x64": {
|
|
11
11
|
"path": "native/darwin-x64.node",
|
|
12
|
-
"size":
|
|
13
|
-
"sha256": "
|
|
12
|
+
"size": 23736,
|
|
13
|
+
"sha256": "aa0bc3084497eea9ac19bd060ee8456e7e8642c1b0035f0b224e9811ccfae133"
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
16
|
}
|
package/package.json
CHANGED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The Darwin half of contained file access: the optional native binding for
|
|
3
|
-
* `openat`-style calls, and a file handle over its numeric descriptor. Loaded
|
|
4
|
-
* lazily and only on darwin, where Node offers no directory-relative open.
|
|
5
|
-
*/
|
|
6
|
-
import { type Stats } from 'node:fs';
|
|
7
|
-
import type { ContainedFileHandle } from './contained-files.js';
|
|
8
|
-
export declare const FILE_TYPE_DIRECTORY = 16384;
|
|
9
|
-
export declare const FILE_TYPE_REGULAR = 32768;
|
|
10
|
-
export declare const FILE_TYPE_SYMLINK = 40960;
|
|
11
|
-
export declare function modeIs(mode: number, type: number): boolean;
|
|
12
|
-
export declare class NumericFileHandle implements ContainedFileHandle {
|
|
13
|
-
readonly fd: number;
|
|
14
|
-
constructor(fd: number);
|
|
15
|
-
close(): Promise<void>;
|
|
16
|
-
read(buffer: Buffer, offset: number, length: number, position: number): Promise<{
|
|
17
|
-
bytesRead: number;
|
|
18
|
-
}>;
|
|
19
|
-
stat(): Promise<Stats>;
|
|
20
|
-
}
|
|
21
|
-
//# sourceMappingURL=contained-darwin.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"contained-darwin.d.ts","sourceRoot":"","sources":["../../src/agent-runtime/contained-darwin.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAA2D,KAAK,KAAK,EAAE,MAAM,SAAS,CAAC;AAE9F,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAG7D,eAAO,MAAM,mBAAmB,QAAW,CAAC;AAC5C,eAAO,MAAM,iBAAiB,QAAW,CAAC;AAC1C,eAAO,MAAM,iBAAiB,QAAW,CAAC;AAE1C,wBAAgB,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAE1D;AAED,qBAAa,iBAAkB,YAAW,mBAAmB;IAC/C,QAAQ,CAAC,EAAE,EAAE,MAAM;IAA/B,YAAqB,EAAE,EAAE,MAAM,EAAI;IAEnC,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAIrB;IAED,IAAI,CACF,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC;QAAE,SAAS,EAAE,MAAM,CAAA;KAAE,CAAC,CAMhC;IAED,IAAI,IAAI,OAAO,CAAC,KAAK,C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C;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC,CAsBxD;AAED,yFAAyF;AACzF,wBAAsB,qBAAqB,CACzC,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC,CAOxD"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { type ContainedParent } from './contained-files.js';
|
|
2
|
-
/** Create or atomically replace one direct child through the pinned parent descriptor. */
|
|
3
|
-
export declare function writeContainedFile(input: {
|
|
4
|
-
parent: ContainedParent;
|
|
5
|
-
content: string;
|
|
6
|
-
replace: boolean;
|
|
7
|
-
mode?: number;
|
|
8
|
-
}): Promise<void>;
|
|
9
|
-
//# sourceMappingURL=contained-write.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"contained-write.d.ts","sourceRoot":"","sources":["../../src/agent-runtime/contained-write.ts"],"names":[],"mappings":"AAYA,OAAO,EAEL,KAAK,eAAe,EAErB,MAAM,mBAAmB,CAAC;AAsD3B,0FAA0F;AAC1F,wBAAsB,kBAAkB,CAAC,KAAK,EAAE;IAC9C,MAAM,EAAE,eAAe,CAAC;IACxB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,GAAG,OAAO,CAAC,IAAI,CAAC,CAsChB"}
|