Skip to main content

Architecture and verification

Menagerie is an ordinary Burrow mod with control, Settings and Archive surfaces. It owns resident-world records while Core owns native identity lifecycle, chat, A2A, model execution, canonical images and scheduling. There is no second model runner or independent chat interface.

Compatibility contracts​

Activation requires mod ID burrow-menagerie, context.agents.owned.list/create/read/update, context.agents.context.register and context.agents.context.registerShared. Missing support fails with menagerie_native_contract_unavailable rather than creating an engineering-agent fallback.

Activation also requires context.agents.runs.list/activity/onCompleted, context.agents.sessions.create, and context.agents.turns.submit/read for companion visits, even when visits are disabled. Missing support fails with menagerie_visits_contract_unavailable.

The full feature set also uses Core's safe model and agent catalogs, canonical owned-agent reference-image delegates, native turn submission/read APIs, conversation inventory/turn APIs, operator timezone and ordinary scheduler jobs. The matching UI provides native resident selection/chat, Settings document/form layouts, guarded navigation, owner entity selection, avatar optimization and shared Archive controls. Some older UI hosts offer limited inline/layout fallback; that is not a substitute for the required Core contracts.

The manifest has no supported numeric minCoreVersion declaration. Do not infer compatibility from a calendar version alone. Check installed Core, UI and Menagerie together. The package declares Node.js 22.13 or newer; its development workflow uses Node.js 24.

Fresh resident context​

On each native resident turn the registered provider reads a current durable snapshot after queued operator mutations. It supplies:

  • Saved SOUL.md and ORIENTATION.md, without invented biography.
  • Fixed TOOL_GUIDANCE.md describing explicit tool use.
  • The full current notebook, without revision history.
  • Current positive inventory holdings, with provenance/annotations and owner/holder distinction, without verbose item history.
  • The most recent 30 interactions involving that resident, without edit history.

This is not top-N notebook retrieval, a summary, automatic relationship extraction or an engineering profile. Oversized base context fails closed instead of silently trimming the notebook; the adapter checks a 900,000-byte serialized base-record budget and Core owns final output limits. Do not promise that every tool write forces an additional provider refresh within the same turn.

The dedicated Dream session additionally receives the prior completed operator-local civil day's retained conversation evidence. That evidence may be partial or unavailable; see Dreams.

Resident assignment directory​

When trusted routing includes a tagged Menagerie participant, the shared provider contributes a compact resident-directory record for the addressed residents only. It lists each addressed resident's saved name and stable ID, plus the assigned agent's current display name and ID, or Independent when there is no assignment. A missing agent-directory entry falls back to the saved owner ID; it does not invent independence. Empty Menageries add no directory.

The provider reads current saved state after queued operator edits, so renames, reassignment and assignment removal appear on the next turn, including fresh chats and A2A. It includes no biography, notebook, inventory, interaction history or visit logs. Species is not a structured field and is not inferred. Disabling the mod removes the contribution from fresh turns. This requires Core’s trusted participant-tag projection; updating the documentation or mod alone cannot add that host contract. No personal-record memory preload is introduced.

Shared guidance​

While enabled, the shared context provider contributes ROLEPLAY.md only when Core's trusted participant projection includes a menagerie tag. Any resident directory is limited to addressed Menagerie residents. Text mentions, operator turns without a tagged participant, and prior invocations do not activate context. Activation adds the tag to existing resident identities without changing their capabilities. Disabling Menagerie removes its contribution from fresh turns; it does not rewrite old conversation history.

Shared fiction guidance permits natural fictional expression without pretending that narration sent an A2A message, changed durable records or performed a real-world action. The model must use the relevant real tools for those outcomes. Attributed records remain reports, not independent proof of events or another party's feelings. Current guidance also keeps incidental procedural disclaimers out of companion dialogue and asks agents to recall meaningful experiences rather than imitate earlier administrative wording. For lasting gifts and explicit inventory requests, current guidance requires the appropriate persistent tool action in the same turn while keeping routine administration out of dialogue. It does not remove real tool requirements for actual changes.

Persistence and recovery​

world/v1 is a mod-scoped aggregate containing residents, notebook entries/revisions, inventory lots/history, exchange registry, shared interactions, explicit reflections, visitor journal entries and durable operation receipts. adapter/v1 records stable resident-creation intent. social-visits/v1 separately stores global visit configuration, the durable completion-feed cursor, pending dispatch reservations, latest pair interaction timestamps and a bounded decision history. Decision snapshots and the monotonic feed cursor are saved together. Initialized-feed and busy-reservation catch-up has no wall-clock expiry; the first-ever history checkpoint remains unchanged. Core persists these through its supported mod-settings service; Menagerie does not create a separate database schema.

Within one live host, writes are serialized and a shared exchange's inventory/registry/receipt changes persist together. Failed saves do not publish the in-memory draft. Retrying the same operation key and semantic input recovers an already-committed write without duplicating its effects. A replay's result is the original result snapshot, not a fresh query.

Use one writable active mod host. The settings get/set contract does not provide a distributed compare-and-swap guarantee. Native identity metadata and world updates are separate writes, not a cross-store transaction. Original creation intent is required to recover native creation; existing identities are not silently adopted.

Back up mod settings with the corresponding native identities, sessions, model selections, canonical reference images and scheduler state. Do not remove state to migrate or re-adopt identities. There is no resident export/import or automatic migration endpoint. Resident deletion requires Core’s scoped owned-agent removal.

Source map​

FileResponsibility
burrow.mod.jsonOrdinary mod identity, UI entrypoints and four Settings sections
server/index.mjsActivation, owned lifecycle, operator routes, current-turn context and shared guidance registration
server/world.mjsDurable records, atomic aggregate writes, replay, inventory/exchange rules and Archive filtering
server/tools.mjsEight closed agent-tool schemas, trusted caller attribution and guidance
server/dreams.mjsOrdinary scheduler integration and retained prior-day evidence
server/roleplay.mjsShared roleplay guidance text
server/visits.mjsOpt-in completion-feed policy, cooldowns, idle checks and idempotent companion-visit dispatch
ui/settings.jsResident Details, Profile documents, Dreams, Autonomous visits and image controls
ui/control.jsResident selector, notebook editor and operator inventory add/edit/remove controls
ui/visit-log.jsExplicit visitor-journal list/reader, paging and retry surface
ui/archive.jsRead-only Archive categories, server search, filters and pagination
ui/shared.jsShared UI/data helpers, record rendering and model selectors

The visitor journal is retrieved explicitly, not included in normal resident/ordinary-agent context. Old world/v1 aggregates gain an empty visits array; no historical contact is inferred. Agent reads stay caller-scoped, operator reads may span visitors, and write attribution comes from trusted caller/session/run metadata. Gift reconciliation is an operator-only atomic correction retaining raw duplicate evidence and stable replay receipts, not an agent tool or automatic deduplication.

Verification​

The 10 November 2026 ordinary delta statically reviewed source 2026.11.10, commit 645827302652eb033d00b84ba4ddef6da270e0b7: all-resident directory, managed visit-skill lookup, visitor journal/UI/API, assigned-parent inventory admission and replay, tracked-only outgoing gifts, repeat-provenance rejection and guarded operator duplicate reconciliation. Source and relevant test definitions were inspected, not executed. Older test execution results below remain historical; public packages and installed host compatibility require separate verification.

The 9 November 2026 ordinary delta statically reviewed commit 2698696aaa336bb1507bedf275f62a43f891a8e5 against the previous full-review source: guarded operator inventory removal, full-height home layout, and accepted untracked-gift guidance. Source and world, route, inventory UI/integration, control-home, gift-guidance and tool test definitions were inspected; they were not executed. The HTTP deletion route, retained history, loan restriction and retry behavior are documented here without claiming live acceptance or package availability. Unchanged guides retain the dated full reconciliation below.

The 8 November 2026 full static reconciliation checked every guide against source 2026.11.08.1, commit bf8d002f32dc04753b167359b7268a9547151af8: native lifecycle, operator API and all seven tool schemas, notebook/inventory provenance and retries, Archive filtering, Dream evidence and schedules, visit catch-up and decision diagnostics, substantial A2A eligibility, and same-turn lasting-gift guidance. Test definitions were inspected, not executed. No application tests, live chat/provider calls, settings changes or skill scripts were run.

The 7 November 2026 ordinary delta statically reviewed source version 2026.11.07.2, commit e04c5e661ef6baf0d5ac787ec4c86255180a7f90, including visit policy/settings/adapter tests and inventory world/UI/integration test definitions. No application tests, live Core/database/provider calls or skill scripts were run in this maintenance pass. The earlier execution result below applies only to its original source pin, not this newer implementation.

The public-release documentation was reconciled against source version 2026.11.05, commit 9eb89801724c51006d82dc8702626eedbcd7ec00, on 6 November 2026. This is the documentation's source pin, not a statement that a public package or installed host has that commit.

From a development checkout, install the lockfile dependencies without lifecycle scripts and run the standalone checks:

npm ci --ignore-scripts
npm run build
npm test

The checks run on 6 November 2026 against the source pin above completed successfully: dependency installation with lifecycle scripts disabled, syntax checks, and 169 tests passed, 3 skipped, 0 failed (172 total). The three skipped tests require the separate native-backend/PostgreSQL composition. No application source was changed for these checks.

The build command performs JavaScript syntax checks; it does not build a standalone server bundle. The standalone suite uses disposable settings, mocked Core APIs and local jsdom UI fixtures. It covers request/authentication boundaries, lifecycle/retry recovery, fresh context, tools, stock/registry invariants, owners, image routes, Settings recovery, notebook UI, Archive search/timezone/participants and Dream evidence behavior.

Optional native integration tests require a compatible sibling backend, its dependencies and a guarded disposable PostgreSQL fixture. They are skipped when that composition is unavailable. The separate host test directory exercises coordinated Burrow-UI integration in that host's test setup; it is not included by the package's test/*.test.mjs command.

Standalone fixture success is not a live Core/PostgreSQL test, actual scheduler dispatch, paid model/Forge execution, full-host browser acceptance or deployment proof. Historical acceptance notes belong to their recorded snapshots and do not establish current deployment behavior. Documentation builds, link checks and live-page verification are checked separately from application tests.

Operator API · Agent tools · Troubleshooting

15 November 2026 full documentation reconciliation​

The full static review used Menagerie source 2026.11.15, commit 6c90da9729a64fb3d53155caccc546e55c78566c. It rechecked all ten guides against native lifecycle and context, operator routes, eight tool schemas, world-state validation, Dream evidence and scheduling, visit policy, and UI contracts. No application tests, provider calls or skill scripts were executed; documentation build and link results are recorded separately. Earlier execution receipts above remain historical.

Autonomous visits now persist the session binding before dispatch. New visits use menagerie-visit-session:v1:<resident agent ID>, with Core separately scoping session idempotency by owner and mod. Turn submission retains menagerie-visit:<event cursor>:<resident agent ID> so repeated visits share history without sharing a turn receipt. Retries keep the saved session binding. Legacy pending visits with previous attempts but no accepted receipt retain their original event-derived session key; otherwise a possibly accepted turn would conflict with a different session. Already accepted receipts are untouched. There is no history merge, deletion or naming API change. See server/visits.mjs and the checked-in test/visits-policy.test.mjs cases for reload reuse, owner/resident isolation and uncertain-acknowledgement migration.

When the current outgoing recipient set includes an addressed Menagerie resident, the sender also receives the small menagerie-visit context record. It encourages natural interaction while leaving the resident free to decline. It does not impose an exchange count, replace identity, grant tools, or attach Menagerie guidance to unrelated operator turns. This is selected from trusted routing metadata, not message-text matching.

19 November 2026 visit lookup delta​

Autonomous-visit eligibility now obtains the owned native identity list in one host capability call, then joins it with resident world records. This avoids per-resident capability fan-out as the population grows. Each matched identity still passes ownership verification; missing identities are not treated as enabled or A2A-capable. Assignment, visit policy and dispatch contracts are unchanged. The checked-in integration case includes five residents to cover the previous concurrency-budget pressure. This is a static source/test-definition review at 15aed4d1d3728fab5aee8c26fd31264ffa163a7d, not execution of that integration test.