@withpica/mcp-server 2.58.0 → 2.59.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 CHANGED
@@ -11,6 +11,57 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
11
11
 
12
12
  ## [Unreleased]
13
13
 
14
+ ## [2.59.0] - 2026-05-22
15
+
16
+ Catalog-hygiene release. The interpretation layer an agent had to rebuild from row prose every session — what kind of person record is this, is this work near-complete, why is this attention row at the top — is now exposed as typed columns, queryable filters, sortable fields, and component-scored objects. One breaking change to `pica_dashboard_attention` rows (urgency).
17
+
18
+ ### Added
19
+
20
+ - **`pica_people_query` filters by record kind and outreach readiness.** New filter params `record_kind` (`individual` / `placeholder` / `artefact`) and `outreach_state` (`ready` / `needs_email` / `needs_disambiguation` / `not_a_target` / `do_not_contact` / `previously_declined`). The same fields ship on every row of the response. "Show me individuals ready to contact" is one call.
21
+
22
+ - **`pica_works_query` filters and sorts by completeness.** New filter params `completeness_score_lt`, `completeness_score_gt`, `has_statement_data`, and a `sort: completeness_score:asc | completeness_score:desc` option. Every row carries `completeness_score`, `completeness_components`, `completeness_model_version`, and `has_statement_data`. The works-most-worth-fixing query is a single call.
23
+
24
+ - **Component-scored urgency on `pica_dashboard_attention` rows.** New `urgency: { score, components: { streaming_activity, sync_inquiries, missing_credit_fields, days_to_release }, model_version }` shape replaces the opaque `urgency_score: number`. An agent can now explain why a row is at the top of its queue without re-querying.
25
+
26
+ - **`failure_mode` field on every attention row.** Stable short identifier (e.g. `missing_iswc`, `no_writer_split`, `placeholder_credit_present`) for client-side clustering. The full set is enumerated in the shared actionable-items source.
27
+
28
+ - **Four new attention classes**: `placeholder_credits`, `people_records_need_cleanup`, `concatenated_entries`, `publishers_in_people_table`. Surface through `pica_dashboard_attention`, `pica_count_explain`, and `pica_dashboard_briefing` with the same shape as existing classes.
29
+
30
+ - **Briefing unconnected-people breakdown.** `pica_dashboard_briefing`'s unconnected-people headline now carries `breakdown: { ready, needs_lookup, needs_cleanup, needs_lookup_by_record_kind: { individual, placeholder, artefact } }`. Values sum to the headline by construction.
31
+
32
+ - **Cached `works.completeness_score`, refreshed on write.** Three new cached columns on the `works` table (`completeness_score`, `completeness_components`, `completeness_model_version`) maintained by an application hook on any cache-invalidating write. The query path on `pica_works_query` reads from cache; the response shape is identical whether served from cache or computed live.
33
+
34
+ - **Composite indexes for the new query paths.** `works_org_statement_data_idx` on the `work_registrations` satellite (which owns `prs_work_id` / `ppl_recording_id`) and `works_org_completeness_score_idx` on `works(organisation_id, completeness_score DESC)`.
35
+
36
+ - **`RECIPIENT_DO_NOT_CONTACT` error on `pica_collaborators_invite`.** When the target person has `outreach_state = 'do_not_contact'`, the tool short-circuits before any row is inserted into `collaboration_invites` and returns the new error code with the recipient identifier in `context`.
37
+
38
+ ### Changed
39
+
40
+ - **BREAKING — `urgency_score: number` removed from `pica_dashboard_attention` row shape.** Callers reading `row.urgency_score` will see `undefined`. Migration: read `row.urgency.score` for the aggregate, or `row.urgency.components.<name>` for the per-axis values.
41
+
42
+ - **Completeness scorer honours UPC overlay.** `scoreWork()` now resolves UPC through the master-metadata overlay. Works whose canonical UPC lives on an associated `releases` row are no longer scored as if UPC were missing.
43
+
44
+ - **Completeness scorer recognises non-UK PROs and the MLC.** Beyond the UK PRS/PPL pair, the scorer now counts `pro_ids` membership in ASCAP, BMI, GEMA, SACEM, SOCAN, JASRAC, APRA as registration evidence, and counts `mlc_song_code` presence as US mechanical-rights coverage. ISWC presence counts as registration evidence regardless of UK CMO flags.
45
+
46
+ - **Completeness response on `pica_works_inspect({ sections: ["completeness"] })` adopts `{ score, components, model_version }` envelope** wrapping the per-category breakdown. Existing readers of `breakdown` keep working.
47
+
48
+ ### Deprecated
49
+
50
+ - **`suggested_skill` on `pica_dashboard_attention` rows.** Aliased to `drill_down_skill` for one release cycle (~2026-06-22 removal); `pica_count_explain` sources already use that name.
51
+
52
+ ### Fixed
53
+
54
+ - **`pica_provenance_work` and `pica_provenance_certificate` authenticate correctly under MCP grant tokens.** Both routes (plus four sister provenance routes — certificate download, quality / provenance root / search / verify) now use the standard organisation-context boundary; previously returned 401 to all MCP traffic because they routed through the legacy session-only auth helper.
55
+
56
+ - **MCP `client_name` attribution lands on every audit row** under both HTTP and stdio transports. The UA-fingerprint regex was widened to recognise `Claude-User` (claude.ai consumer web) and `openai-mcp/X` (ChatGPT) alongside the existing client families, closing a stamping gap on the stateless HTTP transport.
57
+
58
+ ### Database (staging applied; production applied)
59
+
60
+ - `20260522132950_adr244_record_kind_outreach_state.sql` — `record_kind` and `outreach_state` columns on `people`, with classifier-driven defaults.
61
+ - `20260522160011_adr244_c_works_completeness_cache.sql` — cached completeness columns on `works`, composite indexes (`works_org_statement_data_idx` on `work_registrations`, `works_org_completeness_score_idx` on `works`), and a one-shot backfill function.
62
+
63
+ Consumes `@withpica/mcp-sdk@1.30.0`.
64
+
14
65
  ## [2.58.0] - 2026-05-19
15
66
 
16
67
  ### Changed