Files
2026-10-17 14:59:30 -06:00

2.9 KiB

Proposed API and MCP adapters

The static files and CLI search are implemented. openapi.json and mcp-tools.json are design contracts only; there is no listening API, MCP transport, service deployment, or service discovery advertisement. Do not register them with clients as available endpoints.

Read-only surface

Need Proposed HTTP operation Proposed MCP tool
Browse recordings GET /media list_media
Find a passage or answer GET /search?q=...&limit=5 search_media
Fetch recording context and artifact routes GET /media/{media_id} get_media
Fetch one source-cited conceptual unit GET /media/{media_id}/chunks/{chunk_id} get_media_chunk

Use opaque media/chunk IDs as identifiers; URL-encode IDs containing colons. Return the same IDs, text, time ranges, canonical transcript URLs, rights, and input fingerprint as the approved export. Search returns a bounded results array matching the local CLI records. No matches returns an empty array, never an invented answer. Fetching an unknown or withdrawn item returns a clear not-found response.

An adapter should load only a complete release after checksum/schema verification and use a single release snapshot for each request. Validate parameters, constrain limits, return structured errors, log without private transcripts or credentials, and prevent arbitrary path/URL fetching. Add pagination and deterministic filtering when scale requires them. The initial OpenAPI design is intentionally limited to a small corpus; it is not a deployed production API specification.

For a restricted corpus, apply access checks before search, snippets, Q&A, list, or fetch; never expose a public index that reveals restricted metadata. This repository's first profile is entirely public. A production adapter also needs authentication decisions, rate limits, CORS, health checks, release refresh, withdrawal handling, and integration tests.

MCP implementation must support the actual protocol lifecycle, capability negotiation, tool listing/invocation, and error behavior. Tool definitions alone are not a server. No additional network action is implied by a transcript's content.

Future embeddings

Keep vector records downstream of the canonical chunks. Store media/chunk/knowledge IDs, chunk version, source input fingerprint, exact embedded-text hash, embedding model/version and dimensions, language, and rights/access filters. Regenerate when text/model changes; invalidate removed or restricted content. Decide whether to index Q&A separately and preserve its source citations.

Use a realistic question set to compare keyword, semantic, and hybrid retrieval. Measure retrieval coverage and citation correctness before choosing infrastructure. Never replace source text with an embedding, or use vector similarity as proof that an answer is supported.