Commit graph Brokkr/surfaces
Author SHA1 Message Date
Libby
f891404ee3 node-actions.md: point to the parked design tag
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-10 23:15:55 +00:00
Libby
01d25c6bf9 Blender createObject: pin whitespace meshType refusal, document meshType and null objectType
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-10 23:13:57 +00:00
Libby
944ea4a1ec Merge remote-tracking branch 'origin/main' into libby/refusals-fix
# Conflicts:
#	surfaces/blender/tests/test_scene_actions.py
2026-11-10 18:01:45 +00:00
730ceb9e0e Blender add-on: exportGltf action (#7) 2026-11-10 18:01:28 +00:00
8cebec6f3c Blender assignMaterial: colour, idempotent slot, malformed colour refused (#6) 2026-11-10 18:00:37 +00:00
Libby
6b7d6ae9e2 blender: renderStill refuses GL engines headless when libEGL is not loadable
BLENDER_WORKBENCH and BLENDER_EEVEE aborted the whole Blender process inside
bpy.ops.render.render with no receipt. The probe is cached, Linux only, and a
module-level function so tests replace it.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-10 17:55:38 +00:00
Libby
ece40040f4 blender: createObject refuses unknown objectType and non-cube meshType
TEXT and CURVE used to fall through to an EMPTY with an accepted receipt.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-10 17:55:38 +00:00
6995eabf51 Blender add-on: geometry node graph actions, modifier inputs, evaluated snapshot (#5) 2026-11-10 17:54:18 +00:00
6f0e70042d Blender add-on tests: token-guard test no longer pins the store spelling (#9) 2026-11-10 17:42:46 +00:00
Libby
a98ccacb37 Blender add-on docs: grant-all lets a peer write any registered document
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-07 19:14:21 +00:00
Libby
221f59b754 Blender add-on: grant peer writes explicitly to its served node
cultmesh_py (CultLib GameCult/CultLib#33) refuses peer puts and deletes unless a
write authority grants them. The add-on's clients put command intents, and the
session token guard already authenticates them, so the target passes
CultMeshGrantAllWrites() when cultmesh_py has it. Older cultmesh_py already
accepts every write and is left alone.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-07 19:08:33 +00:00
Libby
dbd4cc05d1 scene actions: device-name spellings, missing glTF references, link message kept, no folders on refused render
- check_relative: spaces before the first dot are dropped (CON .txt), superscript COM/LPT digits are device names.
- gltf_references refuses a reference to a missing file; drops the broad ValueError catch and redundant relative_to so the specific refusal (a link) reaches the receipt.
- _render_still makes folders only after every Blender-side refusal (unknown engine used to leave them behind).
- Tests for each.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-07 15:10:58 +00:00
Libby
5adff0f8a2 scene actions: junction refusal on Windows, direct path-rule tests, live junction smoke, TOCTOU doc
- resolve_inside maps OSError from resolving a component (WinError 448 on a mklink /J junction) to a link refusal.
- Direct check_relative test for '..' and NUL; OSError mapping test.
- headless_smoke.py makes real junctions on Windows (outside and inside the root) and an existing-output case.
- install.md documents the path rules and the residual TOCTOU.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-07 15:05:48 +00:00
Libby
72b52b5d0e scene actions: gltf reference check, relative-only names, link walk, no-overwrite output
WIP for review fixes, tests pass (61); mutation confirmation and Starfire re-run pending.

- importGltf parses .gltf JSON and .glb's JSON chunk, checks every buffers/images uri.
- Names are relative plain paths: no drive, UNC, extended, ':' (ADS), '..', device names.
- No symlink/junction component under the root; output must not already exist.
- Path and file stamps re-checked right before use; residual TOCTOU documented in code.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-07 13:20:30 +00:00
Libby
4b2fefa368 renderStill: ask Blender for the engine by assignment; add headless live smoke
Found by running the actions on Blender 5.2.3 headless: the render engine enum is
dynamic, bl_rna lists only BLENDER_EEVEE, so CYCLES and WORKBENCH were refused.
The fake in the tests now behaves like the real enum. surfaces/blender/tests/live/
headless_smoke.py runs every scene action against real bpy.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-07 13:14:47 +00:00
Libby
e9a780569f Merge main (server hardening, PR #1) into blender-scene-actions
Resolved blender_target.py: both the server-guard fields and the action directories kept.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-07 12:52:59 +00:00
Libby
2f38d0c9c2 Blender add-on: token never drawn, UI wiring tests, DELETE shard-log test
- Panel offers only the Copy Session Token button; the token is not drawn.
- Fake-bpy tests: allow_non_loopback carries an update callback that stops a running
  non-loopback server; copy operator writes the clipboard; the panel never draws the token.
- Real-server test: a DELETE with shardId and a valid token leaves no token in the shard log.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-07 12:52:40 +00:00
Libby
d1501e8fdb Blender add-on hardening: strip token before the store, bind enforcement, loaded-module display
- The guarded server removes sessionToken from put/delete messages before the store,
  which copies envelope fields into the shard log it serves.
- Copy Session Token operator.
- Panel shows cultmesh_py's loaded __file__, not the preference path.
- Unticking Allow Non-Loopback (and any refused start) stops a running non-loopback server.
- stop_server revokes, purges and clears state even if the socket stop raises.
- Tests: shard-log token leak on the real server, node half of the start purge, purge
  persisted across reopening the .ccmp, allow=True through start_server, finally-path.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-07 12:50:00 +00:00
Libby
2246584416 Blender add-on: importGltf, setCamera, setLight, setWorld, renderStill actions
Paths for importGltf and renderStill are confined to the Import Directory and
Render Output Directory preferences (empty disables the action; .. , absolute
paths and escaping symlinks are refused). Every field is validated before bpy is
touched. renderStill restores render settings afterwards. Tests use a fake bpy;
Blender was not run.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-07 12:43:45 +00:00
Libby
82c94cf92a Blender add-on: server hardening (opt-in session token, purge, bind guard)
- Optional per-session token (preference, default off): random secrets token at
  Start Server, shown in the panel, required in the sessionToken envelope field on
  every document put and delete, revoked on Stop, never persisted.
- Always on: queued command intents (node records and debug command JSONs) are
  purged on server start and stop; the panel shows the bind address and the
  cultlib_py_src path; a non-loopback Serve Host is refused unless the
  Allow Non-Loopback Bind preference is ticked, with a panel warning while running.
- Tests without Blender, plus real cultmesh_py server tests when CULTLIB_PACKAGES is set.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-07 12:41:38 +00:00
Meta Vens
be0cc3683f Brokkr advertisement: drop Eve surface URIs and eve.*.publish capabilities; Eve is deprecated
Per thing2:ruling:eve-dashboards-quarantined. Removes eveSurfaces from the provider advertisement and its schema, the two surface URIs, the eve.gui/eve.tui publish capabilities, and Eve wording in docs.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-22 20:14:59 +02:00
Meta Vens
121fa329e2 Soul pass 3: conditional enable in Runtime, receipt floor, one write path
- The enable commit is conditional (ExpectUnchanged) and lives in the new
  Runtime BrokkrCommandStore, with the pull-recompute-retry loop in
  BrokkrCommandDrain.EnableAsync, so the tests exercise the shipped code. An
  intent landing between the pull and the commit is expired, not run; eight
  refusals in a row fail the enable loudly with the sink off. The probe is now
  a thin fault-injecting wrapper over the real store, not a copy of it.
- Every editor write to the command lane is one cache commit; durable shard
  logs are off (no server, no reader).
- No receipt is pruned before ten minutes, whatever the count, and the CLI
  refuses a wait over five minutes. Fixed the comments that claimed otherwise.
- Pending and Prunable count a document only under the key its own id names.
- README and snapshot comment: the token stops stale EditorPrefs, it does not
  authenticate writers; a restored or sync-conflict copy of the editor's own
  store can rerun answered intents.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-29 17:52:34 +02:00
Meta Vens
878d6a52b5 Unity README: store-tied enable, receipt cap, interrupted is not idempotent
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-29 17:14:52 +02:00
Meta Vens
8651584f9d Commit the enable expiry and the prune as single cache batches
Database.PutAsync appends a mutation-log entry per record, so expiring 2000
intents took 17 s even with one flush. The drain's two bulk writes are now
atomic CultCache commits, so the enable cannot half-apply and the cost is per
commit.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-29 17:02:10 +02:00
Meta Vens
9f5e8fbf3c Decide "before the enable" by the store, batch the expiry, bound receipts
Soul pass 2 findings S1, S2, S3, S4.

- Enabling the sink is the drain's EnableAsync: every intent already in the
  store gets an "expired" receipt and the enable marker is written, all in one
  flush. No decision compares StoredAt with a clock any more, so a fast
  writer clock and the Rust daemon's secs.nanosZ stamps stop mattering.
- The operator's EditorPrefs hold a token, and the sink runs only while the
  store carries the marker with that token. A re-clone or a copied .brokkr has
  no such marker, so a stale "enabled" authorizes nothing and the editor drops
  it. The epoch and agentCommandsEnabledAt (host snapshot key 19) are gone.
- Selection is one pass over the store per tick (Pending), not a copy and sort
  per intent.
- Receipts are capped at the newest 1000, pruned 128 pairs per tick with the
  intent deleted before its receipt.
- A marker that could not be written is withdrawn, so the intent reads as
  never started and is retried, not "interrupted".
- The drain writes through IBrokkrCommandStore; puts stage and one flush makes
  them durable.
- The CLI timeout text no longer says the intent "stays written" without the
  expiry caveat; the check-then-write window on --command-id is documented.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-29 16:56:33 +02:00
Meta Vens
24a7de3788 Unity README: expiry, attempt markers, the per-tick bound and CLI exit codes
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-29 16:26:17 +02:00
Meta Vens
73f7926ad0 Make the editor service the only writer of unity/host/current
The window republished a snapshot it had captured earlier, which could carry a
stale agentCommandsEnabled. Publish Mirror and Auto Publish now ask the service
to capture and publish a fresh one; the window keeps the returned snapshot for
display only.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-29 16:16:50 +02:00
Meta Vens
c694f582c2 Drain intents through one class: attempt marker, enable epoch, per-tick bound
BrokkrCommandDrain owns every rule between a pending intent and its receipt.
The service and the scenario harness now run the same drain instead of two
copies of the loop.

- An "attempted" receipt is written and flushed before Execute. A crash or a
  failing final receipt write can no longer re-run an intent; the next drain
  rewrites a leftover marker as "interrupted" and the operator decides.
- The host snapshot carries the sink's enable epoch. Intents stored before the
  latest enable get an "expired" receipt and never run (operator ruling
  2026-09-30).
- One drain handles at most 16 intents, expired and denied ones included.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-29 16:16:41 +02:00
Meta Vens
9fbe94c579 Document agent commands: the toggle, the allowlist, the CLI, the store transport
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-29 14:49:09 +02:00
Meta Vens
12f2d426b1 A4: admission policy and the editor lifecycle actions
BrokkrCommandPolicy (Runtime, pure, tested outside Unity) is consulted by
BrokkrEditorService before every BrokkrUnityCommandExecutor.Execute; it is the
only call path into the executor. The per-project allowed-action list defaults
to scene mutation plus lifecycle; createScriptableObject, createPrefabVariant
and saveScene are shipped denied (parked Q4 = A), and an action the list does
not name is denied. A denial gets a receipt with status denied and a reason.
The window's buttons write intents like any other caller, so operator and
agent share the gate.

Re-landed from the donor as fresh code: refreshAssets, setEditorPlayState,
setEditorPaused, captureEditorView, and the play-state fields on the host
snapshot (keys 14-17). The donor's captureEditorView wrote to any rooted
outputPath; it now resolves the path through one function that accepts only a
plain relative .png path under <project>/.brokkr/captures and refuses drive
letters, rooted or UNC paths, stream suffixes and any .. segment on every host
OS, and dimensions are bounded to 8192. requestedBy joins the intent (key 17)
and is echoed on the receipt (key 6). saveScene is new.

The window gains an Allowed Actions field bound to a per-project preference.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-29 14:44:31 +02:00
Meta Vens
bfe1de6305 Take the capture fields out of the GameObject snapshot they were mis-inserted into
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-29 14:36:20 +02:00
Meta Vens
1e46483fe5 A3: brokkr-command, the caller CLI, with every intent field and a real CultLib root
Re-landed from the donor as a fresh file (read with git show, not merged).
Changes from the donor: the CultLibRoot default is ..\..\CultLib instead of a
directory that does not exist; every field of brokkr.unity.command_intent.v0
has a --kebab option (the donor mapped six of seventeen), and unknown options
are refused before anything is written; keys come from BrokkrCommandLedger;
exit is 0 accepted, 1 other receipt, 2 usage error or timeout; readHost opens
the store read-only and prints the agent-commands flag; a timeout says when
the editor reports the sink off. The intent gains the capture fields at keys
13-16, which the CLI needs and A4's executor will read.

Tests run the built CLI as a process against the editor probe: field mapping,
fresh id per invocation, exit code from the receipt, timeout leaves only the
intent, unknown option writes nothing, and every action name reaches the
editor once with one receipt.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-29 14:26:23 +02:00
Meta Vens
68319ddaf8 A1: BrokkrEditorService is the one command owner; the sink is off by default
Deleted: the window's command drain (OnEditorUpdate poll, Poll Mirror Command,
PublishCommandAndPoll executing), the window's own second mirror, and the
machine-global AutoPollCommands setting. The mirror lost its Watch-fed queue
and its in-memory dedup sets; BrokkrCommandLedger derives "pending" from the
cache on every call.

BrokkrEditorService ([InitializeOnLoad], one EditorApplication.update
registration, no asset-import or reload-script hooks) owns the mirror, the
one-second pull and the drain. AgentCommandsEnabled is per project and false
until the operator ticks the window toggle; loading the package opens no
store. The flag is published in the host snapshot. The mirror uses the
directory store with StartServer=false, so there is no listener.

The store path preference is now keyed by project too: it was one value for
every project on the machine, so enabling the sink in one project could have
opened another project's .brokkr.

Not compiled: Unity code is checked by the operator (see the A1 smoke steps).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-29 14:20:36 +02:00
Meta Vens
5d2dd77079 Order pending intents by stored-at alone
The key tie-break was redundant: AllStoredDocuments already sorts by schema
then key and OrderBy is stable. Stamps are minted per write in ticks, so a
tie cannot be built through the cache API to pin it.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-29 14:11:26 +02:00
Meta Vens
290ee15c23 Give BrokkrCommandLedger.cs a real meta guid
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-29 14:03:49 +02:00
Meta Vens
d498ee37ac Add BrokkrCommandLedger, the pending-intent rule, with its test project
The rule that decides which Unity command intents still await execution
(an id is answered by any receipt for it; oldest stored-at then key first)
was inline in the mirror and untestable outside Unity. It is now a
stateless ledger over a CultCache in Runtime/, compiled by
brokkr-contracts and pinned by brokkr-contracts.Tests, which also carries
the Imagination probe as an editor-without-Unity scenario harness.

The host snapshot gains agentCommandsEnabled (Key 18; 14-17 are held for
the play-state fields). Nothing in Unity uses the ledger yet.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-29 14:03:41 +02:00
Meta Vens
ae19d4e7e0 Drop the vendored CultMesh DLLs; depend on org.gamecult.cultlib
Delete the 27 vendored assemblies (55 files under Plugins/CultMesh, plus
Plugins.meta) and tools/vendor-cultmesh-unity.ps1. The package now declares
org.gamecult.cultlib 1.0.60 and both asmdefs reference GameCult.CultLib, the
shape CultLib's own editor-tools package uses. check.ps1 asserts the package
ships no .dll and declares the dependency, without pinning a version string.
The unity README names the host-manifest requirement.

Cut M1 of docs/brokkr-adoption-cut.md. Unity compile is an operator check.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-29 13:50:23 +02:00
Meta Vens
12f9169a48 Point the Blender add-on at CultLib's three Python packages
CultLib's Python runtime is now cultcache-py, cultnet-py and cultmesh-py,
one per layer like the Rust crates. `CultLib Python Source` therefore
names the CultLib packages directory and the loader puts each package's
src on sys.path, instead of one src directory that no longer holds all
three modules. The default also leaves E:\, which has not existed since
the July 2026 relocation.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-10 13:10:53 +02:00
Meta Vens
c40f5fe5ed Expose Blender sync controls in sidebar 2026-06-15 03:30:53 +01:00
Meta Vens
9513d3df48 Add Blender auto command drain 2026-06-15 03:27:21 +01:00
Meta Vens
0c36d32276 Expose parent sync in editor UX 2026-06-15 03:20:28 +01:00
Meta Vens
d2f94302cb Sync scene graph parent relationships 2026-06-15 03:06:55 +01:00
Meta Vens
de8a4b6d63 Sync Unity materials into Blender 2026-06-15 02:50:50 +01:00
Meta Vens
bb192a28c0 Add ad hoc syncvar editor publishing 2026-06-15 02:37:03 +01:00
Meta Vens
49263e223f Expose Brokkr sync receipts in editor mirrors 2026-06-15 02:23:55 +01:00
Meta Vens
9c2a4522f7 Add Blender visibility to Unity active sync 2026-06-15 01:49:02 +01:00
Meta Vens
a53b034053 Add Unity component property sync lane 2026-06-15 01:40:51 +01:00
Meta Vens
85a1e617e7 Add prefab command UX 2026-06-15 01:30:32 +01:00
Meta Vens
00dbe48241 Add ScriptableObject asset command surface 2026-06-15 01:24:18 +01:00
Meta Vens
659e3a5989 Add material sync lane 2026-06-15 01:13:51 +01:00