/** * `/api/v1/projects` — the complete v1 surface of DES-PROJECT-001 §5.2 (9 routes): * * POST /projects create {name, description?} * GET /projects list (includes the synthesized `default`; ?status=) * GET /projects/:id detail + members * PATCH /projects/:id rename / describe / archive / restore * GET /projects/:id/members list members * POST /projects/:id/members attach {kind, ref, meta?} * DELETE /projects/:id/members/:mid detach * GET /projects/:id/activity merged feed, cursor-paginated * GET /projects/:id/prompts open interaction requests across member runs * * …plus the project code graph (projects/graph.ts) — the repo-scoped graph trio, one scope up: * * GET /projects/:id/graph what the co-located graph holds, and what it cannot answer * POST /projects/:id/graph/refresh incremental (re)build over every `crew.repo` member * GET /projects/:id/graph/blast-radius ?name= — dependents across member repos, each attributed * GET /projects/:id/graph/search ?name= — symbol resolution across member repos * * Route-layer rules the engine cannot own: * - The `default` project ("Unfiled") is SYNTHESIZED here (ADR §7): its members are the runs * with no explicit membership row; it lists, feeds, and prompts, and rejects PATCH/attach. * - `crew.*` member refs are existence-checked here at attach time (404 on unknown run/repo) — * never by the engine, and never with foreign keys (members may outlive what they point to). * - Bus events emit POST-COMMIT from these handlers with type-inclusive idempotency keys (§4). * - Engine error → status mapping: "not registered" 404 · "already in use"/"archived"/"default" * 409 · anything else 400. A pre-0.6.0 addon answers 501 (ProjectsUnsupportedError), never 400. */ import type { FastifyInstance } from 'fastify'; import { z } from 'zod'; import type { CoreAdapter } from '../core/adapter.js'; import type { ProjectBus } from './events.js'; import type { MembershipIndex } from './membership-index.js'; import { ProjectSettingsStore } from './settings.js'; import { AuditLog } from '../api/audit.js'; export declare const CreateProjectSchema: z.ZodObject<{ name: z.ZodString; description: z.ZodOptional; }, "strict", z.ZodTypeAny, { name: string; description?: string | undefined; }, { name: string; description?: string | undefined; }>; export declare const UpdateProjectSchema: z.ZodObject<{ name: z.ZodOptional; description: z.ZodOptional; status: z.ZodOptional>; /** DES-MERGE-001 §7.1 — the project's wicked-interactive docs root. Explicitly NULLABLE: * null clears the binding back to the shared default root, which is a different act from * omitting the key (leave it alone). Stored crew-side (see settings.ts), not in the engine. */ interactiveRoot: z.ZodOptional>; /** crew#552 — override `onboardingAutoCapture` for this project; null clears it. Crew-side. */ autoCapture: z.ZodOptional>; }, "strict", z.ZodTypeAny, { status?: "active" | "archived" | undefined; name?: string | undefined; description?: string | undefined; autoCapture?: boolean | null | undefined; interactiveRoot?: string | null | undefined; }, { status?: "active" | "archived" | undefined; name?: string | undefined; description?: string | undefined; autoCapture?: boolean | null | undefined; interactiveRoot?: string | null | undefined; }>; /** `POST /projects/:id/graph/refresh` body — optional; `{}` (or no body) is the plain refresh. * `force: true` is the post-estate-upgrade migration path: it bypasses the clean-HEAD skip and * passes `--force` to `wicked-estate index` (see `RefreshProjectGraphBody` in the wire types). */ export declare const RefreshProjectGraphSchema: z.ZodObject<{ force: z.ZodOptional; }, "strict", z.ZodTypeAny, { force?: boolean | undefined; }, { force?: boolean | undefined; }>; /** `.` — the engine re-validates; this is the 400-with-names layer. */ export declare const AttachMemberSchema: z.ZodObject<{ kind: z.ZodString; ref: z.ZodString; meta: z.ZodOptional>; attachedBy: z.ZodOptional>; }, "strict", z.ZodTypeAny, { kind: string; ref: string; meta?: Record | undefined; attachedBy?: "cli" | "interactive" | "studio" | "api" | undefined; }, { kind: string; ref: string; meta?: Record | undefined; attachedBy?: "cli" | "interactive" | "studio" | "api" | undefined; }>; export interface ProjectRoutesDeps { bus: ProjectBus | null; index: MembershipIndex; log: (msg: string) => void; /** Crew-side per-project settings (DES-MERGE-001 §7.1's `interactiveRoot`). Optional so the * route-level unit tests keep their existing two-line deps; `registerRoutes` always supplies * the SAME instance the interactive proxy reads. */ settings?: ProjectSettingsStore; } export declare function registerProjectRoutes(app: FastifyInstance, adapter: CoreAdapter, deps: ProjectRoutesDeps, security?: { audit: AuditLog; }): void; //# sourceMappingURL=routes.d.ts.map