diff --git a/docs/guide.md b/docs/guide.md index 31b2ca978..996d41d5b 100644 --- a/docs/guide.md +++ b/docs/guide.md @@ -1012,6 +1012,9 @@ few things that matter most. To have something pinned, ask the thread ## Projects +When a project update needs your approval, its details show the current +project name and ID alongside the proposed changes. + A project gathers the threads about one thing, whatever folder they ran diff --git a/docs/protocol.md b/docs/protocol.md index c8d520eeb..16571a04d 100644 --- a/docs/protocol.md +++ b/docs/protocol.md @@ -8552,7 +8552,9 @@ same rename), `join_project` putting such a thread in a project, project such a thread is in (by the project's list or the thread's own), `move_thread` of a thread a schedule's check runs for (the check runs in its folder), `update_schedule` changing the text, title, time, folder or paused state of a schedule whose runs are above the caller or that -has a check, and any `check`. A thread's access there is the most its agent +has a check, and any `check`. A project-update approval names the current +project as `{ title, id }` in its input, separately from any proposed new +`title`. A thread's access there is the most its agent has now (`Runner.accessOf`): its mode, or more while a turn that had more is still running, as a Codex turn keeps the mode it started with. Setting the mode a thread or schedule already has is left out of the write, so it can't diff --git a/runner/src/threadbear-mcp.ts b/runner/src/threadbear-mcp.ts index fc2b21b1a..b54ad6839 100644 --- a/runner/src/threadbear-mcp.ts +++ b/runner/src/threadbear-mcp.ts @@ -1314,7 +1314,7 @@ export function buildThreadbearTools( if (top) { const parentShown = newParent ? { title: newParent.title, id: newParent.id, ...(newParent.goals ? { goals: newParent.goals } : {}) } : parent; const fields = Object.fromEntries(Object.entries({ title, goals, state, notes, appendNote, addFolders: added, notion, links, addLinks, parent: parentShown }).filter(([, v]) => v !== undefined)); - await confirm('update_project', [`Change the brief of the project "${p.title}", which "${top.title}" (${accessName(top)}) is told`], { project: p.id, ...fields }, extra?.signal); + await confirm('update_project', [`Change the brief of the project "${p.title}", which "${top.title}" (${accessName(top)}) is told`], { project: { title: p.title, id: p.id }, ...fields }, extra?.signal); if (addFolders?.length) for (const [i, f] of addFolders.entries()) await sameFolder(f, added![i]!); // The title and goals shown are what it gets: a parent changed // while the card waited is refused. diff --git a/runner/test/unit/raising-access.test.ts b/runner/test/unit/raising-access.test.ts index 53790bfba..bd8462ea0 100644 --- a/runner/test/unit/raising-access.test.ts +++ b/runner/test/unit/raising-access.test.ts @@ -327,7 +327,13 @@ test('ask: a project\'s brief reaching a thread with more access asks (join_proj // The Mac card's heading is only "Use update project?", so why it asks goes // in its reason line too, not just the title's tooltip (David, 9 Nov 2026). assert.equal(edit.card.reason, edit.card.title); + assert.deepEqual(edit.card.input.project, { title: 'Mine', id: p.id }); assert.equal(s.projects.list()[0].goals, 'Tidy things'); + const rename = await withCard(s, 'allow', 'update_project', { project: p.id, title: 'Renamed' }); + assert.equal(rename.error, false); + assert.deepEqual(rename.card.input.project, { title: 'Mine', id: p.id }); + assert.equal(rename.card.input.title, 'Renamed'); + assert.equal(s.projects.list()[0].title, 'Renamed'); // Folder paths are in the brief too. assert.equal((await withCard(s, 'deny', 'update_project', { project: p.id, addFolders: ['/tmp'] })).error, true); // Links too: their titles are words the thread reads (Codex review, 7 Nov 2026).