Repository navigation
Description
maintainer · os-bob · session_012dn2AecKpLaYkUtNRiqtby
Filing gate: ③ maintainer-directed (topic child). Source: topic #37000 (phase 2 row 9); keeps #33933 / #36975's shape (nothing appears where nothing is mounted); maintainer 2026-11-24 「用fable评审,并分拆第二阶段的任务」 and 「现在就调整」 (turso joins phase 2). Reviewed by an independent Fable pass before filing.
Grading: area:ai · Feature · p2 (topic) · reach: open deployments that want knowledge search · evidence: read.
维护者速读
- 做什么:应用在
requires里写上knowledge,开源运行时就自动挂上知识服务和对应的向量存储:- 数据库是 PostgreSQL → 挂 pgvector;
- 其他数据库(
os dev默认的 SQLite、libSQL)→ 挂 turso,存在本地一个 libSQL 文件里。
- 没写
knowledge的部署和现在一样,什么都不出现。 - 限制:这一阶段知识源仍写在应用代码里。
- 谁受益:本地开发和自建部署都不用再自己写挂载代码,开箱就有中文向量检索。
- 需要你做的:无。
What
- A new capability token
knowledgeinPLATFORM_CAPABILITY_TOKENS/PLATFORM_CAPABILITY_PROVIDERS(packages/spec/src/kernel/platform-capabilities.ts) andCAPABILITY_PROVIDERS(packages/core/src/capability-providers.ts), read bypackages/cli/src/commands/serve.tsand@objectstack/verify's boot in this PR. The trigger becomes "aknowledge_sourceexists" in row 3. - With the token, mount
KnowledgeServicePluginand one store:- platform database PostgreSQL →
knowledge-pgvector(adapter idpgvector); - any other database (SQLite in
os dev, libSQL) →knowledge-turso(adapter idturso) on a local libSQL file, by default beside the dev database under.objectstack/data/(name the file in the PR), configurable.
A source names its adapter as today (adapterstays required; making it optional is ADR: knowledge platform boundary — the platform owns document assembly, sync and reconcile, structural split and record-level return;knowledge_sourcebecomes a governed type #37001 / row 3).
- platform database PostgreSQL →
- A source whose named adapter is not mounted: the service mounts; indexing and search of that source answer an error naming the choices; the boot log says so once at error. Boot does not fail.
knowledge-memoryis never mounted by the runtime. - A host that already mounts
com.objectstack.service.knowledgeinpluginskeeps its own (Serve.providesCapability); the runtime adds no second one. Apps mountingKnowledgeServicePlugin+knowledge-memoryby hand are unaffected. - The embedder comes from Open edition: register EMBEDDER_SERVICE from the ai.embedder_* settings when the knowledge service is mounted #37094.
- Docs:
content/docs/ai/knowledge-rag.mdx(how to turn it on, what is picked, where the local file lives, what to configure). Theskills/objectstack-aiupdate rides row 5b (governed surface, not in this PR).
Acceptance
- No token: no knowledge service, no knowledge settings page (regression on fix(settings)!: offer the knowledge settings only where the knowledge service is mounted #36975).
- Token on PostgreSQL (CI image from CI: the PostgreSQL job runs on an image with the pgvector extension #37095): pgvector mounted, a record write is indexed,
search_knowledgeover MCP finds it. - Token on SQLite (
os devshape): turso mounted on the local file, a record write is indexed and found. - A source naming an adapter that is not mounted: boot succeeds, search answers the error.
- A host mounting the service by hand (BrightRule's shape): behaviour unchanged.
- Container run per AGENTS.md.
Out of scope
- Metadata-declared sources and an optional
adapter(row 3). - Changing
os dev's default database (Evaluate: canos dev's default database move from SQLite (better-sqlite3) to a local libSQL file (driver-turso)? #37106). - Hosted kernel registration (row 14, phase 3).
Blocked-by: #37001 (token in its list), #37100, #37107, #37094.
Parent: #37000. Reader: domain:server lane (packages/core, packages/cli, packages/verify; spec edits per spec.md).
Dedupe: requires knowledge capability 107 (open 6: none adds a knowledge token) · KnowledgeServicePlugin 9 (open: none; #33933 closed).
Activity
objectstack-fleet commentedon Nov 24, 2026
triage#1 · os-warren · session_01JQwxbZKP5YM48rWMWTS7wE
Triage: first touch 2026-11-24T20:37Z
pm:blockedanddomain:serveradded. The card has no state yet, and itsBlocked-by:cards (ADR: knowledge platform boundary — the platform owns document assembly, sync and reconcile, structural split and record-level return;knowledge_sourcebecomes a governed type #37001, knowledge-pgvector: an open vector store on PostgreSQL — tables, exact search, listing, chunks #37100, knowledge-turso moves into objectstack: Apache-2.0, the platform embedder and splitter, listing, generations, the contract suite #37107, Open edition: register EMBEDDER_SERVICE from the ai.embedder_* settings when the knowledge service is mounted #37094) are still open.knowledge_sourcebecomes a governed type #37001). Triage's unlock scan moves the card when every blocker closes.