@dsh-cc/tool-search 0.9.5 → 0.9.6-rc.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.i18n.yaml CHANGED
@@ -2,5 +2,5 @@
2
2
  # side as of the last confirmed-consistent state. Both languages carry equal authority;
3
3
  # after editing either side, bring the other along and re-record with:
4
4
  # pnpm check:readme --write
5
- README.md: 21c0e7ff49ced4e2f7b0591ad675ff989645ba32
6
- README.zh.md: ecb6df7986ef29d5f3e1b44fa28b3dafbb5b1f92
5
+ README.md: e9e36a218de50aa4a4a79852f19d682063f30339
6
+ README.zh.md: 8a845eb9b26025a8c60cffe2933df6dd63fa5bcd
package/README.md CHANGED
@@ -35,7 +35,7 @@ The design rides the repo's effect conventions:
35
35
 
36
36
  ## Semantic tool discovery (S1-05)
37
37
 
38
- Lexical ranking cannot see a query that shares no literal token with a tool's metadata — a Chinese question against English metadata, or a paraphrase of the same request. The optional discovery layer puts an independent relevance judgment in front of the existing activation path: every admitted deferred candidate is scored against the query through the System One decision runtime (the optional `ctx.systemoneDecisions` service that the `decision-usage` plugin provides), and only candidates whose judged relevance **and** direct fit both clear their thresholds become activations. Tool names, schemas, and return messages still come from deterministic code; the model answers only "is this candidate relevant", with one question pair per candidate, so one candidate's metadata cannot contaminate another's judgment.
38
+ Lexical ranking cannot see a query that shares no literal token with a tool's metadata — a Chinese question against English metadata, or a paraphrase of the same request. The optional discovery layer puts an independent relevance judgment in front of the existing activation path: every admitted deferred candidate is scored against the query through the System One decision runtime (the optional `ctx.systemoneDecisions` service that the `decision-usage` plugin provides, or the root-realm bridge `ccSystemoneDecisions` that `@dsh-cc/decision-usage` publishes for consumers mounted outside the decision group), and only candidates whose judged relevance **and** direct fit both clear their thresholds become activations. Tool names, schemas, and return messages still come from deterministic code; the model answers only "is this candidate relevant", with one question pair per candidate, so one candidate's metadata cannot contaminate another's judgment.
39
39
 
40
40
  The layer is **off by default** and never rewrites the lexical path on its own:
41
41
 
@@ -79,6 +79,8 @@ The `judge-stub` thresholds are pre-registered in the design doc (§ Scoring) an
79
79
 
80
80
  **Splits.** `--split tune|held-out|full` (default `tune`). Ordering the cases by the hash of their id cuts the corpus 2/3 tune / 1/3 held-out; only `tune` is ever gated, `held-out` is reserved for the one-time flip evaluation, and `full` is for inspection.
81
81
 
82
+ **Corpus.** `--corpus <path>` points the evaluator at another local corpus file; the default is `packages/core/tool-search/tests/fixtures/discovery-corpus.json`, and an unreadable file fails with exit status 2.
83
+
82
84
  Run either way:
83
85
 
84
86
  ```bash
package/README.zh.md CHANGED
@@ -34,7 +34,7 @@ ctx.toolSearch.registerDeferred({
34
34
 
35
35
  ## 语义工具发现(S1-05)
36
36
 
37
- 词法排序看不见与工具元数据不共享任何字面词元的查询——中文问题对上英文元数据,或同一个请求换一种说法。可选的发现层在既有激活路径前加一次独立的相关性判断:每个已准入的延迟候选都通过 System One 决策运行时针对查询打分(该运行时即 `decision-usage` 插件提供的可选 `ctx.systemoneDecisions` 服务),只有相关性判断**与**直接匹配度都越过阈值的候选才会成为激活项。工具名、schema 与返回消息仍由确定性代码产生;模型只回答"这个候选是否相关",每个候选一对问题,因此一个候选的元数据不会污染另一个的判断。
37
+ 词法排序看不见与工具元数据不共享任何字面词元的查询——中文问题对上英文元数据,或同一个请求换一种说法。可选的发现层在既有激活路径前加一次独立的相关性判断:每个已准入的延迟候选都通过 System One 决策运行时针对查询打分(该运行时即 `decision-usage` 插件提供的可选 `ctx.systemoneDecisions` 服务,或在决策组之外挂载时由 `@dsh-cc/decision-usage` 发布的 root realm 桥 `ccSystemoneDecisions`),只有相关性判断**与**直接匹配度都越过阈值的候选才会成为激活项。工具名、schema 与返回消息仍由确定性代码产生;模型只回答"这个候选是否相关",每个候选一对问题,因此一个候选的元数据不会污染另一个的判断。
38
38
 
39
39
  该层**默认关闭**,且绝不会自行改写词法路径:
40
40
 
@@ -78,6 +78,8 @@ ctx.toolSearch.registerDeferred({
78
78
 
79
79
  **划分。** `--split tune|held-out|full`(默认 `tune`)。按用例 id 的哈希排序把语料切成 2/3 tune、1/3 held-out;只有 `tune` 会被门控,`held-out` 留给一次性的翻转评估,`full` 用于检视。
80
80
 
81
+ **语料。** `--corpus <path>` 让评估器改用另一个本地语料文件;默认值为 `packages/core/tool-search/tests/fixtures/discovery-corpus.json`,文件不可读时以状态码 2 失败退出。
82
+
81
83
  两种运行方式:
82
84
 
83
85
  ```bash
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@dsh-cc/tool-search",
3
3
  "description": "Deferred tool registration and a ToolSearch model tool that loads heavy tools on demand",
4
- "version": "0.9.5",
4
+ "version": "0.9.6-rc.2",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "git+https://github.com/dsh-cc/dsh-cc.git",
@@ -25,12 +25,12 @@
25
25
  "@deepseek-ai/dsh-scope": ">=0.2.2-rc.1",
26
26
  "@deepseek-ai/dsh-system-prompt": ">=0.2.2-rc.1",
27
27
  "@deepseek-ai/schemastery": "^3.18.1",
28
- "@dsh-cc/settings": "^0.9.5",
29
- "@dsh-cc/tools": "^0.9.5"
28
+ "@dsh-cc/settings": "^0.9.6-rc.2",
29
+ "@dsh-cc/tools": "^0.9.6-rc.2"
30
30
  },
31
31
  "dependencies": {
32
- "@dsh-cc/settings": "^0.9.5",
33
- "@dsh-cc/systemone": "^0.9.5"
32
+ "@dsh-cc/settings": "^0.9.6-rc.2",
33
+ "@dsh-cc/systemone": "^0.9.6-rc.2"
34
34
  },
35
35
  "devDependencies": {
36
36
  "@deepseek-ai/cordis": "link:../../../../deepseek-harness/vendor/cordis",
@@ -41,8 +41,8 @@
41
41
  "@deepseek-ai/dsh-system-prompt": "link:../../../../deepseek-harness/packages/core/system-prompt",
42
42
  "@deepseek-ai/dsh-tool-testkit": "link:../../../../deepseek-harness/packages/test-support/tool-testkit",
43
43
  "@deepseek-ai/schemastery": "link:../../../../deepseek-harness/vendor/schemastery",
44
- "@dsh-cc/tools": "^0.9.5",
45
- "@dsh-cc/settings": "^0.9.5"
44
+ "@dsh-cc/tools": "^0.9.6-rc.2",
45
+ "@dsh-cc/settings": "^0.9.6-rc.2"
46
46
  },
47
47
  "publishConfig": {
48
48
  "access": "public"