Commit graph Brokkr/surfaces/unity
Author SHA1 Message Date
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
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
Meta Vens
5b70f71c42 Add custom property sync lane 2026-06-15 01:03:02 +01:00
Meta Vens
419352cfba Add continuous sync loop and Cinemachine lane 2026-06-15 00:46:05 +01:00
Meta Vens
5b713f76fa Add active Brokkr sync pass 2026-06-15 00:20:44 +01:00
Meta Vens
f07ccef598 Add Brokkr sync organ contract and editor UX 2026-06-14 23:52:27 +01:00
Meta Vens
c8937a2e48 Align Unity warped video frame schema 2026-06-12 16:36:24 +01:00
Meta Vens
cb806aac75 Rebuild Unity bridge as CultMesh mirror 2026-06-12 16:30:41 +01:00
Meta Vens
3c6ab7e4df Expose Unity scene control through Brokkr 2026-06-12 13:26:14 +01:00
Meta Vens
2b8a247087 Wire Unity editor snapshots into Brokkr 2026-06-12 12:19:28 +01:00
Meta Vens
16adc98447 Initial Brokkr scaffold 2026-06-12 11:57:33 +01:00