@cotal-ai/connector-core 0.153.1 → 0.155.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":"launch.js","sourceRoot":"","sources":["../src/launch.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH,OAAO,EACL,YAAY,EACZ,mBAAmB,EACnB,iBAAiB,EACjB,YAAY,EACZ,mBAAmB,GAIpB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC;;;;;;;;kGAQkG;AAClG,MAAM,YAAY,GAAG;IACnB,MAAM;IACN,MAAM;IACN,aAAa;IACb,WAAW;IACX,UAAU;IACV,MAAM;IACN,SAAS;IACT,OAAO;IACP,SAAS;IACT,SAAS;IACT,MAAM;IACN,WAAW;IACX,WAAW;IACX,MAAM;IACN,QAAQ;IACR,UAAU;IACV,aAAa;IACb,IAAI;IACJ,MAAM;IACN,QAAQ;IACR,KAAK;IACL,4FAA4F;IAC5F,6FAA6F;IAC7F,qBAAqB;IACrB,eAAe;IACf,iBAAiB;IACjB,eAAe;IACf,gBAAgB;IAChB,gBAAgB;IAChB,SAAS;IACT,cAAc;IACd,iBAAiB;IACjB,+FAA+F;IAC/F,iFAAiF;IACjF,cAAc;IACd,IAAI;IACJ,8FAA8F;IAC9F,gGAAgG;IAChG,kGAAkG;IAClG,kGAAkG;IAClG,0DAA0D;IAC1D,YAAY;IACZ,QAAQ;IACR,aAAa;IACb,wBAAwB;IACxB,sBAAsB;IACtB,iBAAiB;IACjB,aAAa;IACb,cAAc;IACd,mBAAmB;IACnB,oBAAoB;IACpB,QAAQ;CACA,CAAC;AAEX;0EAC0E;AAC1E,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC,kBAAkB;IAClB,mBAAmB;IACnB,gBAAgB;IAChB,oBAAoB;IACpB,cAAc;CACN,CAAC;AAEX;;;;;;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CAAC,CAAC;QAC/D,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACf,IAAI,IAAI,CAAC,OAAO;YAAE,KAAK,MAAM,CAAC,IAAI,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC;gBAAE,IAAI,CAAC,CAAC,CAAC,CAAC;IACzE,CAAC;IACD,OAAO,CAAC,GAAG,KAAK,CAAC,CAAC;AACpB,CAAC"}
1
+ {"version":3,"file":"launch.js","sourceRoot":"","sources":["../src/launch.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH,OAAO,EACL,YAAY,EAEZ,mBAAmB,EACnB,iBAAiB,EACjB,YAAY,EACZ,mBAAmB,GAIpB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC;;;;;;;;kGAQkG;AAClG,MAAM,YAAY,GAAG;IACnB,MAAM;IACN,MAAM;IACN,aAAa;IACb,WAAW;IACX,UAAU;IACV,MAAM;IACN,SAAS;IACT,OAAO;IACP,SAAS;IACT,SAAS;IACT,MAAM;IACN,WAAW;IACX,WAAW;IACX,MAAM;IACN,QAAQ;IACR,UAAU;IACV,aAAa;IACb,IAAI;IACJ,MAAM;IACN,QAAQ;IACR,KAAK;IACL,4FAA4F;IAC5F,6FAA6F;IAC7F,qBAAqB;IACrB,eAAe;IACf,iBAAiB;IACjB,eAAe;IACf,gBAAgB;IAChB,gBAAgB;IAChB,SAAS;IACT,cAAc;IACd,iBAAiB;IACjB,+FAA+F;IAC/F,iFAAiF;IACjF,cAAc;IACd,IAAI;IACJ,8FAA8F;IAC9F,gGAAgG;IAChG,kGAAkG;IAClG,kGAAkG;IAClG,0DAA0D;IAC1D,YAAY;IACZ,QAAQ;IACR,aAAa;IACb,wBAAwB;IACxB,sBAAsB;IACtB,iBAAiB;IACjB,aAAa;IACb,cAAc;IACd,mBAAmB;IACnB,oBAAoB;IACpB,QAAQ;CACA,CAAC;A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AI,IAAI,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,CAAC;QAC1C,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACnB,IAAI,CAAC,IAAI,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC;QACzB,IAAI,IAAI,CAAC,GAAG;YAAE,KAAK,MAAM,CAAC,IAAI,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC;gBAAE,IAAI,CAAC,CAAC,CAAC,CAAC;QAC/D,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACf,IAAI,IAAI,CAAC,OAAO;YAAE,KAAK,MAAM,CAAC,IAAI,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC;gBAAE,IAAI,CAAC,CAAC,CAAC,CAAC;IACzE,CAAC;IACD,OAAO,CAAC,GAAG,KAAK,CAAC,CAAC;AACpB,CAAC"}
@@ -88,6 +88,9 @@ export interface Orientation {
88
88
  };
89
89
  /** Control-plane capabilities (e.g. `spawn`). Empty ⇒ none beyond the defaults granted to all. */
90
90
  capabilities: string[];
91
+ /** Endpoint commands this session was handed at launch, `<endpoint> <command>` (plus the instance
92
+ * for a pinned entry). Launch metadata: `cotal_endpoints` lists what the credential's grants cover. */
93
+ endpoints: string[];
91
94
  /** The tools available to you, grouped so the surface reads small: `core` is the everyday loop. */
92
95
  tools: {
93
96
  core: OrientationTool[];
@@ -1 +1 @@
1
- {"version":3,"file":"orientation.d.ts","sourceRoot":"","sources":["../src/orientation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,EAAmD,KAAK,aAAa,EAAE,KAAK,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAC1H,OAAO,EAAyB,KAAK,SAAS,EAAE,KAAK,UAAU,EAAE,MAAM,YAAY,CAAC;AACpF,OAAO,EAAY,KAAK,WAAW,EAAE,MAAM,aAAa,CAAC;AAGzD;;2DAE2D;AAC3D,eAAO,MAAM,qBA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;AAgBD;;;kBAGkB;AAClB,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,UAAU,GAAG,WAAW,CAAC,UAAU,CAAC,CAa5F;AAED;;;iDAGiD;AACjD,wBAAgB,gBAAgB,CAC9B,KAAK,EAAE,SAAS,EAChB,MAAM,EAAE,WAAW,EACnB,YAAY,EAAE,eAAe,EAAE,EAC/B,WAAW,EAAE,MAAM,EACnB,IAAI,EAAE,UAAU,GACf,WAAW,CAkEb;AAED,8EAA8E;AAC9E,wBAAgB,iBAAiB,CAAC,CAAC,EAAE,WAAW,GAAG,MAAM,CA4CxD"}
@@ -146,6 +146,7 @@ export function buildOrientation(agent, config, visibleTools, generatedAt, read)
146
146
  }),
147
147
  },
148
148
  capabilities: config.capabilities ?? [],
149
+ endpoints: (config.endpoints ?? []).flatMap((e) => e.commands.map((c) => `${e.endpoint} ${c}${e.instanceId !== undefined ? ` (instance ${e.instanceId})` : ""}`)),
149
150
  tools: { core, more },
150
151
  peers: { present: peers.length, summary },
151
152
  presence: presenceLiveness(agent, read),
@@ -186,7 +187,7 @@ export function renderOrientation(o) {
186
187
  lines.push(` • may join (read ACL): ${fmt(o.access.readAcl)}`);
187
188
  if (o.access.joinable.length)
188
189
  lines.push(` • not on yet: ${o.access.joinable.map((j) => `#${j.channel}${j.note ? ` (${j.note})` : ""}`).join(", ")} · join one with cotal_join`);
189
- lines.push(` • post: ${o.access.post.length ? fmt(o.access.post) : "— (read-only; no post channels)"}`, ` • capabilities: ${o.capabilities.length ? o.capabilities.join(", ") : "none beyond defaults"}`, "", `Tools — core loop: ${o.tools.core.map((t) => t.name).join(", ") || "—"}`, `Tools — more: ${o.tools.more.map((t) => t.name).join(", ") || "—"}`, "", `Right now (snapshot @ ${new Date(o.generatedAt).toISOString()}):`, ` • status: ${honestStatus(o.status)} · attention: ${o.attention}`, ` • peers present: ${o.peers.present} — ${o.peers.summary}`, ` • presence view: ${o.presence.live ? "live" : `NOT LIVE — ${o.presence.detail}`}`, ` • unread: ${o.unread.total}`, "", `Act → read: ${o.actions.read} · reply on a channel: ${o.actions.replyChannel} · ` +
190
+ lines.push(` • post: ${o.access.post.length ? fmt(o.access.post) : "— (read-only; no post channels)"}`, ` • capabilities: ${o.capabilities.length ? o.capabilities.join(", ") : "none beyond defaults"}`, ...(o.endpoints.length ? [` • endpoint commands handed at launch: ${o.endpoints.join(", ")} (cotal_endpoints lists what your credential's grants cover${o.endpoints.some((e) => e.includes("(instance ")) ? "; pass a command's instance to cotal_describe and cotal_invoke as instance" : ""})`] : []), "", `Tools — core loop: ${o.tools.core.map((t) => t.name).join(", ") || "—"}`, `Tools — more: ${o.tools.more.map((t) => t.name).join(", ") || "—"}`, "", `Right now (snapshot @ ${new Date(o.generatedAt).toISOString()}):`, ` • status: ${honestStatus(o.status)} · attention: ${o.attention}`, ` • peers present: ${o.peers.present} — ${o.peers.summary}`, ` • presence view: ${o.presence.live ? "live" : `NOT LIVE — ${o.presence.detail}`}`, ` • unread: ${o.unread.total}`, "", `Act → read: ${o.actions.read} · reply on a channel: ${o.actions.replyChannel} · ` +
190
191
  `private: ${o.actions.replyPrivate} · ask a role: ${o.actions.askRole}`);
191
192
  return lines.join("\n");
192
193
  }
@@ -1 +1 @@
1
- {"version":3,"file":"orientation.js","sourceRoot":"","sources":["../src/orientation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,SAAS,EAA2C,MAAM,gBAAgB,CAAC;AAC1H,OAAO,EAAE,qBAAqB,EAAmC,MAAM,YAAY,CAAC;AACpF,OAAO,EAAE,QAAQ,EAAoB,MAAM,aAAa,CAAC;AACzD,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAEzC;;2DAE2D;AAC3D,MAAM,CAAC,MAAM,qBAAqB,GAChC,uIAAuI;IACvI,mEAAmE,CAAC;AAEtE;;;2GAG2G;AAC3G,MAAM,CAAC,MAAM,gBAAg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C,CAAC,OAAO,CAAC,OAAO,EAAE,CAC1E,CAAC;IACF,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC"}
@@ -122,7 +122,13 @@ export declare function renderInbox(opts: {
122
122
  * each of its items is acked by receive key.
123
123
  */
124
124
  strictIds?: ReadonlySet<string>;
125
+ /** Receive keys this reply may show, from an earlier render of the same items in the same order,
126
+ * so what it shows of the ordered lane is still an unbroken prefix. Anything else is only named
127
+ * as held. */
128
+ only?: ReadonlySet<string>;
125
129
  }): InboxResponse;
130
+ /** How many times one read chooses its reply again after a take of a request it chose is refused. */
131
+ export declare const READ_TAKE_ROUNDS = 8;
126
132
  /** Routing context for a `<channel …>` tag. Keys must be [A-Za-z0-9_] (others are dropped). */
127
133
  export declare function channelMeta(i: InboxItem): Record<string, string>;
128
134
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"tool-specs.d.ts","sourceRoot":"","sources":["../src/tool-specs.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAmB,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,YAAY,CAAC;AAI7E,OAAO,EAAY,KAAK,WAAW,EAAE,MAAM,aAAa,CAAC;AAKzD;;gGAEgG;AAChG,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACtC;AAiFD;;;;;;;sGAOsG;AACtG,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC;AAExD,0DAA0D;AAC1D,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB;;;;8FAI0F;IAC1F,MA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B,SAAS,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,OAAO,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACpF,IAAI,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,OAAO,CAAC;CAC9D,GAAG,MAAM,CAWT;AAED;0EAC0E;AAC1E,eAAO,MAAM,iBAAiB,sUACuS,CAAC;AA8BtU;;;;;;qEAMqE;AACrE,wBAAgB,cAAc,CAC5B,MAAM,EAAE,WAAW,EACnB,MAAM,SAAc,EACpB,GAAG,CAAC,EAAE,MAAM,CAAC,UAAU,EACvB,OAAO,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,EAC7B,cAAc,CAAC,EAAE,MAAM,MAAM,GAAG,SAAS,GACxC,aAAa,EAAE,CA85CjB"}
@@ -9,7 +9,7 @@
9
9
  */
10
10
  import { execFileSync } from "node:child_process";
11
11
  import { z } from "zod";
12
- import { isConcreteChannel, isChannelFamily, assertValidChannel, MAX_CHANNEL_LENGTH, channelInAllow, patternInAllow, AmbiguousPeerError, peerLabel, sharedNameIds, assertLifecycleToken, isPermissionDenied, renderLifecycleBlocked, EpEnvelopeError, EP_UNANSWERED, REGISTRY_PAGE_LIMIT, LANG_PROBLEM_DETAIL_KIND, formatAge, parseDuration, presenceAges, presenceText } from "@cotal-ai/core";
12
+ import { isConcreteChannel, isChannelFamily, assertValidChannel, MAX_CHANNEL_LENGTH, channelInAllow, patternInAllow, AmbiguousPeerError, peerLabel, sharedNameIds, assertLifecycleToken, isPermissionDenied, renderLifecycleBlocked, EpEnvelopeError, EP_UNANSWERED, REGISTRY_PAGE_LIMIT, LANG_PROBLEM_DETAIL_KIND, formatAge, parseDuration, presenceAges, presenceText, isAnycastSeq } from "@cotal-ai/core";
13
13
  import { afterRecallMark } from "./agent.js";
14
14
  // The neutralization and the per-item rendering live in `framing.ts`, one convention shared with
15
15
  // the auto-injected block, and are used here rather than restated. See that file for the rule.
@@ -20,14 +20,74 @@ import { buildOrientation, presenceLiveness, renderOrientation } from "./orienta
20
20
  import { runDocs } from "./docs.js";
21
21
  const ok = (text) => ({ text });
22
22
  const err = (text) => ({ text, isError: true });
23
+ /** How many holders a `cotal_anycast` result names before it counts the rest. */
24
+ const NAMED_HOLDERS = 8;
25
+ /** A holder by name and id. Both reach this from peers or the record, so neither may break a line. */
26
+ function holderLabel(h) {
27
+ return `${attributionSafe(h.name)} (${attributionSafe(h.id)})`;
28
+ }
29
+ /** The holders of a role, by name and id, from one roster read; `when` says which read. */
30
+ function holdersLine(holders, when = "at send") {
31
+ if (holders === undefined)
32
+ return `holders unknown ${when}: the presence view was not current`;
33
+ if (!holders.length)
34
+ return `0 holders online ${when}`;
35
+ const named = holders.slice(0, NAMED_HOLDERS).map(holderLabel).join(", ");
36
+ const more = holders.length > NAMED_HOLDERS ? ` and ${holders.length - NAMED_HOLDERS} more` : "";
37
+ return `${holders.length === 1 ? "holder" : "holders"} online ${when}: ${named}${more}`;
38
+ }
39
+ const TAKEN_MEANS = "Taken means that holder's connector was about to show it to its agent, not that the agent read, ran or finished it.";
40
+ function takenFollowUp(taker) {
41
+ return `Ask ${attributionSafe(taker.name)} with cotal_dm about the work, or use cotal_run for work you need followed to the end.`;
42
+ }
43
+ const UNKNOWN_OUTCOME = "Its outcome is unknown: a holder on an older connector may have taken it without a recorded take, it may have been dropped as malformed, or its record expired a day after it left the queue.";
44
+ function removalLine(status) {
45
+ if (status.removal === "deleted")
46
+ return "It was removed from the queue before any holder took it.";
47
+ if (status.removal === "already-gone")
48
+ return "It had already left the queue when the delivery daemon went to remove it: an earlier removal whose answer was lost may have taken it off, the queue may have been recreated, or a holder on an older connector, which records no take, may have taken it.";
49
+ return "No holder can take it now; the delivery daemon has not finished removing it from the queue.";
50
+ }
51
+ /** A request's status, as `cotal_anycast` with `seq` reports it (SPEC §8.1). */
52
+ function renderAnycastStatus(status, holders) {
53
+ const seq = status.seq;
54
+ if (status.state === "unknown")
55
+ return `No request seq ${seq} from you is on the queue, and the delivery daemon holds no record of it. ${UNKNOWN_OUTCOME}`;
56
+ if (status.state === "cancelled")
57
+ return `Request seq ${seq} on @${status.role} is cancelled. ${removalLine(status)}`;
58
+ if (status.state === "waiting")
59
+ return `Request seq ${seq} on @${status.role} is waiting on the queue, and no holder has taken it (${holdersLine(holders, "now")}). ` +
60
+ `A busy holder may already have it. If that holder does not confirm it in time, it goes back on the queue for a holder. Cancel it with seq ${seq} and cancel: true.`;
61
+ const before = status.previous
62
+ ? ` Before that, ${holderLabel(status.previous)} took it and did not confirm it before its ack wait ran out, so ${attributionSafe(status.previous.name)} may also have started it.`
63
+ : "";
64
+ return `Request seq ${seq} on @${status.role} was taken by ${holderLabel(status.taker)} at ${new Date(status.at).toISOString()}.${before} ` +
65
+ `${TAKEN_MEANS} ${takenFollowUp(status.taker)}`;
66
+ }
67
+ /** A cancel's outcome, as `cotal_anycast` with `seq` and `cancel: true` reports it (SPEC §8.1). */
68
+ function renderAnycastCancel(status) {
69
+ const seq = status.seq;
70
+ if (status.state === "cancelled")
71
+ return `Cancelled request seq ${seq} on @${status.role}. ${removalLine(status)}`;
72
+ if (status.state === "taken")
73
+ return `Not cancelled: request seq ${seq} on @${status.role} was already taken by ${holderLabel(status.taker)}. ${TAKEN_MEANS} ${takenFollowUp(status.taker)}`;
74
+ if (status.state === "unknown")
75
+ return `Not cancelled: no request seq ${seq} from you is on the queue, and the delivery daemon holds no record of it. ${UNKNOWN_OUTCOME}`;
76
+ return `Not cancelled: request seq ${seq} on @${status.role} is still waiting. Try the cancel again.`;
77
+ }
23
78
  /** A local inbox read cannot establish that a session is receiving from the mesh. */
24
79
  function inboxConnectionWarning(agent) {
25
80
  const state = agent.connectionState;
26
81
  const channelIssue = agent.channelDeliveryIssue;
82
+ // A role request whose take the delivery daemon could not decide is held, not shown (SPEC §8.1).
83
+ const held = agent.heldTakes();
84
+ const heldIssue = held.count && held.detail
85
+ ? `${held.count} role request${held.count === 1 ? " is" : "s are"} held and not shown: ${held.detail}`
86
+ : undefined;
27
87
  if (state === "ready" || state === "stalled")
28
- return channelIssue ?? "";
88
+ return [channelIssue, heldIssue].filter(Boolean).join("\n");
29
89
  const issue = agent.connectionIssue;
30
- return [channelIssue, `Mesh connection is not ready (${state})${issue ? `: ${issue.slice(0, 500)}` : "."}\nLocally buffered messages are still readable; an empty buffer does not mean no new mesh messages.`].filter(Boolean).join("\n");
90
+ return [channelIssue, heldIssue, `Mesh connection is not ready (${state})${issue ? `: ${issue.slice(0, 500)}` : "."}\nLocally buffered messages are still readable; an empty buffer does not mean no new mesh messages.`].filter(Boolean).join("\n");
31
91
  }
32
92
  /** Cap on the JSON text a generic endpoint tool returns into the session. */
33
93
  const ENDPOINT_RESULT_MAX_CHARS = 200_000;
@@ -149,6 +209,20 @@ const managerInstanceArg = z
149
209
  }, "instance must be a lifecycle token ([a-z0-9]{26,32})")
150
210
  .optional()
151
211
  .describe("Optional manager instance id for a multi-manager space. When omitted, a seat a manager launched uses that manager and any other caller lets the mesh select one; on a user-auth mesh with several of your managers live, that selection refuses and lists their ids. A pin that cannot be resolved is refused without falling back to another manager.");
212
+ /** The endpoint-instance pin of `cotal_describe` and `cotal_invoke`, for any endpoint. */
213
+ const endpointInstanceArg = z
214
+ .string()
215
+ .refine((value) => {
216
+ try {
217
+ assertLifecycleToken(value, "instance");
218
+ return true;
219
+ }
220
+ catch {
221
+ return false;
222
+ }
223
+ }, "instance must be a lifecycle token ([a-z0-9]{26,32})")
224
+ .optional()
225
+ .describe("Optional instance id: call this one instance of the endpoint on its own rail, never another. Pass it when you were handed a command on one instance; cotal_orientation shows which. Omitted, the endpoint picks an instance.");
152
226
  /** One-line meaning of each attention mode, echoed back on set/read so the agent always sees the
153
227
  * effect of a mode it may have set turns ago (self-visibility is the escape hatch for `focus`). */
154
228
  const ATTENTION_DESC = {
@@ -246,6 +320,8 @@ export function renderInbox(opts) {
246
320
  const strict = strictIds.has(i.recvKey);
247
321
  if (strict && strictGap)
248
322
  continue;
323
+ if (opts.only && !opts.only.has(i.recvKey))
324
+ continue;
249
325
  const cost = itemCost(i);
250
326
  if (used + cost > budget) {
251
327
  // In the ordered lane even a message no response could carry whole is a gap: the mark would
@@ -281,6 +357,65 @@ export function renderInbox(opts) {
281
357
  }
282
358
  return { text, shown, held, stuck };
283
359
  }
360
+ /** How many times one read chooses its reply again after a take of a request it chose is refused. */
361
+ export const READ_TAKE_ROUNDS = 8;
362
+ /**
363
+ * Render one reply over the inbox preview, take the held role requests it carries (or the one it
364
+ * carries part of), then render it again over what may be shown now (SPEC §8.1). The second pass
365
+ * shows only what the first chose, so a reply never takes a request it does not show. It renders a
366
+ * subset of the first pass's items in the same order, so it fits wherever the first did. `extra`
367
+ * rides after the buffer and needs no take, such as focus recall. `warning` is read at each render,
368
+ * so the reply reports what the takes left held. A read whose caller is gone takes nothing.
369
+ */
370
+ async function takeForReply(agent, scope, opts, extra = []) {
371
+ const { warning, signal, ...render } = opts;
372
+ let pending;
373
+ let preview = [];
374
+ let chosen = new Set();
375
+ let shown = new Set();
376
+ let part;
377
+ let taken = new Set();
378
+ let showable;
379
+ const undecided = new Set();
380
+ for (let round = 0; round < READ_TAKE_ROUNDS && !signal?.aborted; round++) {
381
+ const got = await agent.takeChosen(scope, (p) => {
382
+ // A read carries only what was pending when it began, so mail arriving meanwhile cannot push
383
+ // out a request an earlier round took.
384
+ pending ??= new Set(p.map((i) => i.recvKey));
385
+ preview = p.filter((i) => pending.has(i.recvKey));
386
+ const candidates = showable ? preview.filter((i) => showable.has(i.recvKey)) : preview;
387
+ const first = renderInbox({ ...render, warning: warning(), items: [...candidates, ...extra] });
388
+ shown = new Set(first.shown.map((i) => i.recvKey));
389
+ part = first.shown.length ? undefined : candidates.find((i) => first.stuck.has(i.recvKey));
390
+ const picked = [...candidates.filter((i) => shown.has(i.recvKey)), ...(part ? [part] : [])];
391
+ chosen = new Set(picked.map((i) => i.recvKey));
392
+ return picked;
393
+ });
394
+ taken = new Set(got.map((i) => i.recvKey));
395
+ // A refused take leaves room another message can use, so the reply is chosen again without it. A
396
+ // take still undecided would only repeat its wait if chosen again, so the reply is chosen once
397
+ // more from what needs no take, and the undecided request waits for a later read.
398
+ const missed = [...chosen].filter((k) => !taken.has(k));
399
+ if (!missed.length || showable)
400
+ break;
401
+ const open = new Set(agent.inboxPreview(scope).map((i) => i.recvKey));
402
+ for (const k of missed)
403
+ if (open.has(k))
404
+ undecided.add(k);
405
+ if (undecided.size)
406
+ showable = new Set(agent.peekInbox(scope).map((i) => i.recvKey));
407
+ }
408
+ // A chosen request whose take was refused or is still undecided leaves this reply entirely. A reply
409
+ // chosen again from what needs no take offers only that, so a request never asked is not named.
410
+ const live = new Set(agent.inboxKeys(scope));
411
+ const offered = preview.filter((i) => live.has(i.recvKey) && !undecided.has(i.recvKey) && (!chosen.has(i.recvKey) || taken.has(i.recvKey)) && (!showable || showable.has(i.recvKey)));
412
+ return {
413
+ reply: renderInbox({ ...render, warning: warning(), items: [...offered, ...extra], only: shown }),
414
+ offered,
415
+ buffered: agent.peekInbox(scope),
416
+ part: part && taken.has(part.recvKey) ? part : undefined,
417
+ };
418
+ }
284
419
  const NOTE_TIERS = ["full", "compact", "none"];
285
420
  /** What one rendered item costs a response: its own text plus the newline that joins it. */
286
421
  function itemCost(i) {
@@ -901,28 +1036,31 @@ export function cotalToolSpecs(config, source = "connector", env, offered, empty
901
1036
  return ok(text);
902
1037
  };
903
1038
  if (agent.attention !== "focus") {
904
- const connectionWarning = inboxConnectionWarning(agent);
905
- const warning = [connectionWarning, storedNote].filter(Boolean).join("\n");
906
- const buffered = agent.peekInbox(inboxScope);
907
- const { text, shown, held, stuck } = renderInbox({
908
- items: buffered,
1039
+ // A peek shows bodies too, so a peek takes what it shows like any read.
1040
+ const { reply: rendered, offered, buffered, part: taken } = await takeForReply(agent, inboxScope, {
909
1041
  peek,
910
- warning,
1042
+ warning: () => [inboxConnectionWarning(agent), storedNote].filter(Boolean).join("\n"),
1043
+ signal: call?.signal,
911
1044
  head: (s) => pulls
912
1045
  ? `${s.length} pull-only message${s.length === 1 ? "" : "s"} (cleared; automatic traffic remains connector-managed):`
913
1046
  : `${s.length} message${s.length === 1 ? "" : "s"}${peek ? ` (peek: nothing cleared${stillDelivered})` : ""}:`,
914
1047
  });
915
- if (!buffered.length)
1048
+ const { text, shown, held, stuck } = rendered;
1049
+ // Asked after the takes: one this read asked for can have been held since.
1050
+ const connectionWarning = inboxConnectionWarning(agent);
1051
+ const warning = [connectionWarning, storedNote].filter(Boolean).join("\n");
1052
+ if (!offered.length) {
916
1053
  return reply([warning, pulls
917
1054
  ? `No pull-only messages.${automaticPending ? ` ${automaticPending} connector-managed automatic message${automaticPending === 1 ? " is" : "s are"} still queued; peek to read ${automaticPending === 1 ? "it" : "them"} now.` : ""}`
918
1055
  // A hook receipt never masks an unavailable connection, even with a live transport.
919
1056
  : connectionWarning ? "Local inbox buffer is empty."
920
1057
  : (agent.connectionState === "ready" ? emptyInboxNote?.() : undefined) ?? "Inbox empty, no new messages."].filter(Boolean).join("\n\n"));
1058
+ }
921
1059
  if (!shown.length) {
922
1060
  const part = partReply({
923
1061
  agent,
924
- item: buffered.find((i) => stuck.has(i.recvKey)),
925
- offered: buffered,
1062
+ item: taken ?? buffered.find((i) => stuck.has(i.recvKey)),
1063
+ offered,
926
1064
  stuck,
927
1065
  peek: keeps(),
928
1066
  warning,
@@ -946,9 +1084,6 @@ export function cotalToolSpecs(config, source = "connector", env, offered, empty
946
1084
  const before = new Set(agent.peekInbox("all").map((i) => i.recvKey));
947
1085
  const underway = new Set([...(partOffsets.get(agent)?.keys() ?? [])].filter((k) => !before.has(k)));
948
1086
  const recall = await agent.recallAmbient(underway);
949
- // Read after recall, which can hand an id-less message back into the buffer (#662).
950
- const buffered = agent.peekInbox(inboxScope);
951
- const bufferedIds = new Set(buffered.map((i) => i.recvKey));
952
1087
  // RECALL HAS TO ADVANCE, or windowing it starves it. Recall is re-derived from an unchanged
953
1088
  // frontier on every call, so showing its first window and stopping there returned the same
954
1089
  // prefix forever while the reply promised a next batch: measured as three identical replies
@@ -994,20 +1129,25 @@ export function cotalToolSpecs(config, source = "connector", env, offered, empty
994
1129
  aheadFresh.sort(byTsThenId);
995
1130
  const fresh = [...clocked, ...aheadFresh];
996
1131
  const aheadIds = new Set(aheadFresh.map((i) => i.recvKey));
997
- const connectionWarning = inboxConnectionWarning(agent);
998
- const warning = [connectionWarning, storedNote, droppedNote(recall.droppedChannels), aheadNote(aheadWithheld)]
1132
+ const focusWarning = () => [inboxConnectionWarning(agent), storedNote, droppedNote(recall.droppedChannels), aheadNote(aheadWithheld)]
999
1133
  .filter(Boolean)
1000
1134
  .join(" ");
1001
- const { text, shown: all, stuck } = renderInbox({
1002
- items: [...buffered, ...fresh],
1135
+ // Taken after recall, which can hand an id-less message back into the buffer (#662).
1136
+ const { reply: rendered, offered, buffered, part: taken } = await takeForReply(agent, inboxScope, {
1003
1137
  peek,
1004
- warning,
1138
+ warning: focusWarning,
1139
+ signal: call?.signal,
1005
1140
  strictIds: new Set(clocked.map((i) => i.recvKey)),
1006
1141
  head: (s) => pulls
1007
1142
  ? `${s.length} message${s.length === 1 ? "" : "s"}. Buffered pull-only items were cleared; normal focus channel items are read-only recall:`
1008
1143
  : `${s.length} message${s.length === 1 ? "" : "s"}${peek ? ` (peek: live buffer not cleared${stillDelivered})` : ""} in focus mode; channel items are recall since you focused:`,
1009
- });
1010
- if (!buffered.length && !fresh.length && !recall.droppedChannels.length && !aheadWithheld.length)
1144
+ }, fresh);
1145
+ const bufferedIds = new Set(buffered.map((i) => i.recvKey));
1146
+ const { text, shown: all, stuck } = rendered;
1147
+ // Asked after the takes: one this read asked for can have been held since.
1148
+ const connectionWarning = inboxConnectionWarning(agent);
1149
+ const warning = focusWarning();
1150
+ if (!offered.length && !fresh.length && !recall.droppedChannels.length && !aheadWithheld.length)
1011
1151
  return reply([connectionWarning, storedNote, pulls
1012
1152
  ? `No pull-only messages and no normal focus recall.${automaticPending ? ` ${automaticPending} connector-managed automatic message${automaticPending === 1 ? " is" : "s are"} still queued; peek to read ${automaticPending === 1 ? "it" : "them"} now.` : ""}`
1013
1153
  : connectionWarning ? "Local inbox buffer and available focus recall are empty." : "Inbox empty, no new messages, and no channel chatter since you entered focus."].filter(Boolean).join("\n\n"));
@@ -1016,12 +1156,13 @@ export function cotalToolSpecs(config, source = "connector", env, offered, empty
1016
1156
  // have: the mark for the ordered lane, whose first item is the only one it may take, or the
1017
1157
  // ahead record, so the mark never passes a message that has not been handed over.
1018
1158
  const first = clocked[0];
1019
- const item = buffered.find((i) => stuck.has(i.recvKey)) ??
1159
+ const item = taken ??
1160
+ buffered.find((i) => stuck.has(i.recvKey)) ??
1020
1161
  (first && stuck.has(first.recvKey) ? first : aheadFresh.find((i) => stuck.has(i.recvKey)));
1021
1162
  const part = partReply({
1022
1163
  agent,
1023
1164
  item,
1024
- offered: [...buffered, ...fresh],
1165
+ offered: [...offered, ...fresh],
1025
1166
  stuck,
1026
1167
  peek: keeps(),
1027
1168
  warning,
@@ -1147,26 +1288,54 @@ export function cotalToolSpecs(config, source = "connector", env, offered, empty
1147
1288
  name: "cotal_anycast",
1148
1289
  title: "Cotal: ask any agent of a role",
1149
1290
  description: "Ask whoever holds a role. Use it only when the team was built for it, with agents that hold the role to take requests, such as a pool of reviewers started with cotal_spawn and role. " +
1150
- "The request waits until one of them takes it, which can take a while if they are all busy. Without such a pool, mention a named agent on the task's channel, send a DM, or spawn a helper. " +
1291
+ "The request waits on the role's queue until one of them takes it, which can take a while if they are all busy, and one sent while no agent holds the role is kept for the next that does. Without such a pool, mention a named agent on the task's channel, send a DM, or spawn a helper. " +
1292
+ "The result gives the request's seq and the holders online at send. Except on an open mesh, you get a notice naming the holder that takes it, seq alone reads the request's status, and seq with cancel: true cancels it while it still waits. A cancel is refused once a holder took the request. " +
1151
1293
  "Anycast does not follow the work after someone takes it. To follow work to the end, use cotal_run. " +
1152
1294
  'Example: `{role: "review-frontend", text: "Review issue #812, the checkout button. Post your findings on #review.checkout."}`',
1153
1295
  schema: {
1154
- role: z.string().describe("The role to address (e.g. reviewer)."),
1155
- text: z.string().describe("The request."),
1296
+ role: z.string().optional().describe("Send: the role to address (e.g. reviewer). Give it with text."),
1297
+ text: z.string().optional().describe("Send: the request."),
1298
+ seq: z.number().optional().describe("Status or cancel: the seq a send returned. Give it alone for the request's status."),
1299
+ cancel: z.boolean().optional().describe("Cancel: true, with seq, cancels that request while it still waits."),
1156
1300
  },
1157
- async run(agent, _config, { role, text: msg }) {
1301
+ async run(agent, config, { role, text: msg, seq, cancel }) {
1302
+ // One call does one thing, and a call that is not exactly one of them changes nothing.
1303
+ const sending = role !== undefined || msg !== undefined;
1304
+ const asking = seq !== undefined || cancel !== undefined;
1305
+ if (sending && asking)
1306
+ return err("cotal_anycast does one thing per call: send with role and text, read a status with seq, or cancel with seq and cancel: true. Nothing was sent, read or cancelled.");
1307
+ if (asking) {
1308
+ if (seq === undefined)
1309
+ return err("cancel needs the seq of the request to cancel. Nothing was cancelled.");
1310
+ if (!isAnycastSeq(seq))
1311
+ return err(`seq must be a whole number of at least 1, the seq a send returned; got ${seq}. Nothing was read or cancelled.`);
1312
+ if (cancel === false)
1313
+ return err("cancel takes only true. Give seq alone for the request's status. Nothing was read or cancelled.");
1314
+ if (!isAuthed(config))
1315
+ return err("This is an open mesh: it runs no delivery daemon, so it keeps no record of a request after its send, and a request cannot be read or cancelled by seq.");
1316
+ try {
1317
+ const status = cancel ? await agent.cancelAnycast(seq) : await agent.anycastStatus(seq);
1318
+ const holders = status.state === "waiting" ? await agent.roleHolders(status.role) : undefined;
1319
+ return ok(cancel ? renderAnycastCancel(status) : renderAnycastStatus(status, holders));
1320
+ }
1321
+ catch (e) {
1322
+ return err(`Couldn't ${cancel ? "cancel" : "read the status of"} request seq ${seq}: ${e.message}`);
1323
+ }
1324
+ }
1325
+ if (role === undefined || msg === undefined)
1326
+ return err("A send needs both role and text. Nothing was sent.");
1158
1327
  try {
1159
- const { ack, holdersAtSend: n } = await agent.anycast(role, msg);
1328
+ const { ack, holdersAtSend } = await agent.anycast(role, msg);
1160
1329
  const dup = ack.duplicate ? " duplicate publication." : "";
1161
- const at = n === undefined
1162
- ? "holders unknown at send: the presence view was not current"
1163
- : `${n} holder${n === 1 ? "" : "s"} online at send`;
1164
1330
  // Zero holders is not a failure: the queue keeps the request for whoever takes the role
1165
1331
  // next. Say so, so it reads neither as delivered nor as lost.
1166
- const none = n === 0
1332
+ const none = holdersAtSend?.length === 0
1167
1333
  ? ` No present agent holds @${role}, so the request waits on its queue until one does. Roles match exactly; cotal_roster shows the roles present.`
1168
1334
  : "";
1169
- return ok(`Request stored as seq ${ack.seq} on the @${role} queue (${at}; delivery not confirmed).${dup}${none}`);
1335
+ const follow = isAuthed(config)
1336
+ ? ` You get a notice naming the holder that takes it. Read its status with seq ${ack.seq}, or cancel it with seq ${ack.seq} and cancel: true while it waits.`
1337
+ : "";
1338
+ return ok(`Request stored as seq ${ack.seq} on the @${role} queue (${holdersLine(holdersAtSend)}; delivery not confirmed).${dup}${none}${follow}`);
1170
1339
  }
1171
1340
  catch (e) {
1172
1341
  return err(`Couldn't send: ${e.message}`);
@@ -1415,7 +1584,7 @@ export function cotalToolSpecs(config, source = "connector", env, offered, empty
1415
1584
  "To start a saved persona instead, pass its name and no persona; cotal_personas lists them. Pass persona.save: true, or use cotal_persona, only for a persona worth reusing. " +
1416
1585
  'Example: `{name: "reviewer", join: ["review.login-page"], persona: {prompt: "You review the login page change and report each finding with its file and line.", allowSubscribe: ["review.login-page"], allowPublish: ["review.login-page"]}, prompt: "Read the brief on #review.login-page, post your findings there, then despawn yourself."}` ' +
1417
1586
  "The new agent can read and post wherever its persona allows. A persona you pass here, or an operator's persona, that names no channels gets your read and post grants and no more; one you save with cotal_persona gets only the channels it lists. Give a helper only what its job needs, so list just the channels it needs. " +
1418
- "You can give it only channels and capabilities you hold. On a mesh that checks grants, a spawn that asks for more is refused, and the refusal names each part you do not hold. It can spawn agents or run workflows only if its persona lists spawn or run. Endpoint access comes from the operator, so ask the user if the job needs it. cotal_orientation shows what you hold. " +
1587
+ "You can give it only channels, capabilities and endpoint commands you hold. On a mesh that checks grants, a spawn that asks for more is refused, and the refusal names each part you do not hold. It can spawn agents or run workflows only if its persona lists spawn or run. To let it call an endpoint command you can call, list it in persona.endpoints, such as [{endpoint: \"com.example.orders\", commands: [\"list\"]}]. A per-user auth mesh refuses endpoints in a persona, because the operator grants endpoint access there, so ask the user if the job needs it. cotal_orientation shows what you hold, and cotal_endpoints the endpoint commands you can call. " +
1419
1588
  "For a single job on a Claude Code, jcode, OpenCode or pi helper, pass once: true with the prompt, and the helper is stopped when it ends that turn; or tell it in the prompt to despawn itself when done, as in the example. A standing teammate keeps running until it despawns itself or you call cotal_despawn. " +
1420
1589
  "For work with several steps, a wait on a person, or a need to survive restarts, use cotal_run.",
1421
1590
  schema: {
@@ -1431,11 +1600,12 @@ export function cotalToolSpecs(config, source = "connector", env, offered, empty
1431
1600
  allowSubscribe: z.array(z.string()).optional().describe("Channels the helper may read. Each must be one you may read."),
1432
1601
  allowPublish: z.array(z.string()).optional().describe("Channels the helper may post to. Each must be one you may post to."),
1433
1602
  capabilities: z.array(z.string()).optional().describe("Capabilities to hand on, such as spawn or run. Each must be one you hold."),
1603
+ endpoints: z.array(z.object({ endpoint: z.string(), commands: z.array(z.string()).min(1), instanceId: z.string().optional() }).strict()).optional().describe("Endpoint commands to hand on, as { endpoint, commands } entries such as { endpoint: \"com.example.orders\", commands: [\"list\"] }. Each must be one you hold. Add instanceId to hand on a command you hold on one instance of the endpoint."),
1434
1604
  save: z.boolean().optional().describe("Also save this persona to the catalog under `name`, for a broad persona worth reusing. A name already in the catalog is refused before anything starts."),
1435
1605
  })
1436
1606
  .strict()
1437
1607
  .optional()
1438
- .describe("Define the helper on this spawn instead of from a catalog file: `prompt` (who it is), with optional `role`, `model`, `variant`, `description`, `subscribe`, `allowSubscribe`, `allowPublish`, `capabilities` and `save`. Not saved unless `save` is true."),
1608
+ .describe("Define the helper on this spawn instead of from a catalog file: `prompt` (who it is), with optional `role`, `model`, `variant`, `description`, `subscribe`, `allowSubscribe`, `allowPublish`, `capabilities`, `endpoints` and `save`. Not saved unless `save` is true."),
1439
1609
  join: z
1440
1610
  .array(z.string())
1441
1611
  .optional()
@@ -1782,7 +1952,7 @@ export function cotalToolSpecs(config, source = "connector", env, offered, empty
1782
1952
  description: "Save a persona that cotal_spawn can start by name. Most jobs need a persona written for them. For one job, pass persona to cotal_spawn instead, and save one here only when it is worth reusing. Reuse one from cotal_personas only when it really fits, such as a general reviewer. Every persona you save stays in the user's workspace after the helper stops. No cotal_* tool removes one: remove one you own with cotal_invoke, endpoint `manager`, command `remove-persona`, args `{ name }`; the operator removes any with `cotal persona remove <name>`. " +
1783
1953
  "Name it after what it does, such as review-login-page. Write the prompt about the job: what to do, where the brief is, how to report, and when to stop. Point to sources for facts rather than stating them. Set role when others should reach it through a role. " +
1784
1954
  "List its channels and give it only what the job needs: subscribe for where it starts, allowSubscribe for what it may read, and allowPublish for what it may post to. If you list subscribe alone, it may read just those channels and can't post anywhere. Leave all three out and it can read and post nowhere, so list the channels it needs. A persona you pass to cotal_spawn differs here: with no channel field it takes your own read and post grants. " +
1785
- "To let its agent spawn others or run workflows, list spawn or run in capabilities. You can give only capabilities you hold, and each later spawn of the persona is checked again against its spawner. Only you or an operator can change a persona you saved.\n\n" +
1955
+ "To let its agent spawn others or run workflows, list spawn or run in capabilities. To let it call an endpoint command, list it in endpoints, a per-user auth mesh excepted. You can give only capabilities and endpoint commands you hold, and each later spawn of the persona is checked again against its spawner. Only you or an operator can change a persona you saved.\n\n" +
1786
1956
  "Before you write one, check what you can give. cotal_orientation shows your own channels and capabilities, and cotal_channels lists the channels in the space. cotal_endpoints lists the endpoints you can call, and cotal_describe shows what one lets a caller do. The agent-files page in cotal_docs lists every persona field.\n\n" +
1787
1957
  "Example:\n\n" +
1788
1958
  "```\n" +
@@ -1808,14 +1978,15 @@ export function cotalToolSpecs(config, source = "connector", env, offered, empty
1808
1978
  allowSubscribe: z.array(z.string()).optional().describe("Optional read ACL written into the persona file. Wins over allowSubscribe: in the prompt's frontmatter."),
1809
1979
  allowPublish: z.array(z.string()).optional().describe("Optional post ACL written into the persona file. Wins over allowPublish: in the prompt's frontmatter."),
1810
1980
  capabilities: z.array(z.string()).optional().describe("Optional capabilities written into the persona file, such as spawn or run. Each must be one you hold; the manager refuses anything more and writes nothing. A redefine that omits it keeps the saved list, which is checked the same way; pass [] to clear it. Capabilities in the prompt's frontmatter are dropped."),
1981
+ endpoints: z.array(z.object({ endpoint: z.string(), commands: z.array(z.string()).min(1), instanceId: z.string().optional() }).strict()).optional().describe("Optional endpoint commands written into the persona file, as { endpoint, commands } entries, with instanceId for a command held on one instance. Each must be one you hold; the manager refuses anything more and writes nothing. A redefine that omits it keeps the saved list, which is checked the same way; pass [] to clear it. Endpoints in the prompt's frontmatter are dropped."),
1811
1982
  announce: z
1812
1983
  .string()
1813
1984
  .optional()
1814
1985
  .describe("Optional channel to post a one-line note on once the persona is saved. Omit it to keep the definition private to the manager's persona catalog. Name the channel your team is actually working on, not `general`: a peer that did not ask for this persona has no way to judge whether spawning it is wanted, and a broadcast soliciting spawns from an unfamiliar principal gives peers no reason to trust the request. Your post ACL applies as it does to any other message."),
1815
1986
  },
1816
- async run(agent, _config, { name, prompt, instance, model, role, agent: agentType, subscribe, allowSubscribe, allowPublish, capabilities, announce }) {
1987
+ async run(agent, _config, { name, prompt, instance, model, role, agent: agentType, subscribe, allowSubscribe, allowPublish, capabilities, endpoints, announce }) {
1817
1988
  try {
1818
- const reply = await agent.definePersona({ name, prompt, instance, model, role, agent: agentType, subscribe, allowSubscribe, allowPublish, capabilities, announce });
1989
+ const reply = await agent.definePersona({ name, prompt, instance, model, role, agent: agentType, subscribe, allowSubscribe, allowPublish, capabilities, endpoints, announce });
1819
1990
  if (reply.definitionOutcome === "unknown") {
1820
1991
  const readback = `cotal_personas(name="${name}"${instance === undefined ? "" : `, instance="${instance}"`})`;
1821
1992
  const message = `The definition outcome for persona \`${name}\` is unknown: ${reply.error ?? "the manager reply was not observed"}. ` +
@@ -1952,14 +2123,15 @@ export function cotalToolSpecs(config, source = "connector", env, offered, empty
1952
2123
  {
1953
2124
  name: "cotal_describe",
1954
2125
  title: "Cotal: describe an endpoint",
1955
- description: "List the commands a registered endpoint serves, as this session's credential sees them: each command's capability, whether it is targeted, and its input schema. The surface comes from the endpoint's describe reply and the content-addressed contract store, digest-verified, never from the endpoint's own claims. Read it before cotal_invoke.",
2126
+ description: "List the commands a registered endpoint serves, as this session's credential sees them: each command's capability, whether it is targeted, and its input schema. The surface comes from the endpoint's describe reply and the content-addressed contract store, digest-verified, never from the endpoint's own claims. Read it before cotal_invoke, with the same instance if you pass one.",
1956
2127
  schema: {
1957
2128
  endpoint: z.string().min(1).max(200).describe("The endpoint name, e.g. com.example.orders."),
2129
+ instance: endpointInstanceArg,
1958
2130
  refresh: z.boolean().optional().describe("Resolve again instead of using this session's cached surface."),
1959
2131
  },
1960
- async run(agent, config, { endpoint, refresh }) {
2132
+ async run(agent, config, { endpoint, instance, refresh }) {
1961
2133
  try {
1962
- const instanceId = endpoint === "manager" && !isAuthed(config) ? config.managerInstanceId : undefined;
2134
+ const instanceId = instance ?? (endpoint === "manager" && !isAuthed(config) ? config.managerInstanceId : undefined);
1963
2135
  const svc = await agent.ep.describeService(endpoint, { refresh, ...(instanceId !== undefined ? { instanceId } : {}) });
1964
2136
  const commands = [...svc.commands.values()]
1965
2137
  .sort((a, b) => a.command.localeCompare(b.command))
@@ -1985,14 +2157,15 @@ export function cotalToolSpecs(config, source = "connector", env, offered, empty
1985
2157
  description: "Call one command on a registered endpoint with JSON arguments, over this session's own connection and grants. The arguments are checked against the command's digest-verified input schema before anything is sent, and the reply against its output schema. A failure reports its code and outcome: `not-executed` means the command did not run; `unknown` means it may have. Do not repeat a call whose outcome is unknown without checking first.",
1986
2158
  schema: {
1987
2159
  endpoint: z.string().min(1).max(200).describe("The endpoint name, e.g. com.example.orders."),
2160
+ instance: endpointInstanceArg,
1988
2161
  command: z.string().min(1).max(128).describe("The command name from cotal_describe."),
1989
2162
  args: z.record(z.string(), z.unknown()).optional().describe("The command's arguments as a JSON object."),
1990
2163
  self: z.boolean().optional().describe("Targeted commands only: act on this session itself."),
1991
2164
  timeoutMs: z.number().int().min(1).max(120000).optional().describe("Reply deadline in milliseconds (default 30000)."),
1992
2165
  },
1993
- async run(agent, config, { endpoint, command, args, self, timeoutMs }) {
2166
+ async run(agent, config, { endpoint, instance, command, args, self, timeoutMs }) {
1994
2167
  try {
1995
- const instanceId = endpoint === "manager" && self && !isAuthed(config) ? config.managerInstanceId : undefined;
2168
+ const instanceId = instance ?? (endpoint === "manager" && self && !isAuthed(config) ? config.managerInstanceId : undefined);
1996
2169
  const r = await agent.ep.invokeService(endpoint, command, args, { deadlineMs: timeoutMs ?? 30_000, ...(self ? { target: { mode: "self" } } : {}), ...(instanceId !== undefined ? { instanceId } : {}) });
1997
2170
  if (r.reply.ok !== true) {
1998
2171
  const e = r.reply.error;