@eddyskywalker/dsh-chatgpt-subscription 0.50.0 → 0.51.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/CHANGELOG.md +28 -0
- package/lib/client.js +43 -0
- package/lib/client.js.map +1 -1
- package/lib/{entry-progress-updates-CkGJr_fe.js → entry-progress-updates-BEkdyDZU.js} +152 -8
- package/lib/index.js +4853 -1821
- package/lib/progress-updates.js +1 -1
- package/lib/types/client/locales-ru/progress-updates.d.ts.map +1 -1
- package/lib/types/client/progress-updates/locales.d.ts +8 -2
- package/lib/types/client/progress-updates/locales.d.ts.map +1 -1
- package/lib/types/client/progress-updates/settings-binding.d.ts +9 -1
- package/lib/types/client/progress-updates/settings-binding.d.ts.map +1 -1
- package/lib/types/client/progress-updates/settings-section.d.ts.map +1 -1
- package/lib/types/compat.d.ts +1 -1
- package/lib/types/host/agent-preset.d.ts.map +1 -1
- package/lib/types/host/dispatch-execution-guard.d.ts +151 -0
- package/lib/types/host/dispatch-execution-guard.d.ts.map +1 -0
- package/lib/types/host/dispatch-ledger/binding.d.ts +118 -0
- package/lib/types/host/dispatch-ledger/binding.d.ts.map +1 -0
- package/lib/types/host/dispatch-ledger/guard.d.ts +271 -0
- package/lib/types/host/dispatch-ledger/guard.d.ts.map +1 -0
- package/lib/types/host/dispatch-ledger/header.d.ts +169 -0
- package/lib/types/host/dispatch-ledger/header.d.ts.map +1 -0
- package/lib/types/host/dispatch-ledger/index.d.ts +56 -0
- package/lib/types/host/dispatch-ledger/index.d.ts.map +1 -0
- package/lib/types/host/dispatch-ledger/ledger.d.ts +531 -0
- package/lib/types/host/dispatch-ledger/ledger.d.ts.map +1 -0
- package/lib/types/host/dispatch-ledger/policy.d.ts +99 -0
- package/lib/types/host/dispatch-ledger/policy.d.ts.map +1 -0
- package/lib/types/host/dispatch-ledger/protocol.d.ts +25 -0
- package/lib/types/host/dispatch-ledger/protocol.d.ts.map +1 -0
- package/lib/types/host/dispatch-ledger/tool.d.ts +151 -0
- package/lib/types/host/dispatch-ledger/tool.d.ts.map +1 -0
- package/lib/types/host/kimi-code/adapter.d.ts.map +1 -1
- package/lib/types/host/kimi-code/mapper.d.ts.map +1 -1
- package/lib/types/host/kimi-code/model-catalog.d.ts.map +1 -1
- package/lib/types/host/progress-updates/index.d.ts.map +1 -1
- package/lib/types/host/progress-updates/prompt.d.ts +86 -21
- package/lib/types/host/progress-updates/prompt.d.ts.map +1 -1
- package/lib/types/host/ptc-sdk-cache-guard.d.ts +12 -2
- package/lib/types/host/ptc-sdk-cache-guard.d.ts.map +1 -1
- package/lib/types/host/qoder/adapter.d.ts +13 -2
- package/lib/types/host/qoder/adapter.d.ts.map +1 -1
- package/lib/types/host/qoder/mapper.d.ts +27 -11
- package/lib/types/host/qoder/mapper.d.ts.map +1 -1
- package/lib/types/index.d.ts +15 -0
- package/lib/types/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/presets/dispatch/README.md +51 -9
- package/presets/dispatch/agent.cordis.yml +68 -122
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,34 @@
|
|
|
2
2
|
|
|
3
3
|
## Unreleased
|
|
4
4
|
|
|
5
|
+
## 0.51.1 - 2026-11-01
|
|
6
|
+
|
|
7
|
+
- **[kimi-code] 修复工具调用批次被动态工具声明/用户消息打断导致的 HTTP 400**
|
|
8
|
+
- `buildOpenAIRequest` 追踪当前 `assistant(tool_calls)` 尚未闭合的 `awaitingToolCallIds`:在工具批次尚未收齐全部 `role: 'tool'` 响应前,暂存中途到达的 `developer`(`tool-addition` / `tool-removal` 生成的 `role: 'system'`)、工具结果图片及 `user` 消息,待该批次全部 `role: 'tool'` 消息发出后再按原顺序释放。
|
|
9
|
+
- 若历史中某轮工具批次因中断等原因未闭合,自动补齐 `[no result: the tool call did not complete]` 占位 `tool` 消息,避免上游网关拒绝整轮请求;正常闭合的轮次输出字节零变化,前缀缓存 100% 保持原样。
|
|
10
|
+
|
|
11
|
+
- **[kimi-code] 修复图片预算持久化、body-fit 漂移归因与 1M 档请求体上限(Closes #80)**
|
|
12
|
+
- 统一以实际发出的 `sentBuild`(包含上传后构建与 404 inline 重试构建)而非预测量 `measured`(`ms://000...` 占位符)统计 `requestImageBytes`、`bodyFitDroppedKeys`、`budgetDropped` 与 `newlyDroppedCount`,确保 inline 回退触发的 body-fit 淘汰准确写入 `budgetDropped` 并归因为 `image-offload`。
|
|
13
|
+
- 将 1M 档模型的默认请求体上限 `LONG_CONTEXT_MESSAGE_BODY_BYTES` 从 `8 MiB` 提升至 `24 MiB`(20 MiB 双水位图片预算 + 4 MiB 文本/工具 Schema 余量),使 20 MiB / 10 MiB 的粘性双水位预算真正主导图片淘汰。
|
|
14
|
+
|
|
15
|
+
## 0.51.0 - 2026-11-01
|
|
16
|
+
|
|
17
|
+
- **[dispatch] 调度模式接入 Dispatch Ledger:模型面只多一行短引导,账本与 Mandate v2 协议由只读工具承载**
|
|
18
|
+
- preset 的两份副本(`presets/dispatch/agent.cordis.yml` 与运行时声明 `src/host/agent-preset.ts`)各加**一行**引导:首次委派前调用一次 `dispatch_ledger {action:"self"}`,并按该次结果**尾部**打印的 Mandate v2 协议行事。协议正文不进 persona——persona 的 18500 字符预算不因它而动;正文按需通过尾部工具结果返回,不进入每步常驻的前缀。
|
|
19
|
+
- `dispatch_ledger` 由宿主在**根**注册面上用 `tools.register` 一次性注册,是全局静态工具而**不是** preset 行。工具声明面因此在插件加载 / 升级时改变一次——这是已接受的一次性成本;除此之外声明面不随账本状态、开关或任务状态变化(不懒注册、不带 `when` 准入),会话运行期间工具表恒定,Kimi Code 的内容前缀缓存不会因为账本而反复重建。工具描述是编译期常量,不随会话变化。
|
|
20
|
+
- 账本的执行期守卫与既有的调度执行守卫一样只走 `ctx.tools.guard()`,守卫本身不改工具声明面;开关复用 `dispatchExecutionGuard`,不新增设置项。
|
|
21
|
+
- 模型侧可以查到账本条目(按会话或整棵委派树过滤),并按协议给派发 / 报告 / 续派的消息加上 Mandate v2 头部;头部里的策略块与提示词修订号必须从 `self` 的返回原样抄,模型不能自拟。
|
|
22
|
+
- 新增 `test/dispatch-model-surface-contract.test.ts`:按行对拍两份 preset 副本的 id / name / disabled / isolate / config,核对 persona 与 plan-mode section 逐字节一致,锁定主控专用工具名单、报告状态词、Mandate 拒绝码、授权描述在 PTC 与 Native 两侧无残留,以及 persona 前缀与协议正文的字符预算。
|
|
23
|
+
|
|
24
|
+
- **[kimi-code] 消除会话中途的内容前缀漂移**
|
|
25
|
+
- Dispatch persona 移除随模型选择变化的 `{{model}}`;进展更新的语言设置不再改变系统段,auto / zh / en 的变化改为按会话去重的尾部通知,切回 auto 也会撤销旧指令。
|
|
26
|
+
- PTC SDK 缓存守卫在请求头缺席时读取 `agent.model.current()` 的持久选择,再回退到 agent options;语言通知使用消息工厂并通过真实 `adoptSessionEvent` 边界验证。
|
|
27
|
+
|
|
28
|
+
- **验证**
|
|
29
|
+
- 当前 0.2.1-rc.3 基线:强制 host/client/test/scripts 类型检查、`npm run build`、`npm ci --dry-run` 与 `npm pack --dry-run` 均通过;全量为 **345 files passed / 2 skipped,6020 tests passed / 9 skipped**。
|
|
30
|
+
- 独立 0.1.5-rc.1 clean-room:完整运行仅有已知的 `subagent-model-authorization-ptc.test.ts` 无法加载(该代没有 `@deepseek-ai/dsh-ptc-runtime`);仅排除此文件后为 **344 files passed / 2 skipped,6015 tests passed / 10 skipped**,exit 0,包含全部新增 Dispatch 与缓存测试。
|
|
31
|
+
- 旧代全量类型检查仍被未改动的既有 `src/host/cline-pass/adapter.ts` 阻断:旧代 `LlmResolvedModelInfo` 不声明 `toolUpdate`。该文件不在本次 diff 中,未为通过验收而扩大修改范围。
|
|
32
|
+
|
|
5
33
|
## 0.50.0 - 2026-11-01
|
|
6
34
|
|
|
7
35
|
- **[subagent] 优化子代理卡片的布局、间距与状态呈现**
|
package/lib/client.js
CHANGED
|
@@ -21341,6 +21341,8 @@ window.__ModuleLoader__.load({
|
|
|
21341
21341
|
settingsRetrievalNote: "Kimi Code 专用:导航任务中投影文件、网页与搜索,编辑审查保留原文;非 Kimi 线路开关无影响",
|
|
21342
21342
|
settingsPlanModePipelineName: "计划模式管线",
|
|
21343
21343
|
settingsPlanModePipelineNote: "澄清访谈收敛后自动进入计划模式出计划,再交审批(仅调度模式生效);关闭后该模式会请用户手动输入 /plan",
|
|
21344
|
+
settingsDispatchExecutionGuardName: "调度执行守卫",
|
|
21345
|
+
settingsDispatchExecutionGuardNote: "执行期拦截子代理越权调用主控工具及等待子代理时的纯 sleep 空等;不改工具声明面,零损耗保护 Kimi 缓存",
|
|
21344
21346
|
settingsThresholdName: "催促阈值",
|
|
21345
21347
|
settingsThresholdNote: "连续这么多轮没有进展时,提醒 agent 汇报一次",
|
|
21346
21348
|
settingsLanguageName: "输出语言",
|
|
@@ -21383,6 +21385,8 @@ window.__ModuleLoader__.load({
|
|
|
21383
21385
|
settingsRetrievalNote: "Kimi Code only: project files, pages, and searches for navigation; keep source verbatim for editing and review; no effect on other lines",
|
|
21384
21386
|
settingsPlanModePipelineName: "Plan-mode pipeline",
|
|
21385
21387
|
settingsPlanModePipelineNote: "After the clarification interview converges, enter plan mode, write the plan and send it for approval (dispatch mode only); turning it off makes that mode ask the user to type /plan",
|
|
21388
|
+
settingsDispatchExecutionGuardName: "Dispatch execution guard",
|
|
21389
|
+
settingsDispatchExecutionGuardNote: "Block subagents from calling dispatcher-only tools at execution time and reject pure sleep waits while child agents run; keeps tool declarations untouched to protect the Kimi prefix cache",
|
|
21386
21390
|
settingsThresholdName: "Nudge threshold",
|
|
21387
21391
|
settingsThresholdNote: "Remind the agent after this many rounds without an update",
|
|
21388
21392
|
settingsLanguageName: "Output language",
|
|
@@ -22749,6 +22753,8 @@ window.__ModuleLoader__.load({
|
|
|
22749
22753
|
settingsRetrievalNote: "Только Kimi Code: проецировать файлы, страницы и поиск при навигации; сохранять код при правке и ревью; на других линиях переключатель ничего не меняет",
|
|
22750
22754
|
settingsPlanModePipelineName: "Конвейер режима плана",
|
|
22751
22755
|
settingsPlanModePipelineNote: "После схождения уточняющего интервью автоматически войти в режим плана, подготовить план и отправить его на утверждение (только в режиме диспетчера); если выключено, этот режим попросит пользователя ввести /plan вручную",
|
|
22756
|
+
settingsDispatchExecutionGuardName: "Защита выполнения диспетчера",
|
|
22757
|
+
settingsDispatchExecutionGuardNote: "Блокировать вызовы инструментов диспетчера субагентами во время выполнения и запрещать пустое ожидание sleep при активных дочерних агентах; не меняет объявления инструментов и сохраняет префиксный кеш Kimi",
|
|
22752
22758
|
settingsThresholdName: "Порог напоминания",
|
|
22753
22759
|
settingsThresholdNote: "Напомнить агенту после стольких раундов без отчёта",
|
|
22754
22760
|
settingsLanguageName: "Язык вывода",
|
|
@@ -55084,6 +55090,21 @@ window.__ModuleLoader__.load({
|
|
|
55084
55090
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", { d: "m7 10 2 2 4-4.5" })]
|
|
55085
55091
|
});
|
|
55086
55092
|
}
|
|
55093
|
+
/** 调度执行守卫那一行的标记:一面带勾的盾牌(挡住越权调用)。 */
|
|
55094
|
+
function DispatchGuardMark() {
|
|
55095
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("svg", {
|
|
55096
|
+
viewBox: "0 0 20 20",
|
|
55097
|
+
width: "20",
|
|
55098
|
+
height: "20",
|
|
55099
|
+
fill: "none",
|
|
55100
|
+
stroke: "currentColor",
|
|
55101
|
+
strokeWidth: "1.6",
|
|
55102
|
+
strokeLinecap: "round",
|
|
55103
|
+
strokeLinejoin: "round",
|
|
55104
|
+
"aria-hidden": "true",
|
|
55105
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", { d: "M10 3 4.5 5.2v4.6c0 3.8 2.3 6.4 5.5 7.2 3.2-.8 5.5-3.4 5.5-7.2V5.2L10 3Z" }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", { d: "m7.5 10 1.8 1.8 3.4-3.6" })]
|
|
55106
|
+
});
|
|
55107
|
+
}
|
|
55087
55108
|
function PanelMark() {
|
|
55088
55109
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("svg", {
|
|
55089
55110
|
viewBox: "0 0 20 20",
|
|
@@ -55160,6 +55181,7 @@ window.__ModuleLoader__.load({
|
|
|
55160
55181
|
const cacheWarmup = value.cacheWarmup !== false;
|
|
55161
55182
|
const retrieval = value.cacheWarmupRetrieval !== false;
|
|
55162
55183
|
const planModePipeline = value.planModePipeline !== false;
|
|
55184
|
+
const dispatchExecutionGuard = value.dispatchExecutionGuard !== false;
|
|
55163
55185
|
const threshold = typeof value.progressUpdatesNudgeThreshold === "number" ? value.progressUpdatesNudgeThreshold : 8;
|
|
55164
55186
|
const language = value.progressUpdatesLanguage === "zh" || value.progressUpdatesLanguage === "en" ? value.progressUpdatesLanguage : "auto";
|
|
55165
55187
|
const [draft, setDraft] = (0, react.useState)(() => String(threshold));
|
|
@@ -55318,6 +55340,27 @@ window.__ModuleLoader__.load({
|
|
|
55318
55340
|
}
|
|
55319
55341
|
})
|
|
55320
55342
|
}),
|
|
55343
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(CardRow, {
|
|
55344
|
+
part: "settings-row-dispatch-execution-guard",
|
|
55345
|
+
brand: "#3b7a9e",
|
|
55346
|
+
mark: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DispatchGuardMark, {}),
|
|
55347
|
+
name: translate("settingsDispatchExecutionGuardName"),
|
|
55348
|
+
note: failure?.row === "dispatchExecutionGuard" ? failure.text : translate("settingsDispatchExecutionGuardNote"),
|
|
55349
|
+
danger: failure?.row === "dispatchExecutionGuard",
|
|
55350
|
+
enabled: dispatchExecutionGuard,
|
|
55351
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
55352
|
+
type: "button",
|
|
55353
|
+
role: "switch",
|
|
55354
|
+
"aria-checked": dispatchExecutionGuard,
|
|
55355
|
+
"aria-label": translate("settingsDispatchExecutionGuardName"),
|
|
55356
|
+
className: "dsh-progress-switch",
|
|
55357
|
+
"data-dsh-part": "settings-dispatch-execution-guard-switch",
|
|
55358
|
+
disabled: !writable,
|
|
55359
|
+
onClick: () => {
|
|
55360
|
+
write("dispatchExecutionGuard", "dispatchExecutionGuard", !dispatchExecutionGuard);
|
|
55361
|
+
}
|
|
55362
|
+
})
|
|
55363
|
+
}),
|
|
55321
55364
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(CardRow, {
|
|
55322
55365
|
part: "settings-row-threshold",
|
|
55323
55366
|
brand: "#2f9e6e",
|