@eddyskywalker/dsh-chatgpt-subscription 0.95.2 → 0.96.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.
- package/lib/client.js +66 -26
- package/lib/client.js.map +1 -1
- package/lib/codemode.js +6 -2
- package/lib/index.js +345 -67
- package/lib/{preset-sync-6QI9tVA0.js → preset-sync-CF9xlG1l.js} +7 -1
- package/lib/types/client/locales-ru/command-code.d.ts.map +1 -1
- package/lib/types/client/providers/command-code/CommandCodeSection.d.ts.map +1 -1
- package/lib/types/client/providers/command-code/locales.d.ts +11 -2
- package/lib/types/client/providers/command-code/locales.d.ts.map +1 -1
- package/lib/types/compat.d.ts +1 -1
- package/lib/types/host/common/reasoning-seed-replay.d.ts +25 -0
- package/lib/types/host/common/reasoning-seed-replay.d.ts.map +1 -0
- package/lib/types/host/providers/command-code/adapter.d.ts +6 -3
- package/lib/types/host/providers/command-code/adapter.d.ts.map +1 -1
- package/lib/types/host/providers/command-code/mapper.d.ts.map +1 -1
- package/lib/types/host/providers/command-code/routes.d.ts.map +1 -1
- package/lib/types/host/providers/command-code/token-store.d.ts +4 -0
- package/lib/types/host/providers/command-code/token-store.d.ts.map +1 -1
- package/lib/types/host/providers/opencode-go/mapper.d.ts.map +1 -1
- package/lib/types/host/providers/opencode-zen/mapper.d.ts.map +1 -1
- package/lib/types/host/providers/relayone/mapper-openai.d.ts.map +1 -1
- package/lib/types/host/runtime/codemode/transport.d.ts +1 -0
- package/lib/types/host/runtime/codemode/transport.d.ts.map +1 -1
- package/lib/types/host/runtime/deepseek-v41-flash/discipline.d.ts +1 -1
- package/lib/types/host/runtime/deepseek-v41-flash/discipline.d.ts.map +1 -1
- package/lib/types/host/runtime/deepseek-v41-flash/reasoning-seed.d.ts +113 -0
- package/lib/types/host/runtime/deepseek-v41-flash/reasoning-seed.d.ts.map +1 -0
- package/lib/types/index.d.ts +7 -0
- package/lib/types/index.d.ts.map +1 -1
- package/lib/types/shared/advisor-contracts.d.ts +1 -0
- package/lib/types/shared/advisor-contracts.d.ts.map +1 -1
- package/lib/types/shared/command-code-contracts.d.ts +2 -0
- package/lib/types/shared/command-code-contracts.d.ts.map +1 -1
- package/package.json +1 -1
package/lib/codemode.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { c as PLUGIN_MESSAGE_SOURCE_KIND, t as candidatePackageRoots } from "./preset-sync-CF9xlG1l.js";
|
|
2
2
|
import { createRequire } from "node:module";
|
|
3
3
|
import * as dshLlm from "@deepseek-ai/dsh-llm";
|
|
4
4
|
import { HarnessError, createUserMessage } from "@deepseek-ai/dsh-llm";
|
|
@@ -1046,6 +1046,8 @@ function currentCatalogSnapshot() {
|
|
|
1046
1046
|
}
|
|
1047
1047
|
/** 传输工具名(与 {@link DEFAULT_RUN_TOOL_NAME} 一致,导出方便测试引用)。 */
|
|
1048
1048
|
const TRANSPORT_TOOL_NAME = "code_run";
|
|
1049
|
+
const TRANSPORT_TOOL_TIMEOUT_MS = 6e5;
|
|
1050
|
+
const ADVISOR_CALL_PATTERN = /\btools\s*\.\s*consult_advisor\s*\(/;
|
|
1049
1051
|
/** 进展汇报工具名:融合参数里救回来的简报用它补发。 */
|
|
1050
1052
|
const PROGRESS_UPDATE_TOOL = "progress_update";
|
|
1051
1053
|
/** 允许单次提权的目标沙箱模式(对齐 `@deepseek-ai/dsh-sandbox` 的 `ESCALATION_TARGETS`)。 */
|
|
@@ -1282,6 +1284,7 @@ function createTransportDefinition(host, rules) {
|
|
|
1282
1284
|
name: runToolName,
|
|
1283
1285
|
description: buildTransportDescription(void 0),
|
|
1284
1286
|
parameters: buildTransportParameters(void 0),
|
|
1287
|
+
timeoutMs: TRANSPORT_TOOL_TIMEOUT_MS,
|
|
1285
1288
|
output: {
|
|
1286
1289
|
schema: {
|
|
1287
1290
|
type: "object",
|
|
@@ -1546,6 +1549,7 @@ function createTransportDefinition(host, rules) {
|
|
|
1546
1549
|
signal: nestedSignal,
|
|
1547
1550
|
mode: runMode
|
|
1548
1551
|
}) ?? untrackRun;
|
|
1552
|
+
const timeoutMs = input.timeoutMs ?? (ADVISOR_CALL_PATTERN.test(sanitizedCode) ? 305e3 : void 0);
|
|
1549
1553
|
const request = {
|
|
1550
1554
|
program: sanitizedCode,
|
|
1551
1555
|
bindings: [{
|
|
@@ -1559,7 +1563,7 @@ function createTransportDefinition(host, rules) {
|
|
|
1559
1563
|
...escalated ? {} : { stateOwner: owner },
|
|
1560
1564
|
...authority?.cwd === void 0 ? {} : { cwd: authority.cwd },
|
|
1561
1565
|
...effectivePolicy === void 0 ? {} : { sandboxPolicy: effectivePolicy },
|
|
1562
|
-
...
|
|
1566
|
+
...timeoutMs === void 0 ? {} : { timeoutMs },
|
|
1563
1567
|
signal: nestedSignal
|
|
1564
1568
|
};
|
|
1565
1569
|
const spec = typeof runtime.resolve === "function" ? runtime.resolve(request) : request;
|