Repository navigation
制度条款检索改为仅向量;升级到 ObjectStack 19.0.0-next.3 - #96
Merged
Merged
Conversation
- 制度条款知识源声明 retrieval.mode: 'vector':search_knowledge 只按语义排序, 不再用存储的默认(pgvector / Turso 上是 hybrid)。这个设置每次检索时读取, 改它不重建索引(objectstack#38720,19.0.0-next.3 起支持) - @objectstack/* 依赖 19.0.0-next.2 → 19.0.0-next.3;Dockerfile 运行时镜像和 objectos-ee 部署说明里的镜像版本一并改;按 AGENTS.md 重新同步 .claude/skills - next.3 退役了 ask_ai 动作类型(ADR-0160 D7),所以删掉「问这份制度」动作: 记录页页头平台自带的「问 AI」会钉住当前制度,资料包 brightrule_policy_reading 照旧生效;制度库列表每行不再有单独的问询入口。首页副标题、技能、注释和评测 驱动里的说法改为「问 AI」;docs/policy-admin.md 注明 ask_ai 这条路已不存在 validate / typecheck / build 通过;test 150/151,唯一失败的 policy-inquiry-length 是已有问题(改前 5678 字符,超出测试留的 5600 余量, 仍低于平台 6000 上限),本次没有加长技能文本。 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RKKVnkdZJjt7M8zRD7b5Ky
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
问题
制度条款知识源没有声明检索模式,用的是存储的默认值:pgvector 和 Turso 上都是混合检索(关键词 + 向量)。现在要改成只用向量检索。
source.retrieval.mode这个设置是 objectstack#38720 加的,19.0.0-next.3 才发布;在 next.2 上写这个设置,validate会报Unrecognized key(s) ... retrieval。改动
src/knowledge/policy-clause.knowledge-source.ts加了retrieval: { mode: 'vector' },search_knowledge只按语义排序。这个设置每次检索时读取,改它不会重建索引。如果存储不支持这个模式,平台会拒绝这个知识源,不会悄悄换成别的检索方式。@objectstack/*依赖从 next.2 升到 next.3,Dockerfile运行时镜像和 objectos-ee 部署说明里的镜像版本一起改了;按 AGENTS.md 重新同步了.claude/skills。ask_ai动作类型(ADR-0160 D7),不删的话validate和typecheck都过不了。brightrule_policy_reading照旧生效。docs/policy-admin.md注明ask_ai这条路已经没有了。验证
pnpm run validate、pnpm run typecheck、pnpm run build都通过;构建出的dist/objectstack.json里,policy_clause的source.retrieval是{"mode":"vector"}。pnpm test151 个过了 150 个。没过的是policy-inquiry-length:技能文本 5677 个字符,超过了测试自己留的 5600 余量。改动前就是 5678,本来就没过,这次没有加长;平台的硬上限是 6000,目前仍能正常加载。上线
ghcr.io/objectstack-ai/objectstack:19.0.0-next.3已经发布。ghcr.io/objectstack-ai/objectos-ee:19.0.0-next.3已经发布。os deploy到目标环境,新的检索模式才生效。Generated by Claude Code