@zhushanwen/pi-permission 1.3.0 → 1.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -20,8 +20,8 @@ Pi permission 扩展 — 四档权限模式(yolo / auto / approve / strict)+
20
20
  # npm 方式(唯一正式方式)
21
21
  pi install npm:@zhushanwen/pi-permission
22
22
 
23
- # 本地开发(symlink)
24
- ln -s /path/to/xyz-pi-extensions-workspace/feat-permission-and-auto-mode/extensions/permission \
23
+ # 本地开发(symlink;globalExtDir 平铺布局,目标不带分组层)
24
+ ln -s /path/to/xyz-pi-extensions-workspace/feat-permission-and-auto-mode/extensions/universal/permission \
25
25
  ~/.pi/agent/extensions/permission
26
26
  ```
27
27
 
package/package.json CHANGED
@@ -1,9 +1,12 @@
1
1
  {
2
2
  "name": "@zhushanwen/pi-permission",
3
- "version": "1.3.0",
3
+ "version": "1.3.2",
4
4
  "description": "Pi permission extension — four permission modes (yolo/auto/approve/strict) with three-layer pipeline (AST + rules + AI classifier).",
5
5
  "type": "module",
6
6
  "main": "src/index.ts",
7
+ "xyz-agent": {
8
+ "role": "universal"
9
+ },
7
10
  "pi": {
8
11
  "extensions": [
9
12
  "./index.ts"
@@ -29,12 +32,12 @@
29
32
  "dependencies": {
30
33
  "tree-sitter-bash": "^0.25.1",
31
34
  "web-tree-sitter": "^0.26.11",
32
- "@zhushanwen/pi-llm-shared": "0.3.0"
35
+ "@zhushanwen/pi-llm-shared": "0.4.0"
33
36
  },
34
37
  "peerDependencies": {
35
- "@earendil-works/pi-ai": "*",
36
- "@earendil-works/pi-coding-agent": "*",
37
- "@earendil-works/pi-tui": "*"
38
+ "@earendil-works/pi-ai": "^0.84.1",
39
+ "@earendil-works/pi-coding-agent": "^0.84.1",
40
+ "@earendil-works/pi-tui": "^0.84.1"
38
41
  },
39
42
  "peerDependenciesMeta": {
40
43
  "@earendil-works/pi-ai": {
@@ -48,9 +51,10 @@
48
51
  }
49
52
  },
50
53
  "devDependencies": {
51
- "@earendil-works/pi-ai": "*",
52
- "@earendil-works/pi-coding-agent": "*",
53
- "@earendil-works/pi-tui": "*",
54
+ "@earendil-works/pi-ai": "^0.84.2",
55
+ "@earendil-works/pi-coding-agent": "^0.84.2",
56
+ "@earendil-works/pi-tui": "^0.84.2",
57
+ "@vitest/coverage-v8": "^4.1.9",
54
58
  "vitest": "^4.1.8"
55
59
  },
56
60
  "scripts": {
@@ -2,7 +2,7 @@
2
2
  //
3
3
  // permission 端的 footer line 注册入口(consumer 端握手协议)。
4
4
  //
5
- // 设计动机(沿用 ask-user #M4 修复模式,见 extensions/ask-user/src/channel-registry-register.ts):
5
+ // 设计动机(沿用 ask-user #M4 修复模式,见 extensions/universal/ask-user/src/channel-registry-register.ts):
6
6
  // - statusline 是 registry 唯一创建方(canonical owner)—— pi-statusline 独立项目
7
7
  // (~/Code/pi-statusline)的 footer-handshake-access.ts
8
8
  // - permission 是 consumer:永不创建 registry 实例,永不写 slot.registry 字段
package/src/index.ts CHANGED
@@ -227,7 +227,8 @@ export default function permissionExtension(pi: ExtensionAPI): void {
227
227
 
228
228
  /**
229
229
  * 注册 permission footer line renderer(consumer 端握手)。
230
- * 不依赖 ctx.ui:pi 的 ExtensionUIContext 无 theme 字段(类型权威),theme 由
230
+ * 不依赖 ctx.ui.theme:theme 不从 ExtensionUIContext 取——pi 的 ExtensionUIContext
231
+ * 虽有 theme 字段(types.d.ts:174-175),但 statusline 渲染的权威 theme 由
231
232
  * pi-statusline 每次 render 时经 render(ctx, theme) 传入(render hook 的 theme 参数 = pi Theme 对象)。
232
233
  * headless(rpc/json mode)时 render 收不到有效 theme → 返回 null,statusline 跳过。
233
234
  */