Repository navigation
feat(core): accept guidance for manual compaction - #56208
rekram1-node wants to merge 10 commits into
Conversation
There was a problem hiding this comment.
The change works as described. I drove both checkouts with the simulated model and posted {"focus": "..."} to /api/session/:id/compact. On the base the field is silently dropped. With this PR it is stored on the compaction inbox item and shows up as the <focus> section in the summary request. The core compaction, runner and execution tests pass, and type checks are clean in core, server, schema, protocol and client.
Public API changes (all additive and backwards compatible):
POST /api/session/:sessionID/compactbody accepts an optionalfocus: string.Session.Inbox.CompactionPayloadchanges from{}to{ focus?: string }.- The client's
SessionCompactInputgainsfocus?.
One thing to fix before merge: packages/protocol/openapi.json wasn't regenerated, so bun run check:generated in packages/protocol fails on this branch (it passes on the base), and CI runs that check. Running bun run generate in packages/protocol should fix it.
Related: #42574
993d4ac to
c1d48d6
Compare
9fadf2c to
fb21095
Compare
Problem
Manual compaction gives the user no way to say what the summary should keep or drop.
Change
/compactaccepts optional guidance and appends it to the summary prompt./compact <text>sends the text as guidance.Out of scope
Verification
bun run checkpackages/core,packages/tuiandpackages/cli(ACP)Closes #42574