@cotal-ai/core 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 (64) hide show
  1. package/dist/agent-file.d.ts +10 -1
  2. package/dist/agent-file.d.ts.map +1 -1
  3. package/dist/agent-file.js +65 -80
  4. package/dist/agent-file.js.map +1 -1
  5. package/dist/auth-provider.d.ts +207 -0
  6. package/dist/auth-provider.d.ts.map +1 -0
  7. package/dist/auth-provider.js +13 -0
  8. package/dist/auth-provider.js.map +1 -0
  9. package/dist/channels.d.ts +10 -0
  10. package/dist/channels.d.ts.map +1 -1
  11. package/dist/channels.js +9 -27
  12. package/dist/channels.js.map +1 -1
  13. package/dist/command.d.ts +6 -1
  14. package/dist/command.d.ts.map +1 -1
  15. package/dist/command.js +5 -1
  16. package/dist/command.js.map +1 -1
  17. package/dist/connector-config.js +1 -1
  18. package/dist/connector.d.ts +16 -0
  19. package/dist/connector.d.ts.map +1 -1
  20. package/dist/endpoint.d.ts +148 -17
  21. package/dist/endpoint.d.ts.map +1 -1
  22. package/dist/endpoint.js +470 -97
  23. package/dist/endpoint.js.map +1 -1
  24. package/dist/evict.d.ts +87 -0
  25. package/dist/evict.d.ts.map +1 -0
  26. package/dist/evict.js +231 -0
  27. package/dist/evict.js.map +1 -0
  28. package/dist/identity.d.ts +15 -0
  29. package/dist/identity.d.ts.map +1 -1
  30. package/dist/identity.js +26 -2
  31. package/dist/identity.js.map +1 -1
  32. package/dist/index.d.ts +2 -0
  33. package/dist/index.d.ts.map +1 -1
  34. package/dist/index.js +2 -0
  35. package/dist/index.js.map +1 -1
  36. package/dist/launch.d.ts +6 -0
  37. package/dist/launch.d.ts.map +1 -1
  38. package/dist/members.d.ts.map +1 -1
  39. package/dist/members.js +5 -2
  40. package/dist/members.js.map +1 -1
  41. package/dist/membership-feed.d.ts +17 -3
  42. package/dist/membership-feed.d.ts.map +1 -1
  43. package/dist/membership-feed.js +41 -13
  44. package/dist/membership-feed.js.map +1 -1
  45. package/dist/provision.d.ts +99 -14
  46. package/dist/provision.d.ts.map +1 -1
  47. package/dist/provision.js +267 -128
  48. package/dist/provision.js.map +1 -1
  49. package/dist/resolve.js +1 -1
  50. package/dist/secret-fs.d.ts +9 -0
  51. package/dist/secret-fs.d.ts.map +1 -1
  52. package/dist/secret-fs.js +26 -2
  53. package/dist/secret-fs.js.map +1 -1
  54. package/dist/streams.d.ts +33 -7
  55. package/dist/streams.d.ts.map +1 -1
  56. package/dist/streams.js +53 -30
  57. package/dist/streams.js.map +1 -1
  58. package/dist/subjects.d.ts +267 -75
  59. package/dist/subjects.d.ts.map +1 -1
  60. package/dist/subjects.js +401 -110
  61. package/dist/subjects.js.map +1 -1
  62. package/dist/types.d.ts +13 -2
  63. package/dist/types.d.ts.map +1 -1
  64. package/package.json +3 -2
@@ -28,11 +28,20 @@ export interface AgentDef {
28
28
  model?: string;
29
29
  /** Connector-defined model variant handed to the launcher (e.g. OpenCode reasoning effort). */
30
30
  variant?: string;
31
+ /** Opaque, connector-specific launch options — an arbitrary key→value map that core never
32
+ * interprets. Connectors forward well-shaped keys raw into their host form (`claude` flags,
33
+ * OpenCode config); a connector with no option surface fails loud. `--opt k=v` on the CLI, a
34
+ * manifest `launchOptions:`, or a nested `launchOptions:` block here all feed the same bag. */
35
+ launchOptions?: Record<string, unknown>;
31
36
  /** Capabilities this agent may exercise on the control plane (auth mode → minted into the
32
37
  * cred's publish allow-list). Today `spawn` is the only one: it grants publish to the
33
38
  * privileged control subject (start/purge/definePersona/named stop). Default-deny when
34
39
  * absent — nats-server, not a handler, is the boundary. Granting authority is operator-level
35
- * (`definePersona` is itself privileged), so no peer can self-grant via its own agent file. */
40
+ * (`definePersona` is itself privileged), so no peer can self-grant via its own agent file.
41
+ * NOTE: because launchOptions is a raw passthrough, `spawn` is HOST-LAUNCH AUTHORITY — its holder
42
+ * can drive the connector's full launch surface on the manager host (Claude `--mcp-config` /
43
+ * `--add-dir` / permission flags, OpenCode agent-config keys). Grant it as host-launch authority,
44
+ * not as a narrow "add a teammate" permission. */
36
45
  capabilities?: string[];
37
46
  /** Authenticated id of the agent that first defined this persona via `definePersona` (P6). A
38
47
  * POLICY field, not content: the privileged tier may *redefine* an existing file only if its
@@ -1 +1 @@
1
- {"version":3,"file":"agent-file.d.ts","sourceRoot":"","sources":["../src/agent-file.ts"],"names":[],"mappings":"AA2BA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAI/C,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,YAAY,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB;6GACyG;IACzG,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;IACrB;;;yCAGqC;IACrC,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAC1B;;qFAEiF;IACjF,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB;;oFAEgF;IAChF,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB;0EACsE;IACtE,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB,sEAAsE;IACtE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,+FAA+F;IAC/F,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;;oGAIgG;IAChG,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB;;;;oGAIgG;IAChG,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;qDACiD;IACjD,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC9B,oEAAoE;IACpE,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAmCD,8EAA8E;AAC9E,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,QAAQ,CAoGpD;AAED;;;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KAAK,CAAC,EAAE,MAAM,CAAC;IACf;qDACiD;IACjD,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC9B,oEAAoE;IACpE,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAmBD,8EAA8E;AAC9E,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,QAAQ,CAmHpD;AAED;;;8CAG8C;AAC9C,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,QAAQ,GAAG,IAAI,CA0B/D;AAED;;mDAEmD;AACnD,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,MAAM,CAKtE;AAED;;;kGAGkG;AAClG,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,GAAG,MAAM,CAMpF"}
@@ -25,42 +25,26 @@
25
25
  */
26
26
  import { mkdirSync, readFileSync, writeFileSync } from "node:fs";
27
27
  import { dirname, isAbsolute, join, resolve } from "node:path";
28
+ import { parse as parseYaml, stringify as stringifyYaml } from "yaml";
28
29
  import { assertValidName } from "./resolve.js";
29
30
  import { assertValidChannel, channelInAllow, isConcreteChannel } from "./subjects.js";
30
- /** Strip wrapping quotes from a scalar value. */
31
- function unquote(v) {
32
- if ((v.startsWith('"') && v.endsWith('"')) || (v.startsWith("'") && v.endsWith("'")))
33
- return v.slice(1, -1);
34
- return v;
35
- }
36
- /** Parse the frontmatter subset we support: `key: value` scalars and inline
37
- * `key: [a, b]` string lists. Throws on anything fancier — block lists, nested
38
- * maps and multi-doc YAML are deliberately unsupported (no silent fallback). */
39
- function parseFrontmatter(src) {
40
- const out = {};
41
- for (const raw of src.split("\n")) {
42
- const line = raw.trim();
43
- if (!line || line.startsWith("#"))
44
- continue;
45
- const colon = line.indexOf(":");
46
- if (colon < 1)
47
- throw new Error(`agent file: unparseable frontmatter line "${raw}"`);
48
- const key = line.slice(0, colon).trim();
49
- const val = line.slice(colon + 1).trim();
50
- if (val.startsWith("[")) {
51
- if (!val.endsWith("]"))
52
- throw new Error(`agent file: unterminated list for "${key}"`);
53
- out[key] = val
54
- .slice(1, -1)
55
- .split(",")
56
- .map((s) => unquote(s.trim()))
57
- .filter(Boolean);
58
- }
59
- else {
60
- out[key] = unquote(val);
61
- }
31
+ /** Parse the frontmatter block as YAML (the `yaml` library — spec-compliant quoting/escaping and
32
+ * safe scalar typing, so a value with a `:`/`#`/quote can't be misread). Must be a mapping; a
33
+ * sequence, scalar, or malformed block fails loud. Values keep their YAML types (string, number,
34
+ * boolean, nested map/list); {@link loadAgentFile} coerces the modelled scalar fields. */
35
+ function parseFrontmatter(src, path) {
36
+ let doc;
37
+ try {
38
+ doc = parseYaml(src);
39
+ }
40
+ catch (e) {
41
+ throw new Error(`agent file ${path}: invalid YAML frontmatter — ${e.message}`);
62
42
  }
63
- return out;
43
+ if (doc === null || doc === undefined)
44
+ return {};
45
+ if (typeof doc !== "object" || Array.isArray(doc))
46
+ throw new Error(`agent file ${path}: frontmatter must be a YAML mapping (key: value pairs)`);
47
+ return doc;
64
48
  }
65
49
  /** Load and parse an agent definition file (Markdown + `---` frontmatter). */
66
50
  export function loadAgentFile(path) {
@@ -68,19 +52,25 @@ export function loadAgentFile(path) {
68
52
  const m = /^---\n([\s\S]*?)\n---\n?([\s\S]*)$/.exec(src);
69
53
  if (!m)
70
54
  throw new Error(`agent file ${path}: missing "---" frontmatter block`);
71
- const fm = parseFrontmatter(m[1]);
55
+ const fm = parseFrontmatter(m[1], path);
72
56
  const persona = m[2].trim();
73
57
  const str = (k) => {
74
58
  const v = fm[k];
75
- if (Array.isArray(v))
59
+ if (v === undefined || v === null)
60
+ return undefined;
61
+ if (typeof v === "object")
76
62
  throw new Error(`agent file ${path}: "${k}" must be a scalar`);
77
- return v;
63
+ return String(v);
78
64
  };
79
65
  const list = (k) => {
80
66
  const v = fm[k];
81
- if (v === undefined)
67
+ if (v === undefined || v === null)
82
68
  return undefined;
83
- return Array.isArray(v) ? v : [v];
69
+ return (Array.isArray(v) ? v : [v]).map((x) => {
70
+ if (x === null || typeof x === "object")
71
+ throw new Error(`agent file ${path}: "${k}" list items must be scalars`);
72
+ return String(x);
73
+ });
84
74
  };
85
75
  const name = str("name");
86
76
  if (!name)
@@ -94,7 +84,7 @@ export function loadAgentFile(path) {
94
84
  // an unmigrated file would otherwise lose its read/post scope without warning (no silent degrade).
95
85
  for (const old of ["channels", "publish"])
96
86
  if (old in fm)
97
- throw new Error(`agent file ${path}: "${old}" was renamed use "subscribe"/"allowSubscribe" (read) and "allowPublish" (post)`);
87
+ throw new Error(`agent file ${path}: "${old}" was renamed - use "subscribe"/"allowSubscribe" (read) and "allowPublish" (post)`);
98
88
  const subscribe = list("subscribe");
99
89
  const allowSubscribe = list("allowSubscribe");
100
90
  const allowPublish = list("allowPublish");
@@ -121,7 +111,7 @@ export function loadAgentFile(path) {
121
111
  // channel can't be both at once. Fail loud (no silent no-op), matching the checks above.
122
112
  const both = (quiet ?? []).filter((c) => (muted ?? []).includes(c));
123
113
  if (both.length)
124
- throw new Error(`agent file ${path}: channel(s) [${both.join(", ")}] are in both quiet and muted pick one`);
114
+ throw new Error(`agent file ${path}: channel(s) [${both.join(", ")}] are in both quiet and muted - pick one`);
125
115
  for (const [field, chans] of [["quiet", quiet], ["muted", muted]])
126
116
  for (const ch of chans ?? []) {
127
117
  try {
@@ -135,13 +125,22 @@ export function loadAgentFile(path) {
135
125
  if (!channelInAllow(effAllow, ch))
136
126
  throw new Error(`agent file ${path}: ${field} channel "${ch}" is not within your read ACL / allowSubscribe [${effAllow.join(", ")}]`);
137
127
  }
128
+ // Opaque connector-specific launch options — a mapping core never interprets (each connector
129
+ // reads its own keys). A scalar/sequence here is a config error (it must be `key: value` pairs).
130
+ const launchOptionsRaw = fm["launchOptions"];
131
+ let launchOptions;
132
+ if (launchOptionsRaw !== undefined && launchOptionsRaw !== null) {
133
+ if (typeof launchOptionsRaw !== "object" || Array.isArray(launchOptionsRaw))
134
+ throw new Error(`agent file ${path}: "launchOptions" must be a mapping of key: value pairs`);
135
+ launchOptions = launchOptionsRaw;
136
+ }
138
137
  // Sweep every scalar frontmatter key we don't model into meta, verbatim — connector launcher
139
138
  // hints ride here so core stays ignorant of surface-specific keys.
140
- const known = new Set(["name", "role", "kind", "description", "tags", "subscribe", "allowSubscribe", "allowPublish", "quiet", "muted", "model", "variant", "capabilities", "owner"]);
139
+ const known = new Set(["name", "role", "kind", "description", "tags", "subscribe", "allowSubscribe", "allowPublish", "quiet", "muted", "model", "variant", "launchOptions", "capabilities", "owner"]);
141
140
  const meta = {};
142
141
  for (const [k, v] of Object.entries(fm))
143
- if (!known.has(k) && typeof v === "string")
144
- meta[k] = v;
142
+ if (!known.has(k) && v !== null && typeof v !== "object")
143
+ meta[k] = String(v);
145
144
  return {
146
145
  name,
147
146
  role: str("role"),
@@ -155,6 +154,7 @@ export function loadAgentFile(path) {
155
154
  muted,
156
155
  model: str("model"),
157
156
  variant: str("variant"),
157
+ launchOptions,
158
158
  capabilities: list("capabilities"),
159
159
  owner: str("owner"),
160
160
  meta: Object.keys(meta).length ? meta : undefined,
@@ -169,60 +169,45 @@ export function saveAgentFile(path, def) {
169
169
  if (!def.name)
170
170
  throw new Error('saveAgentFile: "name" is required');
171
171
  assertValidName(def.name);
172
- const lines = ["---", `name: ${fmScalar(def.name)}`];
172
+ // Build the frontmatter mapping in read order, then serialize with the `yaml` library — it owns
173
+ // all quoting/escaping (a value with a `:`/`#`/`[`/quote round-trips safely, which the old
174
+ // hand-rolled writer had to special-case). `lineWidth: 0` keeps scalars on one line (no folding).
175
+ const fm = { name: def.name };
173
176
  if (def.role)
174
- lines.push(`role: ${fmScalar(def.role)}`);
177
+ fm.role = def.role;
175
178
  if (def.kind)
176
- lines.push(`kind: ${fmScalar(def.kind)}`);
179
+ fm.kind = def.kind;
177
180
  if (def.description)
178
- lines.push(`description: ${fmScalar(def.description)}`);
181
+ fm.description = def.description;
179
182
  if (def.tags?.length)
180
- lines.push(`tags: [${def.tags.map(fmItem).join(", ")}]`);
183
+ fm.tags = def.tags;
181
184
  if (def.subscribe?.length)
182
- lines.push(`subscribe: [${def.subscribe.map(fmItem).join(", ")}]`);
185
+ fm.subscribe = def.subscribe;
183
186
  if (def.allowSubscribe?.length)
184
- lines.push(`allowSubscribe: [${def.allowSubscribe.map(fmItem).join(", ")}]`);
187
+ fm.allowSubscribe = def.allowSubscribe;
185
188
  if (def.allowPublish?.length)
186
- lines.push(`allowPublish: [${def.allowPublish.map(fmItem).join(", ")}]`);
189
+ fm.allowPublish = def.allowPublish;
187
190
  if (def.quiet?.length)
188
- lines.push(`quiet: [${def.quiet.map(fmItem).join(", ")}]`);
191
+ fm.quiet = def.quiet;
189
192
  if (def.muted?.length)
190
- lines.push(`muted: [${def.muted.map(fmItem).join(", ")}]`);
193
+ fm.muted = def.muted;
191
194
  if (def.model)
192
- lines.push(`model: ${fmScalar(def.model)}`);
195
+ fm.model = def.model;
193
196
  if (def.variant)
194
- lines.push(`variant: ${fmScalar(def.variant)}`);
197
+ fm.variant = def.variant;
198
+ if (def.launchOptions && Object.keys(def.launchOptions).length)
199
+ fm.launchOptions = def.launchOptions;
195
200
  if (def.capabilities?.length)
196
- lines.push(`capabilities: [${def.capabilities.map(fmItem).join(", ")}]`);
201
+ fm.capabilities = def.capabilities;
197
202
  if (def.owner)
198
- lines.push(`owner: ${fmScalar(def.owner)}`);
203
+ fm.owner = def.owner;
199
204
  if (def.meta)
200
205
  for (const [k, v] of Object.entries(def.meta))
201
- lines.push(`${k}: ${fmScalar(v)}`);
202
- lines.push("---");
206
+ fm[k] = v;
207
+ const frontmatter = stringifyYaml(fm, { lineWidth: 0 }).trimEnd();
203
208
  const body = def.persona ? `${def.persona.trim()}\n` : "";
204
209
  mkdirSync(dirname(path), { recursive: true });
205
- writeFileSync(path, `${lines.join("\n")}\n\n${body}`);
206
- }
207
- /** Render a frontmatter scalar so {@link loadAgentFile} reads it back unchanged. Quotes values
208
- * the parser would otherwise misread (a leading `[`, a `,`/`:`/`#`, edge whitespace, or empty);
209
- * throws on values the line-based format can't represent (a newline, or both quote styles). */
210
- function fmScalar(value) {
211
- if (/[\r\n]/.test(value))
212
- throw new Error(`saveAgentFile: value cannot contain a newline: ${JSON.stringify(value)}`);
213
- if (value !== "" && value === value.trim() && !/^[[]/.test(value) && !/[,:#"']/.test(value))
214
- return value;
215
- if (!value.includes('"'))
216
- return `"${value}"`;
217
- if (!value.includes("'"))
218
- return `'${value}'`;
219
- throw new Error(`saveAgentFile: value cannot contain both quote styles: ${JSON.stringify(value)}`);
220
- }
221
- /** A list item additionally cannot hold a comma — the parser splits on `,` before unquoting. */
222
- function fmItem(value) {
223
- if (value.includes(","))
224
- throw new Error(`saveAgentFile: list item cannot contain a comma: ${JSON.stringify(value)}`);
225
- return fmScalar(value);
210
+ writeFileSync(path, `---\n${frontmatter}\n---\n\n${body}`);
226
211
  }
227
212
  /** Resolve a name-or-path to an agent file. A path (absolute, contains a slash — `/` or, on
228
213
  * Windows, `\` — or ends in `.md`) is used as given; a bare name maps to the directory
@@ -1 +1 @@
1
- {"version":3,"file":"agent-file.js","sourceRoot":"","sources":["../src/agent-file.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACjE,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAE/D,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAE,kBAAkB,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAkDtF,iDAAiD;AACjD,SAAS,OAAO,CAAC,CAAS;IACxB,IAAI,CAAC,CAAC,CAAC,UAAU,CAAC,GAAG,CAAC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,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IAC9C,aAAa,CAAC,IAAI,EAAE,QAAQ,WAAW,YAAY,IAAI,EAAE,CAAC,CAAC;AAC7D,CAAC;AAED;;mDAEmD;AACnD,MAAM,UAAU,aAAa,CAAC,IAAY,EAAE,UAAkB;IAC5D,IAAI,UAAU,CAAC,UAAU,CAAC;QAAE,OAAO,UAAU,CAAC;IAC9C,IAAI,UAAU,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,UAAU,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,UAAU,CAAC,QAAQ,CAAC,KAAK,CAAC;QACrF,OAAO,OAAO,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC;IACnC,OAAO,IAAI,CAAC,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,GAAG,UAAU,KAAK,CAAC,CAAC;AAC5D,CAAC;AAED;;;kGAGkG;AAClG,MAAM,UAAU,aAAa,CAAC,IAAY,EAAE,KAAgC;IAC1E,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC;QAAE,OAAO,IAAI,CAAC;IAC9B,KAAK,IAAI,CAAC,GAAG,CAAC,GAAI,CAAC,EAAE,EAAE,CAAC;QACtB,MAAM,SAAS,GAAG,GAAG,IAAI,IAAI,CAAC,EAAE,CAAC;QACjC,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC;YAAE,OAAO,SAAS,CAAC;IAC1C,CAAC;AACH,CAAC"}
@@ -0,0 +1,207 @@
1
+ import { type Extension } from "./registry.js";
2
+ /**
3
+ * The one extension kind an identity/auth implementation registers so a composition root can turn
4
+ * on USER-MODE auth (the human-owner identity plane over per-agent NATS identity) WITHOUT importing
5
+ * that implementation. `@cotal-ai/auth` self-registers one on import; the `cotal` binary pulls the
6
+ * package in, and the CLI resolves it generically (`registry.all<AuthProvider>("auth-provider")`).
7
+ *
8
+ * Guarded core: this seam is IdP-agnostic and knows nothing about callouts, bearers, ledgers, or
9
+ * any concrete IdP. It exchanges a NARROW provisioning input (exactly the signing material the
10
+ * provider's function requires — never the whole space trust bundle) for the operator-signed
11
+ * accounts the broker config preloads, plus opaque client metadata and a service handle. All
12
+ * auth-specific substance stays behind these types.
13
+ *
14
+ * No provider registered ⇒ user-mode auth is unavailable and requesting it MUST fail loud (no
15
+ * static fallback) — a library root that never imports the auth package simply cannot serve a
16
+ * user-auth space.
17
+ */
18
+ export interface AuthProvider extends Extension {
19
+ readonly kind: "auth-provider";
20
+ /**
21
+ * Ensure this space's user-auth material exists under `input.dir` (generated + persisted on the
22
+ * first call, reused verbatim after — account identities and signing keys MUST be stable across
23
+ * restarts or previously-issued credentials break) and describe what the composition root must
24
+ * wire up. Idempotent. This call may hold the provisioning seeds BRIEFLY; the long-lived service
25
+ * process must load only provider-owned projected files written here, never the space's full
26
+ * trust bundle.
27
+ */
28
+ prepareServer(input: AuthPrepareInput): Promise<AuthPrepared>;
29
+ /**
30
+ * CLIENT side: produce the connect material for a user-mode space from THIS machine's session
31
+ * state (the login cache + the provider's space-scoped state under `dir`). `actor` is the
32
+ * ledger-granted agent-instance the caller connects as. Returns what {@link EndpointOptions}'
33
+ * user mode consumes (`bearer` + `sentinelCreds`). MUST fail loud with the EXACT operator
34
+ * action when anything is missing — not logged in (`cotal login --idp …`), the auth service
35
+ * down (how to restart it), the actor ungranted (how to grant) — and NEVER falls back to any
36
+ * other auth mode.
37
+ *
38
+ * `view` requests an ELEVATED per-connection profile (opaque to core; the provider validates it
39
+ * against its closed view enum and the fresh ledger grant) — the god-view/purge/registry-write/
40
+ * deploy connections the operator surfaces (`web`, `console`, `history clear`, `channels`,
41
+ * `spawn -f`) ride. An under-scoped or unknown view MUST fail loud with the exact re-grant.
42
+ */
43
+ userCredentials(opts: {
44
+ dir: string;
45
+ space: string;
46
+ actor: string;
47
+ view?: string;
48
+ }): Promise<{
49
+ bearer: string;
50
+ sentinelCreds: string;
51
+ }>;
52
+ /**
53
+ * The derived owner token (`u_…`) of THIS machine's cached login for the given space — resolved
54
+ * offline from the login session + the space's local user-auth material (no IdP round trip).
55
+ * The spawn paths use it to answer "whose agents are these": a foreground/manifest spawn runs
56
+ * the agents under the OPERATOR's owner. MUST fail loud when not logged in (naming the exact
57
+ * `cotal login --idp …` line) or when the space has no user-auth material under `dir`.
58
+ */
59
+ ownerForLogin(opts: {
60
+ dir: string;
61
+ space: string;
62
+ }): Promise<string>;
63
+ /**
64
+ * Read-only OFFLINE introspection for status surfaces (`cotal status`): this machine's cached
65
+ * login for the space and — where the space's ledger is locally readable — whether that login's
66
+ * `actor` is granted. Never network-bound and never a mint; "not signed in" is a REPORTED state
67
+ * here, not a thrown one. Throws only when the space has no user-auth material under `dir`
68
+ * (there is nothing to report status about).
69
+ */
70
+ userStatus(opts: {
71
+ dir: string;
72
+ space: string;
73
+ actor: string;
74
+ }): Promise<UserAuthStatus>;
75
+ /**
76
+ * SERVER side, agent lifecycle: author an agent grant for `(owner, actor)` in this space's
77
+ * ledger — the spawn path's half of "actors are server-ledger-authorized, never taken from
78
+ * connect payloads". Returns the ONE-TIME plaintext agent secret (persisted only as a hash;
79
+ * the caller delivers it to the agent process via a 0600 file and never sees it again) plus
80
+ * the sentinel creds the agent presents alongside its bearers. Upsert — re-granting an actor
81
+ * rotates its secret. MUST fail loud when the space has no user-auth material under `dir`.
82
+ */
83
+ grantAgent(opts: {
84
+ dir: string;
85
+ space: string;
86
+ owner: string;
87
+ actor: string;
88
+ scope: string[];
89
+ allowSubscribe: string[];
90
+ allowPublish: string[];
91
+ role?: string;
92
+ /** The spawning principal (`<owner>.<actor>` dot-form) — the grant's audit link. */
93
+ parent?: string;
94
+ label?: string;
95
+ }): Promise<{
96
+ actorToken: string;
97
+ sentinelCreds: string;
98
+ }>;
99
+ /** Revoke an agent grant. False when there was nothing to revoke. New exchanges and new
100
+ * connects die immediately (both boundaries read the ledger fresh); an already-live
101
+ * connection dies at its bearer-bound JWT expiry (live eviction is a separate lever). */
102
+ revokeAgent(opts: {
103
+ dir: string;
104
+ owner: string;
105
+ actor: string;
106
+ }): Promise<boolean>;
107
+ /**
108
+ * Read-only FRESH capability-scope read for one granted principal — `undefined` when the
109
+ * principal holds no grant (for an authorization read, unknowable is "no grant": fail-closed).
110
+ * Never a mint, never a write. The manager's named-target control authorization (owner-domain
111
+ * stop/attach) consults it for its else-branch — "does the caller hold `admin`?" — reading
112
+ * fresh so a scope edit bites the caller's next control op with no restart or reconnect.
113
+ */
114
+ actorScope(opts: {
115
+ dir: string;
116
+ owner: string;
117
+ actor: string;
118
+ }): Promise<string[] | undefined>;
119
+ /**
120
+ * Registry name of the provider's self-registered {@link Command} that prints ONE fresh agent
121
+ * bearer to stdout and exits (flags: `--dir <state-dir> --space <space> --owner <o> --actor <a>
122
+ * --token-file <path>`). A long-lived agent endpoint execs it per refresh — the exchange
123
+ * protocol, discovery, and secret handling stay entirely behind the provider; the agent-side
124
+ * runtime only runs an argv and reads a line. */
125
+ readonly agentBearerCommand: string;
126
+ }
127
+ /** The ONE registered auth provider, or a thrown sentence naming the fix. More than one registered
128
+ * is ambiguous and refuses just as loudly — there is no pick-the-first fallback. Lives in core so
129
+ * every surface that resolves the provider generically (CLI, manager) shares one resolution. */
130
+ export declare function resolveAuthProvider(): AuthProvider;
131
+ /** What {@link AuthProvider.userStatus} reports. Fields are absent when locally unknowable —
132
+ * absence is honest ("can't tell from here"), never a guess. */
133
+ export interface UserAuthStatus {
134
+ /** The space's pinned IdP base URL (always known — it is part of the user-auth material). */
135
+ idpUrl: string;
136
+ /** This machine's cached login for that IdP; absent = not signed in. */
137
+ login?: {
138
+ sub: string;
139
+ expiresAt: number;
140
+ };
141
+ /** The login's derived owner token (`u_…`) for this space. */
142
+ owner?: string;
143
+ /** The (owner, actor) interactive ledger row: its lists when granted, `"not-granted"` when the
144
+ * locally-readable ledger has no row. Absent when the ledger is not on this machine. */
145
+ grant?: {
146
+ scope: string[];
147
+ allowSubscribe: string[];
148
+ allowPublish: string[];
149
+ role?: string;
150
+ label?: string;
151
+ } | "not-granted";
152
+ }
153
+ /** The provisioning input — deliberately NARROW (a capability boundary, not a convenience): the
154
+ * operator seed signs the provider's dedicated account(s) once; the data-account signing seed is
155
+ * projected into the service's own key file because minting scoped data-account users at connect
156
+ * time IS the service's function. Nothing else of the space bundle crosses this seam. */
157
+ export interface AuthPrepareInput {
158
+ space: string;
159
+ /** The space operator's signing seed — used once per fresh space, to sign the provider's
160
+ * dedicated account(s) into the operator's trust chain. */
161
+ operatorSeed: string;
162
+ /** The data account users are bound into: its public key + the signing seed that mints its
163
+ * users (projected to the service's key file; the ACCOUNT seed itself never crosses). */
164
+ account: {
165
+ pub: string;
166
+ signingSeed: string;
167
+ };
168
+ /** The provider's OWN state dir. The caller keys it — today `<root>/.cotal/auth/<space>`; a
169
+ * future (broker, space) key is a caller change, never an on-disk format break. */
170
+ dir: string;
171
+ /** The operator's external identity-provider base URL (`up --user-auth --idp <url>`), OPAQUE to
172
+ * core — the provider pins/persists it (first call requires one; a later call must match the
173
+ * persisted pin or omit it; re-pointing an IdP is a migration, never a flag flip). */
174
+ idpUrl?: string;
175
+ }
176
+ /** What `prepareServer` hands back to the composition root. */
177
+ export interface AuthPrepared {
178
+ /** Operator-signed accounts the broker config must preload in its resolver (e.g. a dedicated
179
+ * callout account, which must never share the data account). */
180
+ extraAccounts: Array<{
181
+ pub: string;
182
+ jwt: string;
183
+ }>;
184
+ /** NON-SECRET client-facing metadata (trust pins, provider id) for the workstation layer's mesh
185
+ * registry, so connects from other directories can print exact recovery actions. Opaque to
186
+ * core — the workspace layer owns the concrete shape. */
187
+ publicAuth: Record<string, unknown>;
188
+ /** The long-lived auth service this space needs running alongside its broker. */
189
+ service: AuthServiceSpec;
190
+ }
191
+ /** The provider's daemon, by contract rather than convention: which registered {@link Command} to
192
+ * spawn (the CLI re-execs `cotal <command> --space … --server …` detached, pid/log space-scoped),
193
+ * and how to know it is actually SERVING — so `up` never records a usable user mesh on a
194
+ * half-started service, and never invents ad-hoc readiness sleeps. */
195
+ export interface AuthServiceSpec {
196
+ /** Registry name of the self-registered daemon command (e.g. `"auth-service"`). Resolved through
197
+ * the command registry and exec'd as argv — never shell-interpolated. */
198
+ command: string;
199
+ /** Wait until the running service is READY (every plane bound — e.g. broker subscription AND
200
+ * local endpoints). Resolves with the service's runtime, non-secret endpoint metadata for the
201
+ * mesh registry; THROWS (with the reason) on timeout — the caller surfaces it, loudly. */
202
+ ready(opts: {
203
+ dir: string;
204
+ timeoutMs?: number;
205
+ }): Promise<Record<string, unknown>>;
206
+ }
207
+ //# sourceMappingURL=auth-provider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auth-provider.d.ts","sourceRoot":"","sources":["../src/auth-provider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,KAAK,SAAS,EAAE,MAAM,eAAe,CAAC;AAEzD;;;;;;;;;;;;;;;GAeG;AACH,MAAM,WAAW,YAAa,SAAQ,SAAS;IAC7C,QAAQ,CAAC,IAAI,EAAE,eAAe,CAAC;IAC/B;;;;;;;OAOG;IACH,aAAa,CAAC,KAAK,EAAE,gBAAgB,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;IAC9D;;;;;;;;;;;;;OAaG;IACH,eAAe,CAAC,IAAI,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,aAAa,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACxI;;;;;;OAMG;IACH,aAAa,CAAC,IAAI,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IACrE;;;;;;OAMG;IACH,UAAU,CAAC,IAAI,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC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@ -0,0 +1,13 @@
1
+ import { registry } from "./registry.js";
2
+ /** The ONE registered auth provider, or a thrown sentence naming the fix. More than one registered
3
+ * is ambiguous and refuses just as loudly — there is no pick-the-first fallback. Lives in core so
4
+ * every surface that resolves the provider generically (CLI, manager) shares one resolution. */
5
+ export function resolveAuthProvider() {
6
+ const providers = registry.all("auth-provider");
7
+ if (providers.length === 0)
8
+ throw new Error("no auth provider is registered in this build - user auth needs one (the `cotal` binary registers @cotal-ai/auth; a custom composition root must import an auth package)");
9
+ if (providers.length > 1)
10
+ throw new Error(`multiple auth providers registered (${providers.map((p) => p.name).join(", ")}) - cannot choose between them`);
11
+ return providers[0];
12
+ }
13
+ //# sourceMappingURL=auth-provider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auth-provider.js","sourceRoot":"","sources":["../src/auth-provider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAkB,MAAM,eAAe,CAAC;AAsGzD;;iGAEiG;AACjG,MAAM,UAAU,mBAAmB;IACjC,MAAM,SAAS,GAAG,QAAQ,CAAC,GAAG,CAAe,eAAe,CAAC,CAAC;IAC9D,IAAI,SAAS,CAAC,MAAM,KAAK,CAAC;QACxB,MAAM,IAAI,KAAK,CACb,yKAAyK,CAC1K,CAAC;IACJ,IAAI,SAAS,CAAC,MAAM,GAAG,CAAC;QACtB,MAAM,IAAI,KAAK,CAAC,uCAAuC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,gCAAgC,CAAC,CAAC;IAClI,OAAO,SAAS,CAAC,CAAC,CAAC,CAAC;AACtB,CAAC"}
@@ -66,6 +66,9 @@ export declare function seedChannelRegistry(opts: {
66
66
  servers: string;
67
67
  space: string;
68
68
  creds?: string;
69
+ /** User mode: a `channel-writer`-view bearer + the space's sentinel creds (instead of a creds file). */
70
+ bearer?: string;
71
+ sentinelCreds?: string;
69
72
  file: ChannelRegistryFile;
70
73
  }): Promise<void>;
71
74
  /** Write the space-wide default delivery class at space creation IF it is not already set (SPEC §4:
@@ -89,6 +92,9 @@ export declare function deleteChannels(opts: {
89
92
  servers: string;
90
93
  space: string;
91
94
  creds?: string;
95
+ /** User mode: a `channel-writer`-view bearer + the space's sentinel creds (instead of a creds file). */
96
+ bearer?: string;
97
+ sentinelCreds?: string;
92
98
  channels: string[];
93
99
  }): Promise<void>;
94
100
  /** Connect, read the whole registry (defaults + every channel entry) into a
@@ -98,5 +104,9 @@ export declare function readChannelRegistry(opts: {
98
104
  servers: string;
99
105
  space: string;
100
106
  creds?: string;
107
+ /** User mode: the caller's OWN agent-view bearer + the space's sentinel creds — the registry is
108
+ * world-readable in-space, so no elevated view is needed for the read side. */
109
+ bearer?: string;
110
+ sentinelCreds?: string;
101
111
  }): Promise<ChannelRegistryFile>;
102
112
  //# sourceMappingURL=channels.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"channels.d.ts","sourceRoot":"","sources":["../src/channels.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,EAAO,KAAK,EAAE,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EAA+B,KAAK,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAG3F,OAAO,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAEhF,mFAAmF;AACnF,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,EAAE,eAAe,CAAC;IAC3B,yCAAyC;IACzC,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;CAC1C;AAED;iFACiF;AACjF,eAAO,MAAM,uBAAuB,MAAM,CAAC;AAC3C,eAAO,MAAM,wBAAwB,OAAO,CAAC;AAE7C;yDACyD;AACzD,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,aAAa,GAAG,IAAI,CAgB9D;AAED;;sDAEsD;AACtD,wBA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