Skip to content

v0.43.0

Latest

Choose a tag to compare

@jale-dbox jale-dbox released this 30 Nov 10:42
v0.43.0
47febd0

Added

  • A Playbook now carries its own revision history. domain_packs documents gain revision — monotonic, bumped by every write that changes the pack's content — and revisions[], 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.

    revision is 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 a 409 instead 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 PUT whose 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: export omits it and import drops 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, and before snapshots only the touched areas, never the pack.

  • An Ask session records which surface it belongs to. ask_sessions gains an optional surface (ask by default, absent on every existing row, which EffectiveSurface() reads as ask). 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/sessions accepts ?surface= and lists ask when it is omitted — unchanged for every existing client. An unrecognised value is a 400 rather than the wrong list. Details.

    AskSessionRepo.ListByProject takes 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).