import "./document-translation-CBqubtWC.mjs"; import "./sounds-X-Wf5v3V.mjs"; import "./notifications-D0M-01SA.mjs"; import { D as CliValidateReportSchema, J as CliCommandTransportSchema } from "./index-CajHC-38.mjs"; //#region src/openspec-compat.d.ts /** * Orthogonal intents (updated 2026-08-15 Asia/Shanghai): * 1. Encode the shipped OpenSpecUI release line's OpenSpec CLI compatibility law. * 2. Classify current, supported non-current, unsupported, and unknown CLI versions. * 3. Express the accepted range and the recommended line as separate public facts. * 4. Derive per-command capabilities from the detected admitted CLI version. * 5. Re-export the browser-safe contract schemas for renderer evidence boundaries. * * Original request (2026-07-15): "CLI 1.6 兼容性门禁。" * Original request (2026-07-31): "目前这个版本先给它支持1.7.*,因为基本兼容。" * Owner clarification (2026-07-31): "6.* 本身就是适配 1.6.*;对于 1.7 只是兼容而已。" * Original request (2026-08-01): "v7不兼容1.6.x,明确要求必须使用 v1.7.x。" * Original request (2026-08-15): "v9的适配需要同时适配 1.8和1.9。" */ declare const OPENSPECUI_TARGET_MAJOR = 9; declare const OPENSPEC_CLI_TARGET_SERIES = "1.9"; declare const OPENSPEC_CLI_SUPPORTED_SERIES: readonly ["1.8", "1.9"]; declare const OPENSPEC_CLI_MIN_VERSION = "1.8.0"; declare const OPENSPEC_CLI_TARGET_MIN_VERSION = "1.9.0"; declare const OPENSPEC_CLI_RECOMMENDED_MIN_VERSION = "1.9.0"; declare const OPENSPEC_CLI_NEXT_SERIES_MIN_VERSION = "1.10.0"; declare const OPENSPEC_CLI_ACCEPTED_RANGE = ">=1.8.0 <1.10.0"; declare const OPENSPEC_CLI_RECOMMENDED_RANGE = ">=1.9.0 <1.10.0"; declare const OPENSPEC_CLI_REFERENCE_TAG_PATTERN = "v1.9.*"; /** Per-command capabilities derived from one admitted OpenSpec CLI version. */ interface OpenSpecCliCapabilities { /** `openspec schemas --json --store ` exists (OpenSpec 1.9+; 1.8 rejects the selector). */ schemasRootSelector: boolean; /** `openspec validate --archived --json` exists (OpenSpec 1.9+; 1.8 rejects the option). */ archivedValidation: boolean; } /** * Derive command capabilities from one parsed CLI version. * * Only an admitted version — stable inside the accepted range — can select version-specific * capabilities. Unsupported forms (prereleases, >=1.10, below-range) and unparseable output * keep their mismatch evidence and expose no capability, so a page-level version bypass can * never manufacture a 1.9 command surface for a CLI the release line does not admit. */ declare function deriveOpenSpecCliCapabilities(version: OpenSpecCliVersion | null): OpenSpecCliCapabilities; interface OpenSpecCliVersion { major: number; minor: number; patch: number; prerelease: string | null; } /** * Compatibility classification for one detected CLI version. * * - `current`: stable version on the recommended target series. * - `supported`: stable version inside the accepted range but not on the target series. * - `unsupported`: stable version outside the accepted range, or any prerelease. * - `unknown`: the version output could not be parsed. */ type OpenSpecCliCompatibilityStatus = 'current' | 'supported' | 'unsupported' | 'unknown'; interface OpenSpecCliCompatibility { rawVersion: string | undefined; version: OpenSpecCliVersion | null; status: OpenSpecCliCompatibilityStatus; supported: boolean; recommended: boolean; blocksCoreInteractions: boolean; message: string; } declare function parseOpenSpecCliVersion(raw: string | undefined): OpenSpecCliVersion | null; declare function formatOpenSpecCliVersion(version: OpenSpecCliVersion): string; declare function compareOpenSpecCliVersions(left: OpenSpecCliVersion, right: OpenSpecCliVersion): number; declare function classifyOpenSpecCliVersion(rawVersion: string | undefined): OpenSpecCliCompatibility; //#endregion export { CliCommandTransportSchema, CliValidateReportSchema, OPENSPECUI_TARGET_MAJOR, OPENSPEC_CLI_ACCEPTED_RANGE, OPENSPEC_CLI_MIN_VERSION, OPENSPEC_CLI_NEXT_SERIES_MIN_VERSION, OPENSPEC_CLI_RECOMMENDED_MIN_VERSION, OPENSPEC_CLI_RECOMMENDED_RANGE, OPENSPEC_CLI_REFERENCE_TAG_PATTERN, OPENSPEC_CLI_SUPPORTED_SERIES, OPENSPEC_CLI_TARGET_MIN_VERSION, OPENSPEC_CLI_TARGET_SERIES, OpenSpecCliCapabilities, OpenSpecCliCompatibility, OpenSpecCliCompatibilityStatus, OpenSpecCliVersion, classifyOpenSpecCliVersion, compareOpenSpecCliVersions, deriveOpenSpecCliCapabilities, formatOpenSpecCliVersion, parseOpenSpecCliVersion };