UNPKG

@code-yeongyu/senpi

Version:

Coding agent CLI with read, bash, edit, write tools and session management

26 lines • 1.21 kB
/** * Validation is what lets a spec drive a widget unattended: every pattern compiles on the * linear-time engine, every field a block reads is fed by a rule, and the rules match the samples * the author saw. Ported from oh-my-pi 9df0457b31 (MIT, Copyright Can Boluk et al.). */ import { type LineMatcher } from "./matcher.ts"; import type { JobWidgetSampleLines } from "./source-types.ts"; import { type JobWidgetSpec } from "./spec-types.ts"; export type JobWidgetSpecValidation = { ok: true; spec: JobWidgetSpec; } | { ok: false; errors: string[]; }; export interface JobWidgetValidateOptions { matcher: LineMatcher; /** Lines the author saw; enable the dry run. */ samples?: readonly JobWidgetSampleLines[]; /** The job's command, task and hints; with samples, a constant total or target must appear in one. */ brief?: string; } /** Why an authored answer declines to draw a widget (its `skip`), or `undefined` for a spec. */ export declare function jobWidgetSkip(value: unknown): string | undefined; export declare function validateJobWidgetSpec(value: unknown, options: JobWidgetValidateOptions): JobWidgetSpecValidation; //# sourceMappingURL=spec-validate.d.ts.map