@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.
- 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
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Agent lifecycle: create, remove, start, stop, select, list.
|
|
3
|
+
*
|
|
4
|
+
* The one rule that governs all of them: an agent's identity is its KEY, not its name. A name is a
|
|
5
|
+
* mutable display label that can be reused after retirement, so nothing here may treat a name as
|
|
6
|
+
* proof of who someone is — cello_remove_agent submits a signed revocation precisely because
|
|
7
|
+
* deleting a row locally would leave the directory believing the key is still live.
|
|
8
|
+
*
|
|
9
|
+
* cello_use_agent is the selector, and its failure mode is the interesting one: after a stop, the
|
|
10
|
+
* connection's selection is CLEARED, and a cleared selection must NEVER silently fall back to
|
|
11
|
+
* "the only agent online" — that is how a write lands on the wrong agent (fixed in f00b534, and
|
|
12
|
+
* the reason resolveCurrentAgent distinguishes "never chose" from "choice taken away").
|
|
13
|
+
*/
|
|
14
|
+
import type { IpcHandler } from "./ipc-server.js";
|
|
15
|
+
import type { SessionNodeManager } from "./session-node-manager.js";
|
|
16
|
+
import type { AgentInfo, Logger } from "./types.js";
|
|
17
|
+
import type { ConnState } from "./contact-handlers.js";
|
|
18
|
+
import type { NotificationDispatcher } from "./notification-dispatcher.js";
|
|
19
|
+
import type { LoadedAgent } from "./agent-loader.js";
|
|
20
|
+
import type { KeyProvider } from "@cello-protocol/crypto";
|
|
21
|
+
import type { SignalingManager, CelloNode } from "@cello-protocol/transport";
|
|
22
|
+
export interface AgentHandlerDeps {
|
|
23
|
+
handlers: Map<string, IpcHandler>;
|
|
24
|
+
logger: Logger;
|
|
25
|
+
sessionNodeManager: SessionNodeManager;
|
|
26
|
+
agents: AgentInfo[];
|
|
27
|
+
onlineAgents: Set<string>;
|
|
28
|
+
/** LAZY: the dispatcher is constructed late in startDaemon. These handlers only touch it at
|
|
29
|
+
* request time, so a getter avoids a temporal-dead-zone crash at registration. */
|
|
30
|
+
getNotificationDispatcher: () => NotificationDispatcher;
|
|
31
|
+
getConnState: (connectionId: string) => ConnState | undefined;
|
|
32
|
+
perConnectionState: Map<string, {
|
|
33
|
+
currentAgent: string | null;
|
|
34
|
+
clearedAgent?: string;
|
|
35
|
+
clientType: string;
|
|
36
|
+
}>;
|
|
37
|
+
getAgentsForConnection: (connectionId: string) => AgentInfo[];
|
|
38
|
+
startAgentInternal: (name: string) => {
|
|
39
|
+
ok: true;
|
|
40
|
+
} | {
|
|
41
|
+
ok: false;
|
|
42
|
+
reason: string;
|
|
43
|
+
guidance: string;
|
|
44
|
+
};
|
|
45
|
+
dropAgentSignaling: (agentName: string) => Promise<void>;
|
|
46
|
+
awayAckSent: Set<string>;
|
|
47
|
+
keyProviders: Map<string, KeyProvider>;
|
|
48
|
+
loadedAgents: LoadedAgent[];
|
|
49
|
+
getAgentSignaling: (agentName: string, keyProvider: KeyProvider, pubkeyHex: string) => {
|
|
50
|
+
signaling: SignalingManager;
|
|
51
|
+
getNode: () => CelloNode | null;
|
|
52
|
+
};
|
|
53
|
+
waitForSignalingConnected: (mgr: SignalingManager, timeoutMs: number) => Promise<boolean>;
|
|
54
|
+
perAgentSignaling: Map<string, unknown>;
|
|
55
|
+
}
|
|
56
|
+
export declare function registerAgentHandlers(deps: AgentHandlerDeps): void;
|
|
57
|
+
//# sourceMappingURL=agent-handlers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent-handlers.d.ts","sourceRoot":"","sources":["../src/agent-handlers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AACpD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AAG3E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,KAAK,EAAE,gBAAgB,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC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BAAyB,EAAE,CAAC,GAAG,EAAE,gBAAgB,EAAE,SAAS,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;IAC1F,iBAAiB,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACzC;AAED,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,gBAAgB,GAAG,IAAI,CA8WlE"}
|
|
@@ -0,0 +1,360 @@
|
|
|
1
|
+
import { MONIKER_RE, validateMoniker, buildAgentRevocationTbs } from "@cello-protocol/protocol-types";
|
|
2
|
+
import { DbIdentityStore, DbRegistrationPersistence } from "./db-identity-store.js";
|
|
3
|
+
import { generateKLocalSeed, InMemoryKeyProvider } from "@cello-protocol/crypto";
|
|
4
|
+
export function registerAgentHandlers(deps) {
|
|
5
|
+
const { handlers, logger, sessionNodeManager, agents, onlineAgents, getNotificationDispatcher, getConnState, perConnectionState, getAgentsForConnection, startAgentInternal, dropAgentSignaling, awayAckSent, keyProviders, loadedAgents, getAgentSignaling, waitForSignalingConnected, perAgentSignaling, } = deps;
|
|
6
|
+
// ─── MCP-001: cello_start_agent handler ───
|
|
7
|
+
// Bring a registered agent online WITHOUT claiming it as this connection's current agent.
|
|
8
|
+
handlers.set("cello_start_agent", async (params, _connectionId) => {
|
|
9
|
+
const name = params?.name;
|
|
10
|
+
if (!name) {
|
|
11
|
+
return { ok: false, reason: "missing_params", guidance: "Provide 'name' parameter with the agent name to start." };
|
|
12
|
+
}
|
|
13
|
+
return startAgentInternal(name);
|
|
14
|
+
});
|
|
15
|
+
// ─── PERSIST-002 (AC-004): cello_create_agent handler ───
|
|
16
|
+
// The explicit agent-creation path: generate a fresh K_local seed, write it as an `agents` row in
|
|
17
|
+
// the encrypted DB (NO key file), and wire the agent into the live daemon so it can be registered
|
|
18
|
+
// and used WITHOUT a restart. Creation is explicit — cello_start_agent never auto-creates on a typo.
|
|
19
|
+
handlers.set("cello_create_agent", async (params, _connectionId) => {
|
|
20
|
+
const name = validateMoniker(params?.name);
|
|
21
|
+
if (name === null) {
|
|
22
|
+
return { ok: false, reason: "invalid_agent_name", guidance: `Provide a 'name' (1-64 chars: letters, digits, '-' or '_'; regex ${MONIKER_RE.source}) for the new agent.` };
|
|
23
|
+
}
|
|
24
|
+
const store = new DbIdentityStore(sessionNodeManager.getDb(), logger);
|
|
25
|
+
if (store.hasActiveAgent(name) || agents.some((a) => a.name === name)) {
|
|
26
|
+
return { ok: false, reason: "agent_already_exists", guidance: `Agent '${name}' already exists. Choose a different name, or see cello_agents.` };
|
|
27
|
+
}
|
|
28
|
+
let pubkeyHex;
|
|
29
|
+
let agentId;
|
|
30
|
+
try {
|
|
31
|
+
const seed = generateKLocalSeed();
|
|
32
|
+
const keyProvider = new InMemoryKeyProvider(seed);
|
|
33
|
+
pubkeyHex = Buffer.from(await keyProvider.getPublicKey()).toString("hex");
|
|
34
|
+
// SI-001: createAgent stores the seed in the encrypted DB and logs only the pubkey + agent_id.
|
|
35
|
+
agentId = store.createAgent(name, seed, pubkeyHex);
|
|
36
|
+
// Runtime-add: make the agent immediately registrable/usable (the register handler resolves
|
|
37
|
+
// identity from keyProviders/loadedAgents; per-agent signaling is created lazily on register).
|
|
38
|
+
keyProviders.set(name, keyProvider);
|
|
39
|
+
const loaded = { name, pubkey: pubkeyHex, keyProvider };
|
|
40
|
+
loadedAgents.push(loaded);
|
|
41
|
+
agents.push({ name, state: "registered", pubkey: pubkeyHex });
|
|
42
|
+
// CELLO-M7-CONN-001 (DOD-CONN-1, supersedes ONBOARD-001 keystone election): on a fresh install
|
|
43
|
+
// the daemon started with zero agents, so there were no directory connections. Bring up THIS
|
|
44
|
+
// agent's OWN directory connection now (production: getAgentSignaling creates + connects a
|
|
45
|
+
// dedicated manager authenticated as this agent; the directory door becomes active with no
|
|
46
|
+
// restart). There is no shared keystone to elect into. In the test path getAgentSignaling returns
|
|
47
|
+
// the already-present shared manager (no-op).
|
|
48
|
+
getAgentSignaling(name, keyProvider, pubkeyHex);
|
|
49
|
+
// "initiated" not "established": getAgentSignaling starts the connection but does not await it
|
|
50
|
+
// (the SignalingManager emits directory.signaling.connected when it actually authenticates).
|
|
51
|
+
logger.info("agent.directory.connection.initiated", { agentName: name, agentPubkey: pubkeyHex });
|
|
52
|
+
}
|
|
53
|
+
catch (err) {
|
|
54
|
+
logger.error("persist.identity.persist.failed", { agentName: name, error: err instanceof Error ? err.message : String(err) });
|
|
55
|
+
return { ok: false, reason: "agent_create_failed", guidance: "Could not create the agent. Check the daemon log and that the CELLO directory is writable, then retry." };
|
|
56
|
+
}
|
|
57
|
+
// Creation is not an online/offline transition — the agent appears (cello_list_agents) but is
|
|
58
|
+
// not online until cello_start_agent. Just record it.
|
|
59
|
+
logger.info("agent.created", { agentName: name, agentId, agentPubkey: pubkeyHex });
|
|
60
|
+
return { ok: true, name, pubkey: pubkeyHex, agentId };
|
|
61
|
+
});
|
|
62
|
+
// ─── CELLO-M7-REMOVE-001 (DOD-REMOVE-1): cello_remove_agent handler ───
|
|
63
|
+
// RETIRE-AND-KEEP: flip the agent's local row to state='retired' (its row, keys, and history are
|
|
64
|
+
// KEPT for accountability — never hard-deleted, SI-002) and FREE the human name for reuse. Purge the
|
|
65
|
+
// retired identity from the live runtime so it stops operating and the name is immediately available
|
|
66
|
+
// to a NEW `cello_create_agent`. One-way. (DEC-4: the signed DIRECTORY revocation is DOD-REMOVE-2 —
|
|
67
|
+
// not built here; this unit is the local record shape only.)
|
|
68
|
+
// CELLO-M7-REMOVE-001 (DOD-REMOVE-2): build + self-sign an agent revocation and submit it to the
|
|
69
|
+
// directory on the agent's K_local-authenticated signaling stream. Self-authorized — the directory
|
|
70
|
+
// verifies the signature against the agent's registered K_local before appending. Best-effort: returns
|
|
71
|
+
// { recorded:false, reason } if the directory is unreachable / rejects (DB-001 — the caller still
|
|
72
|
+
// applies the one-way local retire and surfaces a distinct status).
|
|
73
|
+
async function submitAgentRevocation(opts) {
|
|
74
|
+
const { agentName, signer, kLocalPubkeyHex, regAgentId } = opts;
|
|
75
|
+
const epochId = "";
|
|
76
|
+
const reason = "voluntary";
|
|
77
|
+
const revokedAt = Date.now();
|
|
78
|
+
const tbs = buildAgentRevocationTbs(regAgentId, kLocalPubkeyHex, epochId, reason, revokedAt);
|
|
79
|
+
const sigHex = Buffer.from(await signer.sign(tbs)).toString("hex");
|
|
80
|
+
// If the agent has no live signaling (e.g. a re-push of an already-retired agent), getAgentSignaling
|
|
81
|
+
// lazily creates a dedicated manager — drop it again afterwards so we don't leak a reconnect loop.
|
|
82
|
+
const hadSignaling = perAgentSignaling.has(agentName);
|
|
83
|
+
const { signaling } = getAgentSignaling(agentName, signer, kLocalPubkeyHex);
|
|
84
|
+
// createdSignaling is true only when this call lazily created a NEW per-agent manager (production);
|
|
85
|
+
// on the shared test path perAgentSignaling stays empty, so it is false and dropAgentSignaling no-ops.
|
|
86
|
+
const createdSignaling = !hadSignaling && perAgentSignaling.has(agentName);
|
|
87
|
+
try {
|
|
88
|
+
const connected = await waitForSignalingConnected(signaling, 10_000);
|
|
89
|
+
if (!connected)
|
|
90
|
+
return { recorded: false, reason: "directory_unreachable" };
|
|
91
|
+
let resolveFrame;
|
|
92
|
+
const pending = new Promise((r) => { resolveFrame = r; });
|
|
93
|
+
// Match the reply by agent_id so a revocation on a shared signaling stream is never cross-wired.
|
|
94
|
+
const unregister = signaling.registerInboundHandler((frame) => {
|
|
95
|
+
const t = frame["type"];
|
|
96
|
+
if ((t === "agent_revocation_ack" || t === "agent_revocation_error") && frame["agent_id"] === regAgentId)
|
|
97
|
+
resolveFrame(frame);
|
|
98
|
+
});
|
|
99
|
+
try {
|
|
100
|
+
const sent = await signaling.sendRaw({ type: "revoke_agent", agent_id: regAgentId, epoch_id: epochId, reason, revoked_at: revokedAt, signature: sigHex });
|
|
101
|
+
if (!sent.ok)
|
|
102
|
+
return { recorded: false, reason: sent.reason ?? "directory_unreachable" };
|
|
103
|
+
let timer;
|
|
104
|
+
const timeoutP = new Promise((r) => { timer = setTimeout(() => r({ type: "__timeout__" }), 15_000); });
|
|
105
|
+
const frame = await Promise.race([pending, timeoutP]);
|
|
106
|
+
clearTimeout(timer);
|
|
107
|
+
if (frame["type"] === "__timeout__")
|
|
108
|
+
return { recorded: false, reason: "timeout" };
|
|
109
|
+
if (frame["type"] === "agent_revocation_error")
|
|
110
|
+
return { recorded: false, reason: String(frame["reason"] ?? "rejected") };
|
|
111
|
+
logger.info("agent.revocation.submitted", { agentName, agentId: regAgentId });
|
|
112
|
+
return { recorded: true };
|
|
113
|
+
}
|
|
114
|
+
finally {
|
|
115
|
+
unregister();
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
finally {
|
|
119
|
+
if (createdSignaling) {
|
|
120
|
+
await dropAgentSignaling(agentName).catch((err) => {
|
|
121
|
+
logger.warn("agent.revocation.signaling_teardown_failed", { agentName, error: err instanceof Error ? err.message : String(err) });
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
handlers.set("cello_remove_agent", async (params, _connectionId) => {
|
|
127
|
+
const name = validateMoniker(params?.name);
|
|
128
|
+
if (name === null) {
|
|
129
|
+
return { ok: false, reason: "invalid_agent_name", guidance: `Provide the 'name' of the agent to remove (1-64 chars: letters, digits, '-' or '_'; regex ${MONIKER_RE.source}).` };
|
|
130
|
+
}
|
|
131
|
+
const store = new DbIdentityStore(sessionNodeManager.getDb(), logger);
|
|
132
|
+
// The active row (a fresh removal) OR the most-recent retired row (a DB-001 re-push). Captured BEFORE
|
|
133
|
+
// any retire — the active-only accessors filter retired rows out once state is flipped.
|
|
134
|
+
const target = store.getAgentForRevocation(name);
|
|
135
|
+
if (!target) {
|
|
136
|
+
return { ok: false, reason: "agent_not_found", guidance: `No agent named '${name}'. Check cello_agents.` };
|
|
137
|
+
}
|
|
138
|
+
const wasActive = target.state !== "retired";
|
|
139
|
+
const agentId = target.localAgentId;
|
|
140
|
+
// An already-retired agent that was never registered has nothing to do — no local retire (one-way,
|
|
141
|
+
// already done) and no directory revocation to push. Treat a repeat removal as agent_not_found (a
|
|
142
|
+
// tombstone is never re-retired). A retired agent WITH a directory id falls through to the DB-001
|
|
143
|
+
// re-push below.
|
|
144
|
+
if (!wasActive && !target.regAgentId) {
|
|
145
|
+
return { ok: false, reason: "agent_not_found", guidance: `No active agent named '${name}'. Removal is one-way; '${name}' is already retired.` };
|
|
146
|
+
}
|
|
147
|
+
// DOD-REMOVE-2: build + self-sign + submit the directory revocation. Done for a fresh removal AND a
|
|
148
|
+
// re-push of an already-retired agent (DB-001). Skipped only if the agent was never registered (no
|
|
149
|
+
// directory-known id to revoke). The signer is re-derived from the kept K_local seed, so it works
|
|
150
|
+
// even for an already-retired agent whose runtime keyProvider was purged.
|
|
151
|
+
let directoryRevocation = "skipped";
|
|
152
|
+
let revocationReason;
|
|
153
|
+
if (target.regAgentId) {
|
|
154
|
+
const signer = new InMemoryKeyProvider(target.kLocalSeed);
|
|
155
|
+
const kLocalPubkeyHex = Buffer.from(await signer.getPublicKey()).toString("hex");
|
|
156
|
+
const res = await submitAgentRevocation({ agentName: name, signer, kLocalPubkeyHex, regAgentId: target.regAgentId });
|
|
157
|
+
directoryRevocation = res.recorded ? "recorded" : "deferred";
|
|
158
|
+
revocationReason = res.reason;
|
|
159
|
+
if (!res.recorded) {
|
|
160
|
+
logger.error("agent.removal.failed", { agentName: name, error: res.reason ?? "directory_unreachable" });
|
|
161
|
+
}
|
|
162
|
+
else {
|
|
163
|
+
logger.info("agent.revocation.recorded", { agentId: target.regAgentId });
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
else if (target.state === "registered") {
|
|
167
|
+
// Anomaly (fallback-finder MEDIUM): the agent is locally marked registered but has no
|
|
168
|
+
// directory-known id, so the revocation cannot be pushed. Do NOT report the benign "never
|
|
169
|
+
// registered" — surface it loudly so a registered-but-unrevocable agent is visible.
|
|
170
|
+
revocationReason = "registered_without_directory_id";
|
|
171
|
+
logger.error("agent.removal.failed", { agentName: name, error: "registered_without_directory_id" });
|
|
172
|
+
}
|
|
173
|
+
// Local retire (one-way) + runtime purge — only for a fresh removal. An already-retired re-push does
|
|
174
|
+
// not re-retire (and has nothing loaded to purge).
|
|
175
|
+
if (wasActive) {
|
|
176
|
+
store.retireAgent(name);
|
|
177
|
+
// Tear down the retired identity's live runtime so it can no longer receive or re-authenticate.
|
|
178
|
+
// AWAITED + LOGGED on failure (review HIGH-1 / fallback-finder MEDIUM): a teardown that didn't
|
|
179
|
+
// happen must be visible.
|
|
180
|
+
if (onlineAgents.has(name)) {
|
|
181
|
+
onlineAgents.delete(name);
|
|
182
|
+
await sessionNodeManager.removeStandingReceiverForAgent(name).catch((err) => {
|
|
183
|
+
logger.warn("agent.removal.receiver_teardown_failed", { agentName: name, agentId, error: err instanceof Error ? err.message : String(err) });
|
|
184
|
+
});
|
|
185
|
+
}
|
|
186
|
+
// Stop+forget the retired agent's dedicated per-agent signaling manager (review HIGH-1).
|
|
187
|
+
await dropAgentSignaling(name).catch((err) => {
|
|
188
|
+
logger.warn("agent.removal.signaling_teardown_failed", { agentName: name, agentId, error: err instanceof Error ? err.message : String(err) });
|
|
189
|
+
});
|
|
190
|
+
keyProviders.delete(name);
|
|
191
|
+
const li = loadedAgents.findIndex((a) => a.name === name);
|
|
192
|
+
if (li >= 0)
|
|
193
|
+
loadedAgents.splice(li, 1);
|
|
194
|
+
const ai = agents.findIndex((a) => a.name === name);
|
|
195
|
+
if (ai >= 0)
|
|
196
|
+
agents.splice(ai, 1);
|
|
197
|
+
// CELLO-M7-CONN-001 (DOD-CONN-1): no keystone to clear — the agent's OWN per-agent directory
|
|
198
|
+
// connection was already torn down above (dropAgentSignaling). Removing any agent disturbs only
|
|
199
|
+
// its own connection; no other agent's connection, and no shared "keystone", is affected. This is
|
|
200
|
+
// the fix for the Demo1 bug (the keystone lingered authenticated as the removed agent).
|
|
201
|
+
logger.info("agent.directory.connection.dropped", { agentName: name, agentId, reason: "agent_removed" });
|
|
202
|
+
// Drop the retired agent as any connection's current agent.
|
|
203
|
+
for (const [connId, state] of perConnectionState) {
|
|
204
|
+
if (state.currentAgent === name) {
|
|
205
|
+
state.currentAgent = null;
|
|
206
|
+
state.clearedAgent = name; // this connection HAD an intent; do not guess a replacement
|
|
207
|
+
getNotificationDispatcher().setCurrentAgent(connId, null);
|
|
208
|
+
getNotificationDispatcher().dispatchAgentCurrentChanged(connId, name, null);
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
// agent.removal.retired (observability): never log key material — only the name + agent_id.
|
|
212
|
+
logger.info("agent.removal.retired", { agentName: name, agentId });
|
|
213
|
+
getNotificationDispatcher().dispatchAgentStateChanged(name, "offline", "removed");
|
|
214
|
+
}
|
|
215
|
+
const baseLine = wasActive
|
|
216
|
+
? "Agent retired. This is one-way: its identity and history are kept for accountability, but it can no longer connect. The name is now free to reuse with cello create-agent."
|
|
217
|
+
: "Agent was already retired locally.";
|
|
218
|
+
const dirLine = directoryRevocation === "recorded"
|
|
219
|
+
? " A signed revocation was recorded at the directory — peers will see it as revoked."
|
|
220
|
+
: directoryRevocation === "deferred"
|
|
221
|
+
? ` The directory could NOT be reached to record the revocation (${revocationReason ?? "directory_unreachable"}) — peers do not yet see it as revoked. Re-run 'cello remove-agent ${name}' when the directory is reachable to push it.`
|
|
222
|
+
: revocationReason === "registered_without_directory_id"
|
|
223
|
+
? " WARNING: this agent appears registered but has no directory id recorded locally, so its revocation could NOT be pushed — peers may still see it as reachable. Check the daemon logs (agent.removal.failed)."
|
|
224
|
+
: " It was never registered with a directory, so there is no directory revocation to record.";
|
|
225
|
+
return { ok: true, name, agentId, oneWay: true, directoryRevocation, guidance: baseLine + dirLine };
|
|
226
|
+
});
|
|
227
|
+
// ─── MCP-001: cello_stop_agent handler ───
|
|
228
|
+
handlers.set("cello_stop_agent", async (params, _connectionId) => {
|
|
229
|
+
const name = params?.name;
|
|
230
|
+
if (!name) {
|
|
231
|
+
return { ok: false, reason: "missing_params", guidance: "Provide 'name' parameter with the agent name to stop." };
|
|
232
|
+
}
|
|
233
|
+
const agent = agents.find((a) => a.name === name);
|
|
234
|
+
if (!agent || agent.state === "load_failed") {
|
|
235
|
+
return { ok: false, reason: "agent_not_found", guidance: `Agent '${name}' does not exist. Check agent names with cello_agents.` };
|
|
236
|
+
}
|
|
237
|
+
if (!onlineAgents.has(name)) {
|
|
238
|
+
// Idempotent — already registered/offline, no event
|
|
239
|
+
return { ok: true };
|
|
240
|
+
}
|
|
241
|
+
onlineAgents.delete(name);
|
|
242
|
+
// DOD-LOOP-1: tear down this agent's standing receiver. AWAITED and LOGGED, matching
|
|
243
|
+
// cello_remove_agent — a teardown that did not happen must be VISIBLE. Fire-and-forget with a
|
|
244
|
+
// swallowed catch reported the agent offline while its receiver could still be live and bound
|
|
245
|
+
// to it: a stopped agent that can still be handed an inbound session, with nothing in the log.
|
|
246
|
+
await sessionNodeManager.removeStandingReceiverForAgent(name).catch((err) => {
|
|
247
|
+
logger.warn("agent.stop.receiver_teardown_failed", { agentName: name, error: err instanceof Error ? err.message : String(err) });
|
|
248
|
+
});
|
|
249
|
+
logger.info("agent.offline", { agentName: name, reason: "stopped" });
|
|
250
|
+
// MCP-002: Broadcast agent_state_changed to ALL connections
|
|
251
|
+
getNotificationDispatcher().dispatchAgentStateChanged(name, "offline", "stopped");
|
|
252
|
+
// Clear current agent for all connections that had this agent as current
|
|
253
|
+
for (const [connId, state] of perConnectionState) {
|
|
254
|
+
if (state.currentAgent === name) {
|
|
255
|
+
state.currentAgent = null;
|
|
256
|
+
state.clearedAgent = name; // this connection HAD an intent; do not guess a replacement
|
|
257
|
+
getNotificationDispatcher().setCurrentAgent(connId, null);
|
|
258
|
+
getNotificationDispatcher().dispatchAgentCurrentChanged(connId, name, null);
|
|
259
|
+
logger.info("agent.current.switched", { connectionId: connId, fromAgent: name, toAgent: null });
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
return { ok: true };
|
|
263
|
+
});
|
|
264
|
+
// ─── MCP-001: cello_use_agent handler ───
|
|
265
|
+
handlers.set("cello_use_agent", async (params, connectionId) => {
|
|
266
|
+
const name = params?.name;
|
|
267
|
+
if (!name) {
|
|
268
|
+
return { ok: false, reason: "missing_params", guidance: "Provide 'name' parameter with the agent name to use." };
|
|
269
|
+
}
|
|
270
|
+
const agent = agents.find((a) => a.name === name);
|
|
271
|
+
if (!agent || agent.state === "load_failed") {
|
|
272
|
+
return { ok: false, reason: "agent_not_found", guidance: `Agent '${name}' does not exist. Create it with 'cello create-agent ${name}', register it, then retry — or check names with cello_agents.` };
|
|
273
|
+
}
|
|
274
|
+
const connState = getConnState(connectionId);
|
|
275
|
+
if (!connState) {
|
|
276
|
+
return { ok: false, reason: "connection_not_registered", guidance: "Send ipc.connect frame before calling agent tools." };
|
|
277
|
+
}
|
|
278
|
+
// M8C-AUTOSTART-1 (A1): auto-start the agent if it is not online, so the incantation collapses
|
|
279
|
+
// to `login → use_agent` (no separate cello_start_agent). On a start failure, return a
|
|
280
|
+
// structured agent_start_failed and leave the current selection UNCHANGED — no half-selected
|
|
281
|
+
// state (A3). cello_start_agent stays available for bring-online-without-claiming.
|
|
282
|
+
if (!onlineAgents.has(name)) {
|
|
283
|
+
logger.info("agent.autostart.attempted", { connectionId, agentName: name });
|
|
284
|
+
const startRes = startAgentInternal(name);
|
|
285
|
+
if (!startRes.ok) {
|
|
286
|
+
// Structured failure envelope (D6). Today `startAgentInternal` is permissive (D12) and its
|
|
287
|
+
// only failure — agent_not_found — is already caught by the existence pre-check above, so
|
|
288
|
+
// this branch is currently unreachable. It is the RESERVED structured-failure surface for
|
|
289
|
+
// when auto-start gains a synchronous failure mode (e.g. D12's reverse: a bounded
|
|
290
|
+
// waitForSignalingConnected making `directory_unreachable` a real start failure). Kept so
|
|
291
|
+
// that extension surfaces the reason + guidance here with the selection left unchanged.
|
|
292
|
+
// See M8C-DECISIONS D12 + BUILD-JOURNAL Entry 8.
|
|
293
|
+
logger.warn("agent.autostart.failed", { connectionId, agentName: name, reason: startRes.reason });
|
|
294
|
+
return {
|
|
295
|
+
ok: false,
|
|
296
|
+
reason: "agent_start_failed",
|
|
297
|
+
start_reason: startRes.reason,
|
|
298
|
+
guidance: `Could not start agent '${name}' to select it: ${startRes.guidance} Your current agent is unchanged.`,
|
|
299
|
+
};
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
if (connState.currentAgent === name) {
|
|
303
|
+
return { ok: false, reason: "agent_already_current", guidance: `Agent '${name}' is already the current agent for this connection. No action needed — you can proceed with session operations.` };
|
|
304
|
+
}
|
|
305
|
+
const fromAgent = connState.currentAgent;
|
|
306
|
+
connState.currentAgent = name;
|
|
307
|
+
// A fresh choice supersedes any earlier one that was taken away. Without this a connection that
|
|
308
|
+
// ever had an agent stopped under it would be refused the sole-online fallback forever, even
|
|
309
|
+
// after the operator selected again.
|
|
310
|
+
delete connState.clearedAgent;
|
|
311
|
+
// M8C-AWAY-1: this agent just became attended — clear its away-ack dedup entries so the NEXT
|
|
312
|
+
// away period (after this attended stretch ends) gets a fresh ack instead of staying silent.
|
|
313
|
+
for (const key of Array.from(awayAckSent)) {
|
|
314
|
+
if (key.startsWith(`${name}:`))
|
|
315
|
+
awayAckSent.delete(key);
|
|
316
|
+
}
|
|
317
|
+
// MCP-002: Update dispatcher's routing table and send notification to this connection only
|
|
318
|
+
getNotificationDispatcher().setCurrentAgent(connectionId, name);
|
|
319
|
+
getNotificationDispatcher().dispatchAgentCurrentChanged(connectionId, fromAgent, name);
|
|
320
|
+
logger.info("agent.current.switched", { connectionId, fromAgent, toAgent: name });
|
|
321
|
+
// M8C-AUTOSTART-1 (A3, D12): not_registered is a NON-BLOCKING warning — the agent is selected
|
|
322
|
+
// and usable locally, but it cannot establish directory sessions until registered. Surface the
|
|
323
|
+
// next step (ONBOARD-NEXTSTEP style) without stranding the selection. One-row read.
|
|
324
|
+
const result = { ok: true };
|
|
325
|
+
try {
|
|
326
|
+
const reg = await new DbRegistrationPersistence({ db: sessionNodeManager.getDb(), agentName: name, logger }).loadRegistrationState();
|
|
327
|
+
if (!reg || reg.status !== "active") {
|
|
328
|
+
result["warning"] = "not_registered";
|
|
329
|
+
result["warning_guidance"] = `Agent '${name}' is now selected but is not registered with the directory — run 'cello register-agent ${name}' to enable sessions with peers. Run 'cello status' to watch registration complete.`;
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
catch (err) {
|
|
333
|
+
// A failed registration read must not break selection (the agent IS selected). Log the real
|
|
334
|
+
// reason, and surface a softer `registration_unknown` warning so the operator's surface is NOT
|
|
335
|
+
// falsely clean — we could not confirm registration, so don't imply it is fine (Finding 3).
|
|
336
|
+
logger.warn("agent.registration.read.failed", { agentName: name, reason: err instanceof Error ? err.message : String(err) });
|
|
337
|
+
result["warning"] = "registration_unknown";
|
|
338
|
+
result["warning_guidance"] = `Agent '${name}' is selected, but its registration status could not be read — run 'cello status' to check whether it is registered with the directory.`;
|
|
339
|
+
}
|
|
340
|
+
return result;
|
|
341
|
+
});
|
|
342
|
+
// ─── MCP-001: cello_list_agents handler ───
|
|
343
|
+
handlers.set("cello_list_agents", async (_params, connectionId) => {
|
|
344
|
+
return { agents: getAgentsForConnection(connectionId) };
|
|
345
|
+
});
|
|
346
|
+
// ─── M7-REGISTRATION (Action 2): cello_register handler ───
|
|
347
|
+
// Registers a LOADED agent (one with a K_local `key` under ~/.cello/agents/<name>/)
|
|
348
|
+
// with the directory: ML-DSA keygen → register_request → FROST DKG → register_success,
|
|
349
|
+
// persisting the ML-DSA keypair, FROST share, registration state, and agent→user link.
|
|
350
|
+
// Always invoked with a pre-authorization ticket from the CELLO Operations Agent.
|
|
351
|
+
// Single-flight guard (M1): the directory's registration reply frames
|
|
352
|
+
// (dkg_ready / register_success / register_error) carry NO agent identifier, so
|
|
353
|
+
// two concurrent registrations over the one shared directory signaling stream
|
|
354
|
+
// would each arm a resolver and both receive the same reply — cross-wiring the
|
|
355
|
+
// ceremonies. Serialize registration daemon-wide (it is a rare, once-per-agent,
|
|
356
|
+
// human-initiated operation). This is the registration analogue of the
|
|
357
|
+
// sealInterruptedInProgress guard, but global rather than per-key because the
|
|
358
|
+
// frames are not agent-tagged.
|
|
359
|
+
}
|
|
360
|
+
//# sourceMappingURL=agent-handlers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent-handlers.js","sourceRoot":"","sources":["../src/agent-handlers.ts"],"names":[],"mappings":"AAkBA,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,uBAAuB,EAAE,MAAM,gCAAgC,CAAC;AACtG,OAAO,EAAE,eAAe,EAAE,yBAAyB,EAAE,MAAM,wBAAwB,CAAC;AAIpF,OAAO,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAwBjF,MAAM,UAAU,qBAAqB,CAAC,IAAsB;IAC1D,MAAM,EACJ,QAAQ,EAAE,MAAM,EAAE,kBAAkB,EAAE,MAAM,EAAE,YAAY,EAAE,yBAAyB,EACrF,YAAY,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,kBAAkB,EAC5E,kBAAkB,EAAE,WAAW,EAAE,YAAY,EAAE,YAAY,EAAE,iBAAiB,EAC9E,yBAAyB,EAAE,iBAAiB,GAC7C,GAAG,IAAI,CAAC;IAET,6CAA6C;IAC7C,0FAA0F;IAC1F,QAAQ,CAAC,GAAG,CAAC,mBAAmB,EAAE,KAAK,EAAE,MAAM,EAAE,aAAa,EAAE,EAAE;QAChE,MAAM,IAAI,GAAG,MAAM,EAAE,IAA0B,CAAC;QAChD,IAAI,CAAC,IAAI,EAAE,CAAC;YACV,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,gBAAgB,EAAE,QAAQ,EAAE,wDAAwD,EAAE,CAAC;QACrH,CAAC;QACD,OAAO,kBAAkB,CAAC,IAAI,CAAC,CAAC;IAClC,CAAC,CAAC,CAAC;IAEH,2DAA2D;IAC3D,kGAAkG;IAClG,kGAAkG;IAClG,qGAAqG;IACrG,QAAQ,CAAC,GAAG,CAAC,oBAAoB,E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AC;YAC7H,MAAM,CAAC,SAAS,CAAC,GAAG,sBAAsB,CAAC;YAC3C,MAAM,CAAC,kBAAkB,CAAC,GAAG,UAAU,IAAI,yIAAyI,CAAC;QACvL,CAAC;QACD,OAAO,MAAM,CAAC;IAChB,CAAC,CAAC,CAAC;IAEH,6CAA6C;IAC7C,QAAQ,CAAC,GAAG,CAAC,mBAAmB,EAAE,KAAK,EAAE,OAAO,EAAE,YAAY,EAAE,EAAE;QAChE,OAAO,EAAE,MAAM,EAAE,sBAAsB,CAAC,YAAY,CAAC,EAAE,CAAC;IAC1D,CAAC,CAAC,CAAC;IAEH,6DAA6D;IAC7D,oFAAoF;IACpF,uFAAuF;IACvF,uFAAuF;IACvF,kFAAkF;IAClF,sEAAsE;IACtE,gFAAgF;IAChF,8EAA8E;IAC9E,+EAA+E;IAC/E,gFAAgF;IAChF,uEAAuE;IACvE,8EAA8E;IAC9E,+BAA+B;AACjC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-id-migration.d.ts","sourceRoot":"","sources":["../src/agent-id-migration.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AACzC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"agent-id-migration.d.ts","sourceRoot":"","sources":["../src/agent-id-migration.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AACzC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAqJxD,MAAM,WAAW,sBAAsB;IACrC,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;IAC3B,iEAAiE;IACjE,QAAQ,CAAC,SAAS,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;CACtD;AAyDD;;;;;;;;;;GAUG;AACH,wBAAgB,6BAA6B,CAAC,EAAE,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,GAAG,sBAAsB,CA0HxG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-id-migration.js","sourceRoot":"","sources":["../src/agent-id-migration.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AAqBH,MAAM,aAAa,GAA2B;IAC5C;QACE,KAAK,EAAE,UAAU;QACjB,QAAQ,EAAE,QAAQ;QAClB,SAAS,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC;qBACD,CAAC
|
|
1
|
+
{"version":3,"file":"agent-id-migration.js","sourceRoot":"","sources":["../src/agent-id-migration.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AAqBH,MAAM,aAAa,GAA2B;IAC5C;QACE,KAAK,EAAE,UAAU;QACjB,QAAQ,EAAE,QAAQ;QAClB,SAAS,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC;qBACD,CAAC;;;;;;;;;;;;;;;;QAgBd;QACJ,QAAQ,EAAE,GAAG,EAAE,CAAC,EAAE;KACnB;IACD;QACE,KAAK,EAAE,4BAA4B;QACnC,QAAQ,EAAE,QAAQ;QAClB,SAAS,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC;qBACD,CAAC;;;;;;;;;;QAUd;QACJ,QAAQ,EAAE,GAAG,EAAE,CAAC,EAAE;KACnB;IACD;QACE,KAAK,EAAE,qBAAqB;QAC5B,QAAQ,EAAE,QAAQ;QAClB,SAAS,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC;qBACD,CAAC;;;;;;;;QAQd;QACJ,QAAQ,EAAE,GAAG,EAAE,CAAC,EAAE;KACnB;I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
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* `agents` table by the one-time migration (identity-migration.ts) before this loader runs.
|
|
4
|
+
* Agents are enumerated from the encrypted `agents` table — ONE loading path. There is no flat-file
|
|
5
|
+
* fallback: on-disk key files are imported into the `agents` table by the one-time migration
|
|
6
|
+
* (identity-migration.ts) before this loader runs.
|
|
8
7
|
*
|
|
9
8
|
* Each agent's K_local Ed25519 seed is stored as a BLOB column; the loader builds a sign-only
|
|
10
9
|
* InMemoryKeyProvider from it (the private scalar never leaves the provider — only signatures and
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-loader.d.ts","sourceRoot":"","sources":["../src/agent-loader.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"agent-loader.d.ts","sourceRoot":"","sources":["../src/agent-loader.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAGH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAE1D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAEzC,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,WAAW,EAAE,WAAW,CAAC;CAC1B;AAED,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE,WAAW,EAAE,CAAC;IACtB,MAAM,EAAE,WAAW,EAAE,CAAC;CACvB;AAED;;;GAGG;AACH,wBAAsB,UAAU,CAAC,EAAE,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,CAAC,CAkB7F"}
|
package/dist/agent-loader.js
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Agent identity loader for the CELLO daemon.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* `agents` table by the one-time migration (identity-migration.ts) before this loader runs.
|
|
4
|
+
* Agents are enumerated from the encrypted `agents` table — ONE loading path. There is no flat-file
|
|
5
|
+
* fallback: on-disk key files are imported into the `agents` table by the one-time migration
|
|
6
|
+
* (identity-migration.ts) before this loader runs.
|
|
8
7
|
*
|
|
9
8
|
* Each agent's K_local Ed25519 seed is stored as a BLOB column; the loader builds a sign-only
|
|
10
9
|
* InMemoryKeyProvider from it (the private scalar never leaves the provider — only signatures and
|
package/dist/agent-loader.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-loader.js","sourceRoot":"","sources":["../src/agent-loader.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"agent-loader.js","sourceRoot":"","sources":["../src/agent-loader.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAE7D,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAwBzD;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,UAAU,CAAC,EAAkB,EAAE,MAAc;IACjE,MAAM,KAAK,GAAG,IAAI,eAAe,CAAC,EAAE,EAAE,MAAM,CAAC,CAAC;IAC9C,MAAM,MAAM,GAAkB,EAAE,CAAC;IACjC,MAAM,MAAM,GAAkB,EAAE,CAAC;IAEjC,KAAK,MAAM,GAAG,IAAI,KAAK,CAAC,UAAU,EAAE,EAAE,CAAC;QACrC,IAAI,CAAC;YACH,MAAM,WAAW,GAAG,IAAI,mBAAmB,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;YAC5D,MAAM,MAAM,GAAG,MAAM,CAAC,IAAI,CAAC,MAAM,WAAW,CAAC,YAAY,EAAE,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;YAC7E,MAAM,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,GAAG,CAAC,SAAS,EAAE,MAAM,EAAE,WAAW,EAAE,CAAC,CAAC;QAC5D,CAAC;QAAC,OAAO,GAAY,EAAE,CAAC;YACtB,MAAM,KAAK,GAAG,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;YAC/D,MAAM,CAAC,KAAK,CAAC,mBAAmB,EAAE,EAAE,SAAS,EAAE,GAAG,CAAC,SAAS,EAAE,KAAK,EAAE,CAAC,CAAC;YACvE,MAAM,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,GAAG,CAAC,SAAS,EAAE,KAAK,EAAE,CAAC,CAAC;QAC9C,CAAC;IACH,CAAC;IAED,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC;AAC5B,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { DaemonDatabase } from "./sqlcipher-db.js";
|
|
2
|
+
import type { Logger } from "./types.js";
|
|
3
|
+
/**
|
|
4
|
+
* Rewrite any non-canonically-encoded FROST blob in `agents` to the canonical encoding.
|
|
5
|
+
* Idempotent. Safe to run on every daemon start.
|
|
6
|
+
*/
|
|
7
|
+
export declare function migrateCborBlobsToCanonical(db: DaemonDatabase, logger: Logger): void;
|
|
8
|
+
//# sourceMappingURL=cbor-blob-migration.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cbor-blob-migration.d.ts","sourceRoot":"","sources":["../src/cbor-blob-migration.ts"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAuCzC;;;GAGG;AACH,wBAAgB,2BAA2B,CAAC,EAAE,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI,CA+DpF"}
|