@vellumai/plugin-api 0.10.10-dev.202607170310.54734b3 → 0.10.10-dev.202607170655.fa2b150
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 +95 -0
- package/index.js +6 -0
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -2830,6 +2830,25 @@ declare interface GetSigningIdentityRequest {
|
|
|
2830
2830
|
requestId: string;
|
|
2831
2831
|
}
|
|
2832
2832
|
|
|
2833
|
+
/**
|
|
2834
|
+
* The subset of the Qdrant client the orphan sweep needs, narrowed to an
|
|
2835
|
+
* interface so the sweep can be unit-tested with a fake client.
|
|
2836
|
+
*/
|
|
2837
|
+
declare interface GraphNodeSweepClient {
|
|
2838
|
+
scrollByTargetType(targetType: string): Promise<Array<{
|
|
2839
|
+
id: string;
|
|
2840
|
+
payload: Record<string, unknown>;
|
|
2841
|
+
}>>;
|
|
2842
|
+
deleteByTarget(targetType: string, targetId: string): Promise<void>;
|
|
2843
|
+
}
|
|
2844
|
+
|
|
2845
|
+
declare interface GraphNodeSweepResult {
|
|
2846
|
+
/** Distinct `graph_node` target ids currently indexed in Qdrant. */
|
|
2847
|
+
scanned: number;
|
|
2848
|
+
/** Orphan target ids whose Qdrant points were deleted. */
|
|
2849
|
+
deleted: number;
|
|
2850
|
+
}
|
|
2851
|
+
|
|
2833
2852
|
declare interface GuardianActionDecisionResponse {
|
|
2834
2853
|
type: "guardian_action_decision_response";
|
|
2835
2854
|
applied: boolean;
|
|
@@ -3609,6 +3628,31 @@ export declare function isConversationProcessing(id: string): Promise<boolean>;
|
|
|
3609
3628
|
*/
|
|
3610
3629
|
export declare function isMaxTokensStopReason(stopReason: string | null | undefined): boolean;
|
|
3611
3630
|
|
|
3631
|
+
/** A user-role message carrying only tool results, not a fresh prompt. */
|
|
3632
|
+
export declare function isToolResultMessage(message: Message): boolean;
|
|
3633
|
+
|
|
3634
|
+
/**
|
|
3635
|
+
* Whether a provider error message indicates the model can't accept image
|
|
3636
|
+
* input. Providers wrap raw upstream rejections in their own prose (e.g.
|
|
3637
|
+
* `Anthropic API error (400): …`, `Gemini API error (…): …`), so the classifier
|
|
3638
|
+
* matches the full {@link VISION_NOT_SUPPORTED_PATTERNS} set rather than any
|
|
3639
|
+
* single normalized phrase.
|
|
3640
|
+
*/
|
|
3641
|
+
export declare function isVisionNotSupportedError(message: string): boolean;
|
|
3642
|
+
|
|
3643
|
+
/**
|
|
3644
|
+
* Index of the last user message carrying `tool_result` blocks — the
|
|
3645
|
+
* "current turn" boundary {@link stripOldMediaBlocks} keeps intact while
|
|
3646
|
+
* stripping media from older tool results. Returns -1 when no user message
|
|
3647
|
+
* has tool results.
|
|
3648
|
+
*
|
|
3649
|
+
* Targets the last user message with tool_results (not just the last user
|
|
3650
|
+
* message) because a plain-text user message may follow the tool-result turn;
|
|
3651
|
+
* using the last user message unconditionally would leave the most recent tool
|
|
3652
|
+
* screenshots unprotected from stripping.
|
|
3653
|
+
*/
|
|
3654
|
+
export declare function lastToolResultUserMessageIndex(history: Message[]): number;
|
|
3655
|
+
|
|
3612
3656
|
/**
|
|
3613
3657
|
* The remote skill catalog, fetched via the shared catalog cache. Entries
|
|
3614
3658
|
* whose declared feature flag is disabled are reported with
|
|
@@ -4710,6 +4754,18 @@ declare interface PublishPageResponse {
|
|
|
4710
4754
|
errorCode?: string;
|
|
4711
4755
|
}
|
|
4712
4756
|
|
|
4757
|
+
/**
|
|
4758
|
+
* Remove every previously-refused exchange from a working history: for each
|
|
4759
|
+
* assistant message that is exactly the refusal fallback, drop it together with
|
|
4760
|
+
* the contiguous run back to (and including) the nearest genuine user prompt.
|
|
4761
|
+
* That excises the flagged prompt (and any tool exchange in that run) so the
|
|
4762
|
+
* provider never replays it. Returns a new array; the input is untouched.
|
|
4763
|
+
*/
|
|
4764
|
+
export declare function quarantineRefusedExchanges(messages: Message[]): {
|
|
4765
|
+
messages: Message[];
|
|
4766
|
+
droppedExchanges: number;
|
|
4767
|
+
};
|
|
4768
|
+
|
|
4713
4769
|
declare type QuestionRequestEvent = z.infer<typeof QuestionRequestEventSchema>;
|
|
4714
4770
|
|
|
4715
4771
|
declare const QuestionRequestEventSchema: z.ZodObject<{
|
|
@@ -4781,6 +4837,19 @@ export declare interface RedactedThinkingContent {
|
|
|
4781
4837
|
data: string;
|
|
4782
4838
|
}
|
|
4783
4839
|
|
|
4840
|
+
/**
|
|
4841
|
+
* User-facing text a refusal turn is rewritten into (single source of truth for
|
|
4842
|
+
* both the producer — the empty-response plugin's `post-model-call` hook — and
|
|
4843
|
+
* the detector below).
|
|
4844
|
+
*
|
|
4845
|
+
* DETECTION COUPLING: `isRefusalFallbackMessage` matches this string exactly,
|
|
4846
|
+
* so it doubles as the quarantine marker for already-persisted transcripts.
|
|
4847
|
+
* Editing the wording silently stops the sweep from recognizing conversations
|
|
4848
|
+
* poisoned under the old wording (re-introducing the dead-end for that cohort).
|
|
4849
|
+
* If the copy must change, keep matching the historical variants too.
|
|
4850
|
+
*/
|
|
4851
|
+
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.";
|
|
4852
|
+
|
|
4784
4853
|
declare type RelationshipStateUpdatedEvent = z.infer<typeof RelationshipStateUpdatedEventSchema>;
|
|
4785
4854
|
|
|
4786
4855
|
declare const RelationshipStateUpdatedEventSchema: z.ZodObject<{
|
|
@@ -5593,6 +5662,32 @@ declare type SurfaceData = CardSurfaceData | ChoiceSurfaceData | CopyBlockSurfac
|
|
|
5593
5662
|
|
|
5594
5663
|
declare type _SurfacesServerMessages = UiSurfaceShow | UiSurfaceUpdate | UiSurfaceDismiss | UiSurfaceComplete | UiSurfaceUndoResult;
|
|
5595
5664
|
|
|
5665
|
+
/**
|
|
5666
|
+
* Delete `graph_node` Qdrant points whose backing `memory_graph_nodes` row no
|
|
5667
|
+
* longer exists.
|
|
5668
|
+
*
|
|
5669
|
+
* `embedAndUpsert` treats the `memory_embeddings` cache write as best-effort: on
|
|
5670
|
+
* a cache-write failure it logs and still upserts the Qdrant point, so a node
|
|
5671
|
+
* can end up with a `graph_node` point but no cache row. Migration 340 discovers
|
|
5672
|
+
* orphans only through cache rows, so those cacheless points survive its sweep;
|
|
5673
|
+
* once migration 323 hard-deletes their backing nodes they keep consuming
|
|
5674
|
+
* `searchGraphNodes` top-K slots (the query hydrates hits from
|
|
5675
|
+
* `memory_graph_nodes` and silently drops rows that are gone).
|
|
5676
|
+
*
|
|
5677
|
+
* This enumerates the authoritative set of indexed `graph_node` points straight
|
|
5678
|
+
* from Qdrant — the only place cacheless points are recorded — and deletes any
|
|
5679
|
+
* whose `target_id` has no row in `memory_graph_nodes`. Membership is
|
|
5680
|
+
* existence-based, matching migration 340: a soft-deleted node keeps its row
|
|
5681
|
+
* (`fidelity = 'gone'`) and therefore its point.
|
|
5682
|
+
*
|
|
5683
|
+
* Idempotent: a second run finds no orphans. Deletion is by Qdrant payload
|
|
5684
|
+
* (`target_type` + `target_id`) via `deleteByTarget`, so it removes cacheless
|
|
5685
|
+
* points a cache lookup could never surface. Each delete goes through the Qdrant
|
|
5686
|
+
* circuit breaker; a transient Qdrant failure propagates so the caller (the
|
|
5687
|
+
* memory worker) can retry the sweep on a later cycle.
|
|
5688
|
+
*/
|
|
5689
|
+
export declare function sweepOrphanedGraphNodePoints(qdrant: GraphNodeSweepClient): Promise<GraphNodeSweepResult>;
|
|
5690
|
+
|
|
5596
5691
|
declare type SyncChangedEvent = z.infer<typeof SyncChangedEventSchema>;
|
|
5597
5692
|
|
|
5598
5693
|
declare const SyncChangedEventSchema: 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;
|
|
@@ -33,6 +38,7 @@ export const runConversationTurn = api.runConversationTurn;
|
|
|
33
38
|
export const searchMessageIdsLexical = api.searchMessageIdsLexical;
|
|
34
39
|
export const selectedBackendSupportsMultimodal = api.selectedBackendSupportsMultimodal;
|
|
35
40
|
export const stringifyMessageContent = api.stringifyMessageContent;
|
|
41
|
+
export const sweepOrphanedGraphNodePoints = api.sweepOrphanedGraphNodePoints;
|
|
36
42
|
export const syncMessageToDisk = api.syncMessageToDisk;
|
|
37
43
|
export const synthesizeText = api.synthesizeText;
|
|
38
44
|
export const updateMessageMetadata = api.updateMessageMetadata;
|
package/package.json
CHANGED