From c08f8f0e83f209d7fb9dc4673316b2de626d3519 Mon Sep 17 00:00:00 2001 From: archipelago Date: Wed, 5 Aug 2026 18:35:10 -0400 Subject: [PATCH] docs(13-11): complete music library + share MIME fix plan --- .planning/REQUIREMENTS.md | 4 +- .planning/ROADMAP.md | 4 +- .planning/STATE.md | 17 +- .../13-11-SUMMARY.md | 194 ++++++++++++++++++ .../deferred-items.md | 20 ++ 5 files changed, 228 insertions(+), 11 deletions(-) create mode 100644 .planning/phases/13-aiui-functional-conversational-node-control-and-content-surf/13-11-SUMMARY.md diff --git a/.planning/REQUIREMENTS.md b/.planning/REQUIREMENTS.md index 0994e6df..2d09712d 100644 --- a/.planning/REQUIREMENTS.md +++ b/.planning/REQUIREMENTS.md @@ -79,7 +79,7 @@ declared exit criteria (multinode pass + workstreams B/C/F), `.planning/codebase - [x] **AIUI-01**: Human-language node control — a typed request in AIUI chat ("restart bitcoin", "how much space is left", "who's connected") reaches a real node action and returns a real result, over a permissioned tool-calling bridge rather than raw RPC - [ ] **AIUI-02**: Conversational settings — the system settings surfaced across neode-ui become reachable by conversation, scoped to what the user has granted -- [ ] **AIUI-03**: Content surfaces made real — AIUI's designed-but-empty content views render live node data (peer files, music, IndeeHub movies, owned/paid content); audio belongs to the global bottom-bar player and media streams via Range requests, never base64 blobs +- [x] **AIUI-03**: Content surfaces made real — AIUI's designed-but-empty content views render live node data (peer files, music, IndeeHub movies, owned/paid content); audio belongs to the global bottom-bar player and media streams via Range requests, never base64 blobs - [x] **AIUI-04**: Sandboxed by construction, permissioned by the user — secrets never reach the browser or the model context; the chat gets an explicit, user-granted, default-closed, revocable capability scope; destructive and identity-touching operations are human-confirmed; tool authority never derives from peer-controlled content (BLOCKER) - [ ] **AIUI-05**: Delivery and build — AIUI reaches nodes on a delivery path an operator can actually receive updates through, with `VITE_BASE_PATH=/aiui/` enforced by the build script so a hand-built bundle cannot ship a black page - [ ] **AIUI-06**: Verified on device — in the real embedded iframe on archi-dev-box, mobile included, not only in the local `dev:mock` loop @@ -155,7 +155,7 @@ Which phases cover which requirements. Updated during roadmap creation. | MKT-04 | Phase 8 | Pending | | AIUI-01 | Phase 13 | Complete | | AIUI-02 | Phase 13 | Pending | -| AIUI-03 | Phase 13 | Pending | +| AIUI-03 | Phase 13 | Complete | | AIUI-04 | Phase 13 | Complete | | AIUI-05 | Phase 13 | Pending | | AIUI-06 | Phase 13 | Pending | diff --git a/.planning/ROADMAP.md b/.planning/ROADMAP.md index 9e8f5045..1c2b3b9c 100644 --- a/.planning/ROADMAP.md +++ b/.planning/ROADMAP.md @@ -345,7 +345,7 @@ Plans: **Depends on:** Independent of Phases 1–12 for its UI and content work. Its security model must not contradict Phase 10 (Key-Material Hardening) — coordinate rather than widen. AIUI's own source lives in a **separate repository** (`git.tx1138.com/lfg2025/AIUI`, branch `development`, cloned at `~/Projects/AIUI`), so this phase spans two repos and needs push access to both. -**Plans:** 10/15 plans executed +**Plans:** 11/15 plans executed Plans: @@ -370,7 +370,7 @@ Plans: - [x] 13-09-PLAN.md — AIUI delivery: enforced build, pinned commit, live-asset verify, iframe sandbox mechanism (AIUI-04/05) - [x] 13-10-PLAN.md — D-04 chain: Ollama tool-calling + D-08 node-side history (AIUI-01) -- [ ] 13-11-PLAN.md — SongGrid lit from the real library + the m4a/aac/opus/wma share-mime fix (AIUI-03) +- [x] 13-11-PLAN.md — SongGrid lit from the real library + the m4a/aac/opus/wma share-mime fix (AIUI-03) **Wave 5** diff --git a/.planning/STATE.md b/.planning/STATE.md index 3c425f1c..ba0bf41d 100644 --- a/.planning/STATE.md +++ b/.planning/STATE.md @@ -5,15 +5,15 @@ milestone_name: milestone current_phase: 13 current_phase_name: aiui-functional-conversational-node-control-and-content-surf status: executing -stopped_at: 13-10 COMPLETE 2026-08-05, next wave 4 remainder is 13-11 -- check 13-11 for stale /home/archipelago/Projects/AIUI absolute paths per D-19 before executing it -last_updated: "2026-08-05T22:06:22.580Z" +stopped_at: "Completed 13-11-PLAN.md (music library SongGrid wiring + ShareModal MIME fix + GAP-FOUND live-trigger fix). Next: wave 4 has 13-11 as its only plan (terminal per D-13) — remaining phase-13 plans are waves 5-8 (13-12..13-15)." +last_updated: "2026-08-05T22:34:57.971Z" last_activity: 2026-08-05 last_activity_desc: 13-10 complete (D-04 Ollama tool-calling backend + D-08 node-side chat history) progress: total_phases: 13 completed_phases: 2 total_plans: 60 - completed_plans: 48 + completed_plans: 49 percent: 15 --- @@ -29,11 +29,11 @@ See: .planning/PROJECT.md (updated 2026-07-29) ## Current Position Phase: 13 (aiui-functional-conversational-node-control-and-content-surf) — EXECUTING -Plan: 10 of 15 complete (13-01, 13-02, 13-03, 13-04, 13-05, 13-06, 13-07, 13-08, 13-09, 13-10) — next: wave 4 remainder (13-11) +Plan: 11 of 15 complete (13-01, 13-02, 13-03, 13-04, 13-05, 13-06, 13-07, 13-08, 13-09, 13-10) — next: wave 4 remainder (13-11) Status: Ready to execute Last activity: 2026-08-05 — 13-10 complete (D-04 Ollama tool-calling backend + D-08 node-side chat history) -Progress: [████████░░] 80% +Progress: [████████░░] 82% ## Performance Metrics @@ -67,6 +67,7 @@ Progress: [████████░░] 80% | Phase 13 P07 | ~3h45m | 2 tasks | 5 files | | Phase 13 P08 | ~7h45m (elapsed, w/ session restart) | 3 tasks | 10 files | | Phase 13 P10 | ~2h45m | 2 tasks | 10 files | +| Phase 13 P11 | 27min | 3 tasks | 12 files | ## Accumulated Context @@ -139,6 +140,8 @@ Decisions are logged in PROJECT.md (10 locked ADRs in the `` block + - [Phase ?]: [Phase 13, 13-10]: OllamaBackend leads the D-04 chain via POST /api/chat (never assist.rs's /api/generate); model_supports_tools() probes /api/show and process-caches the answer, turning AI-SPEC's qwen2.5-coder [ASSUMED] tool-capability note into a runtime fact; FallbackChain falls through to Claude on a transport error mid-turn, not just at initial selection - [Phase ?]: [Phase 13, 13-10]: history.rs persists the full ChatMessage transcript per CallerScope-derived HistoryKey under data_dir, atomic (temp+rename) and 0600, with wallet/files-category tool-call arguments redacted before disk (verified against raw bytes, not just the struct); chat() persists but does not yet feed prior turns back into live model context (deliberately scoped out, needs Claude tool_use/tool_result id-pairing test budget as a follow-up) - [Phase ?]: [Phase 13, 13-10]: detect_ollama() and its two containing modules bumped to pub(crate) (api/rpc/mod.rs, api/rpc/mesh/mod.rs, api/rpc/mesh/assistant.rs) so assistant::backends could reuse the existing Ollama probe rather than writing a second one; run_loop (loop_.rs) now returns (answer, full_history) instead of just the answer, both Rule-3 deviations structurally required by the plan's own stated intent +- [Phase ?]: 13-11: kind:'library' content:request routes to music.list-tracks (not content.*) via a new contextBroker.ts fetchLibraryContent branch — Rule 2 deviation, contextBroker.ts's diff-clean acceptance criterion could not hold alongside genuine music.* wiring (ContentItem has no artist/album/duration field at all) +- [Phase ?]: 13-11: closed the plan's GAP-FOUND must_have — useArchy.ts's init() now fires requestArchyContent + requestArchyLibrary automatically as a live init-time event, and useContentPanel.ts's setArchyContent opens the panel/sets tabs for non-empty content, instead of leaving the fetch merely callable with nothing in the UI ever invoking it (13-06's own documented Known Limitation) ### Pending Todos @@ -216,8 +219,8 @@ The 5x lifecycle gate was NOT run. ## Session Continuity -Last session: 2026-08-05T22:06:22.548Z -Stopped at: 13-10 COMPLETE 2026-08-05, next wave 4 remainder is 13-11 -- check 13-11 for stale /home/archipelago/Projects/AIUI absolute paths per D-19 before executing it +Last session: 2026-08-05T22:34:57.917Z +Stopped at: Completed 13-11-PLAN.md (music library SongGrid wiring + ShareModal MIME fix + GAP-FOUND live-trigger fix). Next: wave 4 has 13-11 as its only plan (terminal per D-13) — remaining phase-13 plans are waves 5-8 (13-12..13-15). `assistant::` tests incl. `approval_nonce_binds_to_exact_action` individually; dispatcher.rs untouched; fc09d7a2's tools.rs/grants.rs/backends/mod.rs diffs confirmed rustfmt-only, no behavior change). Task 2 (ToolConfirmModal.vue, contextBroker.ts, Chat.vue mount, diff --git a/.planning/phases/13-aiui-functional-conversational-node-control-and-content-surf/13-11-SUMMARY.md b/.planning/phases/13-aiui-functional-conversational-node-control-and-content-surf/13-11-SUMMARY.md new file mode 100644 index 00000000..ecfd3786 --- /dev/null +++ b/.planning/phases/13-aiui-functional-conversational-node-control-and-content-surf/13-11-SUMMARY.md @@ -0,0 +1,194 @@ +--- +phase: 13-aiui-functional-conversational-node-control-and-content-surf +plan: 11 +subsystem: ui +tags: [vue, typescript, postmessage, content-adapter, music, mime, gap-found] + +requires: + - phase: 13-aiui-functional-conversational-node-control-and-content-surf + provides: "13-06's archyContentAdapter.ts conventions (classifyByMime, sortDeterministic, source-badge literals) and content:request/content:push channel; 13-07's music.* RPC surface (music.list-tracks) and 13-MUSIC-MODEL.md's entity model" +provides: + - "archyContentAdapter.ts: adaptLibraryTracks/adaptLibraryAlbums mapping music.list-tracks records onto AIUI's Song shape with real tag-extracted metadata (title/artist/album/duration), order-preserving, no cover art, no credential-bearing URLs" + - "ShareModal.vue: SHARE_MIME_MAP gains m4a/aac/opus/wma -> real audio/* MIME types (was application/octet-stream), extracted to a testable module-scope export" + - "contextBroker.ts: kind:'library' branch (fetchLibraryContent) routing to music.list-tracks instead of content.* — the one addition 13-06's kind discriminator was built to absorb" + - "useArchy.ts: requestArchyLibrary(scope), and init() now fires requestArchyContent + requestArchyLibrary automatically as a live init-time event (GAP-FOUND fix) instead of leaving them merely callable" + - "useContentPanel.ts: setArchyContent now opens the panel and populates availableTabs/activeTab/panelTitle when Archy supplied non-empty content, so it actually renders instead of sitting populated-but-invisible" +affects: [13-15] + +tech-stack: + added: [] + patterns: + - "Named exports from a .vue SFC's top-level