@vellumai/plugin-api 0.10.2-dev.202606250318.5e7cfb0 → 0.10.2
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 +25 -82
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -575,27 +575,6 @@ declare const CardSurfaceDataSchema: z.ZodObject<{
|
|
|
575
575
|
templateData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
576
576
|
}, z.core.$strip>;
|
|
577
577
|
|
|
578
|
-
/**
|
|
579
|
-
* Canonical channel-id vocabulary shared between the assistant daemon and the
|
|
580
|
-
* gateway.
|
|
581
|
-
*
|
|
582
|
-
* A "channel" is an external messaging surface an actor can reach the
|
|
583
|
-
* assistant through (Slack, Telegram, WhatsApp, phone, …) plus a couple of
|
|
584
|
-
* internal ids (`vellum` for native app conversations, `platform` for the
|
|
585
|
-
* internal control plane). This is the single source of truth for that set:
|
|
586
|
-
* the assistant adopts it wholesale as its `ChannelId`, and the gateway
|
|
587
|
-
* asserts its own (narrower) inbound list is a subset of it so the two sides
|
|
588
|
-
* cannot silently drift.
|
|
589
|
-
*
|
|
590
|
-
* Both packages depend on `@vellumai/service-contracts`, so hoisting the set
|
|
591
|
-
* here (rather than maintaining a copy on each side) means adding or renaming
|
|
592
|
-
* a channel happens in exactly one place.
|
|
593
|
-
*
|
|
594
|
-
* Note that a consumer may legitimately handle only a *subset* of these — the
|
|
595
|
-
* gateway, for example, never ingresses `platform`. Use a local list guarded
|
|
596
|
-
* by `satisfies readonly ChannelId[]` for those cases rather than redefining
|
|
597
|
-
* the union.
|
|
598
|
-
*/
|
|
599
578
|
declare const CHANNEL_IDS: readonly ["telegram", "phone", "vellum", "whatsapp", "slack", "email", "platform", "a2a"];
|
|
600
579
|
|
|
601
580
|
/** Channel binding metadata exposed in conversation list APIs. */
|
|
@@ -1056,40 +1035,6 @@ declare interface ConversationListResponse {
|
|
|
1056
1035
|
hasMore?: boolean;
|
|
1057
1036
|
}
|
|
1058
1037
|
|
|
1059
|
-
declare type ConversationNoticeEvent = z.infer<typeof ConversationNoticeEventSchema>;
|
|
1060
|
-
|
|
1061
|
-
declare const ConversationNoticeEventSchema: z.ZodObject<{
|
|
1062
|
-
type: z.ZodLiteral<"conversation_notice">;
|
|
1063
|
-
conversationId: z.ZodString;
|
|
1064
|
-
source: z.ZodEnum<{
|
|
1065
|
-
memory_v3: "memory_v3";
|
|
1066
|
-
}>;
|
|
1067
|
-
code: z.ZodEnum<{
|
|
1068
|
-
PROVIDER_NETWORK: "PROVIDER_NETWORK";
|
|
1069
|
-
PROVIDER_RATE_LIMIT: "PROVIDER_RATE_LIMIT";
|
|
1070
|
-
MANAGED_USAGE_LIMIT: "MANAGED_USAGE_LIMIT";
|
|
1071
|
-
PROVIDER_OVERLOADED: "PROVIDER_OVERLOADED";
|
|
1072
|
-
PROVIDER_API: "PROVIDER_API";
|
|
1073
|
-
IMAGE_TOO_LARGE: "IMAGE_TOO_LARGE";
|
|
1074
|
-
PROVIDER_BILLING: "PROVIDER_BILLING";
|
|
1075
|
-
PROVIDER_ORDERING: "PROVIDER_ORDERING";
|
|
1076
|
-
PROVIDER_WEB_SEARCH: "PROVIDER_WEB_SEARCH";
|
|
1077
|
-
PROVIDER_NOT_CONFIGURED: "PROVIDER_NOT_CONFIGURED";
|
|
1078
|
-
PROVIDER_INVALID_KEY: "PROVIDER_INVALID_KEY";
|
|
1079
|
-
MANAGED_KEY_INVALID: "MANAGED_KEY_INVALID";
|
|
1080
|
-
CONTEXT_TOO_LARGE: "CONTEXT_TOO_LARGE";
|
|
1081
|
-
BUDGET_YIELD_UNRECOVERED: "BUDGET_YIELD_UNRECOVERED";
|
|
1082
|
-
MAX_TOKENS_REACHED: "MAX_TOKENS_REACHED";
|
|
1083
|
-
CONVERSATION_ABORTED: "CONVERSATION_ABORTED";
|
|
1084
|
-
CONVERSATION_PROCESSING_FAILED: "CONVERSATION_PROCESSING_FAILED";
|
|
1085
|
-
DISK_SPACE_CRITICAL: "DISK_SPACE_CRITICAL";
|
|
1086
|
-
REGENERATE_FAILED: "REGENERATE_FAILED";
|
|
1087
|
-
UNKNOWN: "UNKNOWN";
|
|
1088
|
-
}>;
|
|
1089
|
-
userMessage: z.ZodString;
|
|
1090
|
-
errorCategory: z.ZodOptional<z.ZodString>;
|
|
1091
|
-
}, z.core.$strip>;
|
|
1092
|
-
|
|
1093
1038
|
declare interface ConversationsClearResponse {
|
|
1094
1039
|
type: "conversations_clear_response";
|
|
1095
1040
|
cleared: number;
|
|
@@ -1116,7 +1061,7 @@ declare interface ConversationSearchResultItem {
|
|
|
1116
1061
|
matchingMessages: ConversationSearchMatchingMessage[];
|
|
1117
1062
|
}
|
|
1118
1063
|
|
|
1119
|
-
declare type _ConversationsServerMessages = AuthResult | PongMessage | AssistantStatusMessage | GenerationCancelledEvent | GenerationHandoffEvent | ModelInfo | HistoryResponse | UndoComplete | UsageUpdateEvent | UsageProgressEvent | UsageResponse | ContextCompacted | CompactionCircuitOpenEvent | CompactionCircuitClosedEvent | ConversationErrorEvent |
|
|
1064
|
+
declare type _ConversationsServerMessages = AuthResult | PongMessage | AssistantStatusMessage | GenerationCancelledEvent | GenerationHandoffEvent | ModelInfo | HistoryResponse | UndoComplete | UsageUpdateEvent | UsageProgressEvent | UsageResponse | ContextCompacted | CompactionCircuitOpenEvent | CompactionCircuitClosedEvent | ConversationErrorEvent | ConversationInfo | ConversationTitleUpdatedEvent | ConversationListResponse | ConversationsClearResponse | ConversationSearchResponse | MessageContentResponse | ConversationListInvalidatedEvent | ScheduleConversationCreated | OpenConversation;
|
|
1120
1065
|
|
|
1121
1066
|
declare type ConversationTitleUpdatedEvent = z.infer<typeof ConversationTitleUpdatedEventSchema>;
|
|
1122
1067
|
|
|
@@ -1300,13 +1245,21 @@ declare interface DocumentSaveResponse {
|
|
|
1300
1245
|
declare type _DocumentsServerMessages = DocumentEditorShow | DocumentEditorUpdateEvent | DocumentSaveResponse | DocumentLoadResponse | DocumentListResponse;
|
|
1301
1246
|
|
|
1302
1247
|
/**
|
|
1303
|
-
* Whether
|
|
1248
|
+
* Whether a profile's resolved model can process image input.
|
|
1304
1249
|
*
|
|
1305
|
-
*
|
|
1306
|
-
*
|
|
1307
|
-
*
|
|
1250
|
+
* Resolution mirrors the host's call-site resolver:
|
|
1251
|
+
* - The profile's `(provider, model)` fields are merged over `llm.default` so
|
|
1252
|
+
* a profile that only sets `model` (or only `provider`) inherits the other
|
|
1253
|
+
* from the workspace default.
|
|
1254
|
+
* - When `provider` is still missing but `model` is a known catalog model,
|
|
1255
|
+
* the provider is inferred via `getCatalogProviderForModel` (same logic as
|
|
1256
|
+
* the resolver's `withImpliedProviderForKnownModel`).
|
|
1257
|
+
* - For a mix profile, returns `true` if any constituent arm supports vision
|
|
1258
|
+
* (the mix can route to it) and `false` only if every arm is text-only.
|
|
1259
|
+
* - Unknown `(provider, model)` pairs default to `true` (fail-open), matching
|
|
1260
|
+
* the config GET route's `enrichProfilesWithVisionFlag`.
|
|
1308
1261
|
*/
|
|
1309
|
-
export declare function doesSupportVision(
|
|
1262
|
+
export declare function doesSupportVision(profile: ModelProfileInfo): boolean;
|
|
1310
1263
|
|
|
1311
1264
|
declare interface DynamicPagePreview {
|
|
1312
1265
|
title: string;
|
|
@@ -1425,14 +1378,12 @@ export declare interface FileContent {
|
|
|
1425
1378
|
_attachmentId?: string;
|
|
1426
1379
|
}
|
|
1427
1380
|
|
|
1428
|
-
declare
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
maxSizeBytes: z.ZodCatch<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
|
|
1435
|
-
}, z.core.$strip>;
|
|
1381
|
+
declare interface FileUploadSurfaceData {
|
|
1382
|
+
prompt: string;
|
|
1383
|
+
acceptedTypes?: string[];
|
|
1384
|
+
maxFiles?: number;
|
|
1385
|
+
maxSizeBytes?: number;
|
|
1386
|
+
}
|
|
1436
1387
|
|
|
1437
1388
|
declare interface FilingConfigResponse {
|
|
1438
1389
|
type: "filing_config_response";
|
|
@@ -2751,13 +2702,15 @@ declare interface PlatformDisconnected {
|
|
|
2751
2702
|
export declare type PluginHookFn<TCtx = unknown> = (ctx: TCtx) => Promise<Partial<TCtx> | void>;
|
|
2752
2703
|
|
|
2753
2704
|
/**
|
|
2754
|
-
* Context passed to `Plugin.init()` during bootstrap. Carries
|
|
2755
|
-
* config, a pino-compatible logger scoped to the plugin, a
|
|
2756
|
-
* writable data directory, and the assistant's version metadata.
|
|
2705
|
+
* Context passed to `Plugin.init()` during bootstrap. Carries resolved
|
|
2706
|
+
* config/credentials, a pino-compatible logger scoped to the plugin, a
|
|
2707
|
+
* per-plugin writable data directory, and the assistant's version metadata.
|
|
2757
2708
|
*/
|
|
2758
2709
|
export declare interface PluginInitContext {
|
|
2759
2710
|
/** Parsed config for this plugin (may be `unknown` until the manifest validates). */
|
|
2760
2711
|
config: unknown;
|
|
2712
|
+
/** Resolved credential values keyed by the entries of `manifest.requiresCredential`. */
|
|
2713
|
+
credentials: Record<string, string>;
|
|
2761
2714
|
/** Pino-compatible child logger bound to `{ plugin: <name> }`. */
|
|
2762
2715
|
logger: PluginLogger;
|
|
2763
2716
|
/** Absolute path to `<workspaceDir>/plugins-data/<plugin>/` (created by bootstrap). */
|
|
@@ -3104,15 +3057,6 @@ export declare interface Provider {
|
|
|
3104
3057
|
* Falls back to `name` when unset.
|
|
3105
3058
|
*/
|
|
3106
3059
|
tokenEstimationProvider?: string;
|
|
3107
|
-
/**
|
|
3108
|
-
* True when this provider instance was constructed to run web search
|
|
3109
|
-
* server-side (provider-native). The native search only activates when a
|
|
3110
|
-
* `web_search`-named tool is passed in the request, so callers that want to
|
|
3111
|
-
* enable web search on a one-shot completion (e.g. the advisor consult) check
|
|
3112
|
-
* this first — passing the tool to a non-native instance would surface an
|
|
3113
|
-
* unexecutable client tool call. Absent/false on providers without it.
|
|
3114
|
-
*/
|
|
3115
|
-
supportsNativeWebSearch?: boolean;
|
|
3116
3060
|
sendMessage(messages: Message[], options?: SendMessageOptions): Promise<ProviderResponse>;
|
|
3117
3061
|
/**
|
|
3118
3062
|
* Exact prompt-token count from the provider's own tokenizer, for the
|
|
@@ -4080,7 +4024,6 @@ declare const ToolDefinitionSchema: z.ZodObject<{
|
|
|
4080
4024
|
host: "host";
|
|
4081
4025
|
}>>;
|
|
4082
4026
|
execute: z.ZodOptional<z.ZodCustom<(input: Record<string, unknown>, context: ToolContext) => Promise<ToolExecutionResult>, (input: Record<string, unknown>, context: ToolContext) => Promise<ToolExecutionResult>>>;
|
|
4083
|
-
exclusive: z.ZodOptional<z.ZodBoolean>;
|
|
4084
4027
|
}, z.core.$strip>;
|
|
4085
4028
|
|
|
4086
4029
|
/**
|