import type { FastifyPluginAsync } from "fastify"; import type { CollectorStore } from "../store.js"; /** * **Project metadata** endpoints (#310, ADR 0051 §5, design sketch §E.2): * annotations, the glossary, and saved analyses. * * This is the collector's only writable surface besides ingestion, and it is * deliberately a separate plugin from `routes/query.ts` so the read API stays * exactly what it was: aggregate, read-only, and describable as such. Nothing * here touches the `events` tables. * * The rules, uniformly: * * - **Writes require `annotate`; reads require `query`.** A read-only key handed * to an agent can read the project's notes but cannot leave any (#309). * - **Everything is project-scoped.** The project comes from the key, never from * the request, so one project's notes are invisible to another's key. * - **Zod at the edge.** Every payload is one of the `@uptimizr/schema` metadata * contracts, which bound each field's length; the store bounds the row *count* * per project and answers `409` when a table is full. * - **Every write is audited.** The app-level audit hook records each one * (ADR 0051 §7); nothing extra is needed here, and `__tests__/metadata.test.ts` * pins that it happens. * - **Authorship is derived, not declared** — see `metadataAuthorKind`. */ interface Options { store: CollectorStore; } export declare const metadataRoutes: FastifyPluginAsync; export {}; //# sourceMappingURL=metadata.d.ts.map