/** * @license * Copyright 2025 Steven Roussey * SPDX-License-Identifier: Apache-2.0 */ import type { CachePolicy, IRunConfig, TaskConfig } from "@workglow/task-graph"; import { CreateWorkflow, IExecuteContext, Task } from "@workglow/task-graph"; import { DataPortSchema, TypedArray } from "@workglow/util/schema"; import type { Capability } from "../capability/Capabilities"; export type VectorStoreUpsertTaskInput = { doc_title?: string | undefined; chunks: { [x: string]: unknown; leafNodeId?: string | undefined; summary?: string | undefined; entities?: { type: string; text: string; score: number; }[] | undefined; parentSummaries?: string[] | undefined; sectionTitles?: string[] | undefined; doc_title?: string | undefined; text: string; doc_id: string; chunkId: string; nodePath: string[]; depth: number; }[]; vector: TypedArray | TypedArray[]; knowledgeBase: unknown; }; export type VectorStoreUpsertTaskOutput = { doc_id: string; count: number; chunk_ids: string[]; }; export type ChunkVectorUpsertTaskConfig = TaskConfig; /** * Upsert chunks + their embeddings into a knowledge base in a single step. * Consumes the output of `HierarchicalChunkerTask` (chunks) and * `TextEmbeddingTask` (vector) directly — no intermediate transform task needed. */ export declare class ChunkVectorUpsertTask extends Task { static type: string; /** Pure-compute upsert task — uses storage, not a provider capability. */ static readonly requires: readonly Capability[]; static category: string; static title: string; static description: string; static cachePolicy: CachePolicy; static inputSchema(): DataPortSchema; static outputSchema(): DataPortSchema; execute(input: VectorStoreUpsertTaskInput, context: IExecuteContext): Promise; } export declare const chunkVectorUpsert: (input: VectorStoreUpsertTaskInput, config?: ChunkVectorUpsertTaskConfig, runConfig?: Partial) => Promise; declare module "@workglow/task-graph" { interface Workflow { chunkVectorUpsert: CreateWorkflow; } } //# sourceMappingURL=ChunkVectorUpsertTask.d.ts.map