/** * @license * Copyright 2025 Steven Roussey * SPDX-License-Identifier: Apache-2.0 */ import { DocumentRootNode } from "@workglow/knowledge-base"; import type { IRunConfig, TaskConfig } from "@workglow/task-graph"; import { CreateWorkflow, IExecuteContext, Task } from "@workglow/task-graph"; import { DataPortSchema } from "@workglow/util/schema"; import type { Capability } from "../capability/Capabilities"; export type StructuralParserTaskInput = { format?: "text" | "markdown" | "auto" | undefined; doc_id?: string | undefined; sourceUri?: string | undefined; title: string; text: string; }; export type StructuralParserTaskOutput = Omit<{ doc_id: string; documentTree: { [x: string]: unknown; }; nodeCount: number; }, "documentTree"> & { documentTree: DocumentRootNode; }; export type StructuralParserTaskConfig = TaskConfig; /** * Task for parsing documents into hierarchical tree structure * Supports markdown and plain text with automatic format detection */ export declare class StructuralParserTask extends Task { static type: string; /** Pure-compute parsing task — no provider capability required. */ static readonly requires: readonly Capability[]; static category: string; static title: string; static description: string; static cacheable: boolean; static inputSchema(): DataPortSchema; static outputSchema(): DataPortSchema; execute(input: StructuralParserTaskInput, context: IExecuteContext): Promise; private countNodes; } export declare const structuralParser: (input: StructuralParserTaskInput, config?: StructuralParserTaskConfig, runConfig?: Partial) => Promise; declare module "@workglow/task-graph" { interface Workflow { structuralParser: CreateWorkflow; } } //# sourceMappingURL=StructuralParserTask.d.ts.map