/** * `/api/dashboard/github/repos[...]` — Dashboard surface for connecting * GitHub repos, syncing them, and removing them. Sits on top of the * existing `@onenomad/przm-cortex-adapter-github` (we add repos to its * config + enqueue sync jobs; we do NOT fork the adapter). * * Auth gate: every endpoint requires the `admin` scope. Slice A puts * the resolved OAuth access token onto SessionState as * `githubAccessToken`; we read it via a typed accessor that tolerates * the token being absent (returns 412 `github_not_connected` so the * SPA can prompt the user to reconnect). * * Routes: * GET /api/dashboard/github/repos?page=N&per_page=M&filter=… * POST /api/dashboard/github/repos/sync body { repos: [...] } * POST /api/dashboard/github/repos/:owner/:name/sync * DELETE /api/dashboard/github/repos/:owner/:name?purge=true|false * * Sync semantics: connecting a repo writes it into * `adapters.github.config.repos` (creates the adapter entry if it * doesn't exist yet) and enqueues a `github-sync:/` job * via the global JobRegistry. The work the job runs is the existing * `ingest_repo` MCP tool with the `https://github.com/...` URL — that * path already handles shallow-clone + glob filtering + per-file * ingest + engram dedup, so we get full repo ingestion without * duplicating any of the adapter's walk logic. */ import type { IncomingMessage, ServerResponse } from "node:http"; import type { RouteContext } from "../route-context.js"; export declare function handle(req: IncomingMessage, res: ServerResponse, ctx: RouteContext): Promise; //# sourceMappingURL=dashboard-github-repos.d.ts.map