@cotal-ai/workspace 0.22.0 → 0.24.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/connect.d.ts CHANGED
@@ -119,16 +119,38 @@ export declare function userViewAuthOrExit(conn: Connection, view: string): Prom
119
119
  * meshes, but not for a user-auth mesh this machine KNOWS about. Otherwise an old static
120
120
  * `local.<nkey>` creds file can bypass the user-mode branch and publish/join through raw `--creds`.
121
121
  * Registry match covers cross-directory use; the on-disk marker covers a lost/stale registry. */
122
+ export declare function refuseStaticCredsForKnownUserAuth(space: string, server: string | undefined, what: string): void;
123
+ /** {@link refuseStaticCredsForKnownUserAuth} with the exiting disposition, for the callers that are
124
+ * one command deep and want the refusal to end it. */
122
125
  export declare function refuseStaticCredsForKnownUserAuthOrExit(space: string, server: string | undefined, what: string): void;
123
126
  /**
124
- * Resolve where a mesh-touching command connects + with what creds.
127
+ * A refusal from the connect path, carrying the exact sentence the operator would have been shown.
128
+ *
129
+ * Every step below has one answer for "this cannot be connected", and until now that answer was
130
+ * always `print it and end the process`. That is right for a person who just typed a command and
131
+ * wrong for anything that has to KEEP GOING: `cotal attach` re-establishing a session after the
132
+ * link died has to treat an unreachable broker as the transient it is, and it cannot do that
133
+ * through a function that exits. So the decision (what happened, and what to say about it) is
134
+ * separated from the disposition (print and exit, or throw), and `connectOrExit` is now a thin
135
+ * wrapper that supplies the exiting disposition. The two forms cannot drift in what they say
136
+ * because there is only one place the sentence is written.
137
+ */
138
+ export declare class ConnectRefusal extends Error {
139
+ readonly rendered: string;
140
+ readonly hint?: string | undefined;
141
+ constructor(rendered: string, hint?: string | undefined);
142
+ }
143
+ /**
144
+ * Resolve where a mesh-touching command connects + with what creds, THROWING {@link ConnectRefusal}
145
+ * on every refusal instead of ending the process. {@link connectOrExit} is this plus the printing
146
+ * and the exit; a caller that must survive a refusal (a reconnect loop) calls this one.
125
147
  * • Explicit `--creds` → a RAW off-registry connection, except when the target is a known
126
148
  * per-user-auth mesh. Those refuse static creds fail-closed because old local creds remain
127
149
  * broker-valid but are the wrong identity plane after the flip.
128
150
  * • Otherwise → resolve the running mesh from the registry (works from any dir), mint `role` creds
129
151
  * on an auth mesh, and preflight with the registry's stale-prune.
130
152
  */
131
- export declare function connectOrExit(flags: ConnectFlags, role: Profile, opts?: {
153
+ export declare function connectOrThrow(flags: ConnectFlags, role: Profile, opts?: {
132
154
  instanceId?: string | string[];
133
155
  }): Promise<Connection>;
134
156
  /**
@@ -144,6 +166,8 @@ export declare function connectUserControlOrExit(flags: ConnectFlags): Promise<C
144
166
  /** Reachability check for a RAW (off-registry) connection — one plain sentence, never a registry/
145
167
  * stale-entry message and never a prune. Used by the `--creds` escape hatch and `join`'s explicit
146
168
  * (link/token/creds) path, both of which connect to a broker the user named, not the registry. */
169
+ export declare function reachableOrThrow(server: string, auth?: RawAuth): Promise<void>;
170
+ /** {@link reachableOrThrow} with the exiting disposition. */
147
171
  export declare function reachableOrExit(server: string, auth?: RawAuth): Promise<void>;
148
172
  /** Resolve the mesh a command targets, exiting with one human sentence on an unresolved/ambiguous
149
173
  * registry rather than a stack trace. Prunes dead registry entries first so a crashed mesh doesn't
@@ -151,7 +175,7 @@ export declare function reachableOrExit(server: string, auth?: RawAuth): Promise
151
175
  * explicit `--space`. A named `--space` is resolved + preflighted directly, so pre-pruning can't
152
176
  * erase a dead-recorded mesh the operator is recovering with a live `--server` override; preflight
153
177
  * still prunes it (with the friendly message) when no override revives it. */
154
- export declare function resolveTargetOrExit(flags: {
178
+ export declare function resolveTargetOrThrow(flags: {
155
179
  server?: string;
156
180
  space?: string;
157
181
  }): Promise<MeshTarget>;
@@ -161,5 +185,19 @@ export declare function resolveTargetOrExit(flags: {
161
185
  * acts on the prune decision, colours, and exits. Probes with `probeCreds` when given (the
162
186
  * caller's `--creds`/minted creds); otherwise a throwaway identity is minted from the target's
163
187
  * own trust material. */
188
+ export declare function preflightOrThrow(target: MeshTarget, probeCreds?: string): Promise<void>;
189
+ /** {@link preflightOrThrow} with the exiting disposition. */
164
190
  export declare function preflightOrExit(target: MeshTarget, probeCreds?: string): Promise<void>;
191
+ /**
192
+ * {@link connectOrThrow} with the exiting disposition: the form nearly every command wants, where a
193
+ * refusal is the end of the command and the operator gets one sentence rather than a stack trace.
194
+ */
195
+ export declare function connectOrExit(flags: ConnectFlags, role: Profile, opts?: {
196
+ instanceId?: string | string[];
197
+ }): Promise<Connection>;
198
+ /** {@link resolveTargetOrThrow} with the exiting disposition. */
199
+ export declare function resolveTargetOrExit(flags: {
200
+ server?: string;
201
+ space?: string;
202
+ }): Promise<MeshTarget>;
165
203
  //# sourceMappingURL=connect.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"connect.d.ts","sourceRoot":"","sources":["../src/connect.ts"],"names":[],"mappings":"AACA,OAAO,EAYL,KAAK,QAAQ,EACb,KAAK,OAAO,EACZ,KAAK,SAAS,EACf,MAAM,gBAAgB,CAAC;AAIxB,OAAO,EAAmC,KAAK,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACxF,OAAO,EAA6C,KAAK,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAI9F;;;;;;;;;;GAUG;AAEH,MAAM,WAAW,YAAY;IAC3B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,gGAAgG;IAChG,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;wDACwD;AACxD,MAAM,WAAW,OAAO;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,GAAG,CAAC,EAAE,OAAO,CAAC;CACf;AAED,MAAM,WAAW,UAAU;IACzB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd;;;;;;;;;;gEAU4D;IAC5D,GAAG,EAAE,OAAO,CA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,CAmBvF;AAsDD;;mGAEmG;AACnG,wBAAsB,gBAAgB,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,GAAE,OAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CAOxF;AAED,6DAA6D;AAC7D,wBAAsB,eAAe,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,GAAE,OAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CAMvF;AAED;;;;;+EAK+E;AAC/E,wBAAsB,oBAAoB,CAAC,KAAK,EAAE;IAChD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,GAAG,OAAO,CAAC,UAAU,CAAC,CAgBtB;AAED;;;;;0BAK0B;AAC1B,wBAAsB,gBAAgB,CAAC,MAAM,EAAE,UAAU,EAAE,UAAU,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAiB7F;AAED,6DAA6D;AAC7D,wBAAsB,eAAe,CAAC,MAAM,EAAE,UAAU,EAAE,UAAU,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAM5F;AAED;;;GAGG;AACH,wBAAsB,aAAa,CAAC,KAAK,EAAE,YAAY,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,GAAE;IAAE,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAA;CAAO,GAAG,OAAO,CAAC,UAAU,CAAC,CAM1I;AAED,iEAAiE;AACjE,wBAAsB,mBAAmB,CAAC,KAAK,EAAE;IAAE,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,CAAC,UAAU,CAAC,CAMzG"}
package/dist/connect.js CHANGED
@@ -89,25 +89,67 @@ function principalFromBearer(bearer) {
89
89
  * meshes, but not for a user-auth mesh this machine KNOWS about. Otherwise an old static
90
90
  * `local.<nkey>` creds file can bypass the user-mode branch and publish/join through raw `--creds`.
91
91
  * Registry match covers cross-directory use; the on-disk marker covers a lost/stale registry. */
92
- export function refuseStaticCredsForKnownUserAuthOrExit(space, server, what) {
92
+ export function refuseStaticCredsForKnownUserAuth(space, server, what) {
93
93
  const recorded = findMesh(space);
94
94
  const knownRecordedUser = recorded?.mode === "user" && (server === undefined || recorded.server === server);
95
95
  const knownLocalUser = hasUserAuthState(findCotalRoot(), space);
96
96
  if (!knownRecordedUser && !knownLocalUser)
97
97
  return;
98
- console.error(c.red(`✗ ${what} tried to authenticate with a static creds file, but space "${space}" is a per-user-auth mesh - old --creds files are refused here so they can't bypass user accounts.`));
99
- console.error(c.dim(` Sign in with \`cotal login\` and use the user-mode path instead (for agents: \`cotal spawn\`).`));
98
+ throw new ConnectRefusal(`✗ ${what} tried to authenticate with a static creds file, but space "${space}" is a per-user-auth mesh - old --creds files are refused here so they can't bypass user accounts.`, ` Sign in with \`cotal login\` and use the user-mode path instead (for agents: \`cotal spawn\`).`);
99
+ }
100
+ /** {@link refuseStaticCredsForKnownUserAuth} with the exiting disposition, for the callers that are
101
+ * one command deep and want the refusal to end it. */
102
+ export function refuseStaticCredsForKnownUserAuthOrExit(space, server, what) {
103
+ try {
104
+ refuseStaticCredsForKnownUserAuth(space, server, what);
105
+ }
106
+ catch (e) {
107
+ exitOnRefusal(e);
108
+ }
109
+ }
110
+ /**
111
+ * A refusal from the connect path, carrying the exact sentence the operator would have been shown.
112
+ *
113
+ * Every step below has one answer for "this cannot be connected", and until now that answer was
114
+ * always `print it and end the process`. That is right for a person who just typed a command and
115
+ * wrong for anything that has to KEEP GOING: `cotal attach` re-establishing a session after the
116
+ * link died has to treat an unreachable broker as the transient it is, and it cannot do that
117
+ * through a function that exits. So the decision (what happened, and what to say about it) is
118
+ * separated from the disposition (print and exit, or throw), and `connectOrExit` is now a thin
119
+ * wrapper that supplies the exiting disposition. The two forms cannot drift in what they say
120
+ * because there is only one place the sentence is written.
121
+ */
122
+ export class ConnectRefusal extends Error {
123
+ rendered;
124
+ hint;
125
+ constructor(rendered, hint) {
126
+ super(rendered);
127
+ this.rendered = rendered;
128
+ this.hint = hint;
129
+ this.name = "ConnectRefusal";
130
+ }
131
+ }
132
+ /** The exiting disposition, in ONE place: print what the refusal already decided to say, and end
133
+ * the command. Anything that is not a {@link ConnectRefusal} is a real fault and rethrows. */
134
+ function exitOnRefusal(e) {
135
+ if (!(e instanceof ConnectRefusal))
136
+ throw e;
137
+ console.error(c.red(e.rendered));
138
+ if (e.hint)
139
+ console.error(c.dim(e.hint));
100
140
  process.exit(1);
101
141
  }
102
142
  /**
103
- * Resolve where a mesh-touching command connects + with what creds.
143
+ * Resolve where a mesh-touching command connects + with what creds, THROWING {@link ConnectRefusal}
144
+ * on every refusal instead of ending the process. {@link connectOrExit} is this plus the printing
145
+ * and the exit; a caller that must survive a refusal (a reconnect loop) calls this one.
104
146
  * • Explicit `--creds` → a RAW off-registry connection, except when the target is a known
105
147
  * per-user-auth mesh. Those refuse static creds fail-closed because old local creds remain
106
148
  * broker-valid but are the wrong identity plane after the flip.
107
149
  * • Otherwise → resolve the running mesh from the registry (works from any dir), mint `role` creds
108
150
  * on an auth mesh, and preflight with the registry's stale-prune.
109
151
  */
110
- export async function connectOrExit(flags, role, opts = {}) {
152
+ export async function connectOrThrow(flags, role, opts = {}) {
111
153
  if (flags.creds) {
112
154
  const space = flags.space ?? DEFAULT_SPACE;
113
155
  // Run the flip guard with the RAW `--server` (may be undefined). The guard treats "no --server"
@@ -115,17 +157,15 @@ export async function connectOrExit(flags, role, opts = {}) {
115
157
  // recognized when the caller omits --server. Defaulting the server BEFORE the guard would make
116
158
  // its `recorded.server === server` match miss every non-4222 user mesh, letting a static --creds
117
159
  // slip past the flip.
118
- refuseStaticCredsForKnownUserAuthOrExit(space, flags.server, "--creds");
160
+ refuseStaticCredsForKnownUserAuth(space, flags.server, "--creds");
119
161
  const server = flags.server ?? DEFAULT_SERVER;
120
- if (!existsSync(flags.creds)) {
121
- console.error(c.red(`✗ creds file not found: ${flags.creds}`));
122
- process.exit(1);
123
- }
162
+ if (!existsSync(flags.creds))
163
+ throw new ConnectRefusal(`✗ creds file not found: ${flags.creds}`);
124
164
  const creds = readFileSync(flags.creds, "utf8");
125
165
  // An explicit `--creds` file is an off-registry connect: no mesh record, so no recorded TLS
126
166
  // intent to inherit. It stays non-strict, and that is a real (documented) gap rather than a
127
167
  // safe default - a `--creds` connect to a TLS broker still upgrades, but is downgradeable.
128
- await reachableOrExit(server, { creds });
168
+ await reachableOrThrow(server, { creds });
129
169
  return { server, space, tls: false, creds };
130
170
  }
131
171
  // A raw OPEN remote mesh: explicit `--server` + a `--space` that isn't locally registered. Naming
@@ -137,16 +177,14 @@ export async function connectOrExit(flags, role, opts = {}) {
137
177
  // for that very space even when the registry lost (or never had) the entry — treating it as an
138
178
  // open broker would credless-connect into a callout denial whose copy sends the operator
139
179
  // port-hunting. Name the real state and the recovery instead.
140
- if (hasUserAuthState(findCotalRoot(), flags.space)) {
141
- console.error(c.red(`✗ space "${flags.space}" has user auth enabled on disk but no usable registry entry - re-record it with \`cotal up\` from its project folder, then sign in (\`cotal login\`)`));
142
- process.exit(1);
143
- }
180
+ if (hasUserAuthState(findCotalRoot(), flags.space))
181
+ throw new ConnectRefusal(`✗ space "${flags.space}" has user auth enabled on disk but no usable registry entry - re-record it with \`cotal up\` from its project folder, then sign in (\`cotal login\`)`);
144
182
  // A raw OPEN remote broker named entirely on the command line: nothing recorded it, so there
145
183
  // is no intent to honour. Non-strict, same documented gap as `--creds`.
146
- await reachableOrExit(flags.server, {});
184
+ await reachableOrThrow(flags.server, {});
147
185
  return { server: flags.server, space: flags.space, tls: false };
148
186
  }
149
- const target = await resolveTargetOrExit({ server: flags.server, space: flags.space });
187
+ const target = await resolveTargetOrThrow({ server: flags.server, space: flags.space });
150
188
  // USER MODE is a HARD branch: it never mints from on-disk trust material (static creds DO work
151
189
  // on a user-auth broker — minting here would silently connect the operator on the wrong identity
152
190
  // plane) and never connects credlessly. Everything it needs comes from the login cache + the
@@ -163,10 +201,12 @@ export async function connectOrExit(flags, role, opts = {}) {
163
201
  // still lands: `userConnectOrExit` sets `epCaller` from the bearer's principal, so ep request
164
202
  // subjects can be built. "Never consults role" means never mints by role — not "no triple".
165
203
  if (target.mode === "user") {
166
- if (role === "control-caller-privileged" || role === "control-caller-admin") {
167
- console.error(c.red(`✗ cannot mint the "${role}" instrument on a user-mode mesh - the logged-in user bearer is the control surface (ledger scope is the grant). Operator instruments are static-mesh only.`));
168
- process.exit(1);
169
- }
204
+ if (role === "control-caller-privileged" || role === "control-caller-admin")
205
+ throw new ConnectRefusal(`✗ cannot mint the "${role}" instrument on a user-mode mesh - the logged-in user bearer is the control surface (ledger scope is the grant). Operator instruments are static-mesh only.`);
206
+ // NAMED, not overlooked: the user-mode connect still ends the process on its own refusals. No
207
+ // reconnect loop reaches it (`cotal attach` refuses a user-mode mesh before it ever loops, and
208
+ // a static mesh does not become a user mesh mid-session), and dragging that path into this
209
+ // refactor would widen the diff well past the one behaviour it exists to fix.
170
210
  return userConnectOrExit(target);
171
211
  }
172
212
  // An operator INSTRUMENT mint pins a fresh lifecycle uid: its ep-rail caller rows are
@@ -198,7 +238,7 @@ export async function connectOrExit(flags, role, opts = {}) {
198
238
  creds = await mintCreds(target.auth, identity, role);
199
239
  }
200
240
  }
201
- await preflightOrExit(target, creds);
241
+ await preflightOrThrow(target, creds);
202
242
  // THE REGISTRY-RESOLVED PATH, and the one that must inherit the recorded decision: if the mesh
203
243
  // record says this broker is TLS-required, the connection REQUIRES it. This is the site whose
204
244
  // omission had no symptom - it connects either way against an honest broker.
@@ -280,15 +320,23 @@ async function userConnectOrExit(target) {
280
320
  /** Reachability check for a RAW (off-registry) connection — one plain sentence, never a registry/
281
321
  * stale-entry message and never a prune. Used by the `--creds` escape hatch and `join`'s explicit
282
322
  * (link/token/creds) path, both of which connect to a broker the user named, not the registry. */
283
- export async function reachableOrExit(server, auth = {}) {
323
+ export async function reachableOrThrow(server, auth = {}) {
284
324
  const probe = await probeConnect(server, auth);
285
325
  if (probe.ok)
286
326
  return;
287
327
  // Whether the caller actually presented anything to be rejected. `tls` is deliberately not part
288
328
  // of this: it is transport, not identity, and a TLS-only connection presents no credential.
289
329
  const hasAuth = Boolean(auth.creds ?? auth.token ?? (auth.user && auth.pass));
290
- console.error(c.red(renderWorkspaceError({ kind: "reachable", reason: probe.reason, server, hasAuth })));
291
- process.exit(1);
330
+ throw new ConnectRefusal(renderWorkspaceError({ kind: "reachable", reason: probe.reason, server, hasAuth }));
331
+ }
332
+ /** {@link reachableOrThrow} with the exiting disposition. */
333
+ export async function reachableOrExit(server, auth = {}) {
334
+ try {
335
+ await reachableOrThrow(server, auth);
336
+ }
337
+ catch (e) {
338
+ exitOnRefusal(e);
339
+ }
292
340
  }
293
341
  /** Resolve the mesh a command targets, exiting with one human sentence on an unresolved/ambiguous
294
342
  * registry rather than a stack trace. Prunes dead registry entries first so a crashed mesh doesn't
@@ -296,7 +344,7 @@ export async function reachableOrExit(server, auth = {}) {
296
344
  * explicit `--space`. A named `--space` is resolved + preflighted directly, so pre-pruning can't
297
345
  * erase a dead-recorded mesh the operator is recovering with a live `--server` override; preflight
298
346
  * still prunes it (with the friendly message) when no override revives it. */
299
- export async function resolveTargetOrExit(flags) {
347
+ export async function resolveTargetOrThrow(flags) {
300
348
  if (!flags.space)
301
349
  await pruneStaleMeshes();
302
350
  let target;
@@ -304,10 +352,8 @@ export async function resolveTargetOrExit(flags) {
304
352
  target = resolveMeshTarget(process.cwd(), flags);
305
353
  }
306
354
  catch (e) {
307
- if (isWorkspaceTargetError(e)) {
308
- console.error(c.red(renderWorkspaceError({ kind: "target", error: e })));
309
- process.exit(1);
310
- }
355
+ if (isWorkspaceTargetError(e))
356
+ throw new ConnectRefusal(renderWorkspaceError({ kind: "target", error: e }));
311
357
  throw e;
312
358
  }
313
359
  // If a dangling `current` was silently bypassed — it named a mesh that's since gone and we fell
@@ -324,7 +370,7 @@ export async function resolveTargetOrExit(flags) {
324
370
  * acts on the prune decision, colours, and exits. Probes with `probeCreds` when given (the
325
371
  * caller's `--creds`/minted creds); otherwise a throwaway identity is minted from the target's
326
372
  * own trust material. */
327
- export async function preflightOrExit(target, probeCreds) {
373
+ export async function preflightOrThrow(target, probeCreds) {
328
374
  // USER-mode targets are never credless-probed here: the callout denies a bare connect, the
329
375
  // classifier reads that as a stale registry entry, and the PRUNE deletes a healthy mesh's
330
376
  // record (found live: foreground `spawn` did exactly this and every later command fell into
@@ -333,8 +379,7 @@ export async function preflightOrExit(target, probeCreds) {
333
379
  if (target.mode === "user") {
334
380
  if (await isReachable(target.server))
335
381
  return;
336
- console.error(c.red(`✗ mesh "${target.space}" at ${target.server} is not reachable - start it with \`cotal up\` from its project folder`));
337
- process.exit(1);
382
+ throw new ConnectRefusal(`✗ mesh "${target.space}" at ${target.server} is not reachable - start it with \`cotal up\` from its project folder`);
338
383
  }
339
384
  const r = await preflightTarget(target, probeCreds);
340
385
  if (r.ok)
@@ -343,7 +388,36 @@ export async function preflightOrExit(target, probeCreds) {
343
388
  // record is one an automatic sweep may delete (an operator-registered mesh is not). The message
344
389
  // reports what ACTUALLY happened, so it never claims a removal that the registry refused.
345
390
  const pruned = r.prune ? pruneMesh(target.space) : false;
346
- console.error(c.red(renderWorkspaceError({ kind: "preflight", failure: r.kind, target, pruned })));
347
- process.exit(1);
391
+ throw new ConnectRefusal(renderWorkspaceError({ kind: "preflight", failure: r.kind, target, pruned }));
392
+ }
393
+ /** {@link preflightOrThrow} with the exiting disposition. */
394
+ export async function preflightOrExit(target, probeCreds) {
395
+ try {
396
+ await preflightOrThrow(target, probeCreds);
397
+ }
398
+ catch (e) {
399
+ exitOnRefusal(e);
400
+ }
401
+ }
402
+ /**
403
+ * {@link connectOrThrow} with the exiting disposition: the form nearly every command wants, where a
404
+ * refusal is the end of the command and the operator gets one sentence rather than a stack trace.
405
+ */
406
+ export async function connectOrExit(flags, role, opts = {}) {
407
+ try {
408
+ return await connectOrThrow(flags, role, opts);
409
+ }
410
+ catch (e) {
411
+ exitOnRefusal(e);
412
+ }
413
+ }
414
+ /** {@link resolveTargetOrThrow} with the exiting disposition. */
415
+ export async function resolveTargetOrExit(flags) {
416
+ try {
417
+ return await resolveTargetOrThrow(flags);
418
+ }
419
+ catch (e) {
420
+ exitOnRefusal(e);
421
+ }
348
422
  }
349
423
  //# sourceMappingURL=connect.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"connect.js","sourceRoot":"","sources":["../src/connect.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EACL,cAAc,EACd,aAAa,EACb,SAAS,EACT,oCAAoC,EACpC,WAAW,EACX,SAAS,EACT,gBAAgB,EAChB,WAAW,EACX,YAAY,EACZ,QAAQ,GAKT,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,CAAC,EAAE,MAAM,aAAa,CAAC;AAChC,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACpF,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,SAAS,EAAqB,MAAM,oBAAoB,CAAC;AACxF,OAAO,EAAE,sBAAsB,EAAE,iBAAiB,EAAmB,MAAM,kBAAkB,CAAC;AAC9F,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AACnE,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AA0EnD;;;kCAGkC;AAClC;;;;;;;;;qEASqE;AACrE,MAAM,UAAU,YAAY,CAAC,IAAgB;IAC3C,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,IAAa,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;IACnD,IAAI,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,aAAa;QAAE,OAAO,EAAE,MAAM,E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AAa,EAAE,OAA2C,EAAE;IACnH,IAAI,CAAC;QACH,OAAO,MAAM,cAAc,CAAC,KAAK,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;IACjD,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC;QACX,aAAa,CAAC,CAAC,CAAC,CAAC;IACnB,CAAC;AACH,CAAC;AAED,iEAAiE;AACjE,MAAM,CAAC,KAAK,UAAU,mBAAmB,CAAC,KAA0C;IAClF,IAAI,CAAC;QACH,OAAO,MAAM,oBAAoB,CAAC,KAAK,CAAC,CAAC;IAC3C,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC;QACX,aAAa,CAAC,CAAC,CAAC,CAAC;IACnB,CAAC;AACH,CAAC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cotal-ai/workspace",
3
3
  "description": "Cotal machine-local workstation layer: the ~/.cotal mesh registry, target resolution, preflight, on-disk auth-path I/O, and the command-copy renderer — operator concerns over a local checkout, kept separate from the wire protocol in @cotal-ai/core.",
4
- "version": "0.22.0",
4
+ "version": "0.24.0",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
7
7
  "type": "git",
@@ -18,7 +18,7 @@
18
18
  }
19
19
  },
20
20
  "dependencies": {
21
- "@cotal-ai/core": "0.22.0"
21
+ "@cotal-ai/core": "0.24.0"
22
22
  },
23
23
  "files": [
24
24
  "dist"