@cotal-ai/connector-core 0.85.0 → 0.87.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.
- package/dist/agent.d.ts +21 -5
- package/dist/agent.d.ts.map +1 -1
- package/dist/agent.js +61 -11
- package/dist/agent.js.map +1 -1
- package/dist/docs-bundle.generated.d.ts +1 -1
- package/dist/docs-bundle.generated.js +20 -20
- package/dist/docs-bundle.generated.js.map +1 -1
- package/dist/framing.js +1 -1
- package/dist/framing.js.map +1 -1
- package/dist/gateway.d.ts +67 -5
- package/dist/gateway.d.ts.map +1 -1
- package/dist/gateway.js +211 -10
- package/dist/gateway.js.map +1 -1
- package/dist/launch.d.ts +6 -1
- package/dist/launch.d.ts.map +1 -1
- package/dist/launch.js +10 -2
- package/dist/launch.js.map +1 -1
- package/dist/relay.d.ts +13 -2
- package/dist/relay.d.ts.map +1 -1
- package/dist/relay.js +27 -12
- package/dist/relay.js.map +1 -1
- package/dist/tool-specs.d.ts +7 -1
- package/dist/tool-specs.d.ts.map +1 -1
- package/dist/tool-specs.js +38 -18
- package/dist/tool-specs.js.map +1 -1
- package/package.json +2 -2
package/dist/relay.d.ts
CHANGED
|
@@ -1,3 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { hasIdentity } from "./session-env.js";
|
|
2
|
+
/** Re-exported for a plugin process that must stay off the barrel, as a hook does. */
|
|
3
|
+
export { hasIdentity };
|
|
4
|
+
/** Answers one hook event inside the hook process, before the control socket is resolved. A reply
|
|
5
|
+
* is printed as the hook's output and the event is not relayed; `undefined` relays it as usual.
|
|
6
|
+
* It runs in every session. `managed` says whether the session carries a mesh identity, which is
|
|
7
|
+
* the only kind the relay forwards. */
|
|
8
|
+
export type LocalHookAnswer = (event: unknown, session: {
|
|
9
|
+
managed: boolean;
|
|
10
|
+
}) => Record<string, unknown> | undefined;
|
|
11
|
+
/** Relay one hook event from stdin to the connector's control socket and print the reply. `answer`
|
|
12
|
+
* runs first, so a decision that needs no connector state holds even when the socket is down. */
|
|
13
|
+
export declare function runHookRelay(answer?: LocalHookAnswer): Promise<void>;
|
|
3
14
|
//# sourceMappingURL=relay.d.ts.map
|
package/dist/relay.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"relay.d.ts","sourceRoot":"","sources":["../src/relay.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"relay.d.ts","sourceRoot":"","sources":["../src/relay.ts"],"names":[],"mappings":"AAUA,OAAO,EAAkB,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAG/D,sFAAsF;AACtF,OAAO,EAAE,WAAW,EAAE,CAAC;AAyFvB;;;wCAGwC;AACxC,MAAM,MAAM,eAAe,GAAG,CAAC,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE;IAAE,OAAO,EAAE,OAAO,CAAA;CAAE,KAAK,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,CAAC;AAErH;kGACkG;AAClG,wBAAsB,YAAY,CAAC,MAAM,CAAC,EAAE,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC,CAgI1E"}
|
package/dist/relay.js
CHANGED
|
@@ -10,6 +10,8 @@
|
|
|
10
10
|
import { connect } from "node:net";
|
|
11
11
|
import { controlFromEnv, hasIdentity } from "./session-env.js";
|
|
12
12
|
import { HANDOFF_RECEIPT } from "./control.js";
|
|
13
|
+
/** Re-exported for a plugin process that must stay off the barrel, as a hook does. */
|
|
14
|
+
export { hasIdentity };
|
|
13
15
|
const TIMEOUT_MS = 2000;
|
|
14
16
|
/** A startup hook may run before the MCP process has bound its socket. Stay inside the existing
|
|
15
17
|
* hook budget, but do not turn one early ENOENT into a permanently lost lifecycle event. */
|
|
@@ -95,10 +97,31 @@ function done(out, confirm) {
|
|
|
95
97
|
});
|
|
96
98
|
setTimeout(exit, 1000);
|
|
97
99
|
}
|
|
98
|
-
/** Relay one hook event from stdin to the connector's control socket and print the reply.
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
100
|
+
/** Relay one hook event from stdin to the connector's control socket and print the reply. `answer`
|
|
101
|
+
* runs first, so a decision that needs no connector state holds even when the socket is down. */
|
|
102
|
+
export async function runHookRelay(answer) {
|
|
103
|
+
const managed = hasIdentity();
|
|
104
|
+
if (!managed && !answer)
|
|
105
|
+
return done(""); // plain session with nothing to answer — no-op
|
|
106
|
+
const raw = (await readStdin()).trim() || "{}";
|
|
107
|
+
let event = {};
|
|
108
|
+
try {
|
|
109
|
+
event = JSON.parse(raw); // the hook event the runtime piped in
|
|
110
|
+
}
|
|
111
|
+
catch {
|
|
112
|
+
/* malformed — relay an empty event under a valid token */
|
|
113
|
+
}
|
|
114
|
+
let local;
|
|
115
|
+
try {
|
|
116
|
+
local = answer?.(event, { managed });
|
|
117
|
+
}
|
|
118
|
+
catch {
|
|
119
|
+
/* an answer that throws must not block the session; relay the event instead */
|
|
120
|
+
}
|
|
121
|
+
if (local)
|
|
122
|
+
return done(JSON.stringify(local));
|
|
123
|
+
if (!managed)
|
|
124
|
+
return done(""); // plain session, not a managed one — no connector to relay to
|
|
102
125
|
// The socket path comes from the launch env; the token comes from the launch-material file that
|
|
103
126
|
// env points at (the same file the in-agent server reads), never recomputed from public identity.
|
|
104
127
|
// A malformed or missing material file THROWS from controlFromEnv, and a hook that throws is a
|
|
@@ -121,14 +144,6 @@ export async function runHookRelay() {
|
|
|
121
144
|
if (!control)
|
|
122
145
|
return done("");
|
|
123
146
|
const { path, token } = control;
|
|
124
|
-
const raw = (await readStdin()).trim() || "{}";
|
|
125
|
-
let event = {};
|
|
126
|
-
try {
|
|
127
|
-
event = JSON.parse(raw); // the hook event the runtime piped in
|
|
128
|
-
}
|
|
129
|
-
catch {
|
|
130
|
-
/* malformed — relay an empty event under a valid token */
|
|
131
|
-
}
|
|
132
147
|
const startupCritical = isSessionStart(event);
|
|
133
148
|
let sock;
|
|
134
149
|
let settled = false;
|
package/dist/relay.js.map
CHANGED
|
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;YAAC,MAAM,CAAC;gBACP,MAAM,CAAC,EAAE,CAAC,CAAC;YACb,CAAC;QACH,CAAC,CAAC,CAAC;QACH,SAAS,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,CAAC,EAAE,EAAE;YACzB,IAAI,OAAO,IAAI,IAAI,KAAK,SAAS;gBAAE,OAAO;YAC1C,KAAK,IAAI,CAAC,CAAC;YACX,MAAM,EAAE,GAAG,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;YAC/B,IAAI,EAAE,IAAI,CAAC;gBAAE,iBAAiB,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,EAAE,SAAS,CAAC,CAAC;QAChE,CAAC,CAAC,CAAC;QACH,SAAS,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC,KAAK,EAAE,EAAE;YAC9B,IAAI,OAAO,IAAI,IAAI,KAAK,SAAS;gBAAE,OAAO;YAC1C,IAAI,CAAC,SAAS,IAAI,eAAe,IAAI,uBAAuB,CAAC,KAAK,CAAC,EAAE,CAAC;gBACpE,IAAI,CAAC,SAAS,CAAC,CAAC;gBAChB,UAAU,EAAE,CAAC;gBACb,OAAO;YACT,CAAC;YACD,6FAA6F;YAC7F,+FAA+F;YAC/F,6BAA6B;YAC7B,MAAM,CAAC,EAAE,CAAC,CAAC;QACb,CAAC,CAAC,CAAC;QACH,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,EAAE;YACvB,IAAI,OAAO,IAAI,IAAI,KAAK,SAAS;gBAAE,OAAO;YAC1C,MAAM,CAAC,KAAK,CAAC,CAAC;QAChB,CAAC,CAAC,CAAC;IACL,CAAC,CAAC;IAEF,IAAI,EAAE,CAAC;AACT,CAAC"}
|
package/dist/tool-specs.d.ts
CHANGED
|
@@ -27,7 +27,13 @@ export interface CotalToolSpec {
|
|
|
27
27
|
* THIS; none of them re-derives an open object, and none of them can, because
|
|
28
28
|
* {@link cotalToolSpecs} is the only source and it closes every shape on the way out. */
|
|
29
29
|
schema: CotalToolInput;
|
|
30
|
-
run(agent: MeshAgent, config: AgentConfig, args: any): Promise<ToolResult> | ToolResult;
|
|
30
|
+
run(agent: MeshAgent, config: AgentConfig, args: any, call?: ToolCall): Promise<ToolResult> | ToolResult;
|
|
31
|
+
}
|
|
32
|
+
/** What a surface knows about the request a tool runs for. */
|
|
33
|
+
export interface ToolCall {
|
|
34
|
+
/** Aborts when the caller can no longer receive the result. A read that finds it aborted clears
|
|
35
|
+
* nothing, so the messages stay for the next read. */
|
|
36
|
+
signal?: AbortSignal;
|
|
31
37
|
}
|
|
32
38
|
/**
|
|
33
39
|
* Validate raw tool args against a spec's closed input, for the adapters whose host does NOT
|
package/dist/tool-specs.d.ts.map
CHANGED
|
@@ -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,EAA+C,KAAK,WAAW,EAAE,MAAM,aAAa,CAAC;AAI5F;yDACyD;AACzD,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAwED;;;;;;;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,MAAM,EAAE,cAAc,CAAC;IACvB,GAAG,CAAC,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,WAAW,EAAE,IAAI,EAAE,GAAG,GAAG,OAAO,CAA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,MAAM,CAAC,GAC5B,aAAa,EAAE,CAioCjB"}
|
package/dist/tool-specs.js
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
*/
|
|
10
10
|
import { execFileSync } from "node:child_process";
|
|
11
11
|
import { z } from "zod";
|
|
12
|
-
import { isConcreteChannel, channelInAllow, AmbiguousPeerError, peerLabel, assertLifecycleToken, isPermissionDenied, renderLifecycleBlocked, EpEnvelopeError, LANG_PROBLEM_DETAIL_KIND, formatAge, presenceAges } from "@cotal-ai/core";
|
|
12
|
+
import { isConcreteChannel, channelInAllow, AmbiguousPeerError, peerLabel, assertLifecycleToken, isPermissionDenied, renderLifecycleBlocked, EpEnvelopeError, LANG_PROBLEM_DETAIL_KIND, formatAge, presenceAges, presenceText } 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.
|
|
@@ -124,6 +124,21 @@ export function refuseAnyArgs(name, args) {
|
|
|
124
124
|
function statusGlyph(s) {
|
|
125
125
|
return s === "working" ? "●" : s === "waiting" ? "◐" : s === "idle" ? "○" : "·";
|
|
126
126
|
}
|
|
127
|
+
/** The manager-instance pin of the manager read and run tools: the same token `cotal_spawn`'s
|
|
128
|
+
* `instance` takes. */
|
|
129
|
+
const managerInstanceArg = z
|
|
130
|
+
.string()
|
|
131
|
+
.refine((value) => {
|
|
132
|
+
try {
|
|
133
|
+
assertLifecycleToken(value, "instance");
|
|
134
|
+
return true;
|
|
135
|
+
}
|
|
136
|
+
catch {
|
|
137
|
+
return false;
|
|
138
|
+
}
|
|
139
|
+
}, "instance must be a lifecycle token ([a-z0-9]{26,32})")
|
|
140
|
+
.optional()
|
|
141
|
+
.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.");
|
|
127
142
|
/** One-line meaning of each attention mode, echoed back on set/read so the agent always sees the
|
|
128
143
|
* effect of a mode it may have set turns ago (self-visibility is the escape hatch for `focus`). */
|
|
129
144
|
const ATTENTION_DESC = {
|
|
@@ -329,8 +344,8 @@ const partOffsets = new WeakMap();
|
|
|
329
344
|
*/
|
|
330
345
|
const inboxReads = new WeakMap();
|
|
331
346
|
function oneReadAtATime(read) {
|
|
332
|
-
return (agent, config, args) => {
|
|
333
|
-
const turn = (inboxReads.get(agent) ?? Promise.resolve()).then(() => read(agent, config, args));
|
|
347
|
+
return (agent, config, args, call) => {
|
|
348
|
+
const turn = (inboxReads.get(agent) ?? Promise.resolve()).then(() => read(agent, config, args, call));
|
|
334
349
|
inboxReads.set(agent, turn.catch(() => undefined));
|
|
335
350
|
return turn;
|
|
336
351
|
};
|
|
@@ -731,9 +746,9 @@ export function cotalToolSpecs(config, source = "connector", env, offered) {
|
|
|
731
746
|
const age = presenceAges(p, Date.now());
|
|
732
747
|
const unchanged = age.statusSince === undefined ? "" : ` · unchanged for ${formatAge(age.statusSince)}`;
|
|
733
748
|
const active = age.activeAt === undefined ? "" : ` · active ${formatAge(age.activeAt)} ago`;
|
|
734
|
-
const condition = (p.condition ? ` (${p.condition.code}${age.conditionSince === undefined ? "" : ` for ${formatAge(age.conditionSince)}`})` : "") + unchanged + active;
|
|
749
|
+
const condition = (p.condition ? ` (${presenceText(p.condition.code)}${age.conditionSince === undefined ? "" : ` for ${formatAge(age.conditionSince)}`})` : "") + unchanged + active;
|
|
735
750
|
const progress = p.status === "working" ? `working${condition} · progress unknown` : `${p.status}${condition}`;
|
|
736
|
-
const activity = p.activity ? `: ${p.activity}${age.activitySince === undefined ? "" : ` (set ${formatAge(age.activitySince)} ago)`}` : "";
|
|
751
|
+
const activity = p.activity ? `: ${presenceText(p.activity)}${age.activitySince === undefined ? "" : ` (set ${formatAge(age.activitySince)} ago)`}` : "";
|
|
737
752
|
return `${statusGlyph(p.status)} ${who} — ${progress}${activity}${attn}${me}${mutedHint}${id}`;
|
|
738
753
|
});
|
|
739
754
|
return ok(`${preface}Present in "${config.space}" (${roster.length}):\n${lines.join("\n")}`);
|
|
@@ -746,8 +761,11 @@ export function cotalToolSpecs(config, source = "connector", env, offered) {
|
|
|
746
761
|
schema: {
|
|
747
762
|
peek: z.boolean().optional().describe("If true, show messages without clearing them."),
|
|
748
763
|
},
|
|
749
|
-
run: oneReadAtATime(async (agent, _config, { peek, scope }) => {
|
|
764
|
+
run: oneReadAtATime(async (agent, _config, { peek, scope }, call) => {
|
|
750
765
|
const inboxScope = scope ?? "all";
|
|
766
|
+
// Asked at each clear, not once: the caller can go while this read waits for the one before
|
|
767
|
+
// it or for focus recall, and what it never receives must stay for the next read.
|
|
768
|
+
const keeps = () => peek === true || call?.signal?.aborted === true;
|
|
751
769
|
// SELECT, RENDER, THEN CLEAR EXACTLY WHAT WENT OUT (#603). The old order drained the whole
|
|
752
770
|
// scope up front, so a payload too large for the host to deliver had already been marked
|
|
753
771
|
// read, and a reconnect replay is both the largest payload and the one most likely to have
|
|
@@ -776,7 +794,7 @@ export function cotalToolSpecs(config, source = "connector", env, offered) {
|
|
|
776
794
|
item: buffered.find((i) => stuck.has(i.recvKey)),
|
|
777
795
|
offered: buffered,
|
|
778
796
|
stuck,
|
|
779
|
-
peek:
|
|
797
|
+
peek: keeps(),
|
|
780
798
|
last: (i) => agent.drainInboxDeliveries([i.recvKey]),
|
|
781
799
|
});
|
|
782
800
|
if (part)
|
|
@@ -785,7 +803,7 @@ export function cotalToolSpecs(config, source = "connector", env, offered) {
|
|
|
785
803
|
// The response exists before anything is acked: an ack is a claim that these messages were
|
|
786
804
|
// handed over, so nothing may be cleared while the handing-over is still hypothetical. And
|
|
787
805
|
// it is the ASSEMBLED response that decides, so what is acked is what a caller was handed.
|
|
788
|
-
if (!
|
|
806
|
+
if (!keeps())
|
|
789
807
|
agent.drainInboxDeliveries(shown.map((i) => i.recvKey));
|
|
790
808
|
void held;
|
|
791
809
|
return ok(text);
|
|
@@ -873,7 +891,7 @@ export function cotalToolSpecs(config, source = "connector", env, offered) {
|
|
|
873
891
|
item,
|
|
874
892
|
offered: [...buffered, ...fresh],
|
|
875
893
|
stuck,
|
|
876
|
-
peek:
|
|
894
|
+
peek: keeps(),
|
|
877
895
|
warning,
|
|
878
896
|
last: (i) => {
|
|
879
897
|
if (bufferedIds.has(i.recvKey))
|
|
@@ -889,7 +907,7 @@ export function cotalToolSpecs(config, source = "connector", env, offered) {
|
|
|
889
907
|
}
|
|
890
908
|
// Render first, ack second, and only ever ids from the buffered lane: acking a recall id
|
|
891
909
|
// would mark it handled, so a later live copy of that channel message would be dropped.
|
|
892
|
-
if (!
|
|
910
|
+
if (!keeps()) {
|
|
893
911
|
agent.drainInboxDeliveries(all.filter((i) => bufferedIds.has(i.recvKey)).map((i) => i.recvKey));
|
|
894
912
|
// THE MARK MOVES OVER AN UNBROKEN PREFIX, and stops at the first thing this reply did not
|
|
895
913
|
// carry. Two recall items can share a millisecond, so the mark is a (timestamp, id) pair:
|
|
@@ -1374,6 +1392,7 @@ export function cotalToolSpecs(config, source = "connector", env, offered) {
|
|
|
1374
1392
|
value: z.unknown().optional().describe("answer only: supply the value requested by the open checkpoint or ask and match its answer shape. A checkpoint may resolve without a value; an ask must receive its requested record. Use null only when that is the intended answer."),
|
|
1375
1393
|
artifact: z.string().min(1).optional().describe("answer only: a reference to what you reviewed before answering, recorded beside the answer."),
|
|
1376
1394
|
endpoint: z.string().min(1).optional().describe("status/ps/answer: the endpoint the run record lives under. Omit for runs the manager hosts."),
|
|
1395
|
+
instance: managerInstanceArg,
|
|
1377
1396
|
},
|
|
1378
1397
|
async run(agent, config, a) {
|
|
1379
1398
|
const need = (field, verb) => a[field] === undefined ? err(`cotal_run ${verb}: \`${String(field)}\` is required`) : undefined;
|
|
@@ -1382,7 +1401,7 @@ export function cotalToolSpecs(config, source = "connector", env, offered) {
|
|
|
1382
1401
|
const missing = need("source", "start");
|
|
1383
1402
|
if (missing)
|
|
1384
1403
|
return missing;
|
|
1385
|
-
const reply = await agent.run("start", { source: a.source, file: a.file, timeout: a.timeout });
|
|
1404
|
+
const reply = await agent.run("start", { source: a.source, file: a.file, timeout: a.timeout }, a.instance);
|
|
1386
1405
|
if (!reply.ok)
|
|
1387
1406
|
return err(renderRunRefusal("start", reply));
|
|
1388
1407
|
const { runId } = reply.data;
|
|
@@ -1392,13 +1411,13 @@ export function cotalToolSpecs(config, source = "connector", env, offered) {
|
|
|
1392
1411
|
const missing = need("runId", "resume");
|
|
1393
1412
|
if (missing)
|
|
1394
1413
|
return missing;
|
|
1395
|
-
const reply = await agent.run("resume", { runId: a.runId, timeout: a.timeout });
|
|
1414
|
+
const reply = await agent.run("resume", { runId: a.runId, timeout: a.timeout }, a.instance);
|
|
1396
1415
|
if (!reply.ok)
|
|
1397
1416
|
return err(renderRunRefusal("resume", reply));
|
|
1398
1417
|
return ok(`Resumed run ${a.runId} on the manager from its recorded program.`);
|
|
1399
1418
|
}
|
|
1400
1419
|
if (a.verb === "ps") {
|
|
1401
|
-
const reply = await agent.run("ps", { endpoint: a.endpoint });
|
|
1420
|
+
const reply = await agent.run("ps", { endpoint: a.endpoint }, a.instance);
|
|
1402
1421
|
if (!reply.ok)
|
|
1403
1422
|
return err(renderRunRefusal("ps", reply));
|
|
1404
1423
|
const rows = reply.data;
|
|
@@ -1410,7 +1429,7 @@ export function cotalToolSpecs(config, source = "connector", env, offered) {
|
|
|
1410
1429
|
const missing = need("runId", "status");
|
|
1411
1430
|
if (missing)
|
|
1412
1431
|
return missing;
|
|
1413
|
-
const reply = await agent.run("status", { runId: a.runId, endpoint: a.endpoint });
|
|
1432
|
+
const reply = await agent.run("status", { runId: a.runId, endpoint: a.endpoint }, a.instance);
|
|
1414
1433
|
if (!reply.ok)
|
|
1415
1434
|
return err(renderRunRefusal("status", reply));
|
|
1416
1435
|
const v = reply.data;
|
|
@@ -1425,7 +1444,7 @@ export function cotalToolSpecs(config, source = "connector", env, offered) {
|
|
|
1425
1444
|
return missing;
|
|
1426
1445
|
// The manager records the answerer from the caller's own credential (SPEC 14.5); the
|
|
1427
1446
|
// tool sends no name, so it cannot answer as anyone else.
|
|
1428
|
-
const reply = await agent.run("answer", { runId: a.runId, stepKey: a.stepKey, value: a.value, artifact: a.artifact, endpoint: a.endpoint });
|
|
1447
|
+
const reply = await agent.run("answer", { runId: a.runId, stepKey: a.stepKey, value: a.value, artifact: a.artifact, endpoint: a.endpoint }, a.instance);
|
|
1429
1448
|
if (!reply.ok)
|
|
1430
1449
|
return err(renderRunRefusal("answer", reply));
|
|
1431
1450
|
return ok(`Answered ${a.stepKey} on run ${a.runId} as ${config.name}: ${JSON.stringify(reply.data)}`);
|
|
@@ -1504,11 +1523,12 @@ export function cotalToolSpecs(config, source = "connector", env, offered) {
|
|
|
1504
1523
|
.regex(/^[A-Za-z0-9_-]+$/, "letters, digits, _ or - only")
|
|
1505
1524
|
.optional()
|
|
1506
1525
|
.describe("Persona to show. Omit to list the catalog."),
|
|
1526
|
+
instance: managerInstanceArg,
|
|
1507
1527
|
},
|
|
1508
|
-
async run(agent, _config, { name }) {
|
|
1528
|
+
async run(agent, _config, { name, instance }) {
|
|
1509
1529
|
try {
|
|
1510
1530
|
if (name) {
|
|
1511
|
-
const reply = await agent.showPersona(name);
|
|
1531
|
+
const reply = await agent.showPersona(name, instance);
|
|
1512
1532
|
if (!reply.ok)
|
|
1513
1533
|
return err(`Couldn't show ${name}: ${reply.error ?? "manager refused"}`);
|
|
1514
1534
|
const row = (reply.data ?? {});
|
|
@@ -1528,7 +1548,7 @@ export function cotalToolSpecs(config, source = "connector", env, offered) {
|
|
|
1528
1548
|
lines.push("", row.persona);
|
|
1529
1549
|
return ok(lines.join("\n"));
|
|
1530
1550
|
}
|
|
1531
|
-
const reply = await agent.listPersonas();
|
|
1551
|
+
const reply = await agent.listPersonas(instance);
|
|
1532
1552
|
if (!reply.ok)
|
|
1533
1553
|
return err(`Couldn't list personas: ${reply.error ?? "manager refused"}`);
|
|
1534
1554
|
const personas = (reply.data?.personas) ?? [];
|