@dsmm/dsmm 0.3.0 → 0.3.2
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 +26 -40
- package/cordis.patch.yml +9 -13
- package/docs/agent-presets.md +26 -14
- package/docs/compatibility.md +24 -68
- package/docs/deferred-native-approval-risk.md +8 -12
- package/docs/design.md +25 -254
- package/docs/lsp.md +2 -2
- package/docs/migration-from-ocmm.md +38 -51
- package/docs/model-routing.md +21 -21
- package/docs/native-permissions.md +17 -7
- package/docs/profiles.md +13 -9
- package/docs/releasing.md +25 -311
- package/docs/roadmap.md +52 -241
- package/docs/runtime-recovery.md +29 -91
- package/docs/safety-guards.md +19 -16
- package/docs/settings-status.md +23 -11
- package/docs/skill-sync.md +17 -17
- package/docs/web-fetch-fakeip.md +82 -0
- package/lib/child-capture.d.ts +12 -2
- package/lib/child-capture.js +22 -5
- package/lib/client/ChildPermissions.d.ts +43 -0
- package/lib/client/ChildPermissions.js +100 -0
- package/lib/client/ChildrenPanel.d.ts +5 -5
- package/lib/client/ChildrenPanel.js +6 -18
- package/lib/client/DeploymentFields.d.ts +32 -0
- package/lib/client/DeploymentFields.js +70 -0
- package/lib/client/DeploymentPage.d.ts +21 -6
- package/lib/client/DeploymentPage.js +80 -112
- package/lib/client/HistoryContinuation.d.ts +7 -0
- package/lib/client/HistoryContinuation.js +22 -0
- package/lib/client/NativeCommandEntries.d.ts +17 -0
- package/lib/client/NativeCommandEntries.js +68 -0
- package/lib/client/PermissionPanelEntry.d.ts +8 -0
- package/lib/client/PermissionPanelEntry.js +11 -0
- package/lib/client/PermissionsPanel.d.ts +3 -1
- package/lib/client/PermissionsPanel.js +10 -9
- package/lib/client/ProfilesSection.js +8 -6
- package/lib/client/RoleAvailability.js +1 -1
- package/lib/client/RoleToolView-data.d.ts +35 -0
- package/lib/client/RoleToolView-data.js +52 -0
- package/lib/client/RoleToolView-locales.d.ts +36 -0
- package/lib/client/RoleToolView-locales.js +20 -0
- package/lib/client/RoleToolView.d.ts +10 -0
- package/lib/client/RoleToolView.js +47 -0
- package/lib/client/SessionProfiles.js +51 -24
- package/lib/client/TemporaryPermissions.d.ts +21 -0
- package/lib/client/TemporaryPermissions.js +94 -0
- package/lib/client/children-controller.d.ts +2 -8
- package/lib/client/children-controller.js +1 -26
- package/lib/client/children-locales.d.ts +27 -52
- package/lib/client/children-locales.js +8 -12
- package/lib/client/configuration-display.d.ts +5 -0
- package/lib/client/configuration-display.js +11 -0
- package/lib/client/controller.d.ts +18 -0
- package/lib/client/controller.js +118 -28
- package/lib/client/deployment-controller.d.ts +13 -1
- package/lib/client/deployment-controller.js +84 -24
- package/lib/client/deployment-data.d.ts +1 -0
- package/lib/client/deployment-data.js +4 -1
- package/lib/client/deployment-locales.d.ts +43 -0
- package/lib/client/deployment-locales.js +45 -19
- package/lib/client/deployment-modules.d.ts +9 -0
- package/lib/client/deployment-modules.js +24 -0
- package/lib/client/deployment-workspace.d.ts +48 -0
- package/lib/client/deployment-workspace.js +123 -0
- package/lib/client/history-controller.d.ts +29 -0
- package/lib/client/history-controller.js +111 -0
- package/lib/client/history-entry.d.ts +11 -0
- package/lib/client/history-entry.js +106 -0
- package/lib/client/history-locales.d.ts +95 -0
- package/lib/client/history-locales.js +41 -0
- package/lib/client/index.js +26 -76
- package/lib/client/locales.d.ts +13 -0
- package/lib/client/locales.js +104 -86
- package/lib/client/permission-controller.d.ts +1 -0
- package/lib/client/permission-controller.js +3 -2
- package/lib/client/permission-locales.d.ts +51 -0
- package/lib/client/permission-locales.js +59 -19
- package/lib/client/session-labels.js +4 -3
- package/lib/client/styles.d.ts +1 -1
- package/lib/client/styles.js +9 -8
- package/lib/client/temporary-permission-client.d.ts +20 -0
- package/lib/client/temporary-permission-client.js +52 -0
- package/lib/client/temporary-permission-entry.d.ts +6 -0
- package/lib/client/temporary-permission-entry.js +56 -0
- package/lib/client.js +5691 -3439
- package/lib/commands.js +2 -0
- package/lib/config-file-store.d.ts +3 -0
- package/lib/config-file-store.js +4 -2
- package/lib/config-revision.d.ts +5 -0
- package/lib/config-revision.js +11 -0
- package/lib/core-permission-authority.js +11 -41
- package/lib/deployment-config.d.ts +9 -2
- package/lib/deployment-config.js +35 -8
- package/lib/deployment-permission-rules.js +19 -7
- package/lib/dsh-types.d.ts +1 -1
- package/lib/history-candidates.d.ts +30 -0
- package/lib/history-candidates.js +176 -0
- package/lib/history-codec.d.ts +11 -0
- package/lib/history-codec.js +102 -0
- package/lib/history-contract.d.ts +44 -0
- package/lib/history-contract.js +2 -0
- package/lib/history-controller.d.ts +42 -0
- package/lib/history-controller.js +329 -0
- package/lib/history-policy.d.ts +4 -0
- package/lib/history-policy.js +8 -0
- package/lib/history-remote.d.ts +28 -0
- package/lib/history-remote.js +17 -0
- package/lib/history-rpc.d.ts +24 -0
- package/lib/history-rpc.js +136 -0
- package/lib/history-support.d.ts +15 -0
- package/lib/history-support.js +21 -0
- package/lib/history-types.d.ts +67 -0
- package/lib/history-types.js +2 -0
- package/lib/host-llm-startup.js +3 -3
- package/lib/host-llm.d.ts +9 -3
- package/lib/host-llm.js +48 -8
- package/lib/index.d.ts +18 -20
- package/lib/index.js +147 -415
- package/lib/lifetime.d.ts +4 -0
- package/lib/lifetime.js +22 -0
- package/lib/live-pi-ai-owner.d.ts +1 -0
- package/lib/live-pi-ai-owner.js +8 -4
- package/lib/mode.d.ts +3 -2
- package/lib/mode.js +28 -41
- package/lib/model-routing.d.ts +2 -8
- package/lib/model-routing.js +59 -175
- package/lib/native-admission.d.ts +77 -0
- package/lib/native-admission.js +503 -0
- package/lib/native-pi-ai-wire.d.ts +3 -1
- package/lib/native-pi-ai-wire.js +47 -13
- package/lib/permission-child-control.d.ts +36 -0
- package/lib/permission-child-control.js +164 -0
- package/lib/permission-control.d.ts +2 -3
- package/lib/permission-control.js +7 -0
- package/lib/permission-controller.js +2 -2
- package/lib/permission-exec-argv.d.ts +32 -0
- package/lib/permission-exec-argv.js +171 -0
- package/lib/permission-fs-search.js +2 -1
- package/lib/permission-fs.js +2 -1
- package/lib/permission-native-rules.js +3 -3
- package/lib/permission-temporary-files.d.ts +19 -0
- package/lib/permission-temporary-files.js +248 -0
- package/lib/permission-temporary-grants.d.ts +106 -0
- package/lib/permission-temporary-grants.js +198 -0
- package/lib/permission-temporary-install.d.ts +25 -0
- package/lib/permission-temporary-install.js +86 -0
- package/lib/permission-temporary-remote.d.ts +19 -0
- package/lib/permission-temporary-remote.js +75 -0
- package/lib/permission-temporary-rpc.d.ts +37 -0
- package/lib/permission-temporary-rpc.js +154 -0
- package/lib/permission-temporary-types.d.ts +47 -0
- package/lib/permission-temporary-types.js +2 -0
- package/lib/permission-temporary-web.d.ts +11 -0
- package/lib/permission-temporary-web.js +154 -0
- package/lib/permission-web.js +2 -1
- package/lib/preset-registry.js +3 -2
- package/lib/preset-skills.d.ts +3 -12
- package/lib/preset-skills.js +28 -58
- package/lib/profile-diagnostics.d.ts +1 -1
- package/lib/profile-diagnostics.js +2 -2
- package/lib/profile-remote.js +61 -22
- package/lib/profile-rpc.d.ts +4 -3
- package/lib/profile-rpc.js +35 -37
- package/lib/profile-runtime.d.ts +42 -74
- package/lib/profile-runtime.js +314 -617
- package/lib/profile-store.d.ts +20 -8
- package/lib/profile-store.js +112 -63
- package/lib/profile-types.d.ts +19 -4
- package/lib/profiles.d.ts +3 -1
- package/lib/profiles.js +9 -7
- package/lib/prompt-content.d.ts +1 -0
- package/lib/prompt-content.js +4 -1
- package/lib/prompts.d.ts +2 -12
- package/lib/prompts.js +11 -66
- package/lib/role-control-remote.d.ts +1 -4
- package/lib/role-control-remote.js +8 -36
- package/lib/role-control-rpc.d.ts +10 -36
- package/lib/role-control-rpc.js +112 -269
- package/lib/role-control-types.d.ts +3 -26
- package/lib/role-control-types.js +3 -4
- package/lib/role-identity.d.ts +5 -0
- package/lib/role-identity.js +10 -0
- package/lib/role-invocation.d.ts +3 -3
- package/lib/role-invocation.js +2 -2
- package/lib/role-llm-runtime.js +5 -11
- package/lib/role-policy.d.ts +19 -50
- package/lib/role-policy.js +136 -508
- package/lib/role-providers.d.ts +5 -8
- package/lib/role-providers.js +20 -86
- package/lib/role-routing.d.ts +1 -3
- package/lib/role-routing.js +24 -34
- package/lib/role-subagents.d.ts +5 -14
- package/lib/role-subagents.js +163 -108
- package/lib/runtime-integration.d.ts +5 -78
- package/lib/runtime-integration.js +11 -697
- package/lib/session-metadata.d.ts +13 -12
- package/lib/session-metadata.js +6 -31
- package/lib/session-scope.js +2 -1
- package/lib/settings.d.ts +5 -18
- package/lib/settings.js +19 -43
- package/lib/skills.d.ts +1 -0
- package/lib/skills.js +5 -1
- package/lib/state.d.ts +3 -2
- package/lib/state.js +26 -10
- package/lib/status.d.ts +1 -9
- package/lib/status.js +3 -55
- package/lib/web-fetch-address-policy.d.ts +24 -0
- package/lib/web-fetch-address-policy.js +189 -0
- package/lib/web-fetch-fakeip.d.ts +25 -0
- package/lib/web-fetch-fakeip.js +107 -0
- package/package.json +124 -106
- package/patches/dsh-approval-settlement/@deepseek-ai__dsh-api-gateway@0.2.1-rc.2.patch +13291 -0
- package/patches/dsh-approval-settlement/@deepseek-ai__dsh-api-remotes@0.2.1-rc.2.patch +9133 -0
- package/patches/dsh-approval-settlement/@deepseek-ai__dsh-client-ui-approval@0.2.1-rc.2.patch +156 -0
- package/patches/dsh-approval-settlement/@deepseek-ai__dsh-subagent@0.2.1-rc.2.patch +3546 -0
- package/patches/dsh-approval-settlement/@deepseek-ai__dsh-user-approval@0.2.1-rc.2.patch +431 -0
- package/patches/dsh-approval-settlement/@deepseek-ai__dsh-web@0.2.1-rc.2.patch +119 -0
- package/patches/dsh-approval-settlement/README.md +41 -0
- package/patches/dsh-approval-settlement/metadata.json +10 -0
- package/patches/dsh-session-activation/@deepseek-ai__dsh-agent-loop@0.2.1-rc.2.patch +383 -0
- package/patches/dsh-session-activation/@deepseek-ai__dsh-agent-preset-registry@0.2.1-rc.2.patch +55 -0
- package/patches/dsh-session-activation/@deepseek-ai__dsh-api-session-controller@0.2.1-rc.2.patch +16673 -0
- package/patches/dsh-session-activation/@deepseek-ai__dsh-client-ui-subagent@0.2.1-rc.2.patch +29 -0
- package/patches/dsh-session-activation/@deepseek-ai__dsh-client-ui-workspace@0.2.1-rc.2.patch +196 -0
- package/patches/dsh-session-activation/@deepseek-ai__dsh-session-persistence-jsonl@0.2.1-rc.2.patch +35 -0
- package/patches/dsh-session-activation/@deepseek-ai__dsh-session-persistence@0.2.1-rc.2.patch +40 -0
- package/docs/research/deepseek-v4-pro.md +0 -74
- package/docs/research/oh-dsh.md +0 -96
- package/lib/agent-registry.d.ts +0 -36
- package/lib/agent-registry.js +0 -75
- package/lib/child-admission.d.ts +0 -40
- package/lib/child-admission.js +0 -151
- package/lib/delivery-authority.d.ts +0 -83
- package/lib/delivery-authority.js +0 -397
- package/lib/native-child-evidence.d.ts +0 -40
- package/lib/native-child-evidence.js +0 -104
- package/lib/role-runs.d.ts +0 -138
- package/lib/role-runs.js +0 -335
- package/lib/session-persistence.d.ts +0 -36
- package/lib/session-persistence.js +0 -304
- package/lib/subagent-runtime.d.ts +0 -57
- package/lib/subagent-runtime.js +0 -257
- package/prompts/deepseek-flash.md +0 -11
- package/prompts/deepseek-v4-pro.md +0 -14
package/lib/client/locales.js
CHANGED
|
@@ -1,127 +1,145 @@
|
|
|
1
1
|
export const NS = "settings.dsmm-profiles";
|
|
2
2
|
export const en = {
|
|
3
|
+
sessionChooseWorkspace: "Choose a workspace to start a blank session, then choose its configuration before sending.",
|
|
4
|
+
sessionSelectionBlock: "DSMM session configuration is being confirmed. Wait for selection to finish, or refresh its state.",
|
|
5
|
+
sessionCommittedRefresh: "Session configuration saved. Refresh to confirm it; do not apply again.",
|
|
6
|
+
sessionUnconfirmedRefresh: "Session configuration result unconfirmed. Refresh its state before selecting or sending; do not retry the change.",
|
|
7
|
+
technicalDetails: "Technical details",
|
|
3
8
|
diagnosticJsonc: "Correct the JSONC syntax at the indicated location.", diagnosticDuplicate: "Remove the duplicate field at this location.", diagnosticUnsafe: "Unsafe object keys are not supported; remove this field.", diagnosticUnknown: "Remove this unsupported field. Private and installation configuration belongs in native deployment settings.", diagnosticDeprecated: "This retired field is rejected. Configure explicit role levels instead; no migration is performed.", diagnosticType: "Use the declared field type and bounded value.", diagnosticValue: "Choose an explicitly supported value. Output-language choices are shown in the structured language field.", diagnosticRoute: "Use a complete provider/model route or a nonempty exact-effort override.", diagnosticRequired: "This role is required by the selected Deepwork policy and cannot be disabled.", diagnosticCeiling: "A named profile cannot enable capabilities outside its captured startup/deployment ceiling.",
|
|
4
|
-
browseZone: "
|
|
9
|
+
browseZone: "Saved profiles", editZone: "Edit profile", savedRevision: "Saved version: {revision}", savedInventory: "Profile warnings and errors", futurePin: "Default selection version: {revision}", noEditor: "Choose a profile or create one to edit.",
|
|
5
10
|
warningMarker: "Warning · nonblocking · {code} · {field}", blockingMarker: "Blocked · {code} · {field}", blankLabelWarning: "The label is blank. The profile ID is used for display; the original document can still be saved and selected.", diagnosticLocation: "JSONC line {line}, column {column}.",
|
|
6
|
-
savedWarnings: "Saved
|
|
7
|
-
omitLabel: "
|
|
8
|
-
toolTopology: "Subagent
|
|
9
|
-
levelName: "Invocation level: {level}", levelMode: "{level} override", levelUnconfigured: "
|
|
10
|
-
namedRole: "{name}
|
|
11
|
-
admittedRoles: "
|
|
12
|
-
centralOrigin: "
|
|
11
|
+
savedWarnings: "Saved profile warnings", draftWarnings: "Draft warnings", futureWarnings: "New-session default warnings", admissionWarnings: "Current-session warnings", warningProfile: "warning (nonblocking)",
|
|
12
|
+
omitLabel: "Use ID as display name", businessLocale: "Default output language", inheritLocale: "Use deployment or native language", unsupportedLocale: "Unsupported language — choose an allowed value", localeHint: "User requests take priority. Interface language stays unchanged.",
|
|
13
|
+
toolTopology: "Subagent tools", topologyHint: "per-role: one tool per role plus a category tool. parameterized: choose the role or category in the tool arguments.",
|
|
14
|
+
levelName: "Invocation level: {level}", levelMode: "{level} override", levelUnconfigured: "Use deployment level", levelEffortOnly: "Reasoning effort only", levelFullRoute: "Provider, model and effort", normalLevel: "normal · default route", orchestratorLevels: "Invocation levels are unavailable for the main orchestrator.", levelsHint: "Unconfigured levels cannot be used. Effort-only keeps the configured model; a full route replaces both model and effort.",
|
|
15
|
+
namedRole: "Enable {name}", namedRoleHint: "Required roles must stay enabled. Roles blocked by deployment settings cannot be enabled here.", availabilityUnknown: "Role availability is unknown. Refresh before changing it.", roleRequired: "Required role · {reason}", roleOptional: "Optional role", roleCeiling: "Startup: {startup}; deployment: {deployment}; captured admission: {admitted}.", roleProvenance: "Source: {source}; capture: {capture}.", roleUnavailableReason: "Availability reason: {reason}.",
|
|
16
|
+
admittedRoles: "Role availability", bindingUnknown: "Subagent readiness is unknown. Refresh to check.", bindingState: "Subagent execution ready: {ready}; restart required: {restart}.", bindingReason: "Reason: {reason}.", sessionModelHint: "Selecting a profile keeps your current model. Use profile model changes it explicitly.", savedOnlyHint: "Save changes before selecting this profile.",
|
|
17
|
+
centralOrigin: "Shared profile storage.", legacyOrigin: "Legacy profile storage (read-only).", explicitOrigin: "Custom profile storage.", readOnlyOrigin: "These legacy profiles are read-only.",
|
|
13
18
|
headerCompactProfiles: "Profiles · keep model", headerCompactRefresh: "Refresh", headerNoSession: "Select a session to make changes.",
|
|
19
|
+
sessionNewRequired: "Start a new session to change its profile. You can still save profiles and set the new-session default.",
|
|
20
|
+
sessionModuleOff: "Deepwork is unavailable in this session.",
|
|
14
21
|
headerModeEnable: "Enable Deepwork", headerModeDisable: "Disable Deepwork", headerModePreset: "Deepwork · DW preset", headerModeUnavailable: "Deepwork unavailable", headerModeOn: "Deepwork enabled.", headerModeOff: "Deepwork disabled.", headerUseCurrentModel: "Use profile model",
|
|
15
|
-
title: "Deepwork Profiles", description: "Save
|
|
16
|
-
newSessions: "
|
|
22
|
+
title: "Deepwork Profiles", description: "Save configurations and choose a default for new sessions.",
|
|
23
|
+
newSessions: "Choose a saved profile for new sessions. Existing sessions stay unchanged.",
|
|
17
24
|
editorSelect: "Profile to edit", choose: "Choose a profile", newDraft: "New unsaved profile", new: "New profile",
|
|
18
|
-
profileId: "Profile ID
|
|
19
|
-
configuration: "
|
|
20
|
-
structuralHint: "
|
|
21
|
-
save: "Save
|
|
25
|
+
profileId: "Profile ID", idHint: "1–64 lowercase letters, digits, hyphens or underscores. Cannot be changed after saving.",
|
|
26
|
+
configuration: "Configuration (JSONC)", configurationHint: "Use version: 1, the ID shown above, and settings. An optional label sets the display name.",
|
|
27
|
+
structuralHint: "Permissions, accounts and plugins are managed in application settings. Never paste passwords or keys.",
|
|
28
|
+
save: "Save", saving: "Saving…", apply: "Set as new-session default", applying: "Setting default…", reset: "Use default configuration", resetting: "Restoring default…",
|
|
22
29
|
refresh: "Refresh profiles", refreshing: "Refreshing profiles…", reload: "Reload saved profile", loading: "Loading profiles…", reading: "Reading profile…",
|
|
23
|
-
empty: "No saved profiles
|
|
24
|
-
baseline: "
|
|
25
|
-
appliedInvalid: "
|
|
26
|
-
selectionConflict: "The
|
|
27
|
-
dirty: "
|
|
28
|
-
|
|
30
|
+
empty: "No saved profiles. Create one to get started.",
|
|
31
|
+
baseline: "Default configuration", appliedProfile: "{id}",
|
|
32
|
+
appliedInvalid: "Default selection is unconfirmed. Resolve the error below and refresh before changing it. Existing sessions stay unchanged.",
|
|
33
|
+
selectionConflict: "The default changed elsewhere. This Host still uses the selection shown above. Select a saved profile or use default configuration to update it. Restarting adopts the stored selection.",
|
|
34
|
+
dirty: "Unsaved changes. Save or discard before selecting this profile.", savedNotApplied: "Saved; this version is not the new-session default.", savedApplied: "Saved; this version is the new-session default.",
|
|
35
|
+
versionObserved: "Available", versionAbsent: "Not saved", versionUnknown: "Unknown", savedRelationshipUnknown: "Saved; refresh to check the new-session default.", savedRefreshRequired: "Saved. Reload before editing or selecting again.",
|
|
36
|
+
saved: "Saved {id}.", applied: "New sessions will use {id}. Existing sessions stay unchanged.", resetDone: "New sessions will use default configuration. Existing sessions stay unchanged.",
|
|
29
37
|
discardPrompt: "Discard the unsaved draft before changing the editor?", discard: "Discard changes", cancel: "Cancel",
|
|
30
38
|
conflict: "The saved file or selection changed elsewhere. Your draft and the prior selection were kept. Refresh profiles, then reload the saved profile or review your draft before retrying.",
|
|
31
39
|
validation: "This profile is not valid. Correct the field below; your draft is unchanged.",
|
|
32
|
-
io: "
|
|
33
|
-
unavailable: "
|
|
34
|
-
transport: "
|
|
35
|
-
invalidProfile: "Unavailable profile: {id}", details: "
|
|
36
|
-
globalScope: "
|
|
40
|
+
io: "Could not save. Your draft is kept. Check configuration storage access and retry.",
|
|
41
|
+
unavailable: "Configuration service unavailable. Your draft is kept. Reconnect and refresh.",
|
|
42
|
+
transport: "Connection interrupted; the result is unconfirmed. Your draft is kept. Refresh before retrying.",
|
|
43
|
+
invalidProfile: "Unavailable profile: {id}", details: "Error details", retry: "Resolve the issue shown, refresh and retry.",
|
|
44
|
+
globalScope: "New-session default configuration", sessionScope: "Current-session configuration", sessionSelect: "Current-session configuration",
|
|
37
45
|
globalActionHint: "Set as future default selects only the saved revision for future sessions. It does not apply to the current session.",
|
|
38
|
-
headerProfile: "Profile", headerProfileLabel: "Current-session
|
|
39
|
-
headerLoading: "Loading profile…", headerApplying: "Applying profile…", headerApplied: "Profile applied.", headerBusy: "Session is busy.", headerUnavailable: "Profile unavailable.", headerDraft: "Save or discard the draft in Settings.", headerConflict: "The session
|
|
46
|
+
headerProfile: "Profile", headerProfileLabel: "Current-session configuration", headerCaptured: "Current configuration · profile unknown", headerSavedUnavailable: "Saved profile unavailable", headerCurrentProfile: "Current profile: {profile}", headerRefresh: "Refresh profiles and session state", headerUseModelAction: "Use profile model: {profile}",
|
|
47
|
+
headerLoading: "Loading profile…", headerApplying: "Applying profile…", headerApplied: "Profile applied.", headerBusy: "Session is busy.", headerUnavailable: "Profile unavailable.", headerDraft: "Save or discard the draft in Settings.", headerConflict: "The session configuration changed elsewhere. Refresh before retrying.", headerRefused: "Profile change unconfirmed. Check Settings.",
|
|
40
48
|
headerKeepModelGroup: "Switch profile — keep current model", headerUseModelGroup: "Switch and use profile model", headerModelDefaultHint: "Normal switching preserves the current model. Explicit switch-and-use-model also saves the native model default, like the Models tab.",
|
|
41
|
-
headerNoProfileModel: "
|
|
42
|
-
headerModelChoiceChanged: "
|
|
49
|
+
headerNoProfileModel: "No model is set for this configuration.", headerModelUnconfirmed: "Model change unconfirmed. Check model settings.", headerAppliedWithModel: "Configuration and model applied.",
|
|
50
|
+
headerModelChoiceChanged: "Your newer model selection was kept.",
|
|
51
|
+
headerActionUnavailable: "This action is unavailable. Refresh to check again.",
|
|
43
52
|
headerActivationRefused: "Profile activation was refused. Check its configuration and native model catalog.", headerSelectionRefused: "The profile change could not be confirmed.", headerIssueCode: "Reason: {code}.", headerIssueField: "Configuration field: {field}.", headerRetryHint: "Refresh profiles and current-session state, resolve the indicated issue in Settings or native Models, then retry when the session is idle.",
|
|
44
|
-
headerMaintenanceRefused: "
|
|
45
|
-
noSession: "
|
|
46
|
-
sessionUnavailable: "
|
|
47
|
-
sessionBusy: "
|
|
48
|
-
sessionState: "
|
|
49
|
-
sessionGlobalCaptured: "
|
|
50
|
-
sessionAdmittedProfile: "{id}
|
|
51
|
-
sessionConflict: "The session
|
|
52
|
-
sessionApply: "
|
|
53
|
-
sessionApplied: "Applied
|
|
53
|
+
headerMaintenanceRefused: "Another session operation is in progress. Try again shortly.", headerBusyRefused: "The session is running. Try again when it finishes.", headerCancelledRefused: "Operation cancelled. Refresh to confirm the current configuration.", headerUnavailableRefused: "Cannot read the session configuration. Reconnect and refresh.", headerWaitRetryHint: "Refresh and retry when the session is ready.",
|
|
54
|
+
noSession: "Select a session to change its configuration.",
|
|
55
|
+
sessionUnavailable: "Cannot confirm the current session. Refresh before retrying.",
|
|
56
|
+
sessionBusy: "Cannot switch: {reason}. Wait for the session to be idle, then retry.",
|
|
57
|
+
sessionState: "{profile}", sessionBaseline: "Default configuration",
|
|
58
|
+
sessionGlobalCaptured: "Current configuration (profile unknown)",
|
|
59
|
+
sessionAdmittedProfile: "{id}", sessionFutureDefault: "New-session default configuration: {profile}.",
|
|
60
|
+
sessionConflict: "The session configuration changed elsewhere. Your draft is kept. Refresh before retrying.",
|
|
61
|
+
sessionApply: "Use this profile", sessionApplying: "Applying…", sessionReset: "Use default configuration", sessionResetting: "Restoring default…", sessionRefresh: "Refresh session state",
|
|
62
|
+
sessionApplied: "Applied to this session only. New-session default and existing children stay unchanged.", sessionResetDone: "This session uses default configuration. New-session default stays unchanged.",
|
|
54
63
|
sessionAppliedWithModel: "Applied this session profile and explicitly selected its native main model. Native model-default persistence follows the Models tab; the global profile default was not changed.",
|
|
55
64
|
sessionDirty: "Save or explicitly discard the editor draft before applying a current-session choice.",
|
|
56
65
|
roleState: "Admitted route {route}; strategy {strategy}; retries {retries}; rate-limit failures {failures}; switches {switches}; total delay {delay} ms.",
|
|
57
|
-
catalogTitle: "
|
|
66
|
+
catalogTitle: "Model catalog", catalogHint: "You can enter models that are not listed.",
|
|
58
67
|
catalogUnavailable: "The native catalog is unavailable. Manual provider/model/effort fields and advanced JSONC remain available.", catalogRefresh: "Refresh model catalog", catalogRefreshing: "Refreshing model catalog…", catalogFailure: "Provider catalog unavailable: {name} ({id}).",
|
|
59
68
|
profileLabel: "Profile display label", defaultActive: "Default Deepwork mode", activeHint: "This default does not erase an explicit saved session mode.", enabled: "Enabled", disabled: "Disabled", inherit: "Inherit deployment baseline",
|
|
60
|
-
profileDefaults: "
|
|
61
|
-
strategy: "{name} strategy", inheritStrategy: "Inherit ({value})", startupLock: "
|
|
62
|
-
strategyHint: "
|
|
69
|
+
profileDefaults: "Configuration defaults", roleSelect: "Agent role to edit", rolesUnavailable: "Role list unavailable. Refresh or use the advanced editor.", roleEnabled: "Enabled in application settings", roleDisabled: "Disabled in application settings",
|
|
70
|
+
strategy: "{name} strategy", inheritStrategy: "Inherit ({value})", startupLock: "Keep the starting route", rateFallback: "Switch after repeated rate limits",
|
|
71
|
+
strategyHint: "Model switches require a rate-limit failure with no output. Authentication and quota errors stop the attempt. Leave numbers blank to inherit; zero is explicit.",
|
|
63
72
|
retryField: "{name} {field}", inheritNumber: "Inherit {value}", retryBounds: "Integer {min}–{max}; inherited value {value}.", unknownDefault: "unavailable",
|
|
64
73
|
retryCount: "retry count", initialDelay: "initial delay (ms)", maxDelay: "maximum delay (ms)", totalWait: "total wait budget (ms)", switchThreshold: "rate-limit failures before switch", maxSwitches: "maximum switches",
|
|
65
74
|
primaryMode: "{name} primary route", inheritRoute: "Inherit native/deployment route", configuredRoute: "Configure primary route", primaryName: "{name} primary",
|
|
66
75
|
fallbackMode: "{name} fallback chain", inheritChain: "Inherit deployment fallback chain", configuredChain: "Explicit ordered fallback chain", emptyChain: "Explicitly empty chain: no configured fallback routes.", fallbackName: "{name} fallback {index}", addFallback: "Add fallback for {name}", removeFallback: "Remove {name}", moveUp: "Move up {name}", moveDown: "Move down {name}",
|
|
67
76
|
routeProvider: "{name} provider", routeModel: "{name} model", routeEffort: "{name} exact effort", manualProvider: "{name} manual provider", manualModel: "{name} manual model", manualEffort: "{name} manual exact effort", manual: "Enter manual identifier", manualValue: "Manual / unlisted: {value}", unset: "not set", effortDefault: "Native default (omit exact effort)", effortChangeHint: "Changing a provider/model explicitly clears that route's exact effort. Catalog refresh preserves all configured values; choose an exact effort again if required.",
|
|
68
|
-
advanced: "Advanced JSONC", rawInvalid: "
|
|
77
|
+
advanced: "Advanced JSONC", rawInvalid: "Correct the invalid draft in Advanced JSONC to use these controls. Your draft is kept.", invalidNumber: "Enter a whole number within the limits before saving or changing roles.",
|
|
69
78
|
};
|
|
70
79
|
export const zh = {
|
|
80
|
+
sessionChooseWorkspace: "请先选择工作区创建空白会话,再选择本次配置后发送。",
|
|
81
|
+
sessionSelectionBlock: "正在确认 DSMM 本次会话配置。请等待选择完成,或刷新会话状态。",
|
|
82
|
+
sessionCommittedRefresh: "本次会话配置已保存,请刷新确认,不要再次应用。",
|
|
83
|
+
sessionUnconfirmedRefresh: "本次会话配置结果待确认。请刷新状态后再选择或发送,不要重试更改。",
|
|
84
|
+
technicalDetails: "技术详情",
|
|
71
85
|
diagnosticJsonc: "请修正所示位置的 JSONC 语法。", diagnosticDuplicate: "请删除此位置的重复字段。", diagnosticUnsafe: "不支持不安全对象键,请删除此字段。", diagnosticUnknown: "请删除不支持的字段。私有及安装配置应放在原生部署设置中。", diagnosticDeprecated: "此已退休字段被拒绝,请改用明确的角色调用等级,不自动迁移。", diagnosticType: "请使用声明的字段类型和有界数值。", diagnosticValue: "请选择明确支持的值。允许的输出语言见结构化语言字段。", diagnosticRoute: "请提供完整提供商与模型路由,或非空精确强度覆盖。", diagnosticRequired: "所选 Deepwork 策略要求此角色,不可禁用。", diagnosticCeiling: "具名配置档不能启用超出已捕获启动或部署上限的能力。",
|
|
72
|
-
browseZone: "
|
|
86
|
+
browseZone: "已保存配置", editZone: "编辑配置", savedRevision: "保存版本:{revision}", savedInventory: "配置警告与错误", futurePin: "默认选择版本:{revision}", noEditor: "选择配置或新建配置后编辑。",
|
|
73
87
|
warningMarker: "警告 · 不阻断 · {code} · {field}", blockingMarker: "已阻断 · {code} · {field}", blankLabelWarning: "显示名称为空,使用配置档 ID 显示。原文仍可保存和选择。", diagnosticLocation: "JSONC 第 {line} 行,第 {column} 列。",
|
|
74
|
-
savedWarnings: "
|
|
75
|
-
omitLabel: "使用 ID
|
|
76
|
-
toolTopology: "
|
|
77
|
-
levelName: "
|
|
78
|
-
namedRole: "{name}
|
|
79
|
-
admittedRoles: "
|
|
80
|
-
centralOrigin: "
|
|
88
|
+
savedWarnings: "已保存配置的警告", draftWarnings: "草稿警告", futureWarnings: "新会话默认配置的警告", admissionWarnings: "本次会话的警告", warningProfile: "警告(不阻断)",
|
|
89
|
+
omitLabel: "使用 ID 作为显示名称", businessLocale: "默认输出语言", inheritLocale: "使用部署或原生语言", unsupportedLocale: "语言不受支持,请选择允许值", localeHint: "用户明确要求的语言优先,界面语言不变。",
|
|
90
|
+
toolTopology: "子代理工具", topologyHint: "per-role:每个角色一个工具,另有类别工具。parameterized:通过工具参数选择角色或类别。",
|
|
91
|
+
levelName: "调用等级:{level}", levelMode: "{level} 覆盖", levelUnconfigured: "使用部署等级", levelEffortOnly: "仅推理强度", levelFullRoute: "提供商、模型与强度", normalLevel: "normal · 默认路由", orchestratorLevels: "主 orchestrator 不支持调用等级。", levelsHint: "未配置的等级不可使用。仅强度覆盖保留配置中的模型;完整路由同时替换模型和强度。",
|
|
92
|
+
namedRole: "启用 {name}", namedRoleHint: "必需角色必须保持启用;部署设置禁止的角色无法在此启用。", availabilityUnknown: "角色可用性未知,请刷新后再更改。", roleRequired: "必需角色 · {reason}", roleOptional: "可选角色", roleCeiling: "启动:{startup};部署:{deployment};捕获准入:{admitted}。", roleProvenance: "来源:{source};捕获:{capture}。", roleUnavailableReason: "可用性原因:{reason}。",
|
|
93
|
+
admittedRoles: "角色可用性", bindingUnknown: "子代理就绪状态未知,请刷新确认。", bindingState: "子代理执行就绪:{ready};需重启:{restart}。", bindingReason: "原因:{reason}。", sessionModelHint: "选择配置时保留当前模型;「使用配置中的模型」会明确切换模型。", savedOnlyHint: "选择此配置前请保存更改。",
|
|
94
|
+
centralOrigin: "共享配置存储。", legacyOrigin: "旧配置存储(只读)。", explicitOrigin: "自定义配置存储。", readOnlyOrigin: "这些旧配置只读。",
|
|
81
95
|
headerCompactProfiles: "配置档 · 保留模型", headerCompactRefresh: "刷新", headerNoSession: "选择会话后可更改。",
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
96
|
+
sessionNewRequired: "请新建会话后选择配置。仍可保存配置或设置新会话默认配置。",
|
|
97
|
+
sessionModuleOff: "此会话无法使用 Deepwork。",
|
|
98
|
+
headerModeEnable: "启用 Deepwork", headerModeDisable: "关闭 Deepwork", headerModePreset: "Deepwork · DW 预设", headerModeUnavailable: "Deepwork 不可用", headerModeOn: "Deepwork 已启用。", headerModeOff: "Deepwork 已关闭。", headerUseCurrentModel: "使用配置中的模型",
|
|
99
|
+
title: "Deepwork 配置", description: "保存配置并选择新会话的默认配置。",
|
|
100
|
+
newSessions: "选择已保存的配置供新会话使用,已有会话不变。",
|
|
101
|
+
editorSelect: "要编辑的配置", choose: "选择配置", newDraft: "未保存的新配置", new: "新建配置",
|
|
102
|
+
profileId: "配置 ID", idHint: "1–64 个小写字母、数字、连字符或下划线,保存后不可修改。",
|
|
103
|
+
configuration: "配置内容(JSONC)", configurationHint: "使用 version: 1、与上方一致的 id,以及 settings;label 可填写显示名称。",
|
|
104
|
+
structuralHint: "权限、账户、插件等由应用设置管理。请勿粘贴密码或密钥。",
|
|
105
|
+
save: "保存", saving: "正在保存…", apply: "设为新会话默认配置", applying: "正在设置默认配置…", reset: "使用默认配置", resetting: "正在恢复默认配置…",
|
|
106
|
+
refresh: "刷新配置", refreshing: "正在刷新…", reload: "重新加载已保存配置", loading: "正在加载…", reading: "正在读取…",
|
|
107
|
+
empty: "尚无已保存的配置,请先新建配置。",
|
|
108
|
+
baseline: "默认配置", appliedProfile: "{id}",
|
|
109
|
+
appliedInvalid: "默认选择未确认,请解决下方错误并刷新后再更改。已有会话不变。",
|
|
110
|
+
selectionConflict: "默认选择已在其他位置改变,此宿主仍使用上方选择。请选择已保存的配置或使用默认配置进行更新;重启将采用存储中的选择。",
|
|
111
|
+
dirty: "有未保存的更改,选择此配置前请保存或丢弃。", savedNotApplied: "已保存,此版本尚未设为新会话默认配置。", savedApplied: "已保存,此版本已设为新会话默认配置。",
|
|
112
|
+
versionObserved: "可用", versionAbsent: "未保存", versionUnknown: "未知", savedRelationshipUnknown: "已保存,请刷新确认新会话默认配置。", savedRefreshRequired: "已保存,请重新加载后再编辑或选择。",
|
|
113
|
+
saved: "已保存 {id}。", applied: "新会话将使用 {id},已有会话不变。", resetDone: "新会话将使用默认配置,已有会话不变。",
|
|
97
114
|
discardPrompt: "切换编辑器之前,是否丢弃未保存的草稿?", discard: "丢弃更改", cancel: "取消",
|
|
98
115
|
conflict: "已保存文件或选择已被其他操作修改。草稿和原选择已保留。请刷新配置档,然后重新加载已保存配置档或检查草稿后重试。",
|
|
99
116
|
validation: "此配置档无效。请修正下方字段;草稿未改变。",
|
|
100
|
-
io: "
|
|
101
|
-
unavailable: "
|
|
102
|
-
transport: "
|
|
103
|
-
invalidProfile: "
|
|
104
|
-
globalScope: "
|
|
117
|
+
io: "无法保存。草稿已保留,请检查配置存储权限后重试。",
|
|
118
|
+
unavailable: "配置服务暂不可用。草稿已保留,请重新连接后刷新。",
|
|
119
|
+
transport: "连接中断,操作结果待确认。草稿已保留,请先刷新状态。",
|
|
120
|
+
invalidProfile: "配置不可用:{id}", details: "错误详情", retry: "请处理所示问题,刷新后重试。",
|
|
121
|
+
globalScope: "新会话默认配置", sessionScope: "本次会话配置", sessionSelect: "本次会话配置",
|
|
105
122
|
globalActionHint: "「设为未来默认」只为未来会话选择已保存修订,不应用到当前会话。",
|
|
106
|
-
headerProfile: "
|
|
107
|
-
headerLoading: "
|
|
108
|
-
headerKeepModelGroup: "
|
|
109
|
-
headerModelChoiceChanged: "
|
|
123
|
+
headerProfile: "配置", headerProfileLabel: "本次会话配置", headerCaptured: "当前配置 · 来源未知", headerSavedUnavailable: "已保存的配置不可用", headerCurrentProfile: "本次配置:{profile}", headerRefresh: "刷新配置和会话状态", headerUseModelAction: "使用配置中的模型:{profile}",
|
|
124
|
+
headerLoading: "加载配置…", headerApplying: "应用配置…", headerApplied: "配置已应用。", headerBusy: "会话忙碌。", headerUnavailable: "配置不可用。", headerDraft: "请在设置中保存或丢弃草稿。", headerConflict: "会话配置已在其他位置改变,请刷新后重试。", headerRefused: "配置更改未确认,请检查设置。",
|
|
125
|
+
headerKeepModelGroup: "切换配置,保留当前模型", headerUseModelGroup: "切换配置和模型", headerModelDefaultHint: "使用配置中的模型也会更新默认模型。", headerNoProfileModel: "此配置未指定模型。", headerModelUnconfirmed: "模型更改尚未确认,请检查模型设置。", headerAppliedWithModel: "配置和模型已应用。",
|
|
126
|
+
headerModelChoiceChanged: "已保留你最新选择的模型。",
|
|
127
|
+
headerActionUnavailable: "此操作暂不可用,请刷新确认。",
|
|
110
128
|
headerActivationRefused: "配置档启用被拒绝,请检查其配置和原生模型目录。", headerSelectionRefused: "无法确认配置档更改。", headerIssueCode: "原因:{code}。", headerIssueField: "配置字段:{field}。", headerRetryHint: "请刷新配置档和当前会话状态,在设置或原生模型页解决所示问题,然后在会话空闲时重试。",
|
|
111
|
-
headerMaintenanceRefused: "
|
|
112
|
-
noSession: "
|
|
113
|
-
sessionGlobalCaptured: "
|
|
114
|
-
sessionAdmittedProfile: "{id}
|
|
115
|
-
sessionConflict: "
|
|
116
|
-
sessionApply: "
|
|
129
|
+
headerMaintenanceRefused: "会话正在处理其他操作,请稍后重试。", headerBusyRefused: "会话正在运行,请结束后重试。", headerCancelledRefused: "操作已取消,请刷新以确认当前配置。", headerUnavailableRefused: "无法读取会话配置,请重新连接后刷新。", headerWaitRetryHint: "请稍后刷新并重试。",
|
|
130
|
+
noSession: "选择会话后可更改配置。", sessionUnavailable: "无法确认当前会话,请刷新后重试。", sessionBusy: "暂不可切换:{reason}。请等待会话空闲后重试。", sessionState: "{profile}", sessionBaseline: "默认配置",
|
|
131
|
+
sessionGlobalCaptured: "当前配置(来源未知)",
|
|
132
|
+
sessionAdmittedProfile: "{id}", sessionFutureDefault: "新会话默认配置:{profile}。",
|
|
133
|
+
sessionConflict: "会话配置已在其他位置改变,草稿已保留。请刷新后重试。",
|
|
134
|
+
sessionApply: "使用此配置", sessionApplying: "正在应用…", sessionReset: "使用默认配置", sessionResetting: "正在恢复默认配置…", sessionRefresh: "刷新会话状态", sessionApplied: "已应用到本次会话,新会话默认配置和已有子会话不变。", sessionResetDone: "本次会话已使用默认配置,新会话默认配置不变。", sessionDirty: "选择本次会话配置前,请保存或丢弃草稿。",
|
|
117
135
|
sessionAppliedWithModel: "已应用此会话配置档,并明确选择其原生主模型。模型默认值像模型页一样保存;全局配置档默认值未改变。",
|
|
118
136
|
roleState: "准入路由 {route};策略 {strategy};重试 {retries};限流失败 {failures};切换 {switches};累计延迟 {delay} 毫秒。",
|
|
119
|
-
catalogTitle: "
|
|
120
|
-
profileLabel: "
|
|
121
|
-
strategy: "{name} 策略", inheritStrategy: "继承({value})", startupLock: "
|
|
137
|
+
catalogTitle: "模型目录", catalogHint: "可手动输入目录中未列出的模型。", catalogUnavailable: "模型目录不可用,可手动输入提供商、模型和推理强度。", catalogRefresh: "刷新模型目录", catalogRefreshing: "正在刷新模型目录…", catalogFailure: "提供商目录不可用:{name}({id})。",
|
|
138
|
+
profileLabel: "配置名称", defaultActive: "默认 Deepwork 模式", activeHint: "会话中明确选择的模式优先。", enabled: "启用", disabled: "禁用", inherit: "使用上层设置", profileDefaults: "配置默认值", roleSelect: "要编辑的角色", rolesUnavailable: "角色列表暂不可用,请刷新或使用高级编辑器。", roleEnabled: "应用设置已启用", roleDisabled: "应用设置已禁用",
|
|
139
|
+
strategy: "{name} 策略", inheritStrategy: "继承({value})", startupLock: "保留起始路由", rateFallback: "多次限流后切换", strategyHint: "仅在限流且没有输出时切换模型;认证或配额错误会停止尝试。数字留空表示继承,零为明确值。", retryField: "{name} {field}", inheritNumber: "继承 {value}", retryBounds: "整数 {min}–{max};继承值 {value}。", unknownDefault: "不可用",
|
|
122
140
|
retryCount: "重试次数", initialDelay: "初始延迟(毫秒)", maxDelay: "最大单次延迟(毫秒)", totalWait: "累计等待上限(毫秒)", switchThreshold: "切换前的限流失败次数", maxSwitches: "最大切换次数",
|
|
123
141
|
primaryMode: "{name} 主路由", inheritRoute: "继承原生或部署路由", configuredRoute: "配置主路由", primaryName: "{name} 主路由", fallbackMode: "{name} 备用链", inheritChain: "继承部署备用链", configuredChain: "明确的有序备用链", emptyChain: "明确为空的备用链:没有已配置备用路由。", fallbackName: "{name} 备用 {index}", addFallback: "为 {name} 添加备用路由", removeFallback: "移除 {name}", moveUp: "上移 {name}", moveDown: "下移 {name}",
|
|
124
|
-
routeProvider: "{name} 提供商", routeModel: "{name} 模型", routeEffort: "{name} 精确强度", manualProvider: "{name} 手动提供商", manualModel: "{name} 手动模型", manualEffort: "{name} 手动精确强度", manual: "输入手动标识", manualValue: "手动或未列出:{value}", unset: "未设置", effortDefault: "原生默认值(省略精确强度)", effortChangeHint: "
|
|
142
|
+
routeProvider: "{name} 提供商", routeModel: "{name} 模型", routeEffort: "{name} 精确强度", manualProvider: "{name} 手动提供商", manualModel: "{name} 手动模型", manualEffort: "{name} 手动精确强度", manual: "输入手动标识", manualValue: "手动或未列出:{value}", unset: "未设置", effortDefault: "原生默认值(省略精确强度)", effortChangeHint: "更改提供商或模型会清除该路由的推理强度,需要时请重新选择。", advanced: "高级 JSONC", rawInvalid: "请在高级 JSONC 中修正草稿后使用这些控件,草稿已保留。", invalidNumber: "保存或切换角色前,请输入范围内的整数。",
|
|
125
143
|
};
|
|
126
144
|
export const RETRY_FIELD_LABEL_KEYS = {
|
|
127
145
|
maxRetries: "retryCount", initialDelayMs: "initialDelay", maxDelayMs: "maxDelay",
|
|
@@ -51,6 +51,7 @@ export declare class PermissionController {
|
|
|
51
51
|
private schedule;
|
|
52
52
|
private issue;
|
|
53
53
|
private synchronized;
|
|
54
|
+
canEdit(generation: number): boolean;
|
|
54
55
|
canSave(generation: number): boolean;
|
|
55
56
|
refresh(generation: number, discard?: boolean): Promise<void>;
|
|
56
57
|
edit(generation: number, patch: Partial<PermissionDraft>): void;
|
|
@@ -76,7 +76,8 @@ export class PermissionController {
|
|
|
76
76
|
const value = this.state.rules;
|
|
77
77
|
return value !== null && value.runtime.state === "synced" && value.runtime.savedRevision === value.snapshot.revision && value.runtime.runtimeRevision === value.snapshot.revision;
|
|
78
78
|
}
|
|
79
|
-
|
|
79
|
+
canEdit(generation) { return this.live(generation) && this.state.rulesIssue === null && this.synchronized() && this.state.busy === null; }
|
|
80
|
+
canSave(generation) { return this.canEdit(generation) && !this.state.reading && this.state.dirty && this.state.draft?.editor === null; }
|
|
80
81
|
async refresh(generation, discard = false) {
|
|
81
82
|
if (!this.live(generation) || this.state.reading || this.state.busy !== null)
|
|
82
83
|
return;
|
|
@@ -98,7 +99,7 @@ export class PermissionController {
|
|
|
98
99
|
this.schedule();
|
|
99
100
|
}
|
|
100
101
|
edit(generation, patch) {
|
|
101
|
-
if (this.
|
|
102
|
+
if (!this.canEdit(generation) || this.state.draft === null)
|
|
102
103
|
return;
|
|
103
104
|
const draft = { ...this.state.draft, ...patch };
|
|
104
105
|
this.publish({ draft, notice: null });
|
|
@@ -1,5 +1,31 @@
|
|
|
1
1
|
export declare const PERMISSIONS_NS = "settings.dsmm-permissions";
|
|
2
2
|
export declare const permissionEn: {
|
|
3
|
+
childPermissions: string;
|
|
4
|
+
childEnable: string;
|
|
5
|
+
childRevoke: string;
|
|
6
|
+
childPermissionBoundary: string;
|
|
7
|
+
childUnavailable: string;
|
|
8
|
+
childNoPending: string;
|
|
9
|
+
childEnabled: string;
|
|
10
|
+
childDisabled: string;
|
|
11
|
+
childUnconfirmed: string;
|
|
12
|
+
childProject: string;
|
|
13
|
+
childRole: string;
|
|
14
|
+
childReadOnly: string;
|
|
15
|
+
temporaryChildSession: string;
|
|
16
|
+
temporaryWebBoundary: string;
|
|
17
|
+
temporaryTitle: string;
|
|
18
|
+
temporaryDuration: string;
|
|
19
|
+
temporaryApprove: string;
|
|
20
|
+
temporaryRevoke: string;
|
|
21
|
+
temporaryRefresh: string;
|
|
22
|
+
temporaryEmpty: string;
|
|
23
|
+
"temporary:once": string;
|
|
24
|
+
"temporary:session": string;
|
|
25
|
+
"temporary:15min": string;
|
|
26
|
+
"temporary:1h": string;
|
|
27
|
+
temporaryBoundary: string;
|
|
28
|
+
temporaryUnavailable: string;
|
|
3
29
|
title: string;
|
|
4
30
|
rules: string;
|
|
5
31
|
nativeApproval: string;
|
|
@@ -34,6 +60,31 @@ export declare const permissionEn: {
|
|
|
34
60
|
tree: string;
|
|
35
61
|
networkLimit: string;
|
|
36
62
|
rulesHint: string;
|
|
63
|
+
configPolicyHint: string;
|
|
64
|
+
configRulesHint: string;
|
|
65
|
+
coldHint: string;
|
|
66
|
+
nativeCommands: string;
|
|
67
|
+
nativeCommandsHint: string;
|
|
68
|
+
registrationUnresolved: string;
|
|
69
|
+
entryId: string;
|
|
70
|
+
tool: string;
|
|
71
|
+
nativeExecutable: string;
|
|
72
|
+
subcommand: string;
|
|
73
|
+
args: string;
|
|
74
|
+
sandboxMode: string;
|
|
75
|
+
mode: string;
|
|
76
|
+
addEntry: string;
|
|
77
|
+
removeEntry: string;
|
|
78
|
+
noEntries: string;
|
|
79
|
+
unset: string;
|
|
80
|
+
inheritedEntries: string;
|
|
81
|
+
explicitEntries: string;
|
|
82
|
+
invalidEntry: string;
|
|
83
|
+
rulesUnavailable: string;
|
|
84
|
+
invalidArgsHint: string;
|
|
85
|
+
observedPolicy: string;
|
|
86
|
+
profileOverrideState: string;
|
|
87
|
+
profileOverrideUnknown: string;
|
|
37
88
|
matchHint: string;
|
|
38
89
|
source: string;
|
|
39
90
|
recordVersion: string;
|
|
@@ -1,22 +1,42 @@
|
|
|
1
1
|
export const PERMISSIONS_NS = "settings.dsmm-permissions";
|
|
2
2
|
export const permissionEn = {
|
|
3
|
+
childPermissions: "Permissions", childEnable: "Allow this child to ask me for approval", childRevoke: "Revoke child approvals",
|
|
4
|
+
childPermissionBoundary: "Future approvals for this live child only. Root grants, siblings and future children are unchanged. Role and sandbox limits remain. Revocation does not cancel an already pending native request or replay work.",
|
|
5
|
+
childUnavailable: "Verified live ownership, policy or approval route is unavailable. Refresh; retired children cannot be revived here.",
|
|
6
|
+
childNoPending: "No native approval is pending for this child.", childEnabled: "This child may request approval.", childDisabled: "Interactive approval is off for this child.",
|
|
7
|
+
childUnconfirmed: "The child permission result is unavailable or unconfirmed. Refresh before retrying.", childProject: "Project", childRole: "Role ceiling", childReadOnly: "Read-only",
|
|
8
|
+
temporaryChildSession: "This child task", temporaryWebBoundary: "Exact scheme, host and port for native Web Fetch only; no subdomains, shell sockets, search, model or MCP access. Existing redirect, DNS, proxy and Fake-IP restrictions remain. A proxy path does not provide local DNS proof.",
|
|
9
|
+
temporaryTitle: "Temporary approvals", temporaryDuration: "Approval duration", temporaryApprove: "Approve", temporaryRevoke: "Revoke", temporaryRefresh: "Refresh", temporaryEmpty: "No active temporary approvals.",
|
|
10
|
+
"temporary:once": "Once only", "temporary:session": "This session", "temporary:15min": "15 minutes", "temporary:1h": "1 hour",
|
|
11
|
+
temporaryBoundary: "Selected tool scope in this live session only; no child inheritance or sandbox upgrade. Revocation stops future handoffs, not effects already started. File scopes do not confine shell processes or guarantee final-inode/hardlink isolation.",
|
|
12
|
+
temporaryUnavailable: "Temporary approval is unavailable or unconfirmed. Refresh, or use the native once-only prompt. No operation is replayed.",
|
|
3
13
|
title: "Permission control", rules: "Global permission rules",
|
|
4
|
-
nativeApproval: "
|
|
5
|
-
root: "Selected
|
|
6
|
-
child: "
|
|
14
|
+
nativeApproval: "Approve commands in the native prompt. Allow approves only that call.",
|
|
15
|
+
root: "Selected main session", noRoot: "Select a main session to view its permission rules.",
|
|
16
|
+
child: "Select this child’s main session to edit Global rules.",
|
|
7
17
|
unknown: "Unavailable / unknown", reading: "Reading…", busy: "Operation pending…",
|
|
8
18
|
executable: "Native Shell registration identity (exact)", command: "Full command (exact)", cwd: "Working directory (exact)", id: "Rule ID", action: "Rule action", match: "Match kind",
|
|
9
19
|
outsideReads: "Outside-workspace reads", webSearch: "Web search", webFetch: "Web fetch", enabled: "Enabled", rule: "Coarse rule",
|
|
10
20
|
inherit: "Inherit native policy", "action:allow": "Allow", "action:ask": "Ask", "action:deny": "Deny",
|
|
11
21
|
"kind:outside-read": "Outside-workspace read", "kind:shell": "Shell operation", "kind:webSearch": "Web search", "kind:webFetch": "Web fetch",
|
|
12
22
|
path: "Canonical path", pathScope: "Path match", exact: "Exact path", tree: "Path and descendants",
|
|
13
|
-
networkLimit: "
|
|
14
|
-
rulesHint: "
|
|
15
|
-
|
|
23
|
+
networkLimit: "Web rules cover public web tools only. Private networks, shell commands and sockets remain outside this permission.",
|
|
24
|
+
rulesHint: "Saves Global rules for the selected main session. If profile overrides block saving, edit or clear them in the profile scope above, then refresh.",
|
|
25
|
+
configPolicyHint: "Profile settings override Global settings. Arrays replace inherited lists. Refresh session permissions after saving to check what is effective.",
|
|
26
|
+
configRulesHint: "Edit existing records or imported rules with valid provenance. Use the session rules editor for verified approvals. An empty array clears inherited records.",
|
|
27
|
+
coldHint: "Changing this switch requires a Host restart. Current protection stays active until then. Restart may cancel sessions.",
|
|
28
|
+
nativeCommands: "Exact command rules", nativeCommandsHint: "Default Off. Match the tool, executable, subcommand, ordered arguments, directory and sandbox exactly. No wildcards. Other approval, denial and read-only restrictions still apply. New entries ask for approval and use workspace-write.",
|
|
29
|
+
registrationUnresolved: "Executor identity is unconfirmed. Verify the tool, executable, environment and sandbox before entering exact values.",
|
|
30
|
+
entryId: "Entry ID", tool: "Tool (exact)", nativeExecutable: "Executable (exact)", subcommand: "Subcommand (optional; blank omits)", args: "Ordered arguments (JSON string array)", sandboxMode: "Sandbox mode (exact)", mode: "Native action", addEntry: "Add exact entry", removeEntry: "Remove entry", noEntries: "No exact command entries.", unset: "Unset — restore inheritance", inheritedEntries: "Inherited entries; editing pins a replacement array in this layer.", explicitEntries: "Explicit replacement array in this layer.", invalidEntry: "Invalid exact entry: use unique nonblank IDs, exact nonblank strings, an absolute Host working directory, and a JSON string array. Draft retained; Save locked.",
|
|
31
|
+
rulesUnavailable: "Editing requires an open main session, local editing permission and synchronized rules. Check profile overrides, reconnect and refresh.",
|
|
32
|
+
invalidArgsHint: "Correct invalid argument JSON before removing rows, or explicitly Unset this entire array to restore inheritance. Other fields do not discard invalid text.",
|
|
33
|
+
observedPolicy: "Effective policy (including profile overrides)",
|
|
34
|
+
profileOverrideState: "Profile overrides", profileOverrideUnknown: "Unknown. Choose Current DSH profile above to inspect overrides.",
|
|
35
|
+
matchHint: "Match an exact path or directory tree, an exact shell tool/command/directory, or a web tool. Allow does not grant outside-workspace writes. Rules stay active until revoked.",
|
|
16
36
|
source: "Actual source", recordVersion: "Record version", savedAt: "Saved at", operator: "Verified Host operator", imported: "User import", active: "Active record", revoked: "Revoked record",
|
|
17
|
-
base: "Draft
|
|
37
|
+
base: "Draft version", savedRevision: "Saved version", runtimeRevision: "Effective version", runtime: "Rule synchronization", synced: "Synced", updating: "Updating", unsynced: "Unsynced — saving unavailable",
|
|
18
38
|
mounted: "Startup mounted", on: "On", off: "Off", restart: "Independent restart required",
|
|
19
|
-
coverageTitle: "
|
|
39
|
+
coverageTitle: "Tool coverage", coverage: "Last observed for this main session. Executor readiness and network access must be checked separately.",
|
|
20
40
|
coverageUnavailable: "Coverage unavailable / unknown. No trusted live observation was returned.", coverageEmpty: "No trusted tool registrations observed for this Root.",
|
|
21
41
|
coverageRuntime: "Observed consumer state", coverageRevision: "Observed consumer runtime source", toolName: "Observed tool name", toolKind: "Trusted registration kind",
|
|
22
42
|
toolApproval: "Approval boundary", nativeOnce: "Native prompt — once only", toolMemory: "Scoped approval memory", notProvided: "Not provided",
|
|
@@ -25,9 +45,9 @@ export const permissionEn = {
|
|
|
25
45
|
"limit:scopedMemory": "Not provided by native rules.", "limit:webFetch": "Native public-address checks remain authoritative; private-network access is not granted.",
|
|
26
46
|
"limit:webSearchDestinations": "Unsupported.", "limit:proxyAddressBinding": "Depends on the native proxy; no stronger address-binding guarantee.",
|
|
27
47
|
"limit:shellSockets": "Depends on the native executor; no all-Shell or socket firewall.", "limit:providerAuthMcp": "Not covered by these rules.",
|
|
28
|
-
pathEvidence: "
|
|
48
|
+
pathEvidence: "Read checks its active filesystem. Search and shell path checks depend on the executor. Final-file identity, full filesystem confinement and socket isolation are not guaranteed.",
|
|
29
49
|
newRule: "Add exact-match rule", editRule: "Edit rule", stage: "Stage rule", cancel: "Cancel rule edit", stageRevoke: "Stage revocation", unstage: "Remove staged change",
|
|
30
|
-
editor: "Rule draft", staged: "
|
|
50
|
+
editor: "Rule draft", staged: "Unsaved rule changes", noRules: "No saved rules.", save: "Save", discard: "Discard draft and reload", dirty: "Unsaved rules draft", saved: "Rules saved. Check synchronization below.",
|
|
31
51
|
"issue:not-owned": "Root/operator/readonly authority refused. Select the intended Root and refresh.",
|
|
32
52
|
"issue:stale": "Source conflict. Draft retained. Review, then explicitly discard and reload.",
|
|
33
53
|
"issue:cancelled": "Operation cancelled; refresh actual saved state.",
|
|
@@ -40,22 +60,42 @@ export const permissionEn = {
|
|
|
40
60
|
"issue:protocol": "Untrusted or mismatched service response. Refresh or reconnect.",
|
|
41
61
|
};
|
|
42
62
|
export const permissionZh = {
|
|
63
|
+
childPermissions: "权限", childEnable: "允许此子任务向我请求批准", childRevoke: "撤销子任务批准",
|
|
64
|
+
childPermissionBoundary: "仅影响此 live 子任务的后续审批,不继承 Root 批准,不影响同级或未来子任务。角色与沙箱上限不变。撤销不取消已经 pending 的原生请求,也不重放任务。",
|
|
65
|
+
childUnavailable: "可信 live ownership、策略或审批入口不可用。请刷新;这里不能复活已结束的子任务。",
|
|
66
|
+
childNoPending: "此子任务当前没有原生待审批请求。", childEnabled: "此子任务可请求批准。", childDisabled: "此子任务的交互审批已关闭。",
|
|
67
|
+
childUnconfirmed: "子任务权限结果不可用或待确认。请刷新后再重试。", childProject: "项目", childRole: "角色上限", childReadOnly: "只读",
|
|
68
|
+
temporaryChildSession: "本次子任务", temporaryWebBoundary: "仅限原生 Web Fetch 的精确 scheme、主机与端口,不含子域、Shell socket、搜索、模型或 MCP。原有重定向、DNS、代理和 Fake-IP 限制保留;代理路径不提供本地 DNS 证明。",
|
|
69
|
+
temporaryTitle: "临时批准", temporaryDuration: "批准时长", temporaryApprove: "批准", temporaryRevoke: "撤销", temporaryRefresh: "刷新", temporaryEmpty: "没有生效中的临时批准。",
|
|
70
|
+
"temporary:once": "仅本次", "temporary:session": "本次会话", "temporary:15min": "15 分钟", "temporary:1h": "1 小时",
|
|
71
|
+
temporaryBoundary: "仅限当前 live 会话的所选工具范围,不传给子任务、不提升沙箱。撤销阻止后续交接,不回滚已经开始的效果。文件范围不约束 Shell 进程,也不保证最终 inode/hardlink 隔离。",
|
|
72
|
+
temporaryUnavailable: "临时批准不可用或结果待确认。请刷新,或使用原生仅本次审批;不会自动重放操作。",
|
|
43
73
|
title: "权限控制", rules: "全局权限规则",
|
|
44
|
-
nativeApproval: "
|
|
45
|
-
root: "
|
|
74
|
+
nativeApproval: "请在原生提示中批准命令;「允许」仅批准本次调用。",
|
|
75
|
+
root: "所选主会话", noRoot: "请选择主会话以查看权限规则。", child: "请切换到此子会话的主会话后编辑全局规则。",
|
|
46
76
|
unknown: "不可用/未知", reading: "正在读取…", busy: "操作处理中…",
|
|
47
77
|
executable: "原生 Shell 注册身份(精确匹配)", command: "完整命令(精确匹配)", cwd: "工作目录(精确匹配)", id: "规则 ID", action: "规则动作", match: "匹配类型",
|
|
48
78
|
outsideReads: "工作区外读取", webSearch: "网页搜索", webFetch: "网页抓取", enabled: "启用", rule: "粗粒度规则",
|
|
49
79
|
inherit: "继承原生策略", "action:allow": "允许", "action:ask": "询问", "action:deny": "拒绝",
|
|
50
80
|
"kind:outside-read": "工作区外读取", "kind:shell": "Shell 操作", "kind:webSearch": "网页搜索", "kind:webFetch": "网页抓取",
|
|
51
81
|
path: "规范路径", pathScope: "路径匹配", exact: "精确路径", tree: "此路径及子树",
|
|
52
|
-
networkLimit: "
|
|
53
|
-
rulesHint: "
|
|
54
|
-
|
|
82
|
+
networkLimit: "网页规则仅覆盖公共网页工具,不包含私网、Shell 命令或 socket 权限。",
|
|
83
|
+
rulesHint: "为所选主会话保存全局规则。若配置覆盖阻止保存,请在上方当前配置范围内编辑或清除覆盖,再刷新。",
|
|
84
|
+
configPolicyHint: "当前配置优先于全局配置,数组整体替换继承列表。保存后请刷新会话权限以检查实际生效状态。",
|
|
85
|
+
configRulesHint: "可编辑已有记录或带合法来源的导入规则。经核验的批准请使用会话规则编辑器。空数组会清除继承的记录。",
|
|
86
|
+
coldHint: "更改此开关需重启宿主,此前保留当前保护。重启可能取消会话。",
|
|
87
|
+
nativeCommands: "精确命令规则", nativeCommandsHint: "默认关闭。精确匹配工具、可执行程序、子命令、有序参数、目录和沙箱,不支持通配符。其他审批、拒绝和只读限制仍有效。新条目使用询问与 workspace-write。",
|
|
88
|
+
registrationUnresolved: "执行器身份尚未确认,请核验工具、可执行程序、环境和沙箱后再填写精确值。",
|
|
89
|
+
entryId: "条目 ID", tool: "工具(精确)", nativeExecutable: "可执行程序(精确)", subcommand: "子命令(可选,留空省略)", args: "有序参数(JSON 字符串数组)", sandboxMode: "沙箱模式(精确)", mode: "原生动作", addEntry: "添加精确条目", removeEntry: "移除条目", noEntries: "没有精确命令条目。", unset: "Unset——恢复继承", inheritedEntries: "继承的条目;编辑后在此层固定为整体替换数组。", explicitEntries: "此层显式整体替换数组。", invalidEntry: "精确条目无效:ID 需唯一且非空,精确字符串不可空,工作目录为宿主绝对路径,参数为 JSON 字符串数组。草稿保留,保存已锁定。",
|
|
90
|
+
rulesUnavailable: "编辑需要已打开的主会话、本地编辑权限和已同步的规则。请检查配置覆盖,重连后刷新。",
|
|
91
|
+
invalidArgsHint: "请修正无效参数 JSON 后再移除条目;也可显式 Unset 整个数组以恢复继承。修改其他字段不会丢弃无效文本。",
|
|
92
|
+
observedPolicy: "有效策略(含当前配置覆盖)",
|
|
93
|
+
profileOverrideState: "配置覆盖", profileOverrideUnknown: "未知,请在上方选择当前 DSH 配置查看覆盖值。",
|
|
94
|
+
matchHint: "可匹配精确路径或目录树、精确 Shell 工具与命令及目录,或网页工具。允许不授予工作区外写入权限。规则保留至撤销。",
|
|
55
95
|
source: "实际来源", recordVersion: "记录版本", savedAt: "保存时间", operator: "宿主已核验 operator", imported: "用户导入", active: "有效记录", revoked: "已撤销记录",
|
|
56
|
-
base: "
|
|
96
|
+
base: "草稿版本", savedRevision: "保存版本", runtimeRevision: "生效版本", runtime: "规则同步", synced: "已同步", updating: "同步中", unsynced: "未同步——暂不可保存",
|
|
57
97
|
mounted: "启动时已挂载", on: "开启", off: "关闭", restart: "需要另行重启",
|
|
58
|
-
coverageTitle: "
|
|
98
|
+
coverageTitle: "工具覆盖范围", coverage: "所选主会话最近观测的覆盖范围,执行器就绪和网络访问需另行检查。",
|
|
59
99
|
coverageUnavailable: "覆盖不可用/未知:未返回可信的实时观测。", coverageEmpty: "未观测到此 Root 的可信工具注册。",
|
|
60
100
|
coverageRuntime: "已观测 consumer 状态", coverageRevision: "已观测 consumer 运行时来源", toolName: "已观测工具名称", toolKind: "可信注册类型",
|
|
61
101
|
toolApproval: "批准边界", nativeOnce: "原生提示——仅本次", toolMemory: "作用域批准记忆", notProvided: "不提供",
|
|
@@ -64,9 +104,9 @@ export const permissionZh = {
|
|
|
64
104
|
"limit:scopedMemory": "原生规则不提供。", "limit:webFetch": "仍以原生 public-address 检查为准,不授予私网访问。",
|
|
65
105
|
"limit:webSearchDestinations": "不支持。", "limit:proxyAddressBinding": "依赖原生代理,不提供更强的地址绑定保证。",
|
|
66
106
|
"limit:shellSockets": "依赖原生执行器,不是全部 Shell 或 socket 的防火墙。", "limit:providerAuthMcp": "不在这些规则覆盖范围。",
|
|
67
|
-
pathEvidence: "
|
|
107
|
+
pathEvidence: "读取检查当前文件系统;搜索和 Shell 的路径检查取决于执行器。不保证最终文件身份、完整文件系统或 socket 隔离。",
|
|
68
108
|
newRule: "添加精确匹配规则", editRule: "编辑规则", stage: "暂存规则", cancel: "取消规则编辑", stageRevoke: "暂存撤销", unstage: "移除暂存更改",
|
|
69
|
-
editor: "规则草稿", staged: "
|
|
109
|
+
editor: "规则草稿", staged: "未保存的规则更改", noRules: "尚无已保存规则。", save: "保存", discard: "丢弃草稿并重载", dirty: "规则草稿未保存", saved: "规则已保存,请核对下方同步状态。",
|
|
70
110
|
"issue:not-owned": "Root/operator/只读权限拒绝,请选择目标 Root 后刷新。", "issue:stale": "来源冲突,草稿保留;核对后显式丢弃并重载。", "issue:cancelled": "操作已取消,请刷新实际保存状态。",
|
|
71
111
|
"issue:unavailable": "服务或运行时不可用,草稿保留;已保存与运行时可能不同。", "issue:validation": "宿主拒绝规则,草稿保留;请核对精确字段与原生覆盖。", "issue:not-found": "规则已不存在。",
|
|
72
112
|
"issue:scope-unavailable": "所请求的操作不可用。", "issue:replayed": "操作已不再有效。", "issue:denied": "当前 Root 策略拒绝操作,没有本地绕过入口。",
|