@eddyskywalker/dsh-chatgpt-subscription 0.59.0 → 0.61.0

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 (75) hide show
  1. package/CHANGELOG.md +42 -0
  2. package/README.md +1 -1
  3. package/lib/client.js +1578 -232
  4. package/lib/client.js.map +1 -1
  5. package/lib/codemode.js +795 -178
  6. package/lib/entry-plan-mode-CLRKkgYG.js +1787 -0
  7. package/lib/{entry-progress-updates-CxQewio9.js → entry-progress-updates-DZ0ZRus4.js} +14 -1
  8. package/lib/index.js +1079 -754
  9. package/lib/llm-compat-u9mor0uu.js +110 -0
  10. package/lib/plan-mode.js +2 -779
  11. package/lib/progress-updates.js +1 -1
  12. package/lib/types/client/codemode/CodeRunToolView.d.ts +68 -0
  13. package/lib/types/client/codemode/CodeRunToolView.d.ts.map +1 -0
  14. package/lib/types/client/codemode/highlight.d.ts +25 -0
  15. package/lib/types/client/codemode/highlight.d.ts.map +1 -0
  16. package/lib/types/client/codemode/styles.d.ts +11 -0
  17. package/lib/types/client/codemode/styles.d.ts.map +1 -0
  18. package/lib/types/client/codemode/tool-name.d.ts +10 -0
  19. package/lib/types/client/codemode/tool-name.d.ts.map +1 -0
  20. package/lib/types/client/index.d.ts.map +1 -1
  21. package/lib/types/client/locales-ru/hub.d.ts.map +1 -1
  22. package/lib/types/client/locales.d.ts +23 -1
  23. package/lib/types/client/locales.d.ts.map +1 -1
  24. package/lib/types/compat.d.ts +1 -1
  25. package/lib/types/entry-codemode.d.ts.map +1 -1
  26. package/lib/types/entry-plan-mode.d.ts +136 -0
  27. package/lib/types/entry-plan-mode.d.ts.map +1 -1
  28. package/lib/types/host/agent-preset.d.ts.map +1 -1
  29. package/lib/types/host/claude/adapter.d.ts +16 -0
  30. package/lib/types/host/claude/adapter.d.ts.map +1 -1
  31. package/lib/types/host/claude/client.d.ts +7 -1
  32. package/lib/types/host/claude/client.d.ts.map +1 -1
  33. package/lib/types/host/claude/mapper.d.ts +9 -0
  34. package/lib/types/host/claude/mapper.d.ts.map +1 -1
  35. package/lib/types/host/claude/types.d.ts +10 -0
  36. package/lib/types/host/claude/types.d.ts.map +1 -1
  37. package/lib/types/host/cline-pass/mapper.d.ts.map +1 -1
  38. package/lib/types/host/codemode/discovery.d.ts.map +1 -1
  39. package/lib/types/host/codemode/executor.d.ts.map +1 -1
  40. package/lib/types/host/codemode/rules.d.ts +16 -6
  41. package/lib/types/host/codemode/rules.d.ts.map +1 -1
  42. package/lib/types/host/codemode/transport.d.ts +120 -41
  43. package/lib/types/host/codemode/transport.d.ts.map +1 -1
  44. package/lib/types/host/command-code/mapper.d.ts.map +1 -1
  45. package/lib/types/host/command-code/model-catalog.d.ts +14 -14
  46. package/lib/types/host/command-code/model-catalog.d.ts.map +1 -1
  47. package/lib/types/host/command-code/routes.d.ts.map +1 -1
  48. package/lib/types/host/common/orphan-tool-calls.d.ts +48 -0
  49. package/lib/types/host/common/orphan-tool-calls.d.ts.map +1 -0
  50. package/lib/types/host/dispatch-execution-guard.d.ts +32 -2
  51. package/lib/types/host/dispatch-execution-guard.d.ts.map +1 -1
  52. package/lib/types/host/glm-coding-plan/mapper-anthropic.d.ts.map +1 -1
  53. package/lib/types/host/glm-coding-plan/mapper-openai.d.ts.map +1 -1
  54. package/lib/types/host/kimi-code/mapper.d.ts.map +1 -1
  55. package/lib/types/host/minimax-code/mapper.d.ts.map +1 -1
  56. package/lib/types/host/model-catalog.d.ts +21 -0
  57. package/lib/types/host/model-catalog.d.ts.map +1 -1
  58. package/lib/types/host/opendesign/mapper.d.ts.map +1 -1
  59. package/lib/types/host/plan-mode-cache-guard.d.ts.map +1 -1
  60. package/lib/types/host/preset-sync.d.ts +19 -4
  61. package/lib/types/host/preset-sync.d.ts.map +1 -1
  62. package/lib/types/host/progress-updates/nudge.d.ts +13 -1
  63. package/lib/types/host/progress-updates/nudge.d.ts.map +1 -1
  64. package/lib/types/host/qoder/mapper.d.ts.map +1 -1
  65. package/lib/types/host/responses-client.d.ts.map +1 -1
  66. package/lib/types/host/responses-mapper.d.ts +12 -0
  67. package/lib/types/host/responses-mapper.d.ts.map +1 -1
  68. package/lib/types/host/settled-job-guard.d.ts +77 -0
  69. package/lib/types/host/settled-job-guard.d.ts.map +1 -0
  70. package/lib/types/host/step-code/mapper.d.ts.map +1 -1
  71. package/lib/types/host/workbuddy/mapper.d.ts.map +1 -1
  72. package/lib/types/index.d.ts.map +1 -1
  73. package/package.json +1 -1
  74. package/presets/dispatch/README.md +8 -13
  75. package/presets/dispatch/agent.cordis.yml +11 -16
@@ -154,11 +154,24 @@ function createProgressUpdateTool(deps) {
154
154
  }
155
155
  //#endregion
156
156
  //#region src/host/progress-updates/nudge.ts
157
- /** 注入到模型上下文里的催促正文。 */
157
+ /**
158
+ * 注入到模型上下文里的催促正文。
159
+ *
160
+ * 措辞要覆盖**两种调用面**:工具清单里直接有这个名字时直接调;Code Mode / PTC 下模型
161
+ * 只看得见那个**程序传输工具**,其余工具要经程序里的 `tools.<name>` 调。只点名直呼形式
162
+ * 时,模型会照着发出一个自己清单里没有的名字——那次调用没有派发,历史里留下一个没有结果的
163
+ * `tool_use`,MiniMax 线路从此每一轮都是 400(见 issue #89)。
164
+ *
165
+ * 传输工具的名字随预设而变:本仓库的 Code Mode 预设叫 `code_run`
166
+ * (`codemode/transport.ts` 的 `TRANSPORT_TOOL_NAME`),内核的 PTC 呈现叫 `run_code`
167
+ * (两代名字并存见 `cache-warmup/projection.ts` 的 `CACHE_WARMUP_PTC_TRANSPORT_TOOLS`)。
168
+ * 两个都要点名:只写一个,另一代会话里就对不上号。
169
+ */
158
170
  const NUDGE_TEXT = [
159
171
  "You have made a run of tool calls without reporting progress to the user.",
160
172
  "If you are still in the middle of multi-step work, send one progress update now with the progress_update tool:",
161
173
  "one short title line and the details in the body — what you have established so far, where things stand, and what you are doing next.",
174
+ "Call it directly when your tool list has it; in Code Mode / PTC, call it from inside the program tool instead (code_run, or run_code on the kernel PTC preset): await tools.progress_update({ title, message }).",
162
175
  "Skip it when there is genuinely nothing new to report."
163
176
  ].join(" ");
164
177
  /** 催促上下文在消息来源上的 kind(供客户端与日志区分这类注入)。 */