You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 9d419f7
Browse filesBrowse the repository at this point in the historyBrowse files
revert(objectql): split item 4 (the first knowledge_source saved with no service) to its own card
The save-time warn, the reworded boot line and their tests leave this
change; row 3a's boot line and behaviour are main's again. The full state
is kept on claude/area-o1C-37306-item4 (fa2b538).
Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016WV4cwPhGV4g9p1BGQaZbP
Copy file name to clipboardExpand all lines: .changeset/37306-knowledge-source-adapter-optional.md
+1-3Lines changed: 1 addition & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,6 @@
4
4
'@objectstack/service-knowledge': minor
5
5
'@objectstack/cli': minor
6
6
'@objectstack/verify': minor
7
-
'@objectstack/objectql': minor
8
7
---
9
8
10
9
feat(knowledge): a knowledge source needs no `adapter` and no `requires: ['knowledge']` — it binds to the deployment's store, and shipping one mounts the service
@@ -19,8 +18,7 @@ A `knowledge_source` may leave out `adapter` (ADR-0161 K4), and a stack that shi
19
18
-**`@objectstack/core`.**`stackItemCapabilities(stack)` answers the tokens a stack's items mount (top level, then each package body), and `resolveServedCapabilities` takes them as `itemTokens`: appended after the declared tokens, read as declared (a provider that cannot be built fails the boot as for `requires`), and reported in a new `byItems` set. `resolveCapabilityArgument('knowledge', …)` now answers `{ deploymentAdapter }`, the adapter id of the store `resolveCapabilityExtras` mounts for the same database.
20
19
-**`@objectstack/cli` and `@objectstack/verify`.**`os serve` / `os dev` / `os start` and `bootStack` read the item tokens, and hand the knowledge service the deployment's store (`pgvector` on PostgreSQL, `turso` otherwise).
21
20
-**`@objectstack/service-knowledge`.**`KnowledgeServicePlugin` and `KnowledgeService` take a `deploymentAdapter` option: the runtime's mark of the store it mounted. It is a service option, not an adapter-contract member, and `registerAdapter` is unchanged: an adapter application code registers is never the deployment's by registering. A source that names no adapter is placed where it is used (`adapterIdFor`, `adapterFor`), so one registered in code before its store started finds it. With several adapters registered and none the deployment's, such a source is refused at registration (both doors) and at its save, `400 VALIDATION_ERROR`, naming the adapters; registered first and left unplaceable by adapters that came later, it answers the same refusal at index and search, and the boot names it once at `error`. With no adapter registered it answers `503 SERVICE_UNAVAILABLE`, naming the deployment's store when one was marked. The `index_status` action reports the adapter a source is placed on.
22
-
-**`@objectstack/objectql`.** The first `knowledge_source` saved at run time on a deployment that mounted no knowledge service is kept and not served: no service is mounted while the process runs, and the boot composes its services before it reads the metadata store. Its save is now said once at `warn`, naming the fix (`requires: ['knowledge']`, then a restart), and the boot line for such items names the same fix.
23
21
24
-
Unchanged: a source that names an adapter that is not mounted answers `SERVICE_UNAVAILABLE` as before; a host that mounts `KnowledgeServicePlugin` itself keeps its own, gets no store from the runtime and no deployment's mark; without a source or the token nothing is mounted.
22
+
Unchanged: a source that names an adapter that is not mounted answers `SERVICE_UNAVAILABLE` as before; a host that mounts `KnowledgeServicePlugin` itself keeps its own, gets no store from the runtime and no deployment's mark; without a source or the token nothing is mounted; an item saved at run time on a deployment that mounted no knowledge service is reported at boot exactly as before.
25
23
26
24
What to do: nothing. A source that names `adapter: 'turso'` or `adapter: 'pgvector'` keeps working; drop the key to let the deployment choose, and drop `knowledge` from `requires` in an app that ships its sources.
Copy file name to clipboardExpand all lines: content/docs/ai/knowledge-rag.mdx
-1Lines changed: 0 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -40,7 +40,6 @@ Which store is mounted depends on the platform database:
40
40
-**More than one replica** on MySQL, MongoDB or a remote libSQL database: each replica keeps its own local `knowledge.db` and indexes only the record writes that replica itself handles, so replicas answer from indexes that differ. Give them one store: save a shared `libsql://` URL in `turso_url`, or run on PostgreSQL, where the vectors live in the one database.
41
41
-**An install without the libSQL client**: `@objectstack/knowledge-turso` is an optional dependency of the CLI, because its client is a native module. Where it could not be installed the server warns at boot that the store was not mounted, and sources naming `turso` answer `SERVICE_UNAVAILABLE`.
42
42
-**Without a source or the token** nothing is mounted: no knowledge service, no store and no Knowledge settings page. `knowledge-memory` is never mounted for you.
43
-
-**The first source saved at run time on a deployment with neither** (in Studio, the metadata API or MCP) is kept and not served: the service is mounted when the server starts, never while it runs, and it is the app's own sources that mount it. The save is logged once at `warn`, and every boot after says it again, naming the fix: add `requires: ['knowledge']` and restart — the next boot loads and builds the source.
44
43
-**Mounting it yourself** still works: an app whose `plugins` already hold `KnowledgeServicePlugin` keeps its own, and the runtime adds neither a second service nor a store.
0 commit comments