6aspec 3.0.0-dev.5 → 3.0.0-dev.6

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/lib/installer.js CHANGED
@@ -195,7 +195,7 @@ class Installer {
195
195
  // 安装 Cursor 配置
196
196
  installCursor() {
197
197
  this.log('开始安装 Cursor 配置...');
198
-
198
+
199
199
  const sourceDir = path.join(this.packageDir, '.cursor');
200
200
  const targetDir = path.join(this.targetDir, '.cursor');
201
201
 
@@ -204,11 +204,11 @@ class Installer {
204
204
  }
205
205
 
206
206
  const targetExists = fs.existsSync(targetDir);
207
-
207
+
208
208
  if (this.mergeMode && targetExists) {
209
209
  // 智能合并模式
210
210
  this.log('使用智能合并模式(保留用户自定义文件)...');
211
-
211
+
212
212
  // 只复制 commands 目录
213
213
  const commandsSourceDir = path.join(sourceDir, 'commands');
214
214
  if (fs.existsSync(commandsSourceDir)) {
@@ -216,26 +216,41 @@ class Installer {
216
216
  const result = this.mergeDir(commandsSourceDir, commandsTargetDir);
217
217
  this.log(`commands: 更新了 ${result.updated} 个文件,新增了 ${result.added} 个文件`, 'info');
218
218
  }
219
+
220
+ // 复制 agents 目录
221
+ const agentsSourceDir = path.join(sourceDir, 'agents');
222
+ if (fs.existsSync(agentsSourceDir)) {
223
+ const agentsTargetDir = path.join(targetDir, 'agents');
224
+ const result = this.mergeDir(agentsSourceDir, agentsTargetDir);
225
+ this.log(`agents: 更新了 ${result.updated} 个文件,新增了 ${result.added} 个文件`, 'info');
226
+ }
219
227
  } else {
220
228
  // 完全覆盖模式
221
229
  if (targetExists) {
222
230
  this.backupDir(targetDir);
223
231
  }
224
232
  this.log('复制 Cursor 配置文件...');
225
-
233
+
226
234
  // 创建目标目录
227
235
  if (!fs.existsSync(targetDir)) {
228
236
  fs.mkdirSync(targetDir, { recursive: true });
229
237
  }
230
-
238
+
231
239
  // 只复制 commands 目录
232
240
  const commandsSourceDir = path.join(sourceDir, 'commands');
233
241
  if (fs.existsSync(commandsSourceDir)) {
234
242
  const commandsTargetDir = path.join(targetDir, 'commands');
235
243
  this.copyDir(commandsSourceDir, commandsTargetDir);
236
244
  }
245
+
246
+ // 复制 agents 目录
247
+ const agentsSourceDir = path.join(sourceDir, 'agents');
248
+ if (fs.existsSync(agentsSourceDir)) {
249
+ const agentsTargetDir = path.join(targetDir, 'agents');
250
+ this.copyDir(agentsSourceDir, agentsTargetDir);
251
+ }
237
252
  }
238
-
253
+
239
254
  this.log('✓ Cursor 配置安装完成!', 'success');
240
255
  }
241
256
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "6aspec",
3
- "version": "3.0.0-dev.5",
3
+ "version": "3.0.0-dev.6",
4
4
  "description": "6Aspec - 轻量级 spec 驱动开发框架,支持 Cursor 和 Claude Code",
5
5
  "main": "lib/installer.js",
6
6
  "bin": {
@@ -1,30 +0,0 @@
1
- {
2
- "permissions": {
3
- "allow": [
4
- "Bash(ls -la .claude/commands/6aspec/green/*.md)",
5
- "Bash(xargs -I {} basename {})",
6
- "Bash(git mv 6A_constitution.md green_constitution.md)",
7
- "Bash(git mv 6A_design_sop.md green_design_sop.md)",
8
- "Bash(git mv 6A_import_model_table_sop.md green_import_model_table_sop.md)",
9
- "Bash(git mv 6A_init_event_list_sop.md green_init_event_list_sop.md)",
10
- "Bash(git mv 6A_init_map_sop.md green_init_map_sop.md)",
11
- "Bash(git mv 6A_model_sop.md green_model_sop.md)",
12
- "Bash(git mv 6A_new_sop.md green_new_sop.md)",
13
- "Bash(git mv 6A_rollback_sop.md green_rollback_sop.md)",
14
- "Bash(git mv 6A_visual_logic_sop.md green_visual_logic_sop.md)",
15
- "Bash(git mv 6A_code_implementation_sop.md green_code_implementation_sop.md)",
16
- "Bash(git mv 6A_archive_sop.md green_archive_sop.md)",
17
- "Bash(git mv 6A_continue_sop.md green_continue_sop.md)",
18
- "Bash(git mv 6A_tasks_sop.md green_tasks_sop.md)",
19
- "Bash(git mv 6A_clarify_sop.md green_clarify_sop.md)",
20
- "Bash(git mv 6A_status_sop.md green_status_sop.md)",
21
- "Bash(ls -la .6aspec/rules/green/6A_*.md)",
22
- "Bash(xargs sed -i '' 's/6A_\\\\\\([a-z_]*\\\\\\)\\\\.md/green_\\\\1.md/g')",
23
- "Bash(openspec --help)",
24
- "Bash(openspec schemas --json 2>/dev/null | head -100)",
25
- "Bash(openspec status --json 2>/dev/null | head -50)",
26
- "WebSearch",
27
- "Bash(git mv:*)"
28
- ]
29
- }
30
- }