@vellumai/plugin-api 0.10.10-dev.202607170140.fd86251 → 0.10.10-dev.202607170508.cf52585
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 +50 -0
- package/index.js +5 -0
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -3609,6 +3609,31 @@ export declare function isConversationProcessing(id: string): Promise<boolean>;
|
|
|
3609
3609
|
*/
|
|
3610
3610
|
export declare function isMaxTokensStopReason(stopReason: string | null | undefined): boolean;
|
|
3611
3611
|
|
|
3612
|
+
/** A user-role message carrying only tool results, not a fresh prompt. */
|
|
3613
|
+
export declare function isToolResultMessage(message: Message): boolean;
|
|
3614
|
+
|
|
3615
|
+
/**
|
|
3616
|
+
* Whether a provider error message indicates the model can't accept image
|
|
3617
|
+
* input. Providers wrap raw upstream rejections in their own prose (e.g.
|
|
3618
|
+
* `Anthropic API error (400): …`, `Gemini API error (…): …`), so the classifier
|
|
3619
|
+
* matches the full {@link VISION_NOT_SUPPORTED_PATTERNS} set rather than any
|
|
3620
|
+
* single normalized phrase.
|
|
3621
|
+
*/
|
|
3622
|
+
export declare function isVisionNotSupportedError(message: string): boolean;
|
|
3623
|
+
|
|
3624
|
+
/**
|
|
3625
|
+
* Index of the last user message carrying `tool_result` blocks — the
|
|
3626
|
+
* "current turn" boundary {@link stripOldMediaBlocks} keeps intact while
|
|
3627
|
+
* stripping media from older tool results. Returns -1 when no user message
|
|
3628
|
+
* has tool results.
|
|
3629
|
+
*
|
|
3630
|
+
* Targets the last user message with tool_results (not just the last user
|
|
3631
|
+
* message) because a plain-text user message may follow the tool-result turn;
|
|
3632
|
+
* using the last user message unconditionally would leave the most recent tool
|
|
3633
|
+
* screenshots unprotected from stripping.
|
|
3634
|
+
*/
|
|
3635
|
+
export declare function lastToolResultUserMessageIndex(history: Message[]): number;
|
|
3636
|
+
|
|
3612
3637
|
/**
|
|
3613
3638
|
* The remote skill catalog, fetched via the shared catalog cache. Entries
|
|
3614
3639
|
* whose declared feature flag is disabled are reported with
|
|
@@ -4710,6 +4735,18 @@ declare interface PublishPageResponse {
|
|
|
4710
4735
|
errorCode?: string;
|
|
4711
4736
|
}
|
|
4712
4737
|
|
|
4738
|
+
/**
|
|
4739
|
+
* Remove every previously-refused exchange from a working history: for each
|
|
4740
|
+
* assistant message that is exactly the refusal fallback, drop it together with
|
|
4741
|
+
* the contiguous run back to (and including) the nearest genuine user prompt.
|
|
4742
|
+
* That excises the flagged prompt (and any tool exchange in that run) so the
|
|
4743
|
+
* provider never replays it. Returns a new array; the input is untouched.
|
|
4744
|
+
*/
|
|
4745
|
+
export declare function quarantineRefusedExchanges(messages: Message[]): {
|
|
4746
|
+
messages: Message[];
|
|
4747
|
+
droppedExchanges: number;
|
|
4748
|
+
};
|
|
4749
|
+
|
|
4713
4750
|
declare type QuestionRequestEvent = z.infer<typeof QuestionRequestEventSchema>;
|
|
4714
4751
|
|
|
4715
4752
|
declare const QuestionRequestEventSchema: z.ZodObject<{
|
|
@@ -4781,6 +4818,19 @@ export declare interface RedactedThinkingContent {
|
|
|
4781
4818
|
data: string;
|
|
4782
4819
|
}
|
|
4783
4820
|
|
|
4821
|
+
/**
|
|
4822
|
+
* User-facing text a refusal turn is rewritten into (single source of truth for
|
|
4823
|
+
* both the producer — the empty-response plugin's `post-model-call` hook — and
|
|
4824
|
+
* the detector below).
|
|
4825
|
+
*
|
|
4826
|
+
* DETECTION COUPLING: `isRefusalFallbackMessage` matches this string exactly,
|
|
4827
|
+
* so it doubles as the quarantine marker for already-persisted transcripts.
|
|
4828
|
+
* Editing the wording silently stops the sweep from recognizing conversations
|
|
4829
|
+
* poisoned under the old wording (re-introducing the dead-end for that cohort).
|
|
4830
|
+
* If the copy must change, keep matching the historical variants too.
|
|
4831
|
+
*/
|
|
4832
|
+
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.";
|
|
4833
|
+
|
|
4784
4834
|
declare type RelationshipStateUpdatedEvent = z.infer<typeof RelationshipStateUpdatedEventSchema>;
|
|
4785
4835
|
|
|
4786
4836
|
declare const RelationshipStateUpdatedEventSchema: z.ZodObject<{
|
package/index.js
CHANGED
|
@@ -4,6 +4,7 @@ export const CLI_COMMAND_HELP = api.CLI_COMMAND_HELP;
|
|
|
4
4
|
export const CredentialResolutionError = api.CredentialResolutionError;
|
|
5
5
|
export const HOOKS = api.HOOKS;
|
|
6
6
|
export const INTERNAL_NUDGE_OUTPUT_SUPPRESSION = api.INTERNAL_NUDGE_OUTPUT_SUPPRESSION;
|
|
7
|
+
export const REFUSAL_FALLBACK_TEXT = api.REFUSAL_FALLBACK_TEXT;
|
|
7
8
|
export const RiskLevel = api.RiskLevel;
|
|
8
9
|
export const TtsSynthesisError = api.TtsSynthesisError;
|
|
9
10
|
export const addMessage = api.addMessage;
|
|
@@ -22,10 +23,14 @@ export const getModelProfiles = api.getModelProfiles;
|
|
|
22
23
|
export const hasLexicalTokens = api.hasLexicalTokens;
|
|
23
24
|
export const isConversationProcessing = api.isConversationProcessing;
|
|
24
25
|
export const isMaxTokensStopReason = api.isMaxTokensStopReason;
|
|
26
|
+
export const isToolResultMessage = api.isToolResultMessage;
|
|
27
|
+
export const isVisionNotSupportedError = api.isVisionNotSupportedError;
|
|
28
|
+
export const lastToolResultUserMessageIndex = api.lastToolResultUserMessageIndex;
|
|
25
29
|
export const listCatalogSkills = api.listCatalogSkills;
|
|
26
30
|
export const listConversations = api.listConversations;
|
|
27
31
|
export const listInstalledSkills = api.listInstalledSkills;
|
|
28
32
|
export const parseMessageMetadata = api.parseMessageMetadata;
|
|
33
|
+
export const quarantineRefusedExchanges = api.quarantineRefusedExchanges;
|
|
29
34
|
export const resolveCredential = api.resolveCredential;
|
|
30
35
|
export const resolveMediaSourceData = api.resolveMediaSourceData;
|
|
31
36
|
export const resolveUserName = api.resolveUserName;
|
package/package.json
CHANGED