@cotal-ai/connector-opencode 0.6.0 → 0.8.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.
@@ -1 +1 @@
1
- {"version":3,"file":"extension.d.ts","sourceRoot":"","sources":["../src/extension.ts"],"names":[],"mappings":"AAEA,OAAO,EAA2B,KAAK,SAAS,EAAoC,MAAM,gBAAgB,CAAC;AAa3G;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,iBAAiB,EAAE,SAsE/B,CAAC"}
1
+ {"version":3,"file":"extension.d.ts","sourceRoot":"","sources":["../src/extension.ts"],"names":[],"mappings":"AAEA,OAAO,EAA2B,KAAK,SAAS,EAAoC,MAAM,gBAAgB,CAAC;AAa3G;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,iBAAiB,EAAE,SA2E/B,CAAC"}
package/dist/extension.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { fileURLToPath } from "node:url";
2
2
  import { resolve } from "node:path";
3
3
  import { loadAgentFile, registry } from "@cotal-ai/core";
4
- import { launchEnv, MODEL_PROVIDER_KEYS } from "@cotal-ai/connector-core";
4
+ import { aclEnv, launchEnv, MODEL_PROVIDER_KEYS } from "@cotal-ai/connector-core";
5
5
  /** The bundled in-process plugin (esbuild → `dist/plugin.bundle.js`). `opencode serve` loads it by
6
6
  * absolute path from the inline config, so it runs *inside* the server and shares its SDK client.
7
7
  * Resolved relative to this module — beside the built `dist/extension.js`, so the connector must be
@@ -27,6 +27,7 @@ const SERVE_SHIM = fileURLToPath(new URL("./serve.js", import.meta.url));
27
27
  export const opencodeConnector = {
28
28
  kind: "connector",
29
29
  name: "opencode",
30
+ requires: ["opencode"],
30
31
  buildLaunch(opts) {
31
32
  // Tool-sharing isn't wired for opencode: its OPENCODE_CONFIG_CONTENT is a merge layer, so an
32
33
  // opencode agent already INHERITS the operator's MCP servers (the opposite default to Claude's
@@ -44,6 +45,7 @@ export const opencodeConnector = {
44
45
  // unrelated secrets don't reach the child (P3).
45
46
  const env = {
46
47
  ...launchEnv({ providerKeys: MODEL_PROVIDER_KEYS }),
48
+ ...aclEnv(opts),
47
49
  COTAL_SPACE: opts.space,
48
50
  COTAL_NAME: opts.name,
49
51
  };
@@ -75,16 +77,19 @@ export const opencodeConnector = {
75
77
  // An agent file carries identity (read in-session via COTAL_AGENT_FILE) plus persona + model.
76
78
  // The model is a config default (the session — and the attached TUI — use it); the persona is
77
79
  // applied in-session by the plugin (opencode has no `--append-system-prompt`).
80
+ let model = opts.model;
78
81
  if (opts.configPath) {
79
82
  const path = resolve(opts.configPath);
80
83
  env.COTAL_AGENT_FILE = path; // plugin reads persona from it
81
84
  const def = loadAgentFile(path);
82
- if (def.model)
83
- config.model = def.model;
85
+ model ??= def.model;
84
86
  const face = def.meta?.face;
85
87
  if (face)
86
88
  env.COTAL_FACE_PERSONA = face; // shim swaps the TUI for the face viewer
87
89
  }
90
+ // The `--model` flag wins over the agent file, and applies even with no agent file.
91
+ if (model)
92
+ config.model = model;
88
93
  env.OPENCODE_CONFIG_CONTENT = JSON.stringify(config);
89
94
  // Run the shim (node dist/serve.js): `opencode serve` + an attached foreground TUI.
90
95
  return {
@@ -1 +1 @@
1
- {"version":3,"file":"extension.js","sourceRoot":"","sources":["../src/extension.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAoD,MAAM,gBAAgB,CAAC;AAC3G,OAAO,EAAE,SAAS,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAE1E;;;oCAGoC;AACpC,MAAM,YAAY,GAAG,aAAa,CAAC,IAAI,GAAG,CAAC,oBAAoB,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;AAEnF;uFACuF;AACvF,MAAM,UAAU,GAAG,aAAa,CAAC,IAAI,GAAG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CAAC,QAAQ,CAAC,iBAAiB,CAAC,CAAC"}
@@ -6430,7 +6430,7 @@ var require_authenticator = __commonJS({
6430
6430
  exports.tokenAuthenticator = tokenAuthenticator;
6431
6431
  exports.nkeyAuthenticator = nkeyAuthenticator;
6432
6432
  exports.jwtAuthenticator = jwtAuthenticator;
6433
- exports.credsAuthenticator = credsAuthenticator6;
6433
+ exports.credsAuthenticator = credsAuthenticator7;
6434
6434
  var nkeys_1 = require_nkeys2();
6435
6435
  var encoders_1 = require_encoders();
6436
6436
  function multiAuthenticator(authenticators) {
@@ -6480,7 +6480,7 @@ var require_authenticator = __commonJS({
6480
6480
  return { jwt: jwt2, nkey, sig };
6481
6481
  };
6482
6482
  }
6483
- function credsAuthenticator6(creds) {
6483
+ function credsAuthenticator7(creds) {
6484
6484
  const fn = typeof creds !== "function" ? () => creds : creds;
6485
6485
  const parse3 = () => {
6486
6486
  const CREDS = /\s*(?:(?:[-]{3,}[^\n]*[-]{3,}\n)(.+)(?:\n\s*[-]{3,}[^\n]*[-]{3,}\n))/ig;
@@ -13610,11 +13610,11 @@ var require_connect = __commonJS({
13610
13610
  "../../node_modules/.pnpm/@nats-io+transport-node@3.4.0/node_modules/@nats-io/transport-node/lib/connect.js"(exports) {
13611
13611
  "use strict";
13612
13612
  Object.defineProperty(exports, "__esModule", { value: true });
13613
- exports.connect = connect6;
13613
+ exports.connect = connect7;
13614
13614
  var node_transport_1 = require_node_transport();
13615
13615
  var nats_base_client_1 = require_nats_base_client();
13616
13616
  var nats_base_client_2 = require_nats_base_client();
13617
- function connect6(opts = {}) {
13617
+ function connect7(opts = {}) {
13618
13618
  if ((0, nats_base_client_2.hasWsProtocol)(opts)) {
13619
13619
  return Promise.reject(nats_base_client_2.errors.InvalidArgumentError.format(`servers`, `node client doesn't support websockets, use the 'wsconnect' function instead`));
13620
13620
  }
@@ -13806,7 +13806,7 @@ var require_kv = __commonJS({
13806
13806
  throw new Error(`invalid bucket name: ${name}`);
13807
13807
  }
13808
13808
  }
13809
- var Kvm8 = class {
13809
+ var Kvm9 = class {
13810
13810
  js;
13811
13811
  /**
13812
13812
  * Creates an instance of the Kv that allows you to create and access KV stores.
@@ -13872,7 +13872,7 @@ var require_kv = __commonJS({
13872
13872
  return new internal_2.ListerImpl(subj, filter, this.js);
13873
13873
  }
13874
13874
  };
13875
- exports.Kvm = Kvm8;
13875
+ exports.Kvm = Kvm9;
13876
13876
  var Bucket = class _Bucket {
13877
13877
  js;
13878
13878
  jsm;
@@ -14846,6 +14846,10 @@ function aclBucket(space) {
14846
14846
  function aclKey(owner) {
14847
14847
  return token(owner);
14848
14848
  }
14849
+ function membershipBucket(space) {
14850
+ return `cotal_membership_${token(space)}`;
14851
+ }
14852
+ var MEMBERSHIP_FEED_KEY = "=feed";
14849
14853
  function deliveryBucket(space) {
14850
14854
  return `cotal_delivery_${token(space)}`;
14851
14855
  }
@@ -16609,6 +16613,7 @@ var import_kv = __toESM(require_mod6(), 1);
16609
16613
  var MAX_MSGS_PER_SUBJECT = 1e3;
16610
16614
  var PLANE3_DEDUP_WINDOW_MS = 2 * 60 * 60 * 1e3;
16611
16615
  var DINBOX_MAX_ACK_PENDING = 1e3;
16616
+ var MEMBERSHIP_MAX_BYTES = 64 * 1024 * 1024;
16612
16617
  async function createSpaceStreams(jsm, space) {
16613
16618
  const p = spacePrefix(space);
16614
16619
  await jsm.streams.add({
@@ -16905,11 +16910,15 @@ async function commitAcl(kv, owner, allowSubscribe) {
16905
16910
  throw new Error(`acl CAS exhausted retries for ${owner}`);
16906
16911
  }
16907
16912
 
16908
- // ../../packages/core/dist/lease.js
16909
- var import_kv5 = __toESM(require_mod6(), 1);
16913
+ // ../../packages/core/dist/membership-feed.js
16910
16914
  var import_transport_node3 = __toESM(require_transport_node(), 1);
16915
+ var import_kv5 = __toESM(require_mod6(), 1);
16916
+
16917
+ // ../../packages/core/dist/lease.js
16918
+ var import_kv6 = __toESM(require_mod6(), 1);
16919
+ var import_transport_node4 = __toESM(require_transport_node(), 1);
16911
16920
  async function openDeliveryRegistry(nc, space) {
16912
- return new import_kv5.Kvm(nc).open(deliveryBucket(space));
16921
+ return new import_kv6.Kvm(nc).open(deliveryBucket(space));
16913
16922
  }
16914
16923
 
16915
16924
  // ../../packages/core/dist/agent-file.js
@@ -17025,11 +17034,11 @@ function loadAgentFile(path) {
17025
17034
  }
17026
17035
 
17027
17036
  // ../../packages/core/dist/endpoint.js
17028
- var import_transport_node4 = __toESM(require_transport_node(), 1);
17037
+ var import_transport_node5 = __toESM(require_transport_node(), 1);
17029
17038
  import { EventEmitter } from "node:events";
17030
17039
  import { randomUUID } from "node:crypto";
17031
17040
  var import_jetstream2 = __toESM(require_mod4(), 1);
17032
- var import_kv6 = __toESM(require_mod6(), 1);
17041
+ var import_kv7 = __toESM(require_mod6(), 1);
17033
17042
  var DEFAULT_SERVER = "nats://127.0.0.1:4222";
17034
17043
  var READER_MAX_REDELIVERIES = 10;
17035
17044
  var CotalEndpoint = class extends EventEmitter {
@@ -17059,6 +17068,7 @@ var CotalEndpoint = class extends EventEmitter {
17059
17068
  membersKv;
17060
17069
  aclKv;
17061
17070
  deliveryKv;
17071
+ membershipKv;
17062
17072
  /** The live `ctl.delivery` serve subscription (delivery daemon) — re-created on every (re)connect by
17063
17073
  * {@link armDeliveryControl}; tracked so the stale one is dropped on reconnect. */
17064
17074
  deliveryServeSub;
@@ -17177,7 +17187,7 @@ var CotalEndpoint = class extends EventEmitter {
17177
17187
  * idempotent (durables bind by name, JetStream dedups by msgID, KV opens are idempotent). */
17178
17188
  async connectAndBind() {
17179
17189
  this.clearConnectionScoped();
17180
- this.nc = await (0, import_transport_node4.connect)({
17190
+ this.nc = await (0, import_transport_node5.connect)({
17181
17191
  servers: this.servers,
17182
17192
  name: `cotal:${this.card.name}`,
17183
17193
  // Per-identity inbox namespace (the "Private Inbox" pattern). nats.js routes ALL
@@ -17191,7 +17201,7 @@ var CotalEndpoint = class extends EventEmitter {
17191
17201
  this.watchStatus();
17192
17202
  this.js = (0, import_jetstream2.jetstream)(this.nc);
17193
17203
  if (this.doWatch || this.doRegister) {
17194
- const kvm = new import_kv6.Kvm(this.nc);
17204
+ const kvm = new import_kv7.Kvm(this.nc);
17195
17205
  this.kv = this.creds ? await kvm.open(presenceBucket(this.space)) : await kvm.create(presenceBucket(this.space), { ttl: this.ttlMs });
17196
17206
  }
17197
17207
  if (this.doWatch) {
@@ -17733,6 +17743,57 @@ var CotalEndpoint = class extends EventEmitter {
17733
17743
  arr.sort(byName);
17734
17744
  return map2;
17735
17745
  }
17746
+ /** Lazily open the derived membership feed KV (admin/observer read; the delivery daemon writes it).
17747
+ * Read-only here — the dashboard consumes it; agents hold no grant and never call this. */
17748
+ async membershipRegistry() {
17749
+ if (!this.nc)
17750
+ throw new Error("endpoint not started");
17751
+ this.membershipKv ??= await new import_kv7.Kvm(this.nc).open(membershipBucket(this.space));
17752
+ return this.membershipKv;
17753
+ }
17754
+ /**
17755
+ * Snapshot the broker-sourced channel-membership feed (admin/observer read): every agent's
17756
+ * `{live, durable}` record plus `asOf` — the feed's freshness heartbeat (epoch ms of the daemon's last
17757
+ * successful poll, from the reserved {@link MEMBERSHIP_FEED_KEY}). `live` patterns are kept as-is
17758
+ * (wildcards preserved); the consumer expands them against the channel registry. `asOf` is undefined
17759
+ * when the feed has never been written (no daemon → the dashboard degrades to traffic-only).
17760
+ */
17761
+ async readMembership() {
17762
+ const kv = await this.membershipRegistry();
17763
+ const members = [];
17764
+ let asOf;
17765
+ for await (const key of await kv.keys()) {
17766
+ const e = await kv.get(key);
17767
+ if (!e || e.operation === "DEL" || e.operation === "PURGE")
17768
+ continue;
17769
+ if (key === MEMBERSHIP_FEED_KEY) {
17770
+ try {
17771
+ asOf = e.json().observedAt;
17772
+ } catch {
17773
+ }
17774
+ continue;
17775
+ }
17776
+ try {
17777
+ const rec = e.json();
17778
+ members.push({ id: key, live: rec.live ?? [], durable: rec.durable ?? [], observedAt: rec.observedAt });
17779
+ } catch {
17780
+ }
17781
+ }
17782
+ return { asOf, members };
17783
+ }
17784
+ /** Watch the membership feed for changes (admin/observer): `onChange` fires on every KV entry,
17785
+ * including the initial replay — the caller debounces + re-reads {@link readMembership}. Returns a
17786
+ * stop handle. Best-effort: a feed the cred can't read (or absent) surfaces as an `error` event and
17787
+ * the dashboard keeps its last snapshot. */
17788
+ async watchMembership(onChange) {
17789
+ const kv = await this.membershipRegistry();
17790
+ const iter = await kv.watch();
17791
+ void (async () => {
17792
+ for await (const _ of iter)
17793
+ onChange();
17794
+ })().catch((err2) => this.emit("error", err2));
17795
+ return { stop: () => iter.stop() };
17796
+ }
17736
17797
  /** Fetch recent messages from a channel's JetStream backlog. */
17737
17798
  async channelHistory(channel, opts) {
17738
17799
  return this.streamHistory(chatStream(this.space), chatSubject(this.space, "*", channel), opts?.limit ?? 100);
@@ -17783,7 +17844,7 @@ var CotalEndpoint = class extends EventEmitter {
17783
17844
  for await (const s of this.nc.status()) {
17784
17845
  if (s.type !== "error")
17785
17846
  continue;
17786
- if (s.error instanceof import_transport_node4.PermissionViolationError && this.confirmingChatSubs.has(s.error.subject))
17847
+ if (s.error instanceof import_transport_node5.PermissionViolationError && this.confirmingChatSubs.has(s.error.subject))
17787
17848
  continue;
17788
17849
  this.emit("error", describeStatusError(s.error));
17789
17850
  }
@@ -18056,7 +18117,7 @@ var CotalEndpoint = class extends EventEmitter {
18056
18117
  filter_subject: subject,
18057
18118
  ack_policy: import_jetstream2.AckPolicy.None,
18058
18119
  mem_storage: true,
18059
- inactive_threshold: (0, import_transport_node4.nanos)(3e4),
18120
+ inactive_threshold: (0, import_transport_node5.nanos)(3e4),
18060
18121
  deliver_policy: import_jetstream2.DeliverPolicy.StartSequence,
18061
18122
  opt_start_seq: fromSeqExcl + 1
18062
18123
  });
@@ -18456,7 +18517,7 @@ var CotalEndpoint = class extends EventEmitter {
18456
18517
  * distinct from a responder that errored. nats.js surfaces it as NoRespondersError, or a RequestError
18457
18518
  * whose `isNoResponders()` is true. */
18458
18519
  isNoResponders(e) {
18459
- return e instanceof import_transport_node4.NoRespondersError || e instanceof import_transport_node4.RequestError && e.isNoResponders();
18520
+ return e instanceof import_transport_node5.NoRespondersError || e instanceof import_transport_node5.RequestError && e.isNoResponders();
18460
18521
  }
18461
18522
  /** Agent-side: this session's CURRENT durable memberships (channel + join generation) from the
18462
18523
  * manager — the agent holds no read on the privileged members KV. `undefined` ⇒ NO control responder
@@ -18799,7 +18860,7 @@ var CotalEndpoint = class extends EventEmitter {
18799
18860
  filter_subject: subject,
18800
18861
  ack_policy: import_jetstream2.AckPolicy.None,
18801
18862
  mem_storage: true,
18802
- inactive_threshold: (0, import_transport_node4.nanos)(3e4),
18863
+ inactive_threshold: (0, import_transport_node5.nanos)(3e4),
18803
18864
  ..."time" in start ? { deliver_policy: import_jetstream2.DeliverPolicy.StartTime, opt_start_time: start.time.toISOString() } : { deliver_policy: import_jetstream2.DeliverPolicy.StartSequence, opt_start_seq: start.seq }
18804
18865
  });
18805
18866
  try {
@@ -18948,7 +19009,7 @@ var CotalEndpoint = class extends EventEmitter {
18948
19009
  }
18949
19010
  }
18950
19011
  async publishPresence() {
18951
- if (!this.kv)
19012
+ if (!this.doRegister || !this.kv)
18952
19013
  return;
18953
19014
  const p = {
18954
19015
  card: this.card,
@@ -19089,28 +19150,28 @@ function authOpts(a) {
19089
19150
  if (a.creds) {
19090
19151
  if (a.token || a.user || a.pass)
19091
19152
  throw new Error("creds are mutually exclusive with token/user/pass auth");
19092
- return { authenticator: (0, import_transport_node4.credsAuthenticator)(new TextEncoder().encode(a.creds)), tls };
19153
+ return { authenticator: (0, import_transport_node5.credsAuthenticator)(new TextEncoder().encode(a.creds)), tls };
19093
19154
  }
19094
19155
  return { token: a.token, user: a.user, pass: a.pass, tls };
19095
19156
  }
19096
19157
  function describeStatusError(err2) {
19097
- if (err2 instanceof import_transport_node4.PermissionViolationError) {
19158
+ if (err2 instanceof import_transport_node5.PermissionViolationError) {
19098
19159
  return new Error(`NATS permission denied: cannot ${err2.operation} "${err2.subject}" \u2014 check this endpoint's ACLs (a denied peer looks "absent" rather than blocked)`, { cause: err2 });
19099
19160
  }
19100
19161
  return err2;
19101
19162
  }
19102
19163
  function isPermissionDenied(e) {
19103
- if (e instanceof import_transport_node4.PermissionViolationError)
19164
+ if (e instanceof import_transport_node5.PermissionViolationError)
19104
19165
  return true;
19105
- if (e?.cause instanceof import_transport_node4.PermissionViolationError)
19166
+ if (e?.cause instanceof import_transport_node5.PermissionViolationError)
19106
19167
  return true;
19107
19168
  return /permissions?\s+violation/i.test(String(e?.message ?? ""));
19108
19169
  }
19109
19170
 
19110
19171
  // ../../packages/core/dist/spaces.js
19111
- var import_transport_node5 = __toESM(require_transport_node(), 1);
19172
+ var import_transport_node6 = __toESM(require_transport_node(), 1);
19112
19173
  var import_jetstream3 = __toESM(require_mod4(), 1);
19113
- var import_kv7 = __toESM(require_mod6(), 1);
19174
+ var import_kv8 = __toESM(require_mod6(), 1);
19114
19175
 
19115
19176
  // ../../packages/core/dist/registry.js
19116
19177
  var Registry = class {
@@ -19198,7 +19259,7 @@ function configFromEnv(env = process.env) {
19198
19259
  subscribe: resolvedSubscribe,
19199
19260
  allowSubscribe: resolvedAllowSub,
19200
19261
  // Post ACL is default-DENY: only what's explicitly declared (env > agent-file). The broker
19201
- // enforces it under auth; in open mode posting is unrestricted regardless (see laneLine).
19262
+ // enforces it under auth; in open mode posting is unrestricted regardless.
19202
19263
  allowPublish: resolvedAllowPub,
19203
19264
  quiet: resolvedQuiet,
19204
19265
  muted: resolvedMuted,
@@ -19576,10 +19637,16 @@ var MeshAgent = class extends EventEmitter2 {
19576
19637
  // ---- supervision ---------------------------------------------------------
19577
19638
  /** Ask the manager to spawn a new teammate into this space (its `start` op).
19578
19639
  * How it lands — a detached PTY, a tmux window, a cmux tab — is the manager's
19579
- * runtime; from here it just joins the mesh as a lateral peer. */
19580
- async spawn(name, role) {
19640
+ * runtime; from here it just joins the mesh as a lateral peer. `opts.agent` picks
19641
+ * the harness (default the manager's `cotal`/Claude) and `opts.model` overrides the
19642
+ * persona file's `model:` — the same knobs the operator's `cotal start` carries, so
19643
+ * the agent and operator spawn doors share one control-op contract. */
19644
+ async spawn(name, role, opts) {
19581
19645
  this.assertConnected();
19582
- return this.ep.requestControl(CONTROL_PRIVILEGED, { op: "start", args: { name, role } });
19646
+ return this.ep.requestControl(CONTROL_PRIVILEGED, {
19647
+ op: "start",
19648
+ args: { name, role, agent: opts?.agent, model: opts?.model }
19649
+ });
19583
19650
  }
19584
19651
  /** Ask the manager to tear a teammate down (its `stop` op). Graceful by default —
19585
19652
  * the session is told to exit cleanly (so it leaves the mesh) before the
@@ -34270,6 +34337,67 @@ function date4(params) {
34270
34337
  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/classic/external.js
34271
34338
  config(en_default());
34272
34339
 
34340
+ // ../connector-core/dist/orientation.js
34341
+ var ORIENTATION_BOOTSTRAP = "Start with cotal_orientation \u2014 it shows your identity, the channels you can read and post to, your capabilities, the tools available to you, and who's present.";
34342
+ var CORE_TOOLS = /* @__PURE__ */ new Set([
34343
+ "cotal_inbox",
34344
+ "cotal_send",
34345
+ "cotal_dm",
34346
+ "cotal_anycast",
34347
+ "cotal_roster",
34348
+ "cotal_status"
34349
+ ]);
34350
+ function buildOrientation(agent, config2, visibleTools, generatedAt) {
34351
+ const core = [];
34352
+ const more = [];
34353
+ for (const t of visibleTools) {
34354
+ if (t.name === "cotal_orientation")
34355
+ continue;
34356
+ (CORE_TOOLS.has(t.name) ? core : more).push(t);
34357
+ }
34358
+ const peers = agent.roster().filter((p) => p.card.id !== agent.id);
34359
+ const shown = peers.slice(0, 8).map((p) => `${p.card.role ? `${p.card.name}/${p.card.role}` : p.card.name} (${p.status})`);
34360
+ const summary = peers.length ? shown.join(", ") + (peers.length > shown.length ? `, +${peers.length - shown.length} more` : "") : "no other peers present";
34361
+ return {
34362
+ v: 1,
34363
+ generatedAt,
34364
+ identity: { name: config2.name, role: config2.role, space: config2.space, id: agent.id },
34365
+ access: {
34366
+ authMode: !!config2.creds,
34367
+ read: config2.subscribe,
34368
+ readAcl: config2.allowSubscribe,
34369
+ post: config2.allowPublish
34370
+ },
34371
+ capabilities: config2.capabilities ?? [],
34372
+ tools: { core, more },
34373
+ peers: { present: peers.length, summary },
34374
+ status: agent.status,
34375
+ attention: agent.attention,
34376
+ unread: { total: agent.inboxCount() },
34377
+ actions: {
34378
+ read: "cotal_inbox",
34379
+ replyChannel: "cotal_send",
34380
+ replyPrivate: "cotal_dm",
34381
+ askRole: "cotal_anycast"
34382
+ }
34383
+ };
34384
+ }
34385
+ function renderOrientation(o) {
34386
+ const fmt = (cs) => cs.length ? cs.map((c) => `#${c}`).join(", ") : "\u2014";
34387
+ const who2 = o.identity.role ? `${o.identity.name}/${o.identity.role}` : o.identity.name;
34388
+ const aclDiffers = o.access.readAcl.length !== o.access.read.length || o.access.readAcl.some((c) => !o.access.read.includes(c));
34389
+ const lines = [
34390
+ `You are ${who2} in space "${o.identity.space}" (id ${o.identity.id.slice(0, 8)}\u2026).`,
34391
+ "",
34392
+ `Access \u2014 ${o.access.authMode ? "auth mode (grants are broker-enforced)" : "open mode (grants advisory, host-trusted)"}:`,
34393
+ ` \u2022 read: ${fmt(o.access.read)}`
34394
+ ];
34395
+ if (aclDiffers)
34396
+ lines.push(` \u2022 may join (read ACL): ${fmt(o.access.readAcl)}`);
34397
+ lines.push(` \u2022 post: ${o.access.post.length ? fmt(o.access.post) : "\u2014 (read-only; no post channels)"}`, ` \u2022 capabilities: ${o.capabilities.length ? o.capabilities.join(", ") : "none beyond defaults"}`, "", `Tools \u2014 core loop: ${o.tools.core.map((t) => t.name).join(", ") || "\u2014"}`, `Tools \u2014 more: ${o.tools.more.map((t) => t.name).join(", ") || "\u2014"}`, "", `Right now (snapshot @ ${new Date(o.generatedAt).toISOString()}):`, ` \u2022 status: ${o.status} \xB7 attention: ${o.attention}`, ` \u2022 peers present: ${o.peers.present} \u2014 ${o.peers.summary}`, ` \u2022 unread: ${o.unread.total}`, "", `Act \u2192 read: ${o.actions.read} \xB7 reply on a channel: ${o.actions.replyChannel} \xB7 private: ${o.actions.replyPrivate} \xB7 ask a role: ${o.actions.askRole}`);
34398
+ return lines.join("\n");
34399
+ }
34400
+
34273
34401
  // ../connector-core/dist/tool-specs.js
34274
34402
  var ok = (text) => ({ text });
34275
34403
  var err = (text) => ({ text, isError: true });
@@ -34329,6 +34457,21 @@ function resolveFeedbackEmail(explicit) {
34329
34457
  function cotalToolSpecs(config2, source = "connector") {
34330
34458
  const canSpawn = !config2.creds || (config2.capabilities?.includes("spawn") ?? false);
34331
34459
  const specs = [
34460
+ {
34461
+ name: "cotal_orientation",
34462
+ title: "Cotal: orient \u2014 who you are & what you can do",
34463
+ description: "Your orientation card: who you are (name/role/space), the channels you can read and post to, your capabilities, the tools available to you (grouped into a core loop plus the rest), who's present, your status/attention, and how many messages are unread. Call this first to get your bearings; it's read-only and safe to re-check anytime.",
34464
+ run(agent) {
34465
+ const visible = cotalToolSpecs(config2, source).map((s) => ({
34466
+ name: s.name,
34467
+ title: s.title
34468
+ }));
34469
+ const card = renderOrientation(buildOrientation(agent, config2, visible, Date.now()));
34470
+ return ok(agent.connected ? card : `(not connected to the mesh yet \u2014 the live context below is empty)
34471
+
34472
+ ${card}`);
34473
+ }
34474
+ },
34332
34475
  {
34333
34476
  name: "cotal_roster",
34334
34477
  title: "Cotal: who's present",
@@ -34576,12 +34719,14 @@ ${info}${caught}`);
34576
34719
  title: "Cotal: spawn a new teammate",
34577
34720
  description: "Ask the manager to start a new peer endpoint in your space. It joins the mesh as a lateral peer (and, when the manager runs the cmux runtime, appears in its own tab). Use when the team needs another agent.",
34578
34721
  schema: {
34579
- name: external_exports.string().describe("Name for the new peer; auto-numbered (e.g. reviewer-2) if taken."),
34580
- role: external_exports.string().optional().describe("Optional role for the new peer (e.g. worker, reviewer).")
34722
+ name: external_exports.string().describe("Which persona to spawn \u2014 the persona FILENAME in .cotal/agents (e.g. `review-critic`), without the .md. The new peer joins under the persona's own `name:` (auto-numbered, e.g. socrates-2, if that's taken). Fails if no such persona file exists \u2014 spawn an existing persona, don't invent a name."),
34723
+ role: external_exports.string().optional().describe("Optional role for the new peer (e.g. worker, reviewer); overrides the persona file's role."),
34724
+ agent: external_exports.string().optional().describe("Optional harness the new peer runs on \u2014 the agent/connector type (claude, opencode, hermes), NOT the persona to spawn (that's `name`). Defaults to the manager's default (Claude)."),
34725
+ model: external_exports.string().optional().describe("Optional model override (e.g. opus, sonnet) \u2014 wins over the persona file's model:.")
34581
34726
  },
34582
- async run(agent, _config, { name, role }) {
34727
+ async run(agent, _config, { name, role, agent: agentType, model }) {
34583
34728
  try {
34584
- const reply = await agent.spawn(name, role);
34729
+ const reply = await agent.spawn(name, role, { agent: agentType, model });
34585
34730
  if (!reply.ok)
34586
34731
  return err(`Couldn't spawn ${name}: ${reply.error ?? "manager refused"}`);
34587
34732
  const d = reply.data;
@@ -34843,7 +34988,9 @@ var cotal = async ({ client }) => {
34843
34988
  if (parts.length === 0) return;
34844
34989
  if (faceReminder) parts.push({ type: "text", text: faceReminder });
34845
34990
  const body = { parts };
34846
- if (!primed && persona) body.system = persona;
34991
+ if (!primed && persona) body.system = `${persona}
34992
+
34993
+ ${ORIENTATION_BOOTSTRAP}`;
34847
34994
  busy = true;
34848
34995
  surfaced = ids;
34849
34996
  awaitingTurnEnd = true;
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"AA6BA,OAAO,KAAK,EAAE,MAAM,EAAS,MAAM,qBAAqB,CAAC;AAazD,eAAO,MAAM,KAAK,EAAE,MAqRnB,CAAC"}
1
+ {"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"AA8BA,OAAO,KAAK,EAAE,MAAM,EAAS,MAAM,qBAAqB,CAAC;AAazD,eAAO,MAAM,KAAK,EAAE,MAuRnB,CAAC"}
package/dist/plugin.js CHANGED
@@ -19,7 +19,7 @@
19
19
  * No identity → inert, so an operator's own `opencode` never joins as a stray peer.
20
20
  */
21
21
  import { loadAgentFile } from "@cotal-ai/core";
22
- import { configFromEnv, hasIdentity, MeshAgent, formatInjection, fmtFrom, } from "@cotal-ai/connector-core";
22
+ import { configFromEnv, hasIdentity, MeshAgent, formatInjection, fmtFrom, ORIENTATION_BOOTSTRAP, } from "@cotal-ai/connector-core";
23
23
  import { buildCotalTools } from "./tools.js";
24
24
  function log(msg) {
25
25
  process.stderr.write(`[cotal-connector] ${msg}\n`);
@@ -165,8 +165,10 @@ export const cotal = async ({ client }) => {
165
165
  if (faceReminder)
166
166
  parts.push({ type: "text", text: faceReminder });
167
167
  const body = { parts };
168
+ // persona once, as system (no --append-system-prompt). Append the orientation bootstrap so the
169
+ // agent is told to orient first — gated on persona so we never replace OpenCode's default system.
168
170
  if (!primed && persona)
169
- body.system = persona; // persona once, as system (no --append-system-prompt)
171
+ body.system = `${persona}\n\n${ORIENTATION_BOOTSTRAP}`;
170
172
  busy = true;
171
173
  surfaced = ids;
172
174
  // Arm BEFORE the await: a turn-end signal can land before promptAsync resolves, and
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.js","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,EAAE,aAAa,EAAuB,MAAM,gBAAgB,CAAC;AACpE,OAAO,EACL,aAAa,EACb,WAAW,EACX,SAAS,EACT,eAAe,EACf,OAAO,GAER,MAAM,0BAA0B,CAAC;AAElC,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAE7C,SAAS,GAAG,CAAC,GAAW;IACtB,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,qBAAqB,GAAG,IAAI,CAAC,CAAC;AACrD,CAAC;AAED;;;0DAG0D;AAC1D,MAAM,KAAK,GAAG,UAA8C,CAAC;AAE7D,MAAM,CAAC,MAAM,KAAK,GAAW,KAAK,EAAE,EAAE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"Cotal connector for OpenCode: a native in-process plugin that joins a session to the mesh.",
4
- "version": "0.6.0",
4
+ "version": "0.8.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/connector-core": "0.6.0"
21
+ "@cotal-ai/connector-core": "0.8.0"
22
22
  },
23
23
  "peerDependencies": {
24
24
  "@cotal-ai/core": ">=0.1.0",
@@ -30,7 +30,7 @@
30
30
  "@opencode-ai/sdk": "^1.16.2",
31
31
  "esbuild": "^0.28.0",
32
32
  "tsx": "^4.22.4",
33
- "@cotal-ai/core": "0.6.0"
33
+ "@cotal-ai/core": "0.8.0"
34
34
  },
35
35
  "files": [
36
36
  "dist"