@mison/ling 1.1.1 → 1.2.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/CHANGELOG.md CHANGED
@@ -7,6 +7,38 @@
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [ling-1.2.2] - 2026-03-14
11
+
12
+ ### 修复
13
+
14
+ - 修复全局 Skills 重复:当检测到旧版 `~/.codex/skills/` 时,同步 `codex` 会迁移到 `~/.agents/skills/` 并清理遗留目录;若与现有目录冲突则备份到 `~/.ling/backups/global/<timestamp>/codex-legacy/...`。
15
+
16
+ ## [ling-1.2.1] - 2026-03-14
17
+
18
+ ### 修复
19
+
20
+ - 修正 Codex 全局 Skill 安装根目录:`ling global sync --target codex` 与 `ling spec enable --target codex` 现在统一写入官方要求的 `~/.agents/skills/`,不再误写到旧的 `~/.codex/skills/`。
21
+ - 兼容旧版 Spec 状态:历史 `state.json` 中记录的 `~/.codex/skills/...` 路径会在读取时自动迁移为 `~/.agents/skills/...`,避免修复后仍引用旧路径。
22
+ - 增加旧路径诊断:若用户机器上只存在旧版 `~/.codex/skills/`,`ling global status` 会返回 `broken` 并提示执行 `ling global sync --target codex` 修复。
23
+
24
+ ## [ling-1.2.0] - 2026-03-14
25
+
26
+ ### 新增
27
+
28
+ - `antigravity` 作为独立目标进入 CLI 主链路:`init/update/update-all/status/doctor/global sync/spec enable|disable` 均可直接指定,不再由 `gemini` 隐式代管。
29
+ - 共享 `.agent/` 工作区新增本地安装状态文件 `.ling/install-state.json`,用于准确记录 `gemini` / `antigravity` 的逻辑注册身份,即使工作区未写入全局索引也能正确识别。
30
+
31
+ ### 变更
32
+
33
+ - 全局同步默认目标调整为 `codex + gemini + antigravity`;`--target gemini` 仅写入 `~/.gemini/skills/`,`--target antigravity` 仅写入 `~/.gemini/antigravity/skills/`。
34
+ - README、TECH、PLAN 与测试基线同步对齐新的三目标语义,并补充共享 `.agent/` 的状态识别说明。
35
+ - 健康检查与维护链路统一收口到 `npm`,Web 子项目不再保留 `bun.lock`。
36
+
37
+ ### 维护
38
+
39
+ - `reference/` 清理重复官方资料:删除 `reference/official-docs/` 镜像,仅保留 `reference/official/` 单份受管参考。
40
+ - 根目录与 `reference/.gitignore` 调整为白名单模式,仅跟踪 `reference/official/`、`reference/docs-archive/` 等保留资料。
41
+
10
42
  ## [ling-1.1.1] - 2026-03-14
11
43
 
12
44
  ### 新增
@@ -80,7 +112,9 @@
80
112
 
81
113
  本项目在 Ling 重启前的 2.x/3.x 版本记录已冻结,不再维护。
82
114
 
83
- [Unreleased]: https://github.com/MisonL/Ling/compare/ling-1.1.1...HEAD
115
+ [Unreleased]: https://github.com/MisonL/Ling/compare/ling-1.2.1...HEAD
116
+ [ling-1.2.1]: https://github.com/MisonL/Ling/releases/tag/ling-1.2.1
117
+ [ling-1.2.0]: https://github.com/MisonL/Ling/releases/tag/ling-1.2.0
84
118
  [ling-1.1.1]: https://github.com/MisonL/Ling/releases/tag/ling-1.1.1
85
119
  [ling-1.1.0]: https://github.com/MisonL/Ling/releases/tag/ling-1.1.0
86
120
  [ling-1.0.2]: https://github.com/MisonL/Ling/releases/tag/ling-1.0.2
package/README.md CHANGED
@@ -12,178 +12,198 @@
12
12
  npm install -g @mison/ling
13
13
  ```
14
14
 
15
- 然后在你的目标项目中初始化:
15
+ `ling` 解决三件事:
16
+
17
+ - 项目内安装 Gemini / Antigravity / Codex 资产
18
+ - 全局同步可复用 Skills
19
+ - 为项目启用 Spec 工作流
20
+
21
+ 最常见的项目初始化:
16
22
 
17
23
  ```bash
18
24
  cd /path/to/your-project
19
- ling init --target gemini # 安装 Gemini 结构(.agent)
20
- ling init --target codex # 安装 Codex 结构(.agents + 托管规则注入)
21
- # 或者直接 ling init,在交互中选择目标
25
+ ling init --target gemini
26
+ ling init --target antigravity
27
+ ling init --target codex
22
28
  ```
23
29
 
24
- 说明:
25
- - npm 安装的主命令入口为 `ling`。
26
-
27
- 可选:不做全局安装,直接在仓库目录执行:
30
+ 如果要同时安装多个目标:
28
31
 
29
32
  ```bash
30
- cd /path/to/Ling
31
- node bin/ling.js init --target codex --path /path/to/your-project
33
+ ling init --targets gemini,antigravity,codex
32
34
  ```
33
35
 
34
- 如需源码开发安装:
36
+ 如果你要先做全局 Skills 安装:
35
37
 
36
38
  ```bash
37
- git clone https://github.com/MisonL/Ling.git
38
- cd Ling
39
- npm install -g .
39
+ ling global sync
40
+ ling global sync --target codex
41
+ ling global sync --target gemini
42
+ ling global sync --target antigravity
40
43
  ```
41
44
 
42
- 这会把所选目标结构安装到你的项目中(`gemini -> .agent`,`codex -> .agents`),并把 Codex 托管内容注入工作区 `AGENTS.md` 与 `ling.rules`(说明性托管区块,不是 Codex 官方 `.rules` 审批策略文件)。
45
+ ## 先选模式
43
46
 
44
- ### 全局安装(跨项目复用 Skills)
47
+ | 你要做什么 | 命令 | 结果 |
48
+ | --- | --- | --- |
49
+ | 给当前项目安装完整资产 | `ling init` | 项目内生成 `.agent/` / `.agents/`;共享 `.agent/` 时会维护 `.ling/install-state.json` |
50
+ | 给电脑全局同步可复用 Skills | `ling global sync` | 写入 `~/.agents/skills/`、`~/.gemini/skills/` 等 |
51
+ | 给项目启用 Spec 工作流 | `ling spec init` | 项目内生成 `issues.csv` 等 Spec 资产 |
52
+
53
+ 一句话区分:
54
+
55
+ - `init` 面向项目
56
+ - `global sync` 面向整台电脑
57
+ - `spec init` 面向项目里的任务驱动流程
58
+
59
+ ## 项目安装
60
+
61
+ 项目安装是默认用法,也是能力最完整的模式。
62
+
63
+ - `gemini` 写入项目内 `.agent/`
64
+ - `antigravity` 写入项目内 `.agent/`(与 Gemini 复用目录,命令与状态独立)
65
+ - `codex` 写入项目内 `.agents/`
66
+ - Ling 会在项目内写入 `.ling/install-state.json`,用于记录共享 `.agent/` 上到底注册了 `gemini`、`antigravity` 还是两者
67
+ - Codex 额外注入工作区 `AGENTS.md` 和 `ling.rules`
68
+
69
+ ```bash
70
+ cd /path/to/your-project
71
+ ling init --target gemini
72
+ ling init --target antigravity
73
+ ling init --target codex
74
+ ling update
75
+ ling doctor
76
+ ```
45
77
 
46
- 为区分“项目安装”和“全局安装”,提供专用命令面:
78
+ 非交互环境下,`init` 必须显式传 `--target` 或 `--targets`。
47
79
 
48
- - 项目安装:`ling init` / `ling update`(功能最完整)
49
- - 全局安装:`ling global sync`(仅同步 Skills,跨项目复用)
50
- - 默认行为:`ling global sync` 未指定 `--target/--targets` 时,同步 `codex + gemini`
51
- - 真实落盘:
52
- - `codex` -> `~/.codex/skills/`
53
- - `gemini` -> 同时写入 `~/.gemini/skills/` 与 `~/.gemini/antigravity/skills/`
80
+ ## 全局 Skills
54
81
 
55
- 示例:
82
+ 全局模式只做一件事:把 Skills 同步到真实消费端目录,方便跨项目复用。
56
83
 
57
84
  ```bash
58
85
  ling global sync
59
86
  ling global sync --target codex
60
87
  ling global sync --target gemini
88
+ ling global sync --target antigravity
61
89
  ling global status
62
90
  ```
63
91
 
64
- 全局安装只同步 Skills,不写入 Rules/Agents/Workflows,避免全局副作用。
65
- 覆盖同名 Skill 前会自动备份;手动回滚方式见 `docs/TECH.md`。
92
+ - `codex` -> `~/.agents/skills/`
93
+ - `gemini` -> `~/.gemini/skills/`
94
+ - `antigravity` -> `~/.gemini/antigravity/skills/`
66
95
 
67
- 规划与边界细节见:`docs/PLAN.md`(规划)与 `docs/TECH.md`(技术)。
96
+ 若检测到旧版 `~/.codex/skills/`,`ling global sync --target codex` 会将其迁移到 `~/.agents/skills/` 并清理,避免 Skills 重复(冲突内容会先备份到 `~/.ling/backups/global/<timestamp>/codex-legacy/...`)。
68
97
 
69
- 版本与发布约定:
70
- - npm 包版本遵循 SemVer(`package.json`)
71
- - git tag 与 CLI `--version` 显示使用 `ling-<SemVer>`(例如 `ling-1.0.0`)
98
+ 全局模式不会写入项目 Rules、Agents、Workflows,也不会改你的全局 `~/.codex/rules`。
72
99
 
73
- ### 已有资产冲突处理(交互确认 + 备份回退)
100
+ ## Spec
74
101
 
75
- 当检测到目标目录已存在且内容不同(或 Codex 目录存在漂移、缺失 `manifest.json`、包含未知文件)时,`ling` 会在交互终端中逐项询问处理方式:
102
+ Spec 是核心进阶功能,但理解它只需要记住两句:
76
103
 
77
- - `k` 保留(跳过此资产)
78
- - `b` 备份后移除(推荐)
79
- - `r` 直接移除(不备份)
104
+ - `ling spec enable` 给这台电脑安装全局 Spec 工具箱
105
+ - `ling spec init` 给当前项目创建真正要用的 `issues.csv`
80
106
 
81
- 同一类别的冲突可选择“一键复用”,后续遇到同类资产不再重复询问。
107
+ 也就是说:
82
108
 
83
- 备份落盘位置:
84
- - 项目级预备份:
85
- - Gemini:`<project>/.agent-backup/<timestamp>/preflight/.agent/`
86
- - Codex:`<project>/.agents-backup/<timestamp>/preflight/.agents/` 或 `<project>/.agents-backup/<timestamp>/preflight/.codex/`
87
- - 全局 Skills:`$HOME/.ling/backups/global/<timestamp>/...`
88
- - Spec Profile:`$HOME/.ling/backups/spec/<timestamp>/before/...`
109
+ - 全局 Spec 负责模板、参考资料、约束
110
+ - 项目里的 `issues.csv` 永远放在项目根目录
89
111
 
90
- 非交互环境(无 TTY 或 `--non-interactive`)不会进入询问:
91
- - `update`/`update-all`/`global sync`/`spec enable` 在需要覆盖时默认执行“备份后覆盖”
92
- - `init` 在检测到已有资产且未指定 `--force` 时会报错提示改用交互终端或显式 `--force`
93
-
94
- ### Spec Profile(可选进阶能力)
95
-
96
- - 默认关闭,不随 `ling init / update / global sync` 自动安装
97
- - 当前已落地全局层命令:
98
- - `ling spec status`
99
- - `ling spec enable`
100
- - `ling spec disable`
101
- - 默认目标:`ling spec enable` 未指定目标时,会启用 `codex + gemini`
102
- - 当前全局层会安装:
103
- - Skills:`harness-engineering`、`cybernetic-systems-engineering`
104
- - Spec 运行模板:写入 `~/.ling/spec/templates/`
105
- - Spec 参考资料:写入 `~/.ling/spec/references/`
106
- - 目标平台落盘:
107
- - `codex` -> `~/.codex/skills/`
108
- - `gemini` -> 同时写入 `~/.gemini/skills/` 与 `~/.gemini/antigravity/skills/`
109
-
110
- 示例:
112
+ 最常用的两种方式:
111
113
 
112
114
  ```bash
113
- ling spec status
114
- ling spec enable --target codex
115
- ling spec disable --target codex
115
+ # 完整模式:项目自带 Spec 资产
116
+ cd /path/to/your-project
117
+ ling spec init
118
+
119
+ # 轻量模式:只在项目里放 issues.csv,其他能力走全局后备
120
+ cd /path/to/your-project
121
+ ling spec enable
122
+ ling spec init --csv-only
116
123
  ```
117
124
 
118
- 说明:
125
+ 你会得到:
119
126
 
120
- - `spec enable` 会在覆盖同名 Skill 前自动备份到 `~/.ling/backups/spec/<timestamp>/...`
121
- - `spec disable` 会优先恢复启用前快照;若启用前不存在同名资源,则删除由 Spec 安装的资源
122
- - 项目级 `spec init/remove/doctor` 仍处于后续阶段,本版本尚未开放
127
+ - 完整模式:`<project>/.ling/spec/`、`<project>/issues.csv`、`<project>/docs/reviews/`、`<project>/docs/handoff/`
128
+ - `--csv-only`:`<project>/issues.csv`、`<project>/docs/reviews/`、`<project>/docs/handoff/`
129
+ - 全局 Spec 资源:`~/.ling/spec/templates/`、`~/.ling/spec/references/`、`~/.ling/spec/profiles/`
123
130
 
124
- ### Codex 规则边界说明
131
+ 如果你只想要一个本机演练空间,而不是某个真实项目:
125
132
 
126
- - `ling.rules`:本项目生成并注入的托管说明文件,用于记录受管资源与运维约束。
127
- - `.rules`(如 `~/.codex/rules/default.rules`):Codex 官方的命令审批/执行策略文件(Starlark 规则,支持 `prefix_rule()`)。
128
- - 默认行为:本项目不会自动写入你的全局 `~/.codex/rules`,避免引入不可预期的全局副作用。
129
- - 如需启用官方 `.rules` 审批策略,请参考 `docs/TECH.md` 的「Codex 官方 `.rules`(手动配置)」小节。
133
+ ```bash
134
+ ling spec init --spec-workspace
135
+ ```
130
136
 
131
- ### 跨平台与文本编码约束
137
+ `spec doctor` 用于检查当前项目的 Spec 状态。
132
138
 
133
- - 编码与换行:分发到用户项目与全局目录的模板资源使用 UTF-8 与 LF。
134
- - 终端可读性:模板文本与脚本输出避免使用 Emoji 或装饰性 Unicode 字符,统一采用纯 ASCII 标记,提升 Windows/WSL/Linux/macOS 的显示一致性。
139
+ ## 常用命令
135
140
 
136
- ### 注意:关于 `.gitignore` 的重要说明
141
+ | 命令 | 用途 |
142
+ | --- | --- |
143
+ | `ling init` | 在项目内安装目标资产 |
144
+ | `ling update` | 更新当前项目已安装目标 |
145
+ | `ling doctor` | 诊断当前项目安装状态 |
146
+ | `ling status` | 输出项目安装状态 |
147
+ | `ling global sync` | 全局同步 Skills |
148
+ | `ling global status` | 查看全局 Skills 状态 |
149
+ | `ling spec enable` | 启用全局 Spec 工具箱 |
150
+ | `ling spec init` | 在当前项目初始化 Spec |
151
+ | `ling spec doctor` | 检查当前项目 Spec 状态 |
152
+ | `ling update-all` | 批量更新已登记项目 |
137
153
 
138
- 如果你正在使用 **Cursor** 或 **Windsurf** 等 AI 编辑器,将 `.agent/`、`.agents/` 添加到 `.gitignore` 可能会阻止 IDE 索引工作流,导致斜杠命令(如 `/plan`、`/debug`)无法出现在对话建议中。
154
+ 常用示例:
139
155
 
140
- **推荐方案:**
141
- 1. 确保 `.agent/`、`.agents/` **不要** 出现在项目的 `.gitignore` 中。
142
- 2. 作为替代方案,将其加入本地排除文件:`.git/info/exclude`。
156
+ ```bash
157
+ ling init --targets gemini,antigravity,codex --path ./myapp
158
+ ling init --target antigravity --path ./myapp
159
+ ling init --target codex --force --path ./myapp
160
+ ling update --path ./myapp
161
+ ling doctor --target codex --fix --path ./myapp
162
+ ling spec enable
163
+ ling spec init --csv-only --path ./myapp
164
+ ling update-all --targets antigravity,codex
165
+ ling global sync --quiet --dry-run
166
+ ```
143
167
 
144
- ## 包含内容
168
+ ## 文档
145
169
 
146
- | 组件 | 数量 | 描述 |
147
- | --- | --- | --- |
148
- | Agents(智能体) | 20 | 专家级 AI 人设(前端、后端、安全、产品、QA 等) |
149
- | Skills(技能) | 38 | 特定领域的知识模块 |
150
- | Workflows(工作流) | 12 | 斜杠命令流程 |
170
+ - [技术说明](docs/TECH.md)
171
+ - [设计规划](docs/PLAN.md)
172
+ - [贡献说明](CONTRIBUTING.md)
173
+ - [更新日志](CHANGELOG.md)
151
174
 
152
- ## 使用方法
175
+ ## 使用说明
153
176
 
154
- ### 使用智能体
177
+ - `ling` 的仓库模板源是 `.agents/`
178
+ - 文本与模板资源使用 UTF-8 与 LF
179
+ - 不会自动写入全局 `~/.codex/rules`
180
+ - 如果 AI 编辑器依赖索引,请不要把 `.agent/`、`.agents/` 放进项目 `.gitignore`
155
181
 
156
- **无需显式提及智能体!** 系统会自动检测并应用合适专家:
182
+ 版本约定:
157
183
 
158
- ```
159
- 你:"添加 JWT 认证"
160
- AI:正在应用 @security-auditor + @backend-specialist...
184
+ - npm 版本遵循 SemVer
185
+ - Git tag 和 `ling --version` 显示为 `ling-<SemVer>`
161
186
 
162
- 你:"修复深色模式按钮"
163
- AI:正在使用 @frontend-specialist...
187
+ 源码方式运行:
164
188
 
165
- 你:"登录返回 500 错误"
166
- AI:正在使用 @debugger 进行系统化分析...
189
+ ```bash
190
+ git clone https://github.com/MisonL/Ling.git
191
+ cd Ling
192
+ npm install
193
+ node bin/ling.js init --target codex --path /path/to/your-project
167
194
  ```
168
195
 
169
- **工作原理:**
170
-
171
- - 静默分析请求
172
- - 自动检测领域(前端、后端、安全等)
173
- - 选择最佳专家
174
- - 告知你正在应用哪方面的专业知识
175
- - 无需了解系统架构即可获得专家级响应
176
-
177
- **优势:**
196
+ ## 包含内容
178
197
 
179
- - 零学习曲线:描述需求即可
180
- - 始终获得专家响应
181
- - 透明:显示正在使用的智能体
182
- - 仍可显式提及智能体进行覆盖
198
+ | 组件 | 数量 | 描述 |
199
+ | --- | --- | --- |
200
+ | Agents(智能体) | 20 | 专家级 AI 人设(前端、后端、安全、产品、QA 等) |
201
+ | Skills(技能) | 49 | 特定领域的知识模块(以 `SKILL.md` 为准,含子技能目录) |
202
+ | Workflows(工作流) | 12 | 斜杠命令流程 |
183
203
 
184
- ### 使用工作流
204
+ ## 工作流与命令
185
205
 
186
- 使用斜杠命令调用工作流:
206
+ 工作流通过斜杠命令触发:
187
207
 
188
208
  | 命令 | 描述 |
189
209
  | --- | --- |
@@ -200,75 +220,9 @@ AI:正在使用 @debugger 进行系统化分析...
200
220
  | `/test` | 生成并运行测试 |
201
221
  | `/ui-ux-pro-max` | 50 种风格的设计 |
202
222
 
203
- 示例:
204
-
205
- ```
206
- /brainstorm 认证系统
207
- /create 带 Hero 部分的着陆页
208
- /debug 为什么登录失败
209
- ```
223
+ 技能会按上下文自动加载,不需要手工管理大多数 Skill。
210
224
 
211
- ### 使用技能
212
-
213
- 技能会根据任务上下文自动加载。AI 会阅读技能描述并应用相关知识。
214
-
215
- ## CLI 工具
216
-
217
- CLI(命令行界面)工具:
218
-
219
- | 命令 | 描述 |
220
- | --- | --- |
221
- | `ling init` | 安装指定目标:gemini/codex |
222
- | `ling update` | 更新当前项目已安装目标 |
223
- | `ling update-all` | 批量更新所有已登记工作区 |
224
- | `ling doctor` | 诊断安装完整性(可 `--fix` 自愈) |
225
- | `ling global sync` | 全局同步 Skills(默认同步 codex + gemini;其中 gemini 同步到 gemini-cli 与 antigravity) |
226
- | `ling global status` | 查看全局 Skills 安装状态 |
227
- | `ling exclude` | 管理全局索引排除清单 |
228
- | `ling status` | 检查安装状态 |
229
-
230
- ### 常用选项
231
-
232
- ```bash
233
- ling init --target gemini --path ./myapp # 安装 Gemini 到指定目录
234
- ling init --target codex --path ./myapp # 安装 Codex 到指定目录
235
- ling init --targets gemini,codex --path ./myapp # 一次安装多个目标
236
- ling init --non-interactive --target codex # 非交互模式必须显式指定目标
237
- ling init --target codex --no-index --path ./tmp-workspace # 安装但不写入全局索引
238
- ling init --branch dev --force # 覆盖安装并指定分支
239
- ling init --quiet --dry-run # 预览操作而不执行
240
- ling update --target codex --path ./myapp # 更新指定目标(默认会刷新索引)
241
- ling update --target codex --no-index --path ./myapp # 更新但不刷新索引
242
- ling doctor --target codex --fix --path ./myapp # 检查并自动修复
243
- ling update-all --targets codex # 批量更新所有登记工作区里的 codex 目标
244
- ling update-all --prune-missing # 清理索引中已失效的路径
245
- ling exclude list # 查看排除清单
246
- ling exclude add --path /path/to/dir # 新增排除路径
247
- ling exclude remove --path /path/to/dir # 删除排除路径
248
- ```
249
-
250
- ### 状态命令约定
251
-
252
- - `ling status --quiet`:输出 `installed` / `broken` / `missing`
253
- - `ling global status --quiet`:输出 `installed` / `broken` / `missing`
254
- - 退出码:`0=installed`,`1=broken`,`2=missing`
255
- - `status` 面向自动化健康判断;如需问题明细,使用 `ling doctor`
256
-
257
- ### 批量更新机制
258
-
259
- - 执行 `ling init` / `ling update` 时,会把工作区路径登记到全局索引文件:
260
- - macOS / Linux / WSL: `~/.ling/workspaces.json`
261
- - Windows PowerShell / CMD: `%USERPROFILE%\.ling\workspaces.json`
262
- - 默认会自动排除灵轨工具包源码目录和系统临时目录(如 macOS `/var/folders/...`、`/tmp`、`/private/tmp`,Linux `/tmp`,Windows `%TEMP%`)。
263
- - 可通过 `--no-index` 让 `init/update` 跳过索引登记(适合临时验证目录)。
264
- - `ling update` 只依赖当前目录(或 `--path` 指定目录)的已安装目标,不依赖全局索引。
265
- - 执行 `ling update-all` 时,会遍历索引并批量更新每个工作区(可通过 `--targets` 限定目标)。
266
- - 可用 `--prune-missing` 自动移除索引里已失效的工作区路径。
267
- - 对于历史项目(尚未登记,或曾经 `--no-index` 跳过登记),可在该项目执行一次不带 `--no-index` 的 `ling update`(或 `ling init --force`)后纳入索引。
268
- - 可通过 `ling exclude add/remove/list` 维护自定义排除路径(支持排除整棵目录树)。
269
- - 也可通过环境变量 `LING_INDEX_PATH` 指定自定义索引路径。
270
-
271
- ### 开发维护命令
225
+ ## 开发维护命令
272
226
 
273
227
  ```bash
274
228
  npm run clean # 清理本地生成产物(如 web/.next、web/node_modules)
@@ -287,26 +241,17 @@ npm run lint
287
241
 
288
242
  ## 卸载
289
243
 
290
- ### 卸载本机全局 CLI
291
-
292
244
  ```bash
293
245
  npm uninstall -g @mison/ling
294
246
  ```
295
247
 
296
- 如果你之前安装过旧包:`@mison/ag-kit-cn`(已停止维护),可一并清理:
248
+ 旧包和上游旧包如已安装,可一并清理:
297
249
 
298
250
  ```bash
299
251
  npm uninstall -g @mison/ag-kit-cn
300
- ```
301
-
302
- 如果你还安装过上游英文版,可一并清理:
303
-
304
- ```bash
305
252
  npm uninstall -g antigravity-kit @vudovn/ag-kit
306
253
  ```
307
254
 
308
- ### 卸载某个项目内的灵轨
309
-
310
255
  macOS / Linux / WSL:
311
256
 
312
257
  ```bash
@@ -331,13 +276,13 @@ rmdir /s /q .agents-backup
331
276
  rmdir /s /q .codex
332
277
  ```
333
278
 
334
- ### 清理批量更新索引(可选)
279
+ 可选:把某个项目移出批量更新索引
335
280
 
336
281
  ```bash
337
282
  ling exclude add --path /path/to/your-project
338
283
  ```
339
284
 
340
- 说明:全局卸载只会移除 `ling` 命令,不会删除你本地 clone 的源码目录。
285
+ 全局卸载只会移除 `ling` 命令,不会删除你本地 clone 的源码目录。
341
286
 
342
287
  ## 请我喝咖啡
343
288
 
@@ -7,7 +7,11 @@ const GitHelper = require("../utils/git-helper");
7
7
 
8
8
  class GeminiAdapter extends BaseAdapter {
9
9
  get targetName() {
10
- return "gemini";
10
+ return this.options.targetName || "gemini";
11
+ }
12
+
13
+ get targetLabel() {
14
+ return this.targetName === "antigravity" ? "Antigravity" : "Gemini";
11
15
  }
12
16
 
13
17
  getInstalledVersion() {
@@ -108,7 +112,7 @@ class GeminiAdapter extends BaseAdapter {
108
112
  this.log(`[clean] 已从 .gitignore 移除 ${cleanupResult.removedCount} 条规则`);
109
113
  }
110
114
 
111
- this.log("[ok] [Gemini] 安装完成 (.agent)");
115
+ this.log(`[ok] [${this.targetLabel}] 安装完成 (.agent)`);
112
116
  } finally {
113
117
  if (cleanup) cleanup();
114
118
  }
@@ -22,7 +22,7 @@ function isInteractiveTerminal() {
22
22
  /**
23
23
  * Prompt user to select targets from a list.
24
24
  * Supports multiple selection by comma separated numbers or names.
25
- * Currently simplified for 'gemini' and 'codex'.
25
+ * Currently supports 'gemini', 'antigravity', and 'codex'.
26
26
  * @param {object} options CLI options
27
27
  * @returns {Promise<string[]>} List of selected targets
28
28
  */
@@ -40,7 +40,8 @@ async function selectTargets(options) {
40
40
  try {
41
41
  console.log("\n[select] 请选择要安装的目标 (多选请用逗号分隔):");
42
42
  console.log(" 1. Gemini (适用于 Cursor/VSCode)");
43
- console.log(" 2. Codex (兼容性增强版)");
43
+ console.log(" 2. Antigravity (独立体系,项目级复用 .agent)");
44
+ console.log(" 3. Codex (兼容性增强版)");
44
45
 
45
46
  const answer = await askQuestion(rl, "\n请输入序号或名称(必填): ");
46
47
  const input = answer.trim();
@@ -55,11 +56,12 @@ async function selectTargets(options) {
55
56
  for (const part of parts) {
56
57
  const p = part.toLowerCase();
57
58
  if (p === "1" || p === "gemini") selection.push("gemini");
58
- else if (p === "2" || p === "codex") selection.push("codex");
59
+ else if (p === "2" || p === "antigravity") selection.push("antigravity");
60
+ else if (p === "3" || p === "codex") selection.push("codex");
59
61
  }
60
62
 
61
63
  if (selection.length === 0) {
62
- throw new Error("无效的目标选择,请输入 1 / 2 / gemini / codex(可多选)");
64
+ throw new Error("无效的目标选择,请输入 1 / 2 / 3 / gemini / antigravity / codex(可多选)");
63
65
  }
64
66
 
65
67
  return [...new Set(selection)];