@cotal-ai/core 0.11.5 → 0.12.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/auth-provider.d.ts +82 -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 +495 -0
- package/dist/backup.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/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -1
- package/dist/provision.d.ts +9 -3
- package/dist/provision.d.ts.map +1 -1
- package/dist/provision.js +20 -4
- package/dist/provision.js.map +1 -1
- package/dist/runtime.d.ts +3 -0
- package/dist/runtime.d.ts.map +1 -1
- 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 +1 -2
- package/dist/streams.d.ts.map +1 -1
- package/dist/streams.js +12 -58
- package/dist/streams.js.map +1 -1
- package/package.json +4 -2
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
|
|
@@ -223,20 +176,21 @@ export function fanoutDurableConfig(space, opts = {}) {
|
|
|
223
176
|
export async function setupSpaceStreams(opts) {
|
|
224
177
|
const nc = await connect({ servers: opts.servers, ...standaloneConnectOpts({ creds: opts.creds }) });
|
|
225
178
|
try {
|
|
226
|
-
|
|
179
|
+
const jsm = await jetstreamManager(nc);
|
|
180
|
+
await createSpaceStreams(jsm, opts.space);
|
|
227
181
|
// The presence + channels KV buckets are streams too — pre-create them so agents (denied
|
|
228
182
|
// KV stream-create) can open them. Idempotent. Presence is TTL'd (liveness); the channel
|
|
229
183
|
// registry is durable config, so no TTL.
|
|
230
184
|
const kvm = new Kvm(nc);
|
|
231
185
|
await kvm.create(presenceBucket(opts.space), { ttl: PRESENCE_TTL_MS });
|
|
232
|
-
await
|
|
186
|
+
await jsm.streams.add(canonicalBackupStreamConfig(opts.space, `KV_${channelBucket(opts.space)}`));
|
|
233
187
|
// Durable-membership registry (Plane-3): privileged-write, no TTL (durable config, like the
|
|
234
188
|
// channel registry). Pre-created so the delivery daemon (and open-mode self) can OPEN it; agents
|
|
235
189
|
// hold no grant. Idempotent.
|
|
236
|
-
await
|
|
190
|
+
await jsm.streams.add(canonicalBackupStreamConfig(opts.space, `KV_${membersBucket(opts.space)}`));
|
|
237
191
|
// Durable read-ACL registry (Plane-3 keystone): privileged-write, no TTL. The manager records an
|
|
238
192
|
// agent's read ACL here at mint; the delivery daemon re-auths every durable entry against it.
|
|
239
|
-
await
|
|
193
|
+
await jsm.streams.add(canonicalBackupStreamConfig(opts.space, `KV_${aclBucket(opts.space)}`));
|
|
240
194
|
// Derived channel-membership feed (broker CONNZ ∪ members registry): privileged-write (the
|
|
241
195
|
// `membership-rw` cred), admin/observer-read, no TTL (the daemon prunes departed agents). `history:1`
|
|
242
196
|
// (only the latest record per agent matters) + a `max_bytes` cap (footprint bound). Pre-created so the
|
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;;4FAE4F;AAC5F,MAAM,CAAC,MAAM,oBAAoB,GAAG,2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ACnB,CAAC;AACH,CAAC;AAED;;4DAE4D;AAC5D,KAAK,UAAU,wBAAwB,CAAC,GAAqB,EAAE,MAAc,EAAE,IAAY;IACzF,IAAI,CAAC;QACH,MAAM,GAAG,CAAC,SAAS,CAAC,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;IAC3C,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC;QACX,uFAAuF;QACvF,gGAAgG;QAChG,kGAAkG;QAClG,gGAAgG;QAChG,IAAK,CAAuB,CAAC,IAAI,KAAK,GAAG,IAAI,CAAC,8BAA8B,CAAC,IAAI,CAAE,CAAW,CAAC,OAAO,CAAC;YAAE,MAAM,CAAC,CAAC;IACnH,CAAC;AACH,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cotal-ai/core",
|
|
3
3
|
"description": "The Cotal protocol: endpoint, subjects, message types, the NATS client layer, and the extension contracts.",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.12.0",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -34,6 +34,8 @@
|
|
|
34
34
|
"scripts": {
|
|
35
35
|
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
36
36
|
"build": "tsc -p tsconfig.json",
|
|
37
|
-
"test": "tsx smoke/resolve.smoke.ts"
|
|
37
|
+
"test": "tsx smoke/resolve.smoke.ts && tsx smoke/backup.smoke.ts && tsx smoke/space-auth.smoke.ts",
|
|
38
|
+
"smoke:backup": "tsx smoke/backup.smoke.ts",
|
|
39
|
+
"smoke:backup:live": "tsx smoke/backup-live.smoke.ts"
|
|
38
40
|
}
|
|
39
41
|
}
|