omp-mode-switch 1.0.0 → 1.1.0

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
@@ -1,23 +1,24 @@
1
1
  # omp-mode-switch
2
2
 
3
- [![npm version](https://img.shields.io/npm/v/omp-mode-switch)](https://www.npmjs.com/package/omp-mode-switch)
4
- [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
5
-
6
3
  An OMP plugin that lets you switch between three permission modes at runtime. Press **Tab** to cycle, or use `/mode <ask|auto|plan>`.
7
4
 
8
5
  ---
9
6
 
10
7
  ## Installation
11
8
 
9
+ ### From npm
10
+
12
11
  ```bash
13
12
  omp plugin install omp-mode-switch
14
13
  ```
15
14
 
16
- Restart OMP (or start a new session) to activate.
15
+ ### From GitHub
17
16
 
18
- ### Manual
17
+ ```bash
18
+ omp plugin install https://github.com/xinhaojin/omp-mode-switch.git
19
+ ```
19
20
 
20
- Copy `mode-switch.ts` to `~/.omp/agent/extensions/` or your project's `.omp/extensions/`.
21
+ Restart OMP (or start a new session) to activate.
21
22
 
22
23
  ## Usage
23
24
 
@@ -63,22 +64,6 @@ The mode resets to `ask` on each new session.
63
64
  - Restricts tools via `pi.setActiveTools()` in plan mode
64
65
  - Shows status via `ctx.ui.setWidget()` with colored text
65
66
 
66
- ## Development
67
-
68
- ```bash
69
- git clone https://github.com/your-username/omp-mode-switch.git
70
- cd omp-mode-switch
71
- # Make changes to mode-switch.ts
72
- # Copy to ~/.omp/agent/extensions/ and restart OMP to test
73
- ```
74
-
75
- ## Publishing
76
-
77
- ```bash
78
- npm login
79
- npm publish
80
- ```
81
-
82
67
  ## License
83
68
 
84
69
  MIT
package/README.zh-CN.md CHANGED
@@ -1,23 +1,24 @@
1
1
  # omp-mode-switch
2
2
 
3
- [![npm version](https://img.shields.io/npm/v/omp-mode-switch)](https://www.npmjs.com/package/omp-mode-switch)
4
- [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
5
-
6
3
  一个 OMP 插件,让你在运行中切换三种权限模式。按 **Tab** 键循环切换,或使用 `/mode <ask|auto|plan>` 命令。
7
4
 
8
5
  ---
9
6
 
10
7
  ## 安装
11
8
 
9
+ ### 通过 npm
10
+
12
11
  ```bash
13
12
  omp plugin install omp-mode-switch
14
13
  ```
15
14
 
16
- 重启 OMP(或新建会话)即可生效。
15
+ ### 通过 GitHub
17
16
 
18
- ### 手动安装
17
+ ```bash
18
+ omp plugin install https://github.com/xinhaojin/omp-mode-switch.git
19
+ ```
19
20
 
20
- `mode-switch.ts` 复制到 `~/.omp/agent/extensions/` 或项目的 `.omp/extensions/`。
21
+ 重启 OMP(或新建会话)即可生效。
21
22
 
22
23
  ## 使用方法
23
24
 
@@ -27,7 +28,7 @@ omp plugin install omp-mode-switch
27
28
  |--------|------|
28
29
  | `ask` | 每个工具调用都需确认(默认) |
29
30
  | `auto` | 自动批准所有工具调用 |
30
- | `plan` | 仅允许只读工具和 `.md` 文件写入,危险 bash 命令被拦截 |
31
+ | `plan` | 只读工具 + `.md` 文件写入,危险 bash 命令被拦截 |
31
32
 
32
33
  ### 切换
33
34
 
@@ -63,22 +64,6 @@ omp plugin install omp-mode-switch
63
64
  - 在 `plan` 模式下通过 `pi.setActiveTools()` 限制可用工具
64
65
  - 通过 `ctx.ui.setWidget()` 显示彩色状态指示
65
66
 
66
- ## 开发
67
-
68
- ```bash
69
- git clone https://github.com/your-username/omp-mode-switch.git
70
- cd omp-mode-switch
71
- # 修改 mode-switch.ts
72
- # 复制到 ~/.omp/agent/extensions/ 后重启 OMP 测试
73
- ```
74
-
75
- ## 发布
76
-
77
- ```bash
78
- npm login
79
- npm publish
80
- ```
81
-
82
67
  ## 许可证
83
68
 
84
69
  MIT
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "omp-mode-switch",
3
- "version": "1.0.0",
3
+ "version": "1.1.0",
4
4
  "description": "OMP plugin: switch between ask / auto / plan permission modes with Tab key",
5
5
  "type": "module",
6
6
  "main": "mode-switch.ts",
@@ -13,8 +13,8 @@
13
13
  "omp": {
14
14
  "name": "Mode Switch",
15
15
  "description": "Switch between ask / auto / plan permission modes with Tab key",
16
- "version": "1.0.0",
17
- "author": "OMP Community",
16
+ "version": "1.0.1",
17
+ "author": "xinhaojin",
18
18
  "extensions": {
19
19
  "mode-switch": {
20
20
  "description": "Mode Switch extension - permission mode toggle",
@@ -36,12 +36,12 @@
36
36
  "license": "MIT",
37
37
  "repository": {
38
38
  "type": "git",
39
- "url": "git+https://github.com/your-username/omp-mode-switch.git"
39
+ "url": "git+https://github.com/xinhaojin/omp-mode-switch.git"
40
40
  },
41
41
  "bugs": {
42
- "url": "https://github.com/your-username/omp-mode-switch/issues"
42
+ "url": "https://github.com/xinhaojin/omp-mode-switch/issues"
43
43
  },
44
- "homepage": "https://github.com/your-username/omp-mode-switch#readme",
44
+ "homepage": "https://github.com/xinhaojin/omp-mode-switch#readme",
45
45
  "engines": {
46
46
  "node": ">=18"
47
47
  }