docs(13-11): retarget plan to in-repo aiui/ (D-19)

Mechanical path swap: useArchy.ts now lives at aiui/packages/app/... in
this repo (D-19), not the old separate clone. Drops the separate-branch/
push language. Verified paths and referenced symbols still exist and at
essentially the same line numbers post-subtree-import; task content and
must_haves are otherwise unchanged.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
archipelago
2026-08-03 17:06:04 -04:00
co-authored by Claude Opus 5
parent 97aa758d7d
commit 6989b1d387
@@ -8,7 +8,7 @@ files_modified:
- neode-ui/src/composables/archyContentAdapter.ts
- neode-ui/src/composables/__tests__/archyContentAdapter.test.ts
- neode-ui/src/components/cloud/ShareModal.vue
- /home/archipelago/Projects/AIUI/packages/app/src/composables/useArchy.ts
- aiui/packages/app/src/composables/useArchy.ts
autonomous: true
requirements: [AIUI-03]
@@ -69,7 +69,7 @@ Symbols created by **this plan**:
- `neode-ui/src/composables/archyContentAdapter.ts`: `export function adaptLibraryTracks`,
`export function adaptLibraryAlbums`, `export interface ArchyLibraryTrack`,
`export interface ArchyLibraryAlbum`
- `/home/archipelago/Projects/AIUI/packages/app/src/composables/useArchy.ts`:
- `aiui/packages/app/src/composables/useArchy.ts`:
`requestArchyLibrary`
Changed, not created: `ShareModal.vue`'s existing extension-to-MIME map gains four entries.
@@ -108,7 +108,7 @@ No new component, no new postMessage channel, and no change to `SongGrid.vue`.
<read_first>
- `neode-ui/src/composables/archyContentAdapter.ts` (13-06) — `adaptContentItems`, `classifyByMime`, `sortDeterministic`, and the three pinned source literals. **Extend this file's conventions; the library mapping is a sibling of the ContentItem mapping, not a replacement.**
- `neode-ui/src/composables/__tests__/archyContentAdapter.test.ts` (13-06) — including the assertion that no adapter-produced URL matches a credential query parameter. The new mapping is held to the same assertion.
- `/home/archipelago/Projects/AIUI/packages/core/src/types/content.ts` lines 44-60 — `Song` and `SongSource`, the exact target shape. **Read, never modify** (D-12).
- `aiui/packages/core/src/types/content.ts` lines 44-60 — `Song` and `SongSource`, the exact target shape. **Read, never modify** (D-12).
- `core/archipelago/src/api/rpc/music.rs` (13-07) — the `music.list-albums` / `music.list-tracks` response envelopes.
- `.planning/phases/13-.../13-MUSIC-MODEL.md` — the entity model whose field names the adapter reads.
- `neode-ui/src/composables/useAudioPlayer.ts` and `neode-ui/src/components/GlobalAudioPlayer.vue` — the singleton bottom-bar player. **Audio never opens the lightbox**; that rule is enforced in five existing call sites and the new path must not become a sixth exception.
@@ -134,7 +134,7 @@ Extend `archyContentAdapter.test.ts` with a test per `<behavior>` bullet, includ
- `grep -q 'export function adaptLibraryTracks' neode-ui/src/composables/archyContentAdapter.ts`
- `grep -cE '[?&](auth|token)=' neode-ui/src/composables/archyContentAdapter.ts` returns 0
- `cd neode-ui && git diff --exit-code -- src/services/contextBroker.ts` exits 0 — the transport was not touched; the `kind` discriminator absorbed the new bucket
- `git -C /home/archipelago/Projects/AIUI diff --exit-code -- packages/app/src/components/content/SongGrid.vue packages/core/src/types/content.ts` exits 0
- `git diff --exit-code -- aiui/packages/app/src/components/content/SongGrid.vue aiui/packages/core/src/types/content.ts` exits 0
- `cd neode-ui && npx vitest run src/composables/__tests__/useAudioPlayer.test.ts` exits 0 — the audio-never-in-lightbox rule is still pinned
- `cd neode-ui && npx vue-tsc --noEmit` exits 0
</acceptance_criteria>
@@ -184,35 +184,38 @@ Add a test asserting the mapping for all eight audio extensions plus one unknown
<task type="auto">
<name>Task 3: AIUI asks for the library the same way it asks for content</name>
<files>/home/archipelago/Projects/AIUI/packages/app/src/composables/useArchy.ts</files>
<files>aiui/packages/app/src/composables/useArchy.ts</files>
<read_first>
- `/home/archipelago/Projects/AIUI/packages/app/src/composables/useArchy.ts``requestArchyContent` from 13-06 and the `archyBridge.requestContext` convention it mirrors. **Add a sibling; do not invent a fourth transport convention.**
- `/home/archipelago/Projects/AIUI/packages/app/src/composables/useContentPanel.ts``setArchyContent` and `archyContentActive` from 13-06; the `songs` bucket is what this feeds.
- `/home/archipelago/Projects/AIUI/packages/app/src/pages/ChatPage.vue` — the live render tree through `ContentGridView`. **`ContentPanel.vue` is dead code and must not be built through.**
- `aiui/packages/app/src/composables/useArchy.ts``requestArchyContent` from 13-06 and the `archyBridge.requestContext` convention it mirrors. **Add a sibling; do not invent a fourth transport convention.**
- `aiui/packages/app/src/composables/useContentPanel.ts``setArchyContent` and `archyContentActive` from 13-06; the `songs` bucket is what this feeds.
- `aiui/packages/app/src/pages/ChatPage.vue` — the live render tree through `ContentGridView`. **`ContentPanel.vue` is dead code and must not be built through.**
</read_first>
<action>
Work in `/home/archipelago/Projects/AIUI` on branch `development`.
Work in `aiui/` within this repo (D-19 — AIUI is no longer a second repository; there is no
`development` branch to switch to and no second remote to push).
Add `requestArchyLibrary(scope)` to `useArchy.ts` as a sibling of 13-06's `requestArchyContent`, using the same bridge call with the library `kind`. Route its response through the existing `setArchyContent` so the `songs` bucket fills exactly the way the films bucket already does.
Do not modify `SongGrid.vue`, `ContentGridView.vue` or `packages/core/src/types/content.ts` — D-12 keeps AIUI's design exactly and only the data source changes. Do not revive `ContentPanel.vue` or any component that only it referenced.
Do not modify `SongGrid.vue`, `ContentGridView.vue` or `aiui/packages/core/src/types/content.ts` — D-12 keeps AIUI's design exactly and only the data source changes. Do not revive `ContentPanel.vue` or any component that only it referenced.
Record honestly in the summary that album artwork is absent for library tracks on a node, because AIUI's artwork sources are dev-server-only Vite middleware, and that `SongGrid` renders its existing no-artwork state rather than a broken image.
Commit and push on `development`, staging explicitly by path.
Commit as part of this repo's normal history, staging explicitly by path per `CLAUDE.md`'s commit
discipline — there is no separate `development` branch to commit on and no second push to make
(D-19 retires that step; only this repo's own remote applies).
</action>
<verify>
<automated>cd /home/archipelago/Projects/AIUI/packages/app &amp;&amp; npx vitest run</automated>
<automated>cd /home/archipelago/Projects/AIUI/packages/app &amp;&amp; npx vue-tsc --noEmit</automated>
<automated>cd /home/archipelago/Projects/AIUI &amp;&amp; git status --porcelain | grep -c . | grep -qx 0</automated>
<automated>cd aiui/packages/app &amp;&amp; npx vitest run</automated>
<automated>cd aiui/packages/app &amp;&amp; npx vue-tsc --noEmit</automated>
<automated>git status --porcelain -- aiui/ | grep -c . | grep -qx 0</automated>
</verify>
<acceptance_criteria>
- `grep -q 'requestArchyLibrary' /home/archipelago/Projects/AIUI/packages/app/src/composables/useArchy.ts`
- `grep -c 'ContentPanel' /home/archipelago/Projects/AIUI/packages/app/src/composables/useArchy.ts` returns 0
- `git -C /home/archipelago/Projects/AIUI diff --exit-code HEAD~1 -- packages/app/src/components/content/ packages/core/src/types/content.ts` exits 0
- `cd /home/archipelago/Projects/AIUI/packages/app && npx vitest run` exits 0
- `cd /home/archipelago/Projects/AIUI/packages/app && npx vue-tsc --noEmit` exits 0
- The commit is pushed to `development` and the working tree is clean
- `grep -q 'requestArchyLibrary' aiui/packages/app/src/composables/useArchy.ts`
- `grep -c 'ContentPanel' aiui/packages/app/src/composables/useArchy.ts` returns 0
- `git diff --exit-code HEAD~1 -- aiui/packages/app/src/components/content/ aiui/packages/core/src/types/content.ts` exits 0
- `cd aiui/packages/app && npx vitest run` exits 0
- `cd aiui/packages/app && npx vue-tsc --noEmit` exits 0
- The commit lands in this repo's normal history and `git status --porcelain -- aiui/` is empty — no separate push to a second remote is expected or possible (D-19)
</acceptance_criteria>
<done>AIUI requests the library over the same bridge it uses for content, and `SongGrid` fills from real indexed tracks with no grid component changed.</done>
</task>
@@ -238,13 +241,13 @@ Commit and push on `development`, staging explicitly by path.
| T-13-73 | Denial of Service | An unbounded library pulled into the browser in one push | low | mitigate | 13-07's `limit` clamp applies; the adapter consumes the paginated envelope rather than requesting everything |
| T-13-74 | Elevation of Privilege | Library records reaching the iframe without a media grant | high | mitigate | The existing `content:push` handler's permission check from 13-06 applies unchanged — this plan adds a `kind`, not a bypass |
| T-13-75 | Repudiation | Audio opening in the lightbox, breaking a rule enforced in five call sites | low | mitigate | `useAudioPlayer.test.ts` is re-run as an acceptance criterion, and Task 2 adds an explicit assertion |
| T-13-SC | Tampering | npm/pip/cargo installs | high | mitigate | **Zero** packages added in either repo. No install task, so no legitimacy checkpoint required |
| T-13-SC | Tampering | npm/pip/cargo installs | high | mitigate | **Zero** packages added, in neode-ui's package.json or in `aiui/`'s own in-repo pnpm workspace (D-19). No install task, so no legitimacy checkpoint required |
</threat_model>
<verification>
- `cd neode-ui && npx vitest run` green (whole suite, including `archyContentAdapter.test.ts` and `useAudioPlayer.test.ts`)
- `cd neode-ui && git diff --exit-code -- src/services/contextBroker.ts` exits 0
- `cd /home/archipelago/Projects/AIUI/packages/app && npx vitest run && npx vue-tsc --noEmit` green
- `cd aiui/packages/app && npx vitest run && npx vue-tsc --noEmit` green
- All eight audio extensions map to an audio MIME across `ShareModal.vue`, `classifyByMime` and `content.rs`
</verification>