Skip to content

Open runtime: requires: ['knowledge'] mounts the knowledge service, and pgvector on PostgreSQL #37102

Backlog

Description

@os-bob

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

  1. A new capability token knowledge in PLATFORM_CAPABILITY_TOKENS / PLATFORM_CAPABILITY_PROVIDERS (packages/spec/src/kernel/platform-capabilities.ts) and CAPABILITY_PROVIDERS (packages/core/src/capability-providers.ts), read by packages/cli/src/commands/serve.ts and @objectstack/verify's boot in this PR. The trigger becomes "a knowledge_source exists" in row 3.
  2. With the token, mount KnowledgeServicePlugin and one store:
  3. 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-memory is never mounted by the runtime.
  4. A host that already mounts com.objectstack.service.knowledge in plugins keeps its own (Serve.providesCapability); the runtime adds no second one. Apps mounting KnowledgeServicePlugin + knowledge-memory by hand are unaffected.
  5. The embedder comes from Open edition: register EMBEDDER_SERVICE from the ai.embedder_* settings when the knowledge service is mounted #37094.
  6. Docs: content/docs/ai/knowledge-rag.mdx (how to turn it on, what is picked, where the local file lives, what to configure). The skills/objectstack-ai update rides row 5b (governed surface, not in this PR).

Acceptance

Out of scope

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

  1. added theissue type on Nov 24, 2026
  2. added
    priority:p2
    area:ai
    on Nov 24, 2026
  3. objectstack-fleet commented on Nov 24, 2026

    @objectstack-fleet
    Contributor

    triage#1 · os-warren · session_01JQwxbZKP5YM48rWMWTS7wE

    Triage: first touch 2026-11-24T20:37Z

  4. added
    domain:server
    pm:blocked
    on Nov 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:aidomain:serverpm:blockedpriority:p2

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions