@withpica/mcp-server 2.97.5 → 2.98.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.
Files changed (149) hide show
  1. package/CHANGELOG.md +125 -0
  2. package/README.intro.md +1 -1
  3. package/README.md +7 -3
  4. package/dist/lib/changelog.generated.d.ts +2 -2
  5. package/dist/lib/changelog.generated.d.ts.map +1 -1
  6. package/dist/lib/changelog.generated.js +2 -2
  7. package/dist/lib/changelog.generated.js.map +1 -1
  8. package/dist/prompts/creator-question-atlas.d.ts.map +1 -1
  9. package/dist/prompts/creator-question-atlas.js +23 -0
  10. package/dist/prompts/creator-question-atlas.js.map +1 -1
  11. package/dist/prompts/index.d.ts.map +1 -1
  12. package/dist/prompts/index.js +17 -20
  13. package/dist/prompts/index.js.map +1 -1
  14. package/dist/resources/agent-guide.d.ts.map +1 -1
  15. package/dist/resources/agent-guide.js +3 -1
  16. package/dist/resources/agent-guide.js.map +1 -1
  17. package/dist/resources/required-schemas.generated.d.ts +7 -5
  18. package/dist/resources/required-schemas.generated.d.ts.map +1 -1
  19. package/dist/resources/required-schemas.generated.js +14 -2
  20. package/dist/resources/required-schemas.generated.js.map +1 -1
  21. package/dist/resources/required-schemas.source.d.ts.map +1 -1
  22. package/dist/resources/required-schemas.source.js +8 -1
  23. package/dist/resources/required-schemas.source.js.map +1 -1
  24. package/dist/server-instructions.d.ts +2 -2
  25. package/dist/server-instructions.d.ts.map +1 -1
  26. package/dist/server-instructions.js +1 -1
  27. package/dist/skills/skills.generated.js +5 -5
  28. package/dist/skills/skills.generated.js.map +1 -1
  29. package/dist/tools/agreement-types.d.ts.map +1 -1
  30. package/dist/tools/agreement-types.js +3 -1
  31. package/dist/tools/agreement-types.js.map +1 -1
  32. package/dist/tools/agreements.d.ts.map +1 -1
  33. package/dist/tools/agreements.js +15 -6
  34. package/dist/tools/agreements.js.map +1 -1
  35. package/dist/tools/approvals.d.ts.map +1 -1
  36. package/dist/tools/approvals.js +14 -1
  37. package/dist/tools/approvals.js.map +1 -1
  38. package/dist/tools/arg-aliases.d.ts.map +1 -1
  39. package/dist/tools/arg-aliases.js +12 -0
  40. package/dist/tools/arg-aliases.js.map +1 -1
  41. package/dist/tools/audio-files.d.ts +39 -0
  42. package/dist/tools/audio-files.d.ts.map +1 -1
  43. package/dist/tools/audio-files.js +253 -12
  44. package/dist/tools/audio-files.js.map +1 -1
  45. package/dist/tools/catalog-enums.d.ts +20 -0
  46. package/dist/tools/catalog-enums.d.ts.map +1 -0
  47. package/dist/tools/catalog-enums.js +28 -0
  48. package/dist/tools/catalog-enums.js.map +1 -0
  49. package/dist/tools/credits.d.ts.map +1 -1
  50. package/dist/tools/credits.js +64 -4
  51. package/dist/tools/credits.js.map +1 -1
  52. package/dist/tools/custody-hints.js +2 -2
  53. package/dist/tools/custody-hints.js.map +1 -1
  54. package/dist/tools/custody.d.ts.map +1 -1
  55. package/dist/tools/custody.js +4 -1
  56. package/dist/tools/custody.js.map +1 -1
  57. package/dist/tools/deprecations.d.ts +2 -1
  58. package/dist/tools/deprecations.d.ts.map +1 -1
  59. package/dist/tools/deprecations.js +27 -11
  60. package/dist/tools/deprecations.js.map +1 -1
  61. package/dist/tools/directory.js +2 -2
  62. package/dist/tools/directory.js.map +1 -1
  63. package/dist/tools/discovery.d.ts.map +1 -1
  64. package/dist/tools/discovery.js +13 -3
  65. package/dist/tools/discovery.js.map +1 -1
  66. package/dist/tools/duplicates.d.ts.map +1 -1
  67. package/dist/tools/duplicates.js +66 -18
  68. package/dist/tools/duplicates.js.map +1 -1
  69. package/dist/tools/enrichment.d.ts.map +1 -1
  70. package/dist/tools/enrichment.js +36 -2
  71. package/dist/tools/enrichment.js.map +1 -1
  72. package/dist/tools/import.d.ts.map +1 -1
  73. package/dist/tools/import.js +19 -0
  74. package/dist/tools/import.js.map +1 -1
  75. package/dist/tools/index.d.ts.map +1 -1
  76. package/dist/tools/index.js +44 -4
  77. package/dist/tools/index.js.map +1 -1
  78. package/dist/tools/licensing.d.ts.map +1 -1
  79. package/dist/tools/licensing.js +14 -9
  80. package/dist/tools/licensing.js.map +1 -1
  81. package/dist/tools/metadata.d.ts.map +1 -1
  82. package/dist/tools/metadata.js +52 -12
  83. package/dist/tools/metadata.js.map +1 -1
  84. package/dist/tools/notes.d.ts.map +1 -1
  85. package/dist/tools/notes.js +28 -5
  86. package/dist/tools/notes.js.map +1 -1
  87. package/dist/tools/people.d.ts +5 -1
  88. package/dist/tools/people.d.ts.map +1 -1
  89. package/dist/tools/people.js +8 -1
  90. package/dist/tools/people.js.map +1 -1
  91. package/dist/tools/purchases.d.ts +2 -3
  92. package/dist/tools/purchases.d.ts.map +1 -1
  93. package/dist/tools/purchases.js.map +1 -1
  94. package/dist/tools/recording-attribution-hints.js +1 -1
  95. package/dist/tools/recording-attribution-hints.js.map +1 -1
  96. package/dist/tools/recording-custody.d.ts +3 -1
  97. package/dist/tools/recording-custody.d.ts.map +1 -1
  98. package/dist/tools/recording-custody.js +8 -4
  99. package/dist/tools/recording-custody.js.map +1 -1
  100. package/dist/tools/recovery-hints.d.ts +0 -6
  101. package/dist/tools/recovery-hints.d.ts.map +1 -1
  102. package/dist/tools/recovery-hints.js +73 -15
  103. package/dist/tools/recovery-hints.js.map +1 -1
  104. package/dist/tools/register.d.ts.map +1 -1
  105. package/dist/tools/register.js +2 -1
  106. package/dist/tools/register.js.map +1 -1
  107. package/dist/tools/releases.d.ts.map +1 -1
  108. package/dist/tools/releases.js +7 -4
  109. package/dist/tools/releases.js.map +1 -1
  110. package/dist/tools/rights.d.ts +45 -0
  111. package/dist/tools/rights.d.ts.map +1 -0
  112. package/dist/tools/rights.js +302 -0
  113. package/dist/tools/rights.js.map +1 -0
  114. package/dist/tools/royalties.d.ts +24 -1
  115. package/dist/tools/royalties.d.ts.map +1 -1
  116. package/dist/tools/royalties.js +99 -66
  117. package/dist/tools/royalties.js.map +1 -1
  118. package/dist/tools/section-validation.d.ts +14 -0
  119. package/dist/tools/section-validation.d.ts.map +1 -0
  120. package/dist/tools/section-validation.js +68 -0
  121. package/dist/tools/section-validation.js.map +1 -0
  122. package/dist/tools/selections.d.ts +5 -2
  123. package/dist/tools/selections.d.ts.map +1 -1
  124. package/dist/tools/selections.js +10 -4
  125. package/dist/tools/selections.js.map +1 -1
  126. package/dist/tools/share-links.d.ts.map +1 -1
  127. package/dist/tools/share-links.js +32 -6
  128. package/dist/tools/share-links.js.map +1 -1
  129. package/dist/tools/share-send.d.ts.map +1 -1
  130. package/dist/tools/share-send.js +32 -7
  131. package/dist/tools/share-send.js.map +1 -1
  132. package/dist/tools/signed-split-sheet-preview.d.ts +43 -0
  133. package/dist/tools/signed-split-sheet-preview.d.ts.map +1 -0
  134. package/dist/tools/signed-split-sheet-preview.js +67 -0
  135. package/dist/tools/signed-split-sheet-preview.js.map +1 -0
  136. package/dist/tools/split-sheets.d.ts.map +1 -1
  137. package/dist/tools/split-sheets.js +3 -2
  138. package/dist/tools/split-sheets.js.map +1 -1
  139. package/dist/tools/works.d.ts +9 -1
  140. package/dist/tools/works.d.ts.map +1 -1
  141. package/dist/tools/works.js +194 -64
  142. package/dist/tools/works.js.map +1 -1
  143. package/dist/tools/write-receipt.d.ts +68 -0
  144. package/dist/tools/write-receipt.d.ts.map +1 -0
  145. package/dist/tools/write-receipt.js +64 -0
  146. package/dist/tools/write-receipt.js.map +1 -0
  147. package/package.json +4 -4
  148. package/scripts/build-required-schemas.ts +7 -1
  149. package/server.json +2 -2
@@ -19,7 +19,7 @@
19
19
  * Block playbook: "document the high level of your server"
20
20
  * Lowin: "instructions are context — design them as context"
21
21
  */
22
- export declare const SERVER_INSTRUCTIONS = "withPICA manages music catalog metadata \u2014 works, recordings, people, credits, agreements, rights. Tools are pica_<domain>_<verb>, 300+ of them, from npm as @withpica/mcp-server. Distinct from @picahq/mcp (picaos.com) \u2014 same short name, unrelated.\n\nFirst-call identity: If your auth is a Bearer API key (not a cookie session and not a pica_grant_* token), call pica_introduce_self FIRST with agent_name + optional agent_role / on_behalf_of / model_hint. PICA stamps the declaration onto every audit row that follows so the user can later reconstruct what their agent did. Cookie and pica_grant_* callers are exempt \u2014 your identity is already on file. Declaration is valid 24h per credential.\n\nOn the first user message of a session \u2014 unless it names a single concrete action (e.g. \"register work X\") \u2014 call pica_skill_get(\"first-session\") and follow it.\n\nStart here:\n- pica_dashboard_briefing \u2014 daily summary of what needs attention\n- pica_search_all \u2014 find any entity by name, ISWC, ISRC, or IPI\n- pica_works_query / pica_people_query \u2014 browse the catalog\n- pica_subscription_status \u2014 \"what's my plan / am I paying?\"; pica_billing_pay \u2014 a pay link for residency or a tab. On a connector call them through pica_execute {tool: \"<name>\", args: {...}}\n\nThe catalog is ALWAYS accessible via the tools above \u2014 zero setup, no integration required. Peer-service data (Gmail, Drive, etc.) is reached via cross-MCP composition in the user's AI client, not via PICA \u2014 call pica_works_query directly for catalog content.\n\nSpotify/YouTube URLs: call pica_import_streaming_link (Spotify/Deezer) or pica_import_youtube_link directly.\n\nAfter 3-5 catalog mutations or major state changes, call pica_dashboard_briefing and surface the delta to the user.\n\nKey patterns:\n- Read tools are safe to call freely (readOnlyHint=true)\n- many _inspect tools take a \"sections\" argument (e.g., pica_works_inspect sections: [\"health\", \"completeness\"]) \u2014 check the tool's schema\n- Write tools confirm what changed \u2014 share https://withpica.com/inspect/<feature>/<id> so the user can review (feature: works, people, recordings, releases, agreements; for audio files link the parent work). Destructive tools (delete/merge) need two-step confirmation with a token\n- Errors include \"suggestion\" and \"next_tool\" for recovery\n- Enrichment: use pica_resolve_work / pica_resolve_person / pica_resolve_recording \u2014 fan out over Spotify, MusicBrainz, MLC, ISNI, Discogs, YouTube\n\nRoyalty/streaming statements (PDF/image/xlsx): use pica_statements_pending \u2192 pica_documents_inspect \u2192 pica_statement_ingest_document (imports after owner approval). CSV statements go through pica_import_analyze / pica_import_execute instead.\n\nMost query tools accept \"limit\"; defaults vary \u2014 read the tool's schema. IDs are UUIDs \u2014 use a _query tool first when unsure.\n\nSkills: pica_skill_list discovers methodologies (catalog-audit, register-my-works, prepare-for-sync). pica_skill_get(name) loads one. Trigger phrases like \"audit my catalog\" map directly. Bodies load lazily \u2014 not at handshake.\n\nPeer MCPs (mail, drive, notes, calendar, DAW): when PICA shows gaps, check peers before asking the user; cite via pica_enrichment_propose sources[].url (URI shapes: pica_skill_get(\"enrich-from-peer-mcps\")). Citations persist verbatim and propagate to applied entities.";
22
+ export declare const SERVER_INSTRUCTIONS = "withPICA helps people look after their songs, and everything that comes with them (people, splits, codes, recordings, agreements, files), on their own terms: the user holds the record and decides; PICA remembers and shows what's missing. Asked what PICA is, say that plainly, in their words. Tools are pica_<domain>_<verb>, 300+, from npm as @withpica/mcp-server (not @picahq/mcp, unrelated).\n\nFirst-call identity: If your auth is a Bearer API key (not a cookie session and not a pica_grant_* token), call pica_introduce_self FIRST with agent_name + optional agent_role / on_behalf_of / model_hint. PICA stamps the declaration onto every audit row that follows so the user can later reconstruct what their agent did. Cookie and pica_grant_* callers are exempt \u2014 your identity is already on file. Declaration is valid 24h per credential.\n\nOn the first user message of a session \u2014 unless it names a single concrete action (e.g. \"register work X\") \u2014 call pica_skill_get(\"first-session\") and follow it.\n\nStart here:\n- pica_dashboard_briefing \u2014 daily summary of what needs attention\n- pica_search_all \u2014 find any entity by name, ISWC, ISRC, or IPI\n- pica_works_query / pica_people_query \u2014 browse the catalog\n- pica_subscription_status \u2014 \"what's my plan / am I paying?\"; pica_billing_pay \u2014 a pay link for residency or a tab. On a connector call them through pica_execute {tool: \"<name>\", args: {...}}\n\nThe catalog is ALWAYS accessible via the tools above \u2014 zero setup, no integration required. Peer-service data (Gmail, Drive, etc.) is reached via cross-MCP composition in the user's AI client, not via PICA \u2014 call pica_works_query directly for catalog content.\n\nSpotify/YouTube URLs: call pica_import_streaming_link (Spotify/Deezer) or pica_import_youtube_link directly.\n\nAfter 3-5 catalog mutations or major state changes, call pica_dashboard_briefing and surface the delta to the user.\n\nKey patterns:\n- Read tools are safe to call freely (readOnlyHint=true)\n- many _inspect tools take a \"sections\" argument (e.g., pica_works_inspect sections: [\"health\", \"completeness\"]) \u2014 check the tool's schema\n- Write tools confirm what changed \u2014 share https://withpica.com/inspect/<feature>/<id> so the user can review (feature: works, people, recordings, releases, agreements; for audio files link the parent work). Destructive tools (delete/merge) need two-step confirmation with a token\n- Errors include \"suggestion\" and \"next_tool\" for recovery\n- Enrichment: use pica_resolve_work / pica_resolve_person / pica_resolve_recording \u2014 fan out over Spotify, MusicBrainz, MLC, ISNI, Discogs, YouTube\n\nRoyalty/streaming statements (PDF/image/xlsx): use pica_statements_pending \u2192 pica_documents_inspect \u2192 pica_statement_ingest_document (imports after owner approval). CSV statements go through pica_import_analyze / pica_import_execute instead.\n\nMost query tools accept \"limit\"; defaults vary \u2014 read the tool's schema. IDs are UUIDs \u2014 use a _query tool first when unsure.\n\nSkills: pica_skill_list discovers methodologies (catalog-audit, register-my-works, prepare-for-sync). pica_skill_get(name) loads one. Trigger phrases like \"audit my catalog\" map directly. Bodies load lazily \u2014 not at handshake.\n\nPeer MCPs (mail, drive, notes, calendar, DAW): when PICA shows gaps, check peers before asking the user; cite via pica_enrichment_propose sources[].url (URI shapes: pica_skill_get(\"enrich-from-peer-mcps\")). Citations persist verbatim and propagate to applied entities.";
23
23
  /** Alias for the authenticated default — names the variant explicitly when paired with the unauthenticated one. */
24
24
  /**
25
25
  * How many leading characters of SERVER_INSTRUCTIONS a client was observed to
@@ -31,7 +31,7 @@ export declare const SERVER_INSTRUCTIONS = "withPICA manages music catalog metad
31
31
  * server-instructions.test.ts pins that it does.
32
32
  */
33
33
  export declare const INSTRUCTIONS_OBSERVED_VISIBLE_CHARS = 2000;
34
- export declare const SERVER_INSTRUCTIONS_AUTHENTICATED = "withPICA manages music catalog metadata \u2014 works, recordings, people, credits, agreements, rights. Tools are pica_<domain>_<verb>, 300+ of them, from npm as @withpica/mcp-server. Distinct from @picahq/mcp (picaos.com) \u2014 same short name, unrelated.\n\nFirst-call identity: If your auth is a Bearer API key (not a cookie session and not a pica_grant_* token), call pica_introduce_self FIRST with agent_name + optional agent_role / on_behalf_of / model_hint. PICA stamps the declaration onto every audit row that follows so the user can later reconstruct what their agent did. Cookie and pica_grant_* callers are exempt \u2014 your identity is already on file. Declaration is valid 24h per credential.\n\nOn the first user message of a session \u2014 unless it names a single concrete action (e.g. \"register work X\") \u2014 call pica_skill_get(\"first-session\") and follow it.\n\nStart here:\n- pica_dashboard_briefing \u2014 daily summary of what needs attention\n- pica_search_all \u2014 find any entity by name, ISWC, ISRC, or IPI\n- pica_works_query / pica_people_query \u2014 browse the catalog\n- pica_subscription_status \u2014 \"what's my plan / am I paying?\"; pica_billing_pay \u2014 a pay link for residency or a tab. On a connector call them through pica_execute {tool: \"<name>\", args: {...}}\n\nThe catalog is ALWAYS accessible via the tools above \u2014 zero setup, no integration required. Peer-service data (Gmail, Drive, etc.) is reached via cross-MCP composition in the user's AI client, not via PICA \u2014 call pica_works_query directly for catalog content.\n\nSpotify/YouTube URLs: call pica_import_streaming_link (Spotify/Deezer) or pica_import_youtube_link directly.\n\nAfter 3-5 catalog mutations or major state changes, call pica_dashboard_briefing and surface the delta to the user.\n\nKey patterns:\n- Read tools are safe to call freely (readOnlyHint=true)\n- many _inspect tools take a \"sections\" argument (e.g., pica_works_inspect sections: [\"health\", \"completeness\"]) \u2014 check the tool's schema\n- Write tools confirm what changed \u2014 share https://withpica.com/inspect/<feature>/<id> so the user can review (feature: works, people, recordings, releases, agreements; for audio files link the parent work). Destructive tools (delete/merge) need two-step confirmation with a token\n- Errors include \"suggestion\" and \"next_tool\" for recovery\n- Enrichment: use pica_resolve_work / pica_resolve_person / pica_resolve_recording \u2014 fan out over Spotify, MusicBrainz, MLC, ISNI, Discogs, YouTube\n\nRoyalty/streaming statements (PDF/image/xlsx): use pica_statements_pending \u2192 pica_documents_inspect \u2192 pica_statement_ingest_document (imports after owner approval). CSV statements go through pica_import_analyze / pica_import_execute instead.\n\nMost query tools accept \"limit\"; defaults vary \u2014 read the tool's schema. IDs are UUIDs \u2014 use a _query tool first when unsure.\n\nSkills: pica_skill_list discovers methodologies (catalog-audit, register-my-works, prepare-for-sync). pica_skill_get(name) loads one. Trigger phrases like \"audit my catalog\" map directly. Bodies load lazily \u2014 not at handshake.\n\nPeer MCPs (mail, drive, notes, calendar, DAW): when PICA shows gaps, check peers before asking the user; cite via pica_enrichment_propose sources[].url (URI shapes: pica_skill_get(\"enrich-from-peer-mcps\")). Citations persist verbatim and propagate to applied entities.";
34
+ export declare const SERVER_INSTRUCTIONS_AUTHENTICATED = "withPICA helps people look after their songs, and everything that comes with them (people, splits, codes, recordings, agreements, files), on their own terms: the user holds the record and decides; PICA remembers and shows what's missing. Asked what PICA is, say that plainly, in their words. Tools are pica_<domain>_<verb>, 300+, from npm as @withpica/mcp-server (not @picahq/mcp, unrelated).\n\nFirst-call identity: If your auth is a Bearer API key (not a cookie session and not a pica_grant_* token), call pica_introduce_self FIRST with agent_name + optional agent_role / on_behalf_of / model_hint. PICA stamps the declaration onto every audit row that follows so the user can later reconstruct what their agent did. Cookie and pica_grant_* callers are exempt \u2014 your identity is already on file. Declaration is valid 24h per credential.\n\nOn the first user message of a session \u2014 unless it names a single concrete action (e.g. \"register work X\") \u2014 call pica_skill_get(\"first-session\") and follow it.\n\nStart here:\n- pica_dashboard_briefing \u2014 daily summary of what needs attention\n- pica_search_all \u2014 find any entity by name, ISWC, ISRC, or IPI\n- pica_works_query / pica_people_query \u2014 browse the catalog\n- pica_subscription_status \u2014 \"what's my plan / am I paying?\"; pica_billing_pay \u2014 a pay link for residency or a tab. On a connector call them through pica_execute {tool: \"<name>\", args: {...}}\n\nThe catalog is ALWAYS accessible via the tools above \u2014 zero setup, no integration required. Peer-service data (Gmail, Drive, etc.) is reached via cross-MCP composition in the user's AI client, not via PICA \u2014 call pica_works_query directly for catalog content.\n\nSpotify/YouTube URLs: call pica_import_streaming_link (Spotify/Deezer) or pica_import_youtube_link directly.\n\nAfter 3-5 catalog mutations or major state changes, call pica_dashboard_briefing and surface the delta to the user.\n\nKey patterns:\n- Read tools are safe to call freely (readOnlyHint=true)\n- many _inspect tools take a \"sections\" argument (e.g., pica_works_inspect sections: [\"health\", \"completeness\"]) \u2014 check the tool's schema\n- Write tools confirm what changed \u2014 share https://withpica.com/inspect/<feature>/<id> so the user can review (feature: works, people, recordings, releases, agreements; for audio files link the parent work). Destructive tools (delete/merge) need two-step confirmation with a token\n- Errors include \"suggestion\" and \"next_tool\" for recovery\n- Enrichment: use pica_resolve_work / pica_resolve_person / pica_resolve_recording \u2014 fan out over Spotify, MusicBrainz, MLC, ISNI, Discogs, YouTube\n\nRoyalty/streaming statements (PDF/image/xlsx): use pica_statements_pending \u2192 pica_documents_inspect \u2192 pica_statement_ingest_document (imports after owner approval). CSV statements go through pica_import_analyze / pica_import_execute instead.\n\nMost query tools accept \"limit\"; defaults vary \u2014 read the tool's schema. IDs are UUIDs \u2014 use a _query tool first when unsure.\n\nSkills: pica_skill_list discovers methodologies (catalog-audit, register-my-works, prepare-for-sync). pica_skill_get(name) loads one. Trigger phrases like \"audit my catalog\" map directly. Bodies load lazily \u2014 not at handshake.\n\nPeer MCPs (mail, drive, notes, calendar, DAW): when PICA shows gaps, check peers before asking the user; cite via pica_enrichment_propose sources[].url (URI shapes: pica_skill_get(\"enrich-from-peer-mcps\")). Citations persist verbatim and propagate to applied entities.";
35
35
  /**
36
36
  * Returns the authenticated handshake instructions.
37
37
  *
@@ -1 +1 @@
1
- {"version":3,"file":"server-instructions.d.ts","sourceRoot":"","sources":["../src/server-instructions.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,mBAAmB,s4GA+B6O,CAAC;AAE9Q,mHAAmH;AACnH;;;;;;;;GAQG;AACH,eAAO,MAAM,mCAAmC,OAAO,CAAC;AAExD,eAAO,MAAM,iCAAiC,s4GAAsB,CAAC;AAErE;;;;;;;;;GASG;AACH,wBAAgB,4BAA4B,IAAI,MAAM,CAErD;AAED;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,mCAAmC,iwBAM2M,CAAC"}
1
+ {"version":3,"file":"server-instructions.d.ts","sourceRoot":"","sources":["../src/server-instructions.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,mBAAmB,8gHA+B6O,CAAC;AAE9Q,mHAAmH;AACnH;;;;;;;;GAQG;AACH,eAAO,MAAM,mCAAmC,OAAO,CAAC;AAExD,eAAO,MAAM,iCAAiC,8gHAAsB,CAAC;AAErE;;;;;;;;;GASG;AACH,wBAAgB,4BAA4B,IAAI,MAAM,CAErD;AAED;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,mCAAmC,iwBAM2M,CAAC"}
@@ -20,7 +20,7 @@
20
20
  * Block playbook: "document the high level of your server"
21
21
  * Lowin: "instructions are context — design them as context"
22
22
  */
23
- export const SERVER_INSTRUCTIONS = `withPICA manages music catalog metadata — works, recordings, people, credits, agreements, rights. Tools are pica_<domain>_<verb>, 300+ of them, from npm as @withpica/mcp-server. Distinct from @picahq/mcp (picaos.com) — same short name, unrelated.
23
+ export const SERVER_INSTRUCTIONS = `withPICA helps people look after their songs, and everything that comes with them (people, splits, codes, recordings, agreements, files), on their own terms: the user holds the record and decides; PICA remembers and shows what's missing. Asked what PICA is, say that plainly, in their words. Tools are pica_<domain>_<verb>, 300+, from npm as @withpica/mcp-server (not @picahq/mcp, unrelated).
24
24
 
25
25
  First-call identity: If your auth is a Bearer API key (not a cookie session and not a pica_grant_* token), call pica_introduce_self FIRST with agent_name + optional agent_role / on_behalf_of / model_hint. PICA stamps the declaration onto every audit row that follows so the user can later reconstruct what their agent did. Cookie and pica_grant_* callers are exempt — your identity is already on file. Declaration is valid 24h per credential.
26
26
 
@@ -49,12 +49,12 @@ export const SKILLS = {
49
49
  },
50
50
  "enrich-from-peer-mcps": {
51
51
  name: "enrich-from-peer-mcps",
52
- 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.",
53
- 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", "find emails for my people from my gmail", "fill in missing contact emails for collaborators", "back-fill emails for needs_email people"],
52
+ description: "Fill PICA catalog gaps by composing across the user's other connected MCPs (Gmail, Drive, Notion, Telegram, calendar, DAW) and public registries on the web (ISWC Net, the MLC public search, society repertoire searches, Discogs / MusicBrainz credits). The cross-MCP integration workflow — PICA doesn't manage peer connections, but enrichment can consume sources cited from them via pica_enrichment_propose.",
53
+ 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", "find emails for my people from my gmail", "fill in missing contact emails for collaborators", "back-fill emails for needs_email people", "look up my missing ISWCs", "find the credits for this song online"],
54
54
  audience: "power user with multiple MCPs connected / agency / multi-artist manager",
55
55
  tools_required: ["pica_works_inspect", "pica_works_query", "pica_people_query", "pica_enrichment_propose", "pica_enrichment_proposals_list"],
56
56
  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.",
57
- 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:\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| Missing person email (`needs_email` people) | Gmail | Two-way correspondence where the address belongs to the person — see the email-backfill rules below |\n\nThis is a routing guide, not a prescription. The user knows their workflow — defer to them about which MCP to check.\n\n### Person email backfill (a common, footgun-prone case)\n\nFilling missing emails for `needs_email` people is the same propose-only flow — `email` is a first-class enrichable field, so a Gmail-sourced address lands via `pica_enrichment_propose` (entity_type `person`) with a `gmail://` source citation, then the user reviews. Two extra rules, because a wrong email on a rights-holder is worse than a blank one:\n\n- **Score the address, don't take the first hit.** Strongest: the address literally contains the person's name AND they are a direct sender/recipient in two-way correspondence. Weaker: name-inferred address, or a role address (`info@`/`team@`). Reject: the name only appears in the body, the sender is a third party (management, box office, a newsletter), or it's a recurring unrelated distribution thread (a reliable \"no real hit\" tell).\n- **Check for a collision first.** Before proposing, call `pica_people_query` for the candidate address — if it already sits on another person, do NOT assign it; flag the conflict for the user. (This dedup-collision check is the one thing the agent can't eyeball from Gmail alone.)\n\nNever auto-write — propose, the user confirms.\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",
57
+ 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:\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 (or cite the page's plain `https://` URL) |\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\nFor a missing ISWC, read `completeness.iswc_gap.status` first. `likely_exists_unmatched` means a society registration or work code is on file, so an ISWC almost certainly exists and only needs finding — the public-web route below is the quickest. `not_found` means PICA has no ISWC and no registration on file; it does NOT mean the work is unregistered, so check before telling the user it needs registering.\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| Missing person email (`needs_email` people) | Gmail | Two-way correspondence where the address belongs to the person — see the email-backfill rules below |\n| Missing ISWC (esp. `iswc_gap.status: likely_exists_unmatched`), writer IPI, or credits | Public web (the agent's own web search / fetch) | ISWC Net, the MLC public search, the registering society's public repertoire search, Discogs / MusicBrainz credits, the label's release page, liner notes — see the public-web rules below |\n\nThis is a routing guide, not a prescription. The user knows their workflow — defer to them about which MCP to check.\n\n### Person email backfill (a common, footgun-prone case)\n\nFilling missing emails for `needs_email` people is the same propose-only flow — `email` is a first-class enrichable field, so a Gmail-sourced address lands via `pica_enrichment_propose` (entity_type `person`) with a `gmail://` source citation, then the user reviews. Two extra rules, because a wrong email on a rights-holder is worse than a blank one:\n\n- **Score the address, don't take the first hit.** Strongest: the address literally contains the person's name AND they are a direct sender/recipient in two-way correspondence. Weaker: name-inferred address, or a role address (`info@`/`team@`). Reject: the name only appears in the body, the sender is a third party (management, box office, a newsletter), or it's a recurring unrelated distribution thread (a reliable \"no real hit\" tell).\n- **Check for a collision first.** Before proposing, call `pica_people_query` for the candidate address — if it already sits on another person, do NOT assign it; flag the conflict for the user. (This dedup-collision check is the one thing the agent can't eyeball from Gmail alone.)\n\nNever auto-write — propose, the user confirms.\n\n### Public-web research (ISWC, IPI, credits)\n\nOnly when the user has asked for enrichment — \"look up my ISWCs\", \"fill the gaps on track X\". A gap on its own is not a request to go searching.\n\n- **Where to look.** ISWC Net (the ISWC agency network's public search) and the MLC public search list ISWCs and writers; a society's public repertoire search lists the works it administers; Discogs and MusicBrainz carry credits; label release pages and liner notes carry both.\n- **Match before you propose.** Propose a value only when the page shows it for THIS work: the title matches AND at least one writer on file matches. A title-only hit is a question for the user, not a proposal — common titles collide.\n- **Cite the page itself.** `sources[].url` is the exact page (`https://…` or `web://https://…`), with `accessed_at` set to when you read it. Never cite a search engine results page, and never cite a page you did not open.\n- **Nothing found is not a finding.** If the search comes back empty, say you didn't find it — don't record \"not registered\", and don't guess a value.\n- **File via `pica_enrichment_propose`**, one work at a time; the user reviews and applies.\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- `entity_type` and `entity_id` — the work, recording or person being enriched\n- `proposed_fields` — the proposed value(s)\n- `sources` — each entry a `url` (using the appropriate URI scheme), the `fields` it sources, and `accessed_at` (ISO 8601). Every key in `proposed_fields` must be named by at least one source.\n\nExample shape:\n\n```json\n{\n \"entity_type\": \"work\",\n \"entity_id\": \"uuid\",\n \"proposed_fields\": { \"iswc\": \"T-123.456.789-0\" },\n \"sources\": [\n {\n \"url\": \"gmail://thread/abc123\",\n \"fields\": [\"iswc\"],\n \"accessed_at\": \"2026-09-25T10:00:00Z\"\n }\n ]\n}\n```\n\nThe URI is opaque to PICA — it is recorded as provenance so the user can see where the value came from.\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",
58
58
  },
59
59
  "first-session": {
60
60
  name: "first-session",
@@ -63,7 +63,7 @@ export const SKILLS = {
63
63
  audience: "any agent connecting to PICA via MCP, especially on the first message of a session",
64
64
  tools_required: ["pica_get_agent_activity", "pica_dashboard_briefing", "pica_dashboard_attention", "pica_skill_list", "pica_report_issue", "pica_memory_list", "pica_memory_save", "pica_import_streaming_link", "pica_import_youtube_link"],
65
65
  output: "Open by knowing (or learning, with at most one question) what the user is working toward; one line on who's acting for them; the few things most needing attention from the briefing; then one calibrated offer — the most worthwhile next move for THEIR goal and the specialist skill behind it — leaving the user to choose.",
66
- body: "# first-session\n\nThe user just arrived — \"morning\", \"what should I do\", \"open my workspace\", or a quiet first message that names no task. They don't yet know what's waiting for them. Get them oriented fast and hand them one clear next move.\n\nThis skill finds what matters and offers it. It does NOT do the work — no auditing credits, registering a work, or preparing for sync here. It surfaces the most worthwhile next move and names the specialist skill behind it; the user decides where to start. This is the map, not the journey.\n\nRun it when the first message is an orientation phrase (\"morning\", \"where do I start\", \"what should I do\", \"open my workspace\") — not when the user names a single concrete action like \"register work X\" or \"log yesterday's session\". A task-specific prompt skips orientation; go straight to the work.\n\nWhere `set-up-workspace` helps a user configure a new account, `first-session` helps them re-enter an existing one and pick up where the catalog needs them.\n\nSix quick beats, none of them a wall of text: know why they're here, who's acting for the user, the standing reporting-discipline note, load what needs attention, rank and offer the top move for THEIR goal, and a clean sweep at close-out.\n\n## Phase 0 — Know why they're here\n\nPICA's organizing question is: **who does this org want to be on the other side — what do they value?** That question is your internal lens. Never ask it out loud; people describe problems, not aspirations. You ask concrete things and infer.\n\nFirst, read before asking: call `pica_memory_list` and look for the org-scoped key `org_intent`. Then branch:\n\n- **The goal is on file** → open by continuing it, not re-asking:\n > _\"last time the target was [goal in the user's words] — still the mission, or has it moved?\"_\n- **No goal on file, and the user opened with a concrete ask** (\"import this album\", \"register work X\") → do the ask FIRST. The most valuable thing for the user always comes before any question about them. Infer the goal from what they asked for, and persist it after the work lands (see the persist beat below).\n- **No goal on file, vague opening** (\"morning\", \"what should I do\") → ask exactly ONE question, in PICA voice:\n > _\"what are you working toward with your music right now?\"_\n\n One question, then move — whatever they answer, the briefing load below still runs; their answer just decides what you lead with.\n\n**The persist beat.** Once there's a real signal — from their answer, their ask, or the session's work — save it so the next session (any client, any agent) starts already knowing. Call `pica_memory_save` with:\n\n- `key`: `org_intent`\n- `scope`: `organisation`\n- `type`: `decision`\n- `content`: plain language, three short lines where known — `wants:` (the outcome in the user's words), `context:` (who they are, catalog shape, how they release), `horizon:` (any date or moment they named)\n\nRe-save the same key whenever the goal visibly changes or is achieved — it's one converging record, not a log. Never save a guess you're not confident in: ask, or leave it for next time. And when the goal is achieved, say so plainly and either propose the next feasible milestone or ask what the new target is — then re-save.\n\n## Phase 1 — Who's at the keyboard\n\nBefore any work, make sure the user knows who's acting for them. Read your own auth shape first — `pica_get_agent_activity` is session-auth only and refuses `pica_grant_*` callers with `session_auth_required`, so a delegated agent must never call it:\n\n- **You are a delegated agent** (your own credential is a `pica_grant_*` token): skip `pica_get_agent_activity` entirely — no tool today exposes a grant's own label/scope/last-active back to the grant holder, so don't attempt to fill those in. Say:\n > _\"you're working through a named agent connection here.\"_\n- **Acting directly** (cookie or API key — not a grant token): call `pica_get_agent_activity` once. It surfaces what *other* named agents have done on the user's behalf (not a description of this session) — use it to mention any recent delegated-agent activity if rows come back, otherwise:\n > _\"you're acting as yourself directly. if you'd ever want to hand specific work to a named agent, you can set one up from the web — just say the word.\"_\n\n (agent note: the path is `pica_create_agent_identity`, session-auth only, from the web.)\n- **Through a connector** (OAuth client, identified by `client_name`):\n > _\"you're connected through [client_name].\"_\n\nOne line, warm, no résumé. The point is trust — the user knows whose hands are on the catalog before anything moves.\n\n## Phase 2 — Reporting-discipline opening note\n\nOne standing paragraph, read at the top of every first session:\n\n> Throughout this session, if a tool errors, returns inconsistent data, or you cannot find an affordance you expect — file via `pica_report_issue`. The team treats agent-filed issues as P0 signal and dedupes by signature. Worth filing: tool errors with stable repro, schema gaps (e.g. _\"no first-class studio field on recordings\"_), missing skills, surprising defaults. Include request IDs where available.\n\nThis sets the contract early. The agent doing the work is the user reporting the gap — surface that loop at the start, not at the end.\n\n## Phase 3 — Load what needs attention\n\nTwo reads, in order:\n\n1. `pica_dashboard_briefing` — the headline counts, what's critical, recent activity, the top things needing attention\n2. `pica_dashboard_attention` — the actual rows behind those counts, with entity IDs to drill into\n\nThat's the whole default load. Don't call `pica_count_explain` unless a number looks surprising — it's a drill-down, not a default. If the briefing comes back empty (fresh org, no works or people yet), skip ranking and lead your opening message with the import offer itself: ask for a spotify album or playlist link (or a youtube link) and run `pica_import_streaming_link` / `pica_import_youtube_link` on it directly. Artist links are not supported, so ask for an album or playlist. Load `import-my-catalog` for the mechanics and for csv/statement paths. Getting music in beats configuring settings on an empty catalog.\n\n## Phase 4 — Rank, then offer one move\n\nMatch the live briefing against the routing map and rank by how much the user gets for the effort — usually `count × value`. 1,200 works missing credits outranks 3 pending statements on volume alone; but one large royalty cheque waiting to be reconciled can outrank a long tail of small gaps. Use judgement, and say why in a clause.\n\n**The goal is the tiebreaker and the frame.** When an `org_intent` is on file (Phase 0), rank for THEIR outcome, not the generic severity order — three recordings missing writers outranks everything else when the stated goal is \"get the EP registered and paid\", and the offer says so in their words: _\"you said the target is [goal] — [a] is what's standing between you and it.\"_ A gap unrelated to the goal still gets named, but it doesn't lead.\n\n| What the briefing shows | Specialist skill |\n| ------------------------------------------- | -------------------------- |\n| Works without credits | `audit-credits` |\n| Audio pending analysis | `prepare-for-sync` |\n| Unenriched or unverified writers | `close-the-loop` |\n| Works without registrations | `register-my-works` |\n| Recordings without splits | `set-recording-splits` |\n| Pending PRO statement to reconcile | `reconcile-pro-statement` |\n| Unregistered co-write in a recent source | `register-co-write` |\n| Session to log or pre-stage | `log-a-session` |\n| Sync brief to match | `match-sync-brief` |\n| Unconnected collaborators or stale contacts | _deferred — separate spec_ |\n| AI-disclosure or provenance gaps | _deferred — separate spec_ |\n\nSome of these composition skills (`reconcile-pro-statement`, `register-co-write`, `match-sync-brief`) ship in sequence and may not be live yet — call `pica_skill_list` once after Phase 3 to see which are.\n\nThen surface the top few and offer the lead — one calibrated question, with room for the user's own priority:\n\n> _\"here's what's stacking up: [a] ([n] of them), then [b] and [c]. [a] looks most worth your time — [why in a clause]. want me to start there, or is something else on your mind?\"_\n\nName the skill, make the offer, and stop. Don't start the specialist skill yourself — the user picks the next move.\n\nIf the lead move needs a skill that isn't live yet, surface it anyway with the manual path:\n\n> _\"that one's on its way — for now the manual path is [one-line workflow]. want me to walk you through it, or move to [next priority]?\"_\n\nNever skip a priority silently just because its skill hasn't shipped — naming it shows the user where things are heading.\n\n## Phase 5 — Close-out sweep\n\nWhen the user signals they're done (\"that's it for today\", \"I'm done\", \"good night\"), ask once before wrapping:\n\n> _\"anything today that felt broken or caught you off guard? happy to flag it for the team while it's fresh — or we can leave it.\"_\n\nFile anything they raise via `pica_report_issue` with request IDs and the call shape. This bookends Phase 2: the contract you set at the start becomes one deliberate check at the end.\n\nIf the session's work moved the stated goal materially — a milestone landed, or the goal itself shifted in conversation — close the loop against it: name what moved in the user's words, and re-save `org_intent` (Phase 0's persist beat) so the next session opens from the new state, not the old one.\n\n## Asking the user — the question library\n\nEvery question this skill (or any specialist skill it routes to) puts to the user follows the same grammar. These patterns are the distilled subset of PICA's voice contract; they apply even where a tool output carries no `decision` block.\n\n- **Open over closed.** Decision points open with how/what — _\"what would you like to happen to the older copy?\"_ — never a bare yes/no over something the user can't recognise.\n- **Label a diagnosis before delivering it.** _\"it seems like these two entries are the same song — one came in from Spotify, one from your upload.\"_ The label invites correction; a flat assertion invites defensiveness.\n- **No-oriented safety on destructive moves.** _\"would it be wrong to fold these two copies together? nothing is deleted — the older one's history moves across.\"_ \"No\" must be a safe, complete answer.\n- **Options carry consequences.** Never name a choice without saying what happens: _\"keep both (they'll stay listed separately), or fold them together (one entry, both histories).\"_ At most three options; always name the safe default.\n- **Stakes only on verified facts.** A confirmed problem may state plainly what it costs the user — and cites what was checked and when. An unchecked gap stays curious — _\"we don't know yet whether this one's registered — want us to check?\"_ — never fear. If PICA hasn't verified it, don't claim it.\n- **The user's words, never the system's.** Titles and human facts (\"the one from the march upload\"), never identifiers, table names, or status enums.\n\nWorked examples:\n\n| Moment | Ask it like this |\n| ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| Two copies of the same song | _\"these two look like the same recording — one from Spotify, one from your upload. would it be wrong to fold them into one? nothing is deleted; the upload's history moves across.\"_ |\n| Unchecked registration gap | _\"we haven't checked whether this song is registered anywhere — want us to look it up with the MLC?\"_ |\n| Confirmed missing registration | _\"this song is earning but its registration is confirmed missing — we checked the MLC on the date shown. registering it is how those royalties get claimed. want to start there?\"_ |\n| Offering the ranked lead (Phase 4) | _\"here's what's stacking up: [a] ([n] of them), then [b] and [c]. [a] looks most worth your time — [why in a clause]. want me to start there, or is something else on your mind?\"_ |\n\n## What not to do\n\n- Don't run the phases as one wall of text — Phase 0 is at most one question, Phase 1 is a line, Phase 3 is two calls, Phase 4 is one offer.\n- Don't ask \"who do you want to be\" or any aspiration-shaped question — that's the internal lens, not a prompt. Ask what they're working toward; infer the rest.\n- Don't gate an import or a concrete request behind the Phase 0 question — value first, understanding alongside.\n- Don't re-ask a goal that's already on file — continue it, and only re-open it when the user signals it changed.\n- Don't start the specialist skill after Phase 4 — name it, offer it, wait.\n- Don't call `pica_count_explain` by default — only when a number looks off.\n- Don't offer a skill that isn't in `pica_skill_list` yet without the manual-path line — silent skips hide where the product is heading.\n- Don't speak in system terms (\"attention queue\", \"issue-class\", \"priority by class\") — say what the user would say (\"the things needing your attention\").\n- Don't ask a bare yes/no over something the user can't recognise — use the question library above.\n\n## Follow-on skills\n\nOrder depends on the top-ranked priority:\n\n- `audit-credits` — when \"works without credits\" tops the list\n- `prepare-for-sync` — when \"audio pending analysis\" tops the list\n- `close-the-loop` — when \"unenriched or unverified writers\" or per-work cleanup tops the list\n- `register-my-works` — when \"works without registrations\" tops the list\n- `set-recording-splits` — when \"recordings without splits\" tops the list\n- `catalog-modelling` — when the briefing shows duplicate-title works or blank-ISWC variants that should be folded into one work\n- `import-my-catalog` — when the briefing is empty (fresh org, no catalog yet): make the paste-a-link import offer in your opening message and use this skill for the mechanics; `set-up-workspace` is settings/identifiers, not import — only route there once music exists or the user asks for setup specifically\n- composition skills (`reconcile-pro-statement`, `register-co-write`, `log-a-session`, `match-sync-brief`) — as they ship; check `pica_skill_list` first\n",
66
+ body: "# first-session\n\nThe user just arrived — \"morning\", \"what should I do\", \"open my workspace\", or a quiet first message that names no task. They don't yet know what's waiting for them. Get them oriented fast and hand them one clear next move.\n\nThis skill finds what matters and offers it. It does NOT do the work — no auditing credits, registering a work, or preparing for sync here. It surfaces the most worthwhile next move and names the specialist skill behind it; the user decides where to start. This is the map, not the journey.\n\nRun it when the first message is an orientation phrase (\"morning\", \"where do I start\", \"what should I do\", \"open my workspace\") — not when the user names a single concrete action like \"register work X\" or \"log yesterday's session\". A task-specific prompt skips orientation; go straight to the work.\n\nWhere `set-up-workspace` helps a user configure a new account, `first-session` helps them re-enter an existing one and pick up where the catalog needs them.\n\nIf the user asks what PICA is, or what it's for, answer in one or two plain lines before anything else:\n\n> _\"pica helps you look after your songs, and everything that comes with them (who made them, the splits, the codes, the recordings, the agreements, the files), on your own terms. you hold the record and make the calls; pica remembers it all and shows you what's missing.\"_\n\nThen make it concrete with one of THEIR songs by title if they have any. Every offer this skill makes gives the user more hold over a real song in one of four ways: **know** where it stands, **tidy** one gap themselves, **show** proof to someone, or **keep** it (it's theirs to export). Never answer with a feature list or a tool count.\n\nSix quick beats, none of them a wall of text: know why they're here, who's acting for the user, the standing reporting-discipline note, load what needs attention, rank and offer the top move for THEIR goal, and a clean sweep at close-out.\n\n## Phase 0 — Know why they're here\n\nPICA's organizing question is: **who does this org want to be on the other side — what do they value?** That question is your internal lens. Never ask it out loud; people describe problems, not aspirations. You ask concrete things and infer.\n\nFirst, read before asking: call `pica_memory_list` and look for the org-scoped key `org_intent`. Then branch:\n\n- **The goal is on file** → open by continuing it, not re-asking:\n > _\"last time the target was [goal in the user's words] — still the mission, or has it moved?\"_\n- **No goal on file, and the user opened with a concrete ask** (\"import this album\", \"register work X\") → do the ask FIRST. The most valuable thing for the user always comes before any question about them. Infer the goal from what they asked for, and persist it after the work lands (see the persist beat below).\n- **No goal on file, vague opening** (\"morning\", \"what should I do\") → ask exactly ONE question, in PICA voice:\n > _\"what are you working toward with your music right now?\"_\n\n One question, then move — whatever they answer, the briefing load below still runs; their answer just decides what you lead with.\n\n**The persist beat.** Once there's a real signal — from their answer, their ask, or the session's work — save it so the next session (any client, any agent) starts already knowing. Call `pica_memory_save` with:\n\n- `key`: `org_intent`\n- `scope`: `organisation`\n- `type`: `decision`\n- `content`: plain language, three short lines where known — `wants:` (the outcome in the user's words), `context:` (who they are, catalog shape, how they release), `horizon:` (any date or moment they named)\n\nRe-save the same key whenever the goal visibly changes or is achieved — it's one converging record, not a log. Never save a guess you're not confident in: ask, or leave it for next time. And when the goal is achieved, say so plainly and either propose the next feasible milestone or ask what the new target is — then re-save.\n\n## Phase 1 — Who's at the keyboard\n\nBefore any work, make sure the user knows who's acting for them. Read your own auth shape first — `pica_get_agent_activity` is session-auth only and refuses `pica_grant_*` callers with `session_auth_required`, so a delegated agent must never call it:\n\n- **You are a delegated agent** (your own credential is a `pica_grant_*` token): skip `pica_get_agent_activity` entirely — no tool today exposes a grant's own label/scope/last-active back to the grant holder, so don't attempt to fill those in. Say:\n > _\"you're working through a named agent connection here.\"_\n- **Acting directly** (cookie or API key — not a grant token): call `pica_get_agent_activity` once. It surfaces what *other* named agents have done on the user's behalf (not a description of this session) — use it to mention any recent delegated-agent activity if rows come back, otherwise:\n > _\"you're acting as yourself directly. if you'd ever want to hand specific work to a named agent, you can set one up from the web — just say the word.\"_\n\n (agent note: the path is `pica_create_agent_identity`, session-auth only, from the web.)\n- **Through a connector** (OAuth client, identified by `client_name`):\n > _\"you're connected through [client_name].\"_\n\nOne line, warm, no résumé. The point is trust — the user knows whose hands are on the catalog before anything moves.\n\n## Phase 2 — Reporting-discipline opening note\n\nOne standing paragraph, read at the top of every first session:\n\n> Throughout this session, if a tool errors, returns inconsistent data, or you cannot find an affordance you expect — file via `pica_report_issue`. The team treats agent-filed issues as P0 signal and dedupes by signature. Worth filing: tool errors with stable repro, schema gaps (e.g. _\"no first-class studio field on recordings\"_), missing skills, surprising defaults. Include request IDs where available.\n\nThis sets the contract early. The agent doing the work is the user reporting the gap — surface that loop at the start, not at the end.\n\n## Phase 3 — Load what needs attention\n\nTwo reads, in order:\n\n1. `pica_dashboard_briefing` — the headline counts, what's critical, recent activity, the top things needing attention\n2. `pica_dashboard_attention` — the actual rows behind those counts, with entity IDs to drill into\n\nThat's the whole default load. Don't call `pica_count_explain` unless a number looks surprising — it's a drill-down, not a default. If the briefing comes back empty (fresh org, no works or people yet), skip ranking and lead your opening message with the import offer itself: ask for a spotify album or playlist link (or a youtube link) and run `pica_import_streaming_link` / `pica_import_youtube_link` on it directly. Artist links are not supported, so ask for an album or playlist. Load `import-my-catalog` for the mechanics and for csv/statement paths. Getting music in beats configuring settings on an empty catalog.\n\n## Phase 4 — Rank, then offer one move\n\nMatch the live briefing against the routing map and rank by how much the user gets for the effort — usually `count × value`. 1,200 works missing credits outranks 3 pending statements on volume alone; but one large royalty cheque waiting to be reconciled can outrank a long tail of small gaps. Use judgement, and say why in a clause.\n\n**The goal is the tiebreaker and the frame.** When an `org_intent` is on file (Phase 0), rank for THEIR outcome, not the generic severity order — three recordings missing writers outranks everything else when the stated goal is \"get the EP registered and paid\", and the offer says so in their words: _\"you said the target is [goal] — [a] is what's standing between you and it.\"_ A gap unrelated to the goal still gets named, but it doesn't lead.\n\n| What the briefing shows | Specialist skill |\n| ------------------------------------------- | -------------------------- |\n| Works without credits | `audit-credits` |\n| Audio pending analysis | `prepare-for-sync` |\n| Unenriched or unverified writers | `close-the-loop` |\n| Works without registrations | `register-my-works` |\n| Recordings without splits | `set-recording-splits` |\n| Pending PRO statement to reconcile | `reconcile-pro-statement` |\n| Unregistered co-write in a recent source | `register-co-write` |\n| Session to log or pre-stage | `log-a-session` |\n| Sync brief to match | `match-sync-brief` |\n| Unconnected collaborators or stale contacts | _deferred — separate spec_ |\n| AI-disclosure or provenance gaps | _deferred — separate spec_ |\n\nSome of these composition skills (`reconcile-pro-statement`, `register-co-write`, `match-sync-brief`) ship in sequence and may not be live yet — call `pica_skill_list` once after Phase 3 to see which are.\n\nThen surface the top few and offer the lead — one calibrated question, with room for the user's own priority:\n\n> _\"here's what's stacking up: [a] ([n] of them), then [b] and [c]. [a] looks most worth your time — [why in a clause]. want me to start there, or is something else on your mind?\"_\n\nName the skill, make the offer, and stop. Don't start the specialist skill yourself — the user picks the next move.\n\nIf the lead move needs a skill that isn't live yet, surface it anyway with the manual path:\n\n> _\"that one's on its way — for now the manual path is [one-line workflow]. want me to walk you through it, or move to [next priority]?\"_\n\nNever skip a priority silently just because its skill hasn't shipped — naming it shows the user where things are heading.\n\n## Phase 5 — Close-out sweep\n\nWhen the user signals they're done (\"that's it for today\", \"I'm done\", \"good night\"), ask once before wrapping:\n\n> _\"anything today that felt broken or caught you off guard? happy to flag it for the team while it's fresh — or we can leave it.\"_\n\nFile anything they raise via `pica_report_issue` with request IDs and the call shape. This bookends Phase 2: the contract you set at the start becomes one deliberate check at the end.\n\nIf the session's work moved the stated goal materially — a milestone landed, or the goal itself shifted in conversation — close the loop against it: name what moved in the user's words, and re-save `org_intent` (Phase 0's persist beat) so the next session opens from the new state, not the old one.\n\n## Asking the user — the question library\n\nEvery question this skill (or any specialist skill it routes to) puts to the user follows the same grammar. These patterns are the distilled subset of PICA's voice contract; they apply even where a tool output carries no `decision` block.\n\n- **Open over closed.** Decision points open with how/what — _\"what would you like to happen to the older copy?\"_ — never a bare yes/no over something the user can't recognise.\n- **Label a diagnosis before delivering it.** _\"it seems like these two entries are the same song — one came in from Spotify, one from your upload.\"_ The label invites correction; a flat assertion invites defensiveness.\n- **No-oriented safety on destructive moves.** _\"would it be wrong to fold these two copies together? nothing is deleted — the older one's history moves across.\"_ \"No\" must be a safe, complete answer.\n- **Options carry consequences.** Never name a choice without saying what happens: _\"keep both (they'll stay listed separately), or fold them together (one entry, both histories).\"_ At most three options; always name the safe default.\n- **Stakes only on verified facts.** A confirmed problem may state plainly what it costs the user — and cites what was checked and when. An unchecked gap stays curious — _\"we don't know yet whether this one's registered — want us to check?\"_ — never fear. If PICA hasn't verified it, don't claim it.\n- **The user's words, never the system's.** Titles and human facts (\"the one from the march upload\"), never identifiers, table names, or status enums.\n\nWorked examples:\n\n| Moment | Ask it like this |\n| ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| Two copies of the same song | _\"these two look like the same recording — one from Spotify, one from your upload. would it be wrong to fold them into one? nothing is deleted; the upload's history moves across.\"_ |\n| Unchecked registration gap | _\"we haven't checked whether this song is registered anywhere — want us to look it up with the MLC?\"_ |\n| Confirmed missing registration | _\"this song is earning but its registration is confirmed missing — we checked the MLC on the date shown. registering it is how those royalties get claimed. want to start there?\"_ |\n| Offering the ranked lead (Phase 4) | _\"here's what's stacking up: [a] ([n] of them), then [b] and [c]. [a] looks most worth your time — [why in a clause]. want me to start there, or is something else on your mind?\"_ |\n\n## What not to do\n\n- Don't run the phases as one wall of text — Phase 0 is at most one question, Phase 1 is a line, Phase 3 is two calls, Phase 4 is one offer.\n- Don't ask \"who do you want to be\" or any aspiration-shaped question — that's the internal lens, not a prompt. Ask what they're working toward; infer the rest.\n- Don't gate an import or a concrete request behind the Phase 0 question — value first, understanding alongside.\n- Don't re-ask a goal that's already on file — continue it, and only re-open it when the user signals it changed.\n- Don't start the specialist skill after Phase 4 — name it, offer it, wait.\n- Don't call `pica_count_explain` by default — only when a number looks off.\n- Don't offer a skill that isn't in `pica_skill_list` yet without the manual-path line — silent skips hide where the product is heading.\n- Don't speak in system terms (\"attention queue\", \"issue-class\", \"priority by class\") — say what the user would say (\"the things needing your attention\").\n- Don't ask a bare yes/no over something the user can't recognise — use the question library above.\n\n## Follow-on skills\n\nOrder depends on the top-ranked priority:\n\n- `audit-credits` — when \"works without credits\" tops the list\n- `prepare-for-sync` — when \"audio pending analysis\" tops the list\n- `close-the-loop` — when \"unenriched or unverified writers\" or per-work cleanup tops the list\n- `register-my-works` — when \"works without registrations\" tops the list\n- `set-recording-splits` — when \"recordings without splits\" tops the list\n- `catalog-modelling` — when the briefing shows duplicate-title works or blank-ISWC variants that should be folded into one work\n- `import-my-catalog` — when the briefing is empty (fresh org, no catalog yet): make the paste-a-link import offer in your opening message and use this skill for the mechanics; `set-up-workspace` is settings/identifiers, not import — only route there once music exists or the user asks for setup specifically\n- composition skills (`reconcile-pro-statement`, `register-co-write`, `log-a-session`, `match-sync-brief`) — as they ship; check `pica_skill_list` first\n",
67
67
  },
68
68
  "import-my-catalog": {
69
69
  name: "import-my-catalog",
@@ -138,7 +138,7 @@ export const SKILLS = {
138
138
  audience: "producer / artist / label / manager",
139
139
  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"],
140
140
  output: "Confirmed + verified recording_splits rows totalling 100%, with the option to generate and send a split sheet PDF for signatures.",
141
- 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`, `percentage`, `split_type`, `role`. **Active shares for one `split_type` + territory may not pass 100%, and a person holds at most one share there** — the database refuses anything else (`RECORDING_SPLIT_TOTAL_EXCEEDED` / `RECORDING_SPLIT_EXISTS`).\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 the missing shares.\n- **Complete** — splits total 100%. Ask whether the user wants to verify (mark agreed-upon) what's there.\n\n`pica_recording_splits_create` only adds. It cannot replace or change a share already recorded — it refuses a second share for the same person with `RECORDING_SPLIT_EXISTS`, and there is no MCP tool that edits one. If the user wants a recorded share changed or ended, say so plainly: they can do it on the recording's page in /inspect.\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?** — together with the shares already recorded, at most 100% for that `split_type` + territory.\n- **What kind?** — `split_type` is one of `master`, `mechanical`, `performance`, `sync` (master ownership is `master`); `role` is one of `owner`, `performer`, `producer`, `engineer`, `mixer`, `masterer`, `label`, `other`.\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\nCall `pica_recording_splits_create` with `dry_run: true` for each proposed row. It writes nothing and returns the row that would land, the shares already recorded (`existing_shares`, `active_total`) and `likely_refusal`. Surface that to the user.\n\n- **If `likely_refusal` is set, stop** and tell the user what it says — the write would be refused.\n- **If `existing_shares_checked` is false**, the preview could not read the recorded shares and predicts nothing — say so; do not present it as a clean preview.\n- Each dry run checks one row against what is already recorded, not against the other rows you are proposing — sum the proposed rows yourself. **If they would pass 100% with what is recorded, 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",
141
+ 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`, `percentage`, `split_type`, `role`. **Active shares for one `split_type` + territory may not pass 100%, and a person holds at most one share there** — the database refuses anything else (`RECORDING_SPLIT_TOTAL_EXCEEDED` / `RECORDING_SPLIT_EXISTS`).\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 the missing shares.\n- **Complete** — splits total 100%. Ask whether the user wants to verify (mark agreed-upon) what's there.\n\n`pica_recording_splits_create` only adds. It cannot replace or change a share already recorded — it refuses a second share for the same person with `RECORDING_SPLIT_EXISTS`, and there is no MCP tool that edits one. If the user wants a recorded share changed or ended, say so plainly: they can do it on the recording's page in /inspect.\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?** — together with the shares already recorded, at most 100% for that `split_type` + territory.\n- **What kind?** — `split_type` is one of `master`, `mechanical`, `performance`, `sync` (master ownership is `master`); `role` is one of `owner`, `performer`, `producer`, `engineer`, `mixer`, `masterer`, `label`, `other`.\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\nCall `pica_recording_splits_create` with `dry_run: true` for each proposed row. It writes nothing and returns the row that would land, the shares already recorded (`existing_shares`, `active_total`) and `likely_refusal`. Surface that to the user.\n\n- **If `likely_refusal` is set, stop** and tell the user what it says — the write would be refused.\n- **If `existing_shares_checked` is false**, the preview could not read the recorded shares and predicts nothing — say so; do not present it as a clean preview.\n- Each dry run checks one row against what is already recorded, not against the other rows you are proposing — sum the proposed rows yourself. **If they would pass 100% with what is recorded, 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\nVerification marks a split as agreed-upon — a separate state from \"exists in the database.\" It records WHICH PERSON agreed, so it is the split holder's own act: `pica_recording_splits_verify` refuses an agent (`VERIFICATION_REQUIRES_HUMAN_SESSION`) and you cannot do it for them. Tell each holder where to do it: signed in, \"confirm my share\" under ownership splits on the recording's page, `/inspect/recordings/<recording_id>#ownership-splits`. If a holder is someone other than the user, `pica_notify_person` with the `recording_id` sends them a link to that page.\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 skip telling holders how to verify, and don't retry `pica_recording_splits_verify` after it refuses. Verification is a deliberate moment for the holder, not for you.\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",
142
142
  },
143
143
  "set-up-workspace": {
144
144
  name: "set-up-workspace",
@@ -1 +1 @@
1
- {"version":3,"file":"skills.generated.js","sourceRoot":"","sources":["../../src/skills/skills.generated.ts"],"names":[],"mappings":"AAAA,6DAA6D;AA+B7D,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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AmE;QAC7E,cAAc,EAAE,CAAC,2BAA2B,EAAC,mBAAmB,EAAC,kCAAkC,EAAC,yBAAyB,EAAC,2BAA2B,EAAC,qBAAqB,EAAC,8BAA8B,EAAC,0BAA0B,EAAC,6BAA6B,CAAC;QACxQ,MAAM,EAAE,yQAAyQ;QACjR,IAAI,EAAE,4qPAA4qP;KACnrP;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,WAAW,GAA0B,CAAC,eAAe,EAAC,eAAe,EAAC,mBAAmB,EAAC,kBAAkB,EAAC,gBAAgB,EAAC,uBAAuB,EAAC,eAAe,EAAC,mBAAmB,EAAC,sBAAsB,EAAC,eAAe,EAAC,YAAY,EAAC,kBAAkB,EAAC,wBAAwB,EAAC,mBAAmB,EAAC,sBAAsB,EAAC,kBAAkB,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"agreement-types.d.ts","sourceRoot":"","sources":["../../src/tools/agreement-types.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,YAAY,EAAc,MAAM,YAAY,CAAC;AAetE,qBAAa,mBAAmB;IAC9B,OAAO,CAAC,IAAI,CAAa;gBAEb,IAAI,EAAE,UAAU;IAI5B,OAAO,CAAC,WAAW;IAanB,OAAO,CAAC,QAAQ;IAWhB,QAAQ,IAAI,KAAK,CAAC;QAAE,UAAU,EAAE,cAAc,CAAC;QAAC,QAAQ,EAAE,YAAY,CAAA;KAAE,CAAC;YAoR3D,KAAK;YAML,OAAO;YAMP,MAAM;YA8CN,MAAM;YAON,MAAM;YASN,cAAc;YAMd,iBAAiB;YAOjB,kBAAkB;CAMjC"}
1
+ {"version":3,"file":"agreement-types.d.ts","sourceRoot":"","sources":["../../src/tools/agreement-types.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,YAAY,EAAc,MAAM,YAAY,CAAC;AAetE,qBAAa,mBAAmB;IAC9B,OAAO,CAAC,IAAI,CAAa;gBAEb,IAAI,EAAE,UAAU;IAI5B,OAAO,CAAC,WAAW;IAanB,OAAO,CAAC,QAAQ;IAWhB,QAAQ,IAAI,KAAK,CAAC;QAAE,UAAU,EAAE,cAAc,CAAC;QAAC,QAAQ,EAAE,YAAY,CAAA;KAAE,CAAC;YAsR3D,KAAK;YAML,OAAO;YAMP,MAAM;YA8CN,MAAM;YAON,MAAM;YASN,cAAc;YAMd,iBAAiB;YAOjB,kBAAkB;CAMjC"}
@@ -69,6 +69,7 @@ export class AgreementTypesTools {
69
69
  audiences: ["stdio", "http", "public"],
70
70
  tier: "read",
71
71
  description: "Get a specific agreement by type and ID — full details including body, terms, and metadata. " +
72
+ "Producer and work-for-hire agreements are money: without the org's finance access the body, fee, advance and points are withheld and the row carries finance_access_required: true. " +
72
73
  "To browse every agreement of a type, use " +
73
74
  "pica_agreement_types_query; this one needs the id.",
74
75
  workflows: "infrastructure",
@@ -106,6 +107,7 @@ export class AgreementTypesTools {
106
107
  "template (needs name + category + templateText), " +
107
108
  "producer (needs producer_id + royalty_points + deliverables + work_id|recording_id), " +
108
109
  "work_for_hire (needs contractor_id + contractor_role + fee_amount + services_description + work_id|recording_id). " +
110
+ "Creating a producer or work-for-hire agreement needs the org's finance access (refused with FINANCE_ACCESS_REQUIRED otherwise). " +
109
111
  "Prefer pica_agreement_templates_duplicate when the user wants a copy of an existing template.",
110
112
  workflows: "infrastructure",
111
113
  vernacular_kind: "specialist",
@@ -127,7 +129,7 @@ export class AgreementTypesTools {
127
129
  description: "Update an existing agreement by type and ID. " +
128
130
  "Note: PATCH on producer_agreements and work_for_hire_agreements is action-only " +
129
131
  "(send_for_signature / countersign / mark_advance_paid / mark_paid / record_recoupment / " +
130
- "calculate_royalty), not generic field-level. Template branch accepts field updates. " +
132
+ "calculate_royalty), not generic field-level; every action except send_for_signature needs the org's finance access. Template branch accepts field updates. " +
131
133
  "Prefer pica_agreement_templates_set_default when the change is " +
132
134
  "just making a template the default for its type.",
133
135
  workflows: "infrastructure",
@@ -1 +1 @@
1
- {"version":3,"file":"agreement-types.js","sourceRoot":"","sources":["../../src/tools/agreement-types.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAW7D,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAC9E,OAAO,EACL,aAAa,EACb,sBAAsB,EACtB,eAAe,GAChB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,gCAAgC,EAChC,+BAA+B,EAC/B,+BAA+B,GAChC,MAAM,qBAAqB,CAAC;AAI7B,MAAM,OAAO,mBAAmB;IACtB,IAAI,CAAa;IAEzB,YAAY,IAAgB;QAC1B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;IAEO,WAAW,CAAC,IAAmB;QACrC,QAAQ,IAAI,EAAE,CAAC;YACb,KAAK,UAAU;gBACb,OAAO,IAAI,CAAC,IAAI,CAAC,kBAAkB,CAAC;YACtC,KAAK,UAAU;gBACb,OAAO,IAAI,CAAC,IAAI,CAAC,kBAAkB,CAAC;YACtC,KAAK,eAAe;gBAClB,OAAO,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC;YAC/B;gBACE,MAAM,IAAI,KAAK,CAAC,2BAA2B,IAAI,EAAE,CAAC,CAAC;QACvD,CAAC;IACH,CAAC;IAEO,QAAQ,CAAC,IAAmB;QAClC,QAAQ,IAAI,EAAE,CAAC;YACb,KAAK,UAAU;gBACb,OAAO,oBAAoB,CAAC;YAC9B,KAAK,UAAU;gBACb,OAAO,oBAAoB,CAAC;YAC9B,KAAK,eAAe;gBAClB,OAAO,yBAAyB,CAAC;QACrC,CAAC;IACH,CAAC;IAED,QAAQ;QACN,OAAO;YACL,mEAAmE;YACnE;gBACE,UAAU,EAAE;oBACV,IAAI,EAAE,4BAA4B;oBAClC,KA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AgB;IAsF9B;;;;;;;;;OASG;YACW,uBAAuB;YAgDvB,eAAe;YAyBf,kBAAkB;YAqBlB,eAAe;YAQf,eAAe;YAOf,QAAQ;YAkBR,qBAAqB;YAarB,gBAAgB;CA+B/B"}
1
+ {"version":3,"file":"agreements.d.ts","sourceRoot":"","sources":["../../src/tools/agreements.ts"],"names":[],"mappings":"AAEA;;GAEG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,YAAY,EAAc,MAAM,YAAY,CAAC;AA6BtE,qBAAa,eAAe;IAC1B,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;YAwe3D,eAAe;YAsCf,gBAAgB;IAgG9B;;;;;;;;;OASG;YACW,uBAAuB;YAgDvB,eAAe;YAyBf,kBAAkB;YAqBlB,eAAe;YAQf,eAAe;YAOf,QAAQ;YAkBR,qBAAqB;YAarB,gBAAgB;CA+B/B"}
@@ -542,12 +542,21 @@ export class AgreementsTools {
542
542
  // the round-trip parity contract is satisfied. See
543
543
  // docs/audits/2026-04-27-read-write-parity-audit.md § Agreements.
544
544
  const agreement = fullResult.agreement;
545
- result.payments = {
546
- advance_amount: agreement.advance_amount,
547
- advance_currency: agreement.advance_currency,
548
- is_recoupable: agreement.is_recoupable,
549
- financial_terms: agreement.financial_terms,
550
- };
545
+ // ADR-322: without finance access the route withholds the money
546
+ // columns and marks the row. Say so rather than return an empty-looking
547
+ // section an agent would read as "no advance, no terms".
548
+ result.payments =
549
+ agreement.finance_access_required === true
550
+ ? {
551
+ finance_access_required: true,
552
+ message: "the payment terms of this agreement need finance access. the owner can turn it on in settings → connections.",
553
+ }
554
+ : {
555
+ advance_amount: agreement.advance_amount,
556
+ advance_currency: agreement.advance_currency,
557
+ is_recoupable: agreement.is_recoupable,
558
+ financial_terms: agreement.financial_terms,
559
+ };
551
560
  }
552
561
  // ADR-193 Surface 2 — proactive peer-MCP hints when gaps are real.
553
562
  const gap_hints = computeAgreementGapHints(result);
@@ -1 +1 @@
1
- {"version":3,"file":"agreements.js","sourceRoot":"","sources":["../../src/tools/agreements.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAQ7D,OAAO,EAEL,UAAU,EACV,aAAa,EACb,aAAa,EACb,sBAAsB,EACtB,eAAe,EACf,2BAA2B,EAC3B,0BAA0B,EAC1B,0BAA0B,GAC3B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,wBAAwB,EAAE,MAAM,gBAAgB,CAAC;AAE1D,MAAM,mBAAmB,GAAG;IAC1B,kBAAkB;IAClB,eAAe;IACf,kBAAkB;IAClB,YAAY;IACZ,iBAAiB;IACjB,aAAa;IACb,QAAQ;IACR,OAAO;IACP,gBAAgB;IAChB,eAAe;IACf,YAAY;IACZ,cAAc;CACN,CAAC;AAEX,MAAM,OAAO,eAAe;IAClB,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,uBAAuB;oBAC7B,KAAK,EAAE,iBAAiB;oBACxB,SAAS,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,CAAC;oBACtC,IAAI,EAAE,MAAM;oBACZ,WAAW,EACT,4DAA4D;wBAC5D,gEAAgE;wBAChE,6DAA6D;wBAC7D,6DAA6D;wBAC7D,iDAAiD;oBACnD,SAAS,EAAE,gBAAgB;oBAC3B,eAAe,EAAE,eAAe;oBAChC,WAAW,EAAE;wBACX,IAAI,EAAE,QAAQ;wBACd,UAAU,EAAE;4BACV,KAAK,EAAE;gCACL,IAAI,EAAE,QAAQ;gCACd,WAAW,EAAE,+BAA+B;6BAC7C;4BACD,cAAc,EAAE;gC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,CACJ,GAAG,CAAC,CAAC,IAAI,MAAM,mCAAmC,CAAC,CAAC,CAAC,MAAM,CAAC,EAAE,CACjE;iBACA,IAAI,CAAC,IAAI,CAAC,EAAE,CAChB,CAAC;QACJ,CAAC;QACD,MAAM,OAAO,GACX,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,2BAA2B,CAAC;QAEpE,MAAM,OAAO,GACX,yCAAyC,MAAM,CAAC,MAAM,MAAM,OAAO,MAAM;YACzE,qDAAqD,MAAM,CAAC,YAAY,EAAE,CAAC;QAE7E,OAAO,aAAa,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;IACxC,CAAC;CACF;AAED,iEAAiE;AACjE,MAAM,mCAAmC,GAA2B;IAClE,gBAAgB,EAAE,kDAAkD;IACpE,cAAc,EAAE,gBAAgB;IAChC,gBAAgB,EAAE,kDAAkD;IACpE,iBAAiB,EAAE,sCAAsC;CAC1D,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"approvals.d.ts","sourceRoot":"","sources":["../../src/tools/approvals.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,UAAU,EAAuB,MAAM,mBAAmB,CAAC;AACpE,OAAO,EAAE,cAAc,EAAE,YAAY,EAAc,MAAM,YAAY,CAAC;AAGtE,qBAAa,cAAc;IACzB,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;IA6DzE;;;;;OAKG;YACW,iBAAiB;CA2ChC"}
1
+ {"version":3,"file":"approvals.d.ts","sourceRoot":"","sources":["../../src/tools/approvals.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,UAAU,EAAuB,MAAM,mBAAmB,CAAC;AACpE,OAAO,EAAE,cAAc,EAAE,YAAY,EAAc,MAAM,YAAY,CAAC;AAItE,qBAAa,cAAc;IACzB,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;IA6DzE;;;;;OAKG;YACW,iBAAiB;CAuDhC"}
@@ -12,6 +12,7 @@
12
12
  */
13
13
  import { EntityNotFoundError } from "@withpica/mcp-sdk";
14
14
  import { formatSuccess } from "@withpica/mcp-utils";
15
+ import { applyArgAliases } from "./arg-aliases.js";
15
16
  export class ApprovalsTools {
16
17
  pica;
17
18
  constructor(pica) {
@@ -78,7 +79,19 @@ export class ApprovalsTools {
78
79
  * an unknown reference without crashing its loop.
79
80
  */
80
81
  async getApprovalStatus(args) {
81
- const approvalId = typeof args.approval_id === "string" ? args.approval_id.trim() : "";
82
+ // The deferral envelope names this value `approval_reference`, so accept
83
+ // that spelling on a DIRECT call too. `pica_execute` applies the same
84
+ // alias before dispatch; resolving it here through the one alias table
85
+ // (`TOOL_ARG_ALIASES.pica_approval_status`) keeps direct and wrapped calls
86
+ // agreeing. Without it a direct `{approval_reference}` fell into the
87
+ // branch below and was answered `status: "not_found"` for an approval
88
+ // that exists. Pinned by `execute-approval-reference.test.ts`.
89
+ const { args: resolved } = applyArgAliases("pica_approval_status", args, [
90
+ "approval_id",
91
+ ]);
92
+ const approvalId = typeof resolved.approval_id === "string"
93
+ ? resolved.approval_id.trim()
94
+ : "";
82
95
  if (!approvalId) {
83
96
  // ⚠️ An agent lands here when a person points at the "N awaiting
84
97
  // approval" figure on /inspect and asks it to clear them. There is no
@@ -1 +1 @@
1
- {"version":3,"file":"approvals.js","sourceRoot":"","sources":["../../src/tools/approvals.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAE7D;;;;;;;;;;GAUG;AAEH,OAAO,EAAc,mBAAmB,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;YACD,MAAM,GAAG,CAAC;QACZ,CAAC;IACH,CAAC;CACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"arg-aliases.d.ts","sourceRoot":"","sources":["../../src/tools/arg-aliases.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAEH;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAc/D,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAanE,CAAC;AAEF,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC9B,OAAO,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,EAAE,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CAC9C;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAC7B,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC7B,QAAQ,EAAE,SAAS,MAAM,EAAE,GAC1B,cAAc,CA0BhB"}
1
+ {"version":3,"file":"arg-aliases.d.ts","sourceRoot":"","sources":["../../src/tools/arg-aliases.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAEH;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAc/D,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAyBnE,CAAC;AAEF,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC9B,OAAO,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,EAAE,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CAC9C;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAC7B,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC7B,QAAQ,EAAE,SAAS,MAAM,EAAE,GAC1B,cAAc,CA0BhB"}
@@ -70,6 +70,18 @@ export const TOOL_ARG_ALIASES = {
70
70
  actionIds: "accept",
71
71
  action_ids: "accept",
72
72
  },
73
+ // A deferred write answers with a `human_approval_required` envelope that
74
+ // carries the id as `approval_reference` and names `pica_approval_status`
75
+ // as its `poll_tool` (`buildAgentResponse`, lib/services/human-approval-gate.ts)
76
+ // — but the poll tool's schema calls the same value `approval_id`. Agents
77
+ // copy the key they were just handed, so PICA's own two names for one value
78
+ // drew WRAPPED_ARGS_MISSING 10 times on prod, from Claude and ChatGPT alike
79
+ // (ops issue da9ba396, 2026-07-05 → 2026-09-28). Pinned end to end, against
80
+ // the real tool definition, by
81
+ // `src/__tests__/tools/execute-approval-reference.test.ts`.
82
+ pica_approval_status: {
83
+ approval_reference: "approval_id",
84
+ },
73
85
  };
74
86
  /**
75
87
  * Rename a tool's own id / explicit alias to the schema's real required
@@ -1 +1 @@
1
- {"version":3,"file":"arg-aliases.js","sourceRoot":"","sources":["../../src/tools/arg-aliases.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAE7D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAEH;;;;GAIG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAsC;IAClE,KAAK,EAAE,CAAC,eAAe,EAAE,UAAU,EAAE,SAAS,CAAC;IAC/C,MAAM,EAAE,CAAC,WAAW,EAAE,WAAW,CAAC;IAClC,KAAK,EAAE,CAAC,SAAS,CAAC;IAClB,UAAU,EAAE,CAAC,cAAc,CAAC;I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