dsh-codex-subscription 2.2.6 → 2.2.7
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 +3 -3
- package/lib/index.js +37 -3
- package/package.json +1 -1
package/lib/client.js
CHANGED
|
@@ -4755,7 +4755,7 @@ window.__ModuleLoader__.load({
|
|
|
4755
4755
|
streamIdleTimeout_10: "10 分钟",
|
|
4756
4756
|
streamIdleTimeout_20: "20 分钟",
|
|
4757
4757
|
streamIdleTimeout_30: "30 分钟",
|
|
4758
|
-
subagentBackendHint: "Codex
|
|
4758
|
+
subagentBackendHint: "Codex 复用订阅登录和工作区权限;默认继承当前订阅模型。在“插件 → 子智能体”开启模型选择并勾选允许的模型后新建会话,可在聊天中指定允许的订阅模型与推理档位;非订阅会话需指定。共享上下文子任务仍用 DSH。",
|
|
4759
4759
|
subagentBackendUnavailable: "当前宿主缺少子代理服务,请更新 DSH。",
|
|
4760
4760
|
subagentRuntimeMissing: "尚未准备 Codex 子任务运行时,仅影响此选项。普通订阅对话无需安装。",
|
|
4761
4761
|
subagentRuntimePrepare: "准备方法(含离线说明)",
|
|
@@ -5303,7 +5303,7 @@ window.__ModuleLoader__.load({
|
|
|
5303
5303
|
streamIdleTimeout_10: "10 min",
|
|
5304
5304
|
streamIdleTimeout_20: "20 min",
|
|
5305
5305
|
streamIdleTimeout_30: "30 min",
|
|
5306
|
-
subagentBackendHint: "Codex reuses subscription login and workspace permissions, inheriting the current subscription model by default.
|
|
5306
|
+
subagentBackendHint: "Codex reuses subscription login and workspace permissions, inheriting the current subscription model by default. Turn on model selection under Plugins → Subagent, tick the allowed models and start a new session to request an allowed subscription model and reasoning effort in chat; other model sessions require an explicit selection. Shared-context subtasks stay in DSH.",
|
|
5307
5307
|
subagentBackendUnavailable: "Subagent services are unavailable. Update DSH to use this option.",
|
|
5308
5308
|
subagentRuntimeMissing: "Codex subtask runtime is not prepared. Subscription chat does not require it.",
|
|
5309
5309
|
subagentRuntimePrepare: "Setup and offline instructions",
|
|
@@ -7636,7 +7636,7 @@ window.__ModuleLoader__.load({
|
|
|
7636
7636
|
}
|
|
7637
7637
|
//#endregion
|
|
7638
7638
|
//#region src/version.js
|
|
7639
|
-
const PACKAGE_VERSION = "2.2.
|
|
7639
|
+
const PACKAGE_VERSION = "2.2.7";
|
|
7640
7640
|
//#endregion
|
|
7641
7641
|
//#region src/client-recovery.js
|
|
7642
7642
|
async function recoveryCall(rpc, endpoint, payload = {}, timeoutMs = 1e4) {
|
package/lib/index.js
CHANGED
|
@@ -1277,9 +1277,29 @@ function subagentThreadPolicy(parent, policy, requested = {}) {
|
|
|
1277
1277
|
modelProvider: "openai",
|
|
1278
1278
|
approvalPolicy: "never",
|
|
1279
1279
|
sandbox: policy.mode,
|
|
1280
|
-
config:
|
|
1280
|
+
config: {
|
|
1281
|
+
...CHILD_FEATURES_OFF,
|
|
1282
|
+
...effort === void 0 ? {} : { model_reasoning_effort: effort }
|
|
1283
|
+
}
|
|
1281
1284
|
};
|
|
1282
1285
|
}
|
|
1286
|
+
/**
|
|
1287
|
+
* A ChatGPT-authenticated Codex child would otherwise expose the account's
|
|
1288
|
+
* connected apps (calendar, site deploys, ...) and plugin installs, all
|
|
1289
|
+
* auto-approved. A DSH subtask gets the workspace tools only.
|
|
1290
|
+
*/
|
|
1291
|
+
const CHILD_FEATURES_OFF = Object.freeze({ features: Object.freeze(Object.fromEntries([
|
|
1292
|
+
"apps",
|
|
1293
|
+
"plugins",
|
|
1294
|
+
"plugin_sharing",
|
|
1295
|
+
"remote_plugin",
|
|
1296
|
+
"tool_suggest",
|
|
1297
|
+
"browser_use",
|
|
1298
|
+
"browser_use_external",
|
|
1299
|
+
"browser_use_full_cdp_access",
|
|
1300
|
+
"computer_use",
|
|
1301
|
+
"in_app_browser"
|
|
1302
|
+
].map((name) => [name, false]))) });
|
|
1283
1303
|
/** Reuse the official DSH process/turn provider; keep only subscription auth here. */
|
|
1284
1304
|
function createSubscriptionSubagent({ ctx, nativeHome, resolveAuth, store, refresh, loadRuntime, maintenance = () => false }) {
|
|
1285
1305
|
let runtime;
|
|
@@ -1385,6 +1405,20 @@ function createSubscriptionSubagent({ ctx, nativeHome, resolveAuth, store, refre
|
|
|
1385
1405
|
}
|
|
1386
1406
|
};
|
|
1387
1407
|
}
|
|
1408
|
+
/**
|
|
1409
|
+
* DSH 0.2 mounts Agent preset rows once, at boot and before plugins load, so the
|
|
1410
|
+
* Loader never lists them and `internal/config` never reaches a later listener.
|
|
1411
|
+
* Read them from the preset registry; a host without it simply has none.
|
|
1412
|
+
*/
|
|
1413
|
+
function presetEntries(ctx) {
|
|
1414
|
+
try {
|
|
1415
|
+
const generations = ctx.get?.("agentPresets")?.generations;
|
|
1416
|
+
if (!(generations instanceof Map)) return [];
|
|
1417
|
+
return [...generations.values()].flatMap((generation) => [...generation.mount?.tree?.entries?.() ?? []]);
|
|
1418
|
+
} catch {
|
|
1419
|
+
return [];
|
|
1420
|
+
}
|
|
1421
|
+
}
|
|
1388
1422
|
/** Change only standard independent spawn tools; leave fork/custom tools untouched. */
|
|
1389
1423
|
function createSubagentBackendSwitcher({ entries, prepare, persist }) {
|
|
1390
1424
|
const originals = /* @__PURE__ */ new Map();
|
|
@@ -3010,7 +3044,7 @@ async function readSubscriptionCredentials(getAuth, readCredential, signal) {
|
|
|
3010
3044
|
}
|
|
3011
3045
|
//#endregion
|
|
3012
3046
|
//#region src/version.js
|
|
3013
|
-
const PACKAGE_VERSION = "2.2.
|
|
3047
|
+
const PACKAGE_VERSION = "2.2.7";
|
|
3014
3048
|
const USER_AGENT = `dsh-codex-subscription/${PACKAGE_VERSION}`;
|
|
3015
3049
|
//#endregion
|
|
3016
3050
|
//#region src/model-catalog.js
|
|
@@ -6113,7 +6147,7 @@ function apply(ctx, config = {}) {
|
|
|
6113
6147
|
});
|
|
6114
6148
|
scoped.subagents.registerProvider(instance.provider);
|
|
6115
6149
|
const switcher = createSubagentBackendSwitcher({
|
|
6116
|
-
entries: () => scoped.loader.entries(),
|
|
6150
|
+
entries: () => [...scoped.loader.entries(), ...presetEntries(scoped)],
|
|
6117
6151
|
prepare: instance.prepare,
|
|
6118
6152
|
persist: (mode) => settings.update({ subagentBackend: mode })
|
|
6119
6153
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-codex-subscription",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.7",
|
|
4
4
|
"description": "Use ChatGPT and Codex subscriptions in DeepSeek Harness with OAuth, quota, safe resets, web search, images, and Fast mode",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./lib/index.js",
|