import { AsyncLocalStorage } from "node:async_hooks"; import "node:child_process"; import { z } from "zod"; //#region ../core/src/cli-contracts/common.d.ts /** Upstream diagnostic emitted in a CLI JSON status array. */ declare const CliDiagnosticSchema: z.ZodObject<{ severity: z.ZodEnum<["error", "warning", "info"]>; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ severity: z.ZodEnum<["error", "warning", "info"]>; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ severity: z.ZodEnum<["error", "warning", "info"]>; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, z.ZodTypeAny, "passthrough">>; /** Health-only direct Reference entry emitted by OpenSpec Doctor. */ declare const CliDoctorReferenceEntrySchema: z.ZodObject<{ store_id: z.ZodString; root: z.ZodOptional; status: z.ZodArray; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ severity: z.ZodEnum<["error", "warning", "info"]>; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ severity: z.ZodEnum<["error", "warning", "info"]>; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, z.ZodTypeAny, "passthrough">>, "many">; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ store_id: z.ZodString; root: z.ZodOptional; status: z.ZodArray; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ severity: z.ZodEnum<["error", "warning", "info"]>; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ severity: z.ZodEnum<["error", "warning", "info"]>; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, z.ZodTypeAny, "passthrough">>, "many">; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ store_id: z.ZodString; root: z.ZodOptional; status: z.ZodArray; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ severity: z.ZodEnum<["error", "warning", "info"]>; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ severity: z.ZodEnum<["error", "warning", "info"]>; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, z.ZodTypeAny, "passthrough">>, "many">; }, z.ZodTypeAny, "passthrough">>; type CliDiagnostic = z.infer; /** Health-only direct Reference entry returned by OpenSpec Doctor. */ type CliDoctorReferenceEntry = z.infer; //#endregion //#region ../core/src/cli-contracts/store.d.ts /** Root, Store, Reference, and diagnostic result of CLI Doctor. */ declare const CliDoctorSchema: z.ZodObject<{ root: z.ZodNullable; store_id: z.ZodOptional; } & { healthy: z.ZodBoolean; status: z.ZodArray; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ severity: z.ZodEnum<["error", "warning", "info"]>; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ severity: z.ZodEnum<["error", "warning", "info"]>; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, z.ZodTypeAny, "passthrough">>, "many">; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ path: z.ZodString; source: z.ZodEnum<["store", "declared", "nearest", "global_default", "implicit"]>; store_id: z.ZodOptional; } & { healthy: z.ZodBoolean; status: z.ZodArray; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ severity: z.ZodEnum<["error", "warning", "info"]>; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ severity: z.ZodEnum<["error", "warning", "info"]>; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, z.ZodTypeAny, "passthrough">>, "many">; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ path: z.ZodString; source: z.ZodEnum<["store", "declared", "nearest", "global_default", "implicit"]>; store_id: z.ZodOptional; } & { healthy: z.ZodBoolean; status: z.ZodArray; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ severity: z.ZodEnum<["error", "warning", "info"]>; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ severity: z.ZodEnum<["error", "warning", "info"]>; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, z.ZodTypeAny, "passthrough">>, "many">; }, z.ZodTypeAny, "passthrough">>>; store: z.ZodNullable; valid: z.ZodNullable; id: z.ZodOptional>; remote: z.ZodOptional>; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ present: z.ZodNullable; valid: z.ZodNullable; id: z.ZodOptional>; remote: z.ZodOptional>; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ present: z.ZodNullable; valid: z.ZodNullable; id: z.ZodOptional>; remote: z.ZodOptional>; }, z.ZodTypeAny, "passthrough">>; origin_url: z.ZodOptional; status: z.ZodArray; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ severity: z.ZodEnum<["error", "warning", "info"]>; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ severity: z.ZodEnum<["error", "warning", "info"]>; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, z.ZodTypeAny, "passthrough">>, "many">; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ id: z.ZodString; metadata: z.ZodObject<{ present: z.ZodNullable; valid: z.ZodNullable; id: z.ZodOptional>; remote: z.ZodOptional>; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ present: z.ZodNullable; valid: z.ZodNullable; id: z.ZodOptional>; remote: z.ZodOptional>; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ present: z.ZodNullable; valid: z.ZodNullable; id: z.ZodOptional>; remote: z.ZodOptional>; }, z.ZodTypeAny, "passthrough">>; origin_url: z.ZodOptional; status: z.ZodArray; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ severity: z.ZodEnum<["error", "warning", "info"]>; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ severity: z.ZodEnum<["error", "warning", "info"]>; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, z.ZodTypeAny, "passthrough">>, "many">; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ id: z.ZodString; metadata: z.ZodObject<{ present: z.ZodNullable; valid: z.ZodNullable; id: z.ZodOptional>; remote: z.ZodOptional>; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ present: z.ZodNullable; valid: z.ZodNullable; id: z.ZodOptional>; remote: z.ZodOptional>; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ present: z.ZodNullable; valid: z.ZodNullable; id: z.ZodOptional>; remote: z.ZodOptional>; }, z.ZodTypeAny, "passthrough">>; origin_url: z.ZodOptional; status: z.ZodArray; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ severity: z.ZodEnum<["error", "warning", "info"]>; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ severity: z.ZodEnum<["error", "warning", "info"]>; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, z.ZodTypeAny, "passthrough">>, "many">; }, z.ZodTypeAny, "passthrough">>>; references: z.ZodArray; status: z.ZodArray; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ severity: z.ZodEnum<["error", "warning", "info"]>; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ severity: z.ZodEnum<["error", "warning", "info"]>; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, z.ZodTypeAny, "passthrough">>, "many">; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ store_id: z.ZodString; root: z.ZodOptional; status: z.ZodArray; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ severity: z.ZodEnum<["error", "warning", "info"]>; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ severity: z.ZodEnum<["error", "warning", "info"]>; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, z.ZodTypeAny, "passthrough">>, "many">; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ store_id: z.ZodString; root: z.ZodOptional; status: z.ZodArray; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ severity: z.ZodEnum<["error", "warning", "info"]>; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ severity: z.ZodEnum<["error", "warning", "info"]>; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, z.ZodTypeAny, "passthrough">>, "many">; }, z.ZodTypeAny, "passthrough">>, "many">; status: z.ZodArray; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ severity: z.ZodEnum<["error", "warning", "info"]>; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ severity: z.ZodEnum<["error", "warning", "info"]>; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, z.ZodTypeAny, "passthrough">>, "many">; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ root: z.ZodNullable; store_id: z.ZodOptional; } & { healthy: z.ZodBoolean; status: z.ZodArray; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ severity: z.ZodEnum<["error", "warning", "info"]>; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ severity: z.ZodEnum<["error", "warning", "info"]>; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, z.ZodTypeAny, "passthrough">>, "many">; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ path: z.ZodString; source: z.ZodEnum<["store", "declared", "nearest", "global_default", "implicit"]>; store_id: z.ZodOptional; } & { healthy: z.ZodBoolean; status: z.ZodArray; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ severity: z.ZodEnum<["error", "warning", "info"]>; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ severity: z.ZodEnum<["error", "warning", "info"]>; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, z.ZodTypeAny, "passthrough">>, "many">; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ path: z.ZodString; source: z.ZodEnum<["store", "declared", "nearest", "global_default", "implicit"]>; store_id: z.ZodOptional; } & { healthy: z.ZodBoolean; status: z.ZodArray; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ severity: z.ZodEnum<["error", "warning", "info"]>; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ severity: z.ZodEnum<["error", "warning", "info"]>; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, z.ZodTypeAny, "passthrough">>, "many">; }, z.ZodTypeAny, "passthrough">>>; store: z.ZodNullable; valid: z.ZodNullable; id: z.ZodOptional>; remote: z.ZodOptional>; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ present: z.ZodNullable; valid: z.ZodNullable; id: z.ZodOptional>; remote: z.ZodOptional>; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ present: z.ZodNullable; valid: z.ZodNullable; id: z.ZodOptional>; remote: z.ZodOptional>; }, z.ZodTypeAny, "passthrough">>; origin_url: z.ZodOptional; status: z.ZodArray; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ severity: z.ZodEnum<["error", "warning", "info"]>; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ severity: z.ZodEnum<["error", "warning", "info"]>; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, z.ZodTypeAny, "passthrough">>, "many">; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ id: z.ZodString; metadata: z.ZodObject<{ present: z.ZodNullable; valid: z.ZodNullable; id: z.ZodOptional>; remote: z.ZodOptional>; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ present: z.ZodNullable; valid: z.ZodNullable; id: z.ZodOptional>; remote: z.ZodOptional>; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ present: z.ZodNullable; valid: z.ZodNullable; id: z.ZodOptional>; remote: z.ZodOptional>; }, z.ZodTypeAny, "passthrough">>; origin_url: z.ZodOptional; status: z.ZodArray; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ severity: z.ZodEnum<["error", "warning", "info"]>; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ severity: z.ZodEnum<["error", "warning", "info"]>; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, z.ZodTypeAny, "passthrough">>, "many">; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ id: z.ZodString; metadata: z.ZodObject<{ present: z.ZodNullable; valid: z.ZodNullable; id: z.ZodOptional>; remote: z.ZodOptional>; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ present: z.ZodNullable; valid: z.ZodNullable; id: z.ZodOptional>; remote: z.ZodOptional>; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ present: z.ZodNullable; valid: z.ZodNullable; id: z.ZodOptional>; remote: z.ZodOptional>; }, z.ZodTypeAny, "passthrough">>; origin_url: z.ZodOptional; status: z.ZodArray; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ severity: z.ZodEnum<["error", "warning", "info"]>; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ severity: z.ZodEnum<["error", "warning", "info"]>; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, z.ZodTypeAny, "passthrough">>, "many">; }, z.ZodTypeAny, "passthrough">>>; references: z.ZodArray; status: z.ZodArray; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ severity: z.ZodEnum<["error", "warning", "info"]>; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ severity: z.ZodEnum<["error", "warning", "info"]>; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, z.ZodTypeAny, "passthrough">>, "many">; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ store_id: z.ZodString; root: z.ZodOptional; status: z.ZodArray; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ severity: z.ZodEnum<["error", "warning", "info"]>; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ severity: z.ZodEnum<["error", "warning", "info"]>; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, z.ZodTypeAny, "passthrough">>, "many">; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ store_id: z.ZodString; root: z.ZodOptional; status: z.ZodArray; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ severity: z.ZodEnum<["error", "warning", "info"]>; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ severity: z.ZodEnum<["error", "warning", "info"]>; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, z.ZodTypeAny, "passthrough">>, "many">; }, z.ZodTypeAny, "passthrough">>, "many">; status: z.ZodArray; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ severity: z.ZodEnum<["error", "warning", "info"]>; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ severity: z.ZodEnum<["error", "warning", "info"]>; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, z.ZodTypeAny, "passthrough">>, "many">; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ root: z.ZodNullable; store_id: z.ZodOptional; } & { healthy: z.ZodBoolean; status: z.ZodArray; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ severity: z.ZodEnum<["error", "warning", "info"]>; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ severity: z.ZodEnum<["error", "warning", "info"]>; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, z.ZodTypeAny, "passthrough">>, "many">; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ path: z.ZodString; source: z.ZodEnum<["store", "declared", "nearest", "global_default", "implicit"]>; store_id: z.ZodOptional; } & { healthy: z.ZodBoolean; status: z.ZodArray; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ severity: z.ZodEnum<["error", "warning", "info"]>; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ severity: z.ZodEnum<["error", "warning", "info"]>; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, z.ZodTypeAny, "passthrough">>, "many">; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ path: z.ZodString; source: z.ZodEnum<["store", "declared", "nearest", "global_default", "implicit"]>; store_id: z.ZodOptional; } & { healthy: z.ZodBoolean; status: z.ZodArray; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ severity: z.ZodEnum<["error", "warning", "info"]>; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ severity: z.ZodEnum<["error", "warning", "info"]>; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, z.ZodTypeAny, "passthrough">>, "many">; }, z.ZodTypeAny, "passthrough">>>; store: z.ZodNullable; valid: z.ZodNullable; id: z.ZodOptional>; remote: z.ZodOptional>; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ present: z.ZodNullable; valid: z.ZodNullable; id: z.ZodOptional>; remote: z.ZodOptional>; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ present: z.ZodNullable; valid: z.ZodNullable; id: z.ZodOptional>; remote: z.ZodOptional>; }, z.ZodTypeAny, "passthrough">>; origin_url: z.ZodOptional; status: z.ZodArray; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ severity: z.ZodEnum<["error", "warning", "info"]>; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ severity: z.ZodEnum<["error", "warning", "info"]>; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, z.ZodTypeAny, "passthrough">>, "many">; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ id: z.ZodString; metadata: z.ZodObject<{ present: z.ZodNullable; valid: z.ZodNullable; id: z.ZodOptional>; remote: z.ZodOptional>; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ present: z.ZodNullable; valid: z.ZodNullable; id: z.ZodOptional>; remote: z.ZodOptional>; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ present: z.ZodNullable; valid: z.ZodNullable; id: z.ZodOptional>; remote: z.ZodOptional>; }, z.ZodTypeAny, "passthrough">>; origin_url: z.ZodOptional; status: z.ZodArray; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ severity: z.ZodEnum<["error", "warning", "info"]>; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ severity: z.ZodEnum<["error", "warning", "info"]>; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, z.ZodTypeAny, "passthrough">>, "many">; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ id: z.ZodString; metadata: z.ZodObject<{ present: z.ZodNullable; valid: z.ZodNullable; id: z.ZodOptional>; remote: z.ZodOptional>; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ present: z.ZodNullable; valid: z.ZodNullable; id: z.ZodOptional>; remote: z.ZodOptional>; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ present: z.ZodNullable; valid: z.ZodNullable; id: z.ZodOptional>; remote: z.ZodOptional>; }, z.ZodTypeAny, "passthrough">>; origin_url: z.ZodOptional; status: z.ZodArray; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ severity: z.ZodEnum<["error", "warning", "info"]>; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ severity: z.ZodEnum<["error", "warning", "info"]>; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, z.ZodTypeAny, "passthrough">>, "many">; }, z.ZodTypeAny, "passthrough">>>; references: z.ZodArray; status: z.ZodArray; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ severity: z.ZodEnum<["error", "warning", "info"]>; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ severity: z.ZodEnum<["error", "warning", "info"]>; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, z.ZodTypeAny, "passthrough">>, "many">; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ store_id: z.ZodString; root: z.ZodOptional; status: z.ZodArray; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ severity: z.ZodEnum<["error", "warning", "info"]>; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ severity: z.ZodEnum<["error", "warning", "info"]>; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, z.ZodTypeAny, "passthrough">>, "many">; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ store_id: z.ZodString; root: z.ZodOptional; status: z.ZodArray; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ severity: z.ZodEnum<["error", "warning", "info"]>; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ severity: z.ZodEnum<["error", "warning", "info"]>; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, z.ZodTypeAny, "passthrough">>, "many">; }, z.ZodTypeAny, "passthrough">>, "many">; status: z.ZodArray; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ severity: z.ZodEnum<["error", "warning", "info"]>; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ severity: z.ZodEnum<["error", "warning", "info"]>; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, z.ZodTypeAny, "passthrough">>, "many">; }, z.ZodTypeAny, "passthrough">>; /** Root and direct referenced-Store relationship result of CLI Context. */ declare const CliContextSchema: z.ZodObject<{ root: z.ZodNullable; store_id: z.ZodOptional; } & { role: z.ZodLiteral<"openspec_root">; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ path: z.ZodString; source: z.ZodEnum<["store", "declared", "nearest", "global_default", "implicit"]>; store_id: z.ZodOptional; } & { role: z.ZodLiteral<"openspec_root">; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ path: z.ZodString; source: z.ZodEnum<["store", "declared", "nearest", "global_default", "implicit"]>; store_id: z.ZodOptional; } & { role: z.ZodLiteral<"openspec_root">; }, z.ZodTypeAny, "passthrough">>>; members: z.ZodArray; id: z.ZodString; path: z.ZodOptional; remote: z.ZodOptional; fetch: z.ZodOptional; status: z.ZodArray; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ severity: z.ZodEnum<["error", "warning", "info"]>; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ severity: z.ZodEnum<["error", "warning", "info"]>; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, z.ZodTypeAny, "passthrough">>, "many">; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ role: z.ZodLiteral<"referenced_store">; id: z.ZodString; path: z.ZodOptional; remote: z.ZodOptional; fetch: z.ZodOptional; status: z.ZodArray; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ severity: z.ZodEnum<["error", "warning", "info"]>; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ severity: z.ZodEnum<["error", "warning", "info"]>; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, z.ZodTypeAny, "passthrough">>, "many">; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ role: z.ZodLiteral<"referenced_store">; id: z.ZodString; path: z.ZodOptional; remote: z.ZodOptional; fetch: z.ZodOptional; status: z.ZodArray; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ severity: z.ZodEnum<["error", "warning", "info"]>; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ severity: z.ZodEnum<["error", "warning", "info"]>; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, z.ZodTypeAny, "passthrough">>, "many">; }, z.ZodTypeAny, "passthrough">>, "many">; status: z.ZodArray; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ severity: z.ZodEnum<["error", "warning", "info"]>; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ severity: z.ZodEnum<["error", "warning", "info"]>; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, z.ZodTypeAny, "passthrough">>, "many">; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ root: z.ZodNullable; store_id: z.ZodOptional; } & { role: z.ZodLiteral<"openspec_root">; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ path: z.ZodString; source: z.ZodEnum<["store", "declared", "nearest", "global_default", "implicit"]>; store_id: z.ZodOptional; } & { role: z.ZodLiteral<"openspec_root">; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ path: z.ZodString; source: z.ZodEnum<["store", "declared", "nearest", "global_default", "implicit"]>; store_id: z.ZodOptional; } & { role: z.ZodLiteral<"openspec_root">; }, z.ZodTypeAny, "passthrough">>>; members: z.ZodArray; id: z.ZodString; path: z.ZodOptional; remote: z.ZodOptional; fetch: z.ZodOptional; status: z.ZodArray; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ severity: z.ZodEnum<["error", "warning", "info"]>; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ severity: z.ZodEnum<["error", "warning", "info"]>; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, z.ZodTypeAny, "passthrough">>, "many">; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ role: z.ZodLiteral<"referenced_store">; id: z.ZodString; path: z.ZodOptional; remote: z.ZodOptional; fetch: z.ZodOptional; status: z.ZodArray; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ severity: z.ZodEnum<["error", "warning", "info"]>; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ severity: z.ZodEnum<["error", "warning", "info"]>; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, z.ZodTypeAny, "passthrough">>, "many">; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ role: z.ZodLiteral<"referenced_store">; id: z.ZodString; path: z.ZodOptional; remote: z.ZodOptional; fetch: z.ZodOptional; status: z.ZodArray; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ severity: z.ZodEnum<["error", "warning", "info"]>; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ severity: z.ZodEnum<["error", "warning", "info"]>; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, z.ZodTypeAny, "passthrough">>, "many">; }, z.ZodTypeAny, "passthrough">>, "many">; status: z.ZodArray; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ severity: z.ZodEnum<["error", "warning", "info"]>; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ severity: z.ZodEnum<["error", "warning", "info"]>; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, z.ZodTypeAny, "passthrough">>, "many">; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ root: z.ZodNullable; store_id: z.ZodOptional; } & { role: z.ZodLiteral<"openspec_root">; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ path: z.ZodString; source: z.ZodEnum<["store", "declared", "nearest", "global_default", "implicit"]>; store_id: z.ZodOptional; } & { role: z.ZodLiteral<"openspec_root">; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ path: z.ZodString; source: z.ZodEnum<["store", "declared", "nearest", "global_default", "implicit"]>; store_id: z.ZodOptional; } & { role: z.ZodLiteral<"openspec_root">; }, z.ZodTypeAny, "passthrough">>>; members: z.ZodArray; id: z.ZodString; path: z.ZodOptional; remote: z.ZodOptional; fetch: z.ZodOptional; status: z.ZodArray; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ severity: z.ZodEnum<["error", "warning", "info"]>; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ severity: z.ZodEnum<["error", "warning", "info"]>; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, z.ZodTypeAny, "passthrough">>, "many">; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ role: z.ZodLiteral<"referenced_store">; id: z.ZodString; path: z.ZodOptional; remote: z.ZodOptional; fetch: z.ZodOptional; status: z.ZodArray; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ severity: z.ZodEnum<["error", "warning", "info"]>; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ severity: z.ZodEnum<["error", "warning", "info"]>; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, z.ZodTypeAny, "passthrough">>, "many">; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ role: z.ZodLiteral<"referenced_store">; id: z.ZodString; path: z.ZodOptional; remote: z.ZodOptional; fetch: z.ZodOptional; status: z.ZodArray; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ severity: z.ZodEnum<["error", "warning", "info"]>; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ severity: z.ZodEnum<["error", "warning", "info"]>; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, z.ZodTypeAny, "passthrough">>, "many">; }, z.ZodTypeAny, "passthrough">>, "many">; status: z.ZodArray; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ severity: z.ZodEnum<["error", "warning", "info"]>; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ severity: z.ZodEnum<["error", "warning", "info"]>; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, z.ZodTypeAny, "passthrough">>, "many">; }, z.ZodTypeAny, "passthrough">>; type CliDoctor = z.infer; type CliContext = z.infer; //#endregion //#region ../core/src/cli-contracts/workflow.d.ts /** Typed success or diagnostic failure result of the CLI Status JSON command. */ declare const CliWorkflowStatusSchema: z.ZodUnion<[z.ZodObject<{ changeName: z.ZodString; schemaName: z.ZodString; planningHome: z.ZodObject<{ kind: z.ZodLiteral<"repo">; root: z.ZodString; changesDir: z.ZodString; defaultSchema: z.ZodString; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ kind: z.ZodLiteral<"repo">; root: z.ZodString; changesDir: z.ZodString; defaultSchema: z.ZodString; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ kind: z.ZodLiteral<"repo">; root: z.ZodString; changesDir: z.ZodString; defaultSchema: z.ZodString; }, z.ZodTypeAny, "passthrough">>; changeRoot: z.ZodString; artifactPaths: z.ZodRecord; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ outputPath: z.ZodString; resolvedOutputPath: z.ZodString; existingOutputPaths: z.ZodArray; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ outputPath: z.ZodString; resolvedOutputPath: z.ZodString; existingOutputPaths: z.ZodArray; }, z.ZodTypeAny, "passthrough">>>; /** Required planning-artifact completion fact since OpenSpec 1.8. */ isPlanningComplete: z.ZodBoolean; /** Retained upstream compatibility alias, kept only as raw CLI evidence. */ isComplete: z.ZodOptional; applyRequires: z.ZodArray; nextSteps: z.ZodArray; actionContext: z.ZodObject<{ mode: z.ZodLiteral<"repo-local">; sourceOfTruth: z.ZodLiteral<"repo">; planningArtifacts: z.ZodArray; linkedContext: z.ZodArray, z.objectInputType<{ name: z.ZodString; }, z.ZodTypeAny, "passthrough">>, "many">; allowedEditRoots: z.ZodArray; requiresAffectedAreaSelection: z.ZodBoolean; constraints: z.ZodArray; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ mode: z.ZodLiteral<"repo-local">; sourceOfTruth: z.ZodLiteral<"repo">; planningArtifacts: z.ZodArray; linkedContext: z.ZodArray, z.objectInputType<{ name: z.ZodString; }, z.ZodTypeAny, "passthrough">>, "many">; allowedEditRoots: z.ZodArray; requiresAffectedAreaSelection: z.ZodBoolean; constraints: z.ZodArray; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ mode: z.ZodLiteral<"repo-local">; sourceOfTruth: z.ZodLiteral<"repo">; planningArtifacts: z.ZodArray; linkedContext: z.ZodArray, z.objectInputType<{ name: z.ZodString; }, z.ZodTypeAny, "passthrough">>, "many">; allowedEditRoots: z.ZodArray; requiresAffectedAreaSelection: z.ZodBoolean; constraints: z.ZodArray; }, z.ZodTypeAny, "passthrough">>; artifacts: z.ZodArray; requires: z.ZodArray; missingDeps: z.ZodOptional>; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ id: z.ZodString; outputPath: z.ZodString; status: z.ZodEnum<["done", "skipped", "ready", "blocked"]>; requires: z.ZodArray; missingDeps: z.ZodOptional>; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ id: z.ZodString; outputPath: z.ZodString; status: z.ZodEnum<["done", "skipped", "ready", "blocked"]>; requires: z.ZodArray; missingDeps: z.ZodOptional>; }, z.ZodTypeAny, "passthrough">>, "many">; root: z.ZodObject<{ path: z.ZodString; source: z.ZodEnum<["store", "declared", "nearest", "global_default", "implicit"]>; store_id: z.ZodOptional; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ path: z.ZodString; source: z.ZodEnum<["store", "declared", "nearest", "global_default", "implicit"]>; store_id: z.ZodOptional; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ path: z.ZodString; source: z.ZodEnum<["store", "declared", "nearest", "global_default", "implicit"]>; store_id: z.ZodOptional; }, z.ZodTypeAny, "passthrough">>; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ changeName: z.ZodString; schemaName: z.ZodString; planningHome: z.ZodObject<{ kind: z.ZodLiteral<"repo">; root: z.ZodString; changesDir: z.ZodString; defaultSchema: z.ZodString; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ kind: z.ZodLiteral<"repo">; root: z.ZodString; changesDir: z.ZodString; defaultSchema: z.ZodString; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ kind: z.ZodLiteral<"repo">; root: z.ZodString; changesDir: z.ZodString; defaultSchema: z.ZodString; }, z.ZodTypeAny, "passthrough">>; changeRoot: z.ZodString; artifactPaths: z.ZodRecord; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ outputPath: z.ZodString; resolvedOutputPath: z.ZodString; existingOutputPaths: z.ZodArray; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ outputPath: z.ZodString; resolvedOutputPath: z.ZodString; existingOutputPaths: z.ZodArray; }, z.ZodTypeAny, "passthrough">>>; /** Required planning-artifact completion fact since OpenSpec 1.8. */ isPlanningComplete: z.ZodBoolean; /** Retained upstream compatibility alias, kept only as raw CLI evidence. */ isComplete: z.ZodOptional; applyRequires: z.ZodArray; nextSteps: z.ZodArray; actionContext: z.ZodObject<{ mode: z.ZodLiteral<"repo-local">; sourceOfTruth: z.ZodLiteral<"repo">; planningArtifacts: z.ZodArray; linkedContext: z.ZodArray, z.objectInputType<{ name: z.ZodString; }, z.ZodTypeAny, "passthrough">>, "many">; allowedEditRoots: z.ZodArray; requiresAffectedAreaSelection: z.ZodBoolean; constraints: z.ZodArray; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ mode: z.ZodLiteral<"repo-local">; sourceOfTruth: z.ZodLiteral<"repo">; planningArtifacts: z.ZodArray; linkedContext: z.ZodArray, z.objectInputType<{ name: z.ZodString; }, z.ZodTypeAny, "passthrough">>, "many">; allowedEditRoots: z.ZodArray; requiresAffectedAreaSelection: z.ZodBoolean; constraints: z.ZodArray; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ mode: z.ZodLiteral<"repo-local">; sourceOfTruth: z.ZodLiteral<"repo">; planningArtifacts: z.ZodArray; linkedContext: z.ZodArray, z.objectInputType<{ name: z.ZodString; }, z.ZodTypeAny, "passthrough">>, "many">; allowedEditRoots: z.ZodArray; requiresAffectedAreaSelection: z.ZodBoolean; constraints: z.ZodArray; }, z.ZodTypeAny, "passthrough">>; artifacts: z.ZodArray; requires: z.ZodArray; missingDeps: z.ZodOptional>; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ id: z.ZodString; outputPath: z.ZodString; status: z.ZodEnum<["done", "skipped", "ready", "blocked"]>; requires: z.ZodArray; missingDeps: z.ZodOptional>; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ id: z.ZodString; outputPath: z.ZodString; status: z.ZodEnum<["done", "skipped", "ready", "blocked"]>; requires: z.ZodArray; missingDeps: z.ZodOptional>; }, z.ZodTypeAny, "passthrough">>, "many">; root: z.ZodObject<{ path: z.ZodString; source: z.ZodEnum<["store", "declared", "nearest", "global_default", "implicit"]>; store_id: z.ZodOptional; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ path: z.ZodString; source: z.ZodEnum<["store", "declared", "nearest", "global_default", "implicit"]>; store_id: z.ZodOptional; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ path: z.ZodString; source: z.ZodEnum<["store", "declared", "nearest", "global_default", "implicit"]>; store_id: z.ZodOptional; }, z.ZodTypeAny, "passthrough">>; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ changeName: z.ZodString; schemaName: z.ZodString; planningHome: z.ZodObject<{ kind: z.ZodLiteral<"repo">; root: z.ZodString; changesDir: z.ZodString; defaultSchema: z.ZodString; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ kind: z.ZodLiteral<"repo">; root: z.ZodString; changesDir: z.ZodString; defaultSchema: z.ZodString; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ kind: z.ZodLiteral<"repo">; root: z.ZodString; changesDir: z.ZodString; defaultSchema: z.ZodString; }, z.ZodTypeAny, "passthrough">>; changeRoot: z.ZodString; artifactPaths: z.ZodRecord; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ outputPath: z.ZodString; resolvedOutputPath: z.ZodString; existingOutputPaths: z.ZodArray; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ outputPath: z.ZodString; resolvedOutputPath: z.ZodString; existingOutputPaths: z.ZodArray; }, z.ZodTypeAny, "passthrough">>>; /** Required planning-artifact completion fact since OpenSpec 1.8. */ isPlanningComplete: z.ZodBoolean; /** Retained upstream compatibility alias, kept only as raw CLI evidence. */ isComplete: z.ZodOptional; applyRequires: z.ZodArray; nextSteps: z.ZodArray; actionContext: z.ZodObject<{ mode: z.ZodLiteral<"repo-local">; sourceOfTruth: z.ZodLiteral<"repo">; planningArtifacts: z.ZodArray; linkedContext: z.ZodArray, z.objectInputType<{ name: z.ZodString; }, z.ZodTypeAny, "passthrough">>, "many">; allowedEditRoots: z.ZodArray; requiresAffectedAreaSelection: z.ZodBoolean; constraints: z.ZodArray; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ mode: z.ZodLiteral<"repo-local">; sourceOfTruth: z.ZodLiteral<"repo">; planningArtifacts: z.ZodArray; linkedContext: z.ZodArray, z.objectInputType<{ name: z.ZodString; }, z.ZodTypeAny, "passthrough">>, "many">; allowedEditRoots: z.ZodArray; requiresAffectedAreaSelection: z.ZodBoolean; constraints: z.ZodArray; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ mode: z.ZodLiteral<"repo-local">; sourceOfTruth: z.ZodLiteral<"repo">; planningArtifacts: z.ZodArray; linkedContext: z.ZodArray, z.objectInputType<{ name: z.ZodString; }, z.ZodTypeAny, "passthrough">>, "many">; allowedEditRoots: z.ZodArray; requiresAffectedAreaSelection: z.ZodBoolean; constraints: z.ZodArray; }, z.ZodTypeAny, "passthrough">>; artifacts: z.ZodArray; requires: z.ZodArray; missingDeps: z.ZodOptional>; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ id: z.ZodString; outputPath: z.ZodString; status: z.ZodEnum<["done", "skipped", "ready", "blocked"]>; requires: z.ZodArray; missingDeps: z.ZodOptional>; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ id: z.ZodString; outputPath: z.ZodString; status: z.ZodEnum<["done", "skipped", "ready", "blocked"]>; requires: z.ZodArray; missingDeps: z.ZodOptional>; }, z.ZodTypeAny, "passthrough">>, "many">; root: z.ZodObject<{ path: z.ZodString; source: z.ZodEnum<["store", "declared", "nearest", "global_default", "implicit"]>; store_id: z.ZodOptional; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ path: z.ZodString; source: z.ZodEnum<["store", "declared", "nearest", "global_default", "implicit"]>; store_id: z.ZodOptional; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ path: z.ZodString; source: z.ZodEnum<["store", "declared", "nearest", "global_default", "implicit"]>; store_id: z.ZodOptional; }, z.ZodTypeAny, "passthrough">>; }, z.ZodTypeAny, "passthrough">>, z.ZodObject<{ status: z.ZodArray; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ severity: z.ZodEnum<["error", "warning", "info"]>; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ severity: z.ZodEnum<["error", "warning", "info"]>; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, z.ZodTypeAny, "passthrough">>, "many">; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ status: z.ZodArray; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ severity: z.ZodEnum<["error", "warning", "info"]>; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ severity: z.ZodEnum<["error", "warning", "info"]>; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, z.ZodTypeAny, "passthrough">>, "many">; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ status: z.ZodArray; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ severity: z.ZodEnum<["error", "warning", "info"]>; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ severity: z.ZodEnum<["error", "warning", "info"]>; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, z.ZodTypeAny, "passthrough">>, "many">; }, z.ZodTypeAny, "passthrough">>]>; /** Typed success or diagnostic failure result for artifact Instructions. */ declare const CliArtifactInstructionsSchema: z.ZodUnion<[z.ZodObject<{ changeName: z.ZodString; artifactId: z.ZodString; schemaName: z.ZodString; changeDir: z.ZodString; planningHome: z.ZodObject<{ kind: z.ZodLiteral<"repo">; root: z.ZodString; changesDir: z.ZodString; defaultSchema: z.ZodString; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ kind: z.ZodLiteral<"repo">; root: z.ZodString; changesDir: z.ZodString; defaultSchema: z.ZodString; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ kind: z.ZodLiteral<"repo">; root: z.ZodString; changesDir: z.ZodString; defaultSchema: z.ZodString; }, z.ZodTypeAny, "passthrough">>; outputPath: z.ZodString; resolvedOutputPath: z.ZodString; existingOutputPaths: z.ZodArray; description: z.ZodString; instruction: z.ZodOptional; context: z.ZodOptional; rules: z.ZodOptional>; template: z.ZodString; dependencies: z.ZodArray; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ id: z.ZodString; done: z.ZodBoolean; path: z.ZodString; description: z.ZodString; skipped: z.ZodOptional; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ id: z.ZodString; done: z.ZodBoolean; path: z.ZodString; description: z.ZodString; skipped: z.ZodOptional; }, z.ZodTypeAny, "passthrough">>, "many">; unlocks: z.ZodArray; references: z.ZodOptional; status: z.ZodArray; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ severity: z.ZodEnum<["error", "warning", "info"]>; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ severity: z.ZodEnum<["error", "warning", "info"]>; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, z.ZodTypeAny, "passthrough">>, "many">; } & { specs: z.ZodOptional, z.objectInputType<{ id: z.ZodString; summary: z.ZodString; }, z.ZodTypeAny, "passthrough">>, "many">>; fetch: z.ZodOptional; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ store_id: z.ZodString; root: z.ZodOptional; status: z.ZodArray; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ severity: z.ZodEnum<["error", "warning", "info"]>; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ severity: z.ZodEnum<["error", "warning", "info"]>; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, z.ZodTypeAny, "passthrough">>, "many">; } & { specs: z.ZodOptional, z.objectInputType<{ id: z.ZodString; summary: z.ZodString; }, z.ZodTypeAny, "passthrough">>, "many">>; fetch: z.ZodOptional; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ store_id: z.ZodString; root: z.ZodOptional; status: z.ZodArray; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ severity: z.ZodEnum<["error", "warning", "info"]>; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ severity: z.ZodEnum<["error", "warning", "info"]>; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, z.ZodTypeAny, "passthrough">>, "many">; } & { specs: z.ZodOptional, z.objectInputType<{ id: z.ZodString; summary: z.ZodString; }, z.ZodTypeAny, "passthrough">>, "many">>; fetch: z.ZodOptional; }, z.ZodTypeAny, "passthrough">>, "many">>; root: z.ZodObject<{ path: z.ZodString; source: z.ZodEnum<["store", "declared", "nearest", "global_default", "implicit"]>; store_id: z.ZodOptional; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ path: z.ZodString; source: z.ZodEnum<["store", "declared", "nearest", "global_default", "implicit"]>; store_id: z.ZodOptional; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ path: z.ZodString; source: z.ZodEnum<["store", "declared", "nearest", "global_default", "implicit"]>; store_id: z.ZodOptional; }, z.ZodTypeAny, "passthrough">>; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ changeName: z.ZodString; artifactId: z.ZodString; schemaName: z.ZodString; changeDir: z.ZodString; planningHome: z.ZodObject<{ kind: z.ZodLiteral<"repo">; root: z.ZodString; changesDir: z.ZodString; defaultSchema: z.ZodString; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ kind: z.ZodLiteral<"repo">; root: z.ZodString; changesDir: z.ZodString; defaultSchema: z.ZodString; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ kind: z.ZodLiteral<"repo">; root: z.ZodString; changesDir: z.ZodString; defaultSchema: z.ZodString; }, z.ZodTypeAny, "passthrough">>; outputPath: z.ZodString; resolvedOutputPath: z.ZodString; existingOutputPaths: z.ZodArray; description: z.ZodString; instruction: z.ZodOptional; context: z.ZodOptional; rules: z.ZodOptional>; template: z.ZodString; dependencies: z.ZodArray; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ id: z.ZodString; done: z.ZodBoolean; path: z.ZodString; description: z.ZodString; skipped: z.ZodOptional; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ id: z.ZodString; done: z.ZodBoolean; path: z.ZodString; description: z.ZodString; skipped: z.ZodOptional; }, z.ZodTypeAny, "passthrough">>, "many">; unlocks: z.ZodArray; references: z.ZodOptional; status: z.ZodArray; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ severity: z.ZodEnum<["error", "warning", "info"]>; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ severity: z.ZodEnum<["error", "warning", "info"]>; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, z.ZodTypeAny, "passthrough">>, "many">; } & { specs: z.ZodOptional, z.objectInputType<{ id: z.ZodString; summary: z.ZodString; }, z.ZodTypeAny, "passthrough">>, "many">>; fetch: z.ZodOptional; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ store_id: z.ZodString; root: z.ZodOptional; status: z.ZodArray; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ severity: z.ZodEnum<["error", "warning", "info"]>; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ severity: z.ZodEnum<["error", "warning", "info"]>; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, z.ZodTypeAny, "passthrough">>, "many">; } & { specs: z.ZodOptional, z.objectInputType<{ id: z.ZodString; summary: z.ZodString; }, z.ZodTypeAny, "passthrough">>, "many">>; fetch: z.ZodOptional; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ store_id: z.ZodString; root: z.ZodOptional; status: z.ZodArray; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ severity: z.ZodEnum<["error", "warning", "info"]>; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ severity: z.ZodEnum<["error", "warning", "info"]>; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, z.ZodTypeAny, "passthrough">>, "many">; } & { specs: z.ZodOptional, z.objectInputType<{ id: z.ZodString; summary: z.ZodString; }, z.ZodTypeAny, "passthrough">>, "many">>; fetch: z.ZodOptional; }, z.ZodTypeAny, "passthrough">>, "many">>; root: z.ZodObject<{ path: z.ZodString; source: z.ZodEnum<["store", "declared", "nearest", "global_default", "implicit"]>; store_id: z.ZodOptional; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ path: z.ZodString; source: z.ZodEnum<["store", "declared", "nearest", "global_default", "implicit"]>; store_id: z.ZodOptional; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ path: z.ZodString; source: z.ZodEnum<["store", "declared", "nearest", "global_default", "implicit"]>; store_id: z.ZodOptional; }, z.ZodTypeAny, "passthrough">>; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ changeName: z.ZodString; artifactId: z.ZodString; schemaName: z.ZodString; changeDir: z.ZodString; planningHome: z.ZodObject<{ kind: z.ZodLiteral<"repo">; root: z.ZodString; changesDir: z.ZodString; defaultSchema: z.ZodString; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ kind: z.ZodLiteral<"repo">; root: z.ZodString; changesDir: z.ZodString; defaultSchema: z.ZodString; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ kind: z.ZodLiteral<"repo">; root: z.ZodString; changesDir: z.ZodString; defaultSchema: z.ZodString; }, z.ZodTypeAny, "passthrough">>; outputPath: z.ZodString; resolvedOutputPath: z.ZodString; existingOutputPaths: z.ZodArray; description: z.ZodString; instruction: z.ZodOptional; context: z.ZodOptional; rules: z.ZodOptional>; template: z.ZodString; dependencies: z.ZodArray; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ id: z.ZodString; done: z.ZodBoolean; path: z.ZodString; description: z.ZodString; skipped: z.ZodOptional; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ id: z.ZodString; done: z.ZodBoolean; path: z.ZodString; description: z.ZodString; skipped: z.ZodOptional; }, z.ZodTypeAny, "passthrough">>, "many">; unlocks: z.ZodArray; references: z.ZodOptional; status: z.ZodArray; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ severity: z.ZodEnum<["error", "warning", "info"]>; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ severity: z.ZodEnum<["error", "warning", "info"]>; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, z.ZodTypeAny, "passthrough">>, "many">; } & { specs: z.ZodOptional, z.objectInputType<{ id: z.ZodString; summary: z.ZodString; }, z.ZodTypeAny, "passthrough">>, "many">>; fetch: z.ZodOptional; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ store_id: z.ZodString; root: z.ZodOptional; status: z.ZodArray; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ severity: z.ZodEnum<["error", "warning", "info"]>; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ severity: z.ZodEnum<["error", "warning", "info"]>; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, z.ZodTypeAny, "passthrough">>, "many">; } & { specs: z.ZodOptional, z.objectInputType<{ id: z.ZodString; summary: z.ZodString; }, z.ZodTypeAny, "passthrough">>, "many">>; fetch: z.ZodOptional; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ store_id: z.ZodString; root: z.ZodOptional; status: z.ZodArray; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ severity: z.ZodEnum<["error", "warning", "info"]>; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ severity: z.ZodEnum<["error", "warning", "info"]>; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, z.ZodTypeAny, "passthrough">>, "many">; } & { specs: z.ZodOptional, z.objectInputType<{ id: z.ZodString; summary: z.ZodString; }, z.ZodTypeAny, "passthrough">>, "many">>; fetch: z.ZodOptional; }, z.ZodTypeAny, "passthrough">>, "many">>; root: z.ZodObject<{ path: z.ZodString; source: z.ZodEnum<["store", "declared", "nearest", "global_default", "implicit"]>; store_id: z.ZodOptional; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ path: z.ZodString; source: z.ZodEnum<["store", "declared", "nearest", "global_default", "implicit"]>; store_id: z.ZodOptional; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ path: z.ZodString; source: z.ZodEnum<["store", "declared", "nearest", "global_default", "implicit"]>; store_id: z.ZodOptional; }, z.ZodTypeAny, "passthrough">>; }, z.ZodTypeAny, "passthrough">>, z.ZodObject<{ status: z.ZodArray; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ severity: z.ZodEnum<["error", "warning", "info"]>; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ severity: z.ZodEnum<["error", "warning", "info"]>; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, z.ZodTypeAny, "passthrough">>, "many">; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ status: z.ZodArray; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ severity: z.ZodEnum<["error", "warning", "info"]>; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ severity: z.ZodEnum<["error", "warning", "info"]>; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, z.ZodTypeAny, "passthrough">>, "many">; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ status: z.ZodArray; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ severity: z.ZodEnum<["error", "warning", "info"]>; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ severity: z.ZodEnum<["error", "warning", "info"]>; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, z.ZodTypeAny, "passthrough">>, "many">; }, z.ZodTypeAny, "passthrough">>]>; /** Typed success or diagnostic failure result of the CLI Apply Instructions command. */ declare const CliApplyInstructionsSchema: z.ZodUnion<[z.ZodObject<{ changeName: z.ZodString; changeDir: z.ZodString; schemaName: z.ZodString; contextFiles: z.ZodRecord>; progress: z.ZodObject<{ total: z.ZodNumber; complete: z.ZodNumber; remaining: z.ZodNumber; }, "strip", z.ZodTypeAny, { complete: number; total: number; remaining: number; }, { complete: number; total: number; remaining: number; }>; tasks: z.ZodArray, z.objectInputType<{ id: z.ZodString; description: z.ZodString; done: z.ZodBoolean; }, z.ZodTypeAny, "passthrough">>, "many">; state: z.ZodEnum<["blocked", "all_done", "ready"]>; missingArtifacts: z.ZodOptional>; instruction: z.ZodString; references: z.ZodOptional; status: z.ZodArray; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ severity: z.ZodEnum<["error", "warning", "info"]>; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ severity: z.ZodEnum<["error", "warning", "info"]>; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, z.ZodTypeAny, "passthrough">>, "many">; } & { specs: z.ZodOptional, z.objectInputType<{ id: z.ZodString; summary: z.ZodString; }, z.ZodTypeAny, "passthrough">>, "many">>; fetch: z.ZodOptional; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ store_id: z.ZodString; root: z.ZodOptional; status: z.ZodArray; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ severity: z.ZodEnum<["error", "warning", "info"]>; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ severity: z.ZodEnum<["error", "warning", "info"]>; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, z.ZodTypeAny, "passthrough">>, "many">; } & { specs: z.ZodOptional, z.objectInputType<{ id: z.ZodString; summary: z.ZodString; }, z.ZodTypeAny, "passthrough">>, "many">>; fetch: z.ZodOptional; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ store_id: z.ZodString; root: z.ZodOptional; status: z.ZodArray; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ severity: z.ZodEnum<["error", "warning", "info"]>; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ severity: z.ZodEnum<["error", "warning", "info"]>; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, z.ZodTypeAny, "passthrough">>, "many">; } & { specs: z.ZodOptional, z.objectInputType<{ id: z.ZodString; summary: z.ZodString; }, z.ZodTypeAny, "passthrough">>, "many">>; fetch: z.ZodOptional; }, z.ZodTypeAny, "passthrough">>, "many">>; context: z.ZodOptional; operationGuidance: z.ZodOptional>; root: z.ZodObject<{ path: z.ZodString; source: z.ZodEnum<["store", "declared", "nearest", "global_default", "implicit"]>; store_id: z.ZodOptional; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ path: z.ZodString; source: z.ZodEnum<["store", "declared", "nearest", "global_default", "implicit"]>; store_id: z.ZodOptional; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ path: z.ZodString; source: z.ZodEnum<["store", "declared", "nearest", "global_default", "implicit"]>; store_id: z.ZodOptional; }, z.ZodTypeAny, "passthrough">>; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ changeName: z.ZodString; changeDir: z.ZodString; schemaName: z.ZodString; contextFiles: z.ZodRecord>; progress: z.ZodObject<{ total: z.ZodNumber; complete: z.ZodNumber; remaining: z.ZodNumber; }, "strip", z.ZodTypeAny, { complete: number; total: number; remaining: number; }, { complete: number; total: number; remaining: number; }>; tasks: z.ZodArray, z.objectInputType<{ id: z.ZodString; description: z.ZodString; done: z.ZodBoolean; }, z.ZodTypeAny, "passthrough">>, "many">; state: z.ZodEnum<["blocked", "all_done", "ready"]>; missingArtifacts: z.ZodOptional>; instruction: z.ZodString; references: z.ZodOptional; status: z.ZodArray; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ severity: z.ZodEnum<["error", "warning", "info"]>; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ severity: z.ZodEnum<["error", "warning", "info"]>; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, z.ZodTypeAny, "passthrough">>, "many">; } & { specs: z.ZodOptional, z.objectInputType<{ id: z.ZodString; summary: z.ZodString; }, z.ZodTypeAny, "passthrough">>, "many">>; fetch: z.ZodOptional; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ store_id: z.ZodString; root: z.ZodOptional; status: z.ZodArray; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ severity: z.ZodEnum<["error", "warning", "info"]>; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ severity: z.ZodEnum<["error", "warning", "info"]>; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, z.ZodTypeAny, "passthrough">>, "many">; } & { specs: z.ZodOptional, z.objectInputType<{ id: z.ZodString; summary: z.ZodString; }, z.ZodTypeAny, "passthrough">>, "many">>; fetch: z.ZodOptional; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ store_id: z.ZodString; root: z.ZodOptional; status: z.ZodArray; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ severity: z.ZodEnum<["error", "warning", "info"]>; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ severity: z.ZodEnum<["error", "warning", "info"]>; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, z.ZodTypeAny, "passthrough">>, "many">; } & { specs: z.ZodOptional, z.objectInputType<{ id: z.ZodString; summary: z.ZodString; }, z.ZodTypeAny, "passthrough">>, "many">>; fetch: z.ZodOptional; }, z.ZodTypeAny, "passthrough">>, "many">>; context: z.ZodOptional; operationGuidance: z.ZodOptional>; root: z.ZodObject<{ path: z.ZodString; source: z.ZodEnum<["store", "declared", "nearest", "global_default", "implicit"]>; store_id: z.ZodOptional; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ path: z.ZodString; source: z.ZodEnum<["store", "declared", "nearest", "global_default", "implicit"]>; store_id: z.ZodOptional; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ path: z.ZodString; source: z.ZodEnum<["store", "declared", "nearest", "global_default", "implicit"]>; store_id: z.ZodOptional; }, z.ZodTypeAny, "passthrough">>; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ changeName: z.ZodString; changeDir: z.ZodString; schemaName: z.ZodString; contextFiles: z.ZodRecord>; progress: z.ZodObject<{ total: z.ZodNumber; complete: z.ZodNumber; remaining: z.ZodNumber; }, "strip", z.ZodTypeAny, { complete: number; total: number; remaining: number; }, { complete: number; total: number; remaining: number; }>; tasks: z.ZodArray, z.objectInputType<{ id: z.ZodString; description: z.ZodString; done: z.ZodBoolean; }, z.ZodTypeAny, "passthrough">>, "many">; state: z.ZodEnum<["blocked", "all_done", "ready"]>; missingArtifacts: z.ZodOptional>; instruction: z.ZodString; references: z.ZodOptional; status: z.ZodArray; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ severity: z.ZodEnum<["error", "warning", "info"]>; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ severity: z.ZodEnum<["error", "warning", "info"]>; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, z.ZodTypeAny, "passthrough">>, "many">; } & { specs: z.ZodOptional, z.objectInputType<{ id: z.ZodString; summary: z.ZodString; }, z.ZodTypeAny, "passthrough">>, "many">>; fetch: z.ZodOptional; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ store_id: z.ZodString; root: z.ZodOptional; status: z.ZodArray; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ severity: z.ZodEnum<["error", "warning", "info"]>; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ severity: z.ZodEnum<["error", "warning", "info"]>; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, z.ZodTypeAny, "passthrough">>, "many">; } & { specs: z.ZodOptional, z.objectInputType<{ id: z.ZodString; summary: z.ZodString; }, z.ZodTypeAny, "passthrough">>, "many">>; fetch: z.ZodOptional; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ store_id: z.ZodString; root: z.ZodOptional; status: z.ZodArray; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ severity: z.ZodEnum<["error", "warning", "info"]>; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ severity: z.ZodEnum<["error", "warning", "info"]>; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, z.ZodTypeAny, "passthrough">>, "many">; } & { specs: z.ZodOptional, z.objectInputType<{ id: z.ZodString; summary: z.ZodString; }, z.ZodTypeAny, "passthrough">>, "many">>; fetch: z.ZodOptional; }, z.ZodTypeAny, "passthrough">>, "many">>; context: z.ZodOptional; operationGuidance: z.ZodOptional>; root: z.ZodObject<{ path: z.ZodString; source: z.ZodEnum<["store", "declared", "nearest", "global_default", "implicit"]>; store_id: z.ZodOptional; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ path: z.ZodString; source: z.ZodEnum<["store", "declared", "nearest", "global_default", "implicit"]>; store_id: z.ZodOptional; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ path: z.ZodString; source: z.ZodEnum<["store", "declared", "nearest", "global_default", "implicit"]>; store_id: z.ZodOptional; }, z.ZodTypeAny, "passthrough">>; }, z.ZodTypeAny, "passthrough">>, z.ZodObject<{ status: z.ZodArray; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ severity: z.ZodEnum<["error", "warning", "info"]>; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ severity: z.ZodEnum<["error", "warning", "info"]>; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, z.ZodTypeAny, "passthrough">>, "many">; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ status: z.ZodArray; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ severity: z.ZodEnum<["error", "warning", "info"]>; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ severity: z.ZodEnum<["error", "warning", "info"]>; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, z.ZodTypeAny, "passthrough">>, "many">; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ status: z.ZodArray; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ severity: z.ZodEnum<["error", "warning", "info"]>; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ severity: z.ZodEnum<["error", "warning", "info"]>; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, z.ZodTypeAny, "passthrough">>, "many">; }, z.ZodTypeAny, "passthrough">>]>; /** Typed success or diagnostic failure result of the CLI Archive Instructions command. */ declare const CliArchiveInstructionsSchema: z.ZodUnion<[z.ZodObject<{ changeName: z.ZodString; context: z.ZodOptional; operationGuidance: z.ZodOptional>; root: z.ZodObject<{ path: z.ZodString; source: z.ZodEnum<["store", "declared", "nearest", "global_default", "implicit"]>; store_id: z.ZodOptional; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ path: z.ZodString; source: z.ZodEnum<["store", "declared", "nearest", "global_default", "implicit"]>; store_id: z.ZodOptional; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ path: z.ZodString; source: z.ZodEnum<["store", "declared", "nearest", "global_default", "implicit"]>; store_id: z.ZodOptional; }, z.ZodTypeAny, "passthrough">>; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ changeName: z.ZodString; context: z.ZodOptional; operationGuidance: z.ZodOptional>; root: z.ZodObject<{ path: z.ZodString; source: z.ZodEnum<["store", "declared", "nearest", "global_default", "implicit"]>; store_id: z.ZodOptional; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ path: z.ZodString; source: z.ZodEnum<["store", "declared", "nearest", "global_default", "implicit"]>; store_id: z.ZodOptional; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ path: z.ZodString; source: z.ZodEnum<["store", "declared", "nearest", "global_default", "implicit"]>; store_id: z.ZodOptional; }, z.ZodTypeAny, "passthrough">>; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ changeName: z.ZodString; context: z.ZodOptional; operationGuidance: z.ZodOptional>; root: z.ZodObject<{ path: z.ZodString; source: z.ZodEnum<["store", "declared", "nearest", "global_default", "implicit"]>; store_id: z.ZodOptional; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ path: z.ZodString; source: z.ZodEnum<["store", "declared", "nearest", "global_default", "implicit"]>; store_id: z.ZodOptional; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ path: z.ZodString; source: z.ZodEnum<["store", "declared", "nearest", "global_default", "implicit"]>; store_id: z.ZodOptional; }, z.ZodTypeAny, "passthrough">>; }, z.ZodTypeAny, "passthrough">>, z.ZodObject<{ status: z.ZodArray; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ severity: z.ZodEnum<["error", "warning", "info"]>; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ severity: z.ZodEnum<["error", "warning", "info"]>; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, z.ZodTypeAny, "passthrough">>, "many">; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ status: z.ZodArray; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ severity: z.ZodEnum<["error", "warning", "info"]>; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ severity: z.ZodEnum<["error", "warning", "info"]>; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, z.ZodTypeAny, "passthrough">>, "many">; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ status: z.ZodArray; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ severity: z.ZodEnum<["error", "warning", "info"]>; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ severity: z.ZodEnum<["error", "warning", "info"]>; code: z.ZodString; message: z.ZodString; target: z.ZodOptional; fix: z.ZodOptional; }, z.ZodTypeAny, "passthrough">>, "many">; }, z.ZodTypeAny, "passthrough">>]>; type CliWorkflowStatus = z.infer; type CliArtifactInstructions = z.infer; type CliApplyInstructions = z.infer; type CliArchiveInstructions = z.infer; //#endregion //#region ../core/src/cli-contracts/executor.d.ts /** Root selection arguments shared by root-aware OpenSpec CLI commands. */ interface CliRootSelector { /** Explicit Store selector. Presence is significant; the CLI validates empty values. */ store?: string; } /** Workflow Status/Instructions selectors passed through to the official CLI. */ interface CliWorkflowOptions extends CliRootSelector { /** Explicit workflow schema selector passed to the official CLI. */ schema?: string; } //#endregion //#region ../core/src/cli-executor.d.ts /** * CLI 执行结果。 * * `success` 是传输事实:收到了完整的观察结果(进程以观测到的代码退出,或通过 * eager-JSON 获得了完整的 JSON 文档)。它不是对进程退出状态的断言 —— 对于提前 * 解析的命令,`exitCode` 诚实地保持为 `null`,调用者必须将其视为未知。当载荷 * 本身包含 CLI 失败时(例如 OpenSpec 1.9 的 selected-Root envelope),契约层 * 会单独携带该失败。 */ interface CliResult { success: boolean; stdout: string; stderr: string; exitCode: number | null; } //#endregion //#region ../core/src/cli-contracts/command-result.d.ts /** JSON value retained verbatim from one OpenSpec CLI stdout document. */ type CliJsonValue = string | number | boolean | null | CliJsonValue[] | { [key: string]: CliJsonValue; }; /** Complete process, raw payload, typed data, and diagnostic evidence for one CLI command. */ interface CliCommandResult extends CliResult { data: T | null; payload: CliJsonValue | null; diagnostics: CliDiagnostic[]; contractError?: string; } //#endregion //#region ../core/src/open-spec-data-scope.d.ts /** Provenance categories for the effective OpenSpec user-data root. */ type OpenSpecDataScopeSource = 'xdg-data-home' | 'local-app-data' | 'user-home-default'; /** Effective OpenSpec user-data root and its selection provenance. */ interface OpenSpecDataScope { /** Effective OpenSpec user-data root used by the inherited process environment. */ path: string; /** Objective provenance for the selected path. */ source: OpenSpecDataScopeSource; /** Environment variable that selected the path, or null for the home-directory fallback. */ environmentVariable: 'XDG_DATA_HOME' | 'LOCALAPPDATA' | null; } //#endregion //#region ../core/src/root-context.d.ts /** OpenSpec CLI availability and runner provenance observed by Root Context resolution. */ interface RootContextCliAvailability { available: boolean; version?: string; error?: string; effectiveCommand?: string; tried?: string[]; } /** Raw public evidence for one Root Context CLI command. */ interface RootContextCommandEvidence { success: boolean; /** Raw CLI JSON document, preserved byte-for-byte as process stdout. */ stdout: string; stderr: string; exitCode: number | null; diagnostics: CliDiagnostic[]; contractError?: string; } /** Complete launch-project, planning-root, Context, Reference, and data-scope projection. */ interface RootContext { launchProject: { /** Absolute launch-project path used as the CLI working directory. */ path: string; /** Canonical physical identity used only to compare Root topology. */ physicalPath?: string; }; /** CLI Doctor root projection. Null means root selection did not resolve. */ planningRoot: NonNullable | null; /** Effective Store identity when Doctor reports one. */ storeId: string | null; /** Opaque Server-owned planning-root generation, when resolved through a manager lease. */ generation?: string; cli: RootContextCliAvailability; /** Direct one-level Reference index from CLI Doctor. */ references: CliDoctorReferenceEntry[]; /** Direct Context members from `openspec context --json`. */ contextMembers: CliContext['members']; /** Read-only effective OpenSpec user-data root diagnostic. */ dataScope: OpenSpecDataScope; diagnostics: { root: CliDiagnostic[]; doctor: CliDiagnostic[]; context: CliDiagnostic[]; }; evidence: { doctor: RootContextCommandEvidence | null; context: RootContextCommandEvidence | null; }; observedAt: number; } //#endregion //#region ../core/src/opsx-workflows.d.ts /** * Orthogonal intents (created 2026-07-16 Asia/Shanghai): * 1. Define the complete OPSX workflow vocabulary once for Core, Server, CLI, and Web. * 2. Define profile and input-shape groups without coupling them to one transport. * 3. Define shared labels, command capability, and official skill-directory mappings. * * Original request (2026-07-15): "sync、update 的完整交付链。" */ declare const OPSX_ALL_WORKFLOWS: readonly ["propose", "explore", "new", "continue", "apply", "update", "ff", "sync", "archive", "bulk-archive", "verify", "onboard"]; /** Complete supported OPSX workflow identifier union. */ type OpsxWorkflowId = (typeof OPSX_ALL_WORKFLOWS)[number]; /** OPSX actions whose primary input is free text. */ declare const OPSX_TEXT_INPUT_ACTIONS: readonly ["explore", "propose"]; /** OPSX actions whose primary input is an artifact identity. */ declare const OPSX_ARTIFACT_INPUT_ACTIONS: readonly ["continue", "ff"]; /** OPSX actions whose primary input is an existing Change identity. */ declare const OPSX_CHANGE_INPUT_ACTIONS: readonly ["apply", "update", "archive", "verify", "sync"]; /** Text-input OPSX action union. */ type OpsxTextInputAction = (typeof OPSX_TEXT_INPUT_ACTIONS)[number]; /** Artifact-input OPSX action union. */ type OpsxArtifactInputAction = (typeof OPSX_ARTIFACT_INPUT_ACTIONS)[number]; /** Change-input OPSX action union. */ type OpsxChangeInputAction = (typeof OPSX_CHANGE_INPUT_ACTIONS)[number]; //#endregion //#region ../core/src/hooks.d.ts declare const OPENSPECUI_DOCUMENT_HOOK_VERSION = 1; declare const OPENSPECUI_WORKFLOW_HOOK_VERSION = 2; /** Severity level for diagnostics returned by project hooks. */ type HookDiagnosticLevel = 'info' | 'warning' | 'error'; /** Non-fatal hook diagnostic surfaced with the processed result. */ interface HookDiagnosticV1 { level: HookDiagnosticLevel; message: string; } /** Project-scoped lifecycle helpers available to hooks. */ interface HookLifecycleV1 { /** * Register cleanup work for the project hook runtime. * * This lifecycle is project-scoped, not call-scoped, so daemon-style hooks can * keep one process alive for the OpenSpecUI session. */ onDispose(cleanup: () => void | Promise): void; } /** OpenSpecUI consumer requesting a processed document projection. */ type DocumentConsumerV1 = 'view' | 'search' | 'export'; /** Document read mode; source reads bypass hooks and stay audit-safe. */ type DocumentReadModeV1 = 'source' | 'processed'; /** Stable identity for the OpenSpec document currently being read. */ interface DocumentRefV1 { stage: 'project' | 'main' | 'change' | 'archive'; kind: 'project' | 'spec' | 'proposal' | 'design' | 'tasks' | 'delta-spec' | 'artifact'; relativePath: string; absolutePath: string; specId?: string; changeId?: string; schemaName?: string; artifactId?: string; artifactOutputPath?: string; } /** Context passed to `onReadDocument`. */ interface ReadDocumentContextV1 { version: typeof OPENSPECUI_DOCUMENT_HOOK_VERSION; projectDir: string; consumer: DocumentConsumerV1; document: DocumentRefV1; signal: AbortSignal; lifecycle: HookLifecycleV1; } /** Markdown projection returned by document reads and `onReadDocument`. */ interface ReadDocumentResultV1 { markdown: string; sourceLabel?: string; title?: string; diagnostics?: HookDiagnosticV1[]; watchFiles?: string[]; } /** Intercepts processed OpenSpec markdown reads for view, search, and export. */ type OnReadDocumentHookV1 = (ctx: ReadDocumentContextV1, read: () => Promise) => Promise; /** OPSX workflow action names that can be customized by `onRunWorkflow`. */ type WorkflowActionV1 = OpsxWorkflowId; /** Invocation mode requested by the UI before action-specific fallback resolution. */ type WorkflowRequestedModeV1 = 'compose' | 'command' | 'direct'; /** Normalized OPSX workflow input passed to `onRunWorkflow`. */ type RunWorkflowInputV1 = { action: OpsxTextInputAction; text: string; } | { action: 'new'; changeId: string; schema?: string; description?: string; extraArgs: string[]; } | { action: OpsxArtifactInputAction; changeId: string; artifactId: string; schema?: string; } | { action: OpsxChangeInputAction; changeId: string; schema?: string; strict?: boolean; } | { action: 'bulk-archive'; changeIds?: string[]; schema?: string; } | { action: 'onboard'; }; /** Actual invocation mode after OpenSpecUI applies action capability rules. */ interface WorkflowInvocationModeResolutionV1 { requestedMode: WorkflowRequestedModeV1; actualMode: WorkflowRequestedModeV1; fallbackReason: string | null; } /** Root and CLI evidence that fixes one workflow invocation to one writable planning root. */ interface WorkflowInvocationTargetV2 { launchProject: RootContext['launchProject']; planningRoot: NonNullable; storeId: string | null; /** Opaque Server-owned generation for the active planning-root service lease. */ generation: string; /** Root Context observation that created this target; used to reject stale dispatch. */ observedAt: RootContext['observedAt']; rootSelector: CliRootSelector; references: RootContext['references']; diagnostics: RootContext['diagnostics']; rootEvidence: RootContext['evidence']; } /** Command-specific OpenSpec evidence used to prepare one change action. */ type WorkflowActionEvidenceV2 = { kind: 'workflow-status'; options: CliWorkflowOptions; result: CliCommandResult; } | { kind: 'artifact-instructions'; options: CliWorkflowOptions; result: CliCommandResult; } | { kind: 'apply-instructions'; options: CliWorkflowOptions; result: CliCommandResult; } | { kind: 'archive-instructions'; options: CliWorkflowOptions; result: CliCommandResult; }; /** Context passed to `onRunWorkflow`. */ interface RunWorkflowContextV2 { version: typeof OPENSPECUI_WORKFLOW_HOOK_VERSION; target: WorkflowInvocationTargetV2; action: WorkflowActionV1; requestedMode: WorkflowRequestedModeV1; input: RunWorkflowInputV1; signal: AbortSignal; lifecycle: HookLifecycleV1; } interface RunWorkflowResultBaseV2 { /** Null only for static-mode fallbacks that have no backend Root Context. */ target: WorkflowInvocationTargetV2 | null; evidence: WorkflowActionEvidenceV2 | null; mode?: WorkflowInvocationModeResolutionV1; diagnostics?: HookDiagnosticV1[]; } /** Final OPSX invocation payload produced by OpenSpecUI or `onRunWorkflow`. */ type RunWorkflowResultV2 = RunWorkflowResultBaseV2 & ({ kind: 'agent-prompt'; text: string; format: 'markdown'; } | { kind: 'agent-command'; text: string; } | { kind: 'cli-command'; command: string; args: string[]; }); /** Intercepts the final OPSX invocation payload before the UI runs it. */ type OnRunWorkflowHookV2 = (ctx: RunWorkflowContextV2, run: () => Promise) => Promise; /** Project hook module shape exported from `openspec/openspecui.hooks.ts`. */ interface OpenSpecUIHooks { onReadDocument?: OnReadDocumentHookV1; onRunWorkflow?: OnRunWorkflowHookV2; } //#endregion export { type DocumentConsumerV1, type DocumentReadModeV1, type DocumentRefV1, type HookDiagnosticLevel, type HookDiagnosticV1, type HookLifecycleV1, OPENSPECUI_DOCUMENT_HOOK_VERSION, OPENSPECUI_WORKFLOW_HOOK_VERSION, type OnReadDocumentHookV1, type OnRunWorkflowHookV2, type OpenSpecUIHooks, type ReadDocumentContextV1, type ReadDocumentResultV1, type RunWorkflowContextV2, type RunWorkflowInputV1, type RunWorkflowResultV2, type WorkflowActionEvidenceV2, type WorkflowActionV1, type WorkflowInvocationModeResolutionV1, type WorkflowInvocationTargetV2, type WorkflowRequestedModeV1 };