@withpica/mcp-server 2.69.0 → 2.73.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (103) hide show
  1. package/CHANGELOG.md +254 -0
  2. package/dist/index.js +0 -0
  3. package/dist/lib/changelog.generated.d.ts +2 -2
  4. package/dist/lib/changelog.generated.d.ts.map +1 -1
  5. package/dist/lib/changelog.generated.js +2 -2
  6. package/dist/lib/changelog.generated.js.map +1 -1
  7. package/dist/resources/agent-guide.d.ts +1 -1
  8. package/dist/resources/agent-guide.d.ts.map +1 -1
  9. package/dist/resources/agent-guide.js +1 -3
  10. package/dist/resources/agent-guide.js.map +1 -1
  11. package/dist/resources/index.d.ts.map +1 -1
  12. package/dist/resources/index.js.map +1 -1
  13. package/dist/resources/required-schemas.generated.d.ts +15 -2
  14. package/dist/resources/required-schemas.generated.d.ts.map +1 -1
  15. package/dist/resources/required-schemas.generated.js +24 -2
  16. package/dist/resources/required-schemas.generated.js.map +1 -1
  17. package/dist/resources/required-schemas.source.d.ts.map +1 -1
  18. package/dist/resources/required-schemas.source.js +19 -2
  19. package/dist/resources/required-schemas.source.js.map +1 -1
  20. package/dist/server-instructions.d.ts +2 -2
  21. package/dist/server-instructions.d.ts.map +1 -1
  22. package/dist/server-instructions.js +1 -1
  23. package/dist/skills/skills.generated.js +3 -3
  24. package/dist/skills/skills.generated.js.map +1 -1
  25. package/dist/tools/audio-files.js +1 -1
  26. package/dist/tools/audio-files.js.map +1 -1
  27. package/dist/tools/collaborators.d.ts.map +1 -1
  28. package/dist/tools/collaborators.js +73 -11
  29. package/dist/tools/collaborators.js.map +1 -1
  30. package/dist/tools/credits.d.ts +11 -0
  31. package/dist/tools/credits.d.ts.map +1 -1
  32. package/dist/tools/credits.js +161 -0
  33. package/dist/tools/credits.js.map +1 -1
  34. package/dist/tools/dashboard.d.ts +6 -1
  35. package/dist/tools/dashboard.d.ts.map +1 -1
  36. package/dist/tools/dashboard.js +32 -29
  37. package/dist/tools/dashboard.js.map +1 -1
  38. package/dist/tools/discovery.d.ts +3 -3
  39. package/dist/tools/discovery.d.ts.map +1 -1
  40. package/dist/tools/discovery.js +63 -51
  41. package/dist/tools/discovery.js.map +1 -1
  42. package/dist/tools/duplicates.d.ts +15 -3
  43. package/dist/tools/duplicates.d.ts.map +1 -1
  44. package/dist/tools/duplicates.js +142 -13
  45. package/dist/tools/duplicates.js.map +1 -1
  46. package/dist/tools/enrichment.d.ts +1 -0
  47. package/dist/tools/enrichment.d.ts.map +1 -1
  48. package/dist/tools/enrichment.js +154 -7
  49. package/dist/tools/enrichment.js.map +1 -1
  50. package/dist/tools/explainability.d.ts.map +1 -1
  51. package/dist/tools/explainability.js +3 -1
  52. package/dist/tools/explainability.js.map +1 -1
  53. package/dist/tools/exports.js +1 -1
  54. package/dist/tools/exports.js.map +1 -1
  55. package/dist/tools/import.d.ts.map +1 -1
  56. package/dist/tools/import.js +9 -4
  57. package/dist/tools/import.js.map +1 -1
  58. package/dist/tools/index.d.ts +9 -0
  59. package/dist/tools/index.d.ts.map +1 -1
  60. package/dist/tools/index.js +10 -15
  61. package/dist/tools/index.js.map +1 -1
  62. package/dist/tools/labels.d.ts +3 -3
  63. package/dist/tools/labels.d.ts.map +1 -1
  64. package/dist/tools/labels.js +117 -6
  65. package/dist/tools/labels.js.map +1 -1
  66. package/dist/tools/metadata.d.ts.map +1 -1
  67. package/dist/tools/metadata.js +49 -38
  68. package/dist/tools/metadata.js.map +1 -1
  69. package/dist/tools/my-reported-issues.d.ts +1 -1
  70. package/dist/tools/notifications.d.ts.map +1 -1
  71. package/dist/tools/notifications.js +6 -1
  72. package/dist/tools/notifications.js.map +1 -1
  73. package/dist/tools/party-claims.d.ts +22 -0
  74. package/dist/tools/party-claims.d.ts.map +1 -0
  75. package/dist/tools/party-claims.js +133 -0
  76. package/dist/tools/party-claims.js.map +1 -0
  77. package/dist/tools/purchases.d.ts.map +1 -1
  78. package/dist/tools/purchases.js +0 -1
  79. package/dist/tools/purchases.js.map +1 -1
  80. package/dist/tools/recording-custody.d.ts +7 -3
  81. package/dist/tools/recording-custody.d.ts.map +1 -1
  82. package/dist/tools/recording-custody.js +25 -9
  83. package/dist/tools/recording-custody.js.map +1 -1
  84. package/dist/tools/recordings.d.ts.map +1 -1
  85. package/dist/tools/recordings.js +7 -3
  86. package/dist/tools/recordings.js.map +1 -1
  87. package/dist/tools/recovery-hints.d.ts.map +1 -1
  88. package/dist/tools/recovery-hints.js +91 -22
  89. package/dist/tools/recovery-hints.js.map +1 -1
  90. package/dist/tools/releases.d.ts.map +1 -1
  91. package/dist/tools/releases.js +52 -8
  92. package/dist/tools/releases.js.map +1 -1
  93. package/dist/tools/signup.js +1 -1
  94. package/dist/tools/signup.js.map +1 -1
  95. package/dist/tools/uploads.d.ts.map +1 -1
  96. package/dist/tools/uploads.js +6 -6
  97. package/dist/tools/uploads.js.map +1 -1
  98. package/dist/tools/works.d.ts +1 -0
  99. package/dist/tools/works.d.ts.map +1 -1
  100. package/dist/tools/works.js +110 -2
  101. package/dist/tools/works.js.map +1 -1
  102. package/package.json +6 -7
  103. package/server.json +2 -2
package/CHANGELOG.md CHANGED
@@ -11,6 +11,260 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
11
11
 
12
12
  ## [Unreleased]
13
13
 
14
+ ## [2.73.0] - 2026-06-12
15
+
16
+ ADR-264 WS2 verify-before-assert + the WS4 front-door prerequisite (bulk
17
+ recording credits) + ADR-268 WS1 party claims / WS2 identifier-based party
18
+ dedup / WS5 ownership transfer types + the ADR-267 calibrated-question voice
19
+ contract. Also removes the never-functional `pica_team_*` tools and the
20
+ long-deprecated `pica_dashboard_pulse`.
21
+
22
+ ### Added
23
+
24
+ - **`pica_party_claim_invite` + `pica_party_claim_status`** — ADR-268 WS1
25
+ party org claim spine. `pica_party_claim_invite` sends an artist-anchored
26
+ claim invite for an unclaimed label/distributor/publisher organisation
27
+ (the user-supplied recipient email is the consent + identity anchor; the
28
+ single-use link redeems on the public claim landing — redemption makes the
29
+ claimant the org's owner, flips verification pending→verified and billing
30
+ hibernated→trial, and mints an active org-to-org connection with the
31
+ inviting catalog, never membership). Concurrent claims freeze both sides
32
+ as `disputed` for founder adjudication, and the tool says so instead of
33
+ pretending the email went out. `pica_party_claim_status` lists the claims
34
+ the calling org has sent with their lifecycle status. Registered in the
35
+ `labels` discovery category; tool count tripwire 282 → 284.
36
+ - **`pica_recording_credits_bulk_update`** — ADR-264 WS4 prerequisite. Apply
37
+ one credit set across many recordings in a single call: target a release
38
+ (`release_id` — every recording on its tracklist) or an explicit
39
+ `recording_ids` list, plus a `credits[]` batch (`credited_name` + `role`
40
+ per entry, optional `person_id` / `split_percentage` / `split_type` /
41
+ `notes`). One album's production credits stops being 30 sequential
42
+ per-recording calls. Existing (recording, credited name, role) rows are
43
+ skipped, never overwritten — re-running is safe; `dry_run: true` previews
44
+ the exact per-row `would_create` / `would_skip_existing` decision set the
45
+ execute path uses. Validation is all-or-nothing with per-problem detail
46
+ (invalid input applies NOTHING); application returns per-row
47
+ `created` / `skipped_existing` results. Caps: 100 recordings, 50 credits,
48
+ 500 total rows per call. Backed by the new
49
+ `POST /api/admin/recording-credits/bulk` route (org-scoped at every step:
50
+ release, tracklist, recordings, and person_ids must all belong to the
51
+ caller's organisation).
52
+ - **`pica_works_verify_registrations`** — ADR-264 WS2 truthful diagnosis. Verify
53
+ the registration status of up to 25 works. `mode: "check"` looks each work up
54
+ at the MLC (ISWC → title + writer IPI → title + primary-artist name) and
55
+ records what the lookup PROVED: a found registration is written as a positive
56
+ society fact (and any stale negative assertion is cleared); a clean not-found
57
+ becomes a `verified_absent` assertion with a lookup receipt. Lookup errors and
58
+ works with no usable identifiers write NOTHING (`lookup_failed` /
59
+ `insufficient_identifiers`). `mode: "confirm_unregistered"` records the user's
60
+ own confirmation (optional `society_code`; omitted = "not registered with any
61
+ society"). `works_without_registrations` rows on `pica_dashboard_attention`
62
+ now carry an `evidence` block (`unverified_absent` / `verified_absent` /
63
+ `user_confirmed_absent` with `verified_via` + `checked_at`) reflecting these
64
+ assertions.
65
+ - **`unconnected_collaborators`** attention class (taxonomy gap, f0266f09
66
+ gap #6): people credited on the org's works with no linked PICA account now
67
+ appear on `pica_dashboard_attention` / briefing totals / `pica_count_explain`
68
+ — one shared compute with `briefing.unconnected_collaborators` so the
69
+ surfaces structurally cannot drift. drill_down_skill null until a skill
70
+ covers collaborator connection.
71
+ - **Decision blocks (calibrated questions)** — `pica_find_duplicates` groups,
72
+ the `pica_merge_duplicates` MERGE_BLOCKED_PROVENANCE error, and
73
+ `pica_works_verify_registrations` mode:"check" (when works couldn't be
74
+ verified) now carry a `decision` field: a question with 2-3 options,
75
+ plain-language consequences, and a safe default — no UUIDs in any decision
76
+ text (a UUID-shaped title degrades by omitting the block, never failing the
77
+ call). Always additive: the structured payload carries everything the block
78
+ says. `pica_dashboard_briefing` now carries `user_message` — one
79
+ ready-to-say lowercase sentence in the curiosity register (no loss framing
80
+ on unverified counts).
81
+
82
+ ### Changed
83
+
84
+ - **`pica_recording_custody_assign`** — ownership transfer types are live
85
+ (ADR-268 WS5, the ADR-262 fast-follow): `transfer_type` now accepts
86
+ `assignment` (title transfers) and `full_transfer` (ownership AND control)
87
+ alongside the v1 control/possession types. An ownership leg also moves the
88
+ recording's master ownership splits append-only in the same transaction —
89
+ the transferor's active era closes (`end_date`), the transferee's opens —
90
+ and the credit layer never moves. Honest-gap refusals (400, typed codes):
91
+ a partial percentage with more than one active owner
92
+ (`PARTIAL_TRANSFER_AMBIGUOUS`), a transfer exceeding the transferor's
93
+ share (`INSUFFICIENT_TRANSFEROR_SHARE`), or a percentage outside (0,100]
94
+ (`INVALID_PERCENTAGE`) — nothing is ever silently lost.
95
+ - **`pica_labels_create`** accepts an optional `identifiers` object
96
+ (`musicbrainz_label_id` / `isni` / `label_code` / `discogs_label_id` /
97
+ `wikidata_id` / `deezer_label_id`) — ADR-268 WS2. Dedup is now
98
+ identifier-first: supplied identifiers resolve to the global label identity
99
+ and an org already bridged to that identity is returned
100
+ `already_existed: true` EVEN when the supplied name differs;
101
+ case-insensitive name matching (ADR-265 behaviour) stays as the fallback,
102
+ and a name-matched org missing the bridge is backfilled when an identity
103
+ was resolved. Param addition only — no new tool.
104
+ - **`first-session` skill** now carries the calibrated-question library (ADR-267
105
+ Step 1): open-over-closed decision questions, diagnosis labels, no-oriented
106
+ phrasing for destructive moves, options-with-consequences, evidence-gated
107
+ stakes, and a no-UUIDs-in-user-facing-text contract. Specialist skills adopt
108
+ the same grammar incrementally; the WS4 front-door skill embeds it at birth.
109
+ - **`pica_works_create` / `pica_works_update` `mood` param description** now
110
+ states the value is stored on the work's primary recording's audio traits
111
+ (recording-grain, ADR-266 Stage 2c) — caller contract unchanged.
112
+
113
+ ### Fixed
114
+
115
+ - **Review-link contract** — server instructions told every agent to share
116
+ `withpica.com/workspace?type=<entity>&id=<id>` after writes; now the
117
+ schema-direct `/inspect/<feature>/<id>` shape (both byte-parity copies).
118
+ uploads/audio/exports tool descriptions point users at `/inspect`.
119
+
120
+ ### Deprecated
121
+
122
+ - **`pica_import_from_spotify`** — use `pica_import_streaming_link` (same
123
+ two-step flow, also supports Deezer). Structured
124
+ `{deprecated, removal_target: "2.74.0"}` in TOOL_METADATA; the new
125
+ lint-mcp-tools deprecation-expiry check BLOCKS any publish at or past the
126
+ removal target, so this cannot overstay like pulse did.
127
+ - **`briefing.unverified_writers`** count source — `briefing.unenriched_writers`
128
+ is the canonical name (matches the actionable-issues taxonomy class); the
129
+ alias shares one definition and is accepted until 2.74.
130
+
131
+ ### Removed
132
+
133
+ - **`pica_team_*` (all 5: `pica_team_list` / `pica_team_get` / `pica_team_invite`
134
+ / `pica_team_update_role` / `pica_team_remove`)** — founder decision
135
+ 2026-06-11. The backing routes (`/api/admin/team/*`) are session-only BY
136
+ DESIGN (ADR-248: team membership is human-only), so every bearer/MCP caller
137
+ has always received a hard 401 — the tools never worked for any agent and
138
+ never could. Removing them is honesty, not a regression: agents stop being
139
+ advertised a capability that structurally cannot succeed. Team membership
140
+ stays managed by humans in `/settings`. Also removed: the `team` discovery
141
+ category, the `pica_team_remove` destructive-confirmation case, recovery
142
+ hints, cost-model entries, and the `set-up-workspace` skill's Block 5 now
143
+ points users at `/settings` instead of the tools. Tool count tripwire
144
+ 287 → 282; destructive tripwire 20 → 19.
145
+ - **`pica_dashboard_pulse`** — deprecated since ADR-247 with a removal window
146
+ that passed (prod telemetry: 3 calls all-time, exploratory).
147
+ `pica_dashboard_briefing` is the canonical attention surface; pulse's
148
+ revenue-at-risk/deadline predicates retired with it (they disagreed with
149
+ the briefing coherence contract). Tool count tripwire 288 → 287.
150
+ - **`suggested_skill`** alias dropped from `pica_dashboard_attention` rows
151
+ (deprecated 2026-05-22; soak window long passed; zero non-test consumers).
152
+ `drill_down_skill` is the canonical field.
153
+
154
+ ## [2.72.0] - 2026-06-10
155
+
156
+ ADR-264 WS1.3 — recordings/releases dedup + merge (last trust-floor gap).
157
+
158
+ ### Changed
159
+
160
+ - **`pica_find_duplicates`** — `entity_type` now covers `releases` and
161
+ `recordings` (added in 2.72.0); description explicitly names the UPC and
162
+ ISRC grouping keys so callers understand the detection basis.
163
+ - **`pica_merge_duplicates`** — extended to cover `recordings` and `releases`
164
+ (+ singular aliases `recording` / `release` for backwards compatibility).
165
+ - `recordings`: merges via `merge_recording_atomic` RPC — credits, splits,
166
+ and release-track links are deduped by their natural keys; winner's NULL
167
+ fields (ISRC, duration, streaming IDs, artist name, artwork) are back-filled
168
+ from the first loser that has a value.
169
+ - `releases`: merges via `merge_release_atomic` RPC — tracks are rehomed
170
+ (dedup by recording_id within the winner's tracklist); UPC, release date,
171
+ artwork, and label/distributor org links are gap-filled from losers.
172
+ - **PROVENANCE BLOCK**: a recording loser with `recording_custodians` rows
173
+ (ADR-262 append-only custody chain) blocks the merge. The tool returns a
174
+ structured `MERGE_BLOCKED_PROVENANCE` error with `blocked_ids`, the `remedy`
175
+ ("custody chains are append-only; transfer custody first or keep both
176
+ recordings"), and `next_tool: "pica_recording_custody_assign"` so the AI can
177
+ route directly to the safe resolution path.
178
+
179
+ ### Recovery hints
180
+
181
+ - `MERGE_BLOCKED_PROVENANCE` added to the `pica_merge_duplicates` hint registry
182
+ → `pica_recording_custody_assign`.
183
+
184
+ ## [2.71.0] - 2026-06-10
185
+
186
+ ADR-265 release parties and invites — label/distributor org creation + recording/release-grain invite targets. Requires `@withpica/mcp-sdk@^1.39.0`.
187
+
188
+ ### Added
189
+
190
+ - **`pica_labels_create`** — create an unclaimed label or distributor organisation.
191
+ Accepts `name`, `org_type` (`label` | `distributor`), and optional `country` /
192
+ `website` / `contact_email`. Server-side deduplication is catalog-wide across
193
+ both party types: a case-insensitive name match returns the existing record
194
+ with `already_existed: true` rather than creating a duplicate. The returned
195
+ `id` can be assigned to `releases.label_organization_id` (via
196
+ `pica_releases_update`) or `releases.distributor_organization_id` to formally
197
+ link a release's label or distributor.
198
+ - **`recording_id` / `release_id` targets on `pica_collaborators_invite`** — in
199
+ addition to the existing `work_id`, invite calls now accept exactly one of three
200
+ target ids (`work_id` | `recording_id` | `release_id`). Recording-grain invites
201
+ surface a claim scoped to the named recording's credits; release-grain invites
202
+ surface a claim that verifies all the invitee's credits across every recording on
203
+ the release. Exactly-one-of validation is enforced server-side (400 if zero or
204
+ multiple targets are supplied).
205
+
206
+ ### Fixed
207
+
208
+ - **`pica_labels_query` always returned "Found 0 labels"** — an SDK envelope
209
+ double-unwrap (`labels.list` read `.data` off the already-unwrapped array)
210
+ meant the tool had returned empty results regardless of catalog state since
211
+ it shipped (2026-04-14). Fixed in `@withpica/mcp-sdk@1.39.0`.
212
+ - **`pica_labels_create` dedup messaging now sees `already_existed`** — the
213
+ same envelope unwrap stripped the `already_existed` sibling flag, so every
214
+ successful create tripped the no-data guard and the "already exists — link
215
+ it instead" guidance never fired. The SDK now returns the label object
216
+ directly with `already_existed` inside it.
217
+
218
+ ## [2.70.0] - 2026-06-10
219
+
220
+ ADR-264 WS1 trust floor — conservative-by-default enrichment, truthful tool
221
+ outputs, and the reviewable enrichment queue. Requires `@withpica/mcp-sdk@^1.38.0`.
222
+
223
+ ### Added
224
+
225
+ - `pica_enrichment_proposals_bulk_reject` (mutating, `dry_run` preview):
226
+ reject up to 100 pending enrichment proposals by explicit ids OR a filter
227
+ (`rule_id` / `source` / `max_confidence`). Per-proposal effects identical to
228
+ `pica_enrichment_proposal_reject` (permanent content-hash suppression).
229
+ `dry_run` resolves the real affected set — the filter path queries the live
230
+ list, no fake previews.
231
+ - `pica_enrichment_proposals_list` gains `min_confidence`, `max_confidence`,
232
+ and `created_after` filters, so a caller can isolate the batch they just
233
+ triggered from accumulated stale low-confidence noise.
234
+ - `pica_releases_list` gains `offset` pagination with an honest envelope
235
+ (`count`, `offset`, `has_more`, `next_offset`) — every release is reachable;
236
+ no more mid-array ~100KB truncation dead-end.
237
+
238
+ ### Changed
239
+
240
+ - Enrichment behaviour (backend, surfaced through proposals): official
241
+ YouTube " - Topic" channel uploads now classify as `master` and the
242
+ `artist_title_to_youtube` rule defaults to enriching the existing master
243
+ recording (UPDATE proposal attaching `youtube_video_id`/`youtube_url`)
244
+ instead of minting a phantom `alternate` recording; creating a new
245
+ recording now requires affirmative low-sameness evidence (version markers
246
+ or >3s duration delta). Proposals carry a `sameness_evidence` signal.
247
+ - `pica_import_from_spotify` preview wording: duplicates are reported as
248
+ "already in catalog (will be skipped, not modified)" — the preview no
249
+ longer promises an enrichment the executor does not perform.
250
+ - `pica_execute` hardening: the `WRAPPED_ARGS_MISSING` transport error now
251
+ fires when ANY required field of the wrapped tool is missing (partial
252
+ client-side argument strips included), naming `missing_required_fields`.
253
+ The nested `args` object is the canonical call shape.
254
+
255
+ ### Fixed
256
+
257
+ - `pica_enrichment_proposals_list` no longer renders the literal
258
+ `"? pending proposal(s)"` when the backend returns an unexpected shape —
259
+ that case is now a structured `UNEXPECTED_RESPONSE_SHAPE` error (with
260
+ `structuredContent`), not a fake count.
261
+
262
+ ### Removed
263
+
264
+ - Dropped the unused `mppx` runtime dependency. No `src/` consumer has existed
265
+ since the MPP unit tests were deleted; the earlier cleanup left it in place
266
+ "to avoid lockfile churn" and asked the next publisher to drop it — done.
267
+
14
268
  ## [2.69.0] - 2026-06-08
15
269
 
16
270
  ### Added
package/dist/index.js CHANGED
File without changes