Skip to content

Bundle the mesh engine from the mesh-avatar npm package - #5

Merged
snakajima merged 3 commits into
mainfrom
chore/mesh-avatar-npm
Oct 13, 2026
Merged

snakajima merged 3 commits into
mainfrom
chore/mesh-avatar-npm

Conversation

@snakajima

Copy link
Copy Markdown
Contributor

mesh-avatar-studio now publishes its runtime as mesh-avatar on npm. This PR bundles the engine from that package (a dev dependency pinned to exactly 0.1.1) instead of a ../mesh-avatar-studio checkout. The engine's old path, src/engine/index.ts, has moved to packages/runtime/ upstream, so the checkout-based build no longer worked against upstream main anyway.

Changes

  • src/engine.ts: bundles from the installed mesh-avatar (resolved with import.meta.resolve, because the package exports only an import condition). --engine <dir> / AVATARSCRIPT_MESH_ENGINE still bundle from a checkout, now its packages/runtime/src/index.ts, for trying engine changes before they are published.
  • scripts/build.ts: dist/engine/source.json records the package name and version instead of a git commit. The license is shipped as LICENSE.mesh-avatar.
  • CI: no more mesh-avatar-studio checkouts or MESH_AVATAR_STUDIO_REF. The bundled-engine check compares source.json with the version pinned in package.json.
  • scripts/smoke.sh: also fails if mesh-avatar ends up installed alongside the package. The engine must come prebuilt.
  • README: updated the Develop and License sections.

Engine version

This moves the engine from upstream commit 8713e85 to mesh-avatar 0.1.1. Its API is a superset of what the render page uses.

Testing

  • npm run lint, npm run typecheck and npm test (71 tests) all pass, and npm run build succeeds.
  • scripts/smoke.sh avatars/ani passes for both the CLI and the library.
  • I rendered avatars/ani at 1280×720 from source with --tts mock and with --tts openai, and watched both. Lip-sync and motions look right.

🤖 Generated with Claude Code

work in avatarscript

snakajima and others added 2 commits October 12, 2026 15:23
mesh-avatar-studio now publishes its runtime as mesh-avatar on npm. Build it from
that development dependency, pinned to exactly 0.1.1, instead of a sibling
../mesh-avatar-studio checkout (whose src/engine/ has moved to packages/runtime/
upstream). The package still ships the engine prebuilt in dist/engine/, so
installs need neither mesh-avatar nor esbuild.

- src/engine.ts: bundle from the installed package; --engine /
  AVATARSCRIPT_MESH_ENGINE name a checkout's packages/runtime instead
- scripts/build.ts: record package name and version in source.json;
  license as LICENSE.mesh-avatar
- CI: drop the mesh-avatar-studio checkouts and commit pin; check the
  bundled version against package.json
- smoke.sh: fail if mesh-avatar is installed with the package

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@socket-security

socket-security Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addedmesh-avatar@​0.1.1781009688100

View full report

@snakajima

Copy link
Copy Markdown
Contributor Author

@codex review

A mesh-avatar-studio checkout older than packages/runtime keeps the engine at
src/engine/index.ts (as at 8713e85, the commit 0.4 bundled). Accept both
layouts so an existing --engine / AVATARSCRIPT_MESH_ENGINE keeps working.
Found by Codex review.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@snakajima
snakajima merged commit 529b8a2 into main Oct 13, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant