import type { RequestArtifactRole, RequestArtifactState } from './request-artifact-service.js'; export type RequestType = 'feature' | 'bugfix' | 'refactor' | 'docs' | 'config' | 'chore'; export declare const VALID_REQUEST_TYPES: ReadonlyArray; export declare const DEFAULT_REQUEST_TYPE: RequestType; export declare function isRequestType(value: string): value is RequestType; export type ArtifactPrerequisite = { /** Relative path under `.peaks/_runtime//`. May contain `` placeholder. */ relativePath: string; /** Human-readable description of what this artifact represents. */ description: string; /** Optional content markers — when set, the file must contain ALL of these (case-insensitive substring). */ mustContain?: ReadonlyArray; /** * Optional content markers — when set, the file must contain AT LEAST ONE of * these (case-insensitive substring). Use this for escape-hatch patterns * (e.g. perf-baseline's "Results table" OR "N/A — no perf surface" stub). * `mustContain` and `mustContainAny` are independent: when both are set, * `mustContain` markers must all be present AND at least one `mustContainAny` * marker must be present. */ mustContainAny?: ReadonlyArray; /** * Slice 2.6.1.F: structural heading markers — when set, the file must * contain ALL of these as markdown headings (line beginning with `#`–`###` * followed by the marker, case-insensitive). This prevents a file from * passing the gate by simply mentioning the marker as prose. Use this for * section-anchored gates like the karpathy 4-guideline review. * Independent of `mustContain` / `mustContainAny`. */ headingMustContain?: ReadonlyArray; /** * Slice v2.12.0 Group B Tier 5: optional legacy path that satisfies * the same gate. When `relativePath` does not resolve on disk, the * resolver tries this fallback path before reporting the prereq as * missing. Use this for 1-minor-release back-compat windows where * an old artifact location is still accepted alongside the new one. * v2.13.0 should remove all `legacyRelativePath` entries. * * Body checks (`mustContain` / `mustContainAny` / * `headingMustContain`) apply to whichever path resolved — the * gate does not distinguish which path served the file. */ legacyRelativePath?: string; }; export type PrerequisiteCheckResult = { ok: boolean; missing: Array<{ path: string; description: string; }>; /** * v2.13.2 AC-5 — soft-block warnings. Each entry is a prereq * path that is currently missing but is in a 1-minor-release * back-compat window. The transition gate does not throw on * `missing`-only (so legacy callers keep working) but surfaces the * warning to the operator so they can plan the v2.14.0 hard cut. */ warnings: Array<{ path: string; code: string; message: string; }>; }; export type CheckPrerequisitesOptions = { projectRoot: string; /** * Durable scope of the artifact (the `.peaks/_runtime//` directory * the file lives in). The gate scans under `.peaks/_runtime///` * for prerequisite artifacts. */ sessionId: string; role: RequestArtifactRole; newState: RequestArtifactState; requestId: string; requestType?: RequestType; }; export declare function getPrerequisitesFor(role: RequestArtifactRole, newState: RequestArtifactState, requestType?: RequestType): ReadonlyArray; export declare function checkPrerequisites(options: CheckPrerequisitesOptions): Promise;