@bom-pi/core 0.2.3 → 0.2.5
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/package.json +2 -2
- package/src/cloud-connector.ts +411 -10
- package/src/cloud-wss-transport.ts +116 -10
- package/src/device-ceremony.ts +445 -16
- package/src/pairing-storage.ts +22 -20
- package/src/relay-boundary.ts +63 -1
package/src/relay-boundary.ts
CHANGED
|
@@ -241,6 +241,23 @@ export const RELAY_OPERATION_POLICY: readonly RelayOperationPolicyEntry[] = [
|
|
|
241
241
|
familyRow("app-data:conversation-shares-list", "conversation-artifacts-view"),
|
|
242
242
|
familyRow("app-data:hooks-list", "hooks-view"),
|
|
243
243
|
familyRow("app-data:push-read", "push-view"),
|
|
244
|
+
// ADR-20 wave 2: the catalog/board read rows, one per family operation the registry
|
|
245
|
+
// already serves. Same shape as every row above — remote-session, GET-only, explicit
|
|
246
|
+
// actor; the searches, vitals, and background-output reads of the same wave have no
|
|
247
|
+
// local operation to point at yet, so they have no row here either (deny-first: a
|
|
248
|
+
// surface row without a registry operation would be skipped-and-logged, and the
|
|
249
|
+
// console's bridge refuses the call naming the machine before a byte leaves).
|
|
250
|
+
familyRow("app-data:sessions-list", "sessions-view"),
|
|
251
|
+
familyRow("app-data:model-list", "models-view"),
|
|
252
|
+
familyRow("app-data:themes-list", "themes-view"),
|
|
253
|
+
familyRow("app-data:theme-edit-read", "themes-view"),
|
|
254
|
+
familyRow("app-data:spend-summary", "spend-view"),
|
|
255
|
+
familyRow("app-data:running-list", "running-view"),
|
|
256
|
+
familyRow("app-data:subagents-board-read", "subagents-view"),
|
|
257
|
+
// ADR-20 wave 3: the looked-at machine's event poll — the lane's bounded-resume feed
|
|
258
|
+
// (REL-6 shape: cursor + replay window + the honest snapshot signal), one GET row served
|
|
259
|
+
// by the ring (`relay-event-ring.ts`) through the same single-sourced funnel rows.
|
|
260
|
+
familyRow("app-data:event-poll", "events-view"),
|
|
244
261
|
];
|
|
245
262
|
|
|
246
263
|
/** Machine-readable, bounded policy denials (SEC-14 typed verdicts). None of these names
|
|
@@ -352,7 +369,15 @@ export type RelaySurfaceName =
|
|
|
352
369
|
| "conversation-artifact-state-read"
|
|
353
370
|
| "conversation-shares-list"
|
|
354
371
|
| "hooks-list"
|
|
355
|
-
| "push-read"
|
|
372
|
+
| "push-read"
|
|
373
|
+
| "sessions-list"
|
|
374
|
+
| "model-list"
|
|
375
|
+
| "themes-list"
|
|
376
|
+
| "theme-edit-read"
|
|
377
|
+
| "spend-summary"
|
|
378
|
+
| "running-list"
|
|
379
|
+
| "subagents-board-read"
|
|
380
|
+
| "event-poll";
|
|
356
381
|
|
|
357
382
|
/** The frozen M4 v1 admitted surface (the canned pilot lane's set): exactly the two
|
|
358
383
|
* read-only session operations. Byte-identical default for every existing consumer. */
|
|
@@ -371,6 +396,10 @@ export const RELAY_REMOTE_SURFACE_V2: readonly {
|
|
|
371
396
|
audience: string;
|
|
372
397
|
method: "GET";
|
|
373
398
|
surface: RelaySurfaceName;
|
|
399
|
+
/** The row's answer carries money as integer cents: the wire's canonical value is a
|
|
400
|
+
* nonnegative safe integer, and usage costs are USD floats. The funnel row converts
|
|
401
|
+
* before sealing (`remote-funnel-rows.ts`); the web converts back where it displays. */
|
|
402
|
+
moneyCents?: true;
|
|
374
403
|
}[] = [
|
|
375
404
|
{
|
|
376
405
|
audience: "app-data:conversation-history-read",
|
|
@@ -439,6 +468,39 @@ export const RELAY_REMOTE_SURFACE_V2: readonly {
|
|
|
439
468
|
},
|
|
440
469
|
{ audience: "app-data:hooks-list", method: "GET", surface: "hooks-list" },
|
|
441
470
|
{ audience: "app-data:push-read", method: "GET", surface: "push-read" },
|
|
471
|
+
// ADR-20 wave 2 (reads, catalog/board views of the looked-at machine): each row names
|
|
472
|
+
// a LOCAL owner app-data operation that already exists in the typed registry, so the
|
|
473
|
+
// single-sourced funnel rows serve it unchanged. Reads only — every write of these
|
|
474
|
+
// families (session-create/update, theme writes, spend budgets, run stops, board
|
|
475
|
+
// signaling) stays out until wave 4 opens it with its own receipts.
|
|
476
|
+
{
|
|
477
|
+
audience: "app-data:sessions-list",
|
|
478
|
+
method: "GET",
|
|
479
|
+
surface: "sessions-list",
|
|
480
|
+
},
|
|
481
|
+
{ audience: "app-data:model-list", method: "GET", surface: "model-list" },
|
|
482
|
+
{ audience: "app-data:themes-list", method: "GET", surface: "themes-list" },
|
|
483
|
+
{
|
|
484
|
+
audience: "app-data:theme-edit-read",
|
|
485
|
+
method: "GET",
|
|
486
|
+
surface: "theme-edit-read",
|
|
487
|
+
},
|
|
488
|
+
{
|
|
489
|
+
audience: "app-data:spend-summary",
|
|
490
|
+
method: "GET",
|
|
491
|
+
surface: "spend-summary",
|
|
492
|
+
moneyCents: true,
|
|
493
|
+
},
|
|
494
|
+
{ audience: "app-data:running-list", method: "GET", surface: "running-list", moneyCents: true },
|
|
495
|
+
{
|
|
496
|
+
audience: "app-data:subagents-board-read",
|
|
497
|
+
method: "GET",
|
|
498
|
+
surface: "subagents-board-read",
|
|
499
|
+
},
|
|
500
|
+
// ADR-20 wave 3 (the stream lane, as the approved batch's poll option — the W3 packet's
|
|
501
|
+
// §1 choice): the event poll the lane runs over the existing request/response channel.
|
|
502
|
+
// GET-only like every row; the ring's answer carries no money and its `full` rides 0/1.
|
|
503
|
+
{ audience: "app-data:event-poll", method: "GET", surface: "event-poll" },
|
|
442
504
|
];
|
|
443
505
|
|
|
444
506
|
const REMOTE_V2_SURFACES = new Map<string, RelaySurfaceName>([
|