@vellumai/plugin-api 0.10.0 → 0.10.1-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 +55 -35
- package/index.js +1 -1
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -561,19 +561,24 @@ declare interface BundleAppResponse {
|
|
|
561
561
|
};
|
|
562
562
|
}
|
|
563
563
|
|
|
564
|
-
declare
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
564
|
+
declare type CardSurfaceData = z.infer<typeof CardSurfaceDataSchema>;
|
|
565
|
+
|
|
566
|
+
/**
|
|
567
|
+
* Card surface data. Defined as a Zod schema so the type is derived (not
|
|
568
|
+
* hand-maintained) and the seed-content-block schema can compose it directly
|
|
569
|
+
* instead of treating card `data` as an opaque record.
|
|
570
|
+
*/
|
|
571
|
+
declare const CardSurfaceDataSchema: z.ZodObject<{
|
|
572
|
+
title: z.ZodString;
|
|
573
|
+
subtitle: z.ZodOptional<z.ZodString>;
|
|
574
|
+
body: z.ZodString;
|
|
575
|
+
metadata: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
576
|
+
label: z.ZodString;
|
|
577
|
+
value: z.ZodString;
|
|
578
|
+
}, z.core.$strip>>>;
|
|
579
|
+
template: z.ZodOptional<z.ZodString>;
|
|
580
|
+
templateData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
581
|
+
}, z.core.$strip>;
|
|
577
582
|
|
|
578
583
|
declare const CHANNEL_IDS: readonly ["telegram", "phone", "vellum", "whatsapp", "slack", "email", "platform", "a2a"];
|
|
579
584
|
|
|
@@ -1244,6 +1249,23 @@ declare interface DocumentSaveResponse {
|
|
|
1244
1249
|
|
|
1245
1250
|
declare type _DocumentsServerMessages = DocumentEditorShow | DocumentEditorUpdateEvent | DocumentSaveResponse | DocumentLoadResponse | DocumentListResponse;
|
|
1246
1251
|
|
|
1252
|
+
/**
|
|
1253
|
+
* Whether a profile's resolved model can process image input.
|
|
1254
|
+
*
|
|
1255
|
+
* Resolution mirrors the host's call-site resolver:
|
|
1256
|
+
* - The profile's `(provider, model)` fields are merged over `llm.default` so
|
|
1257
|
+
* a profile that only sets `model` (or only `provider`) inherits the other
|
|
1258
|
+
* from the workspace default.
|
|
1259
|
+
* - When `provider` is still missing but `model` is a known catalog model,
|
|
1260
|
+
* the provider is inferred via `getCatalogProviderForModel` (same logic as
|
|
1261
|
+
* the resolver's `withImpliedProviderForKnownModel`).
|
|
1262
|
+
* - For a mix profile, returns `true` if any constituent arm supports vision
|
|
1263
|
+
* (the mix can route to it) and `false` only if every arm is text-only.
|
|
1264
|
+
* - Unknown `(provider, model)` pairs default to `true` (fail-open), matching
|
|
1265
|
+
* the config GET route's `enrichProfilesWithVisionFlag`.
|
|
1266
|
+
*/
|
|
1267
|
+
export declare function doesSupportVision(profile: ModelProfileInfo): boolean;
|
|
1268
|
+
|
|
1247
1269
|
declare interface DynamicPagePreview {
|
|
1248
1270
|
title: string;
|
|
1249
1271
|
subtitle?: string;
|
|
@@ -1485,7 +1507,9 @@ export declare function getConfiguredProvider(callSite: LLMCallSite, opts?: {
|
|
|
1485
1507
|
/**
|
|
1486
1508
|
* List the workspace inference profiles a plugin can route to, in the order the
|
|
1487
1509
|
* `/model` picker presents them (`llm.profileOrder` first, then the rest
|
|
1488
|
-
* alphabetically).
|
|
1510
|
+
* alphabetically). Metadata-only entries without a provider, model, or mix are
|
|
1511
|
+
* not routing targets, so plugins never see them. Disabled profiles are
|
|
1512
|
+
* included and flagged via
|
|
1489
1513
|
* {@link ModelProfileInfo.isDisabled}; weighted "mix" profiles are included and
|
|
1490
1514
|
* flagged via {@link ModelProfileInfo.isMix}, since a mix is itself a valid
|
|
1491
1515
|
* routing target (it resolves to one constituent per conversation).
|
|
@@ -1495,12 +1519,6 @@ export declare function getConfiguredProvider(callSite: LLMCallSite, opts?: {
|
|
|
1495
1519
|
*/
|
|
1496
1520
|
export declare function getModelProfiles(): ModelProfileInfo[];
|
|
1497
1521
|
|
|
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
1522
|
declare interface GetSigningIdentityRequest {
|
|
1505
1523
|
type: "get_signing_identity";
|
|
1506
1524
|
requestId: string;
|
|
@@ -1535,11 +1553,9 @@ declare interface GuardianDecisionAction {
|
|
|
1535
1553
|
}
|
|
1536
1554
|
|
|
1537
1555
|
/**
|
|
1538
|
-
* Shared types for
|
|
1539
|
-
*
|
|
1540
|
-
*
|
|
1541
|
-
* parser, requester self-cancel) use these types to route through the
|
|
1542
|
-
* unified `applyGuardianDecision` primitive.
|
|
1556
|
+
* Shared types and render helpers for guardian decision prompts: the prompt
|
|
1557
|
+
* model shown to guardians, the canonical action constants, and the
|
|
1558
|
+
* legend/fallback builders used to present them on rich and plain-text channels.
|
|
1543
1559
|
*/
|
|
1544
1560
|
/** Structured model for prompts shown to guardians. */
|
|
1545
1561
|
declare interface GuardianDecisionPrompt {
|
|
@@ -2185,6 +2201,7 @@ declare const LLMCallSiteEnum: z.ZodEnum<{
|
|
|
2185
2201
|
meetChatOpportunity: "meetChatOpportunity";
|
|
2186
2202
|
inference: "inference";
|
|
2187
2203
|
advisor: "advisor";
|
|
2204
|
+
vision: "vision";
|
|
2188
2205
|
trustRuleSuggestion: "trustRuleSuggestion";
|
|
2189
2206
|
homeGreeting: "homeGreeting";
|
|
2190
2207
|
homeSuggestedPrompts: "homeSuggestedPrompts";
|
|
@@ -2447,7 +2464,7 @@ declare const MessageRequestCompleteEventSchema: z.ZodObject<{
|
|
|
2447
2464
|
runStillActive: z.ZodOptional<z.ZodBoolean>;
|
|
2448
2465
|
}, z.core.$strip>;
|
|
2449
2466
|
|
|
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 |
|
|
2467
|
+
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
2468
|
|
|
2452
2469
|
declare interface MessageSteered {
|
|
2453
2470
|
type: "message_steered";
|
|
@@ -3046,6 +3063,18 @@ export declare interface Provider {
|
|
|
3046
3063
|
*/
|
|
3047
3064
|
tokenEstimationProvider?: string;
|
|
3048
3065
|
sendMessage(messages: Message[], options?: SendMessageOptions): Promise<ProviderResponse>;
|
|
3066
|
+
/**
|
|
3067
|
+
* Exact prompt-token count from the provider's own tokenizer, for the
|
|
3068
|
+
* `messages` + `systemPrompt` + `tools` composition the next call would
|
|
3069
|
+
* send. Optional: providers without a token-counting endpoint omit it, and
|
|
3070
|
+
* callers must fall back to the local estimator (`estimatePromptTokens`).
|
|
3071
|
+
*
|
|
3072
|
+
* This runs a dedicated counting request (no inference), so it carries a
|
|
3073
|
+
* network round-trip and the provider's own rate limit — use it for
|
|
3074
|
+
* user-initiated, occasional actions (e.g. `/compact`), never on the
|
|
3075
|
+
* per-turn hot path.
|
|
3076
|
+
*/
|
|
3077
|
+
countInputTokens?(messages: Message[], systemPrompt: string, tools?: ToolDefinition_2[]): Promise<number>;
|
|
3049
3078
|
}
|
|
3050
3079
|
|
|
3051
3080
|
export declare type ProviderEvent = {
|
|
@@ -4442,15 +4471,6 @@ declare const TraceEventSchema: z.ZodObject<{
|
|
|
4442
4471
|
*/
|
|
4443
4472
|
declare type TrustClass = "guardian" | "trusted_contact" | "unverified_contact" | "unknown";
|
|
4444
4473
|
|
|
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
4474
|
declare interface UiSurfaceComplete {
|
|
4455
4475
|
type: "ui_surface_complete";
|
|
4456
4476
|
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;
|