@tokensapi/dsh-progressive-tools 0.1.1 → 0.1.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/CHANGELOG.md +11 -0
- package/lib/index.js +11 -5
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,17 @@ All notable changes to this project are documented here. The format follows
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
+
## [Tokens 0.1.2] - 2026-09-07
|
|
10
|
+
|
|
11
|
+
### Fixed
|
|
12
|
+
|
|
13
|
+
- `tool_search` now states that the catalog is indexed in English and asks for
|
|
14
|
+
English keywords, so non-English requests are translated before searching
|
|
15
|
+
instead of missing every tool.
|
|
16
|
+
- A search that matches nothing now returns the deferred family list and a
|
|
17
|
+
retry instruction instead of an empty array, so an unmatched query is no
|
|
18
|
+
longer read as "the capability does not exist". An empty match set still
|
|
19
|
+
discovers nothing, so dispatch gating is unchanged.
|
|
9
20
|
## [Tokens 0.1.1] - 2026-08-29
|
|
10
21
|
|
|
11
22
|
### Fixed
|
package/lib/index.js
CHANGED
|
@@ -587,7 +587,10 @@ export function apply(ctx, input) {
|
|
|
587
587
|
action,
|
|
588
588
|
query,
|
|
589
589
|
matches,
|
|
590
|
-
|
|
590
|
+
// 零命中若只回空数组,模型会把"搜不到"读成"没有这个能力"。附上家族
|
|
591
|
+
// 清单给它一条恢复路径。matches 为空时不产生任何 discovery,所以这
|
|
592
|
+
// 不放宽 dispatch 门禁。
|
|
593
|
+
...(action === 'status' || matches.length === 0 ? { groups: deferredGroupSummaries(state) } : {}),
|
|
591
594
|
stableTools: [...state.stableNames ?? []].sort(),
|
|
592
595
|
discoveredTools: [...newlyDiscovered].sort(),
|
|
593
596
|
discoveredCount: allDiscovered.size,
|
|
@@ -596,9 +599,11 @@ export function apply(ctx, input) {
|
|
|
596
599
|
estimatedVisibleTokens,
|
|
597
600
|
estimatedCatalogTokens: state.progressive.catalog.totalEstimatedTokens,
|
|
598
601
|
estimatedSavedTokens: state.progressive.catalog.totalEstimatedTokens,
|
|
599
|
-
instruction: action === '
|
|
600
|
-
? `
|
|
601
|
-
:
|
|
602
|
+
instruction: action === 'status'
|
|
603
|
+
? `Use ${config.toolName} with a task-oriented query to load exact deferred definitions.`
|
|
604
|
+
: matches.length === 0
|
|
605
|
+
? `No tool matched ${JSON.stringify(query)}. Definitions are indexed in English: retry ${config.toolName} with English keywords, or pick a family from groups and search that family name.`
|
|
606
|
+
: `Call ${config.dispatchToolName} with an exact returned name and arguments matching its parameters schema.`,
|
|
602
607
|
};
|
|
603
608
|
};
|
|
604
609
|
if (config.mode === 'stable-proxy') {
|
|
@@ -608,7 +613,8 @@ export function apply(ctx, input) {
|
|
|
608
613
|
parameters: {
|
|
609
614
|
query: {
|
|
610
615
|
type: 'string',
|
|
611
|
-
description: 'Task-oriented capability query. Include the object, action, or service involved.'
|
|
616
|
+
description: 'Task-oriented capability query in English. Include the object, action, or service involved.'
|
|
617
|
+
+ ' Tool definitions are indexed in English, so translate a non-English request into English keywords before searching.',
|
|
612
618
|
},
|
|
613
619
|
action: {
|
|
614
620
|
type: 'string',
|
package/package.json
CHANGED