@cotal-ai/workspace 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.
Files changed (48) hide show
  1. package/dist/agent-secrets.d.ts +206 -0
  2. package/dist/agent-secrets.d.ts.map +1 -0
  3. package/dist/agent-secrets.js +468 -0
  4. package/dist/agent-secrets.js.map +1 -0
  5. package/dist/auth-paths.d.ts +10 -53
  6. package/dist/auth-paths.d.ts.map +1 -1
  7. package/dist/auth-paths.js +18 -134
  8. package/dist/auth-paths.js.map +1 -1
  9. package/dist/bin-path.d.ts.map +1 -1
  10. package/dist/bin-path.js +4 -1
  11. package/dist/bin-path.js.map +1 -1
  12. package/dist/extensions.d.ts +13 -1
  13. package/dist/extensions.d.ts.map +1 -1
  14. package/dist/extensions.js +16 -0
  15. package/dist/extensions.js.map +1 -1
  16. package/dist/index.d.ts +3 -0
  17. package/dist/index.d.ts.map +1 -1
  18. package/dist/index.js +3 -0
  19. package/dist/index.js.map +1 -1
  20. package/dist/local-process.d.ts +111 -1
  21. package/dist/local-process.d.ts.map +1 -1
  22. package/dist/local-process.js +204 -23
  23. package/dist/local-process.js.map +1 -1
  24. package/dist/pid.d.ts +0 -9
  25. package/dist/pid.d.ts.map +1 -1
  26. package/dist/pid.js +0 -10
  27. package/dist/pid.js.map +1 -1
  28. package/dist/progress.d.ts +18 -0
  29. package/dist/progress.d.ts.map +1 -0
  30. package/dist/progress.js +9 -0
  31. package/dist/progress.js.map +1 -0
  32. package/dist/renewal.d.ts +22 -15
  33. package/dist/renewal.d.ts.map +1 -1
  34. package/dist/renewal.js +27 -21
  35. package/dist/renewal.js.map +1 -1
  36. package/dist/space-segmentation.d.ts +260 -0
  37. package/dist/space-segmentation.d.ts.map +1 -0
  38. package/dist/space-segmentation.js +428 -0
  39. package/dist/space-segmentation.js.map +1 -0
  40. package/dist/space.d.ts +19 -0
  41. package/dist/space.d.ts.map +1 -1
  42. package/dist/space.js +31 -0
  43. package/dist/space.js.map +1 -1
  44. package/dist/system-rotation.d.ts +7 -6
  45. package/dist/system-rotation.d.ts.map +1 -1
  46. package/dist/system-rotation.js +25 -10
  47. package/dist/system-rotation.js.map +1 -1
  48. package/package.json +2 -2
package/dist/renewal.js CHANGED
@@ -3,6 +3,7 @@ import { join } from "node:path";
3
3
  import { credsClaims, credsFingerprint, identityFromCreds, mintCreds, writeSecretFile, } from "@cotal-ai/core";
4
4
  import { getSpaceAuth } from "./auth-paths.js";
5
5
  import { workspaceSecretStore } from "./secret-store-fs.js";
6
+ import { DELIVERY_CREDS_KIND, MEMBERSHIP_RW_CREDS_KIND, segmentedKey } from "./space-segmentation.js";
6
7
  /**
7
8
  * D5 slice 5 class-2 standing renewal — the RENEWAL OWNER'S half, shared by the manager (the
8
9
  * resident owner in every mesh mode) and `cotal doctor auth --fix` (the operator repair). The
@@ -11,22 +12,20 @@ import { workspaceSecretStore } from "./secret-store-fs.js";
11
12
  * preflight-proves each candidate). Machine-local file work lives here in the workspace layer:
12
13
  * implementations never import each other.
13
14
  */
14
- /** The canonical secret-store key of the delivery daemon's scoped cred by the FS convention the
15
- * key IS the filename under `.cotal/`. The single source for every tier (the CLI writer, the
16
- * delivery daemon reader, this renewal owner): a hand-copied drifted literal would silently split
17
- * the kind across two store entries with no compile error. Lives in workspace because the
18
- * key↔filename convention is the workspace layout's; implementations never import each other. */
19
- export const DELIVERY_CREDS_KEY = "delivery.creds";
20
- /** The membership feed's data-account rw cred key the same key↔filename discipline as
21
- * {@link DELIVERY_CREDS_KEY}. Named (not a bare literal) so the renewal owner can map a remint
22
- * result back to the daemon's `membership` component without a hand-copied string. */
23
- export const MEMBERSHIP_RW_CREDS_KEY = "membership-rw.creds";
24
- /** The seed-less daemon creds files a renewal owner re-signs. The $SYS files
25
- * (membership-observer, connection-evictor) are deliberately ABSENT: they are rotation-renewed —
26
- * no persisted seed can re-sign them, by design. */
15
+ /** The seed-less daemon creds a renewal owner re-signs. The $SYS kinds (membership-observer,
16
+ * connection-evictor) are deliberately ABSENT: they are rotation-renewed no persisted seed can
17
+ * re-sign them, by design. Their keys are {@link membershipObserverCredsKey} /
18
+ * {@link connectionEvictorCredsKey} injectable, but never re-signable from a persisted seed.
19
+ *
20
+ * `key` is a `(space) => key` BUILDER, not a literal, because these kinds are now per-space (§3.1):
21
+ * one entry no longer names one location. `kind` stays beside it because that is what a
22
+ * {@link RemintResult} reports and what an operator reads see {@link RemintResult.file}.
23
+ *
24
+ * The builders are {@link segmentedKey}, NOT the migrating per-kind resolvers: see that function for
25
+ * why the renewal owner is one of the two owners that must not move material. */
27
26
  export const REMINTABLE_DAEMON_CREDS = [
28
- { file: DELIVERY_CREDS_KEY, profile: "delivery" },
29
- { file: MEMBERSHIP_RW_CREDS_KEY, profile: "membership-rw" },
27
+ { kind: DELIVERY_CREDS_KIND, key: (space) => segmentedKey(DELIVERY_CREDS_KIND, space), profile: "delivery" },
28
+ { kind: MEMBERSHIP_RW_CREDS_KIND, key: (space) => segmentedKey(MEMBERSHIP_RW_CREDS_KIND, space), profile: "membership-rw" },
30
29
  ];
31
30
  /** Re-sign the daemon creds files for their EXISTING nkeys (a renewal must never swap a daemon's
32
31
  * identity — the daemon side pins it). Reads and writes through the secret-store seam; `store` is
@@ -34,7 +33,10 @@ export const REMINTABLE_DAEMON_CREDS = [
34
33
  * The manager — the D5 standing-renewal owner, and a hosted-path caller (manager.ts calls this
35
34
  * unconditionally) — passes the SAME store it gives the daemon (its `ManagerOptions.secretStore`),
36
35
  * so a hosted composition re-signs into the store the daemon renews from, never a divergent one; no
37
- * store means the local workspace FS composition (keys = the filenames under `.cotal/`).
36
+ * store means the local workspace FS composition (keys = the paths under `.cotal/`).
37
+ *
38
+ * The creds are PER-SPACE as of P7, so every store op is addressed by the entry's
39
+ * `key(expectedSpace)` builder (§3.1) while every RESULT still reports the entry's `kind`.
38
40
  *
39
41
  * `expectedSpace` (the caller's known space — the manager's `this.space`, doctor's resolved space) is
40
42
  * a REQUIRED positional and is validated against the store's signer: the daemon creds are SPACE-SCOPED,
@@ -72,14 +74,18 @@ export async function remintDaemonCreds(root, expectedSpace, store, opts) {
72
74
  }
73
75
  catch (e) {
74
76
  // Wrong-space / malformed signer: fail every file, DO NOT overwrite the last-good creds.
75
- return REMINTABLE_DAEMON_CREDS.map(({ file }) => ({ file, ok: false, error: e.message }));
77
+ return REMINTABLE_DAEMON_CREDS.map(({ kind }) => ({ file: kind, ok: false, error: e.message }));
76
78
  }
77
79
  if (!auth)
78
- return REMINTABLE_DAEMON_CREDS.map(({ file }) => ({ file, ok: false, skipped: "no-auth" }));
80
+ return REMINTABLE_DAEMON_CREDS.map(({ kind }) => ({ file: kind, ok: false, skipped: "no-auth" }));
79
81
  const results = [];
80
- for (const { file, profile } of REMINTABLE_DAEMON_CREDS) {
82
+ for (const { kind, key, profile } of REMINTABLE_DAEMON_CREDS) {
83
+ // The KIND is what the result reports (see `RemintResult.file`); the per-space KEY is what the
84
+ // store is addressed by. Read and write MUST use the same one — a get on the key and a put on
85
+ // the kind would re-sign the live cred into a dead flat location and leave the live one to expire.
86
+ const file = kind;
81
87
  try {
82
- const current = await s.get(file);
88
+ const current = await s.get(key(expectedSpace));
83
89
  if (current === undefined) {
84
90
  results.push({ file, ok: false, skipped: "missing-file" });
85
91
  continue;
@@ -109,7 +115,7 @@ export async function remintDaemonCreds(root, expectedSpace, store, opts) {
109
115
  results.push({ file, ok: false, error: `${why} - last-good cred preserved` });
110
116
  continue;
111
117
  }
112
- await s.put(file, next);
118
+ await s.put(key(expectedSpace), next);
113
119
  results.push({ file, ok: true, fingerprint: credsFingerprint(next) });
114
120
  }
115
121
  catch (e) {
@@ -1 +1 @@
1
- {"version":3,"file":"renewal.js","sourceRoot":"","sources":["../src/renewal.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EACL,WAAW,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ACH,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC;AAeD,MAAM,UAAU,iBAAiB,CAAC,IAAY;IAC5C,OAAO,IAAI,CAAC,IAAI,EAAE,QAAQ,EAAE,cAAc,CAAC,CAAC;AAC9C,CAAC;AAED,MAAM,UAAU,kBAAkB,CAAC,IAAY,EAAE,MAAqB;IACpE,+FAA+F;IAC/F,8FAA8F;IAC9F,2FAA2F;IAC3F,MAAM,QAAQ,GAAkB,EAAE,GAAG,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE,WAAW,EAAE,SAAS,EAAE,CAAC,CAAC,EAAE,CAAC;IACtH,eAAe,CAAC,iBAAiB,CAAC,IAAI,CAAC,EAAE,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;AAC9E,CAAC;AAED,MAAM,UAAU,iBAAiB,CAAC,IAAY;IAC5C,MAAM,CAAC,GAAG,iBAAiB,CAAC,IAAI,CAAC,CAAC;IAClC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC;QAAE,OAAO,SAAS,CAAC;IACrC,IAAI,CAAC;QACH,OAAO,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC,EAAE,MAAM,CAAC,CAAkB,CAAC;IAC9D,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,SAAS,CAAC,CAAC,qEAAqE;IACzF,CAAC;AACH,CAAC"}
@@ -0,0 +1,260 @@
1
+ import { type SecretStore } from "@cotal-ai/core";
2
+ /** `<root>/.cotal` — the dir whose children the segment must never collide with. */
3
+ export declare function cotalDir(root: string): string;
4
+ /**
5
+ * The reserved children of `<root>/.cotal/` that the codebase itself writes.
6
+ *
7
+ * {@link spaceSegment}'s collision guarantee was written against the reserved siblings of the AUTH
8
+ * dir. P7 puts a segment directly under `.cotal/`, which is a WIDER namespace, so the guarantee has
9
+ * to hold there too. It does today — no `.cotal` child begins with `space.` — but it held by
10
+ * ACCIDENT until something asserted it, which is what `smoke:space-segmentation` now does.
11
+ *
12
+ * LITERAL children only. The space-KEYED children (`manager.<spaceKey>.pid`, its log and
13
+ * delivery-aware marker, `delivery.<spaceKey>.pid`, its log, `auth-service.<spaceKey>.pid`) are not
14
+ * listed because they are not fixed names; they are the nearest miss to a canonical segment, sharing
15
+ * the `<prefix>.<spaceKey>` shape, and the guard suite checks their real expansions directly. Their
16
+ * root-scoped spellings USED to be listed here — the runtime pid/log namespace was root-scoped, so
17
+ * one root hosted one manager and one delivery daemon by filename — and the records among them are
18
+ * now `PRE_SEGMENTATION_RUNTIME_RECORDS` in `local-process.ts`, which is where the readers and
19
+ * sweepers take them from.
20
+ *
21
+ * Keep in sync with the writers of `.cotal/` children (`cotalPath(...)` in `up.ts`, the raw removal
22
+ * list at `clean.ts:272-279`). A name added here that starts with `space.` is a real collision and
23
+ * the guard suite fails rather than the layout silently aliasing a tenant's segment.
24
+ */
25
+ export declare const RESERVED_COTAL_CHILDREN: readonly string[];
26
+ /** The delivery daemon's scoped cred — the KIND, i.e. the basename its location ends in and the
27
+ * name every operator-facing string spells. Its store key is `space.<hex>/delivery.creds`, built by
28
+ * {@link deliveryCredsKey}; the bare kind is also the LEGACY root-scoped key this series migrates
29
+ * away from, which is why one constant serves both (a second literal is how the two would drift).
30
+ * Lives in workspace because the key↔filename convention is the workspace layout's; implementations
31
+ * never import each other. */
32
+ export declare const DELIVERY_CREDS_KIND = "delivery.creds";
33
+ /** The membership feed's data-account rw cred kind — same discipline as {@link DELIVERY_CREDS_KIND}.
34
+ * Named (not a bare literal) so the renewal owner can map a remint result back to the daemon's
35
+ * `membership` component without a hand-copied string. */
36
+ export declare const MEMBERSHIP_RW_CREDS_KIND = "membership-rw.creds";
37
+ /** The `$SYS` CONNZ observer's kind — the graph feed's read connection and the account-scoped sweep
38
+ * every liveness/eviction verdict is measured against.
39
+ *
40
+ * NOT in `REMINTABLE_DAEMON_CREDS` and never will be: this is `rotation-renewed`, so no persisted
41
+ * seed can re-sign it (the `$SYS` signing seed is discarded at provision). The key exists so a
42
+ * HOSTED composition can inject the cred a system-account rotation minted; it does not make the
43
+ * cred renewable. See `docs/design/u3-membership-sys-injection.md` §2. */
44
+ export declare const MEMBERSHIP_OBSERVER_CREDS_KIND = "membership-observer.creds";
45
+ /** The `$SYS` KICK-only evictor's kind — the write half of live eviction, paired with
46
+ * {@link MEMBERSHIP_OBSERVER_CREDS_KIND} by one rotation and read per call.
47
+ *
48
+ * Same `rotation-renewed` posture and the same non-membership of `REMINTABLE_DAEMON_CREDS`. Its
49
+ * permission (`$SYS.REQ.SERVER.*.KICK`) carries NO account, so unlike the observer it cannot be
50
+ * tenancy-checked from its own JWT; its containment is that every cid it is handed comes from the
51
+ * observer's account-scoped scan. Keep the two spelled together for that reason. */
52
+ export declare const CONNECTION_EVICTOR_CREDS_KIND = "connection-evictor.creds";
53
+ /** The DATA account id the CONNZ/event subjects pin — non-secret, but kept 0600 beside the creds.
54
+ * The only P7 kind with no store reader: it is read raw by the eviction path's workstation
55
+ * cross-check, so its resolver returns a PATH ({@link membershipConfigPath}) and has no hosted arm
56
+ * at all. */
57
+ export declare const MEMBERSHIP_CONFIG_KIND = "membership.json";
58
+ /** The P7 kinds' ROOT-SCOPED locations — the legacy layout this series retires. The two store keys
59
+ * (`membership-rw.creds`, `delivery.creds`) appear as plain names because under the local FS
60
+ * composition a key IS a path under `.cotal/`; see {@link migrateLegacyCotalMaterial} on why the
61
+ * migration is FS-composition-only. `delivery.creds` is here by the §3.2 widening. */
62
+ export declare const P7_LEGACY_MATERIAL: readonly string[];
63
+ /** Why the choke point would refuse to migrate on a root, in two parts a caller composes into its
64
+ * own sentence: the {@link reason} it cannot be shown to hold one tenant, and the {@link remedy} an
65
+ * operator actually has — which is sometimes NONE, and saying so is the point. */
66
+ export interface SpaceMaterialMigrationRefusal {
67
+ /** The root's tenant state, phrased to be quoted after a caller's own "refusing to X:" prefix. */
68
+ reason: string;
69
+ /** What the operator can do. Where nothing works this says so and names no command. */
70
+ remedy: string;
71
+ }
72
+ /**
73
+ * §2 RULE 4'S PRECONDITION, ASKABLE: would {@link migrateLegacyCotalMaterial} refuse on this root,
74
+ * and why? `undefined` means the root can be shown to hold exactly one tenant.
75
+ *
76
+ * THE ONE IMPLEMENTATION of the rule, exported so a guard that needs to know whether `cotal up` can
77
+ * migrate this root ASKS instead of re-deriving a tenant count. That is commit 2's `repairAdvice`
78
+ * lesson (`sys-creds.ts`) applied where it was still owed: a count is a second implementation of the
79
+ * rule, and it reads "one" on the corrupt-inventory root where this fails CLOSED. A guard built on a
80
+ * count would print a remedy on exactly the root where the remedy refuses.
81
+ *
82
+ * The two callers need it for opposite reasons — the choke point to refuse, the doors below to say
83
+ * truthfully what an operator can do next — and a rule with two implementations drifts at whichever
84
+ * one is not the one someone edits.
85
+ */
86
+ export declare function spaceMaterialMigrationRefusal(root: string): SpaceMaterialMigrationRefusal | undefined;
87
+ /**
88
+ * THE CHOKE POINT (§2 rules 1-4): resolve one kind's per-space location, migrating a legacy
89
+ * root-scoped copy into it on first touch, or REFUSING when the move cannot be made honestly.
90
+ *
91
+ * Returns the canonical path. A caller must obtain the location from here and never build it
92
+ * itself — that is rule 1, and it is what makes "migrate on first touch" reach every flow rather
93
+ * than the ones someone remembered to update.
94
+ *
95
+ * FS COMPOSITION ONLY, and the signature says so rather than the comment alone: this takes a root
96
+ * PATH and no `SecretStore`, so a hosted composition cannot call it. Rule 2's atomicity — the move
97
+ * is one `renameSync`, so a crash leaves each kind wholly legacy or wholly canonical — is a property
98
+ * of the filesystem, and the same move against a hosted store would be a get, put and delete with no
99
+ * atomicity across the three. That is not a gap: a hosted composition provisions these keys
100
+ * externally and re-keys by the coordinated change of §3.1, never by migrating in place. Taking no
101
+ * store makes the unsound call impossible to express, the same reason `rotateSystemCreds` takes none
102
+ * (`system-rotation.ts:88-95`).
103
+ *
104
+ * `parent` is the directory the legacy copy sits DIRECTLY in and under which the segment is created.
105
+ * It is a parameter rather than `cotalDir(root)` because §3 settled two different placements for the
106
+ * two series — P7's segment is a child of `.cotal/`, P1's a child of `.cotal/auth/creds/` — and that
107
+ * was decided in the plan, not discovered by P1. Everything the rules turn on is the same at both
108
+ * placements, so parameterizing the parent is what keeps them ONE implementation; a P1-local copy of
109
+ * rules 2-4 is the second idiom §4 forbids. `root` stays alongside it because rule 4's tenant count
110
+ * is a property of the ROOT's account records, not of whichever directory the material sits in.
111
+ */
112
+ export declare function migrateLegacyMaterialIn(parent: string, root: string, space: string, kind: string): string;
113
+ /** {@link migrateLegacyMaterialIn} at P7's placement — a legacy copy sitting directly under
114
+ * `<root>/.cotal/`. The five P7 resolvers' one entry point. */
115
+ export declare function migrateLegacyCotalMaterial(root: string, space: string, kind: string): string;
116
+ /**
117
+ * THE `space add` DOOR (§2.1): refuse to add a second tenant to a root that still holds unmigrated
118
+ * root-scoped material.
119
+ *
120
+ * Adding a tenant to such a root creates the one state segmentation cannot resolve — legacy material
121
+ * whose owner is unrecorded — and it is the only door that creates it, because `up` cannot mint a
122
+ * second tenant on an established root (`ensureRootForSpace` refuses at `up.ts:2233`). Checking here
123
+ * costs one inventory read in a verb that is already taking the lock and reading the inventory
124
+ * (`per-space-lifecycle.md` §2.1 step 1).
125
+ *
126
+ * This keeps that state from being CREATED. It does not keep it from being ENCOUNTERED — roots
127
+ * already multi-tenant when this series lands, and backups of them, bypass the door entirely. Rule 4
128
+ * of {@link migrateLegacyCotalMaterial} is what catches those. The two are one design and neither is
129
+ * sufficient alone.
130
+ *
131
+ * NOT YET CALLED: `cotal space add` does not exist as a command today (the verb is designed in
132
+ * `per-space-lifecycle.md` §2.1 and not implemented). This is the guarantee it must call when it is
133
+ * built, landed with the foundation so the verb cannot be written without it.
134
+ */
135
+ export declare function assertNoUnsegmentedLegacyMaterial(root: string, operation: string): void;
136
+ /** The P7 kinds still sitting at their root-scoped location on this root — the unmigrated set both
137
+ * doors weigh. Named rather than inlined twice because the two doors must agree on what counts. */
138
+ export declare function unsegmentedLegacyMaterial(root: string): string[];
139
+ /**
140
+ * WHICH COMPOSITION IS ASKING — the one input the per-kind resolvers below cannot infer.
141
+ *
142
+ * A UNION, not a `root?: string`, for the reason `SysCredsSource` is one (`sys-creds.ts`): the two
143
+ * arms answer differently and the workstation arm cannot do its job without a root. Rule 2's
144
+ * migration is FILESYSTEM-ONLY, so a hosted caller must get the canonical key and no rename; a
145
+ * workstation caller must get the migration, because skipping it is not a cosmetic miss — the kinds
146
+ * have absent-means-mint writers (`up.ts:2885`, `up.ts:2889`), so a canonical read on an unmigrated
147
+ * root reads ABSENT and mints a SECOND live cred beside the one the daemons are using. An optional
148
+ * root would let a workstation caller silently take the hosted answer and land in exactly that
149
+ * state. Requiring the root on that arm makes the unsound call impossible to express instead.
150
+ *
151
+ * `injected` is always the composition root's own fact — never inferred by probing the store or
152
+ * sniffing `.cotal/`, both of which report "workstation" for a hosted daemon.
153
+ */
154
+ export type SpaceMaterialComposition = {
155
+ injected: true;
156
+ root?: undefined;
157
+ } | {
158
+ injected: false;
159
+ root: string;
160
+ };
161
+ /**
162
+ * The KEY SHAPE alone — `space.<hex>/<kind>` — resolving nothing and moving nothing.
163
+ *
164
+ * THE ONE SPELLING of the segmented key, so {@link spaceMaterialKey} and the two owners below cannot
165
+ * drift into two layouts. It is exported for the owners that must NOT move material, and there are
166
+ * exactly two kinds of those:
167
+ *
168
+ * - DELETERS. `clean`'s store-seam sweep names the keys it is about to remove; migrating material
169
+ * into the path it will then delete is work done to undo itself, and on the refusal paths (§2
170
+ * rules 3 and 4) it would fail the sweep for material the sweep does not care about.
171
+ * - THE RENEWAL OWNER. {@link REMINTABLE_DAEMON_CREDS}'s `(space) => key` builders (§3.1) feed
172
+ * `remintDaemonCreds`, which has NO absent-means-mint path — its absence case is a loud
173
+ * `skipped: "missing-file"`, never a second cred — and which may hold an INJECTED store while
174
+ * still being handed a workstation `root` it does not own (`manager.ts:870` defaults the store,
175
+ * so `store !== undefined` is not the hosted fact there). The hazard rule 1 exists to stop is not
176
+ * reachable from it, and `up`'s provisioners migrate before any daemon exists to renew.
177
+ *
178
+ * Every other caller wants {@link spaceMaterialKey}: reaching for this one to skip a migration is
179
+ * the read-fallback the design forbids.
180
+ */
181
+ export declare function segmentedKey(kind: string, space: string): string;
182
+ /**
183
+ * THE PER-KIND RESOLVER (§2 rule 1), generic over the kind: the canonical store key for `kind` in
184
+ * `space`, having migrated a legacy root-scoped copy into it first on the FS composition.
185
+ *
186
+ * The named per-kind wrappers below are the surface callers use; this is the one body they share, so
187
+ * "migrate on first touch" cannot exist for four kinds and be forgotten for the fifth. Under the
188
+ * local FS composition the returned key IS the path under `.cotal/` that
189
+ * {@link migrateLegacyCotalMaterial} just moved the material to — the two agree by construction
190
+ * rather than by two spellings of the same layout.
191
+ */
192
+ export declare function spaceMaterialKey(kind: string, space: string, composition: SpaceMaterialComposition): string;
193
+ /** {@link DELIVERY_CREDS_KIND}'s key for `space` — see {@link spaceMaterialKey}. */
194
+ export declare function deliveryCredsKey(space: string, composition: SpaceMaterialComposition): string;
195
+ /** {@link MEMBERSHIP_RW_CREDS_KIND}'s key for `space` — see {@link spaceMaterialKey}. */
196
+ export declare function membershipRwCredsKey(space: string, composition: SpaceMaterialComposition): string;
197
+ /** {@link MEMBERSHIP_OBSERVER_CREDS_KIND}'s key for `space` — see {@link spaceMaterialKey}. */
198
+ export declare function membershipObserverCredsKey(space: string, composition: SpaceMaterialComposition): string;
199
+ /** {@link CONNECTION_EVICTOR_CREDS_KIND}'s key for `space` — see {@link spaceMaterialKey}. */
200
+ export declare function connectionEvictorCredsKey(space: string, composition: SpaceMaterialComposition): string;
201
+ /** {@link MEMBERSHIP_CONFIG_KIND}'s PATH for `space`, migrated on first touch.
202
+ *
203
+ * A path and not a key, and it takes a bare `root` rather than a {@link SpaceMaterialComposition},
204
+ * because this kind has no hosted arm to choose between: it is read raw by the eviction path's
205
+ * workstation-only cross-check (`evict-exec.ts:76`) and a hosted composition never has one. */
206
+ export declare function membershipConfigPath(root: string, space: string): string;
207
+ /** The per-space area itself, `<root>/.cotal/space.<hex>/` — for the enumerating callers (the
208
+ * `clean` sweep) that remove a tenant's whole segment rather than one kind of it. Resolves NOTHING
209
+ * and migrates NOTHING: a sweeper must not move material it is about to delete. */
210
+ export declare function spaceMaterialDir(root: string, space: string): string;
211
+ /**
212
+ * `cotal space rm` STEP 1'S PRECONDITION for the step 7 reap (`per-space-lifecycle.md` §2.2), which
213
+ * is deliberately not checked at step 7.
214
+ *
215
+ * THE ORDERING IS THE DESIGN. Step 5 is the point of no return: it deletes the tenant's streams and
216
+ * buckets. Step 7 is the local reap. A precondition discovered at step 7 would refuse AFTER the data
217
+ * is gone and the config re-rendered, leaving the journal entry standing — and since the check would
218
+ * fail identically on every re-run, the removal a crash is supposed to be able to finish could never
219
+ * finish at all. So the question is asked at step 1, beside the inventory read that is already
220
+ * happening, where a refusal costs the operator nothing.
221
+ *
222
+ * WHAT IT REFUSES: a root still holding root-scoped material for any P7 kind. `space rm` runs only on
223
+ * a multi-tenant root (§2.2 step 2 refuses the last tenant), and on such a root that material is
224
+ * unattributable in the §2.1 sense — it belongs to whichever tenant booted first, unrecorded. Reaping
225
+ * around it strands what may be the departing tenant's live `$SYS` pair for a survivor to inherit;
226
+ * reaping it may take a survivor's. There is no third answer, and the honest move is to refuse before
227
+ * anything is destroyed rather than to pick one silently.
228
+ *
229
+ * NOT YET CALLED: `cotal space rm` does not exist as a command today (§2.2 designs it; no `space`
230
+ * verb is implemented). This lands with the material it guards so the verb cannot be written without
231
+ * it, the same reason {@link assertNoUnsegmentedLegacyMaterial} landed with commit 1.
232
+ */
233
+ export declare function assertSpaceMaterialReapable(root: string, space: string, operation: string): void;
234
+ /**
235
+ * `cotal space rm` STEP 7 (`per-space-lifecycle.md` §2.2): reap ONE tenant's segmented material — the
236
+ * `$SYS` pair that step names, plus the rest of that tenant's segment, which P7 keyed alongside it.
237
+ *
238
+ * IT CANNOT REFUSE, and that is a contract, not an omission. It runs past step 5's point of no
239
+ * return, where a throw would strand the journal entry that gates every other verb on the root; §2.2
240
+ * relies on steps 5 to 7 being individually idempotent so a re-run after a crash FINISHES the
241
+ * removal. So seam failures are returned, not thrown — the same posture, for the same reason, as
242
+ * `remintDaemonCreds` (`renewal.ts`), and the caller must read `failed` or the material silently
243
+ * survives the tenant. Its precondition is {@link assertSpaceMaterialReapable}, asked at step 1.
244
+ *
245
+ * The seam deletes come FIRST and are addressed by {@link segmentedKey}, never by a resolver: a
246
+ * reaper is a DELETER, so it must not move material into the path it is about to remove, and a §2
247
+ * rule 3/4 refusal must not fail a reap over material the reap does not care about. It sweeps every
248
+ * store-backed kind rather than only the two `clean` does, because `clean` is a whole-root reset with
249
+ * a raw sweep of `.cotal/` to fall back on and this is not: for an INJECTED store the segment removal
250
+ * below reaches nothing, so a kind missing from the seam loop would outlive its tenant.
251
+ *
252
+ * It removes only THIS space's segment. A reap spelled `.cotal/space.*` is the shape a reader reaches
253
+ * for after seeing a directory removal, and on the multi-tenant root that is the only root this verb
254
+ * runs on it would take every surviving tenant's live material and report success.
255
+ */
256
+ export declare function reapSpaceMaterial(root: string, space: string, secrets: SecretStore): Promise<{
257
+ removed: string[];
258
+ failed: string[];
259
+ }>;
260
+ //# sourceMappingURL=space-segmentation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"space-segmentation.d.ts","sourceRoot":"","sources":["../src/space-segmentation.ts"],"names":[],"mappings":"AAuBA,OAAO,EAAe,KAAK,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAG/D,oFAAoF;AACpF,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAE7C;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,uBAAuB,EAAE,SAAS,MAAM,EAKpD,CAAC;AAEF;;;;;+BAK+B;AAC/B,eAAO,MAAM,mBAAmB,mBAAmB,CAAC;AAEpD;;2DAE2D;A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