@vellumai/plugin-api 0.11.1 → 0.11.2-staging.2

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 (2) hide show
  1. package/index.d.ts +94 -2
  2. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -487,6 +487,7 @@ declare const AssistantConfigSchema: z.ZodObject<{
487
487
  timeThresholdMs: z.ZodDefault<z.ZodNumber>;
488
488
  messageThreshold: z.ZodDefault<z.ZodNumber>;
489
489
  minCooldownMs: z.ZodDefault<z.ZodNumber>;
490
+ requireUserActivity: z.ZodDefault<z.ZodBoolean>;
490
491
  sweepIntervalMs: z.ZodDefault<z.ZodNumber>;
491
492
  sweepLookbackMs: z.ZodDefault<z.ZodNumber>;
492
493
  keepSupersededRuns: z.ZodDefault<z.ZodBoolean>;
@@ -499,6 +500,9 @@ declare const AssistantConfigSchema: z.ZodObject<{
499
500
  ringBufferSize: z.ZodDefault<z.ZodNumber>;
500
501
  highMemThresholdRatio: z.ZodDefault<z.ZodNumber>;
501
502
  snapshotCooldownMs: z.ZodDefault<z.ZodNumber>;
503
+ fdPollIntervalMs: z.ZodDefault<z.ZodNumber>;
504
+ highFdThresholdRatio: z.ZodDefault<z.ZodNumber>;
505
+ fdWarnCooldownMs: z.ZodDefault<z.ZodNumber>;
502
506
  pluginSourceScanIntervalMs: z.ZodDefault<z.ZodNumber>;
503
507
  baselineSnapshotIntervalMs: z.ZodDefault<z.ZodNumber>;
504
508
  }, z.core.$strip>>;
@@ -944,6 +948,9 @@ declare const AssistantConfigSchema: z.ZodObject<{
944
948
  failureBackoffBaseMs: z.ZodDefault<z.ZodNumber>;
945
949
  failureBackoffMaxMs: z.ZodDefault<z.ZodNumber>;
946
950
  maxFileSizeBytes: z.ZodDefault<z.ZodNumber>;
951
+ historyCompaction: z.ZodDefault<z.ZodObject<{
952
+ enabled: z.ZodDefault<z.ZodBoolean>;
953
+ }, z.core.$strip>>;
947
954
  interactiveGitTimeoutMs: z.ZodDefault<z.ZodNumber>;
948
955
  enrichmentQueueSize: z.ZodDefault<z.ZodNumber>;
949
956
  enrichmentConcurrency: z.ZodDefault<z.ZodNumber>;
@@ -1434,6 +1441,11 @@ declare const AssistantEventEnvelopeSchema: z.ZodObject<{
1434
1441
  summaryCharCount: z.ZodOptional<z.ZodNumber>;
1435
1442
  summaryHeaderCount: z.ZodOptional<z.ZodNumber>;
1436
1443
  summaryHadMemoryEcho: z.ZodOptional<z.ZodBoolean>;
1444
+ }, z.core.$strip>, z.ZodObject<{
1445
+ type: z.ZodLiteral<"context_window_usage">;
1446
+ conversationId: z.ZodString;
1447
+ tokens: z.ZodNumber;
1448
+ maxTokens: z.ZodNumber;
1437
1449
  }, z.core.$strip>, z.ZodObject<{
1438
1450
  type: z.ZodLiteral<"conversation_error">;
1439
1451
  conversationId: z.ZodString;
@@ -1967,9 +1979,15 @@ declare const AssistantEventEnvelopeSchema: z.ZodObject<{
1967
1979
  title: z.ZodString;
1968
1980
  body: z.ZodString;
1969
1981
  deliveryId: z.ZodOptional<z.ZodString>;
1982
+ correlationId: z.ZodOptional<z.ZodString>;
1970
1983
  deepLinkMetadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1971
1984
  targetGuardianPrincipalId: z.ZodOptional<z.ZodString>;
1972
1985
  silent: z.ZodOptional<z.ZodBoolean>;
1986
+ remotePushDispatched: z.ZodOptional<z.ZodBoolean>;
1987
+ remotePushPlatforms: z.ZodOptional<z.ZodArray<z.ZodEnum<{
1988
+ ios: "ios";
1989
+ android: "android";
1990
+ }>>>;
1973
1991
  }, z.core.$strip>, z.ZodObject<{
1974
1992
  type: z.ZodLiteral<"oauth_connect_result">;
1975
1993
  success: z.ZodBoolean;
@@ -2268,6 +2286,12 @@ declare const AssistantEventEnvelopeSchema: z.ZodObject<{
2268
2286
  type: z.ZodLiteral<"ui_surface_dismiss">;
2269
2287
  conversationId: z.ZodString;
2270
2288
  surfaceId: z.ZodString;
2289
+ }, z.core.$strip>, z.ZodObject<{
2290
+ type: z.ZodLiteral<"ui_surface_pending">;
2291
+ conversationId: z.ZodString;
2292
+ surfaceType: z.ZodLiteral<"visual">;
2293
+ toolUseId: z.ZodString;
2294
+ messageId: z.ZodOptional<z.ZodString>;
2271
2295
  }, z.core.$strip>, z.ZodObject<{
2272
2296
  type: z.ZodLiteral<"ui_surface_show">;
2273
2297
  conversationId: z.ZodString;
@@ -2805,6 +2829,11 @@ declare const AssistantEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
2805
2829
  summaryCharCount: z.ZodOptional<z.ZodNumber>;
2806
2830
  summaryHeaderCount: z.ZodOptional<z.ZodNumber>;
2807
2831
  summaryHadMemoryEcho: z.ZodOptional<z.ZodBoolean>;
2832
+ }, z.core.$strip>, z.ZodObject<{
2833
+ type: z.ZodLiteral<"context_window_usage">;
2834
+ conversationId: z.ZodString;
2835
+ tokens: z.ZodNumber;
2836
+ maxTokens: z.ZodNumber;
2808
2837
  }, z.core.$strip>, z.ZodObject<{
2809
2838
  type: z.ZodLiteral<"conversation_error">;
2810
2839
  conversationId: z.ZodString;
@@ -3338,9 +3367,15 @@ declare const AssistantEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
3338
3367
  title: z.ZodString;
3339
3368
  body: z.ZodString;
3340
3369
  deliveryId: z.ZodOptional<z.ZodString>;
3370
+ correlationId: z.ZodOptional<z.ZodString>;
3341
3371
  deepLinkMetadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
3342
3372
  targetGuardianPrincipalId: z.ZodOptional<z.ZodString>;
3343
3373
  silent: z.ZodOptional<z.ZodBoolean>;
3374
+ remotePushDispatched: z.ZodOptional<z.ZodBoolean>;
3375
+ remotePushPlatforms: z.ZodOptional<z.ZodArray<z.ZodEnum<{
3376
+ ios: "ios";
3377
+ android: "android";
3378
+ }>>>;
3344
3379
  }, z.core.$strip>, z.ZodObject<{
3345
3380
  type: z.ZodLiteral<"oauth_connect_result">;
3346
3381
  success: z.ZodBoolean;
@@ -3639,6 +3674,12 @@ declare const AssistantEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
3639
3674
  type: z.ZodLiteral<"ui_surface_dismiss">;
3640
3675
  conversationId: z.ZodString;
3641
3676
  surfaceId: z.ZodString;
3677
+ }, z.core.$strip>, z.ZodObject<{
3678
+ type: z.ZodLiteral<"ui_surface_pending">;
3679
+ conversationId: z.ZodString;
3680
+ surfaceType: z.ZodLiteral<"visual">;
3681
+ toolUseId: z.ZodString;
3682
+ messageId: z.ZodOptional<z.ZodString>;
3642
3683
  }, z.core.$strip>, z.ZodObject<{
3643
3684
  type: z.ZodLiteral<"ui_surface_show">;
3644
3685
  conversationId: z.ZodString;
@@ -4482,10 +4523,42 @@ export declare function listConversations(limit?: number, conversationType?: Con
4482
4523
  */
4483
4524
  export declare function listInstalledSkills(): Promise<ResolvedSkillEntry[]>;
4484
4525
 
4485
- declare const _LIVE_VOICE_SERVER_FRAME_TYPES: readonly ["ready", "busy", "speech_started", "utterance_end", "utterance_discarded", "stt_partial", "stt_final", "thinking", "assistant_text_delta", "tts_audio", "tts_done", "turn_cancelled", "minimize_room", "metrics", "archived", "error"];
4526
+ declare const _LIVE_VOICE_SERVER_FRAME_TYPES: readonly ["ready", "busy", "speech_started", "utterance_end", "utterance_discarded", "stt_partial", "stt_final", "thinking", "activity", "assistant_text_delta", "tts_audio", "tts_done", "turn_cancelled", "minimize_room", "metrics", "archived", "error"];
4486
4527
 
4487
4528
  declare const LIVE_VOICE_TURN_DETECTION_MODES: readonly ["manual", "server_vad"];
4488
4529
 
4530
+ /**
4531
+ * What the assistant is doing inside a turn, as one short user-facing line.
4532
+ *
4533
+ * Exists because a live-voice turn can go silent for a long time while it
4534
+ * works, and the surfaces that show the session (the iOS Live Activity, and
4535
+ * the room) can otherwise only say "Thinking...". The label is composed here
4536
+ * rather than by each surface for the same reason phase wording is composed
4537
+ * once: the Live Activity has two independent drivers (this socket and an APNs
4538
+ * push the daemon dispatches), they must carry identical content, and the only
4539
+ * way to guarantee that is for both to be handed the same string.
4540
+ *
4541
+ * An empty `label` means "no current activity", which is what a turn's end
4542
+ * sends. Emitted only on change, never per tool result.
4543
+ */
4544
+ declare interface LiveVoiceActivityServerFrame extends LiveVoiceServerFrameBase {
4545
+ readonly type: "activity";
4546
+ readonly turnId: string;
4547
+ readonly label: string;
4548
+ /**
4549
+ * The confirmation this turn is blocked on, when the label describes a wait
4550
+ * rather than work in flight. Absent otherwise.
4551
+ *
4552
+ * It travels so that a surface outside the app — the Live Activity's
4553
+ * Approve/Deny buttons — can answer the request it was drawn against rather
4554
+ * than whatever is pending by the time the press lands. Content on a Lock
4555
+ * Screen can be seconds old, and a decision is the one thing that must not
4556
+ * be re-pointed when it is: the id lets a client drop a press aimed at a
4557
+ * request already answered, timed out, or superseded.
4558
+ */
4559
+ readonly approvalRequestId?: string;
4560
+ }
4561
+
4489
4562
  declare interface LiveVoiceArchivedServerFrame extends LiveVoiceServerFrameBase {
4490
4563
  readonly type: "archived";
4491
4564
  readonly conversationId: string;
@@ -4621,7 +4694,7 @@ declare interface LiveVoiceReadyServerFrame extends LiveVoiceServerFrameBase {
4621
4694
  readonly turnDetection?: LiveVoiceTurnDetectionMode;
4622
4695
  }
4623
4696
 
4624
- export declare type LiveVoiceServerFrame = LiveVoiceReadyServerFrame | LiveVoiceBusyServerFrame | LiveVoiceSpeechStartedServerFrame | LiveVoiceUtteranceEndServerFrame | LiveVoiceUtteranceDiscardedServerFrame | LiveVoiceSttPartialServerFrame | LiveVoiceSttFinalServerFrame | LiveVoiceThinkingServerFrame | LiveVoiceAssistantTextDeltaServerFrame | LiveVoiceTtsAudioServerFrame | LiveVoiceTtsDoneServerFrame | LiveVoiceTurnCancelledServerFrame | LiveVoiceMinimizeRoomServerFrame | LiveVoiceMetricsServerFrame | LiveVoiceArchivedServerFrame | LiveVoiceErrorServerFrame;
4697
+ export declare type LiveVoiceServerFrame = LiveVoiceReadyServerFrame | LiveVoiceBusyServerFrame | LiveVoiceSpeechStartedServerFrame | LiveVoiceUtteranceEndServerFrame | LiveVoiceUtteranceDiscardedServerFrame | LiveVoiceSttPartialServerFrame | LiveVoiceSttFinalServerFrame | LiveVoiceThinkingServerFrame | LiveVoiceActivityServerFrame | LiveVoiceAssistantTextDeltaServerFrame | LiveVoiceTtsAudioServerFrame | LiveVoiceTtsDoneServerFrame | LiveVoiceTurnCancelledServerFrame | LiveVoiceMinimizeRoomServerFrame | LiveVoiceMetricsServerFrame | LiveVoiceArchivedServerFrame | LiveVoiceErrorServerFrame;
4625
4698
 
4626
4699
  declare interface LiveVoiceServerFrameBase {
4627
4700
  readonly type: LiveVoiceServerFrameType;
@@ -4849,7 +4922,10 @@ declare const messageMetadataSchema: z.ZodObject<{
4849
4922
  provenanceRequesterIdentifier: z.ZodOptional<z.ZodString>;
4850
4923
  automated: z.ZodOptional<z.ZodBoolean>;
4851
4924
  hidden: z.ZodOptional<z.ZodBoolean>;
4925
+ voiceSessionTurn: z.ZodOptional<z.ZodBoolean>;
4852
4926
  messageKind: z.ZodOptional<z.ZodString>;
4927
+ providerErrorCode: z.ZodOptional<z.ZodString>;
4928
+ providerErrorCategory: z.ZodOptional<z.ZodString>;
4853
4929
  backgroundToolCompletion: z.ZodOptional<z.ZodObject<{
4854
4930
  id: z.ZodString;
4855
4931
  toolName: z.ZodString;
@@ -5313,6 +5389,8 @@ declare interface ProcessEntry extends BaseSubscriberEntry {
5313
5389
 
5314
5390
  export declare interface Provider {
5315
5391
  name: string;
5392
+ /** Connection route whose credentials this provider instance uses. */
5393
+ routeAttribution?: ProviderRouteAttribution;
5316
5394
  /**
5317
5395
  * Provider key used by the local token estimator to select model-family
5318
5396
  * specific rules (e.g. Anthropic's `width * height / 750` image sizing).
@@ -5366,6 +5444,8 @@ export declare interface Provider {
5366
5444
  countInputTokens?(messages: Message[], systemPrompt: string, tools?: ToolDefinition_2[]): Promise<number>;
5367
5445
  }
5368
5446
 
5447
+ declare type ProviderCredentialSource = "byok" | "no-auth" | "oauth-subscription" | "vellum-managed";
5448
+
5369
5449
  export declare type ProviderEvent = {
5370
5450
  type: "text_delta";
5371
5451
  text: string;
@@ -5436,6 +5516,18 @@ export declare interface ProviderResponse {
5436
5516
  rawResponse?: unknown;
5437
5517
  }
5438
5518
 
5519
+ declare interface ProviderRouteAttribution {
5520
+ connectionName?: string;
5521
+ profileName?: string;
5522
+ isManagedRoute?: boolean;
5523
+ /**
5524
+ * Credential surface used for this request. Finer than `isManagedRoute`:
5525
+ * it separates personal provider keys, keyless endpoints, and subscription
5526
+ * logins from each other so error copy can name what the user must fix.
5527
+ */
5528
+ credentialSource?: ProviderCredentialSource;
5529
+ }
5530
+
5439
5531
  /** Callback for proxy policy decisions requiring user confirmation. Returns true if approved. */
5440
5532
  declare type ProxyApprovalCallback = (request: ProxyApprovalRequest) => Promise<boolean>;
5441
5533
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vellumai/plugin-api",
3
- "version": "0.11.1",
3
+ "version": "0.11.2-staging.2",
4
4
  "description": "Public TypeScript authoring contract for Vellum assistant plugins.",
5
5
  "license": "MIT",
6
6
  "type": "module",