@vellumai/plugin-api 0.11.3 → 0.11.4-staging.1
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.
- package/index.d.ts +240 -64
- package/index.js +1 -0
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -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,24 +594,7 @@ 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.
|
|
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<{
|
|
@@ -725,31 +709,14 @@ declare const AssistantConfigSchema: z.ZodObject<{
|
|
|
725
709
|
skillCategoryInference: "skillCategoryInference";
|
|
726
710
|
inference: "inference";
|
|
727
711
|
vision: "vision";
|
|
728
|
-
|
|
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.
|
|
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<{
|
|
@@ -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
|
-
|
|
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>>;
|
|
@@ -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<{
|
|
@@ -2671,6 +2636,7 @@ declare const AssistantEventPublishOptionsSchema: z.ZodObject<{
|
|
|
2671
2636
|
}>>;
|
|
2672
2637
|
targetClientId: z.ZodOptional<z.ZodString>;
|
|
2673
2638
|
targetInterfaceId: z.ZodOptional<z.ZodEnum<{
|
|
2639
|
+
plugin: "plugin";
|
|
2674
2640
|
telegram: "telegram";
|
|
2675
2641
|
phone: "phone";
|
|
2676
2642
|
whatsapp: "whatsapp";
|
|
@@ -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<{
|
|
@@ -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
|
|
|
@@ -4613,7 +4657,7 @@ declare interface InsertedMessage {
|
|
|
4613
4657
|
deduplicated: boolean;
|
|
4614
4658
|
}
|
|
4615
4659
|
|
|
4616
|
-
declare const INTERFACE_IDS: readonly ["macos", "ios", "cli", "telegram", "phone", "web", "whatsapp", "slack", "email", "chrome-extension", "a2a", "discord", "route"];
|
|
4660
|
+
declare const INTERFACE_IDS: readonly ["macos", "ios", "cli", "telegram", "phone", "web", "whatsapp", "slack", "email", "chrome-extension", "a2a", "discord", "route", "plugin"];
|
|
4617
4661
|
|
|
4618
4662
|
declare type InterfaceId = (typeof INTERFACE_IDS)[number];
|
|
4619
4663
|
|
|
@@ -4834,14 +4878,34 @@ declare interface LiveVoiceMetricsServerFrame extends LiveVoiceServerFrameBase {
|
|
|
4834
4878
|
/** End-of-speech (utterance_end, or ptt_release in manual mode) to first TTS audio. */
|
|
4835
4879
|
readonly roundTripMs: number | null;
|
|
4836
4880
|
readonly totalMs: number | null;
|
|
4881
|
+
/**
|
|
4882
|
+
* End-of-turn latency: the local VAD speech-stop mark to the moment the
|
|
4883
|
+
* turn committed. Recorded on every committed turn, and measured from the
|
|
4884
|
+
* same anchor whichever decider owned the boundary, so front-door and Flux
|
|
4885
|
+
* turns are one comparable population. Absent on a turn that never
|
|
4886
|
+
* committed and in push-to-talk mode, where there is no local VAD
|
|
4887
|
+
* speech-stop mark.
|
|
4888
|
+
*/
|
|
4889
|
+
readonly endpointCommitLatencyMs?: number;
|
|
4837
4890
|
/**
|
|
4838
4891
|
* Semantic-endpointing "hold" decisions taken during the turn. Present only
|
|
4839
4892
|
* when the endpoint decider was consulted (otherwise the field is absent,
|
|
4840
4893
|
* keeping frames unchanged).
|
|
4841
4894
|
*/
|
|
4842
4895
|
readonly endpointHoldCount?: number;
|
|
4843
|
-
/**
|
|
4896
|
+
/**
|
|
4897
|
+
* Worst endpoint-decision latency observed during the turn. It spans only
|
|
4898
|
+
* the decider's own work, and the two deciders start it at different
|
|
4899
|
+
* moments, so it is a diagnostic rather than a cross-path comparison: read
|
|
4900
|
+
* `endpointCommitLatencyMs` for that.
|
|
4901
|
+
*/
|
|
4844
4902
|
readonly endpointDecisionMaxLatencyMs?: number;
|
|
4903
|
+
/**
|
|
4904
|
+
* Which path decided the turn's endpoint: the front-door hold verdict or
|
|
4905
|
+
* the STT provider's model-integrated end-of-turn. Present under the same
|
|
4906
|
+
* condition as the two fields above.
|
|
4907
|
+
*/
|
|
4908
|
+
readonly endpointDecisionSource?: "front-door" | "provider";
|
|
4845
4909
|
/** Which floor-holding ack actually spoke during the turn, if any. */
|
|
4846
4910
|
readonly ackSpoken?: "first_delta" | "tool_use";
|
|
4847
4911
|
/**
|
|
@@ -5015,7 +5079,7 @@ declare const LLMCallSiteEnum: z.ZodEnum<{
|
|
|
5015
5079
|
skillCategoryInference: "skillCategoryInference";
|
|
5016
5080
|
inference: "inference";
|
|
5017
5081
|
vision: "vision";
|
|
5018
|
-
|
|
5082
|
+
voiceProgressNarration: "voiceProgressNarration";
|
|
5019
5083
|
voiceFrontDoor: "voiceFrontDoor";
|
|
5020
5084
|
trustRuleSuggestion: "trustRuleSuggestion";
|
|
5021
5085
|
homeGreeting: "homeGreeting";
|
|
@@ -5058,6 +5122,7 @@ declare type MessageMetadata_2 = z.infer<typeof messageMetadataSchema>;
|
|
|
5058
5122
|
|
|
5059
5123
|
declare const messageMetadataSchema: z.ZodObject<{
|
|
5060
5124
|
userMessageChannel: z.ZodOptional<z.ZodEnum<{
|
|
5125
|
+
plugin: "plugin";
|
|
5061
5126
|
vellum: "vellum";
|
|
5062
5127
|
platform: "platform";
|
|
5063
5128
|
telegram: "telegram";
|
|
@@ -5069,6 +5134,7 @@ declare const messageMetadataSchema: z.ZodObject<{
|
|
|
5069
5134
|
discord: "discord";
|
|
5070
5135
|
}>>;
|
|
5071
5136
|
assistantMessageChannel: z.ZodOptional<z.ZodEnum<{
|
|
5137
|
+
plugin: "plugin";
|
|
5072
5138
|
vellum: "vellum";
|
|
5073
5139
|
platform: "platform";
|
|
5074
5140
|
telegram: "telegram";
|
|
@@ -5079,8 +5145,8 @@ declare const messageMetadataSchema: z.ZodObject<{
|
|
|
5079
5145
|
a2a: "a2a";
|
|
5080
5146
|
discord: "discord";
|
|
5081
5147
|
}>>;
|
|
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>>>;
|
|
5148
|
+
userMessageInterface: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<"plugin" | "telegram" | "phone" | "whatsapp" | "slack" | "email" | "a2a" | "discord" | "macos" | "ios" | "cli" | "web" | "chrome-extension" | "route" | null, string>> & z.ZodType<"plugin" | "telegram" | "phone" | "whatsapp" | "slack" | "email" | "a2a" | "discord" | "macos" | "ios" | "cli" | "web" | "chrome-extension" | "route", string, z.core.$ZodTypeInternals<"plugin" | "telegram" | "phone" | "whatsapp" | "slack" | "email" | "a2a" | "discord" | "macos" | "ios" | "cli" | "web" | "chrome-extension" | "route", string>>>;
|
|
5149
|
+
assistantMessageInterface: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<"plugin" | "telegram" | "phone" | "whatsapp" | "slack" | "email" | "a2a" | "discord" | "macos" | "ios" | "cli" | "web" | "chrome-extension" | "route" | null, string>> & z.ZodType<"plugin" | "telegram" | "phone" | "whatsapp" | "slack" | "email" | "a2a" | "discord" | "macos" | "ios" | "cli" | "web" | "chrome-extension" | "route", string, z.core.$ZodTypeInternals<"plugin" | "telegram" | "phone" | "whatsapp" | "slack" | "email" | "a2a" | "discord" | "macos" | "ios" | "cli" | "web" | "chrome-extension" | "route", string>>>;
|
|
5084
5150
|
client: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
5085
5151
|
clientOsFromRequest: z.ZodOptional<z.ZodBoolean>;
|
|
5086
5152
|
subagentNotification: z.ZodOptional<z.ZodObject<{
|
|
@@ -5108,6 +5174,7 @@ declare const messageMetadataSchema: z.ZodObject<{
|
|
|
5108
5174
|
}>>;
|
|
5109
5175
|
model: z.ZodOptional<z.ZodString>;
|
|
5110
5176
|
provenanceSourceChannel: z.ZodOptional<z.ZodEnum<{
|
|
5177
|
+
plugin: "plugin";
|
|
5111
5178
|
vellum: "vellum";
|
|
5112
5179
|
platform: "platform";
|
|
5113
5180
|
telegram: "telegram";
|
|
@@ -5804,7 +5871,7 @@ export declare const REFUSAL_FALLBACK_TEXT = "Sorry \u2014 I wasn't able to gene
|
|
|
5804
5871
|
/** Remove one document from the calling plugin's index. */
|
|
5805
5872
|
export declare function removeDocument(documentId: string): Promise<void>;
|
|
5806
5873
|
|
|
5807
|
-
declare type ResolutionFallbackReason = "missing" | "disabled" | "incomplete";
|
|
5874
|
+
declare type ResolutionFallbackReason = "missing" | "disabled" | "incomplete" | "unresolvable";
|
|
5808
5875
|
|
|
5809
5876
|
/**
|
|
5810
5877
|
* Resolves a fully-specified `LLMConfigBase` for a given call site.
|
|
@@ -5860,6 +5927,15 @@ declare type ResolutionFallbackReason = "missing" | "disabled" | "incomplete";
|
|
|
5860
5927
|
*/
|
|
5861
5928
|
declare interface ResolveCallSiteOpts {
|
|
5862
5929
|
overrideProfile?: string;
|
|
5930
|
+
/**
|
|
5931
|
+
* Whether a profile's provider value can actually dispatch: a known
|
|
5932
|
+
* vendor, or a connection entry row. Selection is pure and DB-blind, so
|
|
5933
|
+
* dispatch-side callers supply this (see `dispatchProviderResolvable` in
|
|
5934
|
+
* `connection-resolution.ts`); a profile failing it is unusable and
|
|
5935
|
+
* selection falls through to the next rung, keeping model and transport
|
|
5936
|
+
* coherent. When absent, every provider is assumed resolvable.
|
|
5937
|
+
*/
|
|
5938
|
+
isResolvableProvider?: (provider: string) => boolean;
|
|
5863
5939
|
/**
|
|
5864
5940
|
* Float `overrideProfile` above the call-site layers for non-main-agent call
|
|
5865
5941
|
* sites. Retained for API compatibility; under single-winner selection the
|
|
@@ -5966,6 +6042,21 @@ export declare function resolveMediaSourceData(source: MediaSource_2): {
|
|
|
5966
6042
|
media_type: string;
|
|
5967
6043
|
} | null;
|
|
5968
6044
|
|
|
6045
|
+
/**
|
|
6046
|
+
* Resolve the redirect URI an authorization server should send the user
|
|
6047
|
+
* back to.
|
|
6048
|
+
*
|
|
6049
|
+
* Takes no arguments on purpose: every caller shares one route, so there
|
|
6050
|
+
* is nothing to vary. That is what makes the URI stable across callers and
|
|
6051
|
+
* across attempts, which is what an exact-match `redirect_uri` check needs.
|
|
6052
|
+
*
|
|
6053
|
+
* @throws when no public ingress is configured and the assistant is not
|
|
6054
|
+
* connected to the platform. There is no URL that would work in that
|
|
6055
|
+
* case, and returning a plausible one produces an authorization request
|
|
6056
|
+
* whose callback silently never arrives.
|
|
6057
|
+
*/
|
|
6058
|
+
export declare function resolveOauthCallbackUrl(): Promise<string>;
|
|
6059
|
+
|
|
5969
6060
|
/**
|
|
5970
6061
|
* Read the user's display name from the guardian's persona file
|
|
5971
6062
|
* (`users/<slug>.md`, resolved via the guardian-delivery binding), falling
|
|
@@ -6022,9 +6113,22 @@ export declare function runConversationTurn(options: RunConversationTurnOptions)
|
|
|
6022
6113
|
export declare interface RunConversationTurnOptions {
|
|
6023
6114
|
/**
|
|
6024
6115
|
* 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)
|
|
6116
|
+
* created (its ID is generated with `uuidv7` and returned in the result),
|
|
6117
|
+
* unless {@link RunConversationTurnOptions.channel} says which chat this
|
|
6118
|
+
* belongs to, in which case that chat's conversation is used.
|
|
6026
6119
|
*/
|
|
6027
6120
|
conversationId?: string;
|
|
6121
|
+
/**
|
|
6122
|
+
* The chat this turn belongs to, resolved to a conversation and bound to
|
|
6123
|
+
* the channel. See {@link ConversationChannelAddress}.
|
|
6124
|
+
*
|
|
6125
|
+
* Ignored when `conversationId` is given: an explicit conversation is the
|
|
6126
|
+
* caller saying which one, and re-resolving would overrule it. A caller
|
|
6127
|
+
* that wants both the binding and a conversation of its own choosing is
|
|
6128
|
+
* describing two different conversations, which is a bug worth surfacing
|
|
6129
|
+
* as one rather than silently picking a winner.
|
|
6130
|
+
*/
|
|
6131
|
+
channel?: ConversationChannelAddress;
|
|
6028
6132
|
/**
|
|
6029
6133
|
* User message content blocks for this turn. Text blocks become the
|
|
6030
6134
|
* user message body; image/file blocks are resolved to inline
|
|
@@ -6511,13 +6615,32 @@ export declare type SttErrorCategory =
|
|
|
6511
6615
|
* Canonical provider identifiers for daemon-hosted STT backends.
|
|
6512
6616
|
* Extend this union as new providers are integrated.
|
|
6513
6617
|
*/
|
|
6514
|
-
export declare type SttProviderId = "openai-whisper" | "deepgram"
|
|
6618
|
+
export declare type SttProviderId = "openai-whisper" | "deepgram"
|
|
6619
|
+
/**
|
|
6620
|
+
* Deepgram's Flux conversational speech model. Shares the `deepgram`
|
|
6621
|
+
* credential and is streaming-only: Flux has no batch endpoint.
|
|
6622
|
+
*/
|
|
6623
|
+
| "deepgram-flux" | "google-gemini" | "xai" | "vellum";
|
|
6515
6624
|
|
|
6516
6625
|
/** The streaming session has closed (no more events will be emitted). */
|
|
6517
6626
|
export declare interface SttStreamServerClosedEvent {
|
|
6518
6627
|
readonly type: "closed";
|
|
6519
6628
|
}
|
|
6520
6629
|
|
|
6630
|
+
/**
|
|
6631
|
+
* The provider's turn model speculates the user has finished, ahead of its
|
|
6632
|
+
* committed end-of-turn decision. A {@link SttStreamServerTurnResumedEvent}
|
|
6633
|
+
* retracts the speculation; a {@link SttStreamServerTurnEndEvent} confirms it.
|
|
6634
|
+
*
|
|
6635
|
+
* Emitted only by providers with model-integrated turn detection; providers
|
|
6636
|
+
* without it never emit these.
|
|
6637
|
+
*/
|
|
6638
|
+
export declare interface SttStreamServerEagerTurnEndEvent {
|
|
6639
|
+
readonly type: "eager-turn-end";
|
|
6640
|
+
/** Transcript text as of the speculated turn end. */
|
|
6641
|
+
readonly text: string;
|
|
6642
|
+
}
|
|
6643
|
+
|
|
6521
6644
|
/** An error occurred during streaming transcription. */
|
|
6522
6645
|
export declare interface SttStreamServerErrorEvent {
|
|
6523
6646
|
readonly type: "error";
|
|
@@ -6534,7 +6657,7 @@ export declare interface SttStreamServerErrorEvent {
|
|
|
6534
6657
|
* and final transcripts, errors, and session lifecycle signals in a
|
|
6535
6658
|
* type-safe manner.
|
|
6536
6659
|
*/
|
|
6537
|
-
export declare type SttStreamServerEvent = SttStreamServerPartialEvent | SttStreamServerFinalEvent | SttStreamServerFinalizedEvent | SttStreamServerErrorEvent | SttStreamServerClosedEvent;
|
|
6660
|
+
export declare type SttStreamServerEvent = SttStreamServerPartialEvent | SttStreamServerFinalEvent | SttStreamServerFinalizedEvent | SttStreamServerTurnStartEvent | SttStreamServerEagerTurnEndEvent | SttStreamServerTurnResumedEvent | SttStreamServerTurnEndEvent | SttStreamServerErrorEvent | SttStreamServerClosedEvent;
|
|
6538
6661
|
|
|
6539
6662
|
/**
|
|
6540
6663
|
* A final (committed) transcript — this segment will not be revised.
|
|
@@ -6600,6 +6723,59 @@ export declare interface SttStreamServerPartialEvent {
|
|
|
6600
6723
|
readonly languages?: readonly string[];
|
|
6601
6724
|
}
|
|
6602
6725
|
|
|
6726
|
+
/**
|
|
6727
|
+
* The provider's turn model committed an end of turn: the user has finished
|
|
6728
|
+
* speaking and a reply can be dispatched.
|
|
6729
|
+
*
|
|
6730
|
+
* Emitted only by providers with model-integrated turn detection; providers
|
|
6731
|
+
* without it never emit these.
|
|
6732
|
+
*/
|
|
6733
|
+
export declare interface SttStreamServerTurnEndEvent {
|
|
6734
|
+
readonly type: "turn-end";
|
|
6735
|
+
/** Committed transcript text for the completed turn. */
|
|
6736
|
+
readonly text: string;
|
|
6737
|
+
/**
|
|
6738
|
+
* Provider-emitted end-of-turn confidence in [0, 1]. Undefined when the
|
|
6739
|
+
* provider does not surface a score.
|
|
6740
|
+
*/
|
|
6741
|
+
readonly confidence?: number;
|
|
6742
|
+
/**
|
|
6743
|
+
* Provider's index for the turn being closed, matching the
|
|
6744
|
+
* {@link SttStreamServerTurnStartEvent} that opened it. A consumer can
|
|
6745
|
+
* compare it against the newest turn it has seen opened to tell an
|
|
6746
|
+
* end-of-turn for the turn still in progress from one the provider has
|
|
6747
|
+
* already superseded. Undefined when the provider does not number its
|
|
6748
|
+
* turns.
|
|
6749
|
+
*/
|
|
6750
|
+
readonly turnIndex?: number;
|
|
6751
|
+
}
|
|
6752
|
+
|
|
6753
|
+
/**
|
|
6754
|
+
* The user kept speaking after an {@link SttStreamServerEagerTurnEndEvent},
|
|
6755
|
+
* retracting the speculated turn end.
|
|
6756
|
+
*
|
|
6757
|
+
* Emitted only by providers with model-integrated turn detection; providers
|
|
6758
|
+
* without it never emit these.
|
|
6759
|
+
*/
|
|
6760
|
+
export declare interface SttStreamServerTurnResumedEvent {
|
|
6761
|
+
readonly type: "turn-resumed";
|
|
6762
|
+
}
|
|
6763
|
+
|
|
6764
|
+
/**
|
|
6765
|
+
* The provider's turn model detected the start of a user turn.
|
|
6766
|
+
*
|
|
6767
|
+
* Emitted only by providers with model-integrated turn detection; providers
|
|
6768
|
+
* without it never emit these.
|
|
6769
|
+
*/
|
|
6770
|
+
export declare interface SttStreamServerTurnStartEvent {
|
|
6771
|
+
readonly type: "turn-start";
|
|
6772
|
+
/**
|
|
6773
|
+
* Provider's index for the turn being opened, monotonically increasing
|
|
6774
|
+
* within a stream. Undefined when the provider does not number its turns.
|
|
6775
|
+
*/
|
|
6776
|
+
readonly turnIndex?: number;
|
|
6777
|
+
}
|
|
6778
|
+
|
|
6603
6779
|
declare type SubscriberEntry = ClientEntry | ProcessEntry;
|
|
6604
6780
|
|
|
6605
6781
|
/** Input shape for `subscribe()` — hub fills `active`, `connectedAt`, `lastActiveAt`, `connectionId` and defaults `filter`/`onEvict`. */
|
package/index.js
CHANGED
|
@@ -44,6 +44,7 @@ export const queryIndex = api.queryIndex;
|
|
|
44
44
|
export const removeDocument = api.removeDocument;
|
|
45
45
|
export const resolveCredential = api.resolveCredential;
|
|
46
46
|
export const resolveMediaSourceData = api.resolveMediaSourceData;
|
|
47
|
+
export const resolveOauthCallbackUrl = api.resolveOauthCallbackUrl;
|
|
47
48
|
export const resolveUserName = api.resolveUserName;
|
|
48
49
|
export const resolveWebhookUrl = api.resolveWebhookUrl;
|
|
49
50
|
export const runConversationTurn = api.runConversationTurn;
|