@withpica/mcp-server 2.68.0 → 2.72.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 (73) hide show
  1. package/CHANGELOG.md +143 -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/required-schemas.generated.d.ts +10 -1
  8. package/dist/resources/required-schemas.generated.d.ts.map +1 -1
  9. package/dist/resources/required-schemas.generated.js +15 -1
  10. package/dist/resources/required-schemas.generated.js.map +1 -1
  11. package/dist/resources/required-schemas.source.d.ts.map +1 -1
  12. package/dist/resources/required-schemas.source.js +12 -1
  13. package/dist/resources/required-schemas.source.js.map +1 -1
  14. package/dist/tools/collaborators.d.ts.map +1 -1
  15. package/dist/tools/collaborators.js +73 -11
  16. package/dist/tools/collaborators.js.map +1 -1
  17. package/dist/tools/dashboard.d.ts.map +1 -1
  18. package/dist/tools/dashboard.js +4 -0
  19. package/dist/tools/dashboard.js.map +1 -1
  20. package/dist/tools/discovery.d.ts.map +1 -1
  21. package/dist/tools/discovery.js +56 -34
  22. package/dist/tools/discovery.js.map +1 -1
  23. package/dist/tools/duplicates.d.ts +4 -3
  24. package/dist/tools/duplicates.d.ts.map +1 -1
  25. package/dist/tools/duplicates.js +76 -11
  26. package/dist/tools/duplicates.js.map +1 -1
  27. package/dist/tools/enrichment.d.ts +1 -0
  28. package/dist/tools/enrichment.d.ts.map +1 -1
  29. package/dist/tools/enrichment.js +154 -7
  30. package/dist/tools/enrichment.js.map +1 -1
  31. package/dist/tools/import.d.ts.map +1 -1
  32. package/dist/tools/import.js +4 -1
  33. package/dist/tools/import.js.map +1 -1
  34. package/dist/tools/index.d.ts.map +1 -1
  35. package/dist/tools/index.js +7 -1
  36. package/dist/tools/index.js.map +1 -1
  37. package/dist/tools/labels.d.ts +3 -3
  38. package/dist/tools/labels.d.ts.map +1 -1
  39. package/dist/tools/labels.js +79 -6
  40. package/dist/tools/labels.js.map +1 -1
  41. package/dist/tools/metadata.d.ts.map +1 -1
  42. package/dist/tools/metadata.js +34 -0
  43. package/dist/tools/metadata.js.map +1 -1
  44. package/dist/tools/notifications.d.ts.map +1 -1
  45. package/dist/tools/notifications.js +6 -1
  46. package/dist/tools/notifications.js.map +1 -1
  47. package/dist/tools/purchases.d.ts.map +1 -1
  48. package/dist/tools/purchases.js +0 -1
  49. package/dist/tools/purchases.js.map +1 -1
  50. package/dist/tools/recording-custody.d.ts +36 -0
  51. package/dist/tools/recording-custody.d.ts.map +1 -0
  52. package/dist/tools/recording-custody.js +140 -0
  53. package/dist/tools/recording-custody.js.map +1 -0
  54. package/dist/tools/recordings.d.ts.map +1 -1
  55. package/dist/tools/recordings.js +7 -3
  56. package/dist/tools/recordings.js.map +1 -1
  57. package/dist/tools/recovery-hints.d.ts.map +1 -1
  58. package/dist/tools/recovery-hints.js +52 -0
  59. package/dist/tools/recovery-hints.js.map +1 -1
  60. package/dist/tools/releases.d.ts.map +1 -1
  61. package/dist/tools/releases.js +58 -7
  62. package/dist/tools/releases.js.map +1 -1
  63. package/dist/tools/signup.js +1 -1
  64. package/dist/tools/signup.js.map +1 -1
  65. package/dist/tools/uploads.d.ts.map +1 -1
  66. package/dist/tools/uploads.js +0 -1
  67. package/dist/tools/uploads.js.map +1 -1
  68. package/dist/tools/works.d.ts +1 -0
  69. package/dist/tools/works.d.ts.map +1 -1
  70. package/dist/tools/works.js +85 -0
  71. package/dist/tools/works.js.map +1 -1
  72. package/package.json +6 -7
  73. package/server.json +2 -2
package/CHANGELOG.md CHANGED
@@ -11,6 +11,149 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
11
11
 
12
12
  ## [Unreleased]
13
13
 
14
+ ### Added
15
+
16
+ - **`pica_works_verify_registrations`** — ADR-264 WS2 truthful diagnosis. Verify
17
+ the registration status of up to 25 works. `mode: "check"` looks each work up
18
+ at the MLC (ISWC → title + writer IPI → title + primary-artist name) and
19
+ records what the lookup PROVED: a found registration is written as a positive
20
+ society fact (and any stale negative assertion is cleared); a clean not-found
21
+ becomes a `verified_absent` assertion with a lookup receipt. Lookup errors and
22
+ works with no usable identifiers write NOTHING (`lookup_failed` /
23
+ `insufficient_identifiers`). `mode: "confirm_unregistered"` records the user's
24
+ own confirmation (optional `society_code`; omitted = "not registered with any
25
+ society"). `works_without_registrations` rows on `pica_dashboard_attention`
26
+ now carry an `evidence` block (`unverified_absent` / `verified_absent` /
27
+ `user_confirmed_absent` with `verified_via` + `checked_at`) reflecting these
28
+ assertions.
29
+
30
+ ## [2.72.0] - 2026-06-10
31
+
32
+ ADR-264 WS1.3 — recordings/releases dedup + merge (last trust-floor gap).
33
+
34
+ ### Changed
35
+
36
+ - **`pica_find_duplicates`** — `entity_type` now covers `releases` and
37
+ `recordings` (added in 2.72.0); description explicitly names the UPC and
38
+ ISRC grouping keys so callers understand the detection basis.
39
+ - **`pica_merge_duplicates`** — extended to cover `recordings` and `releases`
40
+ (+ singular aliases `recording` / `release` for backwards compatibility).
41
+ - `recordings`: merges via `merge_recording_atomic` RPC — credits, splits,
42
+ and release-track links are deduped by their natural keys; winner's NULL
43
+ fields (ISRC, duration, streaming IDs, artist name, artwork) are back-filled
44
+ from the first loser that has a value.
45
+ - `releases`: merges via `merge_release_atomic` RPC — tracks are rehomed
46
+ (dedup by recording_id within the winner's tracklist); UPC, release date,
47
+ artwork, and label/distributor org links are gap-filled from losers.
48
+ - **PROVENANCE BLOCK**: a recording loser with `recording_custodians` rows
49
+ (ADR-262 append-only custody chain) blocks the merge. The tool returns a
50
+ structured `MERGE_BLOCKED_PROVENANCE` error with `blocked_ids`, the `remedy`
51
+ ("custody chains are append-only; transfer custody first or keep both
52
+ recordings"), and `next_tool: "pica_recording_custody_assign"` so the AI can
53
+ route directly to the safe resolution path.
54
+
55
+ ### Recovery hints
56
+
57
+ - `MERGE_BLOCKED_PROVENANCE` added to the `pica_merge_duplicates` hint registry
58
+ → `pica_recording_custody_assign`.
59
+
60
+ ## [2.71.0] - 2026-06-10
61
+
62
+ ADR-265 release parties and invites — label/distributor org creation + recording/release-grain invite targets. Requires `@withpica/mcp-sdk@^1.39.0`.
63
+
64
+ ### Added
65
+
66
+ - **`pica_labels_create`** — create an unclaimed label or distributor organisation.
67
+ Accepts `name`, `org_type` (`label` | `distributor`), and optional `country` /
68
+ `website` / `contact_email`. Server-side deduplication is catalog-wide across
69
+ both party types: a case-insensitive name match returns the existing record
70
+ with `already_existed: true` rather than creating a duplicate. The returned
71
+ `id` can be assigned to `releases.label_organization_id` (via
72
+ `pica_releases_update`) or `releases.distributor_organization_id` to formally
73
+ link a release's label or distributor.
74
+ - **`recording_id` / `release_id` targets on `pica_collaborators_invite`** — in
75
+ addition to the existing `work_id`, invite calls now accept exactly one of three
76
+ target ids (`work_id` | `recording_id` | `release_id`). Recording-grain invites
77
+ surface a claim scoped to the named recording's credits; release-grain invites
78
+ surface a claim that verifies all the invitee's credits across every recording on
79
+ the release. Exactly-one-of validation is enforced server-side (400 if zero or
80
+ multiple targets are supplied).
81
+
82
+ ### Fixed
83
+
84
+ - **`pica_labels_query` always returned "Found 0 labels"** — an SDK envelope
85
+ double-unwrap (`labels.list` read `.data` off the already-unwrapped array)
86
+ meant the tool had returned empty results regardless of catalog state since
87
+ it shipped (2026-04-14). Fixed in `@withpica/mcp-sdk@1.39.0`.
88
+ - **`pica_labels_create` dedup messaging now sees `already_existed`** — the
89
+ same envelope unwrap stripped the `already_existed` sibling flag, so every
90
+ successful create tripped the no-data guard and the "already exists — link
91
+ it instead" guidance never fired. The SDK now returns the label object
92
+ directly with `already_existed` inside it.
93
+
94
+ ## [2.70.0] - 2026-06-10
95
+
96
+ ADR-264 WS1 trust floor — conservative-by-default enrichment, truthful tool
97
+ outputs, and the reviewable enrichment queue. Requires `@withpica/mcp-sdk@^1.38.0`.
98
+
99
+ ### Added
100
+
101
+ - `pica_enrichment_proposals_bulk_reject` (mutating, `dry_run` preview):
102
+ reject up to 100 pending enrichment proposals by explicit ids OR a filter
103
+ (`rule_id` / `source` / `max_confidence`). Per-proposal effects identical to
104
+ `pica_enrichment_proposal_reject` (permanent content-hash suppression).
105
+ `dry_run` resolves the real affected set — the filter path queries the live
106
+ list, no fake previews.
107
+ - `pica_enrichment_proposals_list` gains `min_confidence`, `max_confidence`,
108
+ and `created_after` filters, so a caller can isolate the batch they just
109
+ triggered from accumulated stale low-confidence noise.
110
+ - `pica_releases_list` gains `offset` pagination with an honest envelope
111
+ (`count`, `offset`, `has_more`, `next_offset`) — every release is reachable;
112
+ no more mid-array ~100KB truncation dead-end.
113
+
114
+ ### Changed
115
+
116
+ - Enrichment behaviour (backend, surfaced through proposals): official
117
+ YouTube " - Topic" channel uploads now classify as `master` and the
118
+ `artist_title_to_youtube` rule defaults to enriching the existing master
119
+ recording (UPDATE proposal attaching `youtube_video_id`/`youtube_url`)
120
+ instead of minting a phantom `alternate` recording; creating a new
121
+ recording now requires affirmative low-sameness evidence (version markers
122
+ or >3s duration delta). Proposals carry a `sameness_evidence` signal.
123
+ - `pica_import_from_spotify` preview wording: duplicates are reported as
124
+ "already in catalog (will be skipped, not modified)" — the preview no
125
+ longer promises an enrichment the executor does not perform.
126
+ - `pica_execute` hardening: the `WRAPPED_ARGS_MISSING` transport error now
127
+ fires when ANY required field of the wrapped tool is missing (partial
128
+ client-side argument strips included), naming `missing_required_fields`.
129
+ The nested `args` object is the canonical call shape.
130
+
131
+ ### Fixed
132
+
133
+ - `pica_enrichment_proposals_list` no longer renders the literal
134
+ `"? pending proposal(s)"` when the backend returns an unexpected shape —
135
+ that case is now a structured `UNEXPECTED_RESPONSE_SHAPE` error (with
136
+ `structuredContent`), not a fake count.
137
+
138
+ ### Removed
139
+
140
+ - Dropped the unused `mppx` runtime dependency. No `src/` consumer has existed
141
+ since the MPP unit tests were deleted; the earlier cleanup left it in place
142
+ "to avoid lockfile churn" and asked the next publisher to drop it — done.
143
+
144
+ ## [2.69.0] - 2026-06-08
145
+
146
+ ### Added
147
+
148
+ - Recording custody tools (ADR-262 — master-side control chain):
149
+ `pica_recording_custody_assign` (transfer custody of a recording; admin/owner,
150
+ control/possession transfer types only) and `pica_recording_provenance` (read
151
+ the ordered custody legs + immutable origin credits). Thin wrappers over the
152
+ live `/api/admin/recording-custody/*` routes via the new SDK
153
+ `recordingCustody` resource (requires `@withpica/mcp-sdk@^1.37.0`).
154
+ - `pica_releases_create` / `pica_releases_update` accept an `availability`
155
+ write param (`available` | `withdrawn`) to mark a release live or taken down.
156
+
14
157
  ## [2.68.0] - 2026-06-07
15
158
 
16
159
  Adds a structured-metadata escape hatch to work creation. No SDK bump required (`@withpica/mcp-sdk` ^1.36.0).
package/dist/index.js CHANGED
File without changes