@cotal-ai/cli 0.48.2 → 0.50.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 (82) hide show
  1. package/dist/command.d.ts.map +1 -1
  2. package/dist/command.js +8 -0
  3. package/dist/command.js.map +1 -1
  4. package/dist/commands/agents.d.ts +167 -6
  5. package/dist/commands/agents.d.ts.map +1 -1
  6. package/dist/commands/agents.js +151 -61
  7. package/dist/commands/agents.js.map +1 -1
  8. package/dist/commands/doctor.d.ts.map +1 -1
  9. package/dist/commands/doctor.js +175 -11
  10. package/dist/commands/doctor.js.map +1 -1
  11. package/dist/commands/down.d.ts +18 -1
  12. package/dist/commands/down.d.ts.map +1 -1
  13. package/dist/commands/down.js +99 -3
  14. package/dist/commands/down.js.map +1 -1
  15. package/dist/commands/join.d.ts.map +1 -1
  16. package/dist/commands/join.js +9 -1
  17. package/dist/commands/join.js.map +1 -1
  18. package/dist/commands/meshes.js +5 -5
  19. package/dist/commands/meshes.js.map +1 -1
  20. package/dist/commands/send.d.ts.map +1 -1
  21. package/dist/commands/send.js +2 -8
  22. package/dist/commands/send.js.map +1 -1
  23. package/dist/commands/setup.d.ts +1 -1
  24. package/dist/commands/setup.d.ts.map +1 -1
  25. package/dist/commands/setup.js +1 -1
  26. package/dist/commands/spawn-manifest.d.ts.map +1 -1
  27. package/dist/commands/spawn-manifest.js +3 -2
  28. package/dist/commands/spawn-manifest.js.map +1 -1
  29. package/dist/commands/status.d.ts +11 -3
  30. package/dist/commands/status.d.ts.map +1 -1
  31. package/dist/commands/status.js +176 -13
  32. package/dist/commands/status.js.map +1 -1
  33. package/dist/commands/up.d.ts +13 -0
  34. package/dist/commands/up.d.ts.map +1 -1
  35. package/dist/commands/up.js +65 -5
  36. package/dist/commands/up.js.map +1 -1
  37. package/dist/commands/update.d.ts.map +1 -1
  38. package/dist/commands/update.js +19 -7
  39. package/dist/commands/update.js.map +1 -1
  40. package/dist/commands/use.js +2 -2
  41. package/dist/commands/use.js.map +1 -1
  42. package/dist/index.d.ts.map +1 -1
  43. package/dist/index.js +4 -3
  44. package/dist/index.js.map +1 -1
  45. package/dist/lib/auth-proc.d.ts.map +1 -1
  46. package/dist/lib/auth-proc.js +2 -1
  47. package/dist/lib/auth-proc.js.map +1 -1
  48. package/dist/lib/control.d.ts +28 -1
  49. package/dist/lib/control.d.ts.map +1 -1
  50. package/dist/lib/control.js +58 -11
  51. package/dist/lib/control.js.map +1 -1
  52. package/dist/lib/delivery-proc.d.ts +22 -5
  53. package/dist/lib/delivery-proc.d.ts.map +1 -1
  54. package/dist/lib/delivery-proc.js +82 -18
  55. package/dist/lib/delivery-proc.js.map +1 -1
  56. package/dist/lib/delivery-responder.d.ts +92 -0
  57. package/dist/lib/delivery-responder.d.ts.map +1 -0
  58. package/dist/lib/delivery-responder.js +78 -0
  59. package/dist/lib/delivery-responder.js.map +1 -0
  60. package/dist/lib/manager-proc.d.ts +15 -13
  61. package/dist/lib/manager-proc.d.ts.map +1 -1
  62. package/dist/lib/manager-proc.js +38 -7
  63. package/dist/lib/manager-proc.js.map +1 -1
  64. package/dist/lib/restore.d.ts.map +1 -1
  65. package/dist/lib/restore.js +6 -4
  66. package/dist/lib/restore.js.map +1 -1
  67. package/dist/lib/self-exec.d.ts +15 -1
  68. package/dist/lib/self-exec.d.ts.map +1 -1
  69. package/dist/lib/self-exec.js +30 -3
  70. package/dist/lib/self-exec.js.map +1 -1
  71. package/dist/lib/systemd-supervision.d.ts +15 -0
  72. package/dist/lib/systemd-supervision.d.ts.map +1 -0
  73. package/dist/lib/systemd-supervision.js +64 -0
  74. package/dist/lib/systemd-supervision.js.map +1 -0
  75. package/dist/lib/transient.d.ts +1 -10
  76. package/dist/lib/transient.d.ts.map +1 -1
  77. package/dist/lib/transient.js +4 -24
  78. package/dist/lib/transient.js.map +1 -1
  79. package/dist/seed/reconcile.d.ts.map +1 -1
  80. package/dist/seed/reconcile.js +27 -1
  81. package/dist/seed/reconcile.js.map +1 -1
  82. package/package.json +5 -5
@@ -1 +1 @@
1
- {"version":3,"file":"command.d.ts","sourceRoot":"","sources":["../src/command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgD,KAAK,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAiH7F,2DAA2D;AAC3D,MAAM,WAAW,aAAa;IAC5B;;;oCAGgC;IAChC,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED;;uFAEuF;AACvF,wBAAsB,MAAM,CAAC,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,IAAI,GAAE,aAAkB,GAAG,OAAO,CAAC,IAAI,CAAC,CAyGxG"}
1
+ {"version":3,"file":"command.d.ts","sourceRoot":"","sources":["../src/command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgD,KAAK,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAwH7F,2DAA2D;AAC3D,MAAM,WAAW,aAAa;IAC5B;;;oCAGgC;IAChC,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED;;uFAEuF;AACvF,wBAAsB,MAAM,CAAC,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,IAAI,GAAE,aAAkB,GAAG,OAAO,CAAC,IAAI,CAAC,CAyGxG"}
package/dist/command.js CHANGED
@@ -87,6 +87,14 @@ function skipAutoReconcile(argv) {
87
87
  return true;
88
88
  if (argv.includes("--help") || argv.includes("-h"))
89
89
  return true; // command-specific help must not mutate state
90
+ // A dry run promises to plan and print while mutating NOTHING, and the boot-gate reconcile is a
91
+ // mutation of the operator-global seed store, manifest and npm prefix — it ran BEFORE the command
92
+ // body could reject the invocation, so `down --preserve-state --dry-run` (an unsupported
93
+ // combination) migrated the whole store to the invoking binary's generation and only then printed
94
+ // the usage refusal, leaving an older live deployment on a store it no longer matches (#1620). The
95
+ // planning surface reads what is installed; it never seeds to make the plan prettier.
96
+ if (argv.includes("--dry-run"))
97
+ return true;
90
98
  if (name === "update")
91
99
  return true; // update owns one explicit reconcile; never auto-refresh then force-refresh
92
100
  // The seed is skipped for an INTERNAL CHILD re-exec — the `up`/`spawn` that spawns the delivery
@@ -1 +1 @@
1
- {"version":3,"file":"command.js","sourceRoot":"","sources":["../src/command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAA+B,MAAM,gBAAgB,CAAC;AAC7F,OAAO,EAAE,sBAAsB,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AACnF,OAAO,EAAE,CAAC,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAC5C,OAAO,EACL,eAAe,EACf,oBAAoB,EACpB,2BAA2B,EAC3B,iBAAiB,EACjB,iBAAiB,EACjB,6BAA6B,GAC9B,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,yBAAyB,EAAE,MAAM,qBAAqB,CAAC;AAChE,OAAO,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAEjE;;;4EAG4E;AAC5E,MAAM,WAAW,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,QAAQ,EAAE,SAAS,EAAE,YAAY,EAAE,SAAS,CAAC,CAAC;AAEjG,SAAS,IAAI,CAAC,QAAmB;IAC/B,+FAA+F;IAC/F,kFAAkF;IAClF,MAAM,OAAO,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACpF,MAAM,MAAM,GAAG,IAAI,GAAG,EAAqB,CAAC;IAC5C,KAAK,MAAM,GAAG,IAAI,OAAO,EAAE,CAAC;QAC1B,MAAM,CAAC,GAAG,GAAG,CAAC,KAAK,IAAI,UAAU,CAAC;QAClC,CAAC,MAAM,CAA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AAC,CAAC,CAAC;QAClB,CAAC;QACD,4FAA4F;QAC5F,6FAA6F;QAC7F,sFAAsF;QACtF,6BAA6B;QAC7B,MAAM,GAAG,GAAG,CAAC,YAAY,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;QACvD,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,GAAG,EAAE,CAAC,CAAC,CAAC;QACjC,oFAAoF;QACpF,8EAA8E;QAC9E,MAAM,IAAI,GAAG,cAAc,CAAC,GAAG,CAAC,CAAC;QACjC,IAAI,IAAI;YAAE,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,IAAI,EAAE,CAAC,CAAC,CAAC;QAC9C,IAAI,OAAO,CAAC,GAAG,CAAC,WAAW,IAAI,CAAC,YAAY,KAAK,IAAI,CAAC,CAAC,KAAK;YAAE,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC;QAC5F,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC"}
@@ -1,4 +1,5 @@
1
- import { type CompletionResult, type ParsedArgs } from "@cotal-ai/core";
1
+ import { standaloneConnectOpts, type CompletionResult, type ParsedArgs, type SpaceAuth } from "@cotal-ai/core";
2
+ import { type ScatterInstanceReply } from "../lib/control.js";
2
3
  export declare const stopFlags: readonly [{
3
4
  readonly name: "space";
4
5
  readonly type: "string";
@@ -135,6 +136,8 @@ type AgentRow = {
135
136
  status: string;
136
137
  uptimeMs: number;
137
138
  mesh: string;
139
+ /** The manager's own presence-view state when it built the row; absent from older managers. */
140
+ meshView?: "current" | "stale" | "unpopulated";
138
141
  authHealth?: string;
139
142
  authReason?: string;
140
143
  model?: string;
@@ -152,6 +155,93 @@ type AgentRow = {
152
155
  * recorded: when no override was requested it stays absent rather than inventing an effective
153
156
  * provider default Cotal cannot observe. */
154
157
  export declare function agentIdentity(r: Pick<AgentRow, "agent" | "model" | "variant" | "mode">): string;
158
+ /**
159
+ * WHERE does the named seat live? A `stop` or `attach` can only be served by the manager actually
160
+ * HOSTING the seat, and the class queue does not know which one that is — so without this the verb
161
+ * is answered by whichever instance wins the race and fails on a seat that plainly exists.
162
+ *
163
+ * This is a POSITIVE lookup, not a retry after a miss, and that is forced by measurement: a manager
164
+ * asked about a seat it does not host answers `not-found: no agent "<n>"` — the SAME code and the
165
+ * same message it gives for a name that exists nowhere. "Hosted elsewhere" and "does not exist" are
166
+ * indistinguishable from a single manager's answer, so a caller that retried on a miss would scatter
167
+ * for a typo and, worse, could only ever report the ambiguous message. Asking every instance is the
168
+ * only construction that can tell the two apart — which is also what lets the error finally say
169
+ * which case it is.
170
+ *
171
+ * Costs a second one-shot instrument. The scatter's freeze read belongs to the PRIVILEGED tier;
172
+ * `stop`/`attach` mint ADMIN, which is denied that read deliberately ("the admin tier never
173
+ * scatters"). Rather than widen admin for convenience, the lookup runs as its own privileged
174
+ * instrument and the admin instrument is then minted pinned to the answer.
175
+ */
176
+ export type SeatLocation = {
177
+ kind: "pin";
178
+ instanceId: string;
179
+ } | {
180
+ kind: "unpinned";
181
+ } | {
182
+ kind: "absent";
183
+ checked: number;
184
+ }
185
+ /** #1638 item 3: the search could not settle. At least one registered instance did not answer
186
+ * FOR ITSELF, so the seat may be sitting on it; absence is not what was established. */
187
+ | {
188
+ kind: "unknown";
189
+ answered: number;
190
+ silent: string[];
191
+ refused: {
192
+ instanceId: string;
193
+ error: string;
194
+ }[];
195
+ };
196
+ /**
197
+ * WHAT THE SCATTER ESTABLISHED about one seat name — the whole decision, as a function of the rows
198
+ * alone, so it is gradable without a broker.
199
+ *
200
+ * ANSWERED FOR ITSELF means an instance returned its own roster. A slot that never answered and one
201
+ * that answered with a REFUSAL are the same fact for this search: neither stated which seats it
202
+ * hosts, so neither licenses a conclusion about a seat that might be sitting on it (#1638 item 3).
203
+ * The refusal half is the reachable-but-errored row `scatterManager` reports, which the older
204
+ * filter counted as a manager that had looked and found nothing.
205
+ *
206
+ * Absence is a claim about the WHOLE space, so it is concluded only when the whole space answered.
207
+ */
208
+ export declare function locateSeatIn(instances: readonly ScatterInstanceReply[], name: string): SeatLocation;
209
+ /**
210
+ * What a `stop`/`attach`/`input` that did not find its seat TELLS the operator — and the difference
211
+ * between the two things it can mean (#1638 item 3).
212
+ *
213
+ * ABSENT is a claim about the whole space and is only made when the whole space answered for
214
+ * itself. A registration that gave no answer within the deadline is NOT told to "retry": a manager
215
+ * whose host died never deregisters, so its row stays in the registry indefinitely and answers
216
+ * nothing, and a retry against it loops forever. Say what is known (registered, silent), what it
217
+ * may mean (a live slow host OR a dead registration), and the two real actions.
218
+ *
219
+ * UNKNOWN is the other case and it used to print as the first one. The seat may be sitting on the
220
+ * instance that did not answer, so "no managed agent <name>" was a definite negative drawn from an
221
+ * incomplete search — and it names the instance COUNT, which is the shape a reader believes.
222
+ * Measured on a live mesh: a seat that `ps` listed as running the whole time was reported absent,
223
+ * and the same command with `--on` succeeded first time. A retry loop that reads the old sentence
224
+ * as "already gone" stops looking for a seat that is still running.
225
+ */
226
+ export declare function seatMissRefusal(name: string, verb: string, loc: Extract<SeatLocation, {
227
+ kind: "absent" | "unknown";
228
+ }>): string;
229
+ /** Render one managed-agent row (process fact, mesh fact, optional auth-health line), indented for
230
+ * the per-manager grouping a class scatter prints.
231
+ *
232
+ * Two facts, printed as two facts. The manager reports the PROCESS (`status` from the runtime
233
+ * handle, `uptimeMs` from its start) and the MESH presence separately, and they disagree in the
234
+ * common failure: a seat that is `running` for two days but `offline` on the mesh. Folding them
235
+ * into one word rendered ten live processes as "offline" and a 57h-old process with no roster
236
+ * entry as "starting…", both false. `mesh: absent` means exactly "not in the presence roster",
237
+ * so it prints as that; the process age next to it tells the reader whether it is a fresh start
238
+ * or a seat that never joined. */
239
+ /** The mesh column of one `ps` row. A verdict needs a fresh observer: when the manager reports its
240
+ * own presence view as `stale` (its watch went silent past TTL) or `unpopulated` (its watch has not
241
+ * replayed the bucket yet), `offline` and `absent` describe the manager's watch, not the seat. Print
242
+ * "mesh unknown" with the reason instead of a liveness word an operator, or a watchdog, would act
243
+ * on. A row from a manager that predates `meshView` carries no field and renders as before. */
244
+ export declare function meshColumn(r: Pick<AgentRow, "mesh" | "meshView">): string;
155
245
  /** Extra operational facts for `--wide`. Model and requested variant are already in the compact
156
246
  * identity row, so repeating them here would make wide output noisier without adding provenance.
157
247
  * Only fields the manager actually recorded print; lifecycle uid is required on every row. */
@@ -193,13 +283,84 @@ export declare function reconnectNotice(est: {
193
283
  /**
194
284
  * The line an exit owes an operator about sessions this attach could not hand back, or nothing.
195
285
  *
196
- * Suppressed on `gone`, and that is not tidiness. That verdict exists because the manager answered
197
- * `not-found`, which it only answers once the seat has been freed, and freeing a seat ends every
198
- * session bound to it (`freeSlot` into `endForTarget`, on despawn, self-stop, reap and natural exit
199
- * alike). The sessions this would name have already been collected, so naming them would be
200
- * inventing work for someone who is about to close their terminal.
286
+ * Suppressed on `gone`, and that is not tidiness. That verdict exists only when the manager proves
287
+ * the live seat is absent: either `not-found`, or the namespaced durable static-slot observation
288
+ * after its process is gone. Freeing a seat ends every session bound to it (`freeSlot` into
289
+ * `endForTarget`, on despawn, self-stop, reap and natural exit alike). The sessions this would name
290
+ * have already been collected, so naming them would be inventing work for someone who is about to
291
+ * close their terminal.
201
292
  */
202
293
  export declare function heldSessionNotice(pending: number, verdict: AttachVerdict["kind"]): string | undefined;
294
+ /** Why attach cannot redeem a session grant, said in terms of what the command actually resolved.
295
+ *
296
+ * Three distinct states, kept distinct because the remedy differs and a single sentence covering
297
+ * all three is the defect issue #722 opened on (its old text named an internal work item and no
298
+ * root at all). A USER-AUTH mesh holds no local seed by design. A REGISTERED static mesh has a
299
+ * root and it is named, so an operator can see which directory the command used rather than
300
+ * guessing at their cwd.
301
+ *
302
+ * The third arm is an INVARIANT, not advice, and is written that way on purpose. A connection with
303
+ * no resolved root is what the type allows, and no supported route reaches redemption in that
304
+ * state: both off-registry routes are refused earlier, which `smoke:attach-auth-root` measures
305
+ * rather than assumes. So that arm says what its own existence would mean instead of offering a
306
+ * remedy for a situation that cannot currently arise. */
307
+ /** The mesh contract that decides how attach redeems a session grant. The mode is the REGISTERED
308
+ * one (`MeshTarget.mode`), carried forward from the resolve. It is the only input to the decision:
309
+ * `spaceAuth` says whether a SEALED mesh's seed is present, and is never consulted to decide which
310
+ * kind of mesh this is. */
311
+ export type AttachSessionTarget = {
312
+ space: string;
313
+ server: string;
314
+ root?: string;
315
+ spaceAuth?: SpaceAuth;
316
+ mode?: "auth" | "open" | "user";
317
+ auth: {
318
+ bearer?: unknown;
319
+ };
320
+ };
321
+ /**
322
+ * HOW this mesh's session grant is redeemed, as a closed union with no optional credential.
323
+ *
324
+ * `bare` and `session-caller` are structurally distinct rather than "session-caller, but the creds
325
+ * may be missing". That distinction is the whole fix for #1205. An optional `creds?: string` on the
326
+ * redeem path invites exactly one question at every call site — "is the seed there?" — and answering
327
+ * it with `!creds` is the defect: an OPEN mesh has no seed BY DESIGN, so absence means "bare",
328
+ * while on a SEALED mesh the same absence means "refuse". One field cannot carry both meanings, so
329
+ * the mode is named and the compiler makes every consumer read the name.
330
+ */
331
+ export type RedeemLink = {
332
+ mode: "bare";
333
+ tls: boolean;
334
+ } | {
335
+ mode: "session-caller";
336
+ tls: boolean;
337
+ creds: string;
338
+ };
339
+ /** The ONE place a {@link RedeemLink} becomes NATS connect options. Both connections on the redeem
340
+ * path (the session link and the abandoned-session hand-back) go through here, so neither can
341
+ * invent a credential for an open mesh or drop one on a sealed mesh, and a third caller gets the
342
+ * same two arms for free. */
343
+ export declare function redeemConnectOpts(link: RedeemLink): ReturnType<typeof standaloneConnectOpts>;
344
+ /**
345
+ * Which redeem contract this target gets: a bare open-mesh connection, a seed-backed mint, or a
346
+ * loud refusal. Graded by `smoke:attach-open-mode`, whose mutations flip each arm in turn.
347
+ *
348
+ * EXHAUSTIVE over the three recorded modes on purpose, with `user` named rather than reached by
349
+ * fallthrough. A `user` entry holds no local seed by design and its two-step redemption is not
350
+ * wired, so it must refuse even on the day a user-mode root happens to carry static material on
351
+ * disk; letting it fall through to the seed test would silently mint on the wrong identity plane.
352
+ * An UNRECORDED mode (a raw off-registry connection) is the conservative arm: it is not known to be
353
+ * open, so it takes the sealed test and refuses without a seed.
354
+ */
355
+ export declare function attachSessionMaterial(t: AttachSessionTarget): {
356
+ kind: "bare";
357
+ } | {
358
+ kind: "mint";
359
+ auth: SpaceAuth;
360
+ } | {
361
+ kind: "fatal";
362
+ message: string;
363
+ };
203
364
  /** How the attach finished, decided inside the loop and acted on outside it — so the terminal is
204
365
  * always given back before anything prints or exits. */
205
366
  type AttachVerdict = {
@@ -1 +1 @@
1
- {"version":3,"file":"agents.d.ts","sourceRoot":"","sources":["../../src/commands/agents.ts"],"names":[],"mappings":"AAAA,OAAO,EAA6E,KAAK,gBAAgB,EAAkC,KAAK,UAAU,EAAqB,MAAM,gBAAgB,CAAC;AA4BtM,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;EAAgH,CAAC;AACvI,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAsF,CAAC;AAK3G,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAsI,CAAC;AAC/J;;;;;sDAKsD;AACtD,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAMiB,CAAC;AAEzC,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,gBAAgB,CAQrE;AAED,wBAAsB,IAAI,CAAC,IAAI,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,CAwB1D;AAED,KAAK,QAAQ,GAAG;IACd,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;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AE,OAAO,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAiBrC;AA2UD;yDACyD;AACzD,KAAK,aAAa,GAAG;IAAE,IAAI,EAAE,OAAO,CAAA;CAAE,GAAG;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,GAAG;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC;AAEhG,wBAAsB,MAAM,CAAC,IAAI,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,CA+B5D;AAED;;;;;;;;;;GAUG;AACH,wBAAsB,KAAK,CAAC,IAAI,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,CAqB3D"}
@@ -116,14 +116,33 @@ async function locateSeat(v, name) {
116
116
  const scatter = await scatterManager(probe.space, probe.server, "ps", probe.auth, probe.spaceAuth);
117
117
  if (!scatter.ok)
118
118
  return { kind: "unpinned" }; // cannot locate ⇒ behave exactly as before, never worse
119
- const reachable = scatter.instances.filter((i) => i.reachable);
120
- const unreachable = scatter.instances.filter((i) => !i.reachable).map((i) => i.instanceId);
121
- if (reachable.length <= 1 && !unreachable.length)
119
+ return locateSeatIn(scatter.instances, name);
120
+ }
121
+ /**
122
+ * WHAT THE SCATTER ESTABLISHED about one seat name — the whole decision, as a function of the rows
123
+ * alone, so it is gradable without a broker.
124
+ *
125
+ * ANSWERED FOR ITSELF means an instance returned its own roster. A slot that never answered and one
126
+ * that answered with a REFUSAL are the same fact for this search: neither stated which seats it
127
+ * hosts, so neither licenses a conclusion about a seat that might be sitting on it (#1638 item 3).
128
+ * The refusal half is the reachable-but-errored row `scatterManager` reports, which the older
129
+ * filter counted as a manager that had looked and found nothing.
130
+ *
131
+ * Absence is a claim about the WHOLE space, so it is concluded only when the whole space answered.
132
+ */
133
+ export function locateSeatIn(instances, name) {
134
+ const reachable = instances.filter((i) => i.reachable);
135
+ const silent = instances.filter((i) => !i.reachable).map((i) => i.instanceId);
136
+ if (reachable.length <= 1 && !silent.length)
122
137
  return { kind: "unpinned" };
123
- const host = reachable.find((i) => (i.data ?? []).some((r) => r.name === name));
138
+ const answered = reachable.filter((i) => i.error === undefined);
139
+ const refused = reachable.filter((i) => i.error !== undefined).map((i) => ({ instanceId: i.instanceId, error: i.error }));
140
+ const host = answered.find((i) => (i.data ?? []).some((r) => r.name === name));
124
141
  if (host)
125
142
  return { kind: "pin", instanceId: host.instanceId };
126
- return { kind: "absent", checked: reachable.length, unreachable };
143
+ if (silent.length || refused.length)
144
+ return { kind: "unknown", answered: answered.length, silent, refused };
145
+ return { kind: "absent", checked: answered.length };
127
146
  }
128
147
  /** Resolve `--on` for a targeted verb: an explicit pin wins; otherwise locate the seat. Returns the
129
148
  * instance to address, or exits with an error that says WHICH case the miss was. */
@@ -136,17 +155,38 @@ async function pinForTarget(v, verb) {
136
155
  return loc.instanceId;
137
156
  if (loc.kind === "unpinned")
138
157
  return undefined;
139
- // The honest error #383 asked for: name the search, not just the absence. A registration that
140
- // gave no answer within the deadline is NOT told to "retry": a manager whose host died never
141
- // deregisters, so its row stays in the registry indefinitely and answers nothing, and a retry
142
- // against it loops forever. Say what is known (registered, silent), what it may mean (a live
143
- // slow host OR a dead registration), and the two real actions.
144
- const missed = loc.unreachable.length
145
- ? ` ${loc.unreachable.length} registered manager instance(s) gave no answer within the deadline (${loc.unreachable.join(", ")}). Either that host is alive but slow, or it died and its registration was never removed; if it is dead, deregister it. To address it directly: \`${verb} --on <instance>\` (the whole id, as printed).`
146
- : "";
147
- console.error(c.red(`✗ no managed agent "${v.name}" on any of the ${loc.checked} reachable manager instance(s) in this space.${missed}`));
158
+ console.error(c.red(`✗ ${seatMissRefusal(String(v.name), verb, loc)}`));
148
159
  process.exit(1);
149
160
  }
161
+ /**
162
+ * What a `stop`/`attach`/`input` that did not find its seat TELLS the operator — and the difference
163
+ * between the two things it can mean (#1638 item 3).
164
+ *
165
+ * ABSENT is a claim about the whole space and is only made when the whole space answered for
166
+ * itself. A registration that gave no answer within the deadline is NOT told to "retry": a manager
167
+ * whose host died never deregisters, so its row stays in the registry indefinitely and answers
168
+ * nothing, and a retry against it loops forever. Say what is known (registered, silent), what it
169
+ * may mean (a live slow host OR a dead registration), and the two real actions.
170
+ *
171
+ * UNKNOWN is the other case and it used to print as the first one. The seat may be sitting on the
172
+ * instance that did not answer, so "no managed agent <name>" was a definite negative drawn from an
173
+ * incomplete search — and it names the instance COUNT, which is the shape a reader believes.
174
+ * Measured on a live mesh: a seat that `ps` listed as running the whole time was reported absent,
175
+ * and the same command with `--on` succeeded first time. A retry loop that reads the old sentence
176
+ * as "already gone" stops looking for a seat that is still running.
177
+ */
178
+ export function seatMissRefusal(name, verb, loc) {
179
+ const address = `To address one directly: \`${verb} --on <instance>\` (the whole id, as printed).`;
180
+ if (loc.kind === "absent")
181
+ return `no managed agent "${name}" on any of the ${loc.checked} reachable manager instance(s) in this space.`;
182
+ const silent = loc.silent.length
183
+ ? ` ${loc.silent.length} registered manager instance(s) gave no answer within the deadline (${loc.silent.join(", ")}). Either that host is alive but slow, or it died and its registration was never removed; if it is dead, deregister it.`
184
+ : "";
185
+ const refused = loc.refused.length
186
+ ? ` ${loc.refused.length} refused the read rather than answering (${loc.refused.map((r) => `${r.instanceId}: ${r.error}`).join("; ")}).`
187
+ : "";
188
+ return `could not establish where "${name}" is: ${loc.answered} manager instance(s) answered and none hosts it, but ${loc.silent.length + loc.refused.length} did not answer for themselves, so this is NOT a report that it is gone — it may be running on one of those.${silent}${refused} ${address}`;
189
+ }
150
190
  /**
151
191
  * What one SILENT manager instance's row says. The wording lives here, in the CLI, and not in the
152
192
  * scatter that produced the fact: core reports a frozen slot that did not answer, and turning that
@@ -186,13 +226,17 @@ function silentManagerRow(liveness, instanceId) {
186
226
  * entry as "starting…", both false. `mesh: absent` means exactly "not in the presence roster",
187
227
  * so it prints as that; the process age next to it tells the reader whether it is a fresh start
188
228
  * or a seat that never joined. */
189
- function printAgentRow(r, indent = "") {
190
- const proc = r.status === "running"
191
- ? c.green("running") + c.dim(" " + fmtUptime(r.uptimeMs))
192
- : r.status === "exited"
193
- ? c.red("exited") + c.dim(" after " + fmtUptime(r.uptimeMs))
194
- : c.yellow(r.status) + c.dim(" " + fmtUptime(r.uptimeMs));
195
- const mesh = r.mesh === "absent"
229
+ /** The mesh column of one `ps` row. A verdict needs a fresh observer: when the manager reports its
230
+ * own presence view as `stale` (its watch went silent past TTL) or `unpopulated` (its watch has not
231
+ * replayed the bucket yet), `offline` and `absent` describe the manager's watch, not the seat. Print
232
+ * "mesh unknown" with the reason instead of a liveness word an operator, or a watchdog, would act
233
+ * on. A row from a manager that predates `meshView` carries no field and renders as before. */
234
+ export function meshColumn(r) {
235
+ if (r.meshView === "stale")
236
+ return c.yellow("mesh unknown") + c.dim(" (manager's presence view is stale)");
237
+ if (r.meshView === "unpopulated")
238
+ return c.yellow("mesh unknown") + c.dim(" (manager's presence view not yet populated)");
239
+ return r.mesh === "absent"
196
240
  ? c.yellow("not in roster")
197
241
  : r.mesh === "offline"
198
242
  ? c.dim("mesh offline")
@@ -201,6 +245,14 @@ function printAgentRow(r, indent = "") {
201
245
  : r.mesh === "waiting"
202
246
  ? c.yellow("waiting")
203
247
  : c.cyan(r.mesh);
248
+ }
249
+ function printAgentRow(r, indent = "") {
250
+ const proc = r.status === "running"
251
+ ? c.green("running") + c.dim(" " + fmtUptime(r.uptimeMs))
252
+ : r.status === "exited"
253
+ ? c.red("exited") + c.dim(" after " + fmtUptime(r.uptimeMs))
254
+ : c.yellow(r.status) + c.dim(" " + fmtUptime(r.uptimeMs));
255
+ const mesh = meshColumn(r);
204
256
  // Confirmed failure is red; ambiguity/warning states (unknown/stale) are yellow — the operator
205
257
  // triages "definitely broken" before "might be".
206
258
  const authColor = r.authHealth === "auth-renewal-failed" ? c.red : c.yellow;
@@ -437,11 +489,12 @@ export function reconnectNotice(est, alreadySaid) {
437
489
  /**
438
490
  * The line an exit owes an operator about sessions this attach could not hand back, or nothing.
439
491
  *
440
- * Suppressed on `gone`, and that is not tidiness. That verdict exists because the manager answered
441
- * `not-found`, which it only answers once the seat has been freed, and freeing a seat ends every
442
- * session bound to it (`freeSlot` into `endForTarget`, on despawn, self-stop, reap and natural exit
443
- * alike). The sessions this would name have already been collected, so naming them would be
444
- * inventing work for someone who is about to close their terminal.
492
+ * Suppressed on `gone`, and that is not tidiness. That verdict exists only when the manager proves
493
+ * the live seat is absent: either `not-found`, or the namespaced durable static-slot observation
494
+ * after its process is gone. Freeing a seat ends every session bound to it (`freeSlot` into
495
+ * `endForTarget`, on despawn, self-stop, reap and natural exit alike). The sessions this would name
496
+ * have already been collected, so naming them would be inventing work for someone who is about to
497
+ * close their terminal.
445
498
  */
446
499
  export function heldSessionNotice(pending, verdict) {
447
500
  if (pending < 1 || verdict === "gone")
@@ -481,9 +534,10 @@ async function establishAttachSession(v, on, reconnect, first) {
481
534
  if (!reply.ok)
482
535
  return { ok: false, kind: attachRefusal(reply.code, reply.details), message: reply.error ?? "error", fromManager: true };
483
536
  // P2 item 6: the reply is the holder-bound §13.6 session GRANT (no ws:// URL). Redeem it over the
484
- // mesh mint a per-session, rails-only caller cred from the local space seed, connect, and drive
485
- // the terminal through the session rail. USER mesh (bearer, no local seed): refuse LOUD the
486
- // 2-step user-mode redemption callout is the #29 follow-up, deliberately not wired here.
537
+ // mesh. A static-auth mesh mints a per-session, rails-only caller cred from the resolved root's
538
+ // seed. A registered open mesh has no seed: the same bare connection `askManagerEp` already used
539
+ // for the control round trip opens the caller rail. USER mesh (bearer, no local seed): refuse LOUD
540
+ // — the 2-step user-mode redemption callout is the #29 follow-up, deliberately not wired here.
487
541
  const { grant } = reply.data;
488
542
  // The trust material the TARGET resolved, not a second answer walked up from the cwd. This used
489
543
  // to be `loadSpaceAuth(authDir(findCotalRoot()), t.space)`, which is the defect behind issue #722:
@@ -505,17 +559,27 @@ async function establishAttachSession(v, on, reconnect, first) {
505
559
  if (shadow)
506
560
  console.error(`! this directory resolves to ${shadow.cwdRoot}, whose .cotal/auth holds a DIFFERENT trust chain for space "${t.space}".\n` +
507
561
  ` attach used ${t.root}, the root this mesh resolved to. The other one is not being used, and is worth a look.`);
508
- const auth = t.spaceAuth;
509
- if (!auth)
510
- return {
511
- ok: false, kind: "fatal",
512
- message: attachNoSeedMessage(t),
513
- };
562
+ const tls = t.auth.tls === true;
514
563
  const id = newIdentity();
515
- const creds = await mintCreds(auth, id, "session-caller", {
516
- sessionCaller: { endpoint: grant.endpoint, sessionId: grant.sessionId, epoch: grant.serving.epoch },
517
- expiresAt: Math.floor(grant.exp / 1000), // grant.exp is ms (now+ttlMs); the JWT exp is seconds
518
- });
564
+ // WHICH CONTRACT redeems this grant is decided ONCE, by the recorded mesh mode, and the answer is
565
+ // a value this function then carries. It is never re-derived from the absence of a seed: that
566
+ // inference is issue #1205 itself, where an open mesh (which holds no seed BY DESIGN) was read as
567
+ // a static mesh whose seed had gone missing, and every open attach was refused.
568
+ const material = attachSessionMaterial(t);
569
+ if (material.kind === "fatal")
570
+ return { ok: false, kind: "fatal", message: material.message };
571
+ const link = material.kind === "bare"
572
+ // An open mesh has no credential system: the same bare connection the control round trip
573
+ // already used opens the caller rail. Nothing is minted and nothing is invented.
574
+ ? { mode: "bare", tls }
575
+ : {
576
+ mode: "session-caller",
577
+ tls,
578
+ creds: await mintCreds(material.auth, id, "session-caller", {
579
+ sessionCaller: { endpoint: grant.endpoint, sessionId: grant.sessionId, epoch: grant.serving.epoch },
580
+ expiresAt: Math.floor(grant.exp / 1000), // grant.exp is ms (now+ttlMs); the JWT exp is seconds
581
+ }),
582
+ };
519
583
  // maxReconnectAttempts is the whole difference between the two modes, and it is deliberate.
520
584
  // ONE-SHOT keeps the old -1: the NATS layer redials forever under a single session.
521
585
  // RECONNECTING uses 0, because that redial is what breaks the attach rather than saving it — the
@@ -526,7 +590,7 @@ async function establishAttachSession(v, on, reconnect, first) {
526
590
  // real repaint, instead of a restored socket over a session that ended without us.
527
591
  const nc = await dialerFor(t.server)({
528
592
  servers: t.server,
529
- ...standaloneConnectOpts({ creds, tls: false }),
593
+ ...redeemConnectOpts(link),
530
594
  inboxPrefix: `_INBOX_${id.id}`,
531
595
  maxReconnectAttempts: reconnect ? 0 : -1,
532
596
  // Detection latency is part of the defect, not a detail of it. A laptop waking from sleep does
@@ -540,21 +604,46 @@ async function establishAttachSession(v, on, reconnect, first) {
540
604
  // half-opens a link is what would grade this line, and it does not exist here yet.
541
605
  ...(reconnect ? { pingInterval: 10_000 } : {}),
542
606
  });
543
- return { ok: true, nc, grant, creds, inbox: id.id, server: t.server };
607
+ return { ok: true, nc, grant, link, inbox: id.id, server: t.server };
544
608
  }
545
- /** Why attach cannot redeem a session grant, said in terms of what the command actually resolved.
546
- *
547
- * Three distinct states, kept distinct because the remedy differs and a single sentence covering
548
- * all three is the defect issue #722 opened on (its old text named an internal work item and no
549
- * root at all). A USER-AUTH mesh holds no local seed by design. A REGISTERED static mesh has a
550
- * root and it is named, so an operator can see which directory the command used rather than
551
- * guessing at their cwd.
609
+ /** The ONE place a {@link RedeemLink} becomes NATS connect options. Both connections on the redeem
610
+ * path (the session link and the abandoned-session hand-back) go through here, so neither can
611
+ * invent a credential for an open mesh or drop one on a sealed mesh, and a third caller gets the
612
+ * same two arms for free. */
613
+ export function redeemConnectOpts(link) {
614
+ return link.mode === "bare"
615
+ ? standaloneConnectOpts({ tls: link.tls })
616
+ : standaloneConnectOpts({ creds: link.creds, tls: link.tls });
617
+ }
618
+ /**
619
+ * Which redeem contract this target gets: a bare open-mesh connection, a seed-backed mint, or a
620
+ * loud refusal. Graded by `smoke:attach-open-mode`, whose mutations flip each arm in turn.
552
621
  *
553
- * The third arm is an INVARIANT, not advice, and is written that way on purpose. A connection with
554
- * no resolved root is what the type allows, and no supported route reaches redemption in that
555
- * state: both off-registry routes are refused earlier, which `smoke:attach-auth-root` measures
556
- * rather than assumes. So that arm says what its own existence would mean instead of offering a
557
- * remedy for a situation that cannot currently arise. */
622
+ * EXHAUSTIVE over the three recorded modes on purpose, with `user` named rather than reached by
623
+ * fallthrough. A `user` entry holds no local seed by design and its two-step redemption is not
624
+ * wired, so it must refuse even on the day a user-mode root happens to carry static material on
625
+ * disk; letting it fall through to the seed test would silently mint on the wrong identity plane.
626
+ * An UNRECORDED mode (a raw off-registry connection) is the conservative arm: it is not known to be
627
+ * open, so it takes the sealed test and refuses without a seed.
628
+ */
629
+ export function attachSessionMaterial(t) {
630
+ switch (t.mode) {
631
+ // An OPEN mesh: no credential system at all, so there is no seed to be missing and nothing to
632
+ // mint. This is the arm issue #1205 did not have.
633
+ case "open":
634
+ return { kind: "bare" };
635
+ // A USER mesh: refused by name, and refused EVEN IF a seed is present, because the bearer plane
636
+ // is the control surface there and static material would be the wrong identity.
637
+ case "user":
638
+ return { kind: "fatal", message: attachNoSeedMessage(t) };
639
+ // SEALED (`auth`) and unrecorded: the seed is required, and its absence is a refusal. A sealed
640
+ // mesh must never be rescued by the open arm — that is the failure a fix for #1205 is most
641
+ // likely to introduce, and `smoke:attach-open-mode` asserts the refusal by name against a live
642
+ // sealed broker.
643
+ default:
644
+ return t.spaceAuth ? { kind: "mint", auth: t.spaceAuth } : { kind: "fatal", message: attachNoSeedMessage(t) };
645
+ }
646
+ }
558
647
  function attachNoSeedMessage(t) {
559
648
  const shadow = t.root === undefined ? undefined : divergentCwdAnchor(t.root, t.space);
560
649
  const shadowLine = shadow
@@ -565,7 +654,7 @@ function attachNoSeedMessage(t) {
565
654
  return `${head}\n broker ${t.server}\n This is a USER-AUTH mesh, which holds no local seed by design; two-step user-mode redemption is not wired yet, so attach is unavailable on it from every directory, not just this one.${shadowLine}`;
566
655
  if (t.root === undefined)
567
656
  return `${head}\n broker ${t.server}\n This connection resolved NO checkout root, and no supported route reaches redemption in that state: an off-registry \`--server\` on an unregistered space is refused for missing credentials, and \`--creds\` is refused at the control surface, both before a session grant is asked for. Reaching this sentence means a route now exists that skips both refusals.${shadowLine}`;
568
- return `${head}\n broker ${t.server}\n resolved root ${t.root}\n A static-auth mesh keeps this space's seed under <root>/.cotal/auth. That root is what this command resolved and connected with, so if it is not the checkout holding this space's auth, re-register the mesh with \`cotal meshes add ${t.space} --server ${t.server} --root <dir>\`.${shadowLine}`;
657
+ return `${head}\n broker ${t.server}\n resolved root ${t.root}\n This is a static-auth mesh. Attach still needs this space's seed under ${t.root}/.cotal/auth. Restore the seed at that checkout. This mesh is not open, so attach will not connect without the seed.${shadowLine}`;
569
658
  }
570
659
  /**
571
660
  * Tell the manager a session is over, so it gets its slot back.
@@ -577,15 +666,16 @@ function attachNoSeedMessage(t) {
577
666
  * to 2 — one slot per outage, held until the seat or the manager ends it, against a ceiling of 64.
578
667
  *
579
668
  * The mechanism is the advisory close frame the rail already defines; the manager's bridge ends on
580
- * it. It has to be published with THIS session's caller credential, the only one scoped to this
581
- * session's subjects, so a re-establishment cannot send it on the abandoned session's behalf — a
582
- * fresh session's credential covers a fresh session's subjects. Hence a short-lived connection
583
- * minted from the credential the abandoned session already had.
669
+ * it. On a static-auth mesh it has to be published with THIS session's caller credential, the only
670
+ * one scoped to this session's subjects, so a re-establishment cannot send it on the abandoned
671
+ * session's behalf. On a registered open mesh there is no session-caller seed: the same bare
672
+ * connection the session used hands the slot back. Hence a short-lived connection minted from the
673
+ * abandoned session's own material, never an invented seed.
584
674
  */
585
675
  async function releaseAbandonedSession(s) {
586
676
  const nc = await dialerFor(s.server)({
587
677
  servers: s.server,
588
- ...standaloneConnectOpts({ creds: s.creds, tls: false }),
678
+ ...redeemConnectOpts(s.link),
589
679
  inboxPrefix: `_INBOX_${s.inbox}`,
590
680
  maxReconnectAttempts: 0,
591
681
  timeout: LINK_DEADLINE_MS,
@@ -786,7 +876,7 @@ async function runAttachLoop(vv, pin, reconnect, key, hold) {
786
876
  releaseStdin();
787
877
  const late = await attempting.catch(() => undefined);
788
878
  if (late?.ok) {
789
- abandoned.push({ grant: late.grant, creds: late.creds, inbox: late.inbox, server: late.server });
879
+ abandoned.push({ grant: late.grant, link: late.link, inbox: late.inbox, server: late.server });
790
880
  // And CLOSE the link that session came up on. Nothing here will ever read it, and an open
791
881
  // NATS connection is a ref'd handle: measured, the attach printed `detached from` and then
792
882
  // sat there forever, because the hand-back mints its own short-lived connection from the
@@ -864,7 +954,7 @@ async function runAttachLoop(vv, pin, reconnect, key, hold) {
864
954
  handedBack = await flushed(est.nc);
865
955
  }
866
956
  if (!handedBack && reconnect) {
867
- abandoned.push({ grant: est.grant, creds: est.creds, inbox: est.inbox, server: est.server });
957
+ abandoned.push({ grant: est.grant, link: est.link, inbox: est.inbox, server: est.server });
868
958
  }
869
959
  await closeLink(est.nc);
870
960
  }