@dsmm/dsmm 0.3.2 → 0.3.4
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/README.md +2 -2
- package/agent-presets/dsmm-builder/agent.cordis.yml +1 -1
- package/agent-presets/dsmm-clarifier/agent.cordis.yml +1 -1
- package/agent-presets/dsmm-code-search/agent.cordis.yml +1 -1
- package/agent-presets/dsmm-coding/agent.cordis.yml +3 -2
- package/agent-presets/dsmm-complex/agent.cordis.yml +2 -1
- package/agent-presets/dsmm-creative/agent.cordis.yml +1 -1
- package/agent-presets/dsmm-cross-cutting/agent.cordis.yml +1 -1
- package/agent-presets/dsmm-deep/agent.cordis.yml +2 -1
- package/agent-presets/dsmm-doc-search/agent.cordis.yml +1 -1
- package/agent-presets/dsmm-documenting/agent.cordis.yml +1 -1
- package/agent-presets/dsmm-frontend/agent.cordis.yml +4 -2
- package/agent-presets/dsmm-hard-reasoning/agent.cordis.yml +1 -1
- package/agent-presets/dsmm-media-reader/agent.cordis.yml +1 -1
- package/agent-presets/dsmm-normal-task/agent.cordis.yml +3 -2
- package/agent-presets/dsmm-oracle/agent.cordis.yml +1 -1
- package/agent-presets/dsmm-oracle-2nd/agent.cordis.yml +1 -1
- package/agent-presets/dsmm-orchestrator/agent.cordis.yml +11 -1
- package/agent-presets/dsmm-plan-critic/agent.cordis.yml +1 -1
- package/agent-presets/dsmm-planner/agent.cordis.yml +1 -1
- package/agent-presets/dsmm-quick/agent.cordis.yml +2 -1
- package/agent-presets/dsmm-research/agent.cordis.yml +1 -1
- package/agent-presets/dsmm-reviewer/agent.cordis.yml +1 -1
- package/cordis.patch.yml +0 -9
- package/docs/agent-presets.md +5 -5
- package/docs/compatibility.md +2 -6
- package/docs/migration-from-ocmm.md +1 -1
- package/docs/native-permissions.md +11 -3
- package/docs/roadmap.md +31 -11
- package/docs/runtime-recovery.md +30 -2
- package/docs/settings-status.md +7 -5
- package/docs/skill-sync.md +13 -14
- package/lib/client/ChildrenPanel.d.ts +1 -4
- package/lib/client/ChildrenPanel.js +3 -3
- package/lib/client/DeploymentFields.js +12 -1
- package/lib/client/DeploymentPage.d.ts +1 -3
- package/lib/client/DeploymentPage.js +30 -18
- package/lib/client/NativeCommandEntries.js +47 -37
- package/lib/client/PermissionRuleEntries.d.ts +17 -0
- package/lib/client/PermissionRuleEntries.js +70 -0
- package/lib/client/PermissionsPanel.d.ts +1 -3
- package/lib/client/PermissionsPanel.js +5 -4
- package/lib/client/children-locales.d.ts +4 -4
- package/lib/client/controller.js +4 -1
- package/lib/client/deployment-locales.d.ts +2 -2
- package/lib/client/deployment-locales.js +8 -9
- package/lib/client/deployment-modules.d.ts +5 -3
- package/lib/client/deployment-modules.js +4 -4
- package/lib/client/deployment-workspace.d.ts +4 -0
- package/lib/client/deployment-workspace.js +37 -11
- package/lib/client/index.js +2 -7
- package/lib/client/locales.js +131 -119
- package/lib/client/permission-controller.d.ts +13 -0
- package/lib/client/permission-controller.js +50 -23
- package/lib/client/permission-locales.d.ts +28 -30
- package/lib/client/permission-locales.js +38 -38
- package/lib/client/styles.d.ts +1 -1
- package/lib/client/styles.js +8 -8
- package/lib/client.js +2272 -3773
- package/lib/core-permission-authority.js +28 -16
- package/lib/index.d.ts +0 -2
- package/lib/index.js +11 -31
- package/lib/native-admission.d.ts +3 -3
- package/lib/native-admission.js +67 -66
- package/lib/permission-controller.js +1 -1
- package/lib/permission-fs-search.js +1 -2
- package/lib/permission-fs.js +1 -2
- package/lib/permission-native-command.js +6 -4
- package/lib/permission-settings.d.ts +21 -7
- package/lib/permission-settings.js +21 -9
- package/lib/permission-web.js +1 -2
- package/lib/preset-materializer.js +3 -3
- package/lib/preset-registry.d.ts +20 -2
- package/lib/preset-registry.js +46 -17
- package/lib/profile-diagnostics.js +1 -1
- package/lib/profile-remote.js +1 -3
- package/lib/role-identity.d.ts +1 -1
- package/lib/role-identity.js +16 -4
- package/lib/role-policy.d.ts +3 -0
- package/lib/role-policy.js +30 -6
- package/lib/role-subagents.js +6 -4
- package/lib/roles.d.ts +2 -0
- package/lib/roles.js +2 -0
- package/lib/runtime-integration.js +4 -4
- package/lib/settings.d.ts +1 -3
- package/lib/settings.js +8 -10
- package/lib/state.d.ts +4 -1
- package/lib/state.js +37 -6
- package/package.json +1 -5
- package/prompts/deepwork.md +13 -1
- package/prompts/source/agents/orchestrator.md +10 -0
- package/prompts/source/category/coding.md +2 -1
- package/prompts/source/category/complex.md +1 -0
- package/prompts/source/category/deep.md +1 -0
- package/prompts/source/category/frontend.md +3 -1
- package/prompts/source/category/normal-task.md +2 -1
- package/prompts/source/category/quick.md +1 -0
- package/prompts/source/deepwork/claude-opus-5.md +2 -0
- package/prompts/source/deepwork/default.md +12 -0
- package/prompts/source/deepwork/gemini.md +6 -1
- package/prompts/source/deepwork/glm.md +5 -1
- package/prompts/source/deepwork/gpt.md +22 -2
- package/prompts/source/deepwork/kimi-k27.md +2 -0
- package/prompts/source/deepwork/planner.md +3 -1
- package/prompts/source/deepwork/swe-2.md +2 -0
- package/prompts/source/manifest.json +3 -68
- package/prompts/source/shared/dsh-host-contract.md +1 -1
- package/skills/ast-grep/SKILL.md +1 -1
- package/skills/brainstorming/SKILL.md +1 -1
- package/skills/coding-agent-sessions/SKILL.md +1 -1
- package/skills/debugging/SKILL.md +1 -1
- package/skills/dispatching-parallel-agents/SKILL.md +1 -1
- package/skills/frontend/SKILL.md +1 -1
- package/skills/git-master/SKILL.md +1 -1
- package/skills/init-deep/SKILL.md +1 -1
- package/skills/receiving-code-review/SKILL.md +1 -1
- package/skills/remove-ai-slops/SKILL.md +1 -1
- package/skills/requesting-code-review/SKILL.md +1 -1
- package/skills/subagent-driven-development/SKILL.md +1 -1
- package/skills/using-git-worktrees/SKILL.md +1 -1
- package/skills/writing-plans/SKILL.md +1 -1
- package/lib/client/ChildPermissions.d.ts +0 -43
- package/lib/client/ChildPermissions.js +0 -100
- package/lib/client/HistoryContinuation.d.ts +0 -7
- package/lib/client/HistoryContinuation.js +0 -22
- package/lib/client/PermissionPanelEntry.d.ts +0 -8
- package/lib/client/PermissionPanelEntry.js +0 -11
- package/lib/client/TemporaryPermissions.d.ts +0 -21
- package/lib/client/TemporaryPermissions.js +0 -94
- package/lib/client/history-controller.d.ts +0 -29
- package/lib/client/history-controller.js +0 -111
- package/lib/client/history-entry.d.ts +0 -11
- package/lib/client/history-entry.js +0 -106
- package/lib/client/history-locales.d.ts +0 -95
- package/lib/client/history-locales.js +0 -41
- package/lib/client/temporary-permission-client.d.ts +0 -20
- package/lib/client/temporary-permission-client.js +0 -52
- package/lib/client/temporary-permission-entry.d.ts +0 -6
- package/lib/client/temporary-permission-entry.js +0 -56
- package/lib/history-candidates.d.ts +0 -30
- package/lib/history-candidates.js +0 -176
- package/lib/history-codec.d.ts +0 -11
- package/lib/history-codec.js +0 -102
- package/lib/history-contract.d.ts +0 -44
- package/lib/history-contract.js +0 -2
- package/lib/history-controller.d.ts +0 -42
- package/lib/history-controller.js +0 -329
- package/lib/history-policy.d.ts +0 -4
- package/lib/history-policy.js +0 -8
- package/lib/history-remote.d.ts +0 -28
- package/lib/history-remote.js +0 -17
- package/lib/history-rpc.d.ts +0 -24
- package/lib/history-rpc.js +0 -136
- package/lib/history-support.d.ts +0 -15
- package/lib/history-support.js +0 -21
- package/lib/history-types.d.ts +0 -67
- package/lib/history-types.js +0 -2
- package/lib/permission-child-control.d.ts +0 -36
- package/lib/permission-child-control.js +0 -164
- package/lib/permission-exec-argv.d.ts +0 -32
- package/lib/permission-exec-argv.js +0 -171
- package/lib/permission-temporary-files.d.ts +0 -19
- package/lib/permission-temporary-files.js +0 -248
- package/lib/permission-temporary-grants.d.ts +0 -106
- package/lib/permission-temporary-grants.js +0 -198
- package/lib/permission-temporary-install.d.ts +0 -25
- package/lib/permission-temporary-install.js +0 -86
- package/lib/permission-temporary-remote.d.ts +0 -19
- package/lib/permission-temporary-remote.js +0 -75
- package/lib/permission-temporary-rpc.d.ts +0 -37
- package/lib/permission-temporary-rpc.js +0 -154
- package/lib/permission-temporary-types.d.ts +0 -47
- package/lib/permission-temporary-types.js +0 -2
- package/lib/permission-temporary-web.d.ts +0 -11
- package/lib/permission-temporary-web.js +0 -154
- package/patches/dsh-approval-settlement/@deepseek-ai__dsh-api-gateway@0.2.1-rc.2.patch +0 -13291
- package/patches/dsh-approval-settlement/@deepseek-ai__dsh-api-remotes@0.2.1-rc.2.patch +0 -9133
- package/patches/dsh-approval-settlement/@deepseek-ai__dsh-client-ui-approval@0.2.1-rc.2.patch +0 -156
- package/patches/dsh-approval-settlement/@deepseek-ai__dsh-subagent@0.2.1-rc.2.patch +0 -3546
- package/patches/dsh-approval-settlement/@deepseek-ai__dsh-user-approval@0.2.1-rc.2.patch +0 -431
- package/patches/dsh-approval-settlement/@deepseek-ai__dsh-web@0.2.1-rc.2.patch +0 -119
- package/patches/dsh-approval-settlement/README.md +0 -41
- package/patches/dsh-approval-settlement/metadata.json +0 -10
- package/patches/dsh-session-activation/@deepseek-ai__dsh-agent-loop@0.2.1-rc.2.patch +0 -383
- package/patches/dsh-session-activation/@deepseek-ai__dsh-agent-preset-registry@0.2.1-rc.2.patch +0 -55
- package/patches/dsh-session-activation/@deepseek-ai__dsh-api-session-controller@0.2.1-rc.2.patch +0 -16673
- package/patches/dsh-session-activation/@deepseek-ai__dsh-client-ui-subagent@0.2.1-rc.2.patch +0 -29
- package/patches/dsh-session-activation/@deepseek-ai__dsh-client-ui-workspace@0.2.1-rc.2.patch +0 -196
- package/patches/dsh-session-activation/@deepseek-ai__dsh-session-persistence-jsonl@0.2.1-rc.2.patch +0 -35
- package/patches/dsh-session-activation/@deepseek-ai__dsh-session-persistence@0.2.1-rc.2.patch +0 -40
|
@@ -2,16 +2,16 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
|
|
|
2
2
|
import { useEffect, useId, useRef, useSyncExternalStore } from "react";
|
|
3
3
|
import { Button } from "@deepseek-ai/dsh-client-ui-primitives";
|
|
4
4
|
import { deploymentWorkspace } from "./deployment-workspace.js";
|
|
5
|
-
import {
|
|
5
|
+
import { NAVIGATION_MODULES, moduleFields, moduleFor, moduleTitle } from "./deployment-modules.js";
|
|
6
6
|
import { at, inspectorPaths, scopeSchema, visibleDeploymentPath } from "./deployment-data.js";
|
|
7
7
|
import { Field, displayValue, permissionText } from "./DeploymentFields.js";
|
|
8
8
|
import { configurationVersionState } from "./configuration-display.js";
|
|
9
|
-
import {
|
|
9
|
+
import { PermissionsPanel } from "./PermissionsPanel.js";
|
|
10
10
|
import { permissionEn } from "./permission-locales.js";
|
|
11
11
|
export function ScopeSave({ controller, workspace, refreshOnly = false, t }) {
|
|
12
12
|
const state = useSyncExternalStore(controller.subscribe, controller.getSnapshot);
|
|
13
13
|
const pending = [...new Set(controller.pendingPaths().map(moduleFor))];
|
|
14
|
-
return _jsxs("section", { className: "dsmm-scope-save", "aria-label": t(
|
|
14
|
+
return _jsxs("section", { className: "dsmm-scope-save", "aria-label": t("saveScope"), children: [_jsx("p", { className: "dsmm-status", role: "status", "aria-live": "polite", children: refreshOnly ? state.busy ? t("loading") : "" : state.busy ? t("saving") : state.refreshRequired ? t("savedRefreshRequired") : state.saved ? t("saved") : state.dirty ? t("dirty") : "" }), !refreshOnly && pending.length > 0 && _jsxs("p", { children: [t("pendingModules"), ": ", pending.map(module => t(moduleTitle(module))).join(" · ")] }), state.issue !== null && _jsx("p", { className: "dsmm-issue", role: "alert", children: t(state.issue) }), !refreshOnly && state.invalidFields.length > 0 && _jsx("p", { className: "dsmm-issue", role: "alert", children: t("invalid") }), controller.layer === "profile" && !controller.canWriteProfile() && _jsx("p", { className: "dsmm-hint", children: t("unavailableForm") }), _jsxs("div", { className: "dsmm-actions", children: [!refreshOnly && _jsx(Button, { type: "button", variant: "primary", disabled: !controller.canSave(), onClick: () => void (workspace?.save() ?? controller.save()), children: t(controller.layer === "global" ? "saveGlobal" : "saveProfile") }), _jsx(Button, { type: "button", variant: "outline", disabled: state.busy, onClick: () => void controller.refresh(), children: t("refresh") }), !refreshOnly && _jsx(Button, { type: "button", variant: "outline", disabled: state.busy || !state.dirty && state.issue === null && !state.refreshRequired, onClick: () => void controller.refresh(true), children: t("discard") })] })] });
|
|
15
15
|
}
|
|
16
16
|
export function NativeRuntimeState({ value, t }) {
|
|
17
17
|
return _jsxs("details", { className: "dsmm-availability", children: [_jsx("summary", { children: t("nativeRuntimeState") }), _jsxs("p", { children: [t("nativeRuntimeBinding"), ": ", t(value?.binding === "stock" ? "nativeRuntimeStock" : value?.binding === "unavailable" ? "nativeRuntimeUnavailable" : "unknown")] }), _jsxs("p", { children: [t("nativeRuntimeFence"), ": ", value === undefined ? t("unknown") : t(value.deliveryFenceReady ? "on" : "off"), " \u00B7 ", t("nativeRuntimeRestart"), ": ", value === undefined ? t("unknown") : t(value.restartRequired ? "on" : "off")] }), value?.reason !== undefined && _jsx("p", { children: t(`nativeRuntimeReason-${value.reason}`) })] });
|
|
@@ -41,6 +41,11 @@ export function DeploymentPage(props) {
|
|
|
41
41
|
void props.core.refresh(); }, [props.core, props.view]);
|
|
42
42
|
useEffect(() => { if (props.forms !== undefined)
|
|
43
43
|
workspace.bindForms(props.forms); }, [workspace, props.forms]);
|
|
44
|
+
// First visit opens the first section with editable fields (or Configuration state).
|
|
45
|
+
useEffect(() => {
|
|
46
|
+
if (navigation.module === null && core.snapshot !== null)
|
|
47
|
+
workspace.request({ scope: navigation.scope, module: null });
|
|
48
|
+
}, [core.snapshot, navigation.module, navigation.scope, workspace]);
|
|
44
49
|
useEffect(() => {
|
|
45
50
|
if (active !== null)
|
|
46
51
|
heading.current?.focus();
|
|
@@ -69,25 +74,32 @@ export function DeploymentPage(props) {
|
|
|
69
74
|
if (props.view === "summary")
|
|
70
75
|
return _jsx("span", { children: t("summary") });
|
|
71
76
|
const fields = snapshot === null || active === null ? [] : moduleFields(scopeSchema(snapshot, controller.layer), active, controller.layer);
|
|
72
|
-
const
|
|
77
|
+
const tabs = NAVIGATION_MODULES.filter(module => module !== "other" || snapshot === null
|
|
78
|
+
|| moduleFields(snapshot.schema, "other", "global").length + moduleFields(scopeSchema(snapshot, "profile"), "other", "profile").length > 0);
|
|
79
|
+
const select = (module) => workspace.request({ scope: navigation.scope, module });
|
|
80
|
+
const onTabKey = (event, index) => {
|
|
81
|
+
const last = tabs.length - 1, move = (target) => { const next = tabs[(target + tabs.length) % tabs.length]; triggers.current.get(next)?.focus(); };
|
|
82
|
+
if (event.key === "ArrowRight")
|
|
83
|
+
move(index + 1);
|
|
84
|
+
else if (event.key === "ArrowLeft")
|
|
85
|
+
move(index - 1);
|
|
86
|
+
else if (event.key === "Home")
|
|
87
|
+
move(0);
|
|
88
|
+
else if (event.key === "End")
|
|
89
|
+
move(last);
|
|
90
|
+
else
|
|
91
|
+
return;
|
|
92
|
+
event.preventDefault();
|
|
93
|
+
};
|
|
73
94
|
const scopeActions = _jsx(ScopeSave, { controller: active === "state" ? props.core : controller, workspace: workspace, refreshOnly: active === "state" || workspace.controller() === null, t: t });
|
|
74
95
|
return _jsxs("section", { className: "dsmm-profiles dsmm-deployment", "data-dsmm-page": true, "aria-label": t("title"), children: [_jsx("p", { className: "dsmm-hint", children: t("boundaries") }), _jsxs("div", { className: "dsmm-field", children: [_jsx("label", { htmlFor: `${id}-scope`, children: t("scope") }), _jsxs("select", { ref: scopeControl, id: `${id}-scope`, value: navigation.scope, disabled: state.busy || navigation.pending !== null, onChange: event => {
|
|
75
96
|
const scope = event.currentTarget.value;
|
|
76
97
|
if (scope === "global" || scope === "profile")
|
|
77
|
-
workspace.request({ scope, module:
|
|
78
|
-
}, children: [_jsx("option", { value: "global", children: t("global") }), _jsx("option", { value: "profile", children: t("profile") })] })] }), _jsx("p", { className: "dsmm-hint", children: t(navigation.scope === "global" ? "globalHint" : "profileHint") }), navigation.scope === "profile" && (navigation.native === null || !navigation.native.canWriteProfile()) && _jsx("p", { className: "dsmm-hint", children: t("unavailableForm") }),
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
const target = event.target;
|
|
83
|
-
if (target.tagName === "SELECT" && (!globalThis.CSS?.supports("selector(select:open)") || target.matches("select:open")))
|
|
84
|
-
return;
|
|
85
|
-
event.preventDefault();
|
|
86
|
-
if (navigation.pending !== null)
|
|
87
|
-
workspace.continueEditing();
|
|
88
|
-
else
|
|
89
|
-
workspace.request({ scope: navigation.scope, module: null });
|
|
90
|
-
}, children: [_jsxs("div", { className: "dsmm-drawer-heading", children: [_jsx("h2", { id: `${id}-heading`, ref: heading, tabIndex: -1, children: t(moduleTitle(active)) }), _jsx(Button, { type: "button", variant: "outline", disabled: state.busy, onClick: () => workspace.request({ scope: navigation.scope, module: null }), children: t("close") })] }), active === "state" ? _jsxs(_Fragment, { children: [_jsx(StateInspector, { controller: props.core, t: t }), scopeActions] }) : _jsxs(_Fragment, { children: [navigation.scope === "profile" && navigation.native === null ? _jsx("p", { children: t("unavailableForm") }) : state.snapshot === null ? _jsx("p", { children: t(state.busy ? "loading" : "unavailable") }) : _jsxs("div", { "data-dsmm-layer": controller.layer, "aria-busy": state.busy, className: "dsmm-structured", children: [fields.length === 0 && _jsx("p", { className: "dsmm-hint", children: t("noModuleFields") }), fields.map(([key, schema]) => _jsx(Field, { schema: schema, path: [key], controller: controller, initiallyOpen: fields.length === 1 && active !== "permissions", disclosures: disclosures.current[navigation.scope], t: t }, `${navigation.scope}:${key}`)), active === "run" && controller.layer === "profile" && _jsx(NativeRuntimeState, { value: state.snapshot.subagentRuntime, t: t })] }), scopeActions, active === "permissions" && _jsxs("section", { className: "dsmm-zone", children: [_jsx("h3", { children: t("rootRules") }), _jsx("p", { className: "dsmm-hint", children: t("rootRulesHint") }), workspace.permissions === undefined ? _jsx("p", { children: t("rootRulesUnavailable") }) : _jsx(PermissionPanelEntry, { controller: workspace.permissions, temporary: props.temporaryPermissions, t: props.permissionsT ?? (key => Object.hasOwn(permissionEn, key) ? permissionText(t)(key) : key) })] })] })] })] }), navigation.pending !== null && _jsxs("section", { className: "dsmm-confirm", role: "group", "aria-label": t("leaveDraft"), onKeyDown: event => { if (event.key === "Escape" && !event.defaultPrevented) {
|
|
98
|
+
workspace.request({ scope, module: null });
|
|
99
|
+
}, children: [_jsx("option", { value: "global", children: t("global") }), _jsx("option", { value: "profile", children: t("profile") })] })] }), _jsx("p", { className: "dsmm-hint", children: t(navigation.scope === "global" ? "globalHint" : "profileHint") }), navigation.scope === "profile" && (navigation.native === null || !navigation.native.canWriteProfile()) && _jsx("p", { className: "dsmm-hint", children: t("unavailableForm") }), _jsx("div", { className: "dsmm-section-tabs", role: "tablist", "aria-label": t("modules"), children: tabs.map((module, index) => _jsx(Button, { ref: element => { if (element !== null)
|
|
100
|
+
triggers.current.set(module, element);
|
|
101
|
+
else
|
|
102
|
+
triggers.current.delete(module); }, role: "tab", type: "button", id: `${id}-tab-${module}`, "aria-selected": active === module, "aria-controls": `${id}-panel`, tabIndex: active === module ? 0 : -1, "data-dsmm-tab": module, onKeyDown: event => onTabKey(event, index), onClick: () => select(module), children: t(moduleTitle(module)) }, module)) }), active !== null && _jsxs("section", { id: `${id}-panel`, role: "tabpanel", className: "dsmm-section-panel", "aria-labelledby": `${id}-tab-${active}`, "data-dsmm-module": active, children: [_jsx("div", { className: "dsmm-panel-heading", children: _jsx("h2", { id: `${id}-heading`, ref: heading, tabIndex: -1, children: t(moduleTitle(active)) }) }), active === "state" ? _jsxs(_Fragment, { children: [_jsx(StateInspector, { controller: props.core, t: t }), scopeActions] }) : _jsxs(_Fragment, { children: [navigation.scope === "profile" && navigation.native === null ? _jsx("p", { children: t("unavailableForm") }) : state.snapshot === null ? _jsx("p", { children: t(state.busy ? "loading" : "unavailable") }) : _jsxs("div", { "data-dsmm-layer": controller.layer, "aria-busy": state.busy, className: "dsmm-structured", children: [fields.length === 0 && _jsx("p", { className: "dsmm-hint", children: t("noModuleFields") }), fields.map(([key, schema]) => _jsx(Field, { schema: schema, path: [key], controller: controller, initiallyOpen: fields.length === 1 && active !== "permissions", disclosures: disclosures.current[navigation.scope], t: t }, `${navigation.scope}:${key}`)), active === "run" && controller.layer === "profile" && _jsx(NativeRuntimeState, { value: state.snapshot.subagentRuntime, t: t })] }), scopeActions, active === "permissions" && _jsxs("section", { className: "dsmm-zone dsmm-rules-transaction", "aria-label": t("rootRules"), children: [_jsx("h3", { children: t("rootRules") }), _jsx("p", { className: "dsmm-hint", children: t("rootRulesHint") }), workspace.permissions === undefined ? _jsx("p", { children: t("rootRulesUnavailable") }) : _jsx(PermissionsPanel, { controller: workspace.permissions, t: props.permissionsT ?? (key => Object.hasOwn(permissionEn, key) ? permissionText(t)(key) : key) })] })] })] }), navigation.pending !== null && _jsxs("section", { className: "dsmm-confirm", role: "group", "aria-label": t("leaveDraft"), onKeyDown: event => { if (event.key === "Escape" && !event.defaultPrevented) {
|
|
91
103
|
event.preventDefault();
|
|
92
104
|
workspace.continueEditing();
|
|
93
105
|
} }, children: [_jsx("p", { children: t("leaveDraft") }), _jsxs("div", { className: "dsmm-actions", children: [_jsx(Button, { ref: confirmation, type: "button", variant: "primary", onClick: () => workspace.continueEditing(), children: t("continueEditing") }), _jsx(Button, { type: "button", variant: "outline", onClick: () => workspace.keepAndNavigate(), children: t("keepDraft") }), _jsx(Button, { type: "button", variant: "outline", disabled: state.busy, onClick: () => void workspace.discardAndNavigate(), children: t("discardDraft") })] })] })] });
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useId, useSyncExternalStore } from "react";
|
|
3
3
|
import { Button, Input } from "@deepseek-ai/dsh-client-ui-primitives";
|
|
4
|
-
import { parseNativeCommands } from "../permission-settings.js";
|
|
5
|
-
|
|
4
|
+
import { parseNativeCommandPattern, parseNativeCommands } from "../permission-settings.js";
|
|
5
|
+
const ENTRIES_PATH = "permissionControl.nativeCommands.entries";
|
|
6
6
|
export function validNativeEntries(entries) {
|
|
7
7
|
try {
|
|
8
8
|
parseNativeCommands({ entries });
|
|
@@ -13,56 +13,66 @@ export function validNativeEntries(entries) {
|
|
|
13
13
|
}
|
|
14
14
|
}
|
|
15
15
|
export function emptyNativeEntry() {
|
|
16
|
-
return { id: "", mode: "ask", sandboxMode: "workspace-write", match: { tool: "bash",
|
|
16
|
+
return { id: "", mode: "ask", sandboxMode: "workspace-write", match: { tool: "bash", workingDirectory: "", commandPattern: "" } };
|
|
17
17
|
}
|
|
18
|
-
function
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
18
|
+
function patternValid(value) {
|
|
19
|
+
try {
|
|
20
|
+
parseNativeCommandPattern(value);
|
|
21
|
+
return true;
|
|
22
|
+
}
|
|
23
|
+
catch {
|
|
24
|
+
return false;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
function TextField({ id, label, value, disabled, onChange }) {
|
|
28
|
+
return _jsxs("div", { className: "dsmm-field", children: [_jsx("label", { htmlFor: id, children: label }), _jsx(Input, { className: "dsmm-input", id: id, value: value, maxLength: 32768, disabled: disabled, required: true, onChange: event => onChange(event.currentTarget.value) })] });
|
|
29
|
+
}
|
|
30
|
+
function Pattern({ value, controller, name, disabled, onChange, t }) {
|
|
31
|
+
const state = useSyncExternalStore(controller.subscribe, controller.getSnapshot), id = useId(), raw = state.raw[name], text = raw?.text ?? value, bad = raw?.invalid === true;
|
|
32
|
+
return _jsxs("div", { className: "dsmm-field", children: [_jsx("label", { htmlFor: `${id}-pattern`, children: t("pattern") }), _jsx(Input, { className: "dsmm-input", id: `${id}-pattern`, value: text, maxLength: 32768, disabled: disabled, required: true, "aria-invalid": bad, "aria-describedby": bad ? `${id}-error` : undefined, spellCheck: false, autoComplete: "off", onChange: event => {
|
|
33
|
+
const next = event.currentTarget.value, valid = patternValid(next);
|
|
34
|
+
controller.setRaw(name, next, !valid);
|
|
29
35
|
if (valid)
|
|
30
|
-
onChange(
|
|
31
|
-
} }), _jsx("p", { id: `${id}-error`, className: "dsmm-hint", children:
|
|
36
|
+
onChange(next);
|
|
37
|
+
} }), bad && _jsx("p", { id: `${id}-error`, className: "dsmm-hint", children: t("invalidPattern") })] });
|
|
32
38
|
}
|
|
33
|
-
function Entry({ entry, index, controller, disabled,
|
|
34
|
-
const id = useId()
|
|
39
|
+
function Entry({ entry, index, controller, disabled, change, remove, t }) {
|
|
40
|
+
const id = useId(), match = entry.match, row = `${ENTRIES_PATH}.${index}`;
|
|
35
41
|
const valid = validNativeEntries([entry]);
|
|
36
|
-
|
|
37
|
-
const value = event.currentTarget.value;
|
|
38
|
-
if (key === "id")
|
|
39
|
-
change({ ...entry, id: value });
|
|
40
|
-
else if (key === "subcommand" && value === "") {
|
|
41
|
-
const { subcommand: _omitted, ...match } = entry.match;
|
|
42
|
-
change({ ...entry, match });
|
|
43
|
-
}
|
|
44
|
-
else
|
|
45
|
-
change({ ...entry, match: { ...entry.match, [key]: value } });
|
|
46
|
-
} })] });
|
|
47
|
-
return _jsxs("fieldset", { "aria-describedby": !valid ? `${id}-error` : undefined, children: [_jsxs("legend", { children: [t("nativeCommands"), " ", index + 1] }), !valid && _jsx("p", { className: "dsmm-hint", id: `${id}-error`, children: t("invalidEntry") }), text("id", "entryId"), _jsxs("div", { className: "dsmm-field", children: [_jsx("label", { htmlFor: `${id}-tool`, children: t("tool") }), _jsx("select", { id: `${id}-tool`, disabled: disabled, value: entry.match.tool, onChange: event => {
|
|
42
|
+
return _jsxs("fieldset", { "aria-describedby": !valid ? `${id}-error` : undefined, children: [_jsxs("legend", { children: [t("nativeCommands"), " ", index + 1] }), !valid && _jsx("p", { className: "dsmm-hint", id: `${id}-error`, children: t("invalidEntry") }), _jsx(TextField, { id: `${id}-id`, label: t("entryId"), value: entry.id, disabled: disabled, onChange: value => change({ ...entry, id: value }) }), _jsxs("div", { className: "dsmm-field", children: [_jsx("label", { htmlFor: `${id}-tool`, children: t("tool") }), _jsx("select", { id: `${id}-tool`, disabled: disabled, value: match.tool, onChange: event => {
|
|
48
43
|
const tool = event.currentTarget.value;
|
|
49
44
|
if (tool === "bash" || tool === "pwsh")
|
|
50
|
-
change({ ...entry, match: { ...
|
|
51
|
-
}, children: ["bash", "pwsh"].map(value => _jsx("option", { value: value, children: value }, value)) })] }),
|
|
45
|
+
change({ ...entry, match: { ...match, tool } });
|
|
46
|
+
}, children: ["bash", "pwsh"].map(value => _jsx("option", { value: value, children: value }, value)) })] }), _jsx(Pattern, { value: match.commandPattern, controller: controller, name: `${row}.commandPattern`, disabled: disabled, t: t, onChange: commandPattern => change({ ...entry, match: { ...match, commandPattern } }) }), _jsx(TextField, { id: `${id}-workingDirectory`, label: t("cwd"), value: match.workingDirectory, disabled: disabled, onChange: workingDirectory => change({ ...entry, match: { ...match, workingDirectory } }) }), _jsxs("div", { className: "dsmm-field", children: [_jsx("label", { htmlFor: `${id}-sandbox`, children: t("sandboxMode") }), _jsxs("select", { id: `${id}-sandbox`, disabled: disabled, value: entry.sandboxMode, onChange: event => {
|
|
52
47
|
if (event.currentTarget.value === "workspace-write")
|
|
53
48
|
change({ ...entry, sandboxMode: "workspace-write" });
|
|
54
|
-
}, children: [_jsx("option", { value: "workspace-write", children: "workspace-write" }), entry.sandboxMode === "danger-full-access" &&
|
|
49
|
+
}, children: [_jsx("option", { value: "workspace-write", children: "workspace-write" }), entry.sandboxMode === "danger-full-access" && _jsx("option", { value: "danger-full-access", disabled: true, children: t("restrictedFullAccess") })] })] }), _jsxs("div", { className: "dsmm-field", children: [_jsx("label", { htmlFor: `${id}-mode`, children: t("mode") }), _jsxs("select", { id: `${id}-mode`, disabled: disabled, value: entry.mode, onChange: event => {
|
|
55
50
|
const mode = event.currentTarget.value;
|
|
56
51
|
if (mode === "ask" || mode === "allow")
|
|
57
52
|
change({ ...entry, mode });
|
|
58
|
-
}, children: [_jsx("option", { value: "ask", children: t("action:ask") }), _jsx("option", { value: "allow", children: t("action:allow") })] })] }), _jsxs(Button, { type: "button", variant: "outline", disabled: disabled
|
|
53
|
+
}, children: [_jsx("option", { value: "ask", children: t("action:ask") }), _jsx("option", { value: "allow", children: t("action:allow") })] })] }), _jsxs(Button, { type: "button", variant: "outline", disabled: disabled, onClick: remove, children: [t("removeEntry"), " ", index + 1] })] });
|
|
59
54
|
}
|
|
60
55
|
export function NativeCommandEntries({ value, inherited, controller, disabled, onChange, setInvalid, t }) {
|
|
61
|
-
const entries = value ?? inherited, name =
|
|
56
|
+
const entries = value ?? inherited, name = ENTRIES_PATH;
|
|
62
57
|
const state = useSyncExternalStore(controller.subscribe, controller.getSnapshot);
|
|
63
|
-
const
|
|
58
|
+
const invalidRows = state.invalidFields.filter(path => path.startsWith(`${name}.`) && path.endsWith(".commandPattern"));
|
|
64
59
|
const valid = validNativeEntries(entries);
|
|
65
60
|
const change = (next) => { setInvalid(name, !validNativeEntries(next ?? inherited)); onChange(next); };
|
|
66
|
-
|
|
61
|
+
const remove = (index) => {
|
|
62
|
+
const drafts = Object.entries(state.raw).flatMap(([path, draft]) => {
|
|
63
|
+
if (!path.startsWith(`${name}.`))
|
|
64
|
+
return [];
|
|
65
|
+
const [row, ...field] = path.slice(name.length + 1).split(".");
|
|
66
|
+
const position = Number(row);
|
|
67
|
+
if (!Number.isInteger(position) || field.length === 0 || position === index)
|
|
68
|
+
return [];
|
|
69
|
+
return [{ path: `${name}.${position > index ? position - 1 : position}.${field.join(".")}`, draft }];
|
|
70
|
+
});
|
|
71
|
+
controller.clearRaw(name);
|
|
72
|
+
for (const draft of drafts)
|
|
73
|
+
controller.setRaw(draft.path, draft.draft.text, draft.draft.invalid);
|
|
74
|
+
change(entries.filter((_, position) => position !== index));
|
|
75
|
+
};
|
|
76
|
+
return _jsxs("details", { className: "dsmm-deployment-group", children: [_jsxs("summary", { children: [t("nativeCommands"), " ", _jsx("code", { children: name })] }), _jsxs("div", { className: "dsmm-structured", children: [_jsx("p", { className: "dsmm-hint", children: t("nativeCommandsHint") }), _jsx("p", { className: "dsmm-hint", children: t("patternHint") }), _jsx("p", { className: "dsmm-hint", children: t("patternScope") }), _jsx("p", { className: "dsmm-hint", children: t("registrationUnresolved") }), _jsx("p", { className: "dsmm-hint", children: t(value === undefined ? "inheritedEntries" : "explicitEntries") }), !valid && _jsx("p", { className: "dsmm-issue", role: "alert", children: t("invalidEntry") }), invalidRows.length > 0 && _jsx("p", { className: "dsmm-hint", children: t("invalidPatternHint") }), entries.length === 0 && _jsx("p", { children: t("noEntries") }), entries.map((entry, index) => _jsx(Entry, { entry: entry, index: index, controller: controller, disabled: disabled, t: t, change: next => change(entries.map((row, position) => position === index ? next : row)), remove: () => remove(index) }, index)), _jsxs("div", { className: "dsmm-actions", children: [_jsx(Button, { type: "button", variant: "outline", disabled: disabled || entries.length >= 1024, onClick: () => change([...entries, emptyNativeEntry()]), children: t("addEntry") }), _jsx(Button, { type: "button", variant: "outline", "data-dsmm-unset": name, disabled: disabled || value === undefined && invalidRows.length === 0, onClick: () => { controller.clearRaw(name); change(undefined); }, children: t("unset") })] })] })] });
|
|
67
77
|
}
|
|
68
78
|
//# sourceMappingURL=NativeCommandEntries.js.map
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { PermissionRule } from "../permission-rules.js";
|
|
2
|
+
import type { DeploymentController } from "./deployment-controller.js";
|
|
3
|
+
import type { PermissionLocaleKey } from "./permission-locales.js";
|
|
4
|
+
type Text = (key: PermissionLocaleKey) => string;
|
|
5
|
+
export declare function validPermissionRules(value: unknown): boolean;
|
|
6
|
+
export declare function PermissionRuleEntries({ value, inherited, controller, disabled, onChange, expanded, onExpandedChange, t }: {
|
|
7
|
+
value: readonly PermissionRule[] | undefined;
|
|
8
|
+
inherited: readonly PermissionRule[];
|
|
9
|
+
controller: DeploymentController;
|
|
10
|
+
disabled: boolean;
|
|
11
|
+
onChange(value: readonly PermissionRule[] | undefined): void;
|
|
12
|
+
expanded?: boolean;
|
|
13
|
+
onExpandedChange?(expanded: boolean): void;
|
|
14
|
+
t: Text;
|
|
15
|
+
}): import("react").JSX.Element;
|
|
16
|
+
export {};
|
|
17
|
+
//# sourceMappingURL=PermissionRuleEntries.d.ts.map
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { useId, useSyncExternalStore } from "react";
|
|
3
|
+
import { Button, Input } from "@deepseek-ai/dsh-client-ui-primitives";
|
|
4
|
+
import { parsePermissionRules } from "../permission-rules.js";
|
|
5
|
+
import { parseAdvanced } from "./deployment-data.js";
|
|
6
|
+
const actions = ["allow", "ask", "deny"];
|
|
7
|
+
const kinds = ["outside-read", "shell", "webSearch", "webFetch"];
|
|
8
|
+
const name = "permissionControl.rules";
|
|
9
|
+
export function validPermissionRules(value) {
|
|
10
|
+
try {
|
|
11
|
+
parsePermissionRules(value);
|
|
12
|
+
return true;
|
|
13
|
+
}
|
|
14
|
+
catch {
|
|
15
|
+
return false;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
function newMatch(kind) {
|
|
19
|
+
return kind === "outside-read" ? { kind, path: "", scope: "exact" } : kind === "shell" ? { kind, executable: "", command: "", workingDirectory: "" } : { kind };
|
|
20
|
+
}
|
|
21
|
+
/** Honest user-import provenance; the Host re-stamps it and owns revision/revocation. */
|
|
22
|
+
function newRule() {
|
|
23
|
+
return { id: "", action: "ask", match: newMatch("outside-read"), source: { kind: "user-import", label: "configuration" }, revision: 0, revoked: false };
|
|
24
|
+
}
|
|
25
|
+
function Row({ rule, index, disabled, change, remove, t }) {
|
|
26
|
+
const id = useId();
|
|
27
|
+
const field = (key) => _jsxs("div", { className: "dsmm-field", children: [_jsx("label", { htmlFor: `${id}-${key}`, children: t(key === "workingDirectory" ? "cwd" : key) }), _jsx(Input, { className: "dsmm-input", id: `${id}-${key}`, required: true, maxLength: 32768, disabled: disabled, value: key in rule.match ? String(Reflect.get(rule.match, key)) : "", onChange: event => change({ ...rule, match: { ...rule.match, [key]: event.currentTarget.value } }) })] });
|
|
28
|
+
return _jsxs("fieldset", { children: [_jsx("legend", { children: rule.id === "" ? `${t("newRule")} ${index + 1}` : rule.id }), _jsxs("p", { children: [t(rule.revoked ? "revoked" : "active"), " \u00B7 ", t(`action:${rule.action}`)] }), _jsxs("dl", { className: "dsmm-child-meta", children: [_jsx("dt", { children: t("source") }), _jsx("dd", { children: rule.source.kind === "operator" ? `${t("recordedOperator")} · ${rule.source.savedAt}` : `${t("imported")} · ${rule.source.label}` }), _jsx("dt", { children: t("recordVersion") }), _jsx("dd", { children: rule.revision })] }), _jsxs("div", { className: "dsmm-field", children: [_jsx("label", { htmlFor: `${id}-id`, children: t("id") }), _jsx(Input, { className: "dsmm-input", id: `${id}-id`, required: true, maxLength: 256, disabled: disabled, value: rule.id, onChange: event => change({ ...rule, id: event.currentTarget.value }) })] }), _jsxs("div", { className: "dsmm-field", children: [_jsx("label", { htmlFor: `${id}-action`, children: t("action") }), _jsx("select", { id: `${id}-action`, disabled: disabled, value: rule.action, onChange: event => {
|
|
29
|
+
const action = actions.find(value => value === event.currentTarget.value);
|
|
30
|
+
if (action !== undefined)
|
|
31
|
+
change({ ...rule, action });
|
|
32
|
+
}, children: actions.map(action => _jsx("option", { value: action, children: t(`action:${action}`) }, action)) })] }), _jsxs("div", { className: "dsmm-field", children: [_jsx("label", { htmlFor: `${id}-kind`, children: t("match") }), _jsx("select", { id: `${id}-kind`, disabled: disabled, value: rule.match.kind, onChange: event => {
|
|
33
|
+
const kind = kinds.find(value => value === event.currentTarget.value);
|
|
34
|
+
if (kind !== undefined)
|
|
35
|
+
change({ ...rule, match: newMatch(kind) });
|
|
36
|
+
}, children: kinds.map(kind => _jsx("option", { value: kind, children: t(`kind:${kind}`) }, kind)) })] }), rule.match.kind === "outside-read" && _jsxs(_Fragment, { children: [field("path"), _jsxs("div", { className: "dsmm-field", children: [_jsx("label", { htmlFor: `${id}-scope`, children: t("pathScope") }), _jsxs("select", { id: `${id}-scope`, disabled: disabled, value: rule.match.scope, onChange: event => {
|
|
37
|
+
const scope = event.currentTarget.value;
|
|
38
|
+
if (rule.match.kind === "outside-read" && (scope === "exact" || scope === "tree"))
|
|
39
|
+
change({ ...rule, match: { ...rule.match, scope } });
|
|
40
|
+
}, children: [_jsx("option", { value: "exact", children: t("exact") }), _jsx("option", { value: "tree", children: t("tree") })] })] })] }), rule.match.kind === "shell" && _jsxs(_Fragment, { children: [field("executable"), field("command"), field("workingDirectory")] }), _jsxs(Button, { type: "button", variant: "outline", disabled: disabled, onClick: remove, children: [t("removeRule"), " ", index + 1] })] });
|
|
41
|
+
}
|
|
42
|
+
export function PermissionRuleEntries({ value, inherited, controller, disabled, onChange, expanded, onExpandedChange, t }) {
|
|
43
|
+
const state = useSyncExternalStore(controller.subscribe, controller.getSnapshot), id = useId();
|
|
44
|
+
const raw = state.raw[name], locked = raw?.invalid === true, entries = value ?? inherited, valid = validPermissionRules(entries);
|
|
45
|
+
const text = raw?.text ?? (value === undefined ? "" : JSON.stringify(value, null, 2));
|
|
46
|
+
const change = (next) => {
|
|
47
|
+
// Any structured edit supersedes an invalid raw list; that replacement is explicit, not silent.
|
|
48
|
+
if (raw !== undefined)
|
|
49
|
+
controller.clearRaw(name);
|
|
50
|
+
controller.setInvalid(name, !validPermissionRules(next));
|
|
51
|
+
onChange(next);
|
|
52
|
+
};
|
|
53
|
+
const remove = (index) => change(entries.filter((_, position) => position !== index));
|
|
54
|
+
const held = disabled || locked;
|
|
55
|
+
return _jsxs("details", { className: "dsmm-deployment-group", "data-field": name, open: expanded, onToggle: event => onExpandedChange?.(event.currentTarget.open), children: [_jsxs("summary", { children: [t("configRules"), " ", _jsx("code", { children: name })] }), _jsxs("div", { className: "dsmm-structured", children: [_jsx("p", { className: "dsmm-hint", children: t("configRulesHint") }), _jsx("p", { className: "dsmm-hint", children: t(value === undefined ? "inheritedRules" : "explicitRules") }), !valid && _jsx("p", { className: "dsmm-issue", role: "alert", children: t("invalidRule") }), entries.length === 0 && _jsx("p", { children: t("configRulesEmpty") }), entries.map((rule, index) => _jsx(Row, { rule: rule, index: index, disabled: held, t: t, change: next => change(entries.map((row, position) => position === index ? next : row)), remove: () => remove(index) }, index)), _jsxs("div", { className: "dsmm-actions", children: [_jsx(Button, { type: "button", variant: "outline", disabled: held || entries.length >= 1024, onClick: () => change([...entries, newRule()]), children: t("addRule") }), _jsx(Button, { type: "button", variant: "outline", "data-dsmm-unset": name, disabled: disabled || value === undefined && raw === undefined, onClick: () => { controller.clearRaw(name); onChange(undefined); }, children: t("unset") })] }), _jsxs("details", { children: [_jsx("summary", { id: `${id}-advanced-label`, children: t("advancedRules") }), _jsxs("div", { className: "dsmm-field", children: [_jsx("textarea", { id: `${id}-advanced`, rows: 6, maxLength: 32768, value: text, disabled: disabled, "aria-labelledby": `${id}-advanced-label`, "aria-invalid": locked, "aria-describedby": `${id}-error`, onChange: event => {
|
|
56
|
+
const next = event.currentTarget.value;
|
|
57
|
+
let parsed, ok = false;
|
|
58
|
+
try {
|
|
59
|
+
parsed = parseAdvanced(next);
|
|
60
|
+
ok = parsed === undefined || validPermissionRules(parsed);
|
|
61
|
+
}
|
|
62
|
+
catch {
|
|
63
|
+
ok = false;
|
|
64
|
+
}
|
|
65
|
+
controller.setRaw(name, next, !ok);
|
|
66
|
+
if (ok)
|
|
67
|
+
onChange(parsed);
|
|
68
|
+
} }), _jsx("p", { id: `${id}-error`, className: "dsmm-hint", children: locked ? t("invalidRule") : "" })] })] })] })] });
|
|
69
|
+
}
|
|
70
|
+
//# sourceMappingURL=PermissionRuleEntries.js.map
|
|
@@ -1,16 +1,14 @@
|
|
|
1
1
|
import type { PropsLocale } from "@deepseek-ai/dsh-client-ui-slots";
|
|
2
2
|
import type { PermissionController, PermissionView } from "./permission-controller.js";
|
|
3
|
-
import type { TemporaryPermissionRemote } from "../permission-temporary-types.js";
|
|
4
3
|
type Locale = PropsLocale<"settings.dsmm-permissions">;
|
|
5
4
|
export type PermissionsPanelProps = Locale & {
|
|
6
5
|
controller: PermissionController;
|
|
7
6
|
sessionId?: string;
|
|
8
|
-
temporary?: TemporaryPermissionRemote;
|
|
9
7
|
};
|
|
10
8
|
export declare function PermissionRulesEditor({ controller, state, t }: Locale & {
|
|
11
9
|
controller: PermissionController;
|
|
12
10
|
state: PermissionView;
|
|
13
11
|
}): import("react").JSX.Element;
|
|
14
|
-
export declare function PermissionsPanel({ controller, t, sessionId
|
|
12
|
+
export declare function PermissionsPanel({ controller, t, sessionId }: PermissionsPanelProps): import("react").JSX.Element;
|
|
15
13
|
export {};
|
|
16
14
|
//# sourceMappingURL=PermissionsPanel.d.ts.map
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { useEffect, useId, useSyncExternalStore } from "react";
|
|
3
3
|
import { Button, Input } from "@deepseek-ai/dsh-client-ui-primitives";
|
|
4
|
-
import { TemporaryGrants } from "./TemporaryPermissions.js";
|
|
5
4
|
const actions = ["inherit", "allow", "ask", "deny"];
|
|
6
5
|
const kinds = ["outside-read", "shell", "webSearch", "webFetch"];
|
|
7
6
|
const ruleDraft = (rule) => ({ id: rule.id, action: rule.action, match: structuredClone(rule.match) });
|
|
@@ -35,13 +34,15 @@ function PermissionCoverage({ state, t }) {
|
|
|
35
34
|
}
|
|
36
35
|
export function PermissionRulesEditor({ controller, state, t }) {
|
|
37
36
|
const id = useId(), draft = state.draft, disabled = !controller.canEdit(state.generation), value = state.rules;
|
|
38
|
-
|
|
37
|
+
const writable = state.scope === "root" && state.connected;
|
|
38
|
+
return _jsxs("section", { className: "dsmm-zone", "aria-label": t("rules"), children: [_jsx("h3", { children: t("rules") }), _jsx("p", { className: "dsmm-hint", children: t("rulesHint") }), _jsx("p", { className: "dsmm-hint", children: t("networkLimit") }), _jsx("p", { className: "dsmm-hint", children: t("matchHint") }), _jsx(Issue, { value: state.rulesIssue, t: t }), _jsx("p", { className: "dsmm-hint", children: t("observedPolicy") }), _jsxs("dl", { className: "dsmm-child-meta", children: [_jsx("dt", { children: t("profileOverrideState") }), _jsx("dd", { children: t("profileOverrideUnknown") })] }), _jsxs("dl", { className: "dsmm-child-meta", children: [_jsx("dt", { children: t("runtime") }), _jsx("dd", { children: value === null ? t("unknown") : t(value.runtime.state) }), _jsx("dt", { children: t("mounted") }), _jsx("dd", { children: value === null ? t("unknown") : t(value.runtime.mounted ? "on" : "off") })] }), value?.runtime.restartRequired && _jsx("p", { children: t("restart") }), disabled && !state.reading && _jsx("p", { className: "dsmm-hint", children: t("rulesUnavailable") }), state.base !== null && _jsxs("dl", { className: "dsmm-child-meta", children: [_jsx("dt", { children: "permissionControl.enabled" }), _jsxs("dd", { children: [t(state.base.policy.enabled ? "on" : "off"), " \u00B7 ", t("coldHint")] }), _jsx("dt", { children: "permissionControl.nativeCommands.enabled" }), _jsx("dd", { children: t(state.base.policy.nativeCommands.enabled ? "on" : "off") })] }), _jsxs("details", { className: "dsmm-deployment-group", children: [_jsx("summary", { children: t("coverageDetails") }), _jsx(PermissionCoverage, { state: state, t: t })] }), draft !== null && _jsxs(_Fragment, { children: [_jsxs("div", { className: "dsmm-field", children: [_jsx("label", { htmlFor: `${id}-outside`, children: t("outsideReads") }), _jsx(ActionSelect, { id: `${id}-outside`, value: draft.outsideReads, disabled: disabled, t: t, onChange: outsideReads => controller.edit(state.generation, { outsideReads }) })] }), ["webSearch", "webFetch"].map(key => _jsxs("fieldset", { children: [_jsx("legend", { children: t(key) }), _jsxs("label", { className: "dsmm-actions", htmlFor: `${id}-${key}-enabled`, children: [_jsx("input", { type: "checkbox", id: `${id}-${key}-enabled`, checked: draft[key].enabled, disabled: disabled, onChange: event => controller.edit(state.generation, { [key]: { ...draft[key], enabled: event.currentTarget.checked } }) }), t("enabled")] }), _jsxs("div", { className: "dsmm-field", children: [_jsx("label", { htmlFor: `${id}-${key}-rule`, children: t("rule") }), _jsx(ActionSelect, { id: `${id}-${key}-rule`, value: draft[key].rule, disabled: disabled, t: t, onChange: rule => controller.edit(state.generation, { [key]: { ...draft[key], rule } }) })] })] }, key)), _jsx(Button, { type: "button", variant: "outline", disabled: disabled || draft.editor !== null, onClick: () => controller.edit(state.generation, { editor: { id: "", action: "ask", match: newMatch("outside-read") } }), children: t("newRule") }), _jsx(RuleEditor, { controller: controller, state: state, t: t }), (draft.upsert.length > 0 || draft.revoke.length > 0) && _jsxs("div", { className: "dsmm-structured", children: [_jsx("h3", { children: t("staged") }), draft.upsert.map(row => _jsxs("div", { className: "dsmm-field", children: [_jsxs("p", { children: [row.id, " \u00B7 ", t(`kind:${row.match.kind}`), " \u00B7 ", t(`action:${row.action}`)] }), _jsxs(Button, { type: "button", variant: "outline", disabled: disabled, onClick: () => controller.edit(state.generation, { upsert: draft.upsert.filter(rule => rule.id !== row.id) }), children: [t("unstage"), ": ", row.id] })] }, row.id)), draft.revoke.map(ruleId => _jsxs("div", { className: "dsmm-field", children: [_jsxs("p", { children: [t("stageRevoke"), ": ", ruleId] }), _jsxs(Button, { type: "button", variant: "outline", disabled: disabled, onClick: () => controller.edit(state.generation, { revoke: draft.revoke.filter(id => id !== ruleId) }), children: [t("unstage"), ": ", ruleId] })] }, ruleId))] })] }), _jsx(RuleRecords, { state: state, controller: controller, t: t }), _jsxs("div", { className: "dsmm-actions", children: [_jsx(Button, { type: "button", variant: "primary", disabled: !controller.canSave(state.generation), onClick: () => void controller.save(state.generation), children: t("save") }), _jsx(Button, { type: "button", variant: "outline", disabled: !writable || state.reading || state.busy !== null, onClick: () => void controller.refresh(state.generation), children: t("refresh") }), _jsx(Button, { type: "button", variant: "outline", disabled: !writable || state.reading || state.busy !== null || !state.dirty && state.rulesIssue === null, onClick: () => void controller.refresh(state.generation, true), children: t("discard") })] }), state.dirty && _jsx("p", { children: t("dirty") })] });
|
|
39
39
|
}
|
|
40
|
-
export function PermissionsPanel({ controller, t, sessionId
|
|
40
|
+
export function PermissionsPanel({ controller, t, sessionId }) {
|
|
41
41
|
const state = useSyncExternalStore(controller.store.subscribe, controller.store.getSnapshot);
|
|
42
42
|
useEffect(() => controller.watch(), [controller]);
|
|
43
43
|
if (sessionId !== undefined && sessionId !== state.sessionId)
|
|
44
44
|
return _jsx("p", { className: "dsmm-hint", role: "status", children: t("rulesUnavailable") });
|
|
45
|
-
|
|
45
|
+
// Silent revalidation never flips the region busy; a save reports through its own status line.
|
|
46
|
+
return _jsxs("section", { className: "dsmm-profiles dsmm-children dsmm-permissions", "data-dsmm-permissions": true, "aria-label": t("title"), "aria-busy": state.reading, children: [_jsx("h2", { children: t("title") }), _jsx(RootState, { state: state, t: t }), _jsx("p", { className: "dsmm-hint", children: t("nativeApproval") }), _jsx("p", { className: "dsmm-status", role: "status", "aria-live": "polite", children: state.busy !== null ? t("busy") : state.reading ? t("reading") : state.notice === null ? "" : t(state.notice) }), _jsx(PermissionRulesEditor, { controller: controller, state: state, t: t })] });
|
|
46
47
|
}
|
|
47
48
|
//# sourceMappingURL=PermissionsPanel.js.map
|
|
@@ -261,9 +261,9 @@ export declare const childrenLocaleZh: {
|
|
|
261
261
|
no: string;
|
|
262
262
|
activity: string;
|
|
263
263
|
runtime: string;
|
|
264
|
-
liveRoute: string;
|
|
265
|
-
title: string;
|
|
266
264
|
images: string;
|
|
265
|
+
title: string;
|
|
266
|
+
liveRoute: string;
|
|
267
267
|
descendants: string;
|
|
268
268
|
interrupt: string;
|
|
269
269
|
readonly: string;
|
|
@@ -271,10 +271,8 @@ export declare const childrenLocaleZh: {
|
|
|
271
271
|
delivery: string;
|
|
272
272
|
queue: string;
|
|
273
273
|
steer: string;
|
|
274
|
-
authority: string;
|
|
275
274
|
foreign: string;
|
|
276
275
|
reading: string;
|
|
277
|
-
restart: string;
|
|
278
276
|
refresh: string;
|
|
279
277
|
noSession: string;
|
|
280
278
|
runs: string;
|
|
@@ -321,6 +319,8 @@ export declare const childrenLocaleZh: {
|
|
|
321
319
|
interruptAvailability: string;
|
|
322
320
|
imageAvailability: string;
|
|
323
321
|
fence: string;
|
|
322
|
+
restart: string;
|
|
323
|
+
authority: string;
|
|
324
324
|
evidence: string;
|
|
325
325
|
evidenceMissing: string;
|
|
326
326
|
originalEpoch: string;
|
package/lib/client/controller.js
CHANGED
|
@@ -108,7 +108,10 @@ export class ProfilesController {
|
|
|
108
108
|
this.generation += 1;
|
|
109
109
|
this.sessionGeneration += 1;
|
|
110
110
|
this.modelSelectorGeneration += 1;
|
|
111
|
-
|
|
111
|
+
// A replaced connection only discards what it observed. It never records a
|
|
112
|
+
// durable refusal for the session: an unread configuration is read again
|
|
113
|
+
// by the next refresh, and typing stays available in the meantime.
|
|
114
|
+
this.publish({ session: null, sessionBusy: null, sessionNotice: null, sessionUnconfirmed: false,
|
|
112
115
|
sessionViewEpoch: this.current.sessionViewEpoch + 1, busy: null, issue: { kind: "transport", code: "unavailable" } });
|
|
113
116
|
};
|
|
114
117
|
if (replacement || source === null || this.connectionBaseline === undefined)
|
|
@@ -18,13 +18,11 @@ export declare const deploymentEn: {
|
|
|
18
18
|
permissionControlHint: string;
|
|
19
19
|
modules: string;
|
|
20
20
|
scope: string;
|
|
21
|
-
close: string;
|
|
22
21
|
loading: string;
|
|
23
22
|
unset: string;
|
|
24
23
|
"module:run": string;
|
|
25
24
|
"module:routes": string;
|
|
26
25
|
"module:workflow": string;
|
|
27
|
-
"module:subagents": string;
|
|
28
26
|
"module:permissions": string;
|
|
29
27
|
"module:other": string;
|
|
30
28
|
"module:state": string;
|
|
@@ -43,6 +41,8 @@ export declare const deploymentEn: {
|
|
|
43
41
|
nativeRuntimeHint: string;
|
|
44
42
|
nativeRuntimeReadinessHint: string;
|
|
45
43
|
unsetGroup: string;
|
|
44
|
+
unitBytes: string;
|
|
45
|
+
unitChars: string;
|
|
46
46
|
nativeRuntimeState: string;
|
|
47
47
|
nativeRuntimeBinding: string;
|
|
48
48
|
nativeRuntimeFence: string;
|
|
@@ -12,15 +12,15 @@ export const deploymentEn = {
|
|
|
12
12
|
core: "Core", coreHint: "Core-owned desired settings. Model-parameter passthrough is ordinary config, not a subplugin. The permission-control enabled flag is startup-pinned. Save does not change current-session admission; inspect desired, startup and admitted values below. Unavailable admission stays unknown.",
|
|
13
13
|
modelParametersHint: "Off stops sending custom parameters and uses native reasoning defaults. Saved values and your selected model stay unchanged.",
|
|
14
14
|
permissionControlHint: "Permission-control mounting is startup-pinned. Saved configuration does not prove runtime coverage or remove current protections. Root rules keep their independent authority inside Permissions.",
|
|
15
|
-
modules: "Configuration
|
|
16
|
-
"module:run": "Run and modules", "module:routes": "Model routes and recovery", "module:workflow": "Workflow, roles and
|
|
15
|
+
modules: "Configuration sections", scope: "Configuration scope", loading: "Loading configuration…", unset: "Use default configuration",
|
|
16
|
+
"module:run": "Run and modules", "module:routes": "Model routes and recovery", "module:workflow": "Workflow, roles and subagents", "module:permissions": "Permissions and safety", "module:other": "Other / advanced", "module:state": "Configuration state",
|
|
17
17
|
saveScope: "Save selected configuration scope", pendingModules: "Pending modules in this scope", savedRefreshRequired: "Saved — refresh required before further edits", sessionObserved: "Current-session admission observed",
|
|
18
18
|
noModuleFields: "No editable settings in this scope.",
|
|
19
19
|
leaveDraft: "Unsaved or invalid draft. Choose how to leave; nothing is saved or discarded automatically.", continueEditing: "Continue editing", keepDraft: "Keep draft and return", discardDraft: "Discard draft and leave",
|
|
20
|
-
rootRules: "
|
|
20
|
+
rootRules: "Global permission rules", rootRulesHint: "Choose an open main session with editing access as the editor for Global rules. Saved rules persist in Global policy and affect every context that uses it; they are not session-private. This transaction saves separately from configuration.", rootRulesUnavailable: "Permission rules unavailable. Reconnect and refresh.",
|
|
21
21
|
nativeRuntimeHint: "Native default On; Host base pins still apply. Mounting is captured at startup. Saving stages desired configuration only; it does not start/stop providers or cancel running sessions. A separate Host restart may cancel sessions.",
|
|
22
22
|
nativeRuntimeReadinessHint: "Task progress is available in the session.",
|
|
23
|
-
unsetGroup: "Use defaults for this group",
|
|
23
|
+
unsetGroup: "Use defaults for this group", unitBytes: "bytes", unitChars: "characters",
|
|
24
24
|
nativeRuntimeState: "Observed native runtime", nativeRuntimeBinding: "Observed runtime composition", nativeRuntimeFence: "Execution admission ready", nativeRuntimeRestart: "Restart required", nativeRuntimeStock: "Official Host runtime", nativeRuntimeUnavailable: "Unavailable / unknown",
|
|
25
25
|
"nativeRuntimeReason-explicit-composition-required": "The Host requires an explicit native runtime composition.", "nativeRuntimeReason-duplicate-provider": "More than one native provider is present; readiness is not confirmed.", "nativeRuntimeReason-authority-not-ready": "Native execution authority is not ready.", "nativeRuntimeReason-disabled": "The saved native runtime is disabled.", "nativeRuntimeReason-pending-restart": "Saved desired state differs from the mounted native composition; restart is pending.", "nativeRuntimeReason-scope-conflict": "Native scope ownership conflicts; readiness is not confirmed.",
|
|
26
26
|
saveGlobal: "Save", saveProfile: "Save", saving: "Saving…", refresh: "Refresh", discard: "Discard and reload", dirty: "Unsaved changes", saved: "Saved",
|
|
@@ -54,15 +54,15 @@ export const deploymentZh = {
|
|
|
54
54
|
core: "Core 核心配置", coreHint: "Core 所有的 desired 意图配置。模型参数透传为普通配置,非子插件;权限控制 enabled 仅启动时捕获。保存不改变当前会话准入;下方可检查意图、启动与准入值,不可用的准入仍为未知。",
|
|
55
55
|
modelParametersHint: "关闭后停止发送自定义参数,并使用原生推理默认值;已保存的值和所选模型不变。",
|
|
56
56
|
permissionControlHint: "权限控制挂载仅启动时捕获。保存配置不证明运行时覆盖,也不移除当前保护;Root 规则在权限模块内保持独立权限。",
|
|
57
|
-
modules: "
|
|
58
|
-
"module:run": "运行与模块", "module:routes": "模型路由与恢复", "module:workflow": "
|
|
57
|
+
modules: "配置分区", scope: "配置范围", loading: "正在加载配置…", unset: "使用默认配置",
|
|
58
|
+
"module:run": "运行与模块", "module:routes": "模型路由与恢复", "module:workflow": "工作流、角色与子 Agent", "module:permissions": "权限与安全", "module:other": "其他与高级", "module:state": "配置状态",
|
|
59
59
|
saveScope: "保存所选配置作用域", pendingModules: "此作用域的待保存模块", savedRefreshRequired: "已保存——需刷新后继续编辑", sessionObserved: "已观测当前会话准入",
|
|
60
60
|
noModuleFields: "此范围内没有可编辑的设置。",
|
|
61
61
|
leaveDraft: "仍有未保存或无效草稿,请选择离开方式;不会自动保存或丢弃。", continueEditing: "继续编辑", keepDraft: "保留草稿并返回", discardDraft: "放弃草稿并离开",
|
|
62
|
-
rootRules: "
|
|
62
|
+
rootRules: "全局权限规则", rootRulesHint: "请选择已打开且有编辑权限的主会话作为全局规则的编辑入口。保存的规则写入全局策略,对所有使用该策略的上下文生效,并非会话私有。此事务与配置分别保存。", rootRulesUnavailable: "权限规则不可用,请重连后刷新。",
|
|
63
63
|
nativeRuntimeHint: "原生默认开启,Host base 固定值仍适用;挂载仅启动时捕获。保存只设置 desired,不会启动/停止提供商或取消当前会话;独立 Host 重启可能取消会话。",
|
|
64
64
|
nativeRuntimeReadinessHint: "任务进度可在会话中查看。",
|
|
65
|
-
unsetGroup: "整组使用默认配置",
|
|
65
|
+
unsetGroup: "整组使用默认配置", unitBytes: "字节", unitChars: "字符",
|
|
66
66
|
nativeRuntimeState: "已观测原生运行时", nativeRuntimeBinding: "已观测运行时组合", nativeRuntimeFence: "执行准入已就绪", nativeRuntimeRestart: "需要重启", nativeRuntimeStock: "官方 Host 运行时", nativeRuntimeUnavailable: "不可用/未知",
|
|
67
67
|
"nativeRuntimeReason-explicit-composition-required": "Host 需要显式的原生运行时组合。", "nativeRuntimeReason-duplicate-provider": "存在重复原生 provider,无法确认就绪状态。", "nativeRuntimeReason-authority-not-ready": "原生执行权限尚未就绪。", "nativeRuntimeReason-disabled": "已保存的原生运行时为关闭。", "nativeRuntimeReason-pending-restart": "已保存 desired 与已挂载原生组合不同,等待独立重启。", "nativeRuntimeReason-scope-conflict": "原生 scope 所有权冲突,无法确认就绪状态。",
|
|
68
68
|
saveGlobal: "保存", saveProfile: "保存", saving: "正在保存…", refresh: "刷新", discard: "丢弃并重载", dirty: "未保存", saved: "已保存",
|
|
@@ -94,7 +94,6 @@ export const deploymentFieldLabels = {
|
|
|
94
94
|
subagents: ["Subagents", "子 Agent"], lsp: ["LSP", "LSP"], presets: ["Preset materialization", "预设物化"],
|
|
95
95
|
promptOrder: ["Prompt order", "提示词顺序"], defaultActive: ["Default Deepwork mode", "默认 Deepwork 模式"],
|
|
96
96
|
enabled: ["Enabled", "启用"], materialize: ["Materialize presets", "物化预设"], scope: ["Guard scope", "保护范围"],
|
|
97
|
-
plannerRootEnabled: ["Planner main-chat preset (restart required)", "Planner 主聊天预设(需重启)"],
|
|
98
97
|
shellCommandSafety: ["Shell command safety", "Shell 命令安全"], gitWriteGuard: ["Git write policy", "Git 写入策略"],
|
|
99
98
|
toolOutputTruncation: ["Tool output truncation", "工具输出截断"], maxInlineBytes: ["Inline byte limit", "内联字节上限"],
|
|
100
99
|
planFormatValidation: ["Plan format validation", "计划格式校验"], questionLabelHelper: ["Question labels", "提问标签"], maxLabelChars: ["Label character limit", "标签字符上限"], todoDisciplineHelper: ["Todo discipline", "待办纪律"],
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import type { DeploymentSchemaNode } from "../profile-types.js";
|
|
2
2
|
import type { DeploymentLocaleKey } from "./deployment-locales.js";
|
|
3
|
-
|
|
4
|
-
export
|
|
3
|
+
/** The five flat sections. "other" is appended only when an ungrouped field exists. */
|
|
4
|
+
export declare const CONFIG_MODULES: readonly ["run", "routes", "workflow", "permissions", "state"];
|
|
5
|
+
export declare const NAVIGATION_MODULES: readonly ["run", "routes", "workflow", "permissions", "state", "other"];
|
|
6
|
+
export type ConfigModule = typeof NAVIGATION_MODULES[number];
|
|
5
7
|
export declare const moduleTitle: (module: ConfigModule) => DeploymentLocaleKey;
|
|
6
|
-
export declare function moduleFor(path: string):
|
|
8
|
+
export declare function moduleFor(path: string): ConfigModule;
|
|
7
9
|
export declare function editableConfigField(key: string, layer: "global" | "profile"): boolean;
|
|
8
10
|
export declare function moduleFields(schema: DeploymentSchemaNode, module: ConfigModule, layer: "global" | "profile"): Array<[string, DeploymentSchemaNode]>;
|
|
9
11
|
//# sourceMappingURL=deployment-modules.d.ts.map
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
/** The five flat sections. "other" is appended only when an ungrouped field exists. */
|
|
2
|
+
export const CONFIG_MODULES = ["run", "routes", "workflow", "permissions", "state"];
|
|
3
|
+
export const NAVIGATION_MODULES = [...CONFIG_MODULES, "other"];
|
|
2
4
|
export const moduleTitle = (module) => `module:${module}`;
|
|
3
5
|
export function moduleFor(path) {
|
|
4
6
|
const key = path.split(".")[0];
|
|
@@ -6,10 +8,8 @@ export function moduleFor(path) {
|
|
|
6
8
|
return "run";
|
|
7
9
|
if (["roleRouting", "runtimePolicy", "runtimeRecovery"].includes(key))
|
|
8
10
|
return "routes";
|
|
9
|
-
if (["workflow", "roles", "skills", "presets", "businessLocale", "locale", "promptOrder", "
|
|
11
|
+
if (["workflow", "roles", "skills", "presets", "businessLocale", "locale", "promptOrder", "subagents"].includes(key))
|
|
10
12
|
return "workflow";
|
|
11
|
-
if (key === "subagents")
|
|
12
|
-
return "subagents";
|
|
13
13
|
if (["permissionControl", "guards"].includes(key))
|
|
14
14
|
return "permissions";
|
|
15
15
|
return "other";
|
|
@@ -18,6 +18,7 @@ export declare class DeploymentWorkspace {
|
|
|
18
18
|
readonly permissions?: PermissionController | undefined;
|
|
19
19
|
private state;
|
|
20
20
|
private listeners;
|
|
21
|
+
private visited;
|
|
21
22
|
private forms;
|
|
22
23
|
private profiles;
|
|
23
24
|
private stopForm?;
|
|
@@ -35,9 +36,12 @@ export declare class DeploymentWorkspace {
|
|
|
35
36
|
bindForms(forms: ConfigForms | null): void;
|
|
36
37
|
private sync;
|
|
37
38
|
controller(scope?: ConfigScope): DeploymentController | null;
|
|
39
|
+
/** First visit opens the first section with editable fields; afterwards the last viewed section. */
|
|
40
|
+
private defaultSection;
|
|
38
41
|
hasPending(): boolean;
|
|
39
42
|
request(destination: Destination): void;
|
|
40
43
|
continueEditing(): void;
|
|
44
|
+
/** Explicitly keep every draft and move anyway; the draft stays in contribution memory. */
|
|
41
45
|
keepAndNavigate(): void;
|
|
42
46
|
discardAndNavigate(): Promise<void>;
|
|
43
47
|
save(): Promise<void>;
|