@vellumai/plugin-api 0.10.10-dev.202607170508.cf52585 → 0.10.10-dev.202607170744.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 +45 -0
- package/index.js +1 -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;
|
|
@@ -5643,6 +5662,32 @@ declare type SurfaceData = CardSurfaceData | ChoiceSurfaceData | CopyBlockSurfac
|
|
|
5643
5662
|
|
|
5644
5663
|
declare type _SurfacesServerMessages = UiSurfaceShow | UiSurfaceUpdate | UiSurfaceDismiss | UiSurfaceComplete | UiSurfaceUndoResult;
|
|
5645
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
|
+
|
|
5646
5691
|
declare type SyncChangedEvent = z.infer<typeof SyncChangedEventSchema>;
|
|
5647
5692
|
|
|
5648
5693
|
declare const SyncChangedEventSchema: z.ZodObject<{
|
package/index.js
CHANGED
|
@@ -38,6 +38,7 @@ export const runConversationTurn = api.runConversationTurn;
|
|
|
38
38
|
export const searchMessageIdsLexical = api.searchMessageIdsLexical;
|
|
39
39
|
export const selectedBackendSupportsMultimodal = api.selectedBackendSupportsMultimodal;
|
|
40
40
|
export const stringifyMessageContent = api.stringifyMessageContent;
|
|
41
|
+
export const sweepOrphanedGraphNodePoints = api.sweepOrphanedGraphNodePoints;
|
|
41
42
|
export const syncMessageToDisk = api.syncMessageToDisk;
|
|
42
43
|
export const synthesizeText = api.synthesizeText;
|
|
43
44
|
export const updateMessageMetadata = api.updateMessageMetadata;
|
package/package.json
CHANGED