From e271dcc9cf6e8ff5fa61a34694a28d6c9eef7d0e Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Fri, 27 Nov 2026 18:18:59 +0100 Subject: [PATCH] Live collab target r2: rulings in, phase two authoring surface Takes in the operator's 2026-11-27 rulings (no free-form Python, act then undo, last writer wins in the scene, brokkr-ctl blender built here) and adds phase two: scene collections as an authoring surface over a ship's .cc, opened at known record versions and pushed through AetherDb with a dry-run default and stale-version refusal. Records why neither variants' deltas nor CultNet carry the push today. Co-Authored-By: Claude Opus 5.5 --- docs/live-collab-target.md | 399 ++++++++++++++++++++++--------------- 1 file changed, 243 insertions(+), 156 deletions(-) diff --git a/docs/live-collab-target.md b/docs/live-collab-target.md index acbdb07..228ae83 100644 --- a/docs/live-collab-target.md +++ b/docs/live-collab-target.md @@ -4,200 +4,287 @@ Campaign `brokkr-live` (Nibu's mind). Working branch `nibu/live-collab-target`, `origin/main` 5e279b2. This document holds the rationale, the design truths the campaign produces, and the identity, lifecycle and authority table. The typed `target` in the mind holds the labelled invariants and the not-in-scope list; the -text below is their source. +text below is their source. Revision 2 adds phase two (the authoring surface) and +takes in the operator's rulings of 2026-11-27. + +Rulings in force: `brokkr-live:ruling:no-free-form-python`, `:act-then-undo`, +`:scene-last-writer-wins`, `:brokkr-ctl-blender-built-here`, +`:cc-is-hull-authority-scene-pushes-deltas`. ## Why Operator, 2026-11-27: Brokkr "is meant to give an agent hands into the same Blender -scene I'm looking at, enabling live collaboration work". Brokkr already runs inside -her live Blender: a `depsgraph_update_post` handler publishes a host snapshot and a -persistent 1 s `bpy.app.timers` callback drains command intents -(`surfaces/blender/brokkr_bridge/__init__.py:610-647`, `:668-671`). What it lacks is -everything that makes two people in one scene a collaboration rather than a remote -control: +scene I'm looking at, enabling live collaboration work". Her original vision for it: +"use Blender as an authoring environment, since it exposes typed access to all of the +assets we need over CultMesh. Certain collections within the Blender scene would +mirror their data into the exact documents Aetheria needs for its ships." -- an agent edit is not an undo step (research `nibu-body:research:blender-live-collab.brokkr-undo`); -- nobody can tell who made an edit: the Blender side reads no `requestedBy` - (`.brokkr-attribution-gate`); -- the human cannot stop an agent except by unticking a preference, and a queued intent - still runs if she ticks it back; -- the agent sees names and counts, not the viewport and not the Edit Mode selection - (`.brokkr-perception`); -- nothing stops an agent intent planned against an old scene from overwriting what she - did since; -- the agent has no hands: `brokkr-ctl` has no source (`.brokkr-no-agent-surface`). +So the campaign has two phases. **Phase one** makes the live session a collaboration: +the agent's edits are undoable and attributed, she can stop it, and it sees what she +sees. **Phase two** makes the scene an authoring surface over a ship's `.cc`: scene +collections map to the ship's records, the scene opens from the `.cc` at a known +revision, and pushes go back through AetherDb. -Its strengths stay: typed, validated actions with no free-form Python, path -confinement, loopback bind and an optional session token (`.brokkr-security`). +Brokkr already runs inside her live Blender: a `depsgraph_update_post` handler +publishes a host snapshot and a persistent 1 s `bpy.app.timers` callback drains +command intents (`surfaces/blender/brokkr_bridge/__init__.py:610-647`, `:668-671`). +What it lacks: an agent edit is not an undo step (`nibu-body:research:blender-live-collab.brokkr-undo`); +nobody can tell who made an edit (`.brokkr-attribution-gate`); the human can stop an +agent only by unticking a preference; the agent sees names and counts, not the viewport +or the Edit Mode selection (`.brokkr-perception`); and the agent has no hands, since +`brokkr-ctl` has no source (`.brokkr-no-agent-surface`). Its strengths stay: typed, +validated actions with no free-form Python, path confinement, loopback bind and an +optional session token (`.brokkr-security`). ## Prior art the design stands on -- **mcp-for-blender's `UserEditRecorder`** (`.mcp4b-human-edits`): buffers human - operator and undo/redo events with `undo_post`/`redo_post` handlers, attributes events - during an agent command to the agent, and hands the agent the human's activity before - its next action. We take the idea (the agent learns what the human did) and drop the - trajectory log: the snapshot carries per-object human-edit sequence numbers instead. +- **mcp-for-blender's `UserEditRecorder`** (`.mcp4b-human-edits`): the agent learns what + the human did between its actions. We keep the idea as snapshot fields, without a + trajectory log. - **blender-copilot** (`.copilot-undo-cancel`): one undo step per agent turn, a Stop - button, visible turns and an undo receipt, no approval gate. Its Stop cannot interrupt - a blocking native call. We take all four and accept the same limit. -- **Multi-User** (`.humans-multiuser`) and the paid collab add-ons (`.humans-others`): - presence of the other party in the 3D view, rights and object locks. We take presence - as a panel, derived from intents and receipts; human-to-human replication is theirs, - not ours. + button, visible turns and an undo receipt, no approval gate. Its Stop cannot + interrupt a blocking native call; ours cannot either. +- **Multi-User** (`.humans-multiuser`, `.humans-others`): presence of the other party. + We show presence in a panel; human-to-human replication is theirs. - **Blender Lab MCP and mcp-for-blender** (`.lab-official`, `.mcp4b-perception-safe`): - viewport screenshots as perception; arbitrary code with a weak or default-off - sandbox, and no undo. The perception we copy; the code path is fork Q1. -- **ceeyang/blender_mcp** (`.ceeyang-159`): 159 typed tools, every write undoable. The - existence proof that a typed vocabulary can be wide. -- The brush-tree campaign's `one-commit-primitive` (Libby's mind): a stale base is - refused, never merged. The conflict rule below is the same rule applied to a live scene. + viewport screenshots as perception. Their arbitrary-code path is refused here + (`no-free-form-python`). +- **ceeyang/blender_mcp** (`.ceeyang-159`): 159 typed tools, every write undoable; a + typed vocabulary can be wide. +- **Aetheria's ship package path** (Aetheria origin/master 6702b01bf, packager on + `nibu/hull-packager` 7101b5cec): `AetherDb ship-authoring` (create, stats, price, + product, regenerate with a dry-run default, validate, inspect) loads a `ship.cc` + through the game's own types; `tools/blender/package_hull.py` drives the + `aetheria_ships` add-on and AetherDb from a manifest; `tools/blender/aetheria_ships/ship_cc.py` + reads and writes `ship.cc` envelopes directly, with a layout revision hash for its + layout write. +- **CultCache compare-exchange and element ids** (CultLib origin/main baf4ecf7, + `src/GameCult.Caching/CultCache.cs:2228-2235` `Expect`/`ExpectUnchanged`; + `CultElementIds.cs`). `HardpointData.Id` is a `[CultElementId]` (Aetheria + `Assets/Scripts/ServerShared/ItemData.cs:648`). -## What probing established (Blender 5.3.0, Starfire, GUI, `--factory-startup`) +## What probing established -Probe scripts: `docs/research/live-collab/probe_timer_undo.py` and `probe_look.py`. -Each step runs in its own timer tick, as Brokkr's drain does. +Blender 5.3.0, Starfire, GUI, `--factory-startup`, each step in its own timer tick. +Scripts in `docs/research/live-collab/`. Research notes +`brokkr-live:research:live-collab-probes.*`. -1. **A write from a timer with no undo push is not a step, and it survives undo.** The - cube moved to x=1 with no push; one `ed.undo` left it at x=1. The next push captured - it, so the agent's write became part of the next step, whoever made it (case A). The - vendor warning (`.undo-timer-warning`) is real for unpushed writes, and the failure is - worse than "not undoable": the edit is misattributed. -2. **An explicit `ed.undo_push` from a timer makes a correct step.** x=2 pushed, x=3 - pushed; undo gave 2, undo gave 1 (the earlier step), redo gave 2 (case B). -3. **An UNDO-flagged operator called from a timer pushes its own step.** A sphere added - by `primitive_uv_sphere_add` vanished on one undo with no explicit push (case C). An - action that calls two operators therefore makes two steps unless told otherwise. -4. **Operators called with `undo=False` push nothing; one explicit push then covers - them.** Cube and cone added with `("EXEC_DEFAULT", False)`, one push, one undo removed - both, a second undo changed nothing (case E). This is the mechanism for "one intent, - one step". -5. **Edit Mode:** a bmesh write plus push in Edit Mode is reverted by one undo, and that - undo also left Edit Mode (the agent had entered it in the same probe); the mesh kept - its original vertex (case D). Mode entry and the agent step are not cleanly separable - when the agent itself changed mode. Not yet probed: the human in Edit Mode and the - agent writing. -6. **Driving `ed.undo`/`ed.redo` programmatically from timers crashed Blender 2 of 2 - times** in the long sequence (A through E in one session), with - `EXCEPTION_ACCESS_VIOLATION` in UI draw code after a memfile undo - (`outliner_draw_restrictbuts`, then `psys_get_current` from the properties editor). The - short sequences (C alone, D alone, E alone) did not crash. Cause not isolated; the - probe's own `temp_override` with a captured region is a suspect. -7. **The agent can see what the human sees.** `bpy.ops.screen.screenshot_area` on the - 3D view from a timer: 7 of 7 `FINISHED`, median 72.5 ms over runs 2-7 at 1574x888, - about 609 KB PNG, and it captured the splash screen over the viewport, so it is the - human's view, overlays and popups included. Each capture stalls her UI for that long. -8. **Edit Mode selection reads live** through `bmesh.from_edit_mesh` without leaving Edit - Mode: selected vertices `[0, 3]`, 0.013 ms, mode still `EDIT_MESH`. +1. **An unpushed write from a timer is not an undo step and survives undo**; the next + push absorbs it, so it is misattributed (`.timer-undo`, case A). +2. **An explicit `ed.undo_push` from a timer makes a correct step**, and undo and redo + walk it (case B). +3. **UNDO-flagged operators push their own step**; called `("EXEC_DEFAULT", False)` they + push none, and one explicit push covers several (cases C, E). This is how one intent + becomes one step. +4. **Edit Mode**: an agent bmesh write plus push is reverted by one undo, which also + left the Edit Mode the agent had entered (case D). +5. **Driving `ed.undo`/`ed.redo` from code crashed Blender 2 of 2 times** in the long + sequence, in UI draw after a memfile undo (`.programmatic-undo-crash`). +6. **The agent can see her view**: `screenshot_area` on her 3D view, median 72.5 ms at + 1574x888, about 609 KB, popups included; Edit Mode selection reads live without + leaving Edit Mode (`.look-capture`). +7. **Depsgraph updates from an agent edit arrive inside the timer turn** and name + indirect dependents; after an undo every object is listed and only the transform and + geometry flags show what changed (`.depsgraph-timing`). +8. **cultcache-rs writes the add-on's single-file `.ccmp` under the shared lock, and a + live cultmesh-py node pulls Rust writes**; no runtime has a directory store + (`.rust-store-writer`). -Not yet probed, and owed before the cut that depends on it: whether depsgraph updates -caused by an agent intent arrive inside the timer callback or after it returns (this -decides how human edits are told from agent edits); and whether a human Ctrl+Z inside a -pending agent intent's base window can be detected reliably by `undo_post`. +Not yet probed, owed before the cut that depends on it: the latency of one AetherDb +`ship-authoring` call on Starfire (phase two decides between a CLI call per push and a +resident service on that number); reading a record's stored version through AetherDb. -## Design truths +## Phase one: the live session **One agent turn primitive.** Every agent mutation in Blender goes through one function -in the add-on: admit (sink enabled, `requestedBy` present, id unused, base fresh), run -the action with every operator called `undo=False`, push exactly one undo step labelled -`Brokkr : `, write the receipt. A refusal or a -failure pushes nothing and leaves the scene as it was. Typed actions, the node actions, -and `run` if Q1 keeps it, all use it; there is no second writer. +in the add-on: admit (sink enabled, `requestedBy` present, id unused, action typed and +valid), run the action with every operator called `undo=False`, push exactly one undo +step labelled `Brokkr : `, write the receipt. A +refusal or a failure pushes nothing and leaves the scene unchanged. There is no second +writer and no script action (`no-free-form-python`): what the typed actions do not +cover waits for a new typed action. -**Undo belongs to the human.** Blender's one linear stack is the shared history. The -agent's steps sit in it, labelled, between hers; she undoes them with Ctrl+Z like her -own. The agent never calls `ed.undo` or `ed.redo` (probe 6); an agent that wants to back -out sends a new compensating intent, which is one more step. Undoing an agent step that -sits under later human steps is not offered: Blender's stack is linear and per-user undo -is out of scope. +**The agent acts; the human undoes** (`act-then-undo`). Admitted intents apply without +asking. Blender's one linear undo stack is the shared history; agent steps sit in it, +labelled, between hers, and she takes them back with Ctrl+Z. The agent never calls +`ed.undo` or `ed.redo` (probe 5); it backs out by sending a compensating intent. -**Stop is one control, and only the human holds it.** The Brokkr panel's Stop turns the -command sink off and gives every pending intent a `stopped` receipt without running it. -An action already running finishes (a blocking native call cannot be interrupted, as in -blender-copilot); it is one undo step, so Stop plus Ctrl+Z always returns her scene. No -intent can turn the sink on. Re-enabling is a fresh decision, and intents queued before -Stop never run. +**Last writer wins in the scene** (`scene-last-writer-wins`). An agent intent applies +even if she changed the scene since the agent looked. Her edit is never lost: it stays +in the undo history below the agent's step, and one Ctrl+Z takes the agent's step back. +This is scene-level only; the `.cc` keeps its revision refusal (phase two). + +**Stop is one control, and only the human holds it.** Stop turns the command sink off +and gives every pending intent a `stopped` receipt without running it. An action +already running finishes as one undo step, so Stop plus Ctrl+Z always returns her +scene. No intent can turn the sink on; intents queued before Stop never run. **The agent sees her view and her edits.** `look` is a read intent: it captures her 3D -view to a scratch PNG named by command id (ruling `brush-tree:ruling:look-files-are-scratch`) -and returns the path; it pushes no undo step. The snapshot gains the Edit Mode selection -and a Blender session id plus human-edit sequence numbers: one counter for the session, -the last sequence at which the human touched each object, and the last sequence at which -she undid or redid. The agent reads "what changed since I last looked" from those. +view to a scratch PNG named by command id (`brush-tree:ruling:look-files-are-scratch`) +and returns the path. The snapshot gains the Edit Mode selection, a Blender session id, +and human-edit sequence numbers (a session counter and, per object, the last sequence +at which she changed it, from depsgraph updates outside agent turns and flagged +transform, geometry or shading). These tell the agent what she did since it last +looked; they gate nothing. -**A human edit is never silently overwritten.** Every mutating intent names the base -sequence it was planned against. If the human touched any datablock the intent targets -since that base, or undid or redid since it, or the session id changed, the intent is -refused with a `conflict` receipt naming what changed, and nothing is applied. The -agent looks again and re-plans. Granularity is fork Q3. +**Presence is derived.** The panel shows active agents, the running or last intent with +its one-line `note`, and recent receipts with their undo labels, read from the intent +and receipt documents. -**Presence is derived.** The panel shows which agents have intents or receipts in the -last minutes, the running or last intent with its one-line `note`, and the recent -receipts with their undo labels. It reads the intent and receipt documents; it owns no -state of its own. +**Hands are a CLI** (`brokkr-ctl-blender-built-here`). `brokkr-ctl blender` is a Rust +binary in this repo (`brush-tree:ruling:fitting-home-ruled`) that writes intents and +reads receipts and snapshots in the add-on's single-file store (probe 8), prints plain +text or paths, and whose `--help` is the schema (`brush-tree:ruling:cli-not-mcp`, +`:help-is-the-schema`). It owns no state, policy or ledger. Libby's brush-tree adds its +tree commands to the same binary later. -**Hands are a CLI.** `brokkr-ctl blender` (Rust, ruling `brush-tree:ruling:fitting-home-ruled`) -writes intents and reads receipts and snapshots through the Blender mirror store -(`brush-tree:ruling:blender-transport-ruled`), prints plain text or paths, and its -`--help` is the schema (`brush-tree:ruling:cli-not-mcp`, `:help-is-the-schema`). It owns -no state, policy or ledger (brush-tree target invariant `brokkr-authority-holds`). +## Phase two: the authoring surface + +**The `.cc` is the authority; the scene is a surface over it** +(`cc-is-hull-authority-scene-pushes-deltas`). A ship's records live in its `ship.cc`: +`HullData`, `ShipAuthoring` (model asset, anchors, schematic lines) and its product +records (`ShipAuthoringStore.Load` returns exactly these three). A Blender scene may be +bound to one `ship.cc` as its authoring surface. The scene never becomes truth: it is an +edit buffer that opens from the store and pushes back to it. + +**Collections carry roles.** Scene collections are tagged with the role they author: +hull shape (the hull source and its raster), hardpoint rows (one object per row, +carrying `aetheria.id`, the `HardpointData` element id, and its kind, cell, footprint, +rotation, armor and arc), schematic lines, and anchors. Stats, price and product live on +the binding. These are the fields the packager manifest already names +(`tools/blender/package_hull.md`), so the manifest and a push describe a ship in one +vocabulary. + +**Open reads through the game's code.** Opening runs `AetherDb ship-authoring` to read +the three records and their stored versions, builds the tagged collections, and records +on the binding the version of each record it read. Nothing reads a `.cc` by scraping +envelopes (operator 2026-11-17). + +**A push is one AetherDb call, dry-run then apply.** The surface writes the authoring +state of its tagged collections (the manifest vocabulary, plus the record versions it +opened at) to a scratch request file and calls `AetherDb ship-authoring push +`. Without `apply` AetherDb loads the store, derives the records the request +describes, validates them, and prints the per-record, per-field changes; nothing is +written. With `apply` it does the same and writes under compare-exchange on each +record's stored version (`Expect`). One CLI call per push is the starting shape; a +resident service is built only if the measured latency of that call demands it. + +**A stale revision is refused, never merged.** If any record changed in the store since +the scene opened it (another push, a CLI `stats` call, a packager `--replace`), the push +is refused with the records named; the surface reopens and the author re-applies. On a +successful apply the binding takes the new versions. + +**One owner turns a hull into records.** AetherDb's ship-authoring code (C#, the game's +own types) is the only code that derives `HullData`, `ShipAuthoring` and product records +from authoring input, and the only writer of `.cc` stores. The packager and the +authoring surface both call it. The direct envelope writes in +`aetheria_ships/ship_cc.py` (`replace_lines`, `replace_visual`, `replace_layout`, and +the first Save Layout that creates `ship.cc`) and its `layout_revision` hash are +demoted: `ship_cc.py` keeps no write path and no revision of its own, and +`package_hull.py`'s Save Layout steps become push calls. Whether the request is +the delta of the ruling, or a whole-record replace, is fork Q5 below. + +**The agent's hands reach the surface through typed actions.** Open, push dry-run and +push apply are typed Brokkr actions like any other, admitted by the same primitive; a +push changes no scene state and so pushes no undo step. Whether an agent may apply, +not only dry-run, is fork Q7. + +### Variants and CultNet deltas: not the push primitive today + +The coordinator asked whether Libby's `variants` delta records, or CultNet's deltas, +are the primitive for the push. + +- **Variants** (`variants` target, Libby's mind): a variant is a persisted record stored + as a base reference plus sparse overrides (`CultVariantDelta`, `CultVariantOverride` + with `Set`/`Insert`/`Remove` at slot plus element-id paths, + `src/GameCult.Caching/CultVariants.cs:56-112`), resolved by the cache at load, and a + plain upsert at a variant's key is refused (`variants:ruling:q1-refuse-plain-upsert`). + It describes a second document defined against a base, not a change to the base. Its + nested paths and `Insert`/`Remove` are unbuilt (`variants:follow_up:remaining-variant-cuts`, + C2b), C# alone resolves it, and Aetheria catalog content is out of its scope. +- **CultNet** (`contracts/cultnet/`): the wire has whole-document `document-put` and + `document-put-raw`, `document-delete`, and `database-change-raw` (added, updated, + removed, with the whole document and a commit id). There is no delta message. The + "delta" in `cultnet-rs/src/replication.rs:97,789-829` and `cultmesh-py/node.py:1649-1660` + is a client-side reconciliation diff (predicted minus canonical, per top-level slot, + numeric subtraction) handed to the caller to smooth a prediction; it is never sent. +- **One mechanism?** Not today. They are two unrelated things that share a word. The + operator's recollection matches the plan, not the code: variants' fork ruling 4 + (`cultnet-deltas`) says variants travel on CultNet as deltas, and + `variants:ruling:hop-subscriptions-refuse-variants` holds CultNet off variants until + that cut (C5) lands. When it does, the override vocabulary will be both the stored + variant and the wire delta. +- **Consequence for the push.** The push invents no delta format. Its addressing is the + variants override vocabulary (slot plus element id; `HardpointData.Id` is already a + `[CultElementId]`) when CultLib can apply overrides to a record in place; until then + it is a whole-record replace of the records that changed, guarded by `Expect`. Fork Q5. ## Authority map -- **Owner.** The add-on's agent turn primitive owns whether and how an agent intent - changes the live scene. Blender owns scene truth and the undo stack. The human owns - the sink toggle, Stop, and undo. -- **Inputs.** Intent documents; the snapshot's human-edit sequences; the sink toggle. -- **Outputs.** One undo step per accepted mutating intent; one receipt per intent; - the refreshed snapshot; look PNG paths. -- **Derived state.** Presence (from intents and receipts). Human-edit sequences - (from depsgraph and undo handlers, observations only). Look PNGs (telemetry). -- **Forbidden writers.** `execute_command` called outside the primitive; operators - called with undo on inside an agent action; any raw RNA write by an agent without the - closing push; `ed.undo`/`ed.redo` from add-on code; the debug-mirror JSON import - (`blender_target.py` `_import_debug_command_files`) as a second door for intents; - `brokkr-ctl` opening the store to decide anything. +- **Owner.** Phase one: the add-on's agent turn primitive owns whether and how an agent + intent changes the live scene; Blender owns scene truth and the undo stack; the human + owns the sink toggle, Stop and undo. Phase two: the `ship.cc` owns the ship; + AetherDb's ship-authoring code alone derives and writes its records. +- **Inputs.** Intent documents and the sink toggle (phase one). The tagged collections, + the binding's opened versions and the request file (phase two). +- **Outputs.** One undo step per accepted mutating intent; one receipt per intent; the + refreshed snapshot; look PNG paths; AetherDb's dry-run diff or its write. +- **Derived state.** Presence; human-edit sequences; look PNGs; the scene's mapped + collections (an edit buffer over the `.cc`); the request file. +- **Forbidden writers.** `execute_command` called around the primitive; operators run + with undo on inside an agent action; unpushed agent writes; `ed.undo`/`ed.redo` from + add-on code; any agent-sent Python; the debug-mirror JSON import as a door for intents + (`blender_target.py` `_import_debug_command_files`); `brokkr-ctl` deciding anything; + `ship_cc.py`'s envelope writes and any other direct `.cc` writer; `layout_revision` + as a revision. - **Shared paths.** brokkr-ctl intents, panel buttons that act on the scene, sync-organ - intents from `brokkr-daemon sync-once`, and replayed intents use the one primitive. + intents and replayed intents use the one primitive. The packager, the authoring + surface's buttons and an agent's push intent use the one AetherDb push. - **Deletion line.** The debug-mirror intent import goes before the primitive lands; - `drain_commands` stops calling `execute_command` directly. + `drain_commands` stops calling `execute_command` directly. `ship_cc.py`'s write + functions and `layout_revision` go when the push lands. ## Identity, lifecycle and authority | Persistent kind | What names it | What happens to it over time | Who decides | |---|---|---|---| -| Blender command intent `brokkr.blender.command_intent.v0` (gains `requestedBy`, `baseSeq`, `note`) | `blender/commands/{commandId}`; ids single-use, minted by the writer (Unity F6 A, `brush-tree:ruling:blender-sink-mirrors-unity`) | Written once by a caller. Executed at most once or refused. Removed when its receipt is written, as today. Never rewritten. | Callers write. The agent turn primitive alone decides admission and execution. | -| Blender command receipt `brokkr.blender.command_receipt.v0` (gains `requestedBy`, `outcome` in accepted, denied, conflict, stopped, failed, `undoLabel`, `lookPath`, and for `run` the script text and SHA-256) | `blender/receipts/{commandId}`, one per intent | Written once, after the primitive decides. Pruned by count with Unity's cap and prune rule. The only proof an intent ran. | The primitive alone. Callers and the panel read. | -| Agent identity `requestedBy` | `/` stated by the caller (brokkr-ctl takes it from `EUREKA_INSTANCE` and a flag) | Carried on each intent into its receipt and undo label; not stored on its own. | The caller states it; the primitive refuses an intent without it. The session token proves admission, not identity. | -| Agent undo step | Blender undo stack entry labelled `Brokkr : ` | Pushed once per accepted mutating intent; lives as Blender's stack does (step limit, file load); never persisted by Brokkr. | Blender owns the stack. The primitive pushes. Only the human undoes or redoes. | -| Blender session id | uuid minted at add-on register and on each `load_post` | Replaced when Blender restarts or a file loads; every older base is then stale. | The add-on alone. | -| Human-edit sequences (snapshot fields: `humanEditSeq`, per-object `lastHumanEditSeq`, `lastUndoSeq`) | Integers within a session id | Monotonic within a session; reset with it. Observations, never scene truth. | The add-on's depsgraph and undo handlers alone. | -| Host snapshot `brokkr.blender.host_snapshot.v0` (gains Edit Mode selection, session id, the sequences above, sink state) | `blender/host/current`, overwritten | Refreshed on depsgraph update and after each intent. | The add-on alone. | -| Command sink toggle (the existing `auto_drain_commands` preference) | Add-on preference, echoed in the snapshot | Off by default. Stop turns it off; only the human turns it on. | The human only. No intent writes it. | -| Script toggle (only if Q1 = b) | A second add-on preference, echoed in the snapshot | Off by default, independent of the sink. | The human only. | -| Look PNG | `/look/{commandId}.png` | Pruned by count; never read back as truth. | The primitive writes; `brush-tree:ruling:look-files-are-scratch` governs. | +| Blender command intent `brokkr.blender.command_intent.v0` (gains `requestedBy`, `note`) | `blender/commands/{commandId}`; ids single-use, minted by the writer (`brush-tree:ruling:blender-sink-mirrors-unity`) | Written once by a caller. Executed at most once or refused. Removed when its receipt is written. Never rewritten. | Callers write. The agent turn primitive alone decides admission and execution. | +| Blender command receipt `brokkr.blender.command_receipt.v0` (gains `requestedBy`, `outcome` in accepted, denied, stopped, failed, `undoLabel`, `lookPath`) | `blender/receipts/{commandId}`, one per intent | Written once, after the primitive decides. Pruned by count with Unity's cap and prune rule. | The primitive alone. Callers and the panel read. | +| Agent identity `requestedBy` | `/` stated by the caller | Carried on each intent into its receipt and undo label; not stored on its own. | The caller states it; the primitive refuses an intent without it. The session token proves admission, not identity. | +| Agent undo step | Blender undo entry `Brokkr : ` | One per accepted mutating intent; lives as Blender's stack does; never persisted by Brokkr. | Blender owns the stack; the primitive pushes; only the human undoes or redoes. | +| Blender session id | uuid minted at add-on register and on each `load_post` | Replaced when Blender restarts or a file loads. | The add-on alone. | +| Human-edit sequences (snapshot: `humanEditSeq`, per-object `lastHumanEditSeq`) | Integers within a session id | Monotonic within a session; reset with it. Information for the agent; they gate nothing. | The add-on's depsgraph and undo handlers alone. | +| Host snapshot `brokkr.blender.host_snapshot.v0` (gains Edit Mode selection, session id, sequences, sink state, authoring binding summary) | `blender/host/current`, overwritten | Refreshed on depsgraph update and after each intent. | The add-on alone. | +| Command sink toggle (`auto_drain_commands`) | Add-on preference, echoed in the snapshot | Off by default. Stop turns it off; only the human turns it on. | The human only. | +| Look PNG | `/look/{commandId}.png` | Pruned by count; never read back as truth. | The primitive writes; `look-files-are-scratch` governs. | +| Ship package store `ship.cc` (`HullData`, `ShipAuthoring`, product records) | Its path, `GameData/Mods//ship.cc`; records by their keys | Created by `ship-authoring create`; changed only by AetherDb commands, each write minting new stored versions (`variants:ruling:storedat-on-change`); replaced whole only by packager `--replace`. | AetherDb's ship-authoring code is the only writer. | +| Record version | The version CultCache's compare-exchange tests for each record key | Changes on every write that changes the record's bytes. | CultCache mints it; AetherDb reports it on open and tests it on apply. | +| Authoring binding | A custom property on the Blender scene: the `ship.cc` path relative to the `.blend`, the ship id, and the record versions opened at | Set on Open; versions replaced after each successful apply; cleared on Detach or reopen. Lives in the `.blend`. | Open, apply and Detach (human buttons or agent actions through the primitive) alone write it. | +| Collection role | A custom property on a collection: hull, hardpoints, lines or anchors | Set when the surface builds or the author tags a collection; removed on Detach. | The author; the surface's Open builds the defaults. | +| Hardpoint row identity | `aetheria.id` on the row's object, equal to `HardpointData.Id` (`[CultElementId]`) | Minted when the row is created; survives renames and moves; removing the object removes the row on the next push. | AetherDb mints for a new row; the surface carries it. | +| Push request | `/authoring/{commandId}.json`, manifest vocabulary plus opened versions | Written per push; pruned by count; never read back as state. | The surface writes; AetherDb alone interprets it. | ## Not in scope -Human-to-human replication or several Blender instances in one session (Multi-User's -domain). Agents on another host reaching the operator's Blender: the transport is not -widened beyond what the add-on serves today. Per-user or selective undo. An approval gate -before each agent action (unless Q2 rules otherwise). A 3D-view overlay of the agent's -presence; the panel carries presence in this revision. The Unity surface and -`brokkr-command`. The brush-tree vocabulary, Geometry.Csg and OpenSCAD text (brush-tree -owns them). Agent-initiated save and quit (`brush-tree:ruling:run-admitted-when-enabled` -keeps them off the allowed list). Asset libraries and generators. An MCP server. +Human-to-human replication or several Blender instances in one session. Agents on +another host reaching the operator's Blender. Per-user or selective undo. An approval +gate (`act-then-undo`). Stale-action refusal inside the live scene +(`scene-last-writer-wins`). Any agent-sent Python (`no-free-form-python`). A 3D-view +presence overlay. The Unity surface and `brokkr-command`. The brush-tree vocabulary, +Geometry.Csg and OpenSCAD text (brush-tree owns them). Agent-initiated save and quit. +Asset libraries and generators. An MCP server. Records outside a ship package +(catalog loadouts, factions) unless Q6 rules them in. A new delta wire format. ## Open forks (draft questions; Self admits) -- **Q1. Free-form Python.** Today the Blender add-on has no script action. Libby's - Defaulted ruling `brush-tree:ruling:run-admitted-when-enabled` would add `run`, admitted - whenever agent commands are on. Options: (a) typed actions only; (b) `run` behind its - own off-by-default toggle, one undo step, script text in the receipt; (c) the Defaulted - ruling as written. Recommend (b). -- **Q2. Act then undo, or approve first.** Recommend act then undo, with Stop. -- **Q3. Conflict granularity.** (a) any human edit since the base refuses; (b) only edits to - the intent's targets, plus any undo or redo. Recommend (b), after the depsgraph - attribution probe. -- **Q4. Who builds `brokkr-ctl blender`.** Recommend this campaign builds the session - subcommands in Rust per Libby's rulings, and brush-tree adds its tree commands to the - same binary later. +- **Q5. What a push carries.** (a) whole records that changed, under `Expect`, now; (b) + variants override paths applied in place, after CultLib builds in-place apply and + C2b; (c) (a) now with the request shaped so (b) replaces it without changing the + surface. Recommend (c). +- **Q6. Does a ship's loadout belong in its package?** A package holds hull, authoring + and products today; loadouts are catalog records. Recommend not in r2. +- **Q7. May an agent apply a push, or only dry-run?** A `.cc` write has no Ctrl+Z. + Recommend dry-run for agents, apply by her button. +- **Q8. Where the authoring surface lives.** (a) the `aetheria_ships` add-on in Aetheria, + with Brokkr giving the agent typed actions that call it; (b) Brokkr's add-on gains + Aetheria vocabulary. Recommend (a).