/** * Phase 4a โ€” `cursell.lock` schema. See * `docs/security-trust-layer/plan.md` ยง2 Phase 4 for the full design. * * The lockfile is a single committed file that mixes a human-edited * `spec` (semver range) with a CLI-written `resolved` block (pin + * hash + author + timestamp) per agent. Phase 4 work is gated on * Phase 2A being live in production so `getAgent` returns the * `contentHash` / `publishedBy` / `publishedAt` fields the lockfile * pins. */ import { z } from "zod"; /** * Trust contract identity. The version-suffixed algo string is what * `assertLockInvariants` matches exactly โ€” future hash algorithms * become an explicit migration (bump `lockfileVersion`, add the new * algo string, keep recognizing the old). */ export declare const ContentHashSchema: z.ZodObject<{ algo: z.ZodLiteral<"sha256-v1">; value: z.ZodString; }, "strip", z.ZodTypeAny, { algo: "sha256-v1"; value: string; }, { algo: "sha256-v1"; value: string; }>; export type ContentHash = z.infer; export declare const ResolvedSchema: z.ZodObject<{ version: z.ZodString; contentHash: z.ZodObject<{ algo: z.ZodLiteral<"sha256-v1">; value: z.ZodString; }, "strip", z.ZodTypeAny, { algo: "sha256-v1"; value: string; }, { algo: "sha256-v1"; value: string; }>; publishedBy: z.ZodString; publishedAt: z.ZodString; }, "strip", z.ZodTypeAny, { version: string; contentHash: { algo: "sha256-v1"; value: string; }; publishedBy: string; publishedAt: string; }, { version: string; contentHash: { algo: "sha256-v1"; value: string; }; publishedBy: string; publishedAt: string; }>; export type Resolved = z.infer; export declare const AgentEntrySchema: z.ZodObject<{ spec: z.ZodString; resolved: z.ZodObject<{ version: z.ZodString; contentHash: z.ZodObject<{ algo: z.ZodLiteral<"sha256-v1">; value: z.ZodString; }, "strip", z.ZodTypeAny, { algo: "sha256-v1"; value: string; }, { algo: "sha256-v1"; value: string; }>; publishedBy: z.ZodString; publishedAt: z.ZodString; }, "strip", z.ZodTypeAny, { version: string; contentHash: { algo: "sha256-v1"; value: string; }; publishedBy: string; publishedAt: string; }, { version: string; contentHash: { algo: "sha256-v1"; value: string; }; publishedBy: string; publishedAt: string; }>; }, "strip", z.ZodTypeAny, { spec: string; resolved: { version: string; contentHash: { algo: "sha256-v1"; value: string; }; publishedBy: string; publishedAt: string; }; }, { spec: string; resolved: { version: string; contentHash: { algo: "sha256-v1"; value: string; }; publishedBy: string; publishedAt: string; }; }>; export type AgentEntry = z.infer; export declare const LockfileSchema: z.ZodObject<{ $schema: z.ZodOptional; $comment: z.ZodOptional; lockfileVersion: z.ZodLiteral<2>; registry: z.ZodEffects; agents: z.ZodRecord; value: z.ZodString; }, "strip", z.ZodTypeAny, { algo: "sha256-v1"; value: string; }, { algo: "sha256-v1"; value: string; }>; publishedBy: z.ZodString; publishedAt: z.ZodString; }, "strip", z.ZodTypeAny, { version: string; contentHash: { algo: "sha256-v1"; value: string; }; publishedBy: string; publishedAt: string; }, { version: string; contentHash: { algo: "sha256-v1"; value: string; }; publishedBy: string; publishedAt: string; }>; }, "strip", z.ZodTypeAny, { spec: string; resolved: { version: string; contentHash: { algo: "sha256-v1"; value: string; }; publishedBy: string; publishedAt: string; }; }, { spec: string; resolved: { version: string; contentHash: { algo: "sha256-v1"; value: string; }; publishedBy: string; publishedAt: string; }; }>>; }, "strip", z.ZodTypeAny, { lockfileVersion: 2; registry: string; agents: Record; $schema?: string | undefined; $comment?: string | undefined; }, { lockfileVersion: 2; registry: string; agents: Record; $schema?: string | undefined; $comment?: string | undefined; }>; export type Lockfile = z.infer; /** * Convenience โ€” construct an empty (no agents) lockfile object that * passes the schema. Used by `cursell init` (Phase 4b) and tests. */ export declare function emptyLockfile(registry: string): Lockfile; export declare const LOCKFILE_FILENAME = "cursell.lock";