@dsmm/dsmm 0.3.1 → 0.3.3

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.
Files changed (54) hide show
  1. package/README.md +2 -2
  2. package/docs/agent-presets.md +5 -5
  3. package/docs/compatibility.md +7 -1
  4. package/docs/migration-from-ocmm.md +1 -1
  5. package/docs/releasing.md +25 -65
  6. package/docs/roadmap.md +37 -2
  7. package/docs/settings-status.md +1 -1
  8. package/lib/client/DeploymentFields.d.ts +6 -2
  9. package/lib/client/DeploymentFields.js +8 -6
  10. package/lib/client/DeploymentPage.d.ts +1 -0
  11. package/lib/client/DeploymentPage.js +4 -3
  12. package/lib/client/ProfilesSection.js +3 -3
  13. package/lib/client/RoleAvailability.js +1 -1
  14. package/lib/client/SessionProfiles.js +21 -18
  15. package/lib/client/controller.d.ts +17 -0
  16. package/lib/client/controller.js +104 -18
  17. package/lib/client/deployment-locales.js +26 -27
  18. package/lib/client/deployment-modules.js +1 -1
  19. package/lib/client/index.js +10 -2
  20. package/lib/client/locales.d.ts +6 -0
  21. package/lib/client/locales.js +148 -124
  22. package/lib/client/permission-locales.js +35 -35
  23. package/lib/client.js +645 -542
  24. package/lib/index.js +10 -5
  25. package/lib/native-admission.d.ts +18 -0
  26. package/lib/native-admission.js +174 -17
  27. package/lib/permission-control.d.ts +2 -0
  28. package/lib/permission-control.js +7 -0
  29. package/lib/permission-controller.js +2 -2
  30. package/lib/permission-native-rules.js +3 -3
  31. package/lib/preset-materializer.js +3 -3
  32. package/lib/preset-registry.d.ts +20 -2
  33. package/lib/preset-registry.js +46 -17
  34. package/lib/preset-skills.d.ts +1 -1
  35. package/lib/preset-skills.js +2 -2
  36. package/lib/profile-diagnostics.js +1 -1
  37. package/lib/profile-remote.js +1 -3
  38. package/lib/profile-rpc.js +2 -0
  39. package/lib/profile-runtime.d.ts +12 -1
  40. package/lib/profile-runtime.js +122 -10
  41. package/lib/profile-store.d.ts +2 -2
  42. package/lib/profile-store.js +8 -1
  43. package/lib/profile-types.d.ts +1 -0
  44. package/lib/role-invocation.d.ts +1 -1
  45. package/lib/role-invocation.js +2 -2
  46. package/lib/role-policy.js +2 -2
  47. package/lib/role-subagents.js +18 -4
  48. package/lib/roles.d.ts +2 -0
  49. package/lib/roles.js +2 -0
  50. package/lib/settings.d.ts +1 -3
  51. package/lib/settings.js +4 -9
  52. package/lib/skills.d.ts +1 -0
  53. package/lib/skills.js +5 -1
  54. package/package.json +37 -33
@@ -1,32 +1,32 @@
1
1
  export const PERMISSIONS_NS = "settings.dsmm-permissions";
2
2
  export const permissionEn = {
3
3
  title: "Permission control", rules: "Global permission rules",
4
- nativeApproval: "Command approval uses the native prompt; ordinary Allow is once only. Deployment permission settings and exact nativeCommands are in this Permissions module. Choose Global or Current DSH profile above; Root rules below save independently.",
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.",
4
+ nativeApproval: "Approve commands in the native prompt. Allow approves only that call.",
5
+ root: "Selected main session", noRoot: "Select a main session to view its permission rules.",
6
+ child: "Select this child’s main session to edit Global rules.",
7
7
  unknown: "Unavailable / unknown", reading: "Reading…", busy: "Operation pending…",
8
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
9
  outsideReads: "Outside-workspace reads", webSearch: "Web search", webFetch: "Web fetch", enabled: "Enabled", rule: "Coarse rule",
10
10
  inherit: "Inherit native policy", "action:allow": "Allow", "action:ask": "Ask", "action:deny": "Deny",
11
11
  "kind:outside-read": "Outside-workspace read", "kind:shell": "Shell operation", "kind:webSearch": "Web search", "kind:webFetch": "Web fetch",
12
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: "This Save uses the trusted Root’s Global rules CAS authority. Native dynamic permission overrides can refuse this RPC: edit or Unset them in the profile scope above, then refresh Root rules. No fallback Global write bypasses a refusal. Enabled and nativeCommands use configuration Save, not this Root transaction.",
15
- configPolicyHint: "Sparse permission settings: Global Unset restores built-in defaults; profile Unset inherits Global plus any Host base pin. Profile overrides win over Global. Arrays replace as a whole. Config Save does not bypass Root/operator/readonly checks or prove runtime synchronization; inspect saved/startup/admitted state below and refresh Permission control for live coverage.",
16
- configRulesHint: "Persisted rule records (exact schema, including source/revision/revoked). Edit existing records or supply valid import provenance; this config editor does not mint verified operator approval. Empty array explicitly replaces inherited records; Unset restores inheritance. The Root rules editor can stamp verified operator changes when its authority is writable.",
17
- coldHint: "Enabled is a cold switch (default On). Saving requires an independent Host restart to change mounting; it does not remove current protection. Restart may cancel sessions.",
18
- nativeCommands: "Exact native command entries", nativeCommandsHint: "Default Off. Each entry matches tool, executable, optional subcommand, ordered args, workingDirectory and sandboxMode exactly; no wildcards, command parsing or normalization. Allow cannot override downstream Ask/Deny or role readonly. New entries use Ask and workspace-write; no full-access grant is generated.",
19
- registrationUnresolved: "Native command registration / executor identity is unresolved here. A trusted kind:shell tool name is not proof of a nativeCommands bash/pwsh executor, executable, environment or sandbox. Enter only independently verified exact values; nothing is auto-filled or certified by this UI. Stale scope, controller or registration is still rejected by the Host.",
13
+ networkLimit: "Web rules cover public web tools only. Private networks, shell commands and sockets remain outside this permission.",
14
+ rulesHint: "Saves Global rules for the selected main session. If profile overrides block saving, edit or clear them in the profile scope above, then refresh.",
15
+ configPolicyHint: "Profile settings override Global settings. Arrays replace inherited lists. Refresh session permissions after saving to check what is effective.",
16
+ configRulesHint: "Edit existing records or imported rules with valid provenance. Use the session rules editor for verified approvals. An empty array clears inherited records.",
17
+ coldHint: "Changing this switch requires a Host restart. Current protection stays active until then. Restart may cancel sessions.",
18
+ nativeCommands: "Exact command rules", nativeCommandsHint: "Default Off. Match the tool, executable, subcommand, ordered arguments, directory and sandbox exactly. No wildcards. Other approval, denial and read-only restrictions still apply. New entries ask for approval and use workspace-write.",
19
+ registrationUnresolved: "Executor identity is unconfirmed. Verify the tool, executable, environment and sandbox before entering exact values.",
20
20
  entryId: "Entry ID", tool: "Tool (exact)", nativeExecutable: "Executable (exact)", subcommand: "Subcommand (optional; blank omits)", args: "Ordered arguments (JSON string array)", sandboxMode: "Sandbox mode (exact)", mode: "Native action", addEntry: "Add exact entry", removeEntry: "Remove entry", noEntries: "No exact command entries.", unset: "Unset — restore inheritance", inheritedEntries: "Inherited entries; editing pins a replacement array in this layer.", explicitEntries: "Explicit replacement array in this layer.", invalidEntry: "Invalid exact entry: use unique nonblank IDs, exact nonblank strings, an absolute Host working directory, and a JSON string array. Draft retained; Save locked.",
21
- rulesUnavailable: "Global rules are not editable until a trusted, open Root and writable local operator authority return a synchronized policy. A refusal is not an empty rules list. Edit or Unset native overrides in this module’s profile scope; there is no automatic Global-write fallback.",
21
+ rulesUnavailable: "Editing requires an open main session, local editing permission and synchronized rules. Check profile overrides, reconnect and refresh.",
22
22
  invalidArgsHint: "Correct invalid argument JSON before removing rows, or explicitly Unset this entire array to restore inheritance. Other fields do not discard invalid text.",
23
- observedPolicy: "Last observed effective policy (may include native profile overrides; not the sparse Global document)",
24
- profileOverrideState: "Native profile override state", profileOverrideUnknown: "Unknown from this Root rules response. Choose Current DSH profile above to inspect explicit overrides and inheritance. A failed Global rules Save does not clear or bypass them.",
25
- 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.",
23
+ observedPolicy: "Effective policy (including profile overrides)",
24
+ profileOverrideState: "Profile overrides", profileOverrideUnknown: "Unknown. Choose Current DSH profile above to inspect overrides.",
25
+ matchHint: "Match an exact path or directory tree, an exact shell tool/command/directory, or a web tool. Allow does not grant outside-workspace writes. Rules stay active until revoked.",
26
26
  source: "Actual source", recordVersion: "Record version", savedAt: "Saved at", operator: "Verified Host operator", imported: "User import", active: "Active record", revoked: "Revoked record",
27
- base: "Draft CAS source", savedRevision: "Saved source", runtimeRevision: "Runtime source", runtime: "Runtime synchronization", synced: "Synced", updating: "Updating", unsynced: "Unsynced — rules saves locked",
27
+ base: "Draft version", savedRevision: "Saved version", runtimeRevision: "Effective version", runtime: "Rule synchronization", synced: "Synced", updating: "Updating", unsynced: "Unsynced — saving unavailable",
28
28
  mounted: "Startup mounted", on: "On", off: "Off", restart: "Independent restart required",
29
- 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.",
29
+ coverageTitle: "Tool coverage", coverage: "Last observed for this main session. Executor readiness and network access must be checked separately.",
30
30
  coverageUnavailable: "Coverage unavailable / unknown. No trusted live observation was returned.", coverageEmpty: "No trusted tool registrations observed for this Root.",
31
31
  coverageRuntime: "Observed consumer state", coverageRevision: "Observed consumer runtime source", toolName: "Observed tool name", toolKind: "Trusted registration kind",
32
32
  toolApproval: "Approval boundary", nativeOnce: "Native prompt — once only", toolMemory: "Scoped approval memory", notProvided: "Not provided",
@@ -35,9 +35,9 @@ export const permissionEn = {
35
35
  "limit:scopedMemory": "Not provided by native rules.", "limit:webFetch": "Native public-address checks remain authoritative; private-network access is not granted.",
36
36
  "limit:webSearchDestinations": "Unsupported.", "limit:proxyAddressBinding": "Depends on the native proxy; no stronger address-binding guarantee.",
37
37
  "limit:shellSockets": "Depends on the native executor; no all-Shell or socket firewall.", "limit:providerAuthMcp": "Not covered by these rules.",
38
- 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.",
38
+ pathEvidence: "Read checks its active filesystem. Search and shell path checks depend on the executor. Final-file identity, full filesystem confinement and socket isolation are not guaranteed.",
39
39
  newRule: "Add exact-match rule", editRule: "Edit rule", stage: "Stage rule", cancel: "Cancel rule edit", stageRevoke: "Stage revocation", unstage: "Remove staged change",
40
- 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.",
40
+ editor: "Rule draft", staged: "Unsaved rule changes", noRules: "No saved rules.", save: "Save", discard: "Discard draft and reload", dirty: "Unsaved rules draft", saved: "Rules saved. Check synchronization below.",
41
41
  "issue:not-owned": "Root/operator/readonly authority refused. Select the intended Root and refresh.",
42
42
  "issue:stale": "Source conflict. Draft retained. Review, then explicitly discard and reload.",
43
43
  "issue:cancelled": "Operation cancelled; refresh actual saved state.",
@@ -51,31 +51,31 @@ export const permissionEn = {
51
51
  };
52
52
  export const permissionZh = {
53
53
  title: "权限控制", rules: "全局权限规则",
54
- nativeApproval: "命令批准使用原生提示,普通 Allow 仅批准本次。部署权限配置与精确 nativeCommands 在本权限模块内;上方选择 Global 或当前 DSH 配置,下面的 Root 规则独立保存。",
55
- root: "当前原生 Root 会话", noRoot: "请在原生会话导航中选择可信 Root 会话;不从任务或模型文本推断 Root。", child: "当前为 child 会话;编辑全局规则请在原生导航选择其 Root。",
54
+ nativeApproval: "请在原生提示中批准命令;「允许」仅批准本次调用。",
55
+ root: "所选主会话", noRoot: "请选择主会话以查看权限规则。", child: "请切换到此子会话的主会话后编辑全局规则。",
56
56
  unknown: "不可用/未知", reading: "正在读取…", busy: "操作处理中…",
57
57
  executable: "原生 Shell 注册身份(精确匹配)", command: "完整命令(精确匹配)", cwd: "工作目录(精确匹配)", id: "规则 ID", action: "规则动作", match: "匹配类型",
58
58
  outsideReads: "工作区外读取", webSearch: "网页搜索", webFetch: "网页抓取", enabled: "启用", rule: "粗粒度规则",
59
59
  inherit: "继承原生策略", "action:allow": "允许", "action:ask": "询问", "action:deny": "拒绝",
60
60
  "kind:outside-read": "工作区外读取", "kind:shell": "Shell 操作", "kind:webSearch": "网页搜索", "kind:webFetch": "网页抓取",
61
61
  path: "规范路径", pathScope: "路径匹配", exact: "精确路径", tree: "此路径及子树",
62
- networkLimit: "SDK 网络边界:允许 public web fetch 不代表放行私网目标;这些网页策略不是全部 Shell 或 socket 的防火墙。",
63
- rulesHint: "此保存使用可信 Root 的 Global 规则 CAS 权限。native 动态权限覆盖可能使此 RPC 拒绝:请在上方当前配置作用域编辑或 Unset 覆盖,再刷新 Root 规则。拒绝后不会改走 Global 写入绕过。enabled 与 nativeCommands 使用配置保存,不属于此 Root 事务。",
64
- configPolicyHint: "稀疏权限配置:Global 的 Unset 恢复内建默认;当前配置的 Unset 继承 Global 及宿主 base 固定值。当前配置覆盖 Global;数组整体替换。配置保存不绕过 Root/operator/只读检查,也不证明运行时同步;请核对下方保存/启动/准入状态,并在权限控制页刷新实时覆盖。",
65
- configRulesHint: "持久规则记录(精确 schema,包含 source/revision/revoked)。可编辑现有记录或提供合法导入来源;此配置编辑器不生成已核验 operator 批准。空数组显式替换继承记录;Unset 恢复继承。Root 规则编辑器仅在权限可写时写入已核验 operator 来源。",
66
- coldHint: "enabled 为冷开关(默认开启),保存后需另行重启宿主才改变挂载;不会移除当前保护。重启可能取消会话。",
67
- nativeCommands: "精确原生命令条目", nativeCommandsHint: "默认关闭。每条精确匹配 tool、executable、可选 subcommand、有序 args、workingDirectory 与 sandboxMode;不使用通配符、不解析或归一化命令。Allow 不能覆盖下游 Ask/Deny 或角色只读。新条目使用 Ask 和 workspace-write,不生成完全访问授权。",
68
- registrationUnresolved: "此处原生命令注册/执行器身份未解析。可信 kind:shell 工具名称不证明 nativeCommands 的 bash/pwsh 执行器、executable、环境或沙箱。仅填写独立核验的精确值;本 UI 不自动填充或认证可信身份。过期 scope、controller 或注册仍由宿主拒绝。",
62
+ networkLimit: "网页规则仅覆盖公共网页工具,不包含私网、Shell 命令或 socket 权限。",
63
+ rulesHint: "为所选主会话保存全局规则。若配置覆盖阻止保存,请在上方当前配置范围内编辑或清除覆盖,再刷新。",
64
+ configPolicyHint: "当前配置优先于全局配置,数组整体替换继承列表。保存后请刷新会话权限以检查实际生效状态。",
65
+ configRulesHint: "可编辑已有记录或带合法来源的导入规则。经核验的批准请使用会话规则编辑器。空数组会清除继承的记录。",
66
+ coldHint: "更改此开关需重启宿主,此前保留当前保护。重启可能取消会话。",
67
+ nativeCommands: "精确命令规则", nativeCommandsHint: "默认关闭。精确匹配工具、可执行程序、子命令、有序参数、目录和沙箱,不支持通配符。其他审批、拒绝和只读限制仍有效。新条目使用询问与 workspace-write。",
68
+ registrationUnresolved: "执行器身份尚未确认,请核验工具、可执行程序、环境和沙箱后再填写精确值。",
69
69
  entryId: "条目 ID", tool: "工具(精确)", nativeExecutable: "可执行程序(精确)", subcommand: "子命令(可选,留空省略)", args: "有序参数(JSON 字符串数组)", sandboxMode: "沙箱模式(精确)", mode: "原生动作", addEntry: "添加精确条目", removeEntry: "移除条目", noEntries: "没有精确命令条目。", unset: "Unset——恢复继承", inheritedEntries: "继承的条目;编辑后在此层固定为整体替换数组。", explicitEntries: "此层显式整体替换数组。", invalidEntry: "精确条目无效:ID 需唯一且非空,精确字符串不可空,工作目录为宿主绝对路径,参数为 JSON 字符串数组。草稿保留,保存已锁定。",
70
- rulesUnavailable: "需可信且已打开的 Root、可写的本地 operator 权限及已同步策略,才能编辑 Global 规则。拒绝不代表空规则列表。请在本模块的当前配置作用域编辑或 Unset native 覆盖;不会自动改走 Global 写入。",
70
+ rulesUnavailable: "编辑需要已打开的主会话、本地编辑权限和已同步的规则。请检查配置覆盖,重连后刷新。",
71
71
  invalidArgsHint: "请修正无效参数 JSON 后再移除条目;也可显式 Unset 整个数组以恢复继承。修改其他字段不会丢弃无效文本。",
72
- observedPolicy: "最近观测的有效策略(可能包含 native 配置覆盖,非稀疏 Global 文档)",
73
- profileOverrideState: "Native 配置覆盖状态", profileOverrideUnknown: "此 Root 规则响应未提供覆盖状态。请在上方选择当前 DSH 配置,核对显式覆盖与继承;Global 规则保存失败不会清除或绕过覆盖。",
74
- matchHint: "规则匹配实际规范路径、原生 Shell 注册身份+完整命令+工作目录,或网页类型。规则 Allow 仅满足该规则,不授予外部写。不同 ID 添加记录,保留至显式撤销。",
72
+ observedPolicy: "有效策略(含当前配置覆盖)",
73
+ profileOverrideState: "配置覆盖", profileOverrideUnknown: "未知,请在上方选择当前 DSH 配置查看覆盖值。",
74
+ matchHint: "可匹配精确路径或目录树、精确 Shell 工具与命令及目录,或网页工具。允许不授予工作区外写入权限。规则保留至撤销。",
75
75
  source: "实际来源", recordVersion: "记录版本", savedAt: "保存时间", operator: "宿主已核验 operator", imported: "用户导入", active: "有效记录", revoked: "已撤销记录",
76
- base: "草稿 CAS 来源", savedRevision: "已保存来源", runtimeRevision: "运行时来源", runtime: "运行时同步", synced: "已同步", updating: "同步中", unsynced: "未同步——规则保存已锁定",
76
+ base: "草稿版本", savedRevision: "保存版本", runtimeRevision: "生效版本", runtime: "规则同步", synced: "已同步", updating: "同步中", unsynced: "未同步——暂不可保存",
77
77
  mounted: "启动时已挂载", on: "开启", off: "关闭", restart: "需要另行重启",
78
- coverageTitle: "已观测的可信工具覆盖", coverage: "此 Root 最近一次可信注册及原生规则 consumer 观测,与来源同步分开。已保存、已同步、已挂载或工具同名均不证明覆盖;所列注册不证明执行器就绪、网络可达或最终 body 归属。",
78
+ coverageTitle: "工具覆盖范围", coverage: "所选主会话最近观测的覆盖范围,执行器就绪和网络访问需另行检查。",
79
79
  coverageUnavailable: "覆盖不可用/未知:未返回可信的实时观测。", coverageEmpty: "未观测到此 Root 的可信工具注册。",
80
80
  coverageRuntime: "已观测 consumer 状态", coverageRevision: "已观测 consumer 运行时来源", toolName: "已观测工具名称", toolKind: "可信注册类型",
81
81
  toolApproval: "批准边界", nativeOnce: "原生提示——仅本次", toolMemory: "作用域批准记忆", notProvided: "不提供",
@@ -84,9 +84,9 @@ export const permissionZh = {
84
84
  "limit:scopedMemory": "原生规则不提供。", "limit:webFetch": "仍以原生 public-address 检查为准,不授予私网访问。",
85
85
  "limit:webSearchDestinations": "不支持。", "limit:proxyAddressBinding": "依赖原生代理,不提供更强的地址绑定保证。",
86
86
  "limit:shellSockets": "依赖原生执行器,不是全部 Shell 或 socket 的防火墙。", "limit:providerAuthMcp": "不在这些规则覆盖范围。",
87
- pathEvidence: "路径证据:read 使用其实际 scope 的原生 FS。glob/grep 的生产 rg 执行器 coLocation 仍未证明;可信注册不等于共享路径证据。Shell 读取解析及路径检查依赖明确的原生执行器证据。不保证最终 inode、完整文件系统或 socket 隔离。",
87
+ pathEvidence: "读取检查当前文件系统;搜索和 Shell 的路径检查取决于执行器。不保证最终文件身份、完整文件系统或 socket 隔离。",
88
88
  newRule: "添加精确匹配规则", editRule: "编辑规则", stage: "暂存规则", cancel: "取消规则编辑", stageRevoke: "暂存撤销", unstage: "移除暂存更改",
89
- editor: "规则草稿", staged: "暂存更改——尚未保存", noRules: "尚无持久化规则记录。", save: "保存全局规则", discard: "丢弃草稿并重载", dirty: "规则草稿未保存", saved: "宿主已接受全局规则,请核对运行时同步状态。",
89
+ editor: "规则草稿", staged: "未保存的规则更改", noRules: "尚无已保存规则。", save: "保存", discard: "丢弃草稿并重载", dirty: "规则草稿未保存", saved: "规则已保存,请核对下方同步状态。",
90
90
  "issue:not-owned": "Root/operator/只读权限拒绝,请选择目标 Root 后刷新。", "issue:stale": "来源冲突,草稿保留;核对后显式丢弃并重载。", "issue:cancelled": "操作已取消,请刷新实际保存状态。",
91
91
  "issue:unavailable": "服务或运行时不可用,草稿保留;已保存与运行时可能不同。", "issue:validation": "宿主拒绝规则,草稿保留;请核对精确字段与原生覆盖。", "issue:not-found": "规则已不存在。",
92
92
  "issue:scope-unavailable": "所请求的操作不可用。", "issue:replayed": "操作已不再有效。", "issue:denied": "当前 Root 策略拒绝操作,没有本地绕过入口。",