/** * `GET /api/v1/interactive/docs` — a daemon-wide, NON-SPAWNING listing of every interactive document * across projects (wave 6, studio #263 review). * * The per-project listing (`GET /projects/:id/interactive/api/docs`, doc-list-routes.ts) asks the * project's BRIDGE — spawning one `wicked-interactive serve` per project root (≈60 s cold start) — * so a skin that fans it out over every project on mount pays a cold start per project. This * listing reads what the bridge itself reads, straight from disk: every project's docs root * (bridge-root.ts precedence — the project's own `interactiveRoot`, else `WICKED_INTERACTIVE_ROOT`, * else the default root / its `projects/` partition), each slug-named child carrying a * `versions.json` (the bridge's `listDocs` rule, restated from wicked-interactive `src/service/ * server.js`: `kind` defaults to `doc`, `updated_at` is the last version's `created_at`, a retired * manifest lists only on request, a malformed manifest is skipped) — plus what only the DAEMON * knows: the seams that answered the document and the governed runs they launched (the handoff * ledgers, via `DocRunIndex`). * * A root shared by several projects (an explicit `interactiveRoot` binding, or `WICKED_INTERACTIVE_ROOT` * applying to all) is listed ONCE, under the first project that resolved to it. A root that does not * exist yet is an empty project, not a failure; a root that cannot be read, or a partition the * containment walk refuses, is reported in `unreachable` with the reason — never silently dropped. */ import type { CoreAdapter } from '../core/adapter.js'; import type { ProjectSettingsStore } from '../projects/settings.js'; import type { DocGroundingStore, GroundingRecord } from './doc-grounding.js'; import type { DocRunIndex } from './doc-run-index.js'; /** The bridge's manifest file (wicked-interactive `fsstore.js` `MANIFEST`). */ export declare const VERSIONS_FILE = "versions.json"; /** One document as the daemon lists it — published as `InteractiveDocIndexRow` (api-types 0.36.0). */ export interface InteractiveDocIndexRow { /** The project whose docs root holds the document (the first project, for a shared root). */ projectId: string; name: string; /** Manifest `kind`; a manifest without one lists as `doc`. */ kind: 'doc' | 'html' | 'source' | 'demo' | (string & {}); /** Head version, `null` when the manifest carries none. */ head: number | null; /** Lineage size. */ versions: number; /** ISO-8601 of the head (last) version, or `null` when the lineage is empty. */ updatedAt: string | null; /** Present only on a retired (tombstoned) row, listed only with `includeRetired`. */ retired?: true; retiredAt?: string; /** The seams that answered this document (`draft` | `edit` | `chat` | `demo`), from the ledgers. */ kinds: string[]; /** The governed runs the seams launched for it (ledger order). */ runs: string[]; /** Manifest `style`, the bridge's `listDocs` rule (absent when the manifest has none). */ style?: string; /** crew#896: the grounding the draft seam recorded beside the doc, as the per-project list * serves it (doc-list-routes.ts). Absent when none was recorded. */ grounding?: GroundingRecord; } /** A project docs root the listing could not read. */ export interface InteractiveDocsUnreachable { projectId: string; root: string | null; error: string; } export interface InteractiveDocsListing { docs: InteractiveDocIndexRow[]; unreachable: InteractiveDocsUnreachable[]; } export interface ListInteractiveDocsDeps { adapter: Pick; settings: ProjectSettingsStore; docRuns: Pick; /** crew#896: the sidecar store the per-project list reads grounding from. */ groundingStore?: Pick; env?: Record; /** The daemon state home the DEFAULT root hangs off (crew ≥ 0.7.35; tests point it at a scratch dir). */ stateHome?: string; /** The HOME a leading `~` in an EXPLICIT `interactiveRoot` expands against. */ home?: string; includeRetired?: boolean; } export declare function listInteractiveDocs(deps: ListInteractiveDocsDeps): Promise; //# sourceMappingURL=docs-index.d.ts.map