@cello-protocol/daemon 0.0.53 → 0.0.54

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 (173) hide show
  1. package/dist/agent-handlers.d.ts +57 -0
  2. package/dist/agent-handlers.d.ts.map +1 -0
  3. package/dist/agent-handlers.js +360 -0
  4. package/dist/agent-handlers.js.map +1 -0
  5. package/dist/agent-id-migration.d.ts.map +1 -1
  6. package/dist/agent-id-migration.js +1 -0
  7. package/dist/agent-id-migration.js.map +1 -1
  8. package/dist/agent-loader.d.ts +3 -4
  9. package/dist/agent-loader.d.ts.map +1 -1
  10. package/dist/agent-loader.js +3 -4
  11. package/dist/agent-loader.js.map +1 -1
  12. package/dist/cbor-blob-migration.d.ts +8 -0
  13. package/dist/cbor-blob-migration.d.ts.map +1 -0
  14. package/dist/cbor-blob-migration.js +115 -0
  15. package/dist/cbor-blob-migration.js.map +1 -0
  16. package/dist/close-session-handler.d.ts +41 -0
  17. package/dist/close-session-handler.d.ts.map +1 -0
  18. package/dist/close-session-handler.js +399 -0
  19. package/dist/close-session-handler.js.map +1 -0
  20. package/dist/consortium-bootstrap.d.ts +83 -0
  21. package/dist/consortium-bootstrap.d.ts.map +1 -0
  22. package/dist/consortium-bootstrap.js +120 -0
  23. package/dist/consortium-bootstrap.js.map +1 -0
  24. package/dist/contact-handlers.d.ts +56 -0
  25. package/dist/contact-handlers.d.ts.map +1 -0
  26. package/dist/contact-handlers.js +303 -0
  27. package/dist/contact-handlers.js.map +1 -0
  28. package/dist/content-park-client.d.ts.map +1 -1
  29. package/dist/content-park-client.js +7 -7
  30. package/dist/content-park-client.js.map +1 -1
  31. package/dist/content-park.d.ts +15 -0
  32. package/dist/content-park.d.ts.map +1 -0
  33. package/dist/content-park.js +227 -0
  34. package/dist/content-park.js.map +1 -0
  35. package/dist/daemon.d.ts +0 -11
  36. package/dist/daemon.d.ts.map +1 -1
  37. package/dist/daemon.js +407 -4552
  38. package/dist/daemon.js.map +1 -1
  39. package/dist/db-identity-store.d.ts +31 -35
  40. package/dist/db-identity-store.d.ts.map +1 -1
  41. package/dist/db-identity-store.js +62 -66
  42. package/dist/db-identity-store.js.map +1 -1
  43. package/dist/directory-bootstrap.d.ts +27 -31
  44. package/dist/directory-bootstrap.d.ts.map +1 -1
  45. package/dist/directory-bootstrap.js +18 -21
  46. package/dist/directory-bootstrap.js.map +1 -1
  47. package/dist/frame-values.d.ts +3 -0
  48. package/dist/frame-values.d.ts.map +1 -0
  49. package/dist/frame-values.js +73 -0
  50. package/dist/frame-values.js.map +1 -0
  51. package/dist/identity-migration.d.ts +8 -8
  52. package/dist/identity-migration.d.ts.map +1 -1
  53. package/dist/identity-migration.js +30 -31
  54. package/dist/identity-migration.js.map +1 -1
  55. package/dist/inbound-seal-request.d.ts +17 -0
  56. package/dist/inbound-seal-request.d.ts.map +1 -0
  57. package/dist/inbound-seal-request.js +155 -0
  58. package/dist/inbound-seal-request.js.map +1 -0
  59. package/dist/inbound-sessions.d.ts +54 -0
  60. package/dist/inbound-sessions.d.ts.map +1 -0
  61. package/dist/inbound-sessions.js +603 -0
  62. package/dist/inbound-sessions.js.map +1 -0
  63. package/dist/index.d.ts.map +1 -1
  64. package/dist/index.js +8 -10
  65. package/dist/index.js.map +1 -1
  66. package/dist/initiate-session-handler.d.ts +22 -0
  67. package/dist/initiate-session-handler.d.ts.map +1 -0
  68. package/dist/initiate-session-handler.js +150 -0
  69. package/dist/initiate-session-handler.js.map +1 -0
  70. package/dist/network-directory-node.d.ts +6 -6
  71. package/dist/network-directory-node.d.ts.map +1 -1
  72. package/dist/network-directory-node.js +29 -28
  73. package/dist/network-directory-node.js.map +1 -1
  74. package/dist/notification-handlers.d.ts +32 -0
  75. package/dist/notification-handlers.d.ts.map +1 -0
  76. package/dist/notification-handlers.js +73 -0
  77. package/dist/notification-handlers.js.map +1 -0
  78. package/dist/outbound-sessions.d.ts +54 -0
  79. package/dist/outbound-sessions.d.ts.map +1 -0
  80. package/dist/outbound-sessions.js +429 -0
  81. package/dist/outbound-sessions.js.map +1 -0
  82. package/dist/park-envelope.d.ts.map +1 -1
  83. package/dist/park-envelope.js +3 -2
  84. package/dist/park-envelope.js.map +1 -1
  85. package/dist/register-handler.d.ts +35 -0
  86. package/dist/register-handler.d.ts.map +1 -0
  87. package/dist/register-handler.js +179 -0
  88. package/dist/register-handler.js.map +1 -0
  89. package/dist/registration-manager.d.ts.map +1 -1
  90. package/dist/registration-manager.js +3 -6
  91. package/dist/registration-manager.js.map +1 -1
  92. package/dist/relay-receipt-store.d.ts.map +1 -1
  93. package/dist/relay-receipt-store.js +1 -2
  94. package/dist/relay-receipt-store.js.map +1 -1
  95. package/dist/retry-queue.d.ts +18 -60
  96. package/dist/retry-queue.d.ts.map +1 -1
  97. package/dist/retry-queue.js +46 -97
  98. package/dist/retry-queue.js.map +1 -1
  99. package/dist/seal-coordinator.d.ts +47 -0
  100. package/dist/seal-coordinator.d.ts.map +1 -0
  101. package/dist/seal-coordinator.js +551 -0
  102. package/dist/seal-coordinator.js.map +1 -0
  103. package/dist/seal-flows.d.ts +50 -0
  104. package/dist/seal-flows.d.ts.map +1 -0
  105. package/dist/seal-flows.js +454 -0
  106. package/dist/seal-flows.js.map +1 -0
  107. package/dist/seal-frontier-verify.d.ts +9 -9
  108. package/dist/seal-frontier-verify.d.ts.map +1 -1
  109. package/dist/seal-frontier-verify.js +11 -12
  110. package/dist/seal-frontier-verify.js.map +1 -1
  111. package/dist/seal-leaf.d.ts +58 -0
  112. package/dist/seal-leaf.d.ts.map +1 -0
  113. package/dist/seal-leaf.js +111 -0
  114. package/dist/seal-leaf.js.map +1 -0
  115. package/dist/seal-receipt-upgrade.d.ts +1 -1
  116. package/dist/seal-receipt-upgrade.js +1 -1
  117. package/dist/seal-upgrade.d.ts +10 -10
  118. package/dist/seal-upgrade.d.ts.map +1 -1
  119. package/dist/seal-upgrade.js +23 -24
  120. package/dist/seal-upgrade.js.map +1 -1
  121. package/dist/session-assignment-parser.d.ts +16 -19
  122. package/dist/session-assignment-parser.d.ts.map +1 -1
  123. package/dist/session-assignment-parser.js +30 -29
  124. package/dist/session-assignment-parser.js.map +1 -1
  125. package/dist/session-ceremony.d.ts +3 -6
  126. package/dist/session-ceremony.d.ts.map +1 -1
  127. package/dist/session-ceremony.js +7 -9
  128. package/dist/session-ceremony.js.map +1 -1
  129. package/dist/session-content-handlers.d.ts +25 -0
  130. package/dist/session-content-handlers.d.ts.map +1 -0
  131. package/dist/session-content-handlers.js +436 -0
  132. package/dist/session-content-handlers.js.map +1 -0
  133. package/dist/session-name.d.ts +35 -0
  134. package/dist/session-name.d.ts.map +1 -0
  135. package/dist/session-name.js +60 -0
  136. package/dist/session-name.js.map +1 -0
  137. package/dist/session-node-manager.d.ts +26 -62
  138. package/dist/session-node-manager.d.ts.map +1 -1
  139. package/dist/session-node-manager.js +115 -92
  140. package/dist/session-node-manager.js.map +1 -1
  141. package/dist/session-read-handlers.d.ts +38 -0
  142. package/dist/session-read-handlers.d.ts.map +1 -0
  143. package/dist/session-read-handlers.js +233 -0
  144. package/dist/session-read-handlers.js.map +1 -0
  145. package/dist/session-relay-client.d.ts +8 -8
  146. package/dist/session-relay-client.d.ts.map +1 -1
  147. package/dist/session-relay-client.js +44 -46
  148. package/dist/session-relay-client.js.map +1 -1
  149. package/dist/session-tree.d.ts +11 -23
  150. package/dist/session-tree.d.ts.map +1 -1
  151. package/dist/session-tree.js +14 -26
  152. package/dist/session-tree.js.map +1 -1
  153. package/dist/signaling-connect.d.ts +2 -5
  154. package/dist/signaling-connect.d.ts.map +1 -1
  155. package/dist/signaling-connect.js +7 -12
  156. package/dist/signaling-connect.js.map +1 -1
  157. package/dist/sqlcipher-db.d.ts +18 -19
  158. package/dist/sqlcipher-db.d.ts.map +1 -1
  159. package/dist/sqlcipher-db.js +30 -30
  160. package/dist/sqlcipher-db.js.map +1 -1
  161. package/dist/telegram-doorbell.d.ts +38 -0
  162. package/dist/telegram-doorbell.d.ts.map +1 -0
  163. package/dist/telegram-doorbell.js +139 -0
  164. package/dist/telegram-doorbell.js.map +1 -0
  165. package/dist/types.d.ts +86 -79
  166. package/dist/types.d.ts.map +1 -1
  167. package/dist/types.js +0 -1
  168. package/dist/types.js.map +1 -1
  169. package/dist/vocabulary.d.ts +30 -30
  170. package/dist/vocabulary.d.ts.map +1 -1
  171. package/dist/vocabulary.js +41 -49
  172. package/dist/vocabulary.js.map +1 -1
  173. package/package.json +5 -5
package/dist/types.d.ts CHANGED
@@ -59,16 +59,15 @@ export interface AgentInfo {
59
59
  pubkey?: string;
60
60
  error?: string;
61
61
  /**
62
- * M8B F14: whether THIS agent currently has an armed standing receiver. Populated on the
62
+ * Whether THIS agent currently has an armed standing receiver. Populated on the
63
63
  * cello_status surface (getStatus) so a deaf agent — online but unable to accept inbound
64
64
  * sessions — is visible per-agent, not hidden behind the daemon-level ANY-agent aggregate.
65
65
  */
66
66
  standing_receiver_ready?: boolean;
67
67
  /**
68
- * M8C-AUTOSTART-1 (F5): whether THIS agent is the current (selected) agent for the requesting
69
- * connection. Split out from `state` so a selected agent reads `state: "online"` + `selected: true`
70
- * `state` no longer overloads the value "current", so two healthy agents don't read as
71
- * different readiness levels.
68
+ * Whether THIS agent is the current (selected) agent for the requesting connection. Kept SEPARATE
69
+ * from `state` `state` must not overload the value "current", or two equally healthy agents read
70
+ * as different readiness levels. A selected agent reads `state: "online"` + `selected: true`.
72
71
  */
73
72
  selected?: boolean;
74
73
  }
@@ -85,33 +84,35 @@ export interface DaemonStatusResponse {
85
84
  /**
86
85
  * True when the standing receiver node is listening and ready to accept the
87
86
  * next inbound session. Set to true by SessionNodeManager.initialize() during
88
- * daemon startup (before the IPC socket opens). DAEMON-002 AC-002.
87
+ * daemon startup, before the IPC socket opens.
89
88
  */
90
89
  standing_receiver_ready: boolean;
91
90
  /**
92
91
  * Total count of retry_queue entries across all sessions.
93
- * Always present as integer >= 0. DAEMON-003 AC-009.
92
+ * Always present as integer >= 0.
94
93
  */
95
94
  retryQueueDepth: number;
96
95
  /**
97
- * M7-SESSION-001 AC-007: interrupted sessions from SQLite.
96
+ * Interrupted sessions from SQLite.
98
97
  * Always present (empty array if none). Never undefined or omitted.
99
98
  */
100
99
  interrupted_sessions: InterruptedSessionInfo[];
101
100
  /**
102
- * M8B F16: ACTIVE sessions with their direct-path counterparty liveness, so a
101
+ * ACTIVE sessions with their direct-path counterparty liveness, so a
103
102
  * counterparty-gone session is visible to the operator instead of looking identical
104
103
  * to a quiet-but-healthy one. Always present (empty array if none).
105
104
  */
106
105
  active_sessions: ActiveSessionInfo[];
107
106
  }
108
- /** M8B F16: one active session's status row (see DaemonStatusResponse.active_sessions). */
107
+ /** One active session's status row (see DaemonStatusResponse.active_sessions). */
109
108
  export interface ActiveSessionInfo {
110
109
  sessionId: string;
111
110
  agentName: string;
112
111
  counterpartyPubkey: string;
113
112
  /** Direct-path counterparty liveness; 'unknown' before any session-node observation. */
114
113
  liveness: "alive" | "gone" | "unknown";
114
+ /** DOD-SESSION-NAME-1: this agent's own label for the session; null when unnamed. */
115
+ sessionName: string | null;
115
116
  }
116
117
  export interface DaemonConfig {
117
118
  celloDir: string;
@@ -121,9 +122,9 @@ export interface DaemonConfig {
121
122
  version: string;
122
123
  logger: Logger;
123
124
  /**
124
- * M7-MANIFEST-002: manifest loading and verification.
125
+ * Manifest loading and verification.
125
126
  * When provided, startDaemon() calls manifestProvider.loadAndVerify() at startup.
126
- * When absent, manifest loading is skipped (backward compat for DAEMON-001 tests).
127
+ * When absent, manifest loading is skipped.
127
128
  *
128
129
  * Production: requires manifestRootKeys (non-empty array) and manifestThreshold (>= 1).
129
130
  * The bundled consortium-manifest.json is NOT shipped in the npm package — operators
@@ -131,39 +132,38 @@ export interface DaemonConfig {
131
132
  */
132
133
  manifestProvider?: IManifestProvider;
133
134
  /**
134
- * M7-MANIFEST-002: officer root keys for manifest signature verification.
135
+ * Officer root keys for manifest signature verification.
135
136
  * Required when manifestProvider is provided.
136
137
  */
137
138
  manifestRootKeys?: readonly string[];
138
139
  /**
139
- * M7-MANIFEST-002: officer threshold for manifest signature verification.
140
+ * Officer threshold for manifest signature verification.
140
141
  * Required when manifestProvider is provided.
141
142
  */
142
143
  manifestThreshold?: number;
143
144
  /**
144
- * M7-MANIFEST-002: version store for monotonicity enforcement.
145
+ * Version store for monotonicity enforcement.
145
146
  * When absent, monotonicity check is skipped.
146
147
  */
147
148
  manifestVersionStore?: IManifestVersionStore;
148
149
  /**
149
- * M7-MANIFEST-002: poll scheduler for background manifest refresh.
150
+ * Poll scheduler for background manifest refresh.
150
151
  * When absent, polling is disabled.
151
152
  */
152
153
  manifestPollScheduler?: IManifestPollScheduler;
153
154
  /**
154
- * CELLO-M7-CONN-001 (DOD-CONN-3): base URL for the daemon-level HTTP manifest poll
155
- * (`${directoryHttpUrl}/manifest`). The poll moved off the keystone signaling stream
156
- * to unauthenticated HTTP and runs even with zero agents. Defaults to
157
- * resolveDirectoryUrl(process.env). Tests inject an in-process server URL.
155
+ * Base URL for the daemon-level HTTP manifest poll (`${directoryHttpUrl}/manifest`). The poll runs
156
+ * over unauthenticated HTTP, NOT the keystone signaling stream, so it keeps running with zero
157
+ * agents. Defaults to resolveDirectoryUrl(process.env). Tests inject an in-process server URL.
158
158
  */
159
159
  directoryHttpUrl?: string;
160
160
  /**
161
- * M7-MANIFEST-002: challenge verifier for directory step-5 identity proof.
161
+ * Challenge verifier for directory step-5 identity proof.
162
162
  * When absent, directory challenge verification is skipped.
163
163
  */
164
164
  challengeVerifier?: IDirectoryChallengeVerifier;
165
165
  /**
166
- * M7-SIGNAL-001: injectable connect function for directory signaling stream.
166
+ * Injectable connect function for the directory signaling stream.
167
167
  * When absent, a stub that always rejects (directory_signaling_not_configured) is used.
168
168
  * Production: performs the full 7-step directory handshake.
169
169
  *
@@ -173,92 +173,83 @@ export interface DaemonConfig {
173
173
  */
174
174
  signalingConnect?: () => Promise<ConnectResult>;
175
175
  /**
176
- * M7 Keystone (Part 1): resolves the directory endpoint to dial (GET /bootstrap).
176
+ * Resolves the directory endpoint to dial (GET /bootstrap).
177
177
  * When signalingConnect is absent and this is present, startDaemon builds the
178
178
  * production signalingConnect from this resolver + the daemon's primary agent
179
179
  * identity. Ignored when signalingConnect is provided directly.
180
180
  */
181
181
  directoryEndpointResolver?: () => Promise<DirectoryEndpoint | null>;
182
182
  /**
183
- * CELLO-M7-DAEMON-004: injectable session-node factory for the composition root.
183
+ * Injectable session-node factory for the composition root.
184
184
  * When absent, the production factory (real libp2p via createNode) is used.
185
185
  * Tests inject a controllable factory to exercise the send/receive/tree path
186
- * without the real transport stack — the same adapter-injection pattern
187
- * DAEMON-002 established for ISessionNodeFactory.
186
+ * without the real transport stack.
188
187
  */
189
188
  sessionNodeFactory?: import("./session-node-manager.js").ISessionNodeFactory;
190
189
  /**
191
- * CELLO-M7-MSG-001 (AC-004/AC-005): park target for the startup flush of un-acked
192
- * content. On startup BEFORE the IPC socket opens the daemon drains retry_queue
193
- * entries still awaiting a `persisted` delivery ACK and re-parks each to the relay
194
- * store-and-forward queue via this function (the crash backstop, D-d). The function
195
- * performs the encrypted relay deposit and is the natural emitter of
196
- * content.park.deposited (it holds the recipient context).
190
+ * Park target for the startup flush of un-acked content. On startup — BEFORE the IPC
191
+ * socket opens — the daemon drains retry_queue entries still awaiting a `persisted`
192
+ * delivery ACK and re-parks each to the relay store-and-forward queue via this function
193
+ * (the crash backstop). The function performs the encrypted relay deposit and is the
194
+ * natural emitter of content.park.deposited (it holds the recipient context).
197
195
  *
198
- * Re-home (Option A): this is supplied by the daemon's OWN send path — the daemon
199
- * owns the session core, so it constructs the relay-deposit function natively (NOT a
200
- * hosted CelloClient / RelayStreamManager). When absent (a daemon started without the
201
- * content send path, or unit tests), the startup flush is a documented no-op
202
- * (content.park.flush.deferred at WARN) and the durable awaiting entries remain queued
203
- * for the next startup that has a park target.
196
+ * It is supplied by the daemon's OWN send path — the daemon owns the session core, so it
197
+ * constructs the relay-deposit function natively (never a hosted CelloClient /
198
+ * RelayStreamManager). When absent (a daemon started without the content send path, or
199
+ * unit tests), the startup flush is a no-op (content.park.flush.deferred at WARN) and the
200
+ * durable awaiting entries remain queued for the next startup that has a park target.
204
201
  */
205
202
  contentParkFn?: import("./retry-queue.js").ParkFn;
206
203
  /**
207
- * CELLO-M7-MSG-001 (AC-001/AC-003): the TTF (time-to-flush) window, in ms, the
208
- * sender waits for a `persisted` delivery ACK before handing un-acked content to the
209
- * park backstop. Default 20_000 (Part-4 proposed 10–30s band). Tests inject a small
210
- * value to drive TTF expiry deterministically.
204
+ * The TTF (time-to-flush) window, in ms, the sender waits for a `persisted` delivery ACK
205
+ * before handing un-acked content to the park backstop. Default 20_000. Tests inject a
206
+ * small value to drive TTF expiry deterministically.
211
207
  */
212
208
  contentTtfMs?: number;
213
209
  /**
214
- * CELLO-M7-TRANSPORT-001: low-level dialer backing the transport selector in
210
+ * Low-level dialer backing the transport selector in
215
211
  * production environments (dev/staging/production). Wraps a CelloNode (direct +
216
212
  * relay circuit dial) and the daemon relay registry. Required for production
217
213
  * CELLO_ENV; for 'local'/'test' the composition root uses an in-process stub.
218
214
  */
219
215
  transportDialer?: TransportDialer;
220
216
  /**
221
- * CELLO-M7-TRANSPORT-001: AutoNAT service adapter backing dialability detection
217
+ * AutoNAT service adapter backing dialability detection
222
218
  * in production environments. Wraps the standing-receiver node's libp2p AutoNAT
223
219
  * observable. For 'local'/'test' the composition root uses a stub (dialable=false).
224
220
  */
225
221
  autoNatService?: IAutoNatService;
226
222
  /**
227
- * CELLO-M7-TRANSPORT-001: directory session negotiation adapter (WIRE-001/
228
- * SIGNAL-001). cello_initiate_session calls negotiate() to obtain the
229
- * FROST-signed SessionAssignment, then drives the transport selector to dial the
230
- * counterparty (AC-005/AC-006/AC-008/AC-010c). When absent, cello_initiate_session
231
- * reports directory_signaling_not_configured — it does NOT crash, proving the
232
- * transport adapters are wired.
223
+ * Directory session negotiation adapter. cello_initiate_session calls negotiate() to
224
+ * obtain the FROST-signed SessionAssignment, then drives the transport selector to dial
225
+ * the counterparty. When absent, cello_initiate_session reports
226
+ * directory_signaling_not_configured it does NOT crash.
233
227
  */
234
228
  sessionNegotiator?: SessionNegotiator;
235
229
  /**
236
- * CELLO-M7-TRANSPORT-001: returns this daemon's relay circuit address (from the
237
- * relay registry populated at directory connection) for the SessionAssignment
238
- * advertised address when the standing receiver is NOT dialable (AC-004). When
239
- * absent, an empty advertised relay address is used (the negotiator supplies the
240
- * real one in production).
230
+ * Returns this daemon's relay circuit address (from the relay registry populated at
231
+ * directory connection) for the SessionAssignment advertised address when the standing
232
+ * receiver is NOT dialable. When absent, an empty advertised relay address is used (the
233
+ * negotiator supplies the real one in production).
241
234
  */
242
235
  getRelayCircuitAddress?: () => string;
243
236
  /**
244
- * M8C-TGDOOR-1: injectable Telegram Bot API client (test override — production uses
245
- * HttpTelegramBotClient, constructed from telegram_settings once configured via
246
- * setTelegramSettings). Absent = TGDOOR is inert (no poller starts) until settings exist.
237
+ * Injectable Telegram Bot API client (test override — production uses HttpTelegramBotClient,
238
+ * constructed from telegram_settings once configured via setTelegramSettings). Absent = the
239
+ * Telegram doorbell is inert (no poller starts) until settings exist.
247
240
  */
248
241
  telegramBotClient?: TelegramBotClient;
249
242
  /**
250
- * M9-CORE-001: the security gateway client. Every outbound message is screened in
251
- * cello_send before sessionNodeManager.sendContent; every inbound message is screened
252
- * in the inbound funnel before it enters the receive buffer. The daemon holds ONLY this
253
- * narrow interface — all detection lives in the separate gateway program. When absent,
254
- * the composition root falls back to a PassthroughGatewayClient (always-allow), so the
255
- * seam still returns a verdict (SI-001) and pre-M9 daemons behave unchanged.
243
+ * The security gateway client. Every outbound message is screened in cello_send before
244
+ * sessionNodeManager.sendContent; every inbound message is screened in the inbound funnel
245
+ * before it enters the receive buffer. The daemon holds ONLY this narrow interface — all
246
+ * detection lives in the separate gateway program. When absent, the composition root falls
247
+ * back to a PassthroughGatewayClient (always-allow), so the seam still returns a verdict.
256
248
  */
257
249
  securityGateway?: SecurityGatewayClient;
258
250
  }
259
251
  /**
260
252
  * Maximum number of concurrent session nodes per daemon.
261
- * Outline.md §Resource Caps, DAEMON-002 AC-006.
262
253
  */
263
254
  export declare const MAX_SESSION_NODES = 32;
264
255
  /**
@@ -270,8 +261,8 @@ export declare const MAX_SESSION_NODES = 32;
270
261
  * - seal_interrupted_pending: both parties have produced and exchanged signed
271
262
  * SEAL-INTERRUPTED leaves (a verified bilateral commitment), but the FROST
272
263
  * threshold notarization has NOT been performed. This is a non-terminal state
273
- * — it is explicitly NOT 'sealed'. See daemon.ts handleSealInterruptedFlow and
274
- * the H-1 audit note for what blocks the threshold seal.
264
+ * — it is explicitly NOT 'sealed'. See daemon.ts handleSealInterruptedFlow for what
265
+ * blocks the threshold seal.
275
266
  * - sealed: a real FROST threshold notarization completed. Only the normal
276
267
  * (non-interrupted) close path produces this today.
277
268
  */
@@ -279,8 +270,8 @@ export type SessionStatus = "active" | "sealed" | "interrupted" | "seal_interrup
279
270
  export interface SessionRecord {
280
271
  session_id: string;
281
272
  /**
282
- * DOD-AGENT-ID-JOINKEY-1: the STABLE key this row is scoped by. Every `sessions` query joins on
283
- * this, never on `agent_name`.
273
+ * The STABLE key this row is scoped by. Every `sessions` query joins on this, never on
274
+ * `agent_name`.
284
275
  */
285
276
  agent_id: string;
286
277
  /**
@@ -294,31 +285,39 @@ export interface SessionRecord {
294
285
  status: SessionStatus;
295
286
  created_at: number;
296
287
  updated_at: number;
297
- /** M7-SESSION-001: leaf count at interruption. 0 if not yet set. */
288
+ /** Leaf count at interruption. 0 if not yet set. */
298
289
  message_count: number;
299
- /** M7-SESSION-001: ISO 8601 timestamp of interruption. Null if not yet set. */
290
+ /** ISO 8601 timestamp of interruption. Null if not yet set. */
300
291
  interrupted_at: string | null;
301
292
  /**
302
- * M7 legibility-TBS-binding: the counterparty's FROST primary (group) pubkey hex, from the
293
+ * The counterparty's FROST primary (group) pubkey hex, from the
303
294
  * SessionAssignment's signer_pubkey. The responder verifies the bilateral seal signature against
304
295
  * it. Null when this party initiated (it verifies against its own primary).
305
296
  */
306
297
  counterparty_primary_pubkey?: string | null;
298
+ /**
299
+ * DOD-SESSION-NAME-1: this agent's own human-readable label for the session. Null when unnamed,
300
+ * and unnamed MEANS something (see the column comment in session-node-manager). Local and
301
+ * cosmetic — it reaches no wire structure.
302
+ */
303
+ session_name?: string | null;
307
304
  }
308
- /** M7-SESSION-001: An interrupted session entry in the cello status response. */
305
+ /** An interrupted session entry in the cello status response. */
309
306
  export interface InterruptedSessionInfo {
310
307
  sessionId: string;
311
308
  agentName: string;
312
309
  counterpartyPubkey: string;
313
310
  messageCount: number;
314
311
  interruptedAt: string;
312
+ /** DOD-SESSION-NAME-1: this agent's own label for the session; null when unnamed. */
313
+ sessionName: string | null;
315
314
  }
316
315
  /**
317
- * cello_list_sessions: one session in the discovery list for the current agent.
316
+ * cello_sessions: one session in the discovery list for the current agent.
318
317
  * Covers every status (active, sealed, interrupted, seal_interrupted_pending) so
319
- * the by-id reads (cello_get_transcript / cello_get_sealed_receipt) have a source
320
- * for their session ids. Timestamps are ISO 8601; interruptedAt is null unless the
321
- * session is/was interrupted.
318
+ * the by-id reads (cello_transcript / cello_sealed_receipt) have a source for their
319
+ * session ids. Timestamps are ISO 8601; interruptedAt is null unless the session
320
+ * is/was interrupted.
322
321
  */
323
322
  export interface SessionListEntry {
324
323
  sessionId: string;
@@ -331,12 +330,20 @@ export interface SessionListEntry {
331
330
  createdAt: string;
332
331
  updatedAt: string;
333
332
  interruptedAt: string | null;
334
- /** MONIKER-5 AC1: the resolved display label (pet name ?? offered ?? fingerprint). */
333
+ /** The resolved display label (pet name ?? offered ?? fingerprint). */
335
334
  who: string;
336
335
  whoKnown: boolean;
336
+ /**
337
+ * DOD-SESSION-NAME-1: this agent's own label for the session, or null when unnamed.
338
+ *
339
+ * Returned ALONGSIDE sessionId, never instead of it — the id is what you paste into the next
340
+ * command. Null is a value with meaning: a session that closed cleanly through an agent usually
341
+ * has a name, so an unnamed closed one is a hint it did not.
342
+ */
343
+ sessionName: string | null;
337
344
  }
338
345
  /**
339
- * Result of a session listing (cello_list_sessions / the daemon-wide `list_sessions`). `sessions`
346
+ * Result of a session listing (cello_sessions / the daemon-wide `list_sessions`). `sessions`
340
347
  * is already filtered + capped at `limit`; `totalMatched` is how many matched the filter before the
341
348
  * cap, so the caller can tell the operator "showing 50 of 312".
342
349
  */
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EACV,iBAAiB,EACjB,qBAAqB,EACrB,sBAAsB,EACtB,2BAA2B,EAC3B,aAAa,EACb,eAAe,EAChB,MAAM,2BAA2B,CAAC;AACnC,OAAO,KAAK,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAClF,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAGrE,YAAY,EAAE,qBAAqB,EAAE,CAAC;AAGtC,YAAY,EACV,iBAAiB,EACjB,qBAAqB,EACrB,sBAAsB,EACtB,2BAA2B,GAC5B,CAAC;AAGF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAChE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAIlE,MAAM,WAAW,MAAM;IACrB,KAAK,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;IAC7D,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;IAC5D,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;IAC5D,KAAK,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,M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dist/types.js CHANGED
@@ -15,7 +15,6 @@ export const STANDING_RECEIVER_AGENT_NAME = "__standing_receiver__";
15
15
  // --- Session node types ---
16
16
  /**
17
17
  * Maximum number of concurrent session nodes per daemon.
18
- * Outline.md §Resource Caps, DAEMON-002 AC-006.
19
18
  */
20
19
  export const MAX_SESSION_NODES = 32;
21
20
  // --- Error codes ---
package/dist/types.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AA8EH,gCAAgC;AAEhC;;;;GAIG;AACH,MAAM,CAAC,MAAM,4BAA4B,GAAG,uBAAgC,CAAC;AAkO7E,6BAA6B;AAE7B;;;GAGG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,EAAE,CAAC;AAqGpC,sBAAsB;AAEtB,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB,yBAAyB,EAAE,2BAA2B;IACtD,yBAAyB,EAAE,2BAA2B;IACtD,iBAAiB,EAAE,mBAAmB;IACtC,oBAAoB,EAAE,sBAAsB;IAC5C,6BAA6B,EAAE,+BAA+B;IAC9D,8BAA8B,EAAE,gCAAgC;IAChE,oBAAoB,EAAE,sBAAsB;IAC5C,4BAA4B,EAAE,8BAA8B;IAC5D,6BAA6B,EAAE,+BAA+B;CACtD,CAAC"}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AA8EH,gCAAgC;AAEhC;;;;GAIG;AACH,MAAM,CAAC,MAAM,4BAA4B,GAAG,uBAAgC,CAAC;AAyN7E,6BAA6B;AAE7B;;GAEG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,EAAE,CAAC;AAqHpC,sBAAsB;AAEtB,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB,yBAAyB,EAAE,2BAA2B;IACtD,yBAAyB,EAAE,2BAA2B;IACtD,iBAAiB,EAAE,mBAAmB;IACtC,oBAAoB,EAAE,sBAAsB;IAC5C,6BAA6B,EAAE,+BAA+B;IAC9D,8BAA8B,EAAE,gCAAgC;IAChE,oBAAoB,EAAE,sBAAsB;IAC5C,4BAA4B,EAAE,8BAA8B;IAC5D,6BAA6B,EAAE,+BAA+B;CACtD,CAAC"}
@@ -1,12 +1,12 @@
1
1
  /**
2
- * DOD-ONBOARD-HELP-1 §2b — the ONE vocabulary.
2
+ * The ONE vocabulary.
3
3
  *
4
4
  * A capability has exactly one name, and that name renders differently on each surface:
5
5
  *
6
6
  * capability "agents" → MCP tool `cello_agents` · CLI command `cello agents`
7
7
  *
8
- * The rule (Andre, 2026-07-11): **an MCP tool's name is `cello_` + the CLI command name**,
9
- * snake_cased, keeping any sub-verb. Humans and agents learn a capability ONCE.
8
+ * The rule: **an MCP tool's name is `cello_` + the CLI command name**, snake_cased, keeping any
9
+ * sub-verb. Humans and agents learn a capability ONCE.
10
10
  *
11
11
  * Why this table exists rather than three lists of string literals:
12
12
  *
@@ -42,9 +42,9 @@ export interface DualSurfaceVerb {
42
42
  */
43
43
  export declare const DUAL_SURFACE_VERBS: readonly DualSurfaceVerb[];
44
44
  /**
45
- * Tools that exist ONLY on the MCP surface. They are the DOD-CUSTODY-DAEMON-1 stubs — the daemon
46
- * handlers return `not_implemented`, so there is deliberately no CLI command to build a second
47
- * broken path to. Listed so the audit test can tell "known MCP-only" from "stale name".
45
+ * Tools that exist ONLY on the MCP surface. Their daemon handlers return `not_implemented`, so
46
+ * there is deliberately no CLI command to build a second broken path to. Listed so the audit test
47
+ * can tell "known MCP-only" from "stale name".
48
48
  */
49
49
  export declare const MCP_ONLY_TOOLS: readonly string[];
50
50
  /**
@@ -59,27 +59,22 @@ export declare const NON_TOOL_IDENTIFIERS: readonly string[];
59
59
  /** Every `cello_*` token the daemon is ALLOWED to name in guidance. Anything else is a bug. */
60
60
  export declare function knownToolNames(): ReadonlySet<string>;
61
61
  /**
62
- * CLI verbs that NO LONGER EXIST (DOD-ONBOARD-HELP-1 §2, clean renames no aliases).
62
+ * CLI verbs that DO NOT EXIST. No string anywhere may hand one of these to an operator.
63
63
  *
64
- * Why this list exists as well as the tool audit: the tool audit matches `cello_*` tokens, so it is
65
- * structurally BLIND to a dead *CLI* verb — `cello register` is just prose to it. That blindness is
66
- * exactly how three dead-command instructions survived a green build in the first cut of this story
67
- * (the missing-token onboarding error, an unregistered-agent warning, and relay-receipts' own usage
68
- * line all still said `cello register` / `cello receipts`). A user handed a command that does not
69
- * dispatch is worse off than one handed nothing.
64
+ * This list is needed IN ADDITION to the tool audit: that audit matches `cello_*` tokens, so it is
65
+ * structurally BLIND to a dead *CLI* verb — `cello register` is just prose to it. A user handed a
66
+ * command that does not dispatch is worse off than one handed nothing.
70
67
  *
71
- * Anchoring is by NEGATIVE LOOKAHEAD, not a trailing space — see deadCliVerbPattern() for why the
72
- * space failed.
68
+ * Anchoring is by NEGATIVE LOOKAHEAD, not a trailing space — see deadCliVerbPattern().
73
69
  */
74
70
  export declare const DEAD_CLI_VERBS: readonly string[];
75
71
  /**
76
72
  * Match any dead CLI verb, wherever it is SPOKEN — the one regex both audits share.
77
73
  *
78
- * The negative lookahead `(?![-\w])` is what makes this work, and the first cut got it wrong: it
79
- * anchored on a trailing SPACE (`"cello register "`), which review broke immediately a verb
80
- * followed by a quote, period, backtick, paren or comma slipped straight through, and a live string
81
- * (`'cello register'`, in the Hermes plugin scaffolded onto the operator's disk) was sailing past a
82
- * green audit. An audit defeated by a full stop is not an audit.
74
+ * The negative lookahead `(?![-\w])` is load-bearing; do NOT weaken it to a trailing SPACE. A verb
75
+ * followed by a quote, period, backtick, paren or comma would slip straight through, and dead verbs
76
+ * appear inside quotes and at end of sentence in real guidance strings. An audit defeated by a full
77
+ * stop is not an audit.
83
78
  *
84
79
  * The lookahead still lets the LIVE commands through, because each dead verb is a strict prefix of
85
80
  * its replacement: `cello register-agent`, `cello close-session`, `cello initiate-session` all have
@@ -87,7 +82,7 @@ export declare const DEAD_CLI_VERBS: readonly string[];
87
82
  */
88
83
  export declare function deadCliVerbPattern(): RegExp;
89
84
  /**
90
- * MCP tool names this story RENAMED AWAY. Nothing may hand one of these to an agent again.
85
+ * MCP tool names that DO NOT EXIST. Nothing may hand one of these to an agent.
91
86
  *
92
87
  * Distinct from `knownToolNames()` (an allowlist: "every cello_* token must be in the table"). That
93
88
  * allowlist works inside the daemon, where every `cello_*` token IS a tool name — but it cannot be
@@ -96,12 +91,18 @@ export declare function deadCliVerbPattern(): RegExp;
96
91
  * assets, plain config identifiers (`cello_socket_path`, `cello_dir`). An allowlist there would
97
92
  * either drown in false positives or be so riddled with exceptions it stopped meaning anything.
98
93
  *
99
- * So outside the daemon we assert the DENYLIST instead: whatever else a string says, it must not
100
- * name a tool we deleted. That is precisely the regression that shipped the Hermes `platform_hint`
101
- * told the operator's agent to call `cello_check_notifications` and `cello_list_sessions` after both
102
- * had ceased to exist.
94
+ * So outside the daemon assert the DENYLIST instead: whatever else a string says, it must not name a
95
+ * deleted tool. The exposure is real non-code assets ship to the operator's disk and instruct
96
+ * their agent (the Hermes `platform_hint` is a live example).
103
97
  */
104
98
  export declare const RENAMED_AWAY_TOOLS: readonly string[];
99
+ /**
100
+ * Rewrite MCP tool names in a guidance string into the CLI verbs an operator would type.
101
+ *
102
+ * Only `cello_*` tokens in DUAL_SURFACE_VERBS are rewritten. An MCP-only tool has no CLI verb to
103
+ * offer, so it is left alone — inventing one would send the operator to a command that does not
104
+ * exist, which is the exact failure this whole mechanism prevents.
105
+ */
105
106
  export declare function toCliGuidance(text: string): string;
106
107
  /** The client surfaces the daemon renders guidance for. Recorded per connection at `ipc.connect`. */
107
108
  export type ClientSurface = "cli" | "mcp";
@@ -112,11 +113,10 @@ export type ClientSurface = "cli" | "mcp";
112
113
  * cannot forget it and a new guidance string cannot drift. MCP callers get the response verbatim —
113
114
  * the source strings already hold the canonical MCP names.
114
115
  *
115
- * RECURSES into nested objects and arrays. The first cut only rewrote a TOP-LEVEL `guidance`, which
116
- * left real instructions per-surface-wrong: `cello inbox`'s rename notices live at
117
- * `agents[i].rename_notices[j].notice` and told a CLI operator to call `cello_contact_set_moniker`
118
- * with JSON arguments a thing they cannot type. A choke point that only covers the easy shape is
119
- * not a choke point; it just moves the leak somewhere less visible.
116
+ * MUST RECURSE into nested objects and arrays; rewriting only a TOP-LEVEL `guidance` is not enough.
117
+ * Real instructions live deep — `cello inbox`'s rename notices sit at
118
+ * `agents[i].rename_notices[j].notice`. A choke point that only covers the easy shape is not a choke
119
+ * point; it just moves the leak somewhere less visible.
120
120
  */
121
121
  export declare function renderForSurface(result: unknown, surface: ClientSurface): unknown;
122
122
  //# sourceMappingURL=vocabulary.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"vocabulary.d.ts","sourceRoot":"","sources":["../src/vocabulary.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH,oGAAoG;AACpG,MAAM,WAAW,eAAe;IAC9B,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;CACb;AAED;;;;;;GAMG;AACH,eAAO,MAAM,kBAAkB,EAAE,SAAS,eAAe,EA6BxD,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,cAAc,EAAE,SAAS,MAAM,EAI3C,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,oBAAoB,EAAE,SAAS,MAAM,EAAsB,CAAC;AAEzE,+FAA+F;AAC/F,wBAAgB,cAAc,IAAI,WAAW,CAAC,MAAM,CAAC,CAMpD;AAED;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,cAAc,EAAE,SAAS,MAAM,EAU3C,CAAC;AASF;;;;;;;;;;;;GAYG;AACH,wBAAgB,kBAAkB,IAAI,MAAM,CAI3C;AAED;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,kBAAkB,EAAE,SAAS,MAAM,EAY/C,CAAC;AAqCF,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,MAA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