@dsmm/dsmm 0.2.0 → 0.2.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 +38 -66
- package/agent-presets/dsmm-builder/agent.cordis.yml +10 -2015
- package/agent-presets/dsmm-clarifier/agent.cordis.yml +24 -343
- package/agent-presets/dsmm-code-search/agent.cordis.yml +19 -6
- package/agent-presets/dsmm-coding/agent.cordis.yml +19 -438
- package/agent-presets/dsmm-complex/agent.cordis.yml +23 -1009
- package/agent-presets/dsmm-creative/agent.cordis.yml +25 -442
- package/agent-presets/dsmm-cross-cutting/agent.cordis.yml +29 -1013
- package/agent-presets/dsmm-deep/agent.cordis.yml +24 -1008
- package/agent-presets/dsmm-doc-search/agent.cordis.yml +19 -6
- package/agent-presets/dsmm-documenting/agent.cordis.yml +26 -439
- package/agent-presets/dsmm-frontend/agent.cordis.yml +21 -440
- package/agent-presets/dsmm-hard-reasoning/agent.cordis.yml +22 -441
- package/agent-presets/dsmm-media-reader/agent.cordis.yml +19 -6
- package/agent-presets/dsmm-normal-task/agent.cordis.yml +19 -438
- package/agent-presets/dsmm-oracle/agent.cordis.yml +25 -340
- package/agent-presets/dsmm-oracle-2nd/agent.cordis.yml +25 -340
- package/agent-presets/dsmm-orchestrator/agent.cordis.yml +29 -2025
- package/agent-presets/dsmm-plan-critic/agent.cordis.yml +24 -341
- package/agent-presets/dsmm-planner/agent.cordis.yml +14 -344
- package/agent-presets/dsmm-quick/agent.cordis.yml +19 -6
- package/agent-presets/dsmm-research/agent.cordis.yml +23 -8
- package/agent-presets/dsmm-reviewer/agent.cordis.yml +25 -340
- package/docs/agent-presets.md +36 -52
- package/docs/compatibility.md +50 -108
- package/docs/deferred-native-approval-risk.md +19 -0
- package/docs/design.md +2 -2
- package/docs/lsp.md +11 -21
- package/docs/migration-from-ocmm.md +2 -2
- package/docs/model-routing.md +84 -59
- package/docs/native-permissions.md +35 -0
- package/docs/profiles.md +40 -87
- package/docs/releasing.md +83 -2
- package/docs/roadmap.md +71 -17
- package/docs/settings-status.md +34 -169
- package/docs/skill-sync.md +52 -15
- package/lib/child-admission-contract.d.ts +37 -0
- package/lib/child-admission-contract.js +2 -0
- package/lib/child-admission.d.ts +42 -0
- package/lib/child-admission.js +162 -0
- package/lib/child-capture.d.ts +81 -0
- package/lib/child-capture.js +203 -0
- package/lib/child-evidence.d.ts +17 -0
- package/lib/child-evidence.js +43 -0
- package/lib/client/ChildrenPanel.d.ts +43 -0
- package/lib/client/ChildrenPanel.js +82 -0
- package/lib/client/DeploymentPage.js +15 -8
- package/lib/client/EditableChoice.d.ts +17 -0
- package/lib/client/EditableChoice.js +49 -0
- package/lib/client/PermissionsPanel.d.ts +14 -0
- package/lib/client/PermissionsPanel.js +46 -0
- package/lib/client/ProfilesSection.js +30 -15
- package/lib/client/RoleAvailability.d.ts +7 -0
- package/lib/client/RoleAvailability.js +19 -0
- package/lib/client/SessionProfiles.js +27 -9
- package/lib/client/StructuredEditor.js +15 -7
- package/lib/client/children-controller.d.ts +98 -0
- package/lib/client/children-controller.js +296 -0
- package/lib/client/children-locales.d.ts +367 -0
- package/lib/client/children-locales.js +69 -0
- package/lib/client/controller.d.ts +6 -1
- package/lib/client/controller.js +14 -8
- package/lib/client/deployment-data.d.ts +2 -1
- package/lib/client/deployment-data.js +34 -5
- package/lib/client/deployment-locales.d.ts +4 -0
- package/lib/client/deployment-locales.js +11 -2
- package/lib/client/diagnostics.d.ts +14 -0
- package/lib/client/diagnostics.js +53 -0
- package/lib/client/index.d.ts +4 -0
- package/lib/client/index.js +96 -2
- package/lib/client/locales.d.ts +54 -0
- package/lib/client/locales.js +34 -16
- package/lib/client/permission-client.d.ts +16 -0
- package/lib/client/permission-client.js +38 -0
- package/lib/client/permission-controller.d.ts +62 -0
- package/lib/client/permission-controller.js +149 -0
- package/lib/client/permission-locales.d.ts +114 -0
- package/lib/client/permission-locales.js +75 -0
- package/lib/client/session-labels.js +4 -4
- package/lib/client/structured.js +19 -5
- package/lib/client/styles.d.ts +1 -1
- package/lib/client/styles.js +20 -0
- package/lib/client.js +5780 -1679
- package/lib/core-permission-authority.d.ts +18 -0
- package/lib/core-permission-authority.js +255 -0
- package/lib/core-permissions.d.ts +8 -0
- package/lib/core-permissions.js +33 -0
- package/lib/delivery-authority.d.ts +68 -0
- package/lib/delivery-authority.js +260 -0
- package/lib/deployment-config.d.ts +23 -0
- package/lib/deployment-config.js +61 -40
- package/lib/deployment-permission-rules.d.ts +55 -0
- package/lib/deployment-permission-rules.js +306 -0
- package/lib/dsh-types.d.ts +10 -4
- package/lib/guards.d.ts +1 -1
- package/lib/guards.js +29 -8
- package/lib/host-llm-startup.d.ts +41 -0
- package/lib/host-llm-startup.js +65 -0
- package/lib/host-llm.d.ts +92 -0
- package/lib/host-llm.js +325 -0
- package/lib/index.d.ts +15 -4
- package/lib/index.js +300 -47
- package/lib/legacy-child-policy.d.ts +51 -0
- package/lib/legacy-child-policy.js +123 -0
- package/lib/legacy-read-composition.d.ts +20 -0
- package/lib/legacy-read-composition.js +144 -0
- package/lib/legacy-read-contracts.d.ts +157 -0
- package/lib/legacy-read-contracts.js +39 -0
- package/lib/legacy-read-host.d.ts +19 -0
- package/lib/legacy-read-host.js +67 -0
- package/lib/legacy-read-integration.d.ts +121 -0
- package/lib/legacy-read-integration.js +522 -0
- package/lib/legacy-read-proxy.d.ts +26 -0
- package/lib/legacy-read-proxy.js +237 -0
- package/lib/live-pi-ai-owner.d.ts +18 -0
- package/lib/live-pi-ai-owner.js +144 -0
- package/lib/llm-runtime.d.ts +11 -0
- package/lib/llm-runtime.js +21 -0
- package/lib/managed-settings.d.ts +5 -0
- package/lib/managed-settings.js +14 -0
- package/lib/model-parameter-policy.d.ts +11 -0
- package/lib/model-parameter-policy.js +27 -0
- package/lib/model-routing.js +28 -17
- package/lib/modules.d.ts +13 -5
- package/lib/modules.js +17 -1
- package/lib/native-child-evidence.d.ts +42 -0
- package/lib/native-child-evidence.js +133 -0
- package/lib/native-pi-ai-wire.d.ts +37 -0
- package/lib/native-pi-ai-wire.js +261 -0
- package/lib/native-scope.js +1 -1
- package/lib/permission-bash.d.ts +6 -0
- package/lib/permission-bash.js +7 -0
- package/lib/permission-control.d.ts +73 -0
- package/lib/permission-control.js +205 -0
- package/lib/permission-controller.d.ts +68 -0
- package/lib/permission-controller.js +317 -0
- package/lib/permission-errors.d.ts +7 -0
- package/lib/permission-errors.js +21 -0
- package/lib/permission-fs-search.d.ts +5 -0
- package/lib/permission-fs-search.js +7 -0
- package/lib/permission-fs.d.ts +5 -0
- package/lib/permission-fs.js +7 -0
- package/lib/permission-native-access.d.ts +11 -0
- package/lib/permission-native-access.js +6 -0
- package/lib/permission-native-command.d.ts +10 -0
- package/lib/permission-native-command.js +93 -0
- package/lib/permission-native-rules.d.ts +75 -0
- package/lib/permission-native-rules.js +278 -0
- package/lib/permission-pwsh.d.ts +6 -0
- package/lib/permission-pwsh.js +7 -0
- package/lib/permission-remote.d.ts +26 -0
- package/lib/permission-remote.js +53 -0
- package/lib/permission-rpc.d.ts +29 -0
- package/lib/permission-rpc.js +152 -0
- package/lib/permission-rules.d.ts +115 -0
- package/lib/permission-rules.js +256 -0
- package/lib/permission-settings.d.ts +45 -0
- package/lib/permission-settings.js +48 -0
- package/lib/permission-shell.d.ts +38 -0
- package/lib/permission-shell.js +150 -0
- package/lib/permission-web.d.ts +5 -0
- package/lib/permission-web.js +7 -0
- package/lib/preset-registry.js +36 -25
- package/lib/profile-diagnostics.d.ts +45 -0
- package/lib/profile-diagnostics.js +148 -0
- package/lib/profile-locale.d.ts +3 -0
- package/lib/profile-locale.js +2 -0
- package/lib/profile-remote.d.ts +8 -0
- package/lib/profile-remote.js +163 -39
- package/lib/profile-rpc.d.ts +4 -3
- package/lib/profile-rpc.js +14 -12
- package/lib/profile-runtime.d.ts +40 -1
- package/lib/profile-runtime.js +368 -93
- package/lib/profile-store.d.ts +11 -0
- package/lib/profile-store.js +143 -11
- package/lib/profile-types.d.ts +70 -1
- package/lib/profile-types.js +1 -0
- package/lib/profiles.d.ts +16 -2
- package/lib/profiles.js +156 -79
- package/lib/prompt-content.js +1 -1
- package/lib/prompts.d.ts +37 -2
- package/lib/prompts.js +111 -9
- package/lib/recovery-policy.js +20 -7
- package/lib/role-control-remote.d.ts +38 -0
- package/lib/role-control-remote.js +211 -0
- package/lib/role-control-rpc.d.ts +51 -0
- package/lib/role-control-rpc.js +377 -0
- package/lib/role-control-types.d.ts +92 -0
- package/lib/role-control-types.js +8 -0
- package/lib/role-invocation.d.ts +47 -0
- package/lib/role-invocation.js +135 -0
- package/lib/role-llm-runtime.d.ts +17 -0
- package/lib/role-llm-runtime.js +62 -0
- package/lib/role-llm.d.ts +31 -0
- package/lib/role-llm.js +66 -0
- package/lib/role-policy.d.ts +49 -8
- package/lib/role-policy.js +437 -60
- package/lib/role-providers.d.ts +1 -1
- package/lib/role-providers.js +30 -35
- package/lib/role-routing.d.ts +11 -2
- package/lib/role-routing.js +42 -25
- package/lib/role-runs.d.ts +135 -0
- package/lib/role-runs.js +304 -0
- package/lib/role-subagents.d.ts +58 -3
- package/lib/role-subagents.js +169 -56
- package/lib/roles.d.ts +5 -6
- package/lib/roles.js +10 -39
- package/lib/route-json.d.ts +19 -0
- package/lib/route-json.js +129 -0
- package/lib/routing-policy.d.ts +2 -0
- package/lib/routing-policy.js +12 -2
- package/lib/runtime-integration.d.ts +112 -0
- package/lib/runtime-integration.js +784 -0
- package/lib/runtime-recovery.js +18 -8
- package/lib/settings.d.ts +47 -13
- package/lib/settings.js +217 -82
- package/lib/skills.js +2 -2
- package/lib/status.d.ts +10 -1
- package/lib/status.js +11 -8
- package/lib/subagent-runtime.d.ts +45 -0
- package/lib/subagent-runtime.js +131 -0
- package/package.json +106 -56
- package/patches/subagent-runtime.yml +15 -0
- package/prompts/deepseek-flash.md +1 -1
- package/prompts/deepseek-v4-pro.md +2 -2
- package/prompts/deepwork.md +27 -18
- package/prompts/source/agents/clarifier.md +5 -3
- package/prompts/source/agents/orchestrator.md +18 -9
- package/prompts/source/agents/plan-critic.md +5 -1
- package/prompts/source/agents/planner.md +4 -2
- package/prompts/source/agents/reviewer.md +6 -0
- package/prompts/source/category/complex.md +4 -4
- package/prompts/source/category/creative.md +6 -4
- package/prompts/source/category/cross-cutting.md +10 -8
- package/prompts/source/category/deep.md +5 -3
- package/prompts/source/category/documenting.md +7 -1
- package/prompts/source/category/frontend.md +2 -2
- package/prompts/source/category/hard-reasoning.md +3 -3
- package/prompts/source/category/research.md +4 -2
- package/prompts/source/deepwork/claude-opus-5.md +2 -2
- package/prompts/source/deepwork/codex.md +1 -1
- package/prompts/source/deepwork/default.md +22 -15
- package/prompts/source/deepwork/gemini.md +23 -16
- package/prompts/source/deepwork/glm.md +21 -14
- package/prompts/source/deepwork/gpt.md +12 -6
- package/prompts/source/deepwork/planner.md +8 -5
- package/prompts/source/manifest.json +178 -63
- package/prompts/source/shared/dsh-host-contract.md +5 -3
- package/prompts/source/shared/locale.md +2 -2
- package/prompts/source/terminal/orchestrator.md +1 -1
- package/scripts/cold-profile-composition.mjs +329 -0
- package/scripts/cold-profile-sources.mjs +238 -0
- package/scripts/migrate-cold-profile.mjs +315 -0
- package/skills/ast-grep/SKILL.md +7 -4
- package/skills/brainstorming/SKILL.md +43 -22
- package/skills/coding-agent-sessions/SKILL.md +7 -4
- package/skills/coding-agent-sessions/scripts/agent_sessions/pi_family.py +46 -46
- package/skills/coding-agent-sessions/scripts/tests/test_pi_family_scanners.py +130 -130
- package/skills/debugging/SKILL.md +14 -9
- package/skills/debugging/references/methodology/00-setup.md +14 -62
- package/skills/debugging/references/methodology/02-investigate.md +4 -4
- package/skills/debugging/references/methodology/03-flaky-triage.md +3 -3
- package/skills/debugging/references/methodology/04-hard-reasoning-escalation.md +2 -14
- package/skills/debugging/references/methodology/06-fix.md +6 -6
- package/skills/debugging/references/methodology/08-qa.md +5 -5
- package/skills/debugging/references/methodology/09-cleanup.md +15 -153
- package/skills/debugging/references/methodology/partial-runtime-evidence.md +3 -16
- package/skills/debugging/references/runtimes/bundled-js-binary.md +1 -16
- package/skills/debugging/references/runtimes/native-binary.md +9 -54
- package/skills/debugging/references/runtimes/node.md +4 -15
- package/skills/debugging/references/runtimes/python.md +3 -15
- package/skills/debugging/references/runtimes/rust.md +2 -18
- package/skills/debugging/references/tools/dap.md +1 -1
- package/skills/debugging/references/tools/ghidra.md +4 -15
- package/skills/debugging/references/tools/playwright-cli.md +3 -15
- package/skills/debugging/references/tools/pwntools.md +4 -16
- package/skills/dispatching-parallel-agents/SKILL.md +18 -16
- package/skills/frontend/SKILL.md +7 -4
- package/skills/frontend/references/design/react-dev-tooling-skill.md +1 -1
- package/skills/git-master/SKILL.md +7 -4
- package/skills/init-deep/SKILL.md +7 -4
- package/skills/receiving-code-review/SKILL.md +17 -12
- package/skills/remove-ai-slops/SKILL.md +39 -38
- package/skills/requesting-code-review/SKILL.md +19 -17
- package/skills/requesting-code-review/code-reviewer.md +13 -1
- package/skills/subagent-driven-development/SKILL.md +29 -26
- package/skills/subagent-driven-development/implementer-prompt.md +29 -11
- package/skills/subagent-driven-development/spec-reviewer-prompt.md +6 -1
- package/skills/using-git-worktrees/SKILL.md +7 -4
- package/skills/writing-plans/SKILL.md +29 -24
- package/skills/writing-plans/plan-document-reviewer-prompt.md +10 -1
package/lib/client/locales.js
CHANGED
|
@@ -1,21 +1,30 @@
|
|
|
1
1
|
export const NS = "settings.dsmm-profiles";
|
|
2
2
|
export const en = {
|
|
3
|
+
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: "Browse saved profiles", editZone: "Edit draft", savedRevision: "Saved revision: {revision}", savedInventory: "Saved profiles and diagnostics", futurePin: "Future selection revision: {revision}", noEditor: "Open a saved profile or create a draft to edit. Browsing does not activate a profile.",
|
|
5
|
+
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 revision warnings", draftWarnings: "Draft warnings", futureWarnings: "Future-default pin warnings", admissionWarnings: "Current-admission warnings", warningProfile: "warning (nonblocking)",
|
|
7
|
+
omitLabel: "Inherit display name from ID (omit label)", businessLocale: "Default output language", inheritLocale: "Inherit deployment / native language", unsupportedLocale: "Unsupported draft language — choose an allowed value", localeHint: "Omitted locale inherits the deployment preference, then native/user language. An explicit user request wins. This never changes the interface language.",
|
|
8
|
+
toolTopology: "Subagent tool topology", topologyHint: "per-role exposes role tools plus the category entry; parameterized exposes role/category entries. Omitted inherits deployment (default per-role). Background, depth and route-override permissions remain deployment-only.",
|
|
9
|
+
levelName: "Invocation level: {level}", levelMode: "{level} override", levelUnconfigured: "Not configured / inherit deployment level", levelEffortOnly: "Exact effort only", levelFullRoute: "Complete provider/model route", normalLevel: "normal · default route (read-only alias; omission means normal)", orchestratorLevels: "The ordinary orchestrator root has no invocation levels. Its native model is unchanged.", levelsHint: "Levels are call resources, not workflow tiers. An unconfigured requested level is rejected; an effort-only override uses the resolved model. An explicit complete route replaces model and effort together.",
|
|
10
|
+
namedRole: "{name} named-profile availability", namedRoleHint: "Omitted inherits the captured deployment ceiling. Required roles cannot be disabled; enable requests cannot lift startup or deployment restrictions. Routing remains editable even for disabled roles.", availabilityUnknown: "Role availability metadata is unavailable. Required status and startup/deployment ceilings cannot be inferred; refresh before requesting an availability change.", roleRequired: "Required role · {reason}", roleOptional: "Optional role", roleCeiling: "Startup: {startup}; deployment: {deployment}; captured admission: {admitted}.", roleProvenance: "Source: {source}; capture: {capture}.", roleUnavailableReason: "Availability reason: {reason}.",
|
|
11
|
+
admittedRoles: "Captured role availability", bindingUnknown: "Subagent runtime binding is unconfirmed; no delivery-readiness guarantee can be inferred from configuration.", bindingState: "Captured subagent binding: {binding}; delivery fence: {ready}; restart required: {restart}.", bindingReason: "Binding reason: {reason}.", sessionModelHint: "Apply/Baseline keep the native root model and existing children. Only Use profile model explicitly asks native model selection to change.", savedOnlyHint: "Select the editor's saved immutable revision, not its dirty draft. Save does not select or apply it.",
|
|
3
12
|
centralOrigin: "Named resources: shared central store.", legacyOrigin: "Named resources: legacy native-profile store (read-only).", explicitOrigin: "Named resources: explicitly configured store.", readOnlyOrigin: "This legacy store is read-only. Files are not copied or migrated; selection and current-session actions retain their own authority.",
|
|
4
13
|
headerCompactProfiles: "Profiles · keep model", headerCompactRefresh: "Refresh", headerNoSession: "Select a session to make changes.",
|
|
5
14
|
headerModeEnable: "Enable Deepwork", headerModeDisable: "Disable Deepwork", headerModePreset: "Deepwork · DW preset", headerModeUnavailable: "Deepwork unavailable", headerModeOn: "Deepwork enabled.", headerModeOff: "Deepwork disabled.", headerUseCurrentModel: "Use profile model",
|
|
6
15
|
title: "Deepwork Profiles", description: "Save independent runtime configurations and choose which one new sessions use.",
|
|
7
|
-
newSessions: "
|
|
16
|
+
newSessions: "This saved pin is the default for future sessions only. Current admissions and existing children remain unchanged; explicit session selections retain their own authority.",
|
|
8
17
|
editorSelect: "Profile to edit", choose: "Choose a profile", newDraft: "New unsaved profile", new: "New profile",
|
|
9
18
|
profileId: "Profile ID (name)", idHint: "Use 1–64 lowercase letters, digits, hyphens or underscores. The ID cannot be changed after saving. Add an optional display label in the JSONC document.",
|
|
10
|
-
configuration: "Runtime configuration (JSONC)", configurationHint: "Document: version 1, matching id, optional label, and settings.
|
|
11
|
-
structuralHint: "
|
|
12
|
-
save: "Save profile", saving: "Saving profile…", apply: "
|
|
19
|
+
configuration: "Runtime configuration (JSONC)", configurationHint: "Document: version 1, matching id, optional label, and settings. Runtime overlays support role routes/levels, locale, role availability, topology, workflow, guards, recovery, calibration and default effort. Retired max-preset fields are rejected, not migrated.",
|
|
20
|
+
structuralHint: "Skills, prompt content, preset installation, providers/accounts, background/depth and arbitrary route permissions remain deployment-only. Never paste credentials. JSONC and structured controls edit the same draft without normalizing unrelated bytes.",
|
|
21
|
+
save: "Save profile", saving: "Saving profile…", apply: "Set as future default", applying: "Selecting future default…", reset: "Use baseline for future sessions", resetting: "Resetting future default…",
|
|
13
22
|
refresh: "Refresh profiles", refreshing: "Refreshing profiles…", reload: "Reload saved profile", loading: "Loading profiles…", reading: "Reading profile…",
|
|
14
23
|
empty: "No saved profiles yet. Create a profile to start; the deployment baseline remains applied.",
|
|
15
24
|
baseline: "Applied to new sessions: deployment baseline.", appliedProfile: "Applied to new sessions: {id} (revision {revision}).",
|
|
16
25
|
appliedInvalid: "The stored selection cannot be confirmed. Existing sessions remain unchanged. Resolve the Host diagnostic before applying or resetting a profile.",
|
|
17
26
|
selectionConflict: "The stored selection changed outside this Host. This Host still uses the policy shown above for new sessions. Apply a saved profile or reset to baseline to reconcile it; restarting adopts the stored selection. Existing sessions stay unchanged.",
|
|
18
|
-
dirty: "
|
|
27
|
+
dirty: "Draft differs from the saved revision. Save or explicitly discard before selecting it.", savedNotApplied: "Saved revision; not the future-default pin.", savedApplied: "Saved revision matches the future-default pin, not necessarily the current admission.",
|
|
19
28
|
saved: "Saved {id}. The applied policy was not changed.", applied: "Applied {id} for new sessions. Existing sessions were not changed.", resetDone: "Reset to the deployment baseline for new sessions. Existing sessions were not changed.",
|
|
20
29
|
discardPrompt: "Discard the unsaved draft before changing the editor?", discard: "Discard changes", cancel: "Cancel",
|
|
21
30
|
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.",
|
|
@@ -25,8 +34,8 @@ export const en = {
|
|
|
25
34
|
transport: "The native connection could not confirm this operation. Your draft is kept. Refresh the Host state before retrying; do not assume a save or apply completed.",
|
|
26
35
|
invalidProfile: "Unavailable profile: {id}", details: "Host diagnostic", retry: "Resolve the diagnostic, refresh profiles, then retry.",
|
|
27
36
|
globalScope: "Global default for future sessions", sessionScope: "Current native session", sessionSelect: "Current-session profile",
|
|
28
|
-
globalActionHint: "
|
|
29
|
-
headerProfile: "Profile", headerProfileLabel: "Current-session profile (header)", headerCaptured: "captured
|
|
37
|
+
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 profile (header)", headerCaptured: "captured admission · exact profile unavailable", headerSavedUnavailable: "saved profile unavailable", headerCurrentProfile: "Current profile: {profile}", headerRefresh: "Refresh profiles and current-session state", headerUseModelAction: "Use profile model: {profile}",
|
|
30
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 profile or admission changed elsewhere. Refresh current-session state before retrying.", headerRefused: "Profile change unconfirmed. Check Settings.",
|
|
31
40
|
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.",
|
|
32
41
|
headerNoProfileModel: "Profile applied; no main model configured. Current model kept.", headerModelUnconfirmed: "Profile applied; model change unconfirmed. Check Models/Settings.", headerAppliedWithModel: "Profile and native model applied.",
|
|
@@ -37,7 +46,7 @@ export const en = {
|
|
|
37
46
|
sessionUnavailable: "The current session could not be confirmed. Refresh its state before retrying; the prior policy is kept.",
|
|
38
47
|
sessionBusy: "Switching is unavailable: {reason}. The Host must reserve a truly idle ordinary session before applying.",
|
|
39
48
|
sessionState: "Session {id}: {profile}; scope {scope}; admission epoch {epoch}.", sessionBaseline: "deployment baseline",
|
|
40
|
-
sessionGlobalCaptured: "captured
|
|
49
|
+
sessionGlobalCaptured: "captured admission (exact profile identity unavailable)",
|
|
41
50
|
sessionAdmittedProfile: "{id} (revision {revision})", sessionFutureDefault: "Global default for future unscoped sessions: {profile}. This does not change this session's admission.",
|
|
42
51
|
sessionConflict: "The session selection or admission epoch changed elsewhere. The prior display and draft are kept. Refresh current-session state before applying again.",
|
|
43
52
|
sessionApply: "Apply profile to current session", sessionApplying: "Applying current-session profile…", sessionReset: "Pin baseline for current session", sessionResetting: "Pinning current-session baseline…", sessionRefresh: "Refresh current-session state",
|
|
@@ -59,22 +68,31 @@ export const en = {
|
|
|
59
68
|
advanced: "Advanced JSONC", rawInvalid: "Structured editing is unavailable for this invalid raw draft. Correct Advanced JSONC; no fields, comments or bytes have been normalized.", invalidNumber: "Correct this bounded integer before saving or changing roles. The invalid value has not replaced the saved draft policy.",
|
|
60
69
|
};
|
|
61
70
|
export const zh = {
|
|
71
|
+
diagnosticJsonc: "请修正所示位置的 JSONC 语法。", diagnosticDuplicate: "请删除此位置的重复字段。", diagnosticUnsafe: "不支持不安全对象键,请删除此字段。", diagnosticUnknown: "请删除不支持的字段。私有及安装配置应放在原生部署设置中。", diagnosticDeprecated: "此已退休字段被拒绝,请改用明确的角色调用等级,不自动迁移。", diagnosticType: "请使用声明的字段类型和有界数值。", diagnosticValue: "请选择明确支持的值。允许的输出语言见结构化语言字段。", diagnosticRoute: "请提供完整提供商与模型路由,或非空精确强度覆盖。", diagnosticRequired: "所选 Deepwork 策略要求此角色,不可禁用。", diagnosticCeiling: "具名配置档不能启用超出已捕获启动或部署上限的能力。",
|
|
72
|
+
browseZone: "浏览已保存配置档", editZone: "编辑草稿", savedRevision: "保存的修订:{revision}", savedInventory: "已保存配置档与诊断", futurePin: "未来默认选择修订:{revision}", noEditor: "打开已保存配置档或新建草稿。浏览不会启用配置档。",
|
|
73
|
+
warningMarker: "警告 · 不阻断 · {code} · {field}", blockingMarker: "已阻断 · {code} · {field}", blankLabelWarning: "显示名称为空,使用配置档 ID 显示。原文仍可保存和选择。", diagnosticLocation: "JSONC 第 {line} 行,第 {column} 列。",
|
|
74
|
+
savedWarnings: "保存修订的警告", draftWarnings: "草稿警告", futureWarnings: "未来默认固定修订的警告", admissionWarnings: "当前准入的警告", warningProfile: "警告(不阻断)",
|
|
75
|
+
omitLabel: "使用 ID 显示(省略 label)", businessLocale: "默认输出语言", inheritLocale: "继承部署或原生语言", unsupportedLocale: "草稿语言不受支持,请选择允许值", localeHint: "省略 locale 时继承部署偏好,再继承原生或用户语言。本次用户明确请求优先,不改变界面语言。",
|
|
76
|
+
toolTopology: "子 Agent 工具拓扑", topologyHint: "per-role 暴露角色工具及类别入口;parameterized 暴露角色与类别参数化入口。省略时继承部署(默认 per-role)。后台、深度及路由覆盖权限仅可在部署中配置。",
|
|
77
|
+
levelName: "调用资源等级:{level}", levelMode: "{level} 覆盖", levelUnconfigured: "未配置或继承部署等级", levelEffortOnly: "仅精确推理强度", levelFullRoute: "完整提供商与模型路由", normalLevel: "normal · 默认路由(只读别名;省略即 normal)", orchestratorLevels: "普通 orchestrator 根会话没有调用等级,不改变其原生模型。", levelsHint: "等级代表调用资源,不代表流程等级。请求未配置等级会被拒绝;仅强度覆盖使用已解析模型;完整路由同时替换模型和强度。",
|
|
78
|
+
namedRole: "{name} 的具名配置可用性", namedRoleHint: "省略时继承已捕获部署上限。必需角色不可禁用;启用请求不能突破启动或部署限制。禁用角色仍可编辑路由。", availabilityUnknown: "角色可用性元数据不可用,不能猜测必需集合或启动与部署上限。请求更改可用性前请刷新。", roleRequired: "必需角色 · {reason}", roleOptional: "可选角色", roleCeiling: "启动:{startup};部署:{deployment};捕获准入:{admitted}。", roleProvenance: "来源:{source};捕获:{capture}。", roleUnavailableReason: "可用性原因:{reason}。",
|
|
79
|
+
admittedRoles: "已捕获角色可用性", bindingUnknown: "尚未确认子 Agent 运行时绑定,不能从配置推断投递守卫已就绪。", bindingState: "捕获的子 Agent 绑定:{binding};投递守卫:{ready};需重启:{restart}。", bindingReason: "绑定原因:{reason}。", sessionModelHint: "应用或固定基线保留原生根模型和已有子会话。只有「使用配置档模型」会明确请求原生模型切换。", savedOnlyHint: "选择编辑器对应的已保存固定修订,而不是脏草稿。保存不会选择或应用。",
|
|
62
80
|
centralOrigin: "具名资源:共享中央存储。", legacyOrigin: "具名资源:旧原生配置存储(只读)。", explicitOrigin: "具名资源:显式指定的存储。", readOnlyOrigin: "此旧存储只读,不复制或迁移文件;选择与当前会话操作仍使用各自的权限。",
|
|
63
81
|
headerCompactProfiles: "配置档 · 保留模型", headerCompactRefresh: "刷新", headerNoSession: "选择会话后可更改。",
|
|
64
82
|
headerModeEnable: "启用 Deepwork", headerModeDisable: "关闭 Deepwork", headerModePreset: "Deepwork · DW 预设", headerModeUnavailable: "Deepwork 不可用", headerModeOn: "Deepwork 已启用。", headerModeOff: "Deepwork 已关闭。", headerUseCurrentModel: "使用配置档模型",
|
|
65
83
|
title: "Deepwork 配置档", description: "保存独立的运行时配置,并选择新会话使用的配置档。",
|
|
66
|
-
newSessions: "
|
|
84
|
+
newSessions: "此固定修订仅作为未来会话默认值。当前准入与已有子会话不变;明确的会话选择保留自己的权限。",
|
|
67
85
|
editorSelect: "要编辑的配置档", choose: "选择配置档", newDraft: "新的未保存配置档", new: "新建配置档",
|
|
68
86
|
profileId: "配置档 ID(名称)", idHint: "使用 1–64 个小写字母、数字、连字符或下划线。保存后不能修改 ID。可在 JSONC 文档中添加可选的显示名称 label。",
|
|
69
|
-
configuration: "运行时配置(JSONC)", configurationHint: "文档包含 version: 1
|
|
70
|
-
structuralHint: "
|
|
71
|
-
save: "保存配置档", saving: "正在保存配置档…", apply: "
|
|
87
|
+
configuration: "运行时配置(JSONC)", configurationHint: "文档包含 version: 1、相同 id、可选 label 和 settings。支持角色路由与调用等级、语言、角色可用性、拓扑、流程、守卫、恢复、校准与默认推理强度。已退休的最高强度预设字段会被拒绝,不自动迁移。",
|
|
88
|
+
structuralHint: "技能、提示内容、预设安装、提供商与账户、后台与深度及任意路由权限仅可在部署中配置。请勿粘贴凭证。JSONC 与结构化控件共享草稿,不规范化无关字节。",
|
|
89
|
+
save: "保存配置档", saving: "正在保存配置档…", apply: "设为未来默认", applying: "正在选择未来默认…", reset: "未来会话使用基线", resetting: "正在重置未来默认…",
|
|
72
90
|
refresh: "刷新配置档", refreshing: "正在刷新配置档…", reload: "重新加载已保存配置档", loading: "正在加载配置档…", reading: "正在读取配置档…",
|
|
73
91
|
empty: "尚无已保存的配置档。可新建配置档;当前仍应用部署基线。",
|
|
74
92
|
baseline: "新会话使用:部署基线。", appliedProfile: "新会话使用:{id}(修订 {revision})。",
|
|
75
93
|
appliedInvalid: "无法确认保存的选择。已有会话未改变。请先解决 Host 诊断,再应用或重置配置档。",
|
|
76
94
|
selectionConflict: "保存的选择已被此 Host 之外的操作修改。此 Host 的新会话仍使用上方策略。请应用已保存配置档或重置为基线以协调选择;重启将采用保存的选择。已有会话未改变。",
|
|
77
|
-
dirty: "
|
|
95
|
+
dirty: "草稿与保存修订不同。选择前请保存或明确丢弃。", savedNotApplied: "已保存修订;不是未来默认的固定修订。", savedApplied: "保存修订与未来默认固定修订一致,但未必是当前准入。",
|
|
78
96
|
saved: "已保存 {id},未改变已应用的策略。", applied: "已为新会话应用 {id},已有会话未改变。", resetDone: "已为新会话重置为部署基线,已有会话未改变。",
|
|
79
97
|
discardPrompt: "切换编辑器之前,是否丢弃未保存的草稿?", discard: "丢弃更改", cancel: "取消",
|
|
80
98
|
conflict: "已保存文件或选择已被其他操作修改。草稿和原选择已保留。请刷新配置档,然后重新加载已保存配置档或检查草稿后重试。",
|
|
@@ -84,15 +102,15 @@ export const zh = {
|
|
|
84
102
|
transport: "原生连接无法确认此操作。草稿已保留。重试之前请刷新 Host 状态;不要假定保存或应用已完成。",
|
|
85
103
|
invalidProfile: "不可用配置档:{id}", details: "Host 诊断", retry: "请解决诊断问题,刷新配置档后重试。",
|
|
86
104
|
globalScope: "未来会话的全局默认值", sessionScope: "当前原生会话", sessionSelect: "当前会话配置档",
|
|
87
|
-
globalActionHint: "
|
|
88
|
-
headerProfile: "配置档", headerProfileLabel: "当前会话配置档(会话栏)", headerCaptured: "
|
|
105
|
+
globalActionHint: "「设为未来默认」只为未来会话选择已保存修订,不应用到当前会话。",
|
|
106
|
+
headerProfile: "配置档", headerProfileLabel: "当前会话配置档(会话栏)", headerCaptured: "已捕获准入 · 精确配置档不可用", headerSavedUnavailable: "保存的配置档不可用", headerCurrentProfile: "当前配置档:{profile}", headerRefresh: "刷新配置档和当前会话状态", headerUseModelAction: "使用配置档模型:{profile}",
|
|
89
107
|
headerLoading: "加载配置档…", headerApplying: "应用配置档…", headerApplied: "配置档已应用。", headerBusy: "会话忙碌。", headerUnavailable: "配置档不可用。", headerDraft: "请在设置中保存或丢弃草稿。", headerConflict: "会话配置档或准入代次已在其他位置改变,请刷新当前会话状态后重试。", headerRefused: "未确认配置档更改,请检查设置。",
|
|
90
108
|
headerKeepModelGroup: "切换配置档 — 保留当前模型", headerUseModelGroup: "切换并使用配置档模型", headerModelDefaultHint: "普通切换保留当前模型。明确切换并使用模型还会像模型页一样保存原生模型默认值。", headerNoProfileModel: "配置档已应用,未配置主模型。当前模型已保留。", headerModelUnconfirmed: "配置档已应用,模型更改未确认。请检查模型或设置页。", headerAppliedWithModel: "配置档和原生模型已应用。",
|
|
91
109
|
headerModelChoiceChanged: "配置档已应用,已保留更新的原生模型选择。",
|
|
92
110
|
headerActivationRefused: "配置档启用被拒绝,请检查其配置和原生模型目录。", headerSelectionRefused: "无法确认配置档更改。", headerIssueCode: "原因:{code}。", headerIssueField: "配置字段:{field}。", headerRetryHint: "请刷新配置档和当前会话状态,在设置或原生模型页解决所示问题,然后在会话空闲时重试。",
|
|
93
111
|
headerMaintenanceRefused: "原生维护正在占用此会话,原配置档已保留。", headerBusyRefused: "会话正在运行,原配置档已保留。", headerCancelledRefused: "配置档请求已取消,请刷新当前会话状态后重试,不要假定更改已完成。", headerUnavailableRefused: "原生会话或配置档服务不可用,请重新连接并刷新后重试。", headerWaitRetryHint: "请等待原生运行或维护结束,然后刷新并重试。不会自动排队应用配置档。",
|
|
94
112
|
noSession: "未选择原生会话。无法应用到当前会话。", sessionUnavailable: "无法确认当前会话。重试前请刷新状态;原策略已保留。", sessionBusy: "暂不可切换:{reason}。Host 必须先保留真正空闲的普通会话。", sessionState: "会话 {id}:{profile};范围 {scope};准入代次 {epoch}。", sessionBaseline: "部署基线",
|
|
95
|
-
sessionGlobalCaptured: "
|
|
113
|
+
sessionGlobalCaptured: "已捕获准入(精确配置档身份不可用)",
|
|
96
114
|
sessionAdmittedProfile: "{id}(修订 {revision})", sessionFutureDefault: "未来没有独立选择的会话的全局默认值:{profile}。这不会改变当前会话的准入。",
|
|
97
115
|
sessionConflict: "会话选择或准入代次已在其他位置改变。原显示和草稿已保留。再次应用前请刷新当前会话状态。",
|
|
98
116
|
sessionApply: "应用配置档到当前会话", sessionApplying: "正在应用当前会话配置档…", sessionReset: "为当前会话固定基线", sessionResetting: "正在固定当前会话基线…", sessionRefresh: "刷新当前会话状态", sessionApplied: "已仅对此会话应用保存的修订。全局默认值和已有子会话未改变。", sessionResetDone: "已仅对此会话固定部署基线。全局默认值未改变。", sessionDirty: "应用当前会话选择之前,请保存或明确丢弃编辑器草稿。",
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { ConnectionHandle } from "@deepseek-ai/dsh-client-connection/client";
|
|
2
|
+
import type { PermissionRemote } from "../permission-remote.js";
|
|
3
|
+
import type { RemoteResult } from "@deepseek-ai/dsh-typert-protocol";
|
|
4
|
+
export type PermissionMethod = keyof PermissionRemote;
|
|
5
|
+
export type PermissionValue<M extends PermissionMethod> = Awaited<ReturnType<PermissionRemote[M]>> extends RemoteResult<infer Value> ? Value : never;
|
|
6
|
+
export type PermissionIssue = "not-owned" | "stale" | "cancelled" | "unavailable" | "validation" | "not-found" | "scope-unavailable" | "replayed" | "denied" | "transport" | "protocol";
|
|
7
|
+
export declare class PermissionClientError extends Error {
|
|
8
|
+
readonly code: PermissionIssue;
|
|
9
|
+
constructor(code: PermissionIssue);
|
|
10
|
+
}
|
|
11
|
+
export interface PermissionInvoker {
|
|
12
|
+
<M extends PermissionMethod>(method: M, args: Parameters<PermissionRemote[M]>, signal: AbortSignal): Promise<PermissionValue<M>>;
|
|
13
|
+
}
|
|
14
|
+
/** The public Connection carrier supplies cancellation; C owns wire codecs and authority. */
|
|
15
|
+
export declare function permissionClient(connection: ConnectionHandle): PermissionInvoker;
|
|
16
|
+
//# sourceMappingURL=permission-client.d.ts.map
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { PERMISSION_REMOTE } from "../permission-remote.js";
|
|
2
|
+
export class PermissionClientError extends Error {
|
|
3
|
+
code;
|
|
4
|
+
constructor(code) {
|
|
5
|
+
super("Permission operation unavailable.");
|
|
6
|
+
this.code = code;
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
const codes = new Set(["not-owned", "stale", "cancelled", "unavailable", "validation", "not-found", "scope-unavailable", "replayed", "denied"]);
|
|
10
|
+
/** The public Connection carrier supplies cancellation; C owns wire codecs and authority. */
|
|
11
|
+
export function permissionClient(connection) {
|
|
12
|
+
return async (method, args, signal) => {
|
|
13
|
+
const descriptor = PERMISSION_REMOTE.descriptors.find(item => item.method === method);
|
|
14
|
+
const payload = {};
|
|
15
|
+
descriptor.parameters.forEach((parameter, index) => { payload[parameter.wire] = args[index]; });
|
|
16
|
+
let result;
|
|
17
|
+
try {
|
|
18
|
+
result = await connection.rpc.call("/api", `dsmmPermissions/${method}`, { args: payload }, signal);
|
|
19
|
+
}
|
|
20
|
+
catch {
|
|
21
|
+
throw new PermissionClientError(signal.aborted ? "cancelled" : "transport");
|
|
22
|
+
}
|
|
23
|
+
if (!result.ok) {
|
|
24
|
+
const code = Reflect.get(result.error.details, "code");
|
|
25
|
+
throw new PermissionClientError(result.error.code === "dsmm-permissions/refused" && codes.has(code) ? code : "unavailable");
|
|
26
|
+
}
|
|
27
|
+
signal.throwIfAborted();
|
|
28
|
+
try {
|
|
29
|
+
if (descriptor.result.mode !== "strict")
|
|
30
|
+
throw new Error("Strict permission codec required.");
|
|
31
|
+
return descriptor.result.create().parse(result.value);
|
|
32
|
+
}
|
|
33
|
+
catch {
|
|
34
|
+
throw new PermissionClientError("protocol");
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=permission-client.js.map
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import type { PermissionControlSettings } from "../permission-settings.js";
|
|
2
|
+
import type { PermissionRuleDraft, PermissionRulesSaveRequest, PermissionRulesSaveResult } from "../permission-rules.js";
|
|
3
|
+
import type { PermissionInvoker, PermissionIssue } from "./permission-client.js";
|
|
4
|
+
export interface PermissionDraft {
|
|
5
|
+
outsideReads: PermissionControlSettings["outsideReads"];
|
|
6
|
+
webSearch: PermissionControlSettings["webSearch"];
|
|
7
|
+
webFetch: PermissionControlSettings["webFetch"];
|
|
8
|
+
upsert: readonly PermissionRuleDraft[];
|
|
9
|
+
revoke: readonly string[];
|
|
10
|
+
editor: PermissionRuleDraft | null;
|
|
11
|
+
}
|
|
12
|
+
export interface PermissionView {
|
|
13
|
+
generation: number;
|
|
14
|
+
sessionId: string | null;
|
|
15
|
+
scope: "unknown" | "root" | "child";
|
|
16
|
+
connected: boolean;
|
|
17
|
+
reading: boolean;
|
|
18
|
+
busy: "save" | null;
|
|
19
|
+
rules: PermissionRulesSaveResult | null;
|
|
20
|
+
base: PermissionRulesSaveResult["snapshot"] | null;
|
|
21
|
+
draft: PermissionDraft | null;
|
|
22
|
+
rulesIssue: PermissionIssue | null;
|
|
23
|
+
dirty: boolean;
|
|
24
|
+
notice: "saved" | null;
|
|
25
|
+
}
|
|
26
|
+
export declare function permissionChanges(view: PermissionView): PermissionRulesSaveRequest | null;
|
|
27
|
+
/** Borrowed native selection plus last-observed C state; never a Root or policy authority. */
|
|
28
|
+
export declare class PermissionController {
|
|
29
|
+
private state;
|
|
30
|
+
private listeners;
|
|
31
|
+
private invoke;
|
|
32
|
+
private connection;
|
|
33
|
+
private owner;
|
|
34
|
+
private request;
|
|
35
|
+
private requestSequence;
|
|
36
|
+
private timer?;
|
|
37
|
+
private watchers;
|
|
38
|
+
private disposed;
|
|
39
|
+
readonly store: {
|
|
40
|
+
getSnapshot: () => PermissionView;
|
|
41
|
+
subscribe: (listener: () => void) => (() => void);
|
|
42
|
+
};
|
|
43
|
+
private publish;
|
|
44
|
+
private cancel;
|
|
45
|
+
private fence;
|
|
46
|
+
bindConnection(invoke: PermissionInvoker | null, generation?: unknown): void;
|
|
47
|
+
bindScope(sessionId: string | null, owner: object | null, scope: PermissionView["scope"]): void;
|
|
48
|
+
watch(): () => void;
|
|
49
|
+
dispose(): void;
|
|
50
|
+
private live;
|
|
51
|
+
private schedule;
|
|
52
|
+
private issue;
|
|
53
|
+
private synchronized;
|
|
54
|
+
canSave(generation: number): boolean;
|
|
55
|
+
refresh(generation: number, discard?: boolean): Promise<void>;
|
|
56
|
+
edit(generation: number, patch: Partial<PermissionDraft>): void;
|
|
57
|
+
stageRule(generation: number): void;
|
|
58
|
+
stageRevoke(generation: number, id: string): void;
|
|
59
|
+
private begin;
|
|
60
|
+
save(generation: number): Promise<void>;
|
|
61
|
+
}
|
|
62
|
+
//# sourceMappingURL=permission-controller.d.ts.map
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
import { PermissionClientError } from "./permission-client.js";
|
|
2
|
+
const draftOf = (policy) => ({ outsideReads: policy.outsideReads, webSearch: { ...policy.webSearch }, webFetch: { ...policy.webFetch }, upsert: [], revoke: [], editor: null });
|
|
3
|
+
const same = (a, b) => JSON.stringify(a) === JSON.stringify(b);
|
|
4
|
+
export function permissionChanges(view) {
|
|
5
|
+
const { base, draft } = view;
|
|
6
|
+
if (base === null || draft === null)
|
|
7
|
+
return null;
|
|
8
|
+
const changes = Object.fromEntries(["outsideReads", "webSearch", "webFetch"].filter(key => !same(base.policy[key], draft[key])).map(key => [key, draft[key]]));
|
|
9
|
+
if (Object.keys(changes).length === 0 && draft.upsert.length === 0 && draft.revoke.length === 0)
|
|
10
|
+
return null;
|
|
11
|
+
return { expectedRevision: base.revision, ...(Object.keys(changes).length ? { changes } : {}), ...(draft.upsert.length ? { upsert: draft.upsert } : {}), ...(draft.revoke.length ? { revoke: draft.revoke } : {}) };
|
|
12
|
+
}
|
|
13
|
+
const empty = () => ({ generation: 0, sessionId: null, scope: "unknown", connected: false, reading: false, busy: null,
|
|
14
|
+
rules: null, base: null, draft: null, rulesIssue: null, dirty: false, notice: null });
|
|
15
|
+
/** Borrowed native selection plus last-observed C state; never a Root or policy authority. */
|
|
16
|
+
export class PermissionController {
|
|
17
|
+
state = empty();
|
|
18
|
+
listeners = new Set();
|
|
19
|
+
invoke = null;
|
|
20
|
+
connection;
|
|
21
|
+
owner = null;
|
|
22
|
+
request = new AbortController();
|
|
23
|
+
requestSequence = 0;
|
|
24
|
+
timer;
|
|
25
|
+
watchers = 0;
|
|
26
|
+
disposed = false;
|
|
27
|
+
store = { getSnapshot: () => this.state, subscribe: (listener) => { this.listeners.add(listener); return () => { this.listeners.delete(listener); }; } };
|
|
28
|
+
publish(patch) { if (this.disposed)
|
|
29
|
+
return; this.state = { ...this.state, ...patch }; for (const listener of this.listeners)
|
|
30
|
+
listener(); }
|
|
31
|
+
cancel() { this.request.abort(); this.request = new AbortController(); this.requestSequence++; clearTimeout(this.timer); }
|
|
32
|
+
fence(preserve) {
|
|
33
|
+
this.cancel();
|
|
34
|
+
this.publish({ generation: this.state.generation + 1, reading: false, busy: null, notice: null,
|
|
35
|
+
rules: null, rulesIssue: null, ...preserve ? {} : { base: null, draft: null, dirty: false } });
|
|
36
|
+
}
|
|
37
|
+
bindConnection(invoke, generation) {
|
|
38
|
+
if (this.disposed || this.invoke === invoke && this.connection === generation)
|
|
39
|
+
return;
|
|
40
|
+
this.invoke = invoke;
|
|
41
|
+
this.connection = generation;
|
|
42
|
+
this.fence(true);
|
|
43
|
+
this.publish({ connected: invoke !== null });
|
|
44
|
+
this.schedule(true);
|
|
45
|
+
}
|
|
46
|
+
bindScope(sessionId, owner, scope) {
|
|
47
|
+
if (this.disposed || this.state.sessionId === sessionId && this.owner === owner && this.state.scope === scope)
|
|
48
|
+
return;
|
|
49
|
+
const preserve = sessionId === this.state.sessionId;
|
|
50
|
+
this.owner = owner;
|
|
51
|
+
this.fence(preserve);
|
|
52
|
+
this.publish({ sessionId, scope });
|
|
53
|
+
this.schedule(true);
|
|
54
|
+
}
|
|
55
|
+
watch() {
|
|
56
|
+
this.watchers++;
|
|
57
|
+
if (this.watchers === 1)
|
|
58
|
+
this.schedule(true);
|
|
59
|
+
let active = true;
|
|
60
|
+
return () => { if (!active)
|
|
61
|
+
return; active = false; this.watchers--; if (this.watchers === 0)
|
|
62
|
+
this.fence(true); };
|
|
63
|
+
}
|
|
64
|
+
dispose() { if (this.disposed)
|
|
65
|
+
return; this.fence(false); this.disposed = true; this.listeners.clear(); this.invoke = null; this.owner = null; }
|
|
66
|
+
live(generation) { return !this.disposed && generation === this.state.generation && this.owner !== null && this.invoke !== null && this.state.scope === "root" && this.state.sessionId !== null; }
|
|
67
|
+
schedule(immediate = false) {
|
|
68
|
+
clearTimeout(this.timer);
|
|
69
|
+
if (this.watchers === 0 || !this.live(this.state.generation))
|
|
70
|
+
return;
|
|
71
|
+
this.timer = setTimeout(() => { void this.refresh(this.state.generation); }, immediate ? 0 : 1000);
|
|
72
|
+
this.timer.unref?.();
|
|
73
|
+
}
|
|
74
|
+
issue(error) { return error instanceof PermissionClientError ? error.code : "transport"; }
|
|
75
|
+
synchronized() {
|
|
76
|
+
const value = this.state.rules;
|
|
77
|
+
return value !== null && value.runtime.state === "synced" && value.runtime.savedRevision === value.snapshot.revision && value.runtime.runtimeRevision === value.snapshot.revision;
|
|
78
|
+
}
|
|
79
|
+
canSave(generation) { return this.live(generation) && this.state.rulesIssue === null && this.synchronized() && !this.state.reading && this.state.busy === null && this.state.dirty && this.state.draft?.editor === null; }
|
|
80
|
+
async refresh(generation, discard = false) {
|
|
81
|
+
if (!this.live(generation) || this.state.reading || this.state.busy !== null)
|
|
82
|
+
return;
|
|
83
|
+
const sequence = ++this.requestSequence, signal = this.request.signal, id = this.state.sessionId;
|
|
84
|
+
this.publish({ reading: true });
|
|
85
|
+
const [rules] = await Promise.allSettled([this.invoke("describeRules", [id], signal)]);
|
|
86
|
+
if (!this.live(generation) || signal.aborted || sequence !== this.requestSequence)
|
|
87
|
+
return;
|
|
88
|
+
if (rules.status === "rejected") {
|
|
89
|
+
this.publish({ rules: null, rulesIssue: this.issue(rules.reason), reading: false });
|
|
90
|
+
}
|
|
91
|
+
else {
|
|
92
|
+
const value = rules.value;
|
|
93
|
+
const retain = this.state.dirty && !discard;
|
|
94
|
+
this.publish({ rules: value, rulesIssue: retain && this.state.base?.revision !== value.snapshot.revision ? "stale" : null,
|
|
95
|
+
reading: false,
|
|
96
|
+
...retain ? {} : { base: value.snapshot, draft: draftOf(value.snapshot.policy), dirty: false } });
|
|
97
|
+
}
|
|
98
|
+
this.schedule();
|
|
99
|
+
}
|
|
100
|
+
edit(generation, patch) {
|
|
101
|
+
if (this.disposed || generation !== this.state.generation || this.state.draft === null || this.state.busy !== null)
|
|
102
|
+
return;
|
|
103
|
+
const draft = { ...this.state.draft, ...patch };
|
|
104
|
+
this.publish({ draft, notice: null });
|
|
105
|
+
this.publish({ dirty: draft.editor !== null || permissionChanges(this.state) !== null });
|
|
106
|
+
}
|
|
107
|
+
stageRule(generation) {
|
|
108
|
+
const draft = this.state.draft, editor = draft?.editor;
|
|
109
|
+
if (editor == null || !editor.id || editor.id.length > 256 || editor.id.includes("\0"))
|
|
110
|
+
return;
|
|
111
|
+
const match = editor.match;
|
|
112
|
+
if (match.kind === "outside-read" && !match.path || match.kind === "shell" && (!match.executable || !match.command || !match.workingDirectory))
|
|
113
|
+
return;
|
|
114
|
+
this.edit(generation, { upsert: [...draft.upsert.filter(row => row.id !== editor.id), structuredClone(editor)], revoke: draft.revoke.filter(id => id !== editor.id), editor: null });
|
|
115
|
+
}
|
|
116
|
+
stageRevoke(generation, id) {
|
|
117
|
+
const draft = this.state.draft;
|
|
118
|
+
if (draft === null || !this.state.base?.policy.rules.some(rule => rule.id === id))
|
|
119
|
+
return;
|
|
120
|
+
this.edit(generation, { upsert: draft.upsert.filter(row => row.id !== id), revoke: [...new Set([...draft.revoke, id])], editor: draft.editor?.id === id ? null : draft.editor });
|
|
121
|
+
}
|
|
122
|
+
begin(busy) {
|
|
123
|
+
this.cancel();
|
|
124
|
+
this.publish({ busy, notice: null });
|
|
125
|
+
return { signal: this.request.signal, id: this.state.sessionId };
|
|
126
|
+
}
|
|
127
|
+
async save(generation) {
|
|
128
|
+
const request = permissionChanges(this.state);
|
|
129
|
+
if (!this.canSave(generation) || request === null)
|
|
130
|
+
return;
|
|
131
|
+
const current = this.begin("save");
|
|
132
|
+
try {
|
|
133
|
+
const result = await this.invoke("saveRules", [current.id, request], current.signal);
|
|
134
|
+
if (this.live(generation))
|
|
135
|
+
this.publish({ rules: result, base: result.snapshot, draft: draftOf(result.snapshot.policy), dirty: false, rulesIssue: null, notice: "saved" });
|
|
136
|
+
}
|
|
137
|
+
catch (error) {
|
|
138
|
+
if (this.live(generation))
|
|
139
|
+
this.publish({ rules: null, rulesIssue: this.issue(error) });
|
|
140
|
+
}
|
|
141
|
+
finally {
|
|
142
|
+
if (this.live(generation)) {
|
|
143
|
+
this.publish({ busy: null });
|
|
144
|
+
this.schedule();
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
//# sourceMappingURL=permission-controller.js.map
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
export declare const PERMISSIONS_NS = "settings.dsmm-permissions";
|
|
2
|
+
export declare const permissionEn: {
|
|
3
|
+
title: string;
|
|
4
|
+
rules: string;
|
|
5
|
+
nativeApproval: string;
|
|
6
|
+
root: string;
|
|
7
|
+
noRoot: string;
|
|
8
|
+
child: string;
|
|
9
|
+
unknown: string;
|
|
10
|
+
reading: string;
|
|
11
|
+
busy: string;
|
|
12
|
+
executable: string;
|
|
13
|
+
command: string;
|
|
14
|
+
cwd: string;
|
|
15
|
+
id: string;
|
|
16
|
+
action: string;
|
|
17
|
+
match: string;
|
|
18
|
+
outsideReads: string;
|
|
19
|
+
webSearch: string;
|
|
20
|
+
webFetch: string;
|
|
21
|
+
enabled: string;
|
|
22
|
+
rule: string;
|
|
23
|
+
inherit: string;
|
|
24
|
+
"action:allow": string;
|
|
25
|
+
"action:ask": string;
|
|
26
|
+
"action:deny": string;
|
|
27
|
+
"kind:outside-read": string;
|
|
28
|
+
"kind:shell": string;
|
|
29
|
+
"kind:webSearch": string;
|
|
30
|
+
"kind:webFetch": string;
|
|
31
|
+
path: string;
|
|
32
|
+
pathScope: string;
|
|
33
|
+
exact: string;
|
|
34
|
+
tree: string;
|
|
35
|
+
networkLimit: string;
|
|
36
|
+
rulesHint: string;
|
|
37
|
+
matchHint: string;
|
|
38
|
+
source: string;
|
|
39
|
+
recordVersion: string;
|
|
40
|
+
savedAt: string;
|
|
41
|
+
operator: string;
|
|
42
|
+
imported: string;
|
|
43
|
+
active: string;
|
|
44
|
+
revoked: string;
|
|
45
|
+
base: string;
|
|
46
|
+
savedRevision: string;
|
|
47
|
+
runtimeRevision: string;
|
|
48
|
+
runtime: string;
|
|
49
|
+
synced: string;
|
|
50
|
+
updating: string;
|
|
51
|
+
unsynced: string;
|
|
52
|
+
mounted: string;
|
|
53
|
+
on: string;
|
|
54
|
+
off: string;
|
|
55
|
+
restart: string;
|
|
56
|
+
coverageTitle: string;
|
|
57
|
+
coverage: string;
|
|
58
|
+
coverageUnavailable: string;
|
|
59
|
+
coverageEmpty: string;
|
|
60
|
+
coverageRuntime: string;
|
|
61
|
+
coverageRevision: string;
|
|
62
|
+
toolName: string;
|
|
63
|
+
toolKind: string;
|
|
64
|
+
toolApproval: string;
|
|
65
|
+
nativeOnce: string;
|
|
66
|
+
toolMemory: string;
|
|
67
|
+
notProvided: string;
|
|
68
|
+
finalInode: string;
|
|
69
|
+
searchDestinations: string;
|
|
70
|
+
proxyBinding: string;
|
|
71
|
+
shellSockets: string;
|
|
72
|
+
providerAuthMcp: string;
|
|
73
|
+
"limit:outsideReads": string;
|
|
74
|
+
"limit:finalInode": string;
|
|
75
|
+
"limit:scopedMemory": string;
|
|
76
|
+
"limit:webFetch": string;
|
|
77
|
+
"limit:webSearchDestinations": string;
|
|
78
|
+
"limit:proxyAddressBinding": string;
|
|
79
|
+
"limit:shellSockets": string;
|
|
80
|
+
"limit:providerAuthMcp": string;
|
|
81
|
+
pathEvidence: string;
|
|
82
|
+
newRule: string;
|
|
83
|
+
editRule: string;
|
|
84
|
+
stage: string;
|
|
85
|
+
cancel: string;
|
|
86
|
+
stageRevoke: string;
|
|
87
|
+
unstage: string;
|
|
88
|
+
editor: string;
|
|
89
|
+
staged: string;
|
|
90
|
+
noRules: string;
|
|
91
|
+
save: string;
|
|
92
|
+
discard: string;
|
|
93
|
+
dirty: string;
|
|
94
|
+
saved: string;
|
|
95
|
+
"issue:not-owned": string;
|
|
96
|
+
"issue:stale": string;
|
|
97
|
+
"issue:cancelled": string;
|
|
98
|
+
"issue:unavailable": string;
|
|
99
|
+
"issue:validation": string;
|
|
100
|
+
"issue:not-found": string;
|
|
101
|
+
"issue:scope-unavailable": string;
|
|
102
|
+
"issue:replayed": string;
|
|
103
|
+
"issue:denied": string;
|
|
104
|
+
"issue:transport": string;
|
|
105
|
+
"issue:protocol": string;
|
|
106
|
+
};
|
|
107
|
+
export type PermissionLocaleKey = keyof typeof permissionEn;
|
|
108
|
+
export declare const permissionZh: Record<PermissionLocaleKey, string>;
|
|
109
|
+
declare module "@deepseek-ai/dsh-client-ui-slots" {
|
|
110
|
+
interface LocaleNamespaceMap {
|
|
111
|
+
"settings.dsmm-permissions": PermissionLocaleKey;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
//# sourceMappingURL=permission-locales.d.ts.map
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
export const PERMISSIONS_NS = "settings.dsmm-permissions";
|
|
2
|
+
export const permissionEn = {
|
|
3
|
+
title: "Permission control", rules: "Global permission rules",
|
|
4
|
+
nativeApproval: "Command approval uses the native prompt. Configure exact nativeCommands in deployment settings; ordinary Allow is once only.",
|
|
5
|
+
root: "Selected native Root session", noRoot: "Select a trusted Root session in native session navigation. No Root is inferred from task or model text.",
|
|
6
|
+
child: "This is a child session. Select its Root in native session navigation to edit Global rules.",
|
|
7
|
+
unknown: "Unavailable / unknown", reading: "Reading…", busy: "Operation pending…",
|
|
8
|
+
executable: "Native Shell registration identity (exact)", command: "Full command (exact)", cwd: "Working directory (exact)", id: "Rule ID", action: "Rule action", match: "Match kind",
|
|
9
|
+
outsideReads: "Outside-workspace reads", webSearch: "Web search", webFetch: "Web fetch", enabled: "Enabled", rule: "Coarse rule",
|
|
10
|
+
inherit: "Inherit native policy", "action:allow": "Allow", "action:ask": "Ask", "action:deny": "Deny",
|
|
11
|
+
"kind:outside-read": "Outside-workspace read", "kind:shell": "Shell operation", "kind:webSearch": "Web search", "kind:webFetch": "Web fetch",
|
|
12
|
+
path: "Canonical path", pathScope: "Path match", exact: "Exact path", tree: "Path and descendants",
|
|
13
|
+
networkLimit: "SDK network boundary: allowing public web fetch does not allow private-network destinations. These web policies are not an all-shell or socket firewall.",
|
|
14
|
+
rulesHint: "Rules Save writes Global policy. Native overrides are not cleared automatically; a refusal keeps this draft. Enabled is startup-pinned and edited separately in deployment settings. Command enhancement and its exact entries are configured there too.",
|
|
15
|
+
matchHint: "Rules match actual canonical paths (exact/tree), the native Shell registration identity plus full command/cwd, or web kind. Rule Allow only satisfies that rule; it does not grant external writes. Different IDs add records until explicitly revoked.",
|
|
16
|
+
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 CAS source", savedRevision: "Saved source", runtimeRevision: "Runtime source", runtime: "Runtime synchronization", synced: "Synced", updating: "Updating", unsynced: "Unsynced — rules saves locked",
|
|
18
|
+
mounted: "Startup mounted", on: "On", off: "Off", restart: "Independent restart required",
|
|
19
|
+
coverageTitle: "Observed trusted tool coverage", coverage: "Last observed for this Root from trusted registrations and the native rule consumer, separately from source synchronization. Saved, synced, mounted or a matching tool name does not prove coverage. Listed registrations do not prove executor readiness, network reachability or final-body ownership.",
|
|
20
|
+
coverageUnavailable: "Coverage unavailable / unknown. No trusted live observation was returned.", coverageEmpty: "No trusted tool registrations observed for this Root.",
|
|
21
|
+
coverageRuntime: "Observed consumer state", coverageRevision: "Observed consumer runtime source", toolName: "Observed tool name", toolKind: "Trusted registration kind",
|
|
22
|
+
toolApproval: "Approval boundary", nativeOnce: "Native prompt — once only", toolMemory: "Scoped approval memory", notProvided: "Not provided",
|
|
23
|
+
finalInode: "Final-inode / full filesystem guarantee", searchDestinations: "Web search destination rules", proxyBinding: "Proxy / address binding", shellSockets: "Shell / socket isolation", providerAuthMcp: "Provider authentication / MCP",
|
|
24
|
+
"limit:outsideReads": "Tool-call boundary only; no complete filesystem confinement.", "limit:finalInode": "Not guaranteed.",
|
|
25
|
+
"limit:scopedMemory": "Not provided by native rules.", "limit:webFetch": "Native public-address checks remain authoritative; private-network access is not granted.",
|
|
26
|
+
"limit:webSearchDestinations": "Unsupported.", "limit:proxyAddressBinding": "Depends on the native proxy; no stronger address-binding guarantee.",
|
|
27
|
+
"limit:shellSockets": "Depends on the native executor; no all-Shell or socket firewall.", "limit:providerAuthMcp": "Not covered by these rules.",
|
|
28
|
+
pathEvidence: "Path evidence: read uses its actual scoped native FS. Glob/grep's production rg executor coLocation remains unproven; trusted registration is not shared-path proof. Shell read interpretation and path checks depend on explicit native executor evidence. No final-inode, full-filesystem or socket guarantee.",
|
|
29
|
+
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: "Staged changes — not saved", noRules: "No persisted rule records.", save: "Save Global rules", discard: "Discard draft and reload", dirty: "Unsaved rules draft", saved: "Host accepted Global rules. Check runtime synchronization below.",
|
|
31
|
+
"issue:not-owned": "Root/operator/readonly authority refused. Select the intended Root and refresh.",
|
|
32
|
+
"issue:stale": "Source conflict. Draft retained. Review, then explicitly discard and reload.",
|
|
33
|
+
"issue:cancelled": "Operation cancelled; refresh actual saved state.",
|
|
34
|
+
"issue:unavailable": "Service or runtime unavailable. Draft retained; saved and runtime state may differ.",
|
|
35
|
+
"issue:validation": "Host refused the rule. Draft retained; check exact fields and native overrides.",
|
|
36
|
+
"issue:not-found": "The rule no longer exists.",
|
|
37
|
+
"issue:scope-unavailable": "The requested operation is unavailable.", "issue:replayed": "The operation is no longer current.",
|
|
38
|
+
"issue:denied": "Current Root policy denied this operation. No local bypass is available.",
|
|
39
|
+
"issue:transport": "Connection lost or outcome unconfirmed. Draft retained; refresh actual saved/runtime state.",
|
|
40
|
+
"issue:protocol": "Untrusted or mismatched service response. Refresh or reconnect.",
|
|
41
|
+
};
|
|
42
|
+
export const permissionZh = {
|
|
43
|
+
title: "权限控制", rules: "全局权限规则",
|
|
44
|
+
nativeApproval: "命令批准使用原生提示。精确 nativeCommands 在部署设置配置;普通 Allow 仅批准本次。",
|
|
45
|
+
root: "当前原生 Root 会话", noRoot: "请在原生会话导航中选择可信 Root 会话;不从任务或模型文本推断 Root。", child: "当前为 child 会话;编辑全局规则请在原生导航选择其 Root。",
|
|
46
|
+
unknown: "不可用/未知", reading: "正在读取…", busy: "操作处理中…",
|
|
47
|
+
executable: "原生 Shell 注册身份(精确匹配)", command: "完整命令(精确匹配)", cwd: "工作目录(精确匹配)", id: "规则 ID", action: "规则动作", match: "匹配类型",
|
|
48
|
+
outsideReads: "工作区外读取", webSearch: "网页搜索", webFetch: "网页抓取", enabled: "启用", rule: "粗粒度规则",
|
|
49
|
+
inherit: "继承原生策略", "action:allow": "允许", "action:ask": "询问", "action:deny": "拒绝",
|
|
50
|
+
"kind:outside-read": "工作区外读取", "kind:shell": "Shell 操作", "kind:webSearch": "网页搜索", "kind:webFetch": "网页抓取",
|
|
51
|
+
path: "规范路径", pathScope: "路径匹配", exact: "精确路径", tree: "此路径及子树",
|
|
52
|
+
networkLimit: "SDK 网络边界:允许 public web fetch 不代表放行私网目标;这些网页策略不是全部 Shell 或 socket 的防火墙。",
|
|
53
|
+
rulesHint: "规则保存仅写 Global 策略,不会自动清除 native 覆盖;拒绝时保留草稿。enabled 仅启动时捕获,另在部署设置编辑;命令增强及精确条目也在部署设置配置。",
|
|
54
|
+
matchHint: "规则匹配实际规范路径、原生 Shell 注册身份+完整命令+工作目录,或网页类型。规则 Allow 仅满足该规则,不授予外部写。不同 ID 添加记录,保留至显式撤销。",
|
|
55
|
+
source: "实际来源", recordVersion: "记录版本", savedAt: "保存时间", operator: "宿主已核验 operator", imported: "用户导入", active: "有效记录", revoked: "已撤销记录",
|
|
56
|
+
base: "草稿 CAS 来源", savedRevision: "已保存来源", runtimeRevision: "运行时来源", runtime: "运行时同步", synced: "已同步", updating: "同步中", unsynced: "未同步——规则保存已锁定",
|
|
57
|
+
mounted: "启动时已挂载", on: "开启", off: "关闭", restart: "需要另行重启",
|
|
58
|
+
coverageTitle: "已观测的可信工具覆盖", coverage: "此 Root 最近一次可信注册及原生规则 consumer 观测,与来源同步分开。已保存、已同步、已挂载或工具同名均不证明覆盖;所列注册不证明执行器就绪、网络可达或最终 body 归属。",
|
|
59
|
+
coverageUnavailable: "覆盖不可用/未知:未返回可信的实时观测。", coverageEmpty: "未观测到此 Root 的可信工具注册。",
|
|
60
|
+
coverageRuntime: "已观测 consumer 状态", coverageRevision: "已观测 consumer 运行时来源", toolName: "已观测工具名称", toolKind: "可信注册类型",
|
|
61
|
+
toolApproval: "批准边界", nativeOnce: "原生提示——仅本次", toolMemory: "作用域批准记忆", notProvided: "不提供",
|
|
62
|
+
finalInode: "最终 inode/完整文件系统保证", searchDestinations: "网页搜索目标规则", proxyBinding: "代理/地址绑定", shellSockets: "Shell/socket 隔离", providerAuthMcp: "Provider 认证/MCP",
|
|
63
|
+
"limit:outsideReads": "仅工具调用边界,不是完整文件系统隔离。", "limit:finalInode": "不保证。",
|
|
64
|
+
"limit:scopedMemory": "原生规则不提供。", "limit:webFetch": "仍以原生 public-address 检查为准,不授予私网访问。",
|
|
65
|
+
"limit:webSearchDestinations": "不支持。", "limit:proxyAddressBinding": "依赖原生代理,不提供更强的地址绑定保证。",
|
|
66
|
+
"limit:shellSockets": "依赖原生执行器,不是全部 Shell 或 socket 的防火墙。", "limit:providerAuthMcp": "不在这些规则覆盖范围。",
|
|
67
|
+
pathEvidence: "路径证据:read 使用其实际 scope 的原生 FS。glob/grep 的生产 rg 执行器 coLocation 仍未证明;可信注册不等于共享路径证据。Shell 读取解析及路径检查依赖明确的原生执行器证据。不保证最终 inode、完整文件系统或 socket 隔离。",
|
|
68
|
+
newRule: "添加精确匹配规则", editRule: "编辑规则", stage: "暂存规则", cancel: "取消规则编辑", stageRevoke: "暂存撤销", unstage: "移除暂存更改",
|
|
69
|
+
editor: "规则草稿", staged: "暂存更改——尚未保存", noRules: "尚无持久化规则记录。", save: "保存全局规则", discard: "丢弃草稿并重载", dirty: "规则草稿未保存", saved: "宿主已接受全局规则,请核对运行时同步状态。",
|
|
70
|
+
"issue:not-owned": "Root/operator/只读权限拒绝,请选择目标 Root 后刷新。", "issue:stale": "来源冲突,草稿保留;核对后显式丢弃并重载。", "issue:cancelled": "操作已取消,请刷新实际保存状态。",
|
|
71
|
+
"issue:unavailable": "服务或运行时不可用,草稿保留;已保存与运行时可能不同。", "issue:validation": "宿主拒绝规则,草稿保留;请核对精确字段与原生覆盖。", "issue:not-found": "规则已不存在。",
|
|
72
|
+
"issue:scope-unavailable": "所请求的操作不可用。", "issue:replayed": "操作已不再有效。", "issue:denied": "当前 Root 策略拒绝操作,没有本地绕过入口。",
|
|
73
|
+
"issue:transport": "连接中断或结果未确认,草稿保留;请刷新实际保存/运行时状态。", "issue:protocol": "服务响应不可信或不匹配,请刷新或重连。",
|
|
74
|
+
};
|
|
75
|
+
//# sourceMappingURL=permission-locales.js.map
|