Repository navigation
Added
-
A Playbook now carries its own revision history.
domain_packsdocuments gainrevision— monotonic, bumped by every write that changes the pack's content — andrevisions[], a bounded log of who changed what, when, and how the change arrived (origin: "user"for a direct edit,"ask_session"for an approved proposal from a conversation, which also records the session and proposal). Each entry snapshots the areas it touched as they stood, so the history can say what changed rather than only that something did. Details.revisionis also a concurrency guard on the server:PUT /api/v1/domain-packs/{slug}writes only if the pack is still at the revision the server read for that request, so a write that lands in between gets a409instead of being silently overwritten. The pin is taken server-side, not from the request body, so an editor that saves a copy it loaded earlier still replaces the whole document, as before.Both fields are server-owned. The Playbook editor round-trips a whole pack through a form and sends it back, so a
PUTwhose body omits them — which is every body an older client sends — would otherwise wipe the log; the repository strips them from the body and applies the bump itself, the same defence that already protected_id. A save that changes nothing records nothing, because a history where half the entries say "no change" is one nobody reads. The log is also deliberately not portable:exportomits it andimportdrops it, since it names people, conversations and proposals that exist in one deployment and nowhere else.Bounded by
PLAYBOOK_REVISION_HISTORY_MAX(default 50), trimmed oldest-first in the same write that appends — a pack document cannot grow without limit as it is edited, andbeforesnapshots only the touched areas, never the pack. -
An Ask session records which surface it belongs to.
ask_sessionsgains an optionalsurface(askby default, absent on every existing row, whichEffectiveSurface()reads asask). A surface decides which tools a turn is given, which system prompt it runs under, and which history list the session appears in, so two conversations in the same project can be about entirely different things without mixing.GET /api/v1/projects/{id}/ask/sessionsaccepts?surface=and listsaskwhen it is omitted — unchanged for every existing client. An unrecognised value is a400rather than the wrong list. Details.AskSessionRepo.ListByProjecttakes the surface as a required argument rather than an option: one surface's history must never show another's, and a default would make forgetting that silent instead of a compile error.
Release hygiene
Changelog [Unreleased] closed under 0.43.0 (#600).