@cello-protocol/daemon 0.0.52 → 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.
- package/dist/agent-handlers.d.ts +57 -0
- package/dist/agent-handlers.d.ts.map +1 -0
- package/dist/agent-handlers.js +360 -0
- package/dist/agent-handlers.js.map +1 -0
- package/dist/agent-id-migration.d.ts.map +1 -1
- package/dist/agent-id-migration.js +1 -0
- package/dist/agent-id-migration.js.map +1 -1
- package/dist/agent-loader.d.ts +3 -4
- package/dist/agent-loader.d.ts.map +1 -1
- package/dist/agent-loader.js +3 -4
- package/dist/agent-loader.js.map +1 -1
- package/dist/cbor-blob-migration.d.ts +8 -0
- package/dist/cbor-blob-migration.d.ts.map +1 -0
- package/dist/cbor-blob-migration.js +115 -0
- package/dist/cbor-blob-migration.js.map +1 -0
- package/dist/close-session-handler.d.ts +41 -0
- package/dist/close-session-handler.d.ts.map +1 -0
- package/dist/close-session-handler.js +399 -0
- package/dist/close-session-handler.js.map +1 -0
- package/dist/consortium-bootstrap.d.ts +83 -0
- package/dist/consortium-bootstrap.d.ts.map +1 -0
- package/dist/consortium-bootstrap.js +120 -0
- package/dist/consortium-bootstrap.js.map +1 -0
- package/dist/contact-handlers.d.ts +56 -0
- package/dist/contact-handlers.d.ts.map +1 -0
- package/dist/contact-handlers.js +303 -0
- package/dist/contact-handlers.js.map +1 -0
- package/dist/content-park-client.d.ts.map +1 -1
- package/dist/content-park-client.js +7 -7
- package/dist/content-park-client.js.map +1 -1
- package/dist/content-park.d.ts +15 -0
- package/dist/content-park.d.ts.map +1 -0
- package/dist/content-park.js +227 -0
- package/dist/content-park.js.map +1 -0
- package/dist/daemon.d.ts +0 -11
- package/dist/daemon.d.ts.map +1 -1
- package/dist/daemon.js +407 -4552
- package/dist/daemon.js.map +1 -1
- package/dist/db-identity-store.d.ts +31 -35
- package/dist/db-identity-store.d.ts.map +1 -1
- package/dist/db-identity-store.js +62 -66
- package/dist/db-identity-store.js.map +1 -1
- package/dist/directory-bootstrap.d.ts +27 -31
- package/dist/directory-bootstrap.d.ts.map +1 -1
- package/dist/directory-bootstrap.js +18 -21
- package/dist/directory-bootstrap.js.map +1 -1
- package/dist/frame-values.d.ts +3 -0
- package/dist/frame-values.d.ts.map +1 -0
- package/dist/frame-values.js +73 -0
- package/dist/frame-values.js.map +1 -0
- package/dist/identity-migration.d.ts +8 -8
- package/dist/identity-migration.d.ts.map +1 -1
- package/dist/identity-migration.js +30 -31
- package/dist/identity-migration.js.map +1 -1
- package/dist/inbound-seal-request.d.ts +17 -0
- package/dist/inbound-seal-request.d.ts.map +1 -0
- package/dist/inbound-seal-request.js +155 -0
- package/dist/inbound-seal-request.js.map +1 -0
- package/dist/inbound-sessions.d.ts +54 -0
- package/dist/inbound-sessions.d.ts.map +1 -0
- package/dist/inbound-sessions.js +603 -0
- package/dist/inbound-sessions.js.map +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8 -10
- package/dist/index.js.map +1 -1
- package/dist/initiate-session-handler.d.ts +22 -0
- package/dist/initiate-session-handler.d.ts.map +1 -0
- package/dist/initiate-session-handler.js +150 -0
- package/dist/initiate-session-handler.js.map +1 -0
- package/dist/network-directory-node.d.ts +6 -6
- package/dist/network-directory-node.d.ts.map +1 -1
- package/dist/network-directory-node.js +29 -28
- package/dist/network-directory-node.js.map +1 -1
- package/dist/notification-handlers.d.ts +32 -0
- package/dist/notification-handlers.d.ts.map +1 -0
- package/dist/notification-handlers.js +73 -0
- package/dist/notification-handlers.js.map +1 -0
- package/dist/outbound-sessions.d.ts +54 -0
- package/dist/outbound-sessions.d.ts.map +1 -0
- package/dist/outbound-sessions.js +429 -0
- package/dist/outbound-sessions.js.map +1 -0
- package/dist/park-envelope.d.ts.map +1 -1
- package/dist/park-envelope.js +3 -2
- package/dist/park-envelope.js.map +1 -1
- package/dist/register-handler.d.ts +35 -0
- package/dist/register-handler.d.ts.map +1 -0
- package/dist/register-handler.js +179 -0
- package/dist/register-handler.js.map +1 -0
- package/dist/registration-manager.d.ts.map +1 -1
- package/dist/registration-manager.js +3 -6
- package/dist/registration-manager.js.map +1 -1
- package/dist/relay-receipt-store.d.ts.map +1 -1
- package/dist/relay-receipt-store.js +1 -2
- package/dist/relay-receipt-store.js.map +1 -1
- package/dist/retry-queue.d.ts +18 -60
- package/dist/retry-queue.d.ts.map +1 -1
- package/dist/retry-queue.js +46 -97
- package/dist/retry-queue.js.map +1 -1
- package/dist/seal-coordinator.d.ts +47 -0
- package/dist/seal-coordinator.d.ts.map +1 -0
- package/dist/seal-coordinator.js +551 -0
- package/dist/seal-coordinator.js.map +1 -0
- package/dist/seal-flows.d.ts +50 -0
- package/dist/seal-flows.d.ts.map +1 -0
- package/dist/seal-flows.js +454 -0
- package/dist/seal-flows.js.map +1 -0
- package/dist/seal-frontier-verify.d.ts +9 -9
- package/dist/seal-frontier-verify.d.ts.map +1 -1
- package/dist/seal-frontier-verify.js +11 -12
- package/dist/seal-frontier-verify.js.map +1 -1
- package/dist/seal-leaf.d.ts +58 -0
- package/dist/seal-leaf.d.ts.map +1 -0
- package/dist/seal-leaf.js +111 -0
- package/dist/seal-leaf.js.map +1 -0
- package/dist/seal-receipt-upgrade.d.ts +1 -1
- package/dist/seal-receipt-upgrade.js +1 -1
- package/dist/seal-upgrade.d.ts +10 -10
- package/dist/seal-upgrade.d.ts.map +1 -1
- package/dist/seal-upgrade.js +23 -24
- package/dist/seal-upgrade.js.map +1 -1
- package/dist/session-assignment-parser.d.ts +16 -19
- package/dist/session-assignment-parser.d.ts.map +1 -1
- package/dist/session-assignment-parser.js +30 -29
- package/dist/session-assignment-parser.js.map +1 -1
- package/dist/session-ceremony.d.ts +3 -6
- package/dist/session-ceremony.d.ts.map +1 -1
- package/dist/session-ceremony.js +7 -9
- package/dist/session-ceremony.js.map +1 -1
- package/dist/session-content-handlers.d.ts +25 -0
- package/dist/session-content-handlers.d.ts.map +1 -0
- package/dist/session-content-handlers.js +436 -0
- package/dist/session-content-handlers.js.map +1 -0
- package/dist/session-name.d.ts +35 -0
- package/dist/session-name.d.ts.map +1 -0
- package/dist/session-name.js +60 -0
- package/dist/session-name.js.map +1 -0
- package/dist/session-node-manager.d.ts +26 -62
- package/dist/session-node-manager.d.ts.map +1 -1
- package/dist/session-node-manager.js +115 -92
- package/dist/session-node-manager.js.map +1 -1
- package/dist/session-read-handlers.d.ts +38 -0
- package/dist/session-read-handlers.d.ts.map +1 -0
- package/dist/session-read-handlers.js +233 -0
- package/dist/session-read-handlers.js.map +1 -0
- package/dist/session-relay-client.d.ts +8 -8
- package/dist/session-relay-client.d.ts.map +1 -1
- package/dist/session-relay-client.js +44 -46
- package/dist/session-relay-client.js.map +1 -1
- package/dist/session-tree.d.ts +11 -23
- package/dist/session-tree.d.ts.map +1 -1
- package/dist/session-tree.js +14 -26
- package/dist/session-tree.js.map +1 -1
- package/dist/signaling-connect.d.ts +2 -5
- package/dist/signaling-connect.d.ts.map +1 -1
- package/dist/signaling-connect.js +7 -12
- package/dist/signaling-connect.js.map +1 -1
- package/dist/sqlcipher-db.d.ts +18 -19
- package/dist/sqlcipher-db.d.ts.map +1 -1
- package/dist/sqlcipher-db.js +30 -30
- package/dist/sqlcipher-db.js.map +1 -1
- package/dist/telegram-doorbell.d.ts +38 -0
- package/dist/telegram-doorbell.d.ts.map +1 -0
- package/dist/telegram-doorbell.js +139 -0
- package/dist/telegram-doorbell.js.map +1 -0
- package/dist/types.d.ts +86 -79
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +0 -1
- package/dist/types.js.map +1 -1
- package/dist/vocabulary.d.ts +30 -30
- package/dist/vocabulary.d.ts.map +1 -1
- package/dist/vocabulary.js +41 -49
- package/dist/vocabulary.js.map +1 -1
- 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
|
-
*
|
|
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
|
-
*
|
|
69
|
-
*
|
|
70
|
-
*
|
|
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
|
|
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.
|
|
92
|
+
* Always present as integer >= 0.
|
|
94
93
|
*/
|
|
95
94
|
retryQueueDepth: number;
|
|
96
95
|
/**
|
|
97
|
-
*
|
|
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
|
-
*
|
|
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
|
-
/**
|
|
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
|
-
*
|
|
125
|
+
* Manifest loading and verification.
|
|
125
126
|
* When provided, startDaemon() calls manifestProvider.loadAndVerify() at startup.
|
|
126
|
-
* When absent, manifest loading is skipped
|
|
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
|
-
*
|
|
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
|
-
*
|
|
140
|
+
* Officer threshold for manifest signature verification.
|
|
140
141
|
* Required when manifestProvider is provided.
|
|
141
142
|
*/
|
|
142
143
|
manifestThreshold?: number;
|
|
143
144
|
/**
|
|
144
|
-
*
|
|
145
|
+
* Version store for monotonicity enforcement.
|
|
145
146
|
* When absent, monotonicity check is skipped.
|
|
146
147
|
*/
|
|
147
148
|
manifestVersionStore?: IManifestVersionStore;
|
|
148
149
|
/**
|
|
149
|
-
*
|
|
150
|
+
* Poll scheduler for background manifest refresh.
|
|
150
151
|
* When absent, polling is disabled.
|
|
151
152
|
*/
|
|
152
153
|
manifestPollScheduler?: IManifestPollScheduler;
|
|
153
154
|
/**
|
|
154
|
-
*
|
|
155
|
-
*
|
|
156
|
-
* 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
|
-
*
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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
|
|
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
|
-
*
|
|
192
|
-
*
|
|
193
|
-
*
|
|
194
|
-
*
|
|
195
|
-
*
|
|
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
|
-
*
|
|
199
|
-
*
|
|
200
|
-
*
|
|
201
|
-
*
|
|
202
|
-
*
|
|
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
|
-
*
|
|
208
|
-
*
|
|
209
|
-
*
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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
|
-
*
|
|
228
|
-
*
|
|
229
|
-
*
|
|
230
|
-
*
|
|
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
|
-
*
|
|
237
|
-
*
|
|
238
|
-
*
|
|
239
|
-
*
|
|
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
|
-
*
|
|
245
|
-
*
|
|
246
|
-
*
|
|
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
|
-
*
|
|
251
|
-
*
|
|
252
|
-
*
|
|
253
|
-
*
|
|
254
|
-
*
|
|
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
|
|
274
|
-
*
|
|
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
|
-
*
|
|
283
|
-
*
|
|
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
|
-
/**
|
|
288
|
+
/** Leaf count at interruption. 0 if not yet set. */
|
|
298
289
|
message_count: number;
|
|
299
|
-
/**
|
|
290
|
+
/** ISO 8601 timestamp of interruption. Null if not yet set. */
|
|
300
291
|
interrupted_at: string | null;
|
|
301
292
|
/**
|
|
302
|
-
*
|
|
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
|
-
/**
|
|
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
|
-
*
|
|
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 (
|
|
320
|
-
*
|
|
321
|
-
*
|
|
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
|
-
/**
|
|
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 (
|
|
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
|
*/
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceR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EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,MAAM,CAAC;IACtB,qFAAqF;IACrF,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5B;AAED;;;;;;GAMG;AACH,MAAM,WAAW,gBAAgB;IAC/B,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,MAAM,EAAE,aAAa,CAAC;IACtB,yFAAyF;IACzF,QAAQ,EAAE,MAAM,GAAG,QAAQ,GAAG,QAAQ,CAAC;IACvC,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,uEAAuE;IACvE,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,EAAE,OAAO,CAAC;IAClB;;;;;;OAMG;IACH,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5B;AAED;;;;GAIG;AACH,MAAM,WAAW,mBAAmB;IAClC,EAAE,EAAE,IAAI,CAAC;IACT,MAAM,EAAE,MAAM,GAAG,QAAQ,GAAG,QAAQ,GAAG,KAAK,CAAC;IAC7C,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,gBAAgB,EAAE,CAAC;CAC9B;AAID,eAAO,MAAM,UAAU;;;;;;;;;;CAUb,CAAC"}
|
package/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;
|
|
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"}
|
package/dist/vocabulary.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
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
|
|
9
|
-
*
|
|
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.
|
|
46
|
-
*
|
|
47
|
-
*
|
|
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
|
|
62
|
+
* CLI verbs that DO NOT EXIST. No string anywhere may hand one of these to an operator.
|
|
63
63
|
*
|
|
64
|
-
*
|
|
65
|
-
* structurally BLIND to a dead *CLI* verb — `cello register` is just prose to it.
|
|
66
|
-
*
|
|
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()
|
|
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
|
|
79
|
-
*
|
|
80
|
-
*
|
|
81
|
-
*
|
|
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
|
|
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
|
|
100
|
-
*
|
|
101
|
-
*
|
|
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
|
-
*
|
|
116
|
-
*
|
|
117
|
-
* `agents[i].rename_notices[j].notice
|
|
118
|
-
*
|
|
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
|
package/dist/vocabulary.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vocabulary.d.ts","sourceRoot":"","sources":["../src/vocabulary.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG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