jg-agent-hq 3.0.0 → 4.0.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 (159) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/README.md +13 -13
  3. package/api/README.md +91 -102
  4. package/dist/actions/actions.js +15 -0
  5. package/dist/cli/cli.js +26 -35
  6. package/dist/cli/utilities.d.ts +1 -1
  7. package/dist/cli/utilities.js +8 -25
  8. package/dist/collaboration/dispatch/types.d.ts +2 -2
  9. package/dist/contracts/actions/types.d.ts +4 -4
  10. package/dist/contracts/browser/index.d.ts +1 -3
  11. package/dist/contracts/browser/index.js +1 -3
  12. package/dist/contracts/browser/types.d.ts +15 -1447
  13. package/dist/contracts/browser/types.js +3 -112
  14. package/dist/contracts/index.d.ts +7 -9
  15. package/dist/contracts/index.js +5 -7
  16. package/dist/contracts/plans/index.d.ts +4 -6
  17. package/dist/contracts/plans/index.js +2 -4
  18. package/dist/contracts/plans/types.d.ts +38 -905
  19. package/dist/contracts/plans/types.js +13 -139
  20. package/dist/contracts/sessions/index.d.ts +2 -0
  21. package/dist/contracts/sessions/index.js +2 -0
  22. package/dist/contracts/sessions/types.d.ts +101 -0
  23. package/dist/contracts/sessions/types.js +43 -0
  24. package/dist/contracts/types.d.ts +461 -1047
  25. package/dist/contracts/types.js +8 -0
  26. package/dist/index.d.ts +2 -4
  27. package/dist/index.js +1 -3
  28. package/dist/plans/admission.d.ts +6 -6
  29. package/dist/plans/admission.js +1 -1
  30. package/dist/plans/authority.js +15 -13
  31. package/dist/plans/documents.d.ts +3 -17
  32. package/dist/plans/documents.js +6 -62
  33. package/dist/plans/files.d.ts +2 -2
  34. package/dist/plans/files.js +2 -4
  35. package/dist/plans/finalization.d.ts +6 -8
  36. package/dist/plans/finalization.js +25 -26
  37. package/dist/plans/index.d.ts +2 -3
  38. package/dist/plans/index.js +1 -2
  39. package/dist/plans/plans.d.ts +8 -8
  40. package/dist/plans/plans.js +33 -82
  41. package/dist/plans/projections.d.ts +2 -2
  42. package/dist/plans/projections.js +44 -82
  43. package/dist/plans/revisions.d.ts +4 -5
  44. package/dist/plans/revisions.js +5 -44
  45. package/dist/plans/types.d.ts +0 -281
  46. package/dist/plans/types.js +2 -30
  47. package/dist/plans/utilities.js +2 -11
  48. package/dist/providers/claude/agents/agents.d.ts +19 -0
  49. package/dist/providers/claude/agents/agents.js +83 -0
  50. package/dist/providers/claude/agents/constants.d.ts +3 -0
  51. package/dist/providers/claude/agents/constants.js +4 -0
  52. package/dist/providers/claude/agents/index.d.ts +1 -0
  53. package/dist/providers/claude/agents/index.js +2 -0
  54. package/dist/providers/claude/agents/types.d.ts +14 -0
  55. package/dist/providers/claude/agents/types.js +9 -0
  56. package/dist/providers/claude/history/history.model.js +2 -0
  57. package/dist/providers/claude/history/types.d.ts +92 -368
  58. package/dist/providers/claude/index.d.ts +1 -0
  59. package/dist/providers/claude/index.js +2 -0
  60. package/dist/providers/codex/adapter.d.ts +1 -1
  61. package/dist/providers/codex/adapter.js +28 -3
  62. package/dist/providers/codex/codex.js +51 -18
  63. package/dist/providers/codex/events.d.ts +2 -1
  64. package/dist/providers/codex/events.js +8 -3
  65. package/dist/providers/codex/index.d.ts +1 -1
  66. package/dist/providers/codex/index.js +1 -1
  67. package/dist/providers/codex/rpc.d.ts +9 -4
  68. package/dist/providers/codex/rpc.js +109 -47
  69. package/dist/providers/codex/skill-roots/constants.d.ts +4 -0
  70. package/dist/providers/codex/skill-roots/constants.js +7 -0
  71. package/dist/providers/codex/skill-roots/index.d.ts +2 -0
  72. package/dist/providers/codex/skill-roots/index.js +4 -0
  73. package/dist/providers/codex/skill-roots/skill-roots.d.ts +35 -0
  74. package/dist/providers/codex/skill-roots/skill-roots.js +93 -0
  75. package/dist/providers/codex/transformers.d.ts +3 -1
  76. package/dist/providers/codex/transformers.js +12 -1
  77. package/dist/providers/codex/types.d.ts +11 -0
  78. package/dist/providers/codex/types.js +6 -1
  79. package/dist/providers/codex/websocket/constants.d.ts +11 -0
  80. package/dist/providers/codex/websocket/constants.js +18 -0
  81. package/dist/providers/codex/websocket/index.d.ts +1 -0
  82. package/dist/providers/codex/websocket/index.js +2 -0
  83. package/dist/providers/codex/websocket/websocket.d.ts +7 -0
  84. package/dist/providers/codex/websocket/websocket.js +219 -0
  85. package/dist/providers/index.d.ts +2 -2
  86. package/dist/providers/index.js +1 -1
  87. package/dist/providers/process.d.ts +2 -2
  88. package/dist/providers/process.js +37 -4
  89. package/dist/providers/registry/registry.js +2 -1
  90. package/dist/providers/types.d.ts +25 -2
  91. package/dist/runtime/runtime.d.ts +0 -2
  92. package/dist/runtime/runtime.js +11 -5
  93. package/dist/runtime/state/state.d.ts +1 -1
  94. package/dist/runtime/state/state.js +2 -2
  95. package/dist/runtime/types.d.ts +0 -2
  96. package/dist/runtime/types.js +0 -3
  97. package/dist/sessions/sessions.js +2 -0
  98. package/dist/snapshots/archive/archive.d.ts +29 -0
  99. package/dist/snapshots/archive/archive.js +342 -0
  100. package/dist/snapshots/archive/constants.d.ts +5 -0
  101. package/dist/snapshots/archive/constants.js +8 -0
  102. package/dist/snapshots/archive/index.d.ts +1 -0
  103. package/dist/snapshots/archive/index.js +2 -0
  104. package/dist/snapshots/artifacts.d.ts +10 -1
  105. package/dist/snapshots/artifacts.js +38 -13
  106. package/dist/snapshots/capture.d.ts +3 -2
  107. package/dist/snapshots/capture.js +29 -13
  108. package/dist/snapshots/database.d.ts +2 -2
  109. package/dist/snapshots/database.js +30 -14
  110. package/dist/snapshots/fences.d.ts +4 -9
  111. package/dist/snapshots/fences.js +9 -22
  112. package/dist/snapshots/index.d.ts +1 -2
  113. package/dist/snapshots/index.js +2 -3
  114. package/dist/snapshots/snapshots.d.ts +6 -5
  115. package/dist/snapshots/snapshots.js +13 -13
  116. package/dist/snapshots/snapshots.worker.js +1 -1
  117. package/dist/snapshots/types.d.ts +26 -5
  118. package/dist/snapshots/types.js +15 -4
  119. package/dist/storage/schema/constants.d.ts +2 -2
  120. package/dist/storage/schema/constants.js +9 -3
  121. package/dist/storage/schema/index.d.ts +2 -3
  122. package/dist/storage/schema/index.js +4 -3
  123. package/dist/storage/schema/schema.d.ts +10 -8
  124. package/dist/storage/schema/schema.js +22 -36
  125. package/dist/storage/schema/types.d.ts +1 -11
  126. package/dist/storage/schema/types.js +2 -2
  127. package/dist/storage/storage.d.ts +1 -1
  128. package/dist/storage/storage.js +2 -2
  129. package/dist/store/collaboration/collaboration.model.d.ts +2 -2
  130. package/dist/store/control/types.d.ts +16 -16
  131. package/dist/store/plans/plans.model.d.ts +3 -105
  132. package/dist/store/plans/plans.model.js +6 -46
  133. package/dist/store/schema.d.ts +0 -2
  134. package/dist/store/schema.js +6 -25
  135. package/dist/store/schema.sql +90 -16
  136. package/dist/store/sessions/index.d.ts +1 -0
  137. package/dist/store/sessions/index.js +2 -0
  138. package/dist/store/sessions/sessions.model.d.ts +28 -0
  139. package/dist/store/sessions/sessions.model.js +105 -0
  140. package/dist/store/store.d.ts +0 -2
  141. package/dist/store/store.js +13 -9
  142. package/dist/store/store.worker.js +16 -11
  143. package/dist/store/types.d.ts +134 -513
  144. package/dist/store/types.js +21 -7
  145. package/docs/recovery.md +6 -16
  146. package/errors/README.md +30 -36
  147. package/package.json +1 -1
  148. package/dist/plans/reconciliation.d.ts +0 -34
  149. package/dist/plans/reconciliation.js +0 -246
  150. package/dist/storage/schema/v1-to-v2.sql +0 -1
  151. package/dist/storage/schema/v1.sql +0 -538
  152. package/dist/storage/upgrade/index.d.ts +0 -2
  153. package/dist/storage/upgrade/index.js +0 -2
  154. package/dist/storage/upgrade/types.d.ts +0 -61
  155. package/dist/storage/upgrade/types.js +0 -42
  156. package/dist/storage/upgrade/upgrade.d.ts +0 -33
  157. package/dist/storage/upgrade/upgrade.js +0 -196
  158. package/dist/storage/upgrade/upgrade.worker.d.ts +0 -1
  159. package/dist/storage/upgrade/upgrade.worker.js +0 -220
package/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # Changelog
2
2
 
3
+ ## 4.0.1
4
+
5
+ - Report an interactive Claude session that waits on a question or permission prompt as waiting. Claude Code lists it as `waiting`, which was recorded as an unknown state and reported as a disappearance.
6
+ - Never observe an ephemeral Codex session, which Codex doesn't save, such as a helper session Codex starts itself. It no longer appears in session states.
7
+
8
+ ## 4.0.0
9
+
10
+ - Run Codex sessions on Codex's shared app-server daemon, which also hosts terminal sessions, through `codex app-server proxy`. A keepalive notices a stopped daemon: affected sessions become uncertain, nothing is resent, and the next Codex read reconnects. Extra skill roots now travel with the threads HQ starts instead of changing every session on the daemon.
11
+ - Show sessions started in a terminal. Codex sessions on the daemon and Claude sessions from `claude agents --json` report a live state with external ownership, and take input only after they are closed there and adopted. Every state change of a managed or observed session is recorded in order and read with `session-states`; transitions are kept for seven days.
12
+ - Capture snapshots while agents keep working, and mark a plan edited during capture so restore withholds its execution authority. Add `packHqSnapshot` and `unpackHqSnapshot` for AES-256-GCM archives of a snapshot, for off-machine copies.
13
+ - Keep one storage schema. Its stamp records the package version that wrote it, and any other schema is refused with an error naming that version. Remove the offline storage upgrade, the `upgrade-storage` command and version-1 snapshot support.
14
+ - Finalize plans on the milestone IDs jg-breakdown assigns. Completion evidence follows its milestone ID, and evidence whose ID left the sequence is listed as unmatched. Add the `register` plan command so snapshots capture a plan's files. Remove HQ's own milestone matching, the `reconciliation` command and the correspondence contracts.
15
+ - Remove host-only contracts: the `priority`, `error-reservation` and `publication-retry` browser commands, the host read models, the `scope`, `repositories` and `errorReservations` plan metadata, plan comparisons and the `parsePlanContract` option. A plan's execution identity is its body, its milestones and its frontmatter extensions. The single Codex quota bucket is named `single`.
16
+
3
17
  ## 3.0.0
4
18
 
5
19
  - Check protocol 0.2 plans with jg-plans 0.3.0 at each stage that grants authority: plan approval requires plan.md to conform, and finalization, sequence approval, authorization and execution require plan.md and milestones.md to conform together. Reading, status and revision workflows are unaffected, and plans without the 0.2 marker keep their current behavior.
package/README.md CHANGED
@@ -45,9 +45,11 @@ The controller owns its SQLite worker and native connections independently of cl
45
45
 
46
46
  Use `sessions` for discovery and `session-evidence` for newest-first historical evidence. These reads fit within 65,536 serialized bytes, retain exact native identities and content hashes, and continue large bodies in UTF-8 chunks. Select an item, turn or item kinds with filters. Matching names remain separate sessions. Provenance distinguishes native evidence from exact host submissions; historical text and quoted feedback never grant approval. See [bounded session evidence](api/README.md#bounded-session-evidence).
47
47
 
48
- Trusted Node hosts can open the database described by `hq.storage` and keep application tables under their own prefix. HQ reserves `hq_`, validates its current schema stamp on startup, and leaves application schema ownership and `user_version` with the host. Use `hq.withStorageMaintenance(callback)` for host schema changes; it drains admitted work and rejects active native execution before the callback. Fresh state starts at HQ storage version 2. Published 2.0.0 state requires an explicit offline upgrade; startup never migrates. Stop HQ and independent database/plan writers, then run `jg-agent-hq upgrade-storage --state-root /path/to/state --backup-directory /private/backups/before-upgrade --workspace-root /path/to/workspace`. The backup destination must be absent under an existing private canonical parent. Keep the verified backup. Trusted Node hosts use `upgradeHqStorage(options)` for the same operation. See the [shared storage contract](api/README.md#shared-storage).
48
+ Trusted Node hosts can open the database described by `hq.storage` and keep application tables under their own prefix. HQ reserves `hq_`, validates its current schema stamp on startup, and leaves application schema ownership and `user_version` with the host. Use `hq.withStorageMaintenance(callback)` for host schema changes; it drains admitted work and rejects active native execution before the callback. The stamp records the package version that wrote the database, and startup refuses any other schema with an error naming that version; HQ never migrates storage. See the [shared storage contract](api/README.md#shared-storage).
49
49
 
50
- `createHqSnapshot(hq, destination)` captures quiescent local state through SQLite's backup API, including host tables, stored reports, action.key and registered plan companions. Busy checkpoints return a conflict without interrupting work. `inspectHqSnapshot(directory)` verifies the complete snapshot; `restoreHqSnapshot({ snapshotDirectory, destination })` validates and stages it into a new private recovery workspace. Version 1 and version 2 snapshots remain supported. Restored version 1 storage requires the explicit offline upgrade before startup. Restored automation is paused, skill grants are revoked, native ownership needs reconciliation and allowed roots must be selected explicitly. Hosts own remote backups; a failed disk can lose changes since the last successful off-machine backup. See [snapshot and restore](api/README.md#snapshot-and-restore) and [recovery](docs/recovery.md).
50
+ `createHqSnapshot(hq, destination)` captures local state through SQLite's backup API while agents keep working, including host tables, stored reports, action.key and registered plan companions. HQ-mediated plan writes wait for it; the host keeps its own connections from writing host tables until it resolves. A plan that changed during capture is marked, and restore withholds its execution authority. `inspectHqSnapshot(directory)` verifies the complete snapshot; `restoreHqSnapshot({ snapshotDirectory, destination })` validates and stages it into a new private recovery workspace. `packHqSnapshot(snapshotDirectory, archivePath, key)` encrypts a snapshot into one AES-256-GCM file for off-machine copies, and `unpackHqSnapshot(archivePath, destination, key)` verifies and writes it back as a snapshot directory. Snapshots from another schema are refused by the package version that wrote them. Restored automation is paused, skill grants are revoked, native ownership needs reconciliation and allowed roots must be selected explicitly. Hosts own the key and remote backups; a failed disk can lose changes since the last successful off-machine backup. See [snapshot and restore](api/README.md#snapshot-and-restore) and [recovery](docs/recovery.md).
51
+
52
+ Sessions started in a terminal show up too. Codex sessions on the shared daemon and Claude sessions from `claude agents --json` report a live state (`running`, `waiting`, `idle`, `closed`, `failed` or `unknown`) with external ownership, and HQ sends them no input until they are closed there and handed over with `thread-adopt`. Every state change of a managed or observed session is recorded in order; read them with `{ kind: 'session-states', afterSequence }` or `session-states`. See [session states](api/README.md#session-states).
51
53
 
52
54
  Provider IDs are bounded lowercase identifiers. Codex and Claude are built in; trusted Node hosts can register additional `IAgentProviderFactory` implementations through `providerFactories`. Capabilities report current operation support, provider/session scope and unavailable reasons. Native version labels are diagnostic metadata and never determine admission. Unknown essential control data fails explicitly. `jg-agent-hq/contracts` contains browser-safe schemas and types; importing it does not import the host runtime.
53
55
 
@@ -83,11 +85,9 @@ Controlled agents use `hq_identity` to recover their stable managed ID, task mem
83
85
 
84
86
  `plan-status --directory <path>` and `plan-milestones --directory <path>` inspect a selected ordinary planning directory. No project registry is required. Mutations use the existing `request` JSON command with `kind: 'plan'`; see the [plan command reference](api/README.md#plan-coordination).
85
87
 
86
- HQ uses jg-plans to observe and prepare ordinary Markdown plans. The default profile retains unknown contractual metadata and all shared requirement sections while excluding only declared administrative fields. Status reports skills bindings as absent, current or stale. A stale binding keeps the plan readable and approvable during revision, but closes finalization and execution until jg-breakdown refreshes coverage; bindings never grant HQ approval. Finalization assigns milestone UUIDs and returns the complete canonical sequence when a breakdown exists. A plan without a breakdown remains one unit: finalization returns null content, plan approval suffices, and whole-plan execution uses an empty milestone selection with a null milestone ID. No milestone file is created merely to make a small plan executable. Plan approval, sequence approval and scoped execution authorization are separate explicit operator actions. None sends native input or answers tool permissions. `coordination.json` holds current records beside the plan. SQLite retains write replay identities and a replaceable, paged milestone projection. Keep both when recovering interrupted writes. Document locks release before the write journal is completed. Checked replacements are private (0600), and progress preserves revision while recording one prepared updated_at. A pending write blocks further mutation until its original action is reconciled.
87
-
88
- Coordinators can retain revision-bound compatibility reviews in that same file. Core operations preserve the records without assessing them or granting authority. The integrating coordinator owns review freshness and conflict gates.
88
+ HQ uses jg-plans to observe and prepare ordinary Markdown plans. The plan contract keeps every frontmatter field except the four administrative ones, and all shared requirement sections. Status reports skills bindings as absent, current or stale. A stale binding keeps the plan readable and approvable during revision, but closes finalization and execution until jg-breakdown refreshes coverage; bindings never grant HQ approval. jg-breakdown assigns milestone UUIDs; finalization requires one on every milestone, records the revision and returns the unchanged sequence when a breakdown exists. `register` records a plan directory for snapshots without locks or reads. A plan without a breakdown remains one unit: finalization returns null content, plan approval suffices, and whole-plan execution uses an empty milestone selection with a null milestone ID. No milestone file is created merely to make a small plan executable. Plan approval, sequence approval and scoped execution authorization are separate explicit operator actions. None sends native input or answers tool permissions. `coordination.json` holds current records beside the plan. SQLite retains write replay identities and a replaceable, paged milestone projection. Keep both when recovering interrupted writes. Document locks release before the write journal is completed. Checked replacements are private (0600), and progress preserves revision while recording one prepared updated_at. A pending write blocks further mutation until its original action is reconciled.
89
89
 
90
- Begin a revision before native planning. HQ stops bound implementation threads and their owned background work, captures partial-work evidence, and keeps execution paused while the CLI revises the plan and regenerates milestones. The finalizer carries exact matches automatically and asks for one confirmation covering every unmatched completed or partial milestone. Equivalent rewording preserves the original completion evidence. Changed requirements remain pending. Present and approve the canonical sequence, then explicitly authorize the new execution scope and mode. Neither approval nor restart resumes implementation. Whole-plan checkpoints and completion evidence also work without a milestone file. Removing a sequence requires explicit confirmation covering its retained milestone evidence before whole-plan execution can begin. See the [revision recovery contract](api/README.md#revision-and-progress-recovery).
90
+ Begin a revision before native planning. HQ stops bound implementation threads and their owned background work, captures partial-work evidence, and keeps execution paused while the CLI revises the plan and regenerates milestones. jg-breakdown keeps the ID and status of work whose requirements still hold, and finalization carries completion evidence by milestone ID, so rewording preserves it. A milestone the new sequence no longer marks done needs a new completion. Present and approve the canonical sequence, then explicitly authorize the new execution scope and mode. Neither approval nor restart resumes implementation. Whole-plan checkpoints and completion evidence also work without a milestone file. Evidence for a milestone ID that left the sequence stays visible in status as unmatched. See the [revision recovery contract](api/README.md#revision-and-progress-recovery).
91
91
 
92
92
  ## Agent review and feedback
93
93
 
@@ -103,7 +103,7 @@ Follow the [three complete walkthroughs](https://jg-agent-hq.jesusgraterol.dev/e
103
103
 
104
104
  These complete TypeScript examples use the public client and contracts. Start the local controller, sign in to the native CLIs, and install the required skills and supported project-local jg-plans CLI first. The host supplies actual user decisions and keeps native permission handling separate. Retain request identities before submission; after an interrupted client call, inspect those receipts instead of rerunning a whole example. Examples are development sources, not package exports or automatic website actions.
105
105
 
106
- `examples/shared-storage.ts` uses a quiescent trusted Node runtime to save a singleton application preference under the app\_ prefix, capture and inspect shared SQLite storage, and verify the value after offline restore. It closes its own SQL connections and preserves the host's user_version. Select absent output directories and pause every other writer first. The application write commits before capture; a later backup failure does not roll it back. The recovered state still requires explicit allowed roots and fresh authority before execution.
106
+ `examples/shared-storage.ts` uses a trusted Node runtime to save a singleton application preference under the app\_ prefix, capture and inspect shared SQLite storage, and verify the value after offline restore. It closes its own SQL connections and preserves the host's user_version. Select absent output directories and pause every other writer first. The application write commits before capture; a later backup failure does not roll it back. The recovered state still requires explicit allowed roots and fresh authority before execution.
107
107
 
108
108
  The [qualification matrix](api/README.md#qualification) records native journeys, host coverage and remaining interface limits.
109
109
 
@@ -114,21 +114,21 @@ The [qualification matrix](api/README.md#qualification) records native journeys,
114
114
  - `src/locks/`: lock ownership, acquisition, status and deliberate recovery.
115
115
  - `src/runtime/`: trusted configuration and lifetime ownership.
116
116
  - `src/ipc/` and `src/cli/`: private local commands and the installed executable.
117
- - `src/providers/codex/`: native history and account protocol.
118
- - `src/providers/claude/`: native structured control and usage, plus the identity-validated, worker-owned local history reader.
117
+ - `src/providers/codex/`: the shared app-server daemon connection, native history and account protocol.
118
+ - `src/providers/claude/`: native structured control and usage, the identity-validated, worker-owned local history reader and the active-session poll.
119
119
  - `src/providers/registry/`: lazy factories, normalized provider evidence, bounded lifecycle and source isolation.
120
120
  - `src/providers/inputs/` and `src/providers/results/`: checked file delivery and complete native result validation.
121
121
  - `src/providers/configuration/` and `src/providers/lineage/`: bounded native choices and confirmed immutable session relationships.
122
- - `src/sessions/`: authorized discovery, bounded evidence and provenance, cursor-bound history reads and short label suggestions.
122
+ - `src/sessions/`: authorized discovery with live session states, bounded evidence and provenance, cursor-bound history reads and short label suggestions.
123
123
  - `src/plans/`: execution digests, milestone finalization, revision checkpoints, retained verification and explicit plan authority.
124
124
  - `src/skills/`: bounded native catalogs, invocation previews and explicit input preparation.
125
125
  - `src/accounts/` and `src/extensions/`: safe account observations and authorized, bounded native MCP inventories.
126
126
  - `src/collaboration/`: host-owned tasks, streams, scoped skill-grant admission and event-driven directed request dispatch.
127
127
  - `src/collaboration/identity/` and `src/agent-tools/`: native-bound identity, private bridge credentials, shared agent tools and the stdio MCP entry.
128
128
  - `src/actions/`: durable action dispatch, native input routing and bounded live presentation.
129
- - `src/store/`: SQLite discovery metadata, collaboration streams and the action/control ledger in one worker.
130
- - `src/storage/`: trusted host metadata, exclusive maintenance, schema lineage and offline upgrades.
131
- - `src/snapshots/`: quiescent capture, streamed inventory validation and offline recovery with execution paused.
129
+ - `src/store/`: SQLite discovery metadata, observed sessions and state transitions, collaboration streams and the action/control ledger in one worker.
130
+ - `src/storage/`: trusted host metadata, exclusive maintenance and the current schema stamp.
131
+ - `src/snapshots/`: capture while agents work, streamed inventory validation and offline recovery with execution paused.
132
132
  - `src/contracts/`: browser-safe command and response contracts.
133
133
  - `scripts/package/`: build-output cleanup and packed-consumer checks.
134
134
  - `scripts/release/`: registry version/integrity checks and trusted publication of the tested archive.