@vellumai/plugin-api 0.12.2-staging.6 → 0.12.2-staging.7
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 +32 -0
- package/index.js +3 -0
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -1661,6 +1661,8 @@ declare const AssistantEventEnvelopeSchema: z.ZodObject<{
|
|
|
1661
1661
|
type: z.ZodLiteral<"conversation_title_updated">;
|
|
1662
1662
|
conversationId: z.ZodString;
|
|
1663
1663
|
title: z.ZodString;
|
|
1664
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1665
|
+
type: z.ZodLiteral<"desktop_activity_changed">;
|
|
1664
1666
|
}, z.core.$strip>, z.ZodObject<{
|
|
1665
1667
|
type: z.ZodLiteral<"disk_pressure_status_changed">;
|
|
1666
1668
|
status: z.ZodObject<{
|
|
@@ -3204,6 +3206,8 @@ declare const AssistantEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
3204
3206
|
type: z.ZodLiteral<"conversation_title_updated">;
|
|
3205
3207
|
conversationId: z.ZodString;
|
|
3206
3208
|
title: z.ZodString;
|
|
3209
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
3210
|
+
type: z.ZodLiteral<"desktop_activity_changed">;
|
|
3207
3211
|
}, z.core.$strip>, z.ZodObject<{
|
|
3208
3212
|
type: z.ZodLiteral<"disk_pressure_status_changed">;
|
|
3209
3213
|
status: z.ZodObject<{
|
|
@@ -4767,6 +4771,12 @@ export declare function getConversationDirPath(id: string, createdAtMs: number):
|
|
|
4767
4771
|
*/
|
|
4768
4772
|
export declare function getConversationProcessingStartedAt(id: string): Promise<number | null>;
|
|
4769
4773
|
|
|
4774
|
+
/**
|
|
4775
|
+
* The tool definitions the conversation's most recent live turn sent to the
|
|
4776
|
+
* provider, or `null` when none has been recorded.
|
|
4777
|
+
*/
|
|
4778
|
+
export declare function getConversationToolSurface(conversationId: string): Promise<ToolDefinition_2[] | null>;
|
|
4779
|
+
|
|
4770
4780
|
/** Fetch one document from the calling plugin's index, or null. */
|
|
4771
4781
|
export declare function getDocument(documentId: string): Promise<IndexedDocument | null>;
|
|
4772
4782
|
|
|
@@ -5896,6 +5906,11 @@ export declare interface PluginLogger {
|
|
|
5896
5906
|
debug(obj: Record<string, unknown>, msg?: string): void;
|
|
5897
5907
|
}
|
|
5898
5908
|
|
|
5909
|
+
export declare class PluginTurnNotAdmittedError extends Error {
|
|
5910
|
+
readonly reason: string;
|
|
5911
|
+
constructor(reason: string);
|
|
5912
|
+
}
|
|
5913
|
+
|
|
5899
5914
|
/**
|
|
5900
5915
|
* The full `post-compact` context a hook receives — the dispatching call
|
|
5901
5916
|
* site's {@link PostCompactInputContext} plus the pipeline-stamped
|
|
@@ -6780,6 +6795,23 @@ export declare interface RunConversationTurnResult {
|
|
|
6780
6795
|
queued?: boolean;
|
|
6781
6796
|
}
|
|
6782
6797
|
|
|
6798
|
+
/**
|
|
6799
|
+
* Slice a string like `String.prototype.slice`, but never cut a UTF-16
|
|
6800
|
+
* surrogate pair in half.
|
|
6801
|
+
*
|
|
6802
|
+
* If the character at `end - 1` is a high surrogate *and* there is more of
|
|
6803
|
+
* the string beyond `end` (so cutting would actually orphan it), `end` is
|
|
6804
|
+
* decremented by one.
|
|
6805
|
+
*
|
|
6806
|
+
* If the character at `start` is a low surrogate *and* `start > 0` (so we
|
|
6807
|
+
* would be starting mid-pair), `start` is incremented by one.
|
|
6808
|
+
*
|
|
6809
|
+
* When `end === str.length` we do not touch a trailing high surrogate: if it
|
|
6810
|
+
* was already orphaned upstream, repairing it here would silently mutate
|
|
6811
|
+
* content. That is the sanitizer's job, not this function's.
|
|
6812
|
+
*/
|
|
6813
|
+
export declare function safeStringSlice(str: string, start?: number, end?: number): string;
|
|
6814
|
+
|
|
6783
6815
|
/** Sparse lexical search over stored message text; ranked message-id hits. */
|
|
6784
6816
|
export declare function searchMessageIdsLexical(query: string, limit: number, opts?: {
|
|
6785
6817
|
conversationId?: string;
|
package/index.js
CHANGED
|
@@ -5,6 +5,7 @@ export const CredentialResolutionError = api.CredentialResolutionError;
|
|
|
5
5
|
export const CredentialStoreError = api.CredentialStoreError;
|
|
6
6
|
export const HOOKS = api.HOOKS;
|
|
7
7
|
export const INTERNAL_NUDGE_OUTPUT_SUPPRESSION = api.INTERNAL_NUDGE_OUTPUT_SUPPRESSION;
|
|
8
|
+
export const PluginTurnNotAdmittedError = api.PluginTurnNotAdmittedError;
|
|
8
9
|
export const REFUSAL_FALLBACK_TEXT = api.REFUSAL_FALLBACK_TEXT;
|
|
9
10
|
export const RiskLevel = api.RiskLevel;
|
|
10
11
|
export const TtsSynthesisError = api.TtsSynthesisError;
|
|
@@ -25,6 +26,7 @@ export const getConfiguredProvider = api.getConfiguredProvider;
|
|
|
25
26
|
export const getConversation = api.getConversation;
|
|
26
27
|
export const getConversationDirPath = api.getConversationDirPath;
|
|
27
28
|
export const getConversationProcessingStartedAt = api.getConversationProcessingStartedAt;
|
|
29
|
+
export const getConversationToolSurface = api.getConversationToolSurface;
|
|
28
30
|
export const getDocument = api.getDocument;
|
|
29
31
|
export const getMessages = api.getMessages;
|
|
30
32
|
export const getModelProfiles = api.getModelProfiles;
|
|
@@ -54,6 +56,7 @@ export const resolveOauthCallbackUrl = api.resolveOauthCallbackUrl;
|
|
|
54
56
|
export const resolveUserName = api.resolveUserName;
|
|
55
57
|
export const resolveWebhookUrl = api.resolveWebhookUrl;
|
|
56
58
|
export const runConversationTurn = api.runConversationTurn;
|
|
59
|
+
export const safeStringSlice = api.safeStringSlice;
|
|
57
60
|
export const searchMessageIdsLexical = api.searchMessageIdsLexical;
|
|
58
61
|
export const selectedBackendSupportsMultimodal = api.selectedBackendSupportsMultimodal;
|
|
59
62
|
export const storeCredential = api.storeCredential;
|