# Vendored from lnkiai/m3e-canvas | | | | --- | --- | | upstream | https://github.com/lnkiai/m3e-canvas.git | | ref | `main` | | commit | `5c83ac6f437153b4df4d2348c4f94c4ff71b864a` | | dated | 2026-09-05 | | licence | MIT — see `LICENSE` beside this file | | vendored | 2026-09-05 by `scripts/vendor.sh` | **Do not edit anything in this directory.** Officer's changes live outside it, reached through `web/adapter.ts`. Editing here makes the next `vendor.sh` run either clobber the change or produce a diff nobody can read. ## What was taken, and what was not Taken: `lib/`, `components/`, upstream's `app/page.tsx` as `Canvas.tsx`, and `globals.css`. Not taken: `app/layout.tsx` — a Next.js route shell with no meaning here. `lib/ai.ts` and `components/AiPanel.tsx` ARE taken even though Officer does not use them. They keep model-provider API keys in `localStorage`, which is not how anything here should work — but `Canvas.tsx` references them throughout, so removing them would mean editing vendored code. A faithful copy carrying an unused module beats a doctored one that cannot be re-vendored. They are inert without a key, and the shell does not surface them. ## What is NOT upstream in this directory Four files differ from the clone, and this list is the whole of it. Anything else that does not match upstream is a mistake. **Every `.ts`/`.tsx` file — the import rewrite.** Every `@/lib/…` and `@/components/…` import becomes a relative path. This platform already binds `@/*` to `src/apps/officer-web` and `@/components/*` to its own shared components, so an unrewritten import resolves to the WRONG module rather than failing — silent breakage. **`lib/host.ts` — ours, not upstream's.** Upstream reviewed the host-adapter contract on lnkiai/m3e-canvas#56 and declined to carry it for now, so it is written here and placed by `scripts/apply-host.py`. The canonical copy is `web/host.ts`; this one is a copy of it. **`Canvas.tsx`, `components/PromptPanel.tsx`, `components/Inspector.tsx` — host hooks wired in.** `apply-host.py` matches on structure rather than context so upstream can reformat freely, and it stops loudly when an anchor genuinely disappears. All three export paths are wired, which is what upstream said a complete version needs. Both transformations are deterministic, so a re-vendor produces a readable diff of upstream's real changes rather than of the edits above.