@withpica/mcp-sdk 4.5.0 → 4.6.1

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,21 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
11
11
 
12
12
  ## [Unreleased]
13
13
 
14
+ ## [4.6.1] - 2026-11-06
15
+
16
+ ### Changed
17
+
18
+ - **`credits.updateForWork` / `credits.updateCollaborators` accept `splits: null`** (ADR-355
19
+ D4): a share that is not known is sent as null and stored as unknown, never as 0%. Type
20
+ widening only; a number still works as before.
21
+
22
+ ## [4.6.0] - 2026-11-06
23
+
24
+ ### Added
25
+
26
+ - `exampleSong.get()` reads PICA's fixed example song (`GET /api/example-song`).
27
+ - `ImportAnalysis.analysis` declares the optional `warnings`, `confidence`, `detectedDomain` and `estimatedSuccessRate` fields the analyse route already returns.
28
+
14
29
  ## [4.5.0] - 2026-11-04
15
30
 
16
31
  ### Added
package/dist/index.d.ts CHANGED
@@ -437,7 +437,8 @@ interface WorkCreditsInput {
437
437
  credits: Array<{
438
438
  person_id: string;
439
439
  role: string;
440
- splits: number;
440
+ /** 0-100; null when the share is not known (ADR-355 D4), never sent as 0. */
441
+ splits: number | null;
441
442
  }>;
442
443
  }
443
444
  interface PicaScorePillar {
@@ -1685,11 +1686,10 @@ declare class CreditsResource extends BaseResource {
1685
1686
  */
1686
1687
  atomicUpdate(workId: string, creditId: string, patch: WorkCreditAtomicUpdateInput): Promise<AtomicCreditUpdateResult>;
1687
1688
  /**
1688
- * Send pending credits on a work to their recipients for attestation.
1689
- * Lightweight alternative to pica_split_sheet_send — fans out the
1690
- * notification rails (in-app + telegram + email) without generating
1691
- * a formal split-sheet document. Recipients click through to
1692
- * confirm/dispute; this call only sends the prompt.
1689
+ * Ask the people on a work's pending credits to confirm their part: one
1690
+ * email per person, through the one "ask [name] to confirm" (ADR-355 C2),
1691
+ * without generating a formal split-sheet document. Recipients confirm
1692
+ * signed in from the email's link; this call only sends the ask.
1693
1693
  */
1694
1694
  sendForAttestation(workId: string, input?: {
1695
1695
  credit_ids?: string[];
@@ -3222,6 +3222,21 @@ declare class OnboardingResource extends BaseResource {
3222
3222
  intent_notes?: string;
3223
3223
  }): Promise<AcknowledgeOnboardingResponse>;
3224
3224
  }
3225
+ /**
3226
+ * The example song: a made-up, complete song every account can read, marked
3227
+ * `example: true` with a note saying so. It is in no catalogue.
3228
+ */
3229
+ export interface ExampleSong {
3230
+ example: true;
3231
+ example_note: string;
3232
+ url: string;
3233
+ work: Record<string, unknown>;
3234
+ [key: string]: unknown;
3235
+ }
3236
+ declare class ExampleSongResource extends BaseResource {
3237
+ /** GET /api/example-song — the example song, read-only. */
3238
+ get(): Promise<ExampleSong>;
3239
+ }
3225
3240
  export interface IntroduceSelfResponse {
3226
3241
  success: boolean;
3227
3242
  data: {
@@ -4053,7 +4068,12 @@ interface ImportAnalysis {
4053
4068
  aiConfidence?: number;
4054
4069
  required?: boolean;
4055
4070
  }>;
4071
+ /** Columns left unmatched, duplicates, missing required fields. */
4072
+ warnings?: string[];
4056
4073
  suggestions: string[];
4074
+ confidence?: number;
4075
+ detectedDomain?: string;
4076
+ estimatedSuccessRate?: number;
4057
4077
  };
4058
4078
  }
4059
4079
  interface ImportValidation {
@@ -6352,12 +6372,18 @@ export interface ApprovalStatusResult {
6352
6372
  status: ApprovalStatusValue;
6353
6373
  /** ISO timestamp the owner decided; null while still pending. */
6354
6374
  decided_at: string | null;
6355
- /** Channel the decision arrived through ("email" | "telegram"); null while pending. */
6375
+ /** Channel the decision arrived through ("email" | "telegram" | "in_app"); null while pending. */
6356
6376
  decided_via: string | null;
6357
6377
  /** ISO timestamp the pending request expires. */
6358
6378
  expires_at: string | null;
6359
6379
  /** Failed approvals only: why it did not run, in plain words. */
6360
6380
  failure_reason?: string;
6381
+ /**
6382
+ * Executed single approvals only: what ran — ids, counts, flags and short
6383
+ * status words from the executor's result (the rule, agreement or
6384
+ * relationship id; how many were sent, moved or deleted). Never free text.
6385
+ */
6386
+ result?: Record<string, unknown>;
6361
6387
  /** Batched merge approvals only, once run: per-outcome counts. */
6362
6388
  summary?: {
6363
6389
  total: number;
@@ -6463,6 +6489,7 @@ export declare class PicaClient {
6463
6489
  telegram: TelegramResource;
6464
6490
  gdpr: GdprResource;
6465
6491
  onboarding: OnboardingResource;
6492
+ exampleSong: ExampleSongResource;
6466
6493
  agentIntroductions: AgentIntroductionsResource;
6467
6494
  workflowOutcomes: WorkflowOutcomesResource;
6468
6495
  feedback: FeedbackResource;