@cotal-ai/workspace 0.10.1 → 0.11.1

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 (44) hide show
  1. package/dist/agent-health.d.ts +20 -0
  2. package/dist/agent-health.d.ts.map +1 -0
  3. package/dist/agent-health.js +40 -0
  4. package/dist/agent-health.js.map +1 -0
  5. package/dist/auth-paths.d.ts +6 -0
  6. package/dist/auth-paths.d.ts.map +1 -1
  7. package/dist/auth-paths.js +8 -0
  8. package/dist/auth-paths.js.map +1 -1
  9. package/dist/colors.d.ts +1 -1
  10. package/dist/colors.js +1 -1
  11. package/dist/connect.d.ts +49 -4
  12. package/dist/connect.d.ts.map +1 -1
  13. package/dist/connect.js +155 -7
  14. package/dist/connect.js.map +1 -1
  15. package/dist/extensions.js +1 -1
  16. package/dist/flags.d.ts +15 -0
  17. package/dist/flags.d.ts.map +1 -1
  18. package/dist/flags.js +31 -0
  19. package/dist/flags.js.map +1 -1
  20. package/dist/index.d.ts +2 -0
  21. package/dist/index.d.ts.map +1 -1
  22. package/dist/index.js +2 -0
  23. package/dist/index.js.map +1 -1
  24. package/dist/mesh-registry.d.ts +38 -1
  25. package/dist/mesh-registry.d.ts.map +1 -1
  26. package/dist/mesh-registry.js +44 -2
  27. package/dist/mesh-registry.js.map +1 -1
  28. package/dist/mesh-target.d.ts +10 -2
  29. package/dist/mesh-target.d.ts.map +1 -1
  30. package/dist/mesh-target.js +45 -4
  31. package/dist/mesh-target.js.map +1 -1
  32. package/dist/preflight.d.ts +2 -2
  33. package/dist/preflight.d.ts.map +1 -1
  34. package/dist/preflight.js +11 -0
  35. package/dist/preflight.js.map +1 -1
  36. package/dist/render.d.ts +1 -1
  37. package/dist/render.d.ts.map +1 -1
  38. package/dist/render.js +21 -12
  39. package/dist/render.js.map +1 -1
  40. package/dist/renewal.d.ts +46 -0
  41. package/dist/renewal.d.ts.map +1 -0
  42. package/dist/renewal.js +61 -0
  43. package/dist/renewal.js.map +1 -0
  44. package/package.json +2 -2
@@ -0,0 +1,20 @@
1
+ export interface AgentAuthHealth {
2
+ state: "ok" | "failed";
3
+ /** The operator-exact failure sentence (the bearer command's own copy), when failed. */
4
+ reason?: string;
5
+ /** ISO timestamp of the attempt. */
6
+ at: string;
7
+ }
8
+ /** A live managed agent's health, as `ps` should render it. Absence/malformation is AMBIGUOUS, not
9
+ * healthy (the preflight writes the first `ok` record before launch, so a live agent always has
10
+ * one — a missing file means someone removed it or the record never landed): `auth-unknown`.
11
+ * A record past `staleMs` on a live agent means refreshes stopped happening at all (the refresh
12
+ * cadence is a few minutes): `auth-stale`. Never silent-healthy. */
13
+ export declare function agentAuthState(path: string, staleMs?: number): {
14
+ state: "ok" | "auth-renewal-failed" | "auth-unknown" | "auth-stale";
15
+ reason?: string;
16
+ };
17
+ /** Read + validate an {@link AgentAuthHealth} file. Undefined when absent (no attempt yet) or
18
+ * unreadable/malformed (surfaced as unknown by {@link agentAuthState}, never a crash in `ps`). */
19
+ export declare function readAgentAuthHealth(path: string): AgentAuthHealth | undefined;
20
+ //# sourceMappingURL=agent-health.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent-health.d.ts","sourceRoot":"","sources":["../src/agent-health.ts"],"names":[],"mappings":"AAWA,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,IAAI,GAAG,QAAQ,CAAC;IACvB,wFAAwF;IACxF,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,oCAAoC;IACpC,EAAE,EAAE,MAAM,CAAC;CACZ;AAED;;;;qEAIqE;AACrE,wBAAgB,cAAc,CAC5B,IAAI,EAAE,MAAM,EACZ,OAAO,SAAc,GACpB;IAAE,KAAK,EAAE,IAAI,GAAG,qBAAqB,GAAG,cAAc,GAAG,YAAY,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,CAQ1F;AAED;mGACmG;AACnG,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,eAAe,GAAG,SAAS,CAS7E"}
@@ -0,0 +1,40 @@
1
+ /**
2
+ * A managed user-mode agent's last bearer-refresh outcome — written by the auth provider's bearer
3
+ * command after EVERY attempt (`--health-file <path>`, the path composed by the manager), read by
4
+ * the manager's `ps` path. WORKSTATION-layer state (this module is exactly why the workspace tier
5
+ * exists): the auth implementation writes it, the manager renders it, neither may import the
6
+ * other, and it is not wire/protocol substance — so it lives here, not in core. A detached agent's
7
+ * silent bearer death has exactly one operator window — `ps` — and this file is what makes that
8
+ * window see it.
9
+ */
10
+ import { readFileSync } from "node:fs";
11
+ /** A live managed agent's health, as `ps` should render it. Absence/malformation is AMBIGUOUS, not
12
+ * healthy (the preflight writes the first `ok` record before launch, so a live agent always has
13
+ * one — a missing file means someone removed it or the record never landed): `auth-unknown`.
14
+ * A record past `staleMs` on a live agent means refreshes stopped happening at all (the refresh
15
+ * cadence is a few minutes): `auth-stale`. Never silent-healthy. */
16
+ export function agentAuthState(path, staleMs = 15 * 60_000) {
17
+ const rec = readAgentAuthHealth(path);
18
+ if (!rec)
19
+ return { state: "auth-unknown", reason: "no readable bearer-refresh record - if this persists, respawn the agent" };
20
+ if (rec.state === "failed")
21
+ return { state: "auth-renewal-failed", ...(rec.reason ? { reason: rec.reason } : {}) };
22
+ const age = Date.now() - Date.parse(rec.at);
23
+ if (!Number.isFinite(age) || age > staleMs)
24
+ return { state: "auth-stale", reason: `last successful bearer refresh was ${Number.isFinite(age) ? Math.round(age / 60_000) + " min" : "an unreadable time"} ago - the agent may be wedged; respawn it` };
25
+ return { state: "ok" };
26
+ }
27
+ /** Read + validate an {@link AgentAuthHealth} file. Undefined when absent (no attempt yet) or
28
+ * unreadable/malformed (surfaced as unknown by {@link agentAuthState}, never a crash in `ps`). */
29
+ export function readAgentAuthHealth(path) {
30
+ try {
31
+ const parsed = JSON.parse(readFileSync(path, "utf8"));
32
+ if ((parsed.state === "ok" || parsed.state === "failed") && typeof parsed.at === "string")
33
+ return { state: parsed.state, at: parsed.at, ...(typeof parsed.reason === "string" ? { reason: parsed.reason } : {}) };
34
+ return undefined;
35
+ }
36
+ catch {
37
+ return undefined;
38
+ }
39
+ }
40
+ //# sourceMappingURL=agent-health.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent-health.js","sourceRoot":"","sources":["../src/agent-health.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAUvC;;;;qEAIqE;AACrE,MAAM,UAAU,cAAc,CAC5B,IAAY,EACZ,OAAO,GAAG,EAAE,GAAG,MAAM;IAErB,MAAM,GAAG,GAAG,mBAAmB,CAAC,IAAI,CAAC,CAAC;IACtC,IAAI,CAAC,GAAG;QAAE,OAAO,EAAE,KAAK,EAAE,cAAc,EAAE,MAAM,EAAE,yEAAyE,EAAE,CAAC;IAC9H,IAAI,GAAG,CAAC,KAAK,KAAK,QAAQ;QAAE,OAAO,EAAE,KAAK,EAAE,qBAAqB,EAAE,GAAG,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC;IACnH,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IAC5C,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,GAAG,GAAG,OAAO;QACxC,OAAO,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,EAAE,sCAAsC,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,GAAG,MAAM,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,oBAAoB,4CAA4C,EAAE,CAAC;IAC5M,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AACzB,CAAC;AAED;mGACmG;AACnG,MAAM,UAAU,mBAAmB,CAAC,IAAY;IAC9C,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,IAAI,EAAE,MAAM,CAAC,CAAoB,CAAC;QACzE,IAAI,CAAC,MAAM,CAAC,KAAK,KAAK,IAAI,IAAI,MAAM,CAAC,KAAK,KAAK,QAAQ,CAAC,IAAI,OAAO,MAAM,CAAC,EAAE,KAAK,QAAQ;YACvF,OAAO,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,EAAE,EAAE,MAAM,CAAC,EAAE,EAAE,GAAG,CAAC,OAAO,MAAM,CAAC,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC;QACzH,OAAO,SAAS,CAAC;IACnB,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,SAAS,CAAC;IACnB,CAAC;AACH,CAAC"}
@@ -1,5 +1,11 @@
1
1
  import { type SpaceAuth } from "@cotal-ai/core";
2
2
  export declare function authDir(root: string): string;
3
+ /** The SPACE-SCOPED user-auth state dir (`<root>/.cotal/auth/<space>`) — the one layout fact the
4
+ * workstation layer owns about user auth: the auth provider persists its material under this dir
5
+ * (opaque to us), and its EXISTENCE marks the space as user-auth-enabled on disk. Space-keyed now
6
+ * so multi-space-per-root is a caller change, never an on-disk migration; a (broker, space) key
7
+ * later extends the same shape. */
8
+ export declare function userAuthStateDir(root: string, space: string): string;
3
9
  /** Find the project's `.cotal/` by walking up from `start` (like git finds `.git`), returning the
4
10
  * directory that *contains* `.cotal/`. Falls back to `start` when none is found up the tree (a
5
11
  * fresh setup creates `.cotal/` there). Lets `cotal` run from any subdirectory of a project. */
@@ -1 +1 @@
1
- {"version":3,"file":"auth-paths.d.ts","sourceRoot":"","sources":["../src/auth-paths.ts"],"names":[],"mappings":"AAEA,OAAO,EAAgC,KAAK,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAe9E,wBAAgB,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAE5C;AAED;;iGAEiG;AACjG,wBAAgB,aAAa,CAAC,KAAK,GAAE,MAAsB,GAAG,MAAM,CAQnE;AAED;;iGAEiG;AACjG,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,GAAG,IAAI,CAIhE;AAED,iFAAiF;AACjF,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS,CAIhE"}
1
+ {"version":3,"file":"auth-paths.d.ts","sourceRoot":"","sources":["../src/auth-paths.ts"],"names":[],"mappings":"AAEA,OAAO,EAAgC,KAAK,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAe9E,wBAAgB,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAE5C;AAED;;;;oCAIoC;AACpC,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAEpE;AAED;;iGAEiG;AACjG,wBAAgB,aAAa,CAAC,KAAK,GAAE,MAAsB,GAAG,MAAM,CAQnE;AAED;;iGAEiG;AACjG,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,GAAG,IAAI,CAIhE;AAED,iFAAiF;AACjF,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS,CAIhE"}
@@ -15,6 +15,14 @@ const AUTH_FILE = "auth.json";
15
15
  export function authDir(root) {
16
16
  return join(root, ".cotal", "auth");
17
17
  }
18
+ /** The SPACE-SCOPED user-auth state dir (`<root>/.cotal/auth/<space>`) — the one layout fact the
19
+ * workstation layer owns about user auth: the auth provider persists its material under this dir
20
+ * (opaque to us), and its EXISTENCE marks the space as user-auth-enabled on disk. Space-keyed now
21
+ * so multi-space-per-root is a caller change, never an on-disk migration; a (broker, space) key
22
+ * later extends the same shape. */
23
+ export function userAuthStateDir(root, space) {
24
+ return join(authDir(root), encodeURIComponent(space));
25
+ }
18
26
  /** Find the project's `.cotal/` by walking up from `start` (like git finds `.git`), returning the
19
27
  * directory that *contains* `.cotal/`. Falls back to `start` when none is found up the tree (a
20
28
  * fresh setup creates `.cotal/` there). Lets `cotal` run from any subdirectory of a project. */
@@ -1 +1 @@
1
- {"version":3,"file":"auth-paths.js","sourceRoot":"","sources":["../src/auth-paths.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,eAAe,EAAkB,MAAM,gBAAgB,CAAC;AAE9E;;;;;;;;;GASG;AAEH,MAAM,SAAS,GAAG,WAAW,CAAC;AAE9B,MAAM,UAAU,OAAO,CAAC,IAAY;IAClC,OAAO,IAAI,CAAC,IAAI,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAC;AACtC,CAAC;AAED;;iGAEiG;AACjG,MAAM,UAAU,aAAa,CAAC,QAAgB,OAAO,CAAC,GAAG,EAAE;IACzD,IAAI,GAAG,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC;IACzB,SAAS,CAAC;QACR,IAAI,UAAU,CAAC,IAAI,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC;YAAE,OAAO,GAAG,CAAC;QAChD,MAAM,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC;QAC5B,IAAI,MAAM,KAAK,GAAG;YAAE,OAAO,OAAO,CAAC,KAAK,CAAC,CAAC;QAC1C,GAAG,GAAG,MAAM,CAAC;IACf,CAAC;AACH,CAAC;AAED;;iGAEiG;AACjG,MAAM,UAAU,aAAa,CAAC,GAAW,EAAE,IAAe;IACxD,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC,iFAAiF;IACnG,MAAM,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AAU,aAAa,CAAC,QAAgB,OAAO,CAAC,GAAG,EAAE;IACzD,IAAI,GAAG,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC;IACzB,SAAS,CAAC;QACR,IAAI,UAAU,CAAC,IAAI,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC;YAAE,OAAO,GAAG,CAAC;QAChD,MAAM,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC;QAC5B,IAAI,MAAM,KAAK,GAAG;YAAE,OAAO,OAAO,CAAC,KAAK,CAAC,CAAC;QAC1C,GAAG,GAAG,MAAM,CAAC;IACf,CAAC;AACH,CAAC;AAED;;iGAEiG;AACjG,MAAM,UAAU,aAAa,CAAC,GAAW,EAAE,IAAe;IACxD,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC,iFAAiF;IACnG,MAAM,MAAM,GAAc,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE,EAAE,GAAG,EAAE,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,EAAE,CAAC;IACrF,eAAe,CAAC,IAAI,CAAC,GAAG,EAAE,SAAS,CAAC,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;AACzE,CAAC;AAED,iFAAiF;AACjF,MAAM,UAAU,aAAa,CAAC,GAAW;IACvC,MAAM,CAAC,GAAG,IAAI,CAAC,GAAG,EAAE,SAAS,CAAC,CAAC;IAC/B,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC;QAAE,OAAO,SAAS,CAAC;IACrC,OAAO,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC,EAAE,MAAM,CAAC,CAAc,CAAC;AAC1D,CAAC"}
package/dist/colors.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /** ANSI color helpers for operator-facing terminal output — shared by every command surface
2
- * (@cotal-ai/cli, cotal-web) so they render identically. Workstation-layer
2
+ * (@cotal-ai/cli, @cotal-ai/web) so they render identically. Workstation-layer
3
3
  * concern: the wire protocol in core never prints. */
4
4
  export declare const c: {
5
5
  dim: (s: string) => string;
package/dist/colors.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /** ANSI color helpers for operator-facing terminal output — shared by every command surface
2
- * (@cotal-ai/cli, cotal-web) so they render identically. Workstation-layer
2
+ * (@cotal-ai/cli, @cotal-ai/web) so they render identically. Workstation-layer
3
3
  * concern: the wire protocol in core never prints. */
4
4
  export const c = {
5
5
  dim: (s) => `\x1b[2m${s}\x1b[0m`,
package/dist/connect.d.ts CHANGED
@@ -1,8 +1,9 @@
1
1
  import { type Profile, type SpaceAuth } from "@cotal-ai/core";
2
+ import { type UserAuthInfo } from "./mesh-registry.js";
2
3
  import { type MeshTarget } from "./mesh-target.js";
3
4
  /**
4
5
  * The one way every command that touches a running mesh figures out WHICH mesh + with what creds,
5
- * and confirms it's actually up — shared by every command surface (@cotal-ai/cli, cotal-web)
6
+ * and confirms it's actually up — shared by every command surface (@cotal-ai/cli, @cotal-ai/web)
6
7
  * so `spawn`, `send`, `console`, `web`, … all behave identically from any
7
8
  * directory. The pure resolution/probe/classify/render steps live beside this file; these wrappers
8
9
  * own the OPERATOR I/O — they colour, print the command-copy line, and exit the process. That is
@@ -30,6 +31,13 @@ export interface Connection {
30
31
  server: string;
31
32
  space: string;
32
33
  creds?: string;
34
+ /** USER-MODE connect material (mode `"user"` only): the Cotal user bearer + the deny-all
35
+ * sentinel creds, exactly what `EndpointOptions.bearer`/`sentinelCreds` consume. Mutually
36
+ * exclusive with `creds` — spread {@link endpointAuth} instead of reading either directly. */
37
+ bearer?: string;
38
+ sentinelCreds?: string;
39
+ /** The user-auth registry metadata, when this is a user-mode connection. */
40
+ userAuth?: UserAuthInfo;
33
41
  /** The mesh's trust material when resolved from the registry on an auth mesh — undefined for an
34
42
  * open mesh or a raw off-registry connection (`--creds` or `--server`+unregistered `--space`).
35
43
  * (web keeps it for its per-delete manager mint.) */
@@ -42,11 +50,48 @@ export interface Connection {
42
50
  /** How the target was resolved (registry / current / flag-space / …) — undefined for raw. */
43
51
  source?: MeshTarget["source"];
44
52
  }
53
+ /** The one way a command turns a {@link Connection} into endpoint auth options — spread this into
54
+ * `new CotalEndpoint({...})` instead of passing `creds:` directly, so a user-mode connection
55
+ * (bearer + sentinel) and a static/raw one (creds) ride the same call sites without each command
56
+ * re-learning the mode split. */
57
+ export declare function endpointAuth(conn: Connection): {
58
+ creds?: string;
59
+ bearer?: string;
60
+ sentinelCreds?: string;
61
+ };
62
+ /** The ledger actor a HUMAN CLI connect runs as on a user-auth space (v1: one well-known name).
63
+ * Grant it once per user: `cotal actor grant cli --sub <your IdP subject>`. */
64
+ export declare const CLI_USER_ACTOR = "cli";
65
+ /** The auth material for one ELEVATED user-mode connection (a "view"): bearer + sentinel for the
66
+ * endpoint or a standalone helper, the bearer's own principal (a bearer-SOURCE endpoint needs it
67
+ * pinned up front), and a fresh-mint source for standing taps (each call is a full login→exchange
68
+ * round, so every refresh is a fresh ledger check). */
69
+ export interface UserViewAuth {
70
+ bearer: string;
71
+ sentinelCreds: string;
72
+ owner: string;
73
+ actor: string;
74
+ source: () => Promise<string>;
75
+ }
76
+ /** Mint an elevated-view bearer over an existing user-mode {@link Connection} — the user-mode
77
+ * path for the operator surfaces (`web`, `console`, `history clear`, `channels`, `spawn -f`).
78
+ * The view is authorized server-side against the fresh ledger row; a refusal THROWS the exact
79
+ * re-grant sentence. Call ONLY with a user-mode connection (`conn.bearer` set) — anything else
80
+ * is a caller bug. Long-running servers (the web delete handler) call THIS and surface the
81
+ * thrown sentence; CLI startup paths use {@link userViewAuthOrExit}. */
82
+ export declare function userViewAuth(conn: Connection, view: string): Promise<UserViewAuth>;
83
+ /** {@link userViewAuth}, workstation-flavoured: colour the thrown sentence and exit. */
84
+ export declare function userViewAuthOrExit(conn: Connection, view: string): Promise<UserViewAuth>;
85
+ /** Fail-closed guard for the flip: explicit raw creds are still useful for true off-registry/static
86
+ * meshes, but not for a user-auth mesh this machine KNOWS about. Otherwise an old static
87
+ * `local.<nkey>` creds file can bypass the user-mode branch and publish/join through raw `--creds`.
88
+ * Registry match covers cross-directory use; the on-disk marker covers a lost/stale registry. */
89
+ export declare function refuseStaticCredsForKnownUserAuthOrExit(space: string, server: string | undefined, what: string): void;
45
90
  /**
46
91
  * Resolve where a mesh-touching command connects + with what creds.
47
- * • Explicit `--creds` → a RAW off-registry connection: straight to `--server` (default loopback)
48
- * as `--space`, with those creds. No registry lookup, no stale-prune, plain reachability message
49
- * (the user is deliberately off-registry e.g. a remote mesh that isn't locally recorded).
92
+ * • Explicit `--creds` → a RAW off-registry connection, except when the target is a known
93
+ * per-user-auth mesh. Those refuse static creds fail-closed because old local creds remain
94
+ * broker-valid but are the wrong identity plane after the flip.
50
95
  * • Otherwise → resolve the running mesh from the registry (works from any dir), mint `role` creds
51
96
  * on an auth mesh, and preflight with the registry's stale-prune.
52
97
  */
@@ -1 +1 @@
1
- {"version":3,"file":"connect.d.ts","sourceRoot":"","sources":["../src/connect.ts"],"names":[],"mappings":"AACA,OAAO,EAML,KAAK,OAAO,EACZ,KAAK,SAAS,EACf,MAAM,gBAAgB,CAAC;AAGxB,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,MA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O,CAAC,YAAY,CAAC,CAiBxF;AAED,wFAAwF;AACxF,wBAAsB,kBAAkB,CAAC,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC,CAO9F;AAqBD;;;kGAGkG;AAClG,wBAAgB,uCAAuC,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,SAAS,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI,CAYrH;AAED;;;;;;;GAOG;AACH,wBAAsB,aAAa,CAAC,KAAK,EAAE,YAAY,EAAE,IAAI,EAAE,OAAO,GAAG,OAAO,CAAC,UAAU,CAAC,CA+C3F;AAyCD;;mGAEmG;AACnG,wBAAsB,eAAe,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,GAAE,OAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CAKvF;AAED;;;;;+EAK+E;AAC/E,wBAAsB,mBAAmB,CAAC,KAAK,EAAE;IAC/C,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,GAAG,OAAO,CAAC,UAAU,CAAC,CAmBtB;AAED;;;;;0BAK0B;AAC1B,wBAAsB,eAAe,CAAC,MAAM,EAAE,UAAU,EAAE,UAAU,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAgB5F"}
package/dist/connect.js CHANGED
@@ -1,22 +1,109 @@
1
- import { readFileSync } from "node:fs";
2
- import { DEFAULT_SERVER, DEFAULT_SPACE, mintCreds, newIdentity, probeConnect, } from "@cotal-ai/core";
1
+ import { existsSync, readFileSync } from "node:fs";
2
+ import { DEFAULT_SERVER, DEFAULT_SPACE, isReachable, mintCreds, newIdentity, probeConnect, registry, } from "@cotal-ai/core";
3
3
  import { c } from "./colors.js";
4
+ import { findCotalRoot, userAuthStateDir } from "./auth-paths.js";
4
5
  import { findMesh, getCurrent, removeMesh } from "./mesh-registry.js";
5
6
  import { isWorkspaceTargetError, resolveMeshTarget } from "./mesh-target.js";
6
7
  import { preflightTarget, pruneStaleMeshes } from "./preflight.js";
7
8
  import { renderWorkspaceError } from "./render.js";
9
+ /** The one way a command turns a {@link Connection} into endpoint auth options — spread this into
10
+ * `new CotalEndpoint({...})` instead of passing `creds:` directly, so a user-mode connection
11
+ * (bearer + sentinel) and a static/raw one (creds) ride the same call sites without each command
12
+ * re-learning the mode split. */
13
+ export function endpointAuth(conn) {
14
+ if (conn.bearer && conn.sentinelCreds)
15
+ return { bearer: conn.bearer, sentinelCreds: conn.sentinelCreds };
16
+ return conn.creds !== undefined ? { creds: conn.creds } : {};
17
+ }
18
+ /** The ledger actor a HUMAN CLI connect runs as on a user-auth space (v1: one well-known name).
19
+ * Grant it once per user: `cotal actor grant cli --sub <your IdP subject>`. */
20
+ export const CLI_USER_ACTOR = "cli";
21
+ /** Mint an elevated-view bearer over an existing user-mode {@link Connection} — the user-mode
22
+ * path for the operator surfaces (`web`, `console`, `history clear`, `channels`, `spawn -f`).
23
+ * The view is authorized server-side against the fresh ledger row; a refusal THROWS the exact
24
+ * re-grant sentence. Call ONLY with a user-mode connection (`conn.bearer` set) — anything else
25
+ * is a caller bug. Long-running servers (the web delete handler) call THIS and surface the
26
+ * thrown sentence; CLI startup paths use {@link userViewAuthOrExit}. */
27
+ export async function userViewAuth(conn, view) {
28
+ if (!conn.bearer || !conn.userAuth || !conn.root)
29
+ throw new Error(`userViewAuth: not a user-mode registry connection (view "${view}")`);
30
+ const ua = conn.userAuth;
31
+ let provider;
32
+ try {
33
+ provider = registry.resolve("auth-provider", ua.provider);
34
+ }
35
+ catch {
36
+ throw new Error(`space "${conn.space}" uses the "${ua.provider}" auth provider, which this build does not register - user-auth spaces need it (the official cotal binary includes @cotal-ai/auth)`);
37
+ }
38
+ const dir = userAuthStateDir(conn.root, conn.space);
39
+ const mint = () => provider.userCredentials({ dir, space: conn.space, actor: CLI_USER_ACTOR, view });
40
+ const { bearer, sentinelCreds } = await mint();
41
+ const { owner, actor } = principalFromBearer(bearer);
42
+ return { bearer, sentinelCreds, owner, actor, source: () => mint().then((r) => r.bearer) };
43
+ }
44
+ /** {@link userViewAuth}, workstation-flavoured: colour the thrown sentence and exit. */
45
+ export async function userViewAuthOrExit(conn, view) {
46
+ try {
47
+ return await userViewAuth(conn, view);
48
+ }
49
+ catch (e) {
50
+ console.error(c.red(`✗ ${e instanceof Error ? e.message : String(e)}`));
51
+ process.exit(1);
52
+ }
53
+ }
54
+ /** The (owner, actor) principal a minted bearer is bound to — read from the JWT payload WITHOUT
55
+ * verification (client side; the broker verifies). A bearer-source endpoint requires the principal
56
+ * pinned at construction, and the bearer is the one authoritative place it lives. */
57
+ function principalFromBearer(bearer) {
58
+ try {
59
+ const mid = bearer.split(".")[1];
60
+ if (!mid)
61
+ throw new Error("not a compact JWS");
62
+ const payload = JSON.parse(Buffer.from(mid, "base64url").toString("utf8"));
63
+ if (typeof payload.sub !== "string" || !payload.sub || typeof payload.act?.actor !== "string" || !payload.act.actor)
64
+ throw new Error("missing sub/act.actor");
65
+ return { owner: payload.sub, actor: payload.act.actor };
66
+ }
67
+ catch (e) {
68
+ throw new Error(`could not read the principal from the minted bearer (${e instanceof Error ? e.message : String(e)}) - the auth service's build may be stale; restart it with \`cotal up\``);
69
+ }
70
+ }
71
+ /** Fail-closed guard for the flip: explicit raw creds are still useful for true off-registry/static
72
+ * meshes, but not for a user-auth mesh this machine KNOWS about. Otherwise an old static
73
+ * `local.<nkey>` creds file can bypass the user-mode branch and publish/join through raw `--creds`.
74
+ * Registry match covers cross-directory use; the on-disk marker covers a lost/stale registry. */
75
+ export function refuseStaticCredsForKnownUserAuthOrExit(space, server, what) {
76
+ const recorded = findMesh(space);
77
+ const knownRecordedUser = recorded?.mode === "user" && (server === undefined || recorded.server === server);
78
+ const knownLocalUser = existsSync(userAuthStateDir(findCotalRoot(), space));
79
+ if (!knownRecordedUser && !knownLocalUser)
80
+ return;
81
+ 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.`));
82
+ console.error(c.dim(` Sign in with \`cotal login\` and use the user-mode path instead (for agents: \`cotal spawn\`).`));
83
+ process.exit(1);
84
+ }
8
85
  /**
9
86
  * Resolve where a mesh-touching command connects + with what creds.
10
- * • Explicit `--creds` → a RAW off-registry connection: straight to `--server` (default loopback)
11
- * as `--space`, with those creds. No registry lookup, no stale-prune, plain reachability message
12
- * (the user is deliberately off-registry e.g. a remote mesh that isn't locally recorded).
87
+ * • Explicit `--creds` → a RAW off-registry connection, except when the target is a known
88
+ * per-user-auth mesh. Those refuse static creds fail-closed because old local creds remain
89
+ * broker-valid but are the wrong identity plane after the flip.
13
90
  * • Otherwise → resolve the running mesh from the registry (works from any dir), mint `role` creds
14
91
  * on an auth mesh, and preflight with the registry's stale-prune.
15
92
  */
16
93
  export async function connectOrExit(flags, role) {
17
94
  if (flags.creds) {
18
- const server = flags.server ?? DEFAULT_SERVER;
19
95
  const space = flags.space ?? DEFAULT_SPACE;
96
+ // Run the flip guard with the RAW `--server` (may be undefined). The guard treats "no --server"
97
+ // as "any recorded server for this space", so a user mesh on a NON-default port is still
98
+ // recognized when the caller omits --server. Defaulting the server BEFORE the guard would make
99
+ // its `recorded.server === server` match miss every non-4222 user mesh, letting a static --creds
100
+ // slip past the flip.
101
+ refuseStaticCredsForKnownUserAuthOrExit(space, flags.server, "--creds");
102
+ const server = flags.server ?? DEFAULT_SERVER;
103
+ if (!existsSync(flags.creds)) {
104
+ console.error(c.red(`✗ creds file not found: ${flags.creds}`));
105
+ process.exit(1);
106
+ }
20
107
  const creds = readFileSync(flags.creds, "utf8");
21
108
  await reachableOrExit(server, { creds });
22
109
  return { server, space, creds };
@@ -26,14 +113,64 @@ export async function connectOrExit(flags, role) {
26
113
  // off-registry (no registry lookup, no prune). A registered `--space` still goes through the
27
114
  // resolver below (which honors `--server` as an override); `--server` alone resolves there too.
28
115
  if (flags.server && flags.space && !findMesh(flags.space)) {
116
+ // Fail-closed marker, same posture as the resolver's: this machine may hold USER-AUTH state
117
+ // for that very space even when the registry lost (or never had) the entry — treating it as an
118
+ // open broker would credless-connect into a callout denial whose copy sends the operator
119
+ // port-hunting. Name the real state and the recovery instead.
120
+ if (existsSync(userAuthStateDir(findCotalRoot(), flags.space))) {
121
+ 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\`)`));
122
+ process.exit(1);
123
+ }
29
124
  await reachableOrExit(flags.server, {});
30
125
  return { server: flags.server, space: flags.space };
31
126
  }
32
127
  const target = await resolveTargetOrExit({ server: flags.server, space: flags.space });
128
+ // USER MODE is a HARD branch: it never mints from on-disk trust material (static creds DO work
129
+ // on a user-auth broker — minting here would silently connect the operator on the wrong identity
130
+ // plane) and never connects credlessly. Everything it needs comes from the login cache + the
131
+ // provider's space-scoped state; every failure is one sentence with the exact operator action.
132
+ if (target.mode === "user")
133
+ return userConnectOrExit(target);
33
134
  const creds = target.auth ? await mintCreds(target.auth, newIdentity(), role) : undefined;
34
135
  await preflightOrExit(target, creds);
35
136
  return { server: target.server, space: target.space, creds, auth: target.auth, root: target.root, source: target.source };
36
137
  }
138
+ /** The user-mode connect: resolve the space's auth provider from the registry (composition-root
139
+ * supplied — never imported here), exchange this machine's login session for a bearer, and hand
140
+ * back bearer + sentinel. The provider owns the failure copy for its own steps (not logged in,
141
+ * service down, actor ungranted) — each is already an exact recovery sentence; this wrapper only
142
+ * colours and exits (the workstation-layer contract). */
143
+ async function userConnectOrExit(target) {
144
+ const ua = target.userAuth; // mode "user" guarantees it (targetFromEntry throws otherwise)
145
+ let provider;
146
+ try {
147
+ provider = registry.resolve("auth-provider", ua.provider);
148
+ }
149
+ catch {
150
+ console.error(c.red(`✗ space "${target.space}" uses the "${ua.provider}" auth provider, which this build does not register - user-auth spaces need it (the official cotal binary includes @cotal-ai/auth)`));
151
+ process.exit(1);
152
+ }
153
+ try {
154
+ const { bearer, sentinelCreds } = await provider.userCredentials({
155
+ dir: userAuthStateDir(target.root, target.space),
156
+ space: target.space,
157
+ actor: CLI_USER_ACTOR,
158
+ });
159
+ return {
160
+ server: target.server,
161
+ space: target.space,
162
+ bearer,
163
+ sentinelCreds,
164
+ userAuth: ua,
165
+ root: target.root,
166
+ source: target.source,
167
+ };
168
+ }
169
+ catch (e) {
170
+ console.error(c.red(`✗ ${e instanceof Error ? e.message : String(e)}`));
171
+ process.exit(1);
172
+ }
173
+ }
37
174
  /** Reachability check for a RAW (off-registry) connection — one plain sentence, never a registry/
38
175
  * stale-entry message and never a prune. Used by the `--creds` escape hatch and `join`'s explicit
39
176
  * (link/token/creds) path, both of which connect to a broker the user named, not the registry. */
@@ -69,7 +206,7 @@ export async function resolveTargetOrExit(flags) {
69
206
  // otherwise quietly redirect a stale default.
70
207
  const cur = getCurrent();
71
208
  if (cur && !findMesh(cur) && target.source === "registry")
72
- console.error(c.dim(`note: default mesh "${cur}" is down using "${target.space}"`));
209
+ console.error(c.dim(`note: default mesh "${cur}" is down - using "${target.space}"`));
73
210
  return target;
74
211
  }
75
212
  /** Confirm the resolved mesh is up and accepts these creds — replaces the raw NATS "Authorization
@@ -79,6 +216,17 @@ export async function resolveTargetOrExit(flags) {
79
216
  * caller's `--creds`/minted creds); otherwise a throwaway identity is minted from the target's
80
217
  * own trust material. */
81
218
  export async function preflightOrExit(target, probeCreds) {
219
+ // USER-mode targets are never credless-probed here: the callout denies a bare connect, the
220
+ // classifier reads that as a stale registry entry, and the PRUNE deletes a healthy mesh's
221
+ // record (found live: foreground `spawn` did exactly this and every later command fell into
222
+ // raw-path copy). Liveness is the only mode-blind read; the real auth preflight for a user
223
+ // target is the user connect / bearer chain itself.
224
+ if (target.mode === "user") {
225
+ if (await isReachable(target.server))
226
+ return;
227
+ console.error(c.red(`✗ mesh "${target.space}" at ${target.server} is not reachable - start it with \`cotal up\` from its project folder`));
228
+ process.exit(1);
229
+ }
82
230
  const r = await preflightTarget(target, probeCre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QAAE,UAAU,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IACtC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,oBAAoB,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,OAAO,EAAE,CAAC,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,CAAC;IAC5G,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC"}
@@ -19,7 +19,7 @@ export function loadExtensionsManifest() {
19
19
  parsed = JSON.parse(readFileSync(p, "utf8"));
20
20
  }
21
21
  catch (e) {
22
- throw new Error(`corrupt extensions manifest ${p}: ${e.message} fix or delete it, then \`cotal ext add\` again`);
22
+ throw new Error(`corrupt extensions manifest ${p}: ${e.message} - fix or delete it, then \`cotal ext add\` again`);
23
23
  }
24
24
  const m = parsed;
25
25
  if (!Array.isArray(m.extensions))
package/dist/flags.d.ts CHANGED
@@ -79,6 +79,12 @@ export declare const launchFlags: readonly [{
79
79
  readonly type: "string";
80
80
  readonly value: "<v>";
81
81
  readonly description: "model variant override (connector-defined; wins over the agent file's variant:)";
82
+ }, {
83
+ readonly name: "opt";
84
+ readonly type: "string";
85
+ readonly multiple: true;
86
+ readonly value: "<k=v>";
87
+ readonly description: "connector-specific launch option (repeatable); wins per-key over the agent file's launchOptions:";
82
88
  }, {
83
89
  readonly name: "cwd";
84
90
  readonly type: "string";
@@ -123,4 +129,13 @@ export declare const launchFlags: readonly [{
123
129
  readonly value: "<a,b>";
124
130
  readonly description: "post ACL override";
125
131
  }];
132
+ /** Parse repeated `--opt key=value` pairs into the opaque launch-options map. The key is the text
133
+ * before the first `=`; the value is the remainder (may itself contain `=`). Fails loud on a
134
+ * missing `=`, an empty key, or a duplicate key — never silent last-wins. Values are strings (the
135
+ * CLI has no types); the consuming connector coerces. Returns undefined when there are none. */
136
+ export declare function parseLaunchOptions(pairs: string[] | undefined): Record<string, string> | undefined;
137
+ /** Merge two opaque launch-option maps per key — `override` (e.g. a `--opt` flag) wins over `base`
138
+ * (e.g. the persona file's `launchOptions:`), mirroring how `--model`/`--variant` beat the file.
139
+ * Returns undefined when the result is empty, so an absent bag never becomes an empty object. */
140
+ export declare function mergeLaunchOptions(base: Record<string, unknown> | undefined, override: Record<string, unknown> | undefined): Record<string, unknown> | undefined;
126
141
  //# sourceMappingURL=flags.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"flags.d.ts","sourceRoot":"","sources":["../src/flags.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG;AACH,eAAO,MAAM,SAAS;;;;;CAAwI,CAAC;AAC/J,eAAO,MAAM,UAAU;;;;;CAAgJ,CAAC;AACxK,eAAO,MAAM,SAAS;;;;;CAA2I,CAAC;AAElK;;+BAE+B;AAC/B,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;EAA4E,CAAC;AAErG;;;;;;GAMG;AACH,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgBgB,CAAC"}
1
+ {"version":3,"file":"flags.d.ts","sourceRoot":"","sources":["../src/flags.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG;AACH,eAAO,MAAM,SAAS;;;;;CAAwI,CAAC;AAC/J,eAAO,MAAM,UAAU;;;;;CAAgJ,CAAC;AACxK,eAAO,MAAM,SAAS;;;;;CAA2I,CAAC;AAElK;;+BAE+B;AAC/B,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;EAA4E,CAAC;AAErG;;;;;;GAMG;AACH,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiBgB,CAAC;AAEzC;;;iGAGiG;AACjG,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS,CAYlG;AAED;;kGAEkG;AAClG,wBAAgB,kBAAkB,CAChC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,EACzC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,GAC5C,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,CAIrC"}
package/dist/flags.js CHANGED
@@ -26,6 +26,7 @@ export const launchFlags = [
26
26
  { name: "role", type: "string", value: "<r>", description: "role override (wins over the agent file's role:)" },
27
27
  { name: "model", type: "string", value: "<m>", description: "model override (wins over the agent file's model:)" },
28
28
  { name: "variant", type: "string", value: "<v>", description: "model variant override (connector-defined; wins over the agent file's variant:)" },
29
+ { name: "opt", type: "string", multiple: true, value: "<k=v>", description: "connector-specific launch option (repeatable); wins per-key over the agent file's launchOptions:" },
29
30
  { name: "cwd", type: "string", value: "<dir>", description: "working directory to root the agent at" },
30
31
  { name: "prompt", type: "string", value: "<text>", description: "initial prompt auto-submitted at start" },
31
32
  { name: "resume", type: "string", value: "<id>", description: "fork an existing session id into the mesh (claude only; detached: pair with --cwd)" },
@@ -36,4 +37,34 @@ export const launchFlags = [
36
37
  { name: "allow-subscribe", type: "string", value: "<a,b>", description: "read ACL override" },
37
38
  { name: "allow-publish", type: "string", value: "<a,b>", description: "post ACL override" },
38
39
  ];
40
+ /** Parse repeated `--opt key=value` pairs into the opaque launch-options map. The key is the text
41
+ * before the first `=`; the value is the remainder (may itself contain `=`). Fails loud on a
42
+ * missing `=`, an empty key, or a duplicate key — never silent last-wins. Values are strings (the
43
+ * CLI has no types); the consuming connector coerces. Returns undefined when there are none. */
44
+ export function parseLaunchOptions(pairs) {
45
+ if (!pairs?.length)
46
+ return undefined;
47
+ const out = {};
48
+ for (const raw of pairs) {
49
+ const eq = raw.indexOf("=");
50
+ if (eq === -1)
51
+ throw new Error(`--opt must be key=value (got "${raw}")`);
52
+ const key = raw.slice(0, eq).trim();
53
+ if (!key)
54
+ throw new Error(`--opt has an empty key (got "${raw}")`);
55
+ if (key in out)
56
+ throw new Error(`--opt "${key}" given more than once`);
57
+ out[key] = raw.slice(eq + 1);
58
+ }
59
+ return out;
60
+ }
61
+ /** Merge two opaque launch-option maps per key — `override` (e.g. a `--opt` flag) wins over `base`
62
+ * (e.g. the persona file's `launchOptions:`), mirroring how `--model`/`--variant` beat the file.
63
+ * Returns undefined when the result is empty, so an absent bag never becomes an empty object. */
64
+ export function mergeLaunchOptions(base, override) {
65
+ if (!base && !override)
66
+ return undefined;
67
+ const merged = { ...base, ...override };
68
+ return Object.keys(merged).length ? merged : undefined;
69
+ }
39
70
  //# sourceMappingURL=flags.js.map
package/dist/flags.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"flags.js","sourceRoot":"","sources":["../src/flags.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,WAAW,EAAE,2CAA2C,EAA8B,CAAC;AAC/J,MAAM,CAAC,MAAM,UAAU,GAAG,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,gDAAgD,EAA8B,CAAC;AACxK,MAAM,CAAC,MAAM,SAAS,GAAG,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE,WAAW,EAAE,2CAA2C,EAA8B,CAAC;AAElK;;+BAE+B;AAC/B,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,SAAS,EAAE,UAAU,EAAE,SAAS,CAAwC,CAAC;AAErG;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,EAAE,IAAI,EAAE,MAAM,E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,kBAAkB,CAChC,IAAyC,EACzC,QAA6C;IAE7C,IAAI,CAAC,IAAI,IAAI,CAAC,QAAQ;QAAE,OAAO,SAAS,CAAC;IACzC,MAAM,MAAM,GAAG,EAAE,GAAG,IAAI,EAAE,GAAG,QAAQ,EAAE,CAAC;IACxC,OAAO,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC;AACzD,CAAC"}
package/dist/index.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  export * from "./auth-paths.js";
2
+ export * from "./agent-health.js";
2
3
  export * from "./bin-path.js";
3
4
  export * from "./colors.js";
4
5
  export * from "./connect.js";
@@ -10,5 +11,6 @@ export * from "./mesh-registry.js";
10
11
  export * from "./mesh-target.js";
11
12
  export * from "./preflight.js";
12
13
  export * from "./render.js";
14
+ export * from "./renewal.js";
13
15
  export * from "./space.js";
14
16
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,YAAY,CAAC;AAC3B,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,YAAY,CAAC;AAC3B,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC"}
package/dist/index.js CHANGED
@@ -1,4 +1,5 @@
1
1
  export * from "./auth-paths.js";
2
+ export * from "./agent-health.js";
2
3
  export * from "./bin-path.js";
3
4
  export * from "./colors.js";
4
5
  export * from "./connect.js";
@@ -10,5 +11,6 @@ export * from "./mesh-registry.js";
10
11
  export * from "./mesh-target.js";
11
12
  export * from "./preflight.js";
12
13
  export * from "./render.js";
14
+ export * from "./renewal.js";
13
15
  export * from "./space.js";
14
16
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,YAAY,CAAC;AAC3B,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,YAAY,CAAC;AAC3B,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC"}