@dsmm/dsmm 0.3.7 → 0.3.9

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.
@@ -10,7 +10,7 @@ A captured read-only child or a live, composed DSMM read-only preset has an expl
10
10
 
11
11
  Actual DSH manual approval is final for the same call and approved scope. Older DSMM rules, a changed permission revision or epoch, and DSMM internal gates don't veto it afterward. A pending native approval isn't canceled merely because a permission source changes.
12
12
 
13
- A native once grant applies only to its actual call and scope. It doesn't change standing session permissions, authorize later calls or turn a narrower approval into full access. DSMM can't infer approval from model-supplied arguments or saved policy. DSH rejection and caller/native cancellation remain effective, and the original tool or OS can still fail. Permission to execute isn't a command-success guarantee.
13
+ A native once grant applies only to its actual call and scope. It doesn't change standing session permissions, authorize later calls or turn a narrower approval into full access. Model-supplied arguments aren't approval; a matching simple allowlist entry selects an automatic answer for the current native request, not a reusable grant. Native policy `never` refuses before the rc2 answerer and cannot be overridden by it. Caller/native cancellation remains effective, and the original tool or OS can still fail. Permission to execute isn't a command-success guarantee.
14
14
 
15
15
  ## Settings and synchronization
16
16
 
@@ -28,17 +28,17 @@ Configuration writes require the real native operator, exact entry/form or Root
28
28
 
29
29
  Use **Plugins → DSMM bundle config → Permissions**. The selected Global/native-profile scope edits its sparse deployment policy; a separate Root-rules transaction writes Global only under the existing live operator, exact open Root, registration and synchronized-policy authority. A child, stale connection, read-only Host or shadowing native policy doesn't acquire a fallback Global write. Named Profiles can't grant these permissions. No duplicate Settings permission page or Conversation permission tab is registered.
30
30
 
31
- A trusted, writable ordinary native Root can manage Global rules without DSMM role admission, including when it predates Core mounting. This does not grant it a DSMM role. Captured DSMM objects still require current admission and role checks; retired captures and unadmitted Roots currently composed with a `dsmm-` preset cannot fall back to ordinary native authority.
31
+ A trusted, writable native Root can manage Global rules without DSMM role admission, including when it predates Core mounting and currently uses the user-selectable `dsmm-orchestrator` composition. Qualification uses the current native composition, never a historical preset label; auxiliary, read-only and unknown `dsmm-` compositions remain ineligible without admission. Rule management does not grant DSMM role execution rights. Captured DSMM objects still require current admission and role checks, and retired captures cannot fall back to ordinary native authority.
32
32
 
33
- `permissionControl.nativeCommands` defaults off. Each entry stores exactly one match shape, `{ tool, workingDirectory, commandPattern }`. Legacy `executable`/`subcommand`/`args` entries are not migrated, converted or silently dropped: configuration, persistence, runtime and the form reject them, so an older configuration must be rewritten explicitly rather than widened in place.
33
+ `permissionControl.nativeCommands` defaults off. Entries in `permissionControl.nativeCommands.entries` accept simple command/subcommand pattern strings (e.g. `git`, `git status`, `go test`) or legacy object entries (`NativeCommandEntry`). Legacy entries are preserved losslessly without silent conversion or authorization widening.
34
34
 
35
- Entries use `executable BLANK subcommands [BLANK "*"]`, where subcommands are `|`-separated literals: `go build|test` and `go build|test *` are equivalent and allow zero or more trailing argv. `*` only stands for the whole trailing argument list; there is no character glob, regex, executable alternative, parenthesized group or cross-token alternative. Literals allow Unicode letters/marks/digits plus `_ . / : = + % -`, and the executable may also contain Windows path backslashes; quotes, escapes and whitespace inside a path are unsupported. A single-token call or a call with no subcommand position has no pattern equivalent, and any allowed trailing arguments are broader than a formerly fixed argv list.
35
+ In the UI, new command entries are entered simply as command strings with Add and Remove actions. There are no ID, tool, cwd, sandbox or action selectors, and no repetitive override or explanation lines. Saved legacy structured entries display a compact read-only summary showing the command and identifiable constraints (tool, working directory, ask/sandbox differences viewable in collapsible details) plus a delete button.
36
36
 
37
- The pattern is compared against the actual call only after the existing static literal parser accepts it. `go build|test` typed into a real shell is still pipe syntax and gains nothing from a configured pattern; pipes, chaining, newlines, redirects, substitutions, expansions and wrapper/interpreter calls continue on the ordinary native path. A non-match never turns into a blanket refusal. Case, executable spelling, subcommand spelling and the Host-normalized effective cwd remain literal, and no subdirectory access is implied.
37
+ Simple command rules support literal command and subcommand prefixes (such as `git`, `git status`, `go test`) and optional alternatives (`go build|test`). A match takes priority over DSMM command ask/deny and legacy command entries, automatically approving native `danger-full-access` for that invocation. Unmatched commands follow the ordinary policy path. Shell chaining, pipes, redirects and complex shell syntax do not match. Current invocation identity, cancellation and role/tool eligibility remain required; the grant does not change the session's standing sandbox.
38
38
 
39
- Trailing arguments mean the selected program keeps its own capabilities, including build scripts, test code and options such as `go test -exec` that launch other programs. The static shell parse only excludes outer shell composition; it is not program-semantic or filesystem isolation. This feature adds no path, temp-directory or cache-root authorization. All hits are collected together: differing sandbox modes stay `ambiguous` and fall back to the native path, and `ask` wins within one sandbox mode. There is no longest-prefix or entry-order precedence.
39
+ An additional outer middleware may request approval after the pre-execution pipeline has returned. When that request has no exact execution association, it retains native approval handling; DSMM does not infer authorization from a shared call ID, signal or tool name.
40
40
 
41
- New UI entries use Ask and `workspace-write`, not full access; an Allow entry can't replace downstream Ask/Deny or a role's read-only ceiling. The UI offers no entry that creates `danger-full-access`, and an existing value from another source is displayed with its original restriction. The editor has one pattern field per entry: correcting invalid pattern text never widens an entry, and only Save persists it. Removing a row discards only that row's draft and keeps every other row's edits; Unset replaces the whole array with the inherited list.
41
+ New UI entries require a valid, non-empty command pattern before saving; empty or invalid drafts lock the Save button. Removing a row discards that row's draft and reindexes the remaining raw drafts cleanly; Unset restores default configuration in Global scope and inherits Global configuration in Profile scope.
42
42
 
43
43
  Observed `kind:shell` registration isn't proof of the actual executor, environment, executable or sandbox. The editor doesn't auto-certify those values. Missing/stale controller or registration identity still refuses consumption. Saving a rule isn't native manual approval and doesn't solve an unexplained read-only Git prompt; that investigation needs the full triggering call and approval reason.
44
44
 
@@ -42,6 +42,8 @@ The inspector separates merged desired, startup-mounted/captured, next-root prev
42
42
 
43
43
  The rules RPC writes the global DSMM layer. A native override of outside-read, web or rule policy refuses that RPC save; edit or unset the native override instead. An enabled-only native override does not shadow dynamic policy. Ordinary configuration Save still writes its chosen layer, and the runtime uses the resolved global/native policy rather than assuming every global edit wins.
44
44
 
45
+ When enabled, simple command strings in `permissionControl.nativeCommands.entries` take priority over DSMM command rules and legacy command entries: a match skips their ask/deny decisions and automatically approves native `danger-full-access` for that invocation. Unmatched calls retain the ordinary policy path. The grant does not change the session's standing sandbox or transfer to another call; current invocation identity, cancellation and role/tool eligibility still apply. Native approval policy `never` cannot be overridden through the rc2 answerer. Legacy object entries retain their stored scope and behavior when no simple string matches.
46
+
45
47
  The Host installs `installDeploymentPermissionRules` in its owned Core fiber with `agents` injected, the actual `DsmmDeploymentConfig`, a pure writable-Root check and an awaited notification callback. Its `initial` snapshot, `runtime` sync owner and backend are the collaborators for the permission controller and the single permissions RPC. DSH owns approval: an actual manual approval is final for that call and approved scope, without a DSMM post-approval veto from older rules, epochs or internal gates. DSMM has no independent approval queue, UI, TTL or session permit memory. The ordinary `managed-settings` module retains native SettingsForms and supplies only a scoped `configEditor.edit` façade; the root ConfigEditor and its locks, form CAS and reconciliation remain native-owned. Missing or retired ownership refuses managed saves, not an actually approved call. These source interfaces require the corresponding cold Host composition; configuration alone is not mounting evidence.
46
48
 
47
49
  Permission revisions identify the Host profile scope and current global-file/native-descriptor versions, not configuration content integrity or per-rule version maxima. Missing native version authority refuses synchronization. Controlled saves reread storage and publish policy only after notification acknowledges it. A committed global save remains successful with refresh required when postcommit coordination fails; runtime synchronization is a separate state. Notification failure exposes saved/runtime revisions as unsynchronized; recovery rereads authoritative storage. Version, ownership and synchronization checks protect configuration writes and policy adoption, not a second call-approval gate: permission-source changes neither cancel pending native approval nor let DSMM override an actual same-call approval. New calls consume current policy. Conflicts and recovery preserve dirty editor drafts. Native and ordinary JSON rule imports receive `user-import` provenance, while rules RPC provenance comes from the live operator authority. Persistent provenance isn't native approval or a reusable grant. A native once grant doesn't widen session permissions or authorize another call, and a narrower grant isn't full access. Native rejection, caller/native cancellation and original OS failures remain possible; approval doesn't guarantee command success. Only `enabled` remains pinned to the mounted runtime; a desired OFF cannot turn off running controls before restart.
@@ -1,7 +1,7 @@
1
1
  import { jsxs as _jsxs, jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
2
2
  import { useId, useState, useSyncExternalStore } from "react";
3
3
  import { Button, Input } from "@deepseek-ai/dsh-client-ui-primitives";
4
- import { at, enumValues, equal, mergeLayer, parseAdvanced, validateEditorValue } from "./deployment-data.js";
4
+ import { at, enumValues, mergeLayer, parseAdvanced, validateEditorValue } from "./deployment-data.js";
5
5
  import { deploymentFieldLabels } from "./deployment-locales.js";
6
6
  import { permissionEn, permissionZh } from "./permission-locales.js";
7
7
  import { NativeCommandEntries } from "./NativeCommandEntries.js";
@@ -32,7 +32,8 @@ export function displayValue(value, t) {
32
32
  export function AdvancedField({ schema, path, controller, inherited, upper, expanded, onExpandedChange, t }) {
33
33
  const state = useSyncExternalStore(controller.subscribe, controller.getSnapshot), id = useId(), name = path.join(".");
34
34
  const value = at(state.draft, path), raw = state.raw[name], text = raw?.text ?? (value === undefined ? "" : JSON.stringify(value, null, 2)), invalid = raw?.invalid === true;
35
- return _jsxs("details", { className: "dsmm-deployment-group", "data-field": name, open: expanded, onToggle: event => onExpandedChange?.(event.currentTarget.open), children: [_jsxs("summary", { id: `${id}-label`, children: [fieldLabel(path, t), " \u00B7 ", t("advanced")] }), _jsxs("div", { className: "dsmm-field", children: [_jsx("p", { className: "dsmm-hint", id: `${id}-hint`, children: t("advancedHint") }), path[0] === "permissionControl" && _jsx("p", { className: "dsmm-hint", children: permissionText(t)("configRulesHint") }), _jsx("p", { className: "dsmm-hint", children: t(value === undefined ? "inherit" : "explicit") }), upper !== undefined && _jsxs("p", { className: "dsmm-hint", children: [t("profileSource"), ": ", displayValue(upper, t)] }), _jsx("textarea", { id: id, rows: 6, maxLength: 32768, value: text, disabled: !controller.canEdit(), "aria-labelledby": `${id}-label`, "aria-invalid": invalid, "aria-describedby": `${id}-hint ${id}-error`, onChange: event => {
35
+ const unsetLabel = controller.layer === "global" ? t("useDefaults") : t("restoreInheritance");
36
+ return _jsxs("details", { className: "dsmm-deployment-group", "data-field": name, open: expanded, onToggle: event => onExpandedChange?.(event.currentTarget.open), children: [_jsxs("summary", { id: `${id}-label`, children: [fieldLabel(path, t), " \u00B7 ", t("advanced")] }), _jsxs("div", { className: "dsmm-field", children: [_jsx("p", { className: "dsmm-hint", id: `${id}-hint`, children: t("advancedHint") }), path[0] === "permissionControl" && _jsx("p", { className: "dsmm-hint", children: permissionText(t)("configRulesHint") }), _jsx("textarea", { id: id, rows: 6, maxLength: 32768, value: text, disabled: !controller.canEdit(), "aria-labelledby": `${id}-label`, "aria-invalid": invalid, "aria-describedby": `${id}-hint ${id}-error`, onChange: event => {
36
37
  const next = event.currentTarget.value;
37
38
  let parsed, valid = true;
38
39
  try {
@@ -46,19 +47,20 @@ export function AdvancedField({ schema, path, controller, inherited, upper, expa
46
47
  controller.setRaw(name, next, !valid);
47
48
  if (valid)
48
49
  controller.edit(path, parsed);
49
- } }), _jsx("p", { id: `${id}-error`, className: "dsmm-hint", children: invalid ? t("invalid") : "" }), _jsx(Button, { type: "button", variant: "outline", "data-dsmm-unset": name, disabled: !controller.canEdit() || value === undefined && raw === undefined, onClick: () => { controller.clearRaw(name); controller.edit(path, undefined); }, children: t("unset") }), _jsxs("details", { children: [_jsx("summary", { children: t("inherit") }), _jsx("pre", { children: JSON.stringify(inherited, null, 2) })] }), _jsxs("details", { children: [_jsx("summary", { children: "schema" }), _jsx("pre", { children: JSON.stringify(schema, null, 2) })] })] })] });
50
+ } }), _jsx("p", { id: `${id}-error`, className: "dsmm-hint", children: invalid ? t("invalid") : "" }), _jsx(Button, { type: "button", variant: "outline", "data-dsmm-unset": name, disabled: !controller.canEdit() || value === undefined && raw === undefined, onClick: () => { controller.clearRaw(name); controller.edit(path, undefined); }, children: unsetLabel }), _jsxs("details", { children: [_jsx("summary", { children: t("inherit") }), _jsx("pre", { children: JSON.stringify(inherited, null, 2) })] }), _jsxs("details", { children: [_jsx("summary", { children: "schema" }), _jsx("pre", { children: JSON.stringify(schema, null, 2) })] })] })] });
50
51
  }
51
52
  export function ScalarField({ schema, path, controller, inherited, t }) {
52
53
  const state = useSyncExternalStore(controller.subscribe, controller.getSnapshot), id = useId(), name = path.join(".");
53
54
  const value = at(state.draft, path), raw = state.raw[name], bad = raw?.invalid === true;
54
55
  const units = name === "guards.toolOutputTruncation.maxInlineBytes" ? ` · ${permissionText(t)("unitBytes")}` : name === "guards.questionLabelHelper.maxLabelChars" ? ` · ${permissionText(t)("unitChars")}` : "";
56
+ const unsetLabel = controller.layer === "global" ? t("useDefaults") : t("restoreInheritance");
55
57
  return _jsxs(_Fragment, { children: [_jsx("label", { htmlFor: id, children: fieldLabel(path, t) }), _jsxs("div", { className: "dsmm-actions", children: [_jsx(Input, { className: "dsmm-input", id: id, type: "text", inputMode: schema.type === "number" ? "decimal" : undefined, value: raw?.text ?? String(value ?? inherited ?? ""), disabled: !controller.canEdit(), "aria-invalid": bad, "aria-describedby": `${id}-error`, onChange: event => {
56
58
  const text = event.currentTarget.value, candidate = schema.type === "number" ? Number(text) : text;
57
59
  const valid = (schema.type !== "number" || text.trim() !== "") && validateEditorValue(candidate, schema);
58
60
  controller.setRaw(name, text, !valid);
59
61
  if (valid)
60
62
  controller.edit(path, candidate);
61
- } }), _jsx(Button, { type: "button", variant: "outline", "data-dsmm-unset": name, disabled: !controller.canEdit() || value === undefined && raw === undefined, onClick: () => { controller.clearRaw(name); controller.edit(path, undefined); }, children: t("unset") })] }), _jsxs("p", { id: `${id}-error`, className: "dsmm-hint", children: [bad ? t("invalid") : "", schema.type === "number" && (schema.min !== undefined || schema.max !== undefined) ? ` ${schema.min ?? "—"} – ${schema.max ?? "—"}` : "", units] })] });
63
+ } }), _jsx(Button, { type: "button", variant: "outline", "data-dsmm-unset": name, disabled: !controller.canEdit() || value === undefined && raw === undefined, onClick: () => { controller.clearRaw(name); controller.edit(path, undefined); }, children: unsetLabel })] }), _jsxs("p", { id: `${id}-error`, className: "dsmm-hint", children: [bad ? t("invalid") : "", schema.type === "number" && (schema.min !== undefined || schema.max !== undefined) ? ` ${schema.min ?? "—"} – ${schema.max ?? "—"}` : "", units] })] });
62
64
  }
63
65
  export function Field({ schema, path, controller, initiallyOpen = false, disclosures, t }) {
64
66
  if (schema.type === "transform" && schema.inner !== undefined)
@@ -66,6 +68,7 @@ export function Field({ schema, path, controller, initiallyOpen = false, disclos
66
68
  const state = useSyncExternalStore(controller.subscribe, controller.getSnapshot), snapshot = state.snapshot, id = useId(), name = path.join(".");
67
69
  const [open, setOpen] = useState(disclosures?.get(name) ?? initiallyOpen);
68
70
  const expand = (expanded) => { disclosures?.set(name, expanded); setOpen(expanded); };
71
+ const unsetLabel = controller.layer === "global" ? t("useDefaults") : t("restoreInheritance");
69
72
  const unsetGroup = (event) => {
70
73
  // The group action lives in the title row; prevent the disclosure's own activation
71
74
  // instead of swallowing key events, so Enter/Space each activate this button once.
@@ -90,9 +93,9 @@ export function Field({ schema, path, controller, initiallyOpen = false, disclos
90
93
  if (name === "permissionControl.rules")
91
94
  return _jsx("div", { "data-field": name, children: _jsx(PermissionRuleEntries, { controller: controller, value: explicit, inherited: (inherited ?? []), disabled: disabled, onChange: value => controller.edit(path, value), expanded: open, onExpandedChange: expand, t: permissionText(t) }) });
92
95
  if (schema.type === "object" && schema.fields !== undefined && path[0] !== "roleRouting")
93
- return _jsxs("details", { className: "dsmm-deployment-group", "data-field": name, open: open, onToggle: event => expand(event.currentTarget.open), children: [_jsx("summary", { className: "dsmm-group-summary-row", children: _jsxs("span", { className: "dsmm-group-summary", children: [_jsx("span", { className: "dsmm-group-summary-label", children: fieldLabel(path, t) }), _jsx(Button, { type: "button", variant: "outline", className: "dsmm-group-summary-action", "data-dsmm-unset": name, hidden: !open, disabled: disabled || explicit === undefined && !Object.keys(state.raw).some(key => key === name || key.startsWith(`${name}.`)), onClick: unsetGroup, children: t("unsetGroup") })] }) }), _jsxs("div", { children: [name === "permissionControl" && _jsx("p", { className: "dsmm-hint", children: permissionText(t)("configPolicyHint") }), _jsx("p", { className: "dsmm-hint", children: t(explicit === undefined ? "inherit" : "explicit") }), Object.entries(schema.fields).map(([key, node]) => _jsx(Field, { schema: node, path: [...path, key], controller: controller, disclosures: disclosures, t: t }, key))] })] });
96
+ return _jsxs("details", { className: "dsmm-deployment-group", "data-field": name, open: open, onToggle: event => expand(event.currentTarget.open), children: [_jsx("summary", { className: "dsmm-group-summary-row", children: _jsxs("span", { className: "dsmm-group-summary", children: [_jsx("span", { className: "dsmm-group-summary-label", children: fieldLabel(path, t) }), _jsx(Button, { type: "button", variant: "outline", className: "dsmm-group-summary-action", "data-dsmm-unset": name, hidden: !open, disabled: disabled || explicit === undefined && !Object.keys(state.raw).some(key => key === name || key.startsWith(`${name}.`)), onClick: unsetGroup, children: unsetLabel })] }) }), _jsxs("div", { children: [name === "permissionControl" && _jsx("p", { className: "dsmm-hint", children: permissionText(t)("configPolicyHint") }), Object.entries(schema.fields).map(([key, node]) => _jsx(Field, { schema: node, path: [...path, key], controller: controller, disclosures: disclosures, t: t }, key))] })] });
94
97
  if (!["boolean", "string", "number"].includes(schema.type) && choices === null)
95
98
  return _jsx(AdvancedField, { schema: schema, path: path, controller: controller, inherited: inherited, upper: controller.layer === "global" ? at(snapshot.profile, path) : undefined, expanded: open, onExpandedChange: expand, t: t });
96
- return _jsxs("div", { className: "dsmm-field dsmm-deployment-field", "data-field": name, children: [schema.type === "boolean" || choices !== null ? _jsxs(_Fragment, { children: [_jsx("label", { htmlFor: id, children: fieldLabel(path, t) }), _jsxs("select", { id: id, disabled: disabled, value: explicit === undefined ? "inherit" : JSON.stringify(explicit), onChange: event => controller.edit(path, event.currentTarget.value === "inherit" ? undefined : JSON.parse(event.currentTarget.value)), children: [_jsx("option", { value: "inherit", children: `${t("unset")} · ${displayValue(inherited, t)}` }), (choices ?? [true, false]).map(choice => _jsx("option", { value: JSON.stringify(choice), children: displayValue(choice, t) }, String(choice)))] })] }) : _jsx(ScalarField, { schema: schema, path: path, controller: controller, inherited: inherited, t: t }), name === "modelParameters.passthrough" && _jsx("p", { className: "dsmm-hint", children: t("modelParametersHint") }), name === "permissionControl.enabled" && _jsx("p", { className: "dsmm-hint", children: permissionText(t)("coldHint") }), explicit !== undefined && _jsx("p", { className: "dsmm-hint", children: t(equal(explicit, at(snapshot.defaults, path)) ? "defaultPin" : "explicit") }), controller.layer === "profile" && at(snapshot.nativeForm?.base, path) !== undefined && _jsx("p", { className: "dsmm-hint", children: t("hostPin") }), controller.layer === "global" && at(snapshot.profile, path) !== undefined && _jsxs("p", { className: "dsmm-hint", children: [t("profileSource"), ": ", displayValue(at(snapshot.profile, path), t), " \u00B7 ", t("explicit")] })] });
99
+ return _jsxs("div", { className: "dsmm-field dsmm-deployment-field", "data-field": name, children: [schema.type === "boolean" || choices !== null ? _jsxs(_Fragment, { children: [_jsx("label", { htmlFor: id, children: fieldLabel(path, t) }), _jsxs("select", { id: id, disabled: disabled, value: explicit === undefined ? "inherit" : JSON.stringify(explicit), onChange: event => controller.edit(path, event.currentTarget.value === "inherit" ? undefined : JSON.parse(event.currentTarget.value)), children: [_jsx("option", { value: "inherit", children: `${unsetLabel} · ${displayValue(inherited, t)}` }), (choices ?? [true, false]).map(choice => _jsx("option", { value: JSON.stringify(choice), children: displayValue(choice, t) }, String(choice)))] })] }) : _jsx(ScalarField, { schema: schema, path: path, controller: controller, inherited: inherited, t: t }), name === "modelParameters.passthrough" && _jsx("p", { className: "dsmm-hint", children: t("modelParametersHint") }), name === "permissionControl.enabled" && _jsx("p", { className: "dsmm-hint", children: permissionText(t)("coldHint") })] });
97
100
  }
98
101
  //# sourceMappingURL=DeploymentFields.js.map
@@ -1,15 +1,15 @@
1
- import type { NativeCommandEntry } from "../permission-settings.js";
1
+ import type { NativeCommandRule } from "../permission-settings.js";
2
2
  import type { PermissionLocaleKey } from "./permission-locales.js";
3
3
  import type { DeploymentController } from "./deployment-controller.js";
4
4
  type Text = (key: PermissionLocaleKey) => string;
5
- export declare function validNativeEntries(entries: readonly NativeCommandEntry[]): boolean;
6
- export declare function emptyNativeEntry(): NativeCommandEntry;
5
+ export declare function validNativeEntries(entries: readonly NativeCommandRule[]): boolean;
6
+ export declare function emptyNativeEntry(): NativeCommandRule;
7
7
  export declare function NativeCommandEntries({ value, inherited, controller, disabled, onChange, setInvalid, t }: {
8
- value: readonly NativeCommandEntry[] | undefined;
9
- inherited: readonly NativeCommandEntry[];
8
+ value: readonly NativeCommandRule[] | undefined;
9
+ inherited: readonly NativeCommandRule[];
10
10
  controller: DeploymentController;
11
11
  disabled: boolean;
12
- onChange(value: readonly NativeCommandEntry[] | undefined): void;
12
+ onChange(value: readonly NativeCommandRule[] | undefined): void;
13
13
  setInvalid(path: string, bad: boolean): void;
14
14
  t: Text;
15
15
  }): import("react").JSX.Element;
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useId, useSyncExternalStore } from "react";
3
3
  import { Button, Input } from "@deepseek-ai/dsh-client-ui-primitives";
4
- import { parseNativeCommandPattern, parseNativeCommands } from "../permission-settings.js";
4
+ import { parseNativeCommands } from "../permission-settings.js";
5
5
  const ENTRIES_PATH = "permissionControl.nativeCommands.entries";
6
6
  export function validNativeEntries(entries) {
7
7
  try {
@@ -13,66 +13,67 @@ export function validNativeEntries(entries) {
13
13
  }
14
14
  }
15
15
  export function emptyNativeEntry() {
16
- return { id: "", mode: "ask", sandboxMode: "workspace-write", match: { tool: "bash", workingDirectory: "", commandPattern: "" } };
16
+ return "";
17
17
  }
18
- function patternValid(value) {
18
+ function validNativeRule(rule) {
19
19
  try {
20
- parseNativeCommandPattern(value);
20
+ parseNativeCommands({ entries: [rule] });
21
21
  return true;
22
22
  }
23
23
  catch {
24
24
  return false;
25
25
  }
26
26
  }
27
- function TextField({ id, label, value, disabled, onChange }) {
28
- return _jsxs("div", { className: "dsmm-field", children: [_jsx("label", { htmlFor: id, children: label }), _jsx(Input, { className: "dsmm-input", id: id, value: value, maxLength: 32768, disabled: disabled, required: true, onChange: event => onChange(event.currentTarget.value) })] });
27
+ function LegacyEntry({ entry, index, disabled, remove, t }) {
28
+ return _jsxs("div", { className: "dsmm-field dsmm-command-entry dsmm-legacy-entry", children: [_jsxs("div", { className: "dsmm-actions", children: [_jsxs("div", { className: "dsmm-command-summary", children: [_jsx("span", { className: "dsmm-legacy-badge", children: t("legacyEntry") }), _jsx("code", { children: entry.match.commandPattern || entry.id })] }), _jsxs(Button, { type: "button", variant: "outline", disabled: disabled, onClick: remove, children: [t("removeEntry"), " ", index + 1] })] }), _jsxs("details", { className: "dsmm-legacy-details", children: [_jsxs("summary", { children: [t("legacyDetails"), ": ", entry.id] }), _jsxs("dl", { className: "dsmm-kv", children: [_jsx("dt", { children: t("tool") }), _jsx("dd", { children: entry.match.tool }), _jsx("dt", { children: t("cwd") }), _jsx("dd", { children: entry.match.workingDirectory || "(any)" }), _jsx("dt", { children: t("mode") }), _jsx("dd", { children: t(`action:${entry.mode}`) || entry.mode }), _jsx("dt", { children: t("sandboxMode") }), _jsx("dd", { children: entry.sandboxMode })] })] })] });
29
29
  }
30
- function Pattern({ value, controller, name, disabled, onChange, t }) {
31
- const state = useSyncExternalStore(controller.subscribe, controller.getSnapshot), id = useId(), raw = state.raw[name], text = raw?.text ?? value, bad = raw?.invalid === true;
32
- return _jsxs("div", { className: "dsmm-field", children: [_jsx("label", { htmlFor: `${id}-pattern`, children: t("pattern") }), _jsx(Input, { className: "dsmm-input", id: `${id}-pattern`, value: text, maxLength: 32768, disabled: disabled, required: true, "aria-invalid": bad, "aria-describedby": bad ? `${id}-error` : undefined, spellCheck: false, autoComplete: "off", onChange: event => {
33
- const next = event.currentTarget.value, valid = patternValid(next);
34
- controller.setRaw(name, next, !valid);
35
- if (valid)
36
- onChange(next);
37
- } }), bad && _jsx("p", { id: `${id}-error`, className: "dsmm-hint", children: t("invalidPattern") })] });
38
- }
39
- function Entry({ entry, index, controller, disabled, change, remove, t }) {
40
- const id = useId(), match = entry.match, row = `${ENTRIES_PATH}.${index}`;
41
- const valid = validNativeEntries([entry]);
42
- return _jsxs("fieldset", { "aria-describedby": !valid ? `${id}-error` : undefined, children: [_jsxs("legend", { children: [t("nativeCommands"), " ", index + 1] }), !valid && _jsx("p", { className: "dsmm-hint", id: `${id}-error`, children: t("invalidEntry") }), _jsx(TextField, { id: `${id}-id`, label: t("entryId"), value: entry.id, disabled: disabled, onChange: value => change({ ...entry, id: value }) }), _jsxs("div", { className: "dsmm-field", children: [_jsx("label", { htmlFor: `${id}-tool`, children: t("tool") }), _jsx("select", { id: `${id}-tool`, disabled: disabled, value: match.tool, onChange: event => {
43
- const tool = event.currentTarget.value;
44
- if (tool === "bash" || tool === "pwsh")
45
- change({ ...entry, match: { ...match, tool } });
46
- }, children: ["bash", "pwsh"].map(value => _jsx("option", { value: value, children: value }, value)) })] }), _jsx(Pattern, { value: match.commandPattern, controller: controller, name: `${row}.commandPattern`, disabled: disabled, t: t, onChange: commandPattern => change({ ...entry, match: { ...match, commandPattern } }) }), _jsx(TextField, { id: `${id}-workingDirectory`, label: t("cwd"), value: match.workingDirectory, disabled: disabled, onChange: workingDirectory => change({ ...entry, match: { ...match, workingDirectory } }) }), _jsxs("div", { className: "dsmm-field", children: [_jsx("label", { htmlFor: `${id}-sandbox`, children: t("sandboxMode") }), _jsxs("select", { id: `${id}-sandbox`, disabled: disabled, value: entry.sandboxMode, onChange: event => {
47
- if (event.currentTarget.value === "workspace-write")
48
- change({ ...entry, sandboxMode: "workspace-write" });
49
- }, children: [_jsx("option", { value: "workspace-write", children: "workspace-write" }), entry.sandboxMode === "danger-full-access" && _jsx("option", { value: "danger-full-access", disabled: true, children: t("restrictedFullAccess") })] })] }), _jsxs("div", { className: "dsmm-field", children: [_jsx("label", { htmlFor: `${id}-mode`, children: t("mode") }), _jsxs("select", { id: `${id}-mode`, disabled: disabled, value: entry.mode, onChange: event => {
50
- const mode = event.currentTarget.value;
51
- if (mode === "ask" || mode === "allow")
52
- change({ ...entry, mode });
53
- }, children: [_jsx("option", { value: "ask", children: t("action:ask") }), _jsx("option", { value: "allow", children: t("action:allow") })] })] }), _jsxs(Button, { type: "button", variant: "outline", disabled: disabled, onClick: remove, children: [t("removeEntry"), " ", index + 1] })] });
30
+ function StringEntry({ value, index, controller, disabled, change, remove, t }) {
31
+ const id = useId(), row = `${ENTRIES_PATH}.${index}`;
32
+ const state = useSyncExternalStore(controller.subscribe, controller.getSnapshot);
33
+ const raw = state.raw[row];
34
+ const text = raw?.text ?? value;
35
+ const bad = raw?.invalid === true || (raw === undefined && !validNativeRule(value));
36
+ return _jsxs("div", { className: "dsmm-field dsmm-command-entry", children: [_jsx("label", { htmlFor: `${id}-pattern`, children: t("pattern") }), _jsxs("div", { className: "dsmm-actions", children: [_jsx(Input, { className: "dsmm-input", id: `${id}-pattern`, value: text, maxLength: 32768, disabled: disabled, required: true, "aria-invalid": bad, "aria-describedby": bad ? `${id}-error` : undefined, spellCheck: false, autoComplete: "off", onChange: event => {
37
+ const next = event.currentTarget.value;
38
+ const valid = validNativeRule(next);
39
+ controller.setRaw(row, next, !valid);
40
+ change(next);
41
+ } }), _jsxs(Button, { type: "button", variant: "outline", disabled: disabled, onClick: remove, children: [t("removeEntry"), " ", index + 1] })] }), bad && _jsx("p", { id: `${id}-error`, className: "dsmm-hint", children: t("invalidPattern") })] });
54
42
  }
55
43
  export function NativeCommandEntries({ value, inherited, controller, disabled, onChange, setInvalid, t }) {
56
44
  const entries = value ?? inherited, name = ENTRIES_PATH;
57
45
  const state = useSyncExternalStore(controller.subscribe, controller.getSnapshot);
58
- const invalidRows = state.invalidFields.filter(path => path.startsWith(`${name}.`) && path.endsWith(".commandPattern"));
59
- const valid = validNativeEntries(entries);
60
- const change = (next) => { setInvalid(name, !validNativeEntries(next ?? inherited)); onChange(next); };
46
+ const invalidRows = state.invalidFields.filter(path => path === name || path.startsWith(`${name}.`));
47
+ const valid = validNativeEntries(entries) && invalidRows.length === 0;
48
+ const change = (next) => {
49
+ setInvalid(name, !validNativeEntries(next ?? inherited));
50
+ onChange(next);
51
+ };
61
52
  const remove = (index) => {
62
53
  const drafts = Object.entries(state.raw).flatMap(([path, draft]) => {
63
54
  if (!path.startsWith(`${name}.`))
64
55
  return [];
65
- const [row, ...field] = path.slice(name.length + 1).split(".");
56
+ const remainder = path.slice(name.length + 1);
57
+ const dotIndex = remainder.indexOf(".");
58
+ const row = dotIndex === -1 ? remainder : remainder.slice(0, dotIndex);
59
+ const subPath = dotIndex === -1 ? "" : remainder.slice(dotIndex);
66
60
  const position = Number(row);
67
- if (!Number.isInteger(position) || field.length === 0 || position === index)
61
+ if (!Number.isInteger(position) || position === index)
68
62
  return [];
69
- return [{ path: `${name}.${position > index ? position - 1 : position}.${field.join(".")}`, draft }];
63
+ return [{ path: `${name}.${position > index ? position - 1 : position}${subPath}`, draft }];
70
64
  });
71
65
  controller.clearRaw(name);
72
66
  for (const draft of drafts)
73
67
  controller.setRaw(draft.path, draft.draft.text, draft.draft.invalid);
74
68
  change(entries.filter((_, position) => position !== index));
75
69
  };
76
- return _jsxs("details", { className: "dsmm-deployment-group", children: [_jsxs("summary", { children: [t("nativeCommands"), " ", _jsx("code", { children: name })] }), _jsxs("div", { className: "dsmm-structured", children: [_jsx("p", { className: "dsmm-hint", children: t("nativeCommandsHint") }), _jsx("p", { className: "dsmm-hint", children: t("patternHint") }), _jsx("p", { className: "dsmm-hint", children: t("registrationUnresolved") }), _jsx("p", { className: "dsmm-hint", children: t(value === undefined ? "inheritedEntries" : "explicitEntries") }), !valid && _jsx("p", { className: "dsmm-issue", role: "alert", children: t("invalidEntry") }), invalidRows.length > 0 && _jsx("p", { className: "dsmm-hint", children: t("invalidPatternHint") }), entries.length === 0 && _jsx("p", { children: t("noEntries") }), entries.map((entry, index) => _jsx(Entry, { entry: entry, index: index, controller: controller, disabled: disabled, t: t, change: next => change(entries.map((row, position) => position === index ? next : row)), remove: () => remove(index) }, index)), _jsxs("div", { className: "dsmm-actions", children: [_jsx(Button, { type: "button", variant: "outline", disabled: disabled || entries.length >= 1024, onClick: () => change([...entries, emptyNativeEntry()]), children: t("addEntry") }), _jsx(Button, { type: "button", variant: "outline", "data-dsmm-unset": name, disabled: disabled || value === undefined && invalidRows.length === 0, onClick: () => { controller.clearRaw(name); change(undefined); }, children: t("unset") })] })] })] });
70
+ const add = () => {
71
+ const nextIndex = entries.length;
72
+ controller.setRaw(`${name}.${nextIndex}`, "", true);
73
+ change([...entries, ""]);
74
+ };
75
+ const isGlobal = controller.layer === "global";
76
+ const unsetLabel = isGlobal ? (t("useDefaults") || "Use defaults") : (t("restoreInheritance") || "Restore inheritance");
77
+ return _jsxs("details", { className: "dsmm-deployment-group", children: [_jsxs("summary", { children: [t("nativeCommands"), " ", _jsx("code", { children: name })] }), _jsxs("div", { className: "dsmm-structured", children: [_jsx("p", { className: "dsmm-hint", children: t("nativeCommandsHint") }), !valid && _jsx("p", { className: "dsmm-issue", role: "alert", children: t("invalidEntry") }), entries.length === 0 && _jsx("p", { children: t("noEntries") }), entries.map((entry, index) => typeof entry === "string" ? (_jsx(StringEntry, { value: entry, index: index, controller: controller, disabled: disabled, t: t, change: next => change(entries.map((row, position) => position === index ? next : row)), remove: () => remove(index) }, index)) : (_jsx(LegacyEntry, { entry: entry, index: index, disabled: disabled, t: t, remove: () => remove(index) }, index))), _jsxs("div", { className: "dsmm-actions", children: [_jsx(Button, { type: "button", variant: "outline", disabled: disabled || entries.length >= 1024, onClick: add, children: t("addEntry") }), _jsx(Button, { type: "button", variant: "outline", "data-dsmm-unset": name, disabled: disabled || (value === undefined && invalidRows.length === 0), onClick: () => { controller.clearRaw(name); change(undefined); }, children: unsetLabel })] })] })] });
77
78
  }
78
79
  //# sourceMappingURL=NativeCommandEntries.js.map
@@ -52,7 +52,9 @@ export function PermissionRuleEntries({ value, inherited, controller, disabled,
52
52
  };
53
53
  const remove = (index) => change(entries.filter((_, position) => position !== index));
54
54
  const held = disabled || locked;
55
- return _jsxs("details", { className: "dsmm-deployment-group", "data-field": name, open: expanded, onToggle: event => onExpandedChange?.(event.currentTarget.open), children: [_jsxs("summary", { children: [t("configRules"), " ", _jsx("code", { children: name })] }), _jsxs("div", { className: "dsmm-structured", children: [_jsx("p", { className: "dsmm-hint", children: t("configRulesHint") }), _jsx("p", { className: "dsmm-hint", children: t(value === undefined ? "inheritedRules" : "explicitRules") }), !valid && _jsx("p", { className: "dsmm-issue", role: "alert", children: t("invalidRule") }), entries.length === 0 && _jsx("p", { children: t("configRulesEmpty") }), entries.map((rule, index) => _jsx(Row, { rule: rule, index: index, disabled: held, t: t, change: next => change(entries.map((row, position) => position === index ? next : row)), remove: () => remove(index) }, index)), _jsxs("div", { className: "dsmm-actions", children: [_jsx(Button, { type: "button", variant: "outline", disabled: held || entries.length >= 1024, onClick: () => change([...entries, newRule()]), children: t("addRule") }), _jsx(Button, { type: "button", variant: "outline", "data-dsmm-unset": name, disabled: disabled || value === undefined && raw === undefined, onClick: () => { controller.clearRaw(name); onChange(undefined); }, children: t("unset") })] }), _jsxs("details", { children: [_jsx("summary", { id: `${id}-advanced-label`, children: t("advancedRules") }), _jsxs("div", { className: "dsmm-field", children: [_jsx("textarea", { id: `${id}-advanced`, rows: 6, maxLength: 32768, value: text, disabled: disabled, "aria-labelledby": `${id}-advanced-label`, "aria-invalid": locked, "aria-describedby": `${id}-error`, onChange: event => {
55
+ const isGlobal = controller.layer === "global";
56
+ const unsetLabel = isGlobal ? t("useDefaults") : t("restoreInheritance");
57
+ return _jsxs("details", { className: "dsmm-deployment-group", "data-field": name, open: expanded, onToggle: event => onExpandedChange?.(event.currentTarget.open), children: [_jsxs("summary", { children: [t("configRules"), " ", _jsx("code", { children: name })] }), _jsxs("div", { className: "dsmm-structured", children: [_jsx("p", { className: "dsmm-hint", children: t("configRulesHint") }), !valid && _jsx("p", { className: "dsmm-issue", role: "alert", children: t("invalidRule") }), entries.length === 0 && _jsx("p", { children: t("configRulesEmpty") }), entries.map((rule, index) => _jsx(Row, { rule: rule, index: index, disabled: held, t: t, change: next => change(entries.map((row, position) => position === index ? next : row)), remove: () => remove(index) }, index)), _jsxs("div", { className: "dsmm-actions", children: [_jsx(Button, { type: "button", variant: "outline", disabled: held || entries.length >= 1024, onClick: () => change([...entries, newRule()]), children: t("addRule") }), _jsx(Button, { type: "button", variant: "outline", "data-dsmm-unset": name, disabled: disabled || value === undefined && raw === undefined, onClick: () => { controller.clearRaw(name); onChange(undefined); }, children: unsetLabel })] }), _jsxs("details", { children: [_jsx("summary", { id: `${id}-advanced-label`, children: t("advancedRules") }), _jsxs("div", { className: "dsmm-field", children: [_jsx("textarea", { id: `${id}-advanced`, rows: 6, maxLength: 32768, value: text, disabled: disabled, "aria-labelledby": `${id}-advanced-label`, "aria-invalid": locked, "aria-describedby": `${id}-error`, onChange: event => {
56
58
  const next = event.currentTarget.value;
57
59
  let parsed, ok = false;
58
60
  try {
@@ -261,6 +261,7 @@ export declare const childrenLocaleZh: {
261
261
  no: string;
262
262
  activity: string;
263
263
  runtime: string;
264
+ refresh: string;
264
265
  images: string;
265
266
  title: string;
266
267
  liveRoute: string;
@@ -273,7 +274,6 @@ export declare const childrenLocaleZh: {
273
274
  steer: string;
274
275
  foreign: string;
275
276
  reading: string;
276
- refresh: string;
277
277
  noSession: string;
278
278
  runs: string;
279
279
  emptyRuns: string;
@@ -42,6 +42,8 @@ export declare const deploymentEn: {
42
42
  unsetGroup: string;
43
43
  unitBytes: string;
44
44
  unitChars: string;
45
+ useDefaults: string;
46
+ restoreInheritance: string;
45
47
  nativeRuntimeState: string;
46
48
  nativeRuntimeBinding: string;
47
49
  nativeRuntimeFence: string;
@@ -21,6 +21,7 @@ export const deploymentEn = {
21
21
  nativeRuntimeHint: "Native default On; Host base pins still apply. Mounting is captured at startup. Saving stages desired configuration only; it does not start/stop providers or cancel running sessions. A separate Host restart may cancel sessions.",
22
22
  nativeRuntimeReadinessHint: "Task progress is available in the session.",
23
23
  unsetGroup: "Use defaults for this group", unitBytes: "bytes", unitChars: "characters",
24
+ useDefaults: "Use defaults", restoreInheritance: "Restore inheritance",
24
25
  nativeRuntimeState: "Observed native runtime", nativeRuntimeBinding: "Observed runtime composition", nativeRuntimeFence: "Execution admission ready", nativeRuntimeRestart: "Restart required", nativeRuntimeStock: "Official Host runtime", nativeRuntimeUnavailable: "Unavailable / unknown",
25
26
  "nativeRuntimeReason-explicit-composition-required": "The Host requires an explicit native runtime composition.", "nativeRuntimeReason-duplicate-provider": "More than one native provider is present; readiness is not confirmed.", "nativeRuntimeReason-authority-not-ready": "Native execution authority is not ready.", "nativeRuntimeReason-disabled": "The saved native runtime is disabled.", "nativeRuntimeReason-pending-restart": "Saved desired state differs from the mounted native composition; restart is pending.", "nativeRuntimeReason-scope-conflict": "Native scope ownership conflicts; readiness is not confirmed.",
26
27
  saveGlobal: "Save", saveProfile: "Save", saving: "Saving…", refresh: "Refresh", discard: "Discard and reload", dirty: "Unsaved changes", saved: "Saved",
@@ -63,6 +64,7 @@ export const deploymentZh = {
63
64
  nativeRuntimeHint: "原生默认开启,Host base 固定值仍适用;挂载仅启动时捕获。保存只设置 desired,不会启动/停止提供商或取消当前会话;独立 Host 重启可能取消会话。",
64
65
  nativeRuntimeReadinessHint: "任务进度可在会话中查看。",
65
66
  unsetGroup: "整组使用默认配置", unitBytes: "字节", unitChars: "字符",
67
+ useDefaults: "使用默认值", restoreInheritance: "恢复继承",
66
68
  nativeRuntimeState: "已观测原生运行时", nativeRuntimeBinding: "已观测运行时组合", nativeRuntimeFence: "执行准入已就绪", nativeRuntimeRestart: "需要重启", nativeRuntimeStock: "官方 Host 运行时", nativeRuntimeUnavailable: "不可用/未知",
67
69
  "nativeRuntimeReason-explicit-composition-required": "Host 需要显式的原生运行时组合。", "nativeRuntimeReason-duplicate-provider": "存在重复原生 provider,无法确认就绪状态。", "nativeRuntimeReason-authority-not-ready": "原生执行权限尚未就绪。", "nativeRuntimeReason-disabled": "已保存的原生运行时为关闭。", "nativeRuntimeReason-pending-restart": "已保存 desired 与已挂载原生组合不同,等待独立重启。", "nativeRuntimeReason-scope-conflict": "原生 scope 所有权冲突,无法确认就绪状态。",
68
70
  saveGlobal: "保存", saveProfile: "保存", saving: "正在保存…", refresh: "刷新", discard: "丢弃并重载", dirty: "未保存", saved: "已保存",
@@ -67,6 +67,10 @@ export declare const permissionEn: {
67
67
  pattern: string;
68
68
  patternHint: string;
69
69
  invalidPattern: string;
70
+ useDefaults: string;
71
+ restoreInheritance: string;
72
+ legacyEntry: string;
73
+ legacyDetails: string;
70
74
  restrictedFullAccess: string;
71
75
  rulesUnavailable: string;
72
76
  configRules: string;
@@ -18,12 +18,13 @@ export const permissionEn = {
18
18
  configRulesHint: "Record list for this layer. The Host owns source and revision; imported records are never verified approvals. An empty list is an explicit empty replacement.",
19
19
  coldHint: "Host restart required; current protection stays active. Restart may cancel sessions.",
20
20
  guardScope: "Guard scope", shellSafety: "Shell command safety", gitWrite: "Git write approval", toolOutputTruncation: "Tool output truncation", planValidation: "Plan format validation", questionLabels: "Question label helper", todoDiscipline: "Todo discipline helper", maxInlineBytes: "Maximum inline output", maxLabelChars: "Maximum label length", unitBytes: "bytes", unitChars: "characters",
21
- nativeCommands: "Command rules", nativeCommandsHint: "Default Off. New entries use Ask and workspace-write; other permission limits still apply.",
21
+ nativeCommands: "Command rules", nativeCommandsHint: "Matching commands and programs they launch automatically receive full access for this invocation, including OS-permitted paths outside the workspace.",
22
22
  registrationUnresolved: "Executor identity unconfirmed; verify tool, executable, environment and sandbox.",
23
- entryId: "Entry ID", tool: "Tool", sandboxMode: "Sandbox mode", mode: "Native action", addEntry: "Add entry", removeEntry: "Remove entry", noEntries: "No 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 entry: IDs must be unique and nonblank, pattern valid, working directory absolute. Draft retained; Save locked.",
24
- pattern: "Command pattern",
25
- patternHint: "Example: go build|test *. With or without *, any trailing arguments (including program scripts) are allowed. No character glob, regex or path grants.",
26
- invalidPattern: "Invalid pattern: one executable and the subcommand position only, space-separated. Pipe alternatives must be nonblank literals; * may only be the final token.",
23
+ entryId: "Entry ID", tool: "Tool", sandboxMode: "Sandbox mode", mode: "Native action", addEntry: "Add entry", removeEntry: "Remove entry", noEntries: "No 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 entry. Draft retained; Save locked.",
24
+ pattern: "Command",
25
+ patternHint: "Matching commands execute with full access automatically.",
26
+ invalidPattern: "Enter an exact command or prefix (e.g. git, git status, go test)",
27
+ useDefaults: "Use defaults", restoreInheritance: "Restore inheritance", legacyEntry: "Legacy rule", legacyDetails: "Rule constraints",
27
28
  restrictedFullAccess: "danger-full-access — retained from the saved value; not offered here",
28
29
  rulesUnavailable: "Editing requires an open main session, local editing permission and synced rules. Check profile overrides, then reconnect and refresh.",
29
30
  configRules: "Imported configuration rules", inheritedRules: "Inherited records; editing pins a replacement list in this layer.", explicitRules: "Explicit replacement list in this layer.",
@@ -78,12 +79,13 @@ export const permissionZh = {
78
79
  configRulesHint: "此配置层的记录列表。来源与版本由宿主维护;导入记录永不代表已核验批准。空列表表示显式清空。",
79
80
  coldHint: "更改此开关需重启宿主,此前保留当前保护。重启可能取消会话。",
80
81
  guardScope: "保护范围", shellSafety: "Shell 命令安全", gitWrite: "Git 写入审批", toolOutputTruncation: "工具输出截断", planValidation: "计划格式校验", questionLabels: "问题标签辅助", todoDiscipline: "Todo 纪律辅助", maxInlineBytes: "内联输出上限", maxLabelChars: "标签长度上限", unitBytes: "字节", unitChars: "字符",
81
- nativeCommands: "命令规则", nativeCommandsHint: "默认关闭;新条目使用询问与 workspace-write,仍受其他权限限制。",
82
+ nativeCommands: "命令规则", nativeCommandsHint: "匹配命令及其启动的程序,本次自动获 full access,可访问操作系统允许的工作区外路径。",
82
83
  registrationUnresolved: "执行器身份未确认;请先核验工具、可执行程序、环境与沙箱。",
83
- entryId: "条目 ID", tool: "工具", sandboxMode: "沙箱模式", mode: "原生动作", addEntry: "添加条目", removeEntry: "移除条目", noEntries: "没有命令条目。", unset: "Unset——恢复继承", inheritedEntries: "继承的条目;编辑后在此层固定为整体替换数组。", explicitEntries: "此层显式整体替换数组。", invalidEntry: "条目无效:ID 需唯一非空、模式有效、工作目录为绝对路径。草稿保留,保存已锁定。",
84
- pattern: "命令模式",
85
- patternHint: "例:go build|test *。省略 * 也允许任意后续参数(含程序脚本);不支持字符通配或正则,也不授予路径权限。",
86
- invalidPattern: "模式无效:仅一个可执行程序与子命令位置,以空格分隔。竖线备选须为非空字面量,* 只能是最后一个 token。",
84
+ entryId: "条目 ID", tool: "工具", sandboxMode: "沙箱模式", mode: "原生动作", addEntry: "添加条目", removeEntry: "移除条目", noEntries: "没有命令条目。", unset: "Unset——恢复继承", inheritedEntries: "继承的条目;编辑后在此层固定为整体替换数组。", explicitEntries: "此层显式整体替换数组。", invalidEntry: "条目无效。草稿保留,保存已锁定。",
85
+ pattern: "命令",
86
+ patternHint: "匹配命令自动以 full access 执行。",
87
+ invalidPattern: "请输入确切命令或前缀(例如 git、git status、go test)",
88
+ useDefaults: "使用默认值", restoreInheritance: "恢复继承", legacyEntry: "旧版规则", legacyDetails: "限制范围",
87
89
  restrictedFullAccess: "danger-full-access——保留自已保存的值,此处不提供创建",
88
90
  rulesUnavailable: "编辑需要已打开的主会话、本地编辑权限与已同步规则。请检查配置覆盖,再重连刷新。",
89
91
  configRules: "导入的配置规则", inheritedRules: "继承的记录;编辑后在此层固定为整体替换列表。", explicitRules: "此层显式整体替换列表。",
@@ -1,3 +1,3 @@
1
1
  /** Geometry and theme aliases extracted in dsmm/DESIGN.md; scoped to this section. */
2
- export declare const PROFILE_STYLES = "\n.dsmm-profiles{width:100%;max-width:760px;min-width:0;display:flex;flex-direction:column;gap:12px;font-family:var(--dsw-font-family);font-size:14px;line-height:22px;color:var(--dsw-alias-label-primary)}\n.dsmm-profiles h2{margin:0;font-size:18px;font-weight:600}\n.dsmm-profiles h3,.dsmm-profiles legend{margin:0;font-size:14px;font-weight:500;line-height:22px}\n.dsmm-profiles :is(label,legend,summary){min-width:0;max-width:100%;overflow-wrap:anywhere}\n.dsmm-profiles :is(.dsmm-structured,.dsmm-session-scope,.dsmm-catalog,.dsmm-policy-fields){min-width:0;display:flex;flex-direction:column;gap:12px}\n.dsmm-profiles fieldset{min-width:0;margin:0;padding:12px;border:1px solid var(--dsw-alias-border-l4);border-radius:var(--dsw-radius-md);display:flex;flex-direction:column;gap:12px}\n.dsmm-profiles .dsmm-route-fields{display:flex;flex-wrap:wrap;gap:12px;min-width:0}\n.dsmm-profiles .dsmm-route-fields>.dsmm-field{flex:1 1 240px;max-width:100%}\n.dsmm-profiles .dsmm-route-fields select{width:100%}\n.dsmm-profiles summary{cursor:pointer;color:var(--dsw-alias-label-primary);min-height:32px;line-height:32px}\n.dsmm-profiles summary:focus-visible{outline:var(--dsw-focus-ring-width,2px) solid var(--dsw-focus-ring-color,var(--dsw-alias-state-business-primary));outline-offset:2px}\n.dsmm-profiles .dsmm-advanced[open]>div{margin-top:8px}\n.dsmm-header-profiles{display:inline-flex;align-items:center;min-width:0;font-family:var(--dsw-font-family);color:var(--dsw-alias-label-primary)}\n.dsmm-header-profiles .dsmm-profile-trigger{width:28px;height:28px;min-height:28px;padding:6px;justify-content:center}\n.dsmm-profile-trigger:focus-visible{outline:var(--dsw-focus-ring-width,2px) solid var(--dsw-focus-ring-color,var(--dsw-alias-state-business-primary));outline-offset:2px}\n.dsmm-profile-menu{font-family:var(--dsw-font-family);font-size:14px;line-height:22px;max-width:calc(100vw - 24px);color:var(--dsw-alias-label-primary)}\n.dsmm-profile-menu [role=presentation]{font:inherit;white-space:normal;overflow-wrap:anywhere;color:var(--dsw-alias-label-secondary)}\n.dsmm-profile-menu [role=menuitem]{font:inherit}\n.dsmm-profile-menu [role=menuitem]>span{white-space:normal;overflow-wrap:anywhere}\n.dsmm-profile-announcement{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}\n.dsmm-profiles p{margin:0;overflow-wrap:anywhere}\n.dsmm-profiles .dsmm-hint{color:var(--dsw-alias-label-secondary)}\n.dsmm-profiles .dsmm-field{min-width:0;display:flex;flex-direction:column;gap:6px}\n.dsmm-profiles .dsmm-actions{display:flex;flex-wrap:wrap;align-items:center;gap:8px}\n.dsmm-profiles button{max-width:100%;white-space:normal;overflow-wrap:anywhere;min-height:36px;height:auto}\n.dsmm-profiles .dsmm-input{width:100%;min-width:0;box-sizing:border-box;border-color:var(--dsw-alias-label-secondary)}\n.dsmm-profiles .dsmm-input input{width:100%;min-width:0;font:inherit;color:inherit}\n.dsmm-profiles .dsmm-choice{position:relative;min-width:0}\n.dsmm-profiles .dsmm-choice .dsmm-input input{padding-right:32px}\n.dsmm-profiles .dsmm-choice .dsmm-choice-toggle{position:absolute;right:4px;top:50%;transform:translateY(-50%);width:28px;height:28px;min-height:28px;padding:4px}\n.dsmm-profiles .dsmm-choice-list{position:absolute;z-index:1;top:100%;left:0;right:0;max-height:240px;overflow-y:auto;list-style:none;margin:4px 0 0;padding:4px;border:1px solid var(--dsw-alias-border-l4);border-radius:var(--dsw-radius-md);background:var(--dsw-alias-bg-layer-1);color:var(--dsw-alias-label-primary)}\n.dsmm-profiles .dsmm-choice-list [role=option]{padding:8px 10px;min-width:0;overflow-wrap:anywhere;cursor:pointer}\n.dsmm-profiles .dsmm-choice-list [role=option]:hover{background:var(--dsw-alias-interactive-bg-hover)}\n.dsmm-profiles .dsmm-choice-list [aria-selected=true]{background:var(--dsw-alias-interactive-bg-active);outline:var(--dsw-focus-ring-width,2px) solid var(--dsw-focus-ring-color,var(--dsw-alias-state-business-primary));outline-offset:-2px}\n.dsmm-profiles select,.dsmm-profiles textarea{box-sizing:border-box;min-width:0;max-width:100%;font:inherit;color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-layer-1);border:1px solid var(--dsw-alias-label-secondary);border-radius:var(--dsw-radius-md)}\n.dsmm-profiles select{width:240px;height:32px;padding:0 10px;text-overflow:ellipsis}\n.dsmm-profiles textarea{width:100%;padding:12px;font-family:var(--ds-font-family-code);resize:vertical;overflow:auto;white-space:pre;}\n.dsmm-profiles select:hover:not(:disabled),.dsmm-profiles textarea:hover:not(:disabled){border-color:var(--dsw-alias-label-primary)}\n.dsmm-profiles select:active:not(:disabled){background:var(--dsw-alias-interactive-bg-active)}\n.dsmm-profiles :is(select,textarea,button):focus-visible,.dsmm-profiles .dsmm-input:has(input:focus-visible){outline:var(--dsw-focus-ring-width,2px) solid var(--dsw-focus-ring-color,var(--dsw-alias-state-business-primary));outline-offset:2px}\n.dsmm-profiles input[type=checkbox]:focus-visible{outline:var(--dsw-focus-ring-width,2px) solid var(--dsw-focus-ring-color,var(--dsw-alias-state-business-primary));outline-offset:2px}\n.dsmm-permissions label.dsmm-actions{min-height:32px}\n.dsmm-permissions input[type=checkbox]{accent-color:var(--dsw-alias-state-business-primary)}\n.dsmm-profiles :is(select,textarea):disabled{color:var(--dsw-alias-label-secondary);background:var(--dsw-alias-bg-module-platform);cursor:not-allowed}\n.dsmm-profiles .dsmm-editor,.dsmm-profiles .dsmm-confirm{min-width:0;display:flex;flex-direction:column;gap:12px;padding:16px;border:1px solid var(--dsw-alias-border-l4);border-radius:var(--dsw-radius-md);background:var(--dsw-alias-bg-module-platform)}\n.dsmm-profiles .dsmm-issue{padding:12px;border-left:4px solid var(--dsw-alias-state-error-primary);color:var(--dsw-alias-label-primary);overflow-wrap:anywhere}\n.dsmm-profiles .dsmm-issue p+p{margin-top:8px}\n.dsmm-profiles .dsmm-status{min-height:22px}\n.dsmm-profiles .dsmm-zone{min-width:0;display:flex;flex-direction:column;gap:12px;padding-top:16px;border-top:1px solid var(--dsw-alias-border-l4)}\n.dsmm-profiles .dsmm-profile-list{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:12px;min-width:0}\n.dsmm-profiles .dsmm-profile-list li{min-width:0;display:flex;flex-direction:column;gap:4px}\n.dsmm-profiles :is(.dsmm-warning,.dsmm-diagnostic,.dsmm-availability){min-width:0;display:flex;flex-direction:column;gap:4px;overflow-wrap:anywhere}\n.dsmm-profiles .dsmm-warning{border-left:4px solid var(--dsw-alias-state-warn-primary);padding:8px 12px;color:var(--dsw-alias-label-primary)}\n.dsmm-deployment{gap:8px}\n.dsmm-section-tabs{display:flex;gap:8px;min-width:0;max-width:100%;overflow-x:auto;overscroll-behavior-x:contain;border-bottom:1px solid var(--dsw-alias-border-l4);padding-bottom:2px}\n.dsmm-section-tabs button{flex:0 0 auto;justify-content:center;white-space:nowrap;border-color:transparent;border-bottom:2px solid transparent;border-radius:var(--dsw-radius-md) var(--dsw-radius-md) 0 0;background:transparent;color:var(--dsw-alias-label-secondary);font-weight:400}\n.dsmm-section-tabs button:hover{background:var(--dsw-alias-interactive-bg-hover)}\n.dsmm-section-tabs button[aria-selected=true]{background:var(--dsw-alias-interactive-bg-active);border-bottom-color:var(--dsw-alias-label-primary);color:var(--dsw-alias-label-primary);font-weight:500}\n.dsmm-section-panel{display:flex;flex-direction:column;gap:16px;min-width:0;width:100%;box-sizing:border-box}\n.dsmm-panel-heading{display:flex;flex-wrap:wrap;gap:8px;justify-content:space-between;align-items:center;min-width:0}\n.dsmm-panel-heading h2:focus-visible{outline:var(--dsw-focus-ring-width,2px) solid var(--dsw-focus-ring-color,var(--dsw-alias-state-business-primary));outline-offset:2px}\n.dsmm-rules-transaction{padding-top:16px}\n.dsmm-scope-save{display:flex;flex-direction:column;gap:8px;padding-top:16px;border-top:1px solid var(--dsw-alias-border-l4)}\n.dsmm-deployment .dsmm-deployment-group{border-top:1px solid var(--dsw-alias-border-l4);padding-top:8px;min-width:0}\n.dsmm-deployment .dsmm-deployment-group>div{display:flex;flex-direction:column;gap:8px;padding-top:8px}\n.dsmm-deployment .dsmm-deployment-group>summary.dsmm-group-summary-row{display:flex;align-items:center;gap:8px;list-style:none}\n.dsmm-deployment .dsmm-deployment-group>summary.dsmm-group-summary-row::-webkit-details-marker{display:none}\n.dsmm-deployment .dsmm-deployment-group>summary.dsmm-group-summary-row::before{content:\"\u25B6\";flex:0 0 auto;width:12px;text-align:center;color:var(--dsw-alias-label-secondary)}\n.dsmm-deployment .dsmm-deployment-group[open]>summary.dsmm-group-summary-row::before{content:\"\u25BC\"}\n.dsmm-deployment summary .dsmm-group-summary{display:flex;align-items:center;gap:8px;min-width:0;flex:1 1 auto}\n.dsmm-deployment .dsmm-group-summary-label{flex:1 1 auto;min-width:0;overflow-wrap:anywhere}\n.dsmm-deployment .dsmm-group-summary-action{flex:0 0 auto;min-height:28px;height:28px;padding:0 8px}\n.dsmm-deployment .dsmm-group-summary-action[hidden]{display:none}\n.dsmm-deployment code{font-family:var(--ds-font-family-code);overflow-wrap:anywhere}\n.dsmm-deployment label code,.dsmm-deployment summary code{margin-left:8px;font-size:12px;line-height:18px;font-weight:400;color:var(--dsw-alias-label-secondary)}\n.dsmm-deployment pre{margin:0;max-width:100%;white-space:pre-wrap;overflow-wrap:anywhere;font-family:var(--ds-font-family-code)}\n.dsmm-deployment .dsmm-deployment-state{display:flex;flex-direction:column;gap:4px;margin:0;padding:12px;border-top:1px solid var(--dsw-alias-border-l4)}\n.dsmm-deployment .dsmm-deployment-state dd{margin:0;color:var(--dsw-alias-label-secondary);overflow-wrap:anywhere}\n.dsmm-children .dsmm-child-composer{min-width:0;display:flex;flex-direction:column;gap:12px}\n.dsmm-children .dsmm-child-meta{margin:0;display:flex;flex-direction:column;gap:4px;min-width:0}\n.dsmm-children .dsmm-child-meta dt{font-weight:500;overflow-wrap:anywhere}\n.dsmm-children .dsmm-child-meta dd{margin:0;color:var(--dsw-alias-label-secondary);overflow-wrap:anywhere}\n.dsmm-children textarea.dsmm-child-message{font-family:var(--dsw-font-family);white-space:pre-wrap;overflow-wrap:anywhere}\n@media(prefers-reduced-motion:reduce){.dsmm-profiles *{transition:none!important;animation:none!important}}\n";
2
+ export declare const PROFILE_STYLES = "\n.dsmm-profiles{width:100%;max-width:760px;min-width:0;display:flex;flex-direction:column;gap:12px;font-family:var(--dsw-font-family);font-size:14px;line-height:22px;color:var(--dsw-alias-label-primary)}\n.dsmm-profiles h2{margin:0;font-size:18px;font-weight:600}\n.dsmm-profiles h3,.dsmm-profiles legend{margin:0;font-size:14px;font-weight:500;line-height:22px}\n.dsmm-profiles :is(label,legend,summary){min-width:0;max-width:100%;overflow-wrap:anywhere}\n.dsmm-profiles :is(.dsmm-structured,.dsmm-session-scope,.dsmm-catalog,.dsmm-policy-fields){min-width:0;display:flex;flex-direction:column;gap:12px}\n.dsmm-profiles fieldset{min-width:0;margin:0;padding:12px;border:1px solid var(--dsw-alias-border-l4);border-radius:var(--dsw-radius-md);display:flex;flex-direction:column;gap:12px}\n.dsmm-profiles .dsmm-route-fields{display:flex;flex-wrap:wrap;gap:12px;min-width:0}\n.dsmm-profiles .dsmm-route-fields>.dsmm-field{flex:1 1 240px;max-width:100%}\n.dsmm-profiles .dsmm-route-fields select{width:100%}\n.dsmm-profiles summary{cursor:pointer;color:var(--dsw-alias-label-primary);min-height:32px;line-height:32px}\n.dsmm-profiles summary:focus-visible{outline:var(--dsw-focus-ring-width,2px) solid var(--dsw-focus-ring-color,var(--dsw-alias-state-business-primary));outline-offset:2px}\n.dsmm-profiles .dsmm-advanced[open]>div{margin-top:8px}\n.dsmm-header-profiles{display:inline-flex;align-items:center;min-width:0;font-family:var(--dsw-font-family);color:var(--dsw-alias-label-primary)}\n.dsmm-header-profiles .dsmm-profile-trigger{width:28px;height:28px;min-height:28px;padding:6px;justify-content:center}\n.dsmm-profile-trigger:focus-visible{outline:var(--dsw-focus-ring-width,2px) solid var(--dsw-focus-ring-color,var(--dsw-alias-state-business-primary));outline-offset:2px}\n.dsmm-profile-menu{font-family:var(--dsw-font-family);font-size:14px;line-height:22px;max-width:calc(100vw - 24px);color:var(--dsw-alias-label-primary)}\n.dsmm-profile-menu [role=presentation]{font:inherit;white-space:normal;overflow-wrap:anywhere;color:var(--dsw-alias-label-secondary)}\n.dsmm-profile-menu [role=menuitem]{font:inherit}\n.dsmm-profile-menu [role=menuitem]>span{white-space:normal;overflow-wrap:anywhere}\n.dsmm-profile-announcement{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}\n.dsmm-profiles p{margin:0;overflow-wrap:anywhere}\n.dsmm-profiles .dsmm-hint{color:var(--dsw-alias-label-secondary)}\n.dsmm-profiles .dsmm-field{min-width:0;display:flex;flex-direction:column;gap:6px}\n.dsmm-profiles .dsmm-actions{display:flex;flex-wrap:wrap;align-items:center;gap:8px}\n.dsmm-profiles button{max-width:100%;white-space:normal;overflow-wrap:anywhere;min-height:36px;height:auto}\n.dsmm-profiles .dsmm-input{width:100%;min-width:0;box-sizing:border-box;border-color:var(--dsw-alias-label-secondary)}\n.dsmm-profiles .dsmm-input input{width:100%;min-width:0;font:inherit;color:inherit}\n.dsmm-profiles .dsmm-choice{position:relative;min-width:0}\n.dsmm-profiles .dsmm-choice .dsmm-input input{padding-right:32px}\n.dsmm-profiles .dsmm-choice .dsmm-choice-toggle{position:absolute;right:4px;top:50%;transform:translateY(-50%);width:28px;height:28px;min-height:28px;padding:4px}\n.dsmm-profiles .dsmm-choice-list{position:absolute;z-index:1;top:100%;left:0;right:0;max-height:240px;overflow-y:auto;list-style:none;margin:4px 0 0;padding:4px;border:1px solid var(--dsw-alias-border-l4);border-radius:var(--dsw-radius-md);background:var(--dsw-alias-bg-layer-1);color:var(--dsw-alias-label-primary)}\n.dsmm-profiles .dsmm-choice-list [role=option]{padding:8px 10px;min-width:0;overflow-wrap:anywhere;cursor:pointer}\n.dsmm-profiles .dsmm-choice-list [role=option]:hover{background:var(--dsw-alias-interactive-bg-hover)}\n.dsmm-profiles .dsmm-choice-list [aria-selected=true]{background:var(--dsw-alias-interactive-bg-active);outline:var(--dsw-focus-ring-width,2px) solid var(--dsw-focus-ring-color,var(--dsw-alias-state-business-primary));outline-offset:-2px}\n.dsmm-profiles select,.dsmm-profiles textarea{box-sizing:border-box;min-width:0;max-width:100%;font:inherit;color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-layer-1);border:1px solid var(--dsw-alias-label-secondary);border-radius:var(--dsw-radius-md)}\n.dsmm-profiles select{width:240px;height:32px;padding:0 10px;text-overflow:ellipsis}\n.dsmm-profiles textarea{width:100%;padding:12px;font-family:var(--ds-font-family-code);resize:vertical;overflow:auto;white-space:pre;}\n.dsmm-profiles select:hover:not(:disabled),.dsmm-profiles textarea:hover:not(:disabled){border-color:var(--dsw-alias-label-primary)}\n.dsmm-profiles select:active:not(:disabled){background:var(--dsw-alias-interactive-bg-active)}\n.dsmm-profiles :is(select,textarea,button):focus-visible,.dsmm-profiles .dsmm-input:has(input:focus-visible){outline:var(--dsw-focus-ring-width,2px) solid var(--dsw-focus-ring-color,var(--dsw-alias-state-business-primary));outline-offset:2px}\n.dsmm-profiles input[type=checkbox]:focus-visible{outline:var(--dsw-focus-ring-width,2px) solid var(--dsw-focus-ring-color,var(--dsw-alias-state-business-primary));outline-offset:2px}\n.dsmm-permissions label.dsmm-actions{min-height:32px}\n.dsmm-permissions input[type=checkbox]{accent-color:var(--dsw-alias-state-business-primary)}\n.dsmm-profiles :is(select,textarea):disabled{color:var(--dsw-alias-label-secondary);background:var(--dsw-alias-bg-module-platform);cursor:not-allowed}\n.dsmm-profiles .dsmm-editor,.dsmm-profiles .dsmm-confirm{min-width:0;display:flex;flex-direction:column;gap:12px;padding:16px;border:1px solid var(--dsw-alias-border-l4);border-radius:var(--dsw-radius-md);background:var(--dsw-alias-bg-module-platform)}\n.dsmm-profiles .dsmm-issue{padding:12px;border-left:4px solid var(--dsw-alias-state-error-primary);color:var(--dsw-alias-label-primary);overflow-wrap:anywhere}\n.dsmm-profiles .dsmm-issue p+p{margin-top:8px}\n.dsmm-profiles .dsmm-status{min-height:22px}\n.dsmm-profiles .dsmm-zone{min-width:0;display:flex;flex-direction:column;gap:12px;padding-top:16px;border-top:1px solid var(--dsw-alias-border-l4)}\n.dsmm-profiles .dsmm-profile-list{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:12px;min-width:0}\n.dsmm-profiles .dsmm-profile-list li{min-width:0;display:flex;flex-direction:column;gap:4px}\n.dsmm-profiles :is(.dsmm-warning,.dsmm-diagnostic,.dsmm-availability){min-width:0;display:flex;flex-direction:column;gap:4px;overflow-wrap:anywhere}\n.dsmm-profiles .dsmm-warning{border-left:4px solid var(--dsw-alias-state-warn-primary);padding:8px 12px;color:var(--dsw-alias-label-primary)}\n.dsmm-deployment{gap:8px}\n.dsmm-section-tabs{display:flex;gap:8px;min-width:0;max-width:100%;overflow-x:auto;overscroll-behavior-x:contain;border-bottom:1px solid var(--dsw-alias-border-l4);padding-bottom:2px}\n.dsmm-section-tabs button{flex:0 0 auto;justify-content:center;white-space:nowrap;border-color:transparent;border-bottom:2px solid transparent;border-radius:var(--dsw-radius-md) var(--dsw-radius-md) 0 0;background:transparent;color:var(--dsw-alias-label-secondary);font-weight:400}\n.dsmm-section-tabs button:hover{background:var(--dsw-alias-interactive-bg-hover)}\n.dsmm-section-tabs button[aria-selected=true]{background:var(--dsw-alias-interactive-bg-active);border-bottom-color:var(--dsw-alias-label-primary);color:var(--dsw-alias-label-primary);font-weight:500}\n.dsmm-section-panel{display:flex;flex-direction:column;gap:16px;min-width:0;width:100%;box-sizing:border-box}\n.dsmm-panel-heading{display:flex;flex-wrap:wrap;gap:8px;justify-content:space-between;align-items:center;min-width:0}\n.dsmm-panel-heading h2:focus-visible{outline:var(--dsw-focus-ring-width,2px) solid var(--dsw-focus-ring-color,var(--dsw-alias-state-business-primary));outline-offset:2px}\n.dsmm-rules-transaction{padding-top:16px}\n.dsmm-scope-save{display:flex;flex-direction:column;gap:8px;padding-top:16px;border-top:1px solid var(--dsw-alias-border-l4)}\n.dsmm-deployment .dsmm-deployment-group{border-top:1px solid var(--dsw-alias-border-l4);padding-top:8px;min-width:0}\n.dsmm-deployment .dsmm-deployment-group>div{display:flex;flex-direction:column;gap:8px;padding-top:8px}\n.dsmm-deployment .dsmm-deployment-group>summary.dsmm-group-summary-row{display:flex;align-items:center;gap:8px;list-style:none}\n.dsmm-deployment .dsmm-deployment-group>summary.dsmm-group-summary-row::-webkit-details-marker{display:none}\n.dsmm-deployment .dsmm-deployment-group>summary.dsmm-group-summary-row::before{content:\"\u25B6\";flex:0 0 auto;width:12px;text-align:center;color:var(--dsw-alias-label-secondary)}\n.dsmm-deployment .dsmm-deployment-group[open]>summary.dsmm-group-summary-row::before{content:\"\u25BC\"}\n.dsmm-deployment summary .dsmm-group-summary{display:flex;align-items:center;gap:8px;min-width:0;flex:1 1 auto}\n.dsmm-deployment .dsmm-group-summary-label{flex:1 1 auto;min-width:0;overflow-wrap:anywhere}\n.dsmm-deployment .dsmm-group-summary-action{flex:0 0 auto;min-height:28px;height:28px;padding:0 8px}\n.dsmm-deployment .dsmm-group-summary-action[hidden]{display:none}\n.dsmm-deployment code{font-family:var(--ds-font-family-code);overflow-wrap:anywhere}\n.dsmm-deployment label code,.dsmm-deployment summary code{margin-left:8px;font-size:12px;line-height:18px;font-weight:400;color:var(--dsw-alias-label-secondary)}\n.dsmm-deployment pre{margin:0;max-width:100%;white-space:pre-wrap;overflow-wrap:anywhere;font-family:var(--ds-font-family-code)}\n.dsmm-deployment .dsmm-deployment-state{display:flex;flex-direction:column;gap:4px;margin:0;padding:12px;border-top:1px solid var(--dsw-alias-border-l4)}\n.dsmm-deployment .dsmm-deployment-state dd{margin:0;color:var(--dsw-alias-label-secondary);overflow-wrap:anywhere}\n.dsmm-children .dsmm-child-composer{min-width:0;display:flex;flex-direction:column;gap:12px}\n.dsmm-children .dsmm-child-meta{margin:0;display:flex;flex-direction:column;gap:4px;min-width:0}\n.dsmm-children .dsmm-child-meta dt{font-weight:500;overflow-wrap:anywhere}\n.dsmm-children .dsmm-child-meta dd{margin:0;color:var(--dsw-alias-label-secondary);overflow-wrap:anywhere}\n.dsmm-children textarea.dsmm-child-message{font-family:var(--dsw-font-family);white-space:pre-wrap;overflow-wrap:anywhere}\n.dsmm-profiles .dsmm-command-entry{min-width:0;display:flex;flex-direction:column;gap:6px}\n.dsmm-profiles .dsmm-command-entry .dsmm-actions{display:flex;align-items:center;gap:8px}\n.dsmm-profiles .dsmm-command-entry .dsmm-input{flex:1 1 auto;min-width:0}\n.dsmm-profiles .dsmm-command-summary{display:flex;align-items:center;gap:8px;flex:1 1 auto;min-width:0;overflow-wrap:anywhere}\n.dsmm-profiles .dsmm-command-summary code{font-family:var(--ds-font-family-code);font-size:13px;color:var(--dsw-alias-label-primary)}\n.dsmm-profiles .dsmm-legacy-badge{display:inline-flex;align-items:center;padding:2px 6px;font-size:11px;font-weight:600;line-height:16px;border-radius:var(--dsw-radius-md);background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-secondary);text-transform:uppercase;letter-spacing:0.5px}\n.dsmm-profiles .dsmm-legacy-details{padding:4px 0}\n.dsmm-profiles .dsmm-legacy-details summary{font-size:12px;color:var(--dsw-alias-label-secondary);min-height:24px;line-height:24px}\n.dsmm-profiles .dsmm-kv{display:grid;grid-template-columns:auto 1fr;gap:4px 12px;margin:4px 0 0;font-size:12px}\n.dsmm-profiles .dsmm-kv dt{font-weight:500;color:var(--dsw-alias-label-secondary)}\n.dsmm-profiles .dsmm-kv dd{margin:0;color:var(--dsw-alias-label-primary);font-family:var(--ds-font-family-code)}\n@media(prefers-reduced-motion:reduce){.dsmm-profiles *{transition:none!important;animation:none!important}}\n";
3
3
  //# sourceMappingURL=styles.d.ts.map
@@ -83,6 +83,17 @@ export const PROFILE_STYLES = `
83
83
  .dsmm-children .dsmm-child-meta dt{font-weight:500;overflow-wrap:anywhere}
84
84
  .dsmm-children .dsmm-child-meta dd{margin:0;color:var(--dsw-alias-label-secondary);overflow-wrap:anywhere}
85
85
  .dsmm-children textarea.dsmm-child-message{font-family:var(--dsw-font-family);white-space:pre-wrap;overflow-wrap:anywhere}
86
+ .dsmm-profiles .dsmm-command-entry{min-width:0;display:flex;flex-direction:column;gap:6px}
87
+ .dsmm-profiles .dsmm-command-entry .dsmm-actions{display:flex;align-items:center;gap:8px}
88
+ .dsmm-profiles .dsmm-command-entry .dsmm-input{flex:1 1 auto;min-width:0}
89
+ .dsmm-profiles .dsmm-command-summary{display:flex;align-items:center;gap:8px;flex:1 1 auto;min-width:0;overflow-wrap:anywhere}
90
+ .dsmm-profiles .dsmm-command-summary code{font-family:var(--ds-font-family-code);font-size:13px;color:var(--dsw-alias-label-primary)}
91
+ .dsmm-profiles .dsmm-legacy-badge{display:inline-flex;align-items:center;padding:2px 6px;font-size:11px;font-weight:600;line-height:16px;border-radius:var(--dsw-radius-md);background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-secondary);text-transform:uppercase;letter-spacing:0.5px}
92
+ .dsmm-profiles .dsmm-legacy-details{padding:4px 0}
93
+ .dsmm-profiles .dsmm-legacy-details summary{font-size:12px;color:var(--dsw-alias-label-secondary);min-height:24px;line-height:24px}
94
+ .dsmm-profiles .dsmm-kv{display:grid;grid-template-columns:auto 1fr;gap:4px 12px;margin:4px 0 0;font-size:12px}
95
+ .dsmm-profiles .dsmm-kv dt{font-weight:500;color:var(--dsw-alias-label-secondary)}
96
+ .dsmm-profiles .dsmm-kv dd{margin:0;color:var(--dsw-alias-label-primary);font-family:var(--ds-font-family-code)}
86
97
  @media(prefers-reduced-motion:reduce){.dsmm-profiles *{transition:none!important;animation:none!important}}
87
98
  `;
88
99
  //# sourceMappingURL=styles.js.map