UNPKG

@withpica/mcp-server

Version:

MCP Server for withPICA — enables AI assistants to interact with your withPICA music catalog

65 lines • 3.78 kB
/** * Dashboard & Discovery Tools — surface what needs attention, what PICA found, and daily briefings */ import { PicaClient } from "@withpica/mcp-sdk"; import { ToolDefinition, ToolExecutor } from "./index.js"; /** * ADR-267 Rule 2 — one ready-to-say sentence, lowercase en-GB, curiosity * register only: briefing counts are unverified gaps, so no loss framing. * Additive: derived entirely from critical_issues_total. * * `isEmptyCatalog` (org has 0 works AND 0 recordings) overrides ALL other * branches, including a nonzero critical_issues_total — an empty catalog * isn't a clean one, it's one with no on-ramp yet, and there's nothing more * useful to say to an agent sitting in front of an empty org than how to * import first (ADR-294 Decision 2, import-first invariant; originally * P0-2, 2026-07-04 discoverability audit). Names the fastest concrete next * tool rather than leaving the agent to guess, and is explicit that only * album/playlist links are supported — artist links are not. */ /** The empty-catalog import lead (ADR-294 Decision 2) — exported so tests * assert the exact string (toBe) instead of scattered substring matches. */ export declare const EMPTY_CATALOG_USER_MESSAGE = "your catalog is empty. paste a spotify album or playlist link (or a youtube link) and it imports right now: pica_import_streaming_link / pica_import_youtube_link. artist links are not supported, ask for an album or playlist. csv or statements: load the import-my-catalog skill."; /** The empty-audio masters lead (audio-into-activation punch list item 7, * 2026-07-25) — the catalog exists but is silent, and agents can't upload * files, so the concrete next step is asking the user to upload, then * matching. Unlike the empty-catalog lead this only REPLACES THE ALL-CLEAR: * zero audio is the steady state for most orgs and blocks nothing, so it * must never displace real actionable issues (reviewer, 2026-07-25). * Exported so tests assert the exact string (toBe), same as the const * above. */ export declare const EMPTY_AUDIO_USER_MESSAGE = "the catalog is in but no audio masters are attached \u2014 nothing can play, be identified or analysed yet. ask the user to upload their masters in /inspect (the top-bar upload takes a whole folder); pica then matches files to recordings automatically. review matches with pica_audio_query {\"unassigned\": true} and attach them with pica_audio_bulk_assign_suggested."; export declare function composeBriefingUserMessage(criticalIssuesTotal: number | null, isEmptyCatalog?: boolean, isEmptyAudio?: boolean): string | null; export declare class DashboardTools { private pica; constructor(pica: PicaClient); getTools(): Array<{ definition: ToolDefinition; executor: ToolExecutor; }>; private claimCredit; private claimCustody; private claimArtist; private queryDiscoveries; private reviewDiscovery; private attentionItems; private briefing; /** * ADR-272 — catalog health verdict. The SDK `health.catalogHealth()` * already unwraps the route's `{ success, data }` envelope to the verdict * object (BaseResource.request → `data.data || data`), so the result IS * the verdict and is returned as-is under formatSuccess's `data`. */ private catalogHealth; /** * ADR-273 — catalog health plan. Returns a scope-gated set of fix-actions * plus a planToken. Mutates nothing; pair with catalogHealthFix to apply. */ private catalogHealthPlan; /** * ADR-273 — catalog health fix. Applies accepted actions from a prior plan. * Returns honest per-action met/unmet plus a fresh verdict. */ private catalogHealthFix; } //# sourceMappingURL=dashboard.d.ts.map