The OSII core owns canonical persistence. Processors are replaceable compute
services and do not mount or mutate .osii.
The dashboard, REST API, and MCP interface are peers over the same logical resources. A standard artifact written by an enricher must be usable by both a person in the dashboard and an agent without processor-specific integration.
Dashboard / MCP
|
v
OSII API + grounded chat ----> job worker (migration target)
|
+----> extractor services
+----> synthesizer services
+----> embedder services
+----> enricher services
|
v
canonical .osii store
Every external processor implements:
GET /healthGET /v1/descriptor- one kind-specific operation:
/v1/extract,/v1/synthesize,/v1/embed, or/v1/enrich
The descriptor declares one processor kind, supported media/scope types, outputs, and a JSON configuration schema. A process request contains either one document or one scope snapshot. A response contains text segments and/or typed artifacts.
Requests are self-contained. Source bytes are base64 encoded when required. Text-oriented processors receive preferred text and provenance. This makes a processor independently testable and prevents third-party code from corrupting the store.
The protocol initially favors simple JSON over throughput. Large-artifact transport (signed object URLs or multipart streaming) can be added compatibly after real workload measurements.
Current extractors, synthesizers, and enrichers remain in-process while they are moved one at a time:
- wrap the implementation with
osii-processor-sdk; - add golden contract tests;
- register its service URL;
- compare its output with the local implementation;
- remove the local implementation after its routes/configuration use the remote processor.
Remote enrichers are supported in the first migration slice. Remote extractors, synthesizers, and embedders now have explicit wire contracts but still need core-side commit adapters.
OSII Core owns the complete grounded-answer pipeline under osii/rag:
- validate the requested scope;
- retrieve lexical, semantic, or hybrid evidence from the canonical corpus;
- preserve source spans and citations;
- invoke the selected model method or the local extractive fallback; and
- return one typed answer with the retrieval mode and actual provider used.
The FastAPI /api/chat route is a thin transport adapter over this pipeline.
The dashboard calls that route; there is no separate RAG service or RAG image.
Future query planning and iterative retrieval belong in this Core pipeline.
Model-heavy reranking may be supplied by a stateless processor, but Core keeps
ownership of the sequence, scope, evidence, and final citations.
packages/osii-processor-sdk: public contracts and service/client helpersservices: independently deployable processorsai-ready-ingest: core domain, persistence, API, RAG orchestration, grounded chat, and transitional local processorsosii-dashboard: browser applicationai-ready-mcp: agent-facing adapterai-ready-tool-shelf: optional third-party/model runtimes pending migration
Processor services should be treated as untrusted compute:
- no OSII data-volume mount;
- only requested documents leave the core;
- configuration is validated against the descriptor schema;
- responses are size-limited and schema-validated;
- the core assigns canonical paths and commits outputs;
- network authentication is required outside a private local network.