@cotal-ai/manager 0.36.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/manager.d.ts CHANGED
@@ -324,6 +324,9 @@ export interface SpawnAcceptance {
324
324
  uid: string;
325
325
  goalId: string;
326
326
  fingerprint: string;
327
+ /** The connector-selected readiness budget persisted on this goal. A synchronous follower must
328
+ * outlive it; otherwise it can time out while the manager is still legitimately waiting. */
329
+ readinessDeadlineMs: number;
327
330
  executor: {
328
331
  lifecycleUid: string;
329
332
  epoch: number;
@@ -359,6 +362,8 @@ export declare class Manager {
359
362
  /** See {@link ManagerOptions.installedExtensions}. */
360
363
  private readonly installedExtensions;
361
364
  private readonly runtime;
365
+ /** Internal test seam. Production leaves this undefined and uses the scoped delivery-admin evictor. */
366
+ private staticLifecycleEvict?;
362
367
  private readonly preserveStopTimeoutMs;
363
368
  private readonly agents;
364
369
  /** Names whose spawn is in flight (reserved synchronously before the provision await) — counted
@@ -461,6 +466,9 @@ export declare class Manager {
461
466
  private agentGoals;
462
467
  /** Process start, for the served `status` uptime. */
463
468
  private readonly startedAtMs;
469
+ /** Connector harness paths resolved ONCE at boot. Missing binaries do not stop unrelated manager
470
+ * work, but they are named before the manager reports ready and remain visible in manager status. */
471
+ private connectorStatuses;
464
472
  /** Static aliases whose startup exact-op terminal is still in flight. Scoped per alias: control
465
473
  * serves during the sweep, but no caller can reuse or attach an alias the sweep still owns. */
466
474
  private readonly reconcilingAliases;
@@ -909,6 +917,10 @@ export declare class Manager {
909
917
  /** Connector names the manager can spawn WITHOUT importing: the manifest on the published binary,
910
918
  * else whatever a composition root registered. Drives the `models` catalog enumeration. */
911
919
  private connectorNames;
920
+ /** Resolve every installed/registered connector's declared harness binaries before the manager
921
+ * reports ready. A missing harness degrades only that connector, never unrelated lifecycle work:
922
+ * boot continues, but prints a named refusal and records it on both manager status surfaces. */
923
+ private inspectConnectorsAtBoot;
912
924
  /** Return connector-provided model catalogs for selector UIs. Optional by connector: a host with no
913
925
  * local model-list API reports `supported:false` rather than blocking the manager. A connector that
914
926
  * fails to import shows an `error:` row (from manifest enumeration) and never blocks the others. */
@@ -1210,8 +1222,8 @@ export declare class Manager {
1210
1222
  /** The Unit B reconciliation (F3 "no active orphan"): ensure the authority stores, then sweep
1211
1223
  * every durable slot row and act by the TOTAL resume table — `provisioning`/`terminalizing`
1212
1224
  * re-drive the exact-op terminal; an `active` row survives ONLY when a LIVE managed agent this
1213
- * process owns backs it at the same uid (`adopted`), else its process is gone and it
1214
- * terminalizes; `retired` rows seed the F5 refusal index. Two call sites: the BOOT sweep
1225
+ * manager process owns backs it at the same uid (`adopted`), else no managed owner claimed it and
1226
+ * its broker authority is contained and terminalized; `retired` rows seed the F5 refusal index. Two call sites: the BOOT sweep
1215
1227
  * (`postAdoption=false`, under the lease before control serving) DEFERS active-non-adopted
1216
1228
  * slots while a resume is still pending (adoption runs after it); the POST-ADOPTION sweep
1217
1229
  * (`postAdoption=true`, inside finalizeResume while `resumeRequired` still fences ordinary
@@ -1245,6 +1257,21 @@ export declare class Manager {
1245
1257
  * preserves everything else — and is allowed on the privileged tier only if `file.owner == caller`,
1246
1258
  * else admin is required. Fail-closed: an ownerless file (legacy / operator-written) is admin-only. */
1247
1259
  private opDefinePersona;
1260
+ /** Whether this caller may READ a catalog card's details (role/model/description/body). Same
1261
+ * ownership rule as redefine: owner == caller, or admin. Ownerless / operator-written files are
1262
+ * admin-only. Names of parseable files still appear on the list so a definer can see a taken
1263
+ * spawn name; details stay off the wire unless this is true. */
1264
+ private canReadPersona;
1265
+ /** Mesh-side catalog list (#402). Every parseable name is returned so a definer can see a taken
1266
+ * spawn name. Role / model / description / owner ride only when the caller could redefine the
1267
+ * file (same ownership as `definePersona`); other cards are name-only, so a peer cannot read a
1268
+ * prompt it does not own. Unparseable files are omitted for non-admin (no existence leak of a
1269
+ * broken card). */
1270
+ private opListPersonas;
1271
+ /** Mesh-side catalog show (#402). Same ownership as list. Unknown, unauthorized, or unparseable
1272
+ * names are not-found (no existence or parser-diagnostic leak). The body is included so a peer can
1273
+ * inspect a prompt it owns before spawn; policy fields stay off the wire. */
1274
+ private opShowPersona;
1248
1275
  /** The post-authorization `input` effect (C3): type `text` into the seat's terminal as if a human
1249
1276
  * had. The single call an external UI needs to deliver a harness command (`/compact`, `/clear`,
1250
1277
  * `/model`) without holding a terminal open on the caller's side.
@@ -1 +1 @@
1
- {"version":3,"file":"manager.d.ts","sourceRoot":"","sources":["../src/manager.ts"],"names":[],"mappings":"AA+CA,OAAO,KAAK,EAA4E,YAAY,EAAwD,eAAe,EAAY,WAAW,EAAa,MAAM,gBAAgB,CAAC;AACtO,OAAO,EAIL,KAAK,WAAW,EACjB,MAAM,oBAAoB,CAAC;AA2C5B,OAAO,EAsCL,KAAK,YAAY,EAGjB,KAAK,QAAQ,EAEd,MAAM,gBAAgB,CAAC;AAExB,OAAO,KAAK,EAAE,cAAc,EAAgB,MAAM,yBAAyB,CAAC;AAoB5E;;;;;;;sDAOsD;AACtD,eAAO,MAAM,oBAAoB,QAAS,CAAC;AA8D3C,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,kFAAkF;IAClF,OAAO,CAAC,EAAE,WAAW,CAAC;IACtB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,qEAAqE;IACrE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;iGAE6F;IAC7F,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;;4GAIwG;IACxG,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,uEAAuE;IACvE,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,+FAA+F;IAC/F,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,+EAA+E;IAC/E,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAClC;;4GAEwG;IACxG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AAwF;IACxF;gGAC4F;IAC5F,OAAO,CAAC,IAAI;CAyCb"}
package/dist/manager.js CHANGED
@@ -4,11 +4,11 @@ import { hostname } from "node:os";
4
4
  import { connect, credsAuthenticator } from "@nats-io/transport-node";
5
5
  import { existsSync, lstatSync, readFileSync, rmSync } from "node:fs";
6
6
  import { join, dirname, resolve } from "node:path";
7
- import { CotalEndpoint, DEFAULT_SERVER, DEV_OWNER, MANAGER_LEASE_RENEW_MS, STANDING_RENEWABLE_TTL_SEC, agentFilePath, clearSpaceHistory, connectorServers, spawnEnvAllow, deprovisionAgent, firstFreeName, spawnNameError, idFromCreds, inspectCredHealth, loadAgentFile, loadCotalConfig, mintCreds, mintLifecycleUid, mkSecretDir, newIdentity, actionContext, parsePrincipalKey, parseShareSelection, principalKey, probeConnect, provisionAgent, provisionAgentDurables, registry, resolveAuthProvider, saveAgentFile, subjectMatches, AUTH_ENDPOINT, EP_CMD_RETIRE_LIFECYCLE, epRequestSubject, epCallerReplyFilter, parseEpSubject, controlServiceSubject, eventChannelPrincipal, } from "@cotal-ai/core";
8
- import { agentAuthState, agentCredsDir, agentLifecycleSecretFilePaths, agentSecretFilePaths, agentSecretKeyForFile, authDir, connectorInstallHint, DEFAULT_CONNECTOR, defaultAgentType, DELIVERY_CREDS_KIND, findCotalRoot, getSpaceAuth, hasUserAuthState, loadManagerInstanceIdentity, loadMeshes, manifestExtensionNames, materializeFromManifest, materializeSecretToFile, MEMBERSHIP_RW_CREDS_KIND, mergeLaunchOptions, remintDaemonCreds, resolveOnPath, saveManagerInstanceIdentity, spaceMaterialKey, SYSTEM_CREDS_FILES, userAuthStateDir, workspaceSecretStore, writeRenewalRecord } from "@cotal-ai/workspace";
7
+ import { CotalEndpoint, DEFAULT_SERVER, DEV_OWNER, MANAGER_LEASE_RENEW_MS, STANDING_RENEWABLE_TTL_SEC, agentFilePath, clearSpaceHistory, connectorServers, spawnEnvAllow, deprovisionAgent, firstFreeName, spawnNameError, idFromCreds, inspectCredHealth, loadAgentFile, listPersonaCatalog, personaCatalogDescription, personaCatalogReadable, loadCotalConfig, mintCreds, mintLifecycleUid, mkSecretDir, newIdentity, actionContext, parsePrincipalKey, parseShareSelection, principalKey, probeConnect, provisionAgent, provisionAgentDurables, registry, resolveAuthProvider, saveAgentFile, subjectMatches, AUTH_ENDPOINT, EP_CMD_RETIRE_LIFECYCLE, epRequestSubject, epCallerReplyFilter, parseEpSubject, controlServiceSubject, eventChannelPrincipal, } from "@cotal-ai/core";
8
+ import { agentAuthState, agentCredsDir, agentLifecycleSecretFilePaths, agentSecretFilePaths, agentSecretKeyForFile, authDir, connectorInstallHint, DEFAULT_CONNECTOR, defaultAgentType, DELIVERY_CREDS_KIND, extensionConnectors, findCotalRoot, getSpaceAuth, hasUserAuthState, loadExtensionsManifest, loadManagerInstanceIdentity, loadMeshes, manifestExtensionNames, materializeFromManifest, materializeSecretToFile, MEMBERSHIP_RW_CREDS_KIND, mergeLaunchOptions, remintDaemonCreds, resolveOnPath, saveManagerInstanceIdentity, spaceMaterialKey, SYSTEM_CREDS_FILES, userAuthStateDir, workspaceSecretStore, writeRenewalRecord } from "@cotal-ai/workspace";
9
9
  import { createRuntime, } from "./runtime/index.js";
10
10
  import { AttachEndpoint } from "./attach-endpoint.js";
11
- import { makeManagerEndpointEvictor } from "./endpoint-evict.js";
11
+ import { makeManagerEndpointEvictionEvidence, makeManagerEndpointEvictor } from "./endpoint-evict.js";
12
12
  import { makeManagerHolderLivenessProbe } from "./holder-liveness.js";
13
13
  import { GateReconcileRefused, reconcileEndpointGate } from "./reconcile-gate.js";
14
14
  import { launchSpecForRun, materializePersona, launchAgentToStartOpts, parseLaunchSpec, persistLaunchSpec } from "./launch.js";
@@ -28,7 +28,7 @@ import { ManagerSessionPlane, openSessionLedgerKv } from "./session/index.js";
28
28
  // P2 item 1 (1a-serve): the manager as an ordinary v0.4 `service` endpoint — the §13.1
29
29
  // endpoint-serve credential subsystem (gate provisioning, registration barrier, mint fence) plus
30
30
  // the register/authorize/serve seams, all driven over a scoped one-shot executor connection.
31
- import { provisionEndpointGateOpen, endpointRegistrationBarrier, serveIssuanceGateKv, commitSiblingIssuance, markLedgerRowRevoked, epcredRowKey, epgateKey, parseEndpointGate, registerServiceInstance, deregisterServiceInstance, authorizeServeGrant, writeServiceStatus, SERVICE_READY, serveEndpoint, bindGoal, createGoal, transitionGoal, commitGoalResult, settleGoalUncertain, readGoalResult, readGoalStatus, readGoalSpec, recordGoalIndex, readGoalIndex, clearGoalIndex, listGoalIndex, GOAL_TERMINAL_STATES, goalRefOf, goalProgressTopic, epeSubject, submissionFingerprint, EpEnvelopeError, } from "@cotal-ai/core";
31
+ import { provisionEndpointGateOpen, endpointRegistrationBarrier, serveIssuanceGateKv, commitSiblingIssuance, markLedgerRowRevoked, epcredRowKey, epgateKey, parseEndpointGate, registerServiceInstance, deregisterServiceInstance, authorizeServeGrant, writeServiceStatus, SERVICE_READY, serveEndpoint, bindGoal, createGoal, transitionGoal, commitGoalResult, settleGoalUncertain, readGoalResult, readGoalStatus, readGoalSpec, recordGoalIndex, readGoalIndex, clearGoalIndex, listGoalIndex, GOAL_TERMINAL_STATES, goalRefOf, goalProgressTopic, epeSubject, submissionFingerprint, EpEnvelopeError, lifecycleBlocked, renderLifecycleBlocked, } from "@cotal-ai/core";
32
32
  import { MANAGER_ENDPOINT, managerClusterArtifacts, managerCommandDefs, managerContractArtifactValues } from "./manager-service-contract.js";
33
33
  import { staticLifecycleTransport, activateStaticLifecycle, runStaticTerminal, readStaticSlot, casStaticSlot, recordSlotCredential, appendStaticCredentialRow, planStaticSlotResume, } from "./static-lifecycle.js";
34
34
  /** Concurrency ceiling — the manager refuses to hold more than this many live + in-flight +
@@ -210,6 +210,8 @@ export class Manager {
210
210
  /** See {@link ManagerOptions.installedExtensions}. */
211
211
  installedExtensions;
212
212
  runtime;
213
+ /** Internal test seam. Production leaves this undefined and uses the scoped delivery-admin evictor. */
214
+ staticLifecycleEvict;
213
215
  preserveStopTimeoutMs;
214
216
  agents = new Map();
215
217
  /** Names whose spawn is in flight (reserved synchronously before the provision await) — counted
@@ -312,6 +314,9 @@ export class Manager {
312
314
  agentGoals = new Map();
313
315
  /** Process start, for the served `status` uptime. */
314
316
  startedAtMs = Date.now();
317
+ /** Connector harness paths resolved ONCE at boot. Missing binaries do not stop unrelated manager
318
+ * work, but they are named before the manager reports ready and remain visible in manager status. */
319
+ connectorStatuses = [];
315
320
  /** Static aliases whose startup exact-op terminal is still in flight. Scoped per alias: control
316
321
  * serves during the sweep, but no caller can reuse or attach an alias the sweep still owns. */
317
322
  reconcilingAliases = new Set();
@@ -453,6 +458,7 @@ export class Manager {
453
458
  `refused outright and writes no creds file.`;
454
459
  }
455
460
  async start() {
461
+ await this.inspectConnectorsAtBoot();
456
462
  await this.attach.start();
457
463
  // In auth mode the manager is just another user in the space's account — it mints
458
464
  // itself creds from the same signing key it uses for the agents it spawns. The signer comes
@@ -542,9 +548,11 @@ export class Manager {
542
548
  watchChannels: false,
543
549
  card: { id, ...(this.remoteAuthority ? { owner: this.remoteAuthority.owner, actor: this.remoteAuthority.actors.supervisor } : {}), name: this.name, role: "manager", kind: "endpoint" },
544
550
  });
545
- // Surface endpoint errors (incl. NATS permission denials) without a listener an
546
- // emitted "error" would crash the supervisor.
547
- this.ep.on("error", (e) => console.error(`! manager endpoint: ${e.message}`));
551
+ // Raw failures ride error; conditions the endpoint is already surviving ride warning. Both
552
+ // matter to a supervisor operator, especially a failed standing-credential renewal.
553
+ const reportEndpoint = (e) => console.error(`! manager endpoint: ${e.message}`);
554
+ this.ep.on("error", reportEndpoint);
555
+ this.ep.on("warning", reportEndpoint);
548
556
  await this.ep.start();
549
557
  await this.ep.setActivity(`supervisor (${this.runtime.kind})`);
550
558
  // Per-instance liveness lease (P2 item 3 — the old per-space singleton is DEMOTED per D9). Acquire
@@ -1179,14 +1187,29 @@ export class Manager {
1179
1187
  * touches NEITHER the lease NOR the endpoints — the caller owns those. */
1180
1188
  async teardownManagedAgents() {
1181
1189
  const managed = [...this.agents.values()];
1190
+ const failures = [];
1182
1191
  for (const a of managed) {
1183
1192
  // Free the slot + hard-stop each; `stopHandle` is best-effort (never throws — see it), so one bad
1184
1193
  // stop can't strand the rest, and every snapshot entry is deprovisioned below regardless.
1185
1194
  this.agents.delete(a.name);
1186
1195
  this.stopHandle(a, false);
1187
1196
  }
1197
+ // A runtime stop request is not exit proof. Do not release the manager lease or registration
1198
+ // while any seat may still hold this instance's broker rails: that creates the exact orphan
1199
+ // window where a successor sees a dead manager but live predecessor authority. Every shipped
1200
+ // runtime now supplies waitForExit; absence or timeout is a failed shutdown, never a clean one.
1201
+ await Promise.all(managed.map(async (a) => {
1202
+ try {
1203
+ await this.awaitHandleExit(a.handle);
1204
+ }
1205
+ catch (e) {
1206
+ failures.push(`${a.name}: ${e.message}`);
1207
+ }
1208
+ }));
1188
1209
  // Deprovision EVERY snapshot entry regardless of whether its stop failed (allSettled + a loud log).
1189
1210
  await Promise.allSettled(managed.filter((a) => !a.suppressCleanup).map((a) => this.deprovision(a).catch((e) => console.error(`deprovision ${a.name} (${a.id}) on shutdown: ${e.message}`))));
1211
+ if (failures.length)
1212
+ throw new Error(`manager shutdown could not prove every seat exited: ${failures.join("; ")}`);
1190
1213
  }
1191
1214
  async stopRetainedAgentsOnExit() {
1192
1215
  const managed = [...this.agents.values()];
@@ -1716,6 +1739,17 @@ export class Manager {
1716
1739
  }),
1717
1740
  stopSelf: (ctx) => this.serveGated(ctx, () => unwrap(this.opStopSelf(callerOf(ctx), args(ctx)))),
1718
1741
  definePersona: (ctx) => this.serveGated(ctx, () => unwrap(this.opDefinePersona(args(ctx), callerOf(ctx), false))),
1742
+ listPersonas: (ctx) => this.serveGated(ctx, () => unwrap(this.opListPersonas(callerOf(ctx), false))),
1743
+ showPersona: (ctx) => this.serveGated(ctx, () => {
1744
+ const r = this.opShowPersona(args(ctx), callerOf(ctx), false);
1745
+ if (!r.ok) {
1746
+ const msg = r.error ?? "not found";
1747
+ if (msg.startsWith("no persona"))
1748
+ throw new EpEnvelopeError("not-found", msg);
1749
+ throw new EpEnvelopeError("failed-precondition", msg);
1750
+ }
1751
+ return r.data;
1752
+ }),
1719
1753
  purge: (ctx) => this.serveGated(ctx, () => adminGated(ctx, async () => unwrap(await this.opPurge(args(ctx), callerOf(ctx))))),
1720
1754
  // launch is OWNER-EQUALITY on the ep door for every caller (freelance HIGH #2): the deploy
1721
1755
  // path is the only launch consumer and its spec stamps the CALLER's own owner, so
@@ -2721,6 +2755,48 @@ export class Manager {
2721
2755
  connectorNames() {
2722
2756
  return this.installedExtensions ? manifestExtensionNames("connector") : registry.all("connector").map((c) => c.name);
2723
2757
  }
2758
+ /** Resolve every installed/registered connector's declared harness binaries before the manager
2759
+ * reports ready. A missing harness degrades only that connector, never unrelated lifecycle work:
2760
+ * boot continues, but prints a named refusal and records it on both manager status surfaces. */
2761
+ async inspectConnectorsAtBoot() {
2762
+ const rows = [];
2763
+ let declared;
2764
+ if (this.installedExtensions) {
2765
+ try {
2766
+ declared = loadExtensionsManifest().extensions.flatMap((ext) => extensionConnectors(ext));
2767
+ }
2768
+ catch (error) {
2769
+ const reason = error.message;
2770
+ console.error(`! manager boot: connector inventory unavailable - ${reason}`);
2771
+ this.connectorStatuses = [{ agent: "(inventory)", state: "unavailable", binaries: {}, reason }];
2772
+ return;
2773
+ }
2774
+ }
2775
+ else {
2776
+ declared = registry.all("connector").map((connector) => ({ name: connector.name, requires: connector.requires ?? [] }));
2777
+ }
2778
+ for (const connector of declared) {
2779
+ const name = connector.name;
2780
+ const binaries = {};
2781
+ const missing = [];
2782
+ for (const bin of connector.requires) {
2783
+ const path = resolveOnPath(bin);
2784
+ if (path)
2785
+ binaries[bin] = path;
2786
+ else
2787
+ missing.push(bin);
2788
+ }
2789
+ if (missing.length) {
2790
+ const reason = `${name} harness needs ${missing.join(", ")} on PATH - not found`;
2791
+ rows.push({ agent: name, state: "unavailable", binaries, reason });
2792
+ console.error(`! manager boot: connector ${name} unavailable - ${reason}`);
2793
+ }
2794
+ else {
2795
+ rows.push({ agent: name, state: "available", binaries });
2796
+ }
2797
+ }
2798
+ this.connectorStatuses = rows.sort((a, b) => a.agent.localeCompare(b.agent));
2799
+ }
2724
2800
  /** Return connector-provided model catalogs for selector UIs. Optional by connector: a host with no
2725
2801
  * local model-list API reports `supported:false` rather than blocking the manager. A connector that
2726
2802
  * fails to import shows an `error:` row (from manifest enumeration) and never blocks the others. */
@@ -2964,9 +3040,16 @@ export class Manager {
2964
3040
  // Harness preflight before reserving a slot or minting — a missing `claude`/`opencode` binary
2965
3041
  // fails here with a clear name, not obscurely at process spawn. No fallback. All synchronous, so
2966
3042
  // the reserve gate stays atomic. (The connector itself was resolved up top, before the capacity gate.)
2967
- const missing = (connector.requires ?? []).filter((bin) => !resolveOnPath(bin));
2968
- if (missing.length)
2969
- return { ok: false, error: `${agent} harness needs ${missing.join(", ")} on PATH - not found` };
3043
+ const bootStatus = this.connectorStatuses.find((row) => row.agent === agent);
3044
+ if (bootStatus?.state === "unavailable")
3045
+ return { ok: false, error: bootStatus.reason };
3046
+ // A connector registered after boot has no inventory row. Keep the existing pre-mint backstop
3047
+ // for that dynamic library-composition case; ordinary installed connectors were checked at boot.
3048
+ if (!bootStatus) {
3049
+ const missing = (connector.requires ?? []).filter((bin) => !resolveOnPath(bin));
3050
+ if (missing.length)
3051
+ return { ok: false, error: `${agent} harness needs ${missing.join(", ")} on PATH - not found` };
3052
+ }
2970
3053
  // Resume is a connector capability: reject an unsupported resume HERE, before the reserve/mint, so
2971
3054
  // it can never provision creds + durables and then throw at buildLaunch (mint-then-orphan). Same
2972
3055
  // reject-before-side-effects window as the harness preflight above; buildLaunch stays the backstop.
@@ -3040,6 +3123,29 @@ export class Manager {
3040
3123
  const idErr = this.nameError(identityName);
3041
3124
  if (idErr)
3042
3125
  return { ok: false, error: opts.resolved ? `launch agent: ${idErr}` : `persona ${configPath}: ${idErr}` };
3126
+ // #966: a seat labelled `manager` that cannot spawn is a worker wearing a label, and the label
3127
+ // is what other agents ROUTE on (role is the anycast address). The gap is silent today because
3128
+ // the mismatch is only discovered minutes in, when the seat first reaches for a worker. The
3129
+ // persona write path takes content only (role/capabilities are POLICY, P6), so a peer-defined
3130
+ // persona can never fix this by declaring the capability — the only honest outcomes are "the
3131
+ // persona grants spawn" or "say so now". Refuse at accept, before any reserve/mint, naming the
3132
+ // exact remediation for each author: an operator edits the file to add the grant; a peer that
3133
+ // defined the persona over the wire must ask one, because capabilities cannot be declared over
3134
+ // the wire by design. The check keys on the EFFECTIVE role (a spawn-time role: override wins
3135
+ // over the file, mirroring the resolution above), not the file's, so the label other agents
3136
+ // will actually see is the label that is held to account. `manager` is the label that MEANS
3137
+ // spawn-holding: naming it literally keeps this the narrow guard for the observed harm, not a
3138
+ // vocabulary any caller can trigger with a synonym (roles are free-form and mostly
3139
+ // non-manager: this workspace's own catalog carries worker/reviewer/orchestrator seats with no
3140
+ // spawn grant, all legitimate).
3141
+ if (role === "manager" && !capabilities?.includes("spawn"))
3142
+ return {
3143
+ ok: false,
3144
+ error: `persona "${ref}" would join with role "manager" but no spawn capability: it presents as a manager ` +
3145
+ `while being unable to seat workers, and it would discover that only on first use. ` +
3146
+ `An operator adds \`capabilities: [spawn]\` to ${configPath}; a peer-defined persona ` +
3147
+ `(cotal_persona) cannot declare capabilities by design — ask an operator to grant it.`,
3148
+ };
3043
3149
  // The alias-reuse gate (#29 piece 3): a name whose previous agent is still retiring REFUSES
3044
3150
  // legibly (never a silent suffix), and the refusal re-drives the FULL durable teardown so
3045
3151
  // "retry the spawn" is also the nudge. It routes through `deprovision` (not `requestRetirement`
@@ -3051,10 +3157,8 @@ export class Manager {
3051
3157
  const held = this.retiring.get(identityName);
3052
3158
  if (held !== undefined) {
3053
3159
  void this.deprovision({ id: held.agentId, name: identityName, lifecycleUid: held.lifecycleUid, userOwner: held.userOwner, secretPaths: held.secretPaths }).catch(() => { });
3054
- return {
3055
- ok: false,
3056
- error: `the name "${identityName}" is reserved pending retirement: its previous agent's despawn started that lifecycle's teardown (footprint + standing-authority revoke + auth-side retirement), and the name frees only when all of it completes${held.lastError !== undefined ? ` (last attempt: ${held.lastError})` : ""}. NEXT: wait a moment and retry this spawn (retrying re-drives the whole teardown), or pick another name.`,
3057
- };
3160
+ const err = lifecycleBlocked("failed-precondition", `the name "${identityName}" is reserved pending retirement: its previous agent's despawn started that lifecycle's teardown (footprint + standing-authority revoke + auth-side retirement), and the name frees only when all of it completes${held.lastError !== undefined ? ` (last attempt: ${held.lastError})` : ""}. NEXT: wait a moment and retry this spawn (retrying re-drives the whole teardown), or pick another name.`, { blockedOp: "retirement", headState: "retiring", opId: held.opId, remedy: "retry" });
3161
+ return { ok: false, error: renderLifecycleBlocked(err.message, err), details: err.details };
3058
3162
  }
3059
3163
  if (variant && !connector.supportsModelVariant)
3060
3164
  return { ok: false, error: `${agent} connector does not support model variants (variant)` };
@@ -3312,6 +3416,7 @@ export class Manager {
3312
3416
  events,
3313
3417
  mcpServers,
3314
3418
  envAllow,
3419
+ resolvedBinaries: bootStatus?.binaries,
3315
3420
  // So a connector that keeps per-agent local state can root it at the workspace, not the
3316
3421
  // (possibly per-agent) launch cwd below. The cwd itself rides runtime.spawn, not the launch.
3317
3422
  workspaceRoot: this.workspaceRoot,
@@ -3435,6 +3540,10 @@ export class Manager {
3435
3540
  catch (e) {
3436
3541
  // Failure after reserve (provision / launch threw): the slot was never live, so no cold-start
3437
3542
  // was paid — the reserved rollback (finally) is enough, no cooling stamp.
3543
+ // A lifecycle-blocked envelope already named the barrier; keep its details on the ControlReply
3544
+ // so follow/CLI/cotal_spawn do not collapse it to a generic string (#873).
3545
+ if (e instanceof EpEnvelopeError)
3546
+ return { ok: false, error: renderLifecycleBlocked(e.message, e), ...(e.details ? { details: e.details } : {}) };
3438
3547
  return { ok: false, error: e.message };
3439
3548
  }
3440
3549
  finally {
@@ -4222,6 +4331,7 @@ export class Manager {
4222
4331
  runtime: this.runtime.kind,
4223
4332
  agentCount: this.agents.size,
4224
4333
  uptimeMs: Date.now() - this.startedAtMs,
4334
+ connectors: this.connectorStatuses.map((row) => ({ ...row, binaries: { ...row.binaries } })),
4225
4335
  };
4226
4336
  }
4227
4337
  /** Complete a crashed predecessor's FROZEN registration gate before this incarnation starts a
@@ -4439,7 +4549,12 @@ export class Manager {
4439
4549
  // one). Key-pinned to this instance's own status key on the SAME executor.
4440
4550
  await writeServiceStatus(recordsKv, {
4441
4551
  endpoint: MANAGER_ENDPOINT, instanceId: iid, epoch: observed.processEpoch,
4442
- status: { state: SERVICE_READY, epoch: observed.processEpoch, observedSpecRevision: registrationRevision },
4552
+ status: {
4553
+ state: SERVICE_READY,
4554
+ epoch: observed.processEpoch,
4555
+ observedSpecRevision: registrationRevision,
4556
+ connectors: this.connectorStatuses.map((row) => ({ ...row, binaries: { ...row.binaries } })),
4557
+ },
4443
4558
  readProcessEpoch: async () => {
4444
4559
  const g = await fence.observe();
4445
4560
  if (g === null)
@@ -5148,13 +5263,13 @@ export class Manager {
5148
5263
  // exists that early — the goal spec does not carry it and the terminal does not exist yet.
5149
5264
  // A same-goalId attempt that loses the bind while the winner is still in flight can then
5150
5265
  // serve what the winner actually allocated instead of inventing an empty identity.
5151
- const idx = await recordGoalIndex(gw.ctx, ref, executor.lifecycleUid, { name, actor: agentTriple.actor, uid: agentTriple.uid });
5266
+ const idx = await recordGoalIndex(gw.ctx, ref, executor.lifecycleUid, { name, actor: agentTriple.actor, uid: agentTriple.uid, readinessDeadlineMs: readinessTimeoutMs });
5152
5267
  // A create loss is an idempotent retry ONLY for the same incarnation. A FOREIGN iid means a
5153
5268
  // sibling instance accepted this goalId (the live vector is a client retry over ANYCAST, not
5154
5269
  // a journal consumer): this attempt provisions nothing and answers with the winner's floor,
5155
5270
  // or refuses if that instance never persisted one.
5156
5271
  if (!idx.recorded && idx.existing.iid !== executor.lifecycleUid) {
5157
- acceptance = this.acceptanceFromIndex(idx.existing, goalId, fingerprint, executor);
5272
+ acceptance = await this.acceptanceFromIndex(idx.existing, ref, goalId, fingerprint, executor);
5158
5273
  resolveAccept(acceptance);
5159
5274
  // No claim needed here: `ownsGoal` is still false, so the commit path refuses this attempt.
5160
5275
  throw new EpEnvelopeError("failed-precondition", `goal "${goalId}" was accepted by instance "${idx.existing.iid}"; that instance's acceptance is served and this attempt provisions nothing (SPEC 13.6)`);
@@ -5190,7 +5305,7 @@ export class Manager {
5190
5305
  acceptedAt,
5191
5306
  readinessDeadlineMs: readinessTimeoutMs,
5192
5307
  });
5193
- acceptance = { name, owner: agentTriple.owner, actor: agentTriple.actor, uid: agentTriple.uid, goalId, fingerprint, executor };
5308
+ acceptance = { name, owner: agentTriple.owner, actor: agentTriple.actor, uid: agentTriple.uid, goalId, fingerprint, readinessDeadlineMs: readinessTimeoutMs, executor };
5194
5309
  this.goalAcceptances.set(goalId, acceptance);
5195
5310
  this.agentGoals.set(name, ref); // M4: a despawn of this name mid-goal drives the cancel path
5196
5311
  resolveAccept(acceptance);
@@ -5207,7 +5322,8 @@ export class Manager {
5207
5322
  bg.then((reply) => {
5208
5323
  // Refused BEFORE onAccepted (M6 hard-pin collision, capacity, persona-not-found) — no goal bound.
5209
5324
  if (acceptance === undefined) {
5210
- rejectAccept(new EpEnvelopeError("failed-precondition", reply.error ?? "spawn refused at accept"));
5325
+ const details = reply.details;
5326
+ rejectAccept(new EpEnvelopeError("failed-precondition", reply.error ?? "spawn refused at accept", details));
5211
5327
  return;
5212
5328
  }
5213
5329
  // H1: `run` CATCHES its own body (a throw in buildLaunch/runtime.spawn) and RESOLVES `{ok:false}`
@@ -5216,7 +5332,7 @@ export class Manager {
5216
5332
  // the caller follows epe to a terminal that never comes, and the reconcile index that would
5217
5333
  // settle it is only swept at BOOT, so a manager that stays up never converges it.
5218
5334
  if (reply.ok === false && !terminalEntered)
5219
- return onOutcome({ kind: "failed", data: { error: reply.error ?? "spawn failed after accept" } });
5335
+ return onOutcome({ kind: "failed", data: { error: reply.error ?? "spawn failed after accept", ...(reply.details ? { details: reply.details } : {}) } });
5220
5336
  }).catch((e) => {
5221
5337
  if (acceptance === undefined) {
5222
5338
  rejectAccept(e);
@@ -5224,7 +5340,7 @@ export class Manager {
5224
5340
  }
5225
5341
  // Same obligation for a genuine rejection (one that escaped `run`'s own catch).
5226
5342
  if (!terminalEntered)
5227
- return onOutcome({ kind: "failed", data: { error: e?.message ?? String(e) } });
5343
+ return onOutcome({ kind: "failed", data: { error: e?.message ?? String(e), ...(e instanceof EpEnvelopeError && e.details ? { details: e.details } : {}) } });
5228
5344
  console.error(`! spawn-as-action async body for ${goalId}: ${e?.message ?? String(e)}`);
5229
5345
  }).catch((e) => console.error(`! goal terminal fallback for ${goalId}: ${e?.message ?? String(e)}`));
5230
5346
  return acceptP;
@@ -5232,10 +5348,13 @@ export class Manager {
5232
5348
  /** H2: an acceptance served from a WINNER'S durable acceptance floor (the goal-index entry it
5233
5349
  * wrote before its own ack). Refuses `unavailable` rather than inventing one — see
5234
5350
  * {@link cachedSpawnAcceptance} for why an empty identity is never an acceptable answer. */
5235
- acceptanceFromIndex(entry, goalId, fingerprint, executor) {
5351
+ async acceptanceFromIndex(entry, ref, goalId, fingerprint, executor) {
5236
5352
  if (entry.allocated === undefined)
5237
5353
  throw new EpEnvelopeError("unavailable", `goal "${goalId}" was accepted by instance "${entry.iid}", which persisted no acceptance floor; its allocated identity is not readable from here (SPEC 13.6)`);
5238
- return { name: entry.allocated.name, owner: DEV_OWNER, actor: entry.allocated.actor, uid: entry.allocated.uid, goalId, fingerprint, executor };
5354
+ const readinessDeadlineMs = entry.allocated.readinessDeadlineMs ?? (await readGoalSpec(this.goalWriter.ctx, ref))?.value.readinessDeadlineMs;
5355
+ if (readinessDeadlineMs === undefined)
5356
+ throw new EpEnvelopeError("unavailable", `goal "${goalId}" is accepted but its readiness deadline is not readable; a synchronous follower cannot bound its wait honestly (SPEC 13.6)`);
5357
+ return { name: entry.allocated.name, owner: DEV_OWNER, actor: entry.allocated.actor, uid: entry.allocated.uid, goalId, fingerprint, readinessDeadlineMs, executor };
5239
5358
  }
5240
5359
  /** Reconstruct a cached acceptance for a same-goalId retry NOT in the live map (a prior incarnation
5241
5360
  * accepted it, or a concurrent winner whose map write this reader has not yet observed).
@@ -5251,13 +5370,15 @@ export class Manager {
5251
5370
  async cachedSpawnAcceptance(ref, goalId, fingerprint, executor) {
5252
5371
  const entry = await readGoalIndex(this.goalWriter.ctx, ref);
5253
5372
  if (entry?.allocated !== undefined)
5254
- return this.acceptanceFromIndex(entry, goalId, fingerprint, executor);
5373
+ return this.acceptanceFromIndex(entry, ref, goalId, fingerprint, executor);
5255
5374
  // The index is CLEARED at terminal, so a settled goal legitimately has no entry: fall back to
5256
5375
  // the terminal's data, which carries the same identity for exactly that case.
5257
5376
  const result = await readGoalResult(this.goalWriter.ctx, ref);
5258
5377
  const d = (result?.data ?? {});
5259
- if (typeof d.name === "string" && d.name.length > 0 && typeof d.id === "string" && d.id.length > 0 && typeof d.lifecycleUid === "string" && d.lifecycleUid.length > 0)
5260
- return { name: d.name, owner: DEV_OWNER, actor: d.id, uid: d.lifecycleUid, goalId, fingerprint, executor };
5378
+ const spec = await readGoalSpec(this.goalWriter.ctx, ref);
5379
+ const readinessDeadlineMs = spec?.value.readinessDeadlineMs;
5380
+ if (typeof d.name === "string" && d.name.length > 0 && typeof d.id === "string" && d.id.length > 0 && typeof d.lifecycleUid === "string" && d.lifecycleUid.length > 0 && readinessDeadlineMs !== undefined)
5381
+ return { name: d.name, owner: DEV_OWNER, actor: d.id, uid: d.lifecycleUid, goalId, fingerprint, readinessDeadlineMs, executor };
5261
5382
  throw new EpEnvelopeError("unavailable", `goal "${goalId}" is already accepted but its allocated identity is not readable (no acceptance floor, and no terminal carrying one); retry (SPEC 13.6)`);
5262
5383
  }
5263
5384
  /** M4 (settle race): a despawn MID-GOAL drives the goal's cancel terminal - transition to
@@ -5299,6 +5420,12 @@ export class Manager {
5299
5420
  if (acceptedRenewal)
5300
5421
  await acceptedRenewal.catch(() => { });
5301
5422
  const opId = retireOpId(a.lifecycleUid);
5423
+ const evict = this.staticLifecycleEvict ?? makeManagerEndpointEvictionEvidence({
5424
+ space: this.space,
5425
+ servers: this.servers ?? DEFAULT_SERVER,
5426
+ auth: this.auth,
5427
+ log: (line) => console.error(`static retirement ${a.name}: ${line}`),
5428
+ });
5302
5429
  const cleanup = async () => {
5303
5430
  const secrets = this.secrets;
5304
5431
  const files = a.secretPaths ?? agentLifecycleSecretFilePaths(this.workspaceRoot, this.space, a.name, a.lifecycleUid);
@@ -5317,7 +5444,10 @@ export class Manager {
5317
5444
  await cleanup();
5318
5445
  return;
5319
5446
  }
5320
- await runStaticTerminal(t, { owner: DEV_OWNER, alias: a.name, actor: a.id, lifecycleUid: a.lifecycleUid, opId }, { cleanup, log: (line) => console.error(`static retirement ${a.name}: ${line}`) });
5447
+ await runStaticTerminal(t, {
5448
+ owner: DEV_OWNER, alias: a.name, actor: a.id, lifecycleUid: a.lifecycleUid, opId,
5449
+ managerInstance: this.managerInstanceId, managerProcessUid: this.managerLifecycleUid,
5450
+ }, { cleanup, evict, log: (line) => console.error(`static retirement ${a.name}: ${line}`) });
5321
5451
  });
5322
5452
  this.retiredPrincipals.add(principalKey(DEV_OWNER, a.id).key);
5323
5453
  const cur = this.retiring.get(a.name);
@@ -5381,8 +5511,8 @@ export class Manager {
5381
5511
  /** The Unit B reconciliation (F3 "no active orphan"): ensure the authority stores, then sweep
5382
5512
  * every durable slot row and act by the TOTAL resume table — `provisioning`/`terminalizing`
5383
5513
  * re-drive the exact-op terminal; an `active` row survives ONLY when a LIVE managed agent this
5384
- * process owns backs it at the same uid (`adopted`), else its process is gone and it
5385
- * terminalizes; `retired` rows seed the F5 refusal index. Two call sites: the BOOT sweep
5514
+ * manager process owns backs it at the same uid (`adopted`), else no managed owner claimed it and
5515
+ * its broker authority is contained and terminalized; `retired` rows seed the F5 refusal index. Two call sites: the BOOT sweep
5386
5516
  * (`postAdoption=false`, under the lease before control serving) DEFERS active-non-adopted
5387
5517
  * slots while a resume is still pending (adoption runs after it); the POST-ADOPTION sweep
5388
5518
  * (`postAdoption=true`, inside finalizeResume while `resumeRequired` still fences ordinary
@@ -5608,6 +5738,78 @@ export class Manager {
5608
5738
  }
5609
5739
  return { ok: true, data: { name, path } };
5610
5740
  }
5741
+ /** Whether this caller may READ a catalog card's details (role/model/description/body). Same
5742
+ * ownership rule as redefine: owner == caller, or admin. Ownerless / operator-written files are
5743
+ * admin-only. Names of parseable files still appear on the list so a definer can see a taken
5744
+ * spawn name; details stay off the wire unless this is true. */
5745
+ canReadPersona(owner, caller, admin) {
5746
+ return personaCatalogReadable(owner, caller, admin);
5747
+ }
5748
+ /** Mesh-side catalog list (#402). Every parseable name is returned so a definer can see a taken
5749
+ * spawn name. Role / model / description / owner ride only when the caller could redefine the
5750
+ * file (same ownership as `definePersona`); other cards are name-only, so a peer cannot read a
5751
+ * prompt it does not own. Unparseable files are omitted for non-admin (no existence leak of a
5752
+ * broken card). */
5753
+ opListPersonas(caller, admin) {
5754
+ const personas = [];
5755
+ for (const e of listPersonaCatalog(this.workspaceRoot)) {
5756
+ if (e.error) {
5757
+ if (!admin)
5758
+ continue;
5759
+ personas.push({ name: e.name, error: "unparseable" });
5760
+ continue;
5761
+ }
5762
+ const def = e.def;
5763
+ if (!this.canReadPersona(def.owner, caller, admin)) {
5764
+ personas.push({ name: e.name });
5765
+ continue;
5766
+ }
5767
+ const description = personaCatalogDescription(def);
5768
+ personas.push({
5769
+ name: e.name,
5770
+ ...(def.role ? { role: def.role } : {}),
5771
+ ...(def.model ? { model: def.model } : {}),
5772
+ ...(description ? { description } : {}),
5773
+ ...(def.owner ? { owner: def.owner } : {}),
5774
+ });
5775
+ }
5776
+ return { ok: true, data: { personas } };
5777
+ }
5778
+ /** Mesh-side catalog show (#402). Same ownership as list. Unknown, unauthorized, or unparseable
5779
+ * names are not-found (no existence or parser-diagnostic leak). The body is included so a peer can
5780
+ * inspect a prompt it owns before spawn; policy fields stay off the wire. */
5781
+ opShowPersona(args, caller, admin) {
5782
+ const name = String(args.name ?? "").trim();
5783
+ if (!name)
5784
+ return { ok: false, error: "name required" };
5785
+ const nameErr = this.nameError(name);
5786
+ if (nameErr)
5787
+ return { ok: false, error: nameErr };
5788
+ const path = agentFilePath(this.workspaceRoot, name);
5789
+ if (!existsSync(path))
5790
+ return { ok: false, error: `no persona "${name}"` };
5791
+ let def;
5792
+ try {
5793
+ def = loadAgentFile(path);
5794
+ }
5795
+ catch {
5796
+ return { ok: false, error: `no persona "${name}"` };
5797
+ }
5798
+ if (!this.canReadPersona(def.owner, caller, admin))
5799
+ return { ok: false, error: `no persona "${name}"` };
5800
+ const description = personaCatalogDescription(def);
5801
+ return {
5802
+ ok: true,
5803
+ data: {
5804
+ name,
5805
+ ...(def.role ? { role: def.role } : {}),
5806
+ ...(def.model ? { model: def.model } : {}),
5807
+ ...(description ? { description } : {}),
5808
+ ...(def.owner ? { owner: def.owner } : {}),
5809
+ ...(def.persona ? { persona: def.persona } : {}),
5810
+ },
5811
+ };
5812
+ }
5611
5813
  /** The post-authorization `input` effect (C3): type `text` into the seat's terminal as if a human
5612
5814
  * had. The single call an external UI needs to deliver a harness command (`/compact`, `/clear`,
5613
5815
  * `/model`) without holding a terminal open on the caller's side.