dsh-context-compression-improved 0.11.0 → 0.11.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.
Files changed (310) hide show
  1. package/README.md +15 -110
  2. package/README.zh.md +14 -104
  3. package/THIRD_PARTY_NOTICES.md +25 -7
  4. package/{packages/selector/dsh.plugin.json → dsh.plugin.json} +2 -2
  5. package/{packages/selector/lib → lib}/index.js +101 -0
  6. package/package.json +129 -116
  7. package/screenshots.json +3 -6
  8. package/.agents/plans/improve/checklist.md +0 -32
  9. package/.agents/plans/improve/findings.md +0 -102
  10. package/.agents/plans/improve/spec.md +0 -53
  11. package/.agents/plans/improve/tasks.md +0 -70
  12. package/.gitattributes +0 -2
  13. package/.githooks/pre-push +0 -37
  14. package/.github/workflows/ci.yml +0 -47
  15. package/CHANGELOG.de.md +0 -580
  16. package/CHANGELOG.es.md +0 -588
  17. package/CHANGELOG.fr.md +0 -576
  18. package/CHANGELOG.it.md +0 -577
  19. package/CHANGELOG.ja.md +0 -261
  20. package/CHANGELOG.ko.md +0 -254
  21. package/CHANGELOG.md +0 -557
  22. package/CHANGELOG.ru.md +0 -554
  23. package/CHANGELOG.zh.md +0 -247
  24. package/CONTRIBUTING.md +0 -22
  25. package/README.de.md +0 -96
  26. package/README.es.md +0 -96
  27. package/README.fr.md +0 -96
  28. package/README.it.md +0 -96
  29. package/README.ja.md +0 -102
  30. package/README.ko.md +0 -102
  31. package/README.ru.md +0 -96
  32. package/SECURITY.md +0 -18
  33. package/assets/board.png +0 -0
  34. package/assets/context.png +0 -0
  35. package/docs/assets/context-compression-selector-profiles.jpg +0 -0
  36. package/docs/assets/context-compression-selector-settings.png +0 -0
  37. package/docs/compat-0.1.5-report.md +0 -77
  38. package/docs/installation.de.md +0 -104
  39. package/docs/installation.es.md +0 -104
  40. package/docs/installation.fr.md +0 -104
  41. package/docs/installation.it.md +0 -104
  42. package/docs/installation.ja.md +0 -78
  43. package/docs/installation.ko.md +0 -78
  44. package/docs/installation.md +0 -103
  45. package/docs/installation.ru.md +0 -104
  46. package/docs/installation.zh.md +0 -100
  47. package/docs/repair-log.md +0 -657
  48. package/docs/shallow-teaching-preset-template.md +0 -46
  49. package/eslint.config.js +0 -30
  50. package/packages/selector/LICENSE +0 -21
  51. package/packages/selector/README.md +0 -26
  52. package/packages/selector/README.zh.md +0 -24
  53. package/packages/selector/THIRD_PARTY_NOTICES.md +0 -32
  54. package/packages/selector/docs/history-tool-call-working-set-spec.md +0 -112
  55. package/packages/selector/docs/native-tool-result-selector-spec.md +0 -34
  56. package/packages/selector/docs/subagent-cache-reuse-spec.md +0 -46
  57. package/packages/selector/lib/style.css +0 -350
  58. package/packages/selector/package.json +0 -178
  59. package/packages/selector/screenshots.json +0 -3
  60. package/packages/selector/src/client/CompressionProfileControls.tsx +0 -352
  61. package/packages/selector/src/client/CompressionProfileSelector.module.css +0 -199
  62. package/packages/selector/src/client/CompressionProfileSelector.tsx +0 -89
  63. package/packages/selector/src/client/CustomPolicyEditor.tsx +0 -216
  64. package/packages/selector/src/client/EstimatorControls.tsx +0 -277
  65. package/packages/selector/src/client/bridge-scope.ts +0 -125
  66. package/packages/selector/src/client/decode.ts +0 -68
  67. package/packages/selector/src/client/fab-pos.ts +0 -71
  68. package/packages/selector/src/client/index.ts +0 -438
  69. package/packages/selector/src/client/locales/de.ts +0 -167
  70. package/packages/selector/src/client/locales/es.ts +0 -167
  71. package/packages/selector/src/client/locales/fr.ts +0 -167
  72. package/packages/selector/src/client/locales/it.ts +0 -167
  73. package/packages/selector/src/client/locales/ja.ts +0 -167
  74. package/packages/selector/src/client/locales/ko.ts +0 -167
  75. package/packages/selector/src/client/locales/ru.ts +0 -167
  76. package/packages/selector/src/client/locales.ts +0 -334
  77. package/packages/selector/src/client/monitor-fab.ts +0 -445
  78. package/packages/selector/src/client/preset-options.ts +0 -88
  79. package/packages/selector/src/client/savings-card.tsx +0 -269
  80. package/packages/selector/src/client/scope-face.ts +0 -24
  81. package/packages/selector/src/client/settings-section.tsx +0 -156
  82. package/packages/selector/src/compat/host-generation.ts +0 -96
  83. package/packages/selector/src/compat/llm-messages.ts +0 -50
  84. package/packages/selector/src/compat/settings-lease.ts +0 -108
  85. package/packages/selector/src/compat/tool-result.ts +0 -91
  86. package/packages/selector/src/css-modules.d.ts +0 -6
  87. package/packages/selector/src/deepseek-v4-tokenizer.ts +0 -205
  88. package/packages/selector/src/estimator-catalog.ts +0 -104
  89. package/packages/selector/src/index.ts +0 -890
  90. package/packages/selector/src/invariant.ts +0 -113
  91. package/packages/selector/src/preset-overlay.ts +0 -749
  92. package/packages/selector/src/profiles.ts +0 -554
  93. package/packages/selector/src/pruner/content.ts +0 -199
  94. package/packages/selector/src/pruner/session.ts +0 -97
  95. package/packages/selector/src/pruner/state.ts +0 -61
  96. package/packages/selector/src/pruner/tuning.ts +0 -23
  97. package/packages/selector/src/pruner/types.ts +0 -78
  98. package/packages/selector/src/pruner.ts +0 -3222
  99. package/packages/selector/src/runtime/adaptive-cost.ts +0 -205
  100. package/packages/selector/src/runtime/audit.ts +0 -321
  101. package/packages/selector/src/runtime/config.ts +0 -887
  102. package/packages/selector/src/runtime/custom-policy.ts +0 -300
  103. package/packages/selector/src/runtime/deepseek-official-pricing.ts +0 -298
  104. package/packages/selector/src/runtime/deepseek-v4-vision-tokens.ts +0 -254
  105. package/packages/selector/src/runtime/display-prefs.ts +0 -98
  106. package/packages/selector/src/runtime/fold-router.ts +0 -143
  107. package/packages/selector/src/runtime/measurement.ts +0 -444
  108. package/packages/selector/src/runtime/monitor.ts +0 -341
  109. package/packages/selector/src/runtime/panel-command.ts +0 -213
  110. package/packages/selector/src/runtime/reducers.ts +0 -1755
  111. package/packages/selector/src/runtime/retrieve.ts +0 -505
  112. package/packages/selector/src/runtime/savings-integral.ts +0 -117
  113. package/packages/selector/src/runtime/savings-projection.ts +0 -229
  114. package/packages/selector/src/runtime/savings-verify.ts +0 -446
  115. package/packages/selector/src/runtime/savings.ts +0 -526
  116. package/packages/selector/src/runtime/sediment-card.ts +0 -126
  117. package/packages/selector/src/runtime/sediment-clock.ts +0 -87
  118. package/packages/selector/src/runtime/sediment-guard.ts +0 -136
  119. package/packages/selector/src/runtime/sediment-publish.ts +0 -144
  120. package/packages/selector/src/runtime/sediment-span.ts +0 -170
  121. package/packages/selector/src/runtime/sediment.ts +0 -209
  122. package/packages/selector/src/runtime/session-events.ts +0 -30
  123. package/packages/selector/src/runtime/session-file-decode.ts +0 -523
  124. package/packages/selector/src/runtime/shallow-tools.ts +0 -342
  125. package/packages/selector/src/runtime/stats-backfill.ts +0 -541
  126. package/packages/selector/src/runtime/stats-db.ts +0 -492
  127. package/packages/selector/src/runtime/stats-schema.ts +0 -123
  128. package/packages/selector/src/runtime/stats-sync.ts +0 -307
  129. package/packages/selector/src/runtime/summary-command.ts +0 -127
  130. package/packages/selector/src/runtime/tail-trim.ts +0 -177
  131. package/packages/selector/src/runtime/token-count.ts +0 -72
  132. package/packages/selector/src/runtime/tokenpilot/advisor-prompt.ts +0 -233
  133. package/packages/selector/src/runtime/tokenpilot/advisor-state.ts +0 -204
  134. package/packages/selector/src/runtime/tokenpilot/advisor.ts +0 -419
  135. package/packages/selector/src/runtime/tokenpilot/benefit.ts +0 -200
  136. package/packages/selector/src/runtime/tokenpilot/dedup.ts +0 -82
  137. package/packages/selector/src/runtime/tokenpilot/estimator.ts +0 -151
  138. package/packages/selector/src/runtime/tokenpilot/intent-fold.ts +0 -53
  139. package/packages/selector/src/runtime/tokenpilot/intent-gate.ts +0 -65
  140. package/packages/selector/src/runtime/tokenpilot/intent-input-mask.ts +0 -125
  141. package/packages/selector/src/runtime/tokenpilot/intent-range.ts +0 -37
  142. package/packages/selector/src/runtime/tokenpilot/locator.ts +0 -129
  143. package/packages/selector/src/runtime/tokenpilot/read-state.ts +0 -98
  144. package/packages/selector/src/runtime/tokenpilot/sidechannel.ts +0 -303
  145. package/packages/selector/src/runtime/tool-names.ts +0 -42
  146. package/packages/selector/src/runtime/toolclass.ts +0 -103
  147. package/packages/selector/src/runtime/triage/masks.ts +0 -128
  148. package/packages/selector/src/runtime/triage/shallow.ts +0 -132
  149. package/packages/selector/src/runtime/triage/signals.ts +0 -167
  150. package/packages/selector/src/runtime/triage/types.ts +0 -125
  151. package/packages/selector/src/runtime/types.ts +0 -396
  152. package/packages/selector/src/runtime/value.ts +0 -48
  153. package/packages/selector/src/settings-bridge.ts +0 -175
  154. package/packages/selector/tests/advisor-report.host.spec.ts +0 -223
  155. package/packages/selector/tests/auto-compact.client.spec.tsx +0 -214
  156. package/packages/selector/tests/built/client-artifact.spec.ts +0 -56
  157. package/packages/selector/tests/cache-prefix-audit.spec.ts +0 -123
  158. package/packages/selector/tests/code-skeleton.client.spec.ts +0 -98
  159. package/packages/selector/tests/compat/compat-narrow-waist.spec.ts +0 -150
  160. package/packages/selector/tests/custom-contract.client.spec.ts +0 -226
  161. package/packages/selector/tests/estimator-catalog.spec.ts +0 -70
  162. package/packages/selector/tests/estimator-channel.client.spec.tsx +0 -253
  163. package/packages/selector/tests/estimator-route-registration.host.spec.ts +0 -202
  164. package/packages/selector/tests/fab-pos.client.spec.ts +0 -47
  165. package/packages/selector/tests/fixtures/sediment-pool/52adc205-cloud-5.orig.txt +0 -231
  166. package/packages/selector/tests/fixtures/sediment-pool/95fcba5d-cloud-25.orig.txt +0 -236
  167. package/packages/selector/tests/fixtures/sediment-pool/95fcba5d-cloud-38.orig.txt +0 -220
  168. package/packages/selector/tests/fixtures/sediment-pool/95fcba5d-cloud-42.orig.txt +0 -140
  169. package/packages/selector/tests/fixtures/sediment-pool/95fcba5d-cloud-53.orig.txt +0 -117
  170. package/packages/selector/tests/fixtures/sediment-pool/95fcba5d-local-10.orig.txt +0 -67
  171. package/packages/selector/tests/fixtures/sediment-pool/a7a767c0-cloud-45.orig.txt +0 -119
  172. package/packages/selector/tests/fixtures/sediment-pool/a7a767c0-cloud-49.orig.txt +0 -119
  173. package/packages/selector/tests/fixtures/sediment-pool/a7a767c0-cloud-63.orig.txt +0 -131
  174. package/packages/selector/tests/fixtures/sediment-pool/a7a767c0-cloud-75.orig.txt +0 -196
  175. package/packages/selector/tests/fixtures/sediment-pool/a7a767c0-cloud-76.orig.txt +0 -71
  176. package/packages/selector/tests/fixtures/sediment-pool/a7a767c0-cloud-85.orig.txt +0 -126
  177. package/packages/selector/tests/fixtures/sediment-pool/a7a767c0-cloud-86.orig.txt +0 -86
  178. package/packages/selector/tests/fixtures/sediment-pool/a7a767c0-cloud-87.orig.txt +0 -50
  179. package/packages/selector/tests/fixtures/sediment-pool/a7a767c0-cloud-96.orig.txt +0 -102
  180. package/packages/selector/tests/helpers/legacy-namespace.ts +0 -35
  181. package/packages/selector/tests/helpers/legacy-settings/index.ts +0 -15
  182. package/packages/selector/tests/helpers/legacy-settings/legacy/provider.d.ts +0 -41
  183. package/packages/selector/tests/helpers/legacy-settings/legacy/provider.js +0 -647
  184. package/packages/selector/tests/helpers/legacy-settings/legacy/redact.js +0 -78
  185. package/packages/selector/tests/helpers/legacy-settings/legacy/util-values.js +0 -234
  186. package/packages/selector/tests/host-preset-overlay.host.spec.ts +0 -204
  187. package/packages/selector/tests/monitor-fab.client.spec.ts +0 -240
  188. package/packages/selector/tests/preset-options-write.client.spec.ts +0 -192
  189. package/packages/selector/tests/preset-overlay-loader.e2e.host.spec.ts +0 -200
  190. package/packages/selector/tests/preset-overlay.host.spec.ts +0 -246
  191. package/packages/selector/tests/profiles.client.spec.tsx +0 -436
  192. package/packages/selector/tests/ptc-custom-write.client.spec.ts +0 -86
  193. package/packages/selector/tests/public/package-contract.client.spec.ts +0 -89
  194. package/packages/selector/tests/runtime/adaptive-cost.spec.ts +0 -167
  195. package/packages/selector/tests/runtime/advice-never-withholds.host.spec.ts +0 -230
  196. package/packages/selector/tests/runtime/advisor-invariant.spec.ts +0 -272
  197. package/packages/selector/tests/runtime/advisor.spec.ts +0 -226
  198. package/packages/selector/tests/runtime/audit.spec.ts +0 -275
  199. package/packages/selector/tests/runtime/auto-compact-config.spec.ts +0 -523
  200. package/packages/selector/tests/runtime/char-basis.spec.ts +0 -30
  201. package/packages/selector/tests/runtime/code-skeleton.spec.ts +0 -152
  202. package/packages/selector/tests/runtime/deepseek-official-pricing.spec.ts +0 -186
  203. package/packages/selector/tests/runtime/deepseek-v4-tokenizer.spec.ts +0 -122
  204. package/packages/selector/tests/runtime/deepseek-v4-vision-tokens.spec.ts +0 -122
  205. package/packages/selector/tests/runtime/deprecated-preset-options.spec.ts +0 -96
  206. package/packages/selector/tests/runtime/fixtures/profile-baseline.json +0 -273
  207. package/packages/selector/tests/runtime/fixtures/session-v4-dump.jsonl +0 -46
  208. package/packages/selector/tests/runtime/fixtures/tokenizer-golden.json +0 -106
  209. package/packages/selector/tests/runtime/fixtures/vision-golden.json +0 -459
  210. package/packages/selector/tests/runtime/fold-router.spec.ts +0 -140
  211. package/packages/selector/tests/runtime/frequency-longstrings.spec.ts +0 -74
  212. package/packages/selector/tests/runtime/fresh-gate.spec.ts +0 -43
  213. package/packages/selector/tests/runtime/html-reducer.spec.ts +0 -212
  214. package/packages/selector/tests/runtime/intent-gate.spec.ts +0 -62
  215. package/packages/selector/tests/runtime/intent-summary.spec.ts +0 -156
  216. package/packages/selector/tests/runtime/jsonl-reducer.spec.ts +0 -79
  217. package/packages/selector/tests/runtime/line-mapping.spec.ts +0 -153
  218. package/packages/selector/tests/runtime/monitor.spec.ts +0 -354
  219. package/packages/selector/tests/runtime/panel-command.spec.ts +0 -101
  220. package/packages/selector/tests/runtime/prose-reducers.spec.ts +0 -133
  221. package/packages/selector/tests/runtime/ptc-profile.spec.ts +0 -133
  222. package/packages/selector/tests/runtime/public/public-runtime.spec.ts +0 -2795
  223. package/packages/selector/tests/runtime/read-input-cap.spec.ts +0 -33
  224. package/packages/selector/tests/runtime/savings-accounting.spec.ts +0 -291
  225. package/packages/selector/tests/runtime/savings-integral.spec.ts +0 -169
  226. package/packages/selector/tests/runtime/savings-projection.spec.ts +0 -89
  227. package/packages/selector/tests/runtime/savings-verify.spec.ts +0 -226
  228. package/packages/selector/tests/runtime/savings.spec.ts +0 -139
  229. package/packages/selector/tests/runtime/search-reducer.spec.ts +0 -110
  230. package/packages/selector/tests/runtime/sediment-card.spec.ts +0 -111
  231. package/packages/selector/tests/runtime/sediment-config.spec.ts +0 -56
  232. package/packages/selector/tests/runtime/sediment-guard.spec.ts +0 -71
  233. package/packages/selector/tests/runtime/sediment-masks.spec.ts +0 -95
  234. package/packages/selector/tests/runtime/sediment-orchestrator.spec.ts +0 -166
  235. package/packages/selector/tests/runtime/sediment-pool-share.spec.ts +0 -65
  236. package/packages/selector/tests/runtime/sediment-publish.spec.ts +0 -142
  237. package/packages/selector/tests/runtime/sediment-real-shapes.spec.ts +0 -158
  238. package/packages/selector/tests/runtime/sediment-settings.spec.ts +0 -73
  239. package/packages/selector/tests/runtime/sediment-signals.spec.ts +0 -124
  240. package/packages/selector/tests/runtime/sediment-span.spec.ts +0 -92
  241. package/packages/selector/tests/runtime/session-events.spec.ts +0 -27
  242. package/packages/selector/tests/runtime/session-file-decode.spec.ts +0 -281
  243. package/packages/selector/tests/runtime/settings-unwrap.spec.ts +0 -58
  244. package/packages/selector/tests/runtime/shallow-primitives.spec.ts +0 -135
  245. package/packages/selector/tests/runtime/sidechannel.spec.ts +0 -241
  246. package/packages/selector/tests/runtime/stats-backfill-scheduler.spec.ts +0 -167
  247. package/packages/selector/tests/runtime/stats-backfill.spec.ts +0 -350
  248. package/packages/selector/tests/runtime/stats-db.spec.ts +0 -361
  249. package/packages/selector/tests/runtime/stats-privacy.spec.ts +0 -55
  250. package/packages/selector/tests/runtime/stats-sync.spec.ts +0 -278
  251. package/packages/selector/tests/runtime/summary-command.spec.ts +0 -154
  252. package/packages/selector/tests/runtime/toc-and-bundled.spec.ts +0 -159
  253. package/packages/selector/tests/runtime/tokenizer-golden.spec.ts +0 -53
  254. package/packages/selector/tests/runtime/tokenpilot/benefit.spec.ts +0 -217
  255. package/packages/selector/tests/runtime/tokenpilot/dedup.spec.ts +0 -52
  256. package/packages/selector/tests/runtime/tokenpilot/estimator.spec.ts +0 -79
  257. package/packages/selector/tests/runtime/tokenpilot/locator.spec.ts +0 -76
  258. package/packages/selector/tests/runtime/tokenpilot/profile-baseline.spec.ts +0 -121
  259. package/packages/selector/tests/runtime/tokenpilot/read-state.spec.ts +0 -82
  260. package/packages/selector/tests/runtime/toolclass.spec.ts +0 -156
  261. package/packages/selector/tests/runtime/value.spec.ts +0 -23
  262. package/packages/selector/tests/savings-sessions.client.spec.tsx +0 -140
  263. package/packages/selector/tests/settings-seat.client.spec.ts +0 -215
  264. package/packages/selector/tests/standing-generation.host.spec.ts +0 -724
  265. package/packages/selector/tests/subagent-cache-reuse.host.spec.ts +0 -269
  266. package/packages/selector/tests/support/cache-prefix-audit.ts +0 -105
  267. package/packages/selector/tests/support/mock-adapter.ts +0 -37
  268. package/packages/selector/tests/support/ui-primitives.tsx +0 -34
  269. package/packages/selector/tsconfig.json +0 -11
  270. package/packages/selector/tsdown.client.config.ts +0 -102
  271. package/packages/selector/tsdown.config.ts +0 -20
  272. package/pnpm-workspace.yaml +0 -76
  273. package/scripts/capture-profile-baseline.mjs +0 -42
  274. package/scripts/cell-browser-e2e.mjs +0 -354
  275. package/scripts/generate-tokenizer-fixtures.py +0 -81
  276. package/scripts/generate-vision-fixtures.py +0 -208
  277. package/scripts/hosts.d.mts +0 -3
  278. package/scripts/hosts.mjs +0 -79
  279. package/scripts/packed-components-smoke.mjs +0 -763
  280. package/scripts/packed-install-e2e.mjs +0 -1346
  281. package/scripts/sediment-latency-report.mjs +0 -63
  282. package/scripts/sync-hosts.mjs +0 -174
  283. package/scripts/toolclass-corpus-replay.mjs +0 -281
  284. package/scripts/verify-release.mjs +0 -343
  285. package/tests/TEST_INVENTORY.md +0 -41
  286. package/tsconfig.base.json +0 -18
  287. package/tsconfig.json +0 -7
  288. package/tsconfig.tests.json +0 -15
  289. package/vitest.built.config.ts +0 -9
  290. package/vitest.config.ts +0 -54
  291. /package/{packages/selector/assets → assets}/deepseek-v4/LICENSE.DeepSeek-V4-Pro.txt +0 -0
  292. /package/{packages/selector/assets → assets}/deepseek-v4/manifest.json +0 -0
  293. /package/{packages/selector/assets → assets}/deepseek-v4/tokenizer.json +0 -0
  294. /package/{packages/selector/assets → assets}/deepseek-v4/tokenizer_config.json +0 -0
  295. /package/{packages/selector/assets → assets}/deepseek-v4-vision-exp/LICENSE.DeepSeek-V4-Flash-Vision-Exp.txt +0 -0
  296. /package/{packages/selector/assets → assets}/deepseek-v4-vision-exp/manifest.json +0 -0
  297. /package/{packages/selector/assets → assets}/deepseek-v4-vision-exp/tokenizer.json +0 -0
  298. /package/{packages/selector/assets → assets}/deepseek-v4-vision-exp/tokenizer_config.json +0 -0
  299. /package/{packages/selector/cordis.patch.yml → cordis.patch.yml} +0 -0
  300. /package/{packages/selector/lib → lib}/client.d.ts +0 -0
  301. /package/{packages/selector/lib → lib}/client.js +0 -0
  302. /package/{packages/selector/lib → lib}/index.d.ts +0 -0
  303. /package/{packages/selector/lib → lib}/invariant.d.ts +0 -0
  304. /package/{packages/selector/lib → lib}/invariant.js +0 -0
  305. /package/{packages/selector/lib → lib}/profiles.d.ts +0 -0
  306. /package/{packages/selector/lib → lib}/pruner.d.ts +0 -0
  307. /package/{packages/selector/lib → lib}/pruner.js +0 -0
  308. /package/{packages/selector/lib → lib}/savings-integral.js +0 -0
  309. /package/{packages/selector/lib → lib}/tail-trim.js +0 -0
  310. /package/{packages/selector/lib → lib}/tool-result.js +0 -0
@@ -1,231 +0,0 @@
1
- [assistant] 改名后 tsc EXIT 0、58 文件全绿、三 bundle 构建完成。补 `Tests` 计数 + 重打 1.4.1 包(替换上轮误留的 1.4.0 tgz)+ 逐字节核验 + 看改名影响哪些 tracked 文件。
2
-
3
-
4
- [tool-call pwsh "{\"command\":\"Set-Location \\\"E:\\\\test\\\\rewrite-agently\\\\mine-dsh-plugins\\\\dsh-browser-cdp\\\"; \\\"=== Tests]
5
- ===
6
- [tool] === Tests 计数 ===
7
-
8
- Tests 850 passed | 12 skipped (862)
9
- === 删旧 1.4.0 tgz, 重打 1.4.1 ===
10
- dsh-browser-cdp-1.4.1.tgz
11
- tgz版本: 1.4.1
12
- tgz SHA: E7F804F6871979B42D4F8145EAB5EABA4FE22C73905F62C8A70B4A6A2DC54E15
13
- build SHA: E7F804F6871979B42D4F8145EAB5EABA4FE22C73905F62C8A70B4A6A2DC54E15
14
- MATCH ✅
15
- tgz大小: 517920 B
16
- === 改名影响 tracked 文件 ===
17
- M CHANGELOG.md
18
- M README.md
19
- M dsh-plugin.json
20
- M package.json
21
- M tests/tool-tiers.test.ts
22
-
23
-
24
- [stderr]
25
- ConvertFrom-Json : 传入的对象无效,应为“:”或“}”。 (1034): {
26
- "$schema": "https://dsh.community/schemas/dsh-plugin-0.15.json",
27
- "id": "dsh-browser-cdp",
28
- "name": "dsh-browser-cdp",
29
- "version": "1.4.1",
30
- "manifestVersion": "0.15",
31
- "facets": {
32
- "host": {
33
- "entry": "lib/index.js",
34
- "apiVersion": "v1alpha1"
35
- }
36
- },
37
- "requires": {
38
- "contracts": [
39
- {
40
- "apiVersion": "presentation.dsh/v1alpha1",
41
- "kind": "OpenExternal",
42
- "optional": true,
43
- "fallback": "report the URL as text instead of opening it"
44
- },
45
- {
46
- "apiVersion": "presentation.dsh/v1alpha1",
47
- "kind": "Notification",
48
- "optional": true,
49
- "fallback": "log the notice to the browser-status scene"
50
- }
51
- ]
52
- },
53
- "permissions": [],
54
- "contributes": {
55
- "commands": [],
56
- "x-dsh-tui": [
57
- {
58
- "apiVersion": "tui.dsh/v1alpha1",
59
- "kind": "Scene",
60
- "id": "dsh-browser-cdp.watch",
61
- "name": "agent_browser",
62
- "spec": {
63
- "title": "Agent 娴忚鍣?,
64
- "titles": {
65
- "en": "Agent Browser",
66
- "zh": "Agent 娴忚鍣?
67
- }
68
- }
69
- },
70
- {
71
- "apiVersion": "tui.dsh/v1alpha1",
72
- "kind": "SettingsSection",
73
- "id": "dsh-browser-cdp.settings",
74
- "name": "dsh_browser_cdp_settings",
75
- "spec": {
76
- "namespace": "dsh-browser-cdp",
77
- "title": "Agent 娴忚鍣?,
78
- "titles": {
79
- "en": "Agent Browser",
80
- "zh": "Agent 娴忚鍣?
81
- },
82
- "fields": [
83
- {
84
- "path": [
85
- "toolInjection"
86
- ],
87
- "label": "宸ュ叿娉ㄥ叆妯″紡 (Tool injection mode)",
88
- "kind": "select",
89
- "options": [
90
- {
91
- "value": "lazy",
92
- "label": "lazy"
93
- },
94
- {
95
- "value": "always",
96
- "label": "always"
97
- }
98
- ],
99
- "hint": "lazy锛堥粯璁わ級= 甯搁┗鏍稿績 7 涓?+ 閫冪敓鑸?2 涓紝鍏朵綑棣栨 bcdp_* 璋冪敤鍚庢寜涓嬫柟寮€鍏虫敞鍏ワ紝闂茬疆鍥炴敹鏃舵敹鍥烇紱always = 鎸傝浇鍗虫敞鍐屽叏
100
- 閮?38 涓紙鍘嗗彶琛屼负锛夈€?
101
- },
102
- {
103
- "path": [
104
- "toolBrowse"
105
- ],
106
- "label": "鍩虹鎿嶄綔宸ュ叿锛?6 涓級",
107
- "kind": "boolean",
108
- "hint": "寮€锛堥粯璁わ級= 娴忚鍣ㄦ椿鍔ㄥ悗鎸?act 鈫?observe 鈫?wait 涓夋尝鏀捐锛涘叧 = 16 涓伐鍏蜂粠妯″瀷宸ュ叿鍒楄〃绉婚櫎锛堢偣鍑?濉啓/閿紶/鎷栨嫿/鎴浘/
109
- 璇诲彇/绛夊緟鈥︼級銆?
110
- },
111
- {
112
- "path": [
113
- "toolExtended"
114
- ],
115
- "label": "鎵╁睍鑳藉姏宸ュ叿锛? 涓級",
116
- "kind": "boolean",
117
- "hint": "寮€锛堥粯璁わ級= 娴忚鍣ㄦ椿鍔ㄥ悗娉ㄥ唽锛涘叧 = 8 涓伐鍏风Щ闄わ紙瑁?CDP/HTTP/涓婁紶/涓嬭浇/瀵硅瘽妗?楠岃瘉鐮?鐧诲綍钀界洏/鐧诲綍瀵煎叆锛夈€?
118
- },
119
- {
120
- "path": [
121
- "toolEscape"
122
- ],
123
- "label": "閫冪敓鑸?cli / script锛? 涓級",
124
- "kind": "boolean",
125
- "hint": "濮嬬粓鍙敤鈥斺€斾笌鍏跺畠妗d笉鍚岋紝瀹冧笉绛夋祻瑙堝櫒娲诲姩锛屽洜涓轰竴涓?heredoc 灏辫兘鍋氬埌鍏朵綑 36 涓伐鍏风殑浜嬨€傚叧 = 灏佸嵃銆?
126
- },
127
- {
128
- "path": [
129
- "toolJudge"
130
- ],
131
- "label": "璇勫宸ュ叿 bcdp_jev_*锛? 涓級",
132
- "kind": "boolean",
133
- "hint": "寮€浠嶉渶閰嶄簡 JEV 鎴?Laya Key锛氭病 Key 鐨勮瘎瀹″伐鍏峰彧鑳藉洖绛斻€屾湭閰嶇疆銆嶏紝渚濇棫涓嶆敞鍏ャ€傚叧 = 浠讳綍鎯呭喌涓嬮兘涓嶆敞鍏ャ€?
134
- },
135
- {
136
- "path": [
137
- "isolateSpaces"
138
- ],
139
- "label": "浠诲姟绌洪棿娌欑洅闅旂 (Space isolation)",
140
- "kind": "boolean",
141
- "hint": "榛樿鍏抽棴锛氫娇鐢ㄧ鐩樻寔涔呭寲 Profile锛屼换鍔′腑鐧诲綍鐨勮处鍙疯法鐢佃剳閲嶅惎姘镐箙淇濈暀锛涘紑鍚悗浣跨敤鍐呭瓨涓存椂娌欑洅闅旂锛屼换鍔$粨鏉熶笉钀界洏銆?
142
- },
143
- {
144
- "path": [
145
- "idleTimeoutMin"
146
- ],
147
- "label": "绌洪棽鑷姩鍥炴敹 (Idle auto-stop, minutes)",
148
- "kind": "number",
149
- "hint": "N 鍒嗛挓娌℃湁浠讳綍 bcdp_* 璋冪敤鍚庤嚜鍔ㄥ叧闂悗鍙版祻瑙堝櫒杩涚▼锛? = 鍏抽棴姝ゅ姛鑳斤級銆備笅娆¤皟鐢ㄤ細鑷姩鍐峰惎鍔紙绾?2-4 绉掞級銆傝瀵熺獥姝e湪瑙傜湅涓嶇畻
150
- 娲诲姩銆?
151
- },
152
- {
153
- "path": [
154
- "chromePath"
155
- ],
156
- "label": "Browser binary path",
157
- "kind": "text",
158
- "hint": "Path to the Chrome/Chromium/Edge binary. Empty = auto-detect."
159
- },
160
- {
161
- "path": [
162
- "captureBackend"
163
- ],
164
- "label": "Capture backend",
165
- "kind": "select",
166
- "options": [
167
- {
168
- "value": "auto",
169
- "label": "Auto"
170
- },
171
- {
172
- "value": "cdp",
173
- "label": "CDP"
174
- },
175
- {
176
- "value": "ffmpeg",
177
- "label": "FFmpeg"
178
- }
179
- ]
180
- },
181
- {
182
- "path": [
183
- "streamProfile"
184
- ],
185
- "label": "Quality profile",
186
- "kind": "select",
187
- "options": [
188
- {
189
- "value": "balanced",
190
- "label": "Balanced"
191
- },
192
- {
193
- "value": "quality",
194
- "label": "Quality"
195
- },
196
- {
197
- "value": "speed",
198
- "label": "Speed"
199
- }
200
- ]
201
- },
202
- {
203
- "path": [
204
- "ffmpegPath"
205
- ],
206
- "label": "FFmpeg binary path",
207
- "kind": "text",
208
- "hint": "Path to ffmpeg. Empty = auto-detect / on-demand install."
209
- }
210
- ]
211
- }
212
- }
213
- ]
214
- },
215
- "subscriptions": [],
216
- "license": "MIT",
217
- "source": {
218
- "repository": "https://github.com/drscrewdriver/dsh-browser-cdp"
219
- },
220
- "compat": {
221
- "hosts": [
222
- "dsh-tui"
223
- ]
224
- }
225
- }
226
- 所在位置 行:1 字符: 703
227
- + ... -Content "_p\package\dsh-plugin.json" -Raw | ConvertFrom-Json).versio ...
228
- + ~~~~~~~~~~~~~~~~
229
- + CategoryInfo : NotSpecified: (:) [ConvertFrom-Json], ArgumentException
230
- + FullyQualifiedErrorId : System.ArgumentException,Microsoft.PowerShell.Commands.ConvertFromJsonCommand
231
-
@@ -1,236 +0,0 @@
1
- [assistant] [tool-call pwsh "{\"command\":\"$p = \\\"C:\\\\Users\\\\joshua\\\\.dsh\\\\profiles\\\\desktop\\\"\\nGet-ChildItem $p -Directory | Select]
2
- [tool-call pwsh "{\"command\":\"\\\"=== npm registry latest ===\\\"\\ntry { (Invoke-WebRequest -UseBasicParsing -Uri \\\"https://registr]
3
- ===
4
- [tool]
5
- Name
6
- ----
7
- .dsh-market
8
- .plugin-manager
9
- node_modules
10
- ---- installed plugin version ----
11
- C:\Users\joshua\.dsh\profiles\desktop\node_modules\dsh-browser-cdp\package.json
12
- 1.2.4
13
- ---- search anywhere ----
14
-
15
-
16
-
17
-
18
-
19
-
20
-
21
- ===
22
- [tool] === npm registry latest ===
23
- latest: 1.2.4
24
- versions: 0.0.1, 0.17.0, 0.17.1, 0.17.2, 0.17.3, 0.17.4, 0.18.0, 0.17.5, 0.18.1, 0.17.6, 0.18.2, 0.17.7, 0.18.3, 0.17.8, 0.18.4, 0.17.9, 0.18.6, 0.17.10, 0.18.7, 0.17.11, 0.18.8, 0.17.12, 0.18.9, 0.17.13, 0.17.14, 0.18.11, 0.17.15, 0.18.12, 0.17.16, 0.18.13, 0.18.10, 0.17.17, 0.18.14, 0.17.18, 0.18.15, 0.18.16, 0.17.19, 0.18.5, 0.17.20, 0.18.17, 0.17.21, 0.18.18, 0.17.22, 0.17.23, 0.18.19, 0.16.23, 0.16.24, 0.18.21, 0.17.25, 1.1.5, 1.2.0, 1.2.1, 1.2.2, 1.2.3, 1.2.4
25
- modified: 2026-10-20T19:25:47.962Z
26
-
27
- ===
28
- [assistant] 本地已安装 **1.2.4**,npm latest 也是 **1.2.4**(发布于昨天 19:25Z),所以“更新”这一步已经完成。关键问题变成:**1.2.4 里到底有没有修 `--sdk-path` 贯通**。直接查已安装的 dist 产物:
29
- [tool-call pwsh "{\"command\":\"$d = \\\"C:\\\\Users\\\\joshua\\\\.dsh\\\\profiles\\\\desktop\\\\node_modules\\\\dsh-browser-cdp\\\"\\nG]
30
- [tool-call pwsh "{\"command\":\"$d = \\\"C:\\\\Users\\\\joshua\\\\.dsh\\\\profiles\\\\desktop\\\\node_modules\\\\dsh-browser-cdp\\\"\\n\]
31
- ===
32
- [tool]
33
- Name Length
34
- ---- ------
35
- bin
36
- lib
37
- runtime
38
- cordis.patch.yml 945
39
- dsh-plugin.json 6068
40
- LICENSE 1387
41
- package.json 3858
42
- README.de.md 37862
43
- README.es.md 39073
44
- README.fr.md 40011
45
- README.it.md 38438
46
- README.md 37087
47
- README.ru.md 56945
48
- THIRD_PARTY_NOTICES.md 4323
49
- ---- dist files ----
50
- 227805
51
- 28203
52
- 5672
53
- 188301
54
- 357880
55
- 12470
56
- 588
57
- 412234
58
- 1437
59
- 14754
60
- 2259
61
- 32835
62
- 55062
63
- 2752
64
- 1781
65
- 1378
66
- 6743
67
- 16260
68
- 12705
69
- 16113
70
- 4495
71
- 27329
72
- 11557
73
- 3741
74
- 373
75
- 1147
76
- 458
77
- 978
78
- 1052
79
-
80
-
81
-
82
- ===
83
- [tool] === grep sdk-path ===
84
- --- C:\Users\joshua\.dsh\profiles\desktop\node_modules\dsh-browser-cdp\lib\client.js
85
- L106: useSdkPath: false,
86
- L2311: checked: row.useSdkPath === true,
87
- L2315: writeLinks(updateRow(links, row.id, { useSdkPath: next }));
88
- --- C:\Users\joshua\.dsh\profiles\desktop\node_modules\dsh-browser-cdp\lib\index.js
89
- L989: return /unknown option.*sdk-path|unrecognized option.*sdk-path|invalid option.*sdk-path/i.test(text);
90
- L1061: const sdkArgs = input.useSdkPath === true && (input.sdkPath ?? "") !== "" ? ["--sdk-path", input.sdkPath] : [];
91
- L1069: let result = await runHeredoc(sdkArgs);
92
- L1070: if (sdkArgs.length > 0 && looksLikeUnknownSdkFlag(result.stdout + result.stderr)) {
93
- L1071: warning = "this ego CLI does not support --sdk-path; retried with the CLI's own harness";
94
- L1096: const facadesOk = input.useSdkPath !== true || facadeMatch?.[1] === "object" && facadeMatch?.[2] === "object";
95
- L1234: ...rec.useSdkPath === void 0 ? {} : { useSdkPath: Boolean(rec.useSdkPath) }
96
- L1500: useSdkPath: link.useSdkPath === true,
97
- L1501: sdkPath: input.sdkPath ?? "",
98
- L1523: sdkPath: link.useSdkPath === true && probe.warning === void 0 ? input.sdkPath ?? "" : "",
99
- L2652: useSdkPath: z.boolean(),
100
- L2746: * `--headless` is managed by EGO_LINUX_HEADLESS; `--sdk-path` is allowed.
101
- L3101: sdkPath: fileURLToPath(new URL("../runtime/ego-browser/dist/out/index.js", import.meta.url)),
102
- L7459: * R1 — argv for one tool run. Single source of truth for the `--sdk-path`
103
- L7466: const sdkArgs = attach.linkKind === EGO_CLI_KIND && (attach.sdkPath ?? "") !== "" ? ["--sdk-path", attach.sdkPath] : [];
104
- L7470: ...sdkArgs,
105
- L7895: sdkPath: fileURLToPath(new URL("../runtime/ego-browser/dist/out/index.js", import.meta.url)),
106
- --- C:\Users\joshua\.dsh\profiles\desktop\node_modules\dsh-browser-cdp\runtime\ego-linux\bin\ego-browser.mjs
107
- L365: // `--sdk-path <file>` selects which harness bundle to run. Upstream's real
108
- L369: const sdkFlag = rest.indexOf("--sdk-path");
109
- L373: process.stderr.write("--sdk-path requires a path\n");
110
-
111
- ===
112
- [assistant] 1.2.4 的 dist 里出现了 `R1 — argv for one tool run. Single source of truth for the --sdk-path`、`probe.warning === void 0` 守卫、`facadeMatch` 校验 —— 这几乎就是我们计划里 Phase 1/2 的内容。先读实锤:
113
- [tool-call pwsh "{\"command\":\"$f = \\\"C:\\\\Users\\\\joshua\\\\.dsh\\\\profiles\\\\desktop\\\\node_modules\\\\dsh-browser-cdp\\\\lib\]
114
- [tool-call pwsh "{\"command\":\"$f = \\\"C:\\\\Users\\\\joshua\\\\.dsh\\\\profiles\\\\desktop\\\\node_modules\\\\dsh-browser-cdp\\\\lib\]
115
- ===
116
- [tool] ===== 7440-7500 =====
117
- 7451: ...prefix,
118
- 7452: "nodejs",
119
- 7453: ...sdkArgs,
120
- 7454: ...extraCliArgs
121
- 7455: ];
122
- 7456: }
123
- 7457: async function runEgoScript(subprocess, script, exec, cfg, graceOverrideMs) {
124
- 7458: let handle;
125
- 7459: try {
126
- 7460: const attach = defaultAttachCache.get();
127
- 7461: handle = subprocess.spawn({
128
- 7462: argv: buildEgoToolArgv(cfg.egoArgvPrefix, attach, cfg.runtimeArgs ?? ""),
129
- 7463: cwd: process.cwd(),
130
- 7464: env: resolveEgoEnv(cfg),
131
- 7465: stdio: {
132
- 7466: stdin: { data: script },
133
- 7467: stdout: {
134
- 7468: maxBytes: cfg.maxOutputBytes,
135
- 7469: spill: { maxBytes: cfg.maxOutputBytes }
136
- 7470: },
137
- 7471: stderr: {
138
- 7472: maxBytes: 512e3,
139
- 7473: spill: { maxBytes: 2e6 }
140
- 7474: }
141
- 7475: },
142
- 7476: graceMs: Number.isFinite(graceOverrideMs) && graceOverrideMs > 0 ? graceOverrideMs : cfg.graceMs,
143
- 7477: ...exec.signal !== void 0 ? { signal: exec.signal } : {}
144
- 7478: });
145
- 7479: } catch (err) {
146
- 7480: return {
147
- 7481: ok: false,
148
- 7482: error: describeSpawnFailure(err),
149
- 7483: stdout: "",
150
- 7484: stderr: ""
151
- 7485: };
152
- 7486: }
153
- 7487: let outcome;
154
- 7488: try {
155
- 7489: outcome = await handle.done;
156
- 7490: } catch (err) {
157
- 7491: return {
158
- 7492: ok: false,
159
- 7493: error: describeSpawnFailure(err),
160
- 7494: stdout: "",
161
- 7495: stderr: ""
162
- 7496: };
163
- 7497: }
164
- 7498: const stdout = readAll(handle.collected.stdout);
165
- 7499: const stderr = readAll(handle.collected.stderr);
166
- 7500: if (exec.signal !== void 0 && exec.signal.aborted) return {
167
- 7501: ok: false,
168
-
169
- ===
170
- [tool] ===== 1480-1545 =====
171
- 1481: targetId: link.id,
172
- 1482: endpoint: "",
173
- 1483: wsUrl: "",
174
- 1484: linkKind: EGO_CLI_KIND
175
- 1485: };
176
- 1486: const io = input.cliIo;
177
- 1487: if (!io) return cache.patch({
178
- 1488: ...base,
179
- 1489: status: "unreachable",
180
- 1490: code: "cli-io-missing",
181
- 1491: message: "the host did not provide CLI IO for the local ego CLI link",
182
- 1492: resolvedAt: now()
183
- 1493: });
184
- 1494: const probe = await probeCliLink({
185
- 1495: cliPath: link.cliPath,
186
- 1496: bundled: input.bundledCli ?? "",
187
- 1497: useSdkPath: link.useSdkPath === true,
188
- 1498: sdkPath: input.sdkPath ?? "",
189
- 1499: timeoutMs: input.timeoutMs
190
- 1500: }, io);
191
- 1501: if (!probe.ok) return cache.patch({
192
- 1502: ...base,
193
- 1503: status: "unreachable",
194
- 1504: code: probe.code,
195
- 1505: message: probe.message,
196
- 1506: cliPath: probe.cliPath,
197
- 1507: cliShape: probe.shape,
198
- 1508: latencyMs: probe.latencyMs,
199
- 1509: resolvedAt: now()
200
- 1510: });
201
- 1511: const coldStart = probe.running === false;
202
- 1512: return cache.patch({
203
- 1513: ...base,
204
- 1514: status: "ready",
205
- 1515: endpointSource: coldStart ? "cli-launch" : "cli",
206
- 1516: code: "",
207
- 1517: message: probe.warning ?? (coldStart ? "local ego CLI reachable; the backing browser is not running yet and will start on the first call" : "local ego CLI ready"),
208
- 1518: cliPath: probe.cliPath,
209
- 1519: cliShape: probe.shape,
210
- 1520: sdkPath: link.useSdkPath === true && probe.warning === void 0 ? input.sdkPath ?? "" : "",
211
- 1521: latencyMs: probe.latencyMs,
212
- 1522: resolvedAt: now()
213
- 1523: });
214
- 1524: }
215
- 1525: /**
216
- 1526: * Lightpanda backend 鈥?ensure the managed serve for an activated `lightpanda`
217
- 1527: * row, then probe its endpoint. The launcher owns launch/reuse/exclusivity
218
- 1528: * (a live managed Chrome loses the singleton slot to the serve and vice
219
- 1529: * versa); `engine` is stamped from the ROW 鈥?the source the user picked 鈥?and
220
- 1530: * `/json/version`'s `Browser: Lightpanda/鈥 merely re-confirms it.
221
- 1531: */
222
- 1532: async function refreshLightpandaAttach(input, cache, suggested, link, now) {
223
- 1533: const base = {
224
- 1534: ...suggested,
225
- 1535: targetId: link.id,
226
- 1536: endpoint: "",
227
- 1537: wsUrl: "",
228
- 1538: linkKind: LP_KIND
229
- 1539: };
230
- 1540: const launch = await launchLocalBrowser({
231
- 1541: engine: "lightpanda",
232
- 1542: lightpandaPath: link.servePath ?? "",
233
- 1543: lightpandaArgs: input.lightpandaArgs
234
- 1544: }, input.launcherIo);
235
- 1545: if (!launch.ok) return cache.patch({
236
- 1546: ...base,
@@ -1,220 +0,0 @@
1
- [assistant] 1.2.5 已上架。现在核对 dist-tag,看 latest 是否已经指向它:
2
- [tool-call pwsh "{\"command\":\"\\\"=== dist-tags ===\\\"\\n& npm view dsh-browser-cdp dist-tags --json --registry=https://registry.npmj]
3
- ===
4
- [tool] === dist-tags ===
5
- {
6
- "beta-0.2.0": "0.18.21",
7
- "beta-0.1.7": "0.17.25",
8
- "dsh-0.1.5": "1.2.0",
9
- "dsh-0.1.7": "1.2.0",
10
- "dsh-0.2.0": "1.2.0",
11
- "dsh-1.1.0": "1.2.5",
12
- "dsh-0.2.1-rc.2": "1.2.4",
13
- "latest": "1.2.4"
14
- }
15
-
16
- === 1.2.5 元数据 ===
17
- 发布时间 = 2026-10-20T20:10:29.549Z
18
- shasum = 8e550108a43372fcce34119ada2d87ed8b0323fb
19
- integrity= sha512-fIQEeKXvpQvZH9z+MyA2iK8m1yPPZ5s3didrgxlKGPSx60bc6HgpkS+Ct5IUmHfAf23eY6mhdFEds/vCvQzbJA==
20
- latest = 1.2.4
21
-
22
- === tarball 探测 ===
23
- HTTP 200 length=
24
-
25
- ===
26
- [assistant] [tool-call pwsh "{\"command\":\"$reg = \\\"https://registry.npmjs.org\\\"\\n\\\"=== 1) latest -> 1.2.5 ===\\\"\\n& npm dist-tag add dsh-]
27
- ===
28
- [tool] === 1) latest -> 1.2.5 ===
29
- +latest: dsh-browser-cdp@1.2.5
30
- === 2) dsh-0.2.1-rc.2 -> 1.2.5 ===
31
- +dsh-0.2.1-rc.2: dsh-browser-cdp@1.2.5
32
- === 3) dsh-1.1.0 复位 -> 1.2.1 ===
33
- +dsh-1.1.0: dsh-browser-cdp@1.2.1
34
-
35
- === 结果 ===
36
- {
37
- "beta-0.2.0": "0.18.21",
38
- "beta-0.1.7": "0.17.25",
39
- "dsh-0.1.5": "1.2.0",
40
- "dsh-0.2.0": "1.2.0",
41
- "dsh-0.1.7": "1.2.0",
42
- "latest": "1.2.5",
43
- "dsh-0.2.1-rc.2": "1.2.5",
44
- "dsh-1.1.0": "1.2.1"
45
- }
46
-
47
- ===
48
- [assistant] dist-tags 已经修正:latest 指向 1.2.5,dsh-1.1.0 恢复为 1.2.1。现在把引发问题的 `publishConfig.tag` 一并修掉,并核对 tarball 内容:
49
- [tool-call pwsh "{\"command\":\"$pj = \\\"E:\\\\test\\\\rewrite-agently\\\\mine-dsh-plugins\\\\dsh-browser-cdp\\\\package.json\\\"\\n\\\]
50
- ===
51
- [tool] === publishConfig 段 ===
52
- "publishConfig": {
53
- "registry": "https://registry.npmjs.org",
54
- "tag": "dsh-1.1.0"
55
- }
56
- }
57
-
58
- === 下载 tarball 校验内容 ===
59
- 下载大小 = 508738 B
60
- lib/index.js 大小 = 359246
61
- mergeCliOutput 出现次数 = 12
62
- 包内 version = 1.2.5
63
- 与本地构建 SHA256 一致 = True
64
-
65
- ===
66
- [assistant] Tarball 校验通过:其中包含 `mergeCliOutput` ×12,版本为 1.2.5,与本地构建的 SHA256 完全一致。现在修掉 `publishConfig.tag` 这个隐患:
67
- [tool-call apply_patch "{\"patch\":\"*** Begin Patch\\n*** Update File: E:\\\\test\\\\rewrite-agently\\\\mine-dsh-plugins\\\\dsh-browser-cdp\\\]
68
- [tool-call read "{\"file_path\":\"E:\\\\test\\\\rewrite-agently\\\\.agents\\\\plans\\\\browser-cdp-stderr-merge\\\\checklist.md\"}"]
69
- ===
70
- [tool] Applied patch: 1 file(s), 0 added, 1 modified, 0 deleted, +1 -1 lines
71
- M E:\test\rewrite-agently\mine-dsh-plugins\dsh-browser-cdp\package.json
72
- ===
73
- [tool] <path>E:\test\rewrite-agently\.agents\plans\browser-cdp-stderr-merge\checklist.md</path>
74
- <type>file</type>
75
- <content>
76
- 1: # Checklist
77
- 2:
78
- 3: > 勾选点位约定:完成时 `- [ ]`→`- [x]`,行尾追加 `✅ <证据/实测值>(YYYY-MM-DD)`;
79
- 4: > 未过项保持原样,不得预勾。
80
- 5:
81
- 6: ## Must Pass
82
- 7:
83
- 8: ### 代码层
84
- 9: - [ ] `mergeCliOutput` 三态正确:仅 stdout / 仅 stderr / 两者都有(顺序 stdout 在前)
85
- 10: - [ ] `probeCliLink` 在「哨兵只在 stderr」时判 `ok: true`
86
- 11: - [ ] `probeCliLink` 在「facades 只在 stderr」且 `useSdkPath: true` 时判 `ok: true`
87
- 12: - [ ] `probeCliLink` 在 stderr 含噪音行 + 哨兵行时仍能取到哨兵
88
- 13: - [ ] `parseSentinel` 能从合并文本取到 `@@DSH_RESULT@@` 载荷
89
- 14: - [ ] `parseStatusFacades` 能处理 `\r\n` 行尾
90
- 15: - [ ] `bcdp_status` 的 facades 来自 stdout+stderr 合并
91
- 16:
92
- 17: ### 运行层
93
- 18: - [ ] `bcdp_status` 返回 `available: true` 且 `facades.taskSpaces === "object"`、`facades.browser === "object"`
94
- 19: - [ ] `POST /bcdp/api/cdp-status` 的 attach 为 `status: "ready"`、`linkKind: "ego-cli"`、`sdkPath` 非空
95
- 20: - [ ] `bcdp_navigate https://www.baidu.com` 返回成功且页面标题含「百度」
96
- 21: - [ ] `bcdp_snapshot` 或 `bcdp_page_info` 能返回真实页面内容
97
- 22: - [ ] `bcdp_script` 返回的 `output` 字段非空(不再是空串)
98
- 23:
99
- 24: ### 工程层
100
- 25: - [ ] `pnpm run typecheck` 通过(两条 tsconfig 均无错误)
101
- 26: - [ ] `pnpm test` 全量通过,新增用例全绿
102
- 27: - [ ] `pnpm run build` 产物成功生成
103
- 28: - [ ] 仓库 `lib/index.js` 与 profile 副本 SHA256 一致
104
- 29: - [ ] `package.json` 版本为 `1.2.5`
105
- 30:
106
- 31: ## Should Pass
107
- 32:
108
- 33: - [ ] `stderr` 的 `maxBytes` / `spill` 已对齐 `cfg.maxOutputBytes`(4 MiB)
109
- 34: - [ ] 错误文案由 `found on stdout` 改为 `found on stdout/stderr`
110
- 35: - [ ] 大输出(> 512 KB)不被截断
111
- 36: - [ ] `bcdp_cli` / `bcdp_script` 的 `stdout` / `stderr` 原始字段语义未被改变
112
- 37: - [ ] 既有 `cli-link.test.ts` 26 个用例无回归
113
- 38: - [ ] vendored CLI 路线(输出在 stdout)仍判 ready
114
- 39: - [ ] `git diff` 仅涉及本计划列出的文件
115
- 40:
116
- 41: ## 不可接受
117
- 42:
118
- 43: - [ ] 通过只改 profile 副本"修好"(仓库未同步)
119
- 44: - [ ] 通过放宽判据(例如只查 `exitCode === 0`)让探针通过
120
- 45: - [ ] 删除或跳过既有测试用例
121
- 46: - [ ] 修改 `--sdk-path` 拼装逻辑
122
-
123
- (End of file - total 46 lines)
124
- </content>
125
- ===
126
- [assistant] [tool-call pwsh "{\"command\":\"$repo = \\\"E:\\\\test\\\\rewrite-agently\\\\mine-dsh-plugins\\\\dsh-browser-cdp\\\"\\n\\\"=== git statu]
127
- ===
128
- [tool] === git status ===
129
- M lib/index.js
130
- M package.json
131
- M src/cdp/cli-link.ts
132
- M src/index.ts
133
- M tests/cli-link.test.ts
134
- M tests/status-facade.test.ts
135
- ?? tests/cli-stream-merge.test.ts
136
-
137
- === diff 文件清单 ===
138
- lib/index.js
139
- package.json
140
- src/cdp/cli-link.ts
141
- src/index.ts
142
- tests/cli-link.test.ts
143
- tests/status-facade.test.ts
144
-
145
- === 未跟踪新增 ===
146
- tests/cli-stream-merge.test.ts
147
- [stderr]
148
- warning: in the working copy of 'src/index.ts', CRLF will be replaced by LF the next time Git touches it
149
-
150
- ===
151
- [assistant] 改动文件都在计划范围内,没有多余文件。现在核对测试文件用例数,用于回写清单:
152
- [tool-call pwsh "{\"command\":\"cd \\\"E:\\\\test\\\\rewrite-agently\\\\mine-dsh-plugins\\\\dsh-browser-cdp\\\"\\n& pnpm vitest run test]
153
- ===
154
- [tool] ✓ tests/cli-link.test.ts (25 tests) 13ms
155
- ✓ tests/cli-stream-merge.test.ts (9 tests) 5ms
156
- ✓ tests/status-facade.test.ts (6 tests) 5ms
157
-
158
-
159
- Test Files 3 passed (3)
160
- Tests 40 passed (40)
161
- Start at 04:15:37
162
- Duration 1.47s (transform 401ms, setup 0ms, collect 1.33s, tests 23ms, environment 1ms, prepare 612ms)
163
-
164
- [stderr]
165
- }
166
- }
167
-
168
- ===
169
- [assistant] 需要核实 `cli-link.test.ts` 的用例数:计划里写的是「既有 26 例」,现在总共只有 25 例(含新增的 3 例),原文件应为 22 例。必须确认没有误删:
170
- [tool-call pwsh "{\"command\":\"cd \\\"E:\\\\test\\\\rewrite-agently\\\\mine-dsh-plugins\\\\dsh-browser-cdp\\\"\\n\\\"=== HEAD 版 it( 数量 ]
171
- ===
172
- [tool] === HEAD 版 it( 数量 ===
173
- HEAD it() = 22
174
- === 工作区 it( 数量 ===
175
- work it() = 25
176
-
177
- === diff 只应新增(无删除行)===
178
- 39 0 tests/cli-link.test.ts
179
-
180
- === 被删除的行(应为空)===
181
-
182
- ===
183
- [assistant] 确认无误:HEAD 版原本有 22 例,现在有 25 例,diff 为 `+39/-0`,没有删除任何行。计划里写的「26 例」是笔误,实际基线是 22 例。现在回写 checklist:
184
- [tool-call write "{\"content\":\"# Checklist\\n\\n> 勾选点位约定:完成时 `- [ ]`→`- [x]`,行尾追加 `✅ <证据/实测值>(YYYY-MM-DD)`;\\n> 未过项保持原样,不得预勾。\\n\\n## M]
185
- ===
186
- [tool] <path>E:\test\rewrite-agently\.agents\plans\browser-cdp-stderr-merge\checklist.md</path>
187
- <type>file</type>
188
- <content>
189
- Updated file
190
- </content>
191
- ===
192
- [assistant] [tool-call pwsh "{\"command\":\"$repo = \\\"E:\\\\test\\\\rewrite-agently\\\\mine-dsh-plugins\\\\dsh-browser-cdp\\\"\\n\\\"=== 最终一致性核验 =]
193
- ===
194
- [tool] === 最终一致性核验 ===
195
- repo lib SHA256 = 30378B940065431689F4654C8A130C43A384616205FA211DC1F2CE3FFB0C5DAF
196
- prof lib SHA256 = 30378B940065431689F4654C8A130C43A384616205FA211DC1F2CE3FFB0C5DAF
197
- 一致 = True
198
-
199
- === 版本三侧 ===
200
- repo package.json = 1.2.5
201
- prof package.json = 1.2.5
202
- npm latest = 1.2.5
203
- npm 1.2.5 时间 = 2026-10-20T20:10:29.549Z (本地 04:10:29)
204
-
205
- === publishConfig 已修 ===
206
- {"registry":"https://registry.npmjs.org","tag":"latest"}
207
-
208
- ===
209
- [assistant] 构建与发布已完成,三侧结果一致。最后提交仓库改动:
210
- [tool-call pwsh "{\"command\":\"cd \\\"E:\\\\test\\\\rewrite-agently\\\\mine-dsh-plugins\\\\dsh-browser-cdp\\\"\\n\\\"=== remote ===\\\"]
211
- ===
212
- [tool] === remote ===
213
- origin git@github.com:drscrewdriver/dsh-browser-cdp.git (fetch)
214
- origin git@github.com:drscrewdriver/dsh-browser-cdp.git (push)
215
-
216
- === 分支与上游 ===
217
- unified/15rc
218
- d7b6ebd feat(1.2.4): --sdk-path execution injection, facade status probe, ego-cli gating, schema compression
219
- 2e9becd fix(1.2.3): issue #1 + #2 — login_import schema fields, import error typing, family-host uSES crash backstop
220
- 21a7b57 hosts: add 0.2.1-rc.2 (declaration-level enum; 34/34 host peers npm-verified; sync-hosts artifacts; release 1.2.2)