feat(13-11): wire requestArchyLibrary + fire content/library fetch from a live init-time event (GAP-FOUND)
AIUI asks for the library the same way it asks for content, and the
fetch now actually fires without anyone typing a magic phrase:
- useArchy.ts: requestArchyLibrary(scope) sibling of requestArchyContent
(13-06), same bridge call with kind: 'library', routed through the
existing setArchyContent so the songs bucket fills exactly the way
films already does.
- init() now calls both requestArchyContent('all','own') and
requestArchyLibrary('own') once, fire-and-forget, immediately after
archyBridge.init() — the GAP-FOUND fix. 13-06 built the whole
content:request/content:push machinery and unit-tested it end to end,
but nothing in the live UI ever called it (13-06-SUMMARY.md's Known
Limitations); the fetch is now triggered by a real init-time UI event,
not merely callable.
- useContentPanel.ts's setArchyContent now also opens the panel and
populates availableTabs/activeTab/panelTitle when Archy supplied
non-empty content — previously only the data refs were set while the
tab bar and panelOpen stayed whatever the last regex-driven chat turn
left them, so real content could sit fully populated and still never
render. An empty bundle never force-opens the panel.
Deviation (Rule 2, mirrors 13-06's own archyBridge.ts precedent): kind:
'library' genuinely needs a different node-side RPC (music.list-tracks,
real tag-extracted metadata) than content.* (ContentItem has no artist/
album/duration field at all) — contextBroker.ts's handleContentRequest
gained one branch (fetchLibraryContent) to route it, and
aiui-protocol.ts's AIUIContentRequest.kind union gained the 'library'
literal, and archyBridge.ts's requestArchyContent kind param widened to
match. No second channel, no new message type, no new listener — the
existing content:request/content:push channel and its kind discriminator
carry this exactly as 13-06 designed it to. Full detail in the SUMMARY.
neode-ui: 926/926 tests green, vue-tsc -b clean. aiui: 341/344 (3
pre-existing, documented failures unrelated to this plan — 13-06/13-10
already recorded them), vue-tsc --noEmit clean.
This commit is contained in:
@@ -65,11 +65,16 @@ export interface AIUIChatRequest {
|
||||
* RPC method or params (T-13-34); the broker decides the call. A single
|
||||
* generic channel (not one per content type) so 13-11's music-library wave
|
||||
* can extend `kind` without touching this file again.
|
||||
*
|
||||
* `'library'` (13-11) is the one addition this wave makes to the
|
||||
* discriminator: it routes to `music.list-tracks` (13-07) instead of
|
||||
* `content.*`, since a library track carries real tag-extracted metadata
|
||||
* (artist/album/duration) that `ContentItem` has no field for at all.
|
||||
*/
|
||||
export interface AIUIContentRequest {
|
||||
type: 'content:request'
|
||||
id: string
|
||||
kind: 'films' | 'songs' | 'podcasts' | 'all'
|
||||
kind: 'films' | 'songs' | 'podcasts' | 'all' | 'library'
|
||||
scope?: 'own' | 'peers' | 'owned'
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user