import { z } from "zod"; /** * Committed skill card (docs/security/skill-trust-gate.md) — the one-page, * human-auditable record of WHAT a vetted external skill is and WHY it may run * here. Derived fields (commit / license / riskClass / requiresMcp / * requiresShell / scanEvidence) come from the vet EVIDENCE artifact + shape; * owner / pack / intendedUse / mode are operator intent captured at card or * approve time. Cards live at `/skill-cards/.json` and are * COMMITTED (unlike the gitignored `.aih/skill-reports/` evidence they cite). */ /** Approvable risk classes — RED/UNKNOWN sources never get a card. */ declare const RiskClassSchema: z.ZodEnum<{ green: "green"; yellow: "yellow"; }>; declare const SkillCardApprovalSchema: z.ZodObject<{ verdict: z.ZodEnum<{ GREEN: "GREEN"; YELLOW: "YELLOW"; }>; approvedBy: z.ZodString; approvedAt: z.ZodString; }, z.core.$strip>; declare const SkillSourceScopeSchema: z.ZodObject<{ selectedSkillNames: z.ZodArray; includedPaths: z.ZodArray; excludedSkillPaths: z.ZodArray; }, z.core.$strip>; export type SkillSourceScope = z.infer; export declare const SkillCardSchema: z.ZodObject<{ schemaVersion: z.ZodLiteral<1>; name: z.ZodString; source: z.ZodString; commit: z.ZodString; license: z.ZodString; owner: z.ZodOptional; pack: z.ZodOptional; firstParty: z.ZodOptional; intendedUse: z.ZodOptional; installScope: z.ZodString; riskClass: z.ZodEnum<{ green: "green"; yellow: "yellow"; }>; mode: z.ZodOptional; requiresMcp: z.ZodBoolean; requiresShell: z.ZodBoolean; writesFiles: z.ZodOptional; networkEgress: z.ZodOptional; scanEvidence: z.ZodArray; sourceScope: z.ZodOptional; includedPaths: z.ZodArray; excludedSkillPaths: z.ZodArray; }, z.core.$strip>>; approval: z.ZodOptional; approvedBy: z.ZodString; approvedAt: z.ZodString; }, z.core.$strip>>; }, z.core.$strip>; export type SkillCard = z.infer; export type SkillCardApproval = z.infer; export type SkillRiskClass = z.infer; /** The only install scope slice 2 issues; wider scopes arrive with delegation. */ export declare const SKILL_INSTALL_SCOPE = "repo"; export interface BuildCardInput { name: string; source: string; commit: string; license: string; riskClass: SkillRiskClass; requiresMcp: boolean; requiresShell: boolean; scanEvidence: string[]; sourceScope?: SkillSourceScope; owner?: string; pack?: string; firstParty?: boolean; intendedUse?: string; mode?: string; approval?: SkillCardApproval; } /** Assemble a card body; JSON rendering drops the unset optional fields. */ export declare function buildCard(input: BuildCardInput): SkillCard; /** Repo-relative committed skill-cards directory (POSIX) — the one place the segment is spelled. */ export declare function skillCardsDir(contextDir: string): string; /** Repo-relative committed card path for a skill name. */ export declare function skillCardRelPath(contextDir: string, name: string): string; /** * Read a committed skill card, or `undefined` when it is absent, unreadable, or * fails validation. Fail-SOFT by design (like `readAihConfig`): a hand-edited * card must never crash a command — callers treat it as "no card yet". */ export declare function readSkillCard(root: string, contextDir: string, name: string): SkillCard | undefined; export {};