[PR #1369] [MERGED] feat(avatars): 2D Avatars and 3D Avatars packages (in development) #1428

Closed
opened 2026-10-21 05:11:18 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Agents/pull/1369
Author: @SpicyMarinara
Created: 10/13/2026
Status: ✅ Merged
Merged: 10/13/2026
Merged by: @SpicyMarinara

Base: staging ← Head: feat/avatar-agents


📝 Commits (6)

  • 4845afc feat(avatars): add the 2D Avatars and 3D Avatars packages, in development (#1368)
  • bcdb7ed fix(avatars): reject a second agent definition in an avatar package (#1368)
  • 36a36c7 fix(avatars): refuse malformed placeholders in avatar generation prompts (#1368)
  • 7023fdf fix(avatars): require an integer Capability API minor in the avatar check (#1368)
  • 2742656 Merge origin/staging into feat/avatar-agents
  • 2f5e756 fix(avatars): leave sides and missing parts to the Engine's layout schema (#1368)

📊 Changes

22 files changed (+405 additions, -1 deletions)

View changed files

📝 .github/workflows/pull-request-checks.yml (+5 -0)
📝 README.md (+2 -0)
➕ artifacts/2d-avatars-0.1.0.zip (+0 -0)
➕ artifacts/3d-avatars-0.1.0.zip (+0 -0)
➕ artwork/agent-covers/2d-avatars.png (+0 -0)
➕ artwork/agent-covers/3d-avatars.png (+0 -0)
📝 artwork/agent-covers/art-direction.json (+12 -0)
➕ artwork/sources/2d-avatars-imagegen.prompt.txt (+3 -0)
➕ artwork/sources/3d-avatars-imagegen.prompt.txt (+3 -0)
➕ packages/2d-avatars/CHANGELOG.md (+5 -0)
➕ packages/2d-avatars/agents.json (+40 -0)
➕ packages/2d-avatars/locales/en.json (+17 -0)
➕ packages/2d-avatars/manifest.json (+39 -0)
➕ packages/3d-avatars/CHANGELOG.md (+4 -0)
➕ packages/3d-avatars/agents.json (+18 -0)
➕ packages/3d-avatars/locales/en.json (+17 -0)
➕ packages/3d-avatars/manifest.json (+39 -0)
➕ scripts/avatar-package-checks.mjs (+84 -0)
📝 scripts/catalog-incomplete.mjs (+3 -1)
📝 scripts/catalog-package-guidance.mjs (+10 -0)

...and 2 more files

📄 Description

Pull request

Important

Contributions target staging. Only SpicyMarinara may promote this repository's staging branch to main.
Outside and first-time contributors also require an approving review from SpicyMarinara.

Linked issue

Closes #1368

Part of the Engine epic Pasta-Devs/Marinara-Engine#7537. Builds on the Engine contract PR Pasta-Devs/Marinara-Engine#7539 (Capability API 1.73, not merged yet).

Why this change

  • Mari wants characters and personas to have animated avatars that react while a reply streams in. The Engine builds the feature (storage, import, renderers, setup, stream director, classifier, generation), and it switches on per chat through two downloadable agents. This PR adds those two packages, with the ids the Engine contract fixes.
  • The 2D generation prompts belong in the package, not in the Engine, so they ship and update with the agent. The Engine merges them with the agent's saved settings (mergeBuiltInAgentSettings). No Engine screen edits this collection yet: the Agent editor edits only promptTemplates, and the Engine generation lane reviews image prompts per run.
  • The packages are held back from every catalog. Mari's publish-order rule (Engine docs/development/optional-agent-packages.md, "Capability API 1.73") says they appear, even in the preview catalog, only once the Engine's setup, stage and at least one renderer are on Engine staging.

What changed

  • New package 2d-avatars 0.1.0 (2D Avatars: PNGTuber-style sprites and mesh avatars). It has one agent with execution: "host" for Roleplay and Game, phase: "parallel", category misc, and an empty defaultPromptTemplate, so it makes no per-turn model call. Its defaultSettings.avatarGenerationTemplates hold the default text of the three Engine prompt ids in AVATAR_PROMPT_TEMPLATE_IDS:
    • avatar-pngtuber-eyes-closed ("Blink Picture"): an image-edit prompt that closes the eyes and keeps everything else pixel-identical. It uses characterName, appearance and expression.
    • avatar-pngtuber-mouth-open ("Talking Picture"): an image-edit prompt that opens the mouth on an "ah" vowel and leaves the eyes as they are. It uses the same three variables.
    • avatar-mesh-rig-layout ("Mesh Avatar Layout"): a vision prompt that measures the parts the Engine's layoutSchema asks for, in pixel coordinates. It leaves to that schema which side comes first and that every part needs a value, and asks for a best estimate of a hidden part, such as an eye under the hair. It uses characterName, appearance, imageWidth, imageHeight and layoutSchema.
  • New package 3d-avatars 0.1.0 (3D Avatars: VRM models). It has the same agent shape and no prompts.
  • Both manifests use schemaVersion: 2, capabilityApi: 1.73, engine >=2.5.0 <4.0.0 and builtAgainst Engine 2.5.0 @ df538660f776c785451e6cfd981eda93dba7939f (the contract branch head). Permissions are agent-runtime, chat-read, storage and ui. There is no restart, no server or client entrypoint, and no routes.
  • scripts/catalog-incomplete.mjs: both ids are in INCOMPLETE_PACKAGE_IDS, so no published lane or preview overlay lists them. The rebuild left every catalog/** file byte-identical.
  • scripts/catalog-package-guidance.mjs: activation guidance for both, appended to the manifest descriptions by the builder: "Set up each avatar on the agent's page in Agents, then add the Agent in Chat Settings → Agents → Misc Agents for Roleplay and Game modes."
  • Generated outputs: packages/<id>/manifest.json (files, hashes), packages/<id>/locales/en.json, artifacts/2d-avatars-0.1.0.zip and artifacts/3d-avatars-0.1.0.zip, built with node scripts/build-agent-catalog.mjs 2d-avatars 3d-avatars (with MARINARA_ENGINE_ROOT pointing at a worktree of Engine feat/avatars-contract. This builder does not read it, but it is the Engine the packages were checked against).
  • packages/<id>/CHANGELOG.md with a 0.1.0 entry each. The build requires one for a first appearance.
  • Covers artwork/agent-covers/2d-avatars.png and 3d-avatars.png, plus two art-direction.json entries with the concepts and palettes Mari gave. They were generated with Codex image generation from sharedPrompt + concept + palette, with the Professor Mari sprites and the expression.png and director.png covers as references. Both are 512x512 opaque RGB with a white surround, losslessly recompressed with zopflipng to about 335 KB. The exact prompts and provenance are in artwork/sources/<id>-imagegen.prompt.txt.
  • README.md: two rows in In development. The stable counts are unchanged.
  • Contract guard: scripts/avatar-package-checks.mjs checks what the Engine needs from these packages. Every mismatch would fail silently in the Engine: an unknown ${name} stays in the prompt as raw text, and a missing template id leaves a generation button with no prompt.
    • The checks: schema v2 with Capability API ≥ 1.73, exactly one agent with the package id, a host agent, an empty default prompt, exactly the three template ids, well-formed placeholders that use only declared variables, ${layoutSchema} present, and no left, right or null rule of the package's own in the Mesh Avatar Layout prompt (the Engine's strict layout check refuses answers that follow one).
    • validate-catalog.mjs runs it from source, whether or not the packages are listed.
    • scripts/tests/avatar-package.regression.mjs pins each rejection to its error message. It runs as a new step in pull-request-checks.yml.
    • The template ids and variables are a package-owned copy of the Engine's AVATAR_PROMPT_TEMPLATE_VARIABLES, because the vendored Engine snapshot is frozen and predates them.

Package and security impact

  • Affected package IDs: 2d-avatars, 3d-avatars (new). Existing packages are untouched.
  • Engine compatibility impact: needs Capability API 1.73 (Pasta-Devs/Marinara-Engine#7539). An Engine that supports only 1.72 or older refuses the install. The packages are not listed anywhere yet.
  • New or changed permissions/entrypoints: agent definitions only (agents.json). Permissions are agent-runtime, chat-read, storage and ui. There is no executable code, no routes and no network access.
  • Restart, storage, update, or uninstall impact: no restart. The packages store nothing themselves. Avatar files live in Engine-owned storage (DATA_DIR/avatar-models/), and the Engine lanes own their lifecycle.

Validation

  • node scripts/validate-catalog.mjs passes locally
  • git diff --check passes locally
  • Rebuilt every affected manifest, payload, artifact, and catalog entry
  • Installed or updated the affected package through Marinara Engine
  • Checked supported modes, restart behavior, and uninstall cleanup
  • Read and followed CONTRIBUTING.md

Commands run by the agent; the repo commands were rerun on 2f5e7565 (the layout prompt fix):

  • npm run check: exit 0. Prettier is clean, and ESLint shows 0 errors (811 warnings already on staging, none in the changed files).
  • node scripts/test-catalog-lanes.mjs: passed.
  • node scripts/validate-package-locales.mjs: 43 canonical English catalogs and 42 translations, valid.
  • node scripts/validate-package-locale-keys.mjs: passed.
  • node scripts/validate-catalog.mjs: 39 published packages, as before. "Uncatalogued package manifests valid: 2d-avatars, 3d-avatars, pixelforge."
  • node scripts/tests/catalog-release-notes.regression.mjs, catalog-generatedat-determinism.regression.mjs, catalog-path-safety.regression.mjs, ruleset-package.regression.mjs: OK.
  • node scripts/tests/avatar-package.regression.mjs: passed. It covers 12 rejections, including a second agent definition, a string Capability API minor, a malformed ${appearance } placeholder, and a "character's own left" or "set it to null" rule in the Mesh Avatar Layout prompt. With the new check stashed, the regression fails with "Missing expected exception".
  • node scripts/build-agent-catalog.mjs 2d-avatars and node scripts/sync-package-locales.mjs: only agents.json, its manifest hash and size, and artifacts/2d-avatars-0.1.0.zip changed; every catalog/** file stayed byte-identical. The ZIP's agents.json equals the source. 0.1.0 was never in any catalog, so the version stays.
  • git diff --check: clean.
  • Engine contract proof (throwaway script, not committed), against Engine feat/avatars-contract @ df538660f after pnpm install --frozen-lockfile and pnpm build:shared:
    • Both manifests parse with capabilityPackageManifestSchema, and both agents.json files parse with packagedAgentDefinitionsSchema.
    • getCapabilityApiCompatibilityIssue returns null on the 1.73 Engine.
    • The package-owned ids and variables equal the Engine's AVATAR_PROMPT_TEMPLATE_IDS and AVATAR_PROMPT_TEMPLATE_VARIABLES.
    • After replaceBuiltInAgentDefinitions, isBuiltInAgentHostManaged is true for both, so the generic pipeline skips them. Both are available in Roleplay and Game and not in Conversation.
    • mergeBuiltInAgentSettings("2d-avatars") merges the three templates, and a user's edit to one template wins while the others keep the package text.
    • Every template passes validateTemplate and renders with renderTemplate with no ${ left.
  • Layout prompt proof (throwaway script, not committed): the Engine generation lane's mesh-rig-layout.ts and template.ts from feat/avatars-generation @ a606d440c (only the json-repair import stubbed), with zod 3.25.76.
    • The old template, rendered with renderTemplate and MESH_RIG_LAYOUT_SCHEMA_TEXT, carried both "the character's own left" and the schema's "the eye on the picture's left first". checkMeshRigLayout refused a mouth placed by the package's rule ("mouth.left must be left of mouth.right"), which costs the second, paid attempt.
    • The new template passes validateTemplate, renders with no ${ left, contains the schema text once, and has no left, right or null rule and no hair, body or arms list before it.
    • The same front-facing layout with picture-left corners, and with a hidden eye given as an estimate, is accepted ([]).
  • Graduation dry run (throwaway worktree, discarded, on 7023fdf0):
    • Removing both ids from INCOMPLETE_PACKAGE_IDS and rebuilding lists them with iconUrl .../artwork/agent-covers/<id>.png, documentationUrl built-in-agents.md#<id> and unchanged artifacts.
    • validate-catalog.mjs then passes the artwork, README, guidance and notes checks once its package count is raised to 41/26.
    • The Engine's capabilityCatalogSchema accepts both entries.

Local CodeRabbit (coderabbit review --agent --committed, Pasta-Devs org) ran four times:

  1. One minor finding: a second agent definition would have escaped the contract check. It is fixed in bcdb7ed4, and the regression pins the rejection.
  2. One minor finding: a malformed placeholder such as ${appearance } would have passed the check while the Engine leaves it in the prompt as raw text. It is fixed in 36a36c7e, and the regression pins the rejection.
  3. 0 findings on 36a36c7e.
  4. 0 findings on 2f5e7565 (the layout prompt fix), over all 18 changed text files including packages/2d-avatars/agents.json. The first two tries were rate limited and retried.

GitHub CodeRabbit reviewed 4845afc2 with one trivial thread: !(api.minor >= 73) coerced a string minor. It is fixed in 7023fdf0 (integer required, regression case added), and the thread is answered and resolved. After two rate-limited tries, it reviewed 4845afc2..2f5e7565 and posted no actionable comments.

A lane review found that the Mesh Avatar Layout prompt contradicted the Engine's layoutSchema (sides, null for hidden parts, and a part list with hair, body and arms). That is fixed in 2f5e7565. The same review found that nothing in the Engine shows these prompts for editing, so the changelog, this description and manual step 4 no longer promise that.

Manual verification notes

Not done by the agent: nothing was installed through a running Engine. These steps are for a human:

  1. Check out Engine feat/avatars-contract (or staging after Pasta-Devs/Marinara-Engine#7539 merges). Build this branch's catalog locally with MARINARA_CATALOG_INCLUDE_INCOMPLETE=1 node scripts/build-agent-catalog.mjs 2d-avatars 3d-avatars (never commit that output). Point the Engine's MARINARA_AGENT_CATALOG_URL at it.
  2. Open Agents → Download Agents on desktop (Chrome, Firefox, Safari) and on a phone (Android Chrome or the app WebView, iOS Safari). Confirm that both covers show and stay readable at the small size, and that the names and descriptions read well.
  3. Install 2D Avatars and 3D Avatars. Confirm that no restart is asked for and that each appears under Misc Agents.
  4. Open each agent's page in Agents and confirm that it opens without errors. Until the Engine setup lane lands, the page has no avatar setup yet, and no Engine screen shows the generation prompts.
  5. In a Roleplay chat and in a Game chat, add each agent from Chat Settings → Agents → Misc Agents. Confirm that a Conversation chat does not offer them. Send a message and confirm that the agents add no agent model call (no agent run in the debug log). The agent cost line in Chat Settings still counts each avatar agent as an extra call; that estimate is Engine code (estimateAgentLoadCost), not package data, and is flagged for an Engine follow-up.
  6. Uninstall both and confirm that they leave Misc Agents and the chat agent lists.
  7. Once the Engine generation lane is available, turn on debug mode and make a mesh avatar from a front-facing sprite, ideally one with an eye partly under the hair. Confirm that the logged layout prompt has no side or null rule before the schema, and that the first answer is accepted (no "That layout can't be used" retry in the log).
  8. On an Engine without Capability API 1.73 (for example v2.5.0), confirm that installing from the same local catalog is refused with the capability API message.

Documentation impact

  • No documentation changes needed
  • Updated this README catalog and package guidance
  • Updated linked Marinara Engine documentation

The README "In development" rows and the package guidance are in this PR. The Engine's docs/agents/built-in-agents.md entries (the documentationUrl anchors #2d-avatars and #3d-avatars) and the "Downloading the agents" section of docs/agents/avatars.md are in Pasta-Devs/Marinara-Engine#7551. Their translation follow-up is Pasta-Devs/Marinara-Engine#7540.

UI evidence (if applicable)

The covers: artwork/agent-covers/2d-avatars.png (Mari holding a blinking, talking paper puppet of herself in front of fanned paper layers) and artwork/agent-covers/3d-avatars.png (Mari waving at a glowing hologram of herself on a turntable).


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Pasta-Devs/Marinara-Agents/pull/1369 **Author:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Created:** 10/13/2026 **Status:** ✅ Merged **Merged:** 10/13/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `feat/avatar-agents` --- ### 📝 Commits (6) - [`4845afc`](https://github.com/Pasta-Devs/Marinara-Agents/commit/4845afc2592c9fa540fec27692eecaee01cabbe4) feat(avatars): add the 2D Avatars and 3D Avatars packages, in development (#1368) - [`bcdb7ed`](https://github.com/Pasta-Devs/Marinara-Agents/commit/bcdb7ed404e20eca286b858f16e54f60393f3c33) fix(avatars): reject a second agent definition in an avatar package (#1368) - [`36a36c7`](https://github.com/Pasta-Devs/Marinara-Agents/commit/36a36c7e47dca69012084a54b80ee6a383e06f50) fix(avatars): refuse malformed placeholders in avatar generation prompts (#1368) - [`7023fdf`](https://github.com/Pasta-Devs/Marinara-Agents/commit/7023fdf0d2d3b87651b20eca12e8642c598740dd) fix(avatars): require an integer Capability API minor in the avatar check (#1368) - [`2742656`](https://github.com/Pasta-Devs/Marinara-Agents/commit/2742656ebf3f713ac299d4e495782f97a562c53c) Merge origin/staging into feat/avatar-agents - [`2f5e756`](https://github.com/Pasta-Devs/Marinara-Agents/commit/2f5e7565335a853de809598b3757a01ebbec7522) fix(avatars): leave sides and missing parts to the Engine's layout schema (#1368) ### 📊 Changes **22 files changed** (+405 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `.github/workflows/pull-request-checks.yml` (+5 -0) 📝 `README.md` (+2 -0) ➕ `artifacts/2d-avatars-0.1.0.zip` (+0 -0) ➕ `artifacts/3d-avatars-0.1.0.zip` (+0 -0) ➕ `artwork/agent-covers/2d-avatars.png` (+0 -0) ➕ `artwork/agent-covers/3d-avatars.png` (+0 -0) 📝 `artwork/agent-covers/art-direction.json` (+12 -0) ➕ `artwork/sources/2d-avatars-imagegen.prompt.txt` (+3 -0) ➕ `artwork/sources/3d-avatars-imagegen.prompt.txt` (+3 -0) ➕ `packages/2d-avatars/CHANGELOG.md` (+5 -0) ➕ `packages/2d-avatars/agents.json` (+40 -0) ➕ `packages/2d-avatars/locales/en.json` (+17 -0) ➕ `packages/2d-avatars/manifest.json` (+39 -0) ➕ `packages/3d-avatars/CHANGELOG.md` (+4 -0) ➕ `packages/3d-avatars/agents.json` (+18 -0) ➕ `packages/3d-avatars/locales/en.json` (+17 -0) ➕ `packages/3d-avatars/manifest.json` (+39 -0) ➕ `scripts/avatar-package-checks.mjs` (+84 -0) 📝 `scripts/catalog-incomplete.mjs` (+3 -1) 📝 `scripts/catalog-package-guidance.mjs` (+10 -0) _...and 2 more files_ </details> ### 📄 Description # Pull request > [!IMPORTANT] > Contributions target `staging`. Only `SpicyMarinara` may promote this repository's `staging` branch to `main`. > Outside and first-time contributors also require an approving review from `SpicyMarinara`. ## Linked issue Closes #1368 Part of the Engine epic Pasta-Devs/Marinara-Engine#7537. Builds on the Engine contract PR Pasta-Devs/Marinara-Engine#7539 (Capability API 1.73, not merged yet). ## Why this change - Mari wants characters and personas to have animated avatars that react while a reply streams in. The Engine builds the feature (storage, import, renderers, setup, stream director, classifier, generation), and it switches on per chat through two downloadable agents. This PR adds those two packages, with the ids the Engine contract fixes. - The 2D generation prompts belong in the package, not in the Engine, so they ship and update with the agent. The Engine merges them with the agent's saved settings (`mergeBuiltInAgentSettings`). No Engine screen edits this collection yet: the Agent editor edits only `promptTemplates`, and the Engine generation lane reviews image prompts per run. - The packages are held back from every catalog. Mari's publish-order rule (Engine `docs/development/optional-agent-packages.md`, "Capability API 1.73") says they appear, even in the preview catalog, only once the Engine's setup, stage and at least one renderer are on Engine `staging`. ## What changed - **New package `2d-avatars` 0.1.0** (2D Avatars: PNGTuber-style sprites and mesh avatars). It has one agent with `execution: "host"` for Roleplay and Game, `phase: "parallel"`, category `misc`, and an empty `defaultPromptTemplate`, so it makes no per-turn model call. Its `defaultSettings.avatarGenerationTemplates` hold the default text of the three Engine prompt ids in `AVATAR_PROMPT_TEMPLATE_IDS`: - `avatar-pngtuber-eyes-closed` ("Blink Picture"): an image-edit prompt that closes the eyes and keeps everything else pixel-identical. It uses `characterName`, `appearance` and `expression`. - `avatar-pngtuber-mouth-open` ("Talking Picture"): an image-edit prompt that opens the mouth on an "ah" vowel and leaves the eyes as they are. It uses the same three variables. - `avatar-mesh-rig-layout` ("Mesh Avatar Layout"): a vision prompt that measures the parts the Engine's `layoutSchema` asks for, in pixel coordinates. It leaves to that schema which side comes first and that every part needs a value, and asks for a best estimate of a hidden part, such as an eye under the hair. It uses `characterName`, `appearance`, `imageWidth`, `imageHeight` and `layoutSchema`. - **New package `3d-avatars` 0.1.0** (3D Avatars: VRM models). It has the same agent shape and no prompts. - Both manifests use `schemaVersion: 2`, `capabilityApi: 1.73`, `engine >=2.5.0 <4.0.0` and `builtAgainst` Engine 2.5.0 @ `df538660f776c785451e6cfd981eda93dba7939f` (the contract branch head). Permissions are `agent-runtime`, `chat-read`, `storage` and `ui`. There is no restart, no server or client entrypoint, and no routes. - `scripts/catalog-incomplete.mjs`: both ids are in `INCOMPLETE_PACKAGE_IDS`, so no published lane or preview overlay lists them. The rebuild left every `catalog/**` file byte-identical. - `scripts/catalog-package-guidance.mjs`: activation guidance for both, appended to the manifest descriptions by the builder: "Set up each avatar on the agent's page in Agents, then add the Agent in Chat Settings → Agents → Misc Agents for Roleplay and Game modes." - Generated outputs: `packages/<id>/manifest.json` (files, hashes), `packages/<id>/locales/en.json`, `artifacts/2d-avatars-0.1.0.zip` and `artifacts/3d-avatars-0.1.0.zip`, built with `node scripts/build-agent-catalog.mjs 2d-avatars 3d-avatars` (with `MARINARA_ENGINE_ROOT` pointing at a worktree of Engine `feat/avatars-contract`. This builder does not read it, but it is the Engine the packages were checked against). - `packages/<id>/CHANGELOG.md` with a 0.1.0 entry each. The build requires one for a first appearance. - Covers `artwork/agent-covers/2d-avatars.png` and `3d-avatars.png`, plus two `art-direction.json` entries with the concepts and palettes Mari gave. They were generated with Codex image generation from `sharedPrompt` + concept + palette, with the Professor Mari sprites and the `expression.png` and `director.png` covers as references. Both are 512x512 opaque RGB with a white surround, losslessly recompressed with zopflipng to about 335 KB. The exact prompts and provenance are in `artwork/sources/<id>-imagegen.prompt.txt`. - `README.md`: two rows in **In development**. The stable counts are unchanged. - **Contract guard**: `scripts/avatar-package-checks.mjs` checks what the Engine needs from these packages. Every mismatch would fail silently in the Engine: an unknown `${name}` stays in the prompt as raw text, and a missing template id leaves a generation button with no prompt. - The checks: schema v2 with Capability API ≥ 1.73, exactly one agent with the package id, a host agent, an empty default prompt, exactly the three template ids, well-formed placeholders that use only declared variables, `${layoutSchema}` present, and no left, right or null rule of the package's own in the Mesh Avatar Layout prompt (the Engine's strict layout check refuses answers that follow one). - `validate-catalog.mjs` runs it from source, whether or not the packages are listed. - `scripts/tests/avatar-package.regression.mjs` pins each rejection to its error message. It runs as a new step in `pull-request-checks.yml`. - The template ids and variables are a package-owned copy of the Engine's `AVATAR_PROMPT_TEMPLATE_VARIABLES`, because the vendored Engine snapshot is frozen and predates them. ## Package and security impact - Affected package IDs: `2d-avatars`, `3d-avatars` (new). Existing packages are untouched. - Engine compatibility impact: needs Capability API 1.73 (Pasta-Devs/Marinara-Engine#7539). An Engine that supports only 1.72 or older refuses the install. The packages are not listed anywhere yet. - New or changed permissions/entrypoints: agent definitions only (`agents.json`). Permissions are `agent-runtime`, `chat-read`, `storage` and `ui`. There is no executable code, no routes and no network access. - Restart, storage, update, or uninstall impact: no restart. The packages store nothing themselves. Avatar files live in Engine-owned storage (`DATA_DIR/avatar-models/`), and the Engine lanes own their lifecycle. ## Validation <!-- These are human tasks. Never tick a box for a check that was not actually performed. --> - [ ] `node scripts/validate-catalog.mjs` passes locally - [ ] `git diff --check` passes locally - [ ] Rebuilt every affected manifest, payload, artifact, and catalog entry - [ ] Installed or updated the affected package through Marinara Engine - [ ] Checked supported modes, restart behavior, and uninstall cleanup - [ ] Read and followed `CONTRIBUTING.md` Commands run by the agent; the repo commands were rerun on `2f5e7565` (the layout prompt fix): - `npm run check`: exit 0. Prettier is clean, and ESLint shows 0 errors (811 warnings already on staging, none in the changed files). - `node scripts/test-catalog-lanes.mjs`: passed. - `node scripts/validate-package-locales.mjs`: 43 canonical English catalogs and 42 translations, valid. - `node scripts/validate-package-locale-keys.mjs`: passed. - `node scripts/validate-catalog.mjs`: 39 published packages, as before. "Uncatalogued package manifests valid: 2d-avatars, 3d-avatars, pixelforge." - `node scripts/tests/catalog-release-notes.regression.mjs`, `catalog-generatedat-determinism.regression.mjs`, `catalog-path-safety.regression.mjs`, `ruleset-package.regression.mjs`: OK. - `node scripts/tests/avatar-package.regression.mjs`: passed. It covers 12 rejections, including a second agent definition, a string Capability API minor, a malformed `${appearance }` placeholder, and a "character's own left" or "set it to null" rule in the Mesh Avatar Layout prompt. With the new check stashed, the regression fails with "Missing expected exception". - `node scripts/build-agent-catalog.mjs 2d-avatars` and `node scripts/sync-package-locales.mjs`: only `agents.json`, its manifest hash and size, and `artifacts/2d-avatars-0.1.0.zip` changed; every `catalog/**` file stayed byte-identical. The ZIP's `agents.json` equals the source. 0.1.0 was never in any catalog, so the version stays. - `git diff --check`: clean. - **Engine contract proof** (throwaway script, not committed), against Engine `feat/avatars-contract` @ `df538660f` after `pnpm install --frozen-lockfile` and `pnpm build:shared`: - Both manifests parse with `capabilityPackageManifestSchema`, and both `agents.json` files parse with `packagedAgentDefinitionsSchema`. - `getCapabilityApiCompatibilityIssue` returns null on the 1.73 Engine. - The package-owned ids and variables equal the Engine's `AVATAR_PROMPT_TEMPLATE_IDS` and `AVATAR_PROMPT_TEMPLATE_VARIABLES`. - After `replaceBuiltInAgentDefinitions`, `isBuiltInAgentHostManaged` is true for both, so the generic pipeline skips them. Both are available in Roleplay and Game and not in Conversation. - `mergeBuiltInAgentSettings("2d-avatars")` merges the three templates, and a user's edit to one template wins while the others keep the package text. - Every template passes `validateTemplate` and renders with `renderTemplate` with no `${` left. - **Layout prompt proof** (throwaway script, not committed): the Engine generation lane's `mesh-rig-layout.ts` and `template.ts` from `feat/avatars-generation` @ `a606d440c` (only the json-repair import stubbed), with zod 3.25.76. - The old template, rendered with `renderTemplate` and `MESH_RIG_LAYOUT_SCHEMA_TEXT`, carried both "the character's own left" and the schema's "the eye on the picture's left first". `checkMeshRigLayout` refused a mouth placed by the package's rule ("mouth.left must be left of mouth.right"), which costs the second, paid attempt. - The new template passes `validateTemplate`, renders with no `${` left, contains the schema text once, and has no left, right or null rule and no hair, body or arms list before it. - The same front-facing layout with picture-left corners, and with a hidden eye given as an estimate, is accepted (`[]`). - **Graduation dry run** (throwaway worktree, discarded, on `7023fdf0`): - Removing both ids from `INCOMPLETE_PACKAGE_IDS` and rebuilding lists them with `iconUrl` `.../artwork/agent-covers/<id>.png`, `documentationUrl` `built-in-agents.md#<id>` and unchanged artifacts. - `validate-catalog.mjs` then passes the artwork, README, guidance and notes checks once its package count is raised to 41/26. - The Engine's `capabilityCatalogSchema` accepts both entries. Local CodeRabbit (`coderabbit review --agent --committed`, Pasta-Devs org) ran four times: 1. One minor finding: a second agent definition would have escaped the contract check. It is fixed in `bcdb7ed4`, and the regression pins the rejection. 2. One minor finding: a malformed placeholder such as `${appearance }` would have passed the check while the Engine leaves it in the prompt as raw text. It is fixed in `36a36c7e`, and the regression pins the rejection. 3. 0 findings on `36a36c7e`. 4. 0 findings on `2f5e7565` (the layout prompt fix), over all 18 changed text files including `packages/2d-avatars/agents.json`. The first two tries were rate limited and retried. GitHub CodeRabbit reviewed `4845afc2` with one trivial thread: `!(api.minor >= 73)` coerced a string minor. It is fixed in `7023fdf0` (integer required, regression case added), and the thread is answered and resolved. After two rate-limited tries, it reviewed `4845afc2..2f5e7565` and posted no actionable comments. A lane review found that the Mesh Avatar Layout prompt contradicted the Engine's `layoutSchema` (sides, null for hidden parts, and a part list with hair, body and arms). That is fixed in `2f5e7565`. The same review found that nothing in the Engine shows these prompts for editing, so the changelog, this description and manual step 4 no longer promise that. ### Manual verification notes Not done by the agent: nothing was installed through a running Engine. These steps are for a human: 1. Check out Engine `feat/avatars-contract` (or `staging` after Pasta-Devs/Marinara-Engine#7539 merges). Build this branch's catalog locally with `MARINARA_CATALOG_INCLUDE_INCOMPLETE=1 node scripts/build-agent-catalog.mjs 2d-avatars 3d-avatars` (never commit that output). Point the Engine's `MARINARA_AGENT_CATALOG_URL` at it. 2. Open **Agents → Download Agents** on desktop (Chrome, Firefox, Safari) and on a phone (Android Chrome or the app WebView, iOS Safari). Confirm that both covers show and stay readable at the small size, and that the names and descriptions read well. 3. Install **2D Avatars** and **3D Avatars**. Confirm that no restart is asked for and that each appears under **Misc Agents**. 4. Open each agent's page in **Agents** and confirm that it opens without errors. Until the Engine setup lane lands, the page has no avatar setup yet, and no Engine screen shows the generation prompts. 5. In a Roleplay chat and in a Game chat, add each agent from **Chat Settings → Agents → Misc Agents**. Confirm that a Conversation chat does not offer them. Send a message and confirm that the agents add no agent model call (no agent run in the debug log). The agent cost line in Chat Settings still counts each avatar agent as an extra call; that estimate is Engine code (`estimateAgentLoadCost`), not package data, and is flagged for an Engine follow-up. 6. Uninstall both and confirm that they leave **Misc Agents** and the chat agent lists. 7. Once the Engine generation lane is available, turn on debug mode and make a mesh avatar from a front-facing sprite, ideally one with an eye partly under the hair. Confirm that the logged layout prompt has no side or null rule before the schema, and that the first answer is accepted (no "That layout can't be used" retry in the log). 8. On an Engine without Capability API 1.73 (for example v2.5.0), confirm that installing from the same local catalog is refused with the capability API message. ## Documentation impact - [ ] No documentation changes needed - [ ] Updated this README catalog and package guidance - [ ] Updated linked Marinara Engine documentation The README "In development" rows and the package guidance are in this PR. The Engine's `docs/agents/built-in-agents.md` entries (the `documentationUrl` anchors `#2d-avatars` and `#3d-avatars`) and the "Downloading the agents" section of `docs/agents/avatars.md` are in Pasta-Devs/Marinara-Engine#7551. Their translation follow-up is Pasta-Devs/Marinara-Engine#7540. ## UI evidence (if applicable) The covers: `artwork/agent-covers/2d-avatars.png` (Mari holding a blinking, talking paper puppet of herself in front of fanned paper layers) and `artwork/agent-covers/3d-avatars.png` (Mari waving at a glowing hologram of herself on a turntable). --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-21 05:11:18 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Agents#1428
No description provided.