@withpica/mcp-server 2.49.0 → 2.51.0
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 +16 -0
- package/dist/apps/generated/shared-bundle.d.ts +1 -1
- package/dist/apps/generated/shared-bundle.d.ts.map +1 -1
- package/dist/apps/generated/shared-bundle.js +1 -1
- package/dist/apps/generated/shared-bundle.js.map +1 -1
- package/dist/prompts/creator-question-atlas.d.ts.map +1 -1
- package/dist/prompts/creator-question-atlas.js +32 -0
- package/dist/prompts/creator-question-atlas.js.map +1 -1
- package/dist/resources/index.d.ts +10 -0
- package/dist/resources/index.d.ts.map +1 -1
- package/dist/resources/index.js +134 -1
- package/dist/resources/index.js.map +1 -1
- package/dist/server-instructions.d.ts +4 -3
- package/dist/server-instructions.d.ts.map +1 -1
- package/dist/server-instructions.js +4 -1
- package/dist/server-instructions.js.map +1 -1
- package/dist/skills/index.d.ts +42 -0
- package/dist/skills/index.d.ts.map +1 -0
- package/dist/skills/index.js +59 -0
- package/dist/skills/index.js.map +1 -0
- package/dist/skills/skills.generated.d.ts +25 -0
- package/dist/skills/skills.generated.d.ts.map +1 -0
- package/dist/skills/skills.generated.js +86 -0
- package/dist/skills/skills.generated.js.map +1 -0
- package/dist/tools/access-simulate.d.ts +23 -0
- package/dist/tools/access-simulate.d.ts.map +1 -0
- package/dist/tools/access-simulate.js +165 -0
- package/dist/tools/access-simulate.js.map +1 -0
- package/dist/tools/discovery.d.ts.map +1 -1
- package/dist/tools/discovery.js +17 -1
- package/dist/tools/discovery.js.map +1 -1
- package/dist/tools/index.d.ts +43 -2
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +99 -10
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/metadata.d.ts.map +1 -1
- package/dist/tools/metadata.js +26 -0
- package/dist/tools/metadata.js.map +1 -1
- package/dist/tools/recovery-hints.d.ts.map +1 -1
- package/dist/tools/recovery-hints.js +3 -0
- package/dist/tools/recovery-hints.js.map +1 -1
- package/dist/tools/releases.d.ts.map +1 -1
- package/dist/tools/releases.js +13 -0
- package/dist/tools/releases.js.map +1 -1
- package/dist/tools/share-send.d.ts +28 -0
- package/dist/tools/share-send.d.ts.map +1 -0
- package/dist/tools/share-send.js +131 -0
- package/dist/tools/share-send.js.map +1 -0
- package/dist/tools/skills.d.ts +25 -0
- package/dist/tools/skills.d.ts.map +1 -0
- package/dist/tools/skills.js +144 -0
- package/dist/tools/skills.js.map +1 -0
- package/dist/tools/works.d.ts.map +1 -1
- package/dist/tools/works.js +13 -0
- package/dist/tools/works.js.map +1 -1
- package/package.json +6 -5
- package/scripts/build-skills.ts +229 -0
- package/server.json +2 -2
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
// Copyright (c) 2024-2026 Withpica Ltd. All rights reserved.
|
|
2
|
+
export const SKILLS = {
|
|
3
|
+
"audit-credits": {
|
|
4
|
+
name: "audit-credits",
|
|
5
|
+
description: "Sweep across the catalog for PUBLISHING-SIDE credit gaps and split issues — writer credits on works (composer / lyricist / arranger / publisher), splits not totalling 100%, people without IPI / ISNI identifiers, generic role assignments. Does NOT cover master-side / recording splits — use set-recording-splits per-recording for that. Companion to catalog-audit.",
|
|
6
|
+
triggers: ["audit my credits", "check my splits", "find credit gaps", "which writers are missing identifiers", "splits health check"],
|
|
7
|
+
audience: "publisher / manager / admin",
|
|
8
|
+
tools_required: ["pica_works_query", "pica_credits_list", "pica_people_query", "pica_resolve_person"],
|
|
9
|
+
output: "Summary statistics (% of works with credits, average collaborators per work) + ranked list of works with no credits + works with split issues + people who should be enriched with external identifiers + recommendations.",
|
|
10
|
+
body: "# audit-credits\n\nRun a **publishing-side** credits-and-splits health sweep across the catalog. Where `catalog-audit` covers the whole picture, this skill drills into the people-and-shares layer — the bit where royalty leak happens most often.\n\n**Scope (load-bearing):** this skill audits **writer credits on works** — composer / lyricist / arranger / publisher percentages that sum to 100% for collection-society payout. The **master-ownership splits on recordings** (artist / producer / label / featured) are a separate domain handled per-recording by `set-recording-splits` — they live on a different table, route to different payouts (label distributor / RIAA neighbouring rights vs PROs), and a catalog-wide audit of those is currently a Stage 2 gap. If the user asks \"are my master splits healthy?\" don't pretend this skill covers it — point them at `set-recording-splits` per-recording and acknowledge the audit gap.\n\n## Pre-flight\n\nIf the audit ends with proposed writes (adding a missing credit, fixing a split), read `pica://schemas/work-credits-required` first — the canonical shape for `pica_credits_update` rows (writer role, splits totalling 100%).\n\n## Step 1 — Sample the catalog\n\nCall `pica_works_query` to get the works. For a small catalog (<100 works), check all. For larger catalogs, sample at least 20 recent works to keep the audit responsive — the user can re-run on a different slice.\n\n## Step 2 — Per-work credit check\n\nFor each sampled work, call `pica_credits_list`. Look for the five common problems:\n\n1. **No credits at all** — the work exists but no writers, composers, or publishers are attached. Highest priority — the work is effectively un-payable.\n2. **Splits don't total 100%** — writer credits exist but the percentages don't sum correctly. PROs will reject registration.\n3. **Only one credited person** — works are usually collaborations. A single-writer work is fine when accurate, but worth flagging in case a co-writer was forgotten.\n4. **Generic roles** — credits with just `writer` (vs the more specific `composer` / `lyricist` / `arranger`). Less critical, but matters for some PROs and for sync licensing.\n5. **People missing IPI / ISNI** — a writer credited on a work, but their person record lacks the IPI / ISNI identifier. Royalties can't route to them.\n\n## Step 3 — Cross-reference people\n\nFor the people credited across the sampled works (call `pica_people_query`):\n\n- How many have an IPI? (needed for PRO payouts)\n- How many have an ISNI? (useful for cross-reference, less critical)\n- Do the same person's roles look consistent across their works? (a producer credited as `writer` on one work and `producer` on another may be a data-entry mistake)\n\nIf a credited person is missing identifiers, suggest `pica_resolve_person` to attempt enrichment from public sources. Treat the resolver as a black box — it returns proposals, the user reviews them.\n\n## Step 4 — Report\n\nProduce in this order:\n\n1. **Headline stats** — \"X% of works have credits, average Y collaborators per work, Z splits issues across the sample\"\n2. **Works with no credits at all** — the highest-priority list. These are the immediate fixes.\n3. **Works with split issues** — splits not totalling 100%, ranked by which works are highest-value (recent, registered, frequently played)\n4. **People without IPI** — names + how many works they're credited on (more works = bigger royalty leak)\n5. **Recommendations** — the 3-5 highest-leverage fixes, ordered by effort-to-impact ratio\n\n## Step 5 — Offers\n\n- \"Want me to walk through fixing one of the no-credits works?\" → routes to `close-the-loop` for that work\n- \"Want me to enrich the writers missing IPI from public sources?\" → `pica_resolve_person` for each\n- \"Want me to export a list for offline review?\" → optional CSV-style summary\n\n## What not to do\n\n- Don't auto-write credits — every credit is a user decision (who wrote what, what %)\n- Don't apply enrichment proposals without user review\n- Don't try to reconcile split issues by guessing the \"correct\" split. The user has to confirm what the actual agreement was.\n- Don't quote internal source-weighting or cascade logic when suggesting enrichment — treat `pica_resolve_person` as a black box that returns proposals\n- Don't speculate about what an unknown person's IPI is. Empty is empty.\n\n## Follow-on skills\n\n- `close-the-loop` — pick a specific gap-heavy work to fix\n- `register-my-works` — once credits are clean, registration is unblocked\n- `set-recording-splits` — credits cover publishing (writer side); master ownership is a separate layer\n",
|
|
11
|
+
},
|
|
12
|
+
"catalog-audit": {
|
|
13
|
+
name: "catalog-audit",
|
|
14
|
+
description: "Audit a music catalog for completeness, quality, and registration readiness using PICA's MCP tools. Produces a structured report with statistics, gap analysis, and prioritised improvement actions.",
|
|
15
|
+
triggers: ["audit my catalog", "how's my catalog doing", "catalog health", "what needs fixing", "assess my catalog"],
|
|
16
|
+
audience: "manager / label / artist",
|
|
17
|
+
tools_required: ["pica_dashboard_briefing", "pica_works_inspect", "pica_works_query", "pica_catalog_stats", "pica_find_duplicates"],
|
|
18
|
+
output: "Plain-language health summary (suitable for a non-technical stakeholder) + top 3 highest-impact improvements with specific steps + post-fix score estimate + any urgent issues.",
|
|
19
|
+
body: "# catalog-audit\n\nAudit a music catalog for completeness, quality, and registration readiness. Use this when a user asks \"how's my catalog doing,\" \"what needs fixing,\" or wants a health check before a release / sync push / sale.\n\n## Step 1 — Orient\n\nCall `pica_dashboard_briefing` first. The briefing returns a single compressed snapshot of catalog state (counts, recent activity, upcoming deadlines, top priorities). This is the cheapest first call and sets the routing decision for everything that follows.\n\n## Step 2 — Pull the PICA Score\n\nCall `pica_works_inspect` with `sections: [\"score\"]` on a representative work, or read the `catalog://health` resource. The score is a 0-100 composite across four pillars (income, ownership, asset, verification). The pillar with the lowest score is the audit's primary subject.\n\nDo NOT speculate about how the score is calculated beyond what the tool returns. Treat it as a black box that reports a number and pillar breakdown.\n\n## Step 3 — Sample for quality\n\nCall `pica_works_query` with `health_filter: \"low_completeness\"` and pull up to 20 works. For a sample of those, call `pica_works_inspect` with `sections: [\"completeness\"]` to see per-work gaps.\n\nCommon patterns to look for (publishing side — writer credits on works):\n- Works with no credits at all\n- Works where writer splits don't total 100%\n- Works with no recordings\n- Recordings with no ISRC\n- People credited on works but missing IPI or ISNI\n\n**Recording-side / master-ownership health** (artist / producer / label splits) is a separate domain handled per-recording by `set-recording-splits` — not surfaced by the score pillars at present. If the user mentions producer points, label splits, or master royalties, flag that this audit doesn't cover them and point to `set-recording-splits` per-recording.\n\n## Step 4 — Duplicate sweep\n\nCall `pica_find_duplicates`. A clean catalog has zero or near-zero duplicate signals. High duplicate counts indicate an import that needs reconciliation before further work.\n\n## Step 5 — Report\n\nProduce three things, in this order:\n\n1. **One-paragraph plain-language summary.** Suitable for a non-technical stakeholder. Lead with \"your catalog has X works and is healthy / has gaps / needs attention\" — not raw numbers.\n2. **Top 3 improvements, prioritised by effort vs impact.** Each with the specific tool call that would address it (e.g. \"add IPI numbers to 12 writers — call `pica_people_query` filtered by `has_ipi: false`, then `pica_people_update` for each\").\n3. **Score forecast.** \"After those fixes, the score would likely rise from X to Y.\"\n\nIf urgent issues exist (e.g. missing ownership data on a work with active royalties, unverified works being licensed) flag them at the top.\n\n## What not to do\n\n- Don't run all sub-workflows at once. The audit is read-only — improvements are a separate user decision.\n- Don't recommend `pica_works_delete` or any destructive operation. The audit's job is to describe, not to mutate.\n- Don't quote raw `pica_works_query` results back at the user verbatim. Summarise.\n\n## Follow-on skills\n\nAfter the audit, the natural next skills are:\n- `register-my-works` if registration coverage is low\n- `prepare-for-sync` if sync-readiness is the user's goal\n- `close-the-loop` (prompt) if the user wants to fix specific works one at a time\n",
|
|
20
|
+
},
|
|
21
|
+
"close-the-loop": {
|
|
22
|
+
name: "close-the-loop",
|
|
23
|
+
description: "Walk through a single work's gaps one at a time, offering the specific tool call to fix each. The compounding daily-use skill — pair with catalog-audit (which finds gap-heavy works) to fix them.",
|
|
24
|
+
triggers: ["close the loop on this song", "what's missing on this work", "fix the gaps on this track", "finish this song", "complete this work"],
|
|
25
|
+
audience: "manager / songwriter / artist working on a specific catalog entry",
|
|
26
|
+
tools_required: ["pica_works_inspect", "pica_works_query", "pica_credits_list", "pica_credits_update", "pica_resolve_work", "pica_audio_presigned_upload", "pica_audio_analyze"],
|
|
27
|
+
output: "A conversational gap-fix loop — one gap surfaced at a time, with the specific tool offer to fix it. After each fix, the completeness score is re-checked so the user sees progress.",
|
|
28
|
+
body: "# close-the-loop\n\nWalk through a specific work's gaps one at a time. The user names the work (or you find a gap-heavy one); you find every missing piece and offer to fix each. Pair with `catalog-audit` (which identifies which works need this treatment) for the daily catalog-health flow.\n\nThis is a high-frequency skill — once a manager runs it, they tend to run it again the next day on a different work. Keep it tight and conversational, not a wall of analysis.\n\n## Pre-flight\n\nPer gap class, read the relevant schema resource before writing:\n- `pica://schemas/work-credits-required` — credits + splits\n- `pica://schemas/audio-upload-required` — master audio\n- `pica://schemas/enrichment-resolve-required` — ISWC / ISRC via resolve cascade\n\n## Step 1 — Pick the work\n\nTwo paths:\n- User names a work or gives an ID → use that\n- User says \"fix something\" → call `pica_works_query` with `health_filter: \"low_completeness\"` and offer the top 3. Let the user pick.\n\n## Step 2 — Pull the gap list\n\nFor the chosen work:\n- `pica_works_inspect` with `sections: [\"completeness\"]` — the full per-aspect gap analysis\n- `pica_credits_list` — current credits and splits state\n- `pica_works_inspect` with `sections: [\"enrichment\"]` — which external sources have been tried\n\nSurface the headline number (e.g. \"this work is 60% complete, 4 gaps remaining\"). Don't dump every gap at once.\n\n## Step 3 — Walk the gaps, one at a time\n\nFor each gap, offer the specific action and wait for the user. The most common gap classes:\n\n| Gap | Question + Tool |\n|---|---|\n| Missing credits | \"Who wrote this song?\" → `pica_credits_update` |\n| Splits don't total 100% | \"What's the split between the writers?\" → `pica_credits_update` |\n| No ISWC | \"Want me to check MLC for an ISWC?\" → `pica_resolve_work` with `sources: ['mlc']` |\n| No ISRC | \"Do you have a recording with an ISRC?\" → check recordings, or upload one |\n| No master audio | \"Got a master recording to upload?\" → `pica_audio_presigned_upload` |\n| Audio not analysed | \"Want me to analyse for BPM, key, and mood?\" → `pica_audio_analyze` |\n| No agreements | \"Is there a publishing agreement?\" → flag for `pica_agreements_create` workflow |\n| Not registered | \"Want me to check registration status?\" → `pica_works_inspect` with `sections: [\"registration\"]` |\n\nOrder matters: start with the gap that unblocks the others. Missing credits usually blocks everything else (a work without writers can't be registered, can't be paid out, can't be exported). After credits, ISWC/ISRC tend to be next.\n\n## Step 4 — Re-check after each fix\n\nAfter each successful write, call `pica_works_inspect` with `sections: [\"completeness\"]` again and report the new percentage. The visible-progress feedback is what makes this skill habit-forming.\n\nIf the user skips a gap (\"not ready\"), respect that and move on. Track skipped gaps so the next time the user runs this on the same work, you can re-offer (or honour the skip if they confirmed it as deliberate).\n\n## What not to do\n\n- Don't list all gaps at once — surface them one at a time. The whole point of \"close the loop\" is incremental.\n- Don't auto-fix without asking — every gap is an explicit offer + user confirmation\n- Don't badger on skipped gaps. The user skipped them for a reason.\n- Don't speculate about who wrote a song or what its ISWC is. If the user doesn't know, mark it for later and move on.\n\n## Follow-on skills\n\n- `register-my-works` — once a work is complete, registration is the natural next move\n- `prepare-for-sync` — completed works become candidates for sync placement\n- `set-recording-splits` — if a recording was uploaded as part of this loop, master ownership is the next gap\n- `audit-credits` — periodic cross-catalog credit health check\n",
|
|
29
|
+
},
|
|
30
|
+
"enrich-from-peer-mcps": {
|
|
31
|
+
name: "enrich-from-peer-mcps",
|
|
32
|
+
description: "Fill PICA catalog gaps by composing across the user's other connected MCPs (Gmail, Drive, Notion, Telegram, calendar, DAW). The cross-MCP integration workflow — PICA doesn't manage peer connections, but enrichment can consume sources cited from them via pica_enrichment_propose.",
|
|
33
|
+
triggers: ["fill the gaps from my email", "check my drive for missing info", "enrich from my notes", "cross-reference with my other tools", "use my other MCPs to fill in PICA"],
|
|
34
|
+
audience: "power user with multiple MCPs connected / agency / multi-artist manager",
|
|
35
|
+
tools_required: ["pica_works_inspect", "pica_works_query", "pica_enrichment_propose", "pica_enrichment_proposals_list"],
|
|
36
|
+
output: "pica_enrichment_proposals rows created with sources[].url citations from peer MCPs, ready for the user to review and apply via the existing enrichment-proposals workflow.",
|
|
37
|
+
body: "# enrich-from-peer-mcps\n\nFill PICA catalog gaps by composing across the user's other connected MCPs. This is the cross-MCP integration story for PICA — the user has Gmail or Drive or Notion connected in their AI client, the agent queries those tools when PICA shows missing data, and the resulting information lands in PICA as cited enrichment proposals.\n\n**Important framing:** PICA does NOT manage these connections. The user wires Gmail (etc.) into their AI client separately. PICA's role is to (1) signal what's missing, (2) accept enrichment proposals with `sources[].url` citations using the peer-MCP URI schemes, and (3) let the user review proposals before applying.\n\n## Pre-flight\n\nRead `pica://schemas/enrichment-resolve-required` for the canonical proposal shape, including the URI scheme convention for source citations. The scheme list (per ADR-193):\n\n| Scheme | What it cites |\n|---|---|\n| `gmail://` | An email or thread in the user's Gmail |\n| `gdrive://` | A document or file in the user's Google Drive |\n| `notion://` | A page in the user's Notion workspace |\n| `file://` | A local file on the user's machine |\n| `telegram://` | A message or thread in the user's Telegram |\n| `calendar://` | An event in the user's calendar |\n| `daw://` | A DAW session file (Ableton, Logic, Pro Tools, etc.) |\n| `user://` | The user told you directly (no external source) |\n| `web://` | A public web page |\n\nEach citation is opaque to PICA — PICA doesn't fetch the URI. It just records it as provenance so the user knows where the enrichment came from.\n\n## Step 1 — Identify the gap\n\nTwo entry paths:\n\n- **User-named work** — they said \"fill the gaps on track X from my email.\" Use `pica_works_inspect` with `sections: [\"completeness\", \"enrichment\"]` to see what's missing.\n- **Gap class across catalog** — they said \"what's missing across my catalog?\" Use `pica_works_query` with `health_filter: \"low_completeness\"` to find candidates, then `pica_works_inspect` per work.\n\nDon't try to query peer MCPs proactively for every gap. Start narrow — one work, or one gap class (e.g. \"all works missing ISWC\").\n\n## Step 2 — Map the gap to a peer MCP\n\nFor each gap, suggest the peer MCP that's likely to have the answer:\n\n| Gap | Likely peer MCP | What to look for |\n|---|---|---|\n| Missing splits | Gmail / Drive | Split sheets, email threads agreeing on percentages |\n| Missing ISWC | Gmail / Drive | PRO registration confirmation emails, MLC submissions |\n| Missing co-writer | Calendar / Gmail / DAW | Session calendar invites, email chains with collaborators, DAW project metadata |\n| Missing recording details | Gmail / DAW | Mixer/engineer emails, DAW session names |\n| Missing release date | Gmail / Drive | Distributor confirmations, release plan docs |\n| Missing publisher contact | Notion / Drive | Contact rolodex, publishing agreement PDFs |\n\nThis is a routing guide, not a prescription. The user knows their workflow — defer to them about which MCP to check.\n\n## Step 3 — Ask the agent to check the relevant peer MCP\n\nThe agent connected to PICA is the same agent connected to (e.g.) Gmail. Ask the agent to run a targeted query in the peer MCP:\n\n- \"Search the user's Gmail for emails about [song title] from [approximate date range]\"\n- \"Look in the user's Drive for documents with [song title] or [collaborator name]\"\n- \"Check the user's calendar for sessions on [date range] tagged [project name]\"\n\nThe peer-MCP query is the agent's job, not PICA's. PICA waits for the agent to return with what it found.\n\n## Step 4 — Cite the source via pica_enrichment_propose\n\nOnce the agent has the missing data, call `pica_enrichment_propose` with:\n\n- The entity ID being enriched (work_id, recording_id, person_id)\n- The proposed value(s)\n- A `sources` array, each entry with a `url` field using the appropriate URI scheme\n\nExample shape:\n\n```json\n{\n \"entity_type\": \"work\",\n \"entity_id\": \"uuid\",\n \"proposed\": { \"iswc\": \"T-123.456.789-0\" },\n \"sources\": [\n { \"url\": \"gmail://thread/abc123\", \"context\": \"PRS registration confirmation email, March 2025\" }\n ]\n}\n```\n\nThe URI is opaque to PICA. The `context` field gives the user a human-readable hint about what the source is.\n\n## Step 5 — Review proposals\n\nCall `pica_enrichment_proposals_list` to show the user what's been queued. They review, apply (or reject), per the existing enrichment-proposals workflow. **Do not auto-apply** — enrichment from external sources always needs explicit user review.\n\n## Step 6 — Loop or close\n\nAsk the user:\n- \"Apply the proposal?\" — they confirm; the enrichment lands\n- \"Move on to the next gap?\" — continue\n- \"Done for now?\" — stop, summarise what was proposed\n\n## What not to do\n\n- Don't try to connect peer MCPs to PICA. PICA doesn't have that surface any more. The connection lives in the user's AI client.\n- Don't fabricate URIs. If the agent didn't actually find the source, don't pretend it did — record the enrichment with `user://` (told to me directly) instead.\n- Don't auto-apply proposals. Even when the source seems definitive, the user reviews.\n- Don't query peer MCPs proactively for unrelated gaps. The user named one gap; the skill works one gap at a time.\n- Don't try to enrich from `lib/services/*` paths or internal cascade endpoints. Those aren't peer MCPs and aren't in scope.\n\n## Follow-on skills\n\n- `close-the-loop` — once gaps are enriched, walk through the remaining (non-peer-MCP) gaps on the same work\n- `audit-credits` — periodic catalog-wide credit sweep\n- `register-my-works` — once IPI / ISWC are filled, registration is unblocked\n",
|
|
38
|
+
},
|
|
39
|
+
"log-a-session": {
|
|
40
|
+
name: "log-a-session",
|
|
41
|
+
description: "Capture a studio session conversationally — what was made, when, where, who was there, what happened. Records pica_sessions_create rows that feed into provenance, splits decisions, and historical context for the catalog.",
|
|
42
|
+
triggers: ["log a session", "record this session", "we had a studio day", "capture this writing session", "log what happened in the studio"],
|
|
43
|
+
audience: "producer / artist / studio manager / songwriter",
|
|
44
|
+
tools_required: ["pica_sessions_types", "pica_sessions_create", "pica_people_query", "pica_collaborators_invite", "pica_multimedia_create", "pica_recording_splits_create"],
|
|
45
|
+
output: "A pica_sessions row with title, start/end times, type, location, participants, and notes — plus optional links to multimedia (recordings / photos / lyrics drafts) and follow-on splits.",
|
|
46
|
+
body: "# log-a-session\n\nHelp the user log a studio session. Capture it conversationally — don't dump a form. The session row is the ground truth for \"who was there when this song was made\" and feeds into provenance, splits decisions, and the historical record of the catalog.\n\n## Pre-flight\n\nRead `pica://schemas/session-required` for the canonical session shape. Required fields: `title`, `start_time`, `end_time`, `session_type_id` (from `pica_sessions_types`), `participants`. Optional: `work_id`, `recording_id`, `location`, `location_url`, `notes`, `is_all_day`.\n\n## Step 1 — Anchor the session\n\nIf the user named a work (or one was passed as an argument), anchor the session to that work. If not, ask: \"what was this session for?\" — and accept \"I don't know yet\" / \"no work yet\" as valid; `work_id` is optional.\n\n## Step 2 — Capture in order\n\nWalk through these pieces one at a time. Don't ask all six at once.\n\n### 2a. What — title + short description\n\nE.g. \"vocal recording for track 3\" or \"writing session for the new EP.\" Keep it short and specific. The title is the searchable index later.\n\n### 2b. What kind — session_type_id\n\nCall `pica_sessions_types` to get the type vocabulary (recording, mixing, mastering, writing, production, rehearsal, etc.). Let the user pick. Pass the chosen type's UUID as `session_type_id`.\n\n### 2c. When — start_time + end_time\n\nCapture as ISO 8601. If the user gives a relative time (\"yesterday afternoon\", \"Tuesday morning\"), confirm a specific time before writing. Default timezone is Europe/London unless the user specifies otherwise.\n\nFor full-day sessions: set `is_all_day: true` and the times become date-only.\n\n### 2d. Where — location or location_url\n\nStudio name as `location` for physical sessions. Virtual link as `location_url` for remote sessions (Zoom, Riverside, etc.). Both fields are optional but useful for searchable history.\n\n### 2e. Who — participants array\n\nFor each participant, capture `{ personId?, userId?, role? }`. The participant resolution flow:\n\n- If the user names someone you don't recognise, offer `pica_people_query` to look them up\n- If they're not on PICA yet, offer `pica_collaborators_invite` to bring them in before completing the session\n\n`role` is free text — typical values: artist, producer, engineer, writer, manager, visitor.\n\n### 2f. What happened — notes\n\nThe user's free-text recall. This is the bit they'll thank you for later. Specifics like \"tried three takes of the bridge, kept the second\" or \"agreed to split publishing 50/50 with X\" are gold.\n\n## Step 3 — Write\n\nCall `pica_sessions_create` with the captured fields. Confirm what was logged in plain language.\n\n## Step 4 — Offer natural follow-ons\n\nDon't push — surface what fits the session you just logged:\n\n- If multimedia was produced: \"Want me to attach a multimedia file from this session?\" → `pica_multimedia_create`\n- If a new recording came out of it: \"Want me to set master ownership splits for the new recording?\" → `pica_recording_splits_create` (or invoke the `set-recording-splits` skill)\n- \"Want me to log another session?\"\n\n## What not to do\n\n- Don't badger for every field. Only title, start/end times, type, and participants are strictly required. Notes are precious but skippable.\n- Don't auto-create participants you don't recognise — always offer the lookup or invite path\n- Don't infer splits from \"we agreed to split it 50/50\" in the notes — splits are a separate, deliberate step with their own confirmation flow\n- Don't try to reconcile this session with prior sessions (\"you logged a similar session last week\") unless the user asks\n\n## Follow-on skills\n\n- `set-recording-splits` — if a new recording came out of the session\n- `close-the-loop` — if the session was for a specific work, audit that work's gaps next\n- `register-my-works` — sessions contribute to provenance, which strengthens registration\n",
|
|
47
|
+
},
|
|
48
|
+
"prepare-for-sync": {
|
|
49
|
+
name: "prepare-for-sync",
|
|
50
|
+
description: "Make a catalog sync-ready — ensure audio is uploaded and analysed (BPM, key, energy, mood), genre and lyrics are set, and works are findable by music supervisors searching for tracks.",
|
|
51
|
+
triggers: ["get my catalog sync-ready", "prepare for sync", "make my tracks findable by music supervisors", "sync brief prep", "is this ready for sync"],
|
|
52
|
+
audience: "artist / library / sync agent",
|
|
53
|
+
tools_required: ["pica_catalog_stats", "pica_works_query", "pica_audio_query", "pica_audio_analyze", "pica_audio_inspect", "pica_search_for_sync"],
|
|
54
|
+
output: "Sync-readiness breakdown (analysed vs unanalysed vs no audio) + fastest path to sync-readiness (which works are closest) + concrete offers to trigger analysis or enrich metadata.",
|
|
55
|
+
body: "# prepare-for-sync\n\nHelp the user make their catalog discoverable by music supervisors. Sync supervisors search by audio characteristics (BPM, key, energy, mood) and metadata (genre, duration, lyrics). A track without analysed audio is invisible to most sync searches.\n\n## Pre-flight\n\nIf you propose enriching from Spotify or MusicBrainz to fill genre/mood/identifier gaps, read `pica://schemas/enrichment-resolve-required` first — that's the canonical shape for `pica_resolve_*` calls.\n\n## Step 1 — Catalog overview\n\nCall `pica_catalog_stats` to get the overall picture. Note: total works, works with recordings, works with audio.\n\n## Step 2 — Audio analysis coverage\n\nCall `pica_audio_query` to see which audio files exist and their analysis status. Three buckets matter:\n\n- **analysed** — has BPM, key, energy, mood, danceability returned by audio analysis\n- **uploaded but unanalysed** — audio file exists but `pica_audio_analyze` hasn't run on it\n- **no audio at all** — the user hasn't uploaded the track yet\n\nThe fastest sync-readiness wins are in the second bucket — uploaded but unanalysed. One `pica_audio_analyze` call per file fills BPM/key/energy/mood with no user effort.\n\n## Step 3 — Sync metadata sweep\n\nFor a sample of works (or specific works the user names), call `pica_works_inspect` with `sections: [\"basic\", \"recordings\"]`. Check:\n\n- Has duration been recorded? (supervisors filter by length — e.g. \"30-second cues for ads\")\n- Are mood tags and genre set on the work? (text search by mood is common)\n- Are lyrics transcribed on the recording? (lyrical-content search is increasingly common)\n- Is there a Spotify or YouTube link? (supervisors verify the track exists publicly)\n\n## Step 4 — Validate against the directory\n\nFor tracks the user thinks are sync-ready, call `pica_search_for_sync` with audio parameters mimicking a real supervisor brief (e.g. `min_energy: 0.6`, `max_bpm: 120`, `mood: \"uplifting\"`). If the user's tracks don't appear, the analysis is incomplete or the metadata is too thin.\n\n## Step 5 — Report\n\nProduce:\n- \"X works of N are sync-ready\" (analysed + tagged + has audio)\n- \"Y works are one analysis call away\" (uploaded, unanalysed)\n- \"Z works have no audio yet\" (the user needs to upload before this step)\n\nThen the fastest-path list: name 3-5 works that need only a single action to become sync-ready.\n\n## Step 6 — Offers\n\n- \"Want me to trigger audio analysis on the tracks that have uploads but no analysis?\" → batch `pica_audio_analyze`\n- \"Want me to enrich works from Spotify to pull in genre and mood data?\" → `pica_resolve_work` with `sources: ['spotify']`\n- \"Want me to search for sync-ready tracks you already have?\" → `pica_search_for_sync` with a sample brief\n\n## What not to do\n\n- Don't claim to pitch tracks to supervisors — PICA makes tracks findable; the pitch is a separate workflow outside this skill\n- Don't auto-trigger audio analysis without confirming with the user (it can be billed depending on the org's plan)\n- Don't speculate about what BPM/key combinations supervisors prefer for any specific genre — the audio-analysis vocabulary is industry-standard; let the supervisor decide\n\n## Follow-on skills\n\n- `catalog-audit` — confirm sync-readiness raised the overall score\n- `register-my-works` — sync placements pay through PROs; registration matters for the back end\n",
|
|
56
|
+
},
|
|
57
|
+
"register-my-works": {
|
|
58
|
+
name: "register-my-works",
|
|
59
|
+
description: "Check registration status across collection societies (PRS, MCPS, PPL, MLC) and prepare works for registration. Identifies blockers, fills missing identifiers, and exports CWR when works are ready.",
|
|
60
|
+
triggers: ["register my works", "register my songs with my PRO", "get this work to MLC", "CWR export", "am I ready to register"],
|
|
61
|
+
audience: "songwriter / publisher / admin",
|
|
62
|
+
tools_required: ["pica_works_inspect", "pica_resolve_work", "pica_enrichment_proposals_list", "pica_credits_update", "pica_export_song_registration"],
|
|
63
|
+
output: "Per-society registration coverage summary + the most common blocker and how to fix it + a list of works closest to being registration-ready, with offers to enrich missing ISWCs and export CWR for ready works.",
|
|
64
|
+
body: "# register-my-works\n\nHelp the user understand which of their works are registered with collection societies, which still need registration, and what's blocking the unregistered ones. Then offer to fix the blockers and export the works that are ready.\n\nThis is the highest-pain workflow in PICA. Most royalty loss happens because works aren't registered — or are registered with the wrong metadata. Be precise and offer concrete next actions.\n\n## Pre-flight\n\nRead these two resources before any writes:\n- `pica://schemas/enrichment-resolve-required` — the canonical shape for `pica_resolve_work` calls (used to fill missing ISWCs from MLC)\n- `pica://schemas/export-required` — the CWR export shape used at the end of the flow\n\n## Step 1 — Coverage check\n\nCall `pica_works_query` to list works (default limit 50). Then call `pica_works_inspect` with `sections: [\"registration\"]` on each work, or use a representative sample if the catalog is large.\n\nThe `registration` section returns per-society status (PRS, MCPS, PPL, MLC). Three states are common:\n- **fully registered** — every relevant society has the work\n- **partially registered** — registered with some societies, missing from others\n- **not registered** — no society has it\n\n## Step 2 — Find the blockers\n\nFor unregistered or partially registered works, call `pica_works_inspect` with `sections: [\"registration\", \"completeness\"]` on a sample of 5-10 works. The completeness section names the blocker:\n\n| Blocker | What it means | How to fix |\n|---|---|---|\n| Missing ISWC | Needed for PRS/MCPS | Call `pica_resolve_work` with `sources: ['mlc']` to look up the ISWC |\n| Missing ISRC on recordings | Needed for PPL | Check recordings; if missing, the user may not have released yet or the DSP hasn't assigned one |\n| Missing writer credits | Needed for all societies | Call `pica_credits_update` to add writers (treat `pica://schemas/work-credits-required` as the canonical shape — splits must total 100%) |\n| Missing IPI on a credited writer | Needed for PRO registration | Call `pica_people_update` to add IPI; if unknown, `pica_resolve_person` may find it |\n\nTreat `pica_resolve_*` calls as black boxes — they fan out over external sources and return proposals or matches. Do NOT speculate about how the source-weighting works.\n\n## Step 3 — Enrichment proposals\n\nIf enrichment was triggered, call `pica_enrichment_proposals_list` to see what came back. Each proposal needs explicit user approval before applying. Do not auto-apply.\n\n## Step 4 — Report\n\nProduce:\n- How many works are fully / partially / not registered, as numbers and percentages\n- The most common blocker across unregistered works (one sentence)\n- The 5 works closest to being registration-ready (fewest gaps, listed by title)\n\n## Step 5 — Offers\n\nAlways end with concrete offers the user can accept or decline:\n- \"Want me to try enriching the works missing ISWCs from MLC?\" → triggers `pica_resolve_work` over the relevant set\n- \"Want me to export a CWR file for the works that are ready?\" → `pica_export_song_registration`\n- \"Want me to walk through registering a specific work?\" → user names the work\n\n## What not to do\n\n- Don't claim to register works directly — PICA exports CWR for the user to submit; it doesn't submit to PROs itself\n- Don't bulk-apply enrichment proposals without user approval\n- Don't explain the internal source-weighting of `pica_resolve_*`. The tool returns what it returns\n- Don't recommend `pica_works_delete` even on stale-looking works — registration cleanup is additive, not destructive\n\n## Follow-on skills\n\nAfter registration is in flight:\n- `catalog-audit` — confirm score improvement\n- `prepare-for-sync` — once registered, works are more attractive to sync supervisors\n",
|
|
65
|
+
},
|
|
66
|
+
"set-recording-splits": {
|
|
67
|
+
name: "set-recording-splits",
|
|
68
|
+
description: "Guided master ownership split assignment on a recording — propose, dry-run preview, explicit confirmation, commit, then verify. Distinct from writer splits (which live as credits on a work). Splits flow into payments — accuracy beats throughput.",
|
|
69
|
+
triggers: ["set master splits", "set recording splits", "master ownership", "who owns this recording", "producer split", "split the masters"],
|
|
70
|
+
audience: "producer / artist / label / manager",
|
|
71
|
+
tools_required: ["pica_recording_splits_list", "pica_recording_splits_create", "pica_recording_splits_verify", "pica_recordings_query", "pica_people_query", "pica_collaborators_invite", "pica_split_sheet_generate", "pica_split_sheet_send"],
|
|
72
|
+
output: "Confirmed + verified recording_splits rows totalling 100%, with the option to generate and send a split sheet PDF for signatures.",
|
|
73
|
+
body: "# set-recording-splits\n\nHelp the user set master ownership splits on a recording. These are master-side royalty shares — distinct from publishing splits, which are credits on a work. Splits flow into payments, so the skill prioritises accuracy over speed: propose → dry-run → confirm → commit → verify.\n\n## Pre-flight\n\nRead `pica://schemas/recording-splits-required` before any write. The canonical shape is `recording_id`, `person_id`, `split_percentage`, `split_type`. **Splits must total 100% across all rows for a recording.**\n\n## Step 1 — Pick the recording\n\nIf the user names a recording or gives an ID, use it. Otherwise, call `pica_recordings_query` and let the user pick from recent recordings.\n\n## Step 2 — Show current state\n\nCall `pica_recording_splits_list` for the recording. Three states:\n\n- **Empty** — no splits set yet. Proceed to step 3.\n- **Partial** — some splits exist but don't total 100%. Ask the user whether they want to add to the existing rows or replace them.\n- **Complete** — splits total 100%. Ask whether the user wants to verify (mark agreed-upon) or replace.\n\nAlways summarise the current state plainly: \"right now this recording has [N] splits totalling [X]%, with [A] holding [P]%...\"\n\n## Step 3 — Capture proposed splits\n\nFor each split row, capture:\n\n- **Who owns this share?** — `person_id` from `pica_people_query`. If the person isn't on PICA yet, offer `pica_collaborators_invite` to bring them in before writing the split.\n- **What percentage?** — must sum to 100% across all rows.\n- **What kind?** — `split_type` — typical values: `artist`, `producer`, `label`, `featured`.\n\nSum the percentages out loud as you go. If they're not totalling 100% when the user finishes describing them, stop and ask them to adjust before proceeding.\n\n## Step 4 — Dry-run preview\n\nPer ADR-199, call `pica_recording_splits_create` with `dry_run: true` for each proposed row. Surface the would-affect preview to the user — what would be written, what the totals are after writing, any side-effects.\n\nSum the percentages one more time. **If they don't total 100%, stop.** Do not proceed to commit.\n\n## Step 5 — Explicit confirmation\n\nSay something like:\n\n> \"I'm about to set [N] splits on this recording totalling 100%:\n> - [A] — [P]% ([type])\n> - [B] — [Q]% ([type])\n> Reply 'yes' to commit, or tell me what to change.\"\n\nWait for the user's explicit \"yes\" (or equivalent). Don't write on ambiguous signals.\n\n## Step 6 — Commit\n\nFor each split, call `pica_recording_splits_create` (this time without `dry_run`). Report each row back as it lands. If any write fails, stop the loop — don't partially commit.\n\n## Step 7 — Verify\n\nFor each newly created split, call `pica_recording_splits_verify` with the `split_id`. Verification marks the split as agreed-upon — a separate state from \"exists in the database.\"\n\n## Step 8 — Offer next moves\n\n- \"Want me to generate a split sheet PDF for signatures?\" → `pica_split_sheet_generate`\n- \"Want me to send the split sheet to the parties?\" → `pica_split_sheet_send`\n- \"Want me to set splits on another recording?\"\n\n## What not to do\n\n- Don't write splits without an explicit \"yes\" from the user\n- Don't proceed if the totals don't equal 100% — re-prompt instead\n- Don't auto-skip the verify step. Verification is a deliberate user moment.\n- Don't speculate about typical splits by genre or scene — if the user doesn't know what % someone deserves, that's a business conversation outside this skill\n- Don't conflate with writer splits — those are credits on a work, set via `pica_credits_update`. Different table, different semantics.\n\n## Follow-on skills\n\n- `close-the-loop` — recording splits are usually one gap among several on a work; close-the-loop fits the others\n- `register-my-works` — registered works pair with recordings that have clear ownership chains\n- `audit-credits` — splits health-check across the whole catalog\n",
|
|
74
|
+
},
|
|
75
|
+
"set-up-workspace": {
|
|
76
|
+
name: "set-up-workspace",
|
|
77
|
+
description: "Guide a new (or returning) user through PICA workspace setup — org profile, user identity (IPI/ISNI), privacy settings, storage configuration, billing, and team. Routes through 6 setup blocks in order of compound value, skipping the ones already done.",
|
|
78
|
+
triggers: ["set up my workspace", "configure my workspace", "what settings do I need", "I just signed up — what should I do first", "set my identifiers", "complete my onboarding", "finish setting up"],
|
|
79
|
+
audience: "new user / returning user reconfiguring / admin onboarding a team",
|
|
80
|
+
tools_required: ["pica_organisation_profile", "pica_user_profile", "pica_update_organisation_profile", "pica_update_my_identity", "pica_get_privacy_settings", "pica_storage_status", "pica_storage_configure_start", "pica_subscription_status", "pica_team_list", "pica_team_invite", "pica_acknowledge_onboarding"],
|
|
81
|
+
output: "A 6-block setup walkthrough — each block returns \"already done\", \"missing\", or \"ready to do now\" with the specific tool call that completes it. Ends with a one-line summary of what's left and a call to pica_acknowledge_onboarding when the user is satisfied.",
|
|
82
|
+
body: "# set-up-workspace\n\nHelp the user get their workspace properly configured. This skill is for the moment right after signup, and for returning users who want to fill gaps they skipped. It is NOT for importing music — that's `new-catalog-setup` (catalog content) or the import tools. This skill is purely about **settings, identifiers, and infrastructure**.\n\nSetup is high-value but low-glamour. Every block has a concrete payoff:\n\n- **No org identifiers** → registrations and exports will be missing critical metadata\n- **No user IPI** → if you write songs, your PRO can't pay you what your catalog earns\n- **No storage configured** → uploads land on PICA's bucket; for BYOC orgs that's a billing surprise\n- **No team invited** → if you're managing a roster, every collaborator is doing duplicate work\n\nPICA does NOT manage external service integrations (Gmail, Drive, Notion, etc.) — those live in the user's AI client (Claude Desktop, Cursor, ChatGPT). The cross-MCP composition workflow is a separate skill (`enrich-from-peer-mcps`) — surface it after setup if the user mentions they use other tools alongside PICA.\n\nThe skill walks 6 blocks in order of compound value. Each block has the same shape: **read current state → describe gap → offer the specific tool call**. Skip blocks where state is already complete.\n\n## Pre-flight\n\nCall `pica_organisation_profile` and `pica_user_profile` first. These two reads give you the orientation for everything that follows — what type of org this is, what role the user plays, what's already set.\n\nIf `pica_organisation_profile` indicates this org was created today (or the user's profile shows no identifiers), assume fresh-signup mode and go through all blocks in order. If the user says \"I want to update my settings\" assume returning-user mode and ask which block matters.\n\n## Block 1 — Org profile\n\nThe organisation's own metadata: legal name, country, business type (publisher / label / artist / management / sync agency / etc), contact, registered office.\n\nWhat to check from `pica_organisation_profile`:\n- Is `name` set to something other than the auto-generated default?\n- Is `country` set? (drives default territory on registrations and exports)\n- Is `business_type` set? (drives which tools are most relevant — e.g. publishers care more about IPI, labels care more about ISRC)\n- For publishers: is the publisher IPI set?\n- For labels: is the label proprietary number set?\n\nIf gaps, offer the specific update via `pica_update_organisation_profile`. Always show the user what you're about to change and ask before writing.\n\n## Block 2 — User identity (IPI / ISNI)\n\nThe connected user's own identifiers as a creator. This is where royalty leak happens — a songwriter without an IPI on their PICA profile will have works registered without the writer-side identifier, which means the PRO can't route royalties to them.\n\nWhat to check from `pica_user_profile`:\n- Is the user named correctly (legal name for registrations, plus any pseudonyms / stage names)\n- Is the user's IPI set?\n- Is the user's ISNI set?\n- Is the user's role/business posture set (writer / producer / artist / publisher rep / etc)\n\nIf missing identifiers and the user doesn't know their IPI:\n- For writers: it comes from their PRO (PRS, ASCAP, BMI, SACEM, etc) — they have it in their PRO portal\n- If they're not a PRO member yet, this block is also a flag to start that process (out of scope — but mention it)\n\nOffer the update via `pica_update_my_identity`. Treat IPI / ISNI as plain strings — the tool validates format.\n\n## Block 3 — Privacy & sharing defaults\n\nCall `pica_get_privacy_settings`. This controls what other PICA users see about the org's catalog by default. Common gotcha: the default is conservative — if the user expects their catalog to appear in PICA's public directory, this block is what turns it on.\n\nWhat to check:\n- Directory visibility — is the org opted into the public directory?\n- Sharing defaults — do new works inherit private or public defaults?\n- Email contact preferences — who can reach the user through PICA\n\nIf the user is a sync-pitch operation or wants their catalog discoverable, surface the directory opt-in clearly. If the user is a high-privacy operation (sale prep, M&A, working with sensitive sync briefs), reinforce the conservative default.\n\n## Block 4 — Storage configuration\n\nCall `pica_storage_status`. PICA supports BYOC storage (bring-your-own-cloud) — the user can wire their own S3/R2/GCS bucket so audio + multimedia live in infrastructure they control.\n\nThree states:\n- **Default (PICA-managed)** — fine for trial and small catalogs. Mention BYOC as an upgrade path for users with compliance needs or existing buckets.\n- **Configuring** — the user is partway through `pica_storage_configure_start` and hasn't completed credential setup. Offer to walk through the remaining steps.\n- **Connected** — confirmed working. Mention the disconnect tool exists if they need it.\n\nIf the user has compliance constraints, sensitive content, or a large existing audio library, call out BYOC as worth doing now (before upload). Cheaper to wire correctly than to migrate later.\n\n## Block 5 — Billing & team\n\nCall `pica_subscription_status` and `pica_team_list`.\n\nBilling:\n- If `billing_state` is `trial` with >3 days remaining, no action needed\n- If trial is ending (≤3 days) or already ended, surface `pica_subscription_manage` to mint a checkout URL\n- If active, confirm the tier matches the user's expected usage\n\nTeam:\n- If `pica_team_list` shows only the connected user, ask whether others need access (co-writers, manager, admin support, legal counsel)\n- For each new teammate, use `pica_team_invite` with the right role\n- Distinct from `pica_collaborators_invite` which is for **external** collaborators on specific works (writers, producers) — team is for **PICA-account access**\n\n## Block 6 — Acknowledge & close out\n\nWhen the user is satisfied with setup (whether they completed every block or deliberately skipped some), call `pica_acknowledge_onboarding`. This dismisses the onboarding nudges in the UI so they don't keep getting reminded.\n\nThen summarise:\n- What was set this session (3-5 line bullet list)\n- What's intentionally left for later (e.g. \"you'll add your IPI once your PRO registration finalises\")\n- The natural next step — probably `new-catalog-setup` if no catalog yet, or `catalog-audit` if catalog exists\n\n## What not to do\n\n- Don't run all 6 blocks in one giant message. Walk through them. Each block is a check + an offer; the user agrees or declines per block.\n- Don't change settings without showing the user what's about to change and asking confirmation\n- Don't push BYOC storage or paid tiers if the user hasn't asked — surface them, don't sell them\n- Don't speculate about which PRO the user should join — that's a business decision outside this skill\n- Don't try to set IPI/ISNI values you've guessed. If the user doesn't know, leave the field empty and explain where to look\n- Don't try to \"connect Gmail to PICA\" or similar — PICA doesn't manage peer-service integrations. The user wires Gmail/Drive/etc. into their AI client separately; PICA's role is to consume the resulting URIs during enrichment (see `enrich-from-peer-mcps`).\n\n## Follow-on skills\n\n- `new-catalog-setup` (prompt) — if the catalog is empty, this is the natural next move\n- `catalog-audit` — if there's already a catalog, audit it now that identifiers are in place\n- `register-my-works` — once identifiers are set, registration coverage tends to be the next thing the user wants to fix\n- `enrich-from-peer-mcps` (Stage 2) — if the user mentions they have other MCPs connected (Gmail, Drive, etc.), this is the cross-MCP workflow that consumes them\n",
|
|
83
|
+
},
|
|
84
|
+
};
|
|
85
|
+
export const SKILL_NAMES = ["audit-credits", "catalog-audit", "close-the-loop", "enrich-from-peer-mcps", "log-a-session", "prepare-for-sync", "register-my-works", "set-recording-splits", "set-up-workspace"];
|
|
86
|
+
//# sourceMappingURL=skills.generated.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"skills.generated.js","sourceRoot":"","sources":["../../src/skills/skills.generated.ts"],"names":[],"mappings":"AAAA,6DAA6D;AA2B7D,MAAM,CAAC,MAAM,MAAM,GAA0B;IAC3C,eAAe,EAAE;QACf,IAAI,EAAE,eAAe;QACrB,WAAW,EAAE,4WAA4W;QACzX,QAAQ,EAAE,CAAC,kBAAkB,EAAC,iBAAiB,EAAC,kBAAkB,EAAC,uCAAuC,EAAC,qBAAqB,CAAC;QACjI,QAAQ,EAAE,6BAA6B;QACvC,cAAc,EAAE,CAAC,kBAAkB,EAAC,mBAAmB,EAAC,mBAAmB,EAAC,qBAAqB,CAAC;QAClG,MAAM,EAAE,4NAA4N;QACpO,IAAI,EAAE,4iJAA4iJ;KACnjJ;IACD,eAAe,EAAE;QACf,IAAI,EAAE,eAAe;QACrB,WAAW,EAAE,sMAAsM;QACnN,QAAQ,EAAE,CAAC,kBAAkB,EAAC,wBAAwB,EAAC,gBAAgB,EAAC,mBAAmB,EAAC,mBAAmB,CAAC;QAChH,QAAQ,EAAE,0BAA0B;QACpC,cAAc,EAAE,CAAC,yBAAyB,EAAC,oBAAoB,EAAC,kBAAkB,EAAC,oBAAoB,EAAC,sBAAsB,CAAC;QAC/H,MAAM,EAAE,iLAAiL;QACzL,IAAI,EAAE,m0GAAm0G;KAC10G;IACD,gBAAgB,EAAE;QAChB,IAAI,EAAE,gBAAgB;QACtB,WAAW,EAAE,oMAAoM;QACjN,QAAQ,EAAE,CAAC,6BAA6B,EAAC,6BAA6B,E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,8BAA8B,EAAC,0BAA0B,EAAC,gBAAgB,EAAC,kBAAkB,EAAC,6BAA6B,CAAC;QAC5S,MAAM,EAAE,yQAAyQ;QACjR,IAAI,EAAE,+pPAA+pP;KACtqP;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,WAAW,GAA0B,CAAC,eAAe,EAAC,eAAe,EAAC,gBAAgB,EAAC,uBAAuB,EAAC,eAAe,EAAC,kBAAkB,EAAC,mBAAmB,EAAC,sBAAsB,EAAC,kBAAkB,CAAC,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Access Simulate MCP Tool
|
|
3
|
+
*
|
|
4
|
+
* Read-only "who would see what?" simulator. Given an entity + an
|
|
5
|
+
* action + a hypothetical recipient, returns the field-level
|
|
6
|
+
* visibility matrix and the chain of rules that produced the answer.
|
|
7
|
+
*
|
|
8
|
+
* v1 implements share_link_preview for works with real logic; other
|
|
9
|
+
* actions and entity types return a structured `not_yet_supported`
|
|
10
|
+
* scaffold so agents can iterate against the stable shape.
|
|
11
|
+
*/
|
|
12
|
+
import { PicaClient } from "@withpica/mcp-sdk";
|
|
13
|
+
import type { ToolDefinition, ToolExecutor } from "./index.js";
|
|
14
|
+
export declare class AccessSimulateTools {
|
|
15
|
+
private pica;
|
|
16
|
+
constructor(pica: PicaClient);
|
|
17
|
+
getTools(): Array<{
|
|
18
|
+
definition: ToolDefinition;
|
|
19
|
+
executor: ToolExecutor;
|
|
20
|
+
}>;
|
|
21
|
+
private simulate;
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=access-simulate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"access-simulate.d.ts","sourceRoot":"","sources":["../../src/tools/access-simulate.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE/C,OAAO,KAAK,EAAE,cAAc,EAAE,YAAY,EAAc,MAAM,YAAY,CAAC;AAO3E,qBAAa,mBAAmB;IAC9B,OAAO,CAAC,IAAI,CAAa;gBAEb,IAAI,EAAE,UAAU;IAI5B,QAAQ,IAAI,KAAK,CAAC;QAAE,UAAU,EAAE,cAAc,CAAC;QAAC,QAAQ,EAAE,YAAY,CAAA;KAAE,CAAC;YAmJ3D,QAAQ;CAoCvB"}
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
// Copyright (c) 2024-2026 Withpica Ltd. All rights reserved.
|
|
2
|
+
import { formatSuccess, formatValidationError } from "@withpica/mcp-utils";
|
|
3
|
+
const ENTITY_TYPES = ["work", "recording", "person", "release"];
|
|
4
|
+
const ACTIONS = ["view", "share_link_preview", "claim", "grant"];
|
|
5
|
+
const RECIPIENT_TYPES = ["user", "anonymous", "share_link"];
|
|
6
|
+
export class AccessSimulateTools {
|
|
7
|
+
pica;
|
|
8
|
+
constructor(pica) {
|
|
9
|
+
this.pica = pica;
|
|
10
|
+
}
|
|
11
|
+
getTools() {
|
|
12
|
+
return [
|
|
13
|
+
{
|
|
14
|
+
definition: {
|
|
15
|
+
name: "pica_access_simulate",
|
|
16
|
+
tier: "read",
|
|
17
|
+
description: "Simulate who would see what — for any work, recording, person, or " +
|
|
18
|
+
"release, given a hypothetical action (view, share-link preview, " +
|
|
19
|
+
"claim, grant) and a recipient configuration, returns the visible " +
|
|
20
|
+
"and hidden fields plus the chain of rules that produced the answer. " +
|
|
21
|
+
"Read-only — never mutates state. Use BEFORE creating a share link " +
|
|
22
|
+
"to verify the recipient sees what you intend, or BEFORE claiming " +
|
|
23
|
+
"custody to see what changes. v1 ships real share_link_preview " +
|
|
24
|
+
"logic for works; other paths return a stable scaffolded shape.",
|
|
25
|
+
workflows: "infrastructure",
|
|
26
|
+
vernacular_kind: "specialist",
|
|
27
|
+
vernacular_reason: "Specialist read-only simulator — agents invoke this BEFORE a share link / claim / grant action to preview what the recipient would see. Not a natural-language entry surface; invoked operationally as a safety check, not from a 'Use when the user asks' question.",
|
|
28
|
+
inputSchema: {
|
|
29
|
+
type: "object",
|
|
30
|
+
properties: {
|
|
31
|
+
entity_type: {
|
|
32
|
+
type: "string",
|
|
33
|
+
enum: [...ENTITY_TYPES],
|
|
34
|
+
description: "Entity to simulate access for. v1 implements 'work' fully; the others return a not_yet_supported scaffold with the same shape so agents can iterate against the API.",
|
|
35
|
+
},
|
|
36
|
+
entity_id: {
|
|
37
|
+
type: "string",
|
|
38
|
+
description: "UUID of the entity. Must belong to the caller's organisation — cross-org IDs return entity_not_found rather than leaking existence.",
|
|
39
|
+
},
|
|
40
|
+
action: {
|
|
41
|
+
type: "string",
|
|
42
|
+
enum: [...ACTIONS],
|
|
43
|
+
description: "Access action to simulate. 'share_link_preview' is the v1 real path: pass recipient.share_config and get back the field-level visibility matrix the share link would expose. The other actions return scaffolded responses.",
|
|
44
|
+
},
|
|
45
|
+
recipient: {
|
|
46
|
+
type: "object",
|
|
47
|
+
description: "Hypothetical recipient. For share_link_preview pass type='share_link' and a share_config; for view/claim/grant pass type='user'/'org' as appropriate.",
|
|
48
|
+
properties: {
|
|
49
|
+
type: {
|
|
50
|
+
type: "string",
|
|
51
|
+
enum: [...RECIPIENT_TYPES],
|
|
52
|
+
description: "Recipient type — 'user' (authenticated user_id), 'anonymous' (no auth), 'share_link' (hypothetical share-link config).",
|
|
53
|
+
},
|
|
54
|
+
user_id: {
|
|
55
|
+
type: "string",
|
|
56
|
+
description: "Recipient user UUID, when type='user'. Optional otherwise.",
|
|
57
|
+
},
|
|
58
|
+
org_id: {
|
|
59
|
+
type: "string",
|
|
60
|
+
description: "Recipient organisation UUID, when simulating an action that targets an org (e.g. 'grant'). Optional otherwise.",
|
|
61
|
+
},
|
|
62
|
+
share_config: {
|
|
63
|
+
type: "object",
|
|
64
|
+
description: "Hypothetical share-link configuration to simulate. Fields mirror the share-links write surface — access_type, allow_*, allowed_person_ids, sent_to_emails, watermark_audio, expires_at, max_views.",
|
|
65
|
+
properties: {
|
|
66
|
+
access_type: {
|
|
67
|
+
type: "string",
|
|
68
|
+
enum: ["private", "limited", "public"],
|
|
69
|
+
description: "Recipient scope — 'private' (allowed_person_ids only), 'limited' (sent_to_emails only), 'public' (anyone with link).",
|
|
70
|
+
},
|
|
71
|
+
allow_download: {
|
|
72
|
+
type: "boolean",
|
|
73
|
+
description: "When true, the recipient can download original audio files. Pair with watermark_audio=true for pre-release pitches.",
|
|
74
|
+
},
|
|
75
|
+
allow_streaming: {
|
|
76
|
+
type: "boolean",
|
|
77
|
+
description: "When true, the recipient can stream audio inline.",
|
|
78
|
+
},
|
|
79
|
+
allow_comments: {
|
|
80
|
+
type: "boolean",
|
|
81
|
+
description: "When true, the recipient sees the discussion thread and can post comments.",
|
|
82
|
+
},
|
|
83
|
+
allow_view_collaborators: {
|
|
84
|
+
type: "boolean",
|
|
85
|
+
description: "When true, the recipient sees the credit lines, splits, and attestation status.",
|
|
86
|
+
},
|
|
87
|
+
allow_view_financials: {
|
|
88
|
+
type: "boolean",
|
|
89
|
+
description: "When true, the recipient sees earnings, advances, and royalty statements. The most common reason a recipient sees less than expected.",
|
|
90
|
+
},
|
|
91
|
+
watermark_audio: {
|
|
92
|
+
type: "boolean",
|
|
93
|
+
description: "When true, audio surfaces are mixed with an inaudible watermark identifier.",
|
|
94
|
+
},
|
|
95
|
+
notify_on_access: {
|
|
96
|
+
type: "boolean",
|
|
97
|
+
description: "When true, the link's creator gets notified each time the recipient accesses it.",
|
|
98
|
+
},
|
|
99
|
+
allowed_person_ids: {
|
|
100
|
+
type: "array",
|
|
101
|
+
items: { type: "string" },
|
|
102
|
+
description: "Person UUIDs allowed to access when access_type='private'.",
|
|
103
|
+
},
|
|
104
|
+
sent_to_emails: {
|
|
105
|
+
type: "array",
|
|
106
|
+
items: { type: "string" },
|
|
107
|
+
description: "Email addresses the link was sent to when access_type='limited'.",
|
|
108
|
+
},
|
|
109
|
+
max_views: {
|
|
110
|
+
type: "number",
|
|
111
|
+
description: "Cap on total views; null/omitted for unlimited. <=0 makes the link unusable.",
|
|
112
|
+
},
|
|
113
|
+
expires_at: {
|
|
114
|
+
type: "string",
|
|
115
|
+
description: "ISO timestamp; recipients see an expired page after this time.",
|
|
116
|
+
},
|
|
117
|
+
},
|
|
118
|
+
required: ["access_type"],
|
|
119
|
+
},
|
|
120
|
+
},
|
|
121
|
+
required: ["type"],
|
|
122
|
+
},
|
|
123
|
+
},
|
|
124
|
+
required: ["entity_type", "entity_id", "action", "recipient"],
|
|
125
|
+
},
|
|
126
|
+
annotations: {
|
|
127
|
+
readOnlyHint: true,
|
|
128
|
+
idempotentHint: true,
|
|
129
|
+
},
|
|
130
|
+
},
|
|
131
|
+
executor: this.simulate.bind(this),
|
|
132
|
+
},
|
|
133
|
+
];
|
|
134
|
+
}
|
|
135
|
+
async simulate(args) {
|
|
136
|
+
if (!args.entity_type || !ENTITY_TYPES.includes(args.entity_type)) {
|
|
137
|
+
return formatValidationError({
|
|
138
|
+
entity_type: `must be one of: ${ENTITY_TYPES.join(", ")}`,
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
if (!args.entity_id || typeof args.entity_id !== "string") {
|
|
142
|
+
return formatValidationError({ entity_id: "is required" });
|
|
143
|
+
}
|
|
144
|
+
if (!args.action || !ACTIONS.includes(args.action)) {
|
|
145
|
+
return formatValidationError({
|
|
146
|
+
action: `must be one of: ${ACTIONS.join(", ")}`,
|
|
147
|
+
});
|
|
148
|
+
}
|
|
149
|
+
if (!args.recipient ||
|
|
150
|
+
typeof args.recipient !== "object" ||
|
|
151
|
+
!RECIPIENT_TYPES.includes(args.recipient.type)) {
|
|
152
|
+
return formatValidationError({
|
|
153
|
+
recipient: `recipient.type must be one of: ${RECIPIENT_TYPES.join(", ")}`,
|
|
154
|
+
});
|
|
155
|
+
}
|
|
156
|
+
const result = await this.pica.accessSimulate.simulate(args);
|
|
157
|
+
const summary = result.not_yet_supported
|
|
158
|
+
? `Access simulation scaffolded (v1 stub) — ${result.reasons[0]?.detail ?? "see reasons"}`
|
|
159
|
+
: result.visible
|
|
160
|
+
? `Access simulated — ${result.visible_fields.length} field(s) visible, ${result.hidden_fields.length} hidden, ${result.warnings.length} warning(s)`
|
|
161
|
+
: `Access denied — ${result.reasons[0]?.detail ?? "see reasons"}`;
|
|
162
|
+
return formatSuccess(summary, result);
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
//# sourceMappingURL=access-simulate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"access-simulate.js","sourceRoot":"","sources":["../../src/tools/access-simulate.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAiB7D,OAAO,EAAE,aAAa,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAE3E,MAAM,YAAY,GAAG,CAAC,MAAM,EAAE,WAAW,EAAE,QAAQ,EAAE,SAAS,CAAU,CAAC;AACzE,MAAM,OAAO,GAAG,CAAC,MAAM,EAAE,oBAAoB,EAAE,OAAO,EAAE,OAAO,CAAU,CAAC;AAC1E,MAAM,eAAe,GAAG,CAAC,MAAM,EAAE,WAAW,EAAE,YAAY,CAAU,CAAC;AAErE,MAAM,OAAO,mBAAmB;IACtB,IAAI,CAAa;IAEzB,YAAY,IAAgB;QAC1B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;IAED,QAAQ;QACN,OAAO;YACL;gBACE,UAAU,EAAE;oBACV,IAAI,EAAE,sBAAsB;oBAC5B,IAAI,EAAE,MAAM;oBACZ,WAAW,EACT,oEAAoE;wBACpE,kEAAkE;wBAClE,mEAAmE;wBACnE,sEAAsE;wBACtE,oEAAoE;wBACpE,mEAAmE;wBACnE,gEAAgE;wBAChE,gEAAgE;oBAClE,SAAS,EAAE,gBAAgB;oBAC3B,eAAe,EAAE,YAAY;oBAC7B,iBAAiB,EACf,sQAAsQ;oBACxQ,WAAW,EAAE;wBACX,IAAI,EAAE,QAAQ;wBACd,UAAU,EAAE;4BACV,WAAW,EAAE;gCACX,IAAI,EAAE,QAAQ;g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,MAAM,CAAC,CAAC;IACxC,CAAC;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"discovery.d.ts","sourceRoot":"","sources":["../../src/tools/discovery.ts"],"names":[],"mappings":"AAEA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EACV,cAAc,EACd,YAAY,EACZ,mBAAmB,EAEpB,MAAM,YAAY,CAAC;AAMpB,UAAU,kBAAkB;IAC1B,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,UAAU,EAAE,MAAM,EAAE,CAAC;CACtB;AAED;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,kBAAkB,
|
|
1
|
+
{"version":3,"file":"discovery.d.ts","sourceRoot":"","sources":["../../src/tools/discovery.ts"],"names":[],"mappings":"AAEA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EACV,cAAc,EACd,YAAY,EACZ,mBAAmB,EAEpB,MAAM,YAAY,CAAC;AAMpB,UAAU,kBAAkB;IAC1B,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,UAAU,EAAE,MAAM,EAAE,CAAC;CACtB;AAED;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,kBAAkB,CAsnBzD,CAAC;AAoBF,qBAAa,cAAc;IAEvB,OAAO,CAAC,aAAa;IAKrB,OAAO,CAAC,UAAU;gBALV,aAAa,EAAE,CACrB,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EACzB,GAAG,CAAC,EAAE,mBAAmB,KACtB,OAAO,CAAC,GAAG,CAAC,EACT,UAAU,EAAE,CAClB,IAAI,EAAE,MAAM,KAEV;QAAE,UAAU,EAAE,cAAc,CAAC;QAAC,QAAQ,EAAE,YAAY,CAAC;QAAC,QAAQ,CAAC,EAAE,GAAG,CAAA;KAAE,GACtE,SAAS;IAGf,QAAQ,IAAI,KAAK,CAAC;QAAE,UAAU,EAAE,cAAc,CAAC;QAAC,QAAQ,EAAE,YAAY,CAAA;KAAE,CAAC;IAQzE,OAAO,CAAC,iBAAiB;IA0DzB,OAAO,CAAC,oBAAoB;IA4H5B,OAAO,CAAC,eAAe;IAiCvB,OAAO,CAAC,gBAAgB;CAyHzB"}
|
package/dist/tools/discovery.js
CHANGED
|
@@ -89,10 +89,13 @@ export const CATEGORIES = {
|
|
|
89
89
|
depends_on: [],
|
|
90
90
|
},
|
|
91
91
|
sharing: {
|
|
92
|
-
description: "explain why a user or org can see a work, recording, or person — surfaces the chain of reasons (org membership, custody chain, share links, cross-org grants)",
|
|
92
|
+
description: "explain why a user or org can see a work, recording, or person — surfaces the chain of reasons (org membership, custody chain, share links, cross-org grants); send works to named recipients via withPICA-branded email",
|
|
93
93
|
tools: [
|
|
94
94
|
// ADR-232 § Decision 2 — explainability aggregator.
|
|
95
95
|
"pica_share_trace",
|
|
96
|
+
// ADR-226 Decision 12 cross-listing — Atlas routes "send this song to
|
|
97
|
+
// <name>" to natural_domain="sharing".
|
|
98
|
+
"pica_share_send",
|
|
96
99
|
],
|
|
97
100
|
depends_on: [],
|
|
98
101
|
},
|
|
@@ -373,6 +376,14 @@ export const CATEGORIES = {
|
|
|
373
376
|
],
|
|
374
377
|
depends_on: [],
|
|
375
378
|
},
|
|
379
|
+
skills: {
|
|
380
|
+
// ADR-140 Phase 2b — downloadable methodologies via SEP-2640 bridge.
|
|
381
|
+
// Meta-tool design: list + get, body-load lazy. Skills also reachable
|
|
382
|
+
// as skill:// resources.
|
|
383
|
+
description: "discover and load PICA's named methodologies (catalog-audit, register-my-works, prepare-for-sync, etc.) — triggered by phrases like 'audit my catalog'",
|
|
384
|
+
tools: ["pica_skill_list", "pica_skill_get"],
|
|
385
|
+
depends_on: [],
|
|
386
|
+
},
|
|
376
387
|
account: {
|
|
377
388
|
// ADR-217 — added pica_storage_configure_start + pica_storage_disconnect
|
|
378
389
|
// alongside the existing read tool so layered-discovery flows surface
|
|
@@ -540,6 +551,11 @@ export const CATEGORIES = {
|
|
|
540
551
|
],
|
|
541
552
|
depends_on: [],
|
|
542
553
|
},
|
|
554
|
+
access_simulation: {
|
|
555
|
+
description: "simulate who would see what before mutating — share-link previews and access decisions",
|
|
556
|
+
tools: ["pica_access_simulate"],
|
|
557
|
+
depends_on: [],
|
|
558
|
+
},
|
|
543
559
|
split_sheets: {
|
|
544
560
|
description: "generate, send, and look up split sheets",
|
|
545
561
|
tools: [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"discovery.js","sourceRoot":"","sources":["../../src/tools/discovery.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAkB7D,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAErD,MAAM,cAAc,GAAG,QAAQ,CAAC;AAQhC;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,MAAM,UAAU,GAAuC;IAC5D,KAAK,EAAE;QACL,WAAW,EAAE,2BAA2B;QACxC,KAAK,EAAE;YACL,kBAAkB;YAClB,oBAAoB;YACpB,mBAAmB;YACnB,mBAAmB;YACnB,mBAAmB;YACnB,wBAAwB;YACxB,wBAAwB;YACxB,mBAAmB;YACnB,mDAAmD;YACnD,uDAAuD;YACvD,wBAAwB;SACzB;QACD,UAAU,EAAE,EAAE;KACf;IACD,MAAM,EAAE;QACN,WAAW,EAAE,+BAA+B;QAC5C,KAAK,EAAE;YACL,mBAAmB;YACnB,qBAAqB;YACrB,oBAAoB;YACpB,oBAAoB;YACpB,oBAAoB;YACpB,+BAA+B;YAC/B,uBAAuB;YACvB,0BAA0B;YAC1B,yBAAyB;YACzB,yBAAyB;SAC1B;QACD,UAAU,EAAE,EAAE;KACf;IACD,MAAM,EAAE;QACN,WAAW,EAAE,yDAAyD;QACtE,KAAK,E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c,EAAE,KAAK;iCACtB,EACD,IAAI,EACJ,CAAC,CACF;6BACF;yBACF;wBACD,OAAO,EAAE,IAAI;qBACd,CAAC;gBACJ,CAAC;gBAED,IAAI,CAAC;oBACH,OAAO,MAAM,IAAI,CAAC,aAAa,CAAC,QAAQ,EAAE,QAAQ,EAAE,GAAG,CAAC,CAAC;gBAC3D,CAAC;gBAAC,OAAO,GAAG,EAAE,CAAC;oBACb,MAAM,OAAO,GAAG,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;oBACjE,OAAO;wBACL,OAAO,EAAE;4BACP;gCACE,IAAI,EAAE,MAAM;gCACZ,IAAI,EAAE,IAAI,CAAC,SAAS,CAClB;oCACE,UAAU,EAAE,iBAAiB;oCAC7B,IAAI,EAAE,QAAQ;oCACd,OAAO;oCACP,cAAc,EAAE,KAAK;iCACtB,EACD,IAAI,EACJ,CAAC,CACF;6BACF;yBACF;wBACD,OAAO,EAAE,IAAI;qBACd,CAAC;gBACJ,CAAC;YACH,CAAC;SACF,CAAC;IACJ,CAAC;CACF"}
|
package/dist/tools/index.d.ts
CHANGED
|
@@ -272,6 +272,35 @@ export interface ToolExecutorContext {
|
|
|
272
272
|
server?: Server;
|
|
273
273
|
}
|
|
274
274
|
export type ToolExecutor = (args: Record<string, any>, ctx?: ToolExecutorContext) => Promise<any>;
|
|
275
|
+
/**
|
|
276
|
+
* Sanitize tool parameters for `mcp_audit_log.parameters`. Pure function
|
|
277
|
+
* so it's directly testable; the registry's private method delegates here.
|
|
278
|
+
*
|
|
279
|
+
* Security audit 2026-05-11 P2. The audit log is queryable by anyone with
|
|
280
|
+
* team-portal access. Tools like `pica_sign_in`, `pica_share_links_*`,
|
|
281
|
+
* and `team_comms_send` previously landed bare emails / share tokens /
|
|
282
|
+
* OAuth refresh tokens in the log because the only redaction was a
|
|
283
|
+
* `delete sanitized.confirmation_token` + length truncation.
|
|
284
|
+
*
|
|
285
|
+
* Deny-list is keyed off the param name (case-insensitive substring
|
|
286
|
+
* match) — covers `password`, `api_key`, `token`, `secret`,
|
|
287
|
+
* `authorization`, plus `confirmation_token` via the `token` substring.
|
|
288
|
+
* Sister keys like `refresh_token` / `id_token` / `access_token` /
|
|
289
|
+
* `share_token` / `client_secret` also match.
|
|
290
|
+
*
|
|
291
|
+
* Email values (regardless of param key) get the local-part masked to
|
|
292
|
+
* the first two characters: `jane@example.com` → `ja***@example.com`.
|
|
293
|
+
* Locals ≤ 2 chars become all-asterisk.
|
|
294
|
+
*
|
|
295
|
+
* Strings > 500 chars are truncated to 500 + `...[truncated]`.
|
|
296
|
+
*
|
|
297
|
+
* Exported under `_internal` so test files can exercise the function
|
|
298
|
+
* without instantiating a `ToolRegistry`.
|
|
299
|
+
*/
|
|
300
|
+
declare function sanitizeAuditParams(args: Record<string, any>): Record<string, unknown>;
|
|
301
|
+
export declare const _internal: {
|
|
302
|
+
sanitizeAuditParams: typeof sanitizeAuditParams;
|
|
303
|
+
};
|
|
275
304
|
export declare class ToolRegistry {
|
|
276
305
|
private tools;
|
|
277
306
|
private pica;
|
|
@@ -283,6 +312,17 @@ export declare class ToolRegistry {
|
|
|
283
312
|
constructor(pica: PicaClient | null, config?: ServerConfig, reinitializeCallback?: (apiKey: string) => void, callerContext?: CallerContext, signOutCallback?: () => void);
|
|
284
313
|
setAuditLogger(logger: McpAuditLogger): void;
|
|
285
314
|
setCallerContext(context: CallerContext): void;
|
|
315
|
+
/**
|
|
316
|
+
* Read clientInfo from the MCP `initialize` handshake. SDK populates this
|
|
317
|
+
* on the per-request `Server` for HTTP and on the long-lived `Server` for
|
|
318
|
+
* stdio; either way getClientVersion() returns the same shape after the
|
|
319
|
+
* handshake completes. Returns empty when ctx is absent or the handshake
|
|
320
|
+
* hasn't run (lobby-mode dispatches that bypass the per-request transport).
|
|
321
|
+
*
|
|
322
|
+
* Stamped onto audit rows as provenance only — never used as a permission
|
|
323
|
+
* boundary, since clientInfo is self-declared by the client.
|
|
324
|
+
*/
|
|
325
|
+
private extractClientInfo;
|
|
286
326
|
/**
|
|
287
327
|
* Register all available tools
|
|
288
328
|
*/
|
|
@@ -316,8 +356,8 @@ export declare class ToolRegistry {
|
|
|
316
356
|
*/
|
|
317
357
|
private buildDestructivePreview;
|
|
318
358
|
/**
|
|
319
|
-
* Sanitize tool parameters for audit logging
|
|
320
|
-
*
|
|
359
|
+
* Sanitize tool parameters for audit logging — delegates to the
|
|
360
|
+
* pure-function impl below so it can be exercised directly in tests.
|
|
321
361
|
*/
|
|
322
362
|
private sanitizeParams;
|
|
323
363
|
/**
|
|
@@ -385,4 +425,5 @@ export declare class ToolRegistry {
|
|
|
385
425
|
*/
|
|
386
426
|
executeTool(name: string, args: Record<string, any>, ctx?: ToolExecutorContext): Promise<any>;
|
|
387
427
|
}
|
|
428
|
+
export {};
|
|
388
429
|
//# sourceMappingURL=index.d.ts.map
|