UNPKG

@emanuelsan/mosaic-js

Version:

Composable Markdown-based AI instruction engine for Node.js

23 lines 1.05 kB
import { Effect, Schema } from "effect"; declare const SelectorValidationSchema: Schema.Union<[Schema.Struct<{ valid: Schema.Literal<[true]>; type: Schema.Literal<["relative", "root", "id"]>; }>, Schema.Struct<{ valid: Schema.Literal<[false]>; }>]>; type SelectorValidation = typeof SelectorValidationSchema.Type; /** * Effectful function that validates a MosaicJS template selector string and determines its type. * Accepts a selector and returns an Effect that, when executed, yields an object indicating whether the selector is valid, * and if valid, specifies its type ('relative', 'root', or 'id'). * * Supported selector formats: * - Relative path (e.g., 'some-dir/core-instructions') * - Root path prefixed with '@' (e.g., '@root-block', '@namespace/path') * - ID selector prefixed with '#' (e.g., '#some-id') * * Returns: Effect<SelectorValidation> */ export declare const isValidTemplateSelector: (selector: string) => Effect.Effect<SelectorValidation>; export {}; //# sourceMappingURL=isValidTemplateSelector.d.ts.map