import type { SqliteDatabase } from '../sqlite/sqlite-driver.js'; import { type LoopRelease, type LoopReleaseInput, type LoopReleaseLifecycleStatus } from './loop-release-types.js'; /** * Thin service wrapper around the loop_release store. M1 keeps the * surface tiny on purpose: create / read / list / search. Promotion, * retirement, evaluation, and the `loop_bee_relation` joins are * deliberately deferred to M2 / M4 / M5 — shipping them here would * lock in an interface that the ratchet has not yet ratified. * * The constructor takes an open SQLite database (the existing * `peaks state` boundary) so callers do not have to thread a path * through this layer; this matches the `retainRelease` pattern in * `src/services/skillhub/release-retain.ts`. * * All write paths re-validate the input via the Zod schema, mirroring * the boundary-check discipline used elsewhere (e.g. * `lintManifestStrict` in `src/services/sediment/manifest-lint.ts`). */ export declare class LoopReleaseService { private readonly db; constructor(db: SqliteDatabase); /** * Persist a new LoopRelease row. Re-validates the input via the * Zod schema; throws ZodError on failure. */ create(input: LoopReleaseInput): LoopRelease; /** Read a LoopRelease row by id; returns undefined if absent. */ read(id: string): LoopRelease | undefined; /** * List LoopRelease rows. Filter by `status` when supplied; without * it, returns ALL rows (across `candidate` / `stable` / `retired`). * Sort is newest-first by `archived_at`. */ list(opts?: { status?: LoopReleaseLifecycleStatus; }): LoopRelease[]; /** * Search LoopRelease rows whose `scenario` contains the query * string (case-insensitive substring match via LIKE). Filter by * `status` to scope the search. */ search(opts: { query: string; status?: LoopReleaseLifecycleStatus; }): LoopRelease[]; }