@koalaauto/agentchannel 3.98.1 → 3.98.2
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/src/mcp.d.ts +4 -2
- package/dist/src/mcp.js +8 -10
- package/dist/src/version.d.ts +1 -1
- package/dist/src/version.js +1 -1
- package/package.json +1 -1
package/dist/src/mcp.d.ts
CHANGED
|
@@ -73,8 +73,10 @@ export declare const toolHints: (name: string) => {
|
|
|
73
73
|
};
|
|
74
74
|
/**
|
|
75
75
|
* Ask the person, in their client's own question box (MCP elicitation), whether something waiting on a card goes out
|
|
76
|
-
* (docs/specs/mcp-client.md §4.2).
|
|
77
|
-
*
|
|
76
|
+
* (docs/specs/mcp-client.md §4.2). One step: the box has no field, so the client's own two buttons are the answer: accept
|
|
77
|
+
* sends it, decline does not. Null when there is no answer: the client has no question box, they dismissed it (Esc), or it
|
|
78
|
+
* timed out; the card then stays where it is, on the Yoda page. Nothing a model writes reaches this answer.
|
|
79
|
+
* In Chinese when the machine is, or when what is to be sent is written in Chinese.
|
|
78
80
|
*/
|
|
79
81
|
export declare function askToConfirm(server: McpServer, what: string, env?: NodeJS.ProcessEnv): Promise<'confirm' | 'decline' | null>;
|
|
80
82
|
/** Which tool settles a waiting item of the person's Inbox (hub: api/person-inbox.ts), in one line; '' when none of ours does. */
|
package/dist/src/mcp.js
CHANGED
|
@@ -253,23 +253,21 @@ const TASK_ACTS = {
|
|
|
253
253
|
const oneLine = (s) => { const t = String(s ?? '').replace(/\s+/g, ' ').trim(); return t.length > 120 ? `${t.slice(0, 120)}…` : t; };
|
|
254
254
|
/**
|
|
255
255
|
* Ask the person, in their client's own question box (MCP elicitation), whether something waiting on a card goes out
|
|
256
|
-
* (docs/specs/mcp-client.md §4.2).
|
|
257
|
-
*
|
|
256
|
+
* (docs/specs/mcp-client.md §4.2). One step: the box has no field, so the client's own two buttons are the answer: accept
|
|
257
|
+
* sends it, decline does not. Null when there is no answer: the client has no question box, they dismissed it (Esc), or it
|
|
258
|
+
* timed out; the card then stays where it is, on the Yoda page. Nothing a model writes reaches this answer.
|
|
259
|
+
* In Chinese when the machine is, or when what is to be sent is written in Chinese.
|
|
258
260
|
*/
|
|
259
261
|
export async function askToConfirm(server, what, env = process.env) {
|
|
260
262
|
if (!server.server.getClientCapabilities()?.elicitation)
|
|
261
263
|
return null;
|
|
262
|
-
const zh = isZh(env);
|
|
263
|
-
const [yes, no] = zh ? ['发出', '不发'] : ['Send', 'Do not send'];
|
|
264
|
+
const zh = isZh(env) || /[\u3400-\u9fff]/.test(what);
|
|
264
265
|
try {
|
|
265
266
|
const r = await server.server.elicitInput({
|
|
266
|
-
message: zh ? `以你的名义发出?\n${what}
|
|
267
|
-
requestedSchema: { type: 'object', properties: {
|
|
267
|
+
message: zh ? `以你的名义发出?\n${what}\n\n接受:发出。拒绝:不发。` : `Send this in your name?\n${what}\n\nAccept: it is sent. Decline: it is not.`,
|
|
268
|
+
requestedSchema: { type: 'object', properties: {} },
|
|
268
269
|
}, { timeout: 10 * 60_000 });
|
|
269
|
-
|
|
270
|
-
return null;
|
|
271
|
-
const d = r.content?.decision;
|
|
272
|
-
return d === yes ? 'confirm' : d === no ? 'decline' : null;
|
|
270
|
+
return r.action === 'accept' ? 'confirm' : r.action === 'decline' ? 'decline' : null;
|
|
273
271
|
}
|
|
274
272
|
catch {
|
|
275
273
|
return null;
|
package/dist/src/version.d.ts
CHANGED
package/dist/src/version.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@koalaauto/agentchannel",
|
|
3
|
-
"version": "3.98.
|
|
3
|
+
"version": "3.98.2",
|
|
4
4
|
"description": "Hand work between your team's agents (Claude Code, Codex) and follow it in one panel: the ach CLI, MCP server and runner for AgentChannel v2",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"agentchannel",
|