@cotal-ai/core 0.11.6 → 0.13.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 +31 -7
- package/dist/acls.d.ts.map +1 -1
- package/dist/acls.js +105 -17
- package/dist/acls.js.map +1 -1
- package/dist/agent-file.js +1 -1
- package/dist/agent-file.js.map +1 -1
- package/dist/auth-provider.d.ts +90 -10
- package/dist/auth-provider.d.ts.map +1 -1
- package/dist/auth-provider.js.map +1 -1
- package/dist/backup-config.d.ts +55 -0
- package/dist/backup-config.d.ts.map +1 -0
- package/dist/backup-config.js +243 -0
- package/dist/backup-config.js.map +1 -0
- package/dist/backup.d.ts +86 -0
- package/dist/backup.d.ts.map +1 -0
- package/dist/backup.js +497 -0
- package/dist/backup.js.map +1 -0
- package/dist/broker-floor.d.ts +34 -0
- package/dist/broker-floor.d.ts.map +1 -0
- package/dist/broker-floor.js +39 -0
- package/dist/broker-floor.js.map +1 -0
- package/dist/canonical.d.ts +24 -0
- package/dist/canonical.d.ts.map +1 -0
- package/dist/canonical.js +159 -0
- package/dist/canonical.js.map +1 -0
- package/dist/channels.d.ts.map +1 -1
- package/dist/channels.js +8 -1
- package/dist/channels.js.map +1 -1
- package/dist/connector.d.ts +4 -0
- package/dist/connector.d.ts.map +1 -1
- package/dist/endpoint-action.d.ts +424 -0
- package/dist/endpoint-action.d.ts.map +1 -0
- package/dist/endpoint-action.js +910 -0
- package/dist/endpoint-action.js.map +1 -0
- package/dist/endpoint-binding.d.ts +344 -0
- package/dist/endpoint-binding.d.ts.map +1 -0
- package/dist/endpoint-binding.js +753 -0
- package/dist/endpoint-binding.js.map +1 -0
- package/dist/endpoint-checkpoint.d.ts +292 -0
- package/dist/endpoint-checkpoint.d.ts.map +1 -0
- package/dist/endpoint-checkpoint.js +818 -0
- package/dist/endpoint-checkpoint.js.map +1 -0
- package/dist/endpoint-cluster.d.ts +95 -0
- package/dist/endpoint-cluster.d.ts.map +1 -0
- package/dist/endpoint-cluster.js +194 -0
- package/dist/endpoint-cluster.js.map +1 -0
- package/dist/endpoint-contract-store.d.ts +90 -0
- package/dist/endpoint-contract-store.d.ts.map +1 -0
- package/dist/endpoint-contract-store.js +348 -0
- package/dist/endpoint-contract-store.js.map +1 -0
- package/dist/endpoint-envelope.d.ts +165 -0
- package/dist/endpoint-envelope.d.ts.map +1 -0
- package/dist/endpoint-envelope.js +346 -0
- package/dist/endpoint-envelope.js.map +1 -0
- package/dist/endpoint-grants.d.ts +123 -0
- package/dist/endpoint-grants.d.ts.map +1 -0
- package/dist/endpoint-grants.js +215 -0
- package/dist/endpoint-grants.js.map +1 -0
- package/dist/endpoint-guard.d.ts +222 -0
- package/dist/endpoint-guard.d.ts.map +1 -0
- package/dist/endpoint-guard.js +468 -0
- package/dist/endpoint-guard.js.map +1 -0
- package/dist/endpoint-handle.d.ts +176 -0
- package/dist/endpoint-handle.d.ts.map +1 -0
- package/dist/endpoint-handle.js +608 -0
- package/dist/endpoint-handle.js.map +1 -0
- package/dist/endpoint-journal.d.ts +225 -0
- package/dist/endpoint-journal.d.ts.map +1 -0
- package/dist/endpoint-journal.js +431 -0
- package/dist/endpoint-journal.js.map +1 -0
- package/dist/endpoint-receipt.d.ts +225 -0
- package/dist/endpoint-receipt.d.ts.map +1 -0
- package/dist/endpoint-receipt.js +417 -0
- package/dist/endpoint-receipt.js.map +1 -0
- package/dist/endpoint-records.d.ts +243 -0
- package/dist/endpoint-records.d.ts.map +1 -0
- package/dist/endpoint-records.js +591 -0
- package/dist/endpoint-records.js.map +1 -0
- package/dist/endpoint-serve.d.ts +176 -0
- package/dist/endpoint-serve.d.ts.map +1 -0
- package/dist/endpoint-serve.js +446 -0
- package/dist/endpoint-serve.js.map +1 -0
- package/dist/endpoint-service.d.ts +518 -0
- package/dist/endpoint-service.d.ts.map +1 -0
- package/dist/endpoint-service.js +973 -0
- package/dist/endpoint-service.js.map +1 -0
- package/dist/endpoint-session.d.ts +398 -0
- package/dist/endpoint-session.d.ts.map +1 -0
- package/dist/endpoint-session.js +834 -0
- package/dist/endpoint-session.js.map +1 -0
- package/dist/endpoint-signing.d.ts +105 -0
- package/dist/endpoint-signing.d.ts.map +1 -0
- package/dist/endpoint-signing.js +190 -0
- package/dist/endpoint-signing.js.map +1 -0
- package/dist/endpoint-subjects.d.ts +222 -0
- package/dist/endpoint-subjects.d.ts.map +1 -0
- package/dist/endpoint-subjects.js +381 -0
- package/dist/endpoint-subjects.js.map +1 -0
- package/dist/endpoint-supervisor.d.ts +19 -0
- package/dist/endpoint-supervisor.d.ts.map +1 -0
- package/dist/endpoint-supervisor.js +12 -0
- package/dist/endpoint-supervisor.js.map +1 -0
- package/dist/endpoint-traits.d.ts +225 -0
- package/dist/endpoint-traits.d.ts.map +1 -0
- package/dist/endpoint-traits.js +469 -0
- package/dist/endpoint-traits.js.map +1 -0
- package/dist/endpoint-verbs.d.ts +277 -0
- package/dist/endpoint-verbs.d.ts.map +1 -0
- package/dist/endpoint-verbs.js +576 -0
- package/dist/endpoint-verbs.js.map +1 -0
- package/dist/endpoint-virtual.d.ts +308 -0
- package/dist/endpoint-virtual.d.ts.map +1 -0
- package/dist/endpoint-virtual.js +440 -0
- package/dist/endpoint-virtual.js.map +1 -0
- package/dist/endpoint-work.d.ts +304 -0
- package/dist/endpoint-work.d.ts.map +1 -0
- package/dist/endpoint-work.js +728 -0
- package/dist/endpoint-work.js.map +1 -0
- package/dist/endpoint.d.ts +66 -22
- package/dist/endpoint.d.ts.map +1 -1
- package/dist/endpoint.js +289 -89
- package/dist/endpoint.js.map +1 -1
- package/dist/evict.d.ts +95 -32
- package/dist/evict.d.ts.map +1 -1
- package/dist/evict.js +193 -3
- package/dist/evict.js.map +1 -1
- package/dist/index.d.ts +29 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +29 -0
- package/dist/index.js.map +1 -1
- package/dist/lease.d.ts +4 -0
- package/dist/lease.d.ts.map +1 -1
- package/dist/lease.js.map +1 -1
- package/dist/members.d.ts +4 -4
- package/dist/members.d.ts.map +1 -1
- package/dist/members.js +12 -12
- package/dist/members.js.map +1 -1
- package/dist/provision.d.ts +78 -20
- package/dist/provision.d.ts.map +1 -1
- package/dist/provision.js +214 -37
- package/dist/provision.js.map +1 -1
- package/dist/runtime.d.ts +3 -0
- package/dist/runtime.d.ts.map +1 -1
- package/dist/safe-pattern.d.ts +33 -0
- package/dist/safe-pattern.d.ts.map +1 -0
- package/dist/safe-pattern.js +486 -0
- package/dist/safe-pattern.js.map +1 -0
- package/dist/schema-profile.d.ts +93 -0
- package/dist/schema-profile.d.ts.map +1 -0
- package/dist/schema-profile.js +284 -0
- package/dist/schema-profile.js.map +1 -0
- package/dist/secret-store.d.ts +46 -0
- package/dist/secret-store.d.ts.map +1 -0
- package/dist/secret-store.js +2 -0
- package/dist/secret-store.js.map +1 -0
- package/dist/space-auth.d.ts +9 -0
- package/dist/space-auth.d.ts.map +1 -0
- package/dist/space-auth.js +126 -0
- package/dist/space-auth.js.map +1 -0
- package/dist/streams.d.ts +14 -10
- package/dist/streams.d.ts.map +1 -1
- package/dist/streams.js +47 -76
- package/dist/streams.js.map +1 -1
- package/dist/subjects.d.ts +100 -40
- package/dist/subjects.d.ts.map +1 -1
- package/dist/subjects.js +136 -60
- package/dist/subjects.js.map +1 -1
- package/dist/types.d.ts +9 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +6 -2
package/dist/streams.d.ts
CHANGED
|
@@ -58,8 +58,7 @@ export interface StandaloneAuth {
|
|
|
58
58
|
* from it (the client cannot know its nkey pre-connect). Open mode (no auth) connects bare. */
|
|
59
59
|
export declare function standaloneConnectOpts(auth?: StandaloneAuth): Record<string, unknown>;
|
|
60
60
|
/**
|
|
61
|
-
* Create (idempotently) the
|
|
62
|
-
* history), DM (per-instance inboxes), TASK (anycast work queue).
|
|
61
|
+
* Create (idempotently) the five message streams for a space.
|
|
63
62
|
*
|
|
64
63
|
* This is **privileged**: under auth mode `STREAM.CREATE` is denied to regular agents
|
|
65
64
|
* (streams are space infrastructure, not per-agent), so it runs once at setup
|
|
@@ -81,9 +80,10 @@ export declare function createSpaceStreams(jsm: JetStreamManager, space: string)
|
|
|
81
80
|
* agent binds it, and the bind would then fail permanently ("consumer not found"). Persisting
|
|
82
81
|
* it is the price of bind-only; explicit cleanup on agent-stop is a follow-up.
|
|
83
82
|
*/
|
|
84
|
-
export declare function dmDurableConfig(space: string, owner: string, actor: string, opts?: {
|
|
83
|
+
export declare function dmDurableConfig(space: string, owner: string, actor: string, lifecycleUid: string, opts?: {
|
|
85
84
|
ackWaitMs?: number;
|
|
86
85
|
inactiveThresholdMs?: number;
|
|
86
|
+
activationFrontier?: number;
|
|
87
87
|
}): Partial<ConsumerConfig>;
|
|
88
88
|
/**
|
|
89
89
|
* The TASK work-queue durable for a role — ONE definition, shared by the privileged
|
|
@@ -110,7 +110,7 @@ export declare function inboxReaderConfig(space: string, opts?: {
|
|
|
110
110
|
* native JetStream — the §8 "equivalent per-member at-least-once mechanism with the same ack
|
|
111
111
|
* semantics". `inactive_threshold` only for an open-mode self-create (none today; Plane-3 is
|
|
112
112
|
* auth-only). */
|
|
113
|
-
export declare function dlvDurableConfig(space: string, owner: string, actor: string, opts?: {
|
|
113
|
+
export declare function dlvDurableConfig(space: string, owner: string, actor: string, lifecycleUid: string, opts?: {
|
|
114
114
|
ackWaitMs?: number;
|
|
115
115
|
inactiveThresholdMs?: number;
|
|
116
116
|
}): Partial<ConsumerConfig>;
|
|
@@ -159,14 +159,17 @@ export declare function clearChannel(opts: {
|
|
|
159
159
|
channel: string;
|
|
160
160
|
purged: number;
|
|
161
161
|
}>;
|
|
162
|
-
/** Delete a departed
|
|
163
|
-
* to {@link provisionAgent}. Removes exactly what the provisioner minted for THIS
|
|
164
|
-
*
|
|
165
|
-
*
|
|
166
|
-
*
|
|
162
|
+
/** Delete a departed agent LIFECYCLE's provisioning footprint (#159 Part B) — the teardown counterpart
|
|
163
|
+
* to {@link provisionAgent}. Removes exactly what the provisioner minted for THIS incarnation: its two
|
|
164
|
+
* bind-only durables (`dm_<o>-<a>-<uid>`, `dlv_<o>-<a>-<uid>`) and its lifecycle-keyed read-ACL row.
|
|
165
|
+
* Idempotent — a missing consumer / absent ACL row is a no-op (the agent may have exited before a
|
|
166
|
+
* durable was created, or a re-run). LIFECYCLE-EXACT by construction (SPEC §13.1): every name this
|
|
167
|
+
* deletes embeds the target uid, so a stale/replayed teardown for a retired lifecycle names only
|
|
168
|
+
* retired resources — it structurally cannot touch a same-alias successor, and the deprovisioner
|
|
169
|
+
* cred's exact-name grants make a wrong-uid delete broker-DENIED, not just a no-op.
|
|
167
170
|
*
|
|
168
171
|
* Does NOT touch the role-SHARED `svc_<role>` TASK durable (deleting it would break the role's other
|
|
169
|
-
* agents — it lives until space teardown), nor the ephemeral `
|
|
172
|
+
* agents — it lives until space teardown), nor the ephemeral `chathist_…-<uid>` history consumers (they
|
|
170
173
|
* self-clean on the agent's disconnect). The creds FILE is removed by the caller (a manager-local
|
|
171
174
|
* filesystem concern, not a broker one). Pass a TARGET-PINNED `deprovisioner` cred (see
|
|
172
175
|
* {@link mintCreds}); a bare connection (open mode) never calls this — an open mesh mints nothing. */
|
|
@@ -174,6 +177,7 @@ export declare function deprovisionAgent(opts: {
|
|
|
174
177
|
servers: string;
|
|
175
178
|
space: string;
|
|
176
179
|
targetId: string;
|
|
180
|
+
lifecycleUid: string;
|
|
177
181
|
creds?: string;
|
|
178
182
|
}): Promise<void>;
|
|
179
183
|
//# sourceMappingURL=streams.d.ts.map
|
package/dist/streams.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"streams.d.ts","sourceRoot":"","sources":["../src/streams.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"streams.d.ts","sourceRoot":"","sources":["../src/streams.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,cAAc,EACnB,KAAK,gBAAgB,EACtB,MAAM,oBAAoB,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AAM,CAAC,EAAE,MAAM,CAAC;IAChB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,GAAG,OAAO,CAAC,uBAAuB,CAAC,CAWnC;AAED;;;;;oFAKoF;AACpF,wBAAsB,YAAY,CAAC,IAAI,EAAE;IACvC,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,wGAAwG;IACxG,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB,GAAG,OAAO,CAAC;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC,CAmB/C;AAED;;;;;;;;;;;;;uGAauG;AACvG,wBAAsB,gBAAgB,CAAC,IAAI,EAAE;IAC3C,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,GAAG,OAAO,CAAC,IAAI,CAAC,CAuBhB"}
|
package/dist/streams.js
CHANGED
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
import { jetstreamManager, AckPolicy, DeliverPolicy,
|
|
1
|
+
import { jetstreamManager, AckPolicy, DeliverPolicy, } from "@nats-io/jetstream";
|
|
2
2
|
import { randomUUID } from "node:crypto";
|
|
3
3
|
import { connect, credsAuthenticator, tokenAuthenticator, nanos } from "@nats-io/transport-node";
|
|
4
4
|
import { Kvm } from "@nats-io/kv";
|
|
5
5
|
import { spacePrefix, chatStream, chatSubject, chatWildcard, isConcreteChannel, dmStream, dmDurable, unicastRecvFilter, taskStream, taskDurable, anycastServeFilter, presenceBucket, channelBucket, membersBucket, aclBucket, membershipBucket, deliveryBucket, managerBucket, inboxStream, dlvStream, dlvSubject, dlvDurable, fanoutDurable, readerDurable, DEV_OWNER, principalKey, deprovisionTargetPrincipal, } from "./subjects.js";
|
|
6
6
|
import { idFromCreds } from "./identity.js";
|
|
7
7
|
import { openAclRegistry, deleteAcl } from "./acls.js";
|
|
8
|
+
import { BACKUP_MAX_MSGS_PER_SUBJECT, BACKUP_PLANE3_DEDUP_WINDOW_MS, canonicalBackupStreamConfig, } from "./backup-config.js";
|
|
8
9
|
/** Default presence-bucket entry TTL (ms) — matches the endpoint's default liveness window. */
|
|
9
10
|
const PRESENCE_TTL_MS = 6_000;
|
|
10
11
|
/** Per-(sender,channel)-subject retention cap on the chat stream — the bound past which the
|
|
11
12
|
* oldest message on a subject is discarded (`DiscardPolicy.Old`). Also the horizon of focus
|
|
12
13
|
* recall: only the last {@link MAX_MSGS_PER_SUBJECT} per sender-subject are recallable. */
|
|
13
|
-
export const MAX_MSGS_PER_SUBJECT =
|
|
14
|
+
export const MAX_MSGS_PER_SUBJECT = BACKUP_MAX_MSGS_PER_SUBJECT;
|
|
14
15
|
/** JetStream message-dedup window on the Plane-3 streams: a `Nats-Msg-Id`
|
|
15
16
|
* (`<msgId>:<owner>:<generation>`) repeated within this window is collapsed. Sized generous (2h) so
|
|
16
17
|
* an activation-catch-up copy and a racing fan-out copy of the same message dedup even for a slow/
|
|
@@ -21,7 +22,7 @@ export const MAX_MSGS_PER_SUBJECT = 1000;
|
|
|
21
22
|
* redelivery duplicates within a SESSION, but it is in-memory and reset on agent restart, so it is
|
|
22
23
|
* NOT a cross-restart guarantee. A persistent per-owner delivery ledger would lift the bound; not
|
|
23
24
|
* built (the 2h horizon covers the realistic crash/redelivery lag). Keep the window ≥ worst-case lag. */
|
|
24
|
-
export const PLANE3_DEDUP_WINDOW_MS =
|
|
25
|
+
export const PLANE3_DEDUP_WINDOW_MS = BACKUP_PLANE3_DEDUP_WINDOW_MS;
|
|
25
26
|
/** Bound on the trusted reader's in-flight (un-acked) entries per owner — an offline owner with a large
|
|
26
27
|
* backlog can't stall the reader's own redelivery by pinning unbounded pending. */
|
|
27
28
|
export const DINBOX_MAX_ACK_PENDING = 1000;
|
|
@@ -73,8 +74,7 @@ export function standaloneConnectOpts(auth = {}) {
|
|
|
73
74
|
: {};
|
|
74
75
|
}
|
|
75
76
|
/**
|
|
76
|
-
* Create (idempotently) the
|
|
77
|
-
* history), DM (per-instance inboxes), TASK (anycast work queue).
|
|
77
|
+
* Create (idempotently) the five message streams for a space.
|
|
78
78
|
*
|
|
79
79
|
* This is **privileged**: under auth mode `STREAM.CREATE` is denied to regular agents
|
|
80
80
|
* (streams are space infrastructure, not per-agent), so it runs once at setup
|
|
@@ -82,55 +82,8 @@ export function standaloneConnectOpts(auth = {}) {
|
|
|
82
82
|
* definitions, shared by the endpoint and the setup path so they can't diverge.
|
|
83
83
|
*/
|
|
84
84
|
export async function createSpaceStreams(jsm, space) {
|
|
85
|
-
const
|
|
86
|
-
|
|
87
|
-
name: chatStream(space),
|
|
88
|
-
subjects: [`${p}.chat.>`],
|
|
89
|
-
retention: RetentionPolicy.Limits,
|
|
90
|
-
storage: StorageType.File,
|
|
91
|
-
max_msgs_per_subject: MAX_MSGS_PER_SUBJECT, // capped per-channel backlog (buffer + history)
|
|
92
|
-
discard: DiscardPolicy.Old,
|
|
93
|
-
// Direct Get API stays enabled on CHAT (harmless: agents hold no DIRECT.GET grant). Per-channel
|
|
94
|
-
// history reads no longer use it — they go through contained single-filter ephemeral consumers
|
|
95
|
-
// (endpoint `collectHistory`) so the read ACL bounds them. NEVER set on DM/TASK: direct-get
|
|
96
|
-
// would bypass the consumer-create deny that is DM's confidentiality boundary.
|
|
97
|
-
allow_direct: true,
|
|
98
|
-
});
|
|
99
|
-
await jsm.streams.add({
|
|
100
|
-
name: dmStream(space),
|
|
101
|
-
subjects: [`${p}.inst.>`],
|
|
102
|
-
retention: RetentionPolicy.Limits,
|
|
103
|
-
storage: StorageType.File,
|
|
104
|
-
});
|
|
105
|
-
await jsm.streams.add({
|
|
106
|
-
name: taskStream(space),
|
|
107
|
-
subjects: [`${p}.svc.>`],
|
|
108
|
-
retention: RetentionPolicy.Workqueue,
|
|
109
|
-
storage: StorageType.File,
|
|
110
|
-
});
|
|
111
|
-
// Plane-3 (SPEC §8). INBOX = the mixed pre-auth store (fan-out target; agents hold no grant — see
|
|
112
|
-
// permissionsFor). DLV = the per-member post-auth handoff the agent binds + acks. Both per-owner
|
|
113
|
-
// (one subject per owner), capped per-owner backlog (DiscardPolicy.Old; an evicted entry is a
|
|
114
|
-
// delivery miss, surfaced, never a satisfied durable guarantee — SPEC §7). `duplicate_window`
|
|
115
|
-
// collapses a catch-up/fan-out double of the same Nats-Msg-Id. No Direct Get on either.
|
|
116
|
-
await jsm.streams.add({
|
|
117
|
-
name: inboxStream(space),
|
|
118
|
-
subjects: [`${p}.dinbox.>`],
|
|
119
|
-
retention: RetentionPolicy.Limits,
|
|
120
|
-
storage: StorageType.File,
|
|
121
|
-
max_msgs_per_subject: MAX_MSGS_PER_SUBJECT,
|
|
122
|
-
discard: DiscardPolicy.Old,
|
|
123
|
-
duplicate_window: nanos(PLANE3_DEDUP_WINDOW_MS),
|
|
124
|
-
});
|
|
125
|
-
await jsm.streams.add({
|
|
126
|
-
name: dlvStream(space),
|
|
127
|
-
subjects: [`${p}.dlv.>`],
|
|
128
|
-
retention: RetentionPolicy.Limits,
|
|
129
|
-
storage: StorageType.File,
|
|
130
|
-
max_msgs_per_subject: MAX_MSGS_PER_SUBJECT,
|
|
131
|
-
discard: DiscardPolicy.Old,
|
|
132
|
-
duplicate_window: nanos(PLANE3_DEDUP_WINDOW_MS),
|
|
133
|
-
});
|
|
85
|
+
for (const stream of [chatStream(space), dmStream(space), taskStream(space), inboxStream(space), dlvStream(space)])
|
|
86
|
+
await jsm.streams.add(canonicalBackupStreamConfig(space, stream));
|
|
134
87
|
}
|
|
135
88
|
/**
|
|
136
89
|
* The DM inbox durable for an instance — ONE definition, used both by the privileged
|
|
@@ -146,13 +99,25 @@ export async function createSpaceStreams(jsm, space) {
|
|
|
146
99
|
* agent binds it, and the bind would then fail permanently ("consumer not found"). Persisting
|
|
147
100
|
* it is the price of bind-only; explicit cleanup on agent-stop is a follow-up.
|
|
148
101
|
*/
|
|
149
|
-
export function dmDurableConfig(space, owner, actor, opts = {}) {
|
|
102
|
+
export function dmDurableConfig(space, owner, actor, lifecycleUid, opts = {}) {
|
|
103
|
+
// The DM SUBJECTS (`inst.>`) keep the alias grammar (SPEC §13.1 cross-plane scoping), so the
|
|
104
|
+
// lifecycle scoping lives in the consumer: the NAME carries the uid (exact-name deprovision) and
|
|
105
|
+
// delivery starts at the ACTIVATION FRONTIER — the DM stream sequence captured when this lifecycle
|
|
106
|
+
// was provisioned — so a same-alias successor inherits none of the predecessor's pending DMs
|
|
107
|
+
// (SPEC :467). `activationFrontier` = that captured `last_seq`; delivery begins at frontier+1.
|
|
108
|
+
// Callers that provision a genuinely fresh lifecycle pass the sequence they captured; 0 = from the
|
|
109
|
+
// stream start (an explicit choice, e.g. a stream created after the lifecycle in tests).
|
|
110
|
+
const frontier = opts.activationFrontier ?? 0;
|
|
111
|
+
if (!Number.isInteger(frontier) || frontier < 0)
|
|
112
|
+
throw new Error(`dmDurableConfig activationFrontier must be a non-negative integer, got ${String(frontier)}`);
|
|
150
113
|
const cfg = {
|
|
151
|
-
durable_name: dmDurable(owner, actor),
|
|
114
|
+
durable_name: dmDurable(owner, actor, lifecycleUid),
|
|
152
115
|
filter_subject: unicastRecvFilter(space, owner, actor), // inst.<owner>.<actor>.> — every DM to me
|
|
153
116
|
ack_policy: AckPolicy.Explicit,
|
|
154
117
|
ack_wait: nanos(opts.ackWaitMs ?? 60_000),
|
|
155
|
-
|
|
118
|
+
...(frontier > 0
|
|
119
|
+
? { deliver_policy: DeliverPolicy.StartSequence, opt_start_seq: frontier + 1 }
|
|
120
|
+
: { deliver_policy: DeliverPolicy.All }),
|
|
156
121
|
};
|
|
157
122
|
if (opts.inactiveThresholdMs)
|
|
158
123
|
cfg.inactive_threshold = nanos(opts.inactiveThresholdMs);
|
|
@@ -194,10 +159,12 @@ export function inboxReaderConfig(space, opts = {}) {
|
|
|
194
159
|
* native JetStream — the §8 "equivalent per-member at-least-once mechanism with the same ack
|
|
195
160
|
* semantics". `inactive_threshold` only for an open-mode self-create (none today; Plane-3 is
|
|
196
161
|
* auth-only). */
|
|
197
|
-
export function dlvDurableConfig(space, owner, actor, opts = {}) {
|
|
162
|
+
export function dlvDurableConfig(space, owner, actor, lifecycleUid, opts = {}) {
|
|
198
163
|
const cfg = {
|
|
199
|
-
durable_name: dlvDurable(owner, actor),
|
|
200
|
-
|
|
164
|
+
durable_name: dlvDurable(owner, actor, lifecycleUid),
|
|
165
|
+
// dlv subjects are lifecycle-scoped (SPEC §13.1/Appendix): the reader hands off to THIS
|
|
166
|
+
// lifecycle's subject, so the filter itself confines the successor — no frontier needed here.
|
|
167
|
+
filter_subject: dlvSubject(space, owner, actor, lifecycleUid),
|
|
201
168
|
ack_policy: AckPolicy.Explicit,
|
|
202
169
|
ack_wait: nanos(opts.ackWaitMs ?? 60_000),
|
|
203
170
|
deliver_policy: DeliverPolicy.All,
|
|
@@ -223,20 +190,21 @@ export function fanoutDurableConfig(space, opts = {}) {
|
|
|
223
190
|
export async function setupSpaceStreams(opts) {
|
|
224
191
|
const nc = await connect({ servers: opts.servers, ...standaloneConnectOpts({ creds: opts.creds }) });
|
|
225
192
|
try {
|
|
226
|
-
|
|
193
|
+
const jsm = await jetstreamManager(nc);
|
|
194
|
+
await createSpaceStreams(jsm, opts.space);
|
|
227
195
|
// The presence + channels KV buckets are streams too — pre-create them so agents (denied
|
|
228
196
|
// KV stream-create) can open them. Idempotent. Presence is TTL'd (liveness); the channel
|
|
229
197
|
// registry is durable config, so no TTL.
|
|
230
198
|
const kvm = new Kvm(nc);
|
|
231
199
|
await kvm.create(presenceBucket(opts.space), { ttl: PRESENCE_TTL_MS });
|
|
232
|
-
await
|
|
200
|
+
await jsm.streams.add(canonicalBackupStreamConfig(opts.space, `KV_${channelBucket(opts.space)}`));
|
|
233
201
|
// Durable-membership registry (Plane-3): privileged-write, no TTL (durable config, like the
|
|
234
202
|
// channel registry). Pre-created so the delivery daemon (and open-mode self) can OPEN it; agents
|
|
235
203
|
// hold no grant. Idempotent.
|
|
236
|
-
await
|
|
204
|
+
await jsm.streams.add(canonicalBackupStreamConfig(opts.space, `KV_${membersBucket(opts.space)}`));
|
|
237
205
|
// Durable read-ACL registry (Plane-3 keystone): privileged-write, no TTL. The manager records an
|
|
238
206
|
// agent's read ACL here at mint; the delivery daemon re-auths every durable entry against it.
|
|
239
|
-
await
|
|
207
|
+
await jsm.streams.add(canonicalBackupStreamConfig(opts.space, `KV_${aclBucket(opts.space)}`));
|
|
240
208
|
// Derived channel-membership feed (broker CONNZ ∪ members registry): privileged-write (the
|
|
241
209
|
// `membership-rw` cred), admin/observer-read, no TTL (the daemon prunes departed agents). `history:1`
|
|
242
210
|
// (only the latest record per agent matters) + a `max_bytes` cap (footprint bound). Pre-created so the
|
|
@@ -300,14 +268,17 @@ export async function clearChannel(opts) {
|
|
|
300
268
|
await nc.drain();
|
|
301
269
|
}
|
|
302
270
|
}
|
|
303
|
-
/** Delete a departed
|
|
304
|
-
* to {@link provisionAgent}. Removes exactly what the provisioner minted for THIS
|
|
305
|
-
*
|
|
306
|
-
*
|
|
307
|
-
*
|
|
271
|
+
/** Delete a departed agent LIFECYCLE's provisioning footprint (#159 Part B) — the teardown counterpart
|
|
272
|
+
* to {@link provisionAgent}. Removes exactly what the provisioner minted for THIS incarnation: its two
|
|
273
|
+
* bind-only durables (`dm_<o>-<a>-<uid>`, `dlv_<o>-<a>-<uid>`) and its lifecycle-keyed read-ACL row.
|
|
274
|
+
* Idempotent — a missing consumer / absent ACL row is a no-op (the agent may have exited before a
|
|
275
|
+
* durable was created, or a re-run). LIFECYCLE-EXACT by construction (SPEC §13.1): every name this
|
|
276
|
+
* deletes embeds the target uid, so a stale/replayed teardown for a retired lifecycle names only
|
|
277
|
+
* retired resources — it structurally cannot touch a same-alias successor, and the deprovisioner
|
|
278
|
+
* cred's exact-name grants make a wrong-uid delete broker-DENIED, not just a no-op.
|
|
308
279
|
*
|
|
309
280
|
* Does NOT touch the role-SHARED `svc_<role>` TASK durable (deleting it would break the role's other
|
|
310
|
-
* agents — it lives until space teardown), nor the ephemeral `
|
|
281
|
+
* agents — it lives until space teardown), nor the ephemeral `chathist_…-<uid>` history consumers (they
|
|
311
282
|
* self-clean on the agent's disconnect). The creds FILE is removed by the caller (a manager-local
|
|
312
283
|
* filesystem concern, not a broker one). Pass a TARGET-PINNED `deprovisioner` cred (see
|
|
313
284
|
* {@link mintCreds}); a bare connection (open mode) never calls this — an open mesh mints nothing. */
|
|
@@ -324,13 +295,13 @@ export async function deprovisionAgent(opts) {
|
|
|
324
295
|
});
|
|
325
296
|
try {
|
|
326
297
|
// The target is a full principal dot-form (user-mode agent) or a bare static actor id under the
|
|
327
|
-
// local owner
|
|
328
|
-
// names and the grant can't diverge.
|
|
329
|
-
const t = deprovisionTargetPrincipal(opts.targetId);
|
|
298
|
+
// local owner, PLUS the exact lifecycle uid being torn down — the SAME resolution the
|
|
299
|
+
// deprovisioner cred's permission pin used, so the delete names and the grant can't diverge.
|
|
300
|
+
const t = deprovisionTargetPrincipal({ principal: opts.targetId, lifecycleUid: opts.lifecycleUid });
|
|
330
301
|
const jsm = await jetstreamManager(nc);
|
|
331
|
-
await deleteConsumerIdempotent(jsm, dmStream(opts.space), dmDurable(t.owner, t.actor));
|
|
332
|
-
await deleteConsumerIdempotent(jsm, dlvStream(opts.space), dlvDurable(t.owner, t.actor));
|
|
333
|
-
await deleteAcl(await openAclRegistry(nc, opts.space), principalKey(t.owner, t.actor).key);
|
|
302
|
+
await deleteConsumerIdempotent(jsm, dmStream(opts.space), dmDurable(t.owner, t.actor, t.lifecycleUid));
|
|
303
|
+
await deleteConsumerIdempotent(jsm, dlvStream(opts.space), dlvDurable(t.owner, t.actor, t.lifecycleUid));
|
|
304
|
+
await deleteAcl(await openAclRegistry(nc, opts.space), principalKey(t.owner, t.actor).key, t.lifecycleUid);
|
|
334
305
|
}
|
|
335
306
|
finally {
|
|
336
307
|
await nc.drain();
|
package/dist/streams.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"streams.js","sourceRoot":"","sources":["../src/streams.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAChB,SAAS,EACT,aAAa,
|
|
1
|
+
{"version":3,"file":"streams.js","sourceRoot":"","sources":["../src/streams.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAChB,SAAS,EACT,aAAa,GAGd,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAC;AACjG,OAAO,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AAClC,OAAO,EACL,WAAW,EACX,UAAU,EACV,WAAW,EACX,YAAY,EACZ,iBAAiB,EACjB,QAAQ,EACR,SAAS,EACT,iBAAiB,EACjB,UAAU,EACV,WAAW,EACX,kBAAkB,EAClB,cAAc,EACd,aAAa,EACb,aAAa,EACb,SAAS,EACT,gBAAgB,EAChB,cAAc,EACd,aAAa,EACb,WAAW,EACX,SAAS,EACT,UAAU,EACV,UAAU,EACV,aAAa,EACb,aAAa,EACb,SAAS,EACT,YAAY,EACZ,0BAA0B,GAC3B,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACvD,OAAO,EACL,2BAA2B,EAC3B,6BAA6B,EAC7B,2BAA2B,GAC5B,MAAM,oBAAoB,CAAC;AAE5B,+FAA+F;AAC/F,MAAM,eAAe,GAAG,KAAK,CAAC;AAE9B;;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/dist/subjects.d.ts
CHANGED
|
@@ -72,6 +72,27 @@ export declare function principalKey(owner: string, actor: string): {
|
|
|
72
72
|
key: string;
|
|
73
73
|
name: string;
|
|
74
74
|
};
|
|
75
|
+
export declare function assertLifecycleToken(v: string, what?: string): string;
|
|
76
|
+
/** Mint a fresh lifecycle UID: `[a-z0-9]{26,32}`, >=128 bits of CSPRNG entropy (SPEC §13.1). 20
|
|
77
|
+
* random bytes (160 bits) render to at most 31 base36 chars; left-padding to 26 keeps the rare
|
|
78
|
+
* short render in-grammar without losing entropy. The UID is minted ONCE per lifecycle by the
|
|
79
|
+
* provisioning path and preserved across supervised restarts — never re-minted per process. */
|
|
80
|
+
export declare function mintLifecycleUid(): string;
|
|
81
|
+
/** The lifecycle-scoped JetStream-name form `<owner>-<actor>-<lifecycleUid>` (SPEC §13.1 "the UID is
|
|
82
|
+
* part of the resource NAME"). Injective: owner/actor tokens ban `-` (see {@link principalKey}), the
|
|
83
|
+
* UID is `[a-z0-9]` (dash-free), and `-` is the sole separator. */
|
|
84
|
+
export declare function lifecycleNameKey(owner: string, actor: string, lifecycleUid: string): string;
|
|
85
|
+
/** The lifecycle-scoped subject/KV dot-form `<owner>.<actor>.<lifecycleUid>` (ACL rows, member-row
|
|
86
|
+
* principals, dinbox/dlv subject tails). Injective: owner/actor are dot-free tokens and the UID is
|
|
87
|
+
* `[a-z0-9]`, so exactly three dot-separated tokens. */
|
|
88
|
+
export declare function lifecycleSubjectKey(owner: string, actor: string, lifecycleUid: string): string;
|
|
89
|
+
/** Inverse of {@link lifecycleSubjectKey}: split `<owner>.<actor>.<uid>` back into its three tokens,
|
|
90
|
+
* or `null` if the string is not exactly that shape. */
|
|
91
|
+
export declare function parseLifecycleSubjectKey(key: string): {
|
|
92
|
+
owner: string;
|
|
93
|
+
actor: string;
|
|
94
|
+
lifecycleUid: string;
|
|
95
|
+
} | null;
|
|
75
96
|
/** Principal key form for subjects and KV keys. Alias for callers/tests that need one form explicitly. */
|
|
76
97
|
export declare function principalSubjectKey(owner: string, actor: string): string;
|
|
77
98
|
/** Principal key form for JetStream names. Alias for callers/tests that need one form explicitly. */
|
|
@@ -81,12 +102,24 @@ export declare function principalNameKey(owner: string, actor: string): string;
|
|
|
81
102
|
* single `.` separates them unambiguously — exactly two segments, both {@link assertValidOwnerToken}-valid.
|
|
82
103
|
* Used where a stored principal (a member/from.id dot-form) must be re-split to feed the owner+actor
|
|
83
104
|
* subject builders (e.g. fan-out → `dinboxSubject`). */
|
|
84
|
-
/**
|
|
85
|
-
*
|
|
86
|
-
*
|
|
87
|
-
|
|
105
|
+
/** A deprovision target is a LIFECYCLE, never an alias (SPEC §13.1 "the teardown credential is
|
|
106
|
+
* minted target-pinned to `(principal, lifecycleUid)` by exact name"): the principal dot-form
|
|
107
|
+
* (`u_….<actor>`, user-mode agents) or a bare static/dev actor id (an nkey pub — never contains a
|
|
108
|
+
* dot, keyed under {@link DEV_OWNER}), PLUS the lifecycle UID of exactly the incarnation being torn
|
|
109
|
+
* down. A stale/replayed teardown for a retired lifecycle then names only retired resources — it is
|
|
110
|
+
* broker-denied against a same-alias successor. */
|
|
111
|
+
export interface DeprovisionTarget {
|
|
112
|
+
/** `<owner>.<actor>` dot-form, or a bare static actor id. */
|
|
113
|
+
principal: string;
|
|
114
|
+
/** The retired/target incarnation's lifecycle UID — the successor's differs by construction. */
|
|
115
|
+
lifecycleUid: string;
|
|
116
|
+
}
|
|
117
|
+
/** Resolve a deprovision target to its `(owner, actor, lifecycleUid)` triple. Shared by the
|
|
118
|
+
* deprovisioner permission pin and the teardown helper so they can't diverge. */
|
|
119
|
+
export declare function deprovisionTargetPrincipal(target: DeprovisionTarget): {
|
|
88
120
|
owner: string;
|
|
89
121
|
actor: string;
|
|
122
|
+
lifecycleUid: string;
|
|
90
123
|
};
|
|
91
124
|
export declare function parsePrincipalKey(key: string): {
|
|
92
125
|
owner: string;
|
|
@@ -254,6 +287,16 @@ export declare const CONTROL_DELIVERY: "delivery";
|
|
|
254
287
|
* cred is default-denied — nats-server is the boundary, same pattern as {@link CONTROL_ADMIN});
|
|
255
288
|
* the `delivery` cred holds the serve + bounded-reply side. */
|
|
256
289
|
export declare const CONTROL_DELIVERY_ADMIN: "delivery-admin";
|
|
290
|
+
/** The AUTH service's control rail (#29 piece 3; SPEC 13.2 reserved): lifecycle-authority ops the
|
|
291
|
+
* AUTH plane serves — the D5 split's other half (retirement is the auth plane's operation; it
|
|
292
|
+
* never rides the DELIVERY daemon's rail). The surface is GENERIC — "retire a lifecycle
|
|
293
|
+
* (owner, actor, lifecycleUid)" — never caller-specific: the manager's despawn is ONE caller,
|
|
294
|
+
* and the serve-time authz (the space-manager-lease holder check, leader-read fresh per
|
|
295
|
+
* request) is the auth service's, not the subject grammar's. Caller attribution is
|
|
296
|
+
* SUBJECT-derived (`ctl.auth-admin.<owner>.<actor>`, broker-ACL-enforced): only a credential
|
|
297
|
+
* minted with that principal's request-publish grant reaches it, and replies are bound under
|
|
298
|
+
* the sender's own `<request>.reply.>` subtree. */
|
|
299
|
+
export declare const CONTROL_AUTH_ADMIN: "auth-admin";
|
|
257
300
|
/** The three control-plane tiers the manager serves — values tie to the `CONTROL_*` service
|
|
258
301
|
* names so handler routing can't drift from the subject names. */
|
|
259
302
|
export type ControlTier = typeof CONTROL_PRIVILEGED | typeof CONTROL_SELF_SERVICE | typeof CONTROL_ADMIN;
|
|
@@ -311,19 +354,22 @@ export declare const CHANNEL_DEFAULTS_KEY = "=defaults";
|
|
|
311
354
|
* owner) under {@link memberKey}; the source of truth for `channelMembers()` and the fan-out's
|
|
312
355
|
* member list, moved off JetStream consumer topology (which core-sub joins don't create). */
|
|
313
356
|
export declare function membersBucket(space: string): string;
|
|
314
|
-
/** KV key for one membership record: `<channel>/<principal>`, where
|
|
315
|
-
*
|
|
316
|
-
*
|
|
317
|
-
*
|
|
318
|
-
*
|
|
319
|
-
*
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
*
|
|
357
|
+
/** KV key for one membership record: `<channel>/<principal>.<lifecycleUid>`, where the tail is the
|
|
358
|
+
* member's lifecycle-scoped dot-form ({@link lifecycleSubjectKey}, SPEC §13.1: membership rows are
|
|
359
|
+
* lifecycle-keyed, so a same-alias successor starts unjoined and inherits no cursors — the
|
|
360
|
+
* join/leave cursors ride this row). The channel is concrete (no `*`/`>`, validated at the write
|
|
361
|
+
* path) so it is dotted-but-`/`-free, and the tail is `[A-Za-z0-9_.]` (also `/`-free), so the single
|
|
362
|
+
* `/` separates them unambiguously — both halves recover via {@link parseMemberKey}. `/`, `.`, and
|
|
363
|
+
* `[A-Za-z0-9_]` are all legal KV-key chars (`/^[-/=.\w]+$/`), so no encoding is needed. */
|
|
364
|
+
export declare function memberKey(channel: string, principal: string, lifecycleUid: string): string;
|
|
365
|
+
/** Inverse of {@link memberKey}: split a member key back into `{ channel, principal, lifecycleUid }`,
|
|
366
|
+
* or `null` if it isn't one (no `/`, or the tail is not a lifecycle-scoped dot-form). Splits on the
|
|
367
|
+
* single `/`, then peels the trailing `.<uid>` token — owner/actor tokens are dot-free, so the last
|
|
368
|
+
* dot separates the uid unambiguously. */
|
|
324
369
|
export declare function parseMemberKey(key: string): {
|
|
325
370
|
channel: string;
|
|
326
371
|
principal: string;
|
|
372
|
+
lifecycleUid: string;
|
|
327
373
|
} | null;
|
|
328
374
|
/** Name of the KV bucket holding the durable read-ACL registry (Plane-3) for a space — a
|
|
329
375
|
* privileged-write sibling of the members/channels buckets. One record per OWNER (key = owner id),
|
|
@@ -332,11 +378,16 @@ export declare function parseMemberKey(key: string): {
|
|
|
332
378
|
* stateless, server-side daemon re-reads it on boot (fixes the restart-fragility nak-loop). It is
|
|
333
379
|
* ALSO what the daemon validates a runtime durable-join against (channel ∈ the owner's ACL). */
|
|
334
380
|
export declare function aclBucket(space: string): string;
|
|
335
|
-
/** KV key for one
|
|
336
|
-
*
|
|
337
|
-
* is a legal KV key (`/^[-/=.\w]+$/`); pass it through UNCHANGED — do
|
|
338
|
-
* which rewrites `.`→`_` and would alias distinct principals onto one
|
|
339
|
-
|
|
381
|
+
/** KV key for one lifecycle's read-ACL record: `<owner>.<actor>.<lifecycleUid>` (SPEC §13.1: ACL rows
|
|
382
|
+
* are lifecycle-keyed, so the deprovisioner's exact-key delete grant can never name a same-alias
|
|
383
|
+
* successor's row). The dot-form is a legal KV key (`/^[-/=.\w]+$/`); pass it through UNCHANGED — do
|
|
384
|
+
* NOT run it through `token()`, which rewrites `.`→`_` and would alias distinct principals onto one
|
|
385
|
+
* key. Alias-level lookups that hold no uid enumerate `aclAliasFilter` and REFUSE ambiguity. */
|
|
386
|
+
export declare function aclKey(principal: string, lifecycleUid: string): string;
|
|
387
|
+
/** KV key filter matching every lifecycle row of one alias: `<owner>.<actor>.*`. For the bounded
|
|
388
|
+
* alias-level enumeration (join authz, deprovision-by-alias refusal): AT MOST ONE live row per alias
|
|
389
|
+
* is the §13.1 invariant, and a reader that finds two MUST fail loud, never take first-match. */
|
|
390
|
+
export declare function aclAliasFilter(principal: string): string;
|
|
340
391
|
/** Name of the KV bucket holding the derived channel-membership feed for a space (data-account, derived
|
|
341
392
|
* from CONNZ ∪ the members registry). One entry per AGENT (key = the agent nkey / `card.id`); value is a
|
|
342
393
|
* {@link import("./types.js").ChannelMembership}. Per-agent keying (not per-channel) keeps keys dot-free
|
|
@@ -427,23 +478,29 @@ export declare function taskStream(space: string): string;
|
|
|
427
478
|
export declare function inboxStream(space: string): string;
|
|
428
479
|
/** Stream capturing `dlv.>` — the per-member post-auth delivery store (agent binds + acks). */
|
|
429
480
|
export declare function dlvStream(space: string): string;
|
|
430
|
-
/** Subject of a
|
|
431
|
-
* the fan-out delivers a per-member copy
|
|
432
|
-
*
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
*
|
|
481
|
+
/** Subject of a lifecycle's mixed durable inbox: `cotal.<space>.dinbox.<owner>.<actor>.<lifecycleUid>`
|
|
482
|
+
* (one per LIFECYCLE, SPEC §13.1: the fan-out delivers a per-member copy addressed to the member
|
|
483
|
+
* row's recorded lifecycle, so a same-alias successor inherits no pending entries). Identity slots
|
|
484
|
+
* accept `*` for the daemon's fan-out write grant (`dinbox.*.*.*`). */
|
|
485
|
+
export declare function dinboxSubject(space: string, owner: string, actor: string, lifecycleUid: string): string;
|
|
486
|
+
/** Subject of a lifecycle's post-auth delivery: `cotal.<space>.dlv.<owner>.<actor>.<lifecycleUid>`. */
|
|
487
|
+
export declare function dlvSubject(space: string, owner: string, actor: string, lifecycleUid: string): string;
|
|
488
|
+
/** Parse the lifecycle-scoped principal out of a mixed-inbox subject
|
|
489
|
+
* `cotal.<space>.dinbox.<owner>.<actor>.<lifecycleUid>`, or null. The trusted reader is a SINGLE
|
|
490
|
+
* consumer over `dinbox.>` (all principals), so it recovers the per-message owner+actor+lifecycle
|
|
491
|
+
* from the subject (split only — the broker forge-locked the slots at write). A 5-segment pre-cut
|
|
492
|
+
* subject parses to null and the reader refuses it loudly rather than delivering unattributed. */
|
|
439
493
|
export declare function parseDinboxPrincipal(subject: string): {
|
|
440
494
|
owner: string;
|
|
441
495
|
actor: string;
|
|
496
|
+
lifecycleUid: string;
|
|
442
497
|
} | null;
|
|
443
|
-
/**
|
|
444
|
-
* durable NAME is the
|
|
445
|
-
*
|
|
446
|
-
|
|
498
|
+
/** A lifecycle's bind-only per-member consumer on {@link dlvStream} (filter
|
|
499
|
+
* `dlv.<owner>.<actor>.<lifecycleUid>`). The durable NAME is the lifecycle-scoped dash-form
|
|
500
|
+
* (`dlv_<owner>-<actor>-<lifecycleUid>`, SPEC §13.1/§8): the UID in the NAME is what lets the
|
|
501
|
+
* deprovisioner be target-pinned by exact name, so a stale teardown credential structurally cannot
|
|
502
|
+
* reach a same-alias successor's consumer. */
|
|
503
|
+
export declare function dlvDurable(owner: string, actor: string, lifecycleUid: string): string;
|
|
447
504
|
/** The single privileged fan-out consumer on the CHAT stream (delivery-daemon-pumped; routing, not
|
|
448
505
|
* auth). N=1 keeps this exact name (see {@link fanoutDurable}). */
|
|
449
506
|
export declare const FANOUT_DURABLE: "fanout";
|
|
@@ -461,14 +518,17 @@ export declare function readerDurable(shard?: number, shards?: number): string;
|
|
|
461
518
|
* read-ACL conformance test asserts an agent can NOT create — it has no live callers, the live read is
|
|
462
519
|
* now a native core subscription. Principal name-form (`chat_<owner>-<actor>`) for namespace consistency. */
|
|
463
520
|
export declare function chatDurable(owner: string, actor: string): string;
|
|
464
|
-
/** Consumer name for
|
|
465
|
-
* drop-marker). A single per-
|
|
466
|
-
* (`chathist_<owner>-<actor
|
|
467
|
-
* a peer can never bind it — while the
|
|
468
|
-
* pins to `allowSubscribe`. */
|
|
469
|
-
export declare function chatHistDurable(owner: string, actor: string): string;
|
|
470
|
-
/** Durable consumer name for
|
|
471
|
-
|
|
521
|
+
/** Consumer name for a lifecycle's short-lived chat **history** reads (join-backfill, focus-recall,
|
|
522
|
+
* drop-marker). A single per-lifecycle name in the lifecycle-scoped dash-form
|
|
523
|
+
* (`chathist_<owner>-<actor>-<lifecycleUid>`, SPEC §13.1) so its create/info/fetch/delete grants
|
|
524
|
+
* name-scope to that lifecycle — a peer or a same-alias successor can never bind it — while the
|
|
525
|
+
* per-read single `filter_subject` is what the create-time ACL pins to `allowSubscribe`. */
|
|
526
|
+
export declare function chatHistDurable(owner: string, actor: string, lifecycleUid: string): string;
|
|
527
|
+
/** Durable consumer name for a lifecycle's private DM inbox — the lifecycle-scoped dash-form
|
|
528
|
+
* (`dm_<owner>-<actor>-<lifecycleUid>`, SPEC §13.1). The DM SUBJECTS (`inst.>`) keep the alias
|
|
529
|
+
* grammar; the backing consumer is lifecycle-keyed and starts at the activation frontier
|
|
530
|
+
* ({@link import("./streams.js").dmDurableConfig}), so a successor inherits no predecessor DMs. */
|
|
531
|
+
export declare function dmDurable(owner: string, actor: string, lifecycleUid: string): string;
|
|
472
532
|
/** Durable consumer name (shared across instances of a role) for the task queue. */
|
|
473
533
|
export declare function taskDurable(service: string): string;
|
|
474
534
|
//# sourceMappingURL=subjects.d.ts.map
|
package/dist/subjects.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subjects.d.ts","sourceRoot":"","sources":["../src/subjects.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;
|
|
1
|
+
{"version":3,"file":"subjects.d.ts","sourceRoot":"","sources":["../src/subjects.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAMH,gEAAgE;AAChE,wBAAgB,KAAK,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAGvC;AAED,eAAO,MAAM,IAAI,UAAU,CAAC;AAE5B,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAEjD;AAED;;gFAEgF;AAChF,wBAAgB,iBAAiB,CAAC,QAAQ,CAAC,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE,GAAG,SAAS,CAI3E;AAyCD;;6DAE6D;AAC7D,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAEhG;AAED;iFACiF;AACjF,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAE1D;AAED;;iCAEiC;AACjC,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAUxE;AAED;;;;;;;;;;yDAUyD;AACzD,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAiB1D;AAED;;;;;;;;;;;;6FAY6F;AAC7F,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAW3D;AAED;;;;;;;;;;;;iGAYiG;AACjG,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC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