Skip to content

Commit 81a2169

Browse files
committed
docs(knowledge): mounted is not enabled — the held state on both knowledge pages
Claude-Session: https://claude.ai/code/session_01FEkQ5m2rYCwPR3qqhnZDfW Co-authored-by: Claude <noreply@anthropic.com>
1 parent 40987f2 commit 81a2169

2 files changed

Lines changed: 18 additions & 3 deletions

File tree

‎content/docs/ai/knowledge-rag.mdx‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ Which store is mounted depends on the platform database:
3434
- **Two stores and none the deployment's** (a host that mounts the service and two adapters itself): a source that names no adapter is refused when it is registered or saved — `VALIDATION_ERROR` (400), naming the adapters to choose from.
3535
- **A source naming a store that is not mounted** (a retired store such as `ragflow`, or a typo) is refused when it is saved in Studio, over `PUT /meta/knowledge_source` or through MCP: `VALIDATION_ERROR` (400), naming the source, the adapter and the stores that are mounted. A source that leaves `adapter` out is not refused for it. That save check does not reach a package install, a source registered in code or `os validate`; such a source does not stop the boot: the server logs one error naming the source and the stores that are mounted, and indexing or searching that source answers `SERVICE_UNAVAILABLE` (503) with the same choices; `search_knowledge` lists it in `refused`.
3636
- **The embedder** comes from Settings → AI & Embedder ([below](#configuring-the-embedder-from-settings)).
37+
- **Mounted is not enabled.** A service the runtime mounts this way is enabled by configuration, read once when the server starts: an embedder (one a plugin registered, or a provider saved in Settings → AI & Embedder that builds one) and the deployment's store mounted. Without both, every source is **held**, whichever store it names: it is listed to administrators and never built, synced, reconciled or searched; `search_knowledge` is not listed on MCP (HTTP or stdio); a search or a rebuild answers `SERVICE_UNAVAILABLE` (503) naming what is missing; no reap guard is registered and no store is called, so a retention sweep deletes rows on time. The boot says it once: at `info` when only a shipped source mounted the service and nothing was saved, at `warn` when the stack declares `requires: ['knowledge']`, a saved provider builds no embedder (one saved without its key) or the store is not mounted. The server always starts. To enable it, save an embedder provider (or mount the store the log names), then restart. A service you mount yourself (below) is not held.
3738
- **Another libSQL store** for the `turso` case: save its URL as `turso_url` (and `turso_auth_token` for a managed `libsql://` database) in Settings → Knowledge, then restart. A `file:` URL saved there must name a file inside that same data directory, and a URL carrying a NUL byte or another control character, written out or percent-encoded (`%00`), is refused, as is a token carrying one (a pasted line break counts); either way the store answers `SERVICE_UNAVAILABLE` saying why, and the boot goes on.
3839
- **Where the file is**: `os start --home` and `OS_HOME` move it with the default database, so on a container put `OS_HOME` on a volume and the index survives a redeploy. A database named by URL (`OS_DATABASE_URL`) does not move it.
3940
- **Settings → Knowledge** holds only what the service and its store read: `turso_url` and `turso_auth_token`, which `@objectstack/knowledge-turso` adds to the page where it is the store and reads them, with the "Test connection" check of those two fields (on PostgreSQL the page shows none of the three), and `chunk_target`, the longest passage the splitter cuts. The page names no adapter: a source's store is the one its own `adapter` names, and `os knowledge status` reports it per source. Every search re-checks each hit as the asking user, and no setting turns that off. A PostgreSQL deployment that saved the two Turso keys before the group left the page keeps their rows; the settings service never deletes a stored row. To tidy it up, delete the `knowledge` rows named `turso_url` and `turso_auth_token`, and the `sys_secret` row the `turso_auth_token` row's handle names: without the store no API door clears that key, and the row is a decryptable copy of the token. Nothing requires it.
@@ -195,7 +196,7 @@ An adapter that reads the scope filters before it ranks, so the `topK` hits all
195196

196197
## The `search_knowledge` tool
197198

198-
An AI client searches through one tool, `search_knowledge`, defined once by the knowledge service. The MCP door (HTTP and stdio) and the in-product agent serve that one definition unchanged, so every client is offered the same arguments and gets the same answer. It searches only sources whose `aiExposed` is not `false`, and reads as the person asking.
199+
An AI client searches through one tool, `search_knowledge`, defined once by the knowledge service. The MCP door (HTTP and stdio) and the in-product agent serve that one definition unchanged, so every client is offered the same arguments and gets the same answer. It searches only sources whose `aiExposed` is not `false`, and reads as the person asking. Where the knowledge service is held (no embedder or no store, [above](#turning-it-on-requires-knowledge)), the tool is not listed at all; on stdio it is registered after the boot reads the service as enabled, and a connected client is told by `notifications/tools/list_changed`.
199200

200201
| Argument | What it does |
201202
|:--|:--|
@@ -230,7 +231,7 @@ When `KnowledgeServicePlugin` is mounted beside the settings service, Settings
230231
- **A provider is saved and complete** → an `@objectstack/embedder-openai` embedder for that provider. The saved Base URL applies only to the custom and Azure providers; other providers use their preset endpoint. The boot line names the endpoint host. "Complete" is what the **Test embedder** button checks: a provider, an API key (Ollama excepted) and, for a custom or Azure endpoint, a Base URL.
231232
- **Dimensions and batch size are positive integers**, saved as numbers or set as text through an `OS_*` override (`OS_AI_EMBEDDER_DIMENSIONS=256`). A value that is not a positive integer is refused, with a `warn` at boot and the error below on every use — never silently ignored.
232233
- **The batch size is passed only when you saved it.** Left unsaved (the form shows 64), the embedder sends as many inputs per request as the model's documented cap allows — 10 for DashScope `text-embedding-v3`, 2048 for OpenAI `text-embedding-3-*` — and 10 for a model it does not know. A saved batch size is held to the saved model's documented cap (`documentedMaxBatchSize(model)` from `@objectstack/embedder-openai`): a saved 64 on `text-embedding-v3` sends 10. For a model without a documented cap the saved size is sent as saved.
233-
- **Nothing is configured** — no provider saved, `none` saved, or the saved settings incomplete → the server still boots, and every use of the embedder answers an error naming the missing settings: an adapter that embeds refuses indexing and search with it, and nothing is sent anywhere. Nothing is sent to a provider until you have saved one, and the API key is never logged or put in an error.
234+
- **Nothing is configured** — no provider saved, `none` saved, or the saved settings incomplete → the server still boots, and every use of the embedder answers an error naming the missing settings: an adapter that embeds refuses indexing and search with it, and nothing is sent anywhere. Where the runtime mounted the service (`requires: ['knowledge']` or a shipped source), its sources are held instead ([above](#turning-it-on-requires-knowledge)): nothing is built or searched, and `search_knowledge` is not listed. Nothing is sent to a provider until you have saved one, and the API key is never logged or put in an error.
234235

235236
**A saved change takes effect after a restart** — the page says so under the provider field. There is no hot replacement.
236237

‎content/docs/protocol/knowledge.mdx‎

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,18 @@ the knowledge service and the deployment's store, exactly as
188188
in `PLATFORM_CAPABILITY_PROVIDERS`). A host that mounts
189189
`KnowledgeServicePlugin` itself keeps its own, and the runtime adds no store.
190190

191+
**Mounted is not enabled** (ADR-0161 K8, the dated note on item 12). A service
192+
the runtime mounted (`runtimeComposed` on the plugin) reads once, at
193+
`kernel:bootstrapped`, whether an embedder is available and whether the
194+
deployment's store is mounted. Without both, every source is held, whichever
195+
store it names: loaded and listed, never built, synced, reconciled or searched;
196+
no `search_knowledge` definition is handed out; `search`, `rebuildSource` and
197+
`reindexSource` answer `503 SERVICE_UNAVAILABLE` naming the missing half; a
198+
removed source keeps its index, and no store is called. The boot logs one line,
199+
`info` when only a shipped source mounted the service and nothing was saved,
200+
`warn` otherwise, and never refuses to start. A change takes effect at the next
201+
restart. A host-mounted service is not read this way and serves from the start.
202+
191203
#### How a source is loaded
192204

193205
The knowledge service reads the published `knowledge_source` items when it
@@ -1270,7 +1282,9 @@ handled at the source rather than after the fact
12701282
For every object a source projects, the plugin registers an ADR-0057
12711283
**reap guard** with the lifecycle service. The sweep hands the guard the
12721284
candidate rows before deleting them; the guard deletes each row's document and
1273-
returns the ids it confirms. Rows it does not confirm stay put. The guarded
1285+
returns the ids it confirms. Rows it does not confirm stay put. A service the runtime mounted registers
1286+
no guard until the boot reads it as enabled (above): a held service guards
1287+
nothing and calls no store, so the sweep deletes its rows on time. The guarded
12741288
set follows the sources: a source added after boot for an object with no
12751289
guard gets one when it is loaded, so a reaped row of that object is
12761290
de-indexed too.

0 commit comments

Comments
 (0)