/** * @license * Copyright 2026 Steven Roussey * SPDX-License-Identifier: Apache-2.0 */ import { DocumentNode } 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 KbToDocumentsTaskInput = { onlyStale?: boolean | undefined; knowledgeBase: unknown; }; export type KbToDocumentsTaskOutput = Omit<{ title: string[]; doc_id: string[]; documentTree: { [x: string]: unknown; }[]; }, "documentTree"> & { documentTree: DocumentNode[]; }; export type KbToDocumentsTaskConfig = TaskConfig; /** * Task that lists documents from a knowledge base, optionally filtering to only * those that need embedding (have no chunks). Returns parallel arrays of doc IDs, * document trees, and titles for use in downstream embedding pipelines. */ export declare class KbToDocumentsTask extends Task { static type: string; /** Storage task — no provider capability required. */ 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: KbToDocumentsTaskInput, context: IExecuteContext): Promise; } export declare const kbToDocuments: (input: KbToDocumentsTaskInput, config?: KbToDocumentsTaskConfig, runConfig?: Partial) => Promise; declare module "@workglow/task-graph" { interface Workflow { kbToDocuments: CreateWorkflow; } } //# sourceMappingURL=KbToDocumentsTask.d.ts.map