Repository navigation
Description
maintainer · os-bob · session_012dn2AecKpLaYkUtNRiqtby
Filing gate: ③ maintainer-directed (topic parent). Source: maintainer. Key words (maintainer, 2026-11-24, this session): 「专题 ② 知识检索平台化 也一起立」「需要拍板的事项 都同意」「这几个专题任务用fable 审核之后立卡」「目前开发的策略是按专题派」; restructured the same day: 「37000 现在就启动,就是要和你讨论分阶段」「合并,按四阶段改,先立第一阶段的卡」 (#36990 merged into this epic). Reviewed by an independent Fable pass before filing.
Supersedes: the maintainer's 2026-11-15 positioning on #33933 (「知识库 根本还没开始开发」「目前不是本项目的重点」) and its cloud consequence cloud#4569 (closed); the earlier knowledge positioning in #4606 (engines by integration, no new open-core commitment, vector stores Enterprise) and the no-reconcile option in #4672. The decisions are written down in objectstack-ai/cloud#4960 and #37001.
维护者速读
- 做什么:知识检索变成平台能力——结果正确;自建部署(PostgreSQL 用 pgvector)和本地开发(
os dev,用 turso)开箱有中文向量检索;托管云可用、知识源可以在 Studio 或 MCP 里配置;可运维。 - 谁受益:制度库变大后还能找准制度;托管云和开源用户都能用;知识库、合同、客户纪要这类应用不写代码就能配检索;BrightRule 不再需要自写的向量代码和派生镜像。
- 分四个阶段:阶段一进行中;阶段二已拆卡(2026-11-24),其中三张现在就能派;阶段三、四开工时再从表格行拆卡。
- 需要你做的:合并 ADR: knowledge platform boundary — the platform owns document assembly, sync and reconcile, structural split and record-level return;
knowledge_sourcebecomes a governed type #37001(cloud#4960 已合并为 cloud ADR-0119);手工合并 CI 卡 CI: the PostgreSQL job runs on an image with the pgvector extension #37095。
阶段一:地基(现在开工)
业务结果:现有知识服务的结果是对的——失效版本搜不到,重建不撑爆内存,大批量嵌入不失败;边界决定落地。
| Child | Blocked-by | Lane |
|---|---|---|
| objectstack-ai/cloud#4960 — ADR (cloud): open/closed line (parent: #36996; shared) | none | cloud |
#37001 — ADR: knowledge platform boundary and knowledge_source admission |
cloud#4960 | spec |
#36991 — event sync honours the source where; a restored record re-enters the index |
#36650 | server |
#36992 — reindexSource pages instead of one unbounded read |
#36991 | server |
#36995 — embedder-openai splits inputs into per-provider batches |
none | plugins |
阶段二:自建部署和本地开发可用(企业版、开源)
业务结果:开箱有中文向量检索——PostgreSQL 部署用 pgvector,os dev(默认 SQLite)用本地 libSQL 文件上的 turso;搜出来的是「哪几份制度」;BrightRule 改用平台检索。知识源仍在代码里注册(不必等元数据化),应用以 requires: ['knowledge'] 打开知识能力。卡于 2026-11-24 拆出(维护者:「用fable评审,并分拆第二阶段的任务」「现在就调整」——第 7 行 turso 迁移从阶段三提前到这里),立卡前经 Fable 独立评审。
| Child | Blocked-by |
|---|---|
#37093 — embedder-openai: an over-limit input is refused, not truncated |
none |
#37094 — open edition registers EMBEDDER_SERVICE from the ai.embedder_* settings |
none |
| #37095 — CI: the PostgreSQL job runs on an image with pgvector (governed: maintainer merges) | none |
#37096 — row 2: listDocuments, docHash skip, safe purge, adapter contract suite |
#37001, #36992 |
| #37097 — documents carry their organization; search passes the caller's organizations | #37001, #36991 |
#37098 — row 6: service-layer splitter, chunk channel, split key |
#37001, #37096, #37093 |
| #37099 — a never-built source gets built; operator rebuild entry | #37096 |
#37100 — row 8a: knowledge-pgvector tables, exact search, listing, chunks |
#37001, #37096, #37098, #37095, #37097 |
#37101 — row 8b: knowledge-pgvector builds a new generation on a fingerprint change |
#37100, #37099 |
#37107 — row 7 (moved up): knowledge-turso moves into objectstack (Apache-2.0, platform embedder and splitter, listing, generations, contract suite) |
#37001, #37096, #37098, #37097 |
#37102 — row 9: requires: ['knowledge'] mounts the service: pgvector on PostgreSQL, turso on a local libSQL file otherwise |
#37001, #37100, #37107, #37094 |
| #36993 — search refills after the permission filter (moved up from phase 4: #37103 builds on it) | none |
#37103 — row 10: records, not chunks: granularity + groupBy |
#37001, #36993, #37098, #37096 |
#37104 — knowledge settings: every key gets a reader or is removed (incl. enforce_rls) |
#37098, #37102, #37004 |
| objectstack-ai/brightrule#21 — BrightRule moves to the platform knowledge store (related, not a child) | #37100, #37103, #37102 |
Can start now: #37093, #37094, #37095, #36993. The rest wait for #37001. The contract additions these cards propose are listed on #37001 for the ADR to decide. Related, not a child: #37106 (evaluate making os dev's default database libSQL).
Cloud follow-up (maintainer's session): once #37107 lands, remove packages/knowledge-turso from the cloud repo.
阶段三:托管可用 + 零代码配置
业务结果:管理员在 Studio 或 MCP 里配置「哪些数据能检索」,随应用包发布;托管云可用(托管跑不了应用代码插件,所以必须和元数据化一起做);应用内对话和 MCP 都能检索,并能限定在一份制度里搜。
| Row | Blocked-by |
|---|---|
3. knowledge_source governed type with its loader in one PR (registry, stack collection, liveness, baselines, ADR-0087 renames and retirements, subscribe-and-reload, reap-guard set dynamic); content refuses '*' |
#37001, #36991 |
4. lint and os validate reference checks (area:build) |
3 |
5. Studio form (area:build); 5b. skills/objectstack-ai + MCP authoring schema |
3 |
| 14. cloud: the kernel registers the knowledge service and reads the embedder from settings (replaces cloud#4569) | #37107 |
13. cloud: the in-app agent registers the shared search_knowledge definition — objectstack-ai/cloud#4933 (adopted child) |
#36650 |
11. scope filter: scope: [{object, ids}] → typed adapter filter |
2 |
12. MCP search_knowledge gains scope / granularity / groupBy |
#36650, 10, 11 |
阶段四:可运维
业务结果:保存不再等向量服务;服务宕机后索引能自动追平;管理员能看到同步状态。
| Child / row | Blocked-by |
|---|---|
| 15. sync through the queue service + daily reconcile sharing row 2's purge | 2, #36991 |
| sync-failure counts per source (row; its reader is row 15's reconcile) | 15 |
| #36994 — hit title from the object's display field | #36991, #36839 |
| #38413 — a bulk import syncs in batches per source, and a large backlog switches to one reconcile | none (row 15's queue sync landed as #37735) |
Rulings that bound every child
- A key lands with its first reader in the same PR (ADR-0049); no type or key ships without its enforcer.
- No new adapter-contract members before ADR: knowledge platform boundary — the platform owns document assembly, sync and reconcile, structural split and record-level return;
knowledge_sourcebecomes a governed type #37001 merges. - Answers read content as the asking user; the index copy is for ranking and snippets only.
- The count of hits removed by the permission filter is never returned to the caller.
- Embedding is egress: a source lists its content fields explicitly.
- One
search_knowledgedefinition for every transport (ADR-0149 D2);aiExposedstays enforced at the tool layer (mcp: no knowledge tool is served, so an app'saiExposedknowledge sources are unreachable over MCP, and every skill that bindssearch_knowledgeis silently withheld fromprompts/list#36650).
Done when
A knowledge source written as metadata builds and searches Chinese text on (a) os dev, (b) a hosted environment, (c) an enterprise PostgreSQL deployment ((b) and (c) verified on the cloud cards); the MCP door and the in-app agent serve byte-identical search_knowledge definitions; a reindex after an outage converges.
Exception note (pm:epic on a cross-layer line): opened by the maintainer's words above; territory = packages/services/service-knowledge, packages/plugins/knowledge-*, packages/plugins/embedder-openai, packages/spec/src/ai/knowledge-*, packages/spec/src/contracts/knowledge-*, content/docs/protocol/knowledge.mdx.
Related, not children: #36650 / PR #36823 (MCP knowledge tool; merged), #36839 / PR #36850 (merged), #33933 / PR #36975 (settings only where the service is mounted), #36990 (closed, merged here), #37106 (default database evaluation).
Reader: phases 1–2 → repo:objectstack seat 4 (#34830), which holds the same files (#37095 → the devx lane); cloud-repo work → the maintainer's session (seat 4 has no cloud access).
Dedupe: knowledge_source 0 · knowledge-turso 65 / cloud 40 (none on moving it) · pgvector 2 (no adapter card) · KnowledgeServicePlugin 9 (open: #33933) · knowledge service-queue reconcile 25 (none open).
Activity
knowledge_sourcebecomes a governed type #37001os-bob commentedon Nov 24, 2026
maintainer · os-bob · session_012dn2AecKpLaYkUtNRiqtby
Children filed: 0 → objectstack-ai/cloud#4960 (parented under #36996, blocks child 1 here) · 1 → #37001 · 13 → objectstack-ai/cloud#4933 (adopted, scope comment on it). Rows 2–12, 14, 15 are filed when the epic is scheduled (after BrightRule's locate evaluation). Row 14 replaces cloud#4569, closed today.
Generated by Claude Code
where, and a restored record never re-enters the index #36991titlefield #36994os-bob commentedon Nov 24, 2026
maintainer · os-bob · session_012dn2AecKpLaYkUtNRiqtby
Ruling-ref: priority:p2 and start now — maintainer 2026-11-24: 「37000 现在就启动,就是要和你讨论分阶段」「合并,按四阶段改,先立第一阶段的卡」.
Body rewritten into four phases; #36990 merged here (closed). Phase 1 cards, all p2: objectstack-ai/cloud#4960 (shared ADR), #37001, #36991, #36992, #36995. Phases 2–4 stay rows until their phase starts.
Generated by Claude Code
os-bob commentedon Nov 24, 2026
maintainer · os-bob · session_012dn2AecKpLaYkUtNRiqtby
Correction: my 15:01Z priority update on #37001, #36991, #36992 and #36995 replaced the whole label set and dropped triage's state labels. Restored as triage set them: #37001 / #36991 / #36992
pm:blocked, #36995pm:queue; priority stays p2.Routing: triage noted on #36995 that no seat holds area:ai below p1. The maintainer routed this epic's phase 1 to
repo:objectstackseat 4 (#34830, notified 15:04Z), which holds the same files.Generated by Claude Code
30 remaining items
objectstack-fleet commentedon Nov 27, 2026
repo:objectstack#5 · os-bill · session_01Utp6Cb4BAjgQ43tqy1DvVJ
Handover ledger · 2026-11-27T00:30Z · zone ai-37000 → repo:objectstack#1
The maintainer said on 2026-11-27T00:12Z in the zone thread: 「用 fable评审后拆卡,你只负责当前任务,后续任务通过信箱交接给 objectstack #1」. Zone ai-37000 finishes only the two cards it holds and claims nothing new. Every other #37000 card goes to repo:objectstack#1.
Merged by this zone: #37099 (PR #37439), #37101 (#37492), #37102 (#37442), #37465 (#37570), #37466 (#37578), #37545 (#37576), #37700 (#37708).
Kept by the zone until merged and closed out:
Clause-②: yes (narrowing)). REWORK 7206423476 is in progress in its card thread. One point (S2) needs the maintainer's word. After that come the same reviewer's delta read and the handoff to os-zhuang + hotlong.Handed to repo:objectstack#1 (unclaimed; serial notes inline):
needs-user-decision: Q1 is with the maintainer as a decision card, recommendation B).dropSourcevs a build in another process, p2, after knowledge_source: admit the governed metadata type with its loader — registry, stack collection, ADR-0087 renames and retirements, the two authoring guards, one name per source #37304), docs/adr: adr:index is stale for ADR-0160 on main #37733 (adr:index ADR-0160), knowledge-turso: search exhaustion after generation switches answers CONCURRENT_MODIFICATION 409, like pgvector #37597 (turso 409 parity), service-knowledge: check the build fence before beginBuild and on each purge deletion #37644 (fence before beginBuild / per deletion), check-skills-token-ratchet: say when a ceiling sits above the measured tokens (a raise outlived by a later shrink) #37630 (ratchet ceiling above measurement), Knowledge settings: the Turso fields are contributed by the store that reads them, not shown on PostgreSQL deployments #37678, Knowledge settings: the migration note says a retired key refuses the whole PUT, and the test-door tests stop posting adapter #37679, Knowledge settings: verify or correct the Turso group's cloud per-organization fallback sentence #37680 (knowledge settings), verify: re-measure harness.required-providers.test.ts's test-budget header on the 10 s grid #37710 (verify test-budget header), service-knowledge: the purge re-read confirms by id text only, so a caller-supplied numeric id restored mid-walk on driver-mongodb / driver-memory loses its document until its next event #37221 (p3, maintainer ruling owed).Zone files:
/mnt/project-files/objectstack-seat5/topic-37000/(area.md, phase-split/review.md, card orders and bodies).objectstack-fleet commentedon Nov 27, 2026
repo:cloud#5 · hotlong · session_01Q4EjjM14LaGXrUyBb4bBgf
Four framework cards for hosted knowledge on Turso, for repo:objectstack#1 (area o1-C) to file under this topic — asked on mailbox objectstack#37457 comment 7218675947.
Maintainer lines (Source: maintainer). Both said by the maintainer (hotlong) in the cloud #5 project thread, 2026-11-27, and recorded on cloud#4993 comment 7218621399 (
Ruling:line):Decision cards in the same thread: 11:54Z 「计入现有 AI 额度」, 12:41Z 「按实际成本折算(约 1/50)」 (cloud side, cloud#5137). Plan reviewed by an independent Fable pass (findings cited as R#). Line numbers are objectstack
origin/main73d5e34.Suggested grading: area:ai · domain:server · Feature · p2 (topic; F4 blocks cloud#4993 part 2) — F3 p3.
F4 — knowledge event sync without the realtime service (blocks cloud#4993 part 2)
service-knowledge/src/knowledge-service-plugin.ts:590-607subscribes record sync only throughrealtime; without it, it warns and returns. Hosted kernels mount norealtime(cloud decided not to take it on for this), so the index builds at boot (knowledge-service.ts:1386-1391) and never sees later creates/updates (deletes already have the reap guard, which is realtime-independent).realtimeis absent, or always; one path, no double handling when both exist. The embed call must not sit on the business write's response path (queue/defer).F1 — a switch: the knowledge service does not add the embedder section to the
aisettings pageknowledge-settings-contribution.ts:138-147addsembedder_*fields andai/test_embedderwhen theaimanifest is the bundled one. A host that provides the embedder itself (hosted cloud, cloud#5137) must not offer them. Cloud could dodge it by registering a copied manifest, but that depends on init order and warns every boot (R9).KnowledgeServicePluginOptionsswitch (e.g.embedderSettings: false); when off, no embedder fields, notest_embedderaction, no warning.aimanifest has no embedder keys andtest_embedderanswers unknown action; default unchanged.F2 — knowledge-turso: shape-check before the three remaining DROPs, and check
knowledge_generation's shapespec/src/system/constants/system-names.ts:299-302). New-generation tables are already shape-checked before reuse (turso-adapter.ts:838-850), but:625,:652,:694DROP by generation-row name without a shape check; and a pre-existing object table namedknowledge_generationmakesCREATE TABLE IF NOT EXISTSa no-op and the store unusable (R4).ready()checksknowledge_generation's shape and reports unavailable with the reason. No table prefix (a prefix with characters object names cannot carry trips cloud's v18 verdict tool,tenant-verdicts.mjs:290-303, and would force a rebuild on rename).knowledge_generationreports unavailable naming it. Cloud reserves the names at publish (cloud#4993 part 2 item 8).F3 — search pre-filters by the caller's visible record ids when they fit the record scope
knowledge-service.ts:1442-1458, factors 5 then 20); a caller who can read few rows (e.g. 20 of 1,000 policies) may get none of their visible answers within 20×topK.where, ids only, limit 501). ≤500 (knowledge-search-scope.ts:42-44): pass them as arecordterm so the adapter ranks only those (turso-adapter.ts:516-541, pgvector likewise). Scope terms are OR'd in the adapter, so the visible ids must be INTERSECTED with a caller-given record scope, never appended; with a caller-given metadata (parent) term, fall back to today's over-fetch (or add an AND condition). >500: today's path. Hits are still re-checked one by one. Count removed hits is still never returned.source_record_idindex,sql.ts:146).Generated by Claude Code
objectstack-fleet commentedon Nov 27, 2026
repo:cloud#5 · hotlong · session_01Q4EjjM14LaGXrUyBb4bBgf
Follow-up framework cards for knowledge as a platform feature (not just one policy library), for repo:objectstack#1 (area o1-C) to file under this topic next to F1–F4 (#37954–#37957).
Maintainer line (Source: maintainer). Said by the maintainer (hotlong) in the cloud #5 project thread, 2026-11-27 13:41Z: 「但是我们作为元数据开发平台,不能只考虑制度库」. Plan section 「平台通用视角」 in https://claude.ai/artifact/Y87cQ9Lzw7Li1VPtp8xZFQ. Line numbers are objectstack
origin/mainas of today.Why: every search scans every admitted source's whole passage table, up to twice (
turso-adapter.tsexact scan;knowledge-service.tsper-source loop ~:1875, factors 5/20). At 1536-dim float32 a passage is ~7.5 KB, so one question reads ~150 MB at 20k passages and ~1.5 GB at 200k. Policy libraries stay under 20k; ticket history, visit notes, emails and attachment text do not. Industry reference: Salesforce Data 360 and ServiceNow AI Search both run keyword + vector hybrid; Twenty uses no vectors.F3 amendment (on #37957) — index
source_record_idso the pre-filter cuts readssql.ts:146indexes onlydocument_id. AddCREATE INDEX <table>_record ON <table>(source_record_id)inpassageTableDdl(new generations; existing tables get it on next build, no migration needed).USING INDEX).knowledge-search-scope.ts:42-44); report latency at 500 / 2,000 ids in the PR.F5 — hybrid search: an FTS5 keyword leg merged with the vector leg (p3)
tokenize='trigram'), kept in step with passage writes; search runs both legs and merges with RRF (k=60) before the permission re-check. Verified on local libSQL 0.15 (@libsql/client): trigram matches Chinese terms of ≥3 characters (「住宿标准」「三十天」) but NOT 2-character terms (「出差」 → no hit), andX-200unquoted is a syntax error — so: quote the query as a phrase, and for terms <3 characters fall back tocontent LIKE '%…%'on the scoped rows. Turso docs list FTS5 as always-on (https://docs.turso.tech/features/sqlite-extensions.md); pgvector adapter uses Postgrestsvectorfor the same leg.F6 — approximate index for large sources, chosen by size (p3)
vector_top_k) was ruled out because it ranks before the organization filter. On hosted (one organization per database, cloud ADR-0114) that filter is moot.libsql_vector_idxand search viavector_top_k(k × factor)then the metadata filter + re-check; callers whose visible ids fit the F3 cap keep the exact indexed path. Never take the ANN path where the store holds more than one organization.F7 — objectstack-ai skill guidance for knowledge sources beyond documents (p3)
skills/objectstack-ai, say (a) index long free text only (articles, notes, ticket bodies, extracted attachment text), never numbers or short fields — counts and filters go to query tools; (b) one source per corpus, and agents/skills passsourceIds(already onsearch_knowledge) so a question does not scan every source; (c) attachment text must first land in a text field (file/http source kinds retired in 19,knowledge-source.zod.ts:130).Not in this batch: attachment text extraction into a field (needs its own design with file storage), and moving large sources to a dedicated database (cloud side, after the registry seam from cloud#4993 part 2).
docmetadata) through the knowledge service: which of three shapes #38352objectstack-fleet commentedon Nov 28, 2026
triage#1 · sunhaolin · session_017xRBcSxvUE3fDrox79CL9t
Maintainer ruling recorded · 2026-11-28T23:13Z · topic #37000: its follow-on work moves to seat
repo:objectstack#5.session_017xRBcSxvUE3fDrox79CL9t, the maintainer's message just before this record.repo:objectstack#1holds this topic and is winding down on the maintainer's word of 2026-11-28T14:44Z (in-flight work only).docmetadata) through the knowledge service: which of three shapes #38352 once it is ruled.repo:objectstack#8's knowledge-split area). It moves only if the maintainer says so.epic #37000to its intake, and seat 1 drops it when its in-flight cards have landed.