dsh-boost 0.1.4 → 0.2.1

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/locale/en.json CHANGED
@@ -1,6 +1,100 @@
1
1
  {
2
+ "ACTION_REREAD": "Re-read",
3
+ "ACTION_SAVE": "Save",
4
+ "ADVICE_FOR_CODE.ERR_BOOST_INTERNAL": "The plugin failed internally. Nothing on disk changed. Check the host log.",
5
+ "ADVICE_FOR_CODE.ERR_BOOST_INVALID_ARGS": "The request is missing a required field.",
6
+ "ADVICE_FOR_CODE.ERR_BOOST_INVALID_BODY": "A field value is invalid, so the whole write was rejected — nothing on disk changed.",
7
+ "ADVICE_FOR_CODE.ERR_CLIENT_NETWORK": "The page could not reach the plugin's route. It may not be mounted — look for webServer in the host log.",
8
+ "ADVICE_FOR_CODE.ERR_CLIENT_SHAPE": "The plugin returned a shape this page does not recognise; most likely a version mismatch.",
9
+ "ADVICE_FOR_CODE.ERR_HTTP_BODY": "The request body is not valid JSON, or exceeds 64 KiB.",
10
+ "ADVICE_FOR_CODE.ERR_HTTP_FORBIDDEN": "The same-origin fence rejected the request: Host is not trusted, or Origin does not match Host.",
11
+ "ADVICE_FOR_CODE.ERR_HTTP_INTERNAL": "The server threw while reading state — usually a host service failing internally. Check the host log.",
12
+ "ADVICE_FOR_CODE.ERR_HTTP_METHOD": "Wrong method: /state only reads, /scope only accepts POST. The page does not send this; another caller does.",
13
+ "ADVICE_FOR_CODE.ERR_HTTP_NOT_FOUND": "The plugin has no such sub-path: page and server versions may disagree.",
14
+ "ADVICE_FOR_CODE.ERR_HTTP_WORKSPACES_UNAVAILABLE": "The workspace list could not be read, so saving is disabled. This is not 'no workspaces' — the host offered no registry, or reading it threw.",
15
+ "ADVICE_FOR_CODE.ERR_SCOPE_ABORTED": "The request was cancelled. Nothing on disk changed.",
16
+ "ADVICE_FOR_CODE.ERR_SCOPE_FUTURE_VERSION": "The document on disk was written by a newer plugin. This version will not touch it. Upgrade the plugin.",
17
+ "ADVICE_FOR_CODE.ERR_SCOPE_LOCKED": "Another process holds the write lock. Save again shortly.",
18
+ "ADVICE_FOR_CODE.ERR_SCOPE_PARSE_FAILED": "The document on disk is not valid JSON. This version will not touch it. Inspect scope.json in the boost directory by hand.",
19
+ "ADVICE_FOR_CODE.ERR_SCOPE_READ_FAILED": "The scope document on disk could not be read, so the baseline is unknown. Check permissions on the boost directory.",
20
+ "ADVICE_FOR_CODE.ERR_SCOPE_REVISION_CONFLICT": "The document on disk changed elsewhere, so this save was rejected. Use 'Re-read' to start from the new document — your unsaved changes are lost, so that call is yours.",
21
+ "ADVICE_FOR_CODE.ERR_SCOPE_UNKNOWN_VERSION": "The document version on disk is unrecognised. This version will not touch it. Inspect scope.json in the boost directory by hand.",
22
+ "ADVICE_FOR_CODE.ERR_SCOPE_WRITE_FAILED": "Writing to disk failed. Nothing on disk changed. Check permissions and free space on the boost directory.",
23
+ "CONFIG_READONLY": "This section is read-only. It shows what resolveConfig decided at load (clamps and fallbacks included); to change it, edit the profile's cordis.patch.yml and restart the host.",
24
+ "CONFIG_UNAVAILABLE": "The effective config could not be read: the route's config was not an object. The page will not render it as an empty table.",
25
+ "DEGRADED_ADVICE.ERR_BOOST_PARTIAL_MOUNT": "A hook did not mount: the plugin is only partly wired. Check the host log for the missing item.",
26
+ "DEGRADED_ADVICE.ERR_BOOST_SECTION_REGISTER_FAILED": "Registering the prompt section failed: the protocol section is not injected.",
27
+ "DEGRADED_ADVICE.ERR_HOST_COMPLETE_SECTION": "The host swallowed the prompt section: the protocol text may never reach the model.",
28
+ "DEGRADED_ADVICE.ERR_HOST_NO_ESTIMATOR": "The host has no estimator: fixed overhead can only be unknown. Do not read it as zero.",
29
+ "DEGRADED_ADVICE.ERR_HOST_NO_SPILL": "No spill backend: projection does not happen. Install dsh-spill or an equivalent spill service.",
30
+ "DEGRADED_ADVICE.ERR_HOST_NO_SPILL_NOTICE": "The spill backend is present but the footer cannot be produced, so projection was skipped. Check whether the spill notice module was pruned.",
31
+ "DEGRADED_ADVICE.ERR_HOST_NO_TOKENMETER": "No token meter: substitution is refused; projection still works but its numbers are marked unmeasured.",
32
+ "DEGRADED_ADVICE.ERR_HOST_NO_WORKSPACE_REGISTRY": "The host offers no workspace registry, so no session resolves to a workspace and the plugin stays inert.",
33
+ "DEGRADED_ADVICE.ERR_HOST_PLATFORM_UNSUPPORTED": "Substitution is off on this platform; projection still works.",
34
+ "DEGRADED_ADVICE.ERR_HOST_SELECTOR_UNAVAILABLE": "The selector cannot reach a model: multiple candidates fall back to the main model.",
35
+ "DEGRADED_ADVICE.ERR_HOST_SPILL_FAILING": "The spill backend is present but every write fails, so projection was skipped. Check the backend's log; do not reinstall.",
36
+ "DEGRADED_ADVICE.ERR_HOST_SPILL_UNUSABLE": "The spill backend exists but is unusable (no saveText): projection was skipped.",
37
+ "DEGRADED_ADVICE.ERR_HOST_VERSION_MISMATCH": "The host version is outside engines.dsh: this package was not verified against it.",
38
+ "DEGRADED_ADVICE.ERR_HOST_WORKSPACE_REGISTRY_BROKEN": "The workspace registry exists but list() throws: the workspace list cannot be read.",
39
+ "DEGRADED_ADVICE.ERR_RECEIPTS_TRUNCATED": "The receipt stream passed the shard cap and old shards were dropped: the status totals cover only the shards still present.",
40
+ "DEGRADED_ADVICE.ERR_RECEIPTS_UNREADABLE": "A receipt shard could not be read: its share is missing from the totals, which read low.",
41
+ "DEGRADED_FALLBACK": "Code not in the table: see the stable-code list in docs/RELEASE.md.",
42
+ "EMPTY_GLOBAL": "Every workspace is in scope; the list below is kept only as a record.",
43
+ "EMPTY_SELECTED": "Only selected workspaces are in scope, and none is selected — the plugin does nothing at all.",
44
+ "ESTIMATE_HOST": "Measured by the host",
45
+ "HINT_DIRTY": "Changes are not written yet.",
46
+ "HINT_NO_WORKSPACES_TO_PICK": "The host's registry has no workspaces, so there is nothing to pick.",
47
+ "HINT_OVERHEAD": "Fixed cost per request: the protocol section plus tool schemas. It does not vary by session and no saving offsets it.",
48
+ "HINT_PROJECTION_GROSS_REPLAY": "Each receipt's saving multiplied by its own (1 + horizon), summed. This is the figure the net is derived from.",
49
+ "HINT_PROJECTION_NET": "Net = replay gross − retrieval content cost − retrieval call cost. Replay uses each receipt's own horizon, not the current one; so the two gross figures above are not the same number, and only the replay one lines up with the net.",
50
+ "HINT_PROJECTION_ON_ROLLBACK": "To roll back, set projection back to `shadow` and save; or call the `boost` tool with `cmd: \"scope-set\"` and `body: {\"projection\": \"shadow\"}`. The change applies to subsequent requests with no host restart.",
51
+ "HINT_PROJECTION_ON_SPILL": "The host has a spill backend. Without one, projection is skipped: `boost status` lists `ERR_HOST_NO_SPILL` among the degraded codes and this page shows the same line.",
52
+ "HINT_SAVED_LOWER": "The lower bound is the skipped request's own total usage: it excludes how many more times it would have been replayed, so the true saving is higher.",
53
+ "HINT_SAVED_UPPER": "The upper bound is the next request's input: it counts the replaced call's result as saved, so the true saving is lower.",
54
+ "HINT_SHADOW_MEANS": "Shadow mode: the plugin still decides and records receipts, but never changes what reaches the model.",
55
+ "HINT_SUBSTITUTE_ON_ROLLBACK": "To roll back, tick shadow mode again and save: substitution stops at once and the projection setting is untouched.",
56
+ "HINT_SUBSTITUTE_ON_THINKING": "Watch for one 400 mentioning `content[].thinking` after the first real substitution. Synthesized turns carry no `replayState`, so the host-side conversion drops the thinking block; whether this route is an Anthropic-compatible thinking mode cannot be determined on this machine and only shows up on a real substitution.",
57
+ "INTRO": "Projection trims tool receipts; deterministic substitution replaces derivable calls. Every number below comes from receipts, not from an estimate: the range gives a lower and an upper bound, and neither is exact.",
58
+ "LABEL_CONFIG_KEY": "Key",
59
+ "LABEL_CONFIG_VALUE": "Effective value",
60
+ "LABEL_DEGRADED": "Degraded",
61
+ "LABEL_DIRTY": "unsaved",
62
+ "LABEL_ESTIMATE": "Measured by",
63
+ "LABEL_MODE": "Mode",
64
+ "LABEL_MODE_GLOBAL": "All workspaces",
65
+ "LABEL_MODE_SELECTED": "Selected workspaces only",
66
+ "LABEL_OVERHEAD": "Fixed overhead",
67
+ "LABEL_PROJECTION": "Projection",
68
+ "LABEL_PROJECTION_GROSS": "Projection gross (one-time)",
69
+ "LABEL_PROJECTION_GROSS_REPLAY": "Projection gross (replayed per horizon)",
70
+ "LABEL_PROJECTION_NET": "Projection net",
71
+ "LABEL_PROJECTION_ON_PRECONDITIONS": "Two things to check before switching projection on",
72
+ "LABEL_RETRIEVALS": "Retrievals",
73
+ "LABEL_SAVED_LOWER": "Substitution saving (lower)",
74
+ "LABEL_SAVED_UPPER": "Substitution saving (upper)",
75
+ "LABEL_SAVE_FAILED": "The save did not take effect:",
76
+ "LABEL_SHADOW": "Shadow mode",
77
+ "LABEL_STALE_IDS": "Saved, but not in the registry",
78
+ "LABEL_SUBSTITUTE_ON_PRECONDITIONS": "One thing to check before switching shadow mode off",
79
+ "LABEL_UNMATCHED_IDS": "Ticked, but not in the registry",
80
+ "LABEL_WORKSPACES": "Workspaces",
81
+ "LOADING": "Loading…",
82
+ "NO_DEGRADED": "Nothing degraded: the host provides every service this plugin needs.",
83
+ "NO_RECEIPTS": "No receipts yet: the plugin has not made a single decision on this host.",
84
+ "PROJECTION_OFF": "Off (no projection)",
85
+ "PROJECTION_ON": "On (real substitution)",
86
+ "PROJECTION_SHADOW": "Shadow (record only)",
87
+ "RETRY": "Retry",
88
+ "SAVED": "Matches the document on disk.",
89
+ "SECTION_CONFIG": "Effective config",
90
+ "SECTION_COUNTS": "Receipt counts",
91
+ "SECTION_SCOPE": "Scope",
92
+ "SECTION_STATUS": "Status",
93
+ "TITLE": "Token efficiency",
94
+ "UNAVAILABLE_REGISTRY": "The scope document could not be read, so this section is read-only for now.",
95
+ "UNKNOWN": "unmeasured",
2
96
  "meta": {
3
- "title": "dsh-boost",
4
- "description": "Cut DeepSeek Harness token usage by projecting tool receipts and substituting deterministic read-only calls."
97
+ "description": "Cut DeepSeek Harness token usage by projecting tool receipts and substituting deterministic read-only calls.",
98
+ "title": "dsh-boost"
5
99
  }
6
100
  }
package/locale/zh.json CHANGED
@@ -1,6 +1,100 @@
1
1
  {
2
+ "ACTION_REREAD": "重新读取",
3
+ "ACTION_SAVE": "保存",
4
+ "ADVICE_FOR_CODE.ERR_BOOST_INTERNAL": "插件内部出错,磁盘上的文档没有被改动。看宿主日志。",
5
+ "ADVICE_FOR_CODE.ERR_BOOST_INVALID_ARGS": "请求参数不完整。",
6
+ "ADVICE_FOR_CODE.ERR_BOOST_INVALID_BODY": "有字段的取值不合法,所以整次写入被拒绝——磁盘上的文档没有被改动。",
7
+ "ADVICE_FOR_CODE.ERR_CLIENT_NETWORK": "页面没能连上插件的路由。它可能没有挂上——看宿主日志里有没有 webServer。",
8
+ "ADVICE_FOR_CODE.ERR_CLIENT_SHAPE": "插件返回的数据形状和这个页面预期的不一样,多半是版本不匹配。",
9
+ "ADVICE_FOR_CODE.ERR_HTTP_BODY": "请求体不是合法的 JSON,或超过了 64 KiB。",
10
+ "ADVICE_FOR_CODE.ERR_HTTP_FORBIDDEN": "请求被同源栅栏拒绝:Host 不在受信列表里,或 Origin 与 Host 不一致。",
11
+ "ADVICE_FOR_CODE.ERR_HTTP_INTERNAL": "服务端读状态时抛了:通常是宿主服务在自己内部出错。看宿主日志。",
12
+ "ADVICE_FOR_CODE.ERR_HTTP_METHOD": "这个方法用错了:/state 只接受读,/scope 只接受 POST。页面自己不会发错,多半是别的调用方。",
13
+ "ADVICE_FOR_CODE.ERR_HTTP_NOT_FOUND": "插件没有这个子路径:页面与服务端的版本可能不一致。",
14
+ "ADVICE_FOR_CODE.ERR_HTTP_WORKSPACES_UNAVAILABLE": "读不到工作区列表,所以保存被禁用。这不是「没有工作区」——是宿主没有提供注册表,或它读的时候抛错了。",
15
+ "ADVICE_FOR_CODE.ERR_SCOPE_ABORTED": "请求被取消了,磁盘上的文档没有被改动。",
16
+ "ADVICE_FOR_CODE.ERR_SCOPE_FUTURE_VERSION": "磁盘上的文档是更高版本的插件写的,这个版本不敢改它。升级插件。",
17
+ "ADVICE_FOR_CODE.ERR_SCOPE_LOCKED": "另一个进程正拿着写锁。稍后再存一次。",
18
+ "ADVICE_FOR_CODE.ERR_SCOPE_PARSE_FAILED": "磁盘上的文档不是合法的 JSON,这个版本不敢改它。手工检查 boost 目录里的 scope.json。",
19
+ "ADVICE_FOR_CODE.ERR_SCOPE_READ_FAILED": "读不到磁盘上的作用域文档,所以不知道基线是什么。检查 boost 目录的权限。",
20
+ "ADVICE_FOR_CODE.ERR_SCOPE_REVISION_CONFLICT": "磁盘上的文档在别处被改过,这次保存被拒绝。点「重新读取」按新文档重来——你现在的改动会丢,所以由你决定。",
21
+ "ADVICE_FOR_CODE.ERR_SCOPE_UNKNOWN_VERSION": "磁盘上的文档版本无法识别,这个版本不敢改它。手工检查 boost 目录里的 scope.json。",
22
+ "ADVICE_FOR_CODE.ERR_SCOPE_WRITE_FAILED": "写盘失败,磁盘上的文档没有被改动。检查 boost 目录的权限与剩余空间。",
23
+ "CONFIG_READONLY": "这一栏是只读的。它显示的是启动时 resolveConfig 算出来的值(含 clamp 与回落),改它要编辑 profile 的 cordis.patch.yml 并重启宿主。",
24
+ "CONFIG_UNAVAILABLE": "读不到生效配置:路由返回的 config 不是对象。页面不会把它显示成一张空表。",
25
+ "DEGRADED_ADVICE.ERR_BOOST_PARTIAL_MOUNT": "有钩子没挂上:插件是部分装配的。看宿主日志里的缺失项。",
26
+ "DEGRADED_ADVICE.ERR_BOOST_SECTION_REGISTER_FAILED": "提示段注册失败:协议段没有注入。",
27
+ "DEGRADED_ADVICE.ERR_HOST_COMPLETE_SECTION": "提示段被宿主吞掉了:协议段可能没有到达模型。",
28
+ "DEGRADED_ADVICE.ERR_HOST_NO_ESTIMATOR": "宿主没有估算器:常驻开销只能是未知,别把它当 0。",
29
+ "DEGRADED_ADVICE.ERR_HOST_NO_SPILL": "没有 spill 后端:投影不会发生。装上 dsh-spill 或等价的 spill 服务。",
30
+ "DEGRADED_ADVICE.ERR_HOST_NO_SPILL_NOTICE": "spill 后端在,但页脚产不出来:投影被跳过。检查 spill 通知模块是否被裁剪掉。",
31
+ "DEGRADED_ADVICE.ERR_HOST_NO_TOKENMETER": "没有 token 计量服务:替换被拒绝,投影仍可用但数字标为未测量。",
32
+ "DEGRADED_ADVICE.ERR_HOST_NO_WORKSPACE_REGISTRY": "宿主没有工作区注册表:任何会话都解析不到工作区,插件全程惰性。",
33
+ "DEGRADED_ADVICE.ERR_HOST_PLATFORM_UNSUPPORTED": "这个平台上不启用替换:投影仍然可用。",
34
+ "DEGRADED_ADVICE.ERR_HOST_SELECTOR_UNAVAILABLE": "选择器调不到模型:多候选只能回落到大模型决策。",
35
+ "DEGRADED_ADVICE.ERR_HOST_SPILL_FAILING": "spill 后端在,但每次写都失败:投影被跳过。查后端日志,不是重装。",
36
+ "DEGRADED_ADVICE.ERR_HOST_SPILL_UNUSABLE": "spill 后端存在但不可用(没有 saveText):投影被跳过。",
37
+ "DEGRADED_ADVICE.ERR_HOST_VERSION_MISMATCH": "宿主版本与 engines.dsh 的区间不符:本包没有在这个版本上验证过。",
38
+ "DEGRADED_ADVICE.ERR_HOST_WORKSPACE_REGISTRY_BROKEN": "工作区注册表在,但 list() 抛错:工作区列表读不到。",
39
+ "DEGRADED_ADVICE.ERR_RECEIPTS_TRUNCATED": "收据流超过分片上限,旧分片被丢弃:`boost status` 的合计只覆盖还在的分片。",
40
+ "DEGRADED_ADVICE.ERR_RECEIPTS_UNREADABLE": "有收据分片读不出来:那一部分的账没有算进去,合计偏低。",
41
+ "DEGRADED_FALLBACK": "未收录的码:查 docs/RELEASE.md 的稳定码表。",
42
+ "EMPTY_GLOBAL": "所有工作区都会生效,下面这份名单只作为记录保留。",
43
+ "EMPTY_SELECTED": "当前只对选中的工作区生效,但一个都没选——此时插件完全不介入。",
44
+ "ESTIMATE_HOST": "宿主计量",
45
+ "HINT_DIRTY": "改动还没有写下去。",
46
+ "HINT_NO_WORKSPACES_TO_PICK": "宿主的注册表里没有工作区,没得选。",
47
+ "HINT_OVERHEAD": "每次请求的常驻成本:协议段 + 工具 schema。它不随会话变化,也不被任何节省抵消。",
48
+ "HINT_PROJECTION_GROSS_REPLAY": "每条回执的节省乘以它自己的 (1 + horizon) 再求和。这个数才是净额的被减数。",
49
+ "HINT_PROJECTION_NET": "净额 = 重放毛额 − 取回内容成本 − 取回调用成本。回放用每条回执自己的 horizon,不是当前值;所以上面两个毛额不是同一个数,净额只与重放那个对齐。",
50
+ "HINT_PROJECTION_ON_ROLLBACK": "回滚:把「投影」改回 `shadow` 并保存;或调 `boost` 工具,`cmd: \"scope-set\"`、`body: {\"projection\": \"shadow\"}`。改动对后续请求立即生效,不需要重启宿主。",
51
+ "HINT_PROJECTION_ON_SPILL": "宿主有 spill 后端。没有的话投影会被跳过——`boost status` 的降级项会写 `ERR_HOST_NO_SPILL`,页面上也会显示这一条。",
52
+ "HINT_SAVED_LOWER": "下界是被跳过那次请求自己的总用量:它不含「后续还会回放多少次」,所以真实节省高于这个数。",
53
+ "HINT_SAVED_UPPER": "上界是「下一次请求的输入」:它把被替换调用的结果也算进了节省,所以真实节省低于这个数。",
54
+ "HINT_SHADOW_MEANS": "影子模式:插件照常决策并记账,但不真的改动发给模型的内容。",
55
+ "HINT_SUBSTITUTE_ON_ROLLBACK": "回滚:把「影子模式」勾回去并保存,替换立即停止;投影的设置不受影响。",
56
+ "HINT_SUBSTITUTE_ON_THINKING": "第一次真替换之后盯一次含 `content[].thinking` 的 400。合成回合没有 `replayState`,宿主侧的转换会丢掉 thinking 块;当前路由是不是 Anthropic 兼容的 thinking 模式,在这台机器上查不出来,只能在真替换时观察。",
57
+ "INTRO": "投影裁剪工具回执、确定性替换可推导的调用。下面的数字全部来自收据,不是估算的替代品:区间给出下界与上界,两者都不是精确值。",
58
+ "LABEL_CONFIG_KEY": "键",
59
+ "LABEL_CONFIG_VALUE": "生效值",
60
+ "LABEL_DEGRADED": "降级项",
61
+ "LABEL_DIRTY": "未保存",
62
+ "LABEL_ESTIMATE": "口径",
63
+ "LABEL_MODE": "模式",
64
+ "LABEL_MODE_GLOBAL": "全部工作区",
65
+ "LABEL_MODE_SELECTED": "仅选中的工作区",
66
+ "LABEL_OVERHEAD": "常驻开销",
67
+ "LABEL_PROJECTION": "投影",
68
+ "LABEL_PROJECTION_GROSS": "投影毛额(一次性)",
69
+ "LABEL_PROJECTION_GROSS_REPLAY": "投影毛额(按各自 horizon 重放)",
70
+ "LABEL_PROJECTION_NET": "投影净额",
71
+ "LABEL_PROJECTION_ON_PRECONDITIONS": "开启投影前确认两件事",
72
+ "LABEL_RETRIEVALS": "取回次数",
73
+ "LABEL_SAVED_LOWER": "替换节省(下界)",
74
+ "LABEL_SAVED_UPPER": "替换节省(上界)",
75
+ "LABEL_SAVE_FAILED": "保存没有生效:",
76
+ "LABEL_SHADOW": "影子模式",
77
+ "LABEL_STALE_IDS": "已保存但注册表里没有",
78
+ "LABEL_SUBSTITUTE_ON_PRECONDITIONS": "关掉影子模式前确认一件事",
79
+ "LABEL_UNMATCHED_IDS": "已勾选但注册表里没有",
80
+ "LABEL_WORKSPACES": "工作区",
81
+ "LOADING": "读取中…",
82
+ "NO_DEGRADED": "没有降级项:宿主提供了这个插件需要的全部服务。",
83
+ "NO_RECEIPTS": "还没有任何收据:插件在这个宿主上还没有产生过一次决策。",
84
+ "PROJECTION_OFF": "关闭(不投影)",
85
+ "PROJECTION_ON": "开启(真替换)",
86
+ "PROJECTION_SHADOW": "影子(只记账)",
87
+ "RETRY": "重试",
88
+ "SAVED": "与磁盘上的文档一致。",
89
+ "SECTION_CONFIG": "生效配置",
90
+ "SECTION_COUNTS": "收据计数",
91
+ "SECTION_SCOPE": "作用域",
92
+ "SECTION_STATUS": "运行状态",
93
+ "TITLE": "Token 效率",
94
+ "UNAVAILABLE_REGISTRY": "读不到作用域文档,这一块暂时只读。",
95
+ "UNKNOWN": "未测量",
2
96
  "meta": {
3
- "title": "dsh-boost",
4
- "description": "通过工具回执投影与确定性只读替换降低 DeepSeek Harness 的 token 消耗。"
97
+ "description": "通过工具回执投影与确定性只读替换降低 DeepSeek Harness 的 token 消耗。",
98
+ "title": "dsh-boost"
5
99
  }
6
100
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-boost",
3
- "version": "0.1.4",
3
+ "version": "0.2.1",
4
4
  "description": "Cut DSH token usage by projecting tool receipts and substituting deterministic read-only calls.",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",
@@ -30,29 +30,38 @@
30
30
  "default": "./dist/index.js"
31
31
  },
32
32
  "./package.json": "./package.json",
33
- "./locale/*.json": "./locale/*.json"
33
+ "./locale/*.json": "./locale/*.json",
34
+ "./client": "./lib/client.js"
34
35
  },
35
36
  "scripts": {
36
37
  "clean": "node scripts/clean.mjs",
37
- "build": "node scripts/clean.mjs && tsc -p tsconfig.json",
38
- "typecheck": "tsc -p tsconfig.json --noEmit && tsc -p tsconfig.test.json",
38
+ "build": "node scripts/clean.mjs && tsc -p tsconfig.json && npm run build:client",
39
+ "typecheck": "tsc -p tsconfig.json --noEmit && tsc -p tsconfig.test.json && tsc -p tsconfig.client.json",
39
40
  "test": "node scripts/run-tests.mjs",
40
41
  "stats": "node scripts/session-stats.mjs",
41
42
  "ci": "npm run typecheck && npm test && npm run build",
42
43
  "verify:package": "node scripts/verify-package.mjs",
43
44
  "prepublishOnly": "npm run ci && npm run verify:package -- --prebuilt",
44
- "prepare": "node scripts/prepare-build.mjs"
45
+ "prepare": "node scripts/prepare-build.mjs",
46
+ "build:client": "vite build --config ui/vite.config.ts --mode client",
47
+ "dev:ui": "vite --config ui/vite.config.ts"
45
48
  },
46
49
  "devDependencies": {
47
50
  "@deepseek-ai/dsh-llm": "0.2.2-rc.4",
48
- "@deepseek-ai/dsh-tools": "0.2.2-rc.4",
49
51
  "@deepseek-ai/dsh-spill-policy": "0.2.2-rc.4",
50
52
  "@deepseek-ai/dsh-token-meter": "0.2.2-rc.4",
53
+ "@deepseek-ai/dsh-tools": "0.2.2-rc.4",
51
54
  "@types/node": "^24",
55
+ "@types/react": "^18.3.31",
56
+ "@types/react-dom": "^18.3.7",
57
+ "@vitejs/plugin-react": "^5.2.0",
52
58
  "js-yaml": "^4.3.2",
59
+ "react": "^18.3.1",
60
+ "react-dom": "^18.3.1",
53
61
  "semver": "^7.8.5",
54
62
  "tsx": "^4.19.0",
55
- "typescript": "^5.6.0"
63
+ "typescript": "^5.6.0",
64
+ "vite": "^7.3.8"
56
65
  },
57
66
  "publishConfig": {
58
67
  "registry": "https://registry.npmjs.org/",
@@ -63,11 +72,16 @@
63
72
  "dsh": ">=0.2.2-rc.4 <0.2.3-0"
64
73
  },
65
74
  "dsh": {
75
+ "client": {
76
+ "platform": "web",
77
+ "inject": []
78
+ },
66
79
  "bundle": {
67
80
  "patch": "./cordis.patch.yml"
68
81
  }
69
82
  },
70
83
  "files": [
84
+ "lib",
71
85
  "dist",
72
86
  "!dist/**/*.d.ts",
73
87
  "dist/index.d.ts",