@vellumai/plugin-api 0.11.3 → 0.11.4-dev.202608190019.b94dbf2

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 +395 -121
  2. package/index.js +4 -0
  3. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -127,9 +127,9 @@ declare const AssistantConfigSchema: z.ZodObject<{
127
127
  inference: z.ZodDefault<z.ZodObject<{}, z.core.$strip>>;
128
128
  "image-generation": z.ZodDefault<z.ZodObject<{
129
129
  provider: z.ZodDefault<z.ZodEnum<{
130
+ vellum: "vellum";
130
131
  openai: "openai";
131
132
  gemini: "gemini";
132
- vellum: "vellum";
133
133
  }>>;
134
134
  model: z.ZodDefault<z.ZodString>;
135
135
  }, z.core.$strip>>;
@@ -147,6 +147,7 @@ declare const AssistantConfigSchema: z.ZodObject<{
147
147
  provider: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodEnum<{
148
148
  vellum: "vellum";
149
149
  deepgram: "deepgram";
150
+ "deepgram-flux": "deepgram-flux";
150
151
  "google-gemini": "google-gemini";
151
152
  "openai-whisper": "openai-whisper";
152
153
  xai: "xai";
@@ -593,33 +594,16 @@ declare const AssistantConfigSchema: z.ZodObject<{
593
594
  }, z.core.$strip>>;
594
595
  llm: z.ZodDefault<z.ZodObject<{
595
596
  profiles: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
596
- provider: z.ZodOptional<z.ZodEnum<{
597
- openai: "openai";
598
- anthropic: "anthropic";
599
- gemini: "gemini";
600
- fireworks: "fireworks";
601
- together: "together";
602
- poolside: "poolside";
603
- openrouter: "openrouter";
604
- "vercel-ai-gateway": "vercel-ai-gateway";
605
- ollama: "ollama";
606
- "openai-compatible": "openai-compatible";
607
- litellm: "litellm";
608
- minimax: "minimax";
609
- atlascloud: "atlascloud";
610
- baseten: "baseten";
611
- vellum: "vellum";
612
- chatgpt: "chatgpt";
613
- }>>;
597
+ provider: z.ZodOptional<z.ZodString>;
614
598
  model: z.ZodOptional<z.ZodString>;
615
599
  maxTokens: z.ZodOptional<z.ZodNumber>;
616
600
  effort: z.ZodOptional<z.ZodEnum<{
617
601
  low: "low";
618
602
  medium: "medium";
619
603
  high: "high";
604
+ none: "none";
620
605
  xhigh: "xhigh";
621
606
  max: "max";
622
- none: "none";
623
607
  }>>;
624
608
  speed: z.ZodOptional<z.ZodEnum<{
625
609
  standard: "standard";
@@ -672,8 +656,8 @@ declare const AssistantConfigSchema: z.ZodObject<{
672
656
  }>>;
673
657
  disableCache: z.ZodOptional<z.ZodBoolean>;
674
658
  source: z.ZodOptional<z.ZodEnum<{
675
- managed: "managed";
676
659
  user: "user";
660
+ managed: "managed";
677
661
  }>>;
678
662
  label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
679
663
  description: z.ZodOptional<z.ZodString>;
@@ -725,40 +709,23 @@ declare const AssistantConfigSchema: z.ZodObject<{
725
709
  skillCategoryInference: "skillCategoryInference";
726
710
  inference: "inference";
727
711
  vision: "vision";
728
- voiceFrontDecision: "voiceFrontDecision";
712
+ voiceProgressNarration: "voiceProgressNarration";
729
713
  voiceFrontDoor: "voiceFrontDoor";
730
714
  trustRuleSuggestion: "trustRuleSuggestion";
731
715
  homeGreeting: "homeGreeting";
732
716
  homeSuggestedPrompts: "homeSuggestedPrompts";
733
717
  workflowLeaf: "workflowLeaf";
734
718
  }> & z.core.$partial, z.ZodObject<{
735
- provider: z.ZodOptional<z.ZodEnum<{
736
- openai: "openai";
737
- anthropic: "anthropic";
738
- gemini: "gemini";
739
- fireworks: "fireworks";
740
- together: "together";
741
- poolside: "poolside";
742
- openrouter: "openrouter";
743
- "vercel-ai-gateway": "vercel-ai-gateway";
744
- ollama: "ollama";
745
- "openai-compatible": "openai-compatible";
746
- litellm: "litellm";
747
- minimax: "minimax";
748
- atlascloud: "atlascloud";
749
- baseten: "baseten";
750
- vellum: "vellum";
751
- chatgpt: "chatgpt";
752
- }>>;
719
+ provider: z.ZodOptional<z.ZodString>;
753
720
  model: z.ZodOptional<z.ZodString>;
754
721
  maxTokens: z.ZodOptional<z.ZodNumber>;
755
722
  effort: z.ZodOptional<z.ZodEnum<{
756
723
  low: "low";
757
724
  medium: "medium";
758
725
  high: "high";
726
+ none: "none";
759
727
  xhigh: "xhigh";
760
728
  max: "max";
761
- none: "none";
762
729
  }>>;
763
730
  speed: z.ZodOptional<z.ZodEnum<{
764
731
  standard: "standard";
@@ -816,22 +783,7 @@ declare const AssistantConfigSchema: z.ZodObject<{
816
783
  advisorProfile: z.ZodOptional<z.ZodString>;
817
784
  defaultProvider: z.ZodCatch<z.ZodOptional<z.ZodObject<{
818
785
  provider: z.ZodEnum<{
819
- openai: "openai";
820
- anthropic: "anthropic";
821
- gemini: "gemini";
822
- fireworks: "fireworks";
823
- together: "together";
824
- poolside: "poolside";
825
- openrouter: "openrouter";
826
- "vercel-ai-gateway": "vercel-ai-gateway";
827
- ollama: "ollama";
828
- "openai-compatible": "openai-compatible";
829
- litellm: "litellm";
830
- minimax: "minimax";
831
- atlascloud: "atlascloud";
832
- baseten: "baseten";
833
- vellum: "vellum";
834
- chatgpt: "chatgpt";
786
+ [x: string]: string;
835
787
  }>;
836
788
  connectionName: z.ZodOptional<z.ZodString>;
837
789
  }, z.core.$strip>>>;
@@ -1091,8 +1043,6 @@ declare const AssistantConfigSchema: z.ZodObject<{
1091
1043
  endpointDecisionTimeoutMs: z.ZodDefault<z.ZodNumber>;
1092
1044
  endpointExtensionMs: z.ZodDefault<z.ZodNumber>;
1093
1045
  endpointMaxExtensions: z.ZodDefault<z.ZodNumber>;
1094
- ackFirstDeltaTimeoutMs: z.ZodDefault<z.ZodNumber>;
1095
- ackGenerationTimeoutMs: z.ZodDefault<z.ZodNumber>;
1096
1046
  progress: z.ZodDefault<z.ZodObject<{
1097
1047
  enabled: z.ZodDefault<z.ZodBoolean>;
1098
1048
  opsThreshold: z.ZodDefault<z.ZodNumber>;
@@ -1103,6 +1053,15 @@ declare const AssistantConfigSchema: z.ZodObject<{
1103
1053
  generationTimeoutMs: z.ZodDefault<z.ZodNumber>;
1104
1054
  }, z.core.$strip>>;
1105
1055
  }, z.core.$strip>>;
1056
+ flux: z.ZodDefault<z.ZodObject<{
1057
+ turnEnd: z.ZodDefault<z.ZodObject<{
1058
+ enabled: z.ZodDefault<z.ZodBoolean>;
1059
+ }, z.core.$strip>>;
1060
+ model: z.ZodDefault<z.ZodString>;
1061
+ eotThreshold: z.ZodDefault<z.ZodNumber>;
1062
+ eagerEotThreshold: z.ZodOptional<z.ZodNumber>;
1063
+ eotTimeoutMs: z.ZodDefault<z.ZodNumber>;
1064
+ }, z.core.$strip>>;
1106
1065
  maxSessionDurationSeconds: z.ZodDefault<z.ZodNumber>;
1107
1066
  archiveAudio: z.ZodDefault<z.ZodBoolean>;
1108
1067
  }, z.core.$strip>>;
@@ -1212,8 +1171,8 @@ declare const AssistantConfigSchema: z.ZodObject<{
1212
1171
  plugins: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1213
1172
  pluginUpdates: z.ZodDefault<z.ZodObject<{
1214
1173
  mode: z.ZodDefault<z.ZodEnum<{
1215
- auto: "auto";
1216
1174
  manual: "manual";
1175
+ auto: "auto";
1217
1176
  }>>;
1218
1177
  strategy: z.ZodDefault<z.ZodEnum<{
1219
1178
  theirs: "theirs";
@@ -1251,6 +1210,12 @@ declare const AssistantEventEnvelopeSchema: z.ZodObject<{
1251
1210
  seq: z.ZodOptional<z.ZodNumber>;
1252
1211
  emittedAt: z.ZodString;
1253
1212
  message: z.ZodDiscriminatedUnion<[z.ZodObject<{
1213
+ type: z.ZodLiteral<"acp_auth_required">;
1214
+ acpSessionId: z.ZodString;
1215
+ authCode: z.ZodString;
1216
+ agent: z.ZodString;
1217
+ parentToolUseId: z.ZodOptional<z.ZodString>;
1218
+ }, z.core.$strict>, z.ZodObject<{
1254
1219
  type: z.ZodLiteral<"acp_session_completed">;
1255
1220
  acpSessionId: z.ZodString;
1256
1221
  stopReason: z.ZodEnum<{
@@ -1275,12 +1240,12 @@ declare const AssistantEventEnvelopeSchema: z.ZodObject<{
1275
1240
  type: z.ZodLiteral<"acp_session_update">;
1276
1241
  acpSessionId: z.ZodString;
1277
1242
  updateType: z.ZodEnum<{
1243
+ plan: "plan";
1278
1244
  agent_message_chunk: "agent_message_chunk";
1279
1245
  agent_thought_chunk: "agent_thought_chunk";
1280
1246
  user_message_chunk: "user_message_chunk";
1281
1247
  tool_call: "tool_call";
1282
1248
  tool_call_update: "tool_call_update";
1283
- plan: "plan";
1284
1249
  }>;
1285
1250
  content: z.ZodOptional<z.ZodString>;
1286
1251
  toolCallId: z.ZodOptional<z.ZodString>;
@@ -1366,8 +1331,8 @@ declare const AssistantEventEnvelopeSchema: z.ZodObject<{
1366
1331
  id: z.ZodString;
1367
1332
  conversationId: z.ZodString;
1368
1333
  status: z.ZodEnum<{
1369
- completed: "completed";
1370
1334
  cancelled: "cancelled";
1335
+ completed: "completed";
1371
1336
  failed: "failed";
1372
1337
  }>;
1373
1338
  exitCode: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
@@ -1459,18 +1424,18 @@ declare const AssistantEventEnvelopeSchema: z.ZodObject<{
1459
1424
  conversationId: z.ZodString;
1460
1425
  requestId: z.ZodString;
1461
1426
  state: z.ZodEnum<{
1462
- timed_out: "timed_out";
1463
1427
  pending: "pending";
1464
1428
  approved: "approved";
1465
1429
  denied: "denied";
1430
+ timed_out: "timed_out";
1466
1431
  resolved_stale: "resolved_stale";
1467
1432
  }>;
1468
1433
  source: z.ZodEnum<{
1434
+ timeout: "timeout";
1469
1435
  system: "system";
1470
1436
  button: "button";
1471
1437
  inline_nl: "inline_nl";
1472
1438
  auto_deny: "auto_deny";
1473
- timeout: "timeout";
1474
1439
  }>;
1475
1440
  causedByRequestId: z.ZodOptional<z.ZodString>;
1476
1441
  decisionText: z.ZodOptional<z.ZodString>;
@@ -1545,9 +1510,9 @@ declare const AssistantEventEnvelopeSchema: z.ZodObject<{
1545
1510
  }, z.core.$strip>, z.ZodObject<{
1546
1511
  type: z.ZodLiteral<"conversation_list_invalidated">;
1547
1512
  reason: z.ZodEnum<{
1513
+ deleted: "deleted";
1548
1514
  created: "created";
1549
1515
  renamed: "renamed";
1550
- deleted: "deleted";
1551
1516
  reordered: "reordered";
1552
1517
  seen_changed: "seen_changed";
1553
1518
  }>;
@@ -1590,9 +1555,9 @@ declare const AssistantEventEnvelopeSchema: z.ZodObject<{
1590
1555
  enabled: z.ZodBoolean;
1591
1556
  state: z.ZodEnum<{
1592
1557
  unknown: "unknown";
1558
+ ok: "ok";
1593
1559
  disabled: "disabled";
1594
1560
  critical: "critical";
1595
- ok: "ok";
1596
1561
  warning: "warning";
1597
1562
  }>;
1598
1563
  locked: z.ZodBoolean;
@@ -1707,8 +1672,8 @@ declare const AssistantEventEnvelopeSchema: z.ZodObject<{
1707
1672
  hookName: z.ZodString;
1708
1673
  owner: z.ZodObject<{
1709
1674
  kind: z.ZodEnum<{
1710
- plugin: "plugin";
1711
1675
  workspace: "workspace";
1676
+ plugin: "plugin";
1712
1677
  }>;
1713
1678
  id: z.ZodString;
1714
1679
  }, z.core.$strip>;
@@ -1833,8 +1798,8 @@ declare const AssistantEventEnvelopeSchema: z.ZodObject<{
1833
1798
  targetClientId: z.ZodOptional<z.ZodString>;
1834
1799
  operation: z.ZodLiteral<"read">;
1835
1800
  path: z.ZodString;
1836
- offset: z.ZodOptional<z.ZodNumber>;
1837
- limit: z.ZodOptional<z.ZodNumber>;
1801
+ startIndex: z.ZodOptional<z.ZodNumber>;
1802
+ maxChars: z.ZodOptional<z.ZodNumber>;
1838
1803
  }, z.core.$strip>, z.ZodObject<{
1839
1804
  type: z.ZodLiteral<"host_file_request">;
1840
1805
  requestId: z.ZodString;
@@ -1900,9 +1865,9 @@ declare const AssistantEventEnvelopeSchema: z.ZodObject<{
1900
1865
  requestId: z.ZodString;
1901
1866
  conversationId: z.ZodString;
1902
1867
  state: z.ZodEnum<{
1868
+ approved: "approved";
1903
1869
  cancelled: "cancelled";
1904
1870
  superseded: "superseded";
1905
- approved: "approved";
1906
1871
  rejected: "rejected";
1907
1872
  answered: "answered";
1908
1873
  }>;
@@ -2195,9 +2160,9 @@ declare const AssistantEventEnvelopeSchema: z.ZodObject<{
2195
2160
  type: z.ZodLiteral<"subagent_status_changed">;
2196
2161
  subagentId: z.ZodString;
2197
2162
  status: z.ZodEnum<{
2163
+ pending: "pending";
2198
2164
  completed: "completed";
2199
2165
  failed: "failed";
2200
- pending: "pending";
2201
2166
  running: "running";
2202
2167
  awaiting_input: "awaiting_input";
2203
2168
  aborted: "aborted";
@@ -2671,13 +2636,14 @@ declare const AssistantEventPublishOptionsSchema: z.ZodObject<{
2671
2636
  }>>;
2672
2637
  targetClientId: z.ZodOptional<z.ZodString>;
2673
2638
  targetInterfaceId: z.ZodOptional<z.ZodEnum<{
2674
- telegram: "telegram";
2675
2639
  phone: "phone";
2640
+ a2a: "a2a";
2676
2641
  whatsapp: "whatsapp";
2642
+ discord: "discord";
2643
+ telegram: "telegram";
2677
2644
  slack: "slack";
2678
2645
  email: "email";
2679
- a2a: "a2a";
2680
- discord: "discord";
2646
+ plugin: "plugin";
2681
2647
  macos: "macos";
2682
2648
  ios: "ios";
2683
2649
  cli: "cli";
@@ -2702,6 +2668,12 @@ declare const AssistantEventPublishOptionsSchema: z.ZodObject<{
2702
2668
  * migration recipe.
2703
2669
  */
2704
2670
  declare const AssistantEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
2671
+ type: z.ZodLiteral<"acp_auth_required">;
2672
+ acpSessionId: z.ZodString;
2673
+ authCode: z.ZodString;
2674
+ agent: z.ZodString;
2675
+ parentToolUseId: z.ZodOptional<z.ZodString>;
2676
+ }, z.core.$strict>, z.ZodObject<{
2705
2677
  type: z.ZodLiteral<"acp_session_completed">;
2706
2678
  acpSessionId: z.ZodString;
2707
2679
  stopReason: z.ZodEnum<{
@@ -2726,12 +2698,12 @@ declare const AssistantEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
2726
2698
  type: z.ZodLiteral<"acp_session_update">;
2727
2699
  acpSessionId: z.ZodString;
2728
2700
  updateType: z.ZodEnum<{
2701
+ plan: "plan";
2729
2702
  agent_message_chunk: "agent_message_chunk";
2730
2703
  agent_thought_chunk: "agent_thought_chunk";
2731
2704
  user_message_chunk: "user_message_chunk";
2732
2705
  tool_call: "tool_call";
2733
2706
  tool_call_update: "tool_call_update";
2734
- plan: "plan";
2735
2707
  }>;
2736
2708
  content: z.ZodOptional<z.ZodString>;
2737
2709
  toolCallId: z.ZodOptional<z.ZodString>;
@@ -2817,8 +2789,8 @@ declare const AssistantEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
2817
2789
  id: z.ZodString;
2818
2790
  conversationId: z.ZodString;
2819
2791
  status: z.ZodEnum<{
2820
- completed: "completed";
2821
2792
  cancelled: "cancelled";
2793
+ completed: "completed";
2822
2794
  failed: "failed";
2823
2795
  }>;
2824
2796
  exitCode: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
@@ -2910,18 +2882,18 @@ declare const AssistantEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
2910
2882
  conversationId: z.ZodString;
2911
2883
  requestId: z.ZodString;
2912
2884
  state: z.ZodEnum<{
2913
- timed_out: "timed_out";
2914
2885
  pending: "pending";
2915
2886
  approved: "approved";
2916
2887
  denied: "denied";
2888
+ timed_out: "timed_out";
2917
2889
  resolved_stale: "resolved_stale";
2918
2890
  }>;
2919
2891
  source: z.ZodEnum<{
2892
+ timeout: "timeout";
2920
2893
  system: "system";
2921
2894
  button: "button";
2922
2895
  inline_nl: "inline_nl";
2923
2896
  auto_deny: "auto_deny";
2924
- timeout: "timeout";
2925
2897
  }>;
2926
2898
  causedByRequestId: z.ZodOptional<z.ZodString>;
2927
2899
  decisionText: z.ZodOptional<z.ZodString>;
@@ -2996,9 +2968,9 @@ declare const AssistantEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
2996
2968
  }, z.core.$strip>, z.ZodObject<{
2997
2969
  type: z.ZodLiteral<"conversation_list_invalidated">;
2998
2970
  reason: z.ZodEnum<{
2971
+ deleted: "deleted";
2999
2972
  created: "created";
3000
2973
  renamed: "renamed";
3001
- deleted: "deleted";
3002
2974
  reordered: "reordered";
3003
2975
  seen_changed: "seen_changed";
3004
2976
  }>;
@@ -3041,9 +3013,9 @@ declare const AssistantEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
3041
3013
  enabled: z.ZodBoolean;
3042
3014
  state: z.ZodEnum<{
3043
3015
  unknown: "unknown";
3016
+ ok: "ok";
3044
3017
  disabled: "disabled";
3045
3018
  critical: "critical";
3046
- ok: "ok";
3047
3019
  warning: "warning";
3048
3020
  }>;
3049
3021
  locked: z.ZodBoolean;
@@ -3158,8 +3130,8 @@ declare const AssistantEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
3158
3130
  hookName: z.ZodString;
3159
3131
  owner: z.ZodObject<{
3160
3132
  kind: z.ZodEnum<{
3161
- plugin: "plugin";
3162
3133
  workspace: "workspace";
3134
+ plugin: "plugin";
3163
3135
  }>;
3164
3136
  id: z.ZodString;
3165
3137
  }, z.core.$strip>;
@@ -3284,8 +3256,8 @@ declare const AssistantEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
3284
3256
  targetClientId: z.ZodOptional<z.ZodString>;
3285
3257
  operation: z.ZodLiteral<"read">;
3286
3258
  path: z.ZodString;
3287
- offset: z.ZodOptional<z.ZodNumber>;
3288
- limit: z.ZodOptional<z.ZodNumber>;
3259
+ startIndex: z.ZodOptional<z.ZodNumber>;
3260
+ maxChars: z.ZodOptional<z.ZodNumber>;
3289
3261
  }, z.core.$strip>, z.ZodObject<{
3290
3262
  type: z.ZodLiteral<"host_file_request">;
3291
3263
  requestId: z.ZodString;
@@ -3351,9 +3323,9 @@ declare const AssistantEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
3351
3323
  requestId: z.ZodString;
3352
3324
  conversationId: z.ZodString;
3353
3325
  state: z.ZodEnum<{
3326
+ approved: "approved";
3354
3327
  cancelled: "cancelled";
3355
3328
  superseded: "superseded";
3356
- approved: "approved";
3357
3329
  rejected: "rejected";
3358
3330
  answered: "answered";
3359
3331
  }>;
@@ -3646,9 +3618,9 @@ declare const AssistantEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
3646
3618
  type: z.ZodLiteral<"subagent_status_changed">;
3647
3619
  subagentId: z.ZodString;
3648
3620
  status: z.ZodEnum<{
3621
+ pending: "pending";
3649
3622
  completed: "completed";
3650
3623
  failed: "failed";
3651
- pending: "pending";
3652
3624
  running: "running";
3653
3625
  awaiting_input: "awaiting_input";
3654
3626
  aborted: "aborted";
@@ -4040,6 +4012,41 @@ declare interface BaseSubscriberEntry {
4040
4012
  */
4041
4013
  export declare function buildMessageExcerpt(rawContent: string, query: string): Promise<string>;
4042
4014
 
4015
+ /**
4016
+ * Canonical channel-id vocabulary shared between the assistant daemon and the
4017
+ * gateway.
4018
+ *
4019
+ * A "channel" is an external messaging surface an actor can reach the
4020
+ * assistant through (Slack, Telegram, WhatsApp, phone, …) plus a couple of
4021
+ * internal ids (`vellum` for native app conversations, `platform` for the
4022
+ * internal control plane). This is the single source of truth for that set:
4023
+ *
4024
+ * One id, `plugin`, does not name a surface: it names *every* surface a plugin
4025
+ * brings. A plugin channel's real identity is the plugin, which is workspace
4026
+ * state and cannot be a compile-time union member, so the plugin name travels
4027
+ * in `sourceMetadata.plugin` and is prefixed onto every external id the gateway
4028
+ * forwards (`imessage:+15551234567`). Two plugins therefore share a channel
4029
+ * row — one admission floor, one set of channel-wide defaults — while their
4030
+ * conversations, contacts, and trust records stay disjoint. See
4031
+ * `gateway/src/channels/plugin-inbound.ts` for what that concedes.
4032
+ *
4033
+ * the assistant adopts it wholesale as its `ChannelId`, and the gateway
4034
+ * asserts its own (narrower) inbound list is a subset of it so the two sides
4035
+ * cannot silently drift.
4036
+ *
4037
+ * Both packages depend on `@vellumai/service-contracts`, so hoisting the set
4038
+ * here (rather than maintaining a copy on each side) means adding or renaming
4039
+ * a channel happens in exactly one place.
4040
+ *
4041
+ * Note that a consumer may legitimately handle only a *subset* of these — the
4042
+ * gateway, for example, never ingresses `platform`. Use a local list guarded
4043
+ * by `satisfies readonly ChannelId[]` for those cases rather than redefining
4044
+ * the union.
4045
+ */
4046
+ declare const CHANNEL_IDS: readonly ["telegram", "phone", "vellum", "whatsapp", "slack", "email", "platform", "a2a", "discord", "plugin"];
4047
+
4048
+ declare type ChannelId = (typeof CHANNEL_IDS)[number];
4049
+
4043
4050
  export declare const CLI_COMMAND_HELP: readonly CliCommandHelp[];
4044
4051
 
4045
4052
  declare interface CliArgumentHelp {
@@ -4145,6 +4152,43 @@ declare type ConfiguredProviderOptions = Pick<ResolveCallSiteOpts, "overrideProf
4145
4152
 
4146
4153
  export declare type ContentBlock = TextContent | ThinkingContent | RedactedThinkingContent | ImageContent | FileContent | ToolUseContent | ToolResultContent | ServerToolUseContent | WebSearchToolResultContent | UiSurfaceContent;
4147
4154
 
4155
+ /**
4156
+ * The chat a turn belongs to, in the channel's own terms.
4157
+ *
4158
+ * Supplied instead of a `conversationId` when the caller knows where the
4159
+ * message came from but not which conversation that is. The pair resolves to
4160
+ * the same conversation an inbound message on those coordinates would land
4161
+ * in, because it resolves through the same binding.
4162
+ *
4163
+ * That sameness is the reason this exists at all. A caller could keep its own
4164
+ * `externalChatId -> conversationId` map and pass the id, and turns would run
4165
+ * in the right place. What it could not do is make the rest of the assistant
4166
+ * agree: conversation reset is addressed by channel coordinates
4167
+ * (`handleDeleteConversation`), the deny lanes attach an access-request card
4168
+ * by them (`findInboundConversationId`), and the conversation and session
4169
+ * APIs read the channel, chat name and sender off the external binding. A
4170
+ * private map is a second name for the same conversation, and everything
4171
+ * keyed on the public one quietly misses.
4172
+ */
4173
+ export declare interface ConversationChannelAddress {
4174
+ /** Channel the message arrived on. */
4175
+ sourceChannel: ChannelId;
4176
+ /** The chat, in the channel's own id space. */
4177
+ externalChatId: string;
4178
+ /**
4179
+ * Thread within the chat, where the channel has threads. Only Slack and
4180
+ * Telegram scope a conversation by thread; elsewhere this is carried as
4181
+ * binding metadata and does not split the conversation.
4182
+ */
4183
+ externalThreadId?: string | null;
4184
+ /** Human-readable chat name, for the conversation list. */
4185
+ externalChatName?: string | null;
4186
+ /** Who sent it, in the channel's id space. */
4187
+ externalUserId?: string | null;
4188
+ displayName?: string | null;
4189
+ username?: string | null;
4190
+ }
4191
+
4148
4192
  /** How a conversation was created / its execution mode. */
4149
4193
  declare type ConversationCreateType = "standard" | "background" | "scheduled";
4150
4194
 
@@ -4240,8 +4284,9 @@ export declare function createLiveVoiceConnection(options: {
4240
4284
  *
4241
4285
  * ## Plugin scoping
4242
4286
  *
4243
- * When a plugin is in context its hook or tool is executing, tracked by
4244
- * {@link ../plugins/plugin-execution-context.getCurrentPluginName} resolution
4287
+ * When a plugin is in context (its hook, tool, or one of its own
4288
+ * `/x/plugins/<name>/` routes is executing, tracked by
4289
+ * {@link ../plugins/plugin-execution-context.getCurrentPluginName}), resolution
4245
4290
  * is restricted: the plugin may only resolve credentials whose `field` equals
4246
4291
  * the plugin's own manifest name. A plugin named `acme` can therefore read
4247
4292
  * `openai/acme` or `stripe/acme` but not `openai/api_key`. Outside any plugin
@@ -4257,6 +4302,44 @@ export declare class CredentialResolutionError extends Error {
4257
4302
  constructor(message: string);
4258
4303
  }
4259
4304
 
4305
+ /**
4306
+ * Plugin-facing credential storage.
4307
+ *
4308
+ * {@link storeCredential} writes a credential's plaintext to the secure store,
4309
+ * the same write `assistant credentials set` performs, naming it either by an
4310
+ * existing credential's UUID or by a `"service/field"` string, the same
4311
+ * vocabulary {@link ./resolve-credential.resolveCredential} reads back. A
4312
+ * plugin that obtains a token for itself (an OAuth exchange it drives, a key a
4313
+ * user hands it through its own route) persists it here instead of inventing
4314
+ * its own on-disk secret file.
4315
+ *
4316
+ * ## Plugin scoping
4317
+ *
4318
+ * A plugin may only write credentials whose `field` equals its manifest name,
4319
+ * so `acme` writes `openai/acme` or `stripe/acme` but never `openai/api_key`.
4320
+ * The name comes from the execution context
4321
+ * ({@link ../plugins/plugin-execution-context.getCurrentPluginName}), which the
4322
+ * host establishes around a plugin's hook, tool, and route invocations.
4323
+ *
4324
+ * Unlike the read path, this **fails closed**: with no plugin in context there
4325
+ * is nobody to scope the write to, so it is refused rather than treated as an
4326
+ * unscoped host write. A plugin's module body is evaluated by the loader
4327
+ * outside any context, and an unscoped branch there would let top-level code
4328
+ * overwrite the user's own credentials. Host-internal callers that legitimately
4329
+ * write unscoped (the `credentials/set` route, the CLI behind it) compose
4330
+ * {@link ../tools/credentials/store.storeCredentialValue} directly. This
4331
+ * matches the plugin-owned index (`indexDocument`), which likewise requires a
4332
+ * context because a write with no owner has nothing to attribute.
4333
+ */
4334
+ /**
4335
+ * Raised when a credential cannot be stored: the reference is malformed, the
4336
+ * value is empty or invalid for its service, the secure backend rejected the
4337
+ * write, or the calling plugin is not permitted to write the credential.
4338
+ */
4339
+ export declare class CredentialStoreError extends Error {
4340
+ constructor(message: string);
4341
+ }
4342
+
4260
4343
  /**
4261
4344
  * Delete a conversation, yielding the event loop between row batches, and
4262
4345
  * enqueue vector-store cleanup for the memory segments and summaries the
@@ -4613,7 +4696,7 @@ declare interface InsertedMessage {
4613
4696
  deduplicated: boolean;
4614
4697
  }
4615
4698
 
4616
- declare const INTERFACE_IDS: readonly ["macos", "ios", "cli", "telegram", "phone", "web", "whatsapp", "slack", "email", "chrome-extension", "a2a", "discord", "route"];
4699
+ declare const INTERFACE_IDS: readonly ["macos", "ios", "cli", "telegram", "phone", "web", "whatsapp", "slack", "email", "chrome-extension", "a2a", "discord", "route", "plugin"];
4617
4700
 
4618
4701
  declare type InterfaceId = (typeof INTERFACE_IDS)[number];
4619
4702
 
@@ -4834,14 +4917,34 @@ declare interface LiveVoiceMetricsServerFrame extends LiveVoiceServerFrameBase {
4834
4917
  /** End-of-speech (utterance_end, or ptt_release in manual mode) to first TTS audio. */
4835
4918
  readonly roundTripMs: number | null;
4836
4919
  readonly totalMs: number | null;
4920
+ /**
4921
+ * End-of-turn latency: the local VAD speech-stop mark to the moment the
4922
+ * turn committed. Recorded on every committed turn, and measured from the
4923
+ * same anchor whichever decider owned the boundary, so front-door and Flux
4924
+ * turns are one comparable population. Absent on a turn that never
4925
+ * committed and in push-to-talk mode, where there is no local VAD
4926
+ * speech-stop mark.
4927
+ */
4928
+ readonly endpointCommitLatencyMs?: number;
4837
4929
  /**
4838
4930
  * Semantic-endpointing "hold" decisions taken during the turn. Present only
4839
4931
  * when the endpoint decider was consulted (otherwise the field is absent,
4840
4932
  * keeping frames unchanged).
4841
4933
  */
4842
4934
  readonly endpointHoldCount?: number;
4843
- /** Worst endpoint-decision latency observed during the turn. */
4935
+ /**
4936
+ * Worst endpoint-decision latency observed during the turn. It spans only
4937
+ * the decider's own work, and the two deciders start it at different
4938
+ * moments, so it is a diagnostic rather than a cross-path comparison: read
4939
+ * `endpointCommitLatencyMs` for that.
4940
+ */
4844
4941
  readonly endpointDecisionMaxLatencyMs?: number;
4942
+ /**
4943
+ * Which path decided the turn's endpoint: the front-door hold verdict or
4944
+ * the STT provider's model-integrated end-of-turn. Present under the same
4945
+ * condition as the two fields above.
4946
+ */
4947
+ readonly endpointDecisionSource?: "front-door" | "provider";
4845
4948
  /** Which floor-holding ack actually spoke during the turn, if any. */
4846
4949
  readonly ackSpoken?: "first_delta" | "tool_use";
4847
4950
  /**
@@ -5015,7 +5118,7 @@ declare const LLMCallSiteEnum: z.ZodEnum<{
5015
5118
  skillCategoryInference: "skillCategoryInference";
5016
5119
  inference: "inference";
5017
5120
  vision: "vision";
5018
- voiceFrontDecision: "voiceFrontDecision";
5121
+ voiceProgressNarration: "voiceProgressNarration";
5019
5122
  voiceFrontDoor: "voiceFrontDoor";
5020
5123
  trustRuleSuggestion: "trustRuleSuggestion";
5021
5124
  homeGreeting: "homeGreeting";
@@ -5058,29 +5161,31 @@ declare type MessageMetadata_2 = z.infer<typeof messageMetadataSchema>;
5058
5161
 
5059
5162
  declare const messageMetadataSchema: z.ZodObject<{
5060
5163
  userMessageChannel: z.ZodOptional<z.ZodEnum<{
5061
- vellum: "vellum";
5062
- platform: "platform";
5063
- telegram: "telegram";
5064
5164
  phone: "phone";
5165
+ platform: "platform";
5166
+ a2a: "a2a";
5167
+ vellum: "vellum";
5065
5168
  whatsapp: "whatsapp";
5169
+ discord: "discord";
5170
+ telegram: "telegram";
5066
5171
  slack: "slack";
5067
5172
  email: "email";
5068
- a2a: "a2a";
5069
- discord: "discord";
5173
+ plugin: "plugin";
5070
5174
  }>>;
5071
5175
  assistantMessageChannel: z.ZodOptional<z.ZodEnum<{
5072
- vellum: "vellum";
5073
- platform: "platform";
5074
- telegram: "telegram";
5075
5176
  phone: "phone";
5177
+ platform: "platform";
5178
+ a2a: "a2a";
5179
+ vellum: "vellum";
5076
5180
  whatsapp: "whatsapp";
5181
+ discord: "discord";
5182
+ telegram: "telegram";
5077
5183
  slack: "slack";
5078
5184
  email: "email";
5079
- a2a: "a2a";
5080
- discord: "discord";
5185
+ plugin: "plugin";
5081
5186
  }>>;
5082
- userMessageInterface: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<"telegram" | "phone" | "whatsapp" | "slack" | "email" | "a2a" | "discord" | "macos" | "ios" | "cli" | "web" | "chrome-extension" | "route" | null, string>> & z.ZodType<"telegram" | "phone" | "whatsapp" | "slack" | "email" | "a2a" | "discord" | "macos" | "ios" | "cli" | "web" | "chrome-extension" | "route", string, z.core.$ZodTypeInternals<"telegram" | "phone" | "whatsapp" | "slack" | "email" | "a2a" | "discord" | "macos" | "ios" | "cli" | "web" | "chrome-extension" | "route", string>>>;
5083
- assistantMessageInterface: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<"telegram" | "phone" | "whatsapp" | "slack" | "email" | "a2a" | "discord" | "macos" | "ios" | "cli" | "web" | "chrome-extension" | "route" | null, string>> & z.ZodType<"telegram" | "phone" | "whatsapp" | "slack" | "email" | "a2a" | "discord" | "macos" | "ios" | "cli" | "web" | "chrome-extension" | "route", string, z.core.$ZodTypeInternals<"telegram" | "phone" | "whatsapp" | "slack" | "email" | "a2a" | "discord" | "macos" | "ios" | "cli" | "web" | "chrome-extension" | "route", string>>>;
5187
+ userMessageInterface: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<"phone" | "a2a" | "whatsapp" | "discord" | "telegram" | "slack" | "email" | "plugin" | "macos" | "ios" | "cli" | "web" | "chrome-extension" | "route" | null, string>> & z.ZodType<"phone" | "a2a" | "whatsapp" | "discord" | "telegram" | "slack" | "email" | "plugin" | "macos" | "ios" | "cli" | "web" | "chrome-extension" | "route", string, z.core.$ZodTypeInternals<"phone" | "a2a" | "whatsapp" | "discord" | "telegram" | "slack" | "email" | "plugin" | "macos" | "ios" | "cli" | "web" | "chrome-extension" | "route", string>>>;
5188
+ assistantMessageInterface: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<"phone" | "a2a" | "whatsapp" | "discord" | "telegram" | "slack" | "email" | "plugin" | "macos" | "ios" | "cli" | "web" | "chrome-extension" | "route" | null, string>> & z.ZodType<"phone" | "a2a" | "whatsapp" | "discord" | "telegram" | "slack" | "email" | "plugin" | "macos" | "ios" | "cli" | "web" | "chrome-extension" | "route", string, z.core.$ZodTypeInternals<"phone" | "a2a" | "whatsapp" | "discord" | "telegram" | "slack" | "email" | "plugin" | "macos" | "ios" | "cli" | "web" | "chrome-extension" | "route", string>>>;
5084
5189
  client: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
5085
5190
  clientOsFromRequest: z.ZodOptional<z.ZodBoolean>;
5086
5191
  subagentNotification: z.ZodOptional<z.ZodObject<{
@@ -5108,15 +5213,16 @@ declare const messageMetadataSchema: z.ZodObject<{
5108
5213
  }>>;
5109
5214
  model: z.ZodOptional<z.ZodString>;
5110
5215
  provenanceSourceChannel: z.ZodOptional<z.ZodEnum<{
5111
- vellum: "vellum";
5112
- platform: "platform";
5113
- telegram: "telegram";
5114
5216
  phone: "phone";
5217
+ platform: "platform";
5218
+ a2a: "a2a";
5219
+ vellum: "vellum";
5115
5220
  whatsapp: "whatsapp";
5221
+ discord: "discord";
5222
+ telegram: "telegram";
5116
5223
  slack: "slack";
5117
5224
  email: "email";
5118
- a2a: "a2a";
5119
- discord: "discord";
5225
+ plugin: "plugin";
5120
5226
  }>>;
5121
5227
  provenanceGuardianExternalUserId: z.ZodOptional<z.ZodString>;
5122
5228
  provenanceRequesterIdentifier: z.ZodOptional<z.ZodString>;
@@ -5133,8 +5239,8 @@ declare const messageMetadataSchema: z.ZodObject<{
5133
5239
  command: z.ZodString;
5134
5240
  startedAt: z.ZodNumber;
5135
5241
  status: z.ZodEnum<{
5136
- completed: "completed";
5137
5242
  cancelled: "cancelled";
5243
+ completed: "completed";
5138
5244
  failed: "failed";
5139
5245
  }>;
5140
5246
  exitCode: z.ZodNullable<z.ZodNumber>;
@@ -5804,7 +5910,7 @@ export declare const REFUSAL_FALLBACK_TEXT = "Sorry \u2014 I wasn't able to gene
5804
5910
  /** Remove one document from the calling plugin's index. */
5805
5911
  export declare function removeDocument(documentId: string): Promise<void>;
5806
5912
 
5807
- declare type ResolutionFallbackReason = "missing" | "disabled" | "incomplete";
5913
+ declare type ResolutionFallbackReason = "missing" | "disabled" | "incomplete" | "unresolvable";
5808
5914
 
5809
5915
  /**
5810
5916
  * Resolves a fully-specified `LLMConfigBase` for a given call site.
@@ -5860,6 +5966,15 @@ declare type ResolutionFallbackReason = "missing" | "disabled" | "incomplete";
5860
5966
  */
5861
5967
  declare interface ResolveCallSiteOpts {
5862
5968
  overrideProfile?: string;
5969
+ /**
5970
+ * Whether a profile's provider value can actually dispatch: a known
5971
+ * vendor, or a connection entry row. Selection is pure and DB-blind, so
5972
+ * dispatch-side callers supply this (see `dispatchProviderResolvable` in
5973
+ * `connection-resolution.ts`); a profile failing it is unusable and
5974
+ * selection falls through to the next rung, keeping model and transport
5975
+ * coherent. When absent, every provider is assumed resolvable.
5976
+ */
5977
+ isResolvableProvider?: (provider: string) => boolean;
5863
5978
  /**
5864
5979
  * Float `overrideProfile` above the call-site layers for non-main-agent call
5865
5980
  * sites. Retained for API compatibility; under single-winner selection the
@@ -5966,6 +6081,21 @@ export declare function resolveMediaSourceData(source: MediaSource_2): {
5966
6081
  media_type: string;
5967
6082
  } | null;
5968
6083
 
6084
+ /**
6085
+ * Resolve the redirect URI an authorization server should send the user
6086
+ * back to.
6087
+ *
6088
+ * Takes no arguments on purpose: every caller shares one route, so there
6089
+ * is nothing to vary. That is what makes the URI stable across callers and
6090
+ * across attempts, which is what an exact-match `redirect_uri` check needs.
6091
+ *
6092
+ * @throws when no public ingress is configured and the assistant is not
6093
+ * connected to the platform. There is no URL that would work in that
6094
+ * case, and returning a plausible one produces an authorization request
6095
+ * whose callback silently never arrives.
6096
+ */
6097
+ export declare function resolveOauthCallbackUrl(): Promise<string>;
6098
+
5969
6099
  /**
5970
6100
  * Read the user's display name from the guardian's persona file
5971
6101
  * (`users/<slug>.md`, resolved via the guardian-delivery binding), falling
@@ -5992,6 +6122,23 @@ export declare function resolveUserName(workspaceDir: string): string | null;
5992
6122
  */
5993
6123
  export declare function resolveWebhookUrl(options: WebhookUrlOptions): Promise<string>;
5994
6124
 
6125
+ declare type RiskAllowlistOption = z.infer<typeof RiskAllowlistOptionSchema>;
6126
+
6127
+ /** Minimatch ladder for the "always allow" prompt option (what a rule matches). */
6128
+ declare const RiskAllowlistOptionSchema: z.ZodObject<{
6129
+ label: z.ZodString;
6130
+ description: z.ZodString;
6131
+ pattern: z.ZodString;
6132
+ }, z.core.$strip>;
6133
+
6134
+ declare type RiskDirectoryScopeOption = z.infer<typeof RiskDirectoryScopeOptionSchema>;
6135
+
6136
+ /** Directory ladder for filesystem operations; `scope` is a path glob or `everywhere`. */
6137
+ declare const RiskDirectoryScopeOptionSchema: z.ZodObject<{
6138
+ scope: z.ZodString;
6139
+ label: z.ZodString;
6140
+ }, z.core.$strip>;
6141
+
5995
6142
  export declare enum RiskLevel {
5996
6143
  Low = "low",
5997
6144
  Medium = "medium",
@@ -6022,9 +6169,22 @@ export declare function runConversationTurn(options: RunConversationTurnOptions)
6022
6169
  export declare interface RunConversationTurnOptions {
6023
6170
  /**
6024
6171
  * Conversation to run the turn in. If omitted, a new conversation is
6025
- * created (its ID is generated with `uuidv7` and returned in the result).
6172
+ * created (its ID is generated with `uuidv7` and returned in the result),
6173
+ * unless {@link RunConversationTurnOptions.channel} says which chat this
6174
+ * belongs to, in which case that chat's conversation is used.
6026
6175
  */
6027
6176
  conversationId?: string;
6177
+ /**
6178
+ * The chat this turn belongs to, resolved to a conversation and bound to
6179
+ * the channel. See {@link ConversationChannelAddress}.
6180
+ *
6181
+ * Ignored when `conversationId` is given: an explicit conversation is the
6182
+ * caller saying which one, and re-resolving would overrule it. A caller
6183
+ * that wants both the binding and a conversation of its own choosing is
6184
+ * describing two different conversations, which is a bug worth surfacing
6185
+ * as one rather than silently picking a winner.
6186
+ */
6187
+ channel?: ConversationChannelAddress;
6028
6188
  /**
6029
6189
  * User message content blocks for this turn. Text blocks become the
6030
6190
  * user message body; image/file blocks are resolved to inline
@@ -6406,6 +6566,43 @@ declare interface StopInputContext {
6406
6566
  readonly exitReason: AgentLoopExitReason;
6407
6567
  }
6408
6568
 
6569
+ /**
6570
+ * Store a credential's plaintext value, creating it or replacing the value of
6571
+ * an existing one.
6572
+ *
6573
+ * @param ref A credential UUID (an existing credential) or a `"service/field"`
6574
+ * string (created when no such credential exists).
6575
+ * @param value The plaintext value. Edge whitespace is trimmed.
6576
+ * @returns The identity of the stored credential, which
6577
+ * {@link ./resolve-credential.resolveCredential} accepts as a ref.
6578
+ * @throws {CredentialStoreError} when no plugin is in context, the ref is
6579
+ * malformed or names no credential, the value is empty or invalid for its
6580
+ * service, the store rejects the write, or the calling plugin is not scoped
6581
+ * to the credential.
6582
+ */
6583
+ export declare function storeCredential(ref: string, value: string, options?: StoreCredentialOptions): Promise<StoredCredentialRef>;
6584
+
6585
+ export declare interface StoreCredentialOptions {
6586
+ /** Human-friendly alias shown in credential listings. */
6587
+ label?: string;
6588
+ /** What the credential is for, surfaced to the agent. */
6589
+ description?: string;
6590
+ /**
6591
+ * Skip the retroactive sweep that removes the value from recent transcripts.
6592
+ * The sweep exists because a secret is often pasted into chat before it is
6593
+ * stored; pass `true` only for a value that provably never transited a
6594
+ * conversation, such as a token minted by an OAuth refresh.
6595
+ */
6596
+ skipTranscriptScrub?: boolean;
6597
+ }
6598
+
6599
+ /** Identity of the credential that was written. */
6600
+ export declare interface StoredCredentialRef {
6601
+ credentialId: string;
6602
+ service: string;
6603
+ field: string;
6604
+ }
6605
+
6409
6606
  /**
6410
6607
  * Daemon-hosted streaming transcriber contract.
6411
6608
  *
@@ -6511,13 +6708,32 @@ export declare type SttErrorCategory =
6511
6708
  * Canonical provider identifiers for daemon-hosted STT backends.
6512
6709
  * Extend this union as new providers are integrated.
6513
6710
  */
6514
- export declare type SttProviderId = "openai-whisper" | "deepgram" | "google-gemini" | "xai" | "vellum";
6711
+ export declare type SttProviderId = "openai-whisper" | "deepgram"
6712
+ /**
6713
+ * Deepgram's Flux conversational speech model. Shares the `deepgram`
6714
+ * credential and is streaming-only: Flux has no batch endpoint.
6715
+ */
6716
+ | "deepgram-flux" | "google-gemini" | "xai" | "vellum";
6515
6717
 
6516
6718
  /** The streaming session has closed (no more events will be emitted). */
6517
6719
  export declare interface SttStreamServerClosedEvent {
6518
6720
  readonly type: "closed";
6519
6721
  }
6520
6722
 
6723
+ /**
6724
+ * The provider's turn model speculates the user has finished, ahead of its
6725
+ * committed end-of-turn decision. A {@link SttStreamServerTurnResumedEvent}
6726
+ * retracts the speculation; a {@link SttStreamServerTurnEndEvent} confirms it.
6727
+ *
6728
+ * Emitted only by providers with model-integrated turn detection; providers
6729
+ * without it never emit these.
6730
+ */
6731
+ export declare interface SttStreamServerEagerTurnEndEvent {
6732
+ readonly type: "eager-turn-end";
6733
+ /** Transcript text as of the speculated turn end. */
6734
+ readonly text: string;
6735
+ }
6736
+
6521
6737
  /** An error occurred during streaming transcription. */
6522
6738
  export declare interface SttStreamServerErrorEvent {
6523
6739
  readonly type: "error";
@@ -6534,7 +6750,7 @@ export declare interface SttStreamServerErrorEvent {
6534
6750
  * and final transcripts, errors, and session lifecycle signals in a
6535
6751
  * type-safe manner.
6536
6752
  */
6537
- export declare type SttStreamServerEvent = SttStreamServerPartialEvent | SttStreamServerFinalEvent | SttStreamServerFinalizedEvent | SttStreamServerErrorEvent | SttStreamServerClosedEvent;
6753
+ export declare type SttStreamServerEvent = SttStreamServerPartialEvent | SttStreamServerFinalEvent | SttStreamServerFinalizedEvent | SttStreamServerTurnStartEvent | SttStreamServerEagerTurnEndEvent | SttStreamServerTurnResumedEvent | SttStreamServerTurnEndEvent | SttStreamServerErrorEvent | SttStreamServerClosedEvent;
6538
6754
 
6539
6755
  /**
6540
6756
  * A final (committed) transcript — this segment will not be revised.
@@ -6600,6 +6816,59 @@ export declare interface SttStreamServerPartialEvent {
6600
6816
  readonly languages?: readonly string[];
6601
6817
  }
6602
6818
 
6819
+ /**
6820
+ * The provider's turn model committed an end of turn: the user has finished
6821
+ * speaking and a reply can be dispatched.
6822
+ *
6823
+ * Emitted only by providers with model-integrated turn detection; providers
6824
+ * without it never emit these.
6825
+ */
6826
+ export declare interface SttStreamServerTurnEndEvent {
6827
+ readonly type: "turn-end";
6828
+ /** Committed transcript text for the completed turn. */
6829
+ readonly text: string;
6830
+ /**
6831
+ * Provider-emitted end-of-turn confidence in [0, 1]. Undefined when the
6832
+ * provider does not surface a score.
6833
+ */
6834
+ readonly confidence?: number;
6835
+ /**
6836
+ * Provider's index for the turn being closed, matching the
6837
+ * {@link SttStreamServerTurnStartEvent} that opened it. A consumer can
6838
+ * compare it against the newest turn it has seen opened to tell an
6839
+ * end-of-turn for the turn still in progress from one the provider has
6840
+ * already superseded. Undefined when the provider does not number its
6841
+ * turns.
6842
+ */
6843
+ readonly turnIndex?: number;
6844
+ }
6845
+
6846
+ /**
6847
+ * The user kept speaking after an {@link SttStreamServerEagerTurnEndEvent},
6848
+ * retracting the speculated turn end.
6849
+ *
6850
+ * Emitted only by providers with model-integrated turn detection; providers
6851
+ * without it never emit these.
6852
+ */
6853
+ export declare interface SttStreamServerTurnResumedEvent {
6854
+ readonly type: "turn-resumed";
6855
+ }
6856
+
6857
+ /**
6858
+ * The provider's turn model detected the start of a user turn.
6859
+ *
6860
+ * Emitted only by providers with model-integrated turn detection; providers
6861
+ * without it never emit these.
6862
+ */
6863
+ export declare interface SttStreamServerTurnStartEvent {
6864
+ readonly type: "turn-start";
6865
+ /**
6866
+ * Provider's index for the turn being opened, monotonically increasing
6867
+ * within a stream. Undefined when the provider does not number its turns.
6868
+ */
6869
+ readonly turnIndex?: number;
6870
+ }
6871
+
6603
6872
  declare type SubscriberEntry = ClientEntry | ProcessEntry;
6604
6873
 
6605
6874
  /** Input shape for `subscribe()` — hub fills `active`, `connectedAt`, `lastActiveAt`, `connectionId` and defaults `filter`/`onEvict`. */
@@ -7112,16 +7381,9 @@ export declare interface ToolExecutionResult {
7112
7381
  * wildcards) — what the gateway actually matches against. Mirrors
7113
7382
  * the `allowlistOptions` field on `ConfirmationRequest` SSE events.
7114
7383
  */
7115
- riskAllowlistOptions?: Array<{
7116
- label: string;
7117
- description: string;
7118
- pattern: string;
7119
- }>;
7384
+ riskAllowlistOptions?: RiskAllowlistOption[];
7120
7385
  /** Directory scope ladder for the rule editor (narrowest to broadest). */
7121
- riskDirectoryScopeOptions?: Array<{
7122
- scope: string;
7123
- label: string;
7124
- }>;
7386
+ riskDirectoryScopeOptions?: RiskDirectoryScopeOption[];
7125
7387
  /** Structured activity metadata for client rendering (web search, web fetch, etc).
7126
7388
  * Populated by daemon-internal tools; plugins must not set this. */
7127
7389
  activityMetadata?: ToolActivityMetadata;
@@ -7336,6 +7598,11 @@ declare interface UserPromptSubmitInputContext {
7336
7598
  * user speech (e.g. title generation) should skip these turns.
7337
7599
  */
7338
7600
  readonly isHiddenPrompt?: boolean;
7601
+ /**
7602
+ * Daemon-authored kind from the triggering row's `metadata.messageKind`,
7603
+ * when the turn needs a more specific identity than role or visibility.
7604
+ */
7605
+ readonly messageKind?: string;
7339
7606
  /**
7340
7607
  * The user's original message list, immutable for the hook. Plugins
7341
7608
  * may snapshot or compare against this but MUST NOT mutate it.
@@ -7354,6 +7621,13 @@ export declare interface VideoEmbeddingInput {
7354
7621
  mimeType: string;
7355
7622
  }
7356
7623
 
7624
+ /**
7625
+ * Message kind for the hidden user row that starts a voice escalation leg.
7626
+ * Hooks use this marker to distinguish the continuation instruction from
7627
+ * other transcript-suppressed prompts without depending on host voice code.
7628
+ */
7629
+ export declare const VOICE_ESCALATION_CONTINUATION_MESSAGE_KIND = "voice_escalation_continuation";
7630
+
7357
7631
  declare interface WebFetchMetadata {
7358
7632
  url: string;
7359
7633
  finalUrl: string;
package/index.js CHANGED
@@ -2,11 +2,13 @@
2
2
  const api = globalThis[Symbol.for("vellum.plugin-api")] ?? {};
3
3
  export const CLI_COMMAND_HELP = api.CLI_COMMAND_HELP;
4
4
  export const CredentialResolutionError = api.CredentialResolutionError;
5
+ export const CredentialStoreError = api.CredentialStoreError;
5
6
  export const HOOKS = api.HOOKS;
6
7
  export const INTERNAL_NUDGE_OUTPUT_SUPPRESSION = api.INTERNAL_NUDGE_OUTPUT_SUPPRESSION;
7
8
  export const REFUSAL_FALLBACK_TEXT = api.REFUSAL_FALLBACK_TEXT;
8
9
  export const RiskLevel = api.RiskLevel;
9
10
  export const TtsSynthesisError = api.TtsSynthesisError;
11
+ export const VOICE_ESCALATION_CONTINUATION_MESSAGE_KIND = api.VOICE_ESCALATION_CONTINUATION_MESSAGE_KIND;
10
12
  export const addMessage = api.addMessage;
11
13
  export const assistantEventHub = api.assistantEventHub;
12
14
  export const buildMessageExcerpt = api.buildMessageExcerpt;
@@ -44,11 +46,13 @@ export const queryIndex = api.queryIndex;
44
46
  export const removeDocument = api.removeDocument;
45
47
  export const resolveCredential = api.resolveCredential;
46
48
  export const resolveMediaSourceData = api.resolveMediaSourceData;
49
+ export const resolveOauthCallbackUrl = api.resolveOauthCallbackUrl;
47
50
  export const resolveUserName = api.resolveUserName;
48
51
  export const resolveWebhookUrl = api.resolveWebhookUrl;
49
52
  export const runConversationTurn = api.runConversationTurn;
50
53
  export const searchMessageIdsLexical = api.searchMessageIdsLexical;
51
54
  export const selectedBackendSupportsMultimodal = api.selectedBackendSupportsMultimodal;
55
+ export const storeCredential = api.storeCredential;
52
56
  export const stringifyMessageContent = api.stringifyMessageContent;
53
57
  export const sweepOrphanedGraphNodePoints = api.sweepOrphanedGraphNodePoints;
54
58
  export const syncMessageToDisk = api.syncMessageToDisk;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vellumai/plugin-api",
3
- "version": "0.11.3",
3
+ "version": "0.11.4-dev.202608190019.b94dbf2",
4
4
  "description": "Public TypeScript authoring contract for Vellum assistant plugins.",
5
5
  "license": "MIT",
6
6
  "type": "module",