@withpica/mcp-sdk 3.16.0 → 3.18.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,32 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
11
11
 
12
12
  ## [Unreleased]
13
13
 
14
+ ## [3.18.0] - 2026-09-17
15
+
16
+ ### Removed
17
+
18
+ - **`exports.catalogAssetReport()` no longer takes `attestation`.** The
19
+ report's declaration goes to lenders and insurers, and only a person signed
20
+ in to PICA may make it (the export panel). The API now refuses an
21
+ attestation sent with an API key, agent grant or OAuth token (400) and
22
+ builds those callers an unsigned report, so the parameter could only ever
23
+ fail. Callers that passed it: drop it.
24
+ - **`sections.audio` on the same method.** The report never read it.
25
+
26
+ ## [3.17.0] - 2026-09-13
27
+
28
+ ### Fixed
29
+
30
+ - **`credits.atomicUpdate()` now returns what its type declares.** It went
31
+ through `request()`, whose `return data.data || data` narrowed the route's
32
+ `{ data, credit_id, work_id, allocation }` envelope to the bare credit row —
33
+ so `allocation` (the work's writer allocation after the edit, which
34
+ `pica_credit_update` promises in its description) was always `undefined`,
35
+ and the tool's `allocation.status` completion hints were dead code. It now
36
+ uses `requestWithEnvelope` and returns `{ credit_id, work_id, credit,
37
+ allocation }`. Callers that read credit fields off the top-level result
38
+ should read `result.credit` — the declared shape never promised them there.
39
+
14
40
  ## [3.16.0] - 2026-09-09
15
41
 
16
42
  ### Added
package/dist/index.d.ts CHANGED
@@ -1347,6 +1347,22 @@ export interface WorkCreditAtomicAddInput {
1347
1347
  share_pct?: number;
1348
1348
  notes?: string;
1349
1349
  }
1350
+ /**
1351
+ * In-place edit of ONE credit (2026-09-11). Every field optional; only the
1352
+ * fields present are written. `share_pct: null` records the share as
1353
+ * UNKNOWN, never as 0. `instrument` applies to a recording (master) credit.
1354
+ */
1355
+ export interface WorkCreditAtomicUpdateInput {
1356
+ credit_type?: WorkCreditAtomicAddInput["credit_type"];
1357
+ share_pct?: number | null;
1358
+ credited_name?: string | null;
1359
+ notes?: string | null;
1360
+ instrument?: string | null;
1361
+ }
1362
+ export interface AtomicCreditUpdateResult extends AtomicCreditResult {
1363
+ /** The work's writer allocation AFTER this change — closed / open / incomplete / no_writers / unscalable. */
1364
+ allocation?: Record<string, unknown>;
1365
+ }
1350
1366
  export interface AtomicCreditResult {
1351
1367
  credit_id: string;
1352
1368
  credit?: Record<string, unknown>;
@@ -1375,6 +1391,20 @@ declare class CreditsResource extends BaseResource {
1375
1391
  * semantics — never leaks 404 vs 403 via latency).
1376
1392
  */
1377
1393
  atomicRemove(workId: string, creditId: string): Promise<AtomicCreditResult>;
1394
+ /**
1395
+ * Edit one credit in place — the verb between add and remove.
1396
+ *
1397
+ * Goes through `requestWithEnvelope`, not `request()`: the route answers
1398
+ * `{ success, data: <credit row>, credit_id, work_id, allocation }` with
1399
+ * `allocation` as a SIBLING of `data`, and `request()`'s
1400
+ * `return data.data || data` narrowed that to the bare credit row — so
1401
+ * every caller received an object that matched none of this method's
1402
+ * declared return type, and `allocation` (which `pica_credit_update`
1403
+ * promises in its description) was always undefined. Measured 2026-09-12
1404
+ * on the #2210 preview; pinned by the holdout contract
1405
+ * `scenarios/contracts/credit-update.spec.ts` leg 4.
1406
+ */
1407
+ atomicUpdate(workId: string, creditId: string, patch: WorkCreditAtomicUpdateInput): Promise<AtomicCreditUpdateResult>;
1378
1408
  /**
1379
1409
  * Send pending credits on a work to their recipients for attestation.
1380
1410
  * Lightweight alternative to pica_split_sheet_send — fans out the
@@ -2480,20 +2510,18 @@ declare class SettingsResource extends BaseResource {
2480
2510
  }
2481
2511
  declare class GdprResource extends BaseResource {
2482
2512
  /**
2483
- * Create a soft-delete request for the authenticated user's account.
2513
+ * Create a pending deletion request for the authenticated user's account.
2484
2514
  * Never accepts a user_id — the subject is derived from the bearer token
2485
- * (ADR-184 rule 2). Returns the deletion_request_id immediately; actual
2486
- * erasure runs async through the gdpr-deletion processing path. Matches
2487
- * the web UI's 30-day reversal window.
2515
+ * (ADR-184 rule 2). Returns the deletion_request_id immediately; nothing
2516
+ * is erased until an org owner/admin or the PICA team confirms the request.
2488
2517
  */
2489
2518
  deleteMyAccount(params?: {
2490
2519
  reason?: string;
2491
2520
  }): Promise<any>;
2492
2521
  /**
2493
2522
  * Queue a GDPR Article 15 / 20 data export for the authenticated user.
2494
- * Returns a job_id immediately; the signed download link is emailed when
2495
- * the job completes. Format defaults to JSON (ADR-184 defers format
2496
- * negotiation to a future parameter).
2523
+ * Returns a job_id immediately; a download link is emailed when the job
2524
+ * completes. Sends `{}`, so the route's defaults apply (JSON, no files).
2497
2525
  */
2498
2526
  exportMyData(): Promise<any>;
2499
2527
  }
@@ -3228,6 +3256,11 @@ declare class ExportResource extends BaseResource {
3228
3256
  */
3229
3257
  format?: "zip" | "json";
3230
3258
  }): Promise<any>;
3259
+ /**
3260
+ * Builds an UNSIGNED catalog asset report. Its declaration can only be
3261
+ * attested by a person signed in to PICA (the export panel), so the API
3262
+ * refuses an attestation sent with an API key, agent grant or OAuth token.
3263
+ */
3231
3264
  catalogAssetReport(params: {
3232
3265
  sections: {
3233
3266
  ownership: true;
@@ -3235,11 +3268,6 @@ declare class ExportResource extends BaseResource {
3235
3268
  assets?: boolean;
3236
3269
  agreements?: boolean;
3237
3270
  intelligence?: boolean;
3238
- audio?: boolean;
3239
- };
3240
- attestation: {
3241
- signer_name: string;
3242
- declaration_accepted: boolean;
3243
3271
  };
3244
3272
  work_ids?: string[];
3245
3273
  }): Promise<any>;
@@ -3248,7 +3276,12 @@ declare class ExportResource extends BaseResource {
3248
3276
  }): Promise<any>;
3249
3277
  }
3250
3278
  declare class DuplicatesResource extends BaseResource {
3251
- findDuplicates(entityType: "works" | "people" | "releases" | "recordings"): Promise<any>;
3279
+ /**
3280
+ * ⚠️ `audio_files` is findable but NOT mergeable — `merge` below keeps the
3281
+ * narrower union deliberately. Re-uploaded audio is resolved by a person
3282
+ * deleting a file, never by a merge (ops issue dcea642b, 2026-09-10).
3283
+ */
3284
+ findDuplicates(entityType: "works" | "people" | "releases" | "recordings" | "audio_files"): Promise<any>;
3252
3285
  merge(entityType: "work" | "person" | "recording" | "release", winnerId: string, loserIds: string[]): Promise<any>;
3253
3286
  }
3254
3287
  declare class EntityContextResource extends BaseResource {