@vellumai/plugin-api 0.10.4 → 0.10.5-dev.202607022248.91fa053

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 +155 -233
  2. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -252,47 +252,7 @@ declare interface AssistantAttention {
252
252
  }
253
253
 
254
254
  /** Daemon-side specialization of the generic event envelope. */
255
- export declare type AssistantEvent = AssistantEvent_2<ServerMessage>;
256
-
257
- /**
258
- * Assistant Events -- shared types and SSE framing helpers.
259
- *
260
- * This module is intentionally free of imports from `assistant/` or any
261
- * other repo-local module so it can be consumed by both the daemon and
262
- * isolated skill processes without circular references.
263
- *
264
- * The `AssistantEvent` interface is generic over the `message` payload so
265
- * the neutral package does not need to know about the daemon-side
266
- * `ServerMessage` discriminated union. Consumers that want narrower
267
- * typing can re-export a specialized alias, e.g.:
268
- *
269
- * type AssistantEvent = BaseAssistantEvent<ServerMessage>;
270
- */
271
- /**
272
- * A single assistant event wrapping an outbound message payload.
273
- *
274
- * Generic over the payload type so the neutral package has zero dependency
275
- * on daemon-side message schemas. The `TMessage` default of `unknown`
276
- * keeps the package importable without a type argument when the caller
277
- * does not care about message narrowing.
278
- */
279
- declare interface AssistantEvent_2<TMessage = unknown> {
280
- /** Globally unique event identifier (UUID). */
281
- id: string;
282
- /** Resolved conversation id when available. */
283
- conversationId?: string;
284
- /**
285
- * Monotonic per-conversation sequence number. Assigned by the daemon at
286
- * publish time for conversation-scoped events; absent for unscoped
287
- * broadcasts. Clients track the highest observed `seq` per conversation
288
- * and pass it back on reconnect to request replay of missed events.
289
- */
290
- seq?: number;
291
- /** ISO-8601 timestamp of when the event was emitted. */
292
- emittedAt: string;
293
- /** Outbound message payload. */
294
- message: TMessage;
295
- }
255
+ export declare type AssistantEvent = BaseAssistantEvent<ServerMessage>;
296
256
 
297
257
  export declare type AssistantEventCallback = (event: AssistantEvent) => void | Promise<void>;
298
258
 
@@ -431,12 +391,8 @@ export declare class AssistantEventHub {
431
391
  hasCapacity(): boolean;
432
392
  }
433
393
 
434
- /**
435
- * Singleton hub shared across the entire runtime process.
436
- *
437
- * Import and use this in daemon send paths and the SSE route.
438
- */
439
- export declare const assistantEventHub: AssistantEventHub;
394
+ /** The plugin-facing event hub. See module docs. */
395
+ export declare const assistantEventHub: PluginEventHub;
440
396
 
441
397
  /** Opaque handle returned by `subscribe`. Call `dispose()` to remove the subscription. */
442
398
  export declare interface AssistantEventSubscription {
@@ -531,6 +487,52 @@ declare const AvatarUpdatedEventSchema: z.ZodObject<{
531
487
  avatarPath: z.ZodString;
532
488
  }, z.core.$strip>;
533
489
 
490
+ declare interface BackgroundToolCompleted {
491
+ type: "background_tool_completed";
492
+ id: string;
493
+ conversationId: string;
494
+ status: "completed" | "failed" | "cancelled";
495
+ exitCode?: number | null;
496
+ output?: string;
497
+ completedAt: number;
498
+ }
499
+
500
+ declare type _BackgroundToolsServerMessages = BackgroundToolStarted | BackgroundToolCompleted;
501
+
502
+ declare interface BackgroundToolStarted {
503
+ type: "background_tool_started";
504
+ id: string;
505
+ toolName: string;
506
+ conversationId: string;
507
+ command: string;
508
+ startedAt: number;
509
+ }
510
+
511
+ /**
512
+ * A single assistant event wrapping an outbound message payload.
513
+ *
514
+ * Generic over the payload type. The `TMessage` default of `unknown` keeps
515
+ * the envelope nameable without a type argument when the caller does not
516
+ * care about message narrowing.
517
+ */
518
+ declare interface BaseAssistantEvent<TMessage = unknown> {
519
+ /** Globally unique event identifier (UUID). */
520
+ id: string;
521
+ /** Resolved conversation id when available. */
522
+ conversationId?: string;
523
+ /**
524
+ * Monotonic per-conversation sequence number. Assigned by the daemon at
525
+ * publish time for conversation-scoped events; absent for unscoped
526
+ * broadcasts. Clients track the highest observed `seq` per conversation
527
+ * and pass it back on reconnect to request replay of missed events.
528
+ */
529
+ seq?: number;
530
+ /** ISO-8601 timestamp of when the event was emitted. */
531
+ emittedAt: string;
532
+ /** Outbound message payload. */
533
+ message: TMessage;
534
+ }
535
+
534
536
  declare interface BaseSubscriberEntry {
535
537
  filter: AssistantEventFilter;
536
538
  callback: AssistantEventCallback;
@@ -1009,7 +1011,6 @@ declare const ConversationErrorEventSchema: z.ZodObject<{
1009
1011
  CONVERSATION_ABORTED: "CONVERSATION_ABORTED";
1010
1012
  CONVERSATION_PROCESSING_FAILED: "CONVERSATION_PROCESSING_FAILED";
1011
1013
  DISK_SPACE_CRITICAL: "DISK_SPACE_CRITICAL";
1012
- REGENERATE_FAILED: "REGENERATE_FAILED";
1013
1014
  UNKNOWN: "UNKNOWN";
1014
1015
  }>;
1015
1016
  userMessage: z.ZodString;
@@ -1120,7 +1121,6 @@ declare const ConversationNoticeEventSchema: z.ZodObject<{
1120
1121
  CONVERSATION_ABORTED: "CONVERSATION_ABORTED";
1121
1122
  CONVERSATION_PROCESSING_FAILED: "CONVERSATION_PROCESSING_FAILED";
1122
1123
  DISK_SPACE_CRITICAL: "DISK_SPACE_CRITICAL";
1123
- REGENERATE_FAILED: "REGENERATE_FAILED";
1124
1124
  UNKNOWN: "UNKNOWN";
1125
1125
  }>;
1126
1126
  userMessage: z.ZodString;
@@ -1200,9 +1200,9 @@ declare const DiskPressureStatusChangedEventSchema: z.ZodObject<{
1200
1200
  status: z.ZodObject<{
1201
1201
  enabled: z.ZodBoolean;
1202
1202
  state: z.ZodEnum<{
1203
- ok: "ok";
1204
1203
  unknown: "unknown";
1205
1204
  disabled: "disabled";
1205
+ ok: "ok";
1206
1206
  warning: "warning";
1207
1207
  critical: "critical";
1208
1208
  }>;
@@ -1390,27 +1390,26 @@ declare const ErrorEventSchema: z.ZodObject<{
1390
1390
  }, z.core.$strip>;
1391
1391
 
1392
1392
  /**
1393
- * Tool-related type declarations shared between the daemon and any
1394
- * skill-side package that needs to describe tools, permission risk, or tool
1395
- * execution results on the wire.
1393
+ * Tool-related type declarations: the neutral leaf module describing
1394
+ * tools, permission risk, and tool execution results.
1396
1395
  *
1397
- * Pure type-level declarations only (+ the `RiskLevel` enum, which is a value
1398
- * but is safely cross-package). No runtime helpers live here — the assistant
1399
- * keeps all behavior functions in `assistant/src/tools/` and re-exports the
1400
- * types from this file.
1396
+ * Pure type-level declarations only (+ the `RiskLevel` enum, which is a
1397
+ * value). No runtime helpers live here — the assistant keeps all behavior
1398
+ * functions in `assistant/src/tools/` and re-exports the types from this
1399
+ * file. This module imports nothing, so it can sit at the bottom of the
1400
+ * import graph and be consumed by `tools/types.ts`, `providers/types.ts`,
1401
+ * and `permissions/types.ts` without creating cycles.
1401
1402
  *
1402
1403
  * Heavy daemon-internal references (CES client, host-proxy classes, trust
1403
1404
  * classifications, interface IDs, content blocks, CES `ApprovalRequired`)
1404
- * are held as opaque `unknown` / broadened-`string` placeholders on this
1405
- * side so the contracts package never reaches into the assistant or the
1406
- * service-contracts runtime. The assistant redeclares `Tool`, `ToolContext`,
1407
- * `ToolExecutionResult`, `ToolExecutedEvent`, `ToolLifecycleEvent`,
1408
- * `ToolLifecycleEventHandler`, and `ProxyToolResolver` in
1409
- * `assistant/src/tools/types.ts` with the concrete types in place, so
1410
- * existing call sites keep their full type information. The two sides are
1411
- * structurally independent — no inheritance, no intersection — which
1412
- * avoids TypeScript's contravariance mismatches on lifecycle-event
1413
- * handlers.
1405
+ * are held as opaque `unknown` / broadened-`string` placeholders here. The
1406
+ * assistant redeclares `Tool`, `ToolContext`, `ToolExecutionResult`,
1407
+ * `ToolExecutedEvent`, `ToolLifecycleEvent`, `ToolLifecycleEventHandler`,
1408
+ * and `ProxyToolResolver` in `assistant/src/tools/types.ts` with the
1409
+ * concrete types in place, so existing call sites keep their full type
1410
+ * information. The two sides are structurally independent — no inheritance,
1411
+ * no intersection which avoids TypeScript's contravariance mismatches on
1412
+ * lifecycle-event handlers.
1414
1413
  */
1415
1414
  declare type ExecutionTarget = "sandbox" | "host";
1416
1415
 
@@ -2257,7 +2256,7 @@ declare interface IntegrationListResponse {
2257
2256
  }>;
2258
2257
  }
2259
2258
 
2260
- declare type _IntegrationsServerMessages = SlackWebhookConfigResponse | IngressConfigResponse | PlatformConfigResponse | VercelApiConfigResponse | TelegramConfigResponse | ChannelVerificationSessionResponse | IntegrationListResponse | IntegrationConnectResult | OAuthConnectResultResponse | OpenUrlEvent | NavigateSettingsEvent | ShowPlatformLogin | PlatformDisconnected;
2259
+ declare type _IntegrationsServerMessages = SlackWebhookConfigResponse | IngressConfigResponse | PlatformConfigResponse | VercelApiConfigResponse | TelegramConfigResponse | ChannelVerificationSessionResponse | IntegrationListResponse | IntegrationConnectResult | OAuthConnectResultResponse | OpenUrlEvent | OpenPanelEvent | NavigateSettingsEvent | ShowPlatformLogin | PlatformDisconnected;
2261
2260
 
2262
2261
  declare type InteractionResolvedEvent = z.infer<typeof InteractionResolvedEventSchema>;
2263
2262
 
@@ -2354,8 +2353,6 @@ declare const LLMCallSiteEnum: z.ZodEnum<{
2354
2353
  styleAnalyzer: "styleAnalyzer";
2355
2354
  inviteInstructionGenerator: "inviteInstructionGenerator";
2356
2355
  skillCategoryInference: "skillCategoryInference";
2357
- meetConsentMonitor: "meetConsentMonitor";
2358
- meetChatOpportunity: "meetChatOpportunity";
2359
2356
  inference: "inference";
2360
2357
  vision: "vision";
2361
2358
  trustRuleSuggestion: "trustRuleSuggestion";
@@ -2364,139 +2361,6 @@ declare const LLMCallSiteEnum: z.ZodEnum<{
2364
2361
  workflowLeaf: "workflowLeaf";
2365
2362
  }>;
2366
2363
 
2367
- /**
2368
- * The assistant successfully posted a chat message into the meeting via
2369
- * the bot's `/send_chat` endpoint. Emitted once per successful send so
2370
- * SSE-subscribed clients can render the outbound chat without waiting for
2371
- * the bot to echo it back through the transcript/chat stream.
2372
- */
2373
- declare interface MeetChatSent {
2374
- type: "meet.chat_sent";
2375
- meetingId: string;
2376
- /** The text that was posted into the meeting's chat. */
2377
- text: string;
2378
- }
2379
-
2380
- /** The bot hit a non-recoverable error (container crash, join failure, etc.). */
2381
- declare interface MeetError {
2382
- type: "meet.error";
2383
- meetingId: string;
2384
- /** Human-readable error detail. */
2385
- detail: string;
2386
- }
2387
-
2388
- /** The bot has successfully joined and is live in the meeting. */
2389
- declare interface MeetJoined {
2390
- type: "meet.joined";
2391
- meetingId: string;
2392
- }
2393
-
2394
- /** The bot has started attempting to join a meeting. */
2395
- declare interface MeetJoining {
2396
- type: "meet.joining";
2397
- meetingId: string;
2398
- /** The Meet URL the bot was asked to join. */
2399
- url: string;
2400
- }
2401
-
2402
- /** The bot has left the meeting. */
2403
- declare interface MeetLeft {
2404
- type: "meet.left";
2405
- meetingId: string;
2406
- /** Free-form reason passed to `leave()` (e.g. "user-requested", "timeout"). */
2407
- reason: string;
2408
- }
2409
-
2410
- /**
2411
- * Meet — server → client push messages for live meeting state.
2412
- *
2413
- * Emitted by the assistant daemon as the Meet-bot progresses through its
2414
- * lifecycle (joining → joined → left) and as in-meeting state changes
2415
- * (participants, active speaker, transcript chunks).
2416
- *
2417
- * Keep payloads small and client-actionable: these events power the
2418
- * macOS "In meeting" status panel and the conversation bridge's live
2419
- * transcript feed. A client that missed an event can always refetch
2420
- * authoritative state from the daemon's HTTP routes.
2421
- */
2422
- /** A single participant in a meeting. Shape mirrors the wire-level type. */
2423
- declare interface MeetParticipant {
2424
- /** Stable participant identifier (provider-specific). */
2425
- id: string;
2426
- /** Display name of the participant. */
2427
- name: string;
2428
- /** Whether the participant is the meeting host. */
2429
- isHost?: boolean;
2430
- /** Whether the participant is the bot itself. */
2431
- isSelf?: boolean;
2432
- }
2433
-
2434
- /** Participants joined and/or left the meeting since the last snapshot. */
2435
- declare interface MeetParticipantChanged {
2436
- type: "meet.participant_changed";
2437
- meetingId: string;
2438
- /** Participants who joined since the last snapshot. */
2439
- joined: MeetParticipant[];
2440
- /** Participants who left since the last snapshot. */
2441
- left: MeetParticipant[];
2442
- }
2443
-
2444
- declare type _MeetServerMessages = MeetJoining | MeetJoined | MeetParticipantChanged | MeetSpeakerChanged | MeetTranscriptChunk | MeetLeft | MeetChatSent | MeetError | MeetSpeakingStarted | MeetSpeakingEnded;
2445
-
2446
- /** The active speaker in the meeting changed. */
2447
- declare interface MeetSpeakerChanged {
2448
- type: "meet.speaker_changed";
2449
- meetingId: string;
2450
- /** Stable speaker identifier for the new active speaker. */
2451
- speakerId: string;
2452
- /** Display name of the new active speaker. */
2453
- speakerName: string;
2454
- }
2455
-
2456
- /**
2457
- * The assistant has finished (or cancelled) a TTS playback stream. Fired
2458
- * after the bot-side playback request settles — whether normally, via an
2459
- * explicit cancel, or due to an upstream error.
2460
- */
2461
- declare interface MeetSpeakingEnded {
2462
- type: "meet.speaking_ended";
2463
- meetingId: string;
2464
- /** Opaque stream identifier — matches `meet.speaking_started.streamId`. */
2465
- streamId: string;
2466
- /** Why the stream ended: natural completion, caller-initiated cancel, or an upstream error. */
2467
- reason: "completed" | "cancelled" | "error";
2468
- }
2469
-
2470
- /**
2471
- * The assistant has begun speaking into the meeting via the TTS bridge. Fired
2472
- * once per {@link MeetSessionManager.speak} invocation immediately before the
2473
- * synthesis stream starts flowing to the bot's `/play_audio` endpoint. Useful
2474
- * for clients that want to render a "speaking …" indicator.
2475
- */
2476
- declare interface MeetSpeakingStarted {
2477
- type: "meet.speaking_started";
2478
- meetingId: string;
2479
- /** Opaque stream identifier — matches `meet.speaking_ended.streamId`. */
2480
- streamId: string;
2481
- }
2482
-
2483
- /**
2484
- * A finalized chunk of transcribed speech. Interim chunks are filtered
2485
- * out before publication so clients only render stable text.
2486
- */
2487
- declare interface MeetTranscriptChunk {
2488
- type: "meet.transcript_chunk";
2489
- meetingId: string;
2490
- /** The transcribed text. */
2491
- text: string;
2492
- /** Human-readable speaker label, if the ASR provided one. */
2493
- speakerLabel?: string;
2494
- /** Stable speaker identifier across the meeting, if available. */
2495
- speakerId?: string;
2496
- /** ASR confidence in [0, 1], if available. */
2497
- confidence?: number;
2498
- }
2499
-
2500
2364
  declare interface MemoryRecalled {
2501
2365
  type: "memory_recalled";
2502
2366
  provider: string;
@@ -2795,6 +2659,16 @@ declare interface OpenConversation {
2795
2659
  focus?: boolean;
2796
2660
  }
2797
2661
 
2662
+ declare type OpenPanelEvent = z.infer<typeof OpenPanelEventSchema>;
2663
+
2664
+ declare const OpenPanelEventSchema: z.ZodObject<{
2665
+ type: z.ZodLiteral<"open_panel">;
2666
+ panelType: z.ZodString;
2667
+ data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2668
+ conversationId: z.ZodOptional<z.ZodString>;
2669
+ surfaceId: z.ZodOptional<z.ZodString>;
2670
+ }, z.core.$strip>;
2671
+
2798
2672
  declare type OpenUrlEvent = z.infer<typeof OpenUrlEventSchema>;
2799
2673
 
2800
2674
  declare const OpenUrlEventSchema: z.ZodObject<{
@@ -2836,6 +2710,13 @@ declare interface PlatformDisconnected {
2836
2710
  type: "platform_disconnected";
2837
2711
  }
2838
2712
 
2713
+ /**
2714
+ * The subset of {@link AssistantEventHub} workspace plugins may use. Picking
2715
+ * method signatures off the class keeps the facade in sync with the hub while
2716
+ * statically withholding everything else.
2717
+ */
2718
+ export declare type PluginEventHub = Pick<AssistantEventHub, "subscribe" | "publish" | "hasSubscribersForEvent">;
2719
+
2839
2720
  /**
2840
2721
  * Minimal pino-compatible logger surface handed to plugin hooks. The host
2841
2722
  * supplies a pino child logger bound to `{ plugin: <name> }`; this
@@ -3454,6 +3335,14 @@ declare interface SecretPromptResult {
3454
3335
  delivery: SecretDelivery;
3455
3336
  /** When set, the prompt could not be delivered and the value is null due to a delivery failure (not user cancellation). */
3456
3337
  error?: "unsupported_channel";
3338
+ /**
3339
+ * Why `value` is null. `"cancelled"` = the user explicitly dismissed the
3340
+ * prompt (a valid flow, not a failure); `"timed_out"` = no response within
3341
+ * the permission-timeout window. Only meaningful when `value` is null and
3342
+ * `error` is unset. Lets callers distinguish a deliberate cancel from a
3343
+ * genuine failure instead of treating both as an error.
3344
+ */
3345
+ reason?: "cancelled" | "timed_out";
3457
3346
  }
3458
3347
 
3459
3348
  declare type SecretRequestEvent = z.infer<typeof SecretRequestEventSchema>;
@@ -3571,7 +3460,7 @@ declare interface SensitiveOutputBinding {
3571
3460
 
3572
3461
  declare type SensitiveOutputKind = "invite_code";
3573
3462
 
3574
- declare type ServerMessage = _ConversationsServerMessages | _MessagesServerMessages | _SurfacesServerMessages | _SkillsServerMessages | _AppsServerMessages | _IntegrationsServerMessages | _ComputerUseServerMessages | _ContactsServerMessages | _WorkItemsServerMessages | _SubagentsServerMessages | _DocumentsServerMessages | _DocumentCommentsServerMessages | _GuardianActionsServerMessages | _SyncInvalidationServerMessages | _HomeServerMessages | _HostAppControlServerMessages | _HostBashServerMessages | _HostBrowserServerMessages | _HostCuServerMessages | _HostFileServerMessages | _HostTransferServerMessages | _MeetServerMessages | _MemoryServerMessages | _WorkspaceServerMessages | _SchedulesServerMessages | _SettingsServerMessages | _DiagnosticsServerMessages | _InboxServerMessages | _NotificationsServerMessages | _UpgradesServerMessages | _AcpServerMessages | _BookmarksServerMessages | _WorkflowsServerMessages | DiskPressureStatusChangedEvent | SubagentEvent;
3463
+ 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 | SubagentEvent;
3575
3464
 
3576
3465
  export declare interface ServerToolUseContent {
3577
3466
  type: "server_tool_use";
@@ -3646,22 +3535,34 @@ declare interface ShowPlatformLogin {
3646
3535
  }
3647
3536
 
3648
3537
  /**
3649
- * Context passed to the `shutdown` hook during daemon teardown. Kept
3650
- * intentionally narrower than {@link InitContext} — most teardown
3651
- * paths only need to know which assistant version they're shutting
3652
- * down against (e.g. for version-conditional cleanup of state files
3653
- * written by a previous boot).
3538
+ * Context passed to the `shutdown` hook. Kept intentionally narrower than
3539
+ * {@link InitContext} — teardown paths only need to know which assistant
3540
+ * version they're shutting down against (e.g. for version-conditional cleanup
3541
+ * of state files written by a previous boot) and {@link ShutdownReason why}
3542
+ * they're being torn down (so a plugin can, e.g., delete its state on
3543
+ * `uninstall` but preserve it across a plain `shutdown`).
3654
3544
  *
3655
- * Additional fields may be added as concrete plugin needs surface; the
3656
- * `assistantVersion` field mirrors the init context's so plugins that
3657
- * stash a version stamp at init can compare against the same name on
3658
- * tear-down without keeping their own copy.
3545
+ * The `assistantVersion` field mirrors the init context's so plugins that stash
3546
+ * a version stamp at init can compare against the same name on tear-down
3547
+ * without keeping their own copy.
3659
3548
  */
3660
3549
  export declare interface ShutdownContext {
3661
3550
  /** Assistant semver for compatibility checks inside the plugin. */
3662
3551
  assistantVersion: string;
3552
+ /** Why the plugin is shutting down. */
3553
+ reason: ShutdownReason;
3663
3554
  }
3664
3555
 
3556
+ /**
3557
+ * Why a plugin's `shutdown` hook is firing.
3558
+ *
3559
+ * - `shutdown` — the daemon is tearing down (process exit).
3560
+ * - `uninstall` — the plugin's directory was removed at runtime.
3561
+ * - `disable` — the plugin was disabled at runtime (e.g. a `.disabled`
3562
+ * sentinel was added, or a feature flag turned it off).
3563
+ */
3564
+ declare type ShutdownReason = "shutdown" | "uninstall" | "disable";
3565
+
3665
3566
  declare interface SignBundlePayloadRequest {
3666
3567
  type: "sign_bundle_payload";
3667
3568
  requestId: string;
@@ -3870,7 +3771,7 @@ declare interface SubagentSpawned {
3870
3771
 
3871
3772
  declare type _SubagentsServerMessages = SubagentSpawned | SubagentStatusChanged | SubagentDetailResponse;
3872
3773
 
3873
- declare type SubagentStatus = "pending" | "running" | "awaiting_input" | "completed" | "failed" | "aborted";
3774
+ declare type SubagentStatus = "pending" | "running" | "awaiting_input" | "completed" | "failed" | "aborted" | "interrupted";
3874
3775
 
3875
3776
  declare interface SubagentStatusChanged {
3876
3777
  type: "subagent_status_changed";
@@ -4226,6 +4127,18 @@ export declare interface ToolContext {
4226
4127
  * @legacy
4227
4128
  */
4228
4129
  sourceActorPrincipalId?: string;
4130
+ /**
4131
+ * The conversation's effective per-chat plugin scope, as produced by
4132
+ * `getEffectiveEnabledPluginSet`: `null` means no per-chat restriction;
4133
+ * otherwise a Set of allowed plugin ids (the user's selection unioned with
4134
+ * the always-on first-party defaults). Skill-surface tools that resolve
4135
+ * skills by id outside the per-turn projection — `skill_load` (body load)
4136
+ * and `find_similar_skills` (discovery) — read this to drop skills owned by
4137
+ * plugins outside the conversation's scope. Populated per tool call from the
4138
+ * live conversation state.
4139
+ * @legacy
4140
+ */
4141
+ enabledPluginSet?: Set<string> | null;
4229
4142
  }
4230
4143
 
4231
4144
  /**
@@ -4694,32 +4607,22 @@ declare const TraceEventSchema: z.ZodObject<{
4694
4607
  }>;
4695
4608
  status: z.ZodOptional<z.ZodEnum<{
4696
4609
  error: "error";
4697
- info: "info";
4698
4610
  success: "success";
4699
4611
  warning: "warning";
4612
+ info: "info";
4700
4613
  }>>;
4701
4614
  summary: z.ZodString;
4702
4615
  attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>>;
4703
4616
  }, z.core.$strip>;
4704
4617
 
4705
- /**
4706
- * Trust classification for an inbound actor.
4707
- *
4708
- * - `'guardian'`: The sender matches the active guardian binding for this
4709
- * (assistant, channel). Guardians have full control-plane access and
4710
- * self-approve tool invocations.
4711
- * - `'trusted_contact'`: The sender is an active contact with a channel
4712
- * (not the guardian). Trusted contacts can invoke tools but require
4713
- * guardian approval for sensitive operations.
4714
- * - `'unverified_contact'`: The sender matches a contact channel whose
4715
- * status is `pending` or `unverified` — known to the guardian but not yet
4716
- * verified. Treated identically to `trusted_contact` for every downstream
4717
- * capability/tool/approval decision; the distinction is admission-only.
4718
- * - `'unknown'`: The sender has no contact record, no identity could be
4719
- * established, or the sender is a blocked/revoked contact. Unknown
4720
- * actors are fail-closed with no escalation path.
4721
- */
4722
- declare type TrustClass = "guardian" | "trusted_contact" | "unverified_contact" | "unknown";
4618
+ declare type TrustClass = z.infer<typeof trustClassSchema>;
4619
+
4620
+ declare const trustClassSchema: z.ZodEnum<{
4621
+ unknown: "unknown";
4622
+ guardian: "guardian";
4623
+ trusted_contact: "trusted_contact";
4624
+ unverified_contact: "unverified_contact";
4625
+ }>;
4723
4626
 
4724
4627
  declare interface UiSurfaceComplete {
4725
4628
  type: "ui_surface_complete";
@@ -4963,6 +4866,14 @@ export declare interface UserPromptSubmitContext {
4963
4866
  * attach turn-scoped metadata to the originating message (e.g. recording an
4964
4867
  * injected memory block so it survives a conversation reload) key off this
4965
4868
  * row id rather than the in-memory message arrays, whose entries carry no id.
4869
+ *
4870
+ * @deprecated This field is always identical to {@link requestId}; use
4871
+ * `requestId` instead. Every path that starts an agent loop persists the
4872
+ * triggering user message under the turn's request ID before running, so
4873
+ * the message row id and the request's correlation ID are the same UUID.
4874
+ * This holds for the standard submit, queue-drain, subagent, voice, wake,
4875
+ * and conversation-analysis paths alike. This field will be removed in a
4876
+ * future API version.
4966
4877
  */
4967
4878
  readonly userMessageId: string;
4968
4879
  /**
@@ -4970,6 +4881,10 @@ export declare interface UserPromptSubmitContext {
4970
4881
  * runtime injection forward it onto the injector turn context so the
4971
4882
  * assembled blocks are attributed to the originating request; it is fixed
4972
4883
  * for the turn and cannot be recovered from the message arrays.
4884
+ *
4885
+ * As of the requestId/userMessageId merge, this value is also the
4886
+ * persisted row ID of the user message, so hooks that previously
4887
+ * keyed off {@link userMessageId} can use `requestId` directly.
4973
4888
  */
4974
4889
  readonly requestId: string;
4975
4890
  /**
@@ -5000,6 +4915,13 @@ export declare interface UserPromptSubmitContext {
5000
4915
  * it from the message arrays.
5001
4916
  */
5002
4917
  readonly prompt: string;
4918
+ /**
4919
+ * True when the triggering message is a transcript-suppressed machine
4920
+ * signal (`metadata.hidden` — e.g. the channel-setup wizard-close marker)
4921
+ * rather than something the user typed. Hooks that treat `prompt` as
4922
+ * user speech (e.g. title generation) should skip these turns.
4923
+ */
4924
+ readonly isHiddenPrompt?: boolean;
5003
4925
  /**
5004
4926
  * The user's original message list, immutable for the hook. Plugins
5005
4927
  * may snapshot or compare against this but MUST NOT mutate it.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vellumai/plugin-api",
3
- "version": "0.10.4",
3
+ "version": "0.10.5-dev.202607022248.91fa053",
4
4
  "description": "Public TypeScript authoring contract for Vellum assistant plugins.",
5
5
  "license": "MIT",
6
6
  "type": "module",