Public: anyone can read this; the crew can change it.
Talk's agent list makes room: `asks` comes off it, answered by the forge itself #16289
Check · Review · Land · Live done — Landed and live in production.
talk/asks-off → main 0 commits 1 thread · 1 unresolved
3 files
changed +37
−10
src/http/mcp/catalog.ts +11 −8
| @@ -22,9 +22,9 @@ export const DEFAULT_TOOLS: readonly string[] = [ | ||
| 22 | 22 | * plus what a person steering the forge by talking reads and does. Its harness calls only tools |
| 23 | 23 | * `tools/list` named, so a tool left out here is one Talk cannot use at all. The rule: the reads a |
| 24 | 24 | * question about the work needs (issues, pulls and their commits, threads and checks, search, |
| 25 | * files, runs and logs, asks, health, releases, people, and who the person is and what they may | |
| 25 | * files, runs and logs, health, releases, people, and who the person is and what they may | |
| 26 | 26 | * do, `whoami_can`), and the everyday writes on that work (comment, close or reopen, assign, |
| 27 | * labels, edit, review, merge, asks, the plan on an issue, a word to or a stop of a crew run, a | |
| 27 | * labels, edit, review, merge, the plan on an issue, a word to or a stop of a crew run, a | |
| 28 | 28 | * branch, a file and a pull for an app built in Talk, a new app). Each write is held as any write |
| 29 | 29 | * of this token is: after the agent has read text someone else wrote, a write the person's own |
| 30 | 30 | * words do not ask for comes back `needs_confirm`, and the asked-first list |
| @@ -33,16 +33,19 @@ export const DEFAULT_TOOLS: readonly string[] = [ | ||
| 33 | 33 | * itself (accounts, subscriptions, backups, cutting or rolling back a release, child forges, flags, |
| 34 | 34 | * boards, raw data), which an admin does on its own page; `find_tool` still names them. Also left |
| 35 | 35 | * out, so the list stays well inside one page of `tools/list` (about 17 KB of `TOOLS_PAGE_BYTES`' |
| 36 | * 20,000): `explore`, `forge_view` and `feed` (`apps`, `person`, `now`, `asks` and `health` answer | |
| 37 | * the same), `asked` (`issues`), `agents` (`now`), and the planning knobs a page sets | |
| 38 | * (`milestones`, `wait_for`, `hold`). Filtered by `visible` as every list is, so a tool this person | |
| 39 | * or token may not use is never shown. | |
| 36 | * 20,000): `explore`, `forge_view` and `feed` (`apps`, `person`, `now` and `health` answer | |
| 37 | * the same), `asked` (`issues`), `agents` (`now`), `asks`, `asks_act` and the asks filters (a | |
| 38 | * question about what waits on the person is answered by the forge itself from the same rows, | |
| 39 | * `actions/talk_decisions.ts`, each item a link to the page where it is decided; the inbox they | |
| 40 | * belong to is going, #16229), and the planning knobs a page sets (`milestones`, `wait_for`, | |
| 41 | * `hold`). Filtered by `visible` as every list is, so a tool this person or token may not use is | |
| 42 | * never shown. | |
| 40 | 43 | */ |
| 41 | 44 | export const TALK_TOOLS: readonly string[] = [ |
| 42 | 45 | ...DEFAULT_TOOLS, |
| 43 | 46 | "issue", "issues", "pull", "pulls", "commits", "threads", "search", "read_file", "repo", "run_log", |
| 44 | "preview", "asks", "assigned", "health", "releases", "person", "whoami_can", | |
| 45 | "close", "assign", "labels", "edit", "review", "merge", "asks_act", "keep_plan", "steer", "stop", | |
| 47 | "preview", "assigned", "health", "releases", "person", "whoami_can", | |
| 48 | "close", "assign", "labels", "edit", "review", "merge", "keep_plan", "steer", "stop", | |
| 46 | 49 | "write_file", "branches", "open_pull", "new_app", |
| 47 | 50 | ]; |
| 48 | 51 |
test/mcp-talk-tools.test.ts −2
| @@ -242,8 +242,6 @@ describe("every write Talk's agent is newly listed is held after it reads someon | ||
| 242 | 242 | // A real write of each (no dry run, no read-only form), on a hostile issue's repository. A write |
| 243 | 243 | // tool added to TALK_TOOLS without a row here fails the first test: add its row. |
| 244 | 244 | const WRITES: Readonly<Record<string, Record<string, unknown>>> = { |
| 245 | asks: { filter: "clear" }, | |
| 246 | asks_act: { action: "dismiss", items: ["x"], dryRun: false }, | |
| 247 | 245 | assign: { repo: "alice/hostile", number: 1, kind: "issue", assignee: "mallory" }, |
| 248 | 246 | branches: { repo: "alice/hostile", name: "evil", action: "create" }, |
| 249 | 247 | close: { repo: "alice/hostile", number: 1 }, |
test/talk-decisions.test.ts +26
| @@ -22,6 +22,9 @@ import { serveTalk, terminalAnswer } from "../src/tui/ssh-talk.ts"; | ||
| 22 | 22 | import type { SshSession } from "../src/ssh/channels.ts"; |
| 23 | 23 | import { pendingAmong, storeFile } from "../src/core/conversation_files.ts"; |
| 24 | 24 | import { quietLogs } from "./helpers/globals.ts"; |
| 25 | import { TALK_TOOLS } from "../src/http/mcp/catalog.ts"; | |
| 26 | import { serve } from "../src/http/server.ts"; | |
| 27 | import { createSession } from "../src/core/sessions.ts"; | |
| 25 | 28 | |
| 26 | 29 | quietLogs(); |
| 27 | 30 | |
| @@ -95,6 +98,29 @@ describe("talk answers what needs me", () => { | ||
| 95 | 98 | expect(await answer(bob, "what needs me")).toBe("Nothing is waiting on you."); |
| 96 | 99 | }); |
| 97 | 100 | |
| 101 | test("Talk's agent has no asks tool to call: a decision is made from the answer's links, each a page the person opens", async () => { | |
| 102 | // The forge answers this itself (the agent's binary does not exist here); the agent is not | |
| 103 | // listed a tool that would need the inbox's ids. | |
| 104 | expect(TALK_TOOLS).not.toContain("asks"); | |
| 105 | expect(TALK_TOOLS).not.toContain("asks_act"); | |
| 106 | const held = openIssue(app, alice, repo, { title: "Decide me", body: "" }); | |
| 107 | if (!held.ok) throw new Error("issue"); | |
| 108 | setAssignee(app.db, held.value.id, alice.id); | |
| 109 | const text = await answer(alice, "what needs me?"); | |
| 110 | const links = [...text.matchAll(/\]\((\/[^)\s]*)\)/g)].map((m) => m[1]!); | |
| 111 | expect(links.length).toBeGreaterThan(0); | |
| 112 | const servers = await serve(app); | |
| 113 | try { | |
| 114 | const cookie = `forge_session=${createSession(app.db, alice.id).token}`; | |
| 115 | for (const link of links) { | |
| 116 | const res = await fetch(`${servers.url}${link}`, { headers: { cookie }, redirect: "manual" }); | |
| 117 | expect(`${link} → ${res.status}`).toBe(`${link} → 200`); | |
| 118 | } | |
| 119 | } finally { | |
| 120 | servers.stop(); | |
| 121 | } | |
| 122 | }); | |
| 123 | ||
| 98 | 124 | test("the older row, which scores higher in its tier, is listed first", async () => { |
| 99 | 125 | const lone = await createRepo(app, alice, { name: "second", visibility: "public" }); |
| 100 | 126 | if (!lone.ok) throw new Error("repo"); |
new above
offline
nowiscrewNow(crew runs), not a list of what waits on the person. This claim is false, andasks_actstays listed with no source of item ids. Fix the comment and giveasks_actits ids, or dropasks_acttoo.