@eddyskywalker/dsh-chatgpt-subscription 0.98.0 → 0.98.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/lib/index.js CHANGED
@@ -888,7 +888,7 @@ const ROUTE_PREFIX$6 = "/api/dsh-chatgpt-subscription";
888
888
  * `test/responses-client.test.ts` asserts the two agree, so a release that
889
889
  * forgets this constant fails the suite instead of shipping quietly.
890
890
  */
891
- const PLUGIN_VERSION = "0.98.0";
891
+ const PLUGIN_VERSION = "0.98.1";
892
892
  const CODEX_CHATGPT_PROVIDER_ID = "codex-chatgpt";
893
893
  const CODEX_API_BASE = "https://chatgpt.com/backend-api/codex";
894
894
  const CODEX_RESPONSES_URL = `${CODEX_API_BASE}/responses`;
@@ -34758,6 +34758,8 @@ async function* streamOpenCodeGoResponses(response, signal, activity, onMetadata
34758
34758
  }
34759
34759
  //#endregion
34760
34760
  //#region src/host/providers/opencode-go/mapper-gemini.ts
34761
+ /** Google accepts this placeholder when a historical function call has no captured signature. */
34762
+ const GEMINI_SKIP_THOUGHT_SIGNATURE = "skip_thought_signature_validator";
34761
34763
  function buildOpenCodeGoGeminiRequest(options, images, entry, _settings) {
34762
34764
  const contents = [];
34763
34765
  const knownCalls = /* @__PURE__ */ new Map();
@@ -34792,15 +34794,23 @@ function buildOpenCodeGoGeminiRequest(options, images, entry, _settings) {
34792
34794
  mime_type: image.mediaType,
34793
34795
  data: image.data
34794
34796
  } });
34795
- if (message.role === "assistant") for (const block of message.content) {
34796
- if (block.type !== "tool-call") continue;
34797
- const id = String(block.id);
34798
- knownCalls.set(id, block.name);
34799
- const args = relayOneSafeJson(relayOneArgsText(block.arguments));
34800
- parts.push({ functionCall: {
34801
- name: block.name,
34802
- args: isOpenCodeGoRecord(args) ? args : {}
34803
- } });
34797
+ if (message.role === "assistant") {
34798
+ const replayBlocks = openCodeGoReplayBlocks(message);
34799
+ for (const [blockIndex, block] of message.content.entries()) {
34800
+ if (block.type !== "tool-call") continue;
34801
+ const id = String(block.id);
34802
+ knownCalls.set(id, block.name);
34803
+ const args = relayOneSafeJson(relayOneArgsText(block.arguments));
34804
+ const replay = replayBlocks?.[blockIndex];
34805
+ const captured = isOpenCodeGoRecord(replay) ? openCodeGoString(replay.thoughtSignature) : void 0;
34806
+ parts.push({
34807
+ functionCall: {
34808
+ name: block.name,
34809
+ args: isOpenCodeGoRecord(args) ? args : {}
34810
+ },
34811
+ thoughtSignature: captured === void 0 || captured === "" ? GEMINI_SKIP_THOUGHT_SIGNATURE : captured
34812
+ });
34813
+ }
34804
34814
  }
34805
34815
  if (parts.length > 0) contents.push({
34806
34816
  role: message.role === "assistant" ? "model" : "user",
@@ -34843,6 +34853,7 @@ function usage(raw) {
34843
34853
  function createGeminiState() {
34844
34854
  return {
34845
34855
  chunks: [],
34856
+ replayBlocks: [],
34846
34857
  index: 0,
34847
34858
  toolCalls: 0,
34848
34859
  candidates: 0,
@@ -34886,6 +34897,7 @@ function consumeGeminiPayload(state, payload) {
34886
34897
  text
34887
34898
  }
34888
34899
  });
34900
+ state.replayBlocks.push({ type: reasoning ? "reasoning" : "text" });
34889
34901
  state.index += 1;
34890
34902
  }
34891
34903
  const call = isOpenCodeGoRecord(part.functionCall) ? part.functionCall : void 0;
@@ -34916,6 +34928,11 @@ function consumeGeminiPayload(state, payload) {
34916
34928
  arguments: args
34917
34929
  }
34918
34930
  });
34931
+ const signature = openCodeGoString(part.thoughtSignature);
34932
+ state.replayBlocks.push({
34933
+ type: "tool-call",
34934
+ ...signature === void 0 || signature === "" ? {} : { thoughtSignature: signature }
34935
+ });
34919
34936
  state.index += 1;
34920
34937
  state.toolCalls += 1;
34921
34938
  }
@@ -34936,10 +34953,14 @@ function finishGemini(state) {
34936
34953
  code: "PROVIDER_ERROR"
34937
34954
  }
34938
34955
  } : state.toolCalls > 0 ? { kind: "tool-calls" } : { kind: "stop" };
34956
+ const replayState = state.toolCalls > 0 ? {
34957
+ response: {},
34958
+ blocks: state.replayBlocks
34959
+ } : { response: {} };
34939
34960
  return openCodeGoFinishMetadata([...chunks, {
34940
34961
  type: "finish",
34941
34962
  reason,
34942
- replayState: { response: {} }
34963
+ replayState
34943
34964
  }], "generate-content", state.metadata);
34944
34965
  }
34945
34966
  async function* streamOpenCodeGoGeminiResponse(response, signal, activity, onMetadata) {
@@ -76,7 +76,7 @@ export declare const ROUTE_PREFIX: "/api/dsh-chatgpt-subscription";
76
76
  * `test/responses-client.test.ts` asserts the two agree, so a release that
77
77
  * forgets this constant fails the suite instead of shipping quietly.
78
78
  */
79
- export declare const PLUGIN_VERSION: "0.98.0";
79
+ export declare const PLUGIN_VERSION: "0.98.1";
80
80
  export declare const CODEX_CHATGPT_PROVIDER_ID: "codex-chatgpt";
81
81
  export { MINIMAX_CODE_PROVIDER_ID, MINIMAX_CODE_ROUTE_PREFIX } from './shared/minimax-code-contracts.ts';
82
82
  export declare const CODEX_API_BASE: "https://chatgpt.com/backend-api/codex";
@@ -1 +1 @@
1
- {"version":3,"file":"mapper-gemini.d.ts","sourceRoot":"","sources":["../../../../../src/host/providers/opencode-go/mapper-gemini.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,WAAW,EAAc,MAAM,4BAA4B,CAAA;AAE1F,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAA;AAC3E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAA;AAKnE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAA;AAC9D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAA;AAC1D,OAAO,EAAuI,KAAK,uBAAuB,EAAE,MAAM,oBAAoB,CAAA;AAEtM,wBAAgB,4BAA4B,CAAC,OAAO,EAAE,eAAe,EAAE,MAAM,EAAE,qBAAqB,EAAE,KAAK,EAAE,oBAAoB,EAAE,SAAS,EAAE,kBAAkB,GAAG,MAAM,CAAC,MAAM,E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,wBAAuB,8BAA8B,CAAC,QAAQ,EAAE,QAAQ,EAAE,MAAM,EAAE,WAAW,EAAE,QAAQ,CAAC,EAAE,cAAc,EAAE,UAAU,CAAC,EAAE,CAAC,QAAQ,EAAE,uBAAuB,GAAG,IAAI,KAAK,IAAI,GAAG,aAAa,CAAC,WAAW,CAAC,CAsCrN"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eddyskywalker/dsh-chatgpt-subscription",
3
- "version": "0.98.0",
3
+ "version": "0.98.1",
4
4
  "description": "Multi-provider subscription hub and agent runtime enhancements for DeepSeek Harness (DSH).",
5
5
  "icon": "./assets/icon.svg",
6
6
  "author": {
@@ -146,7 +146,8 @@
146
146
  "react-dom": "^19.3.1",
147
147
  "tsdown": "0.22.2",
148
148
  "typescript": "~5.7.2",
149
- "vitest": "^4.1.8"
149
+ "vitest": "^4.1.8",
150
+ "yaml": "^2.9.1"
150
151
  },
151
152
  "files": [
152
153
  "assets",
@@ -108,7 +108,7 @@ system prompt 因此改写一次;这与计划模式当初刻意用"尾部用
108
108
 
109
109
  本进程内 spawn 的子代理**继承父代理的 preset 组成**(同一套工具、同一套提示词段落)。
110
110
  因此子代理读到的是同一份 persona;文件开头的【角色识别】段落要求它据「首条消息是否为任务书」
111
- 自判身份,从而不套用面向调度者的 R0/R-G/R1/R2/R4/R5。若需要真正的子代理专属提示词,
111
+ 自判身份,从而不套用面向调度者的 R0/R-G/R1/R2/R4/R5/R-T。若需要真正的子代理专属提示词,
112
112
  需要在 DSH 侧扩展(`tool-subagent` 的 `persona` 只能整段覆盖,不适用于此)。
113
113
 
114
114
  **计划模式管线的工具作用域 = preset 行**:`enter_plan_mode` / `leave_plan_mode` 由
@@ -19,7 +19,7 @@
19
19
  | 验收 | Lead 独占(R6) | 不变;验证者只是**证据生产者**,验收权仍在 Lead |
20
20
 
21
21
  新增的 R-T 五条规则:板(**两份制品**:任务板管工作与归属,仓库外的 append-only `board.jsonl` 管叙事,按 `#seq` 引用)、点名(`send_message`)、
22
- 挂起(`wait_agent` 有界收件箱等待,不是轮询)、规模(常驻工人 ≤ 4,含验证者)、
22
+ 挂起(`wait_agent` 有界收件箱等待,不是轮询)、规模(按 `list_agents` 槽位池现算,最后一席留验证者)、
23
23
  归约(每 2–4 名工人一个验证者,只报不修)。
24
24
 
25
25
  ## 前提与边界
@@ -370,7 +370,6 @@
370
370
 
371
371
  # ── remaining model-facing rows ─────────────────────────────────────────────
372
372
 
373
- name: '@deepseek-ai/dsh-tool-agent-team'
374
373
  - id: tool-ask-user
375
374
  name: '@deepseek-ai/dsh-tool-ask-user'
376
375