@cotal-ai/delivery 0.35.0 → 0.37.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/delivery.d.ts +11 -8
- package/dist/delivery.d.ts.map +1 -1
- package/dist/delivery.js +83 -33
- package/dist/delivery.js.map +1 -1
- package/dist/evict-exec.d.ts +45 -3
- package/dist/evict-exec.d.ts.map +1 -1
- package/dist/evict-exec.js +103 -31
- package/dist/evict-exec.js.map +1 -1
- package/dist/feedback-intake.d.ts.map +1 -1
- package/dist/feedback-intake.js +1 -0
- package/dist/feedback-intake.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/membership.d.ts +15 -15
- package/dist/membership.d.ts.map +1 -1
- package/dist/membership.js +66 -59
- package/dist/membership.js.map +1 -1
- package/dist/sys-creds.d.ts +139 -0
- package/dist/sys-creds.d.ts.map +1 -0
- package/dist/sys-creds.js +163 -0
- package/dist/sys-creds.js.map +1 -0
- package/package.json +4 -3
package/dist/delivery.d.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { type ParsedArgs, type SecretStore } from "@cotal-ai/core";
|
|
2
|
-
import {
|
|
3
|
-
/** Re-exported for hosted compositions: the
|
|
4
|
-
* {@link
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
|
|
2
|
+
import { DELIVERY_CREDS_KIND, deliveryCredsKey } from "@cotal-ai/workspace";
|
|
3
|
+
/** Re-exported for hosted compositions: the daemon cred's KIND, and the builder that turns it into
|
|
4
|
+
* the {@link SecretStore} key for a space. Defined once in workspace (the layout is the workspace's)
|
|
5
|
+
* so the writer, the renewal owner, and this reader can never drift apart. As of P7 the kind is NOT
|
|
6
|
+
* the key — the key is per-space — so a hosted store must be keyed with the builder; the flat kind
|
|
7
|
+
* is the pre-P7 key and putting there leaves this daemon reading an empty location. */
|
|
8
|
+
export { DELIVERY_CREDS_KIND, deliveryCredsKey };
|
|
8
9
|
/**
|
|
9
10
|
* Run the delivery daemon: the server-side Plane-3 durable backstop. A thin composition root that
|
|
10
11
|
* builds a scoped `delivery` endpoint, acquires the single-flight lease, and runs the existing
|
|
@@ -16,8 +17,10 @@ export { DELIVERY_CREDS_KEY };
|
|
|
16
17
|
*
|
|
17
18
|
* `store` is the hosted-composition seam: a closed composition root calls this export directly and
|
|
18
19
|
* injects its own {@link SecretStore} (KMS/Vault…) holding the daemon cred under
|
|
19
|
-
* {@link
|
|
20
|
-
*
|
|
20
|
+
* {@link deliveryCredsKey}`(space, …)` AND the membership feed's rw cred under the matching
|
|
21
|
+
* `membership-rw.creds` key — both PER-SPACE as of P7, so the bare kinds are the pre-P7 spelling and
|
|
22
|
+
* are not read; the registered `deliver` command passes none and gets the workstation FS store (or
|
|
23
|
+
* `--creds`). The
|
|
21
24
|
* renewal owner's write side (`remintDaemonCreds`) is threaded through the manager's
|
|
22
25
|
* `ManagerOptions.secretStore` too, so a hosted composition renews both daemon kinds end-to-end when
|
|
23
26
|
* the manager and this daemon are handed the SAME store.
|
package/dist/delivery.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"delivery.d.ts","sourceRoot":"","sources":["../src/delivery.ts"],"names":[],"mappings":"AACA,OAAO,EAWL,KAAK,UAAU,EACf,KAAK,WAAW,EACjB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"delivery.d.ts","sourceRoot":"","sources":["../src/delivery.ts"],"names":[],"mappings":"AACA,OAAO,EAWL,KAAK,UAAU,EACf,KAAK,WAAW,EACjB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,mBAAmB,EAA0B,gBAAgB,EAAiF,MAAM,qBAAqB,CAAC;AAMnL;;;;wFAIwF;AACxF,OAAO,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,CAAC;AA0GjD;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAsB,WAAW,CAAC,IAAI,EAAE,UAAU,EAAE,KAAK,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CA6NtF"}
|
package/dist/delivery.js
CHANGED
|
@@ -1,34 +1,54 @@
|
|
|
1
1
|
import { basename, dirname, join, resolve } from "node:path";
|
|
2
2
|
import { CotalEndpoint, DEFAULT_SERVER, LEASE_TTL_MS, accountFromCreds, credsClaims, idFromCreds, isReachable, mintCreds, newIdentity, } from "@cotal-ai/core";
|
|
3
|
-
import {
|
|
3
|
+
import { DELIVERY_CREDS_KIND, FsSecretStore, authDir, deliveryCredsKey, findCotalRoot, loadSpaceAuth, segmentedKey, soleSpaceOf, workspaceSecretStore } from "@cotal-ai/workspace";
|
|
4
4
|
import { startMembership } from "./membership.js";
|
|
5
|
-
import { executeEviction, executePlaneLiveness, executePrincipalLiveness } from "./evict-exec.js";
|
|
6
|
-
/** Re-exported for hosted compositions: the
|
|
7
|
-
* {@link
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
|
|
5
|
+
import { executeEviction, executePlaneLiveness, executePrincipalLiveness, validateScanTargetAdmission } from "./evict-exec.js";
|
|
6
|
+
/** Re-exported for hosted compositions: the daemon cred's KIND, and the builder that turns it into
|
|
7
|
+
* the {@link SecretStore} key for a space. Defined once in workspace (the layout is the workspace's)
|
|
8
|
+
* so the writer, the renewal owner, and this reader can never drift apart. As of P7 the kind is NOT
|
|
9
|
+
* the key — the key is per-space — so a hosted store must be keyed with the builder; the flat kind
|
|
10
|
+
* is the pre-P7 key and putting there leaves this daemon reading an empty location. */
|
|
11
|
+
export { DELIVERY_CREDS_KIND, deliveryCredsKey };
|
|
12
|
+
/**
|
|
13
|
+
* THE ORDERING-CRITICAL HALF of the cred-source decision, split out so it cannot drift below the
|
|
14
|
+
* ambient reads. With an injected store the store is the ONLY credential source: every local-source
|
|
15
|
+
* flag (`--creds`, `--dev-mint`) is rejected loudly HERE, before `runDelivery` derives a space —
|
|
16
|
+
* because that derivation itself reads the local signer under `--dev-mint`. A hosted composition
|
|
17
|
+
* must never cross back into workstation trust material, not even for a space label, and the space
|
|
18
|
+
* is now an INPUT to the key, which is exactly the pressure that would otherwise pull the
|
|
19
|
+
* derivation above this check.
|
|
20
|
+
*/
|
|
21
|
+
function assertNoLocalCredSourceFlags(v, injected) {
|
|
22
|
+
if (!injected)
|
|
23
|
+
return;
|
|
24
|
+
const local = ["creds", "dev-mint"].filter((f) => v[f] !== undefined);
|
|
25
|
+
if (local.length)
|
|
26
|
+
throw new Error(`delivery: ${local.map((f) => `--${f}`).join(" and ")} cannot be combined with an injected secret store — the store is the cred's only source`);
|
|
27
|
+
}
|
|
28
|
+
/** Where the daemon's pre-minted cred lives — exactly ONE source: an injected {@link SecretStore}
|
|
29
|
+
* (a hosted composition), an explicit `--creds <file>` (e.g. a read-only container mount) as an FS
|
|
30
|
+
* store over that exact file, or the default workstation location. `where` is the human label used
|
|
31
|
+
* in error messages so a local operator still sees a path, not an abstract key.
|
|
32
|
+
*
|
|
33
|
+
* Called AFTER {@link assertNoLocalCredSourceFlags} has settled the injected/local conflict, which
|
|
34
|
+
* is what lets it take the derived `space`. The workstation arm goes through the per-kind RESOLVER:
|
|
35
|
+
* it is the reader whose "absent" answer sends `ensureDelivery` off to mint, so reading the
|
|
36
|
+
* canonical location past an unmigrated cred is how a root ends up with two live delivery creds.
|
|
37
|
+
* The injected arm builds the key without touching a filesystem it does not have. `--creds` names
|
|
38
|
+
* ONE file and is per-space by the operator's own choice of path, so it is neither segmented nor
|
|
39
|
+
* migrated — the store there is rooted at that file's own directory. */
|
|
40
|
+
function resolveCredsStore(v, space, injected) {
|
|
20
41
|
if (injected) {
|
|
21
|
-
const
|
|
22
|
-
|
|
23
|
-
throw new Error(`delivery: ${local.map((f) => `--${f}`).join(" and ")} cannot be combined with an injected secret store — the store is the cred's only source`);
|
|
24
|
-
return { store: injected, key: DELIVERY_CREDS_KEY, where: `secret-store key "${DELIVERY_CREDS_KEY}"`, injected: true };
|
|
42
|
+
const key = segmentedKey(DELIVERY_CREDS_KIND, space);
|
|
43
|
+
return { store: injected, key, where: `secret-store key "${key}"`, injected: true };
|
|
25
44
|
}
|
|
26
45
|
if (v.creds !== undefined) {
|
|
27
46
|
const p = resolve(v.creds);
|
|
28
47
|
return { store: new FsSecretStore(dirname(p)), key: basename(p), where: p, injected: false };
|
|
29
48
|
}
|
|
30
49
|
const root = findCotalRoot();
|
|
31
|
-
|
|
50
|
+
const key = deliveryCredsKey(space, { injected: false, root });
|
|
51
|
+
return { store: workspaceSecretStore(root), key, where: join(root, ".cotal", key), injected: false };
|
|
32
52
|
}
|
|
33
53
|
/** The daemon's scoped `delivery` creds — the PRODUCTION path reads a PRE-MINTED cred through the
|
|
34
54
|
* {@link SecretStore} seam ({@link resolveCredsStore}; locally the CLI's `ensureDelivery` setup helper
|
|
@@ -68,7 +88,7 @@ async function loadDeliveryCreds(src, v) {
|
|
|
68
88
|
};
|
|
69
89
|
}
|
|
70
90
|
if (src.injected)
|
|
71
|
-
throw new Error(`delivery: no cred in the injected secret store under key "${
|
|
91
|
+
throw new Error(`delivery: no cred in the injected secret store under key "${key}" — the hosted composition must put it before starting the daemon (local sources are never consulted when a store is injected). The key is PER-SPACE as of P7; a cred put under the bare kind "${DELIVERY_CREDS_KIND}" is not read here.`);
|
|
72
92
|
if (v["dev-mint"] !== undefined) {
|
|
73
93
|
// Space-blind dev path: the root must name exactly one space (soleSpaceOf fails loud on several).
|
|
74
94
|
const devRoot = authDir(findCotalRoot());
|
|
@@ -95,8 +115,10 @@ async function loadDeliveryCreds(src, v) {
|
|
|
95
115
|
*
|
|
96
116
|
* `store` is the hosted-composition seam: a closed composition root calls this export directly and
|
|
97
117
|
* injects its own {@link SecretStore} (KMS/Vault…) holding the daemon cred under
|
|
98
|
-
* {@link
|
|
99
|
-
*
|
|
118
|
+
* {@link deliveryCredsKey}`(space, …)` AND the membership feed's rw cred under the matching
|
|
119
|
+
* `membership-rw.creds` key — both PER-SPACE as of P7, so the bare kinds are the pre-P7 spelling and
|
|
120
|
+
* are not read; the registered `deliver` command passes none and gets the workstation FS store (or
|
|
121
|
+
* `--creds`). The
|
|
100
122
|
* renewal owner's write side (`remintDaemonCreds`) is threaded through the manager's
|
|
101
123
|
* `ManagerOptions.secretStore` too, so a hosted composition renews both daemon kinds end-to-end when
|
|
102
124
|
* the manager and this daemon are handed the SAME store.
|
|
@@ -108,13 +130,16 @@ export async function runDelivery(args, store) {
|
|
|
108
130
|
if (shards !== 1 || shard !== 0)
|
|
109
131
|
throw new Error(`delivery: sharded operation is not supported (N=1 only; got shard=${shard} shards=${shards}). ` +
|
|
110
132
|
"The partition() seam ships but operating shards>1 needs the channel-prefix grammar — see core-sub-fabric.md.");
|
|
111
|
-
//
|
|
112
|
-
// store
|
|
113
|
-
|
|
133
|
+
// Reject local-source flags FIRST — before the ambient space derivation below — so an injected
|
|
134
|
+
// store can never reach the workstation signer. The cred KEY is per-space as of P7, so resolving
|
|
135
|
+
// the source now needs the space that this check must precede; the check is therefore split out
|
|
136
|
+
// and stays here, ahead of everything ambient.
|
|
137
|
+
assertNoLocalCredSourceFlags(v, store);
|
|
114
138
|
// Space comes from --space (the CLI passes it). Only --dev-mint may derive it from the local signer.
|
|
115
139
|
const space = v.space ?? (v["dev-mint"] !== undefined ? soleSpaceOf(authDir(findCotalRoot())) : undefined);
|
|
116
140
|
if (!space)
|
|
117
141
|
throw new Error("delivery: --space is required (the scoped creds file does not encode it)");
|
|
142
|
+
const credsSrc = resolveCredsStore(v, space, store);
|
|
118
143
|
const server = v.server ?? DEFAULT_SERVER;
|
|
119
144
|
const creds = await loadDeliveryCreds(credsSrc, v); // pre-minted scoped cred; NO signer/loadSpaceAuth in this path
|
|
120
145
|
let latestCreds = creds.initial; // freshest renewal — the broker-reachability poll below presents it
|
|
@@ -133,10 +158,26 @@ export async function runDelivery(args, store) {
|
|
|
133
158
|
// of the WRONG account is indistinguishable from "the principal is gone" — a healthy-looking
|
|
134
159
|
// answer that authorizes eviction and gate reconciliation. Resolving the root per request from
|
|
135
160
|
// `process.cwd()` let that drift; and a daemon started in a foreign mesh root would sweep a
|
|
136
|
-
// foreign tenant while looking entirely well. So: the root is fixed at start, and the
|
|
137
|
-
//
|
|
138
|
-
//
|
|
139
|
-
|
|
161
|
+
// foreign tenant while looking entirely well. So: the root is fixed at start, and the OBSERVER
|
|
162
|
+
// CRED is cross-checked against the account this daemon's OWN credential authenticates as — two
|
|
163
|
+
// facts, neither of which comes from that root, which is what makes it an independent check.
|
|
164
|
+
// The $SYS pair resolves through the SAME injected store, so a hosted composition needs no
|
|
165
|
+
// `.cotal/` file for it. `injected` is this composition root's own fact — recorded here, where it
|
|
166
|
+
// is known for certain, rather than inferred later by probing the store or sniffing the
|
|
167
|
+
// filesystem, both of which report "workstation" for a hosted daemon and would emit a CLI repair
|
|
168
|
+
// the host cannot run. It selects the REPAIR IDIOM only; failure semantics never fork on it.
|
|
169
|
+
const scanRoot = findCotalRoot();
|
|
170
|
+
const scanTarget = {
|
|
171
|
+
root: scanRoot,
|
|
172
|
+
expectedAccount: accountFromCreds(creds.initial),
|
|
173
|
+
source: store === undefined
|
|
174
|
+
? { secrets: workspaceSecretStore(scanRoot), space, injected: false, root: scanRoot }
|
|
175
|
+
: { secrets: store, space, injected: true },
|
|
176
|
+
};
|
|
177
|
+
// The singleton lease is admission to serve this space, so the daemon must prove its scan tenancy
|
|
178
|
+
// before it can claim that slot. A wrong-root process previously acquired and renewed lease.0,
|
|
179
|
+
// then refused every admin-rail request on the account mismatch while blocking the valid daemon.
|
|
180
|
+
await validateScanTargetAdmission(scanTarget);
|
|
140
181
|
console.error(`• delivery: $SYS sweeps bound to ${join(scanTarget.root, ".cotal")} (account ${scanTarget.expectedAccount})`);
|
|
141
182
|
const ep = new CotalEndpoint({
|
|
142
183
|
space,
|
|
@@ -152,7 +193,13 @@ export async function runDelivery(args, store) {
|
|
|
152
193
|
registerPresence: false, // … but NEVER publish the daemon onto the roster (it's infra, not a peer)
|
|
153
194
|
card: { id: idFromCreds(creds.initial), name: "delivery", role: "delivery", kind: "endpoint" },
|
|
154
195
|
});
|
|
155
|
-
|
|
196
|
+
// Both channels: raw connection errors ride `error`, while every condition the endpoint is
|
|
197
|
+
// already surviving — a failed 75% renewal, the passive backstop's "still holds the previous
|
|
198
|
+
// cred" repair line — rides `warning` (#891). An operator who only sees the first watches the
|
|
199
|
+
// daemon go silent and then die at `exp` with no word of the remint it was waiting for.
|
|
200
|
+
const say = (e) => console.error(`! delivery endpoint: ${e.message}`);
|
|
201
|
+
ep.on("error", say);
|
|
202
|
+
ep.on("warning", say);
|
|
156
203
|
await ep.start();
|
|
157
204
|
// Acquire the single-flight lease BEFORE binding the loops: a loud refusal-to-bind if another daemon
|
|
158
205
|
// already holds this shard (two clients binding the same durable name SPLIT delivery). The bucket TTL
|
|
@@ -218,7 +265,10 @@ export async function runDelivery(args, store) {
|
|
|
218
265
|
// an arbitrary `--creds` path, whereas membership-rw lives under the workstation `.cotal/` key. With
|
|
219
266
|
// no injected store, startMembership falls back to the workstation FS store.
|
|
220
267
|
// Fail-soft, but never fault-FORGETFUL: whichever way the feed fails to come up, keep the reason.
|
|
221
|
-
|
|
268
|
+
// `accountId` is the account THIS daemon's own cred authenticates as (pinned above), not a
|
|
269
|
+
// `.cotal/membership.json` read: the file was never an independent source (same directory as the
|
|
270
|
+
// creds, so a wrong root was wrong for both) and a hosted composition has none.
|
|
271
|
+
({ handle: membership, down: membershipDown } = await startMembership({ space, server, accountId: scanTarget.expectedAccount }, store));
|
|
222
272
|
}
|
|
223
273
|
catch (e) {
|
|
224
274
|
membershipDown = e.message;
|
package/dist/delivery.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"delivery.js","sourceRoot":"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/dist/evict-exec.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type EvictionResult, type PlaneLivenessResult, type PrincipalLivenessResult } from "@cotal-ai/core";
|
|
2
|
+
import { type SysCredsSource } from "./sys-creds.js";
|
|
2
3
|
/**
|
|
3
4
|
* THE SCAN TARGET, resolved fail-closed and BOUND TO THE DAEMON'S OWN TENANCY.
|
|
4
5
|
*
|
|
@@ -12,9 +13,17 @@ import { type EvictionResult, type PlaneLivenessResult, type PrincipalLivenessRe
|
|
|
12
13
|
*
|
|
13
14
|
* Two independent guards, because either alone leaves a real case open:
|
|
14
15
|
* - the root is PINNED AT DAEMON START, so it cannot drift with `process.cwd()` between requests;
|
|
15
|
-
* - the
|
|
16
|
+
* - the OBSERVER CRED is CROSS-CHECKED against the account the daemon's own credential
|
|
16
17
|
* authenticates as. Pinning alone cannot notice a daemon that started in the wrong root to
|
|
17
|
-
* begin with; the tenancy check can, because
|
|
18
|
+
* begin with; the tenancy check can, because neither side of it is read from that root.
|
|
19
|
+
*
|
|
20
|
+
* The second guard used to compare `.cotal/membership.json` against `expectedAccount`. It now
|
|
21
|
+
* compares the OBSERVER'S OWN CONNZ PERMISSION against it (`sys-creds.ts`), which is strictly
|
|
22
|
+
* stronger: the file sat in the same directory as the creds, so a wrong root was wrong for both, and
|
|
23
|
+
* its independence came from `expectedAccount` being derived from the cred anyway — the cred was
|
|
24
|
+
* always the real authority and the file was the thing being checked. The disk file is still read as
|
|
25
|
+
* a SECOND source on the workstation path, where the root genuinely can drift; it is no longer
|
|
26
|
+
* required, and a hosted composition has none.
|
|
18
27
|
*
|
|
19
28
|
* A mismatch REFUSES LOUD and names both sides. Note the asymmetry that makes this necessary: an
|
|
20
29
|
* observer scoped to account A with accountId B under-reports (broker-denied → `unknown`, safe),
|
|
@@ -26,7 +35,35 @@ export interface ScanTarget {
|
|
|
26
35
|
root: string;
|
|
27
36
|
/** The account the daemon's own delivery credential authenticates as. */
|
|
28
37
|
expectedAccount: string;
|
|
38
|
+
/** Where the $SYS pair is read from, and whether that store was injected (hosted) — the latter
|
|
39
|
+
* selects the repair idiom only, never the failure semantics. */
|
|
40
|
+
source: SysCredsSource;
|
|
29
41
|
}
|
|
42
|
+
/**
|
|
43
|
+
* Pin check + the WORKSTATION-ONLY second source.
|
|
44
|
+
*
|
|
45
|
+
* The account to sweep is `target.expectedAccount` — the daemon's own credential, pinned at start.
|
|
46
|
+
* `membership.json` is no longer consulted for it. On the workstation path the file is still
|
|
47
|
+
* cross-checked WHEN PRESENT, because there a wrong root is a real, enumerated failure mode
|
|
48
|
+
* (see the cases above) and a second independent-ish source costs nothing. It is no longer
|
|
49
|
+
* REQUIRED: its absence is not an error, and a hosted composition never has one.
|
|
50
|
+
*/
|
|
51
|
+
export declare function validateScanTarget(target: ScanTarget, verb?: string): {
|
|
52
|
+
accountId: string;
|
|
53
|
+
};
|
|
54
|
+
/** Startup admission for the scan-backed delivery-admin rail.
|
|
55
|
+
*
|
|
56
|
+
* Root stability alone is not a tenancy proof for an injected store: the hosted composition has no
|
|
57
|
+
* `membership.json`, and the store may return another tenant's structurally valid observer. Read
|
|
58
|
+
* the pair through the exact source the executors will use, then validate the observer before the
|
|
59
|
+
* endpoint exists or lease.0 can be acquired. The observer is required because every liveness
|
|
60
|
+
* verdict needs an account-scoped complete scan. The evictor remains optional for pre-eviction
|
|
61
|
+
* spaces (their documented posture is deny-new-only), but when present it participates in the
|
|
62
|
+
* torn-rotation check so a mixed generation cannot be admitted as healthy.
|
|
63
|
+
*/
|
|
64
|
+
export declare function validateScanTargetAdmission(target: ScanTarget): Promise<{
|
|
65
|
+
accountId: string;
|
|
66
|
+
}>;
|
|
30
67
|
/**
|
|
31
68
|
* The delivery daemon's LIVE-EVICTION executor (D5 slice 6, on the privileged delivery-admin rail):
|
|
32
69
|
* force-drop a denied principal's live connections via the core scan→KICK→verify primitive. The two
|
|
@@ -44,13 +81,18 @@ export declare function executeEviction(server: string, target: ScanTarget, prin
|
|
|
44
81
|
* connection tuples; anything else refuses loudly. A space provisioned before the observer existed
|
|
45
82
|
* refuses with the regeneration step — the auth plane treats that refusal as UNKNOWN and never
|
|
46
83
|
* reclaims over it (fail-closed).
|
|
84
|
+
*
|
|
85
|
+
* Asks for the observer ONLY, so the KICK cred is not even read into this process's memory on a
|
|
86
|
+
* read-only path. The cost is that the torn-rotation check cannot run here (it needs both halves);
|
|
87
|
+
* that is safe rather than a gap — a torn pair whose observer is the stale half is refused by the
|
|
88
|
+
* broker, and this path reads any refusal as UNKNOWN, which is already fail-closed.
|
|
47
89
|
*/
|
|
48
90
|
export declare function executePlaneLiveness(server: string, target: ScanTarget, query: unknown): Promise<PlaneLivenessResult>;
|
|
49
91
|
/**
|
|
50
92
|
* The delivery daemon's FREEZE-HOLDER LIVENESS probe (#391, on the privileged delivery-admin rail):
|
|
51
93
|
* answer whether ONE principal still holds a live connection, via the $SYS CONNZ observer cred
|
|
52
94
|
* (opened per call; READ-ONLY — the KICK evictor cred never enters this path, and is not even read
|
|
53
|
-
* from
|
|
95
|
+
* from the store here).
|
|
54
96
|
*
|
|
55
97
|
* This is the READ half of {@link executeEviction}, and it exists because the write half cannot
|
|
56
98
|
* serve as its own precheck: a repair that must REFUSE while the holder is alive would, using
|
package/dist/evict-exec.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"evict-exec.d.ts","sourceRoot":"","sources":["../src/evict-exec.ts"],"names":[],"mappings":"AAEA,OAAO,EAOL,KAAK,cAAc,EAEnB,KAAK,mBAAmB,EACxB,KAAK,uBAAuB,EAC7B,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"evict-exec.d.ts","sourceRoot":"","sources":["../src/evict-exec.ts"],"names":[],"mappings":"AAEA,OAAO,EAOL,KAAK,cAAc,EAEnB,KAAK,mBAAmB,EACxB,KAAK,uBAAuB,EAC7B,MAAM,gBAAgB,CAAC;AAExB,OAAO,EAA0E,KAAK,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAG7H;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,MAAM,WAAW,UAAU;IACzB,mFAAmF;IACnF,IAAI,EAAE,MAAM,CAAC;IACb,yEAAyE;IACzE,eAAe,EAAE,MAAM,CAAC;IACxB;sEACkE;IAClE,MAAM,EAAE,cAAc,CAAC;CACxB;AAED;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,UAAU,EAAE,IAAI,SAAqB,GAAG;IAAE,SAAS,EAAE,MAAM,CAAA;CAAE,CA2BvG;AAED;;;;;;;;;GASG;AACH,wBAAsB,2BAA2B,CAAC,MAAM,EAAE,UAAU,GAAG,OAAO,CAAC;IAAE,SAAS,EAAE,MAAM,CAAA;CAAE,CAAC,CAiBpG;AA+BD;;;;;;;GAOG;AACH,wBAAsB,eAAe,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC,CAmBpH;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAsB,oBAAoB,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,OAAO,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAc3H;AAED;;;;;;;;;;;;GAYG;AACH,wBAAsB,wBAAwB,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,SAAS,EAAE,OAAO,GAAG,OAAO,CAAC,uBAAuB,CAAC,CAmBvI"}
|
package/dist/evict-exec.js
CHANGED
|
@@ -1,23 +1,97 @@
|
|
|
1
1
|
import { existsSync, readFileSync } from "node:fs";
|
|
2
2
|
import { join } from "node:path";
|
|
3
3
|
import { evictDeniedPrincipalWithCreds, isPlaneConnTuple, isPrincipalOwnerToken, observePlaneLivenessWithCreds, observePrincipalLivenessWithCreds, parsePrincipalKey, } from "@cotal-ai/core";
|
|
4
|
-
import { findCotalRoot } from "@cotal-ai/workspace";
|
|
5
|
-
|
|
4
|
+
import { CONNECTION_EVICTOR_CREDS_KIND, findCotalRoot, membershipConfigPath, MEMBERSHIP_OBSERVER_CREDS_KIND } from "@cotal-ai/workspace";
|
|
5
|
+
import { loadSysPair, observerTenancyProblem, repairAdvice, tornRotationProblem } from "./sys-creds.js";
|
|
6
|
+
/**
|
|
7
|
+
* Pin check + the WORKSTATION-ONLY second source.
|
|
8
|
+
*
|
|
9
|
+
* The account to sweep is `target.expectedAccount` — the daemon's own credential, pinned at start.
|
|
10
|
+
* `membership.json` is no longer consulted for it. On the workstation path the file is still
|
|
11
|
+
* cross-checked WHEN PRESENT, because there a wrong root is a real, enumerated failure mode
|
|
12
|
+
* (see the cases above) and a second independent-ish source costs nothing. It is no longer
|
|
13
|
+
* REQUIRED: its absence is not an error, and a hosted composition never has one.
|
|
14
|
+
*/
|
|
15
|
+
export function validateScanTarget(target, verb = "delivery startup") {
|
|
6
16
|
const live = findCotalRoot();
|
|
7
17
|
if (live !== target.root)
|
|
8
18
|
throw new Error(`${verb}: the mesh root resolved at this request (${live}) is not the one this daemon started in (${target.root}); ` +
|
|
9
19
|
"the scan account would be read from a different workspace than the one this daemon serves. Refusing — a sweep of the wrong account looks exactly like a dead principal");
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
20
|
+
if (!target.source.injected) {
|
|
21
|
+
// Through the kind's resolver (P7 §2 rule 1), not a hand-composed `.cotal/membership.json`:
|
|
22
|
+
// the file is per-space now, and reading the canonical location past an unmigrated copy would
|
|
23
|
+
// silently drop this second source — turning a wrong-root refusal into a confident sweep.
|
|
24
|
+
// `target.source.space` is the space the daemon started in, pinned with the rest of the source.
|
|
25
|
+
const cfgPath = membershipConfigPath(target.root, target.source.space);
|
|
26
|
+
if (existsSync(cfgPath)) {
|
|
27
|
+
// A malformed file on a path that no longer needs it must not take eviction down; only a file
|
|
28
|
+
// that names a DIFFERENT account is evidence of the drift this check exists to catch.
|
|
29
|
+
let onDisk;
|
|
30
|
+
try {
|
|
31
|
+
onDisk = JSON.parse(readFileSync(cfgPath, "utf8")).accountId;
|
|
32
|
+
}
|
|
33
|
+
catch {
|
|
34
|
+
onDisk = undefined;
|
|
35
|
+
}
|
|
36
|
+
if (onDisk !== undefined && onDisk !== target.expectedAccount)
|
|
37
|
+
throw new Error(`${verb}: ${cfgPath} names account ${onDisk}, but this daemon's own credential authenticates as ${target.expectedAccount}. ` +
|
|
38
|
+
"That disk material belongs to a different mesh, and sweeping it would return a confident, WRONG answer (a complete sweep of the wrong account is indistinguishable from a gone principal). Refusing — start the daemon from the workspace root whose account it serves");
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
return { accountId: target.expectedAccount };
|
|
42
|
+
}
|
|
43
|
+
/** Startup admission for the scan-backed delivery-admin rail.
|
|
44
|
+
*
|
|
45
|
+
* Root stability alone is not a tenancy proof for an injected store: the hosted composition has no
|
|
46
|
+
* `membership.json`, and the store may return another tenant's structurally valid observer. Read
|
|
47
|
+
* the pair through the exact source the executors will use, then validate the observer before the
|
|
48
|
+
* endpoint exists or lease.0 can be acquired. The observer is required because every liveness
|
|
49
|
+
* verdict needs an account-scoped complete scan. The evictor remains optional for pre-eviction
|
|
50
|
+
* spaces (their documented posture is deny-new-only), but when present it participates in the
|
|
51
|
+
* torn-rotation check so a mixed generation cannot be admitted as healthy.
|
|
52
|
+
*/
|
|
53
|
+
export async function validateScanTargetAdmission(target) {
|
|
54
|
+
const scan = validateScanTarget(target);
|
|
55
|
+
const sys = await loadSysPair(target.source, "both");
|
|
56
|
+
if (sys.observer === undefined)
|
|
57
|
+
throw new Error(`delivery startup: the $SYS observer cred is not provisioned here (missing ${MEMBERSHIP_OBSERVER_CREDS_KIND}) - ${repairAdvice(target.source, [MEMBERSHIP_OBSERVER_CREDS_KIND])}. Refusing before endpoint construction and lease admission because this daemon cannot establish which account its scan rail serves`);
|
|
58
|
+
const tenancy = observerTenancyProblem(sys.observer, target.expectedAccount);
|
|
59
|
+
if (tenancy)
|
|
60
|
+
throw new Error(`delivery startup: ${tenancy}. Refusing before endpoint construction and lease admission`);
|
|
61
|
+
if (sys.evictor !== undefined) {
|
|
62
|
+
const torn = tornRotationProblem(sys.observer, sys.evictor, () => repairAdvice(target.source, [MEMBERSHIP_OBSERVER_CREDS_KIND, CONNECTION_EVICTOR_CREDS_KIND]));
|
|
63
|
+
if (torn)
|
|
64
|
+
throw new Error(`delivery startup: ${torn}. Refusing before endpoint construction and lease admission`);
|
|
65
|
+
}
|
|
66
|
+
return scan;
|
|
67
|
+
}
|
|
68
|
+
/** Read the $SYS material for one verb and run every pre-connect check, or THROW.
|
|
69
|
+
*
|
|
70
|
+
* Fail-loud is the whole posture here (design §4.2): a missing key is a REFUSAL, full stop. In
|
|
71
|
+
* particular a missing evictor must NOT silently fall back to deny-new-only inside the executor —
|
|
72
|
+
* that posture is the CALLER's documented degradation, reached by handling this refusal, never
|
|
73
|
+
* something the executor may choose on its own. And absence (`undefined` per the `SecretStore`
|
|
74
|
+
* contract) is the only thing treated as "not provisioned": a `get()` that throws is a refusal,
|
|
75
|
+
* not an absence, and propagates untouched from `loadSysPair`. */
|
|
76
|
+
async function loadCheckedSys(target, verb, need) {
|
|
77
|
+
const sys = await loadSysPair(target.source, need);
|
|
78
|
+
if (sys.missing.length)
|
|
79
|
+
throw new Error(`${verb}: the $SYS ${need === "both" ? "observer/evictor creds are" : "observer creds are"} not provisioned here ` +
|
|
80
|
+
`(missing ${sys.missing.join(", ")}; a space created before live eviction) - ${repairAdvice(target.source, sys.missing)}. ` +
|
|
81
|
+
"Until then removal is deny-new-only (durable reauth)");
|
|
82
|
+
const observer = sys.observer;
|
|
83
|
+
const tenancy = observerTenancyProblem(observer, target.expectedAccount);
|
|
84
|
+
if (tenancy)
|
|
85
|
+
throw new Error(`${verb}: ${tenancy}. Refusing`);
|
|
86
|
+
if (sys.evictor !== undefined) {
|
|
87
|
+
// The torn-rotation check now covers this path too. It used to exist only in the feed, so
|
|
88
|
+
// eviction could open a half-rotated pair and get a bare "Authorization Violation" from the
|
|
89
|
+
// broker with nothing naming the cause.
|
|
90
|
+
const torn = tornRotationProblem(observer, sys.evictor, () => repairAdvice(target.source, [MEMBERSHIP_OBSERVER_CREDS_KIND, CONNECTION_EVICTOR_CREDS_KIND]));
|
|
91
|
+
if (torn)
|
|
92
|
+
throw new Error(`${verb}: ${torn}. Refusing`);
|
|
93
|
+
}
|
|
94
|
+
return { observer, ...(sys.evictor !== undefined ? { evictor: sys.evictor } : {}) };
|
|
21
95
|
}
|
|
22
96
|
/**
|
|
23
97
|
* The delivery daemon's LIVE-EVICTION executor (D5 slice 6, on the privileged delivery-admin rail):
|
|
@@ -37,15 +111,12 @@ export async function executeEviction(server, target, principal) {
|
|
|
37
111
|
const parsed = parsePrincipalKey(principal);
|
|
38
112
|
if (!parsed || !isPrincipalOwnerToken(parsed.owner))
|
|
39
113
|
throw new Error(`evictPrincipal: "${principal}" is not a real owner.actor principal (owner must be \`local\` or a derived \`u_…\` token — the only shapes CONNZ attribution can surface)`);
|
|
40
|
-
const {
|
|
41
|
-
const
|
|
42
|
-
const evPath = join(dir, "connection-evictor.creds");
|
|
43
|
-
if (!existsSync(obsPath) || !existsSync(evPath))
|
|
44
|
-
throw new Error("evictPrincipal: the $SYS observer/evictor creds are not provisioned here (a space created before live eviction); mint them with `cotal down` then `cotal up --rotate-sys`. Until then removal is deny-new-only (durable reauth)");
|
|
114
|
+
const { accountId } = validateScanTarget(target, "evictPrincipal");
|
|
115
|
+
const sys = await loadCheckedSys(target, "evictPrincipal", "both");
|
|
45
116
|
return evictDeniedPrincipalWithCreds({
|
|
46
117
|
servers: server,
|
|
47
|
-
observerCreds:
|
|
48
|
-
evictorCreds:
|
|
118
|
+
observerCreds: sys.observer,
|
|
119
|
+
evictorCreds: sys.evictor,
|
|
49
120
|
accountId,
|
|
50
121
|
principal,
|
|
51
122
|
});
|
|
@@ -58,6 +129,11 @@ export async function executeEviction(server, target, principal) {
|
|
|
58
129
|
* connection tuples; anything else refuses loudly. A space provisioned before the observer existed
|
|
59
130
|
* refuses with the regeneration step — the auth plane treats that refusal as UNKNOWN and never
|
|
60
131
|
* reclaims over it (fail-closed).
|
|
132
|
+
*
|
|
133
|
+
* Asks for the observer ONLY, so the KICK cred is not even read into this process's memory on a
|
|
134
|
+
* read-only path. The cost is that the torn-rotation check cannot run here (it needs both halves);
|
|
135
|
+
* that is safe rather than a gap — a torn pair whose observer is the stale half is refused by the
|
|
136
|
+
* broker, and this path reads any refusal as UNKNOWN, which is already fail-closed.
|
|
61
137
|
*/
|
|
62
138
|
export async function executePlaneLiveness(server, target, query) {
|
|
63
139
|
const q = query;
|
|
@@ -65,13 +141,11 @@ export async function executePlaneLiveness(server, target, query) {
|
|
|
65
141
|
Object.keys(q).some((k) => k !== "ledger" && k !== "records") || // closed top-level shape
|
|
66
142
|
!isPlaneConnTuple(q.ledger) || !isPlaneConnTuple(q.records))
|
|
67
143
|
throw new Error("planeConnLiveness: the query must be exactly { ledger, records } connection tuples ({ serverId, cid, userNkey }); refusing a malformed or wider query");
|
|
68
|
-
const {
|
|
69
|
-
const
|
|
70
|
-
if (!existsSync(obsPath))
|
|
71
|
-
throw new Error("planeConnLiveness: the $SYS observer creds are not provisioned here (a space created before live observation); mint them with `cotal down` then `cotal up --rotate-sys`");
|
|
144
|
+
const { accountId } = validateScanTarget(target, "planeConnLiveness");
|
|
145
|
+
const sys = await loadCheckedSys(target, "planeConnLiveness", "observer");
|
|
72
146
|
return observePlaneLivenessWithCreds({
|
|
73
147
|
servers: server,
|
|
74
|
-
observerCreds:
|
|
148
|
+
observerCreds: sys.observer,
|
|
75
149
|
accountId,
|
|
76
150
|
query: { ledger: q.ledger, records: q.records },
|
|
77
151
|
});
|
|
@@ -80,7 +154,7 @@ export async function executePlaneLiveness(server, target, query) {
|
|
|
80
154
|
* The delivery daemon's FREEZE-HOLDER LIVENESS probe (#391, on the privileged delivery-admin rail):
|
|
81
155
|
* answer whether ONE principal still holds a live connection, via the $SYS CONNZ observer cred
|
|
82
156
|
* (opened per call; READ-ONLY — the KICK evictor cred never enters this path, and is not even read
|
|
83
|
-
* from
|
|
157
|
+
* from the store here).
|
|
84
158
|
*
|
|
85
159
|
* This is the READ half of {@link executeEviction}, and it exists because the write half cannot
|
|
86
160
|
* serve as its own precheck: a repair that must REFUSE while the holder is alive would, using
|
|
@@ -100,13 +174,11 @@ export async function executePrincipalLiveness(server, target, principal) {
|
|
|
100
174
|
const parsed = parsePrincipalKey(wanted);
|
|
101
175
|
if (!parsed || !isPrincipalOwnerToken(parsed.owner))
|
|
102
176
|
throw new Error(`principalLiveness: "${wanted}" is not a real owner.actor principal (owner must be \`local\` or a derived \`u_…\` token — the only shapes CONNZ attribution can surface)`);
|
|
103
|
-
const {
|
|
104
|
-
const
|
|
105
|
-
if (!existsSync(obsPath))
|
|
106
|
-
throw new Error("principalLiveness: the $SYS observer creds are not provisioned here (a space created before live observation); mint them with `cotal down` then `cotal up --rotate-sys`");
|
|
177
|
+
const { accountId } = validateScanTarget(target, "principalLiveness");
|
|
178
|
+
const sys = await loadCheckedSys(target, "principalLiveness", "observer");
|
|
107
179
|
return observePrincipalLivenessWithCreds({
|
|
108
180
|
servers: server,
|
|
109
|
-
observerCreds:
|
|
181
|
+
observerCreds: sys.observer,
|
|
110
182
|
accountId,
|
|
111
183
|
principal: wanted,
|
|
112
184
|
});
|
package/dist/evict-exec.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"evict-exec.js","sourceRoot":"","sources":["../src/evict-exec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EACL,6BAA6B,EAC7B,gBAAgB,EAChB,qBAAqB,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BAAuB,MAAM,4IAA4I,CAAC,CAAC;IAC7L,MAAM,EAAE,SAAS,EAAE,GAAG,kBAAkB,CAAC,MAAM,EAAE,mBAAmB,CAAC,CAAC;IACtE,MAAM,GAAG,GAAG,MAAM,cAAc,CAAC,MAAM,EAAE,mBAAmB,EAAE,UAAU,CAAC,CAAC;IAC1E,OAAO,iCAAiC,CAAC;QACvC,OAAO,EAAE,MAAM;QACf,aAAa,EAAE,GAAG,CAAC,QAAQ;QAC3B,SAAS;QACT,SAAS,EAAE,MAAM;KAClB,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"feedback-intake.d.ts","sourceRoot":"","sources":["../src/feedback-intake.ts"],"names":[],"mappings":"AAIA,OAAO,EAAgE,KAAK,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAqD/G,wBAAsB,iBAAiB,CAAC,IAAI,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"feedback-intake.d.ts","sourceRoot":"","sources":["../src/feedback-intake.ts"],"names":[],"mappings":"AAIA,OAAO,EAAgE,KAAK,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAqD/G,wBAAsB,iBAAiB,CAAC,IAAI,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,CA2HvE"}
|
package/dist/feedback-intake.js
CHANGED
|
@@ -58,6 +58,7 @@ export async function runFeedbackIntake(args) {
|
|
|
58
58
|
},
|
|
59
59
|
});
|
|
60
60
|
ep.on("error", (e) => console.error(c.red("! " + e.message)));
|
|
61
|
+
ep.on("warning", (e) => console.error(c.red("! " + e.message)));
|
|
61
62
|
await ep.start();
|
|
62
63
|
mkdirSync(dirname(store), { recursive: true });
|
|
63
64
|
const http = createServer(async (req, res) => {
|