@vellumai/plugin-api 0.10.0 → 0.10.1-dev.202606240317.ea25efe
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 +52 -35
- package/index.js +1 -1
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -561,19 +561,19 @@ declare interface BundleAppResponse {
|
|
|
561
561
|
};
|
|
562
562
|
}
|
|
563
563
|
|
|
564
|
-
declare
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
templateData
|
|
576
|
-
}
|
|
564
|
+
declare type CardSurfaceData = z.infer<typeof CardSurfaceDataSchema>;
|
|
565
|
+
|
|
566
|
+
declare const CardSurfaceDataSchema: z.ZodObject<{
|
|
567
|
+
title: z.ZodOptional<z.ZodString>;
|
|
568
|
+
subtitle: z.ZodOptional<z.ZodString>;
|
|
569
|
+
body: z.ZodOptional<z.ZodString>;
|
|
570
|
+
metadata: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
571
|
+
label: z.ZodCoercedString<unknown>;
|
|
572
|
+
value: z.ZodCoercedString<unknown>;
|
|
573
|
+
}, z.core.$strip>>>;
|
|
574
|
+
template: z.ZodOptional<z.ZodString>;
|
|
575
|
+
templateData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
576
|
+
}, z.core.$strip>;
|
|
577
577
|
|
|
578
578
|
declare const CHANNEL_IDS: readonly ["telegram", "phone", "vellum", "whatsapp", "slack", "email", "platform", "a2a"];
|
|
579
579
|
|
|
@@ -1244,6 +1244,15 @@ declare interface DocumentSaveResponse {
|
|
|
1244
1244
|
|
|
1245
1245
|
declare type _DocumentsServerMessages = DocumentEditorShow | DocumentEditorUpdateEvent | DocumentSaveResponse | DocumentLoadResponse | DocumentListResponse;
|
|
1246
1246
|
|
|
1247
|
+
/**
|
|
1248
|
+
* Whether the given model or profile can process image input.
|
|
1249
|
+
*
|
|
1250
|
+
* `modelOrProfile` may be a concrete model id, a profile key, or a
|
|
1251
|
+
* {@link ModelProfileInfo}. A bare string is resolved as a model id first and,
|
|
1252
|
+
* failing that, as a profile key. Returns `false` when nothing resolves.
|
|
1253
|
+
*/
|
|
1254
|
+
export declare function doesSupportVision(modelOrProfile: ModelProfileInfo | string): boolean;
|
|
1255
|
+
|
|
1247
1256
|
declare interface DynamicPagePreview {
|
|
1248
1257
|
title: string;
|
|
1249
1258
|
subtitle?: string;
|
|
@@ -1485,7 +1494,9 @@ export declare function getConfiguredProvider(callSite: LLMCallSite, opts?: {
|
|
|
1485
1494
|
/**
|
|
1486
1495
|
* List the workspace inference profiles a plugin can route to, in the order the
|
|
1487
1496
|
* `/model` picker presents them (`llm.profileOrder` first, then the rest
|
|
1488
|
-
* alphabetically).
|
|
1497
|
+
* alphabetically). Metadata-only entries without a provider, model, or mix are
|
|
1498
|
+
* not routing targets, so plugins never see them. Disabled profiles are
|
|
1499
|
+
* included and flagged via
|
|
1489
1500
|
* {@link ModelProfileInfo.isDisabled}; weighted "mix" profiles are included and
|
|
1490
1501
|
* flagged via {@link ModelProfileInfo.isMix}, since a mix is itself a valid
|
|
1491
1502
|
* routing target (it resolves to one constituent per conversation).
|
|
@@ -1495,12 +1506,6 @@ export declare function getConfiguredProvider(callSite: LLMCallSite, opts?: {
|
|
|
1495
1506
|
*/
|
|
1496
1507
|
export declare function getModelProfiles(): ModelProfileInfo[];
|
|
1497
1508
|
|
|
1498
|
-
/**
|
|
1499
|
-
* Retrieve a secret from secure storage. Convenience wrapper over
|
|
1500
|
-
* `getSecureKeyResultAsync` that returns only the value.
|
|
1501
|
-
*/
|
|
1502
|
-
export declare function getSecureKeyAsync(account: string): Promise<string | undefined>;
|
|
1503
|
-
|
|
1504
1509
|
declare interface GetSigningIdentityRequest {
|
|
1505
1510
|
type: "get_signing_identity";
|
|
1506
1511
|
requestId: string;
|
|
@@ -1535,11 +1540,9 @@ declare interface GuardianDecisionAction {
|
|
|
1535
1540
|
}
|
|
1536
1541
|
|
|
1537
1542
|
/**
|
|
1538
|
-
* Shared types for
|
|
1539
|
-
*
|
|
1540
|
-
*
|
|
1541
|
-
* parser, requester self-cancel) use these types to route through the
|
|
1542
|
-
* unified `applyGuardianDecision` primitive.
|
|
1543
|
+
* Shared types and render helpers for guardian decision prompts: the prompt
|
|
1544
|
+
* model shown to guardians, the canonical action constants, and the
|
|
1545
|
+
* legend/fallback builders used to present them on rich and plain-text channels.
|
|
1543
1546
|
*/
|
|
1544
1547
|
/** Structured model for prompts shown to guardians. */
|
|
1545
1548
|
declare interface GuardianDecisionPrompt {
|
|
@@ -2185,6 +2188,7 @@ declare const LLMCallSiteEnum: z.ZodEnum<{
|
|
|
2185
2188
|
meetChatOpportunity: "meetChatOpportunity";
|
|
2186
2189
|
inference: "inference";
|
|
2187
2190
|
advisor: "advisor";
|
|
2191
|
+
vision: "vision";
|
|
2188
2192
|
trustRuleSuggestion: "trustRuleSuggestion";
|
|
2189
2193
|
homeGreeting: "homeGreeting";
|
|
2190
2194
|
homeSuggestedPrompts: "homeSuggestedPrompts";
|
|
@@ -2447,7 +2451,7 @@ declare const MessageRequestCompleteEventSchema: z.ZodObject<{
|
|
|
2447
2451
|
runStillActive: z.ZodOptional<z.ZodBoolean>;
|
|
2448
2452
|
}, z.core.$strip>;
|
|
2449
2453
|
|
|
2450
|
-
declare type _MessagesServerMessages = UserMessageEchoEvent | AssistantTurnStartEvent | AssistantTextDeltaEvent | AssistantThinkingDeltaEvent | ToolUseStartEvent | ToolUsePreviewStartEvent | ToolOutputChunkEvent | ToolInputDelta | ToolResultEvent | ConfirmationRequestEvent | SecretRequestEvent | QuestionRequestEvent | MessageCompleteEvent | ErrorEvent_2 | MessageQueuedEvent | MessageDequeuedEvent | MessageRequestCompleteEvent | MessageQueuedDeletedEvent | MessageSteered | SuggestionResponse | TraceEvent | ConfirmationStateChanged | AssistantActivityStateEvent |
|
|
2454
|
+
declare type _MessagesServerMessages = UserMessageEchoEvent | AssistantTurnStartEvent | AssistantTextDeltaEvent | AssistantThinkingDeltaEvent | ToolUseStartEvent | ToolUsePreviewStartEvent | ToolOutputChunkEvent | ToolInputDelta | ToolResultEvent | ConfirmationRequestEvent | SecretRequestEvent | QuestionRequestEvent | MessageCompleteEvent | ErrorEvent_2 | MessageQueuedEvent | MessageDequeuedEvent | MessageRequestCompleteEvent | MessageQueuedDeletedEvent | MessageSteered | SuggestionResponse | TraceEvent | ConfirmationStateChanged | AssistantActivityStateEvent | ConversationInferenceProfileUpdated | InteractionResolvedEvent;
|
|
2451
2455
|
|
|
2452
2456
|
declare interface MessageSteered {
|
|
2453
2457
|
type: "message_steered";
|
|
@@ -3045,7 +3049,28 @@ export declare interface Provider {
|
|
|
3045
3049
|
* Falls back to `name` when unset.
|
|
3046
3050
|
*/
|
|
3047
3051
|
tokenEstimationProvider?: string;
|
|
3052
|
+
/**
|
|
3053
|
+
* True when this provider instance was constructed to run web search
|
|
3054
|
+
* server-side (provider-native). The native search only activates when a
|
|
3055
|
+
* `web_search`-named tool is passed in the request, so callers that want to
|
|
3056
|
+
* enable web search on a one-shot completion (e.g. the advisor consult) check
|
|
3057
|
+
* this first — passing the tool to a non-native instance would surface an
|
|
3058
|
+
* unexecutable client tool call. Absent/false on providers without it.
|
|
3059
|
+
*/
|
|
3060
|
+
supportsNativeWebSearch?: boolean;
|
|
3048
3061
|
sendMessage(messages: Message[], options?: SendMessageOptions): Promise<ProviderResponse>;
|
|
3062
|
+
/**
|
|
3063
|
+
* Exact prompt-token count from the provider's own tokenizer, for the
|
|
3064
|
+
* `messages` + `systemPrompt` + `tools` composition the next call would
|
|
3065
|
+
* send. Optional: providers without a token-counting endpoint omit it, and
|
|
3066
|
+
* callers must fall back to the local estimator (`estimatePromptTokens`).
|
|
3067
|
+
*
|
|
3068
|
+
* This runs a dedicated counting request (no inference), so it carries a
|
|
3069
|
+
* network round-trip and the provider's own rate limit — use it for
|
|
3070
|
+
* user-initiated, occasional actions (e.g. `/compact`), never on the
|
|
3071
|
+
* per-turn hot path.
|
|
3072
|
+
*/
|
|
3073
|
+
countInputTokens?(messages: Message[], systemPrompt: string, tools?: ToolDefinition_2[]): Promise<number>;
|
|
3049
3074
|
}
|
|
3050
3075
|
|
|
3051
3076
|
export declare type ProviderEvent = {
|
|
@@ -4000,6 +4025,7 @@ declare const ToolDefinitionSchema: z.ZodObject<{
|
|
|
4000
4025
|
host: "host";
|
|
4001
4026
|
}>>;
|
|
4002
4027
|
execute: z.ZodOptional<z.ZodCustom<(input: Record<string, unknown>, context: ToolContext) => Promise<ToolExecutionResult>, (input: Record<string, unknown>, context: ToolContext) => Promise<ToolExecutionResult>>>;
|
|
4028
|
+
exclusive: z.ZodOptional<z.ZodBoolean>;
|
|
4003
4029
|
}, z.core.$strip>;
|
|
4004
4030
|
|
|
4005
4031
|
/**
|
|
@@ -4442,15 +4468,6 @@ declare const TraceEventSchema: z.ZodObject<{
|
|
|
4442
4468
|
*/
|
|
4443
4469
|
declare type TrustClass = "guardian" | "trusted_contact" | "unverified_contact" | "unknown";
|
|
4444
4470
|
|
|
4445
|
-
declare type TurnProfileAutoRoutedEvent = z.infer<typeof TurnProfileAutoRoutedEventSchema>;
|
|
4446
|
-
|
|
4447
|
-
declare const TurnProfileAutoRoutedEventSchema: z.ZodObject<{
|
|
4448
|
-
type: z.ZodLiteral<"turn_profile_auto_routed">;
|
|
4449
|
-
conversationId: z.ZodString;
|
|
4450
|
-
profile: z.ZodString;
|
|
4451
|
-
profileLabel: z.ZodString;
|
|
4452
|
-
}, z.core.$strip>;
|
|
4453
|
-
|
|
4454
4471
|
declare interface UiSurfaceComplete {
|
|
4455
4472
|
type: "ui_surface_complete";
|
|
4456
4473
|
conversationId: string;
|
package/index.js
CHANGED
|
@@ -3,6 +3,6 @@ const api = globalThis[Symbol.for("vellum.plugin-api")] ?? {};
|
|
|
3
3
|
export const HOOKS = api.HOOKS;
|
|
4
4
|
export const RiskLevel = api.RiskLevel;
|
|
5
5
|
export const assistantEventHub = api.assistantEventHub;
|
|
6
|
+
export const doesSupportVision = api.doesSupportVision;
|
|
6
7
|
export const getConfiguredProvider = api.getConfiguredProvider;
|
|
7
8
|
export const getModelProfiles = api.getModelProfiles;
|
|
8
|
-
export const getSecureKeyAsync = api.getSecureKeyAsync;
|