/** * @license * Copyright 2025 Steven Roussey * SPDX-License-Identifier: Apache-2.0 */ import type { IExecuteContext, IExecutePreviewContext, TaskConfig } from "@workglow/task-graph"; import { CreateWorkflow, Task } from "@workglow/task-graph"; import type { FromSchema } from "@workglow/util/schema"; declare const inputSchema: { readonly type: "object"; readonly properties: { readonly value: { readonly type: "string"; readonly title: "Value"; readonly description: "Input string to match against"; }; readonly pattern: { readonly type: "string"; readonly title: "Pattern"; readonly description: "Regular expression pattern"; }; readonly flags: { readonly type: "string"; readonly title: "Flags"; readonly description: "Regex flags (e.g. 'g', 'i', 'gi')"; readonly default: ""; }; }; readonly required: readonly ["value", "pattern"]; readonly additionalProperties: false; }; declare const outputSchema: { readonly type: "object"; readonly properties: { readonly match: { readonly type: "boolean"; readonly title: "Match"; readonly description: "Whether the pattern matched"; }; readonly matches: { readonly type: "array"; readonly items: { readonly type: "string"; }; readonly title: "Matches"; readonly description: "Array of matched strings (full matches when global, groups when not)"; }; }; readonly required: readonly ["match", "matches"]; readonly additionalProperties: false; }; export type RegexTaskInput = FromSchema; export type RegexTaskOutput = FromSchema; export declare class RegexTask extends Task { static readonly type = "RegexTask"; static readonly category = "String"; static title: string; static description: string; static inputSchema(): { readonly type: "object"; readonly properties: { readonly value: { readonly type: "string"; readonly title: "Value"; readonly description: "Input string to match against"; }; readonly pattern: { readonly type: "string"; readonly title: "Pattern"; readonly description: "Regular expression pattern"; }; readonly flags: { readonly type: "string"; readonly title: "Flags"; readonly description: "Regex flags (e.g. 'g', 'i', 'gi')"; readonly default: ""; }; }; readonly required: readonly ["value", "pattern"]; readonly additionalProperties: false; }; static outputSchema(): { readonly type: "object"; readonly properties: { readonly match: { readonly type: "boolean"; readonly title: "Match"; readonly description: "Whether the pattern matched"; }; readonly matches: { readonly type: "array"; readonly items: { readonly type: "string"; }; readonly title: "Matches"; readonly description: "Array of matched strings (full matches when global, groups when not)"; }; }; readonly required: readonly ["match", "matches"]; readonly additionalProperties: false; }; execute(input: Input, _context: IExecuteContext): Promise; executePreview(input: Input, _context: IExecutePreviewContext): Promise; } declare module "@workglow/task-graph" { interface Workflow { regex: CreateWorkflow; } } export {};