@withpica/mcp-sdk 3.14.0 → 3.15.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 +13 -0
- package/dist/index.d.ts +106 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +45 -0
- package/dist/index.js.map +1 -1
- package/package.json +3 -2
package/CHANGELOG.md
CHANGED
|
@@ -11,6 +11,19 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
11
11
|
|
|
12
12
|
## [Unreleased]
|
|
13
13
|
|
|
14
|
+
## [3.15.0] - 2026-09-08
|
|
15
|
+
|
|
16
|
+
### Added
|
|
17
|
+
|
|
18
|
+
- `selections` resource (ADR-319 saved catalog selections) — `list`,
|
|
19
|
+
`create`, `inspect` (id + optional `resolve`/`limit`/`offset`), `update`,
|
|
20
|
+
`delete` over `/admin/selections`. Backs the new `pica_selections_*` MCP
|
|
21
|
+
tools (Task 8).
|
|
22
|
+
- `health.catalogHealthFix` accepts an optional `selections` array
|
|
23
|
+
(`{ actionId, chosenPersonId }`) — the human choice a `resolve_person`
|
|
24
|
+
action needs. Type-only on this side (the body is forwarded as-is); the
|
|
25
|
+
route validates it.
|
|
26
|
+
|
|
14
27
|
PR #2118 (`fix/avatar-import-path-2026-09-03`) is merged into the release branch, so its changes ship in the version below; publish in the order mcp-utils → mcp-sdk → mcp-server.
|
|
15
28
|
|
|
16
29
|
## [3.14.0] - 2026-09-04
|
package/dist/index.d.ts
CHANGED
|
@@ -2330,11 +2330,17 @@ declare class HealthResource extends BaseResource {
|
|
|
2330
2330
|
/**
|
|
2331
2331
|
* ADR-273 — apply accepted fix actions from a prior plan. Requires planToken
|
|
2332
2332
|
* from catalogHealthPlan; accept is a list of actionIds (or "all_safe_auto").
|
|
2333
|
+
* `selections` carries the human choice a resolve_person action needs
|
|
2334
|
+
* ({ actionId, chosenPersonId }); a selection also accepts its action.
|
|
2333
2335
|
* Returns honest per-action met/unmet plus a fresh verdict.
|
|
2334
2336
|
*/
|
|
2335
2337
|
catalogHealthFix(body: {
|
|
2336
2338
|
planToken: string;
|
|
2337
2339
|
accept: string[];
|
|
2340
|
+
selections?: Array<{
|
|
2341
|
+
actionId: string;
|
|
2342
|
+
chosenPersonId: string;
|
|
2343
|
+
}>;
|
|
2338
2344
|
}): Promise<CatalogHealthFixResult>;
|
|
2339
2345
|
}
|
|
2340
2346
|
declare class DashboardResource extends BaseResource {
|
|
@@ -4536,6 +4542,104 @@ declare class StatementsResource extends BaseResource {
|
|
|
4536
4542
|
rows: unknown[];
|
|
4537
4543
|
}): Promise<Record<string, unknown>>;
|
|
4538
4544
|
}
|
|
4545
|
+
/**
|
|
4546
|
+
* ADR-319 — saved catalog selections. `mcp-sdk` is a standalone published
|
|
4547
|
+
* package with no access to the app's path aliases, so this is a hand-kept
|
|
4548
|
+
* mirror of `lib/services/catalog-selection/types.ts` rather than an
|
|
4549
|
+
* import. Keep the two in sync by hand when the shape changes.
|
|
4550
|
+
*
|
|
4551
|
+
* `evaluable`/`substrate_rows`/`org_rows` on {@link CoverageEntry} are the
|
|
4552
|
+
* whole point of the feature (ADR-319 Decision 3): a zero-member resolution
|
|
4553
|
+
* with `substrate_rows === 0` on a clause means "PICA does not know", not
|
|
4554
|
+
* "there are none" — the never-invent rule applied to a selection.
|
|
4555
|
+
*/
|
|
4556
|
+
export type SubstrateUnit = "works" | "credit_rows" | "audio_analysis_rows";
|
|
4557
|
+
export interface CoverageEntry {
|
|
4558
|
+
clause: string;
|
|
4559
|
+
/**
|
|
4560
|
+
* False when the resolver had nothing to run the clause against — today,
|
|
4561
|
+
* a role class the vocabulary no longer carries, which a stored predicate
|
|
4562
|
+
* can still name. The clause is narrowed to nothing rather than dropped,
|
|
4563
|
+
* and this flag is what says the empty answer is PICA's ignorance rather
|
|
4564
|
+
* than the catalogue's.
|
|
4565
|
+
*/
|
|
4566
|
+
evaluable: boolean;
|
|
4567
|
+
substrate_rows: number;
|
|
4568
|
+
/**
|
|
4569
|
+
* What `substrate_rows` counted. NOT the same unit as `org_rows`, which is
|
|
4570
|
+
* always works: a role clause counts credits and a trait clause counts
|
|
4571
|
+
* audio analyses, so the two numbers are not two halves of one fraction.
|
|
4572
|
+
*/
|
|
4573
|
+
substrate_unit: SubstrateUnit;
|
|
4574
|
+
org_rows: number;
|
|
4575
|
+
}
|
|
4576
|
+
export interface PlayableRef {
|
|
4577
|
+
source: "spotify" | "youtube" | "apple" | "audio_file";
|
|
4578
|
+
ref: string;
|
|
4579
|
+
}
|
|
4580
|
+
export interface SelectionMember {
|
|
4581
|
+
work_id: string;
|
|
4582
|
+
title: string;
|
|
4583
|
+
primary_artist: string | null;
|
|
4584
|
+
playable: PlayableRef | null;
|
|
4585
|
+
has_lyrics: boolean;
|
|
4586
|
+
}
|
|
4587
|
+
export interface ResolveResult {
|
|
4588
|
+
members: SelectionMember[];
|
|
4589
|
+
total: number;
|
|
4590
|
+
coverage: CoverageEntry[];
|
|
4591
|
+
/** True when `total` exceeded the page size and members is a first page. */
|
|
4592
|
+
truncated: boolean;
|
|
4593
|
+
}
|
|
4594
|
+
export interface CatalogSelection {
|
|
4595
|
+
id: string;
|
|
4596
|
+
organisation_id: string;
|
|
4597
|
+
name: string;
|
|
4598
|
+
description: string | null;
|
|
4599
|
+
predicate: Record<string, unknown>;
|
|
4600
|
+
renderer: "listen" | "worklist";
|
|
4601
|
+
visibility: "private" | "shared" | "public";
|
|
4602
|
+
created_by: string | null;
|
|
4603
|
+
created_at: string;
|
|
4604
|
+
updated_at: string;
|
|
4605
|
+
last_resolved_at: string | null;
|
|
4606
|
+
last_resolved_count: number | null;
|
|
4607
|
+
is_deleted: boolean;
|
|
4608
|
+
}
|
|
4609
|
+
export interface CreateSelectionInput {
|
|
4610
|
+
name: string;
|
|
4611
|
+
description?: string;
|
|
4612
|
+
/** `{ version: 1, all: [...clauses] }` — validated server-side. */
|
|
4613
|
+
predicate: Record<string, unknown>;
|
|
4614
|
+
renderer?: "listen" | "worklist";
|
|
4615
|
+
}
|
|
4616
|
+
export interface UpdateSelectionInput {
|
|
4617
|
+
name?: string;
|
|
4618
|
+
description?: string;
|
|
4619
|
+
predicate?: Record<string, unknown>;
|
|
4620
|
+
}
|
|
4621
|
+
declare class SelectionsResource extends BaseResource {
|
|
4622
|
+
list(params?: {
|
|
4623
|
+
limit?: number;
|
|
4624
|
+
offset?: number;
|
|
4625
|
+
}): Promise<CatalogSelection[]>;
|
|
4626
|
+
create(data: CreateSelectionInput): Promise<CatalogSelection>;
|
|
4627
|
+
/**
|
|
4628
|
+
* Per-id read. `resolve: true` also resolves the predicate — the route
|
|
4629
|
+
* returns `{ selection, resolution }` instead of `{ selection }`, and
|
|
4630
|
+
* `resolution` is omitted below when the caller didn't ask for it.
|
|
4631
|
+
*/
|
|
4632
|
+
inspect(id: string, opts?: {
|
|
4633
|
+
resolve?: boolean;
|
|
4634
|
+
limit?: number;
|
|
4635
|
+
offset?: number;
|
|
4636
|
+
}): Promise<{
|
|
4637
|
+
selection: CatalogSelection;
|
|
4638
|
+
resolution?: ResolveResult;
|
|
4639
|
+
}>;
|
|
4640
|
+
update(id: string, data: UpdateSelectionInput): Promise<CatalogSelection>;
|
|
4641
|
+
delete(id: string): Promise<void>;
|
|
4642
|
+
}
|
|
4539
4643
|
declare class ShareLinksResource extends BaseResource {
|
|
4540
4644
|
list(params?: {
|
|
4541
4645
|
work_id?: string;
|
|
@@ -4859,6 +4963,8 @@ export declare class PicaClient {
|
|
|
4859
4963
|
workForHire: WorkForHireResource;
|
|
4860
4964
|
royalties: RoyaltiesResource;
|
|
4861
4965
|
statements: StatementsResource;
|
|
4966
|
+
/** ADR-319 — saved catalog selections. */
|
|
4967
|
+
selections: SelectionsResource;
|
|
4862
4968
|
shareLinks: ShareLinksResource;
|
|
4863
4969
|
consent: ConsentResource;
|
|
4864
4970
|
custody: CustodyResource;
|