@withpica/mcp-server 2.52.0 → 2.52.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +66 -0
- package/dist/prompts/creator-question-atlas.d.ts +48 -0
- package/dist/prompts/creator-question-atlas.d.ts.map +1 -0
- package/dist/prompts/creator-question-atlas.js +618 -0
- package/dist/prompts/creator-question-atlas.js.map +1 -0
- package/dist/prompts/index.d.ts +32 -0
- package/dist/prompts/index.d.ts.map +1 -1
- package/dist/prompts/index.js +235 -0
- package/dist/prompts/index.js.map +1 -1
- package/dist/resources/index.d.ts +10 -0
- package/dist/resources/index.d.ts.map +1 -1
- package/dist/resources/index.js +134 -1
- package/dist/resources/index.js.map +1 -1
- package/dist/server-instructions.d.ts +4 -3
- package/dist/server-instructions.d.ts.map +1 -1
- package/dist/server-instructions.js +4 -1
- package/dist/server-instructions.js.map +1 -1
- package/dist/server.d.ts +26 -0
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +108 -10
- package/dist/server.js.map +1 -1
- package/dist/skills/index.d.ts +42 -0
- package/dist/skills/index.d.ts.map +1 -0
- package/dist/skills/index.js +59 -0
- package/dist/skills/index.js.map +1 -0
- package/dist/skills/skills.generated.d.ts +25 -0
- package/dist/skills/skills.generated.d.ts.map +1 -0
- package/dist/skills/skills.generated.js +86 -0
- package/dist/skills/skills.generated.js.map +1 -0
- package/dist/tools/access-simulate.d.ts +23 -0
- package/dist/tools/access-simulate.d.ts.map +1 -0
- package/dist/tools/access-simulate.js +165 -0
- package/dist/tools/access-simulate.js.map +1 -0
- package/dist/tools/agent-identity.d.ts.map +1 -1
- package/dist/tools/agent-identity.js +15 -0
- package/dist/tools/agent-identity.js.map +1 -1
- package/dist/tools/agreement-types.d.ts.map +1 -1
- package/dist/tools/agreement-types.js +24 -0
- package/dist/tools/agreement-types.js.map +1 -1
- package/dist/tools/agreements.d.ts.map +1 -1
- package/dist/tools/agreements.js +21 -3
- package/dist/tools/agreements.js.map +1 -1
- package/dist/tools/analytics.d.ts.map +1 -1
- package/dist/tools/analytics.js +19 -1
- package/dist/tools/analytics.js.map +1 -1
- package/dist/tools/app-tools.d.ts.map +1 -1
- package/dist/tools/app-tools.js +11 -2
- package/dist/tools/app-tools.js.map +1 -1
- package/dist/tools/assets.d.ts.map +1 -1
- package/dist/tools/assets.js +33 -0
- package/dist/tools/assets.js.map +1 -1
- package/dist/tools/audio-files.d.ts +5 -0
- package/dist/tools/audio-files.d.ts.map +1 -1
- package/dist/tools/audio-files.js +91 -0
- package/dist/tools/audio-files.js.map +1 -1
- package/dist/tools/audit.d.ts.map +1 -1
- package/dist/tools/audit.js +11 -2
- package/dist/tools/audit.js.map +1 -1
- package/dist/tools/auth.d.ts.map +1 -1
- package/dist/tools/auth.js +6 -0
- package/dist/tools/auth.js.map +1 -1
- package/dist/tools/bulk.d.ts +4 -0
- package/dist/tools/bulk.d.ts.map +1 -1
- package/dist/tools/bulk.js +304 -0
- package/dist/tools/bulk.js.map +1 -1
- package/dist/tools/calendar.d.ts.map +1 -1
- package/dist/tools/calendar.js +3 -0
- package/dist/tools/calendar.js.map +1 -1
- package/dist/tools/collaborators.d.ts.map +1 -1
- package/dist/tools/collaborators.js +24 -3
- package/dist/tools/collaborators.js.map +1 -1
- package/dist/tools/comparisons.d.ts.map +1 -1
- package/dist/tools/comparisons.js +6 -0
- package/dist/tools/comparisons.js.map +1 -1
- package/dist/tools/credits.d.ts +18 -0
- package/dist/tools/credits.d.ts.map +1 -1
- package/dist/tools/credits.js +344 -4
- package/dist/tools/credits.js.map +1 -1
- package/dist/tools/custody.d.ts.map +1 -1
- package/dist/tools/custody.js +23 -2
- package/dist/tools/custody.js.map +1 -1
- package/dist/tools/dashboard.d.ts.map +1 -1
- package/dist/tools/dashboard.js +43 -7
- package/dist/tools/dashboard.js.map +1 -1
- package/dist/tools/directory.d.ts.map +1 -1
- package/dist/tools/directory.js +3 -0
- package/dist/tools/directory.js.map +1 -1
- package/dist/tools/discovery.d.ts.map +1 -1
- package/dist/tools/discovery.js +99 -2
- package/dist/tools/discovery.js.map +1 -1
- package/dist/tools/disputes.d.ts.map +1 -1
- package/dist/tools/disputes.js +4 -1
- package/dist/tools/disputes.js.map +1 -1
- package/dist/tools/documents.d.ts.map +1 -1
- package/dist/tools/documents.js +3 -0
- package/dist/tools/documents.js.map +1 -1
- package/dist/tools/duplicates.d.ts.map +1 -1
- package/dist/tools/duplicates.js +6 -0
- package/dist/tools/duplicates.js.map +1 -1
- package/dist/tools/enrichment.d.ts.map +1 -1
- package/dist/tools/enrichment.js +33 -0
- package/dist/tools/enrichment.js.map +1 -1
- package/dist/tools/explainability.d.ts +24 -0
- package/dist/tools/explainability.d.ts.map +1 -0
- package/dist/tools/explainability.js +137 -0
- package/dist/tools/explainability.js.map +1 -0
- package/dist/tools/exports.d.ts.map +1 -1
- package/dist/tools/exports.js +18 -3
- package/dist/tools/exports.js.map +1 -1
- package/dist/tools/feedback.d.ts.map +1 -1
- package/dist/tools/feedback.js +3 -0
- package/dist/tools/feedback.js.map +1 -1
- package/dist/tools/files.d.ts.map +1 -1
- package/dist/tools/files.js +22 -0
- package/dist/tools/files.js.map +1 -1
- package/dist/tools/groups.d.ts.map +1 -1
- package/dist/tools/groups.js +12 -0
- package/dist/tools/groups.js.map +1 -1
- package/dist/tools/import-documents.d.ts.map +1 -1
- package/dist/tools/import-documents.js +10 -1
- package/dist/tools/import-documents.js.map +1 -1
- package/dist/tools/import.d.ts.map +1 -1
- package/dist/tools/import.js +65 -18
- package/dist/tools/import.js.map +1 -1
- package/dist/tools/index.d.ts +142 -6
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +289 -108
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/integrations.d.ts.map +1 -1
- package/dist/tools/integrations.js +28 -8
- package/dist/tools/integrations.js.map +1 -1
- package/dist/tools/labels.d.ts.map +1 -1
- package/dist/tools/labels.js +3 -0
- package/dist/tools/labels.js.map +1 -1
- package/dist/tools/licensing.d.ts.map +1 -1
- package/dist/tools/licensing.js +15 -0
- package/dist/tools/licensing.js.map +1 -1
- package/dist/tools/memory.d.ts.map +1 -1
- package/dist/tools/memory.js +15 -3
- package/dist/tools/memory.js.map +1 -1
- package/dist/tools/metadata.d.ts.map +1 -1
- package/dist/tools/metadata.js +112 -0
- package/dist/tools/metadata.js.map +1 -1
- package/dist/tools/multimedia.d.ts.map +1 -1
- package/dist/tools/multimedia.js +15 -0
- package/dist/tools/multimedia.js.map +1 -1
- package/dist/tools/my-recent-questions.d.ts +25 -0
- package/dist/tools/my-recent-questions.d.ts.map +1 -0
- package/dist/tools/my-recent-questions.js +186 -0
- package/dist/tools/my-recent-questions.js.map +1 -0
- package/dist/tools/my-reported-issues.d.ts.map +1 -1
- package/dist/tools/my-reported-issues.js +3 -0
- package/dist/tools/my-reported-issues.js.map +1 -1
- package/dist/tools/notes.d.ts.map +1 -1
- package/dist/tools/notes.js +12 -0
- package/dist/tools/notes.js.map +1 -1
- package/dist/tools/notifications.d.ts.map +1 -1
- package/dist/tools/notifications.js +25 -1
- package/dist/tools/notifications.js.map +1 -1
- package/dist/tools/onboarding.d.ts.map +1 -1
- package/dist/tools/onboarding.js +3 -0
- package/dist/tools/onboarding.js.map +1 -1
- package/dist/tools/people.d.ts +4 -0
- package/dist/tools/people.d.ts.map +1 -1
- package/dist/tools/people.js +58 -1
- package/dist/tools/people.js.map +1 -1
- package/dist/tools/projects.d.ts.map +1 -1
- package/dist/tools/projects.js +18 -0
- package/dist/tools/projects.js.map +1 -1
- package/dist/tools/public-filter.d.ts.map +1 -1
- package/dist/tools/public-filter.js +6 -0
- package/dist/tools/public-filter.js.map +1 -1
- package/dist/tools/publishers.d.ts.map +1 -1
- package/dist/tools/publishers.js +6 -0
- package/dist/tools/publishers.js.map +1 -1
- package/dist/tools/recordings.d.ts.map +1 -1
- package/dist/tools/recordings.js +15 -0
- package/dist/tools/recordings.js.map +1 -1
- package/dist/tools/recovery-hints.d.ts.map +1 -1
- package/dist/tools/recovery-hints.js +105 -0
- package/dist/tools/recovery-hints.js.map +1 -1
- package/dist/tools/release-rich.d.ts.map +1 -1
- package/dist/tools/release-rich.js +4 -2
- package/dist/tools/release-rich.js.map +1 -1
- package/dist/tools/releases.d.ts.map +1 -1
- package/dist/tools/releases.js +55 -0
- package/dist/tools/releases.js.map +1 -1
- package/dist/tools/report-issue.d.ts.map +1 -1
- package/dist/tools/report-issue.js +3 -0
- package/dist/tools/report-issue.js.map +1 -1
- package/dist/tools/royalties.d.ts.map +1 -1
- package/dist/tools/royalties.js +18 -3
- package/dist/tools/royalties.js.map +1 -1
- package/dist/tools/search.d.ts.map +1 -1
- package/dist/tools/search.js +10 -1
- package/dist/tools/search.js.map +1 -1
- package/dist/tools/send.d.ts.map +1 -1
- package/dist/tools/send.js +9 -0
- package/dist/tools/send.js.map +1 -1
- package/dist/tools/sessions.d.ts.map +1 -1
- package/dist/tools/sessions.js +12 -0
- package/dist/tools/sessions.js.map +1 -1
- package/dist/tools/settings.d.ts.map +1 -1
- package/dist/tools/settings.js +30 -3
- package/dist/tools/settings.js.map +1 -1
- package/dist/tools/share-links.d.ts.map +1 -1
- package/dist/tools/share-links.js +15 -0
- package/dist/tools/share-links.js.map +1 -1
- package/dist/tools/share-send.d.ts +28 -0
- package/dist/tools/share-send.d.ts.map +1 -0
- package/dist/tools/share-send.js +131 -0
- package/dist/tools/share-send.js.map +1 -0
- package/dist/tools/sharing.d.ts +29 -0
- package/dist/tools/sharing.d.ts.map +1 -0
- package/dist/tools/sharing.js +131 -0
- package/dist/tools/sharing.js.map +1 -0
- package/dist/tools/signup.d.ts.map +1 -1
- package/dist/tools/signup.js +3 -0
- package/dist/tools/signup.js.map +1 -1
- package/dist/tools/skills.d.ts +25 -0
- package/dist/tools/skills.d.ts.map +1 -0
- package/dist/tools/skills.js +144 -0
- package/dist/tools/skills.js.map +1 -0
- package/dist/tools/split-sheets.d.ts.map +1 -1
- package/dist/tools/split-sheets.js +22 -1
- package/dist/tools/split-sheets.js.map +1 -1
- package/dist/tools/storage-config.d.ts.map +1 -1
- package/dist/tools/storage-config.js +6 -0
- package/dist/tools/storage-config.js.map +1 -1
- package/dist/tools/subscription.d.ts.map +1 -1
- package/dist/tools/subscription.js +9 -10
- package/dist/tools/subscription.js.map +1 -1
- package/dist/tools/sync-placements.d.ts.map +1 -1
- package/dist/tools/sync-placements.js +20 -2
- package/dist/tools/sync-placements.js.map +1 -1
- package/dist/tools/team.d.ts.map +1 -1
- package/dist/tools/team.js +15 -0
- package/dist/tools/team.js.map +1 -1
- package/dist/tools/telegram.d.ts.map +1 -1
- package/dist/tools/telegram.js +9 -0
- package/dist/tools/telegram.js.map +1 -1
- package/dist/tools/uploads.d.ts.map +1 -1
- package/dist/tools/uploads.js +6 -0
- package/dist/tools/uploads.js.map +1 -1
- package/dist/tools/works.d.ts +4 -0
- package/dist/tools/works.d.ts.map +1 -1
- package/dist/tools/works.js +83 -3
- package/dist/tools/works.js.map +1 -1
- package/package.json +7 -6
- package/scripts/build-skills.ts +229 -0
- package/server.json +2 -2
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Server-level instructions sent to agents on MCP handshake.
|
|
3
|
-
* Keep under
|
|
3
|
+
* Keep under 2300 chars — this is context budget, not documentation.
|
|
4
|
+
* Bumped from 2000 in 2026-05-11 (ADR-140 Phase 2b skills paragraph).
|
|
4
5
|
*
|
|
5
6
|
* Two variants per ADR-211 Phase 1 Primitive C:
|
|
6
7
|
* - SERVER_INSTRUCTIONS / SERVER_INSTRUCTIONS_AUTHENTICATED: full surface
|
|
@@ -15,9 +16,9 @@
|
|
|
15
16
|
* Block playbook: "document the high level of your server"
|
|
16
17
|
* Lowin: "instructions are context — design them as context"
|
|
17
18
|
*/
|
|
18
|
-
export declare const SERVER_INSTRUCTIONS = "withPICA manages music catalog metadata \u2014 works, recordings, people, credits, agreements, rights. Tools are pica_<domain>_<verb>, 200+ of them, from npm as @withpica/mcp-server. If you see pica_execute, Execute Pica Action, or Search Platform Actions \u2014 that's @picahq/mcp (picaos.com), a different product with the same short name; don't route withPICA work there.\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\nThe catalog is ALWAYS accessible via the tools above \u2014 zero setup, no integration required. If pica_integrations_status shows \"0 connected\" that refers to optional peer connectors (Google/Notion/Airtable/Telegram), NOT the catalog; call pica_works_query to check what's there.\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- _inspect tools take sections (e.g., pica_works_inspect sections: [\"health\", \"completeness\"])\n- Write tools confirm what changed; 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\nQuery endpoints accept \"limit\" (default 50) and paginate. IDs are UUIDs \u2014 use a _query tool first when unsure.\n\nPeer connectors (email, drive, notes, calendar, DAW MCPs): when PICA shows missing data, check peer MCPs before asking the user. Cite via pica_enrichment_propose sources[].url with URI schemes \u2014 gmail:// gdrive:// notion:// file:// telegram:// calendar:// daw:// user:// web://. See docs/mcp-source-uri-conventions.md.";
|
|
19
|
+
export declare const SERVER_INSTRUCTIONS = "withPICA manages music catalog metadata \u2014 works, recordings, people, credits, agreements, rights. Tools are pica_<domain>_<verb>, 200+ of them, from npm as @withpica/mcp-server. If you see pica_execute, Execute Pica Action, or Search Platform Actions \u2014 that's @picahq/mcp (picaos.com), a different product with the same short name; don't route withPICA work there.\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\nThe catalog is ALWAYS accessible via the tools above \u2014 zero setup, no integration required. If pica_integrations_status shows \"0 connected\" that refers to optional peer connectors (Google/Notion/Airtable/Telegram), NOT the catalog; call pica_works_query to check what's there.\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- _inspect tools take sections (e.g., pica_works_inspect sections: [\"health\", \"completeness\"])\n- Write tools confirm what changed; 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\nQuery endpoints accept \"limit\" (default 50) and paginate. 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 connectors (email, drive, notes, calendar, DAW MCPs): when PICA shows missing data, check peer MCPs before asking the user. Cite via pica_enrichment_propose sources[].url with URI schemes \u2014 gmail:// gdrive:// notion:// file:// telegram:// calendar:// daw:// user:// web://. See docs/mcp-source-uri-conventions.md.";
|
|
19
20
|
/** Alias for the authenticated default — names the variant explicitly when paired with the unauthenticated one. */
|
|
20
|
-
export declare const SERVER_INSTRUCTIONS_AUTHENTICATED = "withPICA manages music catalog metadata \u2014 works, recordings, people, credits, agreements, rights. Tools are pica_<domain>_<verb>, 200+ of them, from npm as @withpica/mcp-server. If you see pica_execute, Execute Pica Action, or Search Platform Actions \u2014 that's @picahq/mcp (picaos.com), a different product with the same short name; don't route withPICA work there.\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\nThe catalog is ALWAYS accessible via the tools above \u2014 zero setup, no integration required. If pica_integrations_status shows \"0 connected\" that refers to optional peer connectors (Google/Notion/Airtable/Telegram), NOT the catalog; call pica_works_query to check what's there.\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- _inspect tools take sections (e.g., pica_works_inspect sections: [\"health\", \"completeness\"])\n- Write tools confirm what changed; 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\nQuery endpoints accept \"limit\" (default 50) and paginate. IDs are UUIDs \u2014 use a _query tool first when unsure.\n\nPeer connectors (email, drive, notes, calendar, DAW MCPs): when PICA shows missing data, check peer MCPs before asking the user. Cite via pica_enrichment_propose sources[].url with URI schemes \u2014 gmail:// gdrive:// notion:// file:// telegram:// calendar:// daw:// user:// web://. See docs/mcp-source-uri-conventions.md.";
|
|
21
|
+
export declare const SERVER_INSTRUCTIONS_AUTHENTICATED = "withPICA manages music catalog metadata \u2014 works, recordings, people, credits, agreements, rights. Tools are pica_<domain>_<verb>, 200+ of them, from npm as @withpica/mcp-server. If you see pica_execute, Execute Pica Action, or Search Platform Actions \u2014 that's @picahq/mcp (picaos.com), a different product with the same short name; don't route withPICA work there.\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\nThe catalog is ALWAYS accessible via the tools above \u2014 zero setup, no integration required. If pica_integrations_status shows \"0 connected\" that refers to optional peer connectors (Google/Notion/Airtable/Telegram), NOT the catalog; call pica_works_query to check what's there.\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- _inspect tools take sections (e.g., pica_works_inspect sections: [\"health\", \"completeness\"])\n- Write tools confirm what changed; 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\nQuery endpoints accept \"limit\" (default 50) and paginate. 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 connectors (email, drive, notes, calendar, DAW MCPs): when PICA shows missing data, check peer MCPs before asking the user. Cite via pica_enrichment_propose sources[].url with URI schemes \u2014 gmail:// gdrive:// notion:// file:// telegram:// calendar:// daw:// user:// web://. See docs/mcp-source-uri-conventions.md.";
|
|
21
22
|
/** Minimal billing-slice shape consumed by the trial-ending clause. Structurally
|
|
22
23
|
* compatible with `OrgBillingSlice` from lib/services/subscription so callers
|
|
23
24
|
* can pass either. Local declaration keeps mcp-server's copy self-contained
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server-instructions.d.ts","sourceRoot":"","sources":["../src/server-instructions.ts"],"names":[],"mappings":"AAEA
|
|
1
|
+
{"version":3,"file":"server-instructions.d.ts","sourceRoot":"","sources":["../src/server-instructions.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,mBAAmB,owEAwB+R,CAAC;AAEhU,mHAAmH;AACnH,eAAO,MAAM,iCAAiC,owEAAsB,CAAC;AAErE;;;oEAGoE;AACpE,MAAM,WAAW,eAAe;IAC9B,aAAa,EAAE,MAAM,CAAC;IACtB,oBAAoB,EAAE,MAAM,GAAG,IAAI,CAAC;CACrC;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,4BAA4B,CAC1C,KAAK,EAAE,eAAe,GAAG,IAAI,GAC5B,MAAM,CAER;AAED,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,eAAe,GAAG,IAAI,GAAG,MAAM,CAO1E;AAED;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,mCAAmC,mwBAM2M,CAAC"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
// Copyright (c) 2024-2026 Withpica Ltd. All rights reserved.
|
|
2
2
|
/**
|
|
3
3
|
* Server-level instructions sent to agents on MCP handshake.
|
|
4
|
-
* Keep under
|
|
4
|
+
* Keep under 2300 chars — this is context budget, not documentation.
|
|
5
|
+
* Bumped from 2000 in 2026-05-11 (ADR-140 Phase 2b skills paragraph).
|
|
5
6
|
*
|
|
6
7
|
* Two variants per ADR-211 Phase 1 Primitive C:
|
|
7
8
|
* - SERVER_INSTRUCTIONS / SERVER_INSTRUCTIONS_AUTHENTICATED: full surface
|
|
@@ -38,6 +39,8 @@ Key patterns:
|
|
|
38
39
|
|
|
39
40
|
Query endpoints accept "limit" (default 50) and paginate. IDs are UUIDs — use a _query tool first when unsure.
|
|
40
41
|
|
|
42
|
+
Skills: 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 — not at handshake.
|
|
43
|
+
|
|
41
44
|
Peer connectors (email, drive, notes, calendar, DAW MCPs): when PICA shows missing data, check peer MCPs before asking the user. Cite via pica_enrichment_propose sources[].url with URI schemes — gmail:// gdrive:// notion:// file:// telegram:// calendar:// daw:// user:// web://. See docs/mcp-source-uri-conventions.md.`;
|
|
42
45
|
/** Alias for the authenticated default — names the variant explicitly when paired with the unauthenticated one. */
|
|
43
46
|
export const SERVER_INSTRUCTIONS_AUTHENTICATED = SERVER_INSTRUCTIONS;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server-instructions.js","sourceRoot":"","sources":["../src/server-instructions.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAE7D
|
|
1
|
+
{"version":3,"file":"server-instructions.js","sourceRoot":"","sources":["../src/server-instructions.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAE7D;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;+TAwB4R,CAAC;AAEhU,mHAAmH;AACnH,MAAM,CAAC,MAAM,iCAAiC,GAAG,mBAAmB,CAAC;AAWrE;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,4BAA4B,CAC1C,KAA6B;IAE7B,OAAO,iCAAiC,GAAG,oBAAoB,CAAC,KAAK,CAAC,CAAC;AACzE,CAAC;AAED,MAAM,UAAU,oBAAoB,CAAC,KAA6B;IAChE,IAAI,CAAC,KAAK;QAAE,OAAO,EAAE,CAAC;IACtB,IAAI,KAAK,CAAC,aAAa,KAAK,OAAO;QAAE,OAAO,EAAE,CAAC;IAC/C,MAAM,IAAI,GAAG,KAAK,CAAC,oBAAoB,CAAC;IACxC,IAAI,IAAI,KAAK,IAAI,IAAI,IAAI,GAAG,CAAC;QAAE,OAAO,EAAE,CAAC;IACzC,MAAM,OAAO,GAAG,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC;IAC5C,OAAO,gCAAgC,IAAI,IAAI,OAAO,yGAAyG,CAAC;AAClK,CAAC;AAED;;;;;;;;;;;;;;GAcG;AACH,MAAM,CAAC,MAAM,mCAAmC,GAAG;;;;;;2PAMwM,CAAC"}
|
package/dist/server.d.ts
CHANGED
|
@@ -7,7 +7,25 @@ export declare class PicaMcpServer {
|
|
|
7
7
|
private promptRegistry;
|
|
8
8
|
private config;
|
|
9
9
|
private httpServer?;
|
|
10
|
+
private readonly sessionId;
|
|
10
11
|
constructor(config: ServerConfig);
|
|
12
|
+
/**
|
|
13
|
+
* Construct the dual-relay McpAuditLogger.
|
|
14
|
+
*
|
|
15
|
+
* One callback, two policies:
|
|
16
|
+
* - mcp_audit_log (via /api/mcp/audit): write-tool only — preserves
|
|
17
|
+
* ADR-154 F5's audit-log shape unchanged.
|
|
18
|
+
* - assistant_interactions + mcp_sessions (via
|
|
19
|
+
* /api/mcp/internal/log-interaction): EVERY tool call —
|
|
20
|
+
* ADR-226 Decision 8.
|
|
21
|
+
*
|
|
22
|
+
* `logReads: true` is mandatory: the McpAuditLogger short-circuits on
|
|
23
|
+
* `risk_level === "safe"` by default, which would block read-tool
|
|
24
|
+
* calls from reaching the substrate relay. The mcp_audit_log endpoint
|
|
25
|
+
* itself stays write-tool-only via a `risk_level !== "safe"` gate
|
|
26
|
+
* inside the callback.
|
|
27
|
+
*/
|
|
28
|
+
private buildAuditLogger;
|
|
11
29
|
/**
|
|
12
30
|
* Reinitialize server with new credentials (called after successful auth)
|
|
13
31
|
*/
|
|
@@ -37,6 +55,14 @@ export declare class PicaMcpServer {
|
|
|
37
55
|
* - Otherwise → stdio (default, for Claude Code / Cursor / VS Code)
|
|
38
56
|
*/
|
|
39
57
|
start(): Promise<void>;
|
|
58
|
+
/**
|
|
59
|
+
* ADR-226 Phase 6 — fetch the user's vocabulary and append it to the
|
|
60
|
+
* SDK Server's static instructions string. Bails silently on lobby
|
|
61
|
+
* mode (no apiKey-to-user mapping yet) or any fetch failure (the base
|
|
62
|
+
* instructions are still valid; vocabulary is a layer on top, not a
|
|
63
|
+
* gate). Runs at most once per server instance.
|
|
64
|
+
*/
|
|
65
|
+
private injectVocabularyInstructions;
|
|
40
66
|
private startStdio;
|
|
41
67
|
private startHttp;
|
|
42
68
|
/**
|
package/dist/server.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAqBA,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAqBA,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAiB3C,qBAAa,aAAa;IACxB,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,IAAI,CAAoB;IAChC,OAAO,CAAC,YAAY,CAAe;IACnC,OAAO,CAAC,gBAAgB,CAAmB;IAC3C,OAAO,CAAC,cAAc,CAAiB;IACvC,OAAO,CAAC,MAAM,CAAe;IAC7B,OAAO,CAAC,UAAU,CAAC,CAAkC;IAKrD,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAwB;gBAEtC,MAAM,EAAE,YAAY;IAmEhC;;;;;;;;;;;;;;;OAeG;IACH,OAAO,CAAC,gBAAgB;IAsCxB;;OAEG;IACH,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;IA8ClC;;;;;;;;;;;OAWG;IACH,OAAO,IAAI,IAAI;IAmCf;;OAEG;IACH,OAAO,CAAC,aAAa;IAIrB;;;;;;OAMG;IACG,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAwC5B;;;;;;OAMG;YACW,4BAA4B;YAuB5B,UAAU;YAKV,SAAS;IA6HvB;;;OAGG;IACH,OAAO,CAAC,gBAAgB;IAkDxB;;OAEG;IACG,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;CAS5B"}
|
package/dist/server.js
CHANGED
|
@@ -8,13 +8,13 @@ import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js"
|
|
|
8
8
|
import { StreamableHTTPServerTransport } from "@modelcontextprotocol/sdk/server/streamableHttp.js";
|
|
9
9
|
import { CallToolRequestSchema, ListToolsRequestSchema, ListResourcesRequestSchema, ReadResourceRequestSchema, ListPromptsRequestSchema, GetPromptRequestSchema, } from "@modelcontextprotocol/sdk/types.js";
|
|
10
10
|
import { createServer } from "node:http";
|
|
11
|
-
import { timingSafeEqual } from "node:crypto";
|
|
11
|
+
import { timingSafeEqual, randomUUID } from "node:crypto";
|
|
12
12
|
import { PicaClient } from "@withpica/mcp-sdk";
|
|
13
13
|
import { ToolRegistry } from "./tools/index.js";
|
|
14
14
|
import { ResourceRegistry } from "./resources/index.js";
|
|
15
15
|
import { PromptRegistry } from "./prompts/index.js";
|
|
16
16
|
import { logError } from "@withpica/mcp-utils";
|
|
17
|
-
import { makeStdioCallerContext, makeHttpAuditFn, McpAuditLogger, } from "@withpica/mcp-utils";
|
|
17
|
+
import { makeStdioCallerContext, makeHttpAuditFn, makeHttpInteractionFn, McpAuditLogger, } from "@withpica/mcp-utils";
|
|
18
18
|
import { SERVER_INSTRUCTIONS_AUTHENTICATED, SERVER_INSTRUCTIONS_UNAUTHENTICATED, } from "./server-instructions.js";
|
|
19
19
|
export class PicaMcpServer {
|
|
20
20
|
server;
|
|
@@ -24,6 +24,11 @@ export class PicaMcpServer {
|
|
|
24
24
|
promptRegistry;
|
|
25
25
|
config;
|
|
26
26
|
httpServer;
|
|
27
|
+
// ADR-226 Phase 4 PR-B.5 — session UUID generated at process start and
|
|
28
|
+
// carried through every tool call's interaction relay. Decision 8 source
|
|
29
|
+
// rule for stdio: UUID generated at server initialize for the process
|
|
30
|
+
// lifetime.
|
|
31
|
+
sessionId = randomUUID();
|
|
27
32
|
constructor(config) {
|
|
28
33
|
this.config = config;
|
|
29
34
|
// Initialize PICA SDK client (null in lobby mode)
|
|
@@ -67,14 +72,62 @@ export class PicaMcpServer {
|
|
|
67
72
|
// Initialize registries with stdio caller context (api key hash)
|
|
68
73
|
this.toolRegistry = new ToolRegistry(this.pica, config, (apiKey) => this.reinitialize(apiKey), makeStdioCallerContext(config.picaApiKey), () => this.signOut());
|
|
69
74
|
this.resourceRegistry = new ResourceRegistry(this.pica, config);
|
|
70
|
-
this.promptRegistry = new PromptRegistry();
|
|
71
|
-
// Wire audit logger — fire-and-forget POST to /api/mcp/audit
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
75
|
+
this.promptRegistry = new PromptRegistry(this.pica ?? undefined);
|
|
76
|
+
// Wire audit logger — fire-and-forget POST to /api/mcp/audit AND
|
|
77
|
+
// /api/mcp/internal/log-interaction. ADR-226 Phase 4 PR-B.5: every
|
|
78
|
+
// tool call (read + write) writes one assistant_interactions row +
|
|
79
|
+
// bumps mcp_sessions; the original audit endpoint stays write-tool-only.
|
|
80
|
+
this.toolRegistry.setAuditLogger(this.buildAuditLogger(config.picaApiKey, config.picaApiUrl));
|
|
76
81
|
this.setupHandlers();
|
|
77
82
|
}
|
|
83
|
+
/**
|
|
84
|
+
* Construct the dual-relay McpAuditLogger.
|
|
85
|
+
*
|
|
86
|
+
* One callback, two policies:
|
|
87
|
+
* - mcp_audit_log (via /api/mcp/audit): write-tool only — preserves
|
|
88
|
+
* ADR-154 F5's audit-log shape unchanged.
|
|
89
|
+
* - assistant_interactions + mcp_sessions (via
|
|
90
|
+
* /api/mcp/internal/log-interaction): EVERY tool call —
|
|
91
|
+
* ADR-226 Decision 8.
|
|
92
|
+
*
|
|
93
|
+
* `logReads: true` is mandatory: the McpAuditLogger short-circuits on
|
|
94
|
+
* `risk_level === "safe"` by default, which would block read-tool
|
|
95
|
+
* calls from reaching the substrate relay. The mcp_audit_log endpoint
|
|
96
|
+
* itself stays write-tool-only via a `risk_level !== "safe"` gate
|
|
97
|
+
* inside the callback.
|
|
98
|
+
*/
|
|
99
|
+
buildAuditLogger(apiKey, baseUrl) {
|
|
100
|
+
const interactionCtx = {
|
|
101
|
+
sessionId: this.sessionId,
|
|
102
|
+
// Stdio doesn't have access to clientInfo at construction time —
|
|
103
|
+
// the SDK's `getClientVersion()` only returns after `initialize`
|
|
104
|
+
// has been received. For now we send nulls; the relay endpoint
|
|
105
|
+
// upserts mcp_sessions with NULL agent identity, and an enrichment
|
|
106
|
+
// pass after `oninitialized` could update later.
|
|
107
|
+
clientName: null,
|
|
108
|
+
clientVersion: null,
|
|
109
|
+
// user_agent on stdio is "stdio:<pid>" — distinct from HTTP's
|
|
110
|
+
// browser-style UA but useful for grouping per-process activity.
|
|
111
|
+
userAgent: `stdio:${process.pid}`,
|
|
112
|
+
};
|
|
113
|
+
const auditFn = makeHttpAuditFn({ baseUrl, apiKey });
|
|
114
|
+
const interactionFn = makeHttpInteractionFn({
|
|
115
|
+
baseUrl,
|
|
116
|
+
apiKey,
|
|
117
|
+
context: interactionCtx,
|
|
118
|
+
});
|
|
119
|
+
return new McpAuditLogger(async (entry) => {
|
|
120
|
+
// Both fire-and-forget; failures swallowed by Promise.allSettled +
|
|
121
|
+
// McpAuditLogger's own try/catch wrapper. Telemetry must not break
|
|
122
|
+
// tool execution.
|
|
123
|
+
await Promise.allSettled([
|
|
124
|
+
// mcp_audit_log: write tools only (preserves ADR-154 F5 behaviour).
|
|
125
|
+
entry.risk_level !== "safe" ? auditFn(entry) : Promise.resolve(),
|
|
126
|
+
// assistant_interactions: EVERY tool call (ADR-226 Decision 8).
|
|
127
|
+
interactionFn(entry),
|
|
128
|
+
]);
|
|
129
|
+
}, /* logReads */ true);
|
|
130
|
+
}
|
|
78
131
|
/**
|
|
79
132
|
* Reinitialize server with new credentials (called after successful auth)
|
|
80
133
|
*/
|
|
@@ -86,7 +139,7 @@ export class PicaMcpServer {
|
|
|
86
139
|
});
|
|
87
140
|
this.config = { ...this.config, picaApiKey: apiKey, lobbyMode: false };
|
|
88
141
|
this.toolRegistry = new ToolRegistry(this.pica, this.config, (key) => this.reinitialize(key), makeStdioCallerContext(apiKey), () => this.signOut());
|
|
89
|
-
this.toolRegistry.setAuditLogger(
|
|
142
|
+
this.toolRegistry.setAuditLogger(this.buildAuditLogger(apiKey, this.config.picaApiUrl));
|
|
90
143
|
this.resourceRegistry = new ResourceRegistry(this.pica, this.config);
|
|
91
144
|
console.error("[MCP Server] Reinitialized with new credentials");
|
|
92
145
|
// Tell the client the tool + resource lists have changed so it
|
|
@@ -124,7 +177,7 @@ export class PicaMcpServer {
|
|
|
124
177
|
this.pica = null;
|
|
125
178
|
this.config = { ...this.config, picaApiKey: "", lobbyMode: true };
|
|
126
179
|
this.toolRegistry = new ToolRegistry(this.pica, this.config, (key) => this.reinitialize(key), makeStdioCallerContext(""), () => this.signOut());
|
|
127
|
-
this.toolRegistry.setAuditLogger(
|
|
180
|
+
this.toolRegistry.setAuditLogger(this.buildAuditLogger("", this.config.picaApiUrl));
|
|
128
181
|
this.resourceRegistry = new ResourceRegistry(this.pica, this.config);
|
|
129
182
|
console.error("[MCP Server] Reset to lobby mode after sign_out");
|
|
130
183
|
// Same listChanged story as reinitialize() — without these the
|
|
@@ -153,6 +206,24 @@ export class PicaMcpServer {
|
|
|
153
206
|
* - Otherwise → stdio (default, for Claude Code / Cursor / VS Code)
|
|
154
207
|
*/
|
|
155
208
|
async start() {
|
|
209
|
+
// ADR-226 Phase 6 — vocabulary context-prepend at handshake.
|
|
210
|
+
// Mutate the SDK's `_instructions` field BEFORE `connect(transport)`
|
|
211
|
+
// so the InitializeResult sent to the client includes the user's
|
|
212
|
+
// vocabulary preferences appended to the base ADR-208 instructions.
|
|
213
|
+
//
|
|
214
|
+
// This is a controlled coupling to the SDK's private `_instructions`
|
|
215
|
+
// field declared in
|
|
216
|
+
// node_modules/@modelcontextprotocol/sdk/dist/cjs/server/index.d.ts:78
|
|
217
|
+
// The field has been stable since SDK 1.0; the SDK is pinned in
|
|
218
|
+
// package.json so a future minor bump won't silently break this.
|
|
219
|
+
// A unit test at __tests__/server-vocabulary-injection.test.ts
|
|
220
|
+
// catches a rename within one CI cycle.
|
|
221
|
+
//
|
|
222
|
+
// Gated on `this.pica && !lobbyMode` because vocabulary is per-user
|
|
223
|
+
// and only stdio (one process = one user) maps cleanly to a single
|
|
224
|
+
// static instructions string. HTTP / lobby skip the mutation; their
|
|
225
|
+
// initialize-time instructions stay as the static catalog version.
|
|
226
|
+
await this.injectVocabularyInstructions();
|
|
156
227
|
const mode = process.env.MCP_TRANSPORT;
|
|
157
228
|
if (mode === "http") {
|
|
158
229
|
await this.startHttp();
|
|
@@ -167,6 +238,33 @@ export class PicaMcpServer {
|
|
|
167
238
|
console.error(`[MCP Server] API URL: ${this.config.picaApiUrl}`);
|
|
168
239
|
console.error("[MCP Server] Ready to accept connections");
|
|
169
240
|
}
|
|
241
|
+
/**
|
|
242
|
+
* ADR-226 Phase 6 — fetch the user's vocabulary and append it to the
|
|
243
|
+
* SDK Server's static instructions string. Bails silently on lobby
|
|
244
|
+
* mode (no apiKey-to-user mapping yet) or any fetch failure (the base
|
|
245
|
+
* instructions are still valid; vocabulary is a layer on top, not a
|
|
246
|
+
* gate). Runs at most once per server instance.
|
|
247
|
+
*/
|
|
248
|
+
async injectVocabularyInstructions() {
|
|
249
|
+
if (!this.pica || this.config.lobbyMode)
|
|
250
|
+
return;
|
|
251
|
+
try {
|
|
252
|
+
const result = await this.pica.assistantInteractions.getVocabularyContext();
|
|
253
|
+
const vocab = result?.instructions;
|
|
254
|
+
if (!vocab)
|
|
255
|
+
return;
|
|
256
|
+
const server = this.server;
|
|
257
|
+
const base = server._instructions ?? "";
|
|
258
|
+
server._instructions = base ? `${base}\n\n${vocab}` : vocab;
|
|
259
|
+
}
|
|
260
|
+
catch (err) {
|
|
261
|
+
// Vocabulary injection is best-effort — never block boot on it.
|
|
262
|
+
// Logged at warn so a transient network blip doesn't generate a
|
|
263
|
+
// Sentry error event per feedback_auth_handler_log_level.md.
|
|
264
|
+
const cause = err instanceof Error ? err.message : String(err);
|
|
265
|
+
console.error(`[MCP Server] Vocabulary injection failed (continuing with base instructions): ${cause}`);
|
|
266
|
+
}
|
|
267
|
+
}
|
|
170
268
|
async startStdio() {
|
|
171
269
|
const transport = new StdioServerTransport();
|
|
172
270
|
await this.server.connect(transport);
|
package/dist/server.js.map
CHANGED
|
@@ -1 +1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AAC,CAAC,CAAC;QACL,CAAC;QACD,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC;QAC1B,OAAO,CAAC,KAAK,CAAC,6BAA6B,CAAC,CAAC;IAC/C,CAAC;CACF"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Skills Registry — ADR-140 Phase 2b
|
|
3
|
+
*
|
|
4
|
+
* Exposes PICA's named methodologies as MCP-loadable skills via the SEP-2640
|
|
5
|
+
* bridge pattern: each skill is reachable as both a `skill://` Resource and an
|
|
6
|
+
* MCP Tool (pica_skill_list + pica_skill_get).
|
|
7
|
+
*
|
|
8
|
+
* Bodies are bundled at build time by `scripts/build-skills.ts`. The registry
|
|
9
|
+
* is intentionally thin — list returns a metadata-only summary (tiny handshake
|
|
10
|
+
* cost), get returns the full body on demand (lazy slicing, mirrors the
|
|
11
|
+
* _inspect sections pattern from ADR-199).
|
|
12
|
+
*/
|
|
13
|
+
import { SKILLS, SKILL_NAMES, type Skill } from "./skills.generated.js";
|
|
14
|
+
/** Public-facing summary returned by listSkills — no body. */
|
|
15
|
+
export interface SkillSummary {
|
|
16
|
+
name: string;
|
|
17
|
+
description: string;
|
|
18
|
+
triggers: string[];
|
|
19
|
+
audience: string;
|
|
20
|
+
}
|
|
21
|
+
export declare class SkillsRegistry {
|
|
22
|
+
/** Stable, sorted list of available skill names. */
|
|
23
|
+
listNames(): ReadonlyArray<string>;
|
|
24
|
+
/**
|
|
25
|
+
* Lightweight list for `pica_skill_list` — no body bytes.
|
|
26
|
+
* Total size scales with skill count, not body size.
|
|
27
|
+
*/
|
|
28
|
+
listSkills(): SkillSummary[];
|
|
29
|
+
/**
|
|
30
|
+
* Full skill — bodies are loaded only when an agent invokes get.
|
|
31
|
+
* Throws when name is unknown so callers can return a RecoveryHint.
|
|
32
|
+
*/
|
|
33
|
+
getSkill(name: string): Skill;
|
|
34
|
+
has(name: string): boolean;
|
|
35
|
+
}
|
|
36
|
+
export declare class SkillNotFoundError extends Error {
|
|
37
|
+
readonly skillName: string;
|
|
38
|
+
constructor(skillName: string);
|
|
39
|
+
}
|
|
40
|
+
export { SKILLS, SKILL_NAMES };
|
|
41
|
+
export type { Skill };
|
|
42
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/skills/index.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,KAAK,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAExE,8DAA8D;AAC9D,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,qBAAa,cAAc;IACzB,oDAAoD;IACpD,SAAS,IAAI,aAAa,CAAC,MAAM,CAAC;IAIlC;;;OAGG;IACH,UAAU,IAAI,YAAY,EAAE;IAY5B;;;OAGG;IACH,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,KAAK;IAQ7B,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO;CAG3B;AAED,qBAAa,kBAAmB,SAAQ,KAAK;aACf,SAAS,EAAE,MAAM;gBAAjB,SAAS,EAAE,MAAM;CAI9C;AAED,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,CAAC;AAC/B,YAAY,EAAE,KAAK,EAAE,CAAC"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
// Copyright (c) 2024-2026 Withpica Ltd. All rights reserved.
|
|
2
|
+
/**
|
|
3
|
+
* Skills Registry — ADR-140 Phase 2b
|
|
4
|
+
*
|
|
5
|
+
* Exposes PICA's named methodologies as MCP-loadable skills via the SEP-2640
|
|
6
|
+
* bridge pattern: each skill is reachable as both a `skill://` Resource and an
|
|
7
|
+
* MCP Tool (pica_skill_list + pica_skill_get).
|
|
8
|
+
*
|
|
9
|
+
* Bodies are bundled at build time by `scripts/build-skills.ts`. The registry
|
|
10
|
+
* is intentionally thin — list returns a metadata-only summary (tiny handshake
|
|
11
|
+
* cost), get returns the full body on demand (lazy slicing, mirrors the
|
|
12
|
+
* _inspect sections pattern from ADR-199).
|
|
13
|
+
*/
|
|
14
|
+
import { SKILLS, SKILL_NAMES } from "./skills.generated.js";
|
|
15
|
+
export class SkillsRegistry {
|
|
16
|
+
/** Stable, sorted list of available skill names. */
|
|
17
|
+
listNames() {
|
|
18
|
+
return SKILL_NAMES;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Lightweight list for `pica_skill_list` — no body bytes.
|
|
22
|
+
* Total size scales with skill count, not body size.
|
|
23
|
+
*/
|
|
24
|
+
listSkills() {
|
|
25
|
+
return SKILL_NAMES.map((name) => {
|
|
26
|
+
const skill = SKILLS[name];
|
|
27
|
+
return {
|
|
28
|
+
name: skill.name,
|
|
29
|
+
description: skill.description,
|
|
30
|
+
triggers: skill.triggers,
|
|
31
|
+
audience: skill.audience,
|
|
32
|
+
};
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Full skill — bodies are loaded only when an agent invokes get.
|
|
37
|
+
* Throws when name is unknown so callers can return a RecoveryHint.
|
|
38
|
+
*/
|
|
39
|
+
getSkill(name) {
|
|
40
|
+
const skill = SKILLS[name];
|
|
41
|
+
if (!skill) {
|
|
42
|
+
throw new SkillNotFoundError(name);
|
|
43
|
+
}
|
|
44
|
+
return skill;
|
|
45
|
+
}
|
|
46
|
+
has(name) {
|
|
47
|
+
return name in SKILLS;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
export class SkillNotFoundError extends Error {
|
|
51
|
+
skillName;
|
|
52
|
+
constructor(skillName) {
|
|
53
|
+
super(`Skill not found: ${skillName}`);
|
|
54
|
+
this.skillName = skillName;
|
|
55
|
+
this.name = "SkillNotFoundError";
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
export { SKILLS, SKILL_NAMES };
|
|
59
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/skills/index.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAE7D;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,MAAM,EAAE,WAAW,EAAc,MAAM,uBAAuB,CAAC;AAUxE,MAAM,OAAO,cAAc;IACzB,oDAAoD;IACpD,SAAS;QACP,OAAO,WAAW,CAAC;IACrB,CAAC;IAED;;;OAGG;IACH,UAAU;QACR,OAAO,WAAW,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;YAC9B,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC;YAC3B,OAAO;gBACL,IAAI,EAAE,KAAK,CAAC,IAAI;gBAChB,WAAW,EAAE,KAAK,CAAC,WAAW;gBAC9B,QAAQ,EAAE,KAAK,CAAC,QAAQ;gBACxB,QAAQ,EAAE,KAAK,CAAC,QAAQ;aACzB,CAAC;QACJ,CAAC,CAAC,CAAC;IACL,CAAC;IAED;;;OAGG;IACH,QAAQ,CAAC,IAAY;QACnB,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC;QAC3B,IAAI,CAAC,KAAK,EAAE,CAAC;YACX,MAAM,IAAI,kBAAkB,CAAC,IAAI,CAAC,CAAC;QACrC,CAAC;QACD,OAAO,KAAK,CAAC;IACf,CAAC;IAED,GAAG,CAAC,IAAY;QACd,OAAO,IAAI,IAAI,MAAM,CAAC;IACxB,CAAC;CACF;AAED,MAAM,OAAO,kBAAmB,SAAQ,KAAK;IACf;IAA5B,YAA4B,SAAiB;QAC3C,KAAK,CAAC,oBAAoB,SAAS,EAAE,CAAC,CAAC;QADb,cAAS,GAAT,SAAS,CAAQ;QAE3C,IAAI,CAAC,IAAI,GAAG,oBAAoB,CAAC;IACnC,CAAC;CACF;AAED,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GENERATED FILE — DO NOT EDIT BY HAND.
|
|
3
|
+
*
|
|
4
|
+
* Regenerated by `scripts/build-skills.ts` from `src/skills/<name>/SKILL.md`.
|
|
5
|
+
* Runs in `prebuild` and `prepublishOnly`. See ADR-140 Phase 2b.
|
|
6
|
+
*/
|
|
7
|
+
export interface Skill {
|
|
8
|
+
/** Stable kebab-case identifier matching the directory name. */
|
|
9
|
+
name: string;
|
|
10
|
+
/** One-line description shown in pica_skill_list. */
|
|
11
|
+
description: string;
|
|
12
|
+
/** Trigger phrases an agent should recognise as invoking this skill. */
|
|
13
|
+
triggers: string[];
|
|
14
|
+
/** Audience tag (manager / artist / sync supervisor / etc). */
|
|
15
|
+
audience: string;
|
|
16
|
+
/** Tools the skill body chains. Lint-checkable. */
|
|
17
|
+
tools_required: string[];
|
|
18
|
+
/** One-line output shape description. */
|
|
19
|
+
output: string;
|
|
20
|
+
/** Full skill methodology body — markdown, exposed by pica_skill_get. */
|
|
21
|
+
body: string;
|
|
22
|
+
}
|
|
23
|
+
export declare const SKILLS: Record<string, Skill>;
|
|
24
|
+
export declare const SKILL_NAMES: ReadonlyArray<string>;
|
|
25
|
+
//# sourceMappingURL=skills.generated.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"skills.generated.d.ts","sourceRoot":"","sources":["../../src/skills/skills.generated.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AAEH,MAAM,WAAW,KAAK;IACpB,gEAAgE;IAChE,IAAI,EAAE,MAAM,CAAC;IACb,qDAAqD;IACrD,WAAW,EAAE,MAAM,CAAC;IACpB,wEAAwE;IACxE,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,+DAA+D;IAC/D,QAAQ,EAAE,MAAM,CAAC;IACjB,mDAAmD;IACnD,cAAc,EAAE,MAAM,EAAE,CAAC;IACzB,yCAAyC;IACzC,MAAM,EAAE,MAAM,CAAC;IACf,yEAAyE;IACzE,IAAI,EAAE,MAAM,CAAC;CACd;AAGD,eAAO,MAAM,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAkFxC,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,aAAa,CAAC,MAAM,CAA+K,CAAC"}
|