@cotal-ai/core 0.8.2 → 0.8.3

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.
@@ -23,6 +23,12 @@ export interface LaunchOpts {
23
23
  subscribe?: string[];
24
24
  allowSubscribe?: string[];
25
25
  allowPublish?: string[];
26
+ /** Control-plane capabilities the manager granted this agent (e.g. `["spawn"]`) — the SAME set
27
+ * the creds were provisioned from. Forwarded as `COTAL_CAPABILITIES` so the connector exposes the
28
+ * matching control-plane tools (cotal_spawn / cotal_persona). Without it a manifest-spawned agent —
29
+ * whose materialized persona carries no `capabilities:` frontmatter — gets none, so those tools stay
30
+ * hidden even though its creds authorize them. */
31
+ capabilities?: string[];
26
32
  /** Path to an agent definition file (`.cotal/agents/<name>.md`). The connector
27
33
  * passes it through (`COTAL_AGENT_FILE`) so the joined session reads its own
28
34
  * card from it, and applies the file's persona/model at launch. */
@@ -35,9 +41,10 @@ export interface LaunchOpts {
35
41
  * that support an auto-submitted first prompt (Claude Code) deliver it; others
36
42
  * ignore it. Used to make a driving session greet the operator on launch. */
37
43
  prompt?: string;
38
- /** Mirror this session's transcript to `tr-<name>` so peers/observers can read what
39
- * the agent actually did (sets `COTAL_TRANSCRIPT`). Defaults to OFF; set `true` to
40
- * opt in — surfaced as the `--transcript` flag on `cotal spawn` / `cotal start`. */
44
+ /** Mirror this session's transcript to the connector's per-agent transcript channel (see
45
+ * {@link Connector.transcriptChannel}) so peers/observers can read what the agent actually did
46
+ * (sets `COTAL_TRANSCRIPT`). Defaults to OFF; set `true` to opt in — surfaced as the `--transcript`
47
+ * flag on `cotal spawn` / `cotal start`. */
41
48
  transcript?: boolean;
42
49
  /** Operator MCP servers to SHARE with this agent, resolved from the cotal config by the caller
43
50
  * (see {@link connectorServers}). Keyed by server name, `.mcp.json`-shaped, with `${VAR}`
@@ -84,6 +91,15 @@ export interface Connector extends Extension {
84
91
  readonly kind: "connector";
85
92
  readonly name: string;
86
93
  buildLaunch(opts: LaunchOpts): LaunchSpec;
94
+ /** The channel this connector publishes an agent's transcript mirror to (see
95
+ * {@link LaunchOpts.transcript}). OPTIONAL — like {@link LaunchOpts.prompt}, only connectors that
96
+ * actually mirror (Claude Code, OpenCode) implement it; one that doesn't (e.g. Hermes) omits it. The
97
+ * naming convention is the CONNECTOR's, not the wire standard, so it's defined in the extension, not
98
+ * core. The manager calls it to grant the agent publish rights on its transcript channel at provision
99
+ * time (auth-mode publish is default-deny), so the grant and what the connector publishes to come from
100
+ * one source and can't drift. If `transcript` is requested for a connector that lacks this, the
101
+ * manager fails loud rather than silently skipping the grant. */
102
+ transcriptChannel?(name: string): string;
87
103
  /** External executables this connector invokes beyond `LaunchSpec.command` (e.g. the
88
104
  * `claude` / `opencode` CLI). A preflight PATH hint, not a full environment validator: the
89
105
  * manager checks each is on PATH before spawning and fails with a clear error naming the
@@ -1 +1 @@
1
- {"version":3,"file":"connector.d.ts","sourceRoot":"","sources":["../src/connector.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAE3D,oFAAoF;AACpF,MAAM,WAAW,UAAU;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;8EAE0E;IAC1E,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ;mDAC+C;IAC/C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;;;;qDAMiD;IACjD,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;IACrB,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAC1B,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB;;wEAEoE;IACpE,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;0GAEsG;IACtG,KAAK,CA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AM,CAAC;IACtB,WAAW,CAAC,IAAI,EAAE,UAAU,GAAG,UAAU,CAAC;IAC1C;;;;;;;sEAOkE;IAClE,iBAAiB,CAAC,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC;IACzC;;;;yCAIqC;IACrC,QAAQ,CAAC,QAAQ,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IACtC;;;+DAG2D;IAC3D,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;CAC9B"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cotal-ai/core",
3
3
  "description": "The Cotal protocol: endpoint, subjects, message types, the NATS client layer, and the extension contracts.",
4
- "version": "0.8.2",
4
+ "version": "0.8.3",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
7
7
  "type": "git",