/** * @license * Copyright 2026 Steven Roussey * SPDX-License-Identifier: Apache-2.0 */ import { Document } from "@workglow/knowledge-base"; import type { CachePolicy, IRunConfig, TaskConfig } from "@workglow/task-graph"; import { CreateWorkflow, IExecuteContext, Task } from "@workglow/task-graph"; import type { DataPortSchema } from "@workglow/util/schema"; import type { Capability } from "../capability/Capabilities"; export type KbAddDocumentTaskInput = Omit<{ knowledgeBase: unknown; document: unknown; }, "document"> & { readonly document: Document; }; export type KbAddDocumentTaskOutput = { doc_id: string; }; export type KbAddDocumentTaskConfig = TaskConfig; /** * Ingest a document into a knowledge base end-to-end: chunk, embed, and * store via the KB's installed strategy. Threads the task's execution * context (signal, resourceScope, registry) into the KB call so model * resources are shared and abort signals propagate. */ export declare class KbAddDocumentTask extends Task { static type: string; 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: KbAddDocumentTaskInput, context: IExecuteContext): Promise; } export declare const kbAddDocument: (input: KbAddDocumentTaskInput, config?: KbAddDocumentTaskConfig, runConfig?: Partial) => Promise; declare module "@workglow/task-graph" { interface Workflow { kbAddDocument: CreateWorkflow; } } //# sourceMappingURL=KbAddDocumentTask.d.ts.map