@withpica/mcp-server 2.24.0 → 2.26.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +30 -3
- package/dist/config.d.ts +1 -1
- package/dist/config.js +1 -1
- package/dist/prompts/index.js +3 -3
- package/dist/resources/llms-primer.d.ts +1 -1
- package/dist/resources/llms-primer.d.ts.map +1 -1
- package/dist/resources/llms-primer.js +1 -1
- package/dist/server-instructions.d.ts +1 -1
- package/dist/server-instructions.d.ts.map +1 -1
- package/dist/server-instructions.js +2 -4
- package/dist/server-instructions.js.map +1 -1
- package/dist/tools/audio-files.js +3 -3
- package/dist/tools/audio-files.js.map +1 -1
- package/dist/tools/collaborators.js +1 -1
- package/dist/tools/collaborators.js.map +1 -1
- package/dist/tools/credits.d.ts +0 -1
- package/dist/tools/credits.d.ts.map +1 -1
- package/dist/tools/credits.js +9 -21
- package/dist/tools/credits.js.map +1 -1
- package/dist/tools/dashboard.d.ts +3 -0
- package/dist/tools/dashboard.d.ts.map +1 -1
- package/dist/tools/dashboard.js +108 -4
- package/dist/tools/dashboard.js.map +1 -1
- package/dist/tools/discovery.d.ts.map +1 -1
- package/dist/tools/discovery.js +7 -20
- package/dist/tools/discovery.js.map +1 -1
- package/dist/tools/enrichment.d.ts +0 -17
- package/dist/tools/enrichment.d.ts.map +1 -1
- package/dist/tools/enrichment.js +22 -182
- package/dist/tools/enrichment.js.map +1 -1
- package/dist/tools/exports.js +3 -3
- package/dist/tools/exports.js.map +1 -1
- package/dist/tools/metadata.d.ts.map +1 -1
- package/dist/tools/metadata.js +22 -61
- package/dist/tools/metadata.js.map +1 -1
- package/dist/tools/people.d.ts +0 -15
- package/dist/tools/people.d.ts.map +1 -1
- package/dist/tools/people.js +6 -106
- package/dist/tools/people.js.map +1 -1
- package/dist/tools/purchases.d.ts +15 -4
- package/dist/tools/purchases.d.ts.map +1 -1
- package/dist/tools/purchases.js +3 -57
- package/dist/tools/purchases.js.map +1 -1
- package/dist/tools/recovery-hints.d.ts.map +1 -1
- package/dist/tools/recovery-hints.js +14 -128
- package/dist/tools/recovery-hints.js.map +1 -1
- package/dist/tools/search.js +1 -1
- package/dist/tools/search.js.map +1 -1
- package/dist/tools/settings.d.ts +0 -1
- package/dist/tools/settings.d.ts.map +1 -1
- package/dist/tools/settings.js +6 -31
- package/dist/tools/settings.js.map +1 -1
- package/dist/tools/works.d.ts.map +1 -1
- package/dist/tools/works.js +21 -3
- package/dist/tools/works.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -11,26 +11,53 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
11
11
|
|
|
12
12
|
## [Unreleased]
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
### Removed
|
|
15
|
+
|
|
16
|
+
- **Billing-credit tools removed from the MCP surface:** `pica_credits_balance` (credits.ts), `pica_credits_history` (settings.ts), `pica_credits_purchase` (purchases.ts tombstoned to an empty class). See `docs/MCP_REFINEMENT_LOG.md` entry B-001. withPICA is subscription-only at £9.99/mo; surfacing a credit-balance + credit-history + credit-purchase tool trio contradicted the billing model and misled agents (caught 2026-04-22 when an agent transcript opened with "998,894 credits — plenty. Running the export now."). The underlying SDK methods (`creditsBalance.*`, `settings.creditsHistory`) and `lib/services/credits/**` infra remain intact — only the MCP tool surface shrinks. `pica_credits_list` and `pica_credits_update` are **kept**: they're work_credits (songwriter roles + splits on a work), not billing credits.
|
|
17
|
+
- **`CREDIT_INSUFFICIENT` recovery hints pointing at `pica_credits_balance`** removed from `recovery-hints.ts` for `pica_resolve_work`, `pica_export_song_registration`, `pica_export_catalog_asset_report`, `pica_audio_analyze`. Paired tests under `__tests__/tools/recovery-hints.test.ts` + `settings.test.ts` updated to assert the new shape.
|
|
18
|
+
|
|
19
|
+
### Changed
|
|
20
|
+
|
|
21
|
+
- **Credit-gating language stripped from tool descriptions** — `pica_audio_identify` ("Costs 3 pica credits on match…"), `pica_export_song_registration` ("Costs 1 pica credit."), `pica_export_industry_ready` (same), `pica_export_catalog_asset_report` ("Costs 5 pica credits…"), and the 3 `pica_resolve_*` tools in `enrichment.ts` ("Costs 1 pica credit per call."). The `withCreditGate` / `withBillingGate` runtime wrappers are **left in place** — only the agent-facing prompt-gating copy goes. Same B-001 refinement entry.
|
|
22
|
+
- **Server instructions** (`src/server-instructions.ts`, mirrored in `lib/mcp/server-instructions.ts` via the parity test) open with a one-line disambiguation from `@picahq/mcp` (Pica AI / picaos.com) — a different product whose short name collides with ours. Helps agents that have both connectors installed (or users who pasted their withPICA key into the wrong config) recognise which server they're actually talking to. See the picaos name-collision memory rule.
|
|
23
|
+
- **`pica_catalog_diligence` now returns structured JSON** instead of failing with a JSON-parse error on binary ZIP bytes. The fix lives in `@withpica/mcp-sdk`'s `AnalyticsResource.catalogDiligence()` — the SDK now requests `?format=json`. See the mcp-sdk CHANGELOG for detail. MCP refinement log: "Singleton — `pica_catalog_diligence` returns ZIP parsed as JSON".
|
|
15
24
|
|
|
16
25
|
### Fixed
|
|
17
26
|
|
|
18
|
-
-
|
|
19
|
-
|
|
27
|
+
- **ADR-174 Phase 2c — inverse phantom in `pica_works_update` (works slice).** Three jsonb compliance fields (`ai_disclosure`, `provenance_attestation`, `training_rights`) are satellite-routed to `work_licensing` via `WORK_SATELLITE_FIELDS` and accepted by both the HTTP route allow-list and the service layer, but were missing from `WORK_WRITE_PROPERTIES`. Agents following the `pica_works_update with ai_disclosure: ...` completion hint at works.ts:577 were hitting schema-level silent-drop (or strict-validator 400s). Added all three properties to the write schema with shapes copy-pasted from the parallel fields on `pica_recordings_update` (recordings.ts:193). Tool description updated to distinguish audio-trait satellite fields (still not exposed) from the three compliance satellite fields (now exposed). Full audit of the other 22 customer-MCP write tools yielded zero further inverse phantoms — see `docs/audits/2026-04-21-mcp-inverse-phantom-audit.md`.
|
|
28
|
+
|
|
29
|
+
### Added
|
|
30
|
+
|
|
31
|
+
- **ADR-189 Phase 4 slice 3: `pica_claim_artist` MCP tool.** INSTANT path for artist-claim on discovery-backed evidence. Wraps `artistClaimingService.processClaimDecision` to reuse the existing `work_claims.artist_claim_status` / `claimed_by_person_id` / `claim_confirmed_at` update path + `performer` work_credits insert. Refuses (409 `ADMIN_REVIEW_IN_PROGRESS`) when an open admin `artist_claims` row exists for the same (work, person) — returns `admin_review_id` in the body so the agent surface can route the user to resolve it. Rate-limited to 20/hour per user via the shared `claim_write` bucket. Wrapped in `withAgentActionStamp` when grant-authed — rollback captures pre-write `work_claims` row + tracks whether a new performer credit was inserted (deleted on compensation) or pre-existed (left alone). **Schema drift carryover:** the plan proposed capturing rollback state from 4 `works` columns, but live staging (`rtxcxazevrgcjnudvggf`) keeps the artist-claim lifecycle columns (`artist_claim_status`, `claimed_by_person_id`, `claim_confirmed_at`) on the `work_claims` satellite — only `primary_artist_id` lives on `works`. Service captures + restores from `work_claims` accordingly. The live `artist_claims.claim_status` CHECK constraint has no `under_review` state (only `pending | approved | rejected | withdrawn`), so the open-review gate checks `claim_status = 'pending'` only.
|
|
32
|
+
|
|
33
|
+
### Removed
|
|
34
|
+
|
|
35
|
+
- **ADR-154 F13: seven deprecated per-source enrich tools removed.** `pica_enrich_work_{mlc,musicbrainz,discogs,spotify,youtube}` and `pica_people_enrich_{isni,musicbrainz}` (tombstoned since ADR-179 Phase 1/2, 2026-04-17) are no longer registered — every call has returned a `-32070 TOOL_DEPRECATED` error for a full minor cycle, ending the one-minor deprecation window per ADR-179 Decision 2. Callers must use `pica_resolve_work(sources: [...])` or `pica_resolve_person(sources: [...])` instead; the `tools/list`, `metadata`, `recovery-hints`, and category-`discovery` surfaces shed the seven stale entries in this release. Downstream impact: clients that hardcoded the tool names now get `tools/list`-level absence rather than a deprecation envelope — fail-fast instead of fail-with-suggestion.
|
|
20
36
|
|
|
21
37
|
### Changed
|
|
22
38
|
|
|
39
|
+
- **ADR-154 F14: completion-hint sweep for the seven removed tools.** Updated every `→ then:` and hint-string reference that pointed at the F13 tombstones across `enrichment.ts`, `people.ts` (3 sites), `collaborators.ts`, `works.ts` (2 sites), `search.ts`, `server-instructions.ts`, `prompts/index.ts` (3 sites), and `resources/llms-primer.ts`. Agents discovering tools via descriptions will no longer be trained toward dead tool names. The ADR-179 "Replaces the five/two per-source tools" phrasing is gone from the resolver descriptions too — resolvers stand on their own now.
|
|
23
40
|
- **ADR-180 Phase 3: full TOOL_METADATA coverage.** 29 tools retrofitted in `mcp-server/src/tools/metadata.ts` across eight family-scoped commits — resolve (3), cascade (3), enrichment proposals (4), collaborators (4), notify-user scheduling (3), physical-assets links (4), misc singletons (5), and the ADR-185 Part 1 agent-identity drift (3). `scripts/mcp-tool-lint-baseline.json` is deleted; MCP Tool Lint now runs in fully-strict mode. No behaviour change — tool discovery, audit categorisation, and risk-tier gating now classify the same 29 tools they couldn't classify before. `credits_required` deliberately omitted from new entries (credit gating is a no-op pass-through since ADR-162). Retry-safety follows ADR-180's `risk × retry_safe` table — e.g. `pica_enrichment_proposal_apply` is `retry_safe: false` (writes to entity columns), `_reject` is `retry_safe: true` (content-hash suppression is set-once). ADR-180 flipped from `Proposed` to `Accepted`.
|
|
24
41
|
- **ADR-193 Surfaces 1+3: peer-connector coaching + URI source conventions (server-instructions addendum).** Handshake copy coaches agents to check peer MCPs (email / drive / notes / calendar / DAW) before asking users to paste or type data, and to cite findings via `pica_enrichment_propose` `sources[].url` using URI schemes — `gmail://` `gdrive://` `notion://` `file://` `telegram://` `calendar://` `daw://` `user://` `web://`. See `docs/mcp-source-uri-conventions.md` in the main repo for shapes. First concrete build for ADR-190 Principles 2 + 3 (Agent-Mediated Source Discovery). A latent HTTP-transport gap was fixed in the same develop commit (`63eef17f8`) — `/api/mcp/route.ts` was not wiring `SERVER_INSTRUCTIONS` into its Server constructor, so remote agentic clients (ChatGPT Apps, Claude Desktop remote, Cursor) saw zero coaching. The stdio transport in this package was always serving instructions correctly; only the remote transport was affected.
|
|
25
42
|
|
|
26
43
|
### Added
|
|
27
44
|
|
|
28
45
|
- **ADR-193 Surface 2: `gap_hints` envelope on 4 read tools.** `pica_works_inspect`, `pica_agreements_inspect`, `pica_people_inspect`, and `pica_enrichment_proposals_list` now emit an optional `gap_hints[]` field on `structuredContent` when a real gap is present. Each hint is capability-named (ADR-190 Principle 2 — `email_search` / `drive_search` / `filesystem_search` / `notes_search` / `calendar_search` / `web_search`, never vendor names), carries a concrete `query_shape`, and pre-fills the `then_call: "pica_enrichment_propose"` with the exact `then_args_shape` the agent should emit back (including URI-citation scaffolding from Surface 3). Gated by `MCP_GAP_HINTS_ENABLED=1` — off by default in prod. Empty array / omitted envelope when there's no real gap. Flat additive — the existing `CompletionHint` pipeline on `works_inspect` is untouched. Bundled: `enrich-metadata` prompt references the peer-connector pattern and points the agent at `gap_hints`.
|
|
46
|
+
- **ADR-193 Surface 4: `pica_enrichment_propose` accepts `proposal_action: "create"`.** Closes the reserved-but-unwired create path from ADR-178 Phase 1. The tool schema now accepts `entity_type: "recording" | "agreement" | "person"` paired with `parent_entity_type` + `parent_entity_id` for create proposals. Apply-path branches on `rule_id === "agent_research"` and routes to `recordingsService.create` (parent required; `work_id` linkage), `agreementsService.create` (optional work parent, linked via `agreementWorksService.addWork` after create), or `peopleAdminService.create` (standalone — people have no parent FK). Recording creates seed `field_sources` verbatim from `proposal.sources[].url`, preserving URI schemes (gmail://, gdrive://, notion://, file://, telegram://, user://, web://) per ADR-193 AC 5. Agreements + people don't carry `field_sources` on the main table today; provenance URIs are captured in `resolution_note` until a follow-up migration adds the column. Work + publisher creation remain explicitly out of scope (dedup-critical — deferred to future ADR). Migration `20260422_01_adr193_proposal_parent_fields` adds nullable `parent_entity_type` + `parent_entity_id` columns with a CHECK pair + partial index for the review-queue scan. Legacy `artist_title_to_youtube` create rule is untouched (it continues to overload `entity_id` as the parent work id). 4 new service-layer tests green; total proposal-service suite 42/42.
|
|
29
47
|
- **ADR-185 Part 1: three new session-auth-only tools.** `pica_create_agent_identity`, `pica_issue_agent_grant`, `pica_list_my_agent_grants`. Back a user-issued agent-identity + scoped-grant primitive — the substrate for Parts 2 (settings UI) and 3 (per-write provenance stamping). All three require `write:agent_identity` scope AND session-auth (raw API key / OAuth); the HTTP MCP dispatcher refuses `pica_grant_` callers with a structured `reason: "session_auth_required"` error before execution per AC 12. Subject is always the authenticated user — caller-supplied `user_id` is dropped per ADR-184 rule 2 / ADR-185 rule 1. Grant tokens use the format `pica_grant_<64 hex>` and are hashed at rest with HMAC-SHA256 + `API_KEY_HASH_PEPPER` (same scheme as api_keys per ADR-185 line 193 + ADR-167 D-5).
|
|
30
48
|
- **ADR-185 Part 2: two new session-auth-only tools.** `pica_revoke_agent_grant` (DELETE `/admin/agent-grants/:id`, idempotent, 404 masks ownership failures) and `pica_get_agent_activity` (GET `/admin/agent-activity`, paginated, optionally filtered by identity or grant). Both appended to `SESSION_AUTH_ONLY_TOOLS` in the HTTP MCP dispatcher and to the `write:agent_identity` scope bucket. Together with the Part 1 trio this completes the five-tool agent-identity surface the ADR Scope requires. Revocation takes effect on the next request (AC: within 60s — `resolveGrantToken` checks `revoked_at` on every call, no cache layer).
|
|
31
49
|
- **ADR-185 Part 3 passes 1-5: agent-action provenance stamping wraps 27 write-tool families.** Part 3 layers two complementary wrappers over existing write tools so every per-grant write records a row in `mcp_agent_actions` for audit + revoke-replay. `withAgentActionStamp` (compensation-after): handler runs, stamps; on stamp failure, compensation undoes the write via captured prior state — used for creates and updates (soft-delete families get meaningful delete compensation — flip `is_deleted` back). `withAgentActionStampFirst` (stamp-first, pass 4): stamp commits BEFORE the destructive op; stamp-ok + handler-fail logs a "ghost stamp" at error level — used for hard-delete families where compensation is impossible. Both wrappers are no-ops when the caller is not an agent grant (session-auth / raw API key writes are unaffected). Families covered across the five passes: works/recordings/people/agreements/releases/notes creates; notes_delete; sessions_create; share_links_create; projects_create; multimedia_create; recording_splits_create; works_update; recordings_update; people_update; agreements_update; projects_update; notes_update; releases_update; people_delete; publishers_create; the six hard-delete families (works/recordings/agreements/projects/sessions/releases) via the stamp-first variant; and pass 5's `pica_projects_attach_works` (project_works insert wrapped, GET + POST migrated from `requireAuth` + `getUserProfile` to `withOrgContext` for consistency). `pica_sessions_update` remains deferred — action-branching route (start/complete/cancel + participant add/remove + regular update) needs a dedicated design slice before wrapping.
|
|
32
50
|
- **New tool** `pica_submit_feedback`: agent-native feedback submission. Routes bug_report→devops, feature_request→ceo, question→comms, other→category-mapped. Requires `write:feedback` scope. Subject is always the authenticated user per ADR-184 rule 2. (ADR-184 slice 8 — landed on develop 2026-04-19 post-2.23.0 publish.)
|
|
33
51
|
- **ADR-189 Phase 3: two new identity-capture tools.** `pica_update_my_identity` (stage_name / IPI / ISNI / IPN / PRO) and `pica_update_organisation_profile` (org_type / display_name / tagline / ipi_number). Both admin-scoped, both `retry_safe: true` (idempotent upserts — re-applying the same IPI leaves the row in the same state). Subject derived from auth (no `user_id` / `organisation_id` parameters — ADR-184 rule 2). After the identity write, `pica_update_my_identity` re-runs cross-org discovery and returns the count of newly-visible credits / custody / artist-link rows so the agent can surface "found N more — claim them?" in the same conversation turn. Rate-limited at 20 writes/hour/user via `checkActionRateLimit` (R1 mitigation). Admin routes (`POST /api/admin/my-identity`, `POST /api/admin/organisation-profile`) wrap in `withAgentActionStamp` when the caller presents an agent grant (ADR-185 Part 3) — UPDATE compensation captures pre-write state via read-before-write and PATCHes the row back on stamp failure, or deletes a lazy-created person row.
|
|
52
|
+
- **ADR-189 Phase 4 Task 1: `pica_claim_credit`.** New activation-loop tool that drains a `discovered_credits` row into a `work_credits` row in the calling org, giving the user `view` access to the linked work. Check-and-set on `discovered_credits.status` prevents double-claims in concurrent sessions. Rate-limited to 20/hour per user via `checkActionRateLimit`. Returns `is_first_claim: true` on first-ever claim by the user (derived from `agent_action_log` stamp count). Wraps in `withAgentActionStamp` for grant callers — compensating transaction calls `revertClaimCredit` (flips discovery back to `pending` + deletes the `work_credits` row) if the stamp INSERT fails. Error taxonomy: `DISCOVERY_NOT_FOUND` (404), `DISCOVERY_ALREADY_RESOLVED` (409), `EVIDENCE_REVOKED` (410), `RATE_LIMITED` (429 + `Retry-After`). `pica_claim_credit` added to `ADMIN_ONLY_TOOLS` in `mcp-scopes.ts`; metadata entry `category: "discovery", risk: "mutating", retry_safe: false`. Route: `POST /api/admin/discoveries/[id]/claim-credit`. SDK method: `pica.discoveries.claimCredit(id)`.
|
|
53
|
+
- **ADR-189 Phase 4 Task 2: `pica_claim_custody` + +72h auto-approve worker.** Drains a `discovered_custody` row into a pending `custody_claims` row (status=`pending`, `chain`=custody_type, `custody_source`=`claimed`, provenance in `evidence.source`=`"auto-discovered-via-email"`). Schedules a silent-consent auto-approve by inserting a `scheduled_notifications` row (`source=pica_claim_custody`, `deliver_at`=+72h, message=`custody_auto_approve:<uuid>`). Does NOT mutate `works.{composition,master}_custodian_org_id` immediately — the 1-minute cron fires `scheduledNotificationsService.drainDue()` which now dispatches `source=pica_claim_custody` rows to a new `handleCustodyAutoApprove` branch that runs the **Delta 1 stale-promotion guard**: UPDATE `works` custodian columns ONLY IF the snapshot captured at claim time (`expected_previous_custodian_org_id` + `expected_custody_source` + `custody_side` — migration `20260421_01_custody_claims_expected_previous`) still matches; otherwise flip the claim to `superseded` (new status) and leave the catalog untouched. Error taxonomy identical to `pica_claim_credit`. `pica_claim_custody` was already in `ADMIN_ONLY_TOOLS` since Phase 4 Task 0; this ships the actual wiring. Route: `POST /api/admin/discoveries/[id]/claim-custody`. SDK method: `pica.discoveries.claimCustody(id)`. Stamp compensation via `revertClaimCustody` flips discovery back to pending, cancels the scheduled_notification, deletes the custody_claims row.
|
|
54
|
+
|
|
55
|
+
## [2.24.0] - 2026-04-21
|
|
56
|
+
|
|
57
|
+
### Fixed
|
|
58
|
+
|
|
59
|
+
- **`pica_integrations_status` no longer tells users to "connect Spotify".** Two real-user failures on Claude Desktop (2026-04-21) traced back to the tool lumping platform-level Spotify/YouTube (PICA has its own credentials; no per-user OAuth exists or has ever existed) into the same "Available to connect" list as genuine user-OAuth peer connectors (Google/Notion/Airtable/Telegram). Failure modes observed: (1) user pasted a Spotify track URL → agent replied "head to your Pica dashboard and add Spotify as an integration"; (2) user asked "what songs do I have in pica" with a catalog holding 1 work → agent replied "you currently have no connections set up in Pica — so there are no songs or any other data accessible." Reshape: the tool now returns `peerConnectors` (the 4 actual OAuth services) separately from `platformReads` (Spotify, YouTube, MusicBrainz, MLC, ISNI, Discogs, with the tool name for each). Summary leads with "PICA catalog is ALWAYS accessible via pica_works_query, pica_people_query, pica_dashboard_briefing, pica_search_all — no setup required." The dead `connectedProviders.includes("spotify")` check that could never evaluate true was removed.
|
|
60
|
+
- **Server instructions: catalog-is-always-accessible guidance.** Handshake now explicitly states (a) the catalog is always accessible via the read tools with zero setup, (b) `pica_integrations_status` showing "0 connected" refers to optional peer connectors, NOT the catalog — call `pica_works_query` to check, (c) Spotify/YouTube URLs go through `pica_import_streaming_link` / `pica_import_youtube_link` directly; no per-user Spotify/YouTube OAuth exists to set up, do not tell the user to "connect Spotify in your dashboard". Replaces earlier copy that left the agent free to hallucinate a dashboard-integration flow. `lib/mcp/server-instructions.ts` parity copy updated in lockstep; the HTTP transport at `/api/mcp` picks up the new text on next handshake without requiring a redeploy of this package. Under the 2000-char token budget at 1833 chars.
|
|
34
61
|
|
|
35
62
|
## [2.23.0] - 2026-04-19
|
|
36
63
|
|
package/dist/config.d.ts
CHANGED
package/dist/config.js
CHANGED
|
@@ -11,7 +11,7 @@ import { readCredentials, getDefaultCredentialsPath, } from "@withpica/mcp-utils
|
|
|
11
11
|
// from mcp-server/dist/config.js. Past drift incidents: 2026-04-08
|
|
12
12
|
// (banner 2.5.0 vs npm 2.6.1), 2026-04-19 ADR-181 Phase 2 (banner 2.6.2
|
|
13
13
|
// vs npm 2.22.0). ADR-180 Phase 2 collapses the duplication.
|
|
14
|
-
export const VERSION = "2.
|
|
14
|
+
export const VERSION = "2.26.0";
|
|
15
15
|
export function loadConfig() {
|
|
16
16
|
const credentialsPath = process.env.PICA_CREDENTIALS_PATH || getDefaultCredentialsPath();
|
|
17
17
|
const debug = process.env.DEBUG === "true" || process.env.DEBUG === "1";
|
package/dist/prompts/index.js
CHANGED
|
@@ -327,7 +327,7 @@ Ask me what I've got and help me get started with whichever method I choose.
|
|
|
327
327
|
|
|
328
328
|
After importing, guide me through closing the loop on each work:
|
|
329
329
|
- Who wrote these songs? (pica_credits_update — add writers and set splits)
|
|
330
|
-
- Are there publishing details registered? (
|
|
330
|
+
- Are there publishing details registered? (pica_resolve_work with sources: ['mlc'] — check MLC)
|
|
331
331
|
- Do I have audio files to upload? (pica_audio_presigned_upload — for analysis)
|
|
332
332
|
- What identifiers are missing? (pica_works_inspect with sections: ["enrichment"] — check coverage)
|
|
333
333
|
|
|
@@ -368,7 +368,7 @@ For the work, check every aspect of completeness:
|
|
|
368
368
|
For each gap found, offer a specific action:
|
|
369
369
|
- Missing credits → "Want me to add writers? Who wrote this song?"
|
|
370
370
|
- Splits not set → "What's the split between the writers?"
|
|
371
|
-
- No ISWC → "Want me to check MLC for this work?" (
|
|
371
|
+
- No ISWC → "Want me to check MLC for this work?" (pica_resolve_work with sources: ['mlc'])
|
|
372
372
|
- No ISRC → "Do you have a recording with an ISRC for this?"
|
|
373
373
|
- No audio → "Got a master recording to upload?"
|
|
374
374
|
- Audio not analysed → "Want me to analyse the audio for BPM, key, and mood?"
|
|
@@ -399,7 +399,7 @@ Steps:
|
|
|
399
399
|
1. pica_works_query — list works, then use pica_works_inspect with sections: ["registration"] to check registration status across PROs (PRS, MCPS, PPL, MLC)
|
|
400
400
|
2. For works that aren't registered, use pica_works_inspect with sections: ["registration", "completeness"] on a sample to understand what's blocking registration
|
|
401
401
|
3. Identify common blockers:
|
|
402
|
-
- Missing ISWC (needed for PRS/MCPS) → suggest
|
|
402
|
+
- Missing ISWC (needed for PRS/MCPS) → suggest pica_resolve_work with sources: ['mlc']
|
|
403
403
|
- Missing ISRC (needed for PPL) → check if recordings have ISRCs
|
|
404
404
|
- Missing credits (needed for all) → suggest adding writers
|
|
405
405
|
- Missing identifiers on people (IPI needed for PRO registration) → suggest enrichment
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const WITHPICA_PRIMER = "# PICA \u2014 Music Catalog Management Platform\n\nPICA helps music creators and publishers manage their catalog metadata,\ntrack royalties, and prepare works for registration with collection societies.\n\n## Core Entities\n\n### Work\nA musical composition (song, piece, library track). The central entity.\n- Has: title, ISWC, work_type (song/library/demo), genre, mood, BPM, key\n- Relationships: has many credits (writers/composers), has many recordings,\n has many agreements, may have audio files, may have multimedia\n- Identifiers: ISWC (global), Tunecode (PRS), CAE/IPI (writer)\n\n### Person\nA human involved in music \u2014 writer, composer, performer, producer, publisher.\n- Has: name, email, IPI number, ISNI, MusicBrainz ID, PRO affiliation\n- Relationships: credited on many works, may have recordings, may have agreements\n- Can be enriched via: ISNI, MusicBrainz, Wikidata\n\n### Recording\nA specific audio capture of a work \u2014 the master/sound recording side.\n- Has: title, ISRC, duration, artist, label\n- Relationships: belongs to one work, has credits (performers/producers)\n- Distinct from the work: a work is the composition, a recording is the performance\n\n### Agreement\nA contract governing rights to works \u2014 publishing, sync, distribution.\n- Has: title, type, parties, dates, territory, terms\n- Relationships: covers many works\n- Types: publishing_admin, co_publishing, master_recording, sub_publishing,\n admin_only, distribution, library_music, production, artist_contract,\n termination, report, other\n\n### Import Document\nA canonical representation of an ingested file (royalty statement, CSV import).\n- Has: source (16 formats \u2014 PROs: PRS, ASCAP, BMI, SESAC, SOCAN, APRA, GEMA, SACEM; NROs: PPL, SoundExchange, GVL; Mechanical: MCPS; Distributors: DistroKid, TuneCore, CD Baby; Revenue: YouTube Content ID), period, line items, field mappings, warnings\n- Immutable snapshot of the import event \u2014 not a live view\n- Use pica_import_documents_list to find them, pica_import_documents_get to read\n\n## First Connection\n\nIf you're connecting to this workspace for the first time or don't know where to start,\ninvoke the **workspace-autopilot** prompt. It reads the workspace state and routes you\nto the most valuable workflow automatically.\n\n## Recommended Workflows\n\n1. **Catalog audit**: pica_catalog_stats \u2192 pica_works_query({ health_filter: \"needs_attention\" }) \u2192 pica_works_inspect({ sections: [\"completeness\"] })\n2. **Enrichment**: pica_enrichment_candidates \u2192
|
|
1
|
+
export declare const WITHPICA_PRIMER = "# PICA \u2014 Music Catalog Management Platform\n\nPICA helps music creators and publishers manage their catalog metadata,\ntrack royalties, and prepare works for registration with collection societies.\n\n## Core Entities\n\n### Work\nA musical composition (song, piece, library track). The central entity.\n- Has: title, ISWC, work_type (song/library/demo), genre, mood, BPM, key\n- Relationships: has many credits (writers/composers), has many recordings,\n has many agreements, may have audio files, may have multimedia\n- Identifiers: ISWC (global), Tunecode (PRS), CAE/IPI (writer)\n\n### Person\nA human involved in music \u2014 writer, composer, performer, producer, publisher.\n- Has: name, email, IPI number, ISNI, MusicBrainz ID, PRO affiliation\n- Relationships: credited on many works, may have recordings, may have agreements\n- Can be enriched via: ISNI, MusicBrainz, Wikidata\n\n### Recording\nA specific audio capture of a work \u2014 the master/sound recording side.\n- Has: title, ISRC, duration, artist, label\n- Relationships: belongs to one work, has credits (performers/producers)\n- Distinct from the work: a work is the composition, a recording is the performance\n\n### Agreement\nA contract governing rights to works \u2014 publishing, sync, distribution.\n- Has: title, type, parties, dates, territory, terms\n- Relationships: covers many works\n- Types: publishing_admin, co_publishing, master_recording, sub_publishing,\n admin_only, distribution, library_music, production, artist_contract,\n termination, report, other\n\n### Import Document\nA canonical representation of an ingested file (royalty statement, CSV import).\n- Has: source (16 formats \u2014 PROs: PRS, ASCAP, BMI, SESAC, SOCAN, APRA, GEMA, SACEM; NROs: PPL, SoundExchange, GVL; Mechanical: MCPS; Distributors: DistroKid, TuneCore, CD Baby; Revenue: YouTube Content ID), period, line items, field mappings, warnings\n- Immutable snapshot of the import event \u2014 not a live view\n- Use pica_import_documents_list to find them, pica_import_documents_get to read\n\n## First Connection\n\nIf you're connecting to this workspace for the first time or don't know where to start,\ninvoke the **workspace-autopilot** prompt. It reads the workspace state and routes you\nto the most valuable workflow automatically.\n\n## Recommended Workflows\n\n1. **Catalog audit**: pica_catalog_stats \u2192 pica_works_query({ health_filter: \"needs_attention\" }) \u2192 pica_works_inspect({ sections: [\"completeness\"] })\n2. **Enrichment**: pica_enrichment_candidates \u2192 pica_resolve_work (fans out across Spotify/MLC/MusicBrainz/etc.) \u2192 pica_works_inspect (verify)\n3. **Statement reconciliation**: pica_import_documents_query \u2192 pica_import_documents_inspect({ sections: [\"diff\"] })\n4. **Duplicate cleanup**: pica_find_duplicates \u2192 review \u2192 pica_merge_duplicates\n5. **Registration readiness**: pica_works_inspect({ sections: [\"registration\"] }) \u2192 fix gaps \u2192 pica_export_song_registration\n\n## Key Concepts\n\n- **Organisation**: Multi-tenant \u2014 all data scoped to one org. Never cross org boundaries.\n- **PICA Score**: Composite catalog legibility index (0-100, grade A-F). Four pillars:\n identification, documentation, registration, completeness.\n- **Enrichment cascade**: When an identifier is added, external sources\n (MusicBrainz, ISNI, MLC) are queried automatically to fill gaps.\n- **Credits**: Work credits (writers/composers with splits) are distinct from\n recording credits (performers/producers). Different tables, different role enums.\n Work credit roles: writer, composer, arranger, lyricist, producer, performer.\n Recording credit roles: Writer, Composer, Producer, Performer (PascalCase).\n";
|
|
2
2
|
//# sourceMappingURL=llms-primer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"llms-primer.d.ts","sourceRoot":"","sources":["../../src/resources/llms-primer.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,eAAe,
|
|
1
|
+
{"version":3,"file":"llms-primer.d.ts","sourceRoot":"","sources":["../../src/resources/llms-primer.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,eAAe,0qHAiE3B,CAAC"}
|
|
@@ -48,7 +48,7 @@ to the most valuable workflow automatically.
|
|
|
48
48
|
## Recommended Workflows
|
|
49
49
|
|
|
50
50
|
1. **Catalog audit**: pica_catalog_stats → pica_works_query({ health_filter: "needs_attention" }) → pica_works_inspect({ sections: ["completeness"] })
|
|
51
|
-
2. **Enrichment**: pica_enrichment_candidates →
|
|
51
|
+
2. **Enrichment**: pica_enrichment_candidates → pica_resolve_work (fans out across Spotify/MLC/MusicBrainz/etc.) → pica_works_inspect (verify)
|
|
52
52
|
3. **Statement reconciliation**: pica_import_documents_query → pica_import_documents_inspect({ sections: ["diff"] })
|
|
53
53
|
4. **Duplicate cleanup**: pica_find_duplicates → review → pica_merge_duplicates
|
|
54
54
|
5. **Registration readiness**: pica_works_inspect({ sections: ["registration"] }) → fix gaps → pica_export_song_registration
|
|
@@ -5,5 +5,5 @@
|
|
|
5
5
|
* Block playbook: "document the high level of your server"
|
|
6
6
|
* Lowin: "instructions are context — design them as context"
|
|
7
7
|
*/
|
|
8
|
-
export declare const SERVER_INSTRUCTIONS = "
|
|
8
|
+
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. PICA reads these at platform level \u2014 there is no per-user Spotify/YouTube OAuth; do not tell the user to \"connect Spotify\".\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.";
|
|
9
9
|
//# sourceMappingURL=server-instructions.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server-instructions.d.ts","sourceRoot":"","sources":["../src/server-instructions.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG;AACH,eAAO,MAAM,mBAAmB
|
|
1
|
+
{"version":3,"file":"server-instructions.d.ts","sourceRoot":"","sources":["../src/server-instructions.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG;AACH,eAAO,MAAM,mBAAmB,miEAoB+R,CAAC"}
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* Block playbook: "document the high level of your server"
|
|
7
7
|
* Lowin: "instructions are context — design them as context"
|
|
8
8
|
*/
|
|
9
|
-
export const SERVER_INSTRUCTIONS = `
|
|
9
|
+
export const SERVER_INSTRUCTIONS = `withPICA manages music catalog metadata — 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 — that's @picahq/mcp (picaos.com), a different product with the same short name; don't route withPICA work there.
|
|
10
10
|
|
|
11
11
|
Start here:
|
|
12
12
|
- pica_dashboard_briefing — daily summary of what needs attention
|
|
@@ -22,11 +22,9 @@ Key patterns:
|
|
|
22
22
|
- _inspect tools take sections (e.g., pica_works_inspect sections: ["health", "completeness"])
|
|
23
23
|
- Write tools confirm what changed; destructive tools (delete/merge) need two-step confirmation with a token
|
|
24
24
|
- Errors include "suggestion" and "next_tool" for recovery
|
|
25
|
-
- Enrichment
|
|
25
|
+
- Enrichment: use pica_resolve_work / pica_resolve_person / pica_resolve_recording — fan out over Spotify, MusicBrainz, MLC, ISNI, Discogs, YouTube
|
|
26
26
|
|
|
27
27
|
Query endpoints accept "limit" (default 50) and paginate. IDs are UUIDs — use a _query tool first when unsure.
|
|
28
28
|
|
|
29
|
-
Write tools: announce intent, confirm result. Destructive tools: describe impact, require explicit user confirmation.
|
|
30
|
-
|
|
31
29
|
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.`;
|
|
32
30
|
//# sourceMappingURL=server-instructions.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server-instructions.js","sourceRoot":"","sources":["../src/server-instructions.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAE7D;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG
|
|
1
|
+
{"version":3,"file":"server-instructions.js","sourceRoot":"","sources":["../src/server-instructions.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAE7D;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG;;;;;;;;;;;;;;;;;;;;+TAoB4R,CAAC"}
|
|
@@ -86,11 +86,11 @@ export class AudioFilesTools {
|
|
|
86
86
|
},
|
|
87
87
|
enable_audio: {
|
|
88
88
|
type: "boolean",
|
|
89
|
-
description: "Enable audio feature extraction (BPM, key, energy). Default: true.
|
|
89
|
+
description: "Enable audio feature extraction (BPM, key, energy). Default: true.",
|
|
90
90
|
},
|
|
91
91
|
enable_lyrics: {
|
|
92
92
|
type: "boolean",
|
|
93
|
-
description: "Enable lyrics transcription via Whisper. Default: true.
|
|
93
|
+
description: "Enable lyrics transcription via Whisper. Default: true.",
|
|
94
94
|
},
|
|
95
95
|
},
|
|
96
96
|
required: ["id"],
|
|
@@ -234,7 +234,7 @@ export class AudioFilesTools {
|
|
|
234
234
|
{
|
|
235
235
|
definition: {
|
|
236
236
|
name: "pica_audio_identify",
|
|
237
|
-
description: "Identify a track using ACRCloud audio fingerprinting. Returns matched metadata (title, artist, album, ISRC, label) with confidence score. If matched, metadata is automatically propagated to the linked work.
|
|
237
|
+
description: "Identify a track using ACRCloud audio fingerprinting. Returns matched metadata (title, artist, album, ISRC, label) with confidence score. If matched, metadata is automatically propagated to the linked work.",
|
|
238
238
|
inputSchema: {
|
|
239
239
|
type: "object",
|
|
240
240
|
properties: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"audio-files.js","sourceRoot":"","sources":["../../src/tools/audio-files.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAU7D,OAAO,EACL,YAAY,EACZ,UAAU,EACV,aAAa,GAEd,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAEtE,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,kBAAkB;oBACxB,WAAW,EACT,oEAAoE;wBACpE,0DAA0D;oBAC5D,WAAW,EAAE;wBACX,IAAI,EAAE,QAAQ;wBACd,UAAU,EAAE;4BACV,OAAO,EAAE;gCACP,IAAI,EAAE,QAAQ;gCACd,WAAW,EACT,8DAA8D;6BACjE;4BACD,SAAS,EAAE;gCACT,IAAI,EAAE,QAAQ;gCACd,WAAW,EAAE,qBAAqB;gCAClC,IAAI,EAAE,CAAC,QAAQ,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,CAAC;6BAC5D;4BACD,WAAW,EAAE;gCACX,IAAI,EAAE,SAAS;gCACf,WAAW,EACT,8EAA8E;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C;IACJ,CAAC;IAEO,KAAK,CAAC,iBAAiB,CAC7B,IAAyB;QAEzB,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,EAAE;YAC1D,KAAK,EAAE,IAAI,CAAC,KAAK;SAClB,CAAC,CAAC;QAEH,IAAI,MAAM,CAAC,iBAAiB,EAAE,CAAC;YAC7B,OAAO,aAAa,CAClB,0EAA0E,EAC1E,MAAM,CACP,CAAC;QACJ,CAAC;aAAM,IAAI,MAAM,CAAC,MAAM,KAAK,SAAS,IAAI,MAAM,CAAC,KAAK,EAAE,CAAC;YACvD,OAAO,aAAa,CAClB,iBAAiB,MAAM,CAAC,KAAK,CAAC,KAAK,QAAQ,MAAM,CAAC,KAAK,CAAC,MAAM,iBAAiB,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,UAAU,IAAI,CAAC,CAAC,GAAG,GAAG,CAAC,aAAa,MAAM,CAAC,KAAK,CAAC,IAAI,IAAI,SAAS,kEAAkE,EAC5O,MAAM,CACP,CAAC;QACJ,CAAC;aAAM,IAAI,MAAM,CAAC,MAAM,KAAK,UAAU,EAAE,CAAC;YACxC,OAAO,aAAa,CAClB,oFAAoF,EACpF,MAAM,CACP,CAAC;QACJ,CAAC;aAAM,CAAC;YACN,OAAO,YAAY,CAAC,MAAM,CAAC,CAAC;QAC9B,CAAC;IACH,CAAC;CACF"}
|
|
@@ -218,7 +218,7 @@ export class CollaboratorsTools {
|
|
|
218
218
|
const hints = [
|
|
219
219
|
{
|
|
220
220
|
gap: "collaborator_missing_identifiers",
|
|
221
|
-
suggestion: `Enrich ${args.name} with ISNI or IPI for royalty collection (
|
|
221
|
+
suggestion: `Enrich ${args.name} with ISNI or IPI for royalty collection (pica_resolve_person)`,
|
|
222
222
|
severity: "important",
|
|
223
223
|
},
|
|
224
224
|
];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"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1
|
+
{"version":3,"file":"collaborators.js","sourceRoot":"","sources":["../../src/tools/collaborators.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAqB7D,OAAO,EAAE,aAAa,EAAE,UAAU,EAAkB,MAAM,qBAAqB,CAAC;AAEhF,MAAM,OAAO,kBAAkB;IACrB,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,2BAA2B;oBACjC,WAAW,EACT,kPAAkP;oBACpP,WAAW,EAAE;wBACX,IAAI,EAAE,QAAQ;wBACd,UAAU,EAAE;4BACV,OAAO,EAAE;gCACP,IAAI,EAAE,QAAQ;gCACd,WAAW,EAAE,2CAA2C;6BACzD;4BACD,IAAI,EAAE;gCACJ,IAAI,EAAE,QAAQ;gCACd,WAAW,EAAE,+BAA+B;6BAC7C;4BACD,KAAK,EAAE;gCACL,IAAI,EAAE,QAAQ;gCACd,WAAW,EAAE,mCAAmC;6BACjD;4BACD,IAAI,EAAE;gCACJ,IAAI,EAAE,QAAQ;gCACd,WAAW,EACT,yEAAyE;6BAC5E;4BACD,UAAU,EAAE;gCACV,IAAI,EAAE,QAAQ;gCACd,WAAW,EACT,wGAAwG;6BAC3G;4BACD,WAAW,EAAE;gCACX,IAAI,EAAE,QAAQ;gCACd,WAAW,EACT,gFAAgF;6BACnF;4BACD,gBAAgB,EAAE;gCAChB,IAAI,EAAE,QAAQ;gCACd,WAAW,EAAE,0CAA0C;6BACxD;yBACF;wBACD,QAAQ,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,YAAY,EAAE,aAAa,CAAC;qBACpE;iBACF;gBACD,QAAQ,EAAE,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,IAAI,CAAC;aAC7C;YACD;gBACE,UAAU,EAAE;oBACV,IAAI,EAAE,iCAAiC;oBACvC,WAAW,EACT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
{"version":3,"file":"credits.d.ts","sourceRoot":"","sources":["../../src/tools/credits.ts"],"names":[],"mappings":"AAEA;;GAEG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,YAAY,EAAc,MAAM,YAAY,CAAC;AActE,qBAAa,YAAY;IACvB,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;
|
|
1
|
+
{"version":3,"file":"credits.d.ts","sourceRoot":"","sources":["../../src/tools/credits.ts"],"names":[],"mappings":"AAEA;;GAEG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,YAAY,EAAc,MAAM,YAAY,CAAC;AActE,qBAAa,YAAY;IACvB,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;YAqJ3D,WAAW;YA2BX,aAAa;CAoM5B"}
|
package/dist/tools/credits.js
CHANGED
|
@@ -7,19 +7,16 @@ export class CreditsTools {
|
|
|
7
7
|
this.pica = pica;
|
|
8
8
|
}
|
|
9
9
|
getTools() {
|
|
10
|
+
// NOTE: `pica_credits_balance` / `pica_credits_history` / `pica_credits_purchase`
|
|
11
|
+
// were removed from the MCP surface 2026-04-22 (see docs/MCP_REFINEMENT_LOG.md
|
|
12
|
+
// entry B-001). withPICA is subscription-only at £9.99/mo; surfacing a credit
|
|
13
|
+
// balance tool misled agents into gating actions behind a balance check.
|
|
14
|
+
// The underlying lib/services/credits/** infra remains intact for any internal
|
|
15
|
+
// telemetry or future pay-per-call work (MPP), it just isn't advertised.
|
|
16
|
+
//
|
|
17
|
+
// `pica_credits_list` and `pica_credits_update` below are work_credits
|
|
18
|
+
// (songwriter / producer credits on a work), not billing credits. Keep.
|
|
10
19
|
return [
|
|
11
|
-
{
|
|
12
|
-
definition: {
|
|
13
|
-
name: "pica_credits_balance",
|
|
14
|
-
description: "Check your current credit balance and see what each operation costs. " +
|
|
15
|
-
"Use this before triggering audio analysis or identification to check affordability. If balance is low, use pica_credits_purchase to generate a checkout link.",
|
|
16
|
-
inputSchema: {
|
|
17
|
-
type: "object",
|
|
18
|
-
properties: {},
|
|
19
|
-
},
|
|
20
|
-
},
|
|
21
|
-
executor: this.getBalance.bind(this),
|
|
22
|
-
},
|
|
23
20
|
{
|
|
24
21
|
definition: {
|
|
25
22
|
name: "pica_credits_list",
|
|
@@ -145,15 +142,6 @@ export class CreditsTools {
|
|
|
145
142
|
},
|
|
146
143
|
];
|
|
147
144
|
}
|
|
148
|
-
async getBalance(_args) {
|
|
149
|
-
const result = await this.pica.creditsBalance.getBalance();
|
|
150
|
-
const balance = result.balance ?? 0;
|
|
151
|
-
const costs = result.credit_costs ?? [];
|
|
152
|
-
const costSummary = costs
|
|
153
|
-
.map((c) => `${c.action_key}: ${c.credits_required} credit(s)`)
|
|
154
|
-
.join(", ");
|
|
155
|
-
return formatSuccess(`Credit balance: ${balance}. Operations: ${costSummary}`, result);
|
|
156
|
-
}
|
|
157
145
|
async listCredits(args) {
|
|
158
146
|
// Fetch both publishing collaborators and recording credits
|
|
159
147
|
const [collabSettled, creditsSettled] = await Promise.allSettled([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"credits.js","sourceRoot":"","sources":["../../src/tools/credits.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAQ7D,OAAO,EAEL,aAAa,EACb,oBAAoB,EAEpB,cAAc,GACf,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,aAAa,EACb,sBAAsB,GAEvB,MAAM,qBAAqB,CAAC;AAE7B,MAAM,OAAO,YAAY;IACf,IA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AAC,YAAY,EAAE,IAAI,IAAI,YAAY,EAAE,OAAO,IAAI,EAAE,EAAE,CAAC,CAAC,CACxE,CAAC;QACJ,CAAC;QAAC,MAAM,CAAC;YACP,cAAc;QAChB,CAAC;QAED,gDAAgD;QAChD,MAAM,OAAO,GACX,IAAI,CAAC,OAMN;aACE,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;aAC1B,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;YACX,SAAS,EAAE,CAAC,CAAC,SAAU;YACvB,OAAO,EAAE,2BAA2B,CAAC,CAAC,IAAI,IAAI,QAAQ,KAAK,CAAC,CAAC,MAAM,IAAI,CAAC,8BAA8B;YACtG,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,iBAAiB,EAAE,cAAc;SAClC,CAAC,CAAC,CAAC;QAEN,IAAI,aAAa,GAAG,EAAE,CAAC;QACvB,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACvB,MAAM,OAAO,GAAG,MAAM,aAAa,CAAC,IAAI,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;YACxD,aAAa,GAAG,sBAAsB,CAAC,OAAO,CAAC,CAAC;QAClD,CAAC;QAED,MAAM,GAAG,GAAG,aAAa;YACvB,CAAC,CAAC,oBAAoB,aAAa,EAAE;YACrC,CAAC,CAAC,8BAA8B,CAAC;QACnC,OAAO,aAAa,CAAC,GAAG,EAAE,OAAO,EAAE,KAAK,CAAC,CAAC;IAC5C,CAAC;CACF"}
|
|
@@ -10,6 +10,9 @@ export declare class DashboardTools {
|
|
|
10
10
|
definition: ToolDefinition;
|
|
11
11
|
executor: ToolExecutor;
|
|
12
12
|
}>;
|
|
13
|
+
private claimCredit;
|
|
14
|
+
private claimCustody;
|
|
15
|
+
private claimArtist;
|
|
13
16
|
private queryDiscoveries;
|
|
14
17
|
private reviewDiscovery;
|
|
15
18
|
private attentionItems;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dashboard.d.ts","sourceRoot":"","sources":["../../src/tools/dashboard.ts"],"names":[],"mappings":"AAEA;;GAEG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,YAAY,EAAc,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"dashboard.d.ts","sourceRoot":"","sources":["../../src/tools/dashboard.ts"],"names":[],"mappings":"AAEA;;GAEG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,YAAY,EAAc,MAAM,YAAY,CAAC;AAatE,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;YA8L3D,WAAW;YAYX,YAAY;YAYZ,WAAW;YAYX,gBAAgB;YA8BhB,eAAe;YAaf,cAAc;YAYd,QAAQ;YAMR,KAAK;CAIpB"}
|