@cotal-ai/manager 0.170.0 → 0.171.0

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.
@@ -0,0 +1,261 @@
1
+ import type { KV } from "@nats-io/kv";
2
+ import { type NatsConnection } from "@nats-io/transport-node";
3
+ import { Manager } from "./manager.js";
4
+ /** Pick a `setInterval` period for {@link Manager.renewDaemonCreds} that guarantees at least one
5
+ * tick lands inside every renewal owner's `[renewAt, exp)` window.
6
+ *
7
+ * `inspectCredHealth` marks a credential `near-expiry` at 75% of its iat-to-exp lifetime and
8
+ * `expired` at 100%, so the window width is TTL/4. Ticks TTL/4 apart therefore land at least once
9
+ * inside every window; ticks TTL/2 apart (the old schedule) can miss it entirely for any TTL. That
10
+ * is the cause of Cotal #457, reproduced at both TTL=86400 and TTL=20 (the compressed-ratio probe).
11
+ *
12
+ * Deriving from the caller's TTL keeps the schedule correct for any credential class: the 24h
13
+ * `STANDING_RENEWABLE_TTL_SEC` and the 30-day `ROTATION_RENEWED_TTL_SEC` both get a tick inside
14
+ * their own renewal window without a hardcoded number. Post-boot responsiveness is already
15
+ * covered by the caller invoking `renewDaemonCreds` once synchronously before starting the timer,
16
+ * so no separate floor is needed. The pass is idempotent, since `renewDaemonCreds` no-ops each
17
+ * credential when its state is `healthy`, so a tick that lands before the window costs one health
18
+ * check per owner. A managed seat's credential is judged as of the next tick instead, because the
19
+ * seat re-reads its file only once a minute and nothing pushes the renewal to it: a tick that
20
+ * lands in the window's last minute can come too late for the seat to adopt it. */
21
+ export declare function credRenewIntervalMs(ttlSeconds: number): number;
22
+ export declare const REMOTE_STANDING_BUDGET_MS = 10000;
23
+ /** One absolute budget across authority, preflight and adoption waits, or one closed-serve attempt. */
24
+ export declare function remoteStandingTimeLeft(deadline: number): number;
25
+ export declare function sameStrings(a: readonly string[] | undefined, b: readonly string[] | undefined): boolean;
26
+ /** What {@link CredentialRenewal} reads from and writes to the Manager. Every entry is read at
27
+ * use, so a field the Manager or a test assigns is always current, and a Manager method a test
28
+ * replaces is the one that runs. */
29
+ export interface CredentialRenewalDeps {
30
+ agents: () => Manager["agents"];
31
+ auth: () => Manager["auth"];
32
+ credentialPushRetry: () => Manager["credentialPushRetry"];
33
+ setCredentialPushRetry: (value: Manager["credentialPushRetry"]) => void;
34
+ credentialPushes: () => Manager["credentialPushes"];
35
+ daemonRenewalEligible: () => Manager["daemonRenewalEligible"];
36
+ setDaemonRenewalEligible: (value: Manager["daemonRenewalEligible"]) => void;
37
+ daemonRenewalOwner: () => Manager["daemonRenewalOwner"];
38
+ setDaemonRenewalOwner: (value: Manager["daemonRenewalOwner"]) => void;
39
+ endpointServeRenewalTimer: () => Manager["endpointServeRenewalTimer"];
40
+ setEndpointServeRenewalTimer: (value: Manager["endpointServeRenewalTimer"]) => void;
41
+ ep: () => Manager["ep"];
42
+ finishRemoteBundleAdoption: () => Manager["finishRemoteBundleAdoption"];
43
+ setFinishRemoteBundleAdoption: (value: Manager["finishRemoteBundleAdoption"]) => void;
44
+ goalWriter: () => Manager["goalWriter"];
45
+ goalWriterCreds: () => Manager["goalWriterCreds"];
46
+ setGoalWriterCreds: (value: Manager["goalWriterCreds"]) => void;
47
+ leaseStopping: () => Manager["leaseStopping"];
48
+ managerInstanceId: () => Manager["managerInstanceId"];
49
+ pendingCredentialPushes: () => Manager["pendingCredentialPushes"];
50
+ remoteAuthority: () => Manager["remoteAuthority"];
51
+ remoteBundleAdoption: () => Manager["remoteBundleAdoption"];
52
+ setRemoteBundleAdoption: (value: Manager["remoteBundleAdoption"]) => void;
53
+ remoteBundleRenewal: () => Manager["remoteBundleRenewal"];
54
+ setRemoteBundleRenewal: (value: Manager["remoteBundleRenewal"]) => void;
55
+ remoteExecutorCreds: () => Manager["remoteExecutorCreds"];
56
+ setRemoteExecutorCreds: (value: Manager["remoteExecutorCreds"]) => void;
57
+ remoteRenewalDebt: () => Manager["remoteRenewalDebt"];
58
+ setRemoteRenewalDebt: (value: Manager["remoteRenewalDebt"]) => void;
59
+ remoteSupervisorCreds: () => Manager["remoteSupervisorCreds"];
60
+ setRemoteSupervisorCreds: (value: Manager["remoteSupervisorCreds"]) => void;
61
+ runHosting: () => Manager["runHosting"];
62
+ secretStoreIdentity: () => Manager["secretStoreIdentity"];
63
+ setSecretStoreIdentity: (value: Manager["secretStoreIdentity"]) => void;
64
+ secrets: () => Manager["secrets"];
65
+ serviceServe: () => Manager["serviceServe"];
66
+ sessionLedgerConn: () => Manager["sessionLedgerConn"];
67
+ sessionLedgerCreds: () => Manager["sessionLedgerCreds"];
68
+ setSessionLedgerCreds: (value: Manager["sessionLedgerCreds"]) => void;
69
+ space: () => Manager["space"];
70
+ supervisorCredentialPush: () => Manager["supervisorCredentialPush"];
71
+ setSupervisorCredentialPush: (value: Manager["supervisorCredentialPush"]) => void;
72
+ supervisorCredentialPushPending: () => Manager["supervisorCredentialPushPending"];
73
+ setSupervisorCredentialPushPending: (value: Manager["supervisorCredentialPushPending"]) => void;
74
+ userMode: () => Manager["userMode"];
75
+ workspaceRoot: () => Manager["workspaceRoot"];
76
+ beginLifecycle: (...args: Parameters<Manager["beginLifecycle"]>) => ReturnType<Manager["beginLifecycle"]>;
77
+ dialRemoteStanding: (...args: Parameters<Manager["dialRemoteStanding"]>) => ReturnType<Manager["dialRemoteStanding"]>;
78
+ dialServeConnection: (...args: Parameters<Manager["dialServeConnection"]>) => ReturnType<Manager["dialServeConnection"]>;
79
+ discardServeCandidate: (...args: Parameters<Manager["discardServeCandidate"]>) => ReturnType<Manager["discardServeCandidate"]>;
80
+ mintAndStageGoalWriter: (...args: Parameters<Manager["mintAndStageGoalWriter"]>) => ReturnType<Manager["mintAndStageGoalWriter"]>;
81
+ mintAndStageSessionLedger: (...args: Parameters<Manager["mintAndStageSessionLedger"]>) => ReturnType<Manager["mintAndStageSessionLedger"]>;
82
+ probeStaticCredential: (...args: Parameters<Manager["probeStaticCredential"]>) => ReturnType<Manager["probeStaticCredential"]>;
83
+ renewManagedStaticCred: (...args: Parameters<Manager["renewManagedStaticCred"]>) => ReturnType<Manager["renewManagedStaticCred"]>;
84
+ withEndpointServeExecutor: <T>(fn: (kvs: {
85
+ recordsKv: KV;
86
+ authKv: KV;
87
+ nc: NatsConnection;
88
+ }) => Promise<T>) => Promise<T>;
89
+ renewRemoteStandingBundle: (...args: Parameters<Manager["renewRemoteStandingBundle"]>) => ReturnType<Manager["renewRemoteStandingBundle"]>;
90
+ }
91
+ /** Renewal of the manager's own standing credentials: the delivery daemon's reload, the remote
92
+ * standing bundle, and the pushes of renewed credentials to the live connections. */
93
+ export declare class CredentialRenewal {
94
+ private readonly deps;
95
+ constructor(deps: CredentialRenewalDeps);
96
+ private get agents();
97
+ private get auth();
98
+ private get credentialPushRetry();
99
+ private set credentialPushRetry(value);
100
+ private get credentialPushes();
101
+ private get daemonRenewalEligible();
102
+ private set daemonRenewalEligible(value);
103
+ private get daemonRenewalOwner();
104
+ private set daemonRenewalOwner(value);
105
+ private get endpointServeRenewalTimer();
106
+ private set endpointServeRenewalTimer(value);
107
+ private get ep();
108
+ private get finishRemoteBundleAdoption();
109
+ private set finishRemoteBundleAdoption(value);
110
+ private get goalWriter();
111
+ private get goalWriterCreds();
112
+ private set goalWriterCreds(value);
113
+ private get leaseStopping();
114
+ private get managerInstanceId();
115
+ private get pendingCredentialPushes();
116
+ private get remoteAuthority();
117
+ private get remoteBundleAdoption();
118
+ private set remoteBundleAdoption(value);
119
+ private get remoteBundleRenewal();
120
+ private set remoteBundleRenewal(value);
121
+ private get remoteExecutorCreds();
122
+ private set remoteExecutorCreds(value);
123
+ private get remoteRenewalDebt();
124
+ private set remoteRenewalDebt(value);
125
+ private get remoteSupervisorCreds();
126
+ private set remoteSupervisorCreds(value);
127
+ private get runHosting();
128
+ private get secretStoreIdentity();
129
+ private set secretStoreIdentity(value);
130
+ private get secrets();
131
+ private get serviceServe();
132
+ private get sessionLedgerConn();
133
+ private get sessionLedgerCreds();
134
+ private set sessionLedgerCreds(value);
135
+ private get space();
136
+ private get supervisorCredentialPush();
137
+ private set supervisorCredentialPush(value);
138
+ private get supervisorCredentialPushPending();
139
+ private set supervisorCredentialPushPending(value);
140
+ private get userMode();
141
+ private get workspaceRoot();
142
+ private beginLifecycle;
143
+ private dialRemoteStanding;
144
+ private dialServeConnection;
145
+ private discardServeCandidate;
146
+ private mintAndStageGoalWriter;
147
+ private mintAndStageSessionLedger;
148
+ private probeStaticCredential;
149
+ renewManagedStaticCred(...args: Parameters<Manager["renewManagedStaticCred"]>): ReturnType<Manager["renewManagedStaticCred"]>;
150
+ private withEndpointServeExecutor;
151
+ /** Proof that this manager remints into the store the delivery daemon reloads from.
152
+ * Fingerprint-only `reloadCreds` is safe only after this. Two named, different stores
153
+ * refuse the pass. A daemon that is not bound yet is not a named store: start and
154
+ * remint still proceed (tests, delayed delivery), writing this manager's store. The
155
+ * challenge runs again before every remint, so a later daemon on a foreign store is
156
+ * refused then rather than certified by an earlier absence. A request timeout is not
157
+ * absence: a hung rail would skip the proof, so it fails closed.
158
+ *
159
+ * ABSENCE IS READ OFF THE LEASE ROW, never off the rail's no-responder shape alone (#1694).
160
+ * The rail is queue-grouped, so "no responder answered" is itself something the rail reports,
161
+ * and a responder that answers in a shape the client turns into that error makes the pass read
162
+ * "absent" while a holder is live on the row — certifying every later remint with no proof at
163
+ * all. So a no-responder outcome is decided by the row: a row that names a holder makes the
164
+ * pass refuse (undetermined — a live daemon went unanswered, which must not read as "no
165
+ * daemon"), and only a row that is absent or holderless settles "absent", the state start()
166
+ * treats as not-yet-bound. An unreadable row (a failed read, or a key that exists but does not
167
+ * parse) is a genuine unknown and refuses fail-closed, like a hung rail. */
168
+ private daemonStoreRelation;
169
+ /** Settle a no-responder challenge outcome from the lease row, never from the rail's own
170
+ * reporting shape (#1694). The three cases:
171
+ *
172
+ * 1. The row READS but names a holder: a live daemon holds the shard and the rail went
173
+ * unanswered. That is undetermined, not "no daemon" — treating it as absent would let this
174
+ * manager remint with no proof while a reloading daemon runs, which is exactly what the
175
+ * challenge exists to prevent. Refuse.
176
+ * 2. The row is unreadable — a read that fails (a denied or erroring bucket) OR a key that
177
+ * exists but does not parse as a lease record (`readDeliveryLeaseEntry` throws for both):
178
+ * undetermined, and it refuses the same fail-closed way a hung rail does. Never a silent
179
+ * "absent" over a row the manager could not read.
180
+ * 3. The row is absent or holderless (no key, a DEL/PURGE tombstone, or a row that names no
181
+ * holder): today's "absent", the state start() treats as a daemon that is not bound yet.
182
+ *
183
+ * `deliveryLeaseHolder` swallows its read failures into `undefined`, which would fold case 2
184
+ * into case 3 — so this reads the entry directly and lets the read's own failure refuse. */
185
+ absentByLeaseRow(unanswered: boolean): Promise<"absent">;
186
+ /** Keep this manager's renewal lease alive between credential passes (#1634). The manager bucket
187
+ * expires keys at MANAGER_LEASE_TTL_MS, far below the credential pass's cadence, so the lease
188
+ * needs its own heartbeat like the per-instance liveness lease. A non-owner calls this too: the
189
+ * CAS is how a survivor picks up a dead owner's expired lease with no operator step. Never
190
+ * throws; a failed heartbeat leaves ownership to the next pass rather than ending the process. */
191
+ keepDaemonRenewalLease(): Promise<void>;
192
+ /** Decide whether THIS manager owns the daemon's credential renewal (#1634). Both conditions are
193
+ * required, because each answers a question the other cannot:
194
+ *
195
+ * 1. The daemon must reload from this manager's store (#1447). Reminting into a store the daemon
196
+ * never reads writes bytes nobody adopts, and fingerprint-only `reloadCreds` would then name a
197
+ * generation the daemon cannot see.
198
+ * 2. This manager must hold the per-space renewal lease. Store identity CANNOT pick one owner on
199
+ * its own: `sameSecretStoreIdentity` is pure equality with no holder and no tiebreak, so every
200
+ * manager sharing one store passes it, and two owners reminting on independent timers have no
201
+ * ordering between them - one's write lands between the other's re-sign and its adoption
202
+ * request, which is the #773 refusal the challenge exists to prevent.
203
+ *
204
+ * A manager failing either test serves the space normally and skips only the daemon remint. */
205
+ claimDaemonRenewalOwnership(waitMs?: number): Promise<void>;
206
+ /** #2073: arm the `endpoint-serve` credential's own renewal from its `[renewAt, exp)` window
207
+ * instead of `credRenewTimer`'s boot-phased TTL/4 tick, which can miss that window depending on
208
+ * when the timer happened to start relative to the credential's `iat`. Called after the initial
209
+ * mint (`registerManagerService`) and after every successful re-mint in the serve branch below,
210
+ * so the schedule always tracks the CURRENT credential. `credsRenewalDelayMs` is the same 75%
211
+ * convention the endpoint's delivery renewal and the membership feed use (`@cotal-ai/core`); no
212
+ * second copy of that arithmetic lives here. */
213
+ scheduleServeRenewal(creds: string): void;
214
+ private scheduleCredentialPushRetry;
215
+ /** Retain a busy transport and retry its adopted credential without replaying requests. */
216
+ private pushRenewedCreds;
217
+ private pushRenewedCredsOnce;
218
+ private pushSupervisorCreds;
219
+ private pushSupervisorCredsOnce;
220
+ /** #2073: the shared bounded-retry shape for a closed standing connection: wait out each of
221
+ * {@link STATIC_RECONCILE_RETRY_DELAYS_MS}, trying `attempt` after each. Waiting does not repair
222
+ * two closes, so they skip the first delay. One that closes while an all-duty renewal is in flight,
223
+ * as one the broker expires just before adoption, tries when that renewal adopts. One whose
224
+ * credential has `expired` tries at once, because its attempt renews the credential. A stop landing
225
+ * while this loop waits is not a fault this loop reports (the caller re-checks `leaseStopping`). */
226
+ boundedReconnect(label: string, attempt: () => Promise<boolean>, expired?: boolean): Promise<boolean>;
227
+ /** One class-2 renewal pass: re-sign `.cotal/delivery.creds` + `.cotal/membership-rw.creds`
228
+ * for their existing nkeys, then request the delivery daemon's EXPLICIT `reloadCreds` adoption on the
229
+ * delivery-admin rail and persist the audit record (`.cotal/renewal.<spaceKey>.json`) that `cotal doctor auth`
230
+ * renders — so "file re-signed" and "daemon adopted" are distinguishable states. A missing daemon
231
+ * (no responder) is recorded honestly: each daemon's own 75% renewal timer remains the adoption backstop.
232
+ * Never throws — renewal failure must be LOUD (log + record), not fatal to the supervisor. */
233
+ renewDaemonCreds(): Promise<void>;
234
+ /** Renew the remote registration executor through the typed host protocol. A healthy credential
235
+ * is retained; near-expiry and expired credentials are replaced for the same nkey. */
236
+ renewRemoteExecutor(force?: boolean): Promise<void>;
237
+ /** An active signerless manager renews its standing duties together. The issuer stages the closed
238
+ * credential family first; broker preflight proves every JWT and existing caller-held nkey
239
+ * before any mutable holder changes. A failed candidate leaves all current creds intact. */
240
+ renewRemoteStandingBundle(force?: boolean): Promise<void>;
241
+ /** A signerless manager's closed standing connection re-dials through the all-duty family only.
242
+ * A healthy holder re-dials as is. An unhealthy one waits for the closed renewal and adoption,
243
+ * and a refusal fails this attempt with last-good and debt kept. Nothing is minted locally. */
244
+ renewRemoteBeforeRedial(label: string, read: () => string | undefined): Promise<void>;
245
+ private renewRemoteStandingBundleOnce;
246
+ /** Warn, on every renewal pass, when a $SYS credential is at or past its renewal point.
247
+ *
248
+ * The manager is the renewal owner for every credential it CAN re-sign, and these two are the ones
249
+ * it cannot: they are `rotation-renewed`, so no resident process re-mints them and they simply die
250
+ * on their 30-day horizon. Before this, a mesh that never ran `doctor auth` got no signal at all,
251
+ * it discovered the expiry as an "Authorization Violation" in the delivery log and a refused
252
+ * membership adoption, weeks after the warning would have been actionable (#338). The pass runs
253
+ * every half-TTL of the 24h class, so this repeats about twice a day for the ~7 days between the
254
+ * renewal point and expiry: loud enough to be seen, bounded enough not to be noise.
255
+ *
256
+ * Diagnostic only, and deliberately non-fatal: renewal is an operator action (`cotal down` then
257
+ * `cotal up --rotate-sys`, which needs a broker restart), so the manager must report it, never
258
+ * attempt it. An absent file is the unprovisioned space, reported by the daemon that needs it. */
259
+ private warnOnSystemCredExpiry;
260
+ }
261
+ //# sourceMappingURL=credential-renewal.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"credential-renewal.d.ts","sourceRoot":"","sources":["../src/credential-renewal.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AACtC,OAAO,EAAoC,KAAK,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAKhG,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAQvC;;;;;;;;;;;;;;;;mFAgBmF;A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