@withpica/mcp-server 2.58.0 → 2.60.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 +69 -0
- package/dist/apps/generated/shared-bundle.d.ts +1 -1
- package/dist/apps/generated/shared-bundle.d.ts.map +1 -1
- package/dist/apps/generated/shared-bundle.js +1 -1
- package/dist/apps/generated/shared-bundle.js.map +1 -1
- package/dist/lib/changelog.generated.d.ts +2 -2
- package/dist/lib/changelog.generated.d.ts.map +1 -1
- package/dist/lib/changelog.generated.js +2 -2
- package/dist/lib/changelog.generated.js.map +1 -1
- package/dist/prompts/creator-question-atlas.d.ts.map +1 -1
- package/dist/prompts/creator-question-atlas.js +6 -2
- package/dist/prompts/creator-question-atlas.js.map +1 -1
- package/dist/resources/agent-guide.d.ts +1 -1
- package/dist/resources/agent-guide.d.ts.map +1 -1
- package/dist/resources/agent-guide.js +4 -4
- package/dist/resources/required-schemas.generated.d.ts +5 -4
- package/dist/resources/required-schemas.generated.d.ts.map +1 -1
- package/dist/resources/required-schemas.generated.js +8 -4
- package/dist/resources/required-schemas.generated.js.map +1 -1
- package/dist/resources/required-schemas.source.d.ts.map +1 -1
- package/dist/resources/required-schemas.source.js +3 -2
- package/dist/resources/required-schemas.source.js.map +1 -1
- package/dist/tools/dashboard.d.ts.map +1 -1
- package/dist/tools/dashboard.js +23 -3
- package/dist/tools/dashboard.js.map +1 -1
- package/dist/tools/discovery.d.ts.map +1 -1
- package/dist/tools/discovery.js +73 -4
- package/dist/tools/discovery.js.map +1 -1
- package/dist/tools/exports.d.ts.map +1 -1
- package/dist/tools/exports.js +74 -21
- package/dist/tools/exports.js.map +1 -1
- package/dist/tools/metadata.js +1 -1
- package/dist/tools/metadata.js.map +1 -1
- package/dist/tools/people.d.ts.map +1 -1
- package/dist/tools/people.js +39 -2
- package/dist/tools/people.js.map +1 -1
- package/dist/tools/works.d.ts.map +1 -1
- package/dist/tools/works.js +113 -31
- package/dist/tools/works.js.map +1 -1
- package/package.json +1 -1
- package/server.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -11,6 +11,75 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
11
11
|
|
|
12
12
|
## [Unreleased]
|
|
13
13
|
|
|
14
|
+
## [2.60.0] - 2026-05-23
|
|
15
|
+
|
|
16
|
+
Exports release. The four catalog export tools accept per-work scope, the catalog export tool's schema matches what the backend actually validates, and `pica_execute` is forgiving of the three call shapes agents emit in the wild.
|
|
17
|
+
|
|
18
|
+
### Added
|
|
19
|
+
|
|
20
|
+
- **`work_ids: string[]` on four export tools.** `pica_export_song_registration`, `pica_export_industry_ready`, `pica_export_ai_consent`, and `pica_export_catalog_asset_report` now accept an optional `work_ids` array. Omitted = whole catalog (existing behaviour). Provided = export limited to that set of works. Tool descriptions disclose the per-tool scoping semantics — `ai_consent` and `catalog_asset_report` apply the scope where it is structurally meaningful (recording rows on ai-consent, placements on CAR) and document the partial-scoping cases so agents don't pass `work_ids` expecting whole-row filtering.
|
|
21
|
+
|
|
22
|
+
- **`pica_execute` accepts FLAT and `arguments`-alias call shapes.** The dispatcher resolves wrapped args from the first non-empty of `args` / `arguments` / FLAT top-level keys. Canonical remains `{ tool, args: {…} }`; the other two shapes are tolerated because agents emit them in practice. `arguments` alias is for the small fraction that mirror the outer `tools/call` envelope shape; FLAT is what most agents naturally emit when they have a single inner tool to invoke.
|
|
23
|
+
|
|
24
|
+
- **`pica_execute` returns structured `WRAPPED_ARGS_MISSING` when the wrapped tool needs args.** When the dispatcher resolves no wrapped args AND the wrapped tool's schema declares `required` fields, dispatch is short-circuited with a structured error naming the missing fields and showing both canonical (`args: {…}`) and FLAT example call shapes. Previously the dispatcher silently invoked the wrapped tool with `{}`, surfacing as opaque downstream failures like `PG_INVALID_UUID` on `/admin/works/undefined`. Best-effort — wrapped tools unknown to the registry still dispatch through, letting their own validation speak.
|
|
25
|
+
|
|
26
|
+
- **`pica_works_inspect` degrades gracefully on missing entities.** Calls naming a non-existent work id no longer fail with an opaque `PG_INVALID_UUID` / 500. The tool returns a structured `{ ok: false, error: "WORK_NOT_FOUND", context: { work_id } }` shape and lists the closest candidates (by name fuzzy match) so the calling agent can recover without round-tripping the user.
|
|
27
|
+
|
|
28
|
+
### Fixed
|
|
29
|
+
|
|
30
|
+
- **`pica_export_catalog_csv` schema reconciled with backend.** The tool's `format` enum is now `pro` | `distributor` | `nro` | `sync-pdf` (was `csv` | `json`, both rejected by the backend) and `format` is now marked required. The schema also exposes `work_id` (string) and `work_ids` (string[]) — the backend requires one. Tool description rewritten to explain each format's destination (PRO/CMO, DSP delivery, neighbouring-rights body, sync one-sheet) plus the XOR work scope and the `sync-pdf` single-only constraint. Prior to this fix the tool was uncallable from its own schema: agents got three sequential 400s and could not recover from the surface.
|
|
31
|
+
|
|
32
|
+
## [2.59.0] - 2026-05-22
|
|
33
|
+
|
|
34
|
+
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).
|
|
35
|
+
|
|
36
|
+
### Added
|
|
37
|
+
|
|
38
|
+
- **`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.
|
|
39
|
+
|
|
40
|
+
- **`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.
|
|
41
|
+
|
|
42
|
+
- **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.
|
|
43
|
+
|
|
44
|
+
- **`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.
|
|
45
|
+
|
|
46
|
+
- **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.
|
|
47
|
+
|
|
48
|
+
- **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.
|
|
49
|
+
|
|
50
|
+
- **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.
|
|
51
|
+
|
|
52
|
+
- **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)`.
|
|
53
|
+
|
|
54
|
+
- **`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`.
|
|
55
|
+
|
|
56
|
+
### Changed
|
|
57
|
+
|
|
58
|
+
- **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.
|
|
59
|
+
|
|
60
|
+
- **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.
|
|
61
|
+
|
|
62
|
+
- **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.
|
|
63
|
+
|
|
64
|
+
- **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.
|
|
65
|
+
|
|
66
|
+
### Deprecated
|
|
67
|
+
|
|
68
|
+
- **`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.
|
|
69
|
+
|
|
70
|
+
### Fixed
|
|
71
|
+
|
|
72
|
+
- **`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.
|
|
73
|
+
|
|
74
|
+
- **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.
|
|
75
|
+
|
|
76
|
+
### Database (staging applied; production applied)
|
|
77
|
+
|
|
78
|
+
- `20260522132950_adr244_record_kind_outreach_state.sql` — `record_kind` and `outreach_state` columns on `people`, with classifier-driven defaults.
|
|
79
|
+
- `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.
|
|
80
|
+
|
|
81
|
+
Consumes `@withpica/mcp-sdk@1.30.0`.
|
|
82
|
+
|
|
14
83
|
## [2.58.0] - 2026-05-19
|
|
15
84
|
|
|
16
85
|
### Changed
|