dsh-edge 0.4.0 → 0.5.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/THIRD_PARTY_NOTICES.md +1143 -1114
- package/dist/index.html +1 -1
- package/dist/plugins/@deepseek-ai/dsh-client-connection/client.js +2 -3
- package/dist/plugins/@deepseek-ai/dsh-client-runtime/client.js +6 -15
- package/dist/plugins/@deepseek-ai/dsh-client-ui-conversation/client.js +22 -37
- package/dist/plugins/@deepseek-ai/dsh-client-ui-permission-presets/client.js +13 -46
- package/dist/plugins/@deepseek-ai/dsh-client-ui-sidebar/client.js +1 -1
- package/dist/plugins/@deepseek-ai/dsh-client-ui-workspace/client.js +6 -7
- package/package.json +23 -23
- package/scripts/cli.mjs +13 -0
- package/scripts/install.d.mts +1 -0
- package/scripts/install.mjs +4 -0
- package/scripts/wrangler-config-core.mjs +4 -0
- package/scripts/wrangler-config.d.mts +1 -0
- package/worker/direct/index.js +774 -771
- package/worker/isolated/index.js +584 -581
package/dist/index.html
CHANGED
|
@@ -39,7 +39,7 @@ window.__ModuleLoader__={
|
|
|
39
39
|
return exports.createClientModuleSystem(this,{id:registration.id,exports},options)
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
|
-
})()</script><script src="/plugins/@deepseek-ai/dsh-client-modules/client.js?rev=7eb526320903"></script><script src="/plugins/@deepseek-ai/dsh-client-runtime/client.js?rev=
|
|
42
|
+
})()</script><script src="/plugins/@deepseek-ai/dsh-client-modules/client.js?rev=7eb526320903"></script><script src="/plugins/@deepseek-ai/dsh-client-runtime/client.js?rev=aba836a0c42d"></script><script>globalThis["__DSH_BOOT__"] = {"rev":"56ebe7ea5bac","entries":[{"id":"@deepseek-ai/dsh-typert-registry","url":"/plugins/@deepseek-ai/dsh-typert-registry/client.js?rev=f41d56e0b747","rev":"f41d56e0b747","inject":[],"immediately":true},{"id":"@deepseek-ai/dsh-api-gateway","url":"/plugins/@deepseek-ai/dsh-api-gateway/client.js?rev=965b70361a00","rev":"965b70361a00","inject":["@deepseek-ai/dsh-typert-registry","@deepseek-ai/dsh-client-connection"],"immediately":true},{"id":"@deepseek-ai/dsh-client-modules","url":"/plugins/@deepseek-ai/dsh-client-modules/client.js?rev=7eb526320903","rev":"7eb526320903","inject":[],"immediately":true},{"id":"@deepseek-ai/dsh-client-connection","url":"/plugins/@deepseek-ai/dsh-client-connection/client.js?rev=70b02b2d3fc2","rev":"70b02b2d3fc2","inject":[],"immediately":true},{"id":"@deepseek-ai/dsh-api-remotes","url":"/plugins/@deepseek-ai/dsh-api-remotes/client.js?rev=9a16f4532366","rev":"9a16f4532366","inject":["@deepseek-ai/dsh-api-gateway"],"immediately":true},{"id":"@deepseek-ai/dsh-client-runtime","url":"/plugins/@deepseek-ai/dsh-client-runtime/client.js?rev=aba836a0c42d","rev":"aba836a0c42d","inject":["@deepseek-ai/dsh-client-connection","@deepseek-ai/dsh-typert-registry","@deepseek-ai/dsh-api-remotes"],"immediately":true},{"id":"@deepseek-ai/dsh-client-ui-theme","url":"/plugins/@deepseek-ai/dsh-client-ui-theme/client.js?rev=e19c47b60a1c","rev":"e19c47b60a1c","inject":["@deepseek-ai/dsh-client-connection","@deepseek-ai/dsh-client-runtime","@deepseek-ai/dsh-client-locale","@deepseek-ai/dsh-client-ui-settings","@deepseek-ai/dsh-api-remotes"],"immediately":true},{"id":"@deepseek-ai/dsh-client-locale","url":"/plugins/@deepseek-ai/dsh-client-locale/client.js?rev=2660ca3f6a00","rev":"2660ca3f6a00","inject":["@deepseek-ai/dsh-client-connection","@deepseek-ai/dsh-client-runtime","@deepseek-ai/dsh-client-ui-settings","@deepseek-ai/dsh-api-remotes"],"immediately":true},{"id":"@deepseek-ai/dsh-client-ui-layout","url":"/plugins/@deepseek-ai/dsh-client-ui-layout/client.js?rev=abdb7f55acba","rev":"abdb7f55acba","inject":["@deepseek-ai/dsh-client-runtime","@deepseek-ai/dsh-client-ui-theme"]},{"id":"@deepseek-ai/dsh-client-ui-renderer","url":"/plugins/@deepseek-ai/dsh-client-ui-renderer/client.js?rev=79b59d365f3b","rev":"79b59d365f3b","inject":["@deepseek-ai/dsh-client-runtime"],"immediately":true},{"id":"@deepseek-ai/dsh-client-ui-sidebar","url":"/plugins/@deepseek-ai/dsh-client-ui-sidebar/client.js?rev=7563cb4b02ca","rev":"7563cb4b02ca","inject":["@deepseek-ai/dsh-client-runtime","@deepseek-ai/dsh-client-ui-layout","@deepseek-ai/dsh-client-locale"]},{"id":"@deepseek-ai/dsh-client-ui-settings","url":"/plugins/@deepseek-ai/dsh-client-ui-settings/client.js?rev=5d1695c62b38","rev":"5d1695c62b38","inject":["@deepseek-ai/dsh-client-connection","@deepseek-ai/dsh-client-runtime","@deepseek-ai/dsh-api-remotes"]},{"id":"@deepseek-ai/dsh-client-ui-settings-general","url":"/plugins/@deepseek-ai/dsh-client-ui-settings-general/client.js?rev=f733efde3f2f","rev":"f733efde3f2f","inject":["@deepseek-ai/dsh-client-runtime","@deepseek-ai/dsh-client-ui-settings","@deepseek-ai/dsh-client-locale","@deepseek-ai/dsh-client-connection","@deepseek-ai/dsh-api-remotes","@deepseek-ai/dsh-client-ui-sidebar"]},{"id":"@deepseek-ai/dsh-client-ui-settings-models","url":"/plugins/@deepseek-ai/dsh-client-ui-settings-models/client.js?rev=f12fb342db3b","rev":"f12fb342db3b","inject":["@deepseek-ai/dsh-client-runtime","@deepseek-ai/dsh-client-ui-settings","@deepseek-ai/dsh-client-locale","@deepseek-ai/dsh-api-remotes"]},{"id":"@deepseek-ai/dsh-client-ui-conversation","url":"/plugins/@deepseek-ai/dsh-client-ui-conversation/client.js?rev=cf4575517765","rev":"cf4575517765","inject":["@deepseek-ai/dsh-client-connection","@deepseek-ai/dsh-client-locale","@deepseek-ai/dsh-client-runtime","@deepseek-ai/dsh-client-ui-settings","@deepseek-ai/dsh-api-remotes","@deepseek-ai/dsh-client-ui-layout"]},{"id":"@deepseek-ai/dsh-client-ui-brand-official","url":"/plugins/@deepseek-ai/dsh-client-ui-brand-official/client.js?rev=c426d52ce216","rev":"c426d52ce216","inject":["@deepseek-ai/dsh-client-runtime","@deepseek-ai/dsh-client-ui-conversation","@deepseek-ai/dsh-client-ui-sidebar"]},{"id":"@deepseek-ai/dsh-client-ui-attachment","url":"/plugins/@deepseek-ai/dsh-client-ui-attachment/client.js?rev=5349ce7aa495","rev":"5349ce7aa495","inject":["@deepseek-ai/dsh-client-ui-conversation"]},{"id":"@deepseek-ai/dsh-client-ui-tool","url":"/plugins/@deepseek-ai/dsh-client-ui-tool/client.js?rev=48c8d92e8828","rev":"48c8d92e8828","inject":["@deepseek-ai/dsh-client-connection","@deepseek-ai/dsh-client-runtime","@deepseek-ai/dsh-client-locale","@deepseek-ai/dsh-client-ui-conversation"]},{"id":"@deepseek-ai/dsh-client-ui-workflow-run","url":"/plugins/@deepseek-ai/dsh-client-ui-workflow-run/client.js?rev=60e130ad4f36","rev":"60e130ad4f36","inject":["@deepseek-ai/dsh-client-locale","@deepseek-ai/dsh-client-runtime","@deepseek-ai/dsh-client-ui-conversation"]},{"id":"@deepseek-ai/dsh-client-ui-deliverables","url":"/plugins/@deepseek-ai/dsh-client-ui-deliverables/client.js?rev=13a78ee19f2e","rev":"13a78ee19f2e","inject":["@deepseek-ai/dsh-client-connection","@deepseek-ai/dsh-client-locale","@deepseek-ai/dsh-client-runtime","@deepseek-ai/dsh-client-ui-conversation"]},{"id":"@deepseek-ai/dsh-client-ui-workspace","url":"/plugins/@deepseek-ai/dsh-client-ui-workspace/client.js?rev=2e1cd4f55f0c","rev":"2e1cd4f55f0c","inject":["@deepseek-ai/dsh-client-connection","@deepseek-ai/dsh-client-locale","@deepseek-ai/dsh-client-runtime","@deepseek-ai/dsh-client-ui-conversation","@deepseek-ai/dsh-client-ui-sidebar"]},{"id":"@deepseek-ai/dsh-client-ui-input-trigger","url":"/plugins/@deepseek-ai/dsh-client-ui-input-trigger/client.js?rev=b9564b9138a7","rev":"b9564b9138a7","inject":["@deepseek-ai/dsh-client-runtime","@deepseek-ai/dsh-client-locale"]},{"id":"@deepseek-ai/dsh-client-ui-commands","url":"/plugins/@deepseek-ai/dsh-client-ui-commands/client.js?rev=887c0ca028a4","rev":"887c0ca028a4","inject":["@deepseek-ai/dsh-api-remotes","@deepseek-ai/dsh-client-runtime","@deepseek-ai/dsh-client-locale","@deepseek-ai/dsh-client-ui-input-trigger","@deepseek-ai/dsh-client-ui-conversation"]},{"id":"@deepseek-ai/dsh-client-ui-skill","url":"/plugins/@deepseek-ai/dsh-client-ui-skill/client.js?rev=f229a70eecce","rev":"f229a70eecce","inject":["@deepseek-ai/dsh-client-runtime","@deepseek-ai/dsh-client-locale","@deepseek-ai/dsh-client-ui-tool","@deepseek-ai/dsh-client-ui-input-trigger","@deepseek-ai/dsh-api-remotes"]},{"id":"@deepseek-ai/dsh-client-ui-subagent","url":"/plugins/@deepseek-ai/dsh-client-ui-subagent/client.js?rev=0bb1ff842ae8","rev":"0bb1ff842ae8","inject":["@deepseek-ai/dsh-client-locale","@deepseek-ai/dsh-client-runtime","@deepseek-ai/dsh-client-ui-conversation","@deepseek-ai/dsh-client-ui-primitives","@deepseek-ai/dsh-client-ui-input-trigger"]},{"id":"@deepseek-ai/dsh-client-ui-jobs","url":"/plugins/@deepseek-ai/dsh-client-ui-jobs/client.js?rev=ed0d04a8c154","rev":"ed0d04a8c154","inject":["@deepseek-ai/dsh-client-locale","@deepseek-ai/dsh-client-runtime","@deepseek-ai/dsh-client-ui-conversation","@deepseek-ai/dsh-client-ui-primitives"]},{"id":"@deepseek-ai/dsh-client-ui-model-selection","url":"/plugins/@deepseek-ai/dsh-client-ui-model-selection/client.js?rev=639da97bfe66","rev":"639da97bfe66","inject":["@deepseek-ai/dsh-client-locale","@deepseek-ai/dsh-client-runtime","@deepseek-ai/dsh-client-ui-commands","@deepseek-ai/dsh-api-remotes"]},{"id":"@deepseek-ai/dsh-client-ui-permission-presets","url":"/plugins/@deepseek-ai/dsh-client-ui-permission-presets/client.js?rev=e36eeb24d0eb","rev":"e36eeb24d0eb","inject":["@deepseek-ai/dsh-client-connection","@deepseek-ai/dsh-client-locale","@deepseek-ai/dsh-client-runtime","@deepseek-ai/dsh-client-ui-commands","@deepseek-ai/dsh-api-remotes","@deepseek-ai/dsh-client-ui-settings"]},{"id":"@deepseek-ai/dsh-client-ui-agent-preset","url":"/plugins/@deepseek-ai/dsh-client-ui-agent-preset/client.js?rev=96dbaff92d41","rev":"96dbaff92d41","inject":["@deepseek-ai/dsh-client-connection","@deepseek-ai/dsh-client-locale","@deepseek-ai/dsh-client-runtime","@deepseek-ai/dsh-client-ui-conversation","@deepseek-ai/dsh-client-ui-settings","@deepseek-ai/dsh-api-remotes"]},{"id":"@deepseek-ai/dsh-client-ui-user-questions","url":"/plugins/@deepseek-ai/dsh-client-ui-user-questions/client.js?rev=350ccf0385ba","rev":"350ccf0385ba","inject":["@deepseek-ai/dsh-client-locale","@deepseek-ai/dsh-client-ui-conversation"]},{"id":"@deepseek-ai/dsh-client-ui-trajectory","url":"/plugins/@deepseek-ai/dsh-client-ui-trajectory/client.js?rev=3345fd0d652c","rev":"3345fd0d652c","inject":["@deepseek-ai/dsh-client-locale","@deepseek-ai/dsh-client-runtime","@deepseek-ai/dsh-client-ui-conversation"]},{"id":"dsh-edge-client-ui","url":"/plugins/dsh-edge-client-ui/client.js?rev=015841184f9e","rev":"015841184f9e","inject":["@deepseek-ai/dsh-client-runtime","@deepseek-ai/dsh-client-ui-settings","@deepseek-ai/dsh-client-locale"]}]}</script>
|
|
43
43
|
<meta charset="utf-8" />
|
|
44
44
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
45
45
|
<link rel="manifest" href="/manifest.webmanifest" />
|
|
@@ -5263,9 +5263,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
5263
5263
|
workspaceId: workspaceIdSchema.optional(),
|
|
5264
5264
|
cwd: string().optional(),
|
|
5265
5265
|
sessionId: sessionIdSchema.optional(),
|
|
5266
|
-
agentPreset: string().optional()
|
|
5267
|
-
|
|
5268
|
-
}).refine((payload) => payload.workspaceId === void 0 || payload.cwd === void 0, { message: "session.create accepts workspaceId or cwd, not both" }).refine((payload) => payload.reuseWorkspaceBlank !== true || payload.workspaceId !== void 0 && payload.sessionId !== void 0, { message: "session.create reuseWorkspaceBlank requires workspaceId and sessionId" });
|
|
5266
|
+
agentPreset: string().optional()
|
|
5267
|
+
}).refine((payload) => payload.workspaceId === void 0 || payload.cwd === void 0, { message: "session.create accepts workspaceId or cwd, not both" });
|
|
5269
5268
|
/** session.create response value. */
|
|
5270
5269
|
const sessionCreateValueSchema = object({
|
|
5271
5270
|
sessionId: sessionIdSchema,
|
|
@@ -8145,10 +8145,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
8145
8145
|
*/
|
|
8146
8146
|
async create(opts = {}) {
|
|
8147
8147
|
try {
|
|
8148
|
-
const shared = {
|
|
8149
|
-
...opts.sessionId === void 0 ? {} : { sessionId: opts.sessionId },
|
|
8150
|
-
...opts.reuseWorkspaceBlank === void 0 ? {} : { reuseWorkspaceBlank: opts.reuseWorkspaceBlank }
|
|
8151
|
-
};
|
|
8148
|
+
const shared = opts.sessionId === void 0 ? {} : { sessionId: opts.sessionId };
|
|
8152
8149
|
const payload = opts.workspaceId !== void 0 ? {
|
|
8153
8150
|
workspaceId: opts.workspaceId,
|
|
8154
8151
|
...shared
|
|
@@ -9815,7 +9812,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
9815
9812
|
list;
|
|
9816
9813
|
/** Workspace baseline and frame owner. */
|
|
9817
9814
|
manager;
|
|
9818
|
-
/** In-flight blank-session
|
|
9815
|
+
/** In-flight blank-session creates keyed by workspace (connectWorkspace coalescing). */
|
|
9819
9816
|
connecting = /* @__PURE__ */ new Map();
|
|
9820
9817
|
/** Guards the runtime-owned one-shot initial-selection subscription. */
|
|
9821
9818
|
initialSelectionStarted = false;
|
|
@@ -9847,11 +9844,9 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
9847
9844
|
}
|
|
9848
9845
|
/**
|
|
9849
9846
|
* Resolve the session a New Session flow lands in once this Workspace is
|
|
9850
|
-
* chosen:
|
|
9851
|
-
*
|
|
9852
|
-
*
|
|
9853
|
-
* holds no intermediate state). The adoption tells optional default owners
|
|
9854
|
-
* that this exact session passed the reuse checks.
|
|
9847
|
+
* chosen: reuse the workspace's existing blank session when one is in the
|
|
9848
|
+
* list mirror, else create a fresh one on the host (`session.create` births
|
|
9849
|
+
* the full Session+Agent — the client holds no intermediate state). The
|
|
9855
9850
|
* caller owns navigation: take the returned id to `sessions.open`.
|
|
9856
9851
|
* Resolution guarantee (both arms): the returned id is already in the list
|
|
9857
9852
|
* store and `sessions.binding(id)` resolves synchronously — draft hand-off
|
|
@@ -9868,11 +9863,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
9868
9863
|
const sessions = this.sessions.list.getSnapshot();
|
|
9869
9864
|
for (const id of sessions.ids) {
|
|
9870
9865
|
const summary = sessions.byId[id];
|
|
9871
|
-
if (summary !== void 0 && summary.blank && summary.cwd === workspace.path && workspace.sessionIds.includes(summary.id) && !archived.includes(summary.id)) return
|
|
9872
|
-
workspaceId,
|
|
9873
|
-
sessionId: summary.id,
|
|
9874
|
-
reuseWorkspaceBlank: true
|
|
9875
|
-
});
|
|
9866
|
+
if (summary !== void 0 && summary.blank && summary.cwd === workspace.path && workspace.sessionIds.includes(summary.id) && !archived.includes(summary.id)) return summary.id;
|
|
9876
9867
|
}
|
|
9877
9868
|
const attempt = this.sessions.create({ workspaceId }).finally(() => {
|
|
9878
9869
|
this.connecting.delete(workspaceId);
|
|
@@ -3241,8 +3241,8 @@ window.__ModuleLoader__.load({
|
|
|
3241
3241
|
//#region lib/types/client/skeleton/PermissionSelect.js
|
|
3242
3242
|
const FULL_ACCESS = "danger-full-access";
|
|
3243
3243
|
const shieldOutline = "M8.20554 0.899994L14.7901 3.36857V7.01026C14.7901 12 11.0466 14.2103 8.20554 15.3C5.36446 14.2103 1.62012 12 1.62012 7.01026V3.36857L8.20554 0.899994Z";
|
|
3244
|
-
const permissionGlyphs =
|
|
3245
|
-
|
|
3244
|
+
const permissionGlyphs = {
|
|
3245
|
+
"read-only": (0, react_jsx_runtime.jsxs)("svg", {
|
|
3246
3246
|
width: "16",
|
|
3247
3247
|
height: "16",
|
|
3248
3248
|
viewBox: "0 0 16 16",
|
|
@@ -3257,8 +3257,8 @@ window.__ModuleLoader__.load({
|
|
|
3257
3257
|
d: "M12.1654 5.7552L8.9447 9.41475C8.73044 9.65816 8.53628 9.8804 8.35774 10.0423C8.1713 10.2114 7.94235 10.3717 7.64016 10.4254C7.48207 10.4535 7.32 10.4552 7.16151 10.4294C6.85843 10.3801 6.62728 10.2223 6.43836 10.0559C6.25752 9.89653 6.06037 9.67732 5.84264 9.43705L4.72925 8.20897L5.63557 7.38707L6.74897 8.61594C6.98603 8.87755 7.12974 9.03533 7.24673 9.13839C7.31033 9.19443 7.34485 9.21476 7.35823 9.22122C7.38068 9.22484 7.40352 9.22515 7.42593 9.22122C7.40522 9.22502 7.42893 9.23294 7.53583 9.136C7.65132 9.03126 7.79316 8.87139 8.02643 8.60638L11.2479 4.94763L12.1654 5.7552Z",
|
|
3258
3258
|
fill: "currentColor"
|
|
3259
3259
|
})]
|
|
3260
|
-
})
|
|
3261
|
-
|
|
3260
|
+
}),
|
|
3261
|
+
"workspace-write": (0, react_jsx_runtime.jsxs)("svg", {
|
|
3262
3262
|
width: "16",
|
|
3263
3263
|
height: "16",
|
|
3264
3264
|
viewBox: "0 0 16 16",
|
|
@@ -3286,8 +3286,8 @@ window.__ModuleLoader__.load({
|
|
|
3286
3286
|
fill: "currentColor"
|
|
3287
3287
|
})
|
|
3288
3288
|
]
|
|
3289
|
-
})
|
|
3290
|
-
[FULL_ACCESS
|
|
3289
|
+
}),
|
|
3290
|
+
[FULL_ACCESS]: (0, react_jsx_runtime.jsxs)("svg", {
|
|
3291
3291
|
width: "16",
|
|
3292
3292
|
height: "16",
|
|
3293
3293
|
viewBox: "0 0 16 16",
|
|
@@ -3309,33 +3309,25 @@ window.__ModuleLoader__.load({
|
|
|
3309
3309
|
fill: "currentColor"
|
|
3310
3310
|
})
|
|
3311
3311
|
]
|
|
3312
|
-
})
|
|
3313
|
-
|
|
3312
|
+
})
|
|
3313
|
+
};
|
|
3314
3314
|
/** Glyph for a permission option value; host-configured names outside the design set get none. */
|
|
3315
3315
|
function permissionGlyph(value) {
|
|
3316
|
-
return permissionGlyphs
|
|
3316
|
+
return permissionGlyphs[value];
|
|
3317
3317
|
}
|
|
3318
3318
|
/**
|
|
3319
|
-
* Display transform:
|
|
3320
|
-
* non-kebab host-configured names
|
|
3319
|
+
* Display transform: kebab-case machine names render as title-case labels
|
|
3320
|
+
* (`workspace-write` → `Workspace Write`); non-kebab host-configured names
|
|
3321
|
+
* pass through. Full access intentionally overrides the machine-name
|
|
3322
|
+
* transform so both permission surfaces use the product label `Full access`;
|
|
3323
|
+
* the warning body remains locale-aware.
|
|
3321
3324
|
*/
|
|
3322
3325
|
function displayName(name) {
|
|
3323
3326
|
if (!/^[a-z0-9]+(-[a-z0-9]+)*$/.test(name)) return name;
|
|
3324
3327
|
return name.split("-").map((word) => word.charAt(0).toUpperCase() + word.slice(1)).join(" ");
|
|
3325
3328
|
}
|
|
3326
|
-
|
|
3327
|
-
|
|
3328
|
-
["workspace-write", "Workspace Write"],
|
|
3329
|
-
[FULL_ACCESS, "Full access"]
|
|
3330
|
-
]);
|
|
3331
|
-
function permissionLabel(value, name, t) {
|
|
3332
|
-
const builtInName = BUILT_IN_PERMISSION_NAMES.get(value);
|
|
3333
|
-
if (builtInName !== void 0 && (name === value || name === builtInName)) {
|
|
3334
|
-
if (value === "read-only") return t("access.preset.readOnly");
|
|
3335
|
-
if (value === "workspace-write") return t("access.preset.workspaceWrite");
|
|
3336
|
-
if (value === FULL_ACCESS) return t("access.preset.fullAccess");
|
|
3337
|
-
}
|
|
3338
|
-
return displayName(name);
|
|
3329
|
+
function optionLabel(option) {
|
|
3330
|
+
return option.value === FULL_ACCESS ? "Full access" : displayName(option.name);
|
|
3339
3331
|
}
|
|
3340
3332
|
function PermissionSelect({ value, locked, command, t }) {
|
|
3341
3333
|
const [pick, setPick] = (0, react.useState)(null);
|
|
@@ -3351,13 +3343,12 @@ window.__ModuleLoader__.load({
|
|
|
3351
3343
|
if (value === void 0) return null;
|
|
3352
3344
|
const currentValue = pick ?? value.currentValue;
|
|
3353
3345
|
const current = value.options.find((option) => option.value === currentValue);
|
|
3354
|
-
const currentLabel = current === void 0 ? permissionLabel(currentValue, currentValue, t) : permissionLabel(current.value, current.name, t);
|
|
3355
3346
|
const busy = pick !== null || confirmation !== null;
|
|
3356
3347
|
const items = value.options.filter((o) => o.value !== "custom").map((option) => {
|
|
3357
3348
|
const icon = permissionGlyph(option.value);
|
|
3358
3349
|
return {
|
|
3359
3350
|
id: option.value,
|
|
3360
|
-
label:
|
|
3351
|
+
label: optionLabel(option),
|
|
3361
3352
|
...icon === void 0 ? {} : { icon }
|
|
3362
3353
|
};
|
|
3363
3354
|
});
|
|
@@ -3399,7 +3390,7 @@ window.__ModuleLoader__.load({
|
|
|
3399
3390
|
anchor: (0, react_jsx_runtime.jsxs)("button", {
|
|
3400
3391
|
type: "button",
|
|
3401
3392
|
className: PermissionSelect_module_css_default.trigger,
|
|
3402
|
-
"aria-label": t("input.accessMode", { name:
|
|
3393
|
+
"aria-label": t("input.accessMode", { name: current === void 0 ? displayName(currentValue) : optionLabel(current) }),
|
|
3403
3394
|
title: current?.description,
|
|
3404
3395
|
disabled: locked || busy,
|
|
3405
3396
|
onClick: () => {
|
|
@@ -3413,7 +3404,7 @@ window.__ModuleLoader__.load({
|
|
|
3413
3404
|
}),
|
|
3414
3405
|
(0, react_jsx_runtime.jsx)("span", {
|
|
3415
3406
|
className: PermissionSelect_module_css_default.triggerLabel,
|
|
3416
|
-
children:
|
|
3407
|
+
children: current === void 0 ? displayName(currentValue) : optionLabel(current)
|
|
3417
3408
|
}),
|
|
3418
3409
|
(0, react_jsx_runtime.jsx)("span", {
|
|
3419
3410
|
className: clsx(PermissionSelect_module_css_default.chevron, open && PermissionSelect_module_css_default.chevronOpen),
|
|
@@ -6189,14 +6180,11 @@ window.__ModuleLoader__.load({
|
|
|
6189
6180
|
"settings.enter.description": "仅在智能体运行时生效;Cmd/Ctrl+Enter 使用另一行为",
|
|
6190
6181
|
"settings.enter.queue": "排队发送",
|
|
6191
6182
|
"settings.enter.steer": "插话发送",
|
|
6192
|
-
"access.
|
|
6193
|
-
"access.
|
|
6194
|
-
"access.preset.fullAccess": "完全权限",
|
|
6195
|
-
"access.confirm.title": "确认启用完全权限?",
|
|
6196
|
-
"access.confirm.description": "启用完全权限后,智能体将减少确认步骤,并且可以直接执行更多操作,包括敏感操作、文件修改或外部命令。仅建议在你信任当前任务时使用。",
|
|
6183
|
+
"access.confirm.title": "确认启用 Full access?",
|
|
6184
|
+
"access.confirm.description": "启用 Full access 后,agent 将减少确认步骤,并且可以直接执行更多操作,包括敏感操作、文件修改或外部命令。仅建议在你信任当前任务时使用。",
|
|
6197
6185
|
"access.confirm.acknowledge": "我已了解风险,并愿意继续",
|
|
6198
6186
|
"access.confirm.cancel": "取消",
|
|
6199
|
-
"access.confirm.enable": "
|
|
6187
|
+
"access.confirm.enable": "启用 Full access",
|
|
6200
6188
|
"hero.headline": "探索未至之境",
|
|
6201
6189
|
"hero.preview": "预览版",
|
|
6202
6190
|
"hero.chooseWorkspace": "选择工作区",
|
|
@@ -6365,9 +6353,6 @@ window.__ModuleLoader__.load({
|
|
|
6365
6353
|
"settings.enter.description": "Busy only; Cmd/Ctrl+Enter uses the other behavior",
|
|
6366
6354
|
"settings.enter.queue": "Queue",
|
|
6367
6355
|
"settings.enter.steer": "Steer",
|
|
6368
|
-
"access.preset.readOnly": "Read Only",
|
|
6369
|
-
"access.preset.workspaceWrite": "Workspace Write",
|
|
6370
|
-
"access.preset.fullAccess": "Full access",
|
|
6371
6356
|
"access.confirm.title": "Enable Full access?",
|
|
6372
6357
|
"access.confirm.description": "Full access reduces confirmation steps and lets the agent perform more actions directly, including sensitive operations, file changes, or external commands. Only use it when you trust the current task.",
|
|
6373
6358
|
"access.confirm.acknowledge": "I understand the risks and want to continue",
|
|
@@ -11,16 +11,6 @@ window.__ModuleLoader__.load({
|
|
|
11
11
|
//#region lib/types/client/presentation.js
|
|
12
12
|
/** Machine value of the preset that requires an explicit GUI risk gate. */
|
|
13
13
|
const FULL_ACCESS_PRESET = "danger-full-access";
|
|
14
|
-
const PRESET_LABEL_KEYS = new Map([
|
|
15
|
-
["read-only", "preset.readOnly"],
|
|
16
|
-
["workspace-write", "preset.workspaceWrite"],
|
|
17
|
-
[FULL_ACCESS_PRESET, "preset.fullAccess"]
|
|
18
|
-
]);
|
|
19
|
-
const DEFAULT_PRESET_LABELS = {
|
|
20
|
-
"preset.readOnly": "Read Only",
|
|
21
|
-
"preset.workspaceWrite": "Workspace Write",
|
|
22
|
-
"preset.fullAccess": "Full access"
|
|
23
|
-
};
|
|
24
14
|
/**
|
|
25
15
|
* Convert conventional kebab-case preset names into user-facing title case.
|
|
26
16
|
* @param name - host-supplied preset label or key.
|
|
@@ -34,13 +24,10 @@ window.__ModuleLoader__.load({
|
|
|
34
24
|
* Render a permission preset under its product label.
|
|
35
25
|
* @param value - preset machine value.
|
|
36
26
|
* @param name - host-supplied preset name.
|
|
37
|
-
* @
|
|
38
|
-
* @returns the built-in product label or the conventional display name.
|
|
27
|
+
* @returns the Full access product label or the conventional display name.
|
|
39
28
|
*/
|
|
40
|
-
function displayPermissionPreset(value, name
|
|
41
|
-
|
|
42
|
-
if (key !== void 0 && (name === value || name === DEFAULT_PRESET_LABELS[key])) return t?.(key) ?? DEFAULT_PRESET_LABELS[key];
|
|
43
|
-
return displayPresetName(name);
|
|
29
|
+
function displayPermissionPreset(value, name) {
|
|
30
|
+
return value === "danger-full-access" ? "Full access" : displayPresetName(name);
|
|
44
31
|
}
|
|
45
32
|
//#endregion
|
|
46
33
|
//#region \0dsh-css:/home/runner/work/deepseek-harness/deepseek-harness/packages/client/ui-permission-presets/src/client/PermissionRow.module.css.mjs
|
|
@@ -90,8 +77,7 @@ window.__ModuleLoader__.load({
|
|
|
90
77
|
if (state.status === "unavailable") return null;
|
|
91
78
|
const selected = state.options.find((option) => option.id === state.currentValue);
|
|
92
79
|
const busy = state.status === "loading" || state.status === "saving" || confirmingFullAccess;
|
|
93
|
-
const
|
|
94
|
-
const label = selected !== void 0 ? optionLabel(selected) : busy ? t("loading") : t("unavailable");
|
|
80
|
+
const label = selected?.label ?? (busy ? t("loading") : t("unavailable"));
|
|
95
81
|
const description = state.error ?? t("description");
|
|
96
82
|
return (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [(0, react_jsx_runtime.jsxs)("div", {
|
|
97
83
|
className: PermissionRow_module_css_default.row,
|
|
@@ -112,7 +98,7 @@ window.__ModuleLoader__.load({
|
|
|
112
98
|
},
|
|
113
99
|
items: state.options.map((option) => ({
|
|
114
100
|
id: option.id,
|
|
115
|
-
label:
|
|
101
|
+
label: option.label
|
|
116
102
|
})),
|
|
117
103
|
selectedId: state.currentValue,
|
|
118
104
|
onSelect: (id) => {
|
|
@@ -169,14 +155,11 @@ window.__ModuleLoader__.load({
|
|
|
169
155
|
"description": "选择新会话的默认权限模式",
|
|
170
156
|
"loading": "加载中",
|
|
171
157
|
"unavailable": "不可用",
|
|
172
|
-
"
|
|
173
|
-
"
|
|
174
|
-
"preset.fullAccess": "完全权限",
|
|
175
|
-
"confirm.title": "确认启用完全权限?",
|
|
176
|
-
"confirm.description": "启用完全权限后,新会话将减少确认步骤,并且可以直接执行更多操作,包括敏感操作、文件修改或外部命令。仅建议在你信任后续任务时使用。",
|
|
158
|
+
"confirm.title": "确认启用 Full access?",
|
|
159
|
+
"confirm.description": "启用 Full access 后,新会话将减少确认步骤,并且可以直接执行更多操作,包括敏感操作、文件修改或外部命令。仅建议在你信任后续任务时使用。",
|
|
177
160
|
"confirm.acknowledge": "我已了解风险,并愿意继续",
|
|
178
161
|
"confirm.cancel": "取消",
|
|
179
|
-
"confirm.enable": "
|
|
162
|
+
"confirm.enable": "启用 Full access"
|
|
180
163
|
};
|
|
181
164
|
/** English dictionary, checked complete against the zh key set. */
|
|
182
165
|
const en = {
|
|
@@ -184,9 +167,6 @@ window.__ModuleLoader__.load({
|
|
|
184
167
|
"description": "Choose the default permission mode for new sessions",
|
|
185
168
|
"loading": "Loading",
|
|
186
169
|
"unavailable": "Unavailable",
|
|
187
|
-
"preset.readOnly": "Read Only",
|
|
188
|
-
"preset.workspaceWrite": "Workspace Write",
|
|
189
|
-
"preset.fullAccess": "Full access",
|
|
190
170
|
"confirm.title": "Enable Full access?",
|
|
191
171
|
"confirm.description": "Full access lets new sessions reduce confirmation steps and perform more actions directly, including sensitive operations, file changes, or external commands. Only use it when you trust subsequent tasks.",
|
|
192
172
|
"confirm.acknowledge": "I understand the risks and want to continue",
|
|
@@ -195,20 +175,14 @@ window.__ModuleLoader__.load({
|
|
|
195
175
|
};
|
|
196
176
|
/** Simplified Chinese dictionary for the current-session popup gate. */
|
|
197
177
|
const accessZh = {
|
|
198
|
-
"
|
|
199
|
-
"
|
|
200
|
-
"preset.fullAccess": "完全权限",
|
|
201
|
-
"confirm.title": "确认启用完全权限?",
|
|
202
|
-
"confirm.description": "启用完全权限后,智能体将减少确认步骤,并且可以直接执行更多操作,包括敏感操作、文件修改或外部命令。仅建议在你信任当前任务时使用。",
|
|
178
|
+
"confirm.title": "确认启用 Full access?",
|
|
179
|
+
"confirm.description": "启用 Full access 后,agent 将减少确认步骤,并且可以直接执行更多操作,包括敏感操作、文件修改或外部命令。仅建议在你信任当前任务时使用。",
|
|
203
180
|
"confirm.acknowledge": "我已了解风险,并愿意继续",
|
|
204
181
|
"confirm.cancel": "取消",
|
|
205
|
-
"confirm.enable": "
|
|
182
|
+
"confirm.enable": "启用 Full access"
|
|
206
183
|
};
|
|
207
184
|
/** English dictionary for the current-session popup gate. */
|
|
208
185
|
const accessEn = {
|
|
209
|
-
"preset.readOnly": "Read Only",
|
|
210
|
-
"preset.workspaceWrite": "Workspace Write",
|
|
211
|
-
"preset.fullAccess": "Full access",
|
|
212
186
|
"confirm.title": "Enable Full access?",
|
|
213
187
|
"confirm.description": "Full access reduces confirmation steps and lets the agent perform more actions directly, including sensitive operations, file changes, or external commands. Only use it when you trust the current task.",
|
|
214
188
|
"confirm.acknowledge": "I understand the risks and want to continue",
|
|
@@ -296,8 +270,7 @@ window.__ModuleLoader__.load({
|
|
|
296
270
|
this.derive();
|
|
297
271
|
}
|
|
298
272
|
/**
|
|
299
|
-
* Persist one preset as the default for
|
|
300
|
-
* confirmed blank reuse.
|
|
273
|
+
* Persist one preset as the default for subsequently created sessions.
|
|
301
274
|
* A selection made while one is already saving is ignored — the row's
|
|
302
275
|
* control is disabled during the save, so this only drops programmatic
|
|
303
276
|
* double-submits rather than user intent.
|
|
@@ -409,7 +382,7 @@ window.__ModuleLoader__.load({
|
|
|
409
382
|
function optionsOf(value, t) {
|
|
410
383
|
return value.options.filter((option) => option.value !== "custom").map((option) => ({
|
|
411
384
|
id: option.value,
|
|
412
|
-
label: displayPermissionPreset(option.value, option.name
|
|
385
|
+
label: displayPermissionPreset(option.value, option.name),
|
|
413
386
|
...option.description !== void 0 ? { detail: option.description } : {},
|
|
414
387
|
...option.value === value.currentValue ? { active: true } : {},
|
|
415
388
|
...option.value === "danger-full-access" ? { confirmation: {
|
|
@@ -431,18 +404,12 @@ window.__ModuleLoader__.load({
|
|
|
431
404
|
const sessions = ctx.sessions;
|
|
432
405
|
ctx.effect(() => {
|
|
433
406
|
const disposers = [ctx.locale.register(ACCESS_NS, "zh", {
|
|
434
|
-
"preset.readOnly": accessZh["preset.readOnly"],
|
|
435
|
-
"preset.workspaceWrite": accessZh["preset.workspaceWrite"],
|
|
436
|
-
"preset.fullAccess": accessZh["preset.fullAccess"],
|
|
437
407
|
"confirm.title": accessZh["confirm.title"],
|
|
438
408
|
"confirm.description": accessZh["confirm.description"],
|
|
439
409
|
"confirm.acknowledge": accessZh["confirm.acknowledge"],
|
|
440
410
|
"confirm.cancel": accessZh["confirm.cancel"],
|
|
441
411
|
"confirm.enable": accessZh["confirm.enable"]
|
|
442
412
|
}), ctx.locale.register(ACCESS_NS, "en", {
|
|
443
|
-
"preset.readOnly": accessEn["preset.readOnly"],
|
|
444
|
-
"preset.workspaceWrite": accessEn["preset.workspaceWrite"],
|
|
445
|
-
"preset.fullAccess": accessEn["preset.fullAccess"],
|
|
446
413
|
"confirm.title": accessEn["confirm.title"],
|
|
447
414
|
"confirm.description": accessEn["confirm.description"],
|
|
448
415
|
"confirm.acknowledge": accessEn["confirm.acknowledge"],
|
|
@@ -460,12 +460,12 @@ window.__ModuleLoader__.load({
|
|
|
460
460
|
id: "rename",
|
|
461
461
|
label: t("rename"),
|
|
462
462
|
icon: (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconEditOutline16, {})
|
|
463
|
-
},
|
|
463
|
+
}, {
|
|
464
464
|
id: "delete",
|
|
465
465
|
label: t("delete.workspace"),
|
|
466
466
|
icon: (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconTrashOutline16, {}),
|
|
467
467
|
danger: true
|
|
468
|
-
}]
|
|
468
|
+
}];
|
|
469
469
|
const ownRow = (0, react_jsx_runtime.jsxs)("div", {
|
|
470
470
|
className: clsx(Rows_module_css_default.projectRow, menuOpen && Rows_module_css_default.menuOpen),
|
|
471
471
|
role: "treeitem",
|
|
@@ -507,7 +507,7 @@ window.__ModuleLoader__.load({
|
|
|
507
507
|
/* v8 ignore next -- workspaceMenuItems carries exactly these two rows today. */
|
|
508
508
|
if (id !== "rename" && id !== "delete") return;
|
|
509
509
|
if (id === "rename") actions.rename();
|
|
510
|
-
else actions.delete
|
|
510
|
+
else actions.delete();
|
|
511
511
|
},
|
|
512
512
|
portal: true,
|
|
513
513
|
closeOnPointerLeave: true,
|
|
@@ -1197,7 +1197,7 @@ window.__ModuleLoader__.load({
|
|
|
1197
1197
|
return e.clientY < rect.top + rect.height / 2 ? "before" : "after";
|
|
1198
1198
|
}
|
|
1199
1199
|
/** The scrolling session tree; unmounting drops the sessions subscription and expand-all state. */
|
|
1200
|
-
function SessionTree({ useSessions, startSession, open, forkSession, workspaces, archivedSessionIds, onRenameRequest, onDeleteRequest, onSessionRename, onSessionArchive, insertWorkspaceBefore, insertSessionBefore, orderBy, groupExpansion, setGroupExpanded, sessionOrderByAccount, sessionUpdatedAtByAccount, syncSessionOrderAccount, setSessionOrder,
|
|
1200
|
+
function SessionTree({ useSessions, startSession, open, forkSession, workspaces, archivedSessionIds, onRenameRequest, onDeleteRequest, onSessionRename, onSessionArchive, insertWorkspaceBefore, insertSessionBefore, orderBy, groupExpansion, setGroupExpanded, sessionOrderByAccount, sessionUpdatedAtByAccount, syncSessionOrderAccount, setSessionOrder, home, t }) {
|
|
1201
1201
|
const list = useSessions((s) => s);
|
|
1202
1202
|
const current = list.current;
|
|
1203
1203
|
const [expandedSessionGroups, setExpandedSessionGroups] = (0, react.useState)([]);
|
|
@@ -1395,10 +1395,10 @@ window.__ModuleLoader__.load({
|
|
|
1395
1395
|
/* v8 ignore next -- narrowing guard: the actions object exists only for real-workspace groups. */
|
|
1396
1396
|
if (group.workspaceId !== void 0) onRenameRequest(group.workspaceId, group.label);
|
|
1397
1397
|
},
|
|
1398
|
-
|
|
1398
|
+
delete: () => {
|
|
1399
1399
|
/* v8 ignore next -- narrowing guard: the actions object exists only for real-workspace groups. */
|
|
1400
1400
|
if (group.workspaceId !== void 0) onDeleteRequest(group.workspaceId, group.label);
|
|
1401
|
-
}
|
|
1401
|
+
}
|
|
1402
1402
|
}
|
|
1403
1403
|
}),
|
|
1404
1404
|
(expandedSessionGroups.includes(group.key) ? group.sessions : group.sessions.slice(0, COLLAPSED_SESSION_LIMIT)).map((node) => {
|
|
@@ -2052,7 +2052,6 @@ window.__ModuleLoader__.load({
|
|
|
2052
2052
|
insertWorkspaceBefore,
|
|
2053
2053
|
insertSessionBefore,
|
|
2054
2054
|
orderBy,
|
|
2055
|
-
canAddWorkspace: directoryFlowAvailable,
|
|
2056
2055
|
home,
|
|
2057
2056
|
t,
|
|
2058
2057
|
onRenameRequest: (workspaceId, currentTitle) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-edge",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"description": "Your DeepSeek Harness, anywhere — deploy a persistent personal coding agent to Cloudflare Workers in one command",
|
|
5
5
|
"author": "pawaca",
|
|
6
6
|
"license": "MIT",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"access": "public"
|
|
45
45
|
},
|
|
46
46
|
"dshEdge": {
|
|
47
|
-
"upstreamVersion": "0.1.1-rc.
|
|
47
|
+
"upstreamVersion": "0.1.1-rc.2"
|
|
48
48
|
},
|
|
49
49
|
"scripts": {
|
|
50
50
|
"bundle:direct": "pnpm run web:build && pnpm --dir standalone run build:worker:direct && node standalone/scripts/promote.mjs direct",
|
|
@@ -75,27 +75,27 @@
|
|
|
75
75
|
"@cloudflare/computer": "0.2.0",
|
|
76
76
|
"@cloudflare/workers-types": "5.20260812.1",
|
|
77
77
|
"@deepseek-ai/cordis": "4.0.1",
|
|
78
|
-
"@deepseek-ai/dsh-agent": "0.1.1-rc.
|
|
79
|
-
"@deepseek-ai/dsh-agent-loop": "0.1.1-rc.
|
|
80
|
-
"@deepseek-ai/dsh-anonymous-user-id": "0.1.1-rc.
|
|
81
|
-
"@deepseek-ai/dsh-attachment": "0.1.1-rc.
|
|
82
|
-
"@deepseek-ai/dsh-brand": "0.1.1-rc.
|
|
83
|
-
"@deepseek-ai/dsh-credentials": "0.1.1-rc.
|
|
84
|
-
"@deepseek-ai/dsh-host-apiproxy": "0.1.1-rc.
|
|
85
|
-
"@deepseek-ai/dsh-launch-environment": "0.1.1-rc.
|
|
86
|
-
"@deepseek-ai/dsh-llm": "0.1.1-rc.
|
|
87
|
-
"@deepseek-ai/dsh-llm-deepseek": "0.1.1-rc.
|
|
88
|
-
"@deepseek-ai/dsh-session": "0.1.1-rc.
|
|
89
|
-
"@deepseek-ai/dsh-session-persistence": "0.1.1-rc.
|
|
90
|
-
"@deepseek-ai/dsh-session-query": "0.1.1-rc.
|
|
91
|
-
"@deepseek-ai/dsh-session-title": "0.1.1-rc.
|
|
92
|
-
"@deepseek-ai/dsh-settings": "0.1.1-rc.
|
|
93
|
-
"@deepseek-ai/dsh-system-prompt": "0.1.1-rc.
|
|
94
|
-
"@deepseek-ai/dsh-tool-call-timeout-policy": "0.1.1-rc.
|
|
95
|
-
"@deepseek-ai/dsh-tool-web": "0.1.1-rc.
|
|
96
|
-
"@deepseek-ai/dsh-tools": "0.1.1-rc.
|
|
97
|
-
"@deepseek-ai/dsh-web": "0.1.1-rc.
|
|
98
|
-
"@deepseek-ai/dsh-web-search-deepseek": "0.1.1-rc.
|
|
78
|
+
"@deepseek-ai/dsh-agent": "0.1.1-rc.2",
|
|
79
|
+
"@deepseek-ai/dsh-agent-loop": "0.1.1-rc.2",
|
|
80
|
+
"@deepseek-ai/dsh-anonymous-user-id": "0.1.1-rc.2",
|
|
81
|
+
"@deepseek-ai/dsh-attachment": "0.1.1-rc.2",
|
|
82
|
+
"@deepseek-ai/dsh-brand": "0.1.1-rc.2",
|
|
83
|
+
"@deepseek-ai/dsh-credentials": "0.1.1-rc.2",
|
|
84
|
+
"@deepseek-ai/dsh-host-apiproxy": "0.1.1-rc.2",
|
|
85
|
+
"@deepseek-ai/dsh-launch-environment": "0.1.1-rc.2",
|
|
86
|
+
"@deepseek-ai/dsh-llm": "0.1.1-rc.2",
|
|
87
|
+
"@deepseek-ai/dsh-llm-deepseek": "0.1.1-rc.2",
|
|
88
|
+
"@deepseek-ai/dsh-session": "0.1.1-rc.2",
|
|
89
|
+
"@deepseek-ai/dsh-session-persistence": "0.1.1-rc.2",
|
|
90
|
+
"@deepseek-ai/dsh-session-query": "0.1.1-rc.2",
|
|
91
|
+
"@deepseek-ai/dsh-session-title": "0.1.1-rc.2",
|
|
92
|
+
"@deepseek-ai/dsh-settings": "0.1.1-rc.2",
|
|
93
|
+
"@deepseek-ai/dsh-system-prompt": "0.1.1-rc.2",
|
|
94
|
+
"@deepseek-ai/dsh-tool-call-timeout-policy": "0.1.1-rc.2",
|
|
95
|
+
"@deepseek-ai/dsh-tool-web": "0.1.1-rc.2",
|
|
96
|
+
"@deepseek-ai/dsh-tools": "0.1.1-rc.2",
|
|
97
|
+
"@deepseek-ai/dsh-web": "0.1.1-rc.2",
|
|
98
|
+
"@deepseek-ai/dsh-web-search-deepseek": "0.1.1-rc.2",
|
|
99
99
|
"just-bash": "3.3.0",
|
|
100
100
|
"fast-png": "8.0.0",
|
|
101
101
|
"jpeg-js": "0.4.4",
|
package/scripts/cli.mjs
CHANGED
|
@@ -222,6 +222,19 @@ export function createInstallerUi(
|
|
|
222
222
|
validate,
|
|
223
223
|
})))
|
|
224
224
|
},
|
|
225
|
+
async enableImages(isTemporary) {
|
|
226
|
+
if (isTemporary) return false
|
|
227
|
+
const mode = await requireAnswer(await clack.select(withOutput({
|
|
228
|
+
message: 'Image optimization',
|
|
229
|
+
initialValue: 'enable',
|
|
230
|
+
signal,
|
|
231
|
+
options: [
|
|
232
|
+
{ value: 'enable', label: 'Enable', hint: 'free 5,000 transforms/month' },
|
|
233
|
+
{ value: 'skip', label: 'Skip' },
|
|
234
|
+
],
|
|
235
|
+
})))
|
|
236
|
+
return mode === 'enable'
|
|
237
|
+
},
|
|
225
238
|
async confirm(summary) {
|
|
226
239
|
note([
|
|
227
240
|
`Runtime: ${summary.modeLabel}`,
|
package/scripts/install.d.mts
CHANGED
|
@@ -30,6 +30,7 @@ export interface InstallerUi {
|
|
|
30
30
|
selectOwnerSecretMode(): Promise<'generate' | 'custom'>
|
|
31
31
|
ownerSecret(validate: (value: string) => string | undefined): Promise<string>
|
|
32
32
|
deepSeekKey(validate: (value: string) => string | undefined): Promise<string>
|
|
33
|
+
enableImages?(isTemporary: boolean): Promise<boolean>
|
|
33
34
|
confirm(summary: {
|
|
34
35
|
mode: RuntimeMode
|
|
35
36
|
modeLabel: string
|
package/scripts/install.mjs
CHANGED
|
@@ -646,6 +646,9 @@ export async function installEdge({
|
|
|
646
646
|
const deepSeekKey = await ui.deepSeekKey(validateDeepSeekKey)
|
|
647
647
|
const deepSeekError = validateDeepSeekKey(deepSeekKey)
|
|
648
648
|
if (deepSeekError !== undefined) throw new Error(deepSeekError)
|
|
649
|
+
const enableImages = !temporary && typeof ui.enableImages === 'function'
|
|
650
|
+
? await ui.enableImages(temporary)
|
|
651
|
+
: false
|
|
649
652
|
|
|
650
653
|
let bucketName
|
|
651
654
|
if (attachmentStorage === 'private-r2') {
|
|
@@ -683,6 +686,7 @@ export async function installEdge({
|
|
|
683
686
|
const outputFile = join(temporaryDirectory, 'wrangler-output.ndjson')
|
|
684
687
|
await writePrebuiltModeWranglerConfig(mode, configFile, {
|
|
685
688
|
...bucketName === undefined ? {} : { r2BucketName: bucketName },
|
|
689
|
+
enableImages,
|
|
686
690
|
})
|
|
687
691
|
await writeFile(secretsFile, JSON.stringify({
|
|
688
692
|
...deepSeekKey !== '' ? { DEEPSEEK_API_KEY: deepSeekKey } : {},
|
|
@@ -67,6 +67,10 @@ export function renderParsedPrebuiltModeWranglerConfig(mode, parsed, options = {
|
|
|
67
67
|
config.no_bundle = true
|
|
68
68
|
config.find_additional_modules = false
|
|
69
69
|
applyAttachmentStorage(config, mode, options.r2BucketName)
|
|
70
|
+
if (options.enableImages) {
|
|
71
|
+
const target = mode === 'direct' ? config : config.env?.isolated
|
|
72
|
+
if (isRecord(target)) target.images = { binding: 'IMAGES' }
|
|
73
|
+
}
|
|
70
74
|
return `${JSON.stringify(config, undefined, 2)}\n`
|
|
71
75
|
}
|
|
72
76
|
|