@cotal-ai/cli 0.10.0 → 0.11.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 (142) hide show
  1. package/dist/command.d.ts.map +1 -1
  2. package/dist/command.js +11 -3
  3. package/dist/command.js.map +1 -1
  4. package/dist/commands/agents.d.ts.map +1 -1
  5. package/dist/commands/agents.js +30 -13
  6. package/dist/commands/agents.js.map +1 -1
  7. package/dist/commands/channels.d.ts.map +1 -1
  8. package/dist/commands/channels.js +16 -6
  9. package/dist/commands/channels.js.map +1 -1
  10. package/dist/commands/completion.js +5 -5
  11. package/dist/commands/console.d.ts +1 -1
  12. package/dist/commands/console.d.ts.map +1 -1
  13. package/dist/commands/console.js +17 -11
  14. package/dist/commands/console.js.map +1 -1
  15. package/dist/commands/doctor.d.ts +14 -0
  16. package/dist/commands/doctor.d.ts.map +1 -0
  17. package/dist/commands/doctor.js +171 -0
  18. package/dist/commands/doctor.js.map +1 -0
  19. package/dist/commands/down-manifest.js +15 -15
  20. package/dist/commands/down.d.ts.map +1 -1
  21. package/dist/commands/down.js +42 -5
  22. package/dist/commands/down.js.map +1 -1
  23. package/dist/commands/ext.js +11 -11
  24. package/dist/commands/feedback.js +2 -2
  25. package/dist/commands/history.d.ts.map +1 -1
  26. package/dist/commands/history.js +7 -3
  27. package/dist/commands/history.js.map +1 -1
  28. package/dist/commands/join.d.ts.map +1 -1
  29. package/dist/commands/join.js +14 -7
  30. package/dist/commands/join.js.map +1 -1
  31. package/dist/commands/meshes.js +2 -2
  32. package/dist/commands/mint.d.ts.map +1 -1
  33. package/dist/commands/mint.js +16 -5
  34. package/dist/commands/mint.js.map +1 -1
  35. package/dist/commands/models.d.ts +29 -0
  36. package/dist/commands/models.d.ts.map +1 -0
  37. package/dist/commands/models.js +54 -0
  38. package/dist/commands/models.js.map +1 -0
  39. package/dist/commands/personas.js +4 -4
  40. package/dist/commands/send.js +1 -1
  41. package/dist/commands/setup.js +25 -25
  42. package/dist/commands/setup.js.map +1 -1
  43. package/dist/commands/spawn-manifest.d.ts.map +1 -1
  44. package/dist/commands/spawn-manifest.js +47 -25
  45. package/dist/commands/spawn-manifest.js.map +1 -1
  46. package/dist/commands/spawn.d.ts +11 -0
  47. package/dist/commands/spawn.d.ts.map +1 -1
  48. package/dist/commands/spawn.js +276 -47
  49. package/dist/commands/spawn.js.map +1 -1
  50. package/dist/commands/status.d.ts +15 -0
  51. package/dist/commands/status.d.ts.map +1 -0
  52. package/dist/commands/status.js +237 -0
  53. package/dist/commands/status.js.map +1 -0
  54. package/dist/commands/topology.js +2 -2
  55. package/dist/commands/up.d.ts +5 -0
  56. package/dist/commands/up.d.ts.map +1 -1
  57. package/dist/commands/up.js +269 -48
  58. package/dist/commands/up.js.map +1 -1
  59. package/dist/commands/use.js +1 -1
  60. package/dist/console/commands.js +2 -2
  61. package/dist/console/mesh.js +1 -1
  62. package/dist/console/mesh.js.map +1 -1
  63. package/dist/console/root.d.ts +15 -3
  64. package/dist/console/root.d.ts.map +1 -1
  65. package/dist/console/root.js +12 -7
  66. package/dist/console/root.js.map +1 -1
  67. package/dist/console/ui/Confirm.js +1 -1
  68. package/dist/console/ui/Confirm.js.map +1 -1
  69. package/dist/console/ui/Feed.js +1 -1
  70. package/dist/console/ui/Feed.js.map +1 -1
  71. package/dist/console/ui/Help.js +2 -2
  72. package/dist/console/ui/Help.js.map +1 -1
  73. package/dist/console/ui/NeedsYou.js +1 -1
  74. package/dist/console/ui/NeedsYou.js.map +1 -1
  75. package/dist/console/ui/SpacePicker.js +1 -1
  76. package/dist/console/ui/SpacePicker.js.map +1 -1
  77. package/dist/console/ui/Tiles.js +1 -1
  78. package/dist/console/ui/topo/Map.js +1 -1
  79. package/dist/console/ui/topo/Map.js.map +1 -1
  80. package/dist/console/ui/topo/Matrix.js +2 -2
  81. package/dist/console/ui/topo/Matrix.js.map +1 -1
  82. package/dist/console/ui/topo/Sequence.js +1 -1
  83. package/dist/console/ui/topo/Sequence.js.map +1 -1
  84. package/dist/ext-loader.js +8 -8
  85. package/dist/index.d.ts.map +1 -1
  86. package/dist/index.js +48 -17
  87. package/dist/index.js.map +1 -1
  88. package/dist/lib/attach-client.js +1 -1
  89. package/dist/lib/auth-proc.d.ts +19 -0
  90. package/dist/lib/auth-proc.d.ts.map +1 -0
  91. package/dist/lib/auth-proc.js +81 -0
  92. package/dist/lib/auth-proc.js.map +1 -0
  93. package/dist/lib/connect.d.ts +1 -1
  94. package/dist/lib/connect.d.ts.map +1 -1
  95. package/dist/lib/connect.js +2 -2
  96. package/dist/lib/connect.js.map +1 -1
  97. package/dist/lib/control.d.ts +14 -6
  98. package/dist/lib/control.d.ts.map +1 -1
  99. package/dist/lib/control.js +23 -11
  100. package/dist/lib/control.js.map +1 -1
  101. package/dist/lib/delivery-proc.js +2 -2
  102. package/dist/lib/manifest/apply.d.ts +3 -2
  103. package/dist/lib/manifest/apply.d.ts.map +1 -1
  104. package/dist/lib/manifest/apply.js +12 -2
  105. package/dist/lib/manifest/apply.js.map +1 -1
  106. package/dist/lib/manifest/ledger.js +4 -4
  107. package/dist/lib/manifest/live.d.ts +23 -9
  108. package/dist/lib/manifest/live.d.ts.map +1 -1
  109. package/dist/lib/manifest/live.js +22 -12
  110. package/dist/lib/manifest/live.js.map +1 -1
  111. package/dist/lib/manifest/model.d.ts +6 -1
  112. package/dist/lib/manifest/model.d.ts.map +1 -1
  113. package/dist/lib/manifest/prepare.d.ts +4 -1
  114. package/dist/lib/manifest/prepare.d.ts.map +1 -1
  115. package/dist/lib/manifest/prepare.js +8 -3
  116. package/dist/lib/manifest/prepare.js.map +1 -1
  117. package/dist/lib/manifest/render.d.ts.map +1 -1
  118. package/dist/lib/manifest/render.js +14 -13
  119. package/dist/lib/manifest/render.js.map +1 -1
  120. package/dist/lib/manifest/resolve.js +20 -6
  121. package/dist/lib/manifest/resolve.js.map +1 -1
  122. package/dist/lib/manifest/schema.d.ts +6 -1
  123. package/dist/lib/manifest/schema.d.ts.map +1 -1
  124. package/dist/lib/manifest/schema.js +12 -3
  125. package/dist/lib/manifest/schema.js.map +1 -1
  126. package/dist/lib/self-exec.d.ts +7 -2
  127. package/dist/lib/self-exec.d.ts.map +1 -1
  128. package/dist/lib/self-exec.js +14 -3
  129. package/dist/lib/self-exec.js.map +1 -1
  130. package/dist/lib/setup-log.js +1 -1
  131. package/dist/lib/status.d.ts +1 -1
  132. package/dist/lib/status.d.ts.map +1 -1
  133. package/dist/lib/status.js +22 -5
  134. package/dist/lib/status.js.map +1 -1
  135. package/dist/lib/transient.d.ts +8 -10
  136. package/dist/lib/transient.d.ts.map +1 -1
  137. package/dist/lib/transient.js +11 -11
  138. package/dist/lib/transient.js.map +1 -1
  139. package/dist/render.js +2 -2
  140. package/dist/ui.js +1 -1
  141. package/dist/ui.js.map +1 -1
  142. package/package.json +3 -3
@@ -1,5 +1,5 @@
1
- import { CotalEndpoint, DEFAULT_SPACE, CONTROL_PRIVILEGED, } from "@cotal-ai/core";
2
- import { authDir, findCotalRoot, loadSpaceAuth } from "@cotal-ai/workspace";
1
+ import { CotalEndpoint, DEFAULT_SPACE, CONTROL_PRIVILEGED, CONTROL_ADMIN, } from "@cotal-ai/core";
2
+ import { authDir, endpointAuth, findCotalRoot, loadSpaceAuth } from "@cotal-ai/workspace";
3
3
  import { c } from "../ui.js";
4
4
  import { connectOrExit } from "./connect.js";
5
5
  /** Client-side request window for the manager's readiness-waiting launch ops (`start`, and the
@@ -23,21 +23,25 @@ export async function resolveControlTarget(flags, profile) {
23
23
  const withSpace = flags.creds
24
24
  ? { ...flags, space: flags.space ?? loadSpaceAuth(authDir(findCotalRoot()))?.space ?? DEFAULT_SPACE }
25
25
  : flags;
26
- const { space, server, creds } = await connectOrExit(withSpace, profile);
27
- return { space, server, creds };
26
+ // USER MODE rides through: the control call connects with the operator's bearer (actor `cli`) and
27
+ // publishes on its OWN ctl principal subject — the broker grants that publish only when the cli
28
+ // actor's ledger scope carries the matching capability (`spawn` → privileged, `admin` → admin).
29
+ const conn = await connectOrExit(withSpace, profile);
30
+ return { space: conn.space, server: conn.server, auth: endpointAuth(conn) };
28
31
  }
29
32
  /** Connect a short-lived client with the resolved creds, send one control request to the manager,
30
33
  * disconnect. The target is already reachability- + auth-preflighted by
31
34
  * {@link resolveControlTarget}, so this connects straight through. `tier` picks the control
32
- * subject: privileged for spawn --detach/ps; admin for the operator's cross-agent ops
33
- * (stop/attach), which the manager refuses on the privileged subject for a non-owner. `creds` is
34
- * the tier-scoped caller cred (`control-caller-privileged` / `control-caller-admin` each holds
35
- * ONLY its own tier's pub grant), or undefined on an open mesh. */
36
- export async function askManager(space, server, op, args, creds, tier = CONTROL_PRIVILEGED, timeoutMs) {
35
+ * subject: privileged for spawn --detach/ps and, on a user mesh, for stop/attach too (the
36
+ * operator's bearer publishes there with scope "spawn"; the MANAGER authorizes owner-domain vs
37
+ * ledger-admin). On a static mesh stop/attach stay admin-tier ops. `creds` is the tier-scoped
38
+ * caller cred (`control-caller-privileged` / `control-caller-admin` each holds ONLY its own
39
+ * tier's pub grant), or undefined on an open mesh. */
40
+ export async function askManager(space, server, op, args, auth = {}, tier = CONTROL_PRIVILEGED, timeoutMs) {
37
41
  const ep = new CotalEndpoint({
38
42
  space,
39
43
  servers: server,
40
- creds,
44
+ ...auth,
41
45
  channels: [],
42
46
  consume: false, // request/reply only — binds no consumers (and under auth has no pre-created DM durable)
43
47
  registerPresence: false,
@@ -50,7 +54,15 @@ export async function askManager(space, server, op, args, creds, tier = CONTROL_
50
54
  return await ep.requestControl(tier, { op, args }, timeoutMs);
51
55
  }
52
56
  catch (e) {
53
- return { ok: false, error: `no manager reachable (${e.message})` };
57
+ // A user-mode caller whose cli actor lacks the tier's scope gets a broker publish denial (the
58
+ // red endpoint error above) and then this timeout — name the grant, not just the silence.
59
+ // The re-grant REPLACES the scope list, so the hint must say "add", never a bare one-token
60
+ // --scope that would silently strip the caller's spawn/role capabilities.
61
+ const need = tier === CONTROL_ADMIN ? "admin" : "spawn";
62
+ const scopeHint = auth.bearer
63
+ ? ` - on a user-auth mesh this op needs scope "${need}" on your cli actor. Re-grant with "${need}" ADDED to your current scope (the upsert replaces the list; see \`cotal actor list\`), e.g. \`cotal actor grant cli --sub <your IdP subject> --scope 'spawn,role:default,${need}'\``
64
+ : "";
65
+ return { ok: false, error: `no manager reachable (${e.message})${scopeHint}` };
54
66
  }
55
67
  finally {
56
68
  await ep.stop();
@@ -1 +1 @@
1
- {"version":3,"file":"control.js","sourceRoot":"","sources":["../../src/lib/control.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,aAAa,EACb,kBAAkB,GAInB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAC5E,OAAO,EAAE,CAAC,EAAE,MAAM,UAAU,CAAC;AAC7B,OAAO,EAAE,aAAa,EAAqB,MAAM,cAAc,CAAC;AAEhE;;;;;wBAKwB;AACxB,MAAM,CAAC,MAAM,gBAAgB,GAAG,MAAM,CAAC;AAEvC;;;;;;;;;GASG;AACH,MAAM,CAAC,KAAK,UAAU,oBAAoB,CACxC,KAAmB,EACnB,OAAgB;IAEhB,MAAM,SAAS,GAAG,KAAK,CAAC,KAAK;QAC3B,CAAC,CAAC,EAAE,GAAG,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK,IAAI,aAAa,CAAC,OAAO,CAAC,aAAa,EAAE,CAAC,CAAC,EAAE,KAAK,IAAI,aAAa,EAAE;QACrG,CAAC,CAAC,KAAK,CAAC;IACV,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,aAAa,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;IACzE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC;AAClC,CAAC;AAED;;;;;;oEAMoE;AACpE,MAAM,CAAC,KAAK,UAAU,UAAU,CAC9B,KAAa,EACb,MAAc,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AI,OAAO,EAAE,CAAC,CAAC,CAAC;QACpD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC"}
@@ -74,7 +74,7 @@ export async function ensureDelivery(o = {}) {
74
74
  if (!hasAuth())
75
75
  return { running: false }; // open dev mode — no daemon, agents are live-only
76
76
  if (oldHostingManagerLive()) {
77
- console.error("✗ delivery: an old Plane-3-hosting manager is still live (no delivery-aware marker). Refusing to start the daemon run `cotal down` first, then retry.");
77
+ console.error("✗ delivery: an old Plane-3-hosting manager is still live (no delivery-aware marker). Refusing to start the daemon - run `cotal down` first, then retry.");
78
78
  return { running: false };
79
79
  }
80
80
  // Mint a scoped delivery cred (used to probe readiness; for a NEW launch it is ALSO the daemon's cred,
@@ -97,7 +97,7 @@ export async function ensureDelivery(o = {}) {
97
97
  // which is the real safety net for a slow start or a later outage.
98
98
  const ready = await waitForDeliveryLease({ servers: server, space, creds, id: id.id });
99
99
  if (!ready)
100
- console.error("• delivery daemon not yet ready (responder not bound) boot durable joins will reconcile when it is");
100
+ console.error("• delivery daemon not yet ready (responder not bound) - boot durable joins will reconcile when it is");
101
101
  return { running: true };
102
102
  }
103
103
  /** Stop the detached delivery daemon if we started one, and drop its creds file. */
@@ -7,8 +7,9 @@ export declare function genRunId(): string;
7
7
  /** Stable content hash of the resolved launch fields — connector + behavior + ACLs. A change here
8
8
  * means a re-declared running agent is stale/restart-required (drift detection). */
9
9
  export declare function hashAgent(a: PreparedAgent): string;
10
- /** Build the launch spec the manager boots from. */
11
- export declare function buildLaunchSpec(prepared: PreparedManifest, runId: string): MeshLaunchSpec;
10
+ /** Build the launch spec the manager boots from. `owner` (user-auth meshes) is the logged-in
11
+ * operator every launched agent runs under — resolved by the caller at apply time. */
12
+ export declare function buildLaunchSpec(prepared: PreparedManifest, runId: string, owner?: string): MeshLaunchSpec;
12
13
  /** Write the launch spec to `<root>/.cotal/run/<runId>.json` (0600 — it carries persona text +
13
14
  * policy) and return its path. A fresh run is exclusive-create (`wx`); a `spawn -f` re-apply reuses
14
15
  * the runId, so `update` rewrites it atomically (temp-then-rename, exclusive temp — never follows a
@@ -1 +1 @@
1
- {"version":3,"file":"apply.d.ts","sourceRoot":"","sources":["../../../src/lib/manifest/apply.ts"],"names":[],"mappings":"AASA,OAAO,EAAoD,KAAK,mBAAmB,EAAwC,KAAK,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAEvK,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AACvD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAElD,iGAAiG;AACjG,wBAAgB,QAAQ,IAAI,MAAM,CAEjC;AAED;qFACqF;AACrF,wBAAgB,SAAS,CAAC,CAAC,EAAE,aAAa,GAAG,MAAM,CAYlD;AAoBD,oDAAoD;AACpD,wBAAgB,eAAe,CAAC,QAAQ,EAAE,gBAAgB,EAAE,KAAK,EAAE,MAAM,GAAG,cAAc,CAOzF;AAED;;;2EAG2E;AAC3E,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,GAAE;IAAE,MAAM,CAAC,EAAE,OAAO,CAAA;CAAO,GAAG,MAAM,CAY3G;AAcD;mBACmB;AACnB,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,gBAAgB,GAAG,mBAAmB,CAIlF;AAED;;wBAEwB;AACxB,wBAAgB,YAAY,CAAC,QAAQ,EAAE,eAAe,EAAE,GAAG,mBAAmB,CAI7E;AAED;mGACmG;AACnG,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,gBAAgB,GAAG,MAAM,CAetE"}
1
+ {"version":3,"file":"apply.d.ts","sourceRoot":"","sources":["../../../src/lib/manifest/apply.ts"],"names":[],"mappings":"AASA,OAAO,EAAoD,KAAK,mBAAmB,EAAwC,KAAK,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAEvK,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AACvD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAElD,iGAAiG;AACjG,wBAAgB,QAAQ,IAAI,MAAM,CAEjC;AAED;qFACqF;AACrF,wBAAgB,SAAS,CAAC,CAAC,EAAE,aAAa,GAAG,MAAM,CAelD;AAsBD;uFACuF;AACvF,wBAAgB,eAAe,CAAC,QAAQ,EAAE,gBAAgB,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,cAAc,CAQzG;AAED;;;2EAG2E;AAC3E,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,GAAE;IAAE,MAAM,CAAC,EAAE,OAAO,CAAA;CAAO,GAAG,MAAM,CAY3G;AAcD;mBACmB;AACnB,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,gBAAgB,GAAG,mBAAmB,CAIlF;AAED;;wBAEwB;AACxB,wBAAgB,YAAY,CAAC,QAAQ,EAAE,eAAe,EAAE,GAAG,mBAAmB,CAI7E;AAED;mGACmG;AACnG,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,gBAAgB,GAAG,MAAM,CAkBtE"}
@@ -19,6 +19,9 @@ export function hashAgent(a) {
19
19
  const stable = JSON.stringify({
20
20
  agent: a.agentType,
21
21
  model: a.model ?? null,
22
+ variant: a.variant ?? null,
23
+ // Sort keys so an identical option set hashes identically (map insertion order must not drift).
24
+ launchOptions: a.launchOptions ? Object.fromEntries(Object.entries(a.launchOptions).sort(([x], [y]) => (x < y ? -1 : x > y ? 1 : 0))) : null,
22
25
  role: a.role ?? null,
23
26
  body: a.body ?? null,
24
27
  capabilities: [...a.capabilities].sort(),
@@ -35,6 +38,8 @@ function toLaunchAgent(a) {
35
38
  agent: a.agentType,
36
39
  role: a.role,
37
40
  model: a.model,
41
+ variant: a.variant,
42
+ launchOptions: a.launchOptions,
38
43
  description: a.description,
39
44
  body: a.body,
40
45
  capabilities: a.capabilities.length ? a.capabilities : undefined,
@@ -45,12 +50,14 @@ function toLaunchAgent(a) {
45
50
  hash: hashAgent(a),
46
51
  };
47
52
  }
48
- /** Build the launch spec the manager boots from. */
49
- export function buildLaunchSpec(prepared, runId) {
53
+ /** Build the launch spec the manager boots from. `owner` (user-auth meshes) is the logged-in
54
+ * operator every launched agent runs under — resolved by the caller at apply time. */
55
+ export function buildLaunchSpec(prepared, runId, owner) {
50
56
  return {
51
57
  apiVersion: "cotal-launch/v1",
52
58
  space: prepared.manifest.space,
53
59
  runId,
60
+ ...(owner ? { owner } : {}),
54
61
  agents: prepared.agents.map(toLaunchAgent),
55
62
  };
56
63
  }
@@ -117,6 +124,9 @@ export function preflightConnectors(prepared) {
117
124
  const missing = (connector.requires ?? []).filter((bin) => !resolveOnPath(bin));
118
125
  if (missing.length)
119
126
  problems.push(`${type} needs ${missing.join(", ")} on PATH`);
127
+ const variantUsers = prepared.agents.filter((a) => a.agentType === type && a.variant);
128
+ if (variantUsers.length && !connector.supportsModelVariant)
129
+ problems.push(`${type} does not support model variants (used by ${variantUsers.map((a) => a.name).join(", ")})`);
120
130
  }
121
131
  return problems.join("; ");
122
132
  }
@@ -1 +1 @@
1
- {"version":3,"file":"apply.js","sourceRoot":"","sources":["../../../src/lib/manifest/apply.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AACtD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,kBAAkB,EAAE,QAAQ,EAA2G,MAAM,gBAAgB,CAAC;AACvK,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC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AAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,KAAK,IAAI,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC;QACtF,IAAI,YAAY,CAAC,MAAM,IAAI,CAAC,SAAS,CAAC,oBAAoB;YACxD,QAAQ,CAAC,IAAI,CAAC,GAAG,IAAI,6CAA6C,YAAY,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACrH,CAAC;IACD,OAAO,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC7B,CAAC"}
@@ -179,9 +179,9 @@ export function listLedgers(root) {
179
179
  export function findLedgerByHash(root, manifestHash) {
180
180
  const matches = listLedgers(root).filter((l) => l.ledger.manifestHash === manifestHash);
181
181
  if (matches.length === 0)
182
- throw new Error(`no ledger matches this manifest's current contents (was it edited since \`spawn -f\`?) tear down by run id: \`cotal down -f <file> --run <id>\``);
182
+ throw new Error(`no ledger matches this manifest's current contents (was it edited since \`spawn -f\`?) - tear down by run id: \`cotal down -f <file> --run <id>\``);
183
183
  if (matches.length > 1)
184
- throw new Error(`${matches.length} runs share this manifest name one: ${matches.map((m) => m.ledger.runId).join(", ")} (\`--run <id>\`)`);
184
+ throw new Error(`${matches.length} runs share this manifest - name one: ${matches.map((m) => m.ledger.runId).join(", ")} (\`--run <id>\`)`);
185
185
  return matches[0];
186
186
  }
187
187
  /** Resolve a ledger by explicit run id (the `--run <id>` path). Validates the id is a safe token
@@ -196,7 +196,7 @@ export function findLedgerByRun(root, runId) {
196
196
  // Bind the filename to the contents: a tampered `<runId>.json` whose body declares a DIFFERENT
197
197
  // runId must not redirect teardown to that other run's derived run dir / resources.
198
198
  if (ledger.runId !== runId)
199
- throw new Error(`ledger ${path}: declares runId "${ledger.runId}", not "${runId}" refusing`);
199
+ throw new Error(`ledger ${path}: declares runId "${ledger.runId}", not "${runId}" - refusing`);
200
200
  return { path, ledger };
201
201
  }
202
202
  /** Derive an owned agent's cred path under the known auth root — `<root>/.cotal/auth/creds/<name>.creds`
@@ -207,7 +207,7 @@ export function ownedCredPath(root, spawnedName) {
207
207
  const dir = resolve(authDir(root), "creds");
208
208
  const path = resolve(dir, `${spawnedName}.creds`);
209
209
  if (dirname(path) !== dir)
210
- throw new Error(`unsafe owned agent name "${spawnedName}" cred path escapes ${dir}`);
210
+ throw new Error(`unsafe owned agent name "${spawnedName}" - cred path escapes ${dir}`);
211
211
  return path;
212
212
  }
213
213
  //# sourceMappingURL=ledger.js.map
@@ -1,13 +1,24 @@
1
1
  /**
2
2
  * Live-mesh helpers for `cotal spawn -f` — the network half: a transient, invisible probe endpoint
3
- * for reading the roster + membership feed, and the admin-tier control calls that drive the running
4
- * manager's `launch` op. (Channel-registry reads use `readChannelRegistry`, which connects itself.)
3
+ * for reading the roster + membership feed, and the control calls that drive the running manager's
4
+ * `launch` op admin tier for a static operator deploy, PRIVILEGED tier for a user-mode
5
+ * deployer-view deploy (the manager's owner-equality authorization governs there). (Channel-registry
6
+ * reads use `readChannelRegistry`, which connects itself.)
5
7
  */
6
- import { CotalEndpoint, type ControlReply, type Presence } from "@cotal-ai/core";
8
+ import { CotalEndpoint, type ControlReply, type ControlTier, type Presence } from "@cotal-ai/core";
7
9
  export interface MeshConn {
8
10
  space: string;
9
11
  server: string;
10
12
  creds?: string;
13
+ /** User mode: the "deployer" VIEW material — a bearer SOURCE (a deploy spans several ≤5-min
14
+ * token lives across launch readiness waits) + sentinel + the pinned principal a source-mode
15
+ * endpoint requires. */
16
+ user?: {
17
+ source: () => Promise<string>;
18
+ sentinelCreds: string;
19
+ owner: string;
20
+ actor: string;
21
+ };
11
22
  }
12
23
  /** Connect a transient, presence-invisible endpoint (it watches the roster but doesn't register
13
24
  * itself) used to read live state + drive control. The caller stops it. */
@@ -16,14 +27,17 @@ export declare function connectProbe(conn: MeshConn): Promise<CotalEndpoint>;
16
27
  * live peers — mirrors the dedup probe in `cotal spawn`. */
17
28
  export declare function settleRoster(ep: CotalEndpoint): Promise<Presence[]>;
18
29
  /** Poll the manager's control plane until it answers `ps` — it may have just been started detached,
19
- * so it needs a moment to connect + come up. Returns false on timeout. */
20
- export declare function waitManagerReady(ep: CotalEndpoint, timeoutMs?: number): Promise<boolean>;
30
+ * so it needs a moment to connect + come up. Returns false on timeout. `tier` matches the caller's
31
+ * deploy credential (admin for static, privileged for the user-mode deployer view). */
32
+ export declare function waitManagerReady(ep: CotalEndpoint, timeoutMs?: number, tier?: ControlTier): Promise<boolean>;
21
33
  /** Poll until the manager lease for this space is GONE (a crashed holder's key lingers until the bucket
22
34
  * TTL). Returns true once absent, false on timeout. `spawn -f` uses this to wait out a STALE lease
23
35
  * before standing up a replacement — a held lease alone is not proof a manager is alive. */
24
36
  export declare function waitLeaseGone(ep: CotalEndpoint, timeoutMs: number): Promise<boolean>;
25
- /** Ask the running manager to launch one resolved agent from the run spec, on the ADMIN tier (the
26
- * `launch` op is operator-only a spawn-capable agent must not reach it). The manager derives
27
- * `.cotal/run/<runId>.json` itself; we pass the runId, never a path. */
28
- export declare function launchAgent(ep: CotalEndpoint, runId: string, name: string): Promise<ControlReply>;
37
+ /** Ask the running manager to launch one resolved agent from the run spec on the ADMIN tier for
38
+ * a static operator deploy (the `launch` op is operator-only there; a spawn-capable agent must
39
+ * not reach it), on the PRIVILEGED tier for a user-mode deployer-view deploy (the manager
40
+ * enforces spec-owner === caller-owner). The manager derives `.cotal/run/<runId>.json` itself;
41
+ * we pass the runId, never a path. */
42
+ export declare function launchAgent(ep: CotalEndpoint, runId: string, name: string, tier?: ControlTier): Promise<ControlReply>;
29
43
  //# sourceMappingURL=live.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"live.d.ts","sourceRoot":"","sources":["../../../src/lib/manifest/live.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,aAAa,EAAiB,KAAK,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C;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC;CAC/F;AAID;4EAC4E;AAC5E,wBAAsB,YAAY,CAAC,IAAI,EAAE,QAAQ,GAAG,OAAO,CAAC,aAAa,CAAC,CAmBzE;AAED;6DAC6D;AAC7D,wBAAsB,YAAY,CAAC,EAAE,EAAE,aAAa,GAAG,OAAO,CAAC,QAAQ,EAAE,CAAC,CASzE;AAED;;wFAEwF;AACxF,wBAAsB,gBAAgB,CAAC,EAAE,EAAE,aAAa,EAAE,SAAS,SAAS,EAAE,IAAI,GAAE,WAA2B,GAAG,OAAO,CAAC,OAAO,CAAC,CAYjI;AAED;;6FAE6F;AAC7F,wBAAsB,aAAa,CAAC,EAAE,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAO1F;AAED;;;;uCAIuC;AACvC,wBAAsB,WAAW,CAAC,EAAE,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,GAAE,WAA2B,GAAG,OAAO,CAAC,YAAY,CAAC,CAI1I"}
@@ -1,7 +1,9 @@
1
1
  /**
2
2
  * Live-mesh helpers for `cotal spawn -f` — the network half: a transient, invisible probe endpoint
3
- * for reading the roster + membership feed, and the admin-tier control calls that drive the running
4
- * manager's `launch` op. (Channel-registry reads use `readChannelRegistry`, which connects itself.)
3
+ * for reading the roster + membership feed, and the control calls that drive the running manager's
4
+ * `launch` op admin tier for a static operator deploy, PRIVILEGED tier for a user-mode
5
+ * deployer-view deploy (the manager's owner-equality authorization governs there). (Channel-registry
6
+ * reads use `readChannelRegistry`, which connects itself.)
5
7
  */
6
8
  import { CotalEndpoint, CONTROL_ADMIN } from "@cotal-ai/core";
7
9
  import { START_TIMEOUT_MS } from "../control.js";
@@ -12,12 +14,17 @@ export async function connectProbe(conn) {
12
14
  const ep = new CotalEndpoint({
13
15
  space: conn.space,
14
16
  servers: conn.server,
15
- creds: conn.creds,
17
+ ...(conn.user
18
+ ? {
19
+ bearer: conn.user.source,
20
+ sentinelCreds: conn.user.sentinelCreds,
21
+ card: { owner: conn.user.owner, actor: conn.user.actor, name: "spawn-f", kind: "endpoint" },
22
+ }
23
+ : { creds: conn.creds, card: { name: "spawn-f", kind: "endpoint" } }),
16
24
  channels: [],
17
25
  consume: false,
18
26
  registerPresence: false, // an invisible probe — don't add ourselves to the roster we read
19
27
  watchPresence: true,
20
- card: { name: "spawn-f", kind: "endpoint" },
21
28
  });
22
29
  ep.on("error", () => { }); // a presence/control hiccup must never crash the deploy
23
30
  await ep.start();
@@ -37,12 +44,13 @@ export async function settleRoster(ep) {
37
44
  return ep.getRoster();
38
45
  }
39
46
  /** Poll the manager's control plane until it answers `ps` — it may have just been started detached,
40
- * so it needs a moment to connect + come up. Returns false on timeout. */
41
- export async function waitManagerReady(ep, timeoutMs = 20_000) {
47
+ * so it needs a moment to connect + come up. Returns false on timeout. `tier` matches the caller's
48
+ * deploy credential (admin for static, privileged for the user-mode deployer view). */
49
+ export async function waitManagerReady(ep, timeoutMs = 20_000, tier = CONTROL_ADMIN) {
42
50
  const deadline = Date.now() + timeoutMs;
43
51
  while (Date.now() < deadline) {
44
52
  try {
45
- const r = await ep.requestControl(CONTROL_ADMIN, { op: "ps" });
53
+ const r = await ep.requestControl(tier, { op: "ps" });
46
54
  if (r.ok)
47
55
  return true;
48
56
  }
@@ -65,12 +73,14 @@ export async function waitLeaseGone(ep, timeoutMs) {
65
73
  }
66
74
  return !(await ep.readManagerLease());
67
75
  }
68
- /** Ask the running manager to launch one resolved agent from the run spec, on the ADMIN tier (the
69
- * `launch` op is operator-only a spawn-capable agent must not reach it). The manager derives
70
- * `.cotal/run/<runId>.json` itself; we pass the runId, never a path. */
71
- export async function launchAgent(ep, runId, name) {
76
+ /** Ask the running manager to launch one resolved agent from the run spec on the ADMIN tier for
77
+ * a static operator deploy (the `launch` op is operator-only there; a spawn-capable agent must
78
+ * not reach it), on the PRIVILEGED tier for a user-mode deployer-view deploy (the manager
79
+ * enforces spec-owner === caller-owner). The manager derives `.cotal/run/<runId>.json` itself;
80
+ * we pass the runId, never a path. */
81
+ export async function launchAgent(ep, runId, name, tier = CONTROL_ADMIN) {
72
82
  // #159 B1: `launch` funnels into the same startAgent readiness wait as `start` — the manager
73
83
  // replies only on a real outcome (join / exit / ~30s backstop), so the request must outlive it.
74
- return ep.requestControl(CONTROL_ADMIN, { op: "launch", args: { runId, name } }, START_TIMEOUT_MS);
84
+ return ep.requestControl(tier, { op: "launch", args: { runId, name } }, START_TIMEOUT_MS);
75
85
  }
76
86
  //# sourceMappingURL=live.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"live.js","sourceRoot":"","sources":["../../../src/lib/manifest/live.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,aAAa,EAAE,aAAa,EAAoC,MAAM,gBAAgB,CAAC;AAChG,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAQjD,MAAM,KAAK,GAAG,CAAC,EAAU,EAAiB,EAAE,CAAC,IAAI,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,UAAU,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;AAEnF;4EAC4E;AAC5E,MAAM,CAAC,KAAK,UAAU,YAAY,CAAC,IAAc;IAC/C,MAAM,EAAE,GAAG,IAAI,aAAa,CAAC;QAC3B,KAAK,EAAE,IAAI,CAAC,KAAK;QACjB,OAAO,EAAE,IAAI,CAAC,MAAM;QACpB,KAAK,EAAE,IAAI,CAAC,KAAK;QACjB,QAAQ,EAAE,EAAE;QACZ,OAAO,EAAE,KAAK;QACd,gBAAgB,EAAE,KAAK,EAAE,iEAAiE;QAC1F,aAAa,EAAE,IAAI;QACnB,IAAI,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,UAAU,EAAE;KAC5C,CAAC,CAAC;IACH,EAAE,CAAC,EAAE,CAAC,OAAO,EAAE,GAAG,EAAE,GA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persona's model (or the inline model). */
42
42
  model?: string;
43
+ /** Manifest override of the persona's connector-defined model variant. */
44
+ variant?: string;
45
+ /** Opaque connector launch options, merged per key over the persona's `launchOptions:`. */
46
+ launchOptions?: Record<string, unknown>;
43
47
  role?: string;
44
48
  /** Manifest card blurb (override / inline). */
45
49
  description?: string;
@@ -58,7 +62,8 @@ export interface ResolvedManifest {
58
62
  broker?: {
59
63
  servers?: string;
60
64
  host?: string;
61
- auth?: boolean;
65
+ auth?: boolean | "static" | "user";
66
+ idp?: string;
62
67
  };
63
68
  runtime?: "pty" | "tmux" | "cmux";
64
69
  personaPermissions: PersonaPermissions;
@@ -1 +1 @@
1
- {"version":3,"file":"model.d.ts","sourceRoot":"","sources":["../../../src/lib/manifest/model.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAErE,MAAM,MAAM,kBAAkB,GAAG,QAAQ,GAAG,SAAS,CAAC;AAEtD;kGACkG;AAClG,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,2CAA2C;IAC3C,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,wFAAwF;IACxF,cAAc,EAAE,MAAM,EAAE,CAAC;IACzB,qDAAqD;IACrD,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,aAAa,CAAC;CAC/B;AAED;oGACoG;AACpG,MAAM,WAAW,WAAW;IAC1B,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,cAAc,EAAE,MAAM,EAAE,CAAC;IACzB,YAAY,EAAE,MAAM,EAAE,CAAC;CACxB;AAED;;oEAEoE;AACpE,MAAM,WAAW,aAAa;IAC5B,+D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AM,CAAC,EAAE;QAAE,OAAO,CAAC,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAC;QAAC,GAAG,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAC/F,OAAO,CAAC,EAAE,KAAK,GAAG,MAAM,GAAG,MAAM,CAAC;IAClC,kBAAkB,EAAE,kBAAkB,CAAC;IACvC,QAAQ,CAAC,EAAE,eAAe,CAAC;IAC3B,MAAM,EAAE,aAAa,EAAE,CAAC;IACxB,QAAQ,EAAE,eAAe,EAAE,CAAC;IAC5B,iGAAiG;IACjG,UAAU,EAAE,MAAM,CAAC;CACpB"}
@@ -3,7 +3,7 @@
3
3
  * (read from disk) with the manifest. Pure: it takes already-loaded {@link AgentDef}s so it stays
4
4
  * unit-testable; the fs/live I/O lives in {@link ./preflight.js}.
5
5
  *
6
- * Behavior fields (model/role/description/body) are persona-default + manifest-override. Access is
6
+ * Behavior fields (model/variant/role/description/body) are persona-default + manifest-override. Access is
7
7
  * governed by {@link PersonaPermissions}: under `reject` the manifest is the sole source; under
8
8
  * `include` a persona's own grants are inherited **only for channels the manifest does not declare**
9
9
  * (one authority per channel), concrete-only (wildcards rejected), and surfaced loudly.
@@ -34,6 +34,9 @@ export interface PreparedAgent {
34
34
  persona?: string;
35
35
  /** Effective values (manifest override ?? persona default). */
36
36
  model?: string;
37
+ variant?: string;
38
+ /** Effective opaque connector launch options (manifest merged per key over persona). */
39
+ launchOptions?: Record<string, unknown>;
37
40
  role?: string;
38
41
  description?: string;
39
42
  /** Effective persona body (manifest `instructions` REPLACES the file body; sole body for inline). */
@@ -1 +1 @@
1
- {"version":3,"file":"prepare.d.ts","sourceRoot":"","sources":["../../../src/lib/manifest/prepare.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,EAAqB,KAAK,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAClE,OA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,CAAC;IACpB,+FAA+F;IAC/F,SAAS,EAAE,eAAe,CAAC;CAC5B;AAED,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,aAAa,CAAC;IACxB,MAAM,EAAE,aAAa,EAAE,CAAC;IACxB,QAAQ,EAAE,YAAY,EAAE,CAAC;CAC1B;AAED;2EAC2E;AAC3E,wBAAgB,YAAY,CAAC,KAAK,EAAE,aAAa,EAAE,OAAO,EAAE,QAAQ,GAAG,SAAS,EAAE,QAAQ,EAAE,GAAG,CAAC,MAAM,CAAC,GAAG,cAAc,CAyFvH"}
@@ -3,12 +3,13 @@
3
3
  * (read from disk) with the manifest. Pure: it takes already-loaded {@link AgentDef}s so it stays
4
4
  * unit-testable; the fs/live I/O lives in {@link ./preflight.js}.
5
5
  *
6
- * Behavior fields (model/role/description/body) are persona-default + manifest-override. Access is
6
+ * Behavior fields (model/variant/role/description/body) are persona-default + manifest-override. Access is
7
7
  * governed by {@link PersonaPermissions}: under `reject` the manifest is the sole source; under
8
8
  * `include` a persona's own grants are inherited **only for channels the manifest does not declare**
9
9
  * (one authority per channel), concrete-only (wildcards rejected), and surfaced loudly.
10
10
  */
11
11
  import { isConcreteChannel } from "@cotal-ai/core";
12
+ import { mergeLaunchOptions } from "@cotal-ai/workspace";
12
13
  /** Merge one resolved agent with its (optional) loaded persona, given the set of channel names the
13
14
  * manifest declares. Returns the launch form plus any errors/warnings. */
14
15
  export function prepareAgent(agent, persona, declared) {
@@ -17,6 +18,8 @@ export function prepareAgent(agent, persona, declared) {
17
18
  const at = ["agents", agent.name];
18
19
  // Behavior: persona default, manifest override wins. Inline `instructions` REPLACE the body.
19
20
  const model = agent.model ?? persona?.model;
21
+ const variant = agent.variant ?? persona?.variant;
22
+ const launchOptions = mergeLaunchOptions(persona?.launchOptions, agent.launchOptions);
20
23
  const role = agent.role ?? persona?.role;
21
24
  const description = agent.description ?? persona?.description;
22
25
  const body = agent.instructions ?? persona?.persona;
@@ -45,7 +48,7 @@ export function prepareAgent(agent, persona, declared) {
45
48
  for (const [field, list] of [["subscribe", persona.subscribe], ["allowSubscribe", personaAllowSub], ["allowPublish", persona.allowPublish]])
46
49
  for (const ch of list ?? [])
47
50
  if (!isConcreteChannel(ch))
48
- issues.push({ message: `persona ${field} "${ch}" is a wildcard not supported in v1 (declare concrete channels)`, path: at });
51
+ issues.push({ message: `persona ${field} "${ch}" is a wildcard - not supported in v1 (declare concrete channels)`, path: at });
49
52
  // Persona grants apply ONLY to channels the manifest does not declare (manifest owns its own).
50
53
  const undeclared = (list) => (list ?? []).filter((c) => isConcreteChannel(c) && !declared.has(c));
51
54
  inherited.subscribe = undeclared(persona.subscribe);
@@ -68,7 +71,7 @@ export function prepareAgent(agent, persona, declared) {
68
71
  agent: agent.name,
69
72
  loud: capabilities.length > 0,
70
73
  message: capabilities.length
71
- ? `declared with capabilities [${capabilities.join(", ")}] but NO channel access (DM/control-only a powerful non-channel grant)`
74
+ ? `declared with capabilities [${capabilities.join(", ")}] but NO channel access (DM/control-only - a powerful non-channel grant)`
72
75
  : `declared but has no channel access from the manifest (DM/control-only unless a persona under \`include\` grants scopes)`,
73
76
  });
74
77
  return {
@@ -77,6 +80,8 @@ export function prepareAgent(agent, persona, declared) {
77
80
  agentType: agent.agentType,
78
81
  persona: agent.persona,
79
82
  model,
83
+ variant,
84
+ launchOptions,
80
85
  role,
81
86
  description,
82
87
  body,
@@ -1 +1 @@
1
- {"version":3,"file":"prepare.js","sourceRoot":"","sources":["../../../src/lib/manifest/prepare.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,EAAE,iBAAiB,EAAiB,MAAM,gBAAgB,CAAC;AAgDlE;2EAC2E;AAC3E,MAAM,UAAU,YAAY,CAAC,KAAoB,EAAE,OAA6B,EAAE,QAAqB;IACrG,MAAM,MAAM,GAAoB,EAAE,CAAC;IACnC,MAAM,QAAQ,GAAmB,EAAE,CAAC;IACpC,MAAM,EAAE,GAAwB,CAAC,QAAQ,EAAE,KAAK,CAA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WT"}
@@ -52,15 +52,16 @@ export function renderTopology(p) {
52
52
  * "will create" — broker + channels + agents — followed by the full access view. Mutates nothing. */
53
53
  export function renderUpPlan(p, server) {
54
54
  const m = p.manifest;
55
+ const auth = m.broker?.auth === false ? "open" : m.broker?.auth === "user" ? `user auth${m.broker?.idp ? ` (idp ${m.broker.idp})` : ""}` : "static auth";
55
56
  const head = [
56
- c.bold("Plan cotal up -f (fresh mesh)"),
57
+ c.bold("Plan - cotal up -f (fresh mesh)"),
57
58
  c.bold("Will create:"),
58
- ` ${c.green("+")} broker + space ${c.cyan(`"${m.space}"`)} at ${server}`,
59
+ ` ${c.green("+")} broker + space ${c.cyan(`"${m.space}"`)} at ${server} ${c.dim(`(${auth})`)}`,
59
60
  ` ${c.green("+")} ${m.channels.length} channel(s): ${m.channels.map((ch) => c.cyan("#" + ch.name)).join(", ")}`,
60
61
  ` ${c.green("+")} ${p.agents.length} agent(s): ${p.agents.map((a) => a.name).join(", ")}`,
61
62
  "",
62
63
  ].join("\n");
63
- return `${head}${renderTopology(p)}\n\n${c.dim("Dry run nothing was changed. Re-run without --dry-run to apply.")}`;
64
+ return `${head}${renderTopology(p)}\n\n${c.dim("Dry run - nothing was changed. Re-run without --dry-run to apply.")}`;
64
65
  }
65
66
  /** The loud "persona grants outside manifest channels" section — unmanaged credential scopes that
66
67
  * an old persona ref drags in under `personaPermissions: include`. Returns "" when there are none. */
@@ -74,7 +75,7 @@ export function renderInherited(p) {
74
75
  // Capabilities first — they are NOT channel-scoped (spawn/tool power), so they're easiest to miss
75
76
  // and most security-significant (security review, round-8).
76
77
  if (i.capabilities.length)
77
- rows.push(` ${c.yellow("‼")} ${c.bold(a.name)} capabilities: ${i.capabilities.join(", ")} ${c.dim(`(persona ${a.persona} not channel-scoped)`)}`);
78
+ rows.push(` ${c.yellow("‼")} ${c.bold(a.name)} capabilities: ${i.capabilities.join(", ")} ${c.dim(`(persona ${a.persona} - not channel-scoped)`)}`);
78
79
  if (hasAcl) {
79
80
  const parts = [
80
81
  i.subscribe.length ? `subscribe ${i.subscribe.join(",")}` : "",
@@ -98,16 +99,16 @@ export function renderWarnings(warnings) {
98
99
  * SECURITY block + persona-inherited access. Creation-only — an existing unmanaged card is shown
99
100
  * desired-vs-live, never patched. */
100
101
  export function renderSpawnPlan(p, channels, agents, unmanaged, ctx) {
101
- const out = [c.bold(`Plan cotal spawn -f (deploy onto running mesh ${ctx.server})`)];
102
+ const out = [c.bold(`Plan - cotal spawn -f (deploy onto running mesh ${ctx.server})`)];
102
103
  out.push("", c.bold("Channels:"));
103
104
  for (const ch of channels.create)
104
105
  out.push(` ${c.green("+")} create ${c.cyan("#" + ch.name)} ${c.dim("(seed + own)")}`);
105
106
  for (const { channel, live } of channels.existsUnmanaged) {
106
- out.push(` ${c.yellow("~")} ${c.cyan("#" + channel.name)} ${c.yellow("exists unmanaged")} ${c.dim("(card left untouched)")}`);
107
+ out.push(` ${c.yellow("~")} ${c.cyan("#" + channel.name)} ${c.yellow("exists - unmanaged")} ${c.dim("(card left untouched)")}`);
107
108
  if ((channel.description ?? "") !== (live.description ?? ""))
108
109
  out.push(` ${c.dim(`desired: ${channel.description ?? "(none)"} · live: ${live.description ?? "(none)"}`)}`);
109
110
  if ((channel.instructions ?? "") !== (live.instructions ?? ""))
110
- out.push(` ${c.dim(`desired instructions differ from live not applied (use a future --patch flag)`)}`);
111
+ out.push(` ${c.dim(`desired instructions differ from live - not applied (use a future --patch flag)`)}`);
111
112
  }
112
113
  for (const ch of channels.owned)
113
114
  out.push(` ${c.dim("=")} ${c.cyan("#" + ch.name)} ${c.dim("(already owned by this run)")}`);
@@ -115,11 +116,11 @@ export function renderSpawnPlan(p, channels, agents, unmanaged, ctx) {
115
116
  out.push(` ${c.dim("(none)")}`);
116
117
  out.push("", c.bold("Agents:"));
117
118
  for (const e of agents.willCreate)
118
- out.push(` ${c.green("+")} ${c.bold(e.agent.name)} ${c.dim(`${e.agent.agentType} will launch`)}`);
119
+ out.push(` ${c.green("+")} ${c.bold(e.agent.name)} ${c.dim(`${e.agent.agentType} - will launch`)}`);
119
120
  for (const e of agents.alreadyOwned)
120
- out.push(` ${c.dim("=")} ${c.bold(e.agent.name)} ${c.dim(`(already running as ${e.prior?.name} no-op)`)}`);
121
+ out.push(` ${c.dim("=")} ${c.bold(e.agent.name)} ${c.dim(`(already running as ${e.prior?.name} - no-op)`)}`);
121
122
  for (const e of agents.stale)
122
- out.push(` ${c.yellow("!")} ${c.bold(e.agent.name)} ${c.yellow("stale restart required")} ` +
123
+ out.push(` ${c.yellow("!")} ${c.bold(e.agent.name)} ${c.yellow("stale - restart required")} ` +
123
124
  c.dim(`(${e.prior?.name}: hash ${e.prior?.hash.slice(0, 8)} → ${e.hash.slice(0, 8)}${e.running ? "" : ", not running"})`));
124
125
  if (!agents.entries.length)
125
126
  out.push(` ${c.dim("(none)")}`);
@@ -130,7 +131,7 @@ export function renderSpawnPlan(p, channels, agents, unmanaged, ctx) {
130
131
  if (inherited)
131
132
  out.push("", inherited);
132
133
  if (ctx.dryRun)
133
- out.push("", c.dim(`Dry run nothing was changed. Run ${ctx.runId} not written. Re-run without --dry-run to apply.`));
134
+ out.push("", c.dim(`Dry run - nothing was changed. Run ${ctx.runId} not written. Re-run without --dry-run to apply.`));
134
135
  return out.join("\n");
135
136
  }
136
137
  /** The SECURITY block: unmanaged actors observed with read access to a manifest-declared channel —
@@ -145,7 +146,7 @@ export function renderUnmanaged(u) {
145
146
  }
146
147
  const caveat = u.feedAvailable
147
148
  ? c.dim(` detected via presence + membership feed (asOf ${new Date(u.asOf).toISOString()}); live-only core subscriptions are a lower bound`)
148
- : c.dim(" membership feed unavailable detection is PRESENCE-ONLY (a lower bound; channel membership/live subscriptions not observable)");
149
+ : c.dim(" membership feed unavailable - detection is PRESENCE-ONLY (a lower bound; channel membership/live subscriptions not observable)");
149
150
  // Show the block when there are conflicts, or when the feed was unavailable (so an empty result is
150
151
  // never mistaken for "provably isolated").
151
152
  if (!rows.length && u.feedAvailable) {
@@ -153,7 +154,7 @@ export function renderUnmanaged(u) {
153
154
  ? c.dim(`note: ${u.presentUnowned.length} unmanaged peer(s) present on the mesh; none on a declared channel (${caveat.trim()})`)
154
155
  : "";
155
156
  }
156
- const head = c.red(c.bold("⚠ SECURITY unmanaged actors with access to declared channels"));
157
+ const head = c.red(c.bold("⚠ SECURITY - unmanaged actors with access to declared channels"));
157
158
  const tail = u.presentUnowned.length ? [c.dim(` (${u.presentUnowned.length} unmanaged peer(s) present on the mesh in total)`)] : [];
158
159
  return [head, ...rows, caveat, ...tail].join("\n");
159
160
  }