@cotal-ai/core 0.5.0 → 0.6.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.
package/dist/acls.d.ts ADDED
@@ -0,0 +1,45 @@
1
+ /**
2
+ * Durable read-ACL registry — read/write helpers over the per-space ACL KV bucket
3
+ * (`cotal_acl_<space>`). One {@link AclRecord} per OWNER under {@link aclKey}, holding that owner's
4
+ * current read ACL (`allowSubscribe`). This is the **keystone** that lets the Plane-3 trusted reader
5
+ * run in a stateless, server-side **delivery daemon**: the reader re-authorizes every durable entry
6
+ * against the owner's ACL read FRESH from here (not the manager's in-memory ledger), so a daemon
7
+ * restart re-reads the truth instead of nak-looping every unknown owner to `term()`.
8
+ *
9
+ * Writes are **privileged** — the manager records an agent's ACL at mint time (the same act as baking
10
+ * it into the JWT); agent-authored ACLs are forbidden (they would self-authorize reads). Every write
11
+ * is a single ATOMIC CAS put of the whole value, so a present record is always complete: a present
12
+ * `allowSubscribe: []` is a known "reads nothing" policy (the reader DROPS), distinct from an ABSENT
13
+ * record (a genuinely-unknown owner — the reader DEFERS, never drops).
14
+ */
15
+ import { type KV } from "@nats-io/kv";
16
+ import type { AclRecord } from "./types.js";
17
+ /** Open the ACL registry bucket. Auth mode OPENs the bucket pre-created at `cotal up`; a privileged
18
+ * caller may pass `{ create: true }` to lazily CREATE it. Mirrors {@link openMembersRegistry}. */
19
+ export declare function openAclRegistry(nc: import("@nats-io/transport-node").NatsConnection, space: string, opts?: {
20
+ create?: boolean;
21
+ }): Promise<KV>;
22
+ /**
23
+ * Read one owner's read-ACL record, or `undefined` if there is NO usable record — absent, deleted,
24
+ * undecodable, or missing the `allowSubscribe` array. The reader maps that `undefined` to DEFER (an
25
+ * unknown owner, e.g. a pre-provision race — never dropped). A PRESENT record returns its
26
+ * `allowSubscribe` as-is, **including `[]`** (a known no-read policy → DROP). The CAS revision is
27
+ * returned alongside for a read-modify-write.
28
+ */
29
+ export declare function readAcl(kv: KV, owner: string): Promise<{
30
+ record: AclRecord;
31
+ revision: number;
32
+ } | undefined>;
33
+ /**
34
+ * Record (set) an owner's read ACL — a single ATOMIC CAS put of the full value, never
35
+ * create-then-populate, so a present record is always complete and `[]` always means "no-read", never
36
+ * "not yet written". Bumps `revision`. Retries a revision conflict by re-reading. Idempotent in
37
+ * effect: writing the same `allowSubscribe` is harmless. Use `allowSubscribe: []` to revoke all reads
38
+ * (the reader then DROPS the owner's entries) — distinct from {@link deleteAcl}, which removes the row.
39
+ */
40
+ export declare function commitAcl(kv: KV, owner: string, allowSubscribe: string[]): Promise<AclRecord>;
41
+ /** Permanently remove an owner's ACL row (GC / footprint deletion — revocation deletes the footprint
42
+ * AFTER invalidating creds). Distinct from a `commitAcl(kv, owner, [])` write, which keeps a present
43
+ * "no-read" record so the reader DROPS (vs. DEFER for an absent owner). */
44
+ export declare function deleteAcl(kv: KV, owner: string): Promise<void>;
45
+ //# sourceMappingURL=acls.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"acls.d.ts","sourceRoot":"","sources":["../src/acls.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,OAAO,EAAO,KAAK,EAAE,EAAE,MAAM,aAAa,CAAC;AAE3C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAE5C;mGACmG;AACnG,wBAAsB,eAAe,CACnC,EAAE,EAAE,OAAO,yBAAyB,EAAE,cAAc,EACpD,KAAK,EAAE,MAAM,EACb,IAAI,GAAE;IAAE,MAAM,CAAC,EAAE,OAAO,CAAA;CAAO,GAC9B,OAAO,CAAC,EAAE,CAAC,CAGb;AAED;;;;;;GAMG;AACH,wBAAsB,OAAO,CAC3B,EAAE,EAAE,EAAE,EACN,KAAK,EAAE,MAAM,GACZ,OAAO,CAAC;IAAE,MAAM,EAAE,SAAS,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,GAAG,SAAS,CAAC,CAU9D;AAED;;;;;;GAMG;AACH,wBAAsB,SAAS,CAAC,EAAE,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,SAAS,CAAC,CA0BnG;AAED;;4EAE4E;AAC5E,wBAAsB,SAAS,CAAC,EAAE,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAEpE"}
package/dist/acls.js ADDED
@@ -0,0 +1,86 @@
1
+ /**
2
+ * Durable read-ACL registry — read/write helpers over the per-space ACL KV bucket
3
+ * (`cotal_acl_<space>`). One {@link AclRecord} per OWNER under {@link aclKey}, holding that owner's
4
+ * current read ACL (`allowSubscribe`). This is the **keystone** that lets the Plane-3 trusted reader
5
+ * run in a stateless, server-side **delivery daemon**: the reader re-authorizes every durable entry
6
+ * against the owner's ACL read FRESH from here (not the manager's in-memory ledger), so a daemon
7
+ * restart re-reads the truth instead of nak-looping every unknown owner to `term()`.
8
+ *
9
+ * Writes are **privileged** — the manager records an agent's ACL at mint time (the same act as baking
10
+ * it into the JWT); agent-authored ACLs are forbidden (they would self-authorize reads). Every write
11
+ * is a single ATOMIC CAS put of the whole value, so a present record is always complete: a present
12
+ * `allowSubscribe: []` is a known "reads nothing" policy (the reader DROPS), distinct from an ABSENT
13
+ * record (a genuinely-unknown owner — the reader DEFERS, never drops).
14
+ */
15
+ import { Kvm } from "@nats-io/kv";
16
+ import { aclBucket, aclKey } from "./subjects.js";
17
+ /** Open the ACL registry bucket. Auth mode OPENs the bucket pre-created at `cotal up`; a privileged
18
+ * caller may pass `{ create: true }` to lazily CREATE it. Mirrors {@link openMembersRegistry}. */
19
+ export async function openAclRegistry(nc, space, opts = {}) {
20
+ const kvm = new Kvm(nc);
21
+ return opts.create ? kvm.create(aclBucket(space)) : kvm.open(aclBucket(space));
22
+ }
23
+ /**
24
+ * Read one owner's read-ACL record, or `undefined` if there is NO usable record — absent, deleted,
25
+ * undecodable, or missing the `allowSubscribe` array. The reader maps that `undefined` to DEFER (an
26
+ * unknown owner, e.g. a pre-provision race — never dropped). A PRESENT record returns its
27
+ * `allowSubscribe` as-is, **including `[]`** (a known no-read policy → DROP). The CAS revision is
28
+ * returned alongside for a read-modify-write.
29
+ */
30
+ export async function readAcl(kv, owner) {
31
+ const e = await kv.get(aclKey(owner));
32
+ if (!e || e.operation === "DEL" || e.operation === "PURGE")
33
+ return undefined;
34
+ try {
35
+ const record = e.json();
36
+ if (!Array.isArray(record.allowSubscribe))
37
+ return undefined; // half/garbled — treat as unknown (DEFER)
38
+ return { record, revision: e.revision };
39
+ }
40
+ catch {
41
+ return undefined;
42
+ }
43
+ }
44
+ /**
45
+ * Record (set) an owner's read ACL — a single ATOMIC CAS put of the full value, never
46
+ * create-then-populate, so a present record is always complete and `[]` always means "no-read", never
47
+ * "not yet written". Bumps `revision`. Retries a revision conflict by re-reading. Idempotent in
48
+ * effect: writing the same `allowSubscribe` is harmless. Use `allowSubscribe: []` to revoke all reads
49
+ * (the reader then DROPS the owner's entries) — distinct from {@link deleteAcl}, which removes the row.
50
+ */
51
+ export async function commitAcl(kv, owner, allowSubscribe) {
52
+ const key = aclKey(owner);
53
+ for (let attempt = 0; attempt < 5; attempt++) {
54
+ const cur = await readAcl(kv, owner);
55
+ const next = {
56
+ allowSubscribe: [...allowSubscribe],
57
+ revision: (cur?.record.revision ?? 0) + 1,
58
+ updatedAt: Date.now(),
59
+ };
60
+ const data = new TextEncoder().encode(JSON.stringify(next));
61
+ if (!cur) {
62
+ try {
63
+ await kv.create(key, data);
64
+ return next;
65
+ }
66
+ catch {
67
+ continue; // lost the create race — re-read and try as an update
68
+ }
69
+ }
70
+ try {
71
+ await kv.update(key, data, cur.revision);
72
+ return next;
73
+ }
74
+ catch {
75
+ continue; // revision moved under us — re-read and retry
76
+ }
77
+ }
78
+ throw new Error(`acl CAS exhausted retries for ${owner}`);
79
+ }
80
+ /** Permanently remove an owner's ACL row (GC / footprint deletion — revocation deletes the footprint
81
+ * AFTER invalidating creds). Distinct from a `commitAcl(kv, owner, [])` write, which keeps a present
82
+ * "no-read" record so the reader DROPS (vs. DEFER for an absent owner). */
83
+ export async function deleteAcl(kv, owner) {
84
+ await kv.purge(aclKey(owner));
85
+ }
86
+ //# sourceMappingURL=acls.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"acls.js","sourceRoot":"","sources":["../src/acls.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,OAAO,EAAE,GAAG,EAAW,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAGlD;mGACmG;AACnG,MAAM,CAAC,KAAK,UAAU,eAAe,CACnC,EAAoD,EACpD,KAAa,EACb,OAA6B,EAAE;IAE/B,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,EAAE,CAAC,CAAC;IACxB,OAAO,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC;AACjF,CAAC;AAED;;;;;;GAMG;AACH,MAAM,CAAC,KAAK,UAAU,OAAO,CAC3B,EAAM,EACN,KAAa;IAEb,MAAM,CAAC,GAAG,MAAM,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;IACtC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,KAAK,KAAK,IAAI,CAAC,CAAC,SAAS,KAAK,OAAO;QAAE,OAAO,SAAS,CAAC;IAC7E,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,CAAC,CAAC,IAAI,EAAa,CAAC;QACnC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,cAAc,CAAC;YAAE,OAAO,SAAS,CAAC,CAAC,0CAA0C;QACvG,OAAO,EAAE,MAAM,EAAE,QAAQ,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;AAC5D,CAAC;AAED;;4EAE4E;AAC5E,MAAM,CAAC,KAAK,UAAU,SAAS,CAAC,EAAM,EAAE,KAAa;IACnD,MAAM,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;AAChC,CAAC"}
package/dist/command.d.ts CHANGED
@@ -28,6 +28,9 @@ export interface Command extends Extension {
28
28
  /** One-line usage shown by `cotal <cmd> --help` and on an invalid-argument error.
29
29
  * Falls back to `summary` when unset. */
30
30
  readonly usage?: string;
31
+ /** Hide from the top-level help listing while keeping it runnable — for dev/test aids
32
+ * (e.g. `demo`) that clutter the surface but stay documented and invocable. */
33
+ readonly hidden?: boolean;
31
34
  run(argv: string[]): Promise<void>;
32
35
  /** Optional shell-completion provider, owned by the command exactly as `run` is. Given the
33
36
  * args typed so far (everything after the command name; the last element is the word being
@@ -1 +1 @@
1
- {"version":3,"file":"command.d.ts","sourceRoot":"","sources":["../src/command.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE/C;0FAC0F;AAC1F,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;;;uFAIuF;AACvF,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,cAAc,EAAE,CAAC;IACxB,SAAS,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,SAAS,CAAC;CAC/C;AAED;;;;GAIG;AACH,MAAM,WAAW,OAAQ,SAAQ,SAAS;IACxC,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC;IACzB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,mFAAmF;IACnF,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB;8CAC0C;IAC1C,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACnC;;;;2FAIuF;IACvF,QAAQ,CAAC,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,gBAAgB,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC;CACzE"}
1
+ {"version":3,"file":"command.d.ts","sourceRoot":"","sources":["../src/command.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE/C;0FAC0F;AAC1F,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;;;uFAIuF;AACvF,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,cAAc,EAAE,CAAC;IACxB,SAAS,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,SAAS,CAAC;CAC/C;AAED;;;;GAIG;AACH,MAAM,WAAW,OAAQ,SAAQ,SAAS;IACxC,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC;IACzB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,mFAAmF;IACnF,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB;8CAC0C;IAC1C,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB;oFACgF;IAChF,QAAQ,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC;IAC1B,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACnC;;;;2FAIuF;IACvF,QAAQ,CAAC,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,gBAAgB,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC;CACzE"}
@@ -1,5 +1,6 @@
1
1
  import { EventEmitter } from "node:events";
2
- import type { AgentCard, ChannelConfig, ControlReply, ControlRequest, ControlRequestInit, EndpointRef, Part, Presence, PresenceStatus, AttentionMode, ChannelMode, CotalMessage } from "./types.js";
2
+ import type { AgentCard, ChannelConfig, ControlReply, ControlRequest, ControlRequestInit, EndpointRef, Part, Presence, PresenceStatus, AttentionMode, ChannelMode, CotalMessage, DeliveryClass } from "./types.js";
3
+ import { type DeliveryLeaseInfo } from "./lease.js";
3
4
  export declare const DEFAULT_SERVER = "nats://127.0.0.1:4222";
4
5
  /** Space joined when none is given on the CLI (the `cotal-<space>` cmux tab, etc.). */
5
6
  export declare const DEFAULT_SPACE = "main";
@@ -50,6 +51,9 @@ export interface ChannelMember {
50
51
  role?: string;
51
52
  live: boolean;
52
53
  }
54
+ /** A value or a promise of it — the Plane-3 `aclFor` reads the durable ACL registry FRESH per entry
55
+ * (async), so the reader/fan-out call sites await it. */
56
+ type MaybePromise<T> = T | Promise<T>;
53
57
  export declare class CotalEndpoint extends EventEmitter {
54
58
  readonly card: AgentCard;
55
59
  readonly space: string;
@@ -72,10 +76,17 @@ export declare class CotalEndpoint extends EventEmitter {
72
76
  private jsm?;
73
77
  private kv?;
74
78
  private channelKv?;
75
- /** Plane-3 durable-membership registry KV — lazily opened by the privileged (manager) endpoint. */
79
+ /** Plane-3 durable-membership registry KV — lazily opened by the privileged delivery daemon (or a
80
+ * short-lived provisioner). */
76
81
  private membersKv?;
77
- /** When set, this endpoint hosts the Plane-3 fan-out writer + trusted reader (the manager). `aclFor`
78
- * maps an owner id to its current read ACL (`allowSubscribe`) for the reader's re-authorization. */
82
+ private aclKv?;
83
+ private deliveryKv?;
84
+ /** The live `ctl.delivery` serve subscription (delivery daemon) — re-created on every (re)connect by
85
+ * {@link armDeliveryControl}; tracked so the stale one is dropped on reconnect. */
86
+ private deliveryServeSub?;
87
+ /** When set, this endpoint hosts the Plane-3 fan-out writer + trusted reader (the server-side delivery
88
+ * daemon). `aclFor` maps an owner id to its current read ACL (`allowSubscribe`) for the reader's
89
+ * re-authorization — read FRESH per entry from the durable ACL registry KV, hence async. */
79
90
  private plane3?;
80
91
  /** Live local cache of the channel registry (key = channel token), kept by a KV watch. */
81
92
  private readonly channelConfigs;
@@ -111,6 +122,12 @@ export declare class CotalEndpoint extends EventEmitter {
111
122
  * {@link pendingDurableLeaves} (the connector shows it in `cotal_channels`, never as ordinary
112
123
  * absence). Persists across reconnect; cleared on tombstone success or full stop. */
113
124
  private readonly pendingDurableLeave;
125
+ /** Boot durable channels whose self-join hasn't yet established a membership (daemon down/absent at
126
+ * first connect, or a transient `durable:false`). {@link reconcileBootJoin} retries with capped
127
+ * backoff until the membership exists or the channel is left — so a first-connect daemon outage
128
+ * self-heals on recovery instead of leaving the channel silently live-only. Surfaced to the connector
129
+ * via {@link hasDurableMembership} (a joined durable channel NOT yet a member renders degraded). */
130
+ private readonly pendingBootJoins;
114
131
  /** Chat-join subjects currently being broker-confirmed. An out-of-ACL subscribe among these trips an
115
132
  * EXPECTED async permission violation that joinChannel turns into a clean throw, so watchStatus
116
133
  * suppresses it rather than surfacing a spurious connection error. */
@@ -221,10 +238,26 @@ export declare class CotalEndpoint extends EventEmitter {
221
238
  tap(handler: (subject: string, msg: CotalMessage | undefined) => void, opts?: {
222
239
  subject?: string;
223
240
  }): void;
224
- /** Serve control requests for a service (manager side). */
225
- serveControl(service: string, handler: (req: ControlRequest) => Promise<ControlReply> | ControlReply): void;
241
+ /** Serve control requests for a service. Returns the subscription so a caller that re-registers on
242
+ * reconnect (the delivery daemon) can drop the stale one. `boundReply` is REQUIRED for any service
243
+ * whose responder holds a wildcard publish grant over the service subtree (the delivery daemon's
244
+ * `ctl.delivery.*.reply.>`): without it, an authenticated caller could set its reply target to a
245
+ * PEER's reply lane (`ctl.delivery.<victim>.reply.<n>`) and turn the responder into a confused
246
+ * deputy — the broker does NOT permission-check the requester's embedded reply subject. With it, a
247
+ * reply is published only when `m.reply` is under the AUTHENTICATED request subject
248
+ * (`${m.subject}.reply.…`), binding the reply to the broker-policed sender token. (The manager's
249
+ * tiers reply into the per-id `_INBOX` and leave it off.) */
250
+ serveControl(service: string, handler: (req: ControlRequest) => Promise<ControlReply> | ControlReply, opts?: {
251
+ boundReply?: boolean;
252
+ }): import("@nats-io/transport-node").Subscription;
226
253
  /** Send a control request to a service and await its reply (client side). */
227
254
  requestControl(service: string, req: ControlRequestInit, timeoutMs?: number): Promise<ControlReply>;
255
+ /** Send a durable-membership request to the SERVER-SIDE delivery daemon (`ctl.delivery`) and await its
256
+ * reply. Unlike {@link requestControl}, the reply rides a subject UNDER `ctl.delivery.<id>.>` (not the
257
+ * per-id `_INBOX`), so the scoped delivery cred can answer without broad inbox-publish — see
258
+ * CONTROL_DELIVERY. `noMux` lets us name the reply subject while keeping NoResponders detection (so a
259
+ * caller can fail-closed vs. degrade to live-only when no daemon is present). */
260
+ private requestDelivery;
228
261
  getRoster(): Presence[];
229
262
  setActivity(activity: string): Promise<void>;
230
263
  setStatus(status: PresenceStatus): Promise<void>;
@@ -245,14 +278,19 @@ export declare class CotalEndpoint extends EventEmitter {
245
278
  /** Effective replay-on-join policy for a channel: per-channel override ?? space default ??
246
279
  * true. Reads the live cache, so it reflects runtime registry edits. */
247
280
  channelReplay(channel: string): boolean;
281
+ /** Effective delivery class for a channel (per-channel override ?? space default ?? "durable"),
282
+ * from the live watch cache — drives the non-gating delivery-health surface (only durable-class
283
+ * channels have a Plane-3 backstop to report on). */
284
+ channelDeliveryClass(channel: string): DeliveryClass;
248
285
  /** The channels this endpoint is currently subscribed to (live — reflects join/leave). */
249
286
  joinedChannels(): string[];
250
287
  /**
251
288
  * Join a channel mid-session: open a native core subscription (manager-free live read, broker-
252
289
  * confirmed against `sub.allow`), capture the stream frontier as the join watermark, backfill its
253
- * history if replay is on, and — for a `durable`-class channel under a manager request a Plane-3
254
- * durable backstop. Idempotent: re-joining is a no-op (no re-backfill). Returns the backfill count +
255
- * whether the durable backstop is active (+ a `reason` when a durable channel couldn't get one).
290
+ * history if replay is on, and — for a `durable`-class channel when a delivery daemon is present
291
+ * request a Plane-3 durable backstop (via `ctl.delivery`). Idempotent: re-joining is a no-op (no
292
+ * re-backfill). Returns the backfill count + whether the durable backstop is active (+ a `reason`
293
+ * when a durable channel couldn't get one).
256
294
  */
257
295
  joinChannel(channel: string): Promise<{
258
296
  joined: boolean;
@@ -322,20 +360,6 @@ export declare class CotalEndpoint extends EventEmitter {
322
360
  /** Create the three backing streams for this space (idempotent). Open-mode lazy create;
323
361
  * the same definitions are used by `cotal up` at privileged setup. */
324
362
  private ensureStreams;
325
- /**
326
- * Privileged: write an agent's BOOT durable membership — each `durable`-class channel in its boot
327
- * subscribe set gets a Plane-3 durable-active record (via {@link durableJoinFor}: cursor capture +
328
- * activation catch-up), so it receives durable backstop copies from boot exactly like a runtime
329
- * `durableJoin`. `live`-class (and non-concrete) channels are skipped. Idempotent.
330
- *
331
- * Writes the durable RECORDS with the caller's privileged creds — it does NOT require this endpoint
332
- * to host the runtime fan-out/reader loops (a space-level manager service), so EVERY auth launcher
333
- * provisions identically: the manager AND the short-lived `cotal spawn` provisioner both write boot
334
- * records, which the space's manager then delivers (no silent no-op — that would hide a boot
335
- * membership; AGENTS.md "no fallbacks"). A space running no manager is live-only for everyone (the
336
- * records exist; nothing delivers them until a manager hosts the loops).
337
- */
338
- provisionMembership(targetId: string, channels: string[]): Promise<void>;
339
363
  /**
340
364
  * Privileged: pre-create an agent's DM inbox durable (auth mode), so the agent can BIND
341
365
  * it without holding CONSUMER.CREATE on DM_<space>. The creator sets the filter to
@@ -359,13 +383,51 @@ export declare class CotalEndpoint extends EventEmitter {
359
383
  * Idempotent per role. The caller must be permissive on TASK_<space>.
360
384
  */
361
385
  provisionTaskQueue(role: string): Promise<void>;
362
- /** Lazily open the privileged members registry KV (manager / open-mode self). */
386
+ /** Lazily open the privileged members registry KV (delivery daemon / open-mode self). */
363
387
  private membersRegistry;
388
+ /** Lazily open the durable read-ACL registry KV. Privileged write (the manager records an agent's
389
+ * ACL at mint); the delivery daemon reads it fresh per durable entry to re-authorize. */
390
+ private aclRegistry;
391
+ /** Privileged ({@link DurableProvisioner}): record an agent's read ACL in the durable registry at
392
+ * provision/mint time — the same act as baking it into the JWT, persisted so the server-side
393
+ * delivery daemon can re-authorize the agent's durable entries and validate its runtime
394
+ * durable-joins without holding any in-memory ledger. Written ATOMICALLY ({@link writeAclRecord}),
395
+ * so a present record is always complete (`[]` = known no-read, never a half-write). */
396
+ commitAcl(targetId: string, allowSubscribe: string[]): Promise<void>;
397
+ /** The server-side delivery daemon's fresh-per-entry ACL read: an owner's CURRENT read ACL
398
+ * (`allowSubscribe`) from the durable registry, or `undefined` if no record (an unknown owner — the
399
+ * reader DEFERS, never drops). A present `[]` (known no-read) returns `[]` (the reader DROPS). */
400
+ aclForOwner(owner: string): Promise<string[] | undefined>;
401
+ /** Lazily open the delivery lease/readiness KV (pre-created at `cotal up`; bind, never create). */
402
+ private deliveryRegistry;
403
+ private encodeLease;
404
+ /** Acquire the single-flight delivery lease for a shard via an ATOMIC CAS create, marked NOT-ready.
405
+ * THROWS if a live lease exists — a loud refusal-to-bind (the daemon exits), never a retry, so two
406
+ * daemons can't split a durable's delivery. A crashed holder's lease auto-expires (bucket TTL),
407
+ * freeing a re-acquire. Acquired BEFORE binding (single-flight gate); {@link markDeliveryLeaseReady}
408
+ * flips it ready AFTER the loops + `ctl.delivery` are bound. Returns the lease revision. */
409
+ acquireDeliveryLease(shardIndex: number): Promise<number>;
410
+ /** Flip the held lease to READY (CAS `kv.update`) AFTER `startPlane3` has bound the loops + the
411
+ * `ctl.delivery` responder — so "lease ready" proves the responder is up, not just that the slot was
412
+ * claimed. Returns the new revision. */
413
+ markDeliveryLeaseReady(shardIndex: number, revision: number): Promise<number>;
414
+ /** Renew the held lease (CAS `kv.update` against `revision`, keeping `ready:true`) to refresh it before
415
+ * the bucket TTL expires it. Returns the new revision. Throws if the revision moved (lost the lease —
416
+ * the daemon should exit). */
417
+ renewDeliveryLease(shardIndex: number, revision: number): Promise<number>;
418
+ /** Release the held lease on clean shutdown so a replacement daemon re-acquires immediately (best
419
+ * effort — a crash just lets the bucket TTL expire it). */
420
+ releaseDeliveryLease(shardIndex: number): Promise<void>;
421
+ /** Read a shard's delivery lease (the daemon-availability signal), or `undefined` if none is live.
422
+ * READ-ONLY surface — drives Component 6's `cotal_channels` delivery-health field (an agent reads it
423
+ * under its own cred, which holds lease-bucket read but no write). */
424
+ readDeliveryLease(shardIndex: number): Promise<DeliveryLeaseInfo | undefined>;
364
425
  /** Privileged: one owner's NON-TOMBSTONED durable memberships as `{channel, generation, activated}` —
365
- * the manager serves this to a connecting agent (via the `listMemberships` self-service op). The agent
366
- * hydrates its leave mirror from the ACTIVATED ones (the confirmed backstops), but the non-activated
367
- * ones are returned too so `leaveChannel` can discover + close a record that still routes under the
368
- * pure-interval predicate (a crash-stuck pending activation) — without reading the privileged KV. */
426
+ * the server-side delivery daemon serves this to a connecting agent (the `listMemberships` op on
427
+ * `ctl.delivery`). The agent seeds its leave mirror from the ACTIVATED ones (the confirmed backstops),
428
+ * but the non-activated ones are returned too so `leaveChannel` can discover + close a record that
429
+ * still routes under the pure-interval predicate (a crash-stuck pending activation) — without reading
430
+ * the privileged KV itself. */
369
431
  ownerMemberships(owner: string): Promise<{
370
432
  channel: string;
371
433
  generation: number;
@@ -385,16 +447,15 @@ export declare class CotalEndpoint extends EventEmitter {
385
447
  * BLOCKER-1: the shared fan-out cursor advances independently of the stream frontier). */
386
448
  private fanoutDeliveredSeq;
387
449
  /**
388
- * Privileged durable-JOIN write (the manager calls this after validating channel ⊆ allowSubscribe;
389
- * {@link provisionMembership} calls it at provision time for boot channels): capture `joinCursor`,
390
- * commit a `durable-active` record (CAS + generation bump), then ACTIVATION CATCH-UP idempotently
391
- * copies `(joinCursor, fence]` into the owner inbox where `fence = max(frontier, fanoutDelivered)` —
392
- * fan-out owns `seq > fence`. Idempotent against a timeout-retry (an already-activated membership
393
- * no-ops). Returns `{durable:false}` (honest degrade) only if the catch-up window was evicted.
450
+ * Privileged durable-JOIN write (v3: the delivery daemon calls this from its `ctl.delivery` handler
451
+ * after validating channel the caller's read ACL): capture `joinCursor`, commit a `durable-active`
452
+ * record (CAS + generation bump), then ACTIVATION CATCH-UP idempotently copies `(joinCursor, fence]`
453
+ * into the owner inbox where `fence = max(frontier, fanoutDelivered)` — fan-out owns `seq > fence`.
454
+ * Idempotent against a timeout-retry (an already-activated membership no-ops). Returns `{durable:false}`
455
+ * (honest degrade) only if the catch-up window was evicted.
394
456
  *
395
- * This writes durable KV + dinbox state with the caller's privileged creds; it does NOT require THIS
396
- * endpoint to host the fan-out/reader loops (those are a space-level manager service). So a
397
- * short-lived provisioner can write a boot membership a separate long-lived manager then delivers.
457
+ * Runs on the daemon (which hosts the fan-out/reader loops + the members KV), so catch-up + the
458
+ * activation fence read are in-process no cross-process cursor read.
398
459
  */
399
460
  durableJoinFor(owner: string, channel: string): Promise<{
400
461
  durable: boolean;
@@ -409,16 +470,45 @@ export declare class CotalEndpoint extends EventEmitter {
409
470
  * `chathist_<id>`/`histLock` — red-team HIGH-8). `evicted` ⇒ the oldest eligible seq aged out under
410
471
  * `discard=Old` (the start seq could not be served), a durable shortfall the caller surfaces. */
411
472
  private catchupCopy;
412
- /** Start the Plane-3 fan-out writer + trusted reader on THIS (privileged) endpoint. `aclFor` maps an
413
- * owner id to its current read ACL for the reader's re-authorization (the manager passes its managed
414
- * set). Call once after connect; idempotent durable creation lets it resume on a manager restart. */
415
- startPlane3(aclFor: (owner: string) => string[] | undefined): Promise<void>;
473
+ /** Start the Plane-3 fan-out writer + trusted reader on THIS (privileged, server-side delivery-daemon)
474
+ * endpoint, AND serve the `ctl.delivery` control service (runtime durable join/leave/list). `aclFor`
475
+ * maps an owner id to its current read ACL for the reader's re-authorization read FRESH per entry
476
+ * from the durable ACL registry (async). Call once after connect; idempotent durable creation lets it
477
+ * resume on a daemon restart. Both the JS loops AND the `ctl.delivery` subscription are (re)bound by
478
+ * {@link armPlane3} on EVERY (re)connect — a reconnect drains the old connection, so re-binding both
479
+ * is required, not optional (the responder would otherwise be lost on a broker blip). */
480
+ startPlane3(aclFor: (owner: string) => MaybePromise<string[] | undefined>): Promise<void>;
481
+ /** Serve one runtime durable-membership control request (the server-side delivery daemon). The caller
482
+ * id is the authenticated subject sender ({@link serveControl} fail-closes on a mismatch). Validation
483
+ * is against the durable ACL registry — the SAME KV the reader re-auths against (single source of
484
+ * truth, no in-memory ledger to drift). */
485
+ private handleDeliveryControl;
486
+ /** Validate the channel ARG shape only — non-blank, valid, concrete (NO ACL check, that is op-specific).
487
+ * Returns the channel on success or a ControlReply error to short-circuit. */
488
+ private checkDurableChannelArg;
489
+ /** JOIN requires the channel be within the caller's CURRENT read ACL (you can't durable-subscribe a
490
+ * channel you may not read). */
491
+ private deliveryJoin;
492
+ /** LEAVE must NOT require current-ACL coverage. Leave fires precisely when the ACL was narrowed/revoked
493
+ * (a refused live sub → {@link closeRefusedMembership}); gating the tombstone on the current ACL would
494
+ * loop forever and leave the SPEC §7 boundary open (the membership could resume if the ACL is later
495
+ * restored). The guards are: authenticated caller (serveControl), concrete channel, a finite generation
496
+ * (the join epoch — without it a stale/replayed leave could tombstone a newer rejoin), and an EXISTING
497
+ * own membership; `durableLeaveFor` → `tombstoneMember` then enforces the generation match. */
498
+ private deliveryLeave;
416
499
  /** (Re)bind the Plane-3 fan-out writer + trusted reader. Idempotent — the durables resume from their
417
500
  * cursor. Called by {@link startPlane3} once AND by {@link connectAndBind} on every (re)connect, so
418
- * a manager-endpoint reconnect RE-ARMS the backstop. Without this, a broker blip would silently kill
501
+ * the delivery daemon's reconnect RE-ARMS the backstop + the ctl.delivery responder. Without this, a broker blip would silently kill
419
502
  * the loops while `durableJoinFor` kept reporting `durable:true` (the impl-review's BLOCKER-1). No-op
420
503
  * unless this endpoint hosts Plane-3 (`this.plane3` set). */
421
504
  private armPlane3;
505
+ /** (Re)register the `ctl.delivery` control responder on the CURRENT connection. A reconnect drains the
506
+ * old connection (the old sub is dead and `clearConnectionScoped` leaves caller-owned subs alone), so
507
+ * this MUST run on every arm — otherwise durable join/leave/list silently lose their responder after a
508
+ * broker blip. The stale sub is dropped (unsubscribed + removed from `this.subs`) before re-creating.
509
+ * `boundReply` is essential here: the daemon holds a wildcard reply-publish grant, so the serve path
510
+ * must reject any reply target outside the authenticated sender's own subtree (confused-deputy fix). */
511
+ private armDeliveryControl;
422
512
  /** Fan-out loop: bind the privileged `fanout` durable on CHAT and route each message (routing only —
423
513
  * the trusted reader is the auth gate). */
424
514
  private runFanout;
@@ -434,13 +524,13 @@ export declare class CotalEndpoint extends EventEmitter {
434
524
  * has moved to DLV — an §8 equivalent per-member at-least-once mechanism). The agent acks DLV. */
435
525
  private readerHandle;
436
526
  /** Agent-side: bind + pump our pre-created Plane-3 DELIVER durable (`dlv_<id>`). Every message here is
437
- * manager-written (DLV is manager-write-only, broker-enforced) and is a CHANNEL message by contract
527
+ * delivery-daemon-written (DLV is delivery-write-only, broker-enforced) and is a CHANNEL message by contract
438
528
  * (the backstop never carries DMs), so `kind=channel` is path-derived (SPEC §4) and the body is
439
529
  * trusted (no spoof-guard). `durable:true` — real JetStream ack, coalesced with the core-sub live
440
530
  * copy by `MeshAgent.ingest`. No-op when the durable isn't present (open mode / not provisioned). */
441
531
  private pumpDlv;
442
- /** Agent-side: request a Plane-3 durable backstop for a channel via the manager (ctl.self). Throws
443
- * when no privileged writer is present (open / manager-less). 30s timeout — activation catch-up may
532
+ /** Agent-side: request a Plane-3 durable backstop for a channel via the server-side delivery daemon (ctl.delivery). Throws
533
+ * when no privileged writer is present (open / no delivery daemon). 30s timeout — activation catch-up may
444
534
  * run before the reply (the window is small, but a busy channel can take more than the 5s default). */
445
535
  durableJoinChannel(channel: string): Promise<{
446
536
  durable: boolean;
@@ -448,7 +538,7 @@ export declare class CotalEndpoint extends EventEmitter {
448
538
  generation?: number;
449
539
  }>;
450
540
  /** Agent-side: release a Plane-3 durable backstop (tombstone membership at the leave cursor). Passes
451
- * the join generation so a stale leave can't tombstone a newer rejoin (the manager validates it). */
541
+ * the join generation so a stale leave can't tombstone a newer rejoin (the delivery daemon validates it). */
452
542
  durableLeaveChannel(channel: string, generation?: number): Promise<void>;
453
543
  /** Fail-closed async cleanup for a channel forced out by a LATE sub.allow refusal (the broker revoked
454
544
  * the live read). The sync sub callback can't await, so this RETRIES the Plane-3 tombstone with capped
@@ -456,7 +546,7 @@ export declare class CotalEndpoint extends EventEmitter {
456
546
  * is reachable, never a silent give-up. While pending, the channel is tracked in
457
547
  * {@link pendingDurableLeave} and surfaced via {@link pendingDurableLeaves} (the connector shows it in
458
548
  * `cotal_channels` as `durable-unclosed`, never ordinary absence). The generation is kept the whole
459
- * time. Authoritative closure of a revoked membership is also the manager's job (revocation). */
549
+ * time. Authoritative closure of a revoked membership is also handled by revocation (rotate creds + tear down). */
460
550
  private closeRefusedMembership;
461
551
  /** Channels with a Plane-3 durable membership whose §7 tombstone is still pending after a refused live
462
552
  * sub (see {@link closeRefusedMembership}) — surfaced by the connector as a `durable-unclosed` state so
@@ -468,15 +558,29 @@ export declare class CotalEndpoint extends EventEmitter {
468
558
  private isNoResponders;
469
559
  /** Agent-side: this session's CURRENT durable memberships (channel + join generation) from the
470
560
  * manager — the agent holds no read on the privileged members KV. `undefined` ⇒ NO control responder
471
- * (open / manager-less, so there is no Plane-3 and no memberships). THROWS on a responder-present RPC
561
+ * (open / no delivery daemon, so there is no Plane-3 and no memberships). THROWS on a responder-present RPC
472
562
  * failure, so a caller can FAIL-CLOSED rather than mistaking a transient error for "no membership". */
473
563
  private fetchMemberships;
474
- /** Agent-side: seed `plane3Channels` with this session's boot durable memberships + generations on
475
- * first connect (the agent holds no read on the privileged members KV). A best-effort OPTIMIZATION: it
476
- * pre-fills the leave-generation mirror + the durable-state surface. If it can't (a transient manager
477
- * error), {@link leaveChannel} re-resolves the generation on demand and fails closed there so a
478
- * missed hydration never silently leaves a boot durable channel untombstonable. */
479
- private hydrateMemberships;
564
+ /** Agent-side, first connect (auth): SELF-JOIN this session's durable boot channels via the
565
+ * server-side delivery daemon replacing the old manager-written boot membership. Each concrete
566
+ * `durable`-class boot channel gets a `durableJoin` whose returned generation seeds the leave mirror
567
+ * + durable-state surface; an already-active membership (a relaunch) is idempotent (no re-catch-up).
568
+ * If the daemon is down/absent at first connect (or reports a transient `durable:false`), the channel
569
+ * is handed to {@link reconcileBootJoin} for capped-backoff retry — so the backstop is RESTORED once
570
+ * the daemon recovers, not left silently live-only. Until a membership exists the channel renders
571
+ * degraded in `cotal_channels` ({@link hasDurableMembership}). */
572
+ private armBootDurableMemberships;
573
+ /** Retry a boot durable self-join with capped backoff until a membership EXISTS (success → seed
574
+ * `plane3Channels`) or the channel is left / the endpoint stops. Mirrors {@link closeRefusedMembership}:
575
+ * a one-shot first-connect attempt that swallowed a daemon outage would leave the boot channel live-only
576
+ * forever after the daemon recovers (and the lease-based health could then read "active" with no owner
577
+ * membership). This loop is the reconcile that closes that gap. Idempotent — a channel already pending
578
+ * is not double-driven; survives reconnect (it re-issues `durableJoinChannel` on the current connection). */
579
+ private reconcileBootJoin;
580
+ /** True if this session holds an established Plane-3 durable membership for `channel` (in `plane3Channels`).
581
+ * Drives the membership-aware delivery-health surface: a joined durable channel that is NOT yet a member
582
+ * (boot self-join pending / daemon down) must render degraded, never "active" off a live lease alone. */
583
+ hasDurableMembership(channel: string): boolean;
480
584
  /** Lazily obtain a JetStream manager — so a non-consuming endpoint (e.g. the supervisor,
481
585
  * consume:false) can still pre-create others' durables. */
482
586
  private manager;
@@ -1 +1 @@
1
- {"version":3,"file":"endpoint.d.ts","sourceRoot":"","sources":["../src/endpoint.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AA8B3C,OAAO,KAAK,EACV,SAAS,EACT,aAAa,EAEb,YAAY,EACZ,cAAc,EACd,kBAAkB,EAElB,WAAW,EAEX,IAAI,EACJ,QAAQ,EACR,cAAc,EACd,aAAa,EACb,WAAW,EACX,YAAY,EAIb,MAAM,YAAY,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