@abide/abide 0.124.1 → 0.125.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/ABIDE.md +4 -0
- package/CHANGELOG.md +36 -0
- package/bin/abide.ts +3 -2
- package/docs/REGISTRY.md +66 -40
- package/docs/RULEBOOK.md +202 -18
- package/docs/abide.md +391 -67
- package/package.json +1 -1
- package/src/compiler/appMap.ts +14 -1
- package/src/compiler/declaredExports.ts +41 -0
- package/src/compiler/handlersUnder.ts +1 -0
- package/src/compiler/hookCalls.ts +1 -0
- package/src/compiler/projectShadow.ts +52 -2
- package/src/compiler/readsIn.ts +39 -34
- package/src/server/PageRender.ts +7 -8
- package/src/server/abideModules.ts +6 -0
- package/src/server/answerRequest.ts +115 -52
- package/src/server/answerSocket.ts +6 -5
- package/src/server/answerWorker.ts +34 -23
- package/src/server/assistant.ts +141 -35
- package/src/server/banner.ts +9 -5
- package/src/server/bridgeRelay.ts +3 -3
- package/src/server/callerOf.ts +5 -0
- package/src/server/claudeCode.ts +20 -11
- package/src/server/commands.ts +14 -7
- package/src/server/createApp.ts +65 -12
- package/src/server/devWorker.ts +18 -16
- package/src/server/generatedSurfaces.ts +6 -5
- package/src/server/handlerFileMount.ts +2 -0
- package/src/server/hooks.ts +54 -8
- package/src/server/index.ts +18 -4
- package/src/server/invokeHandler.ts +1 -1
- package/src/server/mountHandlers.ts +6 -0
- package/src/server/principal.ts +3 -2
- package/src/server/render.ts +11 -2
- package/src/server/requestScope.ts +61 -1
- package/src/server/responseRelay.ts +9 -3
- package/src/server/serveDev.ts +18 -3
- package/src/server/sqliteStore.ts +65 -0
- package/src/server/testMount.ts +1 -0
- package/src/shared/AssistantEvent.ts +40 -0
- package/src/shared/BrowserHooks.ts +73 -0
- package/src/shared/CURRENT_ROUTER.ts +3 -1
- package/src/shared/Issues.ts +11 -3
- package/src/shared/Middleware.ts +9 -9
- package/src/shared/UNEXPECTED.ts +1 -1
- package/src/shared/answerOf.ts +9 -4
- package/src/shared/imagePiece.ts +85 -0
- package/src/shared/index.ts +17 -0
- package/src/shared/isServer.ts +15 -0
- package/src/shared/navigate.ts +10 -3
- package/src/shared/onError.ts +51 -0
- package/src/shared/onRefusal.ts +47 -0
- package/src/shared/online.ts +5 -1
- package/src/shared/reactive/Keyed.ts +12 -1
- package/src/shared/reactive/Reactive.ts +53 -25
- package/src/shared/reactive/cellShape.ts +4 -3
- package/src/shared/reactive/poll.ts +49 -0
- package/src/shared/reactive/scoped.ts +10 -1
- package/src/shared/reactive/scoping.ts +14 -0
- package/src/shared/reactive/watch.ts +19 -8
- package/src/shared/resultsOf.ts +21 -0
- package/src/shared/route.ts +18 -4
- package/src/shared/rpc.ts +112 -26
- package/src/shared/seededDocument.ts +5 -6
- package/src/shared/storedValue.ts +32 -0
- package/src/shared/webStore.ts +54 -0
- package/src/ui/Router.ts +42 -9
- package/src/ui/outboxQueue.ts +1 -1
- package/src/ui/wire.ts +4 -4
- package/src/shared/KEEP_OPENED.ts +0 -7
- /package/src/{server → shared}/IMAGE_TYPES.ts +0 -0
package/docs/RULEBOOK.md
CHANGED
|
@@ -383,6 +383,20 @@ producer.
|
|
|
383
383
|
7.19 A load over a value `s.invalidate` marked that is refused with `HttpError` at 503 MUST leave the
|
|
384
384
|
value it held being served.
|
|
385
385
|
|
|
386
|
+
7.20 `poll` MUST refresh the value per 7.4 every `poll` milliseconds from where it is constructed,
|
|
387
|
+
and on a `Keyed` MUST refresh each entry the `Keyed` holds.
|
|
388
|
+
|
|
389
|
+
7.21 `poll` MUST NOT refresh a value while its `s.busy` is true.
|
|
390
|
+
|
|
391
|
+
7.22 A `poll` timer MUST NOT hold the process open.
|
|
392
|
+
|
|
393
|
+
7.23 `poll` MUST stop once the value is released: the setup or request that built it, or its
|
|
394
|
+
`Keyed`, ended.
|
|
395
|
+
|
|
396
|
+
7.24 `poll` on a value with no producer MUST be inert.
|
|
397
|
+
|
|
398
|
+
7.25 A `poll` that is not a positive number MUST refuse at construction.
|
|
399
|
+
|
|
386
400
|
# 8. Stores
|
|
387
401
|
|
|
388
402
|
8.1 A `Store` MUST provide both `get` and `set`.
|
|
@@ -400,7 +414,8 @@ miss falls back to.
|
|
|
400
414
|
|
|
401
415
|
8.7 A restored stream MUST report `s.ready` true and `s.busy` false.
|
|
402
416
|
|
|
403
|
-
8.8 A `Store`'s `set` MUST run once per production, per 5.2
|
|
417
|
+
8.8 A `Store`'s `set` MUST run once per production, per 5.2, save a restore and the initial value a
|
|
418
|
+
miss falls back to.
|
|
404
419
|
|
|
405
420
|
8.9 A `Store`'s `set` on a streaming producer MUST run once at close, on the accumulation.
|
|
406
421
|
|
|
@@ -432,6 +447,26 @@ the function it is handed MUST run `get` again as a restore, per 8.18, and MUST
|
|
|
432
447
|
8.21 What a `Store`'s `watch` returns MUST be called once the `Reactive` is released: a `Keyed`
|
|
433
448
|
entry evicted, or the setup or request that built it, or its `Keyed`, ended.
|
|
434
449
|
|
|
450
|
+
8.22 `webStore` MUST keep the value under its key in `localStorage`, or in `sessionStorage` where its
|
|
451
|
+
`area` is `'session'`.
|
|
452
|
+
|
|
453
|
+
8.23 `webStore` MUST answer every `get` with a miss, and MUST write nothing, where the process has no
|
|
454
|
+
Web Storage.
|
|
455
|
+
|
|
456
|
+
8.24 `webStore`'s `watch` MUST call what it is handed when another document writes or clears its key
|
|
457
|
+
in its area.
|
|
458
|
+
|
|
459
|
+
8.25 `sqliteStore` MUST keep the value in one row of its table under its key, and MUST create the
|
|
460
|
+
table where it does not exist.
|
|
461
|
+
|
|
462
|
+
8.26 `webStore` and `sqliteStore` MUST answer a miss for a value whose `ttl`, as their `set` received
|
|
463
|
+
it, has passed.
|
|
464
|
+
|
|
465
|
+
8.27 `webStore` and `sqliteStore` MUST run their `schema` on what `get` reads, and MUST throw what it
|
|
466
|
+
refuses, per 8.15.
|
|
467
|
+
|
|
468
|
+
8.28 `webStore` and `sqliteStore` MUST keep the value as JSON.
|
|
469
|
+
|
|
435
470
|
# 9. Streams and wired values
|
|
436
471
|
|
|
437
472
|
9.1 A streaming producer's `Stored` MUST be the chunks accumulated so far, materialized on the
|
|
@@ -679,9 +714,9 @@ teardown of the scope it was opened in.
|
|
|
679
714
|
12.6 A throw from an `Effect` or a `Disposer`, and a read of a failed `Reactive` inside one, MUST
|
|
680
715
|
reach `onError` as thrown, and MUST warn on `abide:watch` with the trace.
|
|
681
716
|
|
|
682
|
-
12.7
|
|
683
|
-
to the caller of `watch` from its first run, and reported with `reportError` from
|
|
684
|
-
MUST NOT keep any other `Effect` the same turn woke from running.
|
|
717
|
+
12.7 Where `isServer` is false, a throw from an `Effect` MUST additionally surface as an uncaught
|
|
718
|
+
error — re-thrown to the caller of `watch` from its first run, and reported with `reportError` from
|
|
719
|
+
a rerun — and MUST NOT keep any other `Effect` the same turn woke from running.
|
|
685
720
|
|
|
686
721
|
12.8 An `Effect` that threw MUST stop its `watch`.
|
|
687
722
|
|
|
@@ -698,13 +733,20 @@ woke have run.
|
|
|
698
733
|
12.13 A `watch` registered inside a `{#if}` arm or a `{#for}` row MUST stop when the region
|
|
699
734
|
holding that arm or row is removed.
|
|
700
735
|
|
|
701
|
-
12.14 A `reactive` over a body
|
|
702
|
-
|
|
703
|
-
|
|
736
|
+
12.14 A `reactive` over a body, built where 12.4, 12.5 or 12.13 would own a `watch`, MUST stop
|
|
737
|
+
reading its sources once that owner stops and nothing else reads it, and MUST answer a later read
|
|
738
|
+
with what its body computes then.
|
|
704
739
|
|
|
705
740
|
12.15 The `Effect` values one turn wakes, a slot's own update among them, MAY run in any order,
|
|
706
741
|
save where a clause orders them.
|
|
707
742
|
|
|
743
|
+
12.16 A stream released under 12.14 MUST stop its run, and the later read MUST start it once more,
|
|
744
|
+
whether or not the stopped run had closed.
|
|
745
|
+
|
|
746
|
+
12.17 A `reactive` declared where 12.4, 12.5 and 12.13 would own no `watch` MUST NOT be owned by
|
|
747
|
+
one current where it is first reached, save the instance a request builds of it under 11.67, which
|
|
748
|
+
that request owns.
|
|
749
|
+
|
|
708
750
|
# 13. Selections
|
|
709
751
|
|
|
710
752
|
13.1 A `Selection` MUST be one `Reactive`, one `Keyed`, one `Rpc`, or a set of `tags`.
|
|
@@ -1134,6 +1176,13 @@ a call not yet delivered.
|
|
|
1134
1176
|
as a write made here (3.10), and a `GET`'s copy that 16.81 or this settles MUST be loaded again once
|
|
1135
1177
|
`online` is true.
|
|
1136
1178
|
|
|
1179
|
+
16.86 A refusal a rung may answer with MUST reach `Failures` (16.8) where the rungs are listed at the
|
|
1180
|
+
declaration, and a rung naming no refusal, one typed to answer anything or a `Middleware` whose
|
|
1181
|
+
`Refused` is `Failed<string, unknown>`, MUST add none.
|
|
1182
|
+
|
|
1183
|
+
16.87 A handler whose parameter carries no annotation MUST take its `Args` from the `args` its options
|
|
1184
|
+
declare.
|
|
1185
|
+
|
|
1137
1186
|
# 17. Response helpers
|
|
1138
1187
|
|
|
1139
1188
|
17.1 Every body helper MUST take `Values<T>`.
|
|
@@ -1338,6 +1387,8 @@ MUST NOT change that type.
|
|
|
1338
1387
|
19.25 `validateJson` MUST read a member left `undefined`, at any depth of a record, as absent to
|
|
1339
1388
|
`required`, `properties` and `additionalProperties` — in process as the wire carries it (30.28).
|
|
1340
1389
|
|
|
1390
|
+
19.26 An `Issues<T>` over an `Rpc` MUST be the `Issues` of that `Rpc`'s `Args`.
|
|
1391
|
+
|
|
1341
1392
|
# 20. Generated surfaces
|
|
1342
1393
|
|
|
1343
1394
|
20.1 Every surface `Clients` names MUST be derived from the route table, and MUST NOT be authored
|
|
@@ -1481,7 +1532,7 @@ stale-if-error=31536000`.
|
|
|
1481
1532
|
|
|
1482
1533
|
# 22. Request-scoped ambients
|
|
1483
1534
|
|
|
1484
|
-
22.1 `request`, `response` and `server` MUST throw outside a request.
|
|
1535
|
+
22.1 `request`, `requestIP`, `response` and `server` MUST throw outside a request.
|
|
1485
1536
|
|
|
1486
1537
|
22.2 `cookies` MUST be isomorphic, and on a server writes MUST be collected onto the response.
|
|
1487
1538
|
|
|
@@ -1505,6 +1556,16 @@ being served.
|
|
|
1505
1556
|
a connection to the socket mux, whose headers went out with the upgrade. A caller minted there MUST
|
|
1506
1557
|
be that scope's alone.
|
|
1507
1558
|
|
|
1559
|
+
22.11 `isServer` MUST be true inside a request, an `App.run` or a `render`, and wherever there is no
|
|
1560
|
+
document, and MUST be false everywhere else.
|
|
1561
|
+
|
|
1562
|
+
22.12 `requestIP` MUST answer the address of the peer the listener received the request being served
|
|
1563
|
+
from, the same under `abide start`, `abide dev` and `App.listen`, and `null` where the listener names
|
|
1564
|
+
none.
|
|
1565
|
+
|
|
1566
|
+
22.13 `requestIP` MUST answer `'in-process'` for a request no listener received: one `App.fetch` or
|
|
1567
|
+
`App.run` was handed in process, a call the app makes of itself among them.
|
|
1568
|
+
|
|
1508
1569
|
# 23. Route and connectivity
|
|
1509
1570
|
|
|
1510
1571
|
23.1 Each member of `route` MUST be its own `Reactive`, and `route` MUST NOT be one `Reactive` over a
|
|
@@ -1520,9 +1581,9 @@ composite.
|
|
|
1520
1581
|
|
|
1521
1582
|
23.6 `route.name` MUST be the resolution path.
|
|
1522
1583
|
|
|
1523
|
-
23.7
|
|
1584
|
+
23.7 Where `isServer` is false, `online` MUST be `navigator.onLine` and its events.
|
|
1524
1585
|
|
|
1525
|
-
23.8
|
|
1586
|
+
23.8 Where `isServer` is true, `online` MUST be true.
|
|
1526
1587
|
|
|
1527
1588
|
23.9 In a page or a layout, `route.params()` MUST be typed by that file's own route: a required
|
|
1528
1589
|
segment as text, an optional one as text that may be absent, a rest as a list, and in a layout any
|
|
@@ -1582,6 +1643,13 @@ under, and one naming none MUST be a build error naming the segment's file and `
|
|
|
1582
1643
|
23.27 Two routes naming different matchers, or a matcher and none, at one parameter position after
|
|
1583
1644
|
one static prefix MUST be a build error naming both files.
|
|
1584
1645
|
|
|
1646
|
+
23.28 In a browser `route.index` MUST be 0 at an entry a document load arrived at carrying no index
|
|
1647
|
+
the router wrote, one more than the index of the entry a push or a browser's fragment step left, and
|
|
1648
|
+
the index the entry was written with where a history step or a reload arrives at it — so a step back
|
|
1649
|
+
of no more than `route.index` entries MUST arrive at an entry of this app's router.
|
|
1650
|
+
|
|
1651
|
+
23.29 On a server `route.index` MUST be 0.
|
|
1652
|
+
|
|
1585
1653
|
# 24. Tracing
|
|
1586
1654
|
|
|
1587
1655
|
24.1 `trace` MUST be built on first ask and held for the request.
|
|
@@ -1868,6 +1936,11 @@ matches it, and a `[...rest]` naming one MUST take a part only where it does.
|
|
|
1868
1936
|
30.37 An address whose part a segment refuses, by its matcher or by 30.34, MUST be matched against
|
|
1869
1937
|
the routes 30.9 ranks after that route.
|
|
1870
1938
|
|
|
1939
|
+
30.38 `navigate` given a number MUST step the history by that many entries, back where it is
|
|
1940
|
+
negative, and MUST settle once the entry the next history step arrives at is arrived at, per 30.29.
|
|
1941
|
+
|
|
1942
|
+
30.39 `navigate` given 0 MUST settle at once, and MUST NOT reload the document.
|
|
1943
|
+
|
|
1871
1944
|
# 31. Reading and writing by name
|
|
1872
1945
|
|
|
1873
1946
|
31.1 Inside a `.abide` file a name bound to a `Reactive` MUST be read wherever 31.3 does not hold it.
|
|
@@ -1909,8 +1982,8 @@ type parameter constrained by one.
|
|
|
1909
1982
|
array or an object whose prototype is `Object.prototype` or `null` — MUST assign on that value itself, MUST NOT
|
|
1910
1983
|
copy it or any level above it, and MUST NOT wake a reader.
|
|
1911
1984
|
|
|
1912
|
-
31.15 `route.url`, `route.params`, `route.name` and `route.navigating` MUST each be
|
|
1913
|
-
as a name bound to a `Reactive` is, per 31.1 to 31.7.
|
|
1985
|
+
31.15 `route.url`, `route.params`, `route.name`, `route.index` and `route.navigating` MUST each be
|
|
1986
|
+
read and written as a name bound to a `Reactive` is, per 31.1 to 31.7.
|
|
1914
1987
|
|
|
1915
1988
|
# 32. Templating
|
|
1916
1989
|
|
|
@@ -2149,6 +2222,16 @@ build error.
|
|
|
2149
2222
|
32.77 A slot holding a value branded by `raw` MUST write its markup as given, with no element or
|
|
2150
2223
|
attribute in it removed and no URL in it scheme-checked.
|
|
2151
2224
|
|
|
2225
|
+
32.78 `abide check` MUST hold the `set` of a `bind:` on an element to what the element writes back:
|
|
2226
|
+
a boolean for `bind:checked` and `bind:open`, a list of files for `bind:files`, and for a
|
|
2227
|
+
`bind:value` `number | undefined` on an `<input>` whose `type` is `number` or `range`, and otherwise,
|
|
2228
|
+
on an `<input>` or a `<textarea>`, a string where the bound value holds no number,
|
|
2229
|
+
`number | undefined` where it holds nothing else, and all three where it holds both (32.58). A
|
|
2230
|
+
`<select>` MUST be held as an `<input>` is, save that where the bound value holds strings it writes
|
|
2231
|
+
those strings, and a `<select multiple>` a list of the strings its value's items hold, or of any
|
|
2232
|
+
string where they hold none. A `type` or a `multiple` written as an expression, or absent beside a
|
|
2233
|
+
spread, MUST be held to the union of what each value of it writes.
|
|
2234
|
+
|
|
2152
2235
|
# 33. Props
|
|
2153
2236
|
|
|
2154
2237
|
33.1 `props` MUST be callable from a `<script>` block only, and calling it from a `<script module>`
|
|
@@ -2469,6 +2552,47 @@ a 405 for a rung filed at the root route.
|
|
|
2469
2552
|
37.15 A `middleware` rung outside one that returned a `Failed` MUST be handed 37.14's answer from
|
|
2470
2553
|
`next`, and MUST NOT be handed the `Failed`.
|
|
2471
2554
|
|
|
2555
|
+
37.16 An `onError` called in a component's `<script>` MUST be filed in the browser for as long as
|
|
2556
|
+
that component stands, and MUST file nothing where that `<script>` runs for a server's render.
|
|
2557
|
+
|
|
2558
|
+
37.17 In a browser, a throw nothing caught, a rejection nothing handled and what 12.6 hands
|
|
2559
|
+
`onError` MUST each reach every `onError` 37.16 filed, the last filed first, and once — a throw
|
|
2560
|
+
12.6 handed MUST NOT be handed again where 12.7 surfaces it.
|
|
2561
|
+
|
|
2562
|
+
37.18 In a browser, an `onError` that throws MUST be written to `abide:lifecycle`, and MUST NOT keep
|
|
2563
|
+
any other `onError` from being handed the error.
|
|
2564
|
+
|
|
2565
|
+
37.19 A `middleware` rung MUST be handed as `ctx.lane` the `Lane` that answers the request it is
|
|
2566
|
+
handed, a request a rung handed `next` included: `handler` where a handler answers its method at its
|
|
2567
|
+
address, a private handler and one abide mounts included; `file` a file under a `public` directory;
|
|
2568
|
+
`openapi`, `mcp` and `bridge` that address of abide's own; `socket` the upgrade to the socket mux;
|
|
2569
|
+
`abide` every other address under `/__abide`; and `page` every other address, one nothing answers
|
|
2570
|
+
included.
|
|
2571
|
+
|
|
2572
|
+
37.20 A `middleware` rung MUST be handed the request addressed below the path `APP_URL` names, as
|
|
2573
|
+
the route table reads it.
|
|
2574
|
+
|
|
2575
|
+
37.21 An `onError` from `@abide/abide` called anywhere but a component's `<script>` being set up in a
|
|
2576
|
+
browser or rendered by a server — a `<script server>`, a server module, a module's top level, a
|
|
2577
|
+
callback that runs later — MUST throw, naming `@abide/abide/server`'s as the server's.
|
|
2578
|
+
|
|
2579
|
+
37.22 An `onRefusal` MUST be filed, and MUST file nothing, where 37.16 has an `onError` filed and
|
|
2580
|
+
file nothing.
|
|
2581
|
+
|
|
2582
|
+
37.23 An `onRefusal` called anywhere 37.21 has an `onError` from `@abide/abide` throw MUST throw.
|
|
2583
|
+
|
|
2584
|
+
37.24 In a browser, every `Failed` an `Rpc` call is answered with over http — one its handler
|
|
2585
|
+
returned, one anything between the browser and the handler answered with, 16.79's, and one a call
|
|
2586
|
+
`outbox` sends is answered with — MUST reach every `onRefusal` 37.22 filed, the last filed first,
|
|
2587
|
+
and once, handed the call's method and URL beside it.
|
|
2588
|
+
|
|
2589
|
+
37.25 A call whose `signal` aborted MUST NOT reach `onRefusal`.
|
|
2590
|
+
|
|
2591
|
+
37.26 In a browser, an `onRefusal` that throws MUST be handled as 37.18 has an `onError` that throws.
|
|
2592
|
+
|
|
2593
|
+
37.27 An `onRefusal` MUST NOT change the `Failed` the call refuses with, nor keep the call from
|
|
2594
|
+
refusing with it.
|
|
2595
|
+
|
|
2472
2596
|
# 38. Commands
|
|
2473
2597
|
|
|
2474
2598
|
## The commands
|
|
@@ -2872,6 +2996,18 @@ in its `bunfig.toml` (38.43), and a stylesheet importing `tailwindcss` that its
|
|
|
2872
2996
|
38.133 Under `bun test` with `@abide/abide/test` preloaded, each test file after the first in a
|
|
2873
2997
|
process MUST start as a bare `invalidate` (13.6) leaves the values the files before it loaded.
|
|
2874
2998
|
|
|
2999
|
+
38.134 A prop a test hands a component it binds for `mount` as an own getter MUST be read through
|
|
3000
|
+
that getter on each read the component makes, and any other prop MUST be the value it held when the
|
|
3001
|
+
component was bound.
|
|
3002
|
+
|
|
3003
|
+
38.135 `abide routes` MUST print beside each handler every rung its declaration's `middleware`
|
|
3004
|
+
names, as written — an entry by the function it calls or the name it refers to, a spread by what it
|
|
3005
|
+
spreads, an inline function as `<inline>`, and a value that is no array as one entry — and MUST say
|
|
3006
|
+
where that declaration's options are not an object written inline.
|
|
3007
|
+
|
|
3008
|
+
38.136 `abide dev`, `abide start`, the executable's `start` and the app 38.53 serves MUST listen on
|
|
3009
|
+
the interface `--hostname` names alone, and on every interface where it names none.
|
|
3010
|
+
|
|
2875
3011
|
# 39. Head and view transitions
|
|
2876
3012
|
|
|
2877
3013
|
39.1 A `<head>` element in a `.abide` file MUST contribute its children to the document head.
|
|
@@ -3141,8 +3277,8 @@ adopts the page, however early its answer arrived.
|
|
|
3141
3277
|
made an `Rpc` call, or whose markup reads a bare `busy` or `ready`, and building that component's
|
|
3142
3278
|
markup.
|
|
3143
3279
|
|
|
3144
|
-
41.29 A `render` answering a request whose `sec-fetch-dest` is `empty`
|
|
3145
|
-
|
|
3280
|
+
41.29 A `render` answering a request whose `sec-fetch-dest` is `empty` and whose `sec-fetch-mode` is not
|
|
3281
|
+
`navigate` MUST NOT fill the seed buffer.
|
|
3146
3282
|
|
|
3147
3283
|
41.30 A `render` answering a request carrying `abide-keep` MUST write 41.20's script.
|
|
3148
3284
|
|
|
@@ -3203,6 +3339,13 @@ connection still answering, and MUST then run `onStop` without waiting on what i
|
|
|
3203
3339
|
`onPrincipal` as a sealed cookie's are, MUST NOT write the principal cookie, and MUST give the scope
|
|
3204
3340
|
a request where `request` is not given.
|
|
3205
3341
|
|
|
3342
|
+
42.20 A `principal` on `App.fetch` MUST be the claims the request's `principal` resolves from, as
|
|
3343
|
+
42.19 states for `App.run`, over any principal cookie the request carries.
|
|
3344
|
+
|
|
3345
|
+
42.21 A `caller` on `App.run` or `App.fetch` MUST be its scope's `principal.caller`, over any caller
|
|
3346
|
+
cookie the request carries, MUST NOT write the caller cookie, and on `App.run` MUST give the scope a
|
|
3347
|
+
request where `request` is not given.
|
|
3348
|
+
|
|
3206
3349
|
# 43. The measurement harness
|
|
3207
3350
|
|
|
3208
3351
|
43.1 `@abide/harness/measure`, `@abide/harness/engine` and `@abide/harness/server` MUST each be
|
|
@@ -3285,7 +3428,8 @@ one JSON row per line as each lands, for the items `inScope` and `matchesFilter`
|
|
|
3285
3428
|
runner wrote no report as `broken` rather than as a result.
|
|
3286
3429
|
|
|
3287
3430
|
43.28 The DOM `@abide/harness/preload` registers MUST leave the runtime's own `fetch`, `Request`,
|
|
3288
|
-
`Response`, `Headers`, `Blob`, `File`, `FormData`, `AbortController
|
|
3431
|
+
`Response`, `Headers`, `Blob`, `File`, `FormData`, `AbortController`, `AbortSignal`, `WebSocket`,
|
|
3432
|
+
`TransformStream` and `WritableStream` the globals.
|
|
3289
3433
|
|
|
3290
3434
|
43.29 `runBenches` MUST run, as one bench each, every function a bench file exports other than
|
|
3291
3435
|
`CEILINGS`.
|
|
@@ -3301,6 +3445,9 @@ naming a bench its file does not export.
|
|
|
3301
3445
|
|
|
3302
3446
|
43.34 `runBenches` given `only` MUST run only the bench files whose path below `root` holds it.
|
|
3303
3447
|
|
|
3448
|
+
43.35 The DOM `@abide/harness/preload` registers MUST NOT fetch a stylesheet or a script a document
|
|
3449
|
+
it parses names.
|
|
3450
|
+
|
|
3304
3451
|
# 44. The assistant
|
|
3305
3452
|
|
|
3306
3453
|
44.1 `assistant` MUST answer only through a handler that yields it, and MUST NOT mount an address
|
|
@@ -3395,7 +3542,7 @@ before it exits.
|
|
|
3395
3542
|
44.31 A conversation MUST write one `debug` line on `abide:assistant` when its events end, naming
|
|
3396
3543
|
its stop reason, the transcript's length, the tool calls it made, its usage and how long it took,
|
|
3397
3544
|
and naming it `unfinished` where it ended without a `done`, followed by why — `aborted` where the
|
|
3398
|
-
|
|
3545
|
+
signal 44.57 hands its provider aborted, else `failed` where its provider threw, with the throw's message ending the
|
|
3399
3546
|
line, else `stopped` where its caller stopped reading.
|
|
3400
3547
|
|
|
3401
3548
|
44.32 A command `claudeCode.bridgeCommand` or `claudeCode.bridge` mints with `tools` MUST grant
|
|
@@ -3453,6 +3600,36 @@ report that turn failed.
|
|
|
3453
3600
|
44.47 A bridge MUST reach `/__abide/bridge` over a certificate that either bun's own authorities or
|
|
3454
3601
|
the authorities its machine trusts sign, however the bridge was started.
|
|
3455
3602
|
|
|
3603
|
+
44.48 `assistant` MUST carry on each `tool` and `result` `AssistantEvent` of a call to a tool its
|
|
3604
|
+
`Toolbox` lists the `method` and the `address` the called handler's `Rpc` reads, and MUST carry
|
|
3605
|
+
`undefined` for a call to any other tool.
|
|
3606
|
+
|
|
3607
|
+
44.49 A `result` `AssistantEvent` MUST carry as its `value` its text read as JSON where its call did
|
|
3608
|
+
not fail and its handler has a schema 19.21 derives, and MUST carry `undefined` otherwise.
|
|
3609
|
+
|
|
3610
|
+
44.50 A `Provider` MUST name the tool of each `tool` event it yields as its `Toolbox` lists it.
|
|
3611
|
+
|
|
3612
|
+
44.51 `resultsOf` MUST hand back, in order, the `value` of each `result` `AssistantEvent` whose
|
|
3613
|
+
handler is the `Rpc` it is given, and none of a call that failed.
|
|
3614
|
+
|
|
3615
|
+
44.52 `imagePiece` MUST draw an image longer than 1568 pixels on its long side down to 1568, and an
|
|
3616
|
+
image of a type 44.36 does not name at its own size, and MUST NOT draw a GIF.
|
|
3617
|
+
|
|
3618
|
+
44.53 An image `imagePiece` draws MUST be a PNG where it was a PNG or a WebP, and a JPEG otherwise.
|
|
3619
|
+
|
|
3620
|
+
44.54 `imagePiece` MUST hand on as it is an image it does not draw or cannot, and MUST throw where
|
|
3621
|
+
that image is of a type 44.36 does not name.
|
|
3622
|
+
|
|
3623
|
+
44.55 `imageFiles` MUST hand back, in order, the files a `DataTransfer` carries of a type 44.36
|
|
3624
|
+
names, reading its `items` where its `files` hold none.
|
|
3625
|
+
|
|
3626
|
+
44.56 The `install` of a pairing `claudeCode.bridgeCommand` or `claudeCode.bridge` mints MUST run
|
|
3627
|
+
`abide-bridge install` at the bridge release its command runs.
|
|
3628
|
+
|
|
3629
|
+
44.57 `assistant` MUST hand its `Provider` a `limits.signal` that aborts once the request's signal
|
|
3630
|
+
aborts or once the `signal` its caller passed does, and once that signal aborts MUST end the
|
|
3631
|
+
conversation without waiting for the provider to, refused with `aborted` at status 499.
|
|
3632
|
+
|
|
3456
3633
|
# 45. Offline
|
|
3457
3634
|
|
|
3458
3635
|
45.1 Where `ABIDE_OFFLINE` is on, a page `abide build` built MUST register the worker
|
|
@@ -3517,18 +3694,25 @@ and that copy is stale by no more than its `stale-if-error`.
|
|
|
3517
3694
|
45.20 The worker `ABIDE_OFFLINE` turns on MUST answer a request that is not a navigation, and whose
|
|
3518
3695
|
`cache` is `no-cache`, `reload` or `no-store`, with the network's answer alone.
|
|
3519
3696
|
|
|
3520
|
-
45.21 The worker `ABIDE_OFFLINE` turns on MUST ask the network past the browser's own cache
|
|
3697
|
+
45.21 The worker `ABIDE_OFFLINE` turns on MUST ask the network past the browser's own cache, save
|
|
3698
|
+
for a navigation 45.25 has it ask as itself.
|
|
3521
3699
|
|
|
3522
3700
|
45.22 The worker `ABIDE_OFFLINE` turns on MUST mark an answer it gives from a copy it saved with an
|
|
3523
3701
|
`abide-kept` header naming that copy's `date`.
|
|
3524
3702
|
|
|
3525
3703
|
45.23 The worker `ABIDE_OFFLINE` turns on MUST ask for a page it saves with an `abide-keep` header,
|
|
3526
|
-
|
|
3704
|
+
save for a navigation 45.25 has it ask as itself.
|
|
3527
3705
|
|
|
3528
3706
|
45.24 The worker `ABIDE_OFFLINE` turns on MUST save the page of an address a `navigate` reached,
|
|
3529
3707
|
where it saved no copy of that address 45.19 would answer with, and MUST NOT save one of another
|
|
3530
3708
|
origin.
|
|
3531
3709
|
|
|
3710
|
+
45.25 The worker `ABIDE_OFFLINE` turns on MUST ask the network for a navigation with the navigation's
|
|
3711
|
+
own request, unchanged.
|
|
3712
|
+
|
|
3713
|
+
45.26 The worker `ABIDE_OFFLINE` turns on MUST drop the copy it saved of an address where the network
|
|
3714
|
+
answers that address with an answer 45.3 or 45.4 does not let it save, save one of 500 or above.
|
|
3715
|
+
|
|
3532
3716
|
# 46. Outbox
|
|
3533
3717
|
|
|
3534
3718
|
46.1 `outbox` MUST answer, oldest first, every call queued in it that was neither delivered nor
|