@withpica/mcp-sdk 3.28.0 → 4.0.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 +40 -0
- package/dist/index.d.ts +112 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +39 -6
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -11,6 +11,46 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
11
11
|
|
|
12
12
|
## [Unreleased]
|
|
13
13
|
|
|
14
|
+
## [4.0.0] - 2026-10-23
|
|
15
|
+
|
|
16
|
+
> **Major** for one breaking change, below. Publish this first, then `@withpica/mcp-utils` 2.0.1,
|
|
17
|
+
> then `@withpica/mcp-server` 2.110.0 (which calls `people.restore` and `removed.list`, so it needs
|
|
18
|
+
> this version), then `@withpica/mcp-server-directory` 1.9.0.
|
|
19
|
+
|
|
20
|
+
### Changed
|
|
21
|
+
|
|
22
|
+
- **Breaking:** `AccessSimulateShareLinkConfig.access_type` is now
|
|
23
|
+
`"anyone" | "specific_people" | "collaborators_only"`, the share_links words,
|
|
24
|
+
instead of `"private" | "limited" | "public"`. Until this release the server
|
|
25
|
+
accepted the old words (`pica_access_simulate` listed them); it now refuses
|
|
26
|
+
them as an input error, so a caller still sending them must switch.
|
|
27
|
+
|
|
28
|
+
### Added
|
|
29
|
+
|
|
30
|
+
- `CatalogHealthVerdict.recordings`: each kind of recording present (`CatalogHealthRecordingKind`:
|
|
31
|
+
`released_master`, `unreleased_master`, `demo`, `alternate`, `video`) with `label`, `total` and
|
|
32
|
+
`missingFields`, or `null` when the check could not run. `CatalogHealthItem.recordingKind` on
|
|
33
|
+
`missing_recording_fields` items (one item per kind). Type only: `health.catalogHealth()`
|
|
34
|
+
already returns what the server sends.
|
|
35
|
+
- `ShareTraceReason.audience` may be `"song_collaborators"` (a
|
|
36
|
+
collaborators-only link: a signed-in account credited on the song).
|
|
37
|
+
- `ShareTraceReason.audience` may be `"named_recipients"` (a specific-people
|
|
38
|
+
link), with `recipients: [{ recipient_id, email, person_id, view_count,
|
|
39
|
+
last_viewed_at }]`.
|
|
40
|
+
- `ShareTraceReason` share-link fields: `audience: "anyone_with_the_link"`,
|
|
41
|
+
`view_count`, `max_views`, `password_protected`. Every live link to a song is
|
|
42
|
+
now reported for any viewer.
|
|
43
|
+
- `works.restore(id)` and `people.restore(id)`: bring back a removed song or person
|
|
44
|
+
(`POST /admin/works/{id}/restore`, `/admin/people/{id}/restore`). Removing a song or a person
|
|
45
|
+
never deletes it. 409 when a live song now holds its title and artist or tunecode, or when the
|
|
46
|
+
record was merged into another.
|
|
47
|
+
- `removed.list({ kind?, limit?, offset? })` → `RemovedList` (`kind`, `total`, `totals`,
|
|
48
|
+
`items: RemovedItem[]`, `next_offset`): one page of the songs (default) or people removed from
|
|
49
|
+
the catalogue, with when, by whom and why (`GET /admin/removed`).
|
|
50
|
+
- `RemovedItem.holds`: for a removed person, the song credits, song artist credits, recording
|
|
51
|
+
credits, recording splits in force, agreement parties and main-artist songs/recordings that
|
|
52
|
+
still sit with them; `null` for a song.
|
|
53
|
+
|
|
14
54
|
## [3.28.0] - 2026-10-19
|
|
15
55
|
|
|
16
56
|
> **Publish order:** this package first, then `@withpica/mcp-server` 2.109.0, which calls
|
package/dist/index.d.ts
CHANGED
|
@@ -1132,6 +1132,14 @@ declare class WorksResource extends BaseResource {
|
|
|
1132
1132
|
}): Promise<Work>;
|
|
1133
1133
|
update(id: string, updates: Partial<Work>): Promise<Work>;
|
|
1134
1134
|
delete(id: string): Promise<DeletionResult>;
|
|
1135
|
+
/**
|
|
1136
|
+
* Bring back a removed song (removing never deletes one). 409 when a live
|
|
1137
|
+
* song now holds its title and artist or its tunecode, or when it was
|
|
1138
|
+
* merged into another song.
|
|
1139
|
+
*/
|
|
1140
|
+
restore(id: string): Promise<{
|
|
1141
|
+
success: boolean;
|
|
1142
|
+
}>;
|
|
1135
1143
|
/**
|
|
1136
1144
|
* @deprecated `works` has no `is_verified` column, so PATCH /admin/works/[id]
|
|
1137
1145
|
* refuses this body (VALIDATION_ERROR "unknown field 'is_verified'") on every
|
|
@@ -1339,7 +1347,23 @@ declare class PeopleResource extends BaseResource {
|
|
|
1339
1347
|
get(id: string): Promise<Person>;
|
|
1340
1348
|
create(data: Partial<Person>): Promise<Person>;
|
|
1341
1349
|
update(id: string, updates: Partial<Person>): Promise<Person>;
|
|
1342
|
-
|
|
1350
|
+
/**
|
|
1351
|
+
* Remove a person. Someone who still has credits is refused (409
|
|
1352
|
+
* PERSON_HOLDS_CREDITS, with what they hold) unless `moveTo` names the live
|
|
1353
|
+
* person their credits move to; the removal is then a person merge.
|
|
1354
|
+
*/
|
|
1355
|
+
delete(id: string, opts?: {
|
|
1356
|
+
moveTo?: string;
|
|
1357
|
+
}): Promise<{
|
|
1358
|
+
moved_to?: {
|
|
1359
|
+
id: string;
|
|
1360
|
+
name: string;
|
|
1361
|
+
};
|
|
1362
|
+
}>;
|
|
1363
|
+
/** Bring back a removed person. 409 when they were merged into another. */
|
|
1364
|
+
restore(id: string): Promise<{
|
|
1365
|
+
success: boolean;
|
|
1366
|
+
}>;
|
|
1343
1367
|
enrichFromISNI(id: string, isni: string): Promise<Person>;
|
|
1344
1368
|
enrichFromMusicBrainz(id: string, musicbrainz_id: string): Promise<Person>;
|
|
1345
1369
|
bulkDelete(ids: string[]): Promise<unknown>;
|
|
@@ -2176,6 +2200,58 @@ declare class WorkspaceResource extends BaseResource {
|
|
|
2176
2200
|
}>;
|
|
2177
2201
|
}>;
|
|
2178
2202
|
}
|
|
2203
|
+
/** One removed song or person, as GET /admin/removed answers. */
|
|
2204
|
+
export interface RemovedItem {
|
|
2205
|
+
kind: "song" | "person";
|
|
2206
|
+
id: string;
|
|
2207
|
+
name: string;
|
|
2208
|
+
removed_at: string | null;
|
|
2209
|
+
/** "you" is never said here: a person's or agent's name, or null. */
|
|
2210
|
+
removed_by: string | null;
|
|
2211
|
+
/** Set when a song was moved to performances or linked to a shared song. */
|
|
2212
|
+
why: {
|
|
2213
|
+
kind: "moved_to_performance" | "linked_to_shared";
|
|
2214
|
+
title: string;
|
|
2215
|
+
} | null;
|
|
2216
|
+
/**
|
|
2217
|
+
* For a person: what they still hold in the live catalogue, which stays
|
|
2218
|
+
* with them while removed. Null for a song.
|
|
2219
|
+
*/
|
|
2220
|
+
holds: {
|
|
2221
|
+
song_credits: number;
|
|
2222
|
+
song_artist_credits: number;
|
|
2223
|
+
recording_credits: number;
|
|
2224
|
+
/** Recording splits of every type still in force. */
|
|
2225
|
+
recording_splits: number;
|
|
2226
|
+
/** Agreements they are a party to. */
|
|
2227
|
+
agreements: number;
|
|
2228
|
+
main_artist_songs: number;
|
|
2229
|
+
main_artist_recordings: number;
|
|
2230
|
+
total: number;
|
|
2231
|
+
} | null;
|
|
2232
|
+
}
|
|
2233
|
+
export interface RemovedList {
|
|
2234
|
+
kind: "song" | "person";
|
|
2235
|
+
/** How many of this kind are removed. */
|
|
2236
|
+
total: number;
|
|
2237
|
+
/** How many of each kind are removed. */
|
|
2238
|
+
totals: {
|
|
2239
|
+
songs: number;
|
|
2240
|
+
people: number;
|
|
2241
|
+
};
|
|
2242
|
+
items: RemovedItem[];
|
|
2243
|
+
/** The offset of the next page, or null on the last. */
|
|
2244
|
+
next_offset: number | null;
|
|
2245
|
+
}
|
|
2246
|
+
/** What has been removed from the catalogue and can be brought back. */
|
|
2247
|
+
declare class RemovedResource extends BaseResource {
|
|
2248
|
+
/** One page of removed songs (the default) or people, newest changed first. */
|
|
2249
|
+
list(params?: {
|
|
2250
|
+
kind?: "song" | "person";
|
|
2251
|
+
limit?: number;
|
|
2252
|
+
offset?: number;
|
|
2253
|
+
}): Promise<RemovedList>;
|
|
2254
|
+
}
|
|
2179
2255
|
declare class ShareSendResource extends BaseResource {
|
|
2180
2256
|
send(args: {
|
|
2181
2257
|
entity_type: "recording" | "work" | "audio_file" | "document";
|
|
@@ -2696,6 +2772,17 @@ export interface CatalogHealthItem {
|
|
|
2696
2772
|
truncated: boolean;
|
|
2697
2773
|
needsScope: string | null;
|
|
2698
2774
|
actionableByCaller: boolean;
|
|
2775
|
+
/** On missing_recording_fields: which kind of recording the item counts (one item per kind). */
|
|
2776
|
+
recordingKind?: CatalogHealthRecordingKind;
|
|
2777
|
+
}
|
|
2778
|
+
/** Mirrors lib/services/recording-kind.ts — a master is "released" only when it is on a release. */
|
|
2779
|
+
export type CatalogHealthRecordingKind = "released_master" | "unreleased_master" | "demo" | "alternate" | "video";
|
|
2780
|
+
export interface CatalogHealthRecordingKindLine {
|
|
2781
|
+
kind: CatalogHealthRecordingKind;
|
|
2782
|
+
/** Say this: "demos", "released masters". */
|
|
2783
|
+
label: string;
|
|
2784
|
+
total: number;
|
|
2785
|
+
missingFields: number;
|
|
2699
2786
|
}
|
|
2700
2787
|
export interface CatalogHealthVerdict {
|
|
2701
2788
|
score: number | null;
|
|
@@ -2711,6 +2798,8 @@ export interface CatalogHealthVerdict {
|
|
|
2711
2798
|
assessed: string[];
|
|
2712
2799
|
notAssessed: string[];
|
|
2713
2800
|
items: CatalogHealthItem[];
|
|
2801
|
+
/** Recordings by kind (only kinds present); null when the check could not run. */
|
|
2802
|
+
recordings: CatalogHealthRecordingKindLine[] | null;
|
|
2714
2803
|
generatedAt: string;
|
|
2715
2804
|
}
|
|
2716
2805
|
export interface CatalogHealthPlanAction {
|
|
@@ -4774,7 +4863,21 @@ export interface ShareTraceReason {
|
|
|
4774
4863
|
territory: string;
|
|
4775
4864
|
}>;
|
|
4776
4865
|
share_link_id?: string;
|
|
4866
|
+
/** 'anyone' links open for anyone with the URL; specific-people links
|
|
4867
|
+
* only through their named recipients' own URLs; collaborators-only
|
|
4868
|
+
* links only for a signed-in account credited on the song */
|
|
4869
|
+
audience?: "anyone_with_the_link" | "named_recipients" | "song_collaborators";
|
|
4870
|
+
recipients?: Array<{
|
|
4871
|
+
recipient_id: string;
|
|
4872
|
+
email: string | null;
|
|
4873
|
+
person_id: string | null;
|
|
4874
|
+
view_count: number;
|
|
4875
|
+
last_viewed_at: string | null;
|
|
4876
|
+
}>;
|
|
4777
4877
|
expires_at?: string | null;
|
|
4878
|
+
view_count?: number;
|
|
4879
|
+
max_views?: number | null;
|
|
4880
|
+
password_protected?: boolean;
|
|
4778
4881
|
grant_id?: string;
|
|
4779
4882
|
scope?: string[];
|
|
4780
4883
|
granted_at?: string | null;
|
|
@@ -5865,7 +5968,8 @@ declare class ShareLinksResource extends BaseResource {
|
|
|
5865
5968
|
get(id: string): Promise<any>;
|
|
5866
5969
|
/**
|
|
5867
5970
|
* Update a narrow subset of share-link fields (name, description,
|
|
5868
|
-
* personal_message, expires_at, max_views, is_active, password
|
|
5971
|
+
* personal_message, expires_at, max_views, is_active, password,
|
|
5972
|
+
* revoke_recipient_ids).
|
|
5869
5973
|
* Permission-bearing fields are not updatable post-create — revoke
|
|
5870
5974
|
* and recreate to change permissions.
|
|
5871
5975
|
*/
|
|
@@ -6058,7 +6162,11 @@ export type AccessSimulateEntityType = "work" | "recording" | "person" | "releas
|
|
|
6058
6162
|
export type AccessSimulateAction = "view" | "share_link_preview" | "claim" | "grant";
|
|
6059
6163
|
export type AccessSimulateRecipientType = "user" | "anonymous" | "share_link";
|
|
6060
6164
|
export interface AccessSimulateShareLinkConfig {
|
|
6061
|
-
|
|
6165
|
+
/** The share_links vocabulary. 'anyone': anyone with its URL.
|
|
6166
|
+
* 'specific_people': only the recipients in the two lists below, each
|
|
6167
|
+
* through their own URL. 'collaborators_only': a signed-in account
|
|
6168
|
+
* credited on the link's one song. */
|
|
6169
|
+
access_type: "anyone" | "specific_people" | "collaborators_only";
|
|
6062
6170
|
allow_download?: boolean;
|
|
6063
6171
|
allow_streaming?: boolean;
|
|
6064
6172
|
allow_comments?: boolean;
|
|
@@ -6234,6 +6342,7 @@ export declare class PicaClient {
|
|
|
6234
6342
|
groups: GroupsResource;
|
|
6235
6343
|
assistantInteractions: AssistantInteractionsResource;
|
|
6236
6344
|
shareSend: ShareSendResource;
|
|
6345
|
+
removed: RemovedResource;
|
|
6237
6346
|
accessSimulate: AccessSimulateResource;
|
|
6238
6347
|
approvals: ApprovalsResource;
|
|
6239
6348
|
integrity: IntegrityResource;
|