@vellumai/plugin-api 0.10.1 → 0.10.2-dev.202606241651.2d2b40d
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 +18 -18
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -1245,21 +1245,13 @@ declare interface DocumentSaveResponse {
|
|
|
1245
1245
|
declare type _DocumentsServerMessages = DocumentEditorShow | DocumentEditorUpdateEvent | DocumentSaveResponse | DocumentLoadResponse | DocumentListResponse;
|
|
1246
1246
|
|
|
1247
1247
|
/**
|
|
1248
|
-
* Whether
|
|
1248
|
+
* Whether the given model or profile can process image input.
|
|
1249
1249
|
*
|
|
1250
|
-
*
|
|
1251
|
-
*
|
|
1252
|
-
*
|
|
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`.
|
|
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.
|
|
1261
1253
|
*/
|
|
1262
|
-
export declare function doesSupportVision(
|
|
1254
|
+
export declare function doesSupportVision(modelOrProfile: ModelProfileInfo | string): boolean;
|
|
1263
1255
|
|
|
1264
1256
|
declare interface DynamicPagePreview {
|
|
1265
1257
|
title: string;
|
|
@@ -2702,15 +2694,13 @@ declare interface PlatformDisconnected {
|
|
|
2702
2694
|
export declare type PluginHookFn<TCtx = unknown> = (ctx: TCtx) => Promise<Partial<TCtx> | void>;
|
|
2703
2695
|
|
|
2704
2696
|
/**
|
|
2705
|
-
* Context passed to `Plugin.init()` during bootstrap. Carries resolved
|
|
2706
|
-
* config
|
|
2707
|
-
*
|
|
2697
|
+
* Context passed to `Plugin.init()` during bootstrap. Carries the resolved
|
|
2698
|
+
* config, a pino-compatible logger scoped to the plugin, a per-plugin
|
|
2699
|
+
* writable data directory, and the assistant's version metadata.
|
|
2708
2700
|
*/
|
|
2709
2701
|
export declare interface PluginInitContext {
|
|
2710
2702
|
/** Parsed config for this plugin (may be `unknown` until the manifest validates). */
|
|
2711
2703
|
config: unknown;
|
|
2712
|
-
/** Resolved credential values keyed by the entries of `manifest.requiresCredential`. */
|
|
2713
|
-
credentials: Record<string, string>;
|
|
2714
2704
|
/** Pino-compatible child logger bound to `{ plugin: <name> }`. */
|
|
2715
2705
|
logger: PluginLogger;
|
|
2716
2706
|
/** Absolute path to `<workspaceDir>/plugins-data/<plugin>/` (created by bootstrap). */
|
|
@@ -3057,6 +3047,15 @@ export declare interface Provider {
|
|
|
3057
3047
|
* Falls back to `name` when unset.
|
|
3058
3048
|
*/
|
|
3059
3049
|
tokenEstimationProvider?: string;
|
|
3050
|
+
/**
|
|
3051
|
+
* True when this provider instance was constructed to run web search
|
|
3052
|
+
* server-side (provider-native). The native search only activates when a
|
|
3053
|
+
* `web_search`-named tool is passed in the request, so callers that want to
|
|
3054
|
+
* enable web search on a one-shot completion (e.g. the advisor consult) check
|
|
3055
|
+
* this first — passing the tool to a non-native instance would surface an
|
|
3056
|
+
* unexecutable client tool call. Absent/false on providers without it.
|
|
3057
|
+
*/
|
|
3058
|
+
supportsNativeWebSearch?: boolean;
|
|
3060
3059
|
sendMessage(messages: Message[], options?: SendMessageOptions): Promise<ProviderResponse>;
|
|
3061
3060
|
/**
|
|
3062
3061
|
* Exact prompt-token count from the provider's own tokenizer, for the
|
|
@@ -4024,6 +4023,7 @@ declare const ToolDefinitionSchema: z.ZodObject<{
|
|
|
4024
4023
|
host: "host";
|
|
4025
4024
|
}>>;
|
|
4026
4025
|
execute: z.ZodOptional<z.ZodCustom<(input: Record<string, unknown>, context: ToolContext) => Promise<ToolExecutionResult>, (input: Record<string, unknown>, context: ToolContext) => Promise<ToolExecutionResult>>>;
|
|
4026
|
+
exclusive: z.ZodOptional<z.ZodBoolean>;
|
|
4027
4027
|
}, z.core.$strip>;
|
|
4028
4028
|
|
|
4029
4029
|
/**
|