@dsmm/dsmm 0.3.3 → 0.3.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/agent-presets/dsmm-builder/agent.cordis.yml +1 -1
- package/agent-presets/dsmm-clarifier/agent.cordis.yml +1 -1
- package/agent-presets/dsmm-code-search/agent.cordis.yml +1 -1
- package/agent-presets/dsmm-coding/agent.cordis.yml +3 -2
- package/agent-presets/dsmm-complex/agent.cordis.yml +2 -1
- package/agent-presets/dsmm-creative/agent.cordis.yml +1 -1
- package/agent-presets/dsmm-cross-cutting/agent.cordis.yml +1 -1
- package/agent-presets/dsmm-deep/agent.cordis.yml +2 -1
- package/agent-presets/dsmm-doc-search/agent.cordis.yml +1 -1
- package/agent-presets/dsmm-documenting/agent.cordis.yml +1 -1
- package/agent-presets/dsmm-frontend/agent.cordis.yml +4 -2
- package/agent-presets/dsmm-hard-reasoning/agent.cordis.yml +1 -1
- package/agent-presets/dsmm-media-reader/agent.cordis.yml +1 -1
- package/agent-presets/dsmm-normal-task/agent.cordis.yml +3 -2
- package/agent-presets/dsmm-oracle/agent.cordis.yml +1 -1
- package/agent-presets/dsmm-oracle-2nd/agent.cordis.yml +1 -1
- package/agent-presets/dsmm-orchestrator/agent.cordis.yml +11 -1
- package/agent-presets/dsmm-plan-critic/agent.cordis.yml +1 -1
- package/agent-presets/dsmm-planner/agent.cordis.yml +1 -1
- package/agent-presets/dsmm-quick/agent.cordis.yml +2 -1
- package/agent-presets/dsmm-research/agent.cordis.yml +1 -1
- package/agent-presets/dsmm-reviewer/agent.cordis.yml +1 -1
- package/docs/native-permissions.md +11 -3
- package/docs/roadmap.md +30 -3
- package/docs/runtime-recovery.md +30 -2
- package/docs/settings-status.md +6 -4
- package/docs/skill-sync.md +13 -14
- package/lib/client/DeploymentFields.js +30 -2
- package/lib/client/DeploymentPage.js +29 -17
- package/lib/client/NativeCommandEntries.js +47 -37
- package/lib/client/PermissionRuleEntries.d.ts +17 -0
- package/lib/client/PermissionRuleEntries.js +70 -0
- package/lib/client/PermissionsPanel.js +8 -5
- package/lib/client/deployment-locales.d.ts +2 -2
- package/lib/client/deployment-locales.js +8 -8
- package/lib/client/deployment-modules.d.ts +5 -3
- package/lib/client/deployment-modules.js +4 -4
- package/lib/client/deployment-workspace.d.ts +4 -0
- package/lib/client/deployment-workspace.js +37 -11
- package/lib/client/index.js +2 -18
- package/lib/client/permission-controller.d.ts +23 -0
- package/lib/client/permission-controller.js +59 -27
- package/lib/client/permission-locales.d.ts +30 -4
- package/lib/client/permission-locales.js +42 -18
- package/lib/client/permission-session.d.ts +37 -0
- package/lib/client/permission-session.js +34 -0
- package/lib/client/styles.d.ts +1 -1
- package/lib/client/styles.js +12 -8
- package/lib/client.js +1491 -1153
- package/lib/core-permission-authority.js +28 -16
- package/lib/index.js +2 -9
- package/lib/native-admission.d.ts +3 -0
- package/lib/native-admission.js +60 -26
- package/lib/permission-controller.js +1 -1
- package/lib/permission-native-command.js +6 -4
- package/lib/permission-settings.d.ts +21 -7
- package/lib/permission-settings.js +21 -9
- package/lib/role-identity.d.ts +1 -1
- package/lib/role-identity.js +16 -4
- package/lib/role-policy.d.ts +3 -0
- package/lib/role-policy.js +29 -5
- package/lib/role-subagents.js +4 -3
- package/lib/runtime-integration.js +4 -4
- package/lib/settings.js +4 -1
- package/lib/state.d.ts +4 -1
- package/lib/state.js +37 -6
- package/package.json +1 -1
- package/prompts/deepwork.md +13 -1
- package/prompts/source/agents/orchestrator.md +10 -0
- package/prompts/source/category/coding.md +2 -1
- package/prompts/source/category/complex.md +1 -0
- package/prompts/source/category/deep.md +1 -0
- package/prompts/source/category/frontend.md +3 -1
- package/prompts/source/category/normal-task.md +2 -1
- package/prompts/source/category/quick.md +1 -0
- package/prompts/source/deepwork/claude-opus-5.md +2 -0
- package/prompts/source/deepwork/default.md +12 -0
- package/prompts/source/deepwork/gemini.md +6 -1
- package/prompts/source/deepwork/glm.md +5 -1
- package/prompts/source/deepwork/gpt.md +22 -2
- package/prompts/source/deepwork/kimi-k27.md +2 -0
- package/prompts/source/deepwork/planner.md +3 -1
- package/prompts/source/deepwork/swe-2.md +2 -0
- package/prompts/source/manifest.json +3 -68
- package/prompts/source/shared/dsh-host-contract.md +1 -1
- package/skills/ast-grep/SKILL.md +1 -1
- package/skills/brainstorming/SKILL.md +1 -1
- package/skills/coding-agent-sessions/SKILL.md +1 -1
- package/skills/debugging/SKILL.md +1 -1
- package/skills/dispatching-parallel-agents/SKILL.md +1 -1
- package/skills/frontend/SKILL.md +1 -1
- package/skills/git-master/SKILL.md +1 -1
- package/skills/init-deep/SKILL.md +1 -1
- package/skills/receiving-code-review/SKILL.md +1 -1
- package/skills/remove-ai-slops/SKILL.md +1 -1
- package/skills/requesting-code-review/SKILL.md +1 -1
- package/skills/subagent-driven-development/SKILL.md +1 -1
- package/skills/using-git-worktrees/SKILL.md +1 -1
- package/skills/writing-plans/SKILL.md +1 -1
|
@@ -10,8 +10,12 @@ export function permissionChanges(view) {
|
|
|
10
10
|
return null;
|
|
11
11
|
return { expectedRevision: base.revision, ...(Object.keys(changes).length ? { changes } : {}), ...(draft.upsert.length ? { upsert: draft.upsert } : {}), ...(draft.revoke.length ? { revoke: draft.revoke } : {}) };
|
|
12
12
|
}
|
|
13
|
-
const empty = () => ({ generation: 0, sessionId: null, scope: "unknown", connected: false, reading: false, busy: null,
|
|
14
|
-
rules: null, base: null, draft: null, rulesIssue: null, dirty: false, notice: null });
|
|
13
|
+
const empty = () => ({ generation: 0, sessionId: null, scope: "unknown", connected: false, reading: false, revalidating: false, busy: null,
|
|
14
|
+
rules: null, display: null, base: null, draft: null, rulesIssue: null, dirty: false, notice: null });
|
|
15
|
+
/** Policy, records, coverage and runtime may render from this observation; authority stays in `rules`. */
|
|
16
|
+
export const observedRules = (view) => view.rules ?? view.display;
|
|
17
|
+
/** The projection is older than the current fence and the current policy is unconfirmed. */
|
|
18
|
+
export const displayUnconfirmed = (view) => view.display !== null && view.rules === null;
|
|
15
19
|
/** Borrowed native selection plus last-observed C state; never a Root or policy authority. */
|
|
16
20
|
export class PermissionController {
|
|
17
21
|
state = empty();
|
|
@@ -24,15 +28,20 @@ export class PermissionController {
|
|
|
24
28
|
timer;
|
|
25
29
|
watchers = 0;
|
|
26
30
|
disposed = false;
|
|
31
|
+
/** A successful read/save exists for the current scope fence; not mutation authority. */
|
|
32
|
+
observed = false;
|
|
27
33
|
store = { getSnapshot: () => this.state, subscribe: (listener) => { this.listeners.add(listener); return () => { this.listeners.delete(listener); }; } };
|
|
28
34
|
publish(patch) { if (this.disposed)
|
|
29
35
|
return; this.state = { ...this.state, ...patch }; for (const listener of this.listeners)
|
|
30
36
|
listener(); }
|
|
31
37
|
cancel() { this.request.abort(); this.request = new AbortController(); this.requestSequence++; clearTimeout(this.timer); }
|
|
32
|
-
fence
|
|
38
|
+
/** An observed snapshot exists for this fence; background work must stay invisible until it changes what is possible. */
|
|
39
|
+
trusted() { return this.observed; }
|
|
40
|
+
fence(preserveDraft, preserveBase = preserveDraft, preserveDisplay = true) {
|
|
33
41
|
this.cancel();
|
|
34
|
-
this.
|
|
35
|
-
|
|
42
|
+
this.observed = false;
|
|
43
|
+
this.publish({ generation: this.state.generation + 1, reading: false, revalidating: false, busy: null, notice: null, rules: null, rulesIssue: null,
|
|
44
|
+
...preserveDisplay ? {} : { display: null }, ...preserveDraft ? {} : { draft: null, dirty: false }, ...preserveBase ? {} : { base: null } });
|
|
36
45
|
}
|
|
37
46
|
bindConnection(invoke, generation) {
|
|
38
47
|
if (this.disposed || this.invoke === invoke && this.connection === generation)
|
|
@@ -46,9 +55,11 @@ export class PermissionController {
|
|
|
46
55
|
bindScope(sessionId, owner, scope) {
|
|
47
56
|
if (this.disposed || this.state.sessionId === sessionId && this.owner === owner && this.state.scope === scope)
|
|
48
57
|
return;
|
|
49
|
-
const
|
|
58
|
+
const sameSession = sessionId !== null && sessionId === this.state.sessionId;
|
|
50
59
|
this.owner = owner;
|
|
51
|
-
|
|
60
|
+
// A replaced owner invalidates the old base even when the session ID is unchanged;
|
|
61
|
+
// only the draft and the read-only display projection may survive for explicit recovery.
|
|
62
|
+
this.fence(sameSession, false, sameSession);
|
|
52
63
|
this.publish({ sessionId, scope });
|
|
53
64
|
this.schedule(true);
|
|
54
65
|
}
|
|
@@ -62,13 +73,13 @@ export class PermissionController {
|
|
|
62
73
|
this.fence(true); };
|
|
63
74
|
}
|
|
64
75
|
dispose() { if (this.disposed)
|
|
65
|
-
return; this.fence(false); this.disposed = true; this.listeners.clear(); this.invoke = null; this.owner = null; }
|
|
76
|
+
return; this.fence(false, false, false); this.disposed = true; this.listeners.clear(); this.invoke = null; this.owner = null; }
|
|
66
77
|
live(generation) { return !this.disposed && generation === this.state.generation && this.owner !== null && this.invoke !== null && this.state.scope === "root" && this.state.sessionId !== null; }
|
|
67
78
|
schedule(immediate = false) {
|
|
68
79
|
clearTimeout(this.timer);
|
|
69
80
|
if (this.watchers === 0 || !this.live(this.state.generation))
|
|
70
81
|
return;
|
|
71
|
-
this.timer = setTimeout(() => { void this.
|
|
82
|
+
this.timer = setTimeout(() => { void this.revalidate(this.state.generation); }, immediate ? 0 : 1000);
|
|
72
83
|
this.timer.unref?.();
|
|
73
84
|
}
|
|
74
85
|
issue(error) { return error instanceof PermissionClientError ? error.code : "transport"; }
|
|
@@ -76,26 +87,44 @@ export class PermissionController {
|
|
|
76
87
|
const value = this.state.rules;
|
|
77
88
|
return value !== null && value.runtime.state === "synced" && value.runtime.savedRevision === value.snapshot.revision && value.runtime.runtimeRevision === value.snapshot.revision;
|
|
78
89
|
}
|
|
90
|
+
/** A background request in flight never disables editing or saving; only its own save/authority does. */
|
|
79
91
|
canEdit(generation) { return this.live(generation) && this.state.rulesIssue === null && this.synchronized() && this.state.busy === null; }
|
|
80
|
-
canSave(generation) { return this.canEdit(generation) &&
|
|
81
|
-
|
|
82
|
-
|
|
92
|
+
canSave(generation) { return this.canEdit(generation) && this.state.dirty && this.state.draft?.editor === null; }
|
|
93
|
+
/** User-triggered refresh: visible busy state on this transaction only. */
|
|
94
|
+
async refresh(generation, discard = false) { await this.load(generation, discard, false); }
|
|
95
|
+
/** Watch-driven revalidation. Invisible once a trusted snapshot exists. */
|
|
96
|
+
async revalidate(generation) { await this.load(generation, false, true); }
|
|
97
|
+
async load(generation, discard, background) {
|
|
98
|
+
if (!this.live(generation) || this.state.busy !== null || this.state.reading)
|
|
83
99
|
return;
|
|
84
|
-
|
|
85
|
-
this.publish({ reading: true });
|
|
86
|
-
const [rules] = await Promise.allSettled([this.invoke("describeRules", [id], signal)]);
|
|
87
|
-
if (!this.live(generation) || signal.aborted || sequence !== this.requestSequence)
|
|
100
|
+
if (background && this.state.revalidating)
|
|
88
101
|
return;
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
102
|
+
// A user-triggered refresh upgrades an in-flight silent read into its visible own request.
|
|
103
|
+
if (!background && this.state.revalidating)
|
|
104
|
+
this.cancel();
|
|
105
|
+
// An automatic read over an existing display projection is silent; a first load stays visible.
|
|
106
|
+
const visible = !background || !this.trusted() && this.state.display === null;
|
|
107
|
+
const sequence = ++this.requestSequence, signal = this.request.signal, id = this.state.sessionId;
|
|
108
|
+
this.publish(visible ? { reading: true, revalidating: false } : { revalidating: true });
|
|
109
|
+
try {
|
|
110
|
+
const value = await this.invoke("describeRules", [id], signal);
|
|
111
|
+
if (!this.live(generation) || signal.aborted || sequence !== this.requestSequence)
|
|
112
|
+
return;
|
|
113
|
+
this.observed = true;
|
|
94
114
|
const retain = this.state.dirty && !discard;
|
|
95
|
-
this.publish({ rules: value, rulesIssue: retain && this.state.base?.revision !== value.snapshot.revision ? "stale" : null,
|
|
96
|
-
reading: false,
|
|
115
|
+
this.publish({ rules: value, display: value, rulesIssue: retain && this.state.base?.revision !== value.snapshot.revision ? "stale" : null,
|
|
97
116
|
...retain ? {} : { base: value.snapshot, draft: draftOf(value.snapshot.policy), dirty: false } });
|
|
98
117
|
}
|
|
118
|
+
catch (error) {
|
|
119
|
+
if (!this.live(generation) || signal.aborted || sequence !== this.requestSequence)
|
|
120
|
+
return;
|
|
121
|
+
// Keep the last trusted projection (current or display-only) visible; only its mutation authority is withdrawn.
|
|
122
|
+
this.publish({ rulesIssue: this.issue(error) });
|
|
123
|
+
}
|
|
124
|
+
finally {
|
|
125
|
+
if (this.live(generation) && sequence === this.requestSequence)
|
|
126
|
+
this.publish({ reading: false, revalidating: false });
|
|
127
|
+
}
|
|
99
128
|
this.schedule();
|
|
100
129
|
}
|
|
101
130
|
edit(generation, patch) {
|
|
@@ -121,8 +150,9 @@ export class PermissionController {
|
|
|
121
150
|
this.edit(generation, { upsert: draft.upsert.filter(row => row.id !== id), revoke: [...new Set([...draft.revoke, id])], editor: draft.editor?.id === id ? null : draft.editor });
|
|
122
151
|
}
|
|
123
152
|
begin(busy) {
|
|
153
|
+
// Invalidate and abort unfinished reads so a late response cannot overwrite the save result.
|
|
124
154
|
this.cancel();
|
|
125
|
-
this.publish({ busy, notice: null });
|
|
155
|
+
this.publish({ busy, reading: false, revalidating: false, notice: null });
|
|
126
156
|
return { signal: this.request.signal, id: this.state.sessionId };
|
|
127
157
|
}
|
|
128
158
|
async save(generation) {
|
|
@@ -132,12 +162,14 @@ export class PermissionController {
|
|
|
132
162
|
const current = this.begin("save");
|
|
133
163
|
try {
|
|
134
164
|
const result = await this.invoke("saveRules", [current.id, request], current.signal);
|
|
135
|
-
if (this.live(generation))
|
|
136
|
-
this.
|
|
165
|
+
if (this.live(generation)) {
|
|
166
|
+
this.observed = true;
|
|
167
|
+
this.publish({ rules: result, display: result, base: result.snapshot, draft: draftOf(result.snapshot.policy), dirty: false, rulesIssue: null, notice: "saved" });
|
|
168
|
+
}
|
|
137
169
|
}
|
|
138
170
|
catch (error) {
|
|
139
171
|
if (this.live(generation))
|
|
140
|
-
this.publish({
|
|
172
|
+
this.publish({ rulesIssue: this.issue(error) });
|
|
141
173
|
}
|
|
142
174
|
finally {
|
|
143
175
|
if (this.live(generation)) {
|
|
@@ -3,6 +3,8 @@ export declare const permissionEn: {
|
|
|
3
3
|
title: string;
|
|
4
4
|
rules: string;
|
|
5
5
|
nativeApproval: string;
|
|
6
|
+
sandboxScope: string;
|
|
7
|
+
unconfirmedObservation: string;
|
|
6
8
|
root: string;
|
|
7
9
|
noRoot: string;
|
|
8
10
|
child: string;
|
|
@@ -37,14 +39,22 @@ export declare const permissionEn: {
|
|
|
37
39
|
configPolicyHint: string;
|
|
38
40
|
configRulesHint: string;
|
|
39
41
|
coldHint: string;
|
|
42
|
+
guardScope: string;
|
|
43
|
+
shellSafety: string;
|
|
44
|
+
gitWrite: string;
|
|
45
|
+
toolOutputTruncation: string;
|
|
46
|
+
planValidation: string;
|
|
47
|
+
questionLabels: string;
|
|
48
|
+
todoDiscipline: string;
|
|
49
|
+
maxInlineBytes: string;
|
|
50
|
+
maxLabelChars: string;
|
|
51
|
+
unitBytes: string;
|
|
52
|
+
unitChars: string;
|
|
40
53
|
nativeCommands: string;
|
|
41
54
|
nativeCommandsHint: string;
|
|
42
55
|
registrationUnresolved: string;
|
|
43
56
|
entryId: string;
|
|
44
57
|
tool: string;
|
|
45
|
-
nativeExecutable: string;
|
|
46
|
-
subcommand: string;
|
|
47
|
-
args: string;
|
|
48
58
|
sandboxMode: string;
|
|
49
59
|
mode: string;
|
|
50
60
|
addEntry: string;
|
|
@@ -54,8 +64,22 @@ export declare const permissionEn: {
|
|
|
54
64
|
inheritedEntries: string;
|
|
55
65
|
explicitEntries: string;
|
|
56
66
|
invalidEntry: string;
|
|
67
|
+
pattern: string;
|
|
68
|
+
patternHint: string;
|
|
69
|
+
invalidPattern: string;
|
|
70
|
+
patternScope: string;
|
|
71
|
+
restrictedFullAccess: string;
|
|
57
72
|
rulesUnavailable: string;
|
|
58
|
-
|
|
73
|
+
configRules: string;
|
|
74
|
+
inheritedRules: string;
|
|
75
|
+
explicitRules: string;
|
|
76
|
+
configRulesEmpty: string;
|
|
77
|
+
addRule: string;
|
|
78
|
+
removeRule: string;
|
|
79
|
+
advancedRules: string;
|
|
80
|
+
invalidRule: string;
|
|
81
|
+
recordedOperator: string;
|
|
82
|
+
invalidPatternHint: string;
|
|
59
83
|
observedPolicy: string;
|
|
60
84
|
profileOverrideState: string;
|
|
61
85
|
profileOverrideUnknown: string;
|
|
@@ -79,6 +103,7 @@ export declare const permissionEn: {
|
|
|
79
103
|
off: string;
|
|
80
104
|
restart: string;
|
|
81
105
|
coverageTitle: string;
|
|
106
|
+
coverageDetails: string;
|
|
82
107
|
coverage: string;
|
|
83
108
|
coverageUnavailable: string;
|
|
84
109
|
coverageEmpty: string;
|
|
@@ -114,6 +139,7 @@ export declare const permissionEn: {
|
|
|
114
139
|
staged: string;
|
|
115
140
|
noRules: string;
|
|
116
141
|
save: string;
|
|
142
|
+
refresh: string;
|
|
117
143
|
discard: string;
|
|
118
144
|
dirty: string;
|
|
119
145
|
saved: string;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
export const PERMISSIONS_NS = "settings.dsmm-permissions";
|
|
2
2
|
export const permissionEn = {
|
|
3
|
-
title: "Permission control", rules: "Global permission rules",
|
|
3
|
+
title: "Permission control", rules: "Global permission rules (through the selected main session)",
|
|
4
4
|
nativeApproval: "Approve commands in the native prompt. Allow approves only that call.",
|
|
5
|
+
sandboxScope: "These rules decide allow, ask or deny for tools and matches. The Host sandbox and its native approval prompt remain separate and authoritative for what an approved call may touch.",
|
|
6
|
+
unconfirmedObservation: "Showing the last successful observation. The current selection is not confirmed yet, so editing and saving stay unavailable.",
|
|
5
7
|
root: "Selected main session", noRoot: "Select a main session to view its permission rules.",
|
|
6
8
|
child: "Select this child’s main session to edit Global rules.",
|
|
7
9
|
unknown: "Unavailable / unknown", reading: "Reading…", busy: "Operation pending…",
|
|
@@ -11,22 +13,32 @@ export const permissionEn = {
|
|
|
11
13
|
"kind:outside-read": "Outside-workspace read", "kind:shell": "Shell operation", "kind:webSearch": "Web search", "kind:webFetch": "Web fetch",
|
|
12
14
|
path: "Canonical path", pathScope: "Path match", exact: "Exact path", tree: "Path and descendants",
|
|
13
15
|
networkLimit: "Web rules cover public web tools only. Private networks, shell commands and sockets remain outside this permission.",
|
|
14
|
-
rulesHint: "
|
|
16
|
+
rulesHint: "Rules are edited through the selected main session but are Global policy, not session-private: saving persists them for every context that uses this policy. This transaction is separate from configuration above. If profile overrides block saving, edit or clear them in the profile scope, then refresh.",
|
|
15
17
|
configPolicyHint: "Profile settings override Global settings. Arrays replace inherited lists. Refresh session permissions after saving to check what is effective.",
|
|
16
|
-
configRulesHint: "
|
|
18
|
+
configRulesHint: "Record list for this configuration layer. The form supplies ID, action and match only; the Host assigns the imported source and preserves the record version during import. Imported records are never verified approvals. Use the Global rules transaction below for operator-verified changes. An empty list is an explicit empty replacement.",
|
|
17
19
|
coldHint: "Changing this switch requires a Host restart. Current protection stays active until then. Restart may cancel sessions.",
|
|
18
|
-
|
|
19
|
-
|
|
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. Each rule stores one command pattern: an executable and fixed subcommand alternatives, with any trailing arguments. Legacy exact executable/argument rules are rejected, not converted. Other approval, denial and read-only restrictions still apply. New entries use ask and workspace-write.",
|
|
22
|
+
registrationUnresolved: "Executor identity is unconfirmed. Verify the tool, executable, environment and sandbox before entering values.",
|
|
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: use unique nonblank IDs, a valid pattern, and an absolute Host working directory. Draft retained; Save locked.",
|
|
24
|
+
pattern: "Command pattern",
|
|
25
|
+
patternHint: "One executable, one subcommand or pipe-separated alternatives, then an optional * for the argument tail: go build|test and go build|test * both allow any trailing arguments. The * only covers trailing arguments; there is no character glob or regular expression.",
|
|
26
|
+
invalidPattern: "Invalid pattern: use one executable and the subcommand position only, separated by spaces. Pipe alternatives must be nonblank literals and * may appear only as the final token.",
|
|
27
|
+
patternScope: "Any trailing arguments are allowed, so the selected program can run its own builds, tests and internal scripts. This is not a path or filesystem grant, and shell pipes, chaining, redirects and substitutions still follow the ordinary native path.",
|
|
28
|
+
restrictedFullAccess: "danger-full-access — retained from the saved value; not offered here",
|
|
21
29
|
rulesUnavailable: "Editing requires an open main session, local editing permission and synchronized rules. Check profile overrides, reconnect and refresh.",
|
|
22
|
-
|
|
30
|
+
configRules: "Imported configuration rules", inheritedRules: "Inherited records; editing pins a replacement list in this layer.", explicitRules: "Explicit replacement list in this layer.",
|
|
31
|
+
configRulesEmpty: "This layer stores no permission rules.", addRule: "Add imported rule", removeRule: "Remove rule", advancedRules: "Advanced rule JSON",
|
|
32
|
+
invalidRule: "Invalid rule list: use unique nonblank IDs, allow/ask/deny actions, and a complete match. Draft retained; Save locked.",
|
|
33
|
+
recordedOperator: "Recorded operator source (metadata, not approval)",
|
|
34
|
+
invalidPatternHint: "Correct invalid pattern text before saving. Removing a row discards only that row's draft and keeps the others; Unset replaces this whole array with the inherited list.",
|
|
23
35
|
observedPolicy: "Effective policy (including profile overrides)",
|
|
24
36
|
profileOverrideState: "Profile overrides", profileOverrideUnknown: "Unknown. Choose Current DSH profile above to inspect overrides.",
|
|
25
37
|
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
38
|
source: "Actual source", recordVersion: "Record version", savedAt: "Saved at", operator: "Verified Host operator", imported: "User import", active: "Active record", revoked: "Revoked record",
|
|
27
39
|
base: "Draft version", savedRevision: "Saved version", runtimeRevision: "Effective version", runtime: "Rule synchronization", synced: "Synced", updating: "Updating", unsynced: "Unsynced — saving unavailable",
|
|
28
40
|
mounted: "Startup mounted", on: "On", off: "Off", restart: "Independent restart required",
|
|
29
|
-
coverageTitle: "Tool coverage", coverage: "Last observed for this main session. Executor readiness and network access must be checked separately.",
|
|
41
|
+
coverageTitle: "Tool coverage", coverageDetails: "Details", coverage: "Last observed for this main session. Executor readiness and network access must be checked separately.",
|
|
30
42
|
coverageUnavailable: "Coverage unavailable / unknown. No trusted live observation was returned.", coverageEmpty: "No trusted tool registrations observed for this Root.",
|
|
31
43
|
coverageRuntime: "Observed consumer state", coverageRevision: "Observed consumer runtime source", toolName: "Observed tool name", toolKind: "Trusted registration kind",
|
|
32
44
|
toolApproval: "Approval boundary", nativeOnce: "Native prompt — once only", toolMemory: "Scoped approval memory", notProvided: "Not provided",
|
|
@@ -37,7 +49,7 @@ export const permissionEn = {
|
|
|
37
49
|
"limit:shellSockets": "Depends on the native executor; no all-Shell or socket firewall.", "limit:providerAuthMcp": "Not covered by these rules.",
|
|
38
50
|
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
51
|
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: "Unsaved rule changes", noRules: "No saved rules.", save: "Save", discard: "Discard draft and reload", dirty: "Unsaved rules draft", saved: "Rules saved. Check synchronization below.",
|
|
52
|
+
editor: "Rule draft", staged: "Unsaved rule changes", noRules: "No saved rules.", save: "Save", refresh: "Refresh rules", discard: "Discard draft and reload", dirty: "Unsaved rules draft", saved: "Rules saved. Check synchronization below.",
|
|
41
53
|
"issue:not-owned": "Root/operator/readonly authority refused. Select the intended Root and refresh.",
|
|
42
54
|
"issue:stale": "Source conflict. Draft retained. Review, then explicitly discard and reload.",
|
|
43
55
|
"issue:cancelled": "Operation cancelled; refresh actual saved state.",
|
|
@@ -50,8 +62,10 @@ export const permissionEn = {
|
|
|
50
62
|
"issue:protocol": "Untrusted or mismatched service response. Refresh or reconnect.",
|
|
51
63
|
};
|
|
52
64
|
export const permissionZh = {
|
|
53
|
-
title: "权限控制", rules: "
|
|
65
|
+
title: "权限控制", rules: "全局权限规则(通过所选主会话管理)",
|
|
54
66
|
nativeApproval: "请在原生提示中批准命令;「允许」仅批准本次调用。",
|
|
67
|
+
sandboxScope: "这些规则决定工具与匹配项的允许、询问或拒绝;具体调用可触及的范围仍由宿主沙箱及其原生批准提示单独决定。",
|
|
68
|
+
unconfirmedObservation: "当前显示上次成功观测;当前选择尚未确认,编辑与保存暂不可用。",
|
|
55
69
|
root: "所选主会话", noRoot: "请选择主会话以查看权限规则。", child: "请切换到此子会话的主会话后编辑全局规则。",
|
|
56
70
|
unknown: "不可用/未知", reading: "正在读取…", busy: "操作处理中…",
|
|
57
71
|
executable: "原生 Shell 注册身份(精确匹配)", command: "完整命令(精确匹配)", cwd: "工作目录(精确匹配)", id: "规则 ID", action: "规则动作", match: "匹配类型",
|
|
@@ -60,22 +74,32 @@ export const permissionZh = {
|
|
|
60
74
|
"kind:outside-read": "工作区外读取", "kind:shell": "Shell 操作", "kind:webSearch": "网页搜索", "kind:webFetch": "网页抓取",
|
|
61
75
|
path: "规范路径", pathScope: "路径匹配", exact: "精确路径", tree: "此路径及子树",
|
|
62
76
|
networkLimit: "网页规则仅覆盖公共网页工具,不包含私网、Shell 命令或 socket 权限。",
|
|
63
|
-
rulesHint: "
|
|
77
|
+
rulesHint: "规则通过所选主会话编辑,但属于全局策略而非会话私有:保存后对所有使用该策略的上下文生效。此事务与上方配置事务相互独立。若配置覆盖阻止保存,请在配置范围内编辑或清除覆盖,再刷新。",
|
|
64
78
|
configPolicyHint: "当前配置优先于全局配置,数组整体替换继承列表。保存后请刷新会话权限以检查实际生效状态。",
|
|
65
|
-
configRulesHint: "
|
|
79
|
+
configRulesHint: "此配置层的记录列表。表单只提供 ID、动作与匹配条件;导入时由宿主指定来源并保留记录版本。导入记录永不被标记为已核验批准;经核验的更改请使用下方全局规则事务。空列表表示显式整体替换为空。",
|
|
66
80
|
coldHint: "更改此开关需重启宿主,此前保留当前保护。重启可能取消会话。",
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
81
|
+
guardScope: "保护范围", shellSafety: "Shell 命令安全", gitWrite: "Git 写入审批", toolOutputTruncation: "工具输出截断", planValidation: "计划格式校验", questionLabels: "问题标签辅助", todoDiscipline: "Todo 纪律辅助", maxInlineBytes: "内联输出上限", maxLabelChars: "标签长度上限", unitBytes: "字节", unitChars: "字符",
|
|
82
|
+
nativeCommands: "命令规则", nativeCommandsHint: "默认关闭。每条规则只保存一个命令模式:一个可执行程序与固定子命令备选,并允许任意后续参数。旧的精确可执行程序/参数规则会被拒绝,不会转换。其他审批、拒绝和只读限制仍有效。新条目使用询问与 workspace-write。",
|
|
83
|
+
registrationUnresolved: "执行器身份尚未确认,请核验工具、可执行程序、环境和沙箱后再填写值。",
|
|
84
|
+
entryId: "条目 ID", tool: "工具", sandboxMode: "沙箱模式", mode: "原生动作", addEntry: "添加条目", removeEntry: "移除条目", noEntries: "没有命令条目。", unset: "Unset——恢复继承", inheritedEntries: "继承的条目;编辑后在此层固定为整体替换数组。", explicitEntries: "此层显式整体替换数组。", invalidEntry: "条目无效:ID 需唯一且非空,模式语法需有效,工作目录为宿主绝对路径。草稿保留,保存已锁定。",
|
|
85
|
+
pattern: "命令模式",
|
|
86
|
+
patternHint: "一个可执行程序、一个子命令或用竖线分隔的备选,最后可选 * 表示参数尾部;go build|test 与 go build|test * 都允许任意后续参数。* 仅覆盖后续参数,不支持字符通配或正则表达式。",
|
|
87
|
+
invalidPattern: "模式无效:只允许一个可执行程序与子命令位置,以空格分隔。竖线备选须为完整非空字面量,* 只能是最后一个独立 token。",
|
|
88
|
+
patternScope: "允许任意后续参数,因此被选程序可以运行自身的构建、测试和内部脚本。这不是路径或文件系统授权;shell 管道、拼接、重定向与替换仍走普通原生路径。",
|
|
89
|
+
restrictedFullAccess: "danger-full-access——保留自已保存的值,此处不提供创建",
|
|
70
90
|
rulesUnavailable: "编辑需要已打开的主会话、本地编辑权限和已同步的规则。请检查配置覆盖,重连后刷新。",
|
|
71
|
-
|
|
91
|
+
configRules: "导入的配置规则", inheritedRules: "继承的记录;编辑后在此层固定为整体替换列表。", explicitRules: "此层显式整体替换列表。",
|
|
92
|
+
configRulesEmpty: "此层没有权限规则记录。", addRule: "添加导入规则", removeRule: "移除规则", advancedRules: "高级规则 JSON",
|
|
93
|
+
invalidRule: "规则列表无效:ID 需唯一且非空,动作为 allow/ask/deny,匹配条件完整。草稿保留,保存已锁定。",
|
|
94
|
+
recordedOperator: "记录的 operator 来源(元数据,不代表批准)",
|
|
95
|
+
invalidPatternHint: "请修正无效模式文本后再保存。移除某一行只丢弃该行草稿并保留其他行;Unset 则用继承列表整体替换此数组。",
|
|
72
96
|
observedPolicy: "有效策略(含当前配置覆盖)",
|
|
73
97
|
profileOverrideState: "配置覆盖", profileOverrideUnknown: "未知,请在上方选择当前 DSH 配置查看覆盖值。",
|
|
74
98
|
matchHint: "可匹配精确路径或目录树、精确 Shell 工具与命令及目录,或网页工具。允许不授予工作区外写入权限。规则保留至撤销。",
|
|
75
99
|
source: "实际来源", recordVersion: "记录版本", savedAt: "保存时间", operator: "宿主已核验 operator", imported: "用户导入", active: "有效记录", revoked: "已撤销记录",
|
|
76
100
|
base: "草稿版本", savedRevision: "保存版本", runtimeRevision: "生效版本", runtime: "规则同步", synced: "已同步", updating: "同步中", unsynced: "未同步——暂不可保存",
|
|
77
101
|
mounted: "启动时已挂载", on: "开启", off: "关闭", restart: "需要另行重启",
|
|
78
|
-
coverageTitle: "工具覆盖范围", coverage: "所选主会话最近观测的覆盖范围,执行器就绪和网络访问需另行检查。",
|
|
102
|
+
coverageTitle: "工具覆盖范围", coverageDetails: "详细信息", coverage: "所选主会话最近观测的覆盖范围,执行器就绪和网络访问需另行检查。",
|
|
79
103
|
coverageUnavailable: "覆盖不可用/未知:未返回可信的实时观测。", coverageEmpty: "未观测到此 Root 的可信工具注册。",
|
|
80
104
|
coverageRuntime: "已观测 consumer 状态", coverageRevision: "已观测 consumer 运行时来源", toolName: "已观测工具名称", toolKind: "可信注册类型",
|
|
81
105
|
toolApproval: "批准边界", nativeOnce: "原生提示——仅本次", toolMemory: "作用域批准记忆", notProvided: "不提供",
|
|
@@ -86,7 +110,7 @@ export const permissionZh = {
|
|
|
86
110
|
"limit:shellSockets": "依赖原生执行器,不是全部 Shell 或 socket 的防火墙。", "limit:providerAuthMcp": "不在这些规则覆盖范围。",
|
|
87
111
|
pathEvidence: "读取检查当前文件系统;搜索和 Shell 的路径检查取决于执行器。不保证最终文件身份、完整文件系统或 socket 隔离。",
|
|
88
112
|
newRule: "添加精确匹配规则", editRule: "编辑规则", stage: "暂存规则", cancel: "取消规则编辑", stageRevoke: "暂存撤销", unstage: "移除暂存更改",
|
|
89
|
-
editor: "规则草稿", staged: "未保存的规则更改", noRules: "尚无已保存规则。", save: "保存", discard: "丢弃草稿并重载", dirty: "规则草稿未保存", saved: "规则已保存,请核对下方同步状态。",
|
|
113
|
+
editor: "规则草稿", staged: "未保存的规则更改", noRules: "尚无已保存规则。", save: "保存", refresh: "刷新规则", discard: "丢弃草稿并重载", dirty: "规则草稿未保存", saved: "规则已保存,请核对下方同步状态。",
|
|
90
114
|
"issue:not-owned": "Root/operator/只读权限拒绝,请选择目标 Root 后刷新。", "issue:stale": "来源冲突,草稿保留;核对后显式丢弃并重载。", "issue:cancelled": "操作已取消,请刷新实际保存状态。",
|
|
91
115
|
"issue:unavailable": "服务或运行时不可用,草稿保留;已保存与运行时可能不同。", "issue:validation": "宿主拒绝规则,草稿保留;请核对精确字段与原生覆盖。", "issue:not-found": "规则已不存在。",
|
|
92
116
|
"issue:scope-unavailable": "所请求的操作不可用。", "issue:replayed": "操作已不再有效。", "issue:denied": "当前 Root 策略拒绝操作,没有本地绕过入口。",
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { SessionBinding, SessionListState, SessionSnapshot, SessionSummary } from "@deepseek-ai/dsh-api-session-controller/client";
|
|
2
|
+
import type { SessionId } from "@deepseek-ai/dsh-session/types";
|
|
3
|
+
import type { PermissionView } from "./permission-controller.js";
|
|
4
|
+
/** The observable subset this binding uses; no store engine is imported. */
|
|
5
|
+
interface Observable<T> {
|
|
6
|
+
getSnapshot(): T;
|
|
7
|
+
subscribe(listener: () => void): () => void;
|
|
8
|
+
}
|
|
9
|
+
/** The current native selection source; it retains whatever it renders. */
|
|
10
|
+
export type PermissionSessionSource = Observable<{
|
|
11
|
+
readonly key: string | undefined;
|
|
12
|
+
}>;
|
|
13
|
+
/** The session fields this binding classifies; a real `SessionFace` satisfies the projection. */
|
|
14
|
+
export type PermissionSessionSnapshot = Pick<SessionSnapshot, "sessionId" | "subagent" | "removed" | "openState">;
|
|
15
|
+
export type PermissionSessionBinding = Pick<SessionBinding, "sessionId"> & {
|
|
16
|
+
readonly session: Observable<PermissionSessionSnapshot>;
|
|
17
|
+
};
|
|
18
|
+
/** Only the catalog membership and lineage fields this binding reads. */
|
|
19
|
+
export type PermissionSessionCatalog = Pick<SessionListState, "ids"> & {
|
|
20
|
+
readonly byId: Readonly<Record<SessionId, Pick<SessionSummary, "origin" | "parentId">>>;
|
|
21
|
+
};
|
|
22
|
+
export interface PermissionSessions {
|
|
23
|
+
binding(id: SessionId): PermissionSessionBinding | undefined;
|
|
24
|
+
readonly list: Observable<PermissionSessionCatalog>;
|
|
25
|
+
}
|
|
26
|
+
/** The only controller capability this binding needs. */
|
|
27
|
+
export interface PermissionScopeSink {
|
|
28
|
+
bindScope(sessionId: string | null, owner: object | null, scope: PermissionView["scope"]): void;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Follow the selected native session without retaining, opening or debouncing it.
|
|
32
|
+
* A binding is reused across notifications and only an actual session change clears
|
|
33
|
+
* the controller's display projection.
|
|
34
|
+
*/
|
|
35
|
+
export declare function bindPermissionSession(source: PermissionSessionSource, sessions: PermissionSessions, permissions: PermissionScopeSink): () => void;
|
|
36
|
+
export {};
|
|
37
|
+
//# sourceMappingURL=permission-session.d.ts.map
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Follow the selected native session without retaining, opening or debouncing it.
|
|
3
|
+
* A binding is reused across notifications and only an actual session change clears
|
|
4
|
+
* the controller's display projection.
|
|
5
|
+
*/
|
|
6
|
+
export function bindPermissionSession(source, sessions, permissions) {
|
|
7
|
+
let observed, stop;
|
|
8
|
+
const update = () => {
|
|
9
|
+
const id = source.getSnapshot().key, binding = id === undefined ? undefined : sessions.binding(id);
|
|
10
|
+
if (binding !== observed) {
|
|
11
|
+
stop?.();
|
|
12
|
+
observed = binding;
|
|
13
|
+
stop = binding?.session.subscribe(update);
|
|
14
|
+
}
|
|
15
|
+
const snapshot = binding?.session.getSnapshot(), catalog = sessions.list.getSnapshot(), summary = id === undefined ? undefined : catalog.byId[id];
|
|
16
|
+
const child = snapshot?.subagent != null || summary?.origin === "subagent" || summary?.parentId !== undefined;
|
|
17
|
+
const root = id !== undefined && binding?.sessionId === id && snapshot?.sessionId === id && snapshot.openState === "open" && !snapshot.removed
|
|
18
|
+
&& catalog.ids.includes(id) && summary !== undefined && !child;
|
|
19
|
+
permissions.bindScope(id ?? null, binding ?? null, child ? "child" : root ? "root" : "unknown");
|
|
20
|
+
};
|
|
21
|
+
update();
|
|
22
|
+
const stopSource = source.subscribe(update), stopCatalog = sessions.list.subscribe(update);
|
|
23
|
+
let active = true;
|
|
24
|
+
return () => {
|
|
25
|
+
if (!active)
|
|
26
|
+
return;
|
|
27
|
+
active = false;
|
|
28
|
+
stopSource();
|
|
29
|
+
stopCatalog();
|
|
30
|
+
stop?.();
|
|
31
|
+
permissions.bindScope(null, null, "unknown");
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=permission-session.js.map
|
package/lib/client/styles.d.ts
CHANGED
|
@@ -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-
|
|
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 summary .dsmm-group-summary{display:flex;align-items:center;gap:8px;min-width:0}\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";
|
|
3
3
|
//# sourceMappingURL=styles.d.ts.map
|
package/lib/client/styles.js
CHANGED
|
@@ -54,17 +54,21 @@ export const PROFILE_STYLES = `
|
|
|
54
54
|
.dsmm-profiles :is(.dsmm-warning,.dsmm-diagnostic,.dsmm-availability){min-width:0;display:flex;flex-direction:column;gap:4px;overflow-wrap:anywhere}
|
|
55
55
|
.dsmm-profiles .dsmm-warning{border-left:4px solid var(--dsw-alias-state-warn-primary);padding:8px 12px;color:var(--dsw-alias-label-primary)}
|
|
56
56
|
.dsmm-deployment{gap:8px}
|
|
57
|
-
.dsmm-
|
|
58
|
-
.dsmm-
|
|
59
|
-
.dsmm-
|
|
60
|
-
.dsmm-
|
|
61
|
-
.dsmm-
|
|
62
|
-
.dsmm-
|
|
63
|
-
.dsmm-
|
|
57
|
+
.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}
|
|
58
|
+
.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}
|
|
59
|
+
.dsmm-section-tabs button:hover{background:var(--dsw-alias-interactive-bg-hover)}
|
|
60
|
+
.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}
|
|
61
|
+
.dsmm-section-panel{display:flex;flex-direction:column;gap:16px;min-width:0;width:100%;box-sizing:border-box}
|
|
62
|
+
.dsmm-panel-heading{display:flex;flex-wrap:wrap;gap:8px;justify-content:space-between;align-items:center;min-width:0}
|
|
63
|
+
.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}
|
|
64
|
+
.dsmm-rules-transaction{padding-top:16px}
|
|
64
65
|
.dsmm-scope-save{display:flex;flex-direction:column;gap:8px;padding-top:16px;border-top:1px solid var(--dsw-alias-border-l4)}
|
|
65
|
-
@media(max-width:768px){.dsmm-deployment-frame{grid-template-columns:minmax(0,1fr)}.dsmm-deployment-frame[data-drawer-open=true]>.dsmm-module-list{display:none}}
|
|
66
66
|
.dsmm-deployment .dsmm-deployment-group{border-top:1px solid var(--dsw-alias-border-l4);padding-top:8px;min-width:0}
|
|
67
67
|
.dsmm-deployment .dsmm-deployment-group>div{display:flex;flex-direction:column;gap:8px;padding-top:8px}
|
|
68
|
+
.dsmm-deployment summary .dsmm-group-summary{display:flex;align-items:center;gap:8px;min-width:0}
|
|
69
|
+
.dsmm-deployment .dsmm-group-summary-label{flex:1 1 auto;min-width:0;overflow-wrap:anywhere}
|
|
70
|
+
.dsmm-deployment .dsmm-group-summary-action{flex:0 0 auto;min-height:28px;height:28px;padding:0 8px}
|
|
71
|
+
.dsmm-deployment .dsmm-group-summary-action[hidden]{display:none}
|
|
68
72
|
.dsmm-deployment code{font-family:var(--ds-font-family-code);overflow-wrap:anywhere}
|
|
69
73
|
.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)}
|
|
70
74
|
.dsmm-deployment pre{margin:0;max-width:100%;white-space:pre-wrap;overflow-wrap:anywhere;font-family:var(--ds-font-family-code)}
|