@gong-ym/ai-spec-auto 0.2.10 → 0.2.12
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/bin/cli.js +294 -300
- package/package.json +2 -3
package/bin/cli.js
CHANGED
|
@@ -1,300 +1,294 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
const
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
const
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
if (
|
|
20
|
-
const
|
|
21
|
-
if (
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
return
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
(
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
process.exit(
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
if (args[0] === 'protocol-
|
|
235
|
-
|
|
236
|
-
const protocolWorkflow =
|
|
237
|
-
process.exit(await protocolWorkflow.main('
|
|
238
|
-
}
|
|
239
|
-
|
|
240
|
-
if (args[0] === 'protocol-
|
|
241
|
-
|
|
242
|
-
const protocolWorkflow =
|
|
243
|
-
process.exit(await protocolWorkflow.main('
|
|
244
|
-
}
|
|
245
|
-
|
|
246
|
-
if (args[0] === 'protocol-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
const protocolWorkflow =
|
|
254
|
-
process.exit(await protocolWorkflow.main('
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
if (args[0] === '
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
}
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
if (e && e.message && !e.cmd) {
|
|
296
|
-
console.error(e.message);
|
|
297
|
-
}
|
|
298
|
-
process.exit(e.status || 1);
|
|
299
|
-
}
|
|
300
|
-
})();
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
const path = require('path');
|
|
3
|
+
const fs = require('fs');
|
|
4
|
+
const pkgRoot = path.join(__dirname, '..');
|
|
5
|
+
let args = process.argv.slice(2);
|
|
6
|
+
const env = { ...process.env, ENGINEERED_SPEC_LOCAL: pkgRoot };
|
|
7
|
+
const opts = { stdio: 'inherit', cwd: process.cwd(), env };
|
|
8
|
+
const INSTALL_COMMANDS = new Set(['init', 'update', 'check', 'uninstall', 'sync', 'help']);
|
|
9
|
+
|
|
10
|
+
const VERSION_FLAGS = new Set(['-v', '-V', '-version', '--version', 'version']);
|
|
11
|
+
const RECOMMEND_INIT_FLAGS = new Set(['--recommend', '--dry-run', '--yes', '-y', '--json', '--help', '-h', '--manifest', '--hub-url', '--visual-url', '--no-hub-fallback']);
|
|
12
|
+
|
|
13
|
+
function shouldUseRecommendInit(args, cwd) {
|
|
14
|
+
if (args[0] !== 'init') return false;
|
|
15
|
+
if (args.includes('--recommend')) return true;
|
|
16
|
+
const manifestIndex = args.indexOf('--manifest');
|
|
17
|
+
if (manifestIndex < 0) return false;
|
|
18
|
+
const manifestValue = args[manifestIndex + 1];
|
|
19
|
+
if (!manifestValue || manifestValue.startsWith('-')) return false;
|
|
20
|
+
const manifestPath = path.resolve(cwd, manifestValue);
|
|
21
|
+
if (manifestValue.endsWith('.json') || fs.existsSync(manifestPath)) return false;
|
|
22
|
+
|
|
23
|
+
for (let index = 1; index < args.length; index += 1) {
|
|
24
|
+
const arg = args[index];
|
|
25
|
+
if (index === manifestIndex + 1) continue;
|
|
26
|
+
if (arg.startsWith('-') && !RECOMMEND_INIT_FLAGS.has(arg)) {
|
|
27
|
+
return false;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
return true;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
function getCommandTarget(args, cwd, startIndex = 1) {
|
|
34
|
+
for (let index = startIndex; index < args.length; index += 1) {
|
|
35
|
+
const arg = args[index];
|
|
36
|
+
if (!arg.startsWith('-')) {
|
|
37
|
+
return path.resolve(cwd, arg);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
return cwd;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
function shouldUseIntegrityCommand(args, cwd) {
|
|
44
|
+
if (args[0] !== 'sync' && args[0] !== 'check') return false;
|
|
45
|
+
const targetDir = getCommandTarget(args, cwd);
|
|
46
|
+
return fs.existsSync(path.join(targetDir, '.ai-spec', 'ai-spec.lock.json')) ||
|
|
47
|
+
fs.existsSync(path.join(targetDir, '.agents', 'registry.index.json'));
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
(async () => {
|
|
51
|
+
try {
|
|
52
|
+
if (args.length > 0 && VERSION_FLAGS.has(args[0])) {
|
|
53
|
+
const pkg = require(path.join(pkgRoot, 'package.json'));
|
|
54
|
+
console.log(pkg.version);
|
|
55
|
+
process.exit(0);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
// 自举升级:仅在 update 命令、目标项目已装过 CLI 且 registry 上有更新版时触发。
|
|
59
|
+
// 任何失败都会静默降级为继续跑当前 CLI,不影响主流程。
|
|
60
|
+
if (args[0] === 'update') {
|
|
61
|
+
try {
|
|
62
|
+
const selfUpgrade = require('./self-upgrade');
|
|
63
|
+
const result = selfUpgrade.maybeSelfUpgradeForUpdate({
|
|
64
|
+
pkgRoot,
|
|
65
|
+
args,
|
|
66
|
+
env,
|
|
67
|
+
cwd: opts.cwd,
|
|
68
|
+
});
|
|
69
|
+
if (result && Array.isArray(result.args)) {
|
|
70
|
+
args = result.args;
|
|
71
|
+
}
|
|
72
|
+
if (result && result.upgraded) {
|
|
73
|
+
process.exit(typeof result.status === 'number' ? result.status : 0);
|
|
74
|
+
}
|
|
75
|
+
} catch (_error) {
|
|
76
|
+
// 自举本身永远不能阻塞主流程
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
if (env.AI_SPEC_SKIP_LAUNCHER_SYNC !== '1') {
|
|
81
|
+
try {
|
|
82
|
+
const runtimeLauncher = require('./runtime-launcher');
|
|
83
|
+
runtimeLauncher.ensureGlobalLauncher({
|
|
84
|
+
pkgRoot,
|
|
85
|
+
env,
|
|
86
|
+
});
|
|
87
|
+
} catch (_error) {
|
|
88
|
+
// launcher sync is best-effort and must not block local execution
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
if (args[0] === 'scan') {
|
|
93
|
+
const scanCommand = require('./scan');
|
|
94
|
+
process.exit(await scanCommand.main(args.slice(1)));
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
if (shouldUseRecommendInit(args, opts.cwd)) {
|
|
98
|
+
const initCommand = require('./init-command');
|
|
99
|
+
process.exit(await initCommand.main(args.slice(1)));
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
if (shouldUseIntegrityCommand(args, opts.cwd)) {
|
|
103
|
+
const command = args[0] === 'sync' ? require('./sync-command') : require('./check-command');
|
|
104
|
+
process.exit(await command.main(args.slice(1)));
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
if (args[0] === 'guard') {
|
|
108
|
+
const guardCommand = require('./guard-command');
|
|
109
|
+
process.exit(await guardCommand.main(args.slice(1)));
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
if (args[0] === 'context') {
|
|
113
|
+
const contextCommand = require('./context-command');
|
|
114
|
+
process.exit(await contextCommand.main(args.slice(1)));
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
if (args[0] === 'worktree') {
|
|
118
|
+
const worktreeCommand = require('./worktree-command');
|
|
119
|
+
process.exit(await worktreeCommand.main(args.slice(1)));
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
if (args[0] === 'executor') {
|
|
123
|
+
const executorCommand = require('./executor-command');
|
|
124
|
+
process.exit(await executorCommand.main(args.slice(1)));
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
if (args[0] === 'spec-start') {
|
|
128
|
+
const specCommand = require('./spec-command');
|
|
129
|
+
process.exit(await specCommand.mainStart(args.slice(1)));
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
if (args[0] === 'spec-status') {
|
|
133
|
+
const specCommand = require('./spec-command');
|
|
134
|
+
process.exit(await specCommand.mainStatus(args.slice(1)));
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
if (args[0] === 'spec-continue') {
|
|
138
|
+
const specCommand = require('./spec-command');
|
|
139
|
+
process.exit(await specCommand.mainContinue(args.slice(1)));
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
if (args[0] === 'spec-list') {
|
|
143
|
+
const specCommand = require('./spec-command');
|
|
144
|
+
process.exit(await specCommand.mainList(args.slice(1)));
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
if (args[0] === 'spec-detail') {
|
|
148
|
+
const specCommand = require('./spec-command');
|
|
149
|
+
process.exit(await specCommand.mainSpecStatus(args.slice(1)));
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
if (args[0] === 'repair') {
|
|
153
|
+
const repairCommand = require('./repair-command');
|
|
154
|
+
process.exit(await repairCommand.main(args.slice(1)));
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
if (args[0] === 'report') {
|
|
158
|
+
const reportCommand = require('./report-command');
|
|
159
|
+
process.exit(await reportCommand.main(args.slice(1)));
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
if (args.length === 0 || INSTALL_COMMANDS.has(args[0])) {
|
|
163
|
+
const installWorkflow = require('./install-workflow');
|
|
164
|
+
// 切面:遥测仅观测,不改变 main(args) 的返回值/副作用/异常。
|
|
165
|
+
// 模块加载/运行失败均自动降级为透明 wrap,主流程零影响。
|
|
166
|
+
let telemetry = { wrap: function (_c, fn) { return fn(); } };
|
|
167
|
+
try {
|
|
168
|
+
telemetry = require('./telemetry');
|
|
169
|
+
} catch (_error) {
|
|
170
|
+
// 整个 telemetry 目录被移除或加载失败时,保持透明 wrap。
|
|
171
|
+
}
|
|
172
|
+
process.exit(await telemetry.wrap(args[0] || 'help', function () {
|
|
173
|
+
return installWorkflow.main(args);
|
|
174
|
+
}));
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
if (args[0] === 'runtime-state') {
|
|
178
|
+
const runtimeState = require('./runtime-state');
|
|
179
|
+
process.exit(runtimeState.main(args.slice(1)));
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
if (args[0] === 'validate-registry') {
|
|
183
|
+
const validateRegistry = require('./validate-registry');
|
|
184
|
+
process.exit(validateRegistry.main(args.slice(1)));
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
if (args[0] === 'manifest-export') {
|
|
188
|
+
const manifestExport = require('./manifest-export');
|
|
189
|
+
process.exit(await manifestExport.main(args.slice(1)));
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
if (args[0] === 'ide') {
|
|
193
|
+
const ideCommand = require('./ide-command');
|
|
194
|
+
process.exit(await ideCommand.main(args.slice(1)));
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
if (args[0] === 'hub') {
|
|
198
|
+
// 切面接入:Hub 方案包能力独立在 hub-command 内部实现。
|
|
199
|
+
// 加载或执行失败只影响 hub 子命令,不改变 init/sync/check 等旧主链。
|
|
200
|
+
const hubCommand = require('./hub-command');
|
|
201
|
+
process.exit(await hubCommand.main(args.slice(1)));
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
if (args[0] === 'task-orchestrator-adapter') {
|
|
205
|
+
throw new Error('task-orchestrator-adapter is a legacy internal fallback; use ai-spec-auto protocol-step / protocol-advance / protocol-update instead');
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
if (args[0] === 'task-orchestrator-extractor') {
|
|
209
|
+
throw new Error('task-orchestrator-extractor is a legacy internal fallback; use ai-spec-auto protocol-step / protocol-advance / protocol-update instead');
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
if (args[0] === 'task-orchestrator-runner') {
|
|
213
|
+
throw new Error('task-orchestrator-runner is an internal runtime module; call it from the AI host layer instead of ai-spec-auto CLI');
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
const runtimeBootstrap = require('./runtime-bootstrap');
|
|
217
|
+
const runtimeHandOff = await runtimeBootstrap.maybeHandOffToRuntime({
|
|
218
|
+
pkgRoot,
|
|
219
|
+
args,
|
|
220
|
+
env,
|
|
221
|
+
cwd: opts.cwd,
|
|
222
|
+
stdio: opts.stdio,
|
|
223
|
+
});
|
|
224
|
+
if (runtimeHandOff.handedOff) {
|
|
225
|
+
process.exit(runtimeHandOff.status);
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
if (args[0] === 'protocol-step') {
|
|
229
|
+
require('../internal/visual-hooks/inbox-consumer').consumeInbox({ targetDir: opts.cwd, timeoutMs: 50 }).catch(() => {});
|
|
230
|
+
const protocolWorkflow = require('./protocol-workflow');
|
|
231
|
+
process.exit(await protocolWorkflow.main('step', args.slice(1)));
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
if (args[0] === 'protocol-advance') {
|
|
235
|
+
require('../internal/visual-hooks/inbox-consumer').consumeInbox({ targetDir: opts.cwd, timeoutMs: 50 }).catch(() => {});
|
|
236
|
+
const protocolWorkflow = require('./protocol-workflow');
|
|
237
|
+
process.exit(await protocolWorkflow.main('advance', args.slice(1)));
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
if (args[0] === 'protocol-update') {
|
|
241
|
+
require('../internal/visual-hooks/inbox-consumer').consumeInbox({ targetDir: opts.cwd, timeoutMs: 50 }).catch(() => {});
|
|
242
|
+
const protocolWorkflow = require('./protocol-workflow');
|
|
243
|
+
process.exit(await protocolWorkflow.main('update', args.slice(1)));
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
if (args[0] === 'protocol-stop') {
|
|
247
|
+
const protocolWorkflow = require('./protocol-workflow');
|
|
248
|
+
process.exit(await protocolWorkflow.main('stop', args.slice(1)));
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
if (args[0] === 'protocol-status') {
|
|
252
|
+
require('../internal/visual-hooks/inbox-consumer').consumeInbox({ targetDir: opts.cwd, timeoutMs: 50 }).catch(() => {});
|
|
253
|
+
const protocolWorkflow = require('./protocol-workflow');
|
|
254
|
+
process.exit(await protocolWorkflow.main('status', args.slice(1)));
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
if (args[0] === 'expert-dispatch') {
|
|
258
|
+
const expertDispatch = require('./expert-dispatch');
|
|
259
|
+
process.exit(expertDispatch.main(args.slice(1)));
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
if (args[0] === 'expert-executor') {
|
|
263
|
+
const expertExecutor = require('./expert-executor');
|
|
264
|
+
process.exit(await expertExecutor.main(args.slice(1)));
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
if (args[0] === 'demo-runtime-smoke') {
|
|
268
|
+
const demoRuntimeSmoke = require('./demo-runtime-smoke');
|
|
269
|
+
process.exit(demoRuntimeSmoke.main(args.slice(1)));
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
if (args[0] === 'archive-change') {
|
|
273
|
+
const archiveChange = require('./archive-change');
|
|
274
|
+
process.exit(await archiveChange.main(args.slice(1)));
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
if (args[0] === 'visual-bridge') {
|
|
278
|
+
const visualBridge = require('./visual-bridge');
|
|
279
|
+
process.exit(await visualBridge.main(args.slice(1)));
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
if (args[0] === 'visual') {
|
|
283
|
+
const visualCommand = require('./visual-command');
|
|
284
|
+
process.exit(await visualCommand.main(args.slice(1)));
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
throw new Error(`Unknown command: ${args[0]}`);
|
|
288
|
+
} catch (e) {
|
|
289
|
+
if (e && e.message && !e.cmd) {
|
|
290
|
+
console.error(e.message);
|
|
291
|
+
}
|
|
292
|
+
process.exit(e.status || 1);
|
|
293
|
+
}
|
|
294
|
+
})();
|
package/package.json
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gong-ym/ai-spec-auto",
|
|
3
|
-
"version": "0.2.
|
|
4
|
-
"type": "module",
|
|
3
|
+
"version": "0.2.12",
|
|
5
4
|
"description": "AI Coding 团队规范驱动开发 CLI — 一键安装规范、技能与工具配置",
|
|
6
5
|
"homepage": "https://github.com/Colouful/engineered-spec#readme",
|
|
7
6
|
"repository": {
|
|
@@ -12,7 +11,7 @@
|
|
|
12
11
|
"url": "https://github.com/Colouful/engineered-spec/issues"
|
|
13
12
|
},
|
|
14
13
|
"bin": {
|
|
15
|
-
"ai-spec-auto": "./bin/
|
|
14
|
+
"ai-spec-auto": "./bin/cli.js"
|
|
16
15
|
},
|
|
17
16
|
"maintainers": [
|
|
18
17
|
"zhenwei.li",
|