@amalgm/live 0.2.81-main.41621373600 → 0.2.81-main.41725828860

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 (134) hide show
  1. package/PURPOSE.md +13 -22
  2. package/README.md +9 -14
  3. package/dist/contracts/frames/tunnel.d.ts +4 -5
  4. package/dist/contracts/frames/tunnel.d.ts.map +1 -1
  5. package/dist/contracts/frames/tunnel.js +4 -5
  6. package/dist/contracts/frames/tunnel.js.map +1 -1
  7. package/dist/contracts/index.d.ts +4 -13
  8. package/dist/contracts/index.d.ts.map +1 -1
  9. package/dist/contracts/index.js +4 -13
  10. package/dist/contracts/index.js.map +1 -1
  11. package/dist/contracts/validate.d.ts +5 -5
  12. package/dist/contracts/validate.js +5 -5
  13. package/dist/drive/contracts.d.ts +3 -2
  14. package/dist/drive/contracts.d.ts.map +1 -1
  15. package/dist/drive/placements.d.ts +2 -1
  16. package/dist/drive/placements.d.ts.map +1 -1
  17. package/dist/drive/placements.js +3 -1
  18. package/dist/drive/placements.js.map +1 -1
  19. package/dist/index.d.ts +3 -4
  20. package/dist/index.d.ts.map +1 -1
  21. package/dist/index.js +3 -4
  22. package/dist/index.js.map +1 -1
  23. package/dist-cjs/contracts/frames/tunnel.js +4 -5
  24. package/dist-cjs/contracts/frames/tunnel.js.map +1 -1
  25. package/dist-cjs/contracts/index.js +4 -13
  26. package/dist-cjs/contracts/index.js.map +1 -1
  27. package/dist-cjs/contracts/validate.js +5 -5
  28. package/dist-cjs/drive/placements.js +3 -1
  29. package/dist-cjs/drive/placements.js.map +1 -1
  30. package/dist-cjs/index.js +3 -4
  31. package/dist-cjs/index.js.map +1 -1
  32. package/package.json +4 -35
  33. package/dist/contracts/binding.d.ts +0 -50
  34. package/dist/contracts/binding.d.ts.map +0 -1
  35. package/dist/contracts/binding.js +0 -23
  36. package/dist/contracts/binding.js.map +0 -1
  37. package/dist/contracts/deployments.d.ts +0 -39
  38. package/dist/contracts/deployments.d.ts.map +0 -1
  39. package/dist/contracts/deployments.js +0 -75
  40. package/dist/contracts/deployments.js.map +0 -1
  41. package/dist/contracts/docs.d.ts +0 -64
  42. package/dist/contracts/docs.d.ts.map +0 -1
  43. package/dist/contracts/docs.js +0 -51
  44. package/dist/contracts/docs.js.map +0 -1
  45. package/dist/contracts/events.d.ts +0 -45
  46. package/dist/contracts/events.d.ts.map +0 -1
  47. package/dist/contracts/events.js +0 -38
  48. package/dist/contracts/events.js.map +0 -1
  49. package/dist/contracts/frames/gateway.d.ts +0 -83
  50. package/dist/contracts/frames/gateway.d.ts.map +0 -1
  51. package/dist/contracts/frames/gateway.js +0 -35
  52. package/dist/contracts/frames/gateway.js.map +0 -1
  53. package/dist/contracts/frames/stream.d.ts +0 -59
  54. package/dist/contracts/frames/stream.d.ts.map +0 -1
  55. package/dist/contracts/frames/stream.js +0 -17
  56. package/dist/contracts/frames/stream.js.map +0 -1
  57. package/dist/contracts/presence.d.ts +0 -46
  58. package/dist/contracts/presence.d.ts.map +0 -1
  59. package/dist/contracts/presence.js +0 -34
  60. package/dist/contracts/presence.js.map +0 -1
  61. package/dist/contracts/resources.d.ts +0 -52
  62. package/dist/contracts/resources.d.ts.map +0 -1
  63. package/dist/contracts/resources.js +0 -105
  64. package/dist/contracts/resources.js.map +0 -1
  65. package/dist/contracts/snapshot.d.ts +0 -24
  66. package/dist/contracts/snapshot.d.ts.map +0 -1
  67. package/dist/contracts/snapshot.js +0 -28
  68. package/dist/contracts/snapshot.js.map +0 -1
  69. package/dist/machines/arbitration.d.ts +0 -36
  70. package/dist/machines/arbitration.d.ts.map +0 -1
  71. package/dist/machines/arbitration.js +0 -37
  72. package/dist/machines/arbitration.js.map +0 -1
  73. package/dist/machines/backoff.d.ts +0 -36
  74. package/dist/machines/backoff.d.ts.map +0 -1
  75. package/dist/machines/backoff.js +0 -34
  76. package/dist/machines/backoff.js.map +0 -1
  77. package/dist/machines/bootstrap.d.ts +0 -65
  78. package/dist/machines/bootstrap.d.ts.map +0 -1
  79. package/dist/machines/bootstrap.js +0 -105
  80. package/dist/machines/bootstrap.js.map +0 -1
  81. package/dist/machines/chunks.d.ts +0 -51
  82. package/dist/machines/chunks.d.ts.map +0 -1
  83. package/dist/machines/chunks.js +0 -67
  84. package/dist/machines/chunks.js.map +0 -1
  85. package/dist/machines/index.d.ts +0 -12
  86. package/dist/machines/index.d.ts.map +0 -1
  87. package/dist/machines/index.js +0 -12
  88. package/dist/machines/index.js.map +0 -1
  89. package/dist/machines/presence.d.ts +0 -26
  90. package/dist/machines/presence.d.ts.map +0 -1
  91. package/dist/machines/presence.js +0 -49
  92. package/dist/machines/presence.js.map +0 -1
  93. package/dist/merge/index.d.ts +0 -9
  94. package/dist/merge/index.d.ts.map +0 -1
  95. package/dist/merge/index.js +0 -9
  96. package/dist/merge/index.js.map +0 -1
  97. package/dist/merge/merge3.d.ts +0 -39
  98. package/dist/merge/merge3.d.ts.map +0 -1
  99. package/dist/merge/merge3.js +0 -188
  100. package/dist/merge/merge3.js.map +0 -1
  101. package/dist-cjs/contracts/binding.js +0 -26
  102. package/dist-cjs/contracts/binding.js.map +0 -1
  103. package/dist-cjs/contracts/deployments.js +0 -81
  104. package/dist-cjs/contracts/deployments.js.map +0 -1
  105. package/dist-cjs/contracts/docs.js +0 -56
  106. package/dist-cjs/contracts/docs.js.map +0 -1
  107. package/dist-cjs/contracts/events.js +0 -44
  108. package/dist-cjs/contracts/events.js.map +0 -1
  109. package/dist-cjs/contracts/frames/gateway.js +0 -39
  110. package/dist-cjs/contracts/frames/gateway.js.map +0 -1
  111. package/dist-cjs/contracts/frames/stream.js +0 -20
  112. package/dist-cjs/contracts/frames/stream.js.map +0 -1
  113. package/dist-cjs/contracts/presence.js +0 -38
  114. package/dist-cjs/contracts/presence.js.map +0 -1
  115. package/dist-cjs/contracts/resources.js +0 -114
  116. package/dist-cjs/contracts/resources.js.map +0 -1
  117. package/dist-cjs/contracts/snapshot.js +0 -31
  118. package/dist-cjs/contracts/snapshot.js.map +0 -1
  119. package/dist-cjs/machines/arbitration.js +0 -41
  120. package/dist-cjs/machines/arbitration.js.map +0 -1
  121. package/dist-cjs/machines/backoff.js +0 -38
  122. package/dist-cjs/machines/backoff.js.map +0 -1
  123. package/dist-cjs/machines/bootstrap.js +0 -110
  124. package/dist-cjs/machines/bootstrap.js.map +0 -1
  125. package/dist-cjs/machines/chunks.js +0 -72
  126. package/dist-cjs/machines/chunks.js.map +0 -1
  127. package/dist-cjs/machines/index.js +0 -28
  128. package/dist-cjs/machines/index.js.map +0 -1
  129. package/dist-cjs/machines/presence.js +0 -53
  130. package/dist-cjs/machines/presence.js.map +0 -1
  131. package/dist-cjs/merge/index.js +0 -25
  132. package/dist-cjs/merge/index.js.map +0 -1
  133. package/dist-cjs/merge/merge3.js +0 -191
  134. package/dist-cjs/merge/merge3.js.map +0 -1
package/PURPOSE.md CHANGED
@@ -10,8 +10,7 @@ JavaScript host consumes it without inheriting a filesystem watcher, a SQLite
10
10
  database, or a user-interface dependency.
11
11
 
12
12
  The public developer model is `live.bind(surface, channel)` and is specified
13
- in `docs/realtime-sdk.md`. The shipped wire behavior this package encodes is
14
- `docs/local-live-protocol.md`. The entity Record/Send/Receive discipline is
13
+ in `docs/realtime-sdk.md`. The entity Record/Send/Receive discipline is
15
14
  `docs/entity-record-queues.md`. This repository is where those documents
16
15
  become executable and testable. The deprecated Engine repository is read-only
17
16
  reference evidence; released Live surfaces run only from this package through
@@ -610,30 +609,25 @@ Primary and collateral placement use the same retained original physical
610
609
  association. A proved cancellation may repair O addresses, never sharing state,
611
610
  payload/version, verification time, or the resolved/verified history positions.
612
611
 
613
- ## Five surfaces, one behavior
612
+ ## One SDK, thin doors
614
613
 
615
- ```
616
- src/ the SDK — the behavior. Contracts + machines + adapter ports.
617
- surfaces/api REST router factory a host mounts (diagnose/validate routes).
618
- surfaces/cli `amalgm-live` — inspect frames, derive ids, simulate merges.
619
- surfaces/mcp MCP server exposing the same actions to agents.
620
- skills/live the skill: teaches an agent this protocol via the CLI/MCP.
621
- ```
622
-
623
- Every surface is a thin adapter over `src/`. A surface that implements
624
- behavior instead of delegating to the SDK is a bug (axiom 3).
614
+ `src/` is the whole package. Shell, the gateway, and the UI consume it as
615
+ `@amalgm/live` and supply every machine effect through injected ports. The
616
+ product commands `amalgm files register` and `amalgm files add` are Shell's
617
+ mappings onto this package's decisions. The doors kept here are pure mappings
618
+ beside the module they serve: the sharing argv and MCP doors in
619
+ `src/sharing/`, and the HTTP mappings `src/files/api.ts` and
620
+ `src/workspace/api.ts`. A door that implements behavior instead of delegating
621
+ to the SDK is a bug (axiom 3).
625
622
 
626
623
  ## Layout
627
624
 
628
625
  ```
629
- src/contracts/ value types + validators: events, snapshots, resource ids,
630
- content manifests, frames (SSE /
631
- gateway socket / tunnel), doc-write merge outcomes,
632
- presence.
626
+ src/contracts/ value types + validators: non-throwing checks, content
627
+ manifests, the sealed-content envelope, and the
628
+ runtime-gateway tunnel frames.
633
629
  src/records/ entity record contracts, the event-driven Send/Receive rail,
634
630
  and the local-outbox, authority, and per-entity inbox laws.
635
- src/machines/ transport-neutral state machines: bootstrap barrier, presence
636
- TTL, slot arbitration, chunk reassembly, backoff.
637
631
  src/entities/ the entity model's rule surface: the six-field record,
638
632
  derived versions, lifecycle laws, move planning, the
639
633
  cloud codec and the one reducer — behind injected ports.
@@ -655,9 +649,6 @@ src/transfer/ type-aware immutable artifact upload/download operations;
655
649
  chunk storage, R2, files, and Git remain injected effects.
656
650
  tests/ unit tests per module, in the engine wall's style: each
657
651
  exam states a law; mutants convict.
658
- tests/parity/ golden-vector harness: the same inputs run against this
659
- package and the shipped runtime implementation must produce
660
- identical outputs.
661
652
  tests/records/ contract and invariant tests for the complete entity-record
662
653
  journey, written against the public SDK API only.
663
654
  tests/apply/simulation/
package/README.md CHANGED
@@ -11,14 +11,12 @@ SQLite, no UI dependency.
11
11
  const binding = live.bind(surface, channel)
12
12
  ```
13
13
 
14
- Start with [PURPOSE.md](PURPOSE.md) — purpose, axioms, and layout — and
15
- [ROADMAP.md](ROADMAP.md) for what moves here next. The
14
+ Start with [PURPOSE.md](PURPOSE.md) — purpose, axioms, and layout. The
16
15
  normative specifications live in [docs/](docs/):
17
16
 
18
17
  | document | owns |
19
18
  | --- | --- |
20
19
  | [realtime-sdk.md](docs/realtime-sdk.md) | the public `bind(surface, channel)` model |
21
- | [local-live-protocol.md](docs/local-live-protocol.md) | the shipped local wire protocol (v1/v2) |
22
20
  | [entity-record-queues.md](docs/entity-record-queues.md) | filesystem Record, local Outbox, per-UUID cloud order, and local Inbox |
23
21
  | [entity-apply.md](docs/entity-apply.md) | intent-first, type-sensitive Apply and exact Verify |
24
22
  | [files-browsing.md](docs/files-browsing.md) | one active-cloud namespace with per-computer local materialization |
@@ -27,24 +25,21 @@ normative specifications live in [docs/](docs/):
27
25
  | [user-ground-login.md](docs/user-ground-login.md) | first-login publication, later-device map placement, and Watch readiness |
28
26
  | [watching.md](docs/watching.md) | Watch purpose, axioms, lifecycle matrix, and cross-platform test layers |
29
27
 
30
- ## Surfaces
28
+ ## Shape
31
29
 
32
- | surface | entry | what it is |
33
- | --- | --- | --- |
34
- | SDK | `src/` → `@amalgm/live` | the behavior: contracts, machines, adapter ports |
35
- | API | `surfaces/api/` | REST router factory a host mounts |
36
- | CLI | `surfaces/cli/` | `amalgm-live` — inspect, derive, validate, simulate |
37
- | MCP | `surfaces/mcp/` | the same actions, exposed to agents |
38
- | Skill | `skills/live/` | teaches an agent this protocol via the CLI/MCP |
39
-
40
- Every surface delegates to `src/`. One behavior, five doors.
30
+ `src/` is the whole package, published as `@amalgm/live`. Shell, the gateway,
31
+ and the UI consume it and supply every machine effect through injected ports.
32
+ The product commands `amalgm files register` and `amalgm files add` are
33
+ Shell's thin mappings onto this package's decisions. The doors kept here are
34
+ pure mappings beside the module they serve: `src/sharing/cli.ts` and
35
+ `src/sharing/mcp.ts`, and the HTTP mappings `src/files/api.ts` and
36
+ `src/workspace/api.ts`.
41
37
 
42
38
  ## Develop
43
39
 
44
40
  ```bash
45
41
  npm install
46
42
  npm test # build + unit tests
47
- npm run test:parity # golden vectors vs read-only historical Engine evidence
48
43
  ```
49
44
 
50
45
  ## Managed candidate delivery
@@ -1,13 +1,12 @@
1
1
  /**
2
- * Tunnel frames — runtime ⇄ gateway, protocol v2
3
- * (local-live-protocol.md §5).
2
+ * Tunnel frames — runtime ⇄ gateway, protocol v2.
4
3
  *
5
4
  * One outbound WebSocket per runtime. v2 is negotiated per connection: the
6
5
  * runtime's hello carries `protocol_version: 2`; no `hello_ack` means the
7
6
  * peer is v1 and only v1 frames may be sent. Slot arbitration is
8
- * hello-driven and identity-based — the decision function itself lives in
9
- * `machines/arbitration.ts`; this file owns the wire shapes and constants
10
- * both sides must agree on.
7
+ * hello-driven and identity-based — the host decides which runtime holds the
8
+ * slot; this file owns the wire shapes and constants both sides must agree
9
+ * on.
11
10
  */
12
11
  import { type Checked } from '../validate.js';
13
12
  export declare const PROTOCOL_VERSION = 2;
@@ -1 +1 @@
1
- {"version":3,"file":"tunnel.d.ts","sourceRoot":"","sources":["../../../src/contracts/frames/tunnel.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,KAAK,OAAO,EAA+C,MAAM,gBAAgB,CAAC;AAE3F,eAAO,MAAM,gBAAgB,IAAI,CAAC;AAClC,qCAAqC;AACrC,eAAO,MAAM,iBAAiB,QAAS,CAAC;AAExC,0HAA0H;AAC1H,eAAO,MAAM,0BAA0B,uBAAuB,CAAC;AAE/D,eAAO,MAAM,WAAW;IACtB,iFAAiF;;IAEjF,qFAAqF;;;CAG7E,CAAC;AAEX,eAAO,MAAM,YAAY;IACvB,6FAA6F;;IAE7F,sEAAsE;;IAEtE,+HAA+H;;CAEvH,CAAC;AAEX,eAAO,MAAM,QAAQ;IACnB,qDAAqD;;IAErD,6CAA6C;;CAErC,CAAC;AAEX,0GAA0G;AAC1G,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,IAAI,EAAE,O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AC;IAClC,QAAQ,CAAC,YAAY,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CAC3C;AAED,mHAAmH;AACnH,MAAM,MAAM,oBAAoB,GAC5B;IAAE,QAAQ,CAAC,IAAI,EAAE,WAAW,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,OAAO,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IAAC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAA;CAAE,GACjK;IAAE,QAAQ,CAAC,IAAI,EAAE,WAAW,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;CAAE;AAC5G,gFAAgF;GAC9E;IAAE,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAKnF,wBAAgB,UAAU,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAAC,WAAW,CAAC,CAS/D;AAED,8IAA8I;AAC9I,eAAO,MAAM,iBAAiB,GAAI,OAAO,OAAO,CAAC,WAAW,CAAC,KAAG,OAIhC,CAAC"}
@@ -1,13 +1,12 @@
1
1
  /**
2
- * Tunnel frames — runtime ⇄ gateway, protocol v2
3
- * (local-live-protocol.md §5).
2
+ * Tunnel frames — runtime ⇄ gateway, protocol v2.
4
3
  *
5
4
  * One outbound WebSocket per runtime. v2 is negotiated per connection: the
6
5
  * runtime's hello carries `protocol_version: 2`; no `hello_ack` means the
7
6
  * peer is v1 and only v1 frames may be sent. Slot arbitration is
8
- * hello-driven and identity-based — the decision function itself lives in
9
- * `machines/arbitration.ts`; this file owns the wire shapes and constants
10
- * both sides must agree on.
7
+ * hello-driven and identity-based — the host decides which runtime holds the
8
+ * slot; this file owns the wire shapes and constants both sides must agree
9
+ * on.
11
10
  */
12
11
  import { pass, failShape, isRecord, isNonEmptyString } from '../validate.js';
13
12
  export const PROTOCOL_VERSION = 2;
@@ -1 +1 @@
1
- {"version":3,"file":"tunnel.js","sourceRoot":"","sources":["../../../src/contracts/frames/tunnel.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAgB,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAE3F,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAC;AAClC,qCAAqC;AACrC,MAAM,CAAC,MAAM,iBAAiB,GAAG,MAAM,CAAC;AAExC,0HAA0H;AAC1H,MAAM,CAAC,MAAM,0BAA0B,GAAG,oBAAoB,CAAC;AAE/D,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,iFAAiF;IACjF,QAAQ,EAAE,IAAI;IACd,qFAAqF;IACrF,kBAAkB,EAAE,IAAI;IACxB,YAAY,EAAE,IAAI;CACV,CAAC;AAEX,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,6FAA6F;IAC7F,eAAe,EAAE,EAAE,GAAG,IAAI;IAC1B,sEAAsE;IACtE,kBAAkB,EAAE,IAAI,GAAG,IAAI;IAC/B,+HAA+H;IAC/H,YAAY,EAAE,EAAE,GAAG,IAAI,GAAG,IAAI;CACtB,CAAC;AAEX,MAAM,CAAC,MAAM,QAAQ,GAAG;IACtB,qDAAqD;IACrD,cAAc,EAAE,GAAG,GAAG,IAAI;IAC1B,6CAA6C;IAC7C,aAAa,EAAE,GAAG,GAAG,IAAI;CACjB,CAAC;AA4BX,MAAM,aAAa,GACjB,oJAAoJ,CAAC;AAEvJ,MAAM,UAAU,UAAU,CAAC,KAAc;IACvC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,I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,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC;IACxC,OAAO,KAAK,CAAC,OAAO,KAAK,QAAQ;IACjC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC"}
@@ -1,20 +1,11 @@
1
1
  /**
2
- * The contracts layer: every wire shape, identity rule, and vocabulary the
3
- * protocol documents define — as types, guards, and validators. Nothing in
4
- * here performs I/O or holds state; the state machines live in
5
- * `../machines`, and the ports a host injects live in `../adapters`.
2
+ * The contracts layer: the wire shapes and validators a host still speaks —
3
+ * non-throwing validation, immutable chunked content, the sealed-content
4
+ * protection envelope, and the runtime-gateway tunnel. Nothing in here
5
+ * performs I/O or holds state.
6
6
  */
7
7
  export * from './validate.js';
8
- export * from './resources.js';
9
- export * from './events.js';
10
- export * from './snapshot.js';
11
- export * from './binding.js';
12
- export * from './deployments.js';
13
- export * from './presence.js';
14
- export * from './docs.js';
15
8
  export * from './content.js';
16
9
  export * from './protection.js';
17
- export * from './frames/stream.js';
18
- export * from './frames/gateway.js';
19
10
  export * from './frames/tunnel.js';
20
11
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/contracts/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/contracts/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC"}
@@ -1,20 +1,11 @@
1
1
  /**
2
- * The contracts layer: every wire shape, identity rule, and vocabulary the
3
- * protocol documents define — as types, guards, and validators. Nothing in
4
- * here performs I/O or holds state; the state machines live in
5
- * `../machines`, and the ports a host injects live in `../adapters`.
2
+ * The contracts layer: the wire shapes and validators a host still speaks —
3
+ * non-throwing validation, immutable chunked content, the sealed-content
4
+ * protection envelope, and the runtime-gateway tunnel. Nothing in here
5
+ * performs I/O or holds state.
6
6
  */
7
7
  export * from './validate.js';
8
- export * from './resources.js';
9
- export * from './events.js';
10
- export * from './snapshot.js';
11
- export * from './binding.js';
12
- export * from './deployments.js';
13
- export * from './presence.js';
14
- export * from './docs.js';
15
8
  export * from './content.js';
16
9
  export * from './protection.js';
17
- export * from './frames/stream.js';
18
- export * from './frames/gateway.js';
19
10
  export * from './frames/tunnel.js';
20
11
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/contracts/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/contracts/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC"}
@@ -2,11 +2,11 @@
2
2
  * Shared validation vocabulary for every contract in this package.
3
3
  *
4
4
  * Validators never throw on bad wire data — a peer being wrong is an
5
- * expected condition, not an exception (local-live-protocol.md: unknown
6
- * frames mean "the other end is older"). They return a `Checked<T>` so
7
- * callers must look at the outcome, and every failure message is
8
- * example-first: it states what a correct value looks like before saying
9
- * what was wrong (see PURPOSE.md axiom on error shape).
5
+ * expected condition, not an exception (an unknown frame means the other
6
+ * end is older). They return a `Checked<T>` so callers must look at the
7
+ * outcome, and every failure message is example-first: it states what a
8
+ * correct value looks like before saying what was wrong (see PURPOSE.md
9
+ * axiom on error shape).
10
10
  */
11
11
  export type Checked<T> = {
12
12
  readonly ok: true;
@@ -2,11 +2,11 @@
2
2
  * Shared validation vocabulary for every contract in this package.
3
3
  *
4
4
  * Validators never throw on bad wire data — a peer being wrong is an
5
- * expected condition, not an exception (local-live-protocol.md: unknown
6
- * frames mean "the other end is older"). They return a `Checked<T>` so
7
- * callers must look at the outcome, and every failure message is
8
- * example-first: it states what a correct value looks like before saying
9
- * what was wrong (see PURPOSE.md axiom on error shape).
5
+ * expected condition, not an exception (an unknown frame means the other
6
+ * end is older). They return a `Checked<T>` so callers must look at the
7
+ * outcome, and every failure message is example-first: it states what a
8
+ * correct value looks like before saying what was wrong (see PURPOSE.md
9
+ * axiom on error shape).
10
10
  */
11
11
  export const pass = (value) => ({ ok: true, value });
12
12
  export const fail = (error) => ({ ok: false, error });
@@ -118,8 +118,9 @@ export declare class DriveError extends Error {
118
118
  * unit it names kept, any other throw a fault. */
119
119
  static from(error: unknown, unit: Unit): DriveError;
120
120
  }
121
- /** The whole count of placements in flight, said each time it changes.
122
- * Placing is work: a machine with a placement in flight is not idle. */
121
+ /** The whole count of placements in flight, said once when the drive starts
122
+ * and each time it changes. Placing is work: a machine with a placement in
123
+ * flight is not idle, and one whose drive has placed nothing yet is. */
123
124
  export type ActivityHook = (count: number) => void;
124
125
  /** Milliseconds, for the receipts a touch returns; never a decision. */
125
126
  export interface Clock {
@@ -1 +1 @@
1
- {"version":3,"file":"contracts.d.ts","sourceRoot":"","sources":["../../src/drive/contracts.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,KAAK,EAAE,YAAY,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAEvF;;2DAE2D;AAC3D,MAAM,WAAW,SAAS;IACxB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAC;IAC1B,QAAQ,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IACnC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,MAAM,EAAE,YAAY,CAAC;IAC9B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,QAAQ,EAAE,gBAAgB,GAAG,IAAI,CAAC;IAC3C,qFAAqF;IACrF,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;CAChC;AAED;;2CAE2C;AAC3C,MAAM,WAAW,OAAO;IACtB,qCAAqC;IACrC,IAAI,IAAI,SAAS,CAAC;IAClB,2EAA2E;IAC3E,QAAQ,CAAC,UAAU,EAAE,MAAM,GAAG,SAAS,SAAS,EAAE,CAAC;IACnD,0DAA0D;IAC1D,OAAO,CAAC,UAAU,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,SAAS,SAAS,EAAE,CAAC;IAChE;;;;4EAIwE;IACxE,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC;CAC/B;AAED;mCACmC;AACnC,MAAM,WAAW,SAAS;IACxB,4DAA4D;IAC5D,GAAG,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO,CAAC;IACzC,8EAA8E;IAC9E,KAAK,CAAC,OAAO,EAAE,SAAS,MAAM,EAA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d,MAAM,WAAW,UAAU;IACzB,KAAK,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAClC;AAED;;;;;2DAK2D;AAC3D,MAAM,MAAM,oBAAoB,GAAG,aAAa,GAAG,SAAS,GAAG,OAAO,CAAC;AAEvE,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,IAAI,EAAE,oBAAoB,CAAC;IACpC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED;iEACiE;AACjE,qBAAa,UAAW,SAAQ,KAAK;IACnC,QAAQ,CAAC,IAAI,EAAE,oBAAoB,CAAC;IACpC,oCAAoC;IACpC,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC;IACpB;sEACkE;IAClE,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;gBAEZ,IAAI,EAAE,oBAAoB,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,GAAE,MAAkB;IAQ/F;sDACkD;IAClD,MAAM,CAAC,IAAI,CAAC,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,GAAG,UAAU;CAQpD;AAMD;;wEAEwE;AACxE,MAAM,MAAM,YAAY,GAAG,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;AAEnD,wEAAwE;AACxE,MAAM,WAAW,KAAK;IACpB,GAAG,IAAI,MAAM,CAAC;CACf;AAED,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,KAAK,EAAE,SAAS,CAAC;IAC1B,QAAQ,CAAC,MAAM,EAAE,UAAU,CAAC;IAC5B,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC;IACtB,QAAQ,CAAC,QAAQ,CAAC,EAAE,YAAY,CAAC;CAClC"}
@@ -11,7 +11,8 @@
11
11
  * again. That failure says nothing of the folders that rode with it, which
12
12
  * may stand: a waiter for one of them, or for a unit beneath them, asks for
13
13
  * itself. The count of placements in flight is said whole each time it
14
- * changes.
14
+ * changes, and once at the start: zero, so a drive that has placed nothing
15
+ * is heard idle rather than never heard.
15
16
  */
16
17
  import { type ActivityHook, type Clock, type PlacerPort, type Unit } from './contracts.js';
17
18
  /** One unit asked of the placer for one touch; the folders of its run came
@@ -1 +1 @@
1
- {"version":3,"file":"placements.d.ts","sourceRoot":"","sources":["../../src/drive/placements.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,EAAc,KAAK,YAAY,EAAE,KAAK,KAAK,EAAE,KAAK,UAAU,EAAE,KAAK,IAAI,EAAE,MAAM,gBAAgB,CAAC;AAEvG;cACc;AACd,MAAM,WAAW,OAAO;IACtB,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC;IACpB,uEAAuE;IACvE,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;IACzB,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,MAAM,EAAE,UAAU,CAAC;IAC5B,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC;IACtB,QAAQ,CAAC,QAAQ,CAAC,EAAE,YAAY,CAAC;CAClC;AAWD,qBAAa,UAAU;IAMT,OAAO,CAAC,QAAQ,CAAC,KAAK;IALlC;sDACkD;IAClD,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAA8B;IACvD,OAAO,CAAC,KAAK,CAAK;gBAEW,KAAK,EAAE,cAAc;IAElD,gEAAgE;IAC1D,KAAK,CAAC,KAAK,EAAE,SAAS,IAAI,EAAE,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC;IAavD,gCAAgC;IAChC,KAAK,IAAI,MAAM;IAIf;;;;kCAI8B;YAChB,GAAG;IA+BjB,OAAO,CAAC,GAAG;CAKZ"}
1
+ {"version":3,"file":"placements.d.ts","sourceRoot":"","sources":["../../src/drive/placements.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,EAAc,KAAK,YAAY,EAAE,KAAK,KAAK,EAAE,KAAK,UAAU,EAAE,KAAK,IAAI,EAAE,MAAM,gBAAgB,CAAC;AAEvG;cACc;AACd,MAAM,WAAW,OAAO;IACtB,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC;IACpB,uEAAuE;IACvE,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;IACzB,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,MAAM,EAAE,UAAU,CAAC;IAC5B,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC;IACtB,QAAQ,CAAC,QAAQ,CAAC,EAAE,YAAY,CAAC;CAClC;AAWD,qBAAa,UAAU;IAMT,OAAO,CAAC,QAAQ,CAAC,KAAK;IALlC;sDACkD;IAClD,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAA8B;IACvD,OAAO,CAAC,KAAK,CAAK;gBAEW,KAAK,EAAE,cAAc;IAIlD,gEAAgE;IAC1D,KAAK,CAAC,KAAK,EAAE,SAAS,IAAI,EAAE,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC;IAavD,gCAAgC;IAChC,KAAK,IAAI,MAAM;IAIf;;;;kCAI8B;YAChB,GAAG;IA+BjB,OAAO,CAAC,GAAG;CAKZ"}
@@ -11,7 +11,8 @@
11
11
  * again. That failure says nothing of the folders that rode with it, which
12
12
  * may stand: a waiter for one of them, or for a unit beneath them, asks for
13
13
  * itself. The count of placements in flight is said whole each time it
14
- * changes.
14
+ * changes, and once at the start: zero, so a drive that has placed nothing
15
+ * is heard idle rather than never heard.
15
16
  */
16
17
  import { DriveError } from './contracts.js';
17
18
  /** Whether a placement finished; its failure is its own waiters' to hear. */
@@ -24,6 +25,7 @@ export class Placements {
24
25
  asked = 0;
25
26
  constructor(ports) {
26
27
  this.ports = ports;
28
+ ports.activity?.(this.asked);
27
29
  }
28
30
  /** The units in order; the receipts once the last is placed. */
29
31
  async place(units) {
@@ -1 +1 @@
1
- {"version":3,"file":"placements.js","sourceRoot":"","sources":["../../src/drive/placements.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,EAAE,UAAU,EAA6D,MAAM,gBAAgB,CAAC;AAuBvG,6EAA6E;AAC7E,MAAM,QAAQ,GAAG,CAAC,OAAgB,EAAoB,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,IAAI,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,CAAC;AAEvG,MAAM,OAAO,UAAU;IAMQ;IAL7B;sDACkD;IACjC,QAAQ,GAAG,IAAI,GAAG,EAAmB,CAAC;IAC/C,KAAK,GAAG,CAAC,CAAC;IAElB,YAA6B,KAAqB;QAArB,UAAK,GAAL,KAAK,CAAgB;IAAG,CAAC;IAEtD,gEAAgE;IAChE,KAAK,CAAC,KAAK,CAAC,KAAsB;QAChC,MAAM,QAAQ,GAAc,EAAE,CAAC;QAC/B,IAAI,GAAG,GAAW,EAAE,CAAC;QACrB,KAAK,MAAM,CAAC,KAAK,EAAE,IAAI,CAAC,IAAI,KAAK,CAAC,OAAO,EAAE,EAAE,CAAC;YAC5C,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YACf,MAAM,IAAI,GAAG,KAAK,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC;YAC9B,IAAI,IAAI,KAAK,SAAS,IAAI,IAAI,CAAC,IAAI,KAAK,QAAQ,IAAI,IAAI,CAAC,IAAI,KAAK,IAAI,CAAC,IAAI;gBAAE,SAAS;YACtF,QAAQ,CAAC,IAAI,CAAC,MAAM,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC;YACnC,GAAG,GAAG,EAAE,CAAC;QACX,CAAC;QACD,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED,gCAAgC;IAChC,KAAK;QACH,OAAO,IAAI,C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AC,IAAI,CACzC,GAAG,EAAE,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,EACjC,CAAC,KAAc,EAAE,EAAE,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC,CAAC,MAAM,UAAU,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,CACpF;SACF,CAAC;QACF,KAAK,MAAM,IAAI,IAAI,GAAG;YAAE,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QAC9D,IAAI,CAAC,KAAK,IAAI,CAAC,CAAC;QAChB,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAClC,MAAM,OAAO,CAAC,OAAO,CAAC;QACtB,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,EAAE,GAAG,OAAO,EAAE,CAAC;IACvE,CAAC;IAEO,GAAG,CAAC,GAAoB,EAAE,OAAgB;QAChD,KAAK,MAAM,IAAI,IAAI,GAAG;YAAE,IAAI,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,OAAO;gBAAE,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACtG,IAAI,CAAC,KAAK,IAAI,CAAC,CAAC;QAChB,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACpC,CAAC;CACF"}
package/dist/index.d.ts CHANGED
@@ -3,16 +3,16 @@
3
3
  *
4
4
  * Portable layers, one rule each:
5
5
  *
6
- * - `contracts/` every wire shape and identity rule, as types + validators
7
- * - `machines/` the protocol's behavior, as pure state machines
6
+ * - `contracts/` the wire shapes a host still speaks, as types + validators
7
+ * - `entities/` identity, version, lifecycle, and codec laws
8
8
  * - `records/` the entity Record, local Outbox, authority, and Inbox laws
9
+ * - `apply/` the Apply/Verify rail
9
10
  * - `steps.ts` long whole-graph passes written as steps a host can pace
10
11
  *
11
12
  * Start at PURPOSE.md for the axioms; docs/ holds the normative specs.
12
13
  */
13
14
  export * from './steps.js';
14
15
  export * from './contracts/index.js';
15
- export * from './machines/index.js';
16
16
  export * from './entities/index.js';
17
17
  export * from './watching/index.js';
18
18
  export * from './detection/index.js';
@@ -21,7 +21,6 @@ export * from './apply/index.js';
21
21
  export * from './registration/index.js';
22
22
  export * from './files/index.js';
23
23
  export * from './transfer/index.js';
24
- export * from './merge/index.js';
25
24
  export * from './workspace/index.js';
26
25
  export * from './sharing/index.js';
27
26
  export * from './history/index.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,cAAc,YAAY,CAAC;AAC3B,cAAc,sBAAsB,CAAC;AACrC,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,yBAAyB,CAAC;AACxC,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,cAAc,YAAY,CAAC;AAC3B,cAAc,sBAAsB,CAAC;AACrC,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,yBAAyB,CAAC;AACxC,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC"}
package/dist/index.js CHANGED
@@ -3,16 +3,16 @@
3
3
  *
4
4
  * Portable layers, one rule each:
5
5
  *
6
- * - `contracts/` every wire shape and identity rule, as types + validators
7
- * - `machines/` the protocol's behavior, as pure state machines
6
+ * - `contracts/` the wire shapes a host still speaks, as types + validators
7
+ * - `entities/` identity, version, lifecycle, and codec laws
8
8
  * - `records/` the entity Record, local Outbox, authority, and Inbox laws
9
+ * - `apply/` the Apply/Verify rail
9
10
  * - `steps.ts` long whole-graph passes written as steps a host can pace
10
11
  *
11
12
  * Start at PURPOSE.md for the axioms; docs/ holds the normative specs.
12
13
  */
13
14
  export * from './steps.js';
14
15
  export * from './contracts/index.js';
15
- export * from './machines/index.js';
16
16
  export * from './entities/index.js';
17
17
  export * from './watching/index.js';
18
18
  export * from './detection/index.js';
@@ -21,7 +21,6 @@ export * from './apply/index.js';
21
21
  export * from './registration/index.js';
22
22
  export * from './files/index.js';
23
23
  export * from './transfer/index.js';
24
- export * from './merge/index.js';
25
24
  export * from './workspace/index.js';
26
25
  export * from './sharing/index.js';
27
26
  export * from './history/index.js';
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,cAAc,YAAY,CAAC;AAC3B,cAAc,sBAAsB,CAAC;AACrC,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,yBAAyB,CAAC;AACxC,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,cAAc,YAAY,CAAC;AAC3B,cAAc,sBAAsB,CAAC;AACrC,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,yBAAyB,CAAC;AACxC,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC"}
@@ -1,14 +1,13 @@
1
1
  "use strict";
2
2
  /**
3
- * Tunnel frames — runtime ⇄ gateway, protocol v2
4
- * (local-live-protocol.md §5).
3
+ * Tunnel frames — runtime ⇄ gateway, protocol v2.
5
4
  *
6
5
  * One outbound WebSocket per runtime. v2 is negotiated per connection: the
7
6
  * runtime's hello carries `protocol_version: 2`; no `hello_ack` means the
8
7
  * peer is v1 and only v1 frames may be sent. Slot arbitration is
9
- * hello-driven and identity-based — the decision function itself lives in
10
- * `machines/arbitration.ts`; this file owns the wire shapes and constants
11
- * both sides must agree on.
8
+ * hello-driven and identity-based — the host decides which runtime holds the
9
+ * slot; this file owns the wire shapes and constants both sides must agree
10
+ * on.
12
11
  */
13
12
  Object.defineProperty(exports, "__esModule", { value: true });
14
13
  exports.hasUsableIdentity = exports.CHUNKING = exports.BACKPRESSURE = exports.CLOSE_CODES = exports.CAPABILITY_SHARED_MUTATION = exports.HELLO_INTERVAL_MS = exports.PROTOCOL_VERSION = void 0;
@@ -1 +1 @@
1
- {"version":3,"file":"tunnel.js","sourceRoot":"","sources":["../../../src/contracts/frames/tunnel.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;;;AAgEH,gCASC;AAvED,gDAA2F;AAE9E,QAAA,gBAAgB,GAAG,CAAC,CAAC;AAClC,qCAAqC;AACxB,QAAA,iBAAiB,GAAG,MAAM,CAAC;AAExC,0HAA0H;AAC7G,QAAA,0BAA0B,GAAG,oBAAoB,CAAC;AAElD,QAAA,WAAW,GAAG;IACzB,iFAAiF;IACjF,QAAQ,EAAE,IAAI;IACd,qFAAqF;IACrF,kBAAkB,EAAE,IAAI;IACxB,YAAY,EAAE,IAAI;CACV,CAAC;AAEE,QAAA,YAAY,GAAG;IAC1B,6FAA6F;IAC7F,eAAe,EAAE,EAAE,GAAG,IAAI;IAC1B,sEAAsE;IACtE,kBAAkB,EAAE,IAAI,GAAG,IAAI;IAC/B,+HAA+H;IAC/H,YAAY,EAAE,EAAE,GAAG,IAAI,GAAG,IAAI;CACtB,CAAC;AAEE,QAAA,QAAQ,GAAG;IACtB,qDAAqD;IACrD,cAAc,EAAE,GAAG,GAAG,IAAI;IAC1B,6CAA6C;IAC7C,aAAa,EAAE,GAAG,GAAG,IAAI;CACjB,CAAC;AA4BX,MAAM,aAAa,GACjB,oJAAoJ,CAAC;AAEvJ,SAAgB,UAAU,CAAC,KAAc;IACvC,IAAI,CAAC,IAAA,sBAAQ,EAAC,KAAK,CAAC,IAAI,KAAK,CAAC,IAAI,KAAK,OAAO,EAAE,CAAC;QAC/C,OAAO,IAAA,uBAAS,EAAC,aAAa,EAAE,YAAY,IAAA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,qBAIG"}
@@ -1,9 +1,9 @@
1
1
  "use strict";
2
2
  /**
3
- * The contracts layer: every wire shape, identity rule, and vocabulary the
4
- * protocol documents define — as types, guards, and validators. Nothing in
5
- * here performs I/O or holds state; the state machines live in
6
- * `../machines`, and the ports a host injects live in `../adapters`.
3
+ * The contracts layer: the wire shapes and validators a host still speaks —
4
+ * non-throwing validation, immutable chunked content, the sealed-content
5
+ * protection envelope, and the runtime-gateway tunnel. Nothing in here
6
+ * performs I/O or holds state.
7
7
  */
8
8
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
9
9
  if (k2 === undefined) k2 = k;
@@ -21,16 +21,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
21
21
  };
22
22
  Object.defineProperty(exports, "__esModule", { value: true });
23
23
  __exportStar(require("./validate.js"), exports);
24
- __exportStar(require("./resources.js"), exports);
25
- __exportStar(require("./events.js"), exports);
26
- __exportStar(require("./snapshot.js"), exports);
27
- __exportStar(require("./binding.js"), exports);
28
- __exportStar(require("./deployments.js"), exports);
29
- __exportStar(require("./presence.js"), exports);
30
- __exportStar(require("./docs.js"), exports);
31
24
  __exportStar(require("./content.js"), exports);
32
25
  __exportStar(require("./protection.js"), exports);
33
- __exportStar(require("./frames/stream.js"), exports);
34
- __exportStar(require("./frames/gateway.js"), exports);
35
26
  __exportStar(require("./frames/tunnel.js"), exports);
36
27
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/contracts/index.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;;;;;;;;;;;;;AAEH,gDAA8B;AAC9B,iDAA+B;AAC/B,8CAA4B;AAC5B,gDAA8B;AAC9B,+CAA6B;AAC7B,mDAAiC;AACjC,gDAA8B;AAC9B,4CAA0B;AAC1B,+CAA6B;AAC7B,kDAAgC;AAChC,qDAAmC;AACnC,sDAAoC;AACpC,qDAAmC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/contracts/index.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;;;;;;;;;;;;;AAEH,gDAA8B;AAC9B,+CAA6B;AAC7B,kDAAgC;AAChC,qDAAmC"}
@@ -3,11 +3,11 @@
3
3
  * Shared validation vocabulary for every contract in this package.
4
4
  *
5
5
  * Validators never throw on bad wire data — a peer being wrong is an
6
- * expected condition, not an exception (local-live-protocol.md: unknown
7
- * frames mean "the other end is older"). They return a `Checked<T>` so
8
- * callers must look at the outcome, and every failure message is
9
- * example-first: it states what a correct value looks like before saying
10
- * what was wrong (see PURPOSE.md axiom on error shape).
6
+ * expected condition, not an exception (an unknown frame means the other
7
+ * end is older). They return a `Checked<T>` so callers must look at the
8
+ * outcome, and every failure message is example-first: it states what a
9
+ * correct value looks like before saying what was wrong (see PURPOSE.md
10
+ * axiom on error shape).
11
11
  */
12
12
  Object.defineProperty(exports, "__esModule", { value: true });
13
13
  exports.isSeq = exports.isNonEmptyString = exports.isRecord = exports.failShape = exports.fail = exports.pass = void 0;
@@ -14,7 +14,8 @@ exports.Placements = void 0;
14
14
  * again. That failure says nothing of the folders that rode with it, which
15
15
  * may stand: a waiter for one of them, or for a unit beneath them, asks for
16
16
  * itself. The count of placements in flight is said whole each time it
17
- * changes.
17
+ * changes, and once at the start: zero, so a drive that has placed nothing
18
+ * is heard idle rather than never heard.
18
19
  */
19
20
  const contracts_js_1 = require("./contracts.js");
20
21
  /** Whether a placement finished; its failure is its own waiters' to hear. */
@@ -27,6 +28,7 @@ class Placements {
27
28
  asked = 0;
28
29
  constructor(ports) {
29
30
  this.ports = ports;
31
+ ports.activity?.(this.asked);
30
32
  }
31
33
  /** The units in order; the receipts once the last is placed. */
32
34
  async place(units) {
@@ -1 +1 @@
1
- {"version":3,"file":"placements.js","sourceRoot":"","sources":["../../src/drive/placements.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;GAcG;AACH,iDAAuG;AAuBvG,6EAA6E;AAC7E,MAAM,QAAQ,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CACpF;SACF,CAAC;QACF,KAAK,MAAM,IAAI,IAAI,GAAG;YAAE,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QAC9D,IAAI,CAAC,KAAK,IAAI,CAAC,CAAC;QAChB,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAClC,MAAM,OAAO,CAAC,OAAO,CAAC;QACtB,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,EAAE,GAAG,OAAO,EAAE,CAAC;IACvE,CAAC;IAEO,GAAG,CAAC,GAAoB,EAAE,OAAgB;QAChD,KAAK,MAAM,IAAI,IAAI,GAAG;YAAE,IAAI,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,OAAO;gBAAE,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACtG,IAAI,CAAC,KAAK,IAAI,CAAC,CAAC;QAChB,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACpC,CAAC;CACF;AAtED,gCAsEC"}
package/dist-cjs/index.js CHANGED
@@ -4,9 +4,10 @@
4
4
  *
5
5
  * Portable layers, one rule each:
6
6
  *
7
- * - `contracts/` every wire shape and identity rule, as types + validators
8
- * - `machines/` the protocol's behavior, as pure state machines
7
+ * - `contracts/` the wire shapes a host still speaks, as types + validators
8
+ * - `entities/` identity, version, lifecycle, and codec laws
9
9
  * - `records/` the entity Record, local Outbox, authority, and Inbox laws
10
+ * - `apply/` the Apply/Verify rail
10
11
  * - `steps.ts` long whole-graph passes written as steps a host can pace
11
12
  *
12
13
  * Start at PURPOSE.md for the axioms; docs/ holds the normative specs.
@@ -28,7 +29,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
28
29
  Object.defineProperty(exports, "__esModule", { value: true });
29
30
  __exportStar(require("./steps.js"), exports);
30
31
  __exportStar(require("./contracts/index.js"), exports);
31
- __exportStar(require("./machines/index.js"), exports);
32
32
  __exportStar(require("./entities/index.js"), exports);
33
33
  __exportStar(require("./watching/index.js"), exports);
34
34
  __exportStar(require("./detection/index.js"), exports);
@@ -37,7 +37,6 @@ __exportStar(require("./apply/index.js"), exports);
37
37
  __exportStar(require("./registration/index.js"), exports);
38
38
  __exportStar(require("./files/index.js"), exports);
39
39
  __exportStar(require("./transfer/index.js"), exports);
40
- __exportStar(require("./merge/index.js"), exports);
41
40
  __exportStar(require("./workspace/index.js"), exports);
42
41
  __exportStar(require("./sharing/index.js"), exports);
43
42
  __exportStar(require("./history/index.js"), exports);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;GAWG;;;;;;;;;;;;;;;;AAEH,6CAA2B;AAC3B,uDAAqC;AACrC,sDAAoC;AACpC,sDAAoC;AACpC,sDAAoC;AACpC,uDAAqC;AACrC,qDAAmC;AACnC,mDAAiC;AACjC,0DAAwC;AACxC,mDAAiC;AACjC,sDAAoC;AACpC,mDAAiC;AACjC,uDAAqC;AACrC,qDAAmC;AACnC,qDAAmC;AACnC,iDAA+B;AAC/B,mDAAiC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;GAYG;;;;;;;;;;;;;;;;AAEH,6CAA2B;AAC3B,uDAAqC;AACrC,sDAAoC;AACpC,sDAAoC;AACpC,uDAAqC;AACrC,qDAAmC;AACnC,mDAAiC;AACjC,0DAAwC;AACxC,mDAAiC;AACjC,sDAAoC;AACpC,uDAAqC;AACrC,qDAAmC;AACnC,qDAAmC;AACnC,iDAA+B;AAC/B,mDAAiC"}