import { type PortableSkillManifest } from "./portable-skills-types.js"; import type { SkillValidationMessage } from "./skill-validation.js"; /** * Field-level validator implementing the hasna.skill.v1 JSON Schema * (schemas/skill.schema.json). Checks the portable manifest against the * contract and verifies the self-referencing content_hash when a skill * folder is available. Returns exact field errors with `contract.*` codes. * * The parity test (skill-contract.test.ts) asserts this validator and the * schema file agree on required fields, runtime/sandbox enums, and the * system-deps allowlist, so the two cannot drift apart silently. */ export declare const SEMVER_PATTERN = "^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$"; export declare const CONTENT_HASH_PATTERN = "^[a-f0-9]{64}$"; export declare const ENV_REFERENCE_PATTERN = "^[A-Z0-9_]+$"; export declare const MAX_RUNTIME_TIMEOUT_SECONDS = 900; export declare const DEFAULT_RUNTIME_TIMEOUT_SECONDS = 900; export interface PortableContractOptions { /** * Whether the manifest is the full portable contract (a skill.json exists). * When true, the runtime contract and content_hash are required; a manifest * present without its integrity field is not portable. SKILL.md-only legacy * skills stay under the relaxed rule. */ strict?: boolean; /** Skill folder for content_hash verification. */ skillPath?: string; } /** * Validate the portable manifest against the hasna.skill.v1 contract. * Returns issues only; callers combine with existing directory validation. */ export declare function validatePortableManifestContract(manifest: PortableSkillManifest | undefined, options?: PortableContractOptions): SkillValidationMessage[]; /** Read a skill.json from disk and parse it, tolerating absence. */ export declare function readRawSkillJson(skillPath: string): Record | undefined;