@vellumai/plugin-api 0.10.11-dev.202607231953.b64451d → 0.10.11-dev.202607232029.2295f95

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 +109 -187
  2. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -1487,11 +1487,13 @@ export declare interface AssistantEventSubscription {
1487
1487
  readonly connectionId: string;
1488
1488
  }
1489
1489
 
1490
- declare interface AssistantStatusMessage {
1491
- type: "assistant_status";
1492
- version?: string;
1493
- keyFingerprint?: string;
1494
- }
1490
+ declare type AssistantStatusEvent = z.infer<typeof AssistantStatusEventSchema>;
1491
+
1492
+ declare const AssistantStatusEventSchema: z.ZodObject<{
1493
+ type: z.ZodLiteral<"assistant_status">;
1494
+ version: z.ZodOptional<z.ZodString>;
1495
+ keyFingerprint: z.ZodOptional<z.ZodString>;
1496
+ }, z.core.$strip>;
1495
1497
 
1496
1498
  declare type AssistantTextDeltaEvent = z.infer<typeof AssistantTextDeltaEventSchema>;
1497
1499
 
@@ -1526,12 +1528,6 @@ declare interface AudioEmbeddingInput {
1526
1528
  mimeType: string;
1527
1529
  }
1528
1530
 
1529
- declare interface AuthResult {
1530
- type: "auth_result";
1531
- success: boolean;
1532
- message?: string;
1533
- }
1534
-
1535
1531
  declare type AvatarUpdatedEvent = z.infer<typeof AvatarUpdatedEventSchema>;
1536
1532
 
1537
1533
  declare const AvatarUpdatedEventSchema: z.ZodObject<{
@@ -2008,25 +2004,30 @@ declare const ConfirmationRequestEventSchema: z.ZodObject<{
2008
2004
  }, z.core.$strip>>>;
2009
2005
  }, z.core.$strip>;
2010
2006
 
2011
- /**
2012
- * Authoritative per-request confirmation state transition emitted by the daemon.
2013
- *
2014
- * The client must use this event (not local phrase inference) to update
2015
- * confirmation bubble state.
2016
- */
2017
- declare interface ConfirmationStateChanged {
2018
- type: "confirmation_state_changed";
2019
- conversationId: string;
2020
- requestId: string;
2021
- state: "pending" | "approved" | "denied" | "timed_out" | "resolved_stale";
2022
- source: "button" | "inline_nl" | "auto_deny" | "timeout" | "system";
2023
- /** requestId of the user message that triggered this transition. */
2024
- causedByRequestId?: string;
2025
- /** Normalized user text for analytics/debug (e.g. "approve", "deny"). */
2026
- decisionText?: string;
2027
- /** The tool_use block ID this confirmation applies to, for disambiguating parallel tool calls. */
2028
- toolUseId?: string;
2029
- }
2007
+ declare type ConfirmationStateChangedEvent = z.infer<typeof ConfirmationStateChangedEventSchema>;
2008
+
2009
+ declare const ConfirmationStateChangedEventSchema: z.ZodObject<{
2010
+ type: z.ZodLiteral<"confirmation_state_changed">;
2011
+ conversationId: z.ZodString;
2012
+ requestId: z.ZodString;
2013
+ state: z.ZodEnum<{
2014
+ timed_out: "timed_out";
2015
+ pending: "pending";
2016
+ approved: "approved";
2017
+ denied: "denied";
2018
+ resolved_stale: "resolved_stale";
2019
+ }>;
2020
+ source: z.ZodEnum<{
2021
+ button: "button";
2022
+ inline_nl: "inline_nl";
2023
+ auto_deny: "auto_deny";
2024
+ timeout: "timeout";
2025
+ system: "system";
2026
+ }>;
2027
+ causedByRequestId: z.ZodOptional<z.ZodString>;
2028
+ decisionText: z.ZodOptional<z.ZodString>;
2029
+ toolUseId: z.ZodOptional<z.ZodString>;
2030
+ }, z.core.$strip>;
2030
2031
 
2031
2032
  declare type ConfirmationSurfaceData = z.infer<typeof ConfirmationSurfaceDataSchema>;
2032
2033
 
@@ -2061,42 +2062,24 @@ declare type _ContactsServerMessages = ContactsChangedEvent | ContactRequestEven
2061
2062
 
2062
2063
  export declare type ContentBlock = TextContent | ThinkingContent | RedactedThinkingContent | ImageContent | FileContent | ToolUseContent | ToolResultContent | ServerToolUseContent | WebSearchToolResultContent;
2063
2064
 
2064
- /**
2065
- * Emitted after a compaction turn completes (both auto-compaction and
2066
- * `/compact`). Carries the fresh `estimatedInputTokens` so clients can refresh
2067
- * the context-window indicator without waiting for the next `usage_update`.
2068
- *
2069
- * Scoped per-conversation — see `CompactionCircuitOpenEvent` doc for why.
2070
- */
2071
- declare interface ContextCompacted {
2072
- type: "context_compacted";
2073
- conversationId: string;
2074
- previousEstimatedInputTokens: number;
2075
- estimatedInputTokens: number;
2076
- maxInputTokens: number;
2077
- thresholdTokens: number;
2078
- compactedMessages: number;
2079
- summaryCalls: number;
2080
- summaryInputTokens: number;
2081
- summaryOutputTokens: number;
2082
- summaryModel: string;
2083
- /**
2084
- * Quality signals for the generated summary. Emitted for every
2085
- * compaction (including truncation-only paths where the summary text
2086
- * is unchanged from the prior pass). Consumers can use these to detect
2087
- * regressions without needing to read the summary text itself.
2088
- *
2089
- * - `summaryCharCount`: length of the produced summary text.
2090
- * - `summaryHeaderCount`: number of `## ` section headers in the summary.
2091
- * - `summaryHadMemoryEcho`: `true` if the summary contains any runtime
2092
- * injection tag (e.g. `<memory`, `<turn_context>`, `<workspace>`). The
2093
- * durable summary should be clean prose, so `true` flags an echoed or
2094
- * invented tag worth investigating.
2095
- */
2096
- summaryCharCount?: number;
2097
- summaryHeaderCount?: number;
2098
- summaryHadMemoryEcho?: boolean;
2099
- }
2065
+ declare type ContextCompactedEvent = z.infer<typeof ContextCompactedEventSchema>;
2066
+
2067
+ declare const ContextCompactedEventSchema: z.ZodObject<{
2068
+ type: z.ZodLiteral<"context_compacted">;
2069
+ conversationId: z.ZodString;
2070
+ previousEstimatedInputTokens: z.ZodNumber;
2071
+ estimatedInputTokens: z.ZodNumber;
2072
+ maxInputTokens: z.ZodNumber;
2073
+ thresholdTokens: z.ZodNumber;
2074
+ compactedMessages: z.ZodNumber;
2075
+ summaryCalls: z.ZodNumber;
2076
+ summaryInputTokens: z.ZodNumber;
2077
+ summaryOutputTokens: z.ZodNumber;
2078
+ summaryModel: z.ZodString;
2079
+ summaryCharCount: z.ZodOptional<z.ZodNumber>;
2080
+ summaryHeaderCount: z.ZodOptional<z.ZodNumber>;
2081
+ summaryHadMemoryEcho: z.ZodOptional<z.ZodBoolean>;
2082
+ }, z.core.$strip>;
2100
2083
 
2101
2084
  /** How a conversation was created / its execution mode. */
2102
2085
  declare type ConversationCreateType = "standard" | "background" | "scheduled";
@@ -2168,19 +2151,15 @@ declare interface ConversationForkParent {
2168
2151
  title: string;
2169
2152
  }
2170
2153
 
2171
- /**
2172
- * Broadcast to clients when a conversation's inference-profile override
2173
- * changes. `profile` is the profile name (a key in `llm.profiles`) or
2174
- * `null` when the override is cleared and the conversation falls back to
2175
- * the workspace `llm.activeProfile` resolution.
2176
- */
2177
- declare interface ConversationInferenceProfileUpdated {
2178
- type: "conversation_inference_profile_updated";
2179
- conversationId: string;
2180
- profile: string | null;
2181
- sessionId?: string | null;
2182
- expiresAt?: number | null;
2183
- }
2154
+ declare type ConversationInferenceProfileUpdatedEvent = z.infer<typeof ConversationInferenceProfileUpdatedEventSchema>;
2155
+
2156
+ declare const ConversationInferenceProfileUpdatedEventSchema: z.ZodObject<{
2157
+ type: z.ZodLiteral<"conversation_inference_profile_updated">;
2158
+ conversationId: z.ZodString;
2159
+ profile: z.ZodNullable<z.ZodString>;
2160
+ sessionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2161
+ expiresAt: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
2162
+ }, z.core.$strip>;
2184
2163
 
2185
2164
  declare interface ConversationInfo {
2186
2165
  type: "conversation_info";
@@ -2312,33 +2291,7 @@ export declare interface ConversationRow {
2312
2291
  */
2313
2292
  export declare type ConversationsClearedContext = BaseHookContext;
2314
2293
 
2315
- declare interface ConversationsClearResponse {
2316
- type: "conversations_clear_response";
2317
- cleared: number;
2318
- }
2319
-
2320
- declare interface ConversationSearchMatchingMessage {
2321
- messageId: string;
2322
- role: string;
2323
- /** Plain-text excerpt around the match, truncated to ~200 chars. */
2324
- excerpt: string;
2325
- createdAt: number;
2326
- }
2327
-
2328
- declare interface ConversationSearchResponse {
2329
- type: "conversation_search_response";
2330
- query: string;
2331
- results: ConversationSearchResultItem[];
2332
- }
2333
-
2334
- declare interface ConversationSearchResultItem {
2335
- conversationId: string;
2336
- conversationTitle: string | null;
2337
- conversationUpdatedAt: number;
2338
- matchingMessages: ConversationSearchMatchingMessage[];
2339
- }
2340
-
2341
- 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;
2294
+ declare type _ConversationsServerMessages = AssistantStatusEvent | GenerationCancelledEvent | GenerationHandoffEvent | ModelInfoEvent | HistoryResponse | UndoComplete | UsageUpdateEvent | UsageProgressEvent | UsageResponse | ContextCompactedEvent | CompactionCircuitOpenEvent | CompactionCircuitClosedEvent | ConversationErrorEvent | ConversationNoticeEvent | ConversationInfo | ConversationTitleUpdatedEvent | ConversationListResponse | ConversationListInvalidatedEvent | ScheduleConversationCreatedEvent | OpenConversationEvent;
2342
2295
 
2343
2296
  declare type ConversationTitleUpdatedEvent = z.infer<typeof ConversationTitleUpdatedEventSchema>;
2344
2297
 
@@ -3916,18 +3869,6 @@ declare const MessageCompleteEventSchema: z.ZodObject<{
3916
3869
  attachmentWarnings: z.ZodOptional<z.ZodArray<z.ZodString>>;
3917
3870
  }, z.core.$strip>;
3918
3871
 
3919
- declare interface MessageContentResponse {
3920
- type: "message_content_response";
3921
- conversationId: string;
3922
- messageId: string;
3923
- text?: string;
3924
- toolCalls?: Array<{
3925
- name: string;
3926
- result?: string;
3927
- input?: Record<string, unknown>;
3928
- }>;
3929
- }
3930
-
3931
3872
  declare type MessageDequeuedEvent = z.infer<typeof MessageDequeuedEventSchema>;
3932
3873
 
3933
3874
  declare const MessageDequeuedEventSchema: z.ZodObject<{
@@ -4103,36 +4044,40 @@ declare interface MessageRow {
4103
4044
  finalized: number;
4104
4045
  }
4105
4046
 
4106
- declare type _MessagesServerMessages = UserMessageEchoEvent | AssistantTurnStartEvent | AssistantTextDeltaEvent | AssistantThinkingDeltaEvent | ToolUseStartEvent | ToolUsePreviewStartEvent | ToolOutputChunkEvent | ToolInputDelta | ToolResultEvent | ConfirmationRequestEvent | SecretRequestEvent | QuestionRequestEvent | MessageCompleteEvent | ErrorEvent_2 | MessageQueuedEvent | MessageDequeuedEvent | MessageRequestCompleteEvent | MessageQueuedDeletedEvent | MessageSteered | SuggestionResponse | ConfirmationStateChanged | AssistantActivityStateEvent | ConversationInferenceProfileUpdated | InteractionResolvedEvent;
4047
+ declare type _MessagesServerMessages = UserMessageEchoEvent | AssistantTurnStartEvent | AssistantTextDeltaEvent | AssistantThinkingDeltaEvent | ToolUseStartEvent | ToolUsePreviewStartEvent | ToolOutputChunkEvent | ToolInputDeltaEvent | ToolResultEvent | ConfirmationRequestEvent | SecretRequestEvent | QuestionRequestEvent | MessageCompleteEvent | ErrorEvent_2 | MessageQueuedEvent | MessageDequeuedEvent | MessageRequestCompleteEvent | MessageQueuedDeletedEvent | MessageSteeredEvent | ConfirmationStateChangedEvent | AssistantActivityStateEvent | ConversationInferenceProfileUpdatedEvent | InteractionResolvedEvent;
4107
4048
 
4108
- declare interface MessageSteered {
4109
- type: "message_steered";
4110
- conversationId: string;
4111
- requestId: string;
4112
- }
4049
+ declare type MessageSteeredEvent = z.infer<typeof MessageSteeredEventSchema>;
4113
4050
 
4114
- declare interface ModelInfo {
4115
- type: "model_info";
4116
- conversationId?: string;
4117
- model: string;
4118
- provider: string;
4119
- configuredProviders?: string[];
4120
- availableModels?: Array<{
4121
- id: string;
4122
- displayName: string;
4123
- }>;
4124
- allProviders?: Array<{
4125
- id: string;
4126
- displayName: string;
4127
- models: Array<{
4128
- id: string;
4129
- displayName: string;
4130
- }>;
4131
- defaultModel: string;
4132
- apiKeyUrl?: string;
4133
- apiKeyPlaceholder?: string;
4134
- }>;
4135
- }
4051
+ declare const MessageSteeredEventSchema: z.ZodObject<{
4052
+ type: z.ZodLiteral<"message_steered">;
4053
+ conversationId: z.ZodString;
4054
+ requestId: z.ZodString;
4055
+ }, z.core.$strip>;
4056
+
4057
+ declare type ModelInfoEvent = z.infer<typeof ModelInfoEventSchema>;
4058
+
4059
+ declare const ModelInfoEventSchema: z.ZodObject<{
4060
+ type: z.ZodLiteral<"model_info">;
4061
+ conversationId: z.ZodOptional<z.ZodString>;
4062
+ model: z.ZodString;
4063
+ provider: z.ZodString;
4064
+ configuredProviders: z.ZodOptional<z.ZodArray<z.ZodString>>;
4065
+ availableModels: z.ZodOptional<z.ZodArray<z.ZodObject<{
4066
+ id: z.ZodString;
4067
+ displayName: z.ZodString;
4068
+ }, z.core.$strip>>>;
4069
+ allProviders: z.ZodOptional<z.ZodArray<z.ZodObject<{
4070
+ id: z.ZodString;
4071
+ displayName: z.ZodString;
4072
+ models: z.ZodArray<z.ZodObject<{
4073
+ id: z.ZodString;
4074
+ displayName: z.ZodString;
4075
+ }, z.core.$strip>>;
4076
+ defaultModel: z.ZodString;
4077
+ apiKeyUrl: z.ZodOptional<z.ZodString>;
4078
+ apiKeyPlaceholder: z.ZodOptional<z.ZodString>;
4079
+ }, z.core.$strip>>>;
4080
+ }, z.core.$strip>;
4136
4081
 
4137
4082
  /**
4138
4083
  * A workspace inference profile a plugin can route to. Returned by
@@ -4342,10 +4287,6 @@ export declare interface PluginLogger {
4342
4287
  debug(obj: Record<string, unknown>, msg?: string): void;
4343
4288
  }
4344
4289
 
4345
- declare interface PongMessage {
4346
- type: "pong";
4347
- }
4348
-
4349
4290
  /**
4350
4291
  * The full `post-compact` context a hook receives — the dispatching call
4351
4292
  * site's {@link PostCompactInputContext} plus the pipeline-stamped
@@ -5163,25 +5104,14 @@ export declare interface RunConversationTurnResult {
5163
5104
  queued?: boolean;
5164
5105
  }
5165
5106
 
5166
- /**
5167
- * Emitted when the compaction circuit breaker trips. After three consecutive
5168
- * summary-LLM failures (with local fallback covering each), auto-compaction is
5169
- * suspended until `openUntil` to avoid repeatedly hammering a broken provider.
5170
- * User-initiated compaction (`/compact`, `force: true`) bypasses the breaker.
5171
- *
5172
- * `conversationId` scopes the event so clients can ignore breaker trips from
5173
- * other conversations — `EventStreamClient` broadcasts every parsed server
5174
- * message to all subscribers, so without this field a breaker trip in one
5175
- * conversation would set the "auto-compaction paused" banner on every open
5176
- * `ChatViewModel`.
5177
- */
5178
- /** Server push — broadcast when a schedule creates a conversation. */
5179
- declare interface ScheduleConversationCreated {
5180
- type: "schedule_conversation_created";
5181
- conversationId: string;
5182
- scheduleJobId: string;
5183
- title: string;
5184
- }
5107
+ declare type ScheduleConversationCreatedEvent = z.infer<typeof ScheduleConversationCreatedEventSchema>;
5108
+
5109
+ declare const ScheduleConversationCreatedEventSchema: z.ZodObject<{
5110
+ type: z.ZodLiteral<"schedule_conversation_created">;
5111
+ conversationId: z.ZodString;
5112
+ scheduleJobId: z.ZodString;
5113
+ title: z.ZodString;
5114
+ }, z.core.$strip>;
5185
5115
 
5186
5116
  declare interface SchedulesListResponse {
5187
5117
  type: "schedules_list_response";
@@ -5884,13 +5814,6 @@ declare type SubscriberInput = DistributiveOmit<SubscriberEntry, "active" | "con
5884
5814
  onEvict?: () => void;
5885
5815
  };
5886
5816
 
5887
- declare interface SuggestionResponse {
5888
- type: "suggestion_response";
5889
- requestId: string;
5890
- suggestion: string | null;
5891
- source: "llm" | "none";
5892
- }
5893
-
5894
5817
  declare interface SurfaceAction {
5895
5818
  id: string;
5896
5819
  label: string;
@@ -6500,17 +6423,16 @@ export declare interface ToolExecutionResult {
6500
6423
  activityMetadata?: ToolActivityMetadata;
6501
6424
  }
6502
6425
 
6503
- declare interface ToolInputDelta {
6504
- type: "tool_input_delta";
6505
- toolName: string;
6506
- content: string;
6507
- conversationId?: string;
6508
- /** The tool_use block ID for client-side correlation. */
6509
- toolUseId?: string;
6510
- /** Database ID of the assistant message that owns this tool_use block.
6511
- * Same semantics as `AssistantTextDeltaEvent.messageId`. */
6512
- messageId?: string;
6513
- }
6426
+ declare type ToolInputDeltaEvent = z.infer<typeof ToolInputDeltaEventSchema>;
6427
+
6428
+ declare const ToolInputDeltaEventSchema: z.ZodObject<{
6429
+ type: z.ZodLiteral<"tool_input_delta">;
6430
+ toolName: z.ZodString;
6431
+ content: z.ZodString;
6432
+ conversationId: z.ZodOptional<z.ZodString>;
6433
+ toolUseId: z.ZodOptional<z.ZodString>;
6434
+ messageId: z.ZodOptional<z.ZodString>;
6435
+ }, z.core.$strip>;
6514
6436
 
6515
6437
  declare interface ToolInputSchema {
6516
6438
  type: "object";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vellumai/plugin-api",
3
- "version": "0.10.11-dev.202607231953.b64451d",
3
+ "version": "0.10.11-dev.202607232029.2295f95",
4
4
  "description": "Public TypeScript authoring contract for Vellum assistant plugins.",
5
5
  "license": "MIT",
6
6
  "type": "module",