tryharness 0.7.72 → 0.7.73
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/assets/opencode-plugin.js +70 -3
- package/lib/asks.mjs +2 -0
- package/lib/boardCommands.mjs +9 -1
- package/lib/boardProtocol.json +23 -19
- package/lib/bridge.mjs +2 -0
- package/lib/capabilityCheck.mjs +86 -0
- package/lib/computerAddress.mjs +6 -14
- package/lib/coordinator.mjs +207 -26
- package/lib/daemon.mjs +150 -125
- package/lib/dispatchContract.json +1 -31
- package/lib/dispatchTools.js +8 -39
- package/lib/dispatches.mjs +27 -285
- package/lib/goalCommands.mjs +7 -3
- package/lib/herdr.mjs +159 -0
- package/lib/hookDialects.mjs +36 -2
- package/lib/jobAnswers.mjs +3 -0
- package/lib/kanban.mjs +256 -0
- package/lib/localAgentAsk.mjs +20 -29
- package/lib/machineRoutes.mjs +1 -5
- package/lib/manager.mjs +254 -0
- package/lib/mcp-stdio.mjs +58 -39
- package/lib/moves.mjs +365 -0
- package/lib/nudge.mjs +13 -3
- package/lib/ownMachines.mjs +43 -6
- package/lib/places.mjs +29 -2
- package/lib/runAuthority.mjs +2 -14
- package/lib/runBrief.mjs +14 -1
- package/lib/runWorker.mjs +4 -10
- package/lib/runner.mjs +1 -49
- package/lib/sessionControl.mjs +65 -1
- package/lib/steerHook.mjs +124 -0
- package/lib/steerQueue.mjs +176 -0
- package/lib/store.mjs +9 -23
- package/lib/subagentSteering.mjs +363 -0
- package/lib/subagents.mjs +138 -29
- package/lib/swarm.mjs +13 -3
- package/lib/taskCommands.mjs +0 -62
- package/lib/threadActions.mjs +4 -2
- package/lib/threadBriefs.mjs +9 -3
- package/lib/threadRuns.mjs +13 -0
- package/npm-shrinkwrap.json +14 -14
- package/package.json +4 -4
- package/release.json +44 -40
- package/lib/comfyExecution.mjs +0 -545
- package/lib/promptDecider.mjs +0 -471
- package/lib/promptFlow.mjs +0 -597
- package/lib/promptScopes.mjs +0 -670
package/lib/manager.mjs
ADDED
|
@@ -0,0 +1,254 @@
|
|
|
1
|
+
import { randomUUID } from "node:crypto";
|
|
2
|
+
import { askLocalAgent } from "./localAgentAsk.mjs";
|
|
3
|
+
import { nameOf } from "./members.mjs";
|
|
4
|
+
|
|
5
|
+
// The swarm's manager (owner, November 1): it keeps the agents to what the person actually asked. Each of the person's
|
|
6
|
+
// messages is sorted by Jev (src/server/swarm/manager.ts): new work and questions become asks, a steer changes the ask
|
|
7
|
+
// it is about, exploring an idea, chatting or answering tracks nothing. When an agent reports, every open ask is
|
|
8
|
+
// judged against the person's own words: done needs something in the thread that shows it; a taste call waits for the
|
|
9
|
+
// person's review; work ignored or contradicted goes back to that agent once with the person's words whole, then waits
|
|
10
|
+
// on the person. The thread cannot close while an ask is open. The thread hears one short line when an ask changes.
|
|
11
|
+
|
|
12
|
+
const OPEN = new Set(["open", "sent_back", "waiting"]);
|
|
13
|
+
const MAX_ASKS = 12;
|
|
14
|
+
const BEFORE = 12;
|
|
15
|
+
// Below the floor a message is not new work; just under it, an idea is said to be taken as one, so nothing is tracked
|
|
16
|
+
// that the person did not ask for, and they can say "do it".
|
|
17
|
+
const FLOOR = 0.5;
|
|
18
|
+
const MAYBE = 0.3;
|
|
19
|
+
|
|
20
|
+
const label = (ask) => {
|
|
21
|
+
const first = ask.words[0];
|
|
22
|
+
const said = first.text.replace(/\s+/g, " ").trim();
|
|
23
|
+
return `"${said.length > 60 ? `${said.slice(0, 57)}...` : said}" (#${first.seq})`;
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
const LOCAL_PROMPT = {
|
|
27
|
+
message: `You keep a person's swarm of agents to what the person asked. The JSON below has the person's newest message (person_message), the posts before it, and the person's open asks. Answer with one JSON object only: {"new_work": 0 to 1, how sure you are it asks the agents for new work or a result not already in open_asks, "question": 0 to 1, that it asks the agents a question wanting an answer, "exploring": 0 to 1, that the person is exploring an idea or talking through the agents' reasoning without asking for it to be done, "answer": 0 to 1, that it answers a question or approves a choice put to the person, "steers": the index in open_asks that it changes, corrects or narrows, or null, "withdraws": 0 to 1, that it drops that ask}.`,
|
|
28
|
+
report: `You keep a person's swarm of agents to what the person asked. The JSON below has an agent's report, the posts before it, and the person's open asks, each with the person's own words (newest word wins). Answer with one JSON object only: {"asks": [{"index": the ask's index, "state": "done" | "in_progress" | "ignored" | "contradicted" (ignored: reported finished without doing it or only part; contradicted: did something different, or claims something the thread does not show), "shown": 0 to 1, that something other than an agent saying so shows it done (a file, commit, command run with output, link, the result itself), "taste": 0 to 1, that only the person's own judgment can settle it}]}. For an ask of kind question, "done" means it was answered.`,
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
export function createManager({
|
|
32
|
+
store,
|
|
33
|
+
askHarness,
|
|
34
|
+
// Whether this computer's rounds go to Harness's server, and whether that server judges for the manager.
|
|
35
|
+
usesServer,
|
|
36
|
+
// The coding agent here that judges on the privacy setting, or null.
|
|
37
|
+
localJudge = () => null,
|
|
38
|
+
// Wake an agent with work, as the coordinator does (its brief is posted in the thread first).
|
|
39
|
+
handOn,
|
|
40
|
+
post,
|
|
41
|
+
notifyBoard,
|
|
42
|
+
log = () => {},
|
|
43
|
+
ask = askLocalAgent,
|
|
44
|
+
}) {
|
|
45
|
+
const key = (threadId) => `owner-asks:${threadId}`;
|
|
46
|
+
const asksOf = (threadId) => {
|
|
47
|
+
try {
|
|
48
|
+
return JSON.parse(store.meta(key(threadId)) || "[]");
|
|
49
|
+
} catch {
|
|
50
|
+
return [];
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
const keep = (threadId, asks) =>
|
|
54
|
+
store.meta(key(threadId), JSON.stringify(asks));
|
|
55
|
+
const openOf = (threadId) =>
|
|
56
|
+
asksOf(threadId).filter((one) => OPEN.has(one.status));
|
|
57
|
+
|
|
58
|
+
// One judgment at a time per thread, in the order posts came.
|
|
59
|
+
const chains = new Map();
|
|
60
|
+
const queue = (threadId, work) => {
|
|
61
|
+
const next = (chains.get(threadId) ?? Promise.resolve())
|
|
62
|
+
.then(work)
|
|
63
|
+
.catch((error) => log(`manager ${threadId}: ${error.message}`));
|
|
64
|
+
chains.set(threadId, next);
|
|
65
|
+
return next;
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
const before = (threadId, seq) =>
|
|
69
|
+
store
|
|
70
|
+
.roomPosts(threadId, 0, 500)
|
|
71
|
+
.filter(
|
|
72
|
+
(each) =>
|
|
73
|
+
each.seq < seq &&
|
|
74
|
+
!["note", "round", "goal_update", "held"].includes(each.kind)
|
|
75
|
+
)
|
|
76
|
+
.slice(-BEFORE)
|
|
77
|
+
.map(({ seq, author, kind, text }) => ({ seq, author, kind, text }));
|
|
78
|
+
|
|
79
|
+
const inputFor = (thread, kind, entry, asks) => ({
|
|
80
|
+
thread: { id: thread.id, title: thread.objective },
|
|
81
|
+
kind,
|
|
82
|
+
post: {
|
|
83
|
+
seq: entry.seq,
|
|
84
|
+
author: entry.author,
|
|
85
|
+
kind: entry.kind,
|
|
86
|
+
text: entry.text,
|
|
87
|
+
},
|
|
88
|
+
asks: asks.map(({ id, kind: what, words }) => ({ id, kind: what, words })),
|
|
89
|
+
transcript: before(thread.id, entry.seq),
|
|
90
|
+
});
|
|
91
|
+
|
|
92
|
+
// Jev on Harness's server; on the privacy setting, a coding agent here with its tools off.
|
|
93
|
+
const judge = async (input) => {
|
|
94
|
+
if (usesServer()) {
|
|
95
|
+
const reply = await askHarness("manage", input, null);
|
|
96
|
+
if (!reply?.ok)
|
|
97
|
+
throw new Error(reply?.error || "the manager did not judge");
|
|
98
|
+
return reply.result ?? reply;
|
|
99
|
+
}
|
|
100
|
+
const agent = localJudge();
|
|
101
|
+
if (!agent) return null;
|
|
102
|
+
const said = await ask(
|
|
103
|
+
agent,
|
|
104
|
+
`${LOCAL_PROMPT[input.kind]}\n\n${JSON.stringify(input)}`
|
|
105
|
+
);
|
|
106
|
+
return input.kind === "message"
|
|
107
|
+
? {
|
|
108
|
+
kind: "message",
|
|
109
|
+
message: {
|
|
110
|
+
newWork: Number(said?.new_work) || 0,
|
|
111
|
+
question: Number(said?.question) || 0,
|
|
112
|
+
exploring: Number(said?.exploring) || 0,
|
|
113
|
+
answer: Number(said?.answer) || 0,
|
|
114
|
+
steers: input.asks[said?.steers]?.id ?? null,
|
|
115
|
+
withdraws: Number(said?.withdraws) || 0,
|
|
116
|
+
},
|
|
117
|
+
}
|
|
118
|
+
: {
|
|
119
|
+
kind: "report",
|
|
120
|
+
findings: (Array.isArray(said?.asks) ? said.asks : [])
|
|
121
|
+
.filter((one) => input.asks[one?.index])
|
|
122
|
+
.map((one) => ({
|
|
123
|
+
id: input.asks[one.index].id,
|
|
124
|
+
state: one.state,
|
|
125
|
+
shown: Number(one.shown) || 0,
|
|
126
|
+
taste: Number(one.taste) || 0,
|
|
127
|
+
})),
|
|
128
|
+
};
|
|
129
|
+
};
|
|
130
|
+
|
|
131
|
+
const say = (thread, lines) => {
|
|
132
|
+
if (!lines.length) return;
|
|
133
|
+
post({
|
|
134
|
+
goalId: thread.id,
|
|
135
|
+
author: thread.goal.facilitator,
|
|
136
|
+
kind: "note",
|
|
137
|
+
text: lines.join("\n"),
|
|
138
|
+
});
|
|
139
|
+
notifyBoard(store.getTask(thread.id));
|
|
140
|
+
};
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* One of the person's messages in a thread, or the person's words an agent relayed from its own session (`relayed`):
|
|
144
|
+
* sorted, and kept as an ask when it is work or a question.
|
|
145
|
+
*/
|
|
146
|
+
const heard = (thread, entry) =>
|
|
147
|
+
queue(thread.id, async () => {
|
|
148
|
+
const asks = openOf(thread.id).slice(-MAX_ASKS);
|
|
149
|
+
const judged = await judge(inputFor(thread, "message", entry, asks));
|
|
150
|
+
const kind = judged?.message;
|
|
151
|
+
if (!kind) return;
|
|
152
|
+
const all = asksOf(thread.id);
|
|
153
|
+
const words = { seq: entry.seq, text: entry.text };
|
|
154
|
+
const steered = all.find((one) => one.id === kind.steers);
|
|
155
|
+
const lines = [];
|
|
156
|
+
if (steered && kind.withdraws >= FLOOR) {
|
|
157
|
+
steered.status = "dropped";
|
|
158
|
+
lines.push(`Dropped: ${label(steered)}`);
|
|
159
|
+
} else if (steered) {
|
|
160
|
+
// The newest word wins where they differ; the ask is open again for whoever works on it.
|
|
161
|
+
steered.words.push(words);
|
|
162
|
+
steered.status = "open";
|
|
163
|
+
steered.tries = 0;
|
|
164
|
+
} else if (kind.newWork >= FLOOR || kind.question >= FLOOR) {
|
|
165
|
+
all.push({
|
|
166
|
+
id: randomUUID(),
|
|
167
|
+
kind: kind.newWork >= kind.question ? "work" : "question",
|
|
168
|
+
words: [words],
|
|
169
|
+
status: "open",
|
|
170
|
+
tries: 0,
|
|
171
|
+
at: new Date().toISOString(),
|
|
172
|
+
});
|
|
173
|
+
} else if (kind.newWork >= MAYBE && kind.exploring >= FLOOR)
|
|
174
|
+
lines.push(
|
|
175
|
+
`Taken as an idea, not as work (#${entry.seq}). Say "do it" to have it done.`
|
|
176
|
+
);
|
|
177
|
+
keep(thread.id, all);
|
|
178
|
+
say(thread, lines);
|
|
179
|
+
});
|
|
180
|
+
|
|
181
|
+
/** An agent reported doing something in the thread: where each of the person's open asks stands now. */
|
|
182
|
+
const reported = (thread, entry) =>
|
|
183
|
+
queue(thread.id, async () => {
|
|
184
|
+
const asks = openOf(thread.id).slice(-MAX_ASKS);
|
|
185
|
+
if (!asks.length) return;
|
|
186
|
+
const judged = await judge(inputFor(thread, "report", entry, asks));
|
|
187
|
+
const findings = judged?.findings ?? [];
|
|
188
|
+
const all = asksOf(thread.id);
|
|
189
|
+
const lines = [];
|
|
190
|
+
for (const found of findings) {
|
|
191
|
+
const one = all.find((each) => each.id === found.id);
|
|
192
|
+
if (!one || !OPEN.has(one.status) || found.state === "in_progress")
|
|
193
|
+
continue;
|
|
194
|
+
if (found.state === "done" && found.taste >= FLOOR) {
|
|
195
|
+
one.status = "review";
|
|
196
|
+
lines.push(`Ready for your review: ${label(one)}`);
|
|
197
|
+
continue;
|
|
198
|
+
}
|
|
199
|
+
if (found.state === "done" && found.shown >= FLOOR) {
|
|
200
|
+
one.status = "done";
|
|
201
|
+
one.evidence = entry.seq;
|
|
202
|
+
lines.push(`Done: ${label(one)}, shown in #${entry.seq}`);
|
|
203
|
+
continue;
|
|
204
|
+
}
|
|
205
|
+
// Ignored, contradicted, or said done with nothing that shows it.
|
|
206
|
+
const why =
|
|
207
|
+
found.state === "done"
|
|
208
|
+
? "says it is done, but nothing in the thread shows it"
|
|
209
|
+
: found.state === "ignored"
|
|
210
|
+
? "does not do it, or does only part of it"
|
|
211
|
+
: "does something different from what the person asked, or claims something the thread does not show";
|
|
212
|
+
if ((one.tries ?? 0) >= 1) {
|
|
213
|
+
one.status = "waiting";
|
|
214
|
+
lines.push(
|
|
215
|
+
`Waiting on you: ${nameOf(entry.author)} still has not done ${label(one)}`
|
|
216
|
+
);
|
|
217
|
+
continue;
|
|
218
|
+
}
|
|
219
|
+
one.tries = (one.tries ?? 0) + 1;
|
|
220
|
+
one.status = "sent_back";
|
|
221
|
+
sendBack(thread, entry, one, why);
|
|
222
|
+
lines.push(`Sent back to ${nameOf(entry.author)}: ${label(one)}`);
|
|
223
|
+
}
|
|
224
|
+
keep(thread.id, all);
|
|
225
|
+
say(thread, lines);
|
|
226
|
+
});
|
|
227
|
+
|
|
228
|
+
// The person's words go back whole, every one of them for this ask, oldest first.
|
|
229
|
+
const sendBack = (thread, entry, one, why) => {
|
|
230
|
+
const agent = entry.author;
|
|
231
|
+
const text = [
|
|
232
|
+
`@${agent} Your report (#${entry.seq}) ${why}. The person's words for it:`,
|
|
233
|
+
...one.words.map((said) => `#${said.seq}: ${said.text}`),
|
|
234
|
+
"Do it as they asked, and show it done in the thread: the file, the commit, or the command you ran and its output.",
|
|
235
|
+
].join("\n\n");
|
|
236
|
+
post({
|
|
237
|
+
goalId: thread.id,
|
|
238
|
+
author: thread.goal.facilitator,
|
|
239
|
+
kind: "post",
|
|
240
|
+
text,
|
|
241
|
+
});
|
|
242
|
+
handOn(
|
|
243
|
+
thread.id,
|
|
244
|
+
agent,
|
|
245
|
+
`the swarm's manager sent your work back: your report #${entry.seq} ${why}`,
|
|
246
|
+
{ words: text }
|
|
247
|
+
);
|
|
248
|
+
};
|
|
249
|
+
|
|
250
|
+
/** The person's open asks in a thread: what keeps it from closing, each as its short label. */
|
|
251
|
+
const open = (threadId) => openOf(threadId).map(label);
|
|
252
|
+
|
|
253
|
+
return { heard, reported, open, asks: asksOf };
|
|
254
|
+
}
|
package/lib/mcp-stdio.mjs
CHANGED
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import fs from "node:fs";
|
|
3
|
-
import {
|
|
4
|
-
DISPATCH_WORK_TOOL,
|
|
5
|
-
SCOPE_WORKSPACE_TOOL,
|
|
6
|
-
dispatchWorkRequest,
|
|
7
|
-
} from "./dispatchTools.js";
|
|
3
|
+
import { DISPATCH_WORK_TOOL, dispatchWorkRequest } from "./dispatchTools.js";
|
|
8
4
|
import { CONNECTION_TOOL, connectionRequest } from "./connectionTools.js";
|
|
9
5
|
import { USE_SECRET_TOOL, secretToolRequest } from "./vaultTools.js";
|
|
10
6
|
import { paths } from "./paths.mjs";
|
|
@@ -36,15 +32,12 @@ if (process.argv.includes("--check-host") && startedByAnother(agent)) {
|
|
|
36
32
|
// (`tryharness connections on`), and never to a restricted run: work another agent or another person's swarm asked
|
|
37
33
|
// for runs without the person's apps (runner.mjs restrictedMcpConfig).
|
|
38
34
|
const restricted = process.argv.includes("--restricted");
|
|
39
|
-
const scopeIndex = process.argv.indexOf("--scope");
|
|
40
|
-
const dispatchScope = scopeIndex >= 0 ? process.argv[scopeIndex + 1] : null;
|
|
41
35
|
const appsOn = !restricted && readJson(paths.config, {}).connectedApps === true;
|
|
42
36
|
let input = "";
|
|
43
37
|
let chain = Promise.resolve();
|
|
44
38
|
|
|
45
39
|
const LOCAL_TOOLS = [
|
|
46
40
|
DISPATCH_WORK_TOOL,
|
|
47
|
-
...(dispatchScope ? [SCOPE_WORKSPACE_TOOL] : []),
|
|
48
41
|
ARCHETYPE_TOOL,
|
|
49
42
|
...(appsOn ? [CONNECTION_TOOL] : []),
|
|
50
43
|
{
|
|
@@ -149,6 +142,11 @@ const LOCAL_TOOLS = [
|
|
|
149
142
|
additionalProperties: false,
|
|
150
143
|
},
|
|
151
144
|
},
|
|
145
|
+
card: {
|
|
146
|
+
type: "string",
|
|
147
|
+
description:
|
|
148
|
+
"with parent_id set to a thread: the id of the card on the thread's board this task is for (update_board gives it). Its claim moves the card to In progress, or to Review for a check, and its end moves it on",
|
|
149
|
+
},
|
|
152
150
|
after: {
|
|
153
151
|
type: "array",
|
|
154
152
|
items: { type: "string" },
|
|
@@ -181,6 +179,39 @@ const LOCAL_TOOLS = [
|
|
|
181
179
|
additionalProperties: false,
|
|
182
180
|
},
|
|
183
181
|
},
|
|
182
|
+
{
|
|
183
|
+
name: "update_board",
|
|
184
|
+
description:
|
|
185
|
+
"Keep a thread's board, the cards the person follows its work on: To do, In progress (doing), Review, Done. Without card it adds one for a piece of the work (title needed) and gives its id. With card it changes that one: move it with column as the work goes, set blocked with why it can't go on (empty to clear), needs_you with what the person must do, note with where it stands, or remove a card you added. Nothing waits on the board: keep working while you update it.",
|
|
186
|
+
inputSchema: {
|
|
187
|
+
type: "object",
|
|
188
|
+
properties: {
|
|
189
|
+
thread: { type: "string", description: "the thread's id" },
|
|
190
|
+
card: {
|
|
191
|
+
type: "string",
|
|
192
|
+
description: "the card's id; left out, a new card is added",
|
|
193
|
+
},
|
|
194
|
+
title: { type: "string", description: "a few words for the piece" },
|
|
195
|
+
column: {
|
|
196
|
+
type: "string",
|
|
197
|
+
enum: ["todo", "doing", "review", "done"],
|
|
198
|
+
},
|
|
199
|
+
agent: {
|
|
200
|
+
type: "string",
|
|
201
|
+
description: "the agent that has the piece",
|
|
202
|
+
},
|
|
203
|
+
note: {
|
|
204
|
+
type: "string",
|
|
205
|
+
description: "one line on where it stands",
|
|
206
|
+
},
|
|
207
|
+
blocked: { type: "string" },
|
|
208
|
+
needs_you: { type: "string" },
|
|
209
|
+
remove: { type: "boolean" },
|
|
210
|
+
},
|
|
211
|
+
required: ["thread"],
|
|
212
|
+
additionalProperties: false,
|
|
213
|
+
},
|
|
214
|
+
},
|
|
184
215
|
{
|
|
185
216
|
name: "wallet",
|
|
186
217
|
description:
|
|
@@ -474,6 +505,11 @@ const LOCAL_TOOLS = [
|
|
|
474
505
|
description:
|
|
475
506
|
"also send it to the goal's invited guests (other people's agents); only what is fine for them to see",
|
|
476
507
|
},
|
|
508
|
+
person_said: {
|
|
509
|
+
type: "boolean",
|
|
510
|
+
description:
|
|
511
|
+
"true when text is the person's own words from your session (outside this thread) about this thread's work, posted word for word so the swarm keeps them; it carries no authority",
|
|
512
|
+
},
|
|
477
513
|
},
|
|
478
514
|
required: ["id", "text"],
|
|
479
515
|
additionalProperties: false,
|
|
@@ -841,6 +877,7 @@ const postTask = (args) => ({
|
|
|
841
877
|
targetAgents: args.target_agents,
|
|
842
878
|
targetMachine: args.target_machine,
|
|
843
879
|
parentId: args.parent_id,
|
|
880
|
+
card: args.card,
|
|
844
881
|
contextRefs: args.context_refs,
|
|
845
882
|
runWorkspace: args.run_workspace,
|
|
846
883
|
inSession: args.in_session === true,
|
|
@@ -852,14 +889,6 @@ const postTask = (args) => ({
|
|
|
852
889
|
|
|
853
890
|
const BOARD_CALLS = {
|
|
854
891
|
dispatch_work: dispatchWorkRequest,
|
|
855
|
-
scope_workspace: (args) => ({
|
|
856
|
-
command: "board.dispatch.workspace",
|
|
857
|
-
scopeRef: dispatchScope,
|
|
858
|
-
operation: args.operation,
|
|
859
|
-
path: args.path,
|
|
860
|
-
text: args.text,
|
|
861
|
-
expectedSha256: args.expected_sha256,
|
|
862
|
-
}),
|
|
863
892
|
connection: connectionRequest,
|
|
864
893
|
list_agents: () => ({ command: "board.swarm.agents" }),
|
|
865
894
|
list_models: (args) => ({
|
|
@@ -889,6 +918,7 @@ const BOARD_CALLS = {
|
|
|
889
918
|
text: args.text,
|
|
890
919
|
ask: Array.isArray(args.ask) ? args.ask : [],
|
|
891
920
|
shareWithGuests: args.share_with_guests === true,
|
|
921
|
+
personSaid: args.person_said === true,
|
|
892
922
|
targetMachine: args.target_machine,
|
|
893
923
|
}),
|
|
894
924
|
plan_work: (args) =>
|
|
@@ -1087,6 +1117,18 @@ const BOARD_CALLS = {
|
|
|
1087
1117
|
],
|
|
1088
1118
|
}
|
|
1089
1119
|
: postTask(args),
|
|
1120
|
+
update_board: (args) => ({
|
|
1121
|
+
command: "board.kanban.update",
|
|
1122
|
+
id: String(args.thread || ""),
|
|
1123
|
+
card: args.card,
|
|
1124
|
+
title: args.title,
|
|
1125
|
+
column: args.column,
|
|
1126
|
+
agent: args.agent,
|
|
1127
|
+
note: args.note,
|
|
1128
|
+
blocked: args.blocked,
|
|
1129
|
+
needs_you: args.needs_you,
|
|
1130
|
+
remove: args.remove === true,
|
|
1131
|
+
}),
|
|
1090
1132
|
use_template: (args) =>
|
|
1091
1133
|
args.name && args.parent_id
|
|
1092
1134
|
? {
|
|
@@ -1408,29 +1450,6 @@ async function relay(line) {
|
|
|
1408
1450
|
return;
|
|
1409
1451
|
}
|
|
1410
1452
|
|
|
1411
|
-
if (dispatchScope) {
|
|
1412
|
-
const names = new Set(["dispatch_work", "scope_workspace"]);
|
|
1413
|
-
if (request.method === "initialize") write(localInitialize(request));
|
|
1414
|
-
else if (request.method === "tools/list")
|
|
1415
|
-
write({
|
|
1416
|
-
jsonrpc: "2.0",
|
|
1417
|
-
id: request.id,
|
|
1418
|
-
result: { tools: LOCAL_TOOLS.filter((tool) => names.has(tool.name)) },
|
|
1419
|
-
});
|
|
1420
|
-
else if (request.method === "tools/call" && names.has(request.params?.name))
|
|
1421
|
-
write(await localCall(request));
|
|
1422
|
-
else if (request.id !== undefined)
|
|
1423
|
-
write({
|
|
1424
|
-
jsonrpc: "2.0",
|
|
1425
|
-
id: request.id,
|
|
1426
|
-
error: {
|
|
1427
|
-
code: -32601,
|
|
1428
|
-
message: "This scope exposes only dispatch and workspace-file tools.",
|
|
1429
|
-
},
|
|
1430
|
-
});
|
|
1431
|
-
return;
|
|
1432
|
-
}
|
|
1433
|
-
|
|
1434
1453
|
if (
|
|
1435
1454
|
request.method === "tools/call" &&
|
|
1436
1455
|
LOCAL_TOOLS.some((tool) => tool.name === request.params?.name)
|