stitchkit 0.113.3 → 0.114.1

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 (102) hide show
  1. package/CHANGELOG.md +42 -0
  2. package/README.md +1 -1
  3. package/dist/browser/client-url.d.ts.map +1 -1
  4. package/dist/entrypoints/agent-runtime/coding-tools.js +1 -1
  5. package/dist/entrypoints/agent-runtime/harness.js +4 -4
  6. package/dist/entrypoints/agent-runtime/realtime.js +2 -2
  7. package/dist/entrypoints/agent-runtime/sandbox.js +3 -3
  8. package/dist/entrypoints/agent-runtime/sqlite/bun.js +3 -3
  9. package/dist/entrypoints/agent-runtime/sqlite/node.js +3 -3
  10. package/dist/entrypoints/agent-runtime/testing.js +4 -4
  11. package/dist/entrypoints/agent-runtime.js +12 -12
  12. package/dist/entrypoints/application/directory-inbox.js +3 -3
  13. package/dist/entrypoints/application.js +4 -4
  14. package/dist/entrypoints/cli/publish.js +1 -1
  15. package/dist/entrypoints/cli.js +4 -4
  16. package/dist/entrypoints/contract.js +2 -2
  17. package/dist/entrypoints/http.js +2 -2
  18. package/dist/entrypoints/index.js +5 -5
  19. package/dist/entrypoints/node.js +3 -3
  20. package/dist/entrypoints/observability.js +3 -3
  21. package/dist/entrypoints/react/keyboard/testing.d.ts +2 -0
  22. package/dist/entrypoints/react/keyboard/testing.d.ts.map +1 -0
  23. package/dist/entrypoints/react/keyboard/testing.js +127 -0
  24. package/dist/entrypoints/react/keyboard.d.ts +4 -2
  25. package/dist/entrypoints/react/keyboard.d.ts.map +1 -1
  26. package/dist/entrypoints/react/keyboard.js +83 -319
  27. package/dist/entrypoints/react.js +15 -3
  28. package/dist/entrypoints/realtime.js +1 -1
  29. package/dist/entrypoints/remote.js +1 -1
  30. package/dist/entrypoints/server.js +18 -18
  31. package/dist/entrypoints/telegram/grammy.d.ts +2 -0
  32. package/dist/entrypoints/telegram/grammy.d.ts.map +1 -0
  33. package/dist/entrypoints/telegram/grammy.js +50 -0
  34. package/dist/entrypoints/telegram/screens.js +1 -1
  35. package/dist/entrypoints/telegram.d.ts +1 -0
  36. package/dist/entrypoints/telegram.d.ts.map +1 -1
  37. package/dist/entrypoints/telegram.js +254 -8
  38. package/dist/entrypoints/testing.js +3 -3
  39. package/dist/entrypoints/tools/connections.js +10 -10
  40. package/dist/entrypoints/tools.js +19 -19
  41. package/dist/entrypoints/tracking.js +1 -1
  42. package/dist/{index-xvj9h8yh.js → index-61hve0ez.js} +15 -28
  43. package/dist/index-6j725ez5.js +25 -0
  44. package/dist/{index-1csp1hwm.js → index-6p3frkv5.js} +1 -1
  45. package/dist/{index-fy4av0hq.js → index-9bwcthxw.js} +1 -1
  46. package/dist/{index-523tq7y4.js → index-a3462dqf.js} +1 -1
  47. package/dist/{index-506kd458.js → index-aw6zahv1.js} +1 -1
  48. package/dist/{index-tpwbct8j.js → index-dc9ere5p.js} +1 -1
  49. package/dist/{index-erv5shjq.js → index-kdnfe0sr.js} +1 -1
  50. package/dist/{index-k7z3j3hr.js → index-km2qw407.js} +4 -4
  51. package/dist/{index-7fc0c2np.js → index-n3v695sb.js} +1 -1
  52. package/dist/index-p02zgk8x.js +351 -0
  53. package/dist/{index-vtann8bz.js → index-p0rf7sq9.js} +8 -8
  54. package/dist/{index-aykhzcnf.js → index-qj1sy4ep.js} +1 -1
  55. package/dist/{index-cxpcdswt.js → index-t65erk4z.js} +1 -1
  56. package/dist/{index-c5at3ykd.js → index-tsngj2b5.js} +22 -10
  57. package/dist/react/entity-cache.d.ts +24 -2
  58. package/dist/react/entity-cache.d.ts.map +1 -1
  59. package/dist/react/keyboard/hooks.d.ts +41 -10
  60. package/dist/react/keyboard/hooks.d.ts.map +1 -1
  61. package/dist/react/keyboard/layers.d.ts +27 -8
  62. package/dist/react/keyboard/layers.d.ts.map +1 -1
  63. package/dist/react/keyboard/modality.d.ts +21 -0
  64. package/dist/react/keyboard/modality.d.ts.map +1 -0
  65. package/dist/react/keyboard/refs.d.ts +13 -0
  66. package/dist/react/keyboard/refs.d.ts.map +1 -0
  67. package/dist/react/keyboard/testing.d.ts +80 -0
  68. package/dist/react/keyboard/testing.d.ts.map +1 -0
  69. package/dist/react/keyboard/zone.d.ts +60 -10
  70. package/dist/react/keyboard/zone.d.ts.map +1 -1
  71. package/dist/telegram/budget-transformer.d.ts +35 -0
  72. package/dist/telegram/budget-transformer.d.ts.map +1 -0
  73. package/dist/telegram/outbound-budget.d.ts +101 -0
  74. package/dist/telegram/outbound-budget.d.ts.map +1 -0
  75. package/dist/telegram/send-failure.d.ts +6 -1
  76. package/dist/telegram/send-failure.d.ts.map +1 -1
  77. package/llms/react-keyboard-testing.txt +24 -0
  78. package/llms/react-keyboard.txt +264 -4
  79. package/llms/react.txt +1 -1
  80. package/llms/server.3.txt +31 -0
  81. package/llms/server.4.txt +5 -0
  82. package/llms/stitchkit.2.txt +118 -0
  83. package/llms/stitchkit.txt +8 -122
  84. package/llms/telegram-grammy.txt +22 -0
  85. package/llms/telegram.txt +76 -2
  86. package/llms/{upgrading-0.103.13-0.113.0.txt → upgrading-0.104.0-0.114.0.txt} +45 -84
  87. package/llms/upgrading-0.37.0-0.44.0.txt +444 -0
  88. package/llms/{upgrading-0.44.0-0.60.0.txt → upgrading-0.44.0-0.61.0.txt} +140 -271
  89. package/llms/{upgrading-0.61.0-0.74.0.txt → upgrading-0.62.0-0.78.0.txt} +137 -140
  90. package/llms/{upgrading-0.75.0-0.103.0.txt → upgrading-0.79.0-0.103.13.txt} +84 -137
  91. package/llms/upgrading.txt +5 -5
  92. package/llms-full.txt +453 -11
  93. package/llms.txt +12 -10
  94. package/package.json +9 -1
  95. package/llms/upgrading-0.37.0.txt +0 -176
  96. package/dist/{index-616xh7f2.js → index-4qnzda76.js} +0 -0
  97. package/dist/{index-fsw1ybf3.js → index-d9hq291n.js} +3 -3
  98. package/dist/{index-bjcjqj46.js → index-m8a44e64.js} +3 -3
  99. package/dist/{index-5efrpfmj.js → index-qndsr7f0.js} +3 -3
  100. package/dist/{index-zktz242w.js → index-s47ac8zt.js} +3 -3
  101. package/dist/{index-56yx8dxp.js → index-tvtacc9a.js} +3 -3
  102. /package/dist/{index-v1tswj0z.js → index-txg1npmg.js} +0 -0
package/CHANGELOG.md CHANGED
@@ -15,6 +15,48 @@ additive**; the first breaking change landed in 0.10.0. Grep the file for
15
15
 
16
16
  ## [Unreleased]
17
17
 
18
+ ## [0.114.1] - 2026-10-31
19
+
20
+ ### Added
21
+
22
+ - `stitchkit/react/keyboard` — `useNavZone` takes `mode: 'focus'` (`FocusZoneOptions`, and `ZoneOptions` for the union): the arrows move focus and Enter stays with the focused element, so a list of links or buttons no longer needs `document.activeElement.click()`; the zone reports nothing and has no `onChange`. `highlight` and `select` are unchanged. → ADR 0212
23
+ - `stitchkit/react/keyboard` — `ignore(event)` on a zone returns `true` for a key the application is using itself, such as an item dragged with the keyboard: the zone then neither moves, nor takes the key, nor calls `preventDefault`, inside the zone and outside it. `ZoneKeyEvent` types the event.
24
+ - `stitchkit/react/keyboard` — `mergeRefs(...refs)` makes one ref callback of several, for the zone's `ref` beside a drag handle's or a measuring hook's; `openedByKeyboard()` answers whether the element with focus shows a focus ring, to decide in the handler that opens a menu whether the first item takes focus. The surface ceiling is 23 names with `KeyLayerPhase`.
25
+ - `stitchkit/react/keyboard` — a zone's `outside: 'move'` makes the first arrow pressed with focus in no zone act as if focus were already on the current item: it moves from it and, in select mode, chooses the neighbour, for a list that answers the first arrow with a change. The default `'focus'` is the behaviour so far: focus lands on the current item and nothing else.
26
+ - `stitchkit/react/keyboard` — `useKeyLayer({ kind: 'local', phase: 'capture' })` listens before the element that has focus does, so a menu over a text field takes the arrows and Enter before the field acts on them; a key it takes is consumed with `preventDefault` and `stopPropagation`. Any other kind refuses the capture phase when it mounts, an `overlay` stays a barrier for layers of either phase, and the test bed models the phase (`listeningInCapture`, `propagationStopped`). → ADR 0212
27
+ - `stitchkit/react` — `EntityCacheListConfig` takes `insertCompare(incoming, existing)` instead of `compare` for a list whose server order the row does not determine: only a row entering the list is placed (before the first row it sorts ahead of, ties by `createAt`), no other row moves and an updated row keeps its place. `compare` and `insertCompare` together are refused when the handlers are created.
28
+ - `stitchkit/react/keyboard/testing` — a new evolving, peer-free entrypoint: `createKeyboardTestBed()` with a window, elements (`parent`, `inert`, `hidden`, field and zone marks) and key events, beside `createKeyLayerStack` and `createNavZone`, so the order of layers, `scope`/`inert` and the edges of a zone are tested without a DOM. The surface ceiling is 16 names. → ADR 0212
29
+ - `stitchkit/telegram/grammy` — a new evolving entrypoint with `telegramBudgetTransformer(budget)`, the token's outbound budget as one grammY client transformer: `bot.api.config.use(telegramBudgetTransformer(budget))` replaces the hand-written `budget.run` closure. It takes grammY's signal without a cast; a cancellation before the request was handed to the client (in the queue, or just after the grant) throws `TelegramNotDispatchedError`, and a cancellation after it was handed on stays the client's own error with an unknown outcome. `grammy` appears in the declarations only and is never imported at run time; the surface ceiling is 1 name. → ADR 0274
30
+
31
+ ### Fixed
32
+
33
+ - `stitchkit/telegram` — `TelegramOutboundBudget.run` pauses the token for a 429 that `send` resolves with, not only one it throws. A grammY client transformer sits below the place where grammY turns the Bot API's `{ ok: false, error_code: 429, parameters: { retry_after } }` body into a `GrammyError`, so a budget wired through `run` as documented paced every send and never paused: the next send left 40 ms after a 429 instead of after `retry_after`. A returned rate limit now pauses for the stated wait (or `retryAfterFallbackMs`), any other returned answer pauses nothing, and the response is returned unchanged; a client already wired through `run` is repaired without a change. → ADR 0274
34
+ **Affects:** `stitchkit/telegram` behaviour
35
+
36
+ - `stitchkit/react/keyboard` — a zone inside an area marked `data-local-keys` keeps its arrows. Any marked ancestor used to switch the zone off silently — a dropdown panel marked so that page shortcuts leave it alone left its own list with no keys. Only a field inside the zone, such as an input in one of its rows, keeps its keys from the zone now; an area that contains the zone, or the zone's own element carrying the mark, does not.
37
+ **Affects:** `stitchkit/react/keyboard` behaviour
38
+ - `stitchkit/react/keyboard` — the props `useNavZone` returns carry no key without a value: `role`, `aria-selected`, `aria-current` and `aria-label` were present as `undefined` and, spread after an attribute of the element's own or of another library, erased it (a drag handle's `role="button"` among them). They are now optional keys that are absent.
39
+ **Affects:** `stitchkit/react/keyboard` NavZoneProps, NavZoneItemProps
40
+ - `stitchkit/react/keyboard` — `useNavZone` no longer changes the zone while rendering. The zone adopts a render's options when it commits, and the render works out its own tab stop from its own options, so a render React starts and throws away — a suspended transition — leaves the keys meaning what the last committed render said. A new `value` still takes the pointed item back to the chosen one.
41
+ **Affects:** `stitchkit/react/keyboard` behaviour
42
+ - `stitchkit/react/keyboard` — focus on the zone's own element, such as a menu that took focus when it opened, lands the first arrow in either direction on the current item instead of one step beyond it. A zone does fewer scans of `items` per key and drops the ref callback cached for an item when its element goes, so a list whose ids change over time no longer keeps a callback for every id it ever showed: one ArrowDown at 20 000 ids takes about 28–30 µs (was 70–79) with numeric ids and 132–139 µs (was 188–194) with string ids.
43
+ **Affects:** `stitchkit/react/keyboard` behaviour
44
+ - `stitchkit`, `stitchkit/http` — `contractEndpointMatchers` compiles each route when the matcher is created instead of on every call. A matcher used to decode every path segment and build a regular expression for every literal segment on each call, so a server that asks several hundred matchers about each request spent a large share of its CPU there. A literal segment is now a string comparison, a segment holding a dynamic-prefix marker is one precompiled expression, a parameter is skipped, and a segment is decoded only where it is compared and only when it contains a `%`. The answers are unchanged: 73,807 pathnames over 14 route shapes (parameters, trailing wildcard, `stripPrefixKeys` markers, percent-encoding, a malformed escape, empty and repeated slashes) are asked of both algorithms with no difference. A full linear search over 620 matchers takes about 36–51 µs for a path in the middle of the list (was 332–394 µs) and 76–101 µs for a path nothing matches (was 717–766 µs).
45
+ **Affects:** `stitchkit` behaviour; `stitchkit/http` behaviour
46
+
47
+ ## [0.114.0] - 2026-10-30
48
+
49
+ ### ⚠️ Breaking changes
50
+
51
+ **Who must act:** code with an exhaustive `switch` or `Record` over `TelegramSendFailureReason` or `TELEGRAM_SEND_FAILURE_REASONS`, or a consumer table that must handle every reason. Code that only reads `retryable` and `recipientUnreachable` needs no change.
52
+
53
+ - `stitchkit/telegram` — **`TelegramSendFailureReason` gains `bot-to-bot-disabled`.** A `400 USER_BOT_TO_BOT_DISABLED` is now a permanent refusal instead of `unknown`; it is not retried and does not mark the recipient unreachable, because Telegram reports it when either bot has not enabled Bot to Bot messaging. Before: the reason was `unknown` and an exhaustive table compiled. After: add the reason and decide how to report it (`retryable: false`, `recipientUnreachable: false`). → ADR 0274
54
+ **Affects:** `stitchkit/telegram` TelegramSendFailureReason, TELEGRAM_SEND_FAILURE_REASONS, classifyTelegramSendFailure(reason)
55
+
56
+ ### Added
57
+
58
+ - `stitchkit/telegram` — `telegramOutboundBudget` gives one bot token one process-wide outbound budget: aliases of the token share it, different tokens are independent, `sendMediaGroup`/`sendPaidMedia` cost their media length, `copyMessages`/`forwardMessages` cost their message ids, and a 429 pauses every sender of the token. `budget.run(method, payload, signal, send)` is the transformer adapter; it paces, never retries and leaves a network/5xx outcome to the caller. The `stitchkit/telegram` surface ceiling rises from 98 to 102 names for the function and its three public types.
59
+
18
60
  ## [0.113.3] - 2026-10-30
19
61
 
20
62
  ### Fixed
package/README.md CHANGED
@@ -447,7 +447,7 @@ peer — an install pulls in only what the project actually uses.
447
447
  | `stitchkit-tui` | separate optional package | Renderer-neutral `./core` state plus a Bun/OpenTUI terminal controller, commands, model/session pickers and authenticated local attachment over a caller-composed harness. |
448
448
  | `@openrouter/ai-sdk-provider` | peer, optional | Only `stitchkit/agent-runtime/openrouter`; neutral runtime imports do not resolve it. |
449
449
  | SQLite | runtime built-in, optional | `bun:sqlite` through `stitchkit/agent-runtime/sqlite/bun`, or `node:sqlite` on Node ≥ 22.5 through the Node leaf. |
450
- | `grammy` | peer, optional | Only `stitchkit/application/grammy` at run time, and the declarations of `stitchkit/telegram/screens`; the neutral application kernel does not resolve it. |
450
+ | `grammy` | peer, optional | Only `stitchkit/application/grammy` at run time, and the declarations of `stitchkit/telegram/screens` and `stitchkit/telegram/grammy`; the neutral application kernel does not resolve it. |
451
451
  | `@opentelemetry/api` | peer, optional | Type-only boundary for `stitchkit/application/opentelemetry`; the adapter has no runtime import and owns no SDK/exporter. |
452
452
  | `@tanstack/react-query` + `react-query-kit` | peer, optional | Only `stitchkit/react` — `createCursorQuery`, `createCacheBridge`. |
453
453
  | `react` | peer, optional | Only the React subpaths: `stitchkit/react` with the two above, and `stitchkit/react/keyboard` — keyboard layers and list zones, hooks only. |
@@ -1 +1 @@
1
- {"version":3,"file":"client-url.d.ts","sourceRoot":"","sources":["../../src/browser/client-url.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAItD,OAAO,KAAK,EAAE,oBAAoB,EAAkB,MAAM,UAAU,CAAC;AAIrE,MAAM,WAAW,iBAAiB;IAChC,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACxC;AAgFD,sGAAsG;AACtG,wBAAgB,wBAAwB,CAAC,CAAC,SAAS,MAAM,EACvD,QAAQ,EAAE,WAAW,EACrB,cAAc,EAAE,MAAM,EACtB,MAAM,CAAC,EAAE,oBAAoB,CAAC,CAAC,CAAC,GAC/B,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO,CAsC/B;AA6DD,gFAAgF;AAChF,wBAAgB,iBAAiB,CAAC,CAAC,SAAS,MAAM,EAChD,QAAQ,EAAE,WAAW,EACrB,cAAc,EAAE,MAAM,EACtB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC7B,MAAM,CAAC,EAAE,oBAAoB,CAAC,CAAC,CAAC,GAC/B,iBAAiB,CAenB;AAED,qFAAqF;AACrF,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,MAAM,CAI9E"}
1
+ {"version":3,"file":"client-url.d.ts","sourceRoot":"","sources":["../../src/browser/client-url.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAItD,OAAO,KAAK,EAAE,oBAAoB,EAAkB,MAAM,UAAU,CAAC;AAIrE,MAAM,WAAW,iBAAiB;IAChC,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACxC;AAkFD,sGAAsG;AACtG,wBAAgB,wBAAwB,CAAC,CAAC,SAAS,MAAM,EACvD,QAAQ,EAAE,WAAW,EACrB,cAAc,EAAE,MAAM,EACtB,MAAM,CAAC,EAAE,oBAAoB,CAAC,CAAC,CAAC,GAC/B,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO,CAqC/B;AAoFD,gFAAgF;AAChF,wBAAgB,iBAAiB,CAAC,CAAC,SAAS,MAAM,EAChD,QAAQ,EAAE,WAAW,EACrB,cAAc,EAAE,MAAM,EACtB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC7B,MAAM,CAAC,EAAE,oBAAoB,CAAC,CAAC,CAAC,GAC/B,iBAAiB,CAenB;AAED,qFAAqF;AACrF,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,MAAM,CAI9E"}
@@ -6,7 +6,7 @@ import {
6
6
  AgentCodingToolAuthorizationSchema2,
7
7
  AgentCodingToolPathAuthorizationSchema2,
8
8
  createAgentCodingTools2
9
- } from "../../index-zktz242w.js";
9
+ } from "../../index-s47ac8zt.js";
10
10
  import"../../index-2kbysk9s.js";
11
11
  import"../../index-84bf5spd.js";
12
12
  import"../../index-7r4knwf8.js";
@@ -5,7 +5,7 @@ import"../../index-8kzct1d6.js";
5
5
  import {
6
6
  composeAgentPrompt2,
7
7
  createAgentRuntime2
8
- } from "../../index-7fc0c2np.js";
8
+ } from "../../index-n3v695sb.js";
9
9
  import"../../index-qaet40b2.js";
10
10
  import"../../index-mnkk1ffz.js";
11
11
  import"../../index-k42ckyzx.js";
@@ -15,15 +15,15 @@ import"../../index-ct75c3at.js";
15
15
  import"../../index-rhzkndr5.js";
16
16
  import"../../index-v6vb5qx8.js";
17
17
  import"../../index-snef22zr.js";
18
- import"../../index-56yx8dxp.js";
18
+ import"../../index-tvtacc9a.js";
19
19
  import"../../index-fggxgbrk.js";
20
20
  import"../../index-5w6t91ze.js";
21
21
  import"../../index-2kbysk9s.js";
22
22
  import"../../index-b0w7rbpt.js";
23
23
  import {
24
24
  createAgentHarnessControlServer2
25
- } from "../../index-506kd458.js";
26
- import"../../index-616xh7f2.js";
25
+ } from "../../index-aw6zahv1.js";
26
+ import"../../index-4qnzda76.js";
27
27
  import {
28
28
  walkContainedFiles
29
29
  } from "../../index-zrtrjkbf.js";
@@ -13,8 +13,8 @@ import {
13
13
  } from "../../index-2bqf0a74.js";
14
14
  import {
15
15
  createAgentHarnessControlServer2
16
- } from "../../index-506kd458.js";
17
- import"../../index-616xh7f2.js";
16
+ } from "../../index-aw6zahv1.js";
17
+ import"../../index-4qnzda76.js";
18
18
  import {
19
19
  withSignalDeadline
20
20
  } from "../../index-9tqbxv5p.js";
@@ -3,7 +3,7 @@ import {
3
3
  missingSandboxRestrictions2,
4
4
  codingRefusal,
5
5
  createAgentCodingTools2
6
- } from "../../index-zktz242w.js";
6
+ } from "../../index-s47ac8zt.js";
7
7
  import"../../index-ct75c3at.js";
8
8
  import"../../index-rhzkndr5.js";
9
9
  import"../../index-k42ckyzx.js";
@@ -19,13 +19,13 @@ import {
19
19
  startNativeCommand
20
20
  } from "../../index-7r4knwf8.js";
21
21
  import"../../index-zrtrjkbf.js";
22
+ import"../../index-ega3yz4c.js";
22
23
  import {
23
24
  readBoundedBody2
24
- } from "../../index-5efrpfmj.js";
25
+ } from "../../index-qndsr7f0.js";
25
26
  import {
26
27
  MAX_TIMER_MS
27
28
  } from "../../index-eemvahkc.js";
28
- import"../../index-ega3yz4c.js";
29
29
 
30
30
  // src/agent-runtime/sandbox-bubblewrap.ts
31
31
  import { mkdir as mkdir2, mkdtemp, realpath, rm as rm2 } from "node:fs/promises";
@@ -1,13 +1,13 @@
1
1
  import"../../../index-fggxgbrk.js";
2
- import"../../../index-523tq7y4.js";
2
+ import"../../../index-a3462dqf.js";
3
3
  import"../../../index-8kzct1d6.js";
4
4
  import {
5
5
  initializeAgentRuntimeSqlite2,
6
6
  createSqliteAgentRuntimeStore2
7
- } from "../../../index-aykhzcnf.js";
7
+ } from "../../../index-qj1sy4ep.js";
8
8
  import"../../../index-kqnd6a85.js";
9
9
  import"../../../index-5w6t91ze.js";
10
- import"../../../index-zktz242w.js";
10
+ import"../../../index-s47ac8zt.js";
11
11
  import"../../../index-ct75c3at.js";
12
12
  import"../../../index-rhzkndr5.js";
13
13
  import"../../../index-k42ckyzx.js";
@@ -1,13 +1,13 @@
1
1
  import"../../../index-fggxgbrk.js";
2
- import"../../../index-523tq7y4.js";
2
+ import"../../../index-a3462dqf.js";
3
3
  import"../../../index-8kzct1d6.js";
4
4
  import {
5
5
  initializeAgentRuntimeSqlite2,
6
6
  createSqliteAgentRuntimeStore2
7
- } from "../../../index-aykhzcnf.js";
7
+ } from "../../../index-qj1sy4ep.js";
8
8
  import"../../../index-kqnd6a85.js";
9
9
  import"../../../index-5w6t91ze.js";
10
- import"../../../index-zktz242w.js";
10
+ import"../../../index-s47ac8zt.js";
11
11
  import"../../../index-ct75c3at.js";
12
12
  import"../../../index-rhzkndr5.js";
13
13
  import"../../../index-k42ckyzx.js";
@@ -10,8 +10,8 @@ import {
10
10
  advanceToolChronology
11
11
  } from "../../index-fggxgbrk.js";
12
12
  import"../../index-5w6t91ze.js";
13
- import"../../index-zktz242w.js";
14
- import"../../index-523tq7y4.js";
13
+ import"../../index-s47ac8zt.js";
14
+ import"../../index-a3462dqf.js";
15
15
  import"../../index-ct75c3at.js";
16
16
  import"../../index-rhzkndr5.js";
17
17
  import"../../index-k42ckyzx.js";
@@ -21,12 +21,12 @@ import"../../index-7r4knwf8.js";
21
21
  import"../../index-snef22zr.js";
22
22
  import {
23
23
  createMemoryAgentRuntimeStore2
24
- } from "../../index-tpwbct8j.js";
24
+ } from "../../index-dc9ere5p.js";
25
25
  import"../../index-zrtrjkbf.js";
26
+ import"../../index-ega3yz4c.js";
26
27
  import {
27
28
  assertPositiveSafeInteger
28
29
  } from "../../index-0s4xebbg.js";
29
- import"../../index-ega3yz4c.js";
30
30
 
31
31
  // src/agent-runtime/fault-bench.ts
32
32
  import { createServer } from "node:http";
@@ -5,7 +5,7 @@ import {
5
5
  missingSandboxRestrictions2,
6
6
  recordAgentSandboxProbe2,
7
7
  refuseUnknownSpillReference
8
- } from "../index-zktz242w.js";
8
+ } from "../index-s47ac8zt.js";
9
9
  import {
10
10
  AgentRecordIdSchema2,
11
11
  AgentRecordVersionSchema2,
@@ -58,7 +58,7 @@ import {
58
58
  AgentHistoryMutationSchema2,
59
59
  ACTIVE_AGENT_RUN_STATES2,
60
60
  createAgentRuntimeStore2
61
- } from "../index-523tq7y4.js";
61
+ } from "../index-a3462dqf.js";
62
62
  import {
63
63
  AgentStoreEventKindSchema2,
64
64
  AgentStoreEventEnvelopeSchema2,
@@ -123,7 +123,7 @@ import {
123
123
  agentGoalStateSlot2,
124
124
  agentTodoStateSlot2,
125
125
  createAgentRuntime2
126
- } from "../index-7fc0c2np.js";
126
+ } from "../index-n3v695sb.js";
127
127
  import {
128
128
  AgentConversationSummarySchema2,
129
129
  AgentConversationPageSchema2,
@@ -139,7 +139,7 @@ import"../index-htxh46ej.js";
139
139
  import {
140
140
  mountAgent2,
141
141
  buildToolManifest2
142
- } from "../index-1csp1hwm.js";
142
+ } from "../index-6p3frkv5.js";
143
143
  import {
144
144
  createBoundedSinkManager
145
145
  } from "../index-qaet40b2.js";
@@ -185,28 +185,28 @@ import {
185
185
  ParkRecordDecodeError2,
186
186
  ParkAbortedError2
187
187
  } from "../index-snef22zr.js";
188
- import"../index-56yx8dxp.js";
188
+ import"../index-tvtacc9a.js";
189
189
  import"../index-2kbysk9s.js";
190
190
  import"../index-84bf5spd.js";
191
191
  import"../index-7r4knwf8.js";
192
192
  import {
193
193
  createMemoryAgentRuntimeStore2
194
- } from "../index-tpwbct8j.js";
194
+ } from "../index-dc9ere5p.js";
195
195
  import {
196
196
  createAgentRuntimeEventSink2
197
- } from "../index-616xh7f2.js";
197
+ } from "../index-4qnzda76.js";
198
198
  import"../index-zrtrjkbf.js";
199
+ import"../index-86nbfysb.js";
200
+ import {
201
+ defineRuntimeTool2,
202
+ executableAgentRuntimeTools
203
+ } from "../index-ega3yz4c.js";
199
204
  import {
200
205
  MAX_TIMER_MS
201
206
  } from "../index-eemvahkc.js";
202
207
  import {
203
208
  assertPositiveSafeInteger
204
209
  } from "../index-0s4xebbg.js";
205
- import"../index-86nbfysb.js";
206
- import {
207
- defineRuntimeTool2,
208
- executableAgentRuntimeTools
209
- } from "../index-ega3yz4c.js";
210
210
  import {
211
211
  createTraceContext2,
212
212
  childSpan2
@@ -23,6 +23,9 @@ import {
23
23
  createFileStateStore2
24
24
  } from "../../index-hy802jnr.js";
25
25
  import"../../index-6b3pcq5z.js";
26
+ import {
27
+ isJsonData
28
+ } from "../../index-m6w6jtda.js";
26
29
  import {
27
30
  BoundedFileReadError,
28
31
  openRegularFile,
@@ -38,9 +41,6 @@ import {
38
41
  import {
39
42
  raceAbort
40
43
  } from "../../index-b0kddvzw.js";
41
- import {
42
- isJsonData
43
- } from "../../index-m6w6jtda.js";
44
44
  import {
45
45
  MAX_TIMER_MS
46
46
  } from "../../index-eemvahkc.js";
@@ -77,7 +77,7 @@ import {
77
77
  ApplicationRestartResultSchema2,
78
78
  ApplicationAdmissionError2,
79
79
  createApplication2
80
- } from "../index-v1tswj0z.js";
80
+ } from "../index-txg1npmg.js";
81
81
  import"../index-rfkh44ss.js";
82
82
  import {
83
83
  diff,
@@ -92,12 +92,12 @@ import {
92
92
  import {
93
93
  withDeadline
94
94
  } from "../index-9tqbxv5p.js";
95
- import {
96
- MAX_TIMER_MS
97
- } from "../index-eemvahkc.js";
98
95
  import {
99
96
  measureSize2
100
97
  } from "../index-e6c2spsd.js";
98
+ import {
99
+ MAX_TIMER_MS
100
+ } from "../index-eemvahkc.js";
101
101
  import {
102
102
  AppError2
103
103
  } from "../index-qcn84byh.js";
@@ -15,7 +15,7 @@ import {
15
15
  gzipCliAsset,
16
16
  decodeCliAsset,
17
17
  compareCliVersions2
18
- } from "../../index-erv5shjq.js";
18
+ } from "../../index-kdnfe0sr.js";
19
19
  import {
20
20
  withExclusiveLock2
21
21
  } from "../../index-6b3pcq5z.js";
@@ -16,7 +16,7 @@ import {
16
16
  renderCliView2,
17
17
  pollUntilDone2,
18
18
  createCli2
19
- } from "../index-k7z3j3hr.js";
19
+ } from "../index-km2qw407.js";
20
20
  import"../index-k42ckyzx.js";
21
21
  import"../index-ct75c3at.js";
22
22
  import"../index-rhzkndr5.js";
@@ -40,12 +40,12 @@ import {
40
40
  checkCliUpdate2,
41
41
  applyCliUpdate2,
42
42
  rollbackCliUpdate2
43
- } from "../index-erv5shjq.js";
43
+ } from "../index-kdnfe0sr.js";
44
+ import"../index-86nbfysb.js";
45
+ import"../index-ega3yz4c.js";
44
46
  import {
45
47
  writeFileAtomicSync2
46
48
  } from "../index-07dcf2yn.js";
47
- import"../index-86nbfysb.js";
48
- import"../index-ega3yz4c.js";
49
49
  import {
50
50
  safeJsonParse
51
51
  } from "../index-zsarb5xp.js";
@@ -4,7 +4,7 @@ import {
4
4
  paginatedSchema2,
5
5
  encodeCursor2,
6
6
  decodeCursor2
7
- } from "../index-fy4av0hq.js";
7
+ } from "../index-9bwcthxw.js";
8
8
  import {
9
9
  DEFAULT_CONTRACT_STREAM_FRAME_BYTES2,
10
10
  ContractStreamFrameSchema2
@@ -14,7 +14,7 @@ import {
14
14
  ALL_TRANSPORTS2,
15
15
  TOOL_TRANSPORTS2,
16
16
  defineContract2
17
- } from "../index-fsw1ybf3.js";
17
+ } from "../index-d9hq291n.js";
18
18
  import {
19
19
  ManagedFilePathSchema2,
20
20
  ManagedFileRefSchema2
@@ -14,13 +14,13 @@ import {
14
14
  createUrlBuilder2,
15
15
  createUrlBuilders2,
16
16
  createScopedUrlBuilders2
17
- } from "../index-c5at3ykd.js";
17
+ } from "../index-tsngj2b5.js";
18
18
  import {
19
19
  ApiError2
20
20
  } from "../index-kfjkb396.js";
21
21
  import {
22
22
  readBoundedBody2
23
- } from "../index-5efrpfmj.js";
23
+ } from "../index-qndsr7f0.js";
24
24
  export {
25
25
  ApiError2 as ApiError,
26
26
  contractEndpointMatchers2 as contractEndpointMatchers,
@@ -37,14 +37,14 @@ import {
37
37
  ALL_TRANSPORTS2,
38
38
  TOOL_TRANSPORTS2,
39
39
  defineContract2
40
- } from "../index-fsw1ybf3.js";
40
+ } from "../index-d9hq291n.js";
41
41
  import {
42
42
  defineErrors2,
43
43
  createContractFactory2,
44
44
  paginatedSchema2,
45
45
  encodeCursor2,
46
46
  decodeCursor2
47
- } from "../index-fy4av0hq.js";
47
+ } from "../index-9bwcthxw.js";
48
48
  import {
49
49
  ManagedFilePathSchema2,
50
50
  ManagedFileRefSchema2
@@ -71,12 +71,12 @@ import {
71
71
  createUrlBuilder2,
72
72
  createUrlBuilders2,
73
73
  createScopedUrlBuilders2
74
- } from "../index-c5at3ykd.js";
74
+ } from "../index-tsngj2b5.js";
75
75
  import {
76
76
  createRetainedTopics2,
77
77
  createRealtimeClientWithPeer,
78
78
  createSocketIOClientWithPeer
79
- } from "../index-bjcjqj46.js";
79
+ } from "../index-m8a44e64.js";
80
80
  import {
81
81
  bindRealtimeClient2
82
82
  } from "../index-jk29rwkr.js";
@@ -85,7 +85,7 @@ import {
85
85
  } from "../index-kfjkb396.js";
86
86
  import {
87
87
  readBoundedBody2
88
- } from "../index-5efrpfmj.js";
88
+ } from "../index-qndsr7f0.js";
89
89
  import {
90
90
  sleep
91
91
  } from "../index-eemvahkc.js";
@@ -10,8 +10,8 @@ import {
10
10
  } from "../index-q0th8q0z.js";
11
11
  import"../index-3za04re9.js";
12
12
  import"../index-4s0fep5q.js";
13
- import"../index-fsw1ybf3.js";
14
- import"../index-fy4av0hq.js";
13
+ import"../index-d9hq291n.js";
14
+ import"../index-9bwcthxw.js";
15
15
  import"../index-xqhede6x.js";
16
16
  import {
17
17
  createHandler2,
@@ -23,7 +23,7 @@ import {
23
23
  createSocketIOServer2,
24
24
  UnixClientTransportError2,
25
25
  createUnixClientTransport2
26
- } from "../index-vtann8bz.js";
26
+ } from "../index-p0rf7sq9.js";
27
27
  import {
28
28
  bindRealtimeServer2
29
29
  } from "../index-2bqf0a74.js";
@@ -10,9 +10,6 @@ import {
10
10
  withinBound,
11
11
  createBoundedSinkManager
12
12
  } from "../index-qaet40b2.js";
13
- import {
14
- assertPositiveSafeInteger
15
- } from "../index-0s4xebbg.js";
16
13
  import {
17
14
  redact2,
18
15
  truncatePreview2,
@@ -30,6 +27,9 @@ import {
30
27
  setRequestError2,
31
28
  wrapInRequestContext2
32
29
  } from "../index-r6v4mc67.js";
30
+ import {
31
+ assertPositiveSafeInteger
32
+ } from "../index-0s4xebbg.js";
33
33
  import {
34
34
  createTraceContext2,
35
35
  parseTraceparent2,
@@ -0,0 +1,2 @@
1
+ export { createKeyboardTestBed, createKeyLayerStack, createNavZone, type KeyboardTestBed, type KeyLayerHandle, type KeyLayerStack, type KeyLayerState, type KeyListenerTarget, type LayerKeyEvent, type LayerScope, type NavZoneController, type TestElement, type TestElementInit, type TestKeyEvent, type TestKeyInit, type ZoneItemElement, } from '../../../react/keyboard/testing.js';
2
+ //# sourceMappingURL=testing.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"testing.d.ts","sourceRoot":"","sources":["../../../../src/entrypoints/react/keyboard/testing.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,qBAAqB,EACrB,mBAAmB,EACnB,aAAa,EACb,KAAK,eAAe,EACpB,KAAK,cAAc,EACnB,KAAK,aAAa,EAClB,KAAK,aAAa,EAClB,KAAK,iBAAiB,EACtB,KAAK,aAAa,EAClB,KAAK,UAAU,EACf,KAAK,iBAAiB,EACtB,KAAK,WAAW,EAChB,KAAK,eAAe,EACpB,KAAK,YAAY,EACjB,KAAK,WAAW,EAChB,KAAK,eAAe,GACrB,MAAM,iCAAiC,CAAC"}
@@ -0,0 +1,127 @@
1
+ import {
2
+ KEY_FIELD_SELECTOR,
3
+ createKeyLayerStack2,
4
+ ZONE_ATTRIBUTE,
5
+ createNavZone2
6
+ } from "../../../index-p02zgk8x.js";
7
+
8
+ // src/react/keyboard/testing.ts
9
+ class FakeElement extends EventTarget {
10
+ isConnected = true;
11
+ inert;
12
+ hidden;
13
+ focusCount = 0;
14
+ scrollCount = 0;
15
+ parent;
16
+ marks;
17
+ constructor(init = {}) {
18
+ super();
19
+ this.parent = init.parent ?? null;
20
+ this.inert = init.inert ?? false;
21
+ this.hidden = init.hidden ?? false;
22
+ const marks = new Set;
23
+ if (init.field === true || init.localKeys === true)
24
+ marks.add(KEY_FIELD_SELECTOR);
25
+ if (init.zone === true)
26
+ marks.add(`[${ZONE_ATTRIBUTE}]`);
27
+ this.marks = marks;
28
+ }
29
+ contains(other) {
30
+ for (let node = other;node !== null; node = node.parent)
31
+ if (node === this)
32
+ return true;
33
+ return false;
34
+ }
35
+ closest(selectors) {
36
+ for (let node = this;node !== null; node = node.parent) {
37
+ if (node instanceof FakeElement && node.matches(selectors))
38
+ return node;
39
+ }
40
+ return null;
41
+ }
42
+ matches(selectors) {
43
+ return selectors === "[inert]" ? this.inert : this.marks.has(selectors);
44
+ }
45
+ checkVisibility() {
46
+ return !this.hidden;
47
+ }
48
+ focus() {
49
+ this.focusCount += 1;
50
+ }
51
+ scrollIntoView() {
52
+ this.scrollCount += 1;
53
+ }
54
+ child(init = {}) {
55
+ return new FakeElement({ ...init, parent: this });
56
+ }
57
+ }
58
+
59
+ class FakeKey {
60
+ key;
61
+ defaultPrevented = false;
62
+ propagationStopped = false;
63
+ repeat;
64
+ isComposing;
65
+ target;
66
+ altKey;
67
+ ctrlKey;
68
+ metaKey;
69
+ shiftKey;
70
+ constructor(key, init = {}) {
71
+ this.key = key;
72
+ this.repeat = init.repeat ?? false;
73
+ this.isComposing = init.isComposing ?? false;
74
+ this.target = init.target ?? null;
75
+ this.altKey = init.altKey ?? false;
76
+ this.ctrlKey = init.ctrlKey ?? false;
77
+ this.metaKey = init.metaKey ?? false;
78
+ this.shiftKey = init.shiftKey ?? false;
79
+ }
80
+ preventDefault() {
81
+ this.defaultPrevented = true;
82
+ }
83
+ stopPropagation() {
84
+ this.propagationStopped = true;
85
+ }
86
+ }
87
+
88
+ class FakeWindow {
89
+ bubbling = new Set;
90
+ capturing = new Set;
91
+ addEventListener(_type, listener, capture = false) {
92
+ (capture ? this.capturing : this.bubbling).add(listener);
93
+ }
94
+ removeEventListener(_type, listener, capture = false) {
95
+ (capture ? this.capturing : this.bubbling).delete(listener);
96
+ }
97
+ }
98
+ function createKeyboardTestBed() {
99
+ const view = new FakeWindow;
100
+ const stack = createKeyLayerStack2(view);
101
+ return {
102
+ stack,
103
+ get listening() {
104
+ return view.bubbling.size + view.capturing.size > 0;
105
+ },
106
+ get listeningInCapture() {
107
+ return view.capturing.size > 0;
108
+ },
109
+ element: (init) => new FakeElement(init),
110
+ key: (name, init) => new FakeKey(name, init),
111
+ press(name, init) {
112
+ const event = new FakeKey(name, init);
113
+ for (const listener of view.capturing)
114
+ listener(event);
115
+ if (event.propagationStopped)
116
+ return event;
117
+ for (const listener of view.bubbling)
118
+ listener(event);
119
+ return event;
120
+ }
121
+ };
122
+ }
123
+ export {
124
+ createKeyLayerStack2 as createKeyLayerStack,
125
+ createKeyboardTestBed,
126
+ createNavZone2 as createNavZone
127
+ };
@@ -1,4 +1,6 @@
1
1
  export { type EscapeLayerOptions, type KeyLayerOptions, type NavZone, type NavZoneItemProps, type NavZoneProps, useEscapeLayer, useKeyLayer, useNavZone, } from '../../react/keyboard/hooks.js';
2
- export { isKeyFieldTarget, type KeyLayerKind } from '../../react/keyboard/layers.js';
3
- export { type NavZoneOptions, type NextZoneIndexInput, nextZoneIndex, type ZoneChangeCause, type ZoneItemId, type ZoneMove, type ZoneOrientation, } from '../../react/keyboard/zone.js';
2
+ export { isKeyFieldTarget, type KeyLayerKind, type KeyLayerPhase, } from '../../react/keyboard/layers.js';
3
+ export { openedByKeyboard } from '../../react/keyboard/modality.js';
4
+ export { mergeRefs } from '../../react/keyboard/refs.js';
5
+ export { type FocusZoneOptions, type NavZoneOptions, type NextZoneIndexInput, nextZoneIndex, type ZoneChangeCause, type ZoneItemId, type ZoneKeyEvent, type ZoneMove, type ZoneOptions, type ZoneOrientation, } from '../../react/keyboard/zone.js';
4
6
  //# sourceMappingURL=keyboard.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"keyboard.d.ts","sourceRoot":"","sources":["../../../src/entrypoints/react/keyboard.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,kBAAkB,EACvB,KAAK,eAAe,EACpB,KAAK,OAAO,EACZ,KAAK,gBAAgB,EACrB,KAAK,YAAY,EACjB,cAAc,EACd,WAAW,EACX,UAAU,GACX,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,gBAAgB,EAAE,KAAK,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAClF,OAAO,EACL,KAAK,cAAc,EACnB,KAAK,kBAAkB,EACvB,aAAa,EACb,KAAK,eAAe,EACpB,KAAK,UAAU,EACf,KAAK,QAAQ,EACb,KAAK,eAAe,GACrB,MAAM,2BAA2B,CAAC"}
1
+ {"version":3,"file":"keyboard.d.ts","sourceRoot":"","sources":["../../../src/entrypoints/react/keyboard.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,kBAAkB,EACvB,KAAK,eAAe,EACpB,KAAK,OAAO,EACZ,KAAK,gBAAgB,EACrB,KAAK,YAAY,EACjB,cAAc,EACd,WAAW,EACX,UAAU,GACX,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACL,gBAAgB,EAChB,KAAK,YAAY,EACjB,KAAK,aAAa,GACnB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EACL,KAAK,gBAAgB,EACrB,KAAK,cAAc,EACnB,KAAK,kBAAkB,EACvB,aAAa,EACb,KAAK,eAAe,EACpB,KAAK,UAAU,EACf,KAAK,YAAY,EACjB,KAAK,QAAQ,EACb,KAAK,WAAW,EAChB,KAAK,eAAe,GACrB,MAAM,2BAA2B,CAAC"}