@vellumai/plugin-api 0.10.8 → 0.10.9-dev.202607152225.ec6fdbf

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.
Files changed (3) hide show
  1. package/index.d.ts +224 -296
  2. package/index.js +3 -0
  3. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -245,15 +245,15 @@ declare const AssistantActivityStateEventSchema: z.ZodObject<{
245
245
  reason: z.ZodEnum<{
246
246
  thinking_delta: "thinking_delta";
247
247
  generation_cancelled: "generation_cancelled";
248
+ tool_use_start: "tool_use_start";
249
+ message_complete: "message_complete";
248
250
  message_dequeued: "message_dequeued";
249
251
  first_text_delta: "first_text_delta";
250
- tool_use_start: "tool_use_start";
251
252
  preview_start: "preview_start";
252
253
  tool_result_received: "tool_result_received";
253
254
  confirmation_requested: "confirmation_requested";
254
255
  confirmation_resolved: "confirmation_resolved";
255
256
  context_compacting: "context_compacting";
256
- message_complete: "message_complete";
257
257
  error_terminal: "error_terminal";
258
258
  }>;
259
259
  requestId: z.ZodOptional<z.ZodString>;
@@ -304,8 +304,12 @@ declare const AssistantConfigSchema: z.ZodObject<{
304
304
  }>>;
305
305
  }, z.core.$strip>>;
306
306
  stt: z.ZodDefault<z.ZodObject<{
307
- mode: z.ZodDefault<z.ZodLiteral<"your-own">>;
307
+ mode: z.ZodDefault<z.ZodEnum<{
308
+ managed: "managed";
309
+ "your-own": "your-own";
310
+ }>>;
308
311
  provider: z.ZodEnum<{
312
+ vellum: "vellum";
309
313
  deepgram: "deepgram";
310
314
  "google-gemini": "google-gemini";
311
315
  "openai-whisper": "openai-whisper";
@@ -314,8 +318,12 @@ declare const AssistantConfigSchema: z.ZodObject<{
314
318
  providers: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>>>;
315
319
  }, z.core.$strip>>;
316
320
  tts: z.ZodDefault<z.ZodObject<{
317
- mode: z.ZodDefault<z.ZodLiteral<"your-own">>;
321
+ mode: z.ZodDefault<z.ZodEnum<{
322
+ managed: "managed";
323
+ "your-own": "your-own";
324
+ }>>;
318
325
  provider: z.ZodDefault<z.ZodEnum<{
326
+ vellum: "vellum";
319
327
  deepgram: "deepgram";
320
328
  xai: "xai";
321
329
  elevenlabs: "elevenlabs";
@@ -362,6 +370,7 @@ declare const AssistantConfigSchema: z.ZodObject<{
362
370
  sampleRate: z.ZodDefault<z.ZodNumber>;
363
371
  bitRate: z.ZodDefault<z.ZodNumber>;
364
372
  }, z.core.$strip>>;
373
+ vellum: z.ZodDefault<z.ZodObject<{}, z.core.$strip>>;
365
374
  }, z.core.$strip>>;
366
375
  }, z.core.$strip>>;
367
376
  "google-oauth": z.ZodDefault<z.ZodObject<{
@@ -526,9 +535,6 @@ declare const AssistantConfigSchema: z.ZodObject<{
526
535
  fastConcurrency?: number | undefined;
527
536
  embedConcurrency?: number | undefined;
528
537
  }>>>;
529
- worker: z.ZodDefault<z.ZodObject<{
530
- enabled: z.ZodDefault<z.ZodBoolean>;
531
- }, z.core.$strip>>;
532
538
  retention: z.ZodDefault<z.ZodObject<{
533
539
  keepRawForever: z.ZodDefault<z.ZodBoolean>;
534
540
  }, z.core.$strip>>;
@@ -661,6 +667,7 @@ declare const AssistantConfigSchema: z.ZodObject<{
661
667
  minCooldownMs: z.ZodDefault<z.ZodNumber>;
662
668
  keepSupersededRuns: z.ZodDefault<z.ZodBoolean>;
663
669
  matchConversationProfile: z.ZodDefault<z.ZodBoolean>;
670
+ promptPath: z.ZodDefault<z.ZodNullable<z.ZodString>>;
664
671
  }, z.core.$strip>>;
665
672
  }, z.core.$strip>>;
666
673
  monitoring: z.ZodDefault<z.ZodObject<{
@@ -671,11 +678,6 @@ declare const AssistantConfigSchema: z.ZodObject<{
671
678
  pluginSourceScanIntervalMs: z.ZodDefault<z.ZodNumber>;
672
679
  baselineSnapshotIntervalMs: z.ZodDefault<z.ZodNumber>;
673
680
  }, z.core.$strip>>;
674
- schedules: z.ZodDefault<z.ZodObject<{
675
- worker: z.ZodDefault<z.ZodObject<{
676
- enabled: z.ZodDefault<z.ZodBoolean>;
677
- }, z.core.$strip>>;
678
- }, z.core.$strip>>;
679
681
  migrations: z.ZodDefault<z.ZodObject<{
680
682
  worker: z.ZodDefault<z.ZodObject<{
681
683
  enabled: z.ZodDefault<z.ZodBoolean>;
@@ -708,82 +710,6 @@ declare const AssistantConfigSchema: z.ZodObject<{
708
710
  retentionDays: z.ZodDefault<z.ZodNumber>;
709
711
  }, z.core.$strip>>;
710
712
  llm: z.ZodDefault<z.ZodObject<{
711
- default: z.ZodDefault<z.ZodObject<{
712
- provider: z.ZodDefault<z.ZodEnum<{
713
- anthropic: "anthropic";
714
- openai: "openai";
715
- gemini: "gemini";
716
- fireworks: "fireworks";
717
- openrouter: "openrouter";
718
- ollama: "ollama";
719
- "vercel-ai-gateway": "vercel-ai-gateway";
720
- "openai-compatible": "openai-compatible";
721
- minimax: "minimax";
722
- atlascloud: "atlascloud";
723
- together: "together";
724
- }>>;
725
- provider_connection: z.ZodOptional<z.ZodString>;
726
- model: z.ZodDefault<z.ZodString>;
727
- maxTokens: z.ZodDefault<z.ZodNumber>;
728
- effort: z.ZodDefault<z.ZodEnum<{
729
- low: "low";
730
- medium: "medium";
731
- high: "high";
732
- none: "none";
733
- xhigh: "xhigh";
734
- max: "max";
735
- }>>;
736
- speed: z.ZodDefault<z.ZodEnum<{
737
- standard: "standard";
738
- fast: "fast";
739
- }>>;
740
- verbosity: z.ZodDefault<z.ZodEnum<{
741
- low: "low";
742
- medium: "medium";
743
- high: "high";
744
- }>>;
745
- temperature: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
746
- topP: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
747
- thinking: z.ZodDefault<z.ZodObject<{
748
- enabled: z.ZodDefault<z.ZodBoolean>;
749
- streamThinking: z.ZodDefault<z.ZodBoolean>;
750
- level: z.ZodOptional<z.ZodEnum<{
751
- low: "low";
752
- medium: "medium";
753
- high: "high";
754
- minimal: "minimal";
755
- }>>;
756
- }, z.core.$strip>>;
757
- contextWindow: z.ZodDefault<z.ZodObject<{
758
- enabled: z.ZodDefault<z.ZodBoolean>;
759
- maxInputTokens: z.ZodDefault<z.ZodNumber>;
760
- targetBudgetRatio: z.ZodDefault<z.ZodNumber>;
761
- compactThreshold: z.ZodDefault<z.ZodNumber>;
762
- summaryBudgetRatio: z.ZodDefault<z.ZodNumber>;
763
- overflowRecovery: z.ZodDefault<z.ZodObject<{
764
- enabled: z.ZodDefault<z.ZodBoolean>;
765
- safetyMarginRatio: z.ZodDefault<z.ZodNumber>;
766
- maxAttempts: z.ZodDefault<z.ZodNumber>;
767
- interactiveLatestTurnCompression: z.ZodDefault<z.ZodEnum<{
768
- truncate: "truncate";
769
- summarize: "summarize";
770
- drop: "drop";
771
- }>>;
772
- nonInteractiveLatestTurnCompression: z.ZodDefault<z.ZodEnum<{
773
- truncate: "truncate";
774
- summarize: "summarize";
775
- drop: "drop";
776
- }>>;
777
- }, z.core.$strip>>;
778
- }, z.core.$strip>>;
779
- openrouter: z.ZodDefault<z.ZodObject<{
780
- only: z.ZodDefault<z.ZodArray<z.ZodString>>;
781
- }, z.core.$strip>>;
782
- logitBias: z.ZodOptional<z.ZodEnum<{
783
- "suppress-cjk": "suppress-cjk";
784
- }>>;
785
- disableCache: z.ZodOptional<z.ZodBoolean>;
786
- }, z.core.$strip>>;
787
713
  profiles: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
788
714
  provider: z.ZodOptional<z.ZodEnum<{
789
715
  anthropic: "anthropic";
@@ -1131,10 +1057,10 @@ declare const AssistantConfigSchema: z.ZodObject<{
1131
1057
  }, z.core.$strip>>;
1132
1058
  install: z.ZodDefault<z.ZodObject<{
1133
1059
  nodeManager: z.ZodDefault<z.ZodEnum<{
1134
- bun: "bun";
1135
1060
  npm: "npm";
1136
1061
  pnpm: "pnpm";
1137
1062
  yarn: "yarn";
1063
+ bun: "bun";
1138
1064
  }>>;
1139
1065
  }, z.core.$strip>>;
1140
1066
  allowBundled: z.ZodDefault<z.ZodNullable<z.ZodArray<z.ZodString>>>;
@@ -1162,6 +1088,7 @@ declare const AssistantConfigSchema: z.ZodObject<{
1162
1088
  turnCommitMaxWaitMs: z.ZodDefault<z.ZodNumber>;
1163
1089
  failureBackoffBaseMs: z.ZodDefault<z.ZodNumber>;
1164
1090
  failureBackoffMaxMs: z.ZodDefault<z.ZodNumber>;
1091
+ maxFileSizeBytes: z.ZodDefault<z.ZodNumber>;
1165
1092
  interactiveGitTimeoutMs: z.ZodDefault<z.ZodNumber>;
1166
1093
  enrichmentQueueSize: z.ZodDefault<z.ZodNumber>;
1167
1094
  enrichmentConcurrency: z.ZodDefault<z.ZodNumber>;
@@ -1252,6 +1179,7 @@ declare const AssistantConfigSchema: z.ZodObject<{
1252
1179
  bargeInMinSpeechMs: z.ZodDefault<z.ZodNumber>;
1253
1180
  }, z.core.$strip>>;
1254
1181
  maxSessionDurationSeconds: z.ZodDefault<z.ZodNumber>;
1182
+ archiveAudio: z.ZodDefault<z.ZodBoolean>;
1255
1183
  }, z.core.$strip>>;
1256
1184
  whatsapp: z.ZodDefault<z.ZodObject<{
1257
1185
  phoneNumber: z.ZodDefault<z.ZodString>;
@@ -1518,30 +1446,6 @@ export declare interface AssistantEventSubscription {
1518
1446
  readonly connectionId: string;
1519
1447
  }
1520
1448
 
1521
- declare interface AssistantInboxEscalationResponse {
1522
- type: "assistant_inbox_escalation_response";
1523
- success: boolean;
1524
- error?: string;
1525
- /** List of escalations (returned on list). */
1526
- escalations?: Array<{
1527
- id: string;
1528
- runId: string;
1529
- conversationId: string;
1530
- channel: string;
1531
- requesterExternalUserId: string;
1532
- requesterChatId: string;
1533
- status: string;
1534
- requestSummary?: string;
1535
- createdAt: number;
1536
- }>;
1537
- /** Decision result (returned on decide). */
1538
- decision?: {
1539
- id: string;
1540
- status: string;
1541
- decidedAt: number;
1542
- };
1543
- }
1544
-
1545
1449
  /**
1546
1450
  * Managed skill authored by the assistant's retrospective. Identical shape to a
1547
1451
  * custom skill — it stays managed/deletable — but carries a distinct origin so
@@ -1911,6 +1815,12 @@ declare interface ClawhubSlimSkill extends SlimSkillBase {
1911
1815
 
1912
1816
  export declare const CLI_COMMAND_HELP: readonly CliCommandHelp[];
1913
1817
 
1818
+ declare interface CliArgumentHelp {
1819
+ /** Commander argument spec, e.g. `"<channel>"` or `"[value]"`. */
1820
+ name: string;
1821
+ description: string;
1822
+ }
1823
+
1914
1824
  /**
1915
1825
  * Fully declarative description of a top-level `assistant` CLI command and its
1916
1826
  * subcommands. Plain data by design — no action handlers — so plugins (e.g. the
@@ -1920,7 +1830,21 @@ export declare const CLI_COMMAND_HELP: readonly CliCommandHelp[];
1920
1830
  */
1921
1831
  declare interface CliCommandHelp {
1922
1832
  name: string;
1833
+ /**
1834
+ * Positional-argument spec appended to the name at registration, e.g.
1835
+ * `"<command>"`. Use {@link commandSpec} to build the Commander registration
1836
+ * string; `name` stays the bare command name so consumers (dedup, slugs,
1837
+ * rendering) never parse argument syntax out of it.
1838
+ */
1839
+ args?: string;
1923
1840
  description: string;
1841
+ /**
1842
+ * Positional arguments that carry their own description, applied via
1843
+ * Commander's `argument(name, description)` (rendered in the generated
1844
+ * `Arguments:` help section). Use `args` instead when the positional needs
1845
+ * no description.
1846
+ */
1847
+ arguments?: CliArgumentHelp[];
1924
1848
  /** Options declared directly on the top-level command. */
1925
1849
  options?: CliOptionHelp[];
1926
1850
  /** Extra help appended after the option list (`addHelpText("after", …)`). */
@@ -1962,15 +1886,30 @@ declare interface CliOptionHelp {
1962
1886
  /** When true, applied via `requiredOption` (missing → error) rather than `option`. */
1963
1887
  required?: boolean;
1964
1888
  /** Default value passed to `option(flags, description, defaultValue)`. */
1965
- defaultValue?: string;
1889
+ defaultValue?: string | number | boolean;
1890
+ /** Allowed values, applied via Commander's `Option.choices()` (invalid → error). */
1891
+ choices?: readonly string[];
1966
1892
  }
1967
1893
 
1968
1894
  declare interface CliSubcommandHelp {
1969
1895
  name: string;
1896
+ /** Positional-argument spec, e.g. `"<path>"` — see {@link CliCommandHelp.args}. */
1897
+ args?: string;
1970
1898
  description: string;
1899
+ /**
1900
+ * Positional arguments that carry their own description, applied via
1901
+ * Commander's `argument(name, description)` (rendered in the generated
1902
+ * `Arguments:` help section). Use `args` instead when the positional needs
1903
+ * no description.
1904
+ */
1905
+ arguments?: CliArgumentHelp[];
1971
1906
  options?: CliOptionHelp[];
1972
1907
  /** Extra help appended after the option list (`addHelpText("after", …)`). */
1973
1908
  helpText?: string;
1909
+ /** When true, this subcommand runs when the parent is invoked without one. */
1910
+ isDefault?: boolean;
1911
+ /** Nested subcommand groups (e.g. `avatar character update`). */
1912
+ subcommands?: CliSubcommandHelp[];
1974
1913
  }
1975
1914
 
1976
1915
  declare type CompactionCircuitClosedEvent = z.infer<typeof CompactionCircuitClosedEventSchema>;
@@ -2428,7 +2367,7 @@ declare interface ConversationSearchResultItem {
2428
2367
  matchingMessages: ConversationSearchMatchingMessage[];
2429
2368
  }
2430
2369
 
2431
- declare type _ConversationsServerMessages = AuthResult | PongMessage | AssistantStatusMessage | GenerationCancelledEvent | GenerationHandoffEvent | ModelInfo | HistoryResponse | UndoComplete | UsageUpdateEvent | UsageProgressEvent | UsageResponse | ContextCompacted | CompactionCircuitOpenEvent | CompactionCircuitClosedEvent | ConversationErrorEvent | ConversationNoticeEvent | ConversationInfo | ConversationTitleUpdatedEvent | ConversationListResponse | ConversationsClearResponse | ConversationSearchResponse | MessageContentResponse | ConversationListInvalidatedEvent | ScheduleConversationCreated | OpenConversation;
2370
+ declare type _ConversationsServerMessages = AuthResult | PongMessage | AssistantStatusMessage | GenerationCancelledEvent | GenerationHandoffEvent | ModelInfo | HistoryResponse | UndoComplete | UsageUpdateEvent | UsageProgressEvent | UsageResponse | ContextCompacted | CompactionCircuitOpenEvent | CompactionCircuitClosedEvent | ConversationErrorEvent | ConversationNoticeEvent | ConversationInfo | ConversationTitleUpdatedEvent | ConversationListResponse | ConversationsClearResponse | ConversationSearchResponse | MessageContentResponse | ConversationListInvalidatedEvent | ScheduleConversationCreated | OpenConversationEvent;
2432
2371
 
2433
2372
  declare type ConversationTitleUpdatedEvent = z.infer<typeof ConversationTitleUpdatedEventSchema>;
2434
2373
 
@@ -2696,7 +2635,7 @@ declare const ErrorEventSchema: z.ZodObject<{
2696
2635
  conversationId: z.ZodOptional<z.ZodString>;
2697
2636
  }, z.core.$strip>;
2698
2637
 
2699
- export declare function extractTextFromStoredMessageContent(raw: string): string;
2638
+ export declare function extractTextFromStoredMessageContent(raw: string | ContentBlock[]): string;
2700
2639
 
2701
2640
  export declare interface FileContent {
2702
2641
  type: "file";
@@ -2919,8 +2858,8 @@ declare interface GuardianDecisionPrompt {
2919
2858
  conversationId: string;
2920
2859
  callSessionId: string | null;
2921
2860
  /**
2922
- * Canonical request kind (e.g. 'tool_approval', 'pending_question').
2923
- * Present when the prompt originates from the canonical guardian request
2861
+ * Guardian request kind (e.g. 'tool_approval', 'pending_question').
2862
+ * Present when the prompt originates from the guardian request
2924
2863
  * store. Absent for legacy-only prompts.
2925
2864
  */
2926
2865
  kind?: string;
@@ -3417,10 +3356,10 @@ declare interface HostFileWriteRequest {
3417
3356
 
3418
3357
  /**
3419
3358
  * Host proxy capabilities that an interface can support. The macOS client
3420
- * supports all five; the chrome-extension interface only supports
3359
+ * supports all of them; the chrome-extension interface only supports
3421
3360
  * host_browser (via the Chrome DevTools Protocol proxy).
3422
3361
  */
3423
- declare type HostProxyCapability = "host_bash" | "host_file" | "host_cu" | "host_browser" | "host_app_control";
3362
+ declare type HostProxyCapability = "host_bash" | "host_file" | "host_cu" | "host_browser" | "host_app_control" | "host_ui_snapshot";
3424
3363
 
3425
3364
  declare interface HostTransferCancelRequest {
3426
3365
  type: "host_transfer_cancel";
@@ -3456,6 +3395,29 @@ declare interface HostTransferToSandboxRequest {
3456
3395
  sourcePath: string;
3457
3396
  }
3458
3397
 
3398
+ declare interface HostUiSnapshotCancelMessage {
3399
+ type: "host_ui_snapshot_cancel";
3400
+ requestId: string;
3401
+ }
3402
+
3403
+ declare interface HostUiSnapshotRequestMessage {
3404
+ type: "host_ui_snapshot_request";
3405
+ requestId: string;
3406
+ view: HostUiSnapshotView;
3407
+ /**
3408
+ * Validated workspace-theme tokens to apply on the stage. The daemon reads
3409
+ * them from ui/theme.json at request time so the capture reflects the
3410
+ * current file even before connected clients refetch. Absent when no valid
3411
+ * theme exists — the stage renders the built-in base theme.
3412
+ */
3413
+ tokens?: Record<string, string>;
3414
+ }
3415
+
3416
+ declare type _HostUiSnapshotServerMessages = HostUiSnapshotRequestMessage | HostUiSnapshotCancelMessage;
3417
+
3418
+ /** Staged compositions the web client can render for capture. */
3419
+ declare type HostUiSnapshotView = "sampler" | "chat";
3420
+
3459
3421
  declare type IdentityChangedEvent = z.infer<typeof IdentityChangedEventSchema>;
3460
3422
 
3461
3423
  declare const IdentityChangedEventSchema: z.ZodObject<{
@@ -3493,7 +3455,7 @@ declare interface ImageEmbeddingInput {
3493
3455
  mimeType: string;
3494
3456
  }
3495
3457
 
3496
- declare type _InboxServerMessages = ContactsInviteResponse | AssistantInboxEscalationResponse;
3458
+ declare type _InboxServerMessages = ContactsInviteResponse;
3497
3459
 
3498
3460
  declare interface IngressConfigResponse {
3499
3461
  type: "ingress_config_response";
@@ -3594,7 +3556,7 @@ declare const InteractionResolvedEventSchema: z.ZodObject<{
3594
3556
  kind: z.ZodString;
3595
3557
  }, z.core.$strip>;
3596
3558
 
3597
- declare const INTERFACE_IDS: readonly ["macos", "ios", "cli", "telegram", "phone", "web", "whatsapp", "slack", "email", "chrome-extension", "a2a"];
3559
+ declare const INTERFACE_IDS: readonly ["macos", "ios", "cli", "telegram", "phone", "web", "whatsapp", "slack", "email", "chrome-extension", "a2a", "route"];
3598
3560
 
3599
3561
  declare type InterfaceId = (typeof INTERFACE_IDS)[number];
3600
3562
 
@@ -3856,8 +3818,8 @@ declare const messageMetadataSchema: z.ZodObject<{
3856
3818
  platform: "platform";
3857
3819
  a2a: "a2a";
3858
3820
  }>>;
3859
- userMessageInterface: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<"telegram" | "phone" | "whatsapp" | "slack" | "email" | "a2a" | "macos" | "ios" | "cli" | "web" | "chrome-extension" | null, string>> & z.ZodType<"telegram" | "phone" | "whatsapp" | "slack" | "email" | "a2a" | "macos" | "ios" | "cli" | "web" | "chrome-extension", string, z.core.$ZodTypeInternals<"telegram" | "phone" | "whatsapp" | "slack" | "email" | "a2a" | "macos" | "ios" | "cli" | "web" | "chrome-extension", string>>>;
3860
- assistantMessageInterface: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<"telegram" | "phone" | "whatsapp" | "slack" | "email" | "a2a" | "macos" | "ios" | "cli" | "web" | "chrome-extension" | null, string>> & z.ZodType<"telegram" | "phone" | "whatsapp" | "slack" | "email" | "a2a" | "macos" | "ios" | "cli" | "web" | "chrome-extension", string, z.core.$ZodTypeInternals<"telegram" | "phone" | "whatsapp" | "slack" | "email" | "a2a" | "macos" | "ios" | "cli" | "web" | "chrome-extension", string>>>;
3821
+ userMessageInterface: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<"telegram" | "phone" | "whatsapp" | "slack" | "email" | "a2a" | "macos" | "ios" | "cli" | "web" | "chrome-extension" | "route" | null, string>> & z.ZodType<"telegram" | "phone" | "whatsapp" | "slack" | "email" | "a2a" | "macos" | "ios" | "cli" | "web" | "chrome-extension" | "route", string, z.core.$ZodTypeInternals<"telegram" | "phone" | "whatsapp" | "slack" | "email" | "a2a" | "macos" | "ios" | "cli" | "web" | "chrome-extension" | "route", string>>>;
3822
+ assistantMessageInterface: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<"telegram" | "phone" | "whatsapp" | "slack" | "email" | "a2a" | "macos" | "ios" | "cli" | "web" | "chrome-extension" | "route" | null, string>> & z.ZodType<"telegram" | "phone" | "whatsapp" | "slack" | "email" | "a2a" | "macos" | "ios" | "cli" | "web" | "chrome-extension" | "route", string, z.core.$ZodTypeInternals<"telegram" | "phone" | "whatsapp" | "slack" | "email" | "a2a" | "macos" | "ios" | "cli" | "web" | "chrome-extension" | "route", string>>>;
3861
3823
  client: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
3862
3824
  subagentNotification: z.ZodOptional<z.ZodObject<{
3863
3825
  subagentId: z.ZodString;
@@ -3882,6 +3844,7 @@ declare const messageMetadataSchema: z.ZodObject<{
3882
3844
  trusted_contact: "trusted_contact";
3883
3845
  unverified_contact: "unverified_contact";
3884
3846
  }>>;
3847
+ model: z.ZodOptional<z.ZodString>;
3885
3848
  provenanceSourceChannel: z.ZodOptional<z.ZodEnum<{
3886
3849
  vellum: "vellum";
3887
3850
  telegram: "telegram";
@@ -3960,8 +3923,13 @@ declare interface MessageRow {
3960
3923
  id: string;
3961
3924
  conversationId: string;
3962
3925
  role: string;
3963
- /** Resolved content — always inline JSON, never a raw `{ ref }`. */
3964
- content: string;
3926
+ /**
3927
+ * Typed content blocks, resolved at the row-fetch chokepoint by
3928
+ * `resolveMessageContentBlocks`: inline JSON parses, file-backed
3929
+ * `{ ref }` rows fold their delta file, and legacy plain strings arrive
3930
+ * wrapped in a single text block.
3931
+ */
3932
+ content: ContentBlock[];
3965
3933
  createdAt: number;
3966
3934
  metadata: string | null;
3967
3935
  clientMessageId: string | null;
@@ -4129,22 +4097,15 @@ declare interface OpenBundleResponse {
4129
4097
  bundleSizeBytes: number;
4130
4098
  }
4131
4099
 
4132
- /**
4133
- * Server push — instructs the client to open and focus a conversation. If
4134
- * the conversation isn't already present in the client's sidebar list (e.g.
4135
- * it was just created via `POST /v1/conversations`), the client should stub
4136
- * a sidebar entry using the provided `title` before navigating.
4137
- */
4138
- declare interface OpenConversation {
4139
- type: "open_conversation";
4140
- conversationId: string;
4141
- /** Optional conversation title; supplied when the client may not yet have the conversation in its list. */
4142
- title?: string;
4143
- /** Optional message ID to scroll to after focus. */
4144
- anchorMessageId?: string;
4145
- /** When `false`, the client should register the conversation in its sidebar (so it's visible and navigable) but must NOT switch focus to it. Omitting the field defaults to `true` for backward compatibility with existing single-target 'jump to conversation' callers. */
4146
- focus?: boolean;
4147
- }
4100
+ declare type OpenConversationEvent = z.infer<typeof OpenConversationEventSchema>;
4101
+
4102
+ declare const OpenConversationEventSchema: z.ZodObject<{
4103
+ type: z.ZodLiteral<"open_conversation">;
4104
+ conversationId: z.ZodString;
4105
+ title: z.ZodOptional<z.ZodString>;
4106
+ anchorMessageId: z.ZodOptional<z.ZodString>;
4107
+ focus: z.ZodOptional<z.ZodBoolean>;
4108
+ }, z.core.$strip>;
4148
4109
 
4149
4110
  declare type OpenPanelEvent = z.infer<typeof OpenPanelEventSchema>;
4150
4111
 
@@ -4868,6 +4829,63 @@ export declare enum RiskLevel {
4868
4829
  */
4869
4830
  declare type RiskLevel_2 = "safe" | "low" | "medium" | "high" | "critical" | "unknown";
4870
4831
 
4832
+ /**
4833
+ * Run a full conversation agent-loop turn: persist the user message, execute
4834
+ * the agent loop (history, tools, compaction, injections), and return the
4835
+ * assistant's full content-block response.
4836
+ *
4837
+ * When `conversationId` is omitted, a new conversation is created and its ID
4838
+ * is returned in the result.
4839
+ *
4840
+ * Events are fanned out to SSE/event-hub subscribers via `broadcastMessage`
4841
+ * (the same path the daemon's HTTP message route uses) while also being
4842
+ * collected internally so the caller receives the final response content.
4843
+ * For streaming use cases, subscribe to the conversation's events via the
4844
+ * host event hub (`assistantEventHub`).
4845
+ *
4846
+ * If the conversation is currently processing another turn, the message is
4847
+ * queued via `enqueueMessage` and the result carries `queued: true` with
4848
+ * empty content -- the queued turn will execute automatically when the
4849
+ * current turn finishes.
4850
+ */
4851
+ export declare function runConversationTurn(options: RunConversationTurnOptions): Promise<RunConversationTurnResult>;
4852
+
4853
+ export declare interface RunConversationTurnOptions {
4854
+ /**
4855
+ * Conversation to run the turn in. If omitted, a new conversation is
4856
+ * created (its ID is generated with `uuidv7` and returned in the result).
4857
+ */
4858
+ conversationId?: string;
4859
+ /**
4860
+ * User message content blocks for this turn. Text blocks become the
4861
+ * user message body; image/file blocks are resolved to inline
4862
+ * attachments. Other block types (tool_use, tool_result, thinking) are
4863
+ * ignored as they are not valid user input.
4864
+ */
4865
+ content: ContentBlock[];
4866
+ /**
4867
+ * LLM call-site for inference profile resolution. Defaults to
4868
+ * `"mainAgent"` inside the agent loop when omitted.
4869
+ */
4870
+ callSite?: LLMCallSite;
4871
+ /**
4872
+ * Abort signal. When aborted, the conversation's internal abort
4873
+ * controller fires, terminating the in-flight agent loop.
4874
+ */
4875
+ signal?: AbortSignal;
4876
+ }
4877
+
4878
+ export declare interface RunConversationTurnResult {
4879
+ /** The assistant's full content blocks for this turn (text, tool_use, etc.). */
4880
+ content: ContentBlock[];
4881
+ /** The user message row ID assigned by the persistence layer. */
4882
+ userMessageId: string;
4883
+ /** The conversation this turn ran in. */
4884
+ conversationId: string;
4885
+ /** True when the message was queued because the conversation was busy. */
4886
+ queued?: boolean;
4887
+ }
4888
+
4871
4889
  /**
4872
4890
  * Emitted when the compaction circuit breaker trips. After three consecutive
4873
4891
  * summary-LLM failures (with local fallback covering each), auto-compaction is
@@ -5005,7 +5023,8 @@ export declare interface SendMessageConfig {
5005
5023
  * LLM call-site identifier. `RetryProvider` resolves
5006
5024
  * provider/model/maxTokens/effort/speed/verbosity/temperature/thinking/
5007
5025
  * contextWindow via `resolveCallSiteConfig(callSite, config.llm)`, falling
5008
- * back to `llm.default` when no callSite-specific entry is present.
5026
+ * back to the shipped call-site defaults when no callSite-specific entry
5027
+ * is present.
5009
5028
  */
5010
5029
  callSite?: LLMCallSite;
5011
5030
  /**
@@ -5036,6 +5055,18 @@ export declare interface SendMessageConfig {
5036
5055
  * stripped before any provider wire request.
5037
5056
  */
5038
5057
  selectionSeed?: string;
5058
+ /**
5059
+ * Per-conversation prompt-cache key for providers with explicit prompt
5060
+ * caching (sent as the OpenAI `prompt_cache_key` request param). Set by
5061
+ * `RetryProvider` from `selectionSeed` (the durable conversation id) for
5062
+ * the `openai` and `openrouter` providers — GPT-5.6+ requires the key for
5063
+ * reliable breakpoint matching, and OpenAI's ~15 req/min-per-key routing
5064
+ * guidance is satisfied by per-conversation ids. A non-wire field for
5065
+ * every other provider client (the Anthropic client strips it, covering
5066
+ * OpenRouter's `anthropic/*` delegation); the request param is omitted
5067
+ * when absent.
5068
+ */
5069
+ promptCacheKey?: string;
5039
5070
  /**
5040
5071
  * Internal per-request HTTP headers for managed-proxy usage attribution.
5041
5072
  * Provider clients may pass these through SDK request options only when the
@@ -5097,7 +5128,7 @@ declare interface SensitiveOutputBinding {
5097
5128
 
5098
5129
  declare type SensitiveOutputKind = "invite_code";
5099
5130
 
5100
- declare type ServerMessage = _ConversationsServerMessages | _MessagesServerMessages | _SurfacesServerMessages | _SkillsServerMessages | _AppsServerMessages | _IntegrationsServerMessages | _ComputerUseServerMessages | _ContactsServerMessages | _WorkItemsServerMessages | _SubagentsServerMessages | _DocumentsServerMessages | _DocumentCommentsServerMessages | _GuardianActionsServerMessages | _SyncInvalidationServerMessages | _HomeServerMessages | _HostAppControlServerMessages | _HostBashServerMessages | _HostBrowserServerMessages | _HostCuServerMessages | _HostFileServerMessages | _HostTransferServerMessages | _MemoryServerMessages | _WorkspaceServerMessages | _SchedulesServerMessages | _SettingsServerMessages | _DiagnosticsServerMessages | _InboxServerMessages | _NotificationsServerMessages | _UpgradesServerMessages | _AcpServerMessages | _BackgroundToolsServerMessages | _BookmarksServerMessages | _WorkflowsServerMessages | DiskPressureStatusChangedEvent | HookEvent | SubagentEvent;
5131
+ declare type ServerMessage = _ConversationsServerMessages | _MessagesServerMessages | _SurfacesServerMessages | _SkillsServerMessages | _AppsServerMessages | _IntegrationsServerMessages | _ComputerUseServerMessages | _ContactsServerMessages | _SubagentsServerMessages | _DocumentsServerMessages | _DocumentCommentsServerMessages | _GuardianActionsServerMessages | _SyncInvalidationServerMessages | _HomeServerMessages | _HostAppControlServerMessages | _HostBashServerMessages | _HostBrowserServerMessages | _HostCuServerMessages | _HostFileServerMessages | _HostTransferServerMessages | _HostUiSnapshotServerMessages | _MemoryServerMessages | _WorkspaceServerMessages | _SchedulesServerMessages | _SettingsServerMessages | _DiagnosticsServerMessages | _InboxServerMessages | _NotificationsServerMessages | _UpgradesServerMessages | _AcpServerMessages | _BackgroundToolsServerMessages | _BookmarksServerMessages | _WorkflowsServerMessages | DiskPressureStatusChangedEvent | HookEvent | SubagentEvent;
5101
5132
 
5102
5133
  export declare interface ServerToolUseContent {
5103
5134
  type: "server_tool_use";
@@ -5427,7 +5458,7 @@ declare interface StopInputContext {
5427
5458
  * Parse failures fall back to returning the raw input trimmed (the
5428
5459
  * legacy-string path).
5429
5460
  */
5430
- export declare function stringifyMessageContent(stored: string): string;
5461
+ export declare function stringifyMessageContent(stored: string | ContentBlock[]): string;
5431
5462
 
5432
5463
  declare interface SubagentDetailResponse {
5433
5464
  type: "subagent_detail_response";
@@ -5518,6 +5549,29 @@ declare type _SyncInvalidationServerMessages = SyncChangedEvent;
5518
5549
  /** Re-sync one persisted message into the conversation's disk view. */
5519
5550
  export declare function syncMessageToDisk(conversationId: string, messageId: string, createdAtMs: number): Promise<void>;
5520
5551
 
5552
+ /**
5553
+ * Synthesize text to audio using the globally configured TTS provider.
5554
+ *
5555
+ * 1. Resolves the active provider and its config via `tts-config-resolver`.
5556
+ * 2. Looks up the provider adapter in the registry.
5557
+ * 3. Delegates to the adapter's `synthesize` method.
5558
+ *
5559
+ * Throws {@link TtsSynthesisError} when the provider is not registered
5560
+ * or synthesis fails.
5561
+ */
5562
+ export declare function synthesizeText(options: SynthesizeTextOptions): Promise<TtsSynthesisResult>;
5563
+
5564
+ export declare interface SynthesizeTextOptions {
5565
+ /** Text to speak. Sanitized internally — callers can pass raw model output. */
5566
+ text: string;
5567
+ /** Product surface requesting synthesis. */
5568
+ useCase: TtsUseCase;
5569
+ /** Optional voice override (provider-specific identifier). */
5570
+ voiceId?: string;
5571
+ /** Optional abort signal. */
5572
+ signal?: AbortSignal;
5573
+ }
5574
+
5521
5575
  declare interface TableCellValue {
5522
5576
  text: string;
5523
5577
  icon?: string;
@@ -5544,19 +5598,6 @@ declare interface TableSurfaceData {
5544
5598
  caption?: string;
5545
5599
  }
5546
5600
 
5547
- /** Server push — broadcast when a task run creates a conversation. */
5548
- declare interface TaskRunConversationCreated {
5549
- type: "task_run_conversation_created";
5550
- conversationId: string;
5551
- workItemId: string;
5552
- title: string;
5553
- }
5554
-
5555
- /** Server push — lightweight invalidation signal: the task queue has been mutated, refetch your list. */
5556
- declare interface TasksChanged {
5557
- type: "tasks_changed";
5558
- }
5559
-
5560
5601
  declare interface TelegramConfigResponse {
5561
5602
  type: "telegram_config_response";
5562
5603
  success: boolean;
@@ -6205,6 +6246,31 @@ declare const trustClassSchema: z.ZodEnum<{
6205
6246
  unverified_contact: "unverified_contact";
6206
6247
  }>;
6207
6248
 
6249
+ export declare class TtsSynthesisError extends Error {
6250
+ readonly code: TtsSynthesisErrorCode;
6251
+ constructor(code: TtsSynthesisErrorCode, message: string);
6252
+ }
6253
+
6254
+ declare type TtsSynthesisErrorCode = "TTS_PROVIDER_NOT_CONFIGURED" | "TTS_SYNTHESIS_FAILED";
6255
+
6256
+ /** Output of a completed TTS synthesis call. */
6257
+ export declare interface TtsSynthesisResult {
6258
+ /** Complete audio buffer. */
6259
+ audio: Buffer;
6260
+ /** MIME type of the returned audio (e.g. `"audio/mpeg"`, `"audio/wav"`). */
6261
+ contentType: string;
6262
+ }
6263
+
6264
+ /**
6265
+ * Describes the product surface that is requesting synthesis so providers
6266
+ * can tailor format, latency, and quality trade-offs.
6267
+ */
6268
+ declare type TtsUseCase =
6269
+ /** Real-time phone call — prioritize low latency and streaming. */
6270
+ "phone-call"
6271
+ /** In-app message playback — buffer-oriented, higher quality acceptable. */
6272
+ | "message-playback";
6273
+
6208
6274
  declare interface UiSurfaceComplete {
6209
6275
  type: "ui_surface_complete";
6210
6276
  conversationId: string;
@@ -6726,144 +6792,6 @@ declare interface WorkflowStarted {
6726
6792
  label?: string;
6727
6793
  }
6728
6794
 
6729
- declare interface WorkItemApprovePermissionsResponse {
6730
- type: "work_item_approve_permissions_response";
6731
- id: string;
6732
- success: boolean;
6733
- error?: string;
6734
- }
6735
-
6736
- declare interface WorkItemCancelResponse {
6737
- type: "work_item_cancel_response";
6738
- id: string;
6739
- success: boolean;
6740
- error?: string;
6741
- }
6742
-
6743
- declare interface WorkItemDeleteResponse {
6744
- type: "work_item_delete_response";
6745
- id: string;
6746
- success: boolean;
6747
- }
6748
-
6749
- declare interface WorkItemGetResponse {
6750
- type: "work_item_get_response";
6751
- item: {
6752
- id: string;
6753
- taskId: string;
6754
- title: string;
6755
- notes: string | null;
6756
- status: string;
6757
- priorityTier: number;
6758
- sortIndex: number | null;
6759
- lastRunId: string | null;
6760
- lastRunConversationId: string | null;
6761
- lastRunStatus: string | null;
6762
- sourceType: string | null;
6763
- sourceId: string | null;
6764
- createdAt: number;
6765
- updatedAt: number;
6766
- } | null;
6767
- }
6768
-
6769
- declare interface WorkItemOutputResponse {
6770
- type: "work_item_output_response";
6771
- id: string;
6772
- success: boolean;
6773
- error?: string;
6774
- output?: {
6775
- title: string;
6776
- status: string;
6777
- runId: string | null;
6778
- conversationId: string | null;
6779
- completedAt: number | null;
6780
- summary: string;
6781
- highlights: string[];
6782
- };
6783
- }
6784
-
6785
- declare interface WorkItemPreflightResponse {
6786
- type: "work_item_preflight_response";
6787
- id: string;
6788
- success: boolean;
6789
- error?: string;
6790
- permissions?: {
6791
- tool: string;
6792
- description: string;
6793
- riskLevel: "low" | "medium" | "high";
6794
- currentDecision: "allow" | "deny" | "prompt";
6795
- }[];
6796
- }
6797
-
6798
- declare type WorkItemRunTaskErrorCode = "not_found" | "already_running" | "invalid_status" | "no_task" | "permission_required";
6799
-
6800
- declare interface WorkItemRunTaskResponse {
6801
- type: "work_item_run_task_response";
6802
- id: string;
6803
- lastRunId: string;
6804
- success: boolean;
6805
- error?: string;
6806
- /** Structured error code so the client can deterministically re-enable buttons or show contextual UI. */
6807
- errorCode?: WorkItemRunTaskErrorCode;
6808
- }
6809
-
6810
- declare interface WorkItemsListResponse {
6811
- type: "work_items_list_response";
6812
- items: Array<{
6813
- id: string;
6814
- taskId: string;
6815
- title: string;
6816
- notes: string | null;
6817
- status: string;
6818
- priorityTier: number;
6819
- sortIndex: number | null;
6820
- lastRunId: string | null;
6821
- lastRunConversationId: string | null;
6822
- lastRunStatus: string | null;
6823
- sourceType: string | null;
6824
- sourceId: string | null;
6825
- createdAt: number;
6826
- updatedAt: number;
6827
- }>;
6828
- }
6829
-
6830
- declare type _WorkItemsServerMessages = WorkItemsListResponse | WorkItemGetResponse | WorkItemUpdateResponse | WorkItemDeleteResponse | WorkItemRunTaskResponse | WorkItemOutputResponse | WorkItemPreflightResponse | WorkItemApprovePermissionsResponse | WorkItemCancelResponse | WorkItemStatusChanged | TaskRunConversationCreated | TasksChanged;
6831
-
6832
- /** Server push — broadcast when a work item status changes (e.g. running -> awaiting_review). */
6833
- declare interface WorkItemStatusChanged {
6834
- type: "work_item_status_changed";
6835
- item: {
6836
- id: string;
6837
- taskId: string;
6838
- title: string;
6839
- status: string;
6840
- lastRunId: string | null;
6841
- lastRunConversationId: string | null;
6842
- lastRunStatus: string | null;
6843
- updatedAt: number;
6844
- };
6845
- }
6846
-
6847
- declare interface WorkItemUpdateResponse {
6848
- type: "work_item_update_response";
6849
- item: {
6850
- id: string;
6851
- taskId: string;
6852
- title: string;
6853
- notes: string | null;
6854
- status: string;
6855
- priorityTier: number;
6856
- sortIndex: number | null;
6857
- lastRunId: string | null;
6858
- lastRunConversationId: string | null;
6859
- lastRunStatus: string | null;
6860
- sourceType: string | null;
6861
- sourceId: string | null;
6862
- createdAt: number;
6863
- updatedAt: number;
6864
- } | null;
6865
- }
6866
-
6867
6795
  declare interface WorkResultDiff {
6868
6796
  label?: string;
6869
6797
  before?: string;
package/index.js CHANGED
@@ -3,6 +3,7 @@ const api = globalThis[Symbol.for("vellum.plugin-api")] ?? {};
3
3
  export const CLI_COMMAND_HELP = api.CLI_COMMAND_HELP;
4
4
  export const HOOKS = api.HOOKS;
5
5
  export const RiskLevel = api.RiskLevel;
6
+ export const TtsSynthesisError = api.TtsSynthesisError;
6
7
  export const addMessage = api.addMessage;
7
8
  export const assistantEventHub = api.assistantEventHub;
8
9
  export const buildMessageExcerpt = api.buildMessageExcerpt;
@@ -25,8 +26,10 @@ export const listInstalledSkills = api.listInstalledSkills;
25
26
  export const parseMessageMetadata = api.parseMessageMetadata;
26
27
  export const resolveMediaSourceData = api.resolveMediaSourceData;
27
28
  export const resolveUserName = api.resolveUserName;
29
+ export const runConversationTurn = api.runConversationTurn;
28
30
  export const searchMessageIdsLexical = api.searchMessageIdsLexical;
29
31
  export const selectedBackendSupportsMultimodal = api.selectedBackendSupportsMultimodal;
30
32
  export const stringifyMessageContent = api.stringifyMessageContent;
31
33
  export const syncMessageToDisk = api.syncMessageToDisk;
34
+ export const synthesizeText = api.synthesizeText;
32
35
  export const updateMessageMetadata = api.updateMessageMetadata;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vellumai/plugin-api",
3
- "version": "0.10.8",
3
+ "version": "0.10.9-dev.202607152225.ec6fdbf",
4
4
  "description": "Public TypeScript authoring contract for Vellum assistant plugins.",
5
5
  "license": "MIT",
6
6
  "type": "module",