@house365/comate 0.2.5 → 0.2.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/bin/init-run.mjs +12 -6
- package/package.json +1 -1
package/bin/init-run.mjs
CHANGED
|
@@ -54,16 +54,19 @@ export async function init(pkgRoot) {
|
|
|
54
54
|
return 1;
|
|
55
55
|
}
|
|
56
56
|
|
|
57
|
-
// ponytail:
|
|
58
|
-
//
|
|
59
|
-
//
|
|
60
|
-
|
|
57
|
+
// ponytail: printed steps, not a \r spinner. npm's Windows global install
|
|
58
|
+
// routes `comate` through a comate.ps1 shim that makes stdout a pipe, where
|
|
59
|
+
// \r does not overwrite — every frame would stay on screen. A line per step
|
|
60
|
+
// shows progress in both a terminal and a pipe.
|
|
61
|
+
console.log('\nInitializing…');
|
|
62
|
+
const step = (name) => process.stdout.write(` ${name}\n`);
|
|
61
63
|
|
|
62
64
|
// 1. OpenSpec CLI — a PATH command, so always global.
|
|
63
65
|
const os = openSpecState();
|
|
64
66
|
if (os.status === 'ready') {
|
|
65
67
|
results.push(['OpenSpec CLI', 'skipped', `已安装 ${os.version}`]);
|
|
66
68
|
} else {
|
|
69
|
+
step('OpenSpec CLI');
|
|
67
70
|
const r = run(
|
|
68
71
|
npmInvocation(['install', '-g', '@fission-ai/openspec@latest']),
|
|
69
72
|
NPM_TIMEOUT_MS,
|
|
@@ -86,6 +89,7 @@ export async function init(pkgRoot) {
|
|
|
86
89
|
if (superpowersInstalled('global') || superpowersInstalled('project')) {
|
|
87
90
|
results.push(['Superpowers', 'skipped', '已安装']);
|
|
88
91
|
} else {
|
|
92
|
+
step('Superpowers');
|
|
89
93
|
const r = run(
|
|
90
94
|
skillsInvocation(pkgRoot, ['add', 'obra/superpowers', '-g', '-y']),
|
|
91
95
|
SKILLS_TIMEOUT_MS,
|
|
@@ -102,6 +106,7 @@ export async function init(pkgRoot) {
|
|
|
102
106
|
// 3. comate itself. The skills CLI reports per-agent failures without ever
|
|
103
107
|
// setting a non-zero exit code, and we swallow its output — so a zero status
|
|
104
108
|
// is not evidence the skill landed. Check the file.
|
|
109
|
+
step('comate skills');
|
|
105
110
|
const comateArgs = ['add', pkgRoot, '--skill', '*', '-g', '-y'];
|
|
106
111
|
const r = run(skillsInvocation(pkgRoot, comateArgs), SKILLS_TIMEOUT_MS, { quiet: true });
|
|
107
112
|
const landed = existsSync(join(home, '.agents', 'skills', 'comate', 'SKILL.md'));
|
|
@@ -115,8 +120,9 @@ export async function init(pkgRoot) {
|
|
|
115
120
|
// phases read it, so an install without it cannot actually run. An existing
|
|
116
121
|
// one is left alone, which covers projects that already keep it elsewhere.
|
|
117
122
|
if (existsSync('openspec')) {
|
|
118
|
-
results.push(['openspec
|
|
123
|
+
results.push(['openspec/', 'skipped', '已存在']);
|
|
119
124
|
} else {
|
|
125
|
+
step('openspec/ structure');
|
|
120
126
|
// --tools is not optional in practice: openspec derives the tool list by
|
|
121
127
|
// sniffing existing agent config dirs, so a fresh project (no .claude etc.)
|
|
122
128
|
// aborts with "No tools detected and no --tools flag provided". comate's
|
|
@@ -131,7 +137,7 @@ export async function init(pkgRoot) {
|
|
|
131
137
|
NPM_TIMEOUT_MS,
|
|
132
138
|
{ quiet: true },
|
|
133
139
|
);
|
|
134
|
-
results.push(['openspec
|
|
140
|
+
results.push(['openspec/', r2.ok ? 'installed' : 'failed', r2.ok ? '' : r2.reason, r2.output]);
|
|
135
141
|
}
|
|
136
142
|
|
|
137
143
|
return report(results, { home, cwd });
|