Implementation Log: ANU-12 - Build the Anuva Bento Editor and Template Families
Status: Completion review passed; awaiting explicit ready-and-merge approval.
Changes and decisions
| Area | Decision | Evidence |
|---|---|---|
| Baseline | Preserve Bento v1.0.8 and the completed ANU-11 contract/player as the implementation base. | Downstream/origin 42dbb0a109e73339d56e403c3a23717f3b132c7d; upstream 55e4d0fcda49d588ee5620f79b8ac7d0d733cdfc |
| Boundary | Keep contract DTOs and validation server-safe; keep editor/store/DOM behavior under the isolated Anuva editor adapter. | Approved ImplementationPlan |
| Persistence | The host owns persistence and accepted revisions. The editor emits validated save requests and never assigns an authoritative accepted revision. | Approved ImplementationPlan |
| Surfaces | One editor session owns three independent surface documents and loads only the active surface into the Bento store. | Approved ImplementationPlan |
| Mutation | Interactive and host/AI operations share validated atomic command paths with whole-presentation undo/redo. | Approved ImplementationPlan |
| Security | Production mode excludes public update, collaboration, alternate persistence, unrestricted patching, and executable operations. | Approved ImplementationPlan |
Files and documentation updated
- Planning records:
index.mdImplementationPlan.md- this
ImplementationLog.md - Production source, tests, fixtures, artifacts, and normative documentation are recorded below.
Production source map
packages/anuva-bento-contract/src/editor.ts- editor protocol, template-family DTOs, AI-operation union, closed runtime validation, safe areas, renderer compatibility, audit context, and stable issues.
packages/anuva-bento-contract/src/authoring.ts- pure semantic mapping, layout/family application, external-binding remap, allowlisted batch execution, revision preflight, and atomic rollback.
packages/anuva-bento-contract/schemas/editor.schema.json- distributed editor, family, layout, slot, audit, and operation schema.
packages/anuva-bento-contract/src/constants.ts- exact editor, editor-protocol, family-schema, and shared-renderer versions.
slides/src/anuva/template-families.ts- Signal and Paper coordinated Main/Companion/Emphasis layout packs.
slides/src/anuva/editor-session.ts- one composite session, surface materialize/dehydrate, host revision state, presentation-level history, save validation, and recovery.
slides/src/anuva/editor-bridge.tsandslides/src/anuva/editor-message-security.ts- exact-origin/parent-source message bridge and request/result lifecycle.
slides/src/anuva/editor-shell.tsandslides/src/anuva/editor-production.css- keyboard-accessible surface tabs, family selection, composite undo/redo, host save action, safe-area status, focus styles, and production-only UI.
slides/src/main.tsandslides/src/store.ts- narrow embedded-editor seams that avoid constructing collaboration state and load host session documents without document-local undo contamination.
slides/anuva-editor-host.htmlandslides/src/anuva/editor-host-entry.ts- repository-local end-to-end host protocol and network-denial harness.
slides/vite.anuva-editor.config.ts,scripts/package-anuva-editor.ts, and package scripts- production editor-only build and deterministic local artifact.
scripts/test-anuva-editor.ts- focused server-safe contract, schema, template, operation, revision, preservation, rollback, origin/source, and generated-case coverage.
Normative documentation
docs/editor/defines the host protocol, family schema/versioning, semantic mapping, AI catalog, media boundary, undo/failure rules, security/packaging, and the example families.- Repository architecture/security and contract compatibility, asset, error, presentation, and packaging pages record the durable ANU-12 rules.
Verification evidence
Pre-change baseline
Tool identity:
- Node
v24.18.0 - npm
10.9.2 - Vite
7.3.6 - TypeScript
5.8.3 - Bento
1.0.8
| Command | Result |
|---|---|
npm ci |
Passed; 79 packages installed |
npm run build |
Passed |
| documented Windows single-file equivalent | Passed; compressed shell 580 KB |
node ..\scripts\test-sync.ts |
Passed; 45,362 checks |
npm run test:anuva |
Passed; 103 contract and 37 adapter checks |
npm run build:anuva |
Passed |
npm run package:player |
Passed; 10 files; manifest SHA-256 1e148a2ce8df63e72344f84b8451ee0c3bd054ac1b218c67829a5c4f0496d71b |
The worktree contained only the approved ANU-12 planning records before implementation began.
Focused implementation evidence
| Check | Result |
|---|---|
npm run test:editor |
Passed initially with 158 checks; completion-review suite passed with 162 checks |
npm run build:editor |
Passed; exact production editor entry |
npm run package:editor |
Passed; final 13 pre-manifest files; renderer 1.0.8-anuva-renderer.1; manifest SHA-256 d6a6458bd475a0f5e90f107b030c8edd389e761ad30069566789544fafa1bba5 |
| Direct production-editor browser smoke | Passed; no console warnings/errors |
| Surface navigation | Passed for Main, Companion, and Emphasis; ArrowRight keyboard navigation passed |
| Coordinated family application | Signal and Paper passed; semantic titles/bodies and user extras preserved |
| Independent layout constraints | Main 1280×720, Companion 640×720, Emphasis 1280×360; declared safe areas shown |
| Optional transparency | Transparent and opaque Emphasis examples passed without surface-kind inference |
| Composite undo/redo | Whole-family change restored and reapplied all surface state in one action |
| Host bridge browser harness | Passed ready → diagnostics → operation → save-request → save-accepted |
| Revision authority | Host advanced production-1 to production-2; editor did not mint the accepted revision |
| Network audit | No non-host-origin resource requests during the real host/editor scenario |
| Browser console | No warnings or errors in direct editor or host harness |
Final regression and packaging evidence
| Command or check | Result |
|---|---|
npm run test:anuva |
Passed after completion-review fix; 103 contract, 37 adapter, and 162 editor checks |
npm run build |
Passed; upstream TypeScript and Vite production build |
| documented Windows single-file equivalent | Passed; compressed shell 580 KB |
node ..\scripts\test-sync.ts |
Passed; 45,362 convergence checks |
npm run build:anuva |
Passed; editor, editor host, player, and player host entries |
npm run package:editor |
Passed after completion-review fix; 13 pre-manifest files; manifest SHA-256 d6a6458bd475a0f5e90f107b030c8edd389e761ad30069566789544fafa1bba5 |
npm run package:player |
Passed; 10 files; manifest SHA-256 df806b6541cf5bffa1803917a0628d9079bef75109cac979e4275f7630c50042 |
| renderer parity | Passed; editor and player both declare 1.0.8-anuva-renderer.1 |
contract npm pack --dry-run |
Passed; 43 files, including editor schema, ESM, declarations, maps, license, and notices |
git diff --check |
Passed after removing one trailing blank line |
The first npm pack --dry-run attempt could not write the sandbox-external
user npm cache. Re-running with the cache under ignored working/ passed. No
dependency or artifact download was required by the final verification.
The final reviewed editor artifact is local and ignored at
working/anu-12/anuva-bento-editor-1.0.0/. The rebuilt player artifact remains
local and ignored at working/anu-11/anuva-bento-player-1.0.0/. Neither was
published.
Completion review
- PR #4 was open, draft, and cleanly mergeable. GitHub reported no configured checks, reviews, requested changes, or unresolved review comments.
- Review found that the production CSS hid upstream local-save controls but the
underlying editor still initialized IndexedDB recovery/versioning and kept
its local
Ctrl+Spath active. - The finding was fixed with an explicit host-managed editor option. Production
mode now skips local recovery/version initialization and public update
checks, blocks the upstream file-save shortcut, and routes
Ctrl+Sthrough the validated host save bridge. - Four focused source-boundary checks were added. The final editor suite passes 162 checks, and upstream build plus 45,362 convergence checks remain green.
- The real host/editor harness passed the protocol, revision, network, and
page-owned error capture with:
PASS - revision production-1 -> production-2; renderer 1.0.8-anuva-renderer.1; no external requests or page errors. - The in-app browser inspection layer separately logged a
MutationObservererror from its isolated inspection context. NoMutationObserverexists in Anuva-authored runtime source; the production page's ownerrorandunhandledrejectioncapture remained empty.
Deviations, risks, and follow-ups
- No implementation deviation changed the approved repository or product boundary.
- The repository has no separate lint command. TypeScript checking runs through
every production build, and source/style integrity is covered by the focused
suites, builds, package inspection, and
git diff --check. - CMS persistence, AI model orchestration, Python, Unity/Vuplex, and product Web host integration remain outside this repository-owned implementation.