@koalaauto/agentchannel 3.75.0 → 3.76.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/src/args.js +4 -3
- package/dist/src/cli.js +8 -1
- package/dist/src/client.d.ts +6 -0
- package/dist/src/client.js +5 -1
- package/dist/src/mcp.js +13 -5
- package/dist/src/prompts.js +1 -0
- package/dist/src/version.d.ts +1 -1
- package/dist/src/version.js +1 -1
- package/package.json +1 -1
package/dist/src/args.js
CHANGED
|
@@ -30,13 +30,13 @@ export const COMMANDS = {
|
|
|
30
30
|
channels: { all: b, ...json },
|
|
31
31
|
channel: { since: s, before: s, limit: s, ...json },
|
|
32
32
|
post: { attach: sm, 'attach-url': sm, announce: b, card: s, ...json },
|
|
33
|
-
reply: { evidence: s, escalate: b, to: s, ask: s, 'as-owner': b, attach: sm, 'attach-url': sm, ...json },
|
|
33
|
+
reply: { evidence: s, escalate: b, to: s, ask: s, 'as-owner': b, settles: s, attach: sm, 'attach-url': sm, ...json },
|
|
34
34
|
thread: { ...json },
|
|
35
35
|
search: { channel: s, author: s, limit: s, ...json },
|
|
36
36
|
ask: { task: s, to: s, attach: sm, 'attach-url': sm, ...json },
|
|
37
37
|
answer: { task: s, 'reply-to': s, evidence: s, attach: sm, 'attach-url': sm, ...json },
|
|
38
38
|
'ask-human': { task: s, to: s, attach: sm, 'attach-url': sm, option: sm, recommend: s, action: s, arg: sm, money: s, ...json },
|
|
39
|
-
withdraw: { task: s, reason: s, ...json },
|
|
39
|
+
withdraw: { task: s, post: b, reason: s, ...json },
|
|
40
40
|
related: { ...json },
|
|
41
41
|
about: { task: s, ...json },
|
|
42
42
|
decide: { task: s, ...json },
|
|
@@ -204,6 +204,7 @@ Messages: ach ask [--task <id>] [--to <agent>] "<question>"
|
|
|
204
204
|
(a capability your owner declared confirm: true: the person who asked for the work confirms that exact call;
|
|
205
205
|
then call the capability with the same arguments, once)
|
|
206
206
|
ach withdraw [--task <id>] <messageId> [--reason "<few words>"] (close your own open question or request that no longer stands)
|
|
207
|
+
ach withdraw --post <postId> (close your own question to a person in a channel thread, settled elsewhere)
|
|
207
208
|
ach about [--task <id>] <source:id> (what this task is about in another system, e.g. batch:20261118_003; set once)
|
|
208
209
|
ach related <source:id> (the tasks and outside events about it)
|
|
209
210
|
ach progress [--task <id>] "<text>" | ach note [--task <id>] "<text>"
|
|
@@ -216,7 +217,7 @@ Channels: ach channels [--all] | ach channel [<#name>] [--since <iso>] [--be
|
|
|
216
217
|
--announce: "shipped" / "data published": an announcement every channel reader is notified of)
|
|
217
218
|
ach post <#name> --card '<json>' | --card @card.json (a card instead of text, e.g. a #product-log entry:
|
|
218
219
|
{"type":"change","tag":"feature|fix|change","title","date","summary","by":[logins],"refs":[links]})
|
|
219
|
-
ach reply [<postId>] "<text>"|- [--evidence "<files/commands>"] [--escalate [--to owner|asker] [--ask "<one line to decide>"] | --as-owner] [--attach <file> ...]
|
|
220
|
+
ach reply [<postId>] "<text>"|- [--evidence "<files/commands>"] [--escalate [--to owner|asker] [--ask "<one line to decide>"] | --as-owner] [--settles <postId>] [--attach <file> ...]
|
|
220
221
|
(postId defaults to $ACH_THREAD_ID in a mention run; "-" reads the text from stdin, e.g. a quoted heredoc)
|
|
221
222
|
ach thread <postId> | ach search "<query>" [--channel <name>] [--author <agent|person>] [--limit n]
|
|
222
223
|
Inside a spawned agent: no new top-level posts; replies only in the task's own thread.
|
package/dist/src/cli.js
CHANGED
|
@@ -752,7 +752,7 @@ async function dispatch(p, io) {
|
|
|
752
752
|
const att = files();
|
|
753
753
|
if (!body && !att.length)
|
|
754
754
|
throw new UsageError('reply: missing "<text>"');
|
|
755
|
-
const r = await client().reply(id, body, { evidence: str(v.evidence), escalate: !!v.escalate, ...(v['as-owner'] ? { asOwner: true } : {}), ...(str(v.ask) ? { ask: str(v.ask) } : {}), ...(str(v.to) ? { escalateTo: str(v.to) } : {}) }, att);
|
|
755
|
+
const r = await client().reply(id, body, { evidence: str(v.evidence), escalate: !!v.escalate, ...(v['as-owner'] ? { asOwner: true } : {}), ...(str(v.settles) ? { settles: str(v.settles) } : {}), ...(str(v.ask) ? { ask: str(v.ask) } : {}), ...(str(v.to) ? { escalateTo: str(v.to) } : {}) }, att);
|
|
756
756
|
out(v.json ? r : `replied ${r.id}${r.escalated ? ' (escalated to a human)' : ''}${r.url ? `: ${absUrl(env, r.url)}` : ''}`);
|
|
757
757
|
for (const w of unreachedLines(r.unreached))
|
|
758
758
|
io.err(`warning: ${w}`);
|
|
@@ -794,6 +794,13 @@ async function dispatch(p, io) {
|
|
|
794
794
|
}
|
|
795
795
|
case 'withdraw': {
|
|
796
796
|
// ach withdraw <message-id> [--reason "..."]: close your own open request that no longer stands
|
|
797
|
+
if (v.post) {
|
|
798
|
+
// ach withdraw --post <post-id>: your own question to a person in a channel thread, settled elsewhere
|
|
799
|
+
const id = text(p, '<post-id>');
|
|
800
|
+
const r = await client().withdrawPost(id);
|
|
801
|
+
out(v.json ? r : `withdrawn (${id})`);
|
|
802
|
+
return 0;
|
|
803
|
+
}
|
|
797
804
|
const r = await client().withdraw(taskIdOf(p, io), text(p, '<message-id>'), str(v.reason) ?? '');
|
|
798
805
|
out(v.json ? r : `withdrawn (task now ${r?.task?.status ?? '?'})`);
|
|
799
806
|
return 0;
|
package/dist/src/client.d.ts
CHANGED
|
@@ -815,6 +815,7 @@ export declare class Client {
|
|
|
815
815
|
escalateTo?: 'owner' | 'asker';
|
|
816
816
|
ask?: string;
|
|
817
817
|
asOwner?: boolean;
|
|
818
|
+
settles?: string;
|
|
818
819
|
}, files?: string[]): Promise<Posted>;
|
|
819
820
|
thread(postId: string): Promise<Thread>;
|
|
820
821
|
search(q: string, o?: {
|
|
@@ -897,6 +898,11 @@ export declare class Client {
|
|
|
897
898
|
chars: number;
|
|
898
899
|
}>;
|
|
899
900
|
/** Withdraw this agent's own open decision request or question (it asked elsewhere, or no longer needs it). */
|
|
901
|
+
/** Withdraw your own question to a person in a channel thread (an escalated reply): it was settled elsewhere. */
|
|
902
|
+
withdrawPost(postId: string): Promise<{
|
|
903
|
+
ok: boolean;
|
|
904
|
+
post: string;
|
|
905
|
+
}>;
|
|
900
906
|
withdraw(taskId: string, messageId: string, reason?: string): Promise<any>;
|
|
901
907
|
decide(taskId: string, message_id: string, decision: string, files?: string[]): Promise<any>;
|
|
902
908
|
/** A human note on a task (user token; admins and the owners of either agent). */
|
package/dist/src/client.js
CHANGED
|
@@ -629,7 +629,7 @@ export class Client {
|
|
|
629
629
|
return posted(r);
|
|
630
630
|
}
|
|
631
631
|
async reply(postId, body, o = {}, files) {
|
|
632
|
-
const r = await this.ach('POST', `/posts/${enc(postId)}/replies`, { body, ...(o.evidence ? { evidence: o.evidence } : {}), ...(o.escalate ? { escalate: true, ...(o.escalateTo ? { escalate_to: o.escalateTo } : {}), ...(o.ask ? { ask: o.ask } : {}) } : {}), ...(o.asOwner ? { as_owner: true } : {}) }, files);
|
|
632
|
+
const r = await this.ach('POST', `/posts/${enc(postId)}/replies`, { body, ...(o.evidence ? { evidence: o.evidence } : {}), ...(o.escalate ? { escalate: true, ...(o.escalateTo ? { escalate_to: o.escalateTo } : {}), ...(o.ask ? { ask: o.ask } : {}) } : {}), ...(o.asOwner ? { as_owner: true } : {}), ...(o.settles ? { settles: o.settles } : {}) }, files);
|
|
633
633
|
return posted(r);
|
|
634
634
|
}
|
|
635
635
|
async thread(postId) {
|
|
@@ -689,6 +689,10 @@ export class Client {
|
|
|
689
689
|
return this.ach('GET', `/memory/brief${q}`);
|
|
690
690
|
}
|
|
691
691
|
/** Withdraw this agent's own open decision request or question (it asked elsewhere, or no longer needs it). */
|
|
692
|
+
/** Withdraw your own question to a person in a channel thread (an escalated reply): it was settled elsewhere. */
|
|
693
|
+
async withdrawPost(postId) {
|
|
694
|
+
return this.ach('POST', `/posts/${enc(postId)}/withdraw`, {});
|
|
695
|
+
}
|
|
692
696
|
async withdraw(taskId, messageId, reason = '') {
|
|
693
697
|
return this.ach('POST', `/tasks/${enc(taskId)}/messages/${enc(messageId)}/withdraw`, reason ? { reason } : {});
|
|
694
698
|
}
|
package/dist/src/mcp.js
CHANGED
|
@@ -136,7 +136,7 @@ export const MCP_INSTRUCTIONS = [
|
|
|
136
136
|
'- ask_dot: your owner\'s Dot, the team half of this session. When your user describes work for someone else without naming an agent ("get the gateway team to..."), or asks what goes on in the team or waits for them, ask Dot: it knows who does what and what is in progress, and acts as them (what needs their word waits on a card on the Dot page). It answers only if your owner has a Dot. dot_memory: what Dot remembers about your owner.',
|
|
137
137
|
'- send_task: hand a piece of work to another agent (title, money impact or "n/a", a markdown handoff). `to` may be a person (@handle) who has a Dot: their Dot picks the environment.',
|
|
138
138
|
'- claim_task, then task_progress / complete_task / fail_task: work a task sent to you here, interactively.',
|
|
139
|
-
'- ask / answer / request_decision: talk on a task; decisions about money, product direction or irreversible steps go to a human. withdraw_request: close your own open question or request once it no longer stands (you asked elsewhere,
|
|
139
|
+
'- ask / answer / request_decision: talk on a task; decisions about money, product direction or irreversible steps go to a human. withdraw_request: close your own open question or request (on a task, or an escalated reply in a channel) once it no longer stands (you asked elsewhere, it was decided another way), so nobody is left with it; reply with settles when you post the outcome in that thread.',
|
|
140
140
|
'- read_channel, list_channels, post, reply, search: read and write the team channels; cite links or TASK-numbers, not "the one above".',
|
|
141
141
|
'- Reaching a person: @ them by their name in a post or reply (@evan: a person\'s name is their one handle, in lowercase): it lands in their Inbox and wakes no agent. @ their agent (@alice-agent) when the agent should answer; that also reaches its owner\'s Inbox, even when the runner is offline or busy. A new post with no @ reaches no one\'s Inbox (a reply reaches the people already in that thread); a name written without @ is not a mention. ask goes to agents, not people.',
|
|
142
142
|
'- read_doc: a Feishu/Lark document or wiki link someone gave (it needs a login, so a web fetch gets nothing): the hub reads it with the team\'s app.',
|
|
@@ -350,9 +350,13 @@ export function buildMcpServer(client, o = {}) {
|
|
|
350
350
|
.catch(async (e) => { throw to.to_user ? await explainToUser(e, to.to_user, client, a.task_id) : e; });
|
|
351
351
|
}));
|
|
352
352
|
server.registerTool('withdraw_request', {
|
|
353
|
-
description: 'Withdraw your own open decision request or question on a task: you asked someone else
|
|
354
|
-
inputSchema: {
|
|
355
|
-
|
|
353
|
+
description: 'Withdraw your own open question: a decision request or question on a task (task_id + its message id), or a question you put to a person in a channel thread (an escalated reply: its post id, no task_id). Do it when it was settled another way (they decided in a session, you asked someone else) or no longer matters: it leaves the Inbox of whoever it waited on and no longer holds the task. When you post the outcome in that thread, reply with settles instead.',
|
|
354
|
+
inputSchema: {
|
|
355
|
+
task_id: z.string().optional().describe('the task, for a request on a task; leave out for a question in a channel thread'),
|
|
356
|
+
message_id: z.string().describe('the request\'s message id, or the escalated reply\'s post id'),
|
|
357
|
+
reason: z.string().optional().describe('a few words, e.g. "asked Jerry directly" (recorded on a task)'),
|
|
358
|
+
},
|
|
359
|
+
}, async (a) => wrap(() => (a.task_id ? client.withdraw(a.task_id, a.message_id, a.reason ?? '') : client.withdrawPost(a.message_id))));
|
|
356
360
|
server.registerTool('decide', {
|
|
357
361
|
description: 'Reply to a decision request addressed to your owner, as your owner (your owner is present in this session; recorded "via <agent>"). Never for anyone else.',
|
|
358
362
|
inputSchema: { task_id: z.string(), message_id: z.string(), reply: z.string() },
|
|
@@ -524,9 +528,13 @@ export function buildMcpServer(client, o = {}) {
|
|
|
524
528
|
.boolean()
|
|
525
529
|
.optional()
|
|
526
530
|
.describe('Answer FOR MY OWNER (the person), who is here in this session and told you what to say, to a question escalated to them (see owner_inbox). The reply is theirs, marked "via <your name>", and clears the card. It records no Memory decision: that needs their own click. Never use it without their say-so.'),
|
|
531
|
+
settles: z
|
|
532
|
+
.string()
|
|
533
|
+
.optional()
|
|
534
|
+
.describe('The post id of your own open question to a person in this thread (an escalated reply) that this reply settles: you post the outcome they decided elsewhere. It leaves their Inbox.'),
|
|
527
535
|
attachments: ATTACH,
|
|
528
536
|
},
|
|
529
|
-
}, async (a) => wrap(async () => withMentionWarnings(await client.reply(a.post_id, a.text, { evidence: a.evidence, ...(a.as_owner ? { asOwner: true } : {}) }, att(a.attachments)))));
|
|
537
|
+
}, async (a) => wrap(async () => withMentionWarnings(await client.reply(a.post_id, a.text, { evidence: a.evidence, ...(a.as_owner ? { asOwner: true } : {}), ...(a.settles ? { settles: a.settles } : {}) }, att(a.attachments)))));
|
|
530
538
|
server.registerTool('search', {
|
|
531
539
|
description: 'Search everything you can see: posts and replies, tasks (title, purpose, key question, money), handoff versions, messages and attachment names. Chinese works (1-2 character queries too). Results carry links.',
|
|
532
540
|
inputSchema: {
|
package/dist/src/prompts.js
CHANGED
|
@@ -579,6 +579,7 @@ export function buildMentionPrompt(c) {
|
|
|
579
579
|
' <reply, markdown>',
|
|
580
580
|
' EOF',
|
|
581
581
|
"- If it needs a human (money, product direction, anything irreversible, or you are not sure): `ach reply --escalate --evidence '<what you checked; claims you relay without checking, and whose>' --ask '<the one thing they must decide, one line>' - <<'EOF'`, the reply saying why, with options and money impact, then `EOF` (it goes to whoever mentioned you; add `--to owner` when the decision is your own owner's, e.g. your owner must approve something)",
|
|
582
|
+
'- When the thread holds a question you escalated earlier that is now settled (the person decided elsewhere) and your reply carries the outcome, add `--settles <that reply\'s post id>`: it leaves their Inbox.',
|
|
582
583
|
ownerAskedRule(c.ownerName, false),
|
|
583
584
|
"- Flag values go in single quotes, with no backtick or `$` in them; the heredoc's last line is `EOF` alone.",
|
|
584
585
|
'- `ach thread` shows the whole thread; `ach channel` the channel. Reply once, then stop.',
|
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.
|
|
3
|
+
"version": "3.76.0",
|
|
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",
|