@withpica/mcp-server 2.95.3 → 2.95.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +34 -0
- package/README.intro.md +115 -0
- package/README.md +188 -204
- package/dist/lib/changelog.generated.d.ts +2 -2
- package/dist/lib/changelog.generated.d.ts.map +1 -1
- package/dist/lib/changelog.generated.js +2 -2
- package/dist/lib/changelog.generated.js.map +1 -1
- package/dist/prompts/index.js +2 -2
- package/dist/resources/agent-guide.d.ts +50 -4
- package/dist/resources/agent-guide.d.ts.map +1 -1
- package/dist/resources/agent-guide.js +109 -18
- package/dist/resources/agent-guide.js.map +1 -1
- package/dist/resources/index.d.ts.map +1 -1
- package/dist/resources/index.js +81 -2
- package/dist/resources/index.js.map +1 -1
- package/dist/resources/llms-primer.d.ts +1 -1
- package/dist/resources/llms-primer.d.ts.map +1 -1
- package/dist/resources/llms-primer.js +1 -1
- package/dist/resources/required-schemas.generated.d.ts +3 -12
- package/dist/resources/required-schemas.generated.d.ts.map +1 -1
- package/dist/resources/required-schemas.generated.js +3 -18
- package/dist/resources/required-schemas.generated.js.map +1 -1
- package/dist/resources/required-schemas.source.d.ts.map +1 -1
- package/dist/resources/required-schemas.source.js +13 -15
- package/dist/resources/required-schemas.source.js.map +1 -1
- package/dist/server-instructions.d.ts +2 -2
- package/dist/server-instructions.d.ts.map +1 -1
- package/dist/server-instructions.js +3 -3
- package/dist/skills/skills.generated.d.ts.map +1 -1
- package/dist/skills/skills.generated.js +18 -9
- package/dist/skills/skills.generated.js.map +1 -1
- package/dist/tools/agent-identity.d.ts.map +1 -1
- package/dist/tools/agent-identity.js +2 -1
- package/dist/tools/agent-identity.js.map +1 -1
- package/dist/tools/agreement-types.d.ts.map +1 -1
- package/dist/tools/agreement-types.js +23 -11
- package/dist/tools/agreement-types.js.map +1 -1
- package/dist/tools/agreements.d.ts.map +1 -1
- package/dist/tools/agreements.js +17 -9
- package/dist/tools/agreements.js.map +1 -1
- package/dist/tools/analytics.d.ts.map +1 -1
- package/dist/tools/analytics.js +6 -3
- package/dist/tools/analytics.js.map +1 -1
- package/dist/tools/assets.d.ts.map +1 -1
- package/dist/tools/assets.js +20 -13
- package/dist/tools/assets.js.map +1 -1
- package/dist/tools/audio-files.d.ts.map +1 -1
- package/dist/tools/audio-files.js +5 -3
- package/dist/tools/audio-files.js.map +1 -1
- package/dist/tools/bulk.d.ts.map +1 -1
- package/dist/tools/bulk.js +15 -9
- package/dist/tools/bulk.js.map +1 -1
- package/dist/tools/collaborators.d.ts.map +1 -1
- package/dist/tools/collaborators.js +41 -16
- package/dist/tools/collaborators.js.map +1 -1
- package/dist/tools/comparisons.d.ts.map +1 -1
- package/dist/tools/comparisons.js +2 -1
- package/dist/tools/comparisons.js.map +1 -1
- package/dist/tools/credits.d.ts +4 -3
- package/dist/tools/credits.d.ts.map +1 -1
- package/dist/tools/credits.js +16 -88
- package/dist/tools/credits.js.map +1 -1
- package/dist/tools/custody.d.ts.map +1 -1
- package/dist/tools/custody.js +43 -10
- package/dist/tools/custody.js.map +1 -1
- package/dist/tools/dashboard.d.ts.map +1 -1
- package/dist/tools/dashboard.js +22 -19
- package/dist/tools/dashboard.js.map +1 -1
- package/dist/tools/directory.d.ts.map +1 -1
- package/dist/tools/directory.js +7 -4
- package/dist/tools/directory.js.map +1 -1
- package/dist/tools/discovery.d.ts +66 -10
- package/dist/tools/discovery.d.ts.map +1 -1
- package/dist/tools/discovery.js +212 -25
- package/dist/tools/discovery.js.map +1 -1
- package/dist/tools/disputes.d.ts.map +1 -1
- package/dist/tools/disputes.js +3 -0
- package/dist/tools/disputes.js.map +1 -1
- package/dist/tools/documents.d.ts.map +1 -1
- package/dist/tools/documents.js +9 -6
- package/dist/tools/documents.js.map +1 -1
- package/dist/tools/enrichment.d.ts.map +1 -1
- package/dist/tools/enrichment.js +92 -14
- package/dist/tools/enrichment.js.map +1 -1
- package/dist/tools/error-envelope.d.ts +44 -0
- package/dist/tools/error-envelope.d.ts.map +1 -0
- package/dist/tools/error-envelope.js +17 -0
- package/dist/tools/error-envelope.js.map +1 -0
- package/dist/tools/exports.d.ts.map +1 -1
- package/dist/tools/exports.js +24 -9
- package/dist/tools/exports.js.map +1 -1
- package/dist/tools/groups.d.ts.map +1 -1
- package/dist/tools/groups.js +1 -0
- package/dist/tools/groups.js.map +1 -1
- package/dist/tools/import-documents.d.ts.map +1 -1
- package/dist/tools/import-documents.js +3 -2
- package/dist/tools/import-documents.js.map +1 -1
- package/dist/tools/import.d.ts.map +1 -1
- package/dist/tools/import.js +71 -38
- package/dist/tools/import.js.map +1 -1
- package/dist/tools/index.d.ts +53 -4
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +124 -36
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/licensing.d.ts.map +1 -1
- package/dist/tools/licensing.js +6 -2
- package/dist/tools/licensing.js.map +1 -1
- package/dist/tools/memory.d.ts.map +1 -1
- package/dist/tools/memory.js +8 -4
- package/dist/tools/memory.js.map +1 -1
- package/dist/tools/metadata.d.ts +7 -1
- package/dist/tools/metadata.d.ts.map +1 -1
- package/dist/tools/metadata.js +31 -2
- package/dist/tools/metadata.js.map +1 -1
- package/dist/tools/multimedia.d.ts.map +1 -1
- package/dist/tools/multimedia.js +7 -3
- package/dist/tools/multimedia.js.map +1 -1
- package/dist/tools/notes.d.ts.map +1 -1
- package/dist/tools/notes.js +9 -6
- package/dist/tools/notes.js.map +1 -1
- package/dist/tools/notifications.d.ts.map +1 -1
- package/dist/tools/notifications.js +16 -27
- package/dist/tools/notifications.js.map +1 -1
- package/dist/tools/people.d.ts.map +1 -1
- package/dist/tools/people.js +8 -5
- package/dist/tools/people.js.map +1 -1
- package/dist/tools/projects.d.ts.map +1 -1
- package/dist/tools/projects.js +16 -12
- package/dist/tools/projects.js.map +1 -1
- package/dist/tools/recording-custody.d.ts.map +1 -1
- package/dist/tools/recording-custody.js +9 -5
- package/dist/tools/recording-custody.js.map +1 -1
- package/dist/tools/recording-samples.d.ts.map +1 -1
- package/dist/tools/recording-samples.js +25 -6
- package/dist/tools/recording-samples.js.map +1 -1
- package/dist/tools/recordings.d.ts +10 -0
- package/dist/tools/recordings.d.ts.map +1 -1
- package/dist/tools/recordings.js +32 -19
- package/dist/tools/recordings.js.map +1 -1
- package/dist/tools/recovery-hints.d.ts.map +1 -1
- package/dist/tools/recovery-hints.js +35 -17
- package/dist/tools/recovery-hints.js.map +1 -1
- package/dist/tools/release-rich.js +5 -5
- package/dist/tools/release-rich.js.map +1 -1
- package/dist/tools/releases.d.ts.map +1 -1
- package/dist/tools/releases.js +21 -12
- package/dist/tools/releases.js.map +1 -1
- package/dist/tools/royalties.d.ts.map +1 -1
- package/dist/tools/royalties.js +12 -6
- package/dist/tools/royalties.js.map +1 -1
- package/dist/tools/send.d.ts.map +1 -1
- package/dist/tools/send.js +7 -4
- package/dist/tools/send.js.map +1 -1
- package/dist/tools/sessions.d.ts.map +1 -1
- package/dist/tools/sessions.js +8 -4
- package/dist/tools/sessions.js.map +1 -1
- package/dist/tools/settings.d.ts.map +1 -1
- package/dist/tools/settings.js +10 -4
- package/dist/tools/settings.js.map +1 -1
- package/dist/tools/share-links.d.ts.map +1 -1
- package/dist/tools/share-links.js +7 -3
- package/dist/tools/share-links.js.map +1 -1
- package/dist/tools/share-send.d.ts.map +1 -1
- package/dist/tools/share-send.js +15 -5
- package/dist/tools/share-send.js.map +1 -1
- package/dist/tools/shows.d.ts +31 -0
- package/dist/tools/shows.d.ts.map +1 -0
- package/dist/tools/shows.js +307 -0
- package/dist/tools/shows.js.map +1 -0
- package/dist/tools/skills.d.ts.map +1 -1
- package/dist/tools/skills.js +7 -0
- package/dist/tools/skills.js.map +1 -1
- package/dist/tools/split-sheets.d.ts.map +1 -1
- package/dist/tools/split-sheets.js +19 -12
- package/dist/tools/split-sheets.js.map +1 -1
- package/dist/tools/statements.js +2 -2
- package/dist/tools/statements.js.map +1 -1
- package/dist/tools/storage-config.d.ts.map +1 -1
- package/dist/tools/storage-config.js +5 -3
- package/dist/tools/storage-config.js.map +1 -1
- package/dist/tools/subscription.d.ts +69 -19
- package/dist/tools/subscription.d.ts.map +1 -1
- package/dist/tools/subscription.js +98 -255
- package/dist/tools/subscription.js.map +1 -1
- package/dist/tools/sync-placements.d.ts.map +1 -1
- package/dist/tools/sync-placements.js +10 -5
- package/dist/tools/sync-placements.js.map +1 -1
- package/dist/tools/telegram.d.ts.map +1 -1
- package/dist/tools/telegram.js +16 -24
- package/dist/tools/telegram.js.map +1 -1
- package/dist/tools/users.d.ts.map +1 -1
- package/dist/tools/users.js +12 -6
- package/dist/tools/users.js.map +1 -1
- package/dist/tools/works.d.ts.map +1 -1
- package/dist/tools/works.js +13 -10
- package/dist/tools/works.js.map +1 -1
- package/package.json +7 -3
- package/server.json +2 -2
- package/.claude/settings.local.json +0 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"changelog.generated.js","sourceRoot":"","sources":["../../src/lib/changelog.generated.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAC7D,yDAAyD;AAEzD,MAAM,CAAC,MAAM,YAAY,GAAG,
|
|
1
|
+
{"version":3,"file":"changelog.generated.js","sourceRoot":"","sources":["../../src/lib/changelog.generated.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAC7D,yDAAyD;AAEzD,MAAM,CAAC,MAAM,YAAY,GAAG,06wNAA06wN,CAAC;AACv8wN,MAAM,CAAC,MAAM,YAAY,GAAG,sBAAsB,CAAC;AACnD,MAAM,CAAC,MAAM,eAAe,GAAG,QAAQ,CAAC"}
|
package/dist/prompts/index.js
CHANGED
|
@@ -488,7 +488,7 @@ Keep it conversational — don't list all gaps at once. Start with the most impo
|
|
|
488
488
|
type: "text",
|
|
489
489
|
text: `Help me check which of my works are registered and which still need registration.
|
|
490
490
|
|
|
491
|
-
Pre-flight: read pica://schemas/enrichment-resolve-required (for resolving missing ISWCs via the cascade) and pica://schemas/export-required (for the
|
|
491
|
+
Pre-flight: read pica://schemas/enrichment-resolve-required (for resolving missing ISWCs via the cascade) and pica://schemas/export-required (for the registration-bundle export shape) before writing.
|
|
492
492
|
|
|
493
493
|
Steps:
|
|
494
494
|
1. pica_works_query — list works, then use pica_works_inspect with sections: ["registration"] to check registration status across PROs (PRS, MCPS, PPL, MLC)
|
|
@@ -506,7 +506,7 @@ Report:
|
|
|
506
506
|
|
|
507
507
|
Then offer:
|
|
508
508
|
- "Want me to try enriching the works missing ISWCs from MLC?"
|
|
509
|
-
- "Want me to export a
|
|
509
|
+
- "Want me to export a registration bundle for the works that are ready?" (pica_export_song_registration — CSVs plus a CWR field-mapping guide; it is NOT a CWR file, so do not call it one)
|
|
510
510
|
- "Want me to check registration status for a specific work?"
|
|
511
511
|
|
|
512
512
|
Focus on practical next steps, not just reporting.`,
|
|
@@ -1,8 +1,16 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* ADR-214 — workflow narrative for agents.
|
|
3
3
|
*
|
|
4
|
-
* Two markdown
|
|
5
|
-
* config.lobbyMode || !pica,
|
|
4
|
+
* Two markdown BUILDERS. ResourceRegistry serves buildAgentGuideLobby() when
|
|
5
|
+
* config.lobbyMode || !pica, buildAgentGuideAuthenticated() otherwise.
|
|
6
|
+
*
|
|
7
|
+
* Nothing here is a literal, because a literal rots: this file claimed
|
|
8
|
+
* "~232 tools" on 2026-08-24 while ToolRegistry.listTools() returned 329, and
|
|
9
|
+
* the lobby half said "three tools are available" and listed all three by name
|
|
10
|
+
* while the HTTP lobby exposes exactly ONE (the sign-in pair is
|
|
11
|
+
* `audiences: ["stdio"]`). Counts AND names are parameters, supplied by the
|
|
12
|
+
* transport that knows what its own caller can reach. Enforced by
|
|
13
|
+
* src/__tests__/resources/agent-guide.test.ts.
|
|
6
14
|
*
|
|
7
15
|
* Tool sequences are verbatim from ADR-214 Decision section "Top
|
|
8
16
|
* workflows" — audit-verified 2026-04-30 against the live ToolRegistry.
|
|
@@ -10,6 +18,44 @@
|
|
|
10
18
|
* Edits to this file are linted by scripts/lint-agent-guide.ts: every
|
|
11
19
|
* `pica_*` token must resolve to a real tool in ToolRegistry.
|
|
12
20
|
*/
|
|
13
|
-
export declare const AGENT_GUIDE_AUTHENTICATED = "# pica \u2014 agent guide\n\npica manages a music catalog: works (compositions), recordings (masters),\npeople (writers, performers, publishers), credits, agreements, exports.\nmulti-tenant per organisation; every write is org-scoped automatically.\n\nyou are signed in. ~232 tools are available. fourteen core workflows below\ncover most of the surface; for anything not listed, fall back to\n`pica_discover` (mode: list_categories \u2192 list_tools) \u2192 `pica_tool_details`.\n\n## top workflows\n\n### register a new work\n1. `pica_works_create` \u2014 title required; iswc settable inline.\n2. `pica_credits_update` \u2014 batch; attach writer/composer credits.\n writer_split_percentage values must sum to 100 across all writer rows.\n see `pica://schemas/work-required` and `pica://schemas/work-credits-required`.\n\n### add a recording to an existing work\n- `pica_recordings_create` \u2014 title + artist_name + version_type required\n (version_type defaults to `master`). isrc and duration_ms are inline.\n- see `pica://schemas/recording-required`.\n\n### add audio to a recording\n1. `pica_audio_presigned_upload` \u2014 returns a signed url + token.\n2. uploader (browser, curl, sdk) PUTs the file to that url.\n3. `pica_audio_complete_upload` \u2014 registers the upload in the catalog.\n4. (optional) `pica_audio_analyze` \u2014 async; extracts bpm, key, mood, and\n transcribes lyrics via whisper.\n5. `pica_audio_inspect` (sections: [\"analysis\", \"status\"]) \u2014 poll for\n analysis results when you called step 4.\n- see `pica://schemas/audio-upload-required`.\n\n### add recording credits\n- `pica_recording_credits_update` \u2014 batch. role enum is DISTINCT from\n work credits (MainArtist / FeaturedArtist / Producer / Engineer / etc.).\n- person_id is OPTIONAL \u2014 credits can carry just credited_name when the\n person isn't in the catalog yet.\n- see `pica://schemas/recording-credits-required`.\n\n### enrich existing metadata\n1. `pica_resolve_work` / `pica_resolve_person` / `pica_resolve_recording` \u2014\n tier A identifier matches apply directly; tier B fuzzy matches queue\n as proposals.\n2. `pica_enrichment_proposals_list` \u2014 view pending proposals.\n3. `pica_enrichment_proposal_apply` \u2014 commit a proposal you've reviewed.\n `pica_enrichment_proposal_reject` \u2014 dismiss with content-hash suppression.\n- see `pica://schemas/enrichment-resolve-required`.\n\n### create an agreement\n1. `pica_agreements_create` \u2014 title + agreement_type + other_party_name\n required. prefer counterparty_org_id (FK) over free-text other_party_name.\n2. `pica_agreements_link_work` \u2014 attach works (optional royalty_split per work).\n3. `pica_agreement_templates_render` \u2014 template-driven alternative.\n- see `pica://schemas/agreement-required`.\n\n### add multimedia\n- `pica_multimedia_create` \u2014 title + content_type required.\n- `pica_multimedia_link_youtube` \u2014 YouTube videos (auto-enriched).\n- `pica_multimedia_import_url` \u2014 external image / video URL (downloads\n into PICA storage).\n- `pica_multimedia_link_work` \u2014 attach to a work (relationship_type required).\n- see `pica://schemas/multimedia-required`.\n\n### log a studio session\n1. (optional) `pica_sessions_types` \u2014 pre-flight to discover valid\n `session_type_id` values for this org. Lookup table; org-scoped.\n2. `pica_sessions_create` \u2014 title + start_time + end_time (ISO 8601).\n session_type_id, location, work_id, recording_id, participants are\n all optional inline fields.\n3. `pica_sessions_inspect` / `pica_sessions_query` \u2014 read-back / browse.\n- the `status` enum (scheduled / in_progress / completed / cancelled) is\n documented but NOT enforced by a DB CHECK \u2014 values may evolve.\n- see `pica://schemas/session-required`.\n\n### generate a split sheet (publishing royalties on a work)\n1. **pre-condition:** writer credits on the work must already total 100%\n via `pica_credits_update`. `pica_split_sheet_generate` returns 400\n otherwise.\n2. `pica_split_sheet_generate` \u2014 work_id only; snapshots current splits.\n3. `pica_split_sheet_send` \u2014 notify each credited writer for signature\n via in-app + Telegram + email. Non-PICA-user writers get a\n collaboration invite email instead. Per-writer soft-fails.\n4. `pica_split_sheet_get` / `pica_split_sheet_list` \u2014 read-back.\n- see `pica://schemas/split-sheet-required`.\n\n### assign master ownership splits (recording rights)\n- DISTINCT from publishing splits above. Recording splits live on\n `recording_splits`, not `work_credits`. Drives master royalty payouts\n + downstream credit gating.\n1. `pica_recording_splits_create` \u2014 recording_id + split_type\n (master / mechanical / performance / sync) + percentage required.\n role / person_id / territory / start_date / end_date optional.\n Use `dry_run: true` for a no-op preview before committing.\n ADR-200 form-confirmation gate fires on connectors that support\n `elicitation/url`.\n2. `pica_recording_splits_verify` \u2014 explicitly mark a split as agreed.\n3. `pica_recording_splits_list` \u2014 list all splits on a recording.\n- see `pica://schemas/recording-splits-required`.\n\n### assign an industry identifier (iswc / isrc / isni / ipi / etc.)\n**there is no standalone identifier-assign tool.** every identifier is\nan inline field on the entity's update tool. don't search for a\ngeneric identifier-assign verb \u2014 set the field on `pica_works_update`\n/ `pica_recordings_update` / `pica_people_update` directly.\n\n- **work identifiers** \u2192 `pica_works_update`: `iswc`, `isrc`,\n `tunecode`, `prs_work_id`, `spotify_track_uri`.\n- **recording identifiers** \u2192 `pica_recordings_update`: `isrc`,\n `isrc_source`, `musicbrainz_recording_id`, `mlc_recording_id`,\n `mlc_song_code`, `spotify_track_uri`, `spotify_track_id`,\n `youtube_video_id`, `youtube_url`, `apple_music_url`,\n `deezer_track_id`, `ppl_recording_id`.\n- **person identifiers** \u2192 `pica_people_update`: `cae_ipi_number`,\n `ipn_number`, `prs_number`, `ppl_number`, `mcps_member_number`,\n `pro_name` + `pro_member_number`, plus the satellite-routed\n identifiers below.\n\n**satellite-routed person identifiers (set them inline anyway):**\n`isni`, `musicbrainz_id`, `wikidata_id`, `discogs_artist_id`,\n`deezer_artist_id` are stored on the `person_enrichment` satellite\ntable under the hood, NOT on `people`. **don't think about that.**\nset them as inline fields on `pica_people_update` exactly like the\nnon-satellite identifiers above; the service fans out automatically.\nthe surface is uniform \u2014 satellites are an implementation detail.\n\nfield-name notes \u2014 these names are surface-precise; the route's\nallow-list rejects the abbreviated forms:\n- `cae_ipi_number` (NOT `cae_ipi`)\n- `ipn_number` (NOT `ipn`)\n- `pro_member_number` (the generic non-PRO/PPL/MCPS variant) is paired\n with `pro_name` to specify which PRO.\n\n**examples:**\n- `pica_works_update { id: \"<uuid>\", iswc: \"T-123.456.789-0\" }`\n- `pica_people_update { id: \"<uuid>\", cae_ipi_number: \"00000000001\",\n isni: \"0000000123456789\" }`\n\n### export works\n- one of: `pica_export_catalog_csv` (per-work or per-batch \u2014 picks format pro / distributor / nro / sync-pdf, requires work_id or work_ids) /\n `pica_export_song_registration` (catalog-wide CWR for PRO/CMO) /\n `pica_export_industry_ready` (catalog-wide publisher / label / sync package) /\n `pica_export_catalog_asset_report` (CAR \u2014 finance / insurance / diligence) /\n `pica_export_ai_consent` (AI-consent matrix).\n- see `pica://schemas/export-required` for which export matches which destination.\n\n### claim a discovery\n1. `pica_discoveries_query` \u2014 list pending; row carries\n `type: 'credit' | 'custody' | 'artist'`.\n2. typed claim: `pica_claim_credit` / `pica_claim_custody` /\n `pica_claim_artist`. or `pica_discoveries_review` for generic accept/reject.\n- see `pica://schemas/claim-required`.\n\n## reading the catalog\n\nwrite-flows above assume you already know what to write. these read-\npatterns help you find the right entity / gap / duplicate first.\n\n### find duplicates and merge them\n1. `pica_find_duplicates` \u2014 `entity_type: \"works\" | \"people\"`. returns\n groups + suggested winners.\n2. `pica_merge_duplicates` \u2014 `entity_type` accepts both forms; the\n canonical plural (`\"works\" | \"people\"`) matches `pica_find_duplicates`\n and is preferred. legacy singular (`\"work\" | \"person\"`) still works\n for backwards compatibility. max 25 loser_ids per call. requires\n admin scope.\n- if you need to merge but don't have admin scope, ping a workspace\n owner \u2014 there is no agent-side workaround.\n\n### audit catalog completeness\n1. `pica_dashboard_briefing` \u2014 high-level state: counts of\n needs_attention works, recent activity, unresolved discoveries,\n per-org `agent_velocity` block (workflow_outcomes events trailing 7d\n sliced by kind + top tools, ADR-247 PR b). start here, not at\n `*_query`.\n2. drill into specifics from the briefing's pointers \u2014 usually a\n `pica_*_query` filtered by health, then `pica_*_inspect` per row.\n\n### find gaps and fill them\n1. `pica_works_query { health_filter: \"needs_attention\" | \"low_completeness\" }`\n \u2014 under-used. surfaces works missing credits / iswc / metadata.\n parallel filters exist on `pica_recordings_query` /\n `pica_people_query` (`pica_people_query` is full-text only \u2014 no\n typed health_filter yet).\n2. `pica_works_inspect { id, sections: [\"health\", \"completeness\", \"enrichment\"] }`\n \u2014 request only the sections you need. sections=[] (omit) returns\n everything which is noisy.\n3. if the gap is identifier-shaped (missing ISWC / ISRC / ISNI /\n MusicBrainz id) \u2014 `pica_resolve_work` / `_recording` / `_person`\n fans the cascade. tier B fuzzy matches queue as proposals \u2014 drain\n via `pica_enrichment_proposals_list` \u2192 `_apply` / `_reject`.\n\n### look up a person by industry identifier\n- `pica_people_query` accepts a free-text `query` field that matches\n name, email, OR identifier (IPI / ISNI / etc.). there is NO typed\n filter (`pica_people_query { isni: \"...\" }` does not work) \u2014 use\n the `query` string.\n- if no match, fall back to `pica_search_all` for a cross-entity scan.\n- if still no match, the person isn't in the catalog yet \u2014\n `pica_people_create` (set the identifier inline; see the\n identifier-assign section above) \u2192 `pica_resolve_person` to fan\n enrichment across ISNI + MusicBrainz.\n\n## common gotchas\n\n- **duration units differ.** `works.duration_seconds` (integer seconds);\n `recordings.duration_ms` (integer milliseconds);\n `audio_files.duration_seconds` (seconds again).\n- **no standalone identifier-assign tool.** every identifier (ISWC,\n ISRC, ISNI, CAE/IPI, MusicBrainz id, etc.) is an inline field on the\n entity's update tool \u2014 see the \"assign an industry identifier\"\n section above for the surface-precise field names.\n- **two write surfaces for collaborators.** `pica_credits_update` is\n canonical for work splits; `pica_recording_credits_update` is the\n recording-side variant with a different role enum (MainArtist /\n FeaturedArtist / Producer / etc.). don't cross them.\n- **people identifiers \u2014 treat as one inline surface.** `pica_people_update`\n accepts every identifier as an inline field; some route to the\n `person_enrichment` satellite under the hood (see the identifier\n section above) \u2014 the surface stays uniform.\n- **audio analysis is async + explicit.** `pica_audio_complete_upload`\n does NOT auto-trigger analysis. call `pica_audio_analyze` and poll.\n- **lyrics from analysis auto-copy only into an EMPTY `works.lyrics`.**\n whisper transcripts land on the transcriptions row; when the linked\n work's `lyrics` is null the text + `lyrics_language` are copied\n across. existing lyrics are never overwritten.\n- **org scoping + duplicate prevention.** writes are org-scoped; iswc\n and isrc duplicates are blocked at write.\n\n## schema resources (pre-flight before each workflow)\n\n- `pica://schemas/work-required` \u2014 backs `pica_works_create`.\n- `pica://schemas/recording-required` \u2014 backs `pica_recordings_create`.\n- `pica://schemas/work-credits-required` \u2014 backs `pica_credits_update`.\n- `pica://schemas/recording-credits-required` \u2014 backs `pica_recording_credits_update`.\n- `pica://schemas/person-required` \u2014 backs `pica_people_create`.\n- `pica://schemas/audio-upload-required` \u2014 3-step audio chain.\n- `pica://schemas/enrichment-resolve-required` \u2014 resolve \u2192 proposals chain.\n- `pica://schemas/agreement-required` \u2014 backs `pica_agreements_create`.\n- `pica://schemas/multimedia-required` \u2014 backs `pica_multimedia_create`.\n- `pica://schemas/export-required` \u2014 five export destinations.\n- `pica://schemas/claim-required` \u2014 three discovery claim verbs.\n- `pica://schemas/session-required` \u2014 backs `pica_sessions_create`.\n- `pica://schemas/split-sheet-required` \u2014 backs `pica_split_sheet_generate` (publishing splits on works).\n- `pica://schemas/recording-splits-required` \u2014 backs `pica_recording_splits_create` (master ownership splits on recordings).\n\neach schema returns a json contract: required fields, recommended fields,\nCHECK enum values, companion-call orchestration, and an example payload.\n";
|
|
14
|
-
|
|
21
|
+
/**
|
|
22
|
+
* The signed-in agent guide.
|
|
23
|
+
*
|
|
24
|
+
* @param toolCount MUST be **the number of catalogue tools THIS caller can
|
|
25
|
+
* reach, excluding deprecated aliases**. The two transports compute that
|
|
26
|
+
* differently and both are correct:
|
|
27
|
+
*
|
|
28
|
+
* - **stdio / any flat surface** — `ToolRegistry.listTools().length`, which
|
|
29
|
+
* already drops aliases. This is the definition `MCP_TOOL_COUNT` in
|
|
30
|
+
* `lib/constants/mcp-surface.ts` uses.
|
|
31
|
+
* - **layered HTTP (`/api/mcp`, the connector default)** — the
|
|
32
|
+
* scope-filtered allowed set, alias names removed
|
|
33
|
+
* (`app/api/mcp/route.ts`, `catalogueToolCount`). `listTools()` is the
|
|
34
|
+
* wrong source there: under layered discovery it returns only the
|
|
35
|
+
* meta-tools, and the guide would announce that handful while the whole
|
|
36
|
+
* catalogue is reachable by name and through `pica_execute`.
|
|
37
|
+
*
|
|
38
|
+
* Do NOT pass a literal, a frozen constant, or a raw
|
|
39
|
+
* `allDefinitions().length` — the last one counts deprecated aliases, which
|
|
40
|
+
* are hidden from every listing the caller can see, so the guide would
|
|
41
|
+
* promise tools the agent cannot find. `route.test.ts` ("agent guide")
|
|
42
|
+
* asserts the route passes a computed, alias-free count.
|
|
43
|
+
*/
|
|
44
|
+
export declare function buildAgentGuideAuthenticated(toolCount: number): string;
|
|
45
|
+
/**
|
|
46
|
+
* The lobby guide, served when there is no authenticated client.
|
|
47
|
+
*
|
|
48
|
+
* @param lobbyToolNames The tools THIS caller can actually call right now, in
|
|
49
|
+
* the order they should be read. Names, not a count: the two transports
|
|
50
|
+
* expose different sets. stdio lists all three registered lobby tools;
|
|
51
|
+
* the HTTP lobby (`app/api/mcp/route.ts`, `lobbyToolNames`) filters to
|
|
52
|
+
* `audiences ∋ "lobby"` and only `pica_signup_start` declares it, so the
|
|
53
|
+
* sign-in pair is not callable there. The guide previously hardcoded
|
|
54
|
+
* "three tools" plus all three names, so two thirds of the HTTP lobby's
|
|
55
|
+
* instructions named tools that would be refused.
|
|
56
|
+
* @param unlockedToolCount The count of catalogue tools an AUTHENTICATED
|
|
57
|
+
* client would reach — the sentence it lands in is "what unlocks after
|
|
58
|
+
* sign-in", so it is deliberately NOT `lobbyToolNames.length`.
|
|
59
|
+
*/
|
|
60
|
+
export declare function buildAgentGuideLobby(lobbyToolNames: string[], unlockedToolCount: number): string;
|
|
15
61
|
//# sourceMappingURL=agent-guide.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-guide.d.ts","sourceRoot":"","sources":["../../src/resources/agent-guide.ts"],"names":[],"mappings":"AAEA
|
|
1
|
+
{"version":3,"file":"agent-guide.d.ts","sourceRoot":"","sources":["../../src/resources/agent-guide.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,4BAA4B,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CA2PtE;AAqCD;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,oBAAoB,CAClC,cAAc,EAAE,MAAM,EAAE,EACxB,iBAAiB,EAAE,MAAM,GACxB,MAAM,CAiCR"}
|
|
@@ -2,8 +2,16 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* ADR-214 — workflow narrative for agents.
|
|
4
4
|
*
|
|
5
|
-
* Two markdown
|
|
6
|
-
* config.lobbyMode || !pica,
|
|
5
|
+
* Two markdown BUILDERS. ResourceRegistry serves buildAgentGuideLobby() when
|
|
6
|
+
* config.lobbyMode || !pica, buildAgentGuideAuthenticated() otherwise.
|
|
7
|
+
*
|
|
8
|
+
* Nothing here is a literal, because a literal rots: this file claimed
|
|
9
|
+
* "~232 tools" on 2026-08-24 while ToolRegistry.listTools() returned 329, and
|
|
10
|
+
* the lobby half said "three tools are available" and listed all three by name
|
|
11
|
+
* while the HTTP lobby exposes exactly ONE (the sign-in pair is
|
|
12
|
+
* `audiences: ["stdio"]`). Counts AND names are parameters, supplied by the
|
|
13
|
+
* transport that knows what its own caller can reach. Enforced by
|
|
14
|
+
* src/__tests__/resources/agent-guide.test.ts.
|
|
7
15
|
*
|
|
8
16
|
* Tool sequences are verbatim from ADR-214 Decision section "Top
|
|
9
17
|
* workflows" — audit-verified 2026-04-30 against the live ToolRegistry.
|
|
@@ -11,15 +19,40 @@
|
|
|
11
19
|
* Edits to this file are linted by scripts/lint-agent-guide.ts: every
|
|
12
20
|
* `pica_*` token must resolve to a real tool in ToolRegistry.
|
|
13
21
|
*/
|
|
14
|
-
|
|
22
|
+
/**
|
|
23
|
+
* The signed-in agent guide.
|
|
24
|
+
*
|
|
25
|
+
* @param toolCount MUST be **the number of catalogue tools THIS caller can
|
|
26
|
+
* reach, excluding deprecated aliases**. The two transports compute that
|
|
27
|
+
* differently and both are correct:
|
|
28
|
+
*
|
|
29
|
+
* - **stdio / any flat surface** — `ToolRegistry.listTools().length`, which
|
|
30
|
+
* already drops aliases. This is the definition `MCP_TOOL_COUNT` in
|
|
31
|
+
* `lib/constants/mcp-surface.ts` uses.
|
|
32
|
+
* - **layered HTTP (`/api/mcp`, the connector default)** — the
|
|
33
|
+
* scope-filtered allowed set, alias names removed
|
|
34
|
+
* (`app/api/mcp/route.ts`, `catalogueToolCount`). `listTools()` is the
|
|
35
|
+
* wrong source there: under layered discovery it returns only the
|
|
36
|
+
* meta-tools, and the guide would announce that handful while the whole
|
|
37
|
+
* catalogue is reachable by name and through `pica_execute`.
|
|
38
|
+
*
|
|
39
|
+
* Do NOT pass a literal, a frozen constant, or a raw
|
|
40
|
+
* `allDefinitions().length` — the last one counts deprecated aliases, which
|
|
41
|
+
* are hidden from every listing the caller can see, so the guide would
|
|
42
|
+
* promise tools the agent cannot find. `route.test.ts` ("agent guide")
|
|
43
|
+
* asserts the route passes a computed, alias-free count.
|
|
44
|
+
*/
|
|
45
|
+
export function buildAgentGuideAuthenticated(toolCount) {
|
|
46
|
+
return `# pica — agent guide
|
|
15
47
|
|
|
16
48
|
pica manages a music catalog: works (compositions), recordings (masters),
|
|
17
49
|
people (writers, performers, publishers), credits, agreements, exports.
|
|
18
50
|
multi-tenant per organisation; every write is org-scoped automatically.
|
|
19
51
|
|
|
20
|
-
you are signed in.
|
|
21
|
-
cover most of the surface; for anything not listed,
|
|
22
|
-
\`pica_discover
|
|
52
|
+
you are signed in. ${toolCount} tools are available. fourteen core workflows
|
|
53
|
+
below cover most of the surface; for anything not listed, call
|
|
54
|
+
\`pica_discover({ query: "..." })\` to search by intent, or \`pica_discover()\`
|
|
55
|
+
with no arguments for the category map — then \`pica_tool_details\`.
|
|
23
56
|
|
|
24
57
|
## top workflows
|
|
25
58
|
|
|
@@ -118,7 +151,7 @@ generic identifier-assign verb — set the field on \`pica_works_update\`
|
|
|
118
151
|
/ \`pica_recordings_update\` / \`pica_people_update\` directly.
|
|
119
152
|
|
|
120
153
|
- **work identifiers** → \`pica_works_update\`: \`iswc\`, \`isrc\`,
|
|
121
|
-
\`tunecode\`, \`
|
|
154
|
+
\`tunecode\`, \`society_registrations\`, \`spotify_track_uri\`.
|
|
122
155
|
- **recording identifiers** → \`pica_recordings_update\`: \`isrc\`,
|
|
123
156
|
\`isrc_source\`, \`musicbrainz_recording_id\`, \`mlc_recording_id\`,
|
|
124
157
|
\`mlc_song_code\`, \`spotify_track_uri\`, \`spotify_track_id\`,
|
|
@@ -151,7 +184,7 @@ allow-list rejects the abbreviated forms:
|
|
|
151
184
|
|
|
152
185
|
### export works
|
|
153
186
|
- one of: \`pica_export_catalog_csv\` (per-work or per-batch — picks format pro / distributor / nro / sync-pdf, requires work_id or work_ids) /
|
|
154
|
-
\`pica_export_song_registration\` (catalog-wide
|
|
187
|
+
\`pica_export_song_registration\` (catalog-wide registration bundle for PRO/CMO — CSVs plus a CWR field-mapping guide, NOT a CWR file) /
|
|
155
188
|
\`pica_export_industry_ready\` (catalog-wide publisher / label / sync package) /
|
|
156
189
|
\`pica_export_catalog_asset_report\` (CAR — finance / insurance / diligence) /
|
|
157
190
|
\`pica_export_ai_consent\` (AI-consent matrix).
|
|
@@ -260,28 +293,86 @@ patterns help you find the right entity / gap / duplicate first.
|
|
|
260
293
|
each schema returns a json contract: required fields, recommended fields,
|
|
261
294
|
CHECK enum values, companion-call orchestration, and an example payload.
|
|
262
295
|
`;
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
296
|
+
}
|
|
297
|
+
/**
|
|
298
|
+
* One line of explanation per lobby tool. Keyed by tool name so the guide can
|
|
299
|
+
* render whatever subset a transport actually exposes; a name with no entry
|
|
300
|
+
* still renders (bare, no blurb) rather than vanishing from the list, because
|
|
301
|
+
* an unlisted callable tool is the failure mode this whole change is about.
|
|
302
|
+
*
|
|
303
|
+
* Every key must resolve to a real tool — `scripts/lint-agent-guide.ts` reads
|
|
304
|
+
* the `pica_*` tokens out of this file and checks them against ToolRegistry.
|
|
305
|
+
*/
|
|
306
|
+
const LOBBY_TOOL_BLURBS = {
|
|
307
|
+
pica_signup_start: "create a new organisation and get a magic link for first-time setup.",
|
|
308
|
+
pica_sign_in: "request a magic link for an existing user.",
|
|
309
|
+
pica_sign_out: "drop session.",
|
|
310
|
+
};
|
|
311
|
+
/** "one tool is" / "two tools are" / "17 tools are" — no bare digit for 1-10. */
|
|
312
|
+
const SPELLED = [
|
|
313
|
+
"zero",
|
|
314
|
+
"one",
|
|
315
|
+
"two",
|
|
316
|
+
"three",
|
|
317
|
+
"four",
|
|
318
|
+
"five",
|
|
319
|
+
"six",
|
|
320
|
+
"seven",
|
|
321
|
+
"eight",
|
|
322
|
+
"nine",
|
|
323
|
+
"ten",
|
|
324
|
+
];
|
|
325
|
+
function countPhrase(n) {
|
|
326
|
+
const word = n < SPELLED.length ? SPELLED[n] : String(n);
|
|
327
|
+
return n === 1 ? `${word} tool is` : `${word} tools are`;
|
|
328
|
+
}
|
|
329
|
+
/**
|
|
330
|
+
* The lobby guide, served when there is no authenticated client.
|
|
331
|
+
*
|
|
332
|
+
* @param lobbyToolNames The tools THIS caller can actually call right now, in
|
|
333
|
+
* the order they should be read. Names, not a count: the two transports
|
|
334
|
+
* expose different sets. stdio lists all three registered lobby tools;
|
|
335
|
+
* the HTTP lobby (`app/api/mcp/route.ts`, `lobbyToolNames`) filters to
|
|
336
|
+
* `audiences ∋ "lobby"` and only `pica_signup_start` declares it, so the
|
|
337
|
+
* sign-in pair is not callable there. The guide previously hardcoded
|
|
338
|
+
* "three tools" plus all three names, so two thirds of the HTTP lobby's
|
|
339
|
+
* instructions named tools that would be refused.
|
|
340
|
+
* @param unlockedToolCount The count of catalogue tools an AUTHENTICATED
|
|
341
|
+
* client would reach — the sentence it lands in is "what unlocks after
|
|
342
|
+
* sign-in", so it is deliberately NOT `lobbyToolNames.length`.
|
|
343
|
+
*/
|
|
344
|
+
export function buildAgentGuideLobby(lobbyToolNames, unlockedToolCount) {
|
|
345
|
+
const toolLines = lobbyToolNames
|
|
346
|
+
.map((name) => {
|
|
347
|
+
const blurb = LOBBY_TOOL_BLURBS[name];
|
|
348
|
+
return blurb ? `- \`${name}\` — ${blurb}` : `- \`${name}\``;
|
|
349
|
+
})
|
|
350
|
+
.join("\n");
|
|
351
|
+
// Name the tools the caller has, in the order given. With one tool there is
|
|
352
|
+
// no "or".
|
|
353
|
+
const callStep = lobbyToolNames.length
|
|
354
|
+
? lobbyToolNames.map((n) => `\`${n}\``).join(" or ")
|
|
355
|
+
: "the lobby tool listed above";
|
|
356
|
+
return `# pica — sign in to begin
|
|
357
|
+
|
|
358
|
+
you are in lobby mode. ${countPhrase(lobbyToolNames.length)} available; the rest
|
|
359
|
+
unlock after sign-in.
|
|
267
360
|
|
|
268
361
|
## lobby tools
|
|
269
|
-
|
|
270
|
-
for first-time setup.
|
|
271
|
-
- \`pica_sign_in\` — request a magic link for an existing user.
|
|
272
|
-
- \`pica_sign_out\` — drop session.
|
|
362
|
+
${toolLines}
|
|
273
363
|
|
|
274
364
|
## to sign in
|
|
275
365
|
1. ask the user for an email address.
|
|
276
|
-
2. call
|
|
366
|
+
2. call ${callStep}.
|
|
277
367
|
3. user clicks the magic link. on the next request, the catalog tool
|
|
278
368
|
surface unlocks automatically — no config to refresh.
|
|
279
369
|
|
|
280
370
|
## what unlocks after sign-in
|
|
281
|
-
|
|
371
|
+
${unlockedToolCount} tools across catalog (works, recordings, people, credits, sessions,
|
|
282
372
|
splits), enrichment, exports, agreements, multimedia, analytics, and
|
|
283
373
|
audio. fourteen required-fields schema resources at
|
|
284
374
|
\`pica://schemas/<workflow>-required\`.
|
|
285
375
|
the full agent-guide replaces this lobby content.
|
|
286
376
|
`;
|
|
377
|
+
}
|
|
287
378
|
//# sourceMappingURL=agent-guide.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-guide.js","sourceRoot":"","sources":["../../src/resources/agent-guide.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAE7D
|
|
1
|
+
{"version":3,"file":"agent-guide.js","sourceRoot":"","sources":["../../src/resources/agent-guide.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAE7D;;;;;;;;;;;;;;;;;;;GAmBG;AAEH;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,UAAU,4BAA4B,CAAC,SAAiB;IAC5D,OAAO;;;;;;qBAMY,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmP7B,CAAC;AACF,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,iBAAiB,GAA2B;IAChD,iBAAiB,EACf,sEAAsE;IACxE,YAAY,EAAE,4CAA4C;IAC1D,aAAa,EAAE,eAAe;CAC/B,CAAC;AAEF,iFAAiF;AACjF,MAAM,OAAO,GAAG;IACd,MAAM;IACN,KAAK;IACL,KAAK;IACL,OAAO;IACP,MAAM;IACN,MAAM;IACN,KAAK;IACL,OAAO;IACP,OAAO;IACP,MAAM;IACN,KAAK;CACN,CAAC;AACF,SAAS,WAAW,CAAC,CAAS;IAC5B,MAAM,IAAI,GAAG,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;IACzD,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI,UAAU,CAAC,CAAC,CAAC,GAAG,IAAI,YAAY,CAAC;AAC3D,CAAC;AAED;;;;;;;;;;;;;;GAcG;AACH,MAAM,UAAU,oBAAoB,CAClC,cAAwB,EACxB,iBAAyB;IAEzB,MAAM,SAAS,GAAG,cAAc;SAC7B,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;QACZ,MAAM,KAAK,GAAG,iBAAiB,CAAC,IAAI,CAAC,CAAC;QACtC,OAAO,KAAK,CAAC,CAAC,CAAC,OAAO,IAAI,QAAQ,KAAK,EAAE,CAAC,CAAC,CAAC,OAAO,IAAI,IAAI,CAAC;IAC9D,CAAC,CAAC;SACD,IAAI,CAAC,IAAI,CAAC,CAAC;IACd,4EAA4E;IAC5E,WAAW;IACX,MAAM,QAAQ,GAAG,cAAc,CAAC,MAAM;QACpC,CAAC,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC;QACpD,CAAC,CAAC,6BAA6B,CAAC;IAClC,OAAO;;yBAEgB,WAAW,CAAC,cAAc,CAAC,MAAM,CAAC;;;;EAIzD,SAAS;;;;UAID,QAAQ;;;;;EAKhB,iBAAiB;;;;;CAKlB,CAAC;AACF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/resources/index.ts"],"names":[],"mappings":"AAEA;;;GAGG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/resources/index.ts"],"names":[],"mappings":"AAEA;;;GAGG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAa/C,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAM5C,MAAM,WAAW,kBAAkB;IACjC,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,eAAe;IAC9B,QAAQ,EAAE,KAAK,CAAC;QACd,GAAG,EAAE,MAAM,CAAC;QACZ,QAAQ,EAAE,MAAM,CAAC;QACjB,IAAI,EAAE,MAAM,CAAC;KACd,CAAC,CAAC;CACJ;AAED,MAAM,MAAM,cAAc,GAAG,GAAG,CAAC;AA4EjC,qBAAa,gBAAgB;IAC3B,OAAO,CAAC,IAAI,CAAoB;IAChC,OAAO,CAAC,MAAM,CAAC,CAAe;IAC9B,OAAO,CAAC,MAAM,CAAiB;gBAEnB,IAAI,EAAE,UAAU,GAAG,IAAI,EAAE,MAAM,CAAC,EAAE,YAAY;IAM1D;;OAEG;IACH,aAAa,IAAI,kBAAkB,EAAE;IA6VrC;;OAEG;IACG,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC;IAgL7C;;;;;;;OAOG;IACH,OAAO,CAAC,iBAAiB;IAuDzB;;OAEG;IACH,OAAO,CAAC,cAAc;IA6BtB;;OAEG;YACW,YAAY;IA4B1B;;OAEG;YACW,aAAa;IA4B3B;;OAEG;YACW,iBAAiB;IA2B/B;;OAEG;YACW,eAAe;IAoD7B;;OAEG;YACW,gBAAgB;IAc9B;;OAEG;YACW,mBAAmB;IAcjC;;OAEG;YACW,eAAe;CAa9B"}
|
package/dist/resources/index.js
CHANGED
|
@@ -4,13 +4,84 @@ import { readFileSync } from "fs";
|
|
|
4
4
|
import { join } from "path";
|
|
5
5
|
import { WITHPICA_PRIMER } from "./llms-primer.js";
|
|
6
6
|
import { WELCOME_MARKDOWN } from "./welcome.js";
|
|
7
|
-
import {
|
|
7
|
+
import { buildAgentGuideAuthenticated, buildAgentGuideLobby, } from "./agent-guide.js";
|
|
8
|
+
import { ToolRegistry } from "../tools/index.js";
|
|
8
9
|
import { REQUIRED_SCHEMAS } from "./required-schemas.generated.js";
|
|
9
10
|
import { SkillsRegistry } from "../skills/index.js";
|
|
10
11
|
import { UPLOAD_HTML } from "../apps/upload.js";
|
|
11
12
|
import { DOWNLOAD_HTML } from "../apps/download.js";
|
|
12
13
|
import { RELEASE_HTML } from "../apps/release.js";
|
|
13
14
|
import { PICA_STORAGE_CONNECT_DOMAINS } from "../apps/shared.js";
|
|
15
|
+
/**
|
|
16
|
+
* How many tools an authenticated client sees in `tools/list`.
|
|
17
|
+
*
|
|
18
|
+
* Read off ToolRegistry rather than written down. The agent guide used to
|
|
19
|
+
* carry the number as a literal and it rotted — "~232 tools" against a
|
|
20
|
+
* registry advertising 329 (2026-08-24). `listTools()` already excludes
|
|
21
|
+
* deprecated aliases, which is the same definition `MCP_TOOL_COUNT` in
|
|
22
|
+
* `lib/constants/mcp-surface.ts` uses.
|
|
23
|
+
*
|
|
24
|
+
* `lobbyMode` and `discoveryMode` are forced off for the count: under
|
|
25
|
+
* layered discovery `tools/list` returns only the five meta tools, but the
|
|
26
|
+
* guide is describing the catalog reachable THROUGH `pica_discover`, not
|
|
27
|
+
* that shortlist. Registration is a pure in-memory pass (no I/O), and the
|
|
28
|
+
* result is memoised, so a guide read costs one registration per process.
|
|
29
|
+
*
|
|
30
|
+
* Asserted by `src/__tests__/resources/agent-guide.test.ts`.
|
|
31
|
+
*/
|
|
32
|
+
let memoisedToolCount = null;
|
|
33
|
+
function advertisedToolCount(config) {
|
|
34
|
+
if (memoisedToolCount !== null)
|
|
35
|
+
return memoisedToolCount;
|
|
36
|
+
const countingConfig = {
|
|
37
|
+
picaApiKey: "",
|
|
38
|
+
picaApiUrl: "",
|
|
39
|
+
serverName: "pica-mcp",
|
|
40
|
+
version: "0.0.0",
|
|
41
|
+
debug: false,
|
|
42
|
+
credentialsPath: "",
|
|
43
|
+
...config,
|
|
44
|
+
lobbyMode: false,
|
|
45
|
+
discoveryMode: false,
|
|
46
|
+
};
|
|
47
|
+
// Registration only reads the client's shape, never calls it — an empty
|
|
48
|
+
// object registers the same tools a live client would.
|
|
49
|
+
const registry = new ToolRegistry({}, countingConfig);
|
|
50
|
+
memoisedToolCount = registry.listTools().length;
|
|
51
|
+
return memoisedToolCount;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* The tools a LOBBY caller on this transport can actually call.
|
|
55
|
+
*
|
|
56
|
+
* Read off a lobby ToolRegistry rather than written down, for the same reason
|
|
57
|
+
* the count above is: the guide used to hardcode "three tools" and name all
|
|
58
|
+
* three, which was right for stdio and wrong for the HTTP lobby, where the
|
|
59
|
+
* sign-in pair declares `audiences: ["stdio"]` and is not offered. This
|
|
60
|
+
* registry is built with `lobbyMode: true`, so registration stops after the
|
|
61
|
+
* auth + signup tools; `listTools()` then applies the same alias/deprecation
|
|
62
|
+
* filter every other listing does.
|
|
63
|
+
*
|
|
64
|
+
* ⚠️ NOT memoised, unlike the count: the answer depends on the config passed
|
|
65
|
+
* in, and a memoised first caller would decide it for every later one.
|
|
66
|
+
* Registration is a pure in-memory pass, so this is cheap.
|
|
67
|
+
*
|
|
68
|
+
* Asserted by `src/__tests__/resources/agent-guide.test.ts`.
|
|
69
|
+
*/
|
|
70
|
+
function lobbyToolNames(config) {
|
|
71
|
+
const lobbyConfig = {
|
|
72
|
+
picaApiKey: "",
|
|
73
|
+
picaApiUrl: "",
|
|
74
|
+
serverName: "pica-mcp",
|
|
75
|
+
version: "0.0.0",
|
|
76
|
+
debug: false,
|
|
77
|
+
credentialsPath: "",
|
|
78
|
+
...config,
|
|
79
|
+
lobbyMode: true,
|
|
80
|
+
discoveryMode: false,
|
|
81
|
+
};
|
|
82
|
+
const registry = new ToolRegistry(null, lobbyConfig);
|
|
83
|
+
return registry.listTools().map((t) => t.name);
|
|
84
|
+
}
|
|
14
85
|
export class ResourceRegistry {
|
|
15
86
|
pica;
|
|
16
87
|
config;
|
|
@@ -95,6 +166,11 @@ export class ResourceRegistry {
|
|
|
95
166
|
name: "Skill — log-a-session",
|
|
96
167
|
description: "Capture a studio session conversationally — what was made, when, where, who was there, what happened.",
|
|
97
168
|
mimeType: "text/markdown",
|
|
169
|
+
}, {
|
|
170
|
+
uri: "skill://withpica/log-a-show/SKILL.md",
|
|
171
|
+
name: "Skill — log-a-show",
|
|
172
|
+
description: "Capture a live show or a tour credit conversationally — where, when, who played, what was in the set.",
|
|
173
|
+
mimeType: "text/markdown",
|
|
98
174
|
}, {
|
|
99
175
|
uri: "skill://withpica/enrich-from-peer-mcps/SKILL.md",
|
|
100
176
|
name: "Skill — enrich-from-peer-mcps",
|
|
@@ -290,12 +366,15 @@ export class ResourceRegistry {
|
|
|
290
366
|
};
|
|
291
367
|
case "pica://docs/agent-guide": {
|
|
292
368
|
const lobby = this.config?.lobbyMode || !this.pica;
|
|
369
|
+
const toolCount = advertisedToolCount(this.config);
|
|
293
370
|
return {
|
|
294
371
|
contents: [
|
|
295
372
|
{
|
|
296
373
|
uri: "pica://docs/agent-guide",
|
|
297
374
|
mimeType: "text/markdown",
|
|
298
|
-
text: lobby
|
|
375
|
+
text: lobby
|
|
376
|
+
? buildAgentGuideLobby(lobbyToolNames(this.config), toolCount)
|
|
377
|
+
: buildAgentGuideAuthenticated(toolCount),
|
|
299
378
|
},
|
|
300
379
|
],
|
|
301
380
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/resources/index.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAQ7D,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,IAAI,CAAC;AAClC,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,EAAE,yBAAyB,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAChF,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AACnE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C,CAAC;iBACvC;aACF;SACF,CAAC;IACJ,CAAC;IAED;;OAEG;IACK,KAAK,CAAC,eAAe;QAC3B,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,IAAK,CAAC,SAAS,CAAC,eAAe,CAAC,EAAE,CAAC,CAAC;QAE9D,OAAO;YACL,QAAQ,EAAE;gBACR;oBACE,GAAG,EAAE,iBAAiB;oBACtB,QAAQ,EAAE,kBAAkB;oBAC5B,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC;iBACtC;aACF;SACF,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const WITHPICA_PRIMER = "# PICA \u2014 Music Catalog Management Platform\n\nPICA helps music creators and publishers manage their catalog metadata,\ntrack royalties, and prepare works for registration with collection societies.\n\n## Core Entities\n\n### Work\nA musical composition (song, piece, library track). The central entity.\n- Has: title, ISWC, work_type (song/library/demo), genre, mood, BPM, key\n- Relationships: has many credits (writers/composers), has many recordings,\n has many agreements, may have audio files, may have multimedia\n- Identifiers: ISWC (global), Tunecode (PRS), CAE/IPI (writer)\n\n### Person\nA human involved in music \u2014 writer, composer, performer, producer, publisher.\n- Has: name, email, IPI number, ISNI, MusicBrainz ID, PRO affiliation\n- Relationships: credited on many works, may have recordings, may have agreements\n- Can be enriched via: ISNI, MusicBrainz, Wikidata\n\n### Recording\nA specific audio capture of a work \u2014 the master/sound recording side.\n- Has: title, ISRC, duration, artist, label\n- Relationships: belongs to one work, has credits (performers/producers)\n- Distinct from the work: a work is the composition, a recording is the performance\n\n### Agreement\nA contract governing rights to works \u2014 publishing, sync, distribution.\n- Has: title, type, parties, dates, territory, terms\n- Relationships: covers many works\n- Types: publishing_admin, co_publishing, master_recording, sub_publishing,\n admin_only, distribution, library_music, production, artist_contract,\n termination, report, other\n\n### Import Document\nA canonical representation of an ingested file (royalty statement, CSV import).\n- Has: source (16 formats \u2014 PROs: PRS, ASCAP, BMI, SESAC, SOCAN, APRA, GEMA, SACEM; NROs: PPL, SoundExchange, GVL; Mechanical: MCPS; Distributors: DistroKid, TuneCore, CD Baby; Revenue: YouTube Content ID), period, line items, field mappings, warnings\n- Immutable snapshot of the import event \u2014 not a live view\n- Use
|
|
1
|
+
export declare const WITHPICA_PRIMER = "# PICA \u2014 Music Catalog Management Platform\n\nPICA helps music creators and publishers manage their catalog metadata,\ntrack royalties, and prepare works for registration with collection societies.\n\n## Core Entities\n\n### Work\nA musical composition (song, piece, library track). The central entity.\n- Has: title, ISWC, work_type (song/library/demo), genre, mood, BPM, key\n- Relationships: has many credits (writers/composers), has many recordings,\n has many agreements, may have audio files, may have multimedia\n- Identifiers: ISWC (global), Tunecode (PRS), CAE/IPI (writer)\n\n### Person\nA human involved in music \u2014 writer, composer, performer, producer, publisher.\n- Has: name, email, IPI number, ISNI, MusicBrainz ID, PRO affiliation\n- Relationships: credited on many works, may have recordings, may have agreements\n- Can be enriched via: ISNI, MusicBrainz, Wikidata\n\n### Recording\nA specific audio capture of a work \u2014 the master/sound recording side.\n- Has: title, ISRC, duration, artist, label\n- Relationships: belongs to one work, has credits (performers/producers)\n- Distinct from the work: a work is the composition, a recording is the performance\n\n### Agreement\nA contract governing rights to works \u2014 publishing, sync, distribution.\n- Has: title, type, parties, dates, territory, terms\n- Relationships: covers many works\n- Types: publishing_admin, co_publishing, master_recording, sub_publishing,\n admin_only, distribution, library_music, production, artist_contract,\n termination, report, other\n\n### Import Document\nA canonical representation of an ingested file (royalty statement, CSV import).\n- Has: source (16 formats \u2014 PROs: PRS, ASCAP, BMI, SESAC, SOCAN, APRA, GEMA, SACEM; NROs: PPL, SoundExchange, GVL; Mechanical: MCPS; Distributors: DistroKid, TuneCore, CD Baby; Revenue: YouTube Content ID), period, line items, field mappings, warnings\n- Immutable snapshot of the import event \u2014 not a live view\n- Use pica_import_documents_query to find them, pica_import_documents_inspect to read\n\n## First Connection\n\nIf you're connecting to this workspace for the first time or don't know where to start,\ninvoke the **workspace-autopilot** prompt. It reads the workspace state and routes you\nto the most valuable workflow automatically.\n\n## Recommended Workflows\n\n1. **Catalog audit**: pica_catalog_stats \u2192 pica_works_query({ health_filter: \"needs_attention\" }) \u2192 pica_works_inspect({ sections: [\"completeness\"] })\n2. **Enrichment**: pica_enrichment_candidates \u2192 pica_resolve_work (fans out across Spotify/MLC/MusicBrainz/etc.) \u2192 pica_works_inspect (verify)\n3. **Statement reconciliation**: pica_import_documents_query \u2192 pica_import_documents_inspect({ sections: [\"diff\"] })\n4. **Duplicate cleanup**: pica_find_duplicates \u2192 review \u2192 pica_merge_duplicates\n5. **Registration readiness**: pica_works_inspect({ sections: [\"registration\"] }) \u2192 fix gaps \u2192 pica_export_song_registration\n\n## Key Concepts\n\n- **Organisation**: Multi-tenant \u2014 all data scoped to one org. Never cross org boundaries.\n- **PICA Score**: Composite catalog legibility index (0-100, grade A-F). Four pillars:\n identification, documentation, registration, completeness.\n- **Enrichment cascade**: When an identifier is added, external sources\n (MusicBrainz, ISNI, MLC) are queried automatically to fill gaps.\n- **Credits**: Work credits (writers/composers with splits) are distinct from\n recording credits (performers/producers). Different tables, different role enums.\n Work credit roles: writer, composer, arranger, lyricist, producer, performer.\n Recording credit roles: Writer, Composer, Producer, Performer (PascalCase).\n";
|
|
2
2
|
//# sourceMappingURL=llms-primer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"llms-primer.d.ts","sourceRoot":"","sources":["../../src/resources/llms-primer.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,eAAe,
|
|
1
|
+
{"version":3,"file":"llms-primer.d.ts","sourceRoot":"","sources":["../../src/resources/llms-primer.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,eAAe,+qHAiE3B,CAAC"}
|
|
@@ -37,7 +37,7 @@ A contract governing rights to works — publishing, sync, distribution.
|
|
|
37
37
|
A canonical representation of an ingested file (royalty statement, CSV import).
|
|
38
38
|
- Has: source (16 formats — PROs: PRS, ASCAP, BMI, SESAC, SOCAN, APRA, GEMA, SACEM; NROs: PPL, SoundExchange, GVL; Mechanical: MCPS; Distributors: DistroKid, TuneCore, CD Baby; Revenue: YouTube Content ID), period, line items, field mappings, warnings
|
|
39
39
|
- Immutable snapshot of the import event — not a live view
|
|
40
|
-
- Use
|
|
40
|
+
- Use pica_import_documents_query to find them, pica_import_documents_inspect to read
|
|
41
41
|
|
|
42
42
|
## First Connection
|
|
43
43
|
|
|
@@ -154,14 +154,14 @@ export declare const REQUIRED_SCHEMAS: {
|
|
|
154
154
|
};
|
|
155
155
|
readonly "export-required": {
|
|
156
156
|
readonly workflow: "export-required";
|
|
157
|
-
readonly summary: "Generate exports of works in formats matching the destination — pica_export_catalog_csv emits per-work or per-batch industry submission files (pro / distributor / nro / sync-pdf), pica_export_song_registration
|
|
157
|
+
readonly summary: "Generate exports of works in formats matching the destination — pica_export_catalog_csv emits per-work or per-batch industry submission files (pro / distributor / nro / sync-pdf), pica_export_song_registration bundles CSV/JSON/PDF plus a CWR field-mapping guide for PRO registration (a mapping guide, NOT a CWR file — PICA has no CWR emitter), pica_export_industry_ready packages metadata for publishers/labels/sync, pica_export_catalog_asset_report (CAR) bundles diligence/finance evidence, pica_export_ai_consent emits per-work + per-contributor AI declaration matrices. Four diligence documents complete the set: pica_export_snapshot (owner-facing, what to fix next), pica_export_ownership_record (the register of who owns what), pica_export_rights_proof (the evidence behind that register), pica_export_diligence_pack (readiness for registration or sale).";
|
|
158
158
|
readonly primary_tool: "pica_export_catalog_csv";
|
|
159
159
|
readonly primary_required: readonly ["format"];
|
|
160
160
|
readonly primary_recommended: readonly ["work_id", "work_ids"];
|
|
161
161
|
readonly enums: {};
|
|
162
162
|
readonly companion_calls: readonly [{
|
|
163
163
|
readonly tool: "pica_export_song_registration";
|
|
164
|
-
readonly when: "
|
|
164
|
+
readonly when: "Song-registration bundle for PRO/CMO submission — CSVs plus a CWR field-mapping guide, not a CWR file. Billing-gated.";
|
|
165
165
|
readonly required: readonly [];
|
|
166
166
|
}, {
|
|
167
167
|
readonly tool: "pica_export_industry_ready";
|
|
@@ -255,12 +255,7 @@ export declare const REQUIRED_SCHEMAS: {
|
|
|
255
255
|
readonly enums: {
|
|
256
256
|
readonly role: readonly ["Arranger", "Co-Producer", "Engineer", "Executive Producer", "FeaturedArtist", "Instrumentalist", "MainArtist", "Mastering Engineer", "Mixer", "Other", "Performer", "Producer", "Programmer", "Recording Engineer", "Remixer", "Vocalist"];
|
|
257
257
|
};
|
|
258
|
-
readonly companion_calls: readonly [
|
|
259
|
-
readonly tool: "pica_recording_credits_bulk_update";
|
|
260
|
-
readonly when: "Deprecated alias of pica_recording_credits_update — retained until removal so existing callers keep working. The batch capability (one call with release_id or recording_ids plus a credits[] batch, instead of one call per recording per role — existing (credited_name, role) rows are skipped, dry_run previews) now lives on the primary tool directly. The alias advertises the canonical's multi-mode schema (required: []); pass credits[] for the batch it exists for.";
|
|
261
|
-
readonly required: readonly [];
|
|
262
|
-
readonly per_row_required: readonly ["credited_name", "role"];
|
|
263
|
-
}];
|
|
258
|
+
readonly companion_calls: readonly [];
|
|
264
259
|
readonly example: {
|
|
265
260
|
readonly recording_id: "<uuid>";
|
|
266
261
|
readonly credited_name: "The Riverbed Trio";
|
|
@@ -285,10 +280,6 @@ export declare const REQUIRED_SCHEMAS: {
|
|
|
285
280
|
readonly tool: "pica_recordings_update";
|
|
286
281
|
readonly when: "After creation — to amend recording_title, artist_name, version_type, isrc, duration_ms, or any other inline field. Same payload shape as create plus `id`.";
|
|
287
282
|
readonly required: readonly ["id"];
|
|
288
|
-
}, {
|
|
289
|
-
readonly tool: "pica_recording_credits_bulk_update";
|
|
290
|
-
readonly when: "Deprecated alias of pica_recording_credits_update — retained until removal so existing callers keep working; the batch capability now lives in the primary tool's credits[] form. The alias advertises the canonical's multi-mode schema (required: []); pass credits[] for the batch it exists for.";
|
|
291
|
-
readonly required: readonly [];
|
|
292
283
|
}];
|
|
293
284
|
readonly example: {
|
|
294
285
|
readonly title: "Midnight Rivers (Master)";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"required-schemas.generated.d.ts","sourceRoot":"","sources":["../../src/resources/required-schemas.generated.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,gBAAgB
|
|
1
|
+
{"version":3,"file":"required-schemas.generated.d.ts","sourceRoot":"","sources":["../../src/resources/required-schemas.generated.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmlCnB,CAAC;AAEX,MAAM,MAAM,iBAAiB,GAAG,MAAM,OAAO,gBAAgB,CAAC"}
|