@prettier-ai/dsh-client-ui-permission-presets 0.1.2-alpha.2 → 0.1.2-alpha.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.i18n.yaml +2 -2
- package/README.md +3 -1
- package/README.zh.md +3 -1
- package/lib/client.js +3 -3
- package/package.json +14 -20
- package/lib/invariant.js +0 -24
- package/lib/types/invariant.d.ts +0 -16
package/README.i18n.yaml
CHANGED
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
# side as of the last confirmed-consistent state. Both languages carry equal authority;
|
|
3
3
|
# after editing either side, bring the other along and re-record with:
|
|
4
4
|
# pnpm run verify-translation-pairing --write packages/client/ui-permission-presets/README.md
|
|
5
|
-
README.md:
|
|
6
|
-
README.zh.md:
|
|
5
|
+
README.md: 9fa1d42f90478c00c06b23bc89ef212195b01dc2
|
|
6
|
+
README.zh.md: dee60ba44d7997a535d51f544993ecca9947e3eb
|
package/README.md
CHANGED
|
@@ -29,7 +29,7 @@ Mount this plugin alongside the settings and commands packages; the permission r
|
|
|
29
29
|
|
|
30
30
|
### The picker
|
|
31
31
|
|
|
32
|
-
A pick submits the `/permission <preset>` command line. The argued path (`/permission <preset>` typed directly) still switches directly; the decoration replaces only the bare invocation. The built-in labels are `Read Only`, `Workspace Write`, and `Full access` in English and `仅可查看`,
|
|
32
|
+
A pick submits the `/permission <preset>` command line. The argued path (`/permission <preset>` typed directly) still switches directly; the decoration replaces only the bare invocation. The built-in labels are `Read Only`, `Workspace Write`, and `Full access` in English and `仅可查看`, `工作区内修改`, and `完全权限` in Chinese; `custom` is display state, never a target.
|
|
33
33
|
|
|
34
34
|
### The Settings row
|
|
35
35
|
|
|
@@ -89,3 +89,5 @@ These limits define the current permission surfaces. They are current package co
|
|
|
89
89
|
None.
|
|
90
90
|
|
|
91
91
|
</details>
|
|
92
|
+
|
|
93
|
+
**Runtime invariant:** No companion is published. The command and slot contribution lifecycles are proven by the HMR-safety spec, while the browser-only Settings controller owns no host events or cross-plugin mutable state.
|
package/README.zh.md
CHANGED
|
@@ -29,7 +29,7 @@ kind: "package-reference"
|
|
|
29
29
|
|
|
30
30
|
### 选择器
|
|
31
31
|
|
|
32
|
-
选中即提交 `/permission <preset>` 命令行。带参路径(直接键入 `/permission <preset>`)仍直接切换;装饰只替换裸调用。内置标签在英文界面中是 `Read Only`、`Workspace Write` 和 `Full access
|
|
32
|
+
选中即提交 `/permission <preset>` 命令行。带参路径(直接键入 `/permission <preset>`)仍直接切换;装饰只替换裸调用。内置标签在英文界面中是 `Read Only`、`Workspace Write` 和 `Full access`,在中文界面中是「仅可查看」「工作区内修改」和「完全权限」;`custom` 只是显示状态,绝非目标。
|
|
33
33
|
|
|
34
34
|
### 设置行
|
|
35
35
|
|
|
@@ -89,3 +89,5 @@ kind: "package-reference"
|
|
|
89
89
|
无。
|
|
90
90
|
|
|
91
91
|
</details>
|
|
92
|
+
|
|
93
|
+
**运行时不变式:** 不发布伴生入口。command 与 slot contribution 的生命周期由 HMR 测试覆盖;浏览器侧 Settings controller 不持有 Host 事件或跨插件可变状态。
|
package/lib/client.js
CHANGED
|
@@ -17,7 +17,7 @@ window.__ModuleLoader__.load({
|
|
|
17
17
|
"loading": "加载中",
|
|
18
18
|
"unavailable": "不可用",
|
|
19
19
|
"preset.readOnly": "仅可查看",
|
|
20
|
-
"preset.workspaceWrite": "
|
|
20
|
+
"preset.workspaceWrite": "工作区内修改",
|
|
21
21
|
"preset.fullAccess": "完全权限",
|
|
22
22
|
"confirm.title": "确认启用完全权限?",
|
|
23
23
|
"confirm.description": "启用完全权限后,新会话将减少确认步骤,并且可以直接执行更多操作,包括敏感操作、文件修改或外部命令。仅建议在你信任后续任务时使用。",
|
|
@@ -43,7 +43,7 @@ window.__ModuleLoader__.load({
|
|
|
43
43
|
/** Simplified Chinese dictionary for the current-session popup gate. */
|
|
44
44
|
const accessZh = {
|
|
45
45
|
"preset.readOnly": "仅可查看",
|
|
46
|
-
"preset.workspaceWrite": "
|
|
46
|
+
"preset.workspaceWrite": "工作区内修改",
|
|
47
47
|
"preset.fullAccess": "完全权限",
|
|
48
48
|
"confirm.title": "确认启用完全权限?",
|
|
49
49
|
"confirm.description": "启用完全权限后,智能体将减少确认步骤,并且可以直接执行更多操作,包括敏感操作、文件修改或外部命令。仅建议在你信任当前任务时使用。",
|
|
@@ -99,7 +99,7 @@ window.__ModuleLoader__.load({
|
|
|
99
99
|
}
|
|
100
100
|
//#endregion
|
|
101
101
|
//#region \0dsh-css:/home/runner/work/dsh-publisher/dsh-publisher/upstream/packages/client/ui-permission-presets/src/client/PermissionRow.module.css.mjs
|
|
102
|
-
const css = ".kR5lJq_row{border-bottom
|
|
102
|
+
const css = ".kR5lJq_row{border-bottom:.5px solid var(--dsw-alias-border-l2);align-items:center;gap:8px;padding:16px 0;display:flex}.kR5lJq_rowText{flex-direction:column;flex:1;gap:4px;min-width:0;padding-right:48px;display:flex}.kR5lJq_title{color:var(--dsw-alias-label-primary);font-size:14px;font-weight:400;line-height:22px}.kR5lJq_desc{color:var(--dsw-alias-label-tertiary);font-size:12px;font-weight:400;line-height:18px}.kR5lJq_selector{background:var(--dsw-alias-bg-module-platform);height:36px;font:inherit;color:var(--dsw-alias-label-primary);cursor:pointer;border:none;border-radius:18px;align-items:center;gap:12px;padding:0 14px;font-size:14px;line-height:22px;display:inline-flex}.kR5lJq_selector:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover)}.kR5lJq_selector:disabled{cursor:default}.kR5lJq_chevron{flex:none}";
|
|
103
103
|
const tagId = "@prettier-ai/dsh-client-ui-permission-presets/PermissionRow.module.css";
|
|
104
104
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId) + "]") === null) {
|
|
105
105
|
const tag = document.createElement("style");
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prettier-ai/dsh-client-ui-permission-presets",
|
|
3
3
|
"description": "Permission surfaces: a new-session default in General settings and a current-session /permission popup over the permissions projection",
|
|
4
|
-
"version": "0.1.2-alpha.
|
|
4
|
+
"version": "0.1.2-alpha.4",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -18,10 +18,6 @@
|
|
|
18
18
|
"types": "./lib/types/index.d.ts",
|
|
19
19
|
"default": "./lib/index.js"
|
|
20
20
|
},
|
|
21
|
-
"./invariant": {
|
|
22
|
-
"types": "./lib/types/invariant.d.ts",
|
|
23
|
-
"default": "./lib/invariant.js"
|
|
24
|
-
},
|
|
25
21
|
"./client": {
|
|
26
22
|
"types": "./lib/types/client/index.d.ts",
|
|
27
23
|
"default": "./lib/client.js"
|
|
@@ -48,25 +44,23 @@
|
|
|
48
44
|
"devDependencies": {
|
|
49
45
|
"@types/react": "~18.3.1",
|
|
50
46
|
"react": "^18.2.0",
|
|
51
|
-
"@prettier-ai/dsh-api-session-controller": "^0.1.2-alpha.2",
|
|
52
47
|
"@prettier-ai/cordis": "^4.0.2",
|
|
53
|
-
"@prettier-ai/dsh-
|
|
54
|
-
"@prettier-ai/dsh-api-
|
|
55
|
-
"@prettier-ai/dsh-client-
|
|
56
|
-
"@prettier-ai/dsh-client-
|
|
57
|
-
"@prettier-ai/dsh-client-
|
|
58
|
-
"@prettier-ai/dsh-client-ui-
|
|
59
|
-
"@prettier-ai/dsh-client-ui-
|
|
60
|
-
"@prettier-ai/dsh-client-ui-
|
|
61
|
-
"@prettier-ai/dsh-
|
|
62
|
-
"@prettier-ai/dsh-client-ui-
|
|
63
|
-
"@prettier-ai/dsh-
|
|
64
|
-
"@prettier-ai/dsh-
|
|
65
|
-
"@prettier-ai/dsh-client-ui-
|
|
48
|
+
"@prettier-ai/dsh-api-remotes": "^0.1.2-alpha.4",
|
|
49
|
+
"@prettier-ai/dsh-api-session-controller": "^0.1.2-alpha.4",
|
|
50
|
+
"@prettier-ai/dsh-client-locale": "^0.1.2-alpha.4",
|
|
51
|
+
"@prettier-ai/dsh-client-store": "^0.1.2-alpha.4",
|
|
52
|
+
"@prettier-ai/dsh-client-test-runtime": "^0.1.2-alpha.4",
|
|
53
|
+
"@prettier-ai/dsh-client-ui-commands": "^0.1.2-alpha.4",
|
|
54
|
+
"@prettier-ai/dsh-client-ui-settings": "^0.1.2-alpha.4",
|
|
55
|
+
"@prettier-ai/dsh-client-ui-primitives": "^0.1.2-alpha.4",
|
|
56
|
+
"@prettier-ai/dsh-client-ui-input-trigger": "^0.1.2-alpha.4",
|
|
57
|
+
"@prettier-ai/dsh-client-ui-slots": "^0.1.2-alpha.4",
|
|
58
|
+
"@prettier-ai/dsh-permission-presets": "^0.1.2-alpha.4",
|
|
59
|
+
"@prettier-ai/dsh-client-ui-renderer": "^0.1.2-alpha.4",
|
|
60
|
+
"@prettier-ai/dsh-client-ui-session": "^0.1.2-alpha.4"
|
|
66
61
|
},
|
|
67
62
|
"files": [
|
|
68
63
|
"lib/index.js",
|
|
69
|
-
"lib/invariant.js",
|
|
70
64
|
"lib/client.js",
|
|
71
65
|
"lib/types/**/*.d.ts"
|
|
72
66
|
],
|
package/lib/invariant.js
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
//#region lib/types/invariant.js
|
|
2
|
-
/**
|
|
3
|
-
* Package-owned invariant companion for `@prettier-ai/dsh-client-ui-permission-presets`.
|
|
4
|
-
* @module @prettier-ai/dsh-client-ui-permission-presets/invariant
|
|
5
|
-
*/
|
|
6
|
-
const PACKAGE_NAME = "@prettier-ai/dsh-client-ui-permission-presets";
|
|
7
|
-
/** Cordis companion plugin name. */
|
|
8
|
-
const name = "client-ui-permission-presets-invariant";
|
|
9
|
-
/** Service required before the companion can reserve package ownership. */
|
|
10
|
-
const inject = ["invariants"];
|
|
11
|
-
/**
|
|
12
|
-
* No runtime invariant: the command and slot contribution lifecycles are
|
|
13
|
-
* proven by the HMR-safety spec, while the browser-only Settings controller
|
|
14
|
-
* owns no host events or cross-plugin mutable state.
|
|
15
|
-
*/
|
|
16
|
-
const install = () => {};
|
|
17
|
-
/**
|
|
18
|
-
* Register this package's invariant companion.
|
|
19
|
-
* @param ctx - Cordis context carrying the invariant service.
|
|
20
|
-
* @returns the installed registration's disposer after setup succeeds.
|
|
21
|
-
*/
|
|
22
|
-
const apply = (ctx) => Promise.resolve(ctx.invariants.register(PACKAGE_NAME, install));
|
|
23
|
-
//#endregion
|
|
24
|
-
export { apply, inject, name };
|
package/lib/types/invariant.d.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Package-owned invariant companion for `@prettier-ai/dsh-client-ui-permission-presets`.
|
|
3
|
-
* @module @prettier-ai/dsh-client-ui-permission-presets/invariant
|
|
4
|
-
*/
|
|
5
|
-
import type { Context } from '@prettier-ai/cordis';
|
|
6
|
-
/** Cordis companion plugin name. */
|
|
7
|
-
export declare const name = "client-ui-permission-presets-invariant";
|
|
8
|
-
/** Service required before the companion can reserve package ownership. */
|
|
9
|
-
export declare const inject: string[];
|
|
10
|
-
/**
|
|
11
|
-
* Register this package's invariant companion.
|
|
12
|
-
* @param ctx - Cordis context carrying the invariant service.
|
|
13
|
-
* @returns the installed registration's disposer after setup succeeds.
|
|
14
|
-
*/
|
|
15
|
-
export declare const apply: (ctx: Context) => Promise<() => void>;
|
|
16
|
-
//# sourceMappingURL=invariant.d.ts.map
|