UNPKG

@hasna/projects

Version:

High-level project management CLI, MCP server, SDK, and AI SDK agent loop for coding agents

53 lines • 2.63 kB
import { z } from "zod"; import type { ApiKeyPrincipal } from "@hasna/contracts/auth"; import type { TypedQueryClient } from "../generated/storage-kit/query.js"; import type { GuardedProjectReadRequest, GuardedProjectReadResult } from "../types/workspace.js"; import { type ProjectionPolicy } from "./projection-policy.js"; export declare const ProjectionIssueSchema: z.ZodObject<{ request_id: z.ZodString; expected_revision: z.ZodString; project_digest: z.ZodString; resource_link_collection_digest: z.ZodString; resource_link_max_items: z.ZodNumber; response_byte_limit: z.ZodNumber; time_budget_ms: z.ZodNumber; }, "strict", z.ZodTypeAny, { response_byte_limit: number; time_budget_ms: number; resource_link_max_items: number; resource_link_collection_digest: string; project_digest: string; expected_revision: string; request_id: string; }, { response_byte_limit: number; time_budget_ms: number; resource_link_max_items: number; resource_link_collection_digest: string; project_digest: string; expected_revision: string; request_id: string; }>; export declare const ProjectionReadSchema: z.ZodObject<Pick<{ request_id: z.ZodString; expected_revision: z.ZodString; project_digest: z.ZodString; resource_link_collection_digest: z.ZodString; resource_link_max_items: z.ZodNumber; response_byte_limit: z.ZodNumber; time_budget_ms: z.ZodNumber; }, "response_byte_limit" | "time_budget_ms">, "strict", z.ZodTypeAny, { response_byte_limit: number; time_budget_ms: number; }, { response_byte_limit: number; time_budget_ms: number; }>; export type ProjectionIssueRequest = z.infer<typeof ProjectionIssueSchema>; export type ProjectionReadRequest = z.infer<typeof ProjectionReadSchema>; export declare const PROJECTION_RECEIPT_PATTERN: RegExp; export declare function parseProjectionInput<T>(schema: z.ZodType<T>, input: unknown): T; /** Called inside the owning store's dedicated transaction; deadline applies to lock waits too. */ export declare function issueProductProjection(db: TypedQueryClient, snapshot: (input: GuardedProjectReadRequest, started: number) => Promise<GuardedProjectReadResult>, policy: ProjectionPolicy | undefined, principal: ApiKeyPrincipal, projectId: string, raw: unknown): Promise<Record<string, unknown>>; export declare function readProductProjection(db: TypedQueryClient, policy: ProjectionPolicy | undefined, principal: ApiKeyPrincipal, projectId: string, receiptId: string, raw: unknown): Promise<Record<string, unknown>>; //# sourceMappingURL=product-projection.d.ts.map