@vellumai/plugin-api 0.11.0 → 0.11.1-dev.202608010027.2cfe358
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 +152 -23
- package/index.js +6 -0
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -120,6 +120,7 @@ declare const AssistantConfigSchema: z.ZodObject<{
|
|
|
120
120
|
"openai-whisper": "openai-whisper";
|
|
121
121
|
xai: "xai";
|
|
122
122
|
}>>;
|
|
123
|
+
language: z.ZodOptional<z.ZodString>;
|
|
123
124
|
providers: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>>>;
|
|
124
125
|
}, z.core.$strip>>;
|
|
125
126
|
tts: z.ZodDefault<z.ZodObject<{
|
|
@@ -498,6 +499,9 @@ declare const AssistantConfigSchema: z.ZodObject<{
|
|
|
498
499
|
ringBufferSize: z.ZodDefault<z.ZodNumber>;
|
|
499
500
|
highMemThresholdRatio: z.ZodDefault<z.ZodNumber>;
|
|
500
501
|
snapshotCooldownMs: z.ZodDefault<z.ZodNumber>;
|
|
502
|
+
fdPollIntervalMs: z.ZodDefault<z.ZodNumber>;
|
|
503
|
+
highFdThresholdRatio: z.ZodDefault<z.ZodNumber>;
|
|
504
|
+
fdWarnCooldownMs: z.ZodDefault<z.ZodNumber>;
|
|
501
505
|
pluginSourceScanIntervalMs: z.ZodDefault<z.ZodNumber>;
|
|
502
506
|
baselineSnapshotIntervalMs: z.ZodDefault<z.ZodNumber>;
|
|
503
507
|
}, z.core.$strip>>;
|
|
@@ -770,8 +774,18 @@ declare const AssistantConfigSchema: z.ZodObject<{
|
|
|
770
774
|
anthropic: "anthropic";
|
|
771
775
|
gemini: "gemini";
|
|
772
776
|
fireworks: "fireworks";
|
|
777
|
+
together: "together";
|
|
778
|
+
poolside: "poolside";
|
|
773
779
|
openrouter: "openrouter";
|
|
780
|
+
"vercel-ai-gateway": "vercel-ai-gateway";
|
|
781
|
+
ollama: "ollama";
|
|
782
|
+
"openai-compatible": "openai-compatible";
|
|
783
|
+
litellm: "litellm";
|
|
784
|
+
minimax: "minimax";
|
|
785
|
+
atlascloud: "atlascloud";
|
|
786
|
+
baseten: "baseten";
|
|
774
787
|
vellum: "vellum";
|
|
788
|
+
chatgpt: "chatgpt";
|
|
775
789
|
}>;
|
|
776
790
|
connectionName: z.ZodOptional<z.ZodString>;
|
|
777
791
|
}, z.core.$strip>>>;
|
|
@@ -1402,6 +1416,7 @@ declare const AssistantEventEnvelopeSchema: z.ZodObject<{
|
|
|
1402
1416
|
requestId: z.ZodString;
|
|
1403
1417
|
channel: z.ZodOptional<z.ZodString>;
|
|
1404
1418
|
placeholder: z.ZodOptional<z.ZodString>;
|
|
1419
|
+
defaultValue: z.ZodOptional<z.ZodString>;
|
|
1405
1420
|
label: z.ZodOptional<z.ZodString>;
|
|
1406
1421
|
description: z.ZodOptional<z.ZodString>;
|
|
1407
1422
|
role: z.ZodOptional<z.ZodString>;
|
|
@@ -1889,20 +1904,29 @@ declare const AssistantEventEnvelopeSchema: z.ZodObject<{
|
|
|
1889
1904
|
type: z.ZodLiteral<"message_dequeued">;
|
|
1890
1905
|
conversationId: z.ZodString;
|
|
1891
1906
|
requestId: z.ZodString;
|
|
1907
|
+
clientMessageId: z.ZodOptional<z.ZodString>;
|
|
1892
1908
|
}, z.core.$strip>, z.ZodObject<{
|
|
1893
1909
|
type: z.ZodLiteral<"message_queued">;
|
|
1894
1910
|
conversationId: z.ZodString;
|
|
1895
1911
|
requestId: z.ZodString;
|
|
1896
1912
|
position: z.ZodNumber;
|
|
1913
|
+
clientMessageId: z.ZodOptional<z.ZodString>;
|
|
1897
1914
|
}, z.core.$strip>, z.ZodObject<{
|
|
1898
1915
|
type: z.ZodLiteral<"message_queued_deleted">;
|
|
1899
1916
|
conversationId: z.ZodString;
|
|
1900
1917
|
requestId: z.ZodString;
|
|
1918
|
+
clientMessageId: z.ZodOptional<z.ZodString>;
|
|
1901
1919
|
}, z.core.$strip>, z.ZodObject<{
|
|
1902
1920
|
type: z.ZodLiteral<"message_request_complete">;
|
|
1903
1921
|
conversationId: z.ZodString;
|
|
1904
1922
|
requestId: z.ZodString;
|
|
1905
1923
|
runStillActive: z.ZodOptional<z.ZodBoolean>;
|
|
1924
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1925
|
+
type: z.ZodLiteral<"message_requeued">;
|
|
1926
|
+
conversationId: z.ZodString;
|
|
1927
|
+
requestId: z.ZodString;
|
|
1928
|
+
position: z.ZodNumber;
|
|
1929
|
+
clientMessageId: z.ZodOptional<z.ZodString>;
|
|
1906
1930
|
}, z.core.$strip>, z.ZodObject<{
|
|
1907
1931
|
type: z.ZodLiteral<"message_steered">;
|
|
1908
1932
|
conversationId: z.ZodString;
|
|
@@ -1949,6 +1973,7 @@ declare const AssistantEventEnvelopeSchema: z.ZodObject<{
|
|
|
1949
1973
|
deepLinkMetadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1950
1974
|
targetGuardianPrincipalId: z.ZodOptional<z.ZodString>;
|
|
1951
1975
|
silent: z.ZodOptional<z.ZodBoolean>;
|
|
1976
|
+
remotePushDispatched: z.ZodOptional<z.ZodBoolean>;
|
|
1952
1977
|
}, z.core.$strip>, z.ZodObject<{
|
|
1953
1978
|
type: z.ZodLiteral<"oauth_connect_result">;
|
|
1954
1979
|
success: z.ZodBoolean;
|
|
@@ -2181,6 +2206,7 @@ declare const AssistantEventEnvelopeSchema: z.ZodObject<{
|
|
|
2181
2206
|
brave: "brave";
|
|
2182
2207
|
perplexity: "perplexity";
|
|
2183
2208
|
tavily: "tavily";
|
|
2209
|
+
keenable: "keenable";
|
|
2184
2210
|
firecrawl: "firecrawl";
|
|
2185
2211
|
}>;
|
|
2186
2212
|
resultCount: z.ZodNumber;
|
|
@@ -2246,6 +2272,12 @@ declare const AssistantEventEnvelopeSchema: z.ZodObject<{
|
|
|
2246
2272
|
type: z.ZodLiteral<"ui_surface_dismiss">;
|
|
2247
2273
|
conversationId: z.ZodString;
|
|
2248
2274
|
surfaceId: z.ZodString;
|
|
2275
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2276
|
+
type: z.ZodLiteral<"ui_surface_pending">;
|
|
2277
|
+
conversationId: z.ZodString;
|
|
2278
|
+
surfaceType: z.ZodLiteral<"visual">;
|
|
2279
|
+
toolUseId: z.ZodString;
|
|
2280
|
+
messageId: z.ZodOptional<z.ZodString>;
|
|
2249
2281
|
}, z.core.$strip>, z.ZodObject<{
|
|
2250
2282
|
type: z.ZodLiteral<"ui_surface_show">;
|
|
2251
2283
|
conversationId: z.ZodString;
|
|
@@ -2762,6 +2794,7 @@ declare const AssistantEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
2762
2794
|
requestId: z.ZodString;
|
|
2763
2795
|
channel: z.ZodOptional<z.ZodString>;
|
|
2764
2796
|
placeholder: z.ZodOptional<z.ZodString>;
|
|
2797
|
+
defaultValue: z.ZodOptional<z.ZodString>;
|
|
2765
2798
|
label: z.ZodOptional<z.ZodString>;
|
|
2766
2799
|
description: z.ZodOptional<z.ZodString>;
|
|
2767
2800
|
role: z.ZodOptional<z.ZodString>;
|
|
@@ -3249,20 +3282,29 @@ declare const AssistantEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
3249
3282
|
type: z.ZodLiteral<"message_dequeued">;
|
|
3250
3283
|
conversationId: z.ZodString;
|
|
3251
3284
|
requestId: z.ZodString;
|
|
3285
|
+
clientMessageId: z.ZodOptional<z.ZodString>;
|
|
3252
3286
|
}, z.core.$strip>, z.ZodObject<{
|
|
3253
3287
|
type: z.ZodLiteral<"message_queued">;
|
|
3254
3288
|
conversationId: z.ZodString;
|
|
3255
3289
|
requestId: z.ZodString;
|
|
3256
3290
|
position: z.ZodNumber;
|
|
3291
|
+
clientMessageId: z.ZodOptional<z.ZodString>;
|
|
3257
3292
|
}, z.core.$strip>, z.ZodObject<{
|
|
3258
3293
|
type: z.ZodLiteral<"message_queued_deleted">;
|
|
3259
3294
|
conversationId: z.ZodString;
|
|
3260
3295
|
requestId: z.ZodString;
|
|
3296
|
+
clientMessageId: z.ZodOptional<z.ZodString>;
|
|
3261
3297
|
}, z.core.$strip>, z.ZodObject<{
|
|
3262
3298
|
type: z.ZodLiteral<"message_request_complete">;
|
|
3263
3299
|
conversationId: z.ZodString;
|
|
3264
3300
|
requestId: z.ZodString;
|
|
3265
3301
|
runStillActive: z.ZodOptional<z.ZodBoolean>;
|
|
3302
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
3303
|
+
type: z.ZodLiteral<"message_requeued">;
|
|
3304
|
+
conversationId: z.ZodString;
|
|
3305
|
+
requestId: z.ZodString;
|
|
3306
|
+
position: z.ZodNumber;
|
|
3307
|
+
clientMessageId: z.ZodOptional<z.ZodString>;
|
|
3266
3308
|
}, z.core.$strip>, z.ZodObject<{
|
|
3267
3309
|
type: z.ZodLiteral<"message_steered">;
|
|
3268
3310
|
conversationId: z.ZodString;
|
|
@@ -3309,6 +3351,7 @@ declare const AssistantEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
3309
3351
|
deepLinkMetadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
3310
3352
|
targetGuardianPrincipalId: z.ZodOptional<z.ZodString>;
|
|
3311
3353
|
silent: z.ZodOptional<z.ZodBoolean>;
|
|
3354
|
+
remotePushDispatched: z.ZodOptional<z.ZodBoolean>;
|
|
3312
3355
|
}, z.core.$strip>, z.ZodObject<{
|
|
3313
3356
|
type: z.ZodLiteral<"oauth_connect_result">;
|
|
3314
3357
|
success: z.ZodBoolean;
|
|
@@ -3541,6 +3584,7 @@ declare const AssistantEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
3541
3584
|
brave: "brave";
|
|
3542
3585
|
perplexity: "perplexity";
|
|
3543
3586
|
tavily: "tavily";
|
|
3587
|
+
keenable: "keenable";
|
|
3544
3588
|
firecrawl: "firecrawl";
|
|
3545
3589
|
}>;
|
|
3546
3590
|
resultCount: z.ZodNumber;
|
|
@@ -3606,6 +3650,12 @@ declare const AssistantEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
3606
3650
|
type: z.ZodLiteral<"ui_surface_dismiss">;
|
|
3607
3651
|
conversationId: z.ZodString;
|
|
3608
3652
|
surfaceId: z.ZodString;
|
|
3653
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
3654
|
+
type: z.ZodLiteral<"ui_surface_pending">;
|
|
3655
|
+
conversationId: z.ZodString;
|
|
3656
|
+
surfaceType: z.ZodLiteral<"visual">;
|
|
3657
|
+
toolUseId: z.ZodString;
|
|
3658
|
+
messageId: z.ZodOptional<z.ZodString>;
|
|
3609
3659
|
}, z.core.$strip>, z.ZodObject<{
|
|
3610
3660
|
type: z.ZodLiteral<"ui_surface_show">;
|
|
3611
3661
|
conversationId: z.ZodString;
|
|
@@ -3735,7 +3785,7 @@ export declare interface AssistantEventSubscription {
|
|
|
3735
3785
|
readonly connectionId: string;
|
|
3736
3786
|
}
|
|
3737
3787
|
|
|
3738
|
-
declare interface AudioEmbeddingInput {
|
|
3788
|
+
export declare interface AudioEmbeddingInput {
|
|
3739
3789
|
type: "audio";
|
|
3740
3790
|
data: Buffer;
|
|
3741
3791
|
mimeType: string;
|
|
@@ -4047,28 +4097,30 @@ declare type DistributiveOmit<T, K extends PropertyKey> = T extends unknown ? Om
|
|
|
4047
4097
|
*/
|
|
4048
4098
|
export declare function doesSupportVision(modelOrProfile: ModelProfileInfo | string): boolean;
|
|
4049
4099
|
|
|
4100
|
+
/**
|
|
4101
|
+
* Embed an input and return the raw dense vector (provider, model, and
|
|
4102
|
+
* dimensions included), with no persistence.
|
|
4103
|
+
*/
|
|
4104
|
+
export declare function embed(input: EmbeddingInput): Promise<EmbedResult>;
|
|
4105
|
+
|
|
4050
4106
|
/** Embed a target and upsert its vector into the vector store. */
|
|
4051
4107
|
export declare function embedAndUpsert(targetType: EmbeddingTargetType, targetId: string, input: EmbeddingInput, extraPayload?: Record<string, unknown>): Promise<void>;
|
|
4052
4108
|
|
|
4053
4109
|
declare function embedAndUpsert_2(config: AssistantConfig, targetType: "segment" | "item" | "summary" | "media" | "graph_node" | "pkb_file", targetId: string, input: EmbeddingInput, extraPayload?: Record<string, unknown>): Promise<void>;
|
|
4054
4110
|
|
|
4055
4111
|
/** Accepts raw strings as shorthand for text inputs. */
|
|
4056
|
-
declare type EmbeddingInput = string | MultimodalEmbeddingInput;
|
|
4112
|
+
export declare type EmbeddingInput = string | MultimodalEmbeddingInput;
|
|
4057
4113
|
|
|
4058
|
-
/**
|
|
4059
|
-
* Plugin-facing facade over the embeddings subsystem: self-contained
|
|
4060
|
-
* operations that resolve the live workspace config internally, so callers
|
|
4061
|
-
* (plugins importing via `@vellumai/plugin-api`) hold no host config.
|
|
4062
|
-
*
|
|
4063
|
-
* The operations are loaded via dynamic `import()` inside each wrapper so
|
|
4064
|
-
* that importing this module — which every `@vellumai/plugin-api` consumer
|
|
4065
|
-
* does transitively — does not eagerly pull the embed/vector import graph
|
|
4066
|
-
* (`job-utils`, `embedding-backend`). An eager pull would force those
|
|
4067
|
-
* modules' named exports to resolve at instantiation, which breaks the
|
|
4068
|
-
* intentional partial module mocks in tests.
|
|
4069
|
-
*/
|
|
4070
4114
|
declare type EmbeddingTargetType = Parameters<embedAndUpsert_2>[1];
|
|
4071
4115
|
|
|
4116
|
+
/** A computed embedding with the provider/model that produced it. */
|
|
4117
|
+
export declare interface EmbedResult {
|
|
4118
|
+
vector: number[];
|
|
4119
|
+
provider: string;
|
|
4120
|
+
model: string;
|
|
4121
|
+
dimensions: number;
|
|
4122
|
+
}
|
|
4123
|
+
|
|
4072
4124
|
export declare function extractTextFromStoredMessageContent(raw: string | ContentBlock[]): string;
|
|
4073
4125
|
|
|
4074
4126
|
export declare interface FileContent {
|
|
@@ -4086,6 +4138,12 @@ export declare interface FileContent {
|
|
|
4086
4138
|
_attachmentId?: string;
|
|
4087
4139
|
}
|
|
4088
4140
|
|
|
4141
|
+
/**
|
|
4142
|
+
* Generate the sparse (lexical) vector for a text using the host's shared
|
|
4143
|
+
* encoder. Pure and local: no backend call, no persistence.
|
|
4144
|
+
*/
|
|
4145
|
+
export declare function generateSparseEmbedding(text: string): Promise<SparseEmbedding>;
|
|
4146
|
+
|
|
4089
4147
|
/** Read the assistant's name from IDENTITY.md for personalized responses. */
|
|
4090
4148
|
export declare function getAssistantName(): string | null;
|
|
4091
4149
|
|
|
@@ -4108,6 +4166,9 @@ export declare function getConversation(id: string): Promise<ConversationRow | n
|
|
|
4108
4166
|
*/
|
|
4109
4167
|
export declare function getConversationDirPath(id: string, createdAtMs: number): Promise<string>;
|
|
4110
4168
|
|
|
4169
|
+
/** Fetch one document from the calling plugin's index, or null. */
|
|
4170
|
+
export declare function getDocument(documentId: string): Promise<IndexedDocument | null>;
|
|
4171
|
+
|
|
4111
4172
|
/** All messages of a conversation in insertion order. */
|
|
4112
4173
|
export declare function getMessages(conversationId: string): Promise<MessageRow[]>;
|
|
4113
4174
|
|
|
@@ -4254,12 +4315,57 @@ export declare interface ImageContent {
|
|
|
4254
4315
|
source: MediaSource_2;
|
|
4255
4316
|
}
|
|
4256
4317
|
|
|
4257
|
-
declare interface ImageEmbeddingInput {
|
|
4318
|
+
export declare interface ImageEmbeddingInput {
|
|
4258
4319
|
type: "image";
|
|
4259
4320
|
data: Buffer;
|
|
4260
4321
|
mimeType: string;
|
|
4261
4322
|
}
|
|
4262
4323
|
|
|
4324
|
+
/**
|
|
4325
|
+
* Embed and upsert a document into the calling plugin's private index (not
|
|
4326
|
+
* agent recall). Returns the document id. Pass `opts.documentId` to overwrite
|
|
4327
|
+
* an existing document in place.
|
|
4328
|
+
*/
|
|
4329
|
+
export declare function indexDocument(input: EmbeddingInput, opts?: IndexDocumentOptions): Promise<IndexDocumentResult>;
|
|
4330
|
+
|
|
4331
|
+
export declare interface IndexDocumentOptions {
|
|
4332
|
+
/**
|
|
4333
|
+
* Reuse a caller-owned id to upsert a document in place (the update path:
|
|
4334
|
+
* same id, overwrite). Omit to have the host mint a fresh document id.
|
|
4335
|
+
*/
|
|
4336
|
+
documentId?: string;
|
|
4337
|
+
/**
|
|
4338
|
+
* Opaque provenance carried with the document (e.g. `{ rowId, fileId }`).
|
|
4339
|
+
* Round-tripped verbatim on query/get; never interpreted by the host.
|
|
4340
|
+
*/
|
|
4341
|
+
metadata?: Record<string, unknown>;
|
|
4342
|
+
/** Override the stored creation timestamp (defaults to now). */
|
|
4343
|
+
createdAt?: number;
|
|
4344
|
+
}
|
|
4345
|
+
|
|
4346
|
+
export declare interface IndexDocumentResult {
|
|
4347
|
+
documentId: string;
|
|
4348
|
+
provider: string;
|
|
4349
|
+
model: string;
|
|
4350
|
+
dimensions: number;
|
|
4351
|
+
}
|
|
4352
|
+
|
|
4353
|
+
export declare interface IndexedDocument {
|
|
4354
|
+
documentId: string;
|
|
4355
|
+
text: string;
|
|
4356
|
+
modality: "text" | "image" | "audio" | "video";
|
|
4357
|
+
metadata?: Record<string, unknown>;
|
|
4358
|
+
createdAt: number;
|
|
4359
|
+
}
|
|
4360
|
+
|
|
4361
|
+
export declare interface IndexHit {
|
|
4362
|
+
documentId: string;
|
|
4363
|
+
score: number;
|
|
4364
|
+
text: string;
|
|
4365
|
+
modality: "text" | "image" | "audio" | "video";
|
|
4366
|
+
metadata?: Record<string, unknown>;
|
|
4367
|
+
}
|
|
4368
|
+
|
|
4263
4369
|
/**
|
|
4264
4370
|
* Context passed to `Plugin.init()` during bootstrap. Carries the resolved
|
|
4265
4371
|
* config, a pino-compatible logger scoped to the plugin, a per-plugin
|
|
@@ -4760,6 +4866,7 @@ declare const messageMetadataSchema: z.ZodObject<{
|
|
|
4760
4866
|
provenanceRequesterIdentifier: z.ZodOptional<z.ZodString>;
|
|
4761
4867
|
automated: z.ZodOptional<z.ZodBoolean>;
|
|
4762
4868
|
hidden: z.ZodOptional<z.ZodBoolean>;
|
|
4869
|
+
voiceSessionTurn: z.ZodOptional<z.ZodBoolean>;
|
|
4763
4870
|
messageKind: z.ZodOptional<z.ZodString>;
|
|
4764
4871
|
backgroundToolCompletion: z.ZodOptional<z.ZodObject<{
|
|
4765
4872
|
id: z.ZodString;
|
|
@@ -4840,7 +4947,7 @@ export declare interface ModelProfileInfo {
|
|
|
4840
4947
|
readonly isMix: boolean;
|
|
4841
4948
|
}
|
|
4842
4949
|
|
|
4843
|
-
declare type MultimodalEmbeddingInput = TextEmbeddingInput | ImageEmbeddingInput | AudioEmbeddingInput | VideoEmbeddingInput;
|
|
4950
|
+
export declare type MultimodalEmbeddingInput = TextEmbeddingInput | ImageEmbeddingInput | AudioEmbeddingInput | VideoEmbeddingInput;
|
|
4844
4951
|
|
|
4845
4952
|
/**
|
|
4846
4953
|
* Open a streaming transcription session against the configured STT provider
|
|
@@ -5392,6 +5499,16 @@ export declare function quarantineRefusedExchanges(messages: Message[]): {
|
|
|
5392
5499
|
droppedExchanges: number;
|
|
5393
5500
|
};
|
|
5394
5501
|
|
|
5502
|
+
/** Hybrid semantic search over the calling plugin's index only. */
|
|
5503
|
+
export declare function queryIndex(query: EmbeddingInput, opts?: QueryIndexOptions): Promise<IndexHit[]>;
|
|
5504
|
+
|
|
5505
|
+
export declare interface QueryIndexOptions {
|
|
5506
|
+
/** Max hits to return. Defaults to 10. */
|
|
5507
|
+
limit?: number;
|
|
5508
|
+
/** Per-branch prefetch depth for the hybrid fusion. */
|
|
5509
|
+
prefetchLimit?: number;
|
|
5510
|
+
}
|
|
5511
|
+
|
|
5395
5512
|
export declare interface RedactedThinkingContent {
|
|
5396
5513
|
type: "redacted_thinking";
|
|
5397
5514
|
data: string;
|
|
@@ -5410,6 +5527,9 @@ export declare interface RedactedThinkingContent {
|
|
|
5410
5527
|
*/
|
|
5411
5528
|
export declare const REFUSAL_FALLBACK_TEXT = "Sorry \u2014 I wasn't able to generate a response to that. Please try rephrasing or asking in a different way.";
|
|
5412
5529
|
|
|
5530
|
+
/** Remove one document from the calling plugin's index. */
|
|
5531
|
+
export declare function removeDocument(documentId: string): Promise<void>;
|
|
5532
|
+
|
|
5413
5533
|
declare type ResolutionFallbackReason = "missing" | "disabled" | "incomplete";
|
|
5414
5534
|
|
|
5415
5535
|
/**
|
|
@@ -5446,7 +5566,9 @@ declare type ResolutionFallbackReason = "missing" | "disabled" | "incomplete";
|
|
|
5446
5566
|
* sits at the top of the chain for every call site.
|
|
5447
5567
|
*
|
|
5448
5568
|
* Profile names are resolved against the effective profile catalog
|
|
5449
|
-
* (code-defined defaults + workspace `llm.profiles
|
|
5569
|
+
* (code-defined defaults + workspace `llm.profiles`), with default profile
|
|
5570
|
+
* keys resolved through `llm.defaultProvider`'s column of the intent ×
|
|
5571
|
+
* provider matrix (see `resolveDefaultProfileForProvider`).
|
|
5450
5572
|
* A "mix" profile is expanded to one of its arms by a seeded weighted pick (see
|
|
5451
5573
|
* `resolveProfileFragment` and `opts.selectionSeed`), uniformly wherever a name
|
|
5452
5574
|
* is dereferenced. Missing references silently fall through (no throw) so the
|
|
@@ -5905,12 +6027,19 @@ declare interface SkillInstallMeta {
|
|
|
5905
6027
|
* - `workspace`: user-authored skill living in a conversation's working dir.
|
|
5906
6028
|
* - `extra`: third-party directory roots passed via `loadSkillCatalog`'s
|
|
5907
6029
|
* `extraDirs` argument (primarily for tests).
|
|
5908
|
-
* - `plugin`: shipped on disk inside an installed
|
|
5909
|
-
* `<workspaceDir>/plugins/<name>/skills/<id>/SKILL.md`,
|
|
5910
|
-
*
|
|
6030
|
+
* - `plugin`: shipped on disk inside a plugin: an installed one at
|
|
6031
|
+
* `<workspaceDir>/plugins/<name>/skills/<id>/SKILL.md`, or an in-process
|
|
6032
|
+
* default at `plugins/defaults/<dir>/skills/<id>/SKILL.md`, attributed back
|
|
6033
|
+
* to the owning plugin via its `owner` descriptor.
|
|
5911
6034
|
*/
|
|
5912
6035
|
declare type SkillSource = "bundled" | "managed" | "workspace" | "extra" | "plugin";
|
|
5913
6036
|
|
|
6037
|
+
/** Sparse vector representation: parallel arrays of term indices and weights. */
|
|
6038
|
+
export declare interface SparseEmbedding {
|
|
6039
|
+
indices: number[];
|
|
6040
|
+
values: number[];
|
|
6041
|
+
}
|
|
6042
|
+
|
|
5914
6043
|
/**
|
|
5915
6044
|
* The full `stop` context a hook receives — the dispatching call site's
|
|
5916
6045
|
* {@link StopInputContext} plus the pipeline-stamped {@link BaseHookContext}
|
|
@@ -6209,7 +6338,7 @@ export declare interface TextContent {
|
|
|
6209
6338
|
text: string;
|
|
6210
6339
|
}
|
|
6211
6340
|
|
|
6212
|
-
declare interface TextEmbeddingInput {
|
|
6341
|
+
export declare interface TextEmbeddingInput {
|
|
6213
6342
|
type: "text";
|
|
6214
6343
|
text: string;
|
|
6215
6344
|
}
|
|
@@ -6872,7 +7001,7 @@ declare interface UserPromptSubmitInputContext {
|
|
|
6872
7001
|
latestMessages: Message[];
|
|
6873
7002
|
}
|
|
6874
7003
|
|
|
6875
|
-
declare interface VideoEmbeddingInput {
|
|
7004
|
+
export declare interface VideoEmbeddingInput {
|
|
6876
7005
|
type: "video";
|
|
6877
7006
|
data: Buffer;
|
|
6878
7007
|
mimeType: string;
|
|
@@ -6911,7 +7040,7 @@ declare interface WebSearchMetadata {
|
|
|
6911
7040
|
errorMessage?: string;
|
|
6912
7041
|
}
|
|
6913
7042
|
|
|
6914
|
-
declare type WebSearchProviderId = "anthropic-native" | "brave" | "perplexity" | "tavily" | "firecrawl";
|
|
7043
|
+
declare type WebSearchProviderId = "anthropic-native" | "brave" | "perplexity" | "tavily" | "keenable" | "firecrawl";
|
|
6915
7044
|
|
|
6916
7045
|
declare interface WebSearchResultItem {
|
|
6917
7046
|
rank: number;
|
package/index.js
CHANGED
|
@@ -13,16 +13,20 @@ export const buildMessageExcerpt = api.buildMessageExcerpt;
|
|
|
13
13
|
export const createLiveVoiceConnection = api.createLiveVoiceConnection;
|
|
14
14
|
export const deleteConversation = api.deleteConversation;
|
|
15
15
|
export const doesSupportVision = api.doesSupportVision;
|
|
16
|
+
export const embed = api.embed;
|
|
16
17
|
export const embedAndUpsert = api.embedAndUpsert;
|
|
17
18
|
export const extractTextFromStoredMessageContent = api.extractTextFromStoredMessageContent;
|
|
19
|
+
export const generateSparseEmbedding = api.generateSparseEmbedding;
|
|
18
20
|
export const getAssistantName = api.getAssistantName;
|
|
19
21
|
export const getConfiguredProvider = api.getConfiguredProvider;
|
|
20
22
|
export const getConversation = api.getConversation;
|
|
21
23
|
export const getConversationDirPath = api.getConversationDirPath;
|
|
24
|
+
export const getDocument = api.getDocument;
|
|
22
25
|
export const getMessages = api.getMessages;
|
|
23
26
|
export const getModelProfiles = api.getModelProfiles;
|
|
24
27
|
export const getWorkspaceDir = api.getWorkspaceDir;
|
|
25
28
|
export const hasLexicalTokens = api.hasLexicalTokens;
|
|
29
|
+
export const indexDocument = api.indexDocument;
|
|
26
30
|
export const isConversationProcessing = api.isConversationProcessing;
|
|
27
31
|
export const isMaxTokensStopReason = api.isMaxTokensStopReason;
|
|
28
32
|
export const isToolResultMessage = api.isToolResultMessage;
|
|
@@ -35,6 +39,8 @@ export const openTranscriptionSession = api.openTranscriptionSession;
|
|
|
35
39
|
export const parseMessageMetadata = api.parseMessageMetadata;
|
|
36
40
|
export const publishEvent = api.publishEvent;
|
|
37
41
|
export const quarantineRefusedExchanges = api.quarantineRefusedExchanges;
|
|
42
|
+
export const queryIndex = api.queryIndex;
|
|
43
|
+
export const removeDocument = api.removeDocument;
|
|
38
44
|
export const resolveCredential = api.resolveCredential;
|
|
39
45
|
export const resolveMediaSourceData = api.resolveMediaSourceData;
|
|
40
46
|
export const resolveUserName = api.resolveUserName;
|