import type { ProjectRegistry, ReserveError } from './project-registry.js'; export interface ContextBlockOpDeps { projectRegistry: ProjectRegistry; maxContextBlockBytes: number; maxContextBlocksPerProject: number; } export interface DeleteContextBlockOpDeps { projectRegistry: ProjectRegistry; } /** Error codes either operation can produce, verbatim across both transports. `ReserveError` covers * the (rare) case where the project registry itself rejects the reservation — e.g. the server hit * its project cap between validation and reservation. */ export type ContextBlockOpErrorCode = 'invalid_request' | 'payload_too_large' | 'cap_exhausted' | 'not_found' | 'pinned' | ReserveError; export interface ContextBlockOpError { ok: false; code: ContextBlockOpErrorCode; message: string; extra?: Record; } export type CreateContextBlockInput = { /** Already-canonical absolute project path — see the module note above. */ cwd: string; content: unknown; ttlMs?: unknown; }; export type CreateContextBlockResult = { ok: true; id: string; } | ContextBlockOpError; export type DeleteContextBlockInput = { cwd: string; blockId: string; }; export type DeleteContextBlockResult = { ok: true; } | ContextBlockOpError; /** * Validate the body, reserve the project, cap-check, and register a context block. */ export declare function createContextBlock(deps: ContextBlockOpDeps, input: CreateContextBlockInput): CreateContextBlockResult; /** * Delete a context block belonging to the given cwd. `not_found` when the block does not exist or * belongs to a different project (isolation); `pinned` when it is still referenced by an active * batch. */ export declare function deleteContextBlock(deps: DeleteContextBlockOpDeps, input: DeleteContextBlockInput): DeleteContextBlockResult; //# sourceMappingURL=context-block-ops.d.ts.map