mirror of
https://github.com/joelhooks/joelclaw.git
synced 2026-09-19 01:24:04 +08:00
0719010a84
Move NAS placement behind shared configuration, update docs paths, and remove stale storage defaults.
Focused tests, CLI/docs-api typechecks, and changed-file Biome checks pass. CI failures are pre-existing workflow package-manager duplication and an unrelated Vercel ADR auth failure.
SR 🐀
docs-api
Typesense-backed docs REST API for joelclaw.
Routes
GET /healthGET /statusGET /search?q=<query>[&page=1][&perPage=10][&semantic=true|false][&concept=<id>][&concepts=<id1>,<id2>][&doc_id=<id>][&expand=true|false][&assemble=true|false]GET /docs/search?q=<query>[&concept=<id>][&page=1][&perPage=20]GET /docs/:id/tocGET /docs/:id/chunks[?type=section|snippet][&page=1][&perPage=50]GET /docs/:id/markdownGET /docs/:id/summaryGET /docs/:id/artifact/metaGET /docs[?page=1][&perPage=20]GET /docs/:idGET /chunks/:id[?lite=true][&includeEmbedding=false]GET /conceptsGET /concepts/:idGET /concepts/:id/docs[?page=1][&perPage=20]
Also supports optional mounted prefix:
/api/docs/*
Auth
All routes except /health require:
Authorization: Bearer <PDF_BRAIN_API_TOKEN>
Env
HOST(default0.0.0.0)PORT(default3838)TYPESENSE_URL(defaulthttp://typesense:8108)TYPESENSE_API_KEY(required)PDF_BRAIN_API_TOKEN(required)DOCS_CHUNKS_COLLECTION(defaultdocs_chunks_v2)DOCS_ARTIFACTS_DIR(default/Volumes/services/joelclaw/docs-artifacts)
Notes
- The API defaults to the ADR-0234 v2 chunk collection (
docs_chunks_v2) withnomic-embed-text-v1.5embeddings. - Artifact-backed document reads come from NAS-backed markdown + metadata files in
DOCS_ARTIFACTS_DIR.
Run
pnpm --filter docs-api dev