@nexagent-cli/cli 0.7.2 → 0.8.1
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/dist/commands/sophie.d.ts +2 -0
- package/dist/commands/sophie.d.ts.map +1 -1
- package/dist/commands/sophie.js +3 -53
- package/dist/commands/sophie.js.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/dist/profiles/sophie.d.ts.map +1 -1
- package/dist/profiles/sophie.js +1 -0
- package/dist/profiles/sophie.js.map +1 -1
- package/dist/runtime/workflow.d.ts +2 -0
- package/dist/runtime/workflow.d.ts.map +1 -1
- package/dist/runtime/workflow.js.map +1 -1
- package/dist/workflows/index.d.ts.map +1 -1
- package/dist/workflows/index.js +8 -0
- package/dist/workflows/index.js.map +1 -1
- package/dist/workflows/persistence/index.d.ts +5 -0
- package/dist/workflows/persistence/index.d.ts.map +1 -0
- package/dist/workflows/persistence/index.js +8 -0
- package/dist/workflows/persistence/index.js.map +1 -0
- package/dist/workflows/persistence/phase-gates.d.ts +17 -0
- package/dist/workflows/persistence/phase-gates.d.ts.map +1 -0
- package/dist/workflows/persistence/phase-gates.js +55 -0
- package/dist/workflows/persistence/phase-gates.js.map +1 -0
- package/dist/workflows/persistence/status-memory.d.ts +15 -0
- package/dist/workflows/persistence/status-memory.d.ts.map +1 -0
- package/dist/workflows/persistence/status-memory.js +87 -0
- package/dist/workflows/persistence/status-memory.js.map +1 -0
- package/dist/workflows/persistence/workflow-snapshot.d.ts +20 -0
- package/dist/workflows/persistence/workflow-snapshot.d.ts.map +1 -0
- package/dist/workflows/persistence/workflow-snapshot.js +83 -0
- package/dist/workflows/persistence/workflow-snapshot.js.map +1 -0
- package/dist/workflows/persistence/workflow-store.d.ts +16 -0
- package/dist/workflows/persistence/workflow-store.d.ts.map +1 -0
- package/dist/workflows/persistence/workflow-store.js +108 -0
- package/dist/workflows/persistence/workflow-store.js.map +1 -0
- package/dist/workflows/sophie/council.d.ts +3 -0
- package/dist/workflows/sophie/council.d.ts.map +1 -0
- package/dist/workflows/sophie/council.js +264 -0
- package/dist/workflows/sophie/council.js.map +1 -0
- package/dist/workflows/sophie/review.d.ts +3 -0
- package/dist/workflows/sophie/review.d.ts.map +1 -0
- package/dist/workflows/sophie/review.js +245 -0
- package/dist/workflows/sophie/review.js.map +1 -0
- package/dist/workflows/sophie/skill.d.ts +3 -0
- package/dist/workflows/sophie/skill.d.ts.map +1 -0
- package/dist/workflows/sophie/skill.js +193 -0
- package/dist/workflows/sophie/skill.js.map +1 -0
- package/dist/workflows/sophie/status.d.ts +3 -0
- package/dist/workflows/sophie/status.d.ts.map +1 -0
- package/dist/workflows/sophie/status.js +313 -0
- package/dist/workflows/sophie/status.js.map +1 -0
- package/package.json +1 -2
|
@@ -0,0 +1,313 @@
|
|
|
1
|
+
import { readdir, readFile } from 'node:fs/promises';
|
|
2
|
+
import { join } from 'node:path';
|
|
3
|
+
import { NEXAGENT_VERSION } from '@nexagent-cli/shared';
|
|
4
|
+
import { saveProjectStatus, loadProjectStatus, appendStatusHistory, loadStatusHistory, saveWorkflowRun, createSnapshot, saveMarkdownReport, } from '../persistence/index.js';
|
|
5
|
+
const PHASES = [
|
|
6
|
+
'Foundation (v0.1–0.3)',
|
|
7
|
+
'Distribution (v0.4–0.5)',
|
|
8
|
+
'Hardening (v0.6)',
|
|
9
|
+
'Branded Profiles (v0.7)',
|
|
10
|
+
'Sophie-X Runtime (v0.8)',
|
|
11
|
+
'Workflow Persistence (v0.8.1)',
|
|
12
|
+
'Amarax Product Layer (v0.9)',
|
|
13
|
+
'Stable Release (v1.0)',
|
|
14
|
+
];
|
|
15
|
+
export async function statusWorkflow(ctx) {
|
|
16
|
+
const cwd = ctx.cwd;
|
|
17
|
+
// ── History mode ────────────────────────────────────────────
|
|
18
|
+
if (ctx.flags.history || ctx.input.trim() === '--history') {
|
|
19
|
+
const history = await loadStatusHistory(10);
|
|
20
|
+
if (ctx.flags.json) {
|
|
21
|
+
return {
|
|
22
|
+
success: true,
|
|
23
|
+
data: { history },
|
|
24
|
+
messages: [],
|
|
25
|
+
recommendations: [],
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
const messages = [];
|
|
29
|
+
messages.push('📚 Status History (last 10 snapshots)');
|
|
30
|
+
messages.push('');
|
|
31
|
+
if (history.length === 0) {
|
|
32
|
+
messages.push(' No history found. Run `sophie status --save` to create snapshots.');
|
|
33
|
+
}
|
|
34
|
+
else {
|
|
35
|
+
history.forEach((h, i) => {
|
|
36
|
+
messages.push(` ${i + 1}. ${h.timestamp.slice(0, 19)} — ${h.phase} — gate score: ${h.gateScore}%`);
|
|
37
|
+
messages.push(` Next: ${h.nextAction}`);
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
return {
|
|
41
|
+
success: true,
|
|
42
|
+
data: { history },
|
|
43
|
+
messages,
|
|
44
|
+
recommendations: history.length > 0 ? [history[history.length - 1].nextAction] : ['Run `sophie status --save` to start tracking.'],
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
// ── Load saved status if requested ──────────────────────────
|
|
48
|
+
const input = ctx.input.trim();
|
|
49
|
+
if (input === '--load' || input === '--saved') {
|
|
50
|
+
const saved = await loadProjectStatus(cwd);
|
|
51
|
+
if (!saved) {
|
|
52
|
+
return {
|
|
53
|
+
success: false,
|
|
54
|
+
data: {},
|
|
55
|
+
messages: ['No saved status found. Run `sophie status --save` first.'],
|
|
56
|
+
recommendations: ['Run `sophie status --save` to persist project state.'],
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
if (ctx.flags.json) {
|
|
60
|
+
return {
|
|
61
|
+
success: true,
|
|
62
|
+
data: saved,
|
|
63
|
+
messages: [],
|
|
64
|
+
recommendations: [],
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
const messages = [];
|
|
68
|
+
messages.push('💾 Saved Project Status');
|
|
69
|
+
messages.push(` Saved at: ${saved.savedAt}`);
|
|
70
|
+
messages.push('');
|
|
71
|
+
return {
|
|
72
|
+
success: true,
|
|
73
|
+
data: saved,
|
|
74
|
+
messages,
|
|
75
|
+
recommendations: ['Run `sophie status` without flags for a fresh scan.'],
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
// ── Compute fresh status ────────────────────────────────────
|
|
79
|
+
let pkg = null;
|
|
80
|
+
try {
|
|
81
|
+
const raw = await readFile(join(cwd, 'package.json'), 'utf-8');
|
|
82
|
+
pkg = JSON.parse(raw);
|
|
83
|
+
}
|
|
84
|
+
catch {
|
|
85
|
+
pkg = null;
|
|
86
|
+
}
|
|
87
|
+
const version = pkg?.version || NEXAGENT_VERSION || 'unknown';
|
|
88
|
+
const scripts = pkg && typeof pkg.scripts === 'object' && pkg.scripts !== null
|
|
89
|
+
? pkg.scripts : {};
|
|
90
|
+
const health = {
|
|
91
|
+
hasPackageJson: pkg !== null,
|
|
92
|
+
hasReadme: await fileExists(join(cwd, 'README.md')),
|
|
93
|
+
hasLicense: await fileExists(join(cwd, 'LICENSE')) || await fileExists(join(cwd, 'LICENSE.md')),
|
|
94
|
+
hasChangelog: await fileExists(join(cwd, 'CHANGELOG.md')),
|
|
95
|
+
hasCi: await dirExists(join(cwd, '.github', 'workflows')),
|
|
96
|
+
hasTests: 'test' in scripts,
|
|
97
|
+
hasBuildScript: 'build' in scripts,
|
|
98
|
+
};
|
|
99
|
+
const currentPhase = determinePhase(version);
|
|
100
|
+
const completedPhases = PHASES.slice(0, PHASES.indexOf(currentPhase) + 1);
|
|
101
|
+
const pendingGates = [
|
|
102
|
+
{ name: 'Package.json valid', status: health.hasPackageJson ? 'passed' : 'blocked' },
|
|
103
|
+
{ name: 'README present', status: health.hasReadme ? 'passed' : 'pending' },
|
|
104
|
+
{ name: 'LICENSE present', status: health.hasLicense ? 'passed' : 'pending' },
|
|
105
|
+
{ name: 'CHANGELOG maintained', status: health.hasChangelog ? 'passed' : 'pending' },
|
|
106
|
+
{ name: 'CI configured', status: health.hasCi ? 'passed' : 'pending' },
|
|
107
|
+
{ name: 'Tests configured', status: health.hasTests ? 'passed' : 'pending' },
|
|
108
|
+
{ name: 'Build script defined', status: health.hasBuildScript ? 'passed' : 'pending' },
|
|
109
|
+
];
|
|
110
|
+
let testFileCount = 0;
|
|
111
|
+
let testFramework = null;
|
|
112
|
+
try {
|
|
113
|
+
const entries = await readdir(join(cwd, 'tests'), { withFileTypes: true }).catch(() => []);
|
|
114
|
+
testFileCount = entries.filter(e => e.isFile() && /\.(test|spec)\.(ts|js)$/.test(e.name)).length;
|
|
115
|
+
if (scripts.vitest || scripts['test:unit']?.includes('vitest'))
|
|
116
|
+
testFramework = 'vitest';
|
|
117
|
+
else if (scripts.jest || scripts['test:unit']?.includes('jest'))
|
|
118
|
+
testFramework = 'jest';
|
|
119
|
+
else if (scripts.test?.includes('vitest'))
|
|
120
|
+
testFramework = 'vitest';
|
|
121
|
+
else if (scripts.test?.includes('jest'))
|
|
122
|
+
testFramework = 'jest';
|
|
123
|
+
}
|
|
124
|
+
catch {
|
|
125
|
+
// ignore
|
|
126
|
+
}
|
|
127
|
+
let latestPublishState = 'unknown';
|
|
128
|
+
if (/^0\.8\./.test(version))
|
|
129
|
+
latestPublishState = 'published (latest)';
|
|
130
|
+
else if (/^0\.7\./.test(version))
|
|
131
|
+
latestPublishState = 'published (stable)';
|
|
132
|
+
else if (/^0\./.test(version))
|
|
133
|
+
latestPublishState = 'published (pre-release)';
|
|
134
|
+
const blocked = pendingGates.filter(g => g.status === 'blocked');
|
|
135
|
+
const pending = pendingGates.filter(g => g.status === 'pending');
|
|
136
|
+
let nextRecommendedAction;
|
|
137
|
+
if (blocked.length > 0) {
|
|
138
|
+
nextRecommendedAction = `Fix blocker: ${blocked[0].name}`;
|
|
139
|
+
}
|
|
140
|
+
else if (pending.length > 0) {
|
|
141
|
+
nextRecommendedAction = `Address pending gate: ${pending[0].name}`;
|
|
142
|
+
}
|
|
143
|
+
else if (!health.hasTests) {
|
|
144
|
+
nextRecommendedAction = 'Add test infrastructure (vitest or jest).';
|
|
145
|
+
}
|
|
146
|
+
else if (testFileCount < 5) {
|
|
147
|
+
nextRecommendedAction = `Expand test coverage (currently ${testFileCount} test files).`;
|
|
148
|
+
}
|
|
149
|
+
else {
|
|
150
|
+
nextRecommendedAction = 'All gates green. Proceed to next phase feature work.';
|
|
151
|
+
}
|
|
152
|
+
const gateScore = Math.round((pendingGates.filter(g => g.status === 'passed').length / pendingGates.length) * 100);
|
|
153
|
+
const status = {
|
|
154
|
+
currentVersion: version,
|
|
155
|
+
currentPhase,
|
|
156
|
+
completedPhases,
|
|
157
|
+
pendingGates,
|
|
158
|
+
latestTests: { total: testFileCount, passed: null, framework: testFramework },
|
|
159
|
+
latestPublishState,
|
|
160
|
+
nextRecommendedAction,
|
|
161
|
+
projectHealth: health,
|
|
162
|
+
};
|
|
163
|
+
// ── Save mode ───────────────────────────────────────────────
|
|
164
|
+
if (ctx.flags.save || input === '--save') {
|
|
165
|
+
if (ctx.flags.dryRun) {
|
|
166
|
+
return {
|
|
167
|
+
success: true,
|
|
168
|
+
data: { ...status, wouldSave: true },
|
|
169
|
+
messages: ['(dry-run) Would save status to .nexagent/status.json and append to history.'],
|
|
170
|
+
recommendations: [nextRecommendedAction],
|
|
171
|
+
};
|
|
172
|
+
}
|
|
173
|
+
// Save project-local status
|
|
174
|
+
const savedPath = await saveProjectStatus(cwd, status);
|
|
175
|
+
// Append to global history
|
|
176
|
+
await appendStatusHistory({
|
|
177
|
+
timestamp: new Date().toISOString(),
|
|
178
|
+
version,
|
|
179
|
+
phase: currentPhase,
|
|
180
|
+
gateScore,
|
|
181
|
+
nextAction: nextRecommendedAction,
|
|
182
|
+
});
|
|
183
|
+
// Also save as a workflow run
|
|
184
|
+
const run = await saveWorkflowRun({
|
|
185
|
+
workflow: 'status',
|
|
186
|
+
profile: 'sophie',
|
|
187
|
+
input: '',
|
|
188
|
+
success: true,
|
|
189
|
+
data: status,
|
|
190
|
+
recommendations: [nextRecommendedAction],
|
|
191
|
+
});
|
|
192
|
+
// Create and save snapshot + markdown report
|
|
193
|
+
const snapshot = createSnapshot(run, cwd, pendingGates, ['status', 'auto']);
|
|
194
|
+
const reportPath = await saveMarkdownReport(cwd, snapshot);
|
|
195
|
+
if (ctx.flags.json) {
|
|
196
|
+
return {
|
|
197
|
+
success: true,
|
|
198
|
+
data: {
|
|
199
|
+
...status,
|
|
200
|
+
savedAt: new Date().toISOString(),
|
|
201
|
+
savedPath,
|
|
202
|
+
reportPath,
|
|
203
|
+
runId: run.id,
|
|
204
|
+
},
|
|
205
|
+
messages: [],
|
|
206
|
+
recommendations: [nextRecommendedAction],
|
|
207
|
+
};
|
|
208
|
+
}
|
|
209
|
+
const messages = [];
|
|
210
|
+
messages.push(`📊 Project Status (saved)`);
|
|
211
|
+
messages.push(` Version: ${version} | Phase: ${currentPhase}`);
|
|
212
|
+
messages.push(` Gate score: ${gateScore}%`);
|
|
213
|
+
messages.push('');
|
|
214
|
+
messages.push(`💾 Saved to: ${savedPath}`);
|
|
215
|
+
messages.push(`📝 Report: ${reportPath}`);
|
|
216
|
+
messages.push(`🏷 Run ID: ${run.id}`);
|
|
217
|
+
messages.push('');
|
|
218
|
+
messages.push('Phase gates:');
|
|
219
|
+
pendingGates.forEach(g => {
|
|
220
|
+
const icon = g.status === 'passed' ? '✅' : g.status === 'pending' ? '⏳' : '❌';
|
|
221
|
+
messages.push(` ${icon} ${g.name}`);
|
|
222
|
+
});
|
|
223
|
+
messages.push('');
|
|
224
|
+
messages.push(`Next recommended action: ${nextRecommendedAction}`);
|
|
225
|
+
return {
|
|
226
|
+
success: true,
|
|
227
|
+
data: status,
|
|
228
|
+
messages,
|
|
229
|
+
recommendations: [nextRecommendedAction],
|
|
230
|
+
};
|
|
231
|
+
}
|
|
232
|
+
// ── Default output (no save) ────────────────────────────────
|
|
233
|
+
if (ctx.flags.json) {
|
|
234
|
+
return {
|
|
235
|
+
success: true,
|
|
236
|
+
data: status,
|
|
237
|
+
messages: [],
|
|
238
|
+
recommendations: [nextRecommendedAction],
|
|
239
|
+
};
|
|
240
|
+
}
|
|
241
|
+
const messages = [];
|
|
242
|
+
messages.push(`📊 Project Status`);
|
|
243
|
+
messages.push(` Version: ${version} | Phase: ${currentPhase}`);
|
|
244
|
+
messages.push(` Publish state: ${latestPublishState}`);
|
|
245
|
+
messages.push('');
|
|
246
|
+
messages.push('Completed phases:');
|
|
247
|
+
completedPhases.forEach(p => messages.push(` ✅ ${p}`));
|
|
248
|
+
messages.push('');
|
|
249
|
+
messages.push('Phase gates:');
|
|
250
|
+
pendingGates.forEach(g => {
|
|
251
|
+
const icon = g.status === 'passed' ? '✅' : g.status === 'pending' ? '⏳' : '❌';
|
|
252
|
+
messages.push(` ${icon} ${g.name}`);
|
|
253
|
+
});
|
|
254
|
+
messages.push('');
|
|
255
|
+
messages.push('Tests:');
|
|
256
|
+
messages.push(` Framework: ${testFramework || 'none detected'}`);
|
|
257
|
+
messages.push(` Test files: ${testFileCount}`);
|
|
258
|
+
messages.push('');
|
|
259
|
+
messages.push(`Next recommended action: ${nextRecommendedAction}`);
|
|
260
|
+
messages.push('');
|
|
261
|
+
messages.push(chalkDim('Tip: Run `sophie status --save` to persist this snapshot.'));
|
|
262
|
+
return {
|
|
263
|
+
success: true,
|
|
264
|
+
data: status,
|
|
265
|
+
messages,
|
|
266
|
+
recommendations: [nextRecommendedAction],
|
|
267
|
+
};
|
|
268
|
+
}
|
|
269
|
+
// ── Helpers ──────────────────────────────────────────────────
|
|
270
|
+
async function fileExists(path) {
|
|
271
|
+
try {
|
|
272
|
+
const { stat } = await import('node:fs/promises');
|
|
273
|
+
const s = await stat(path);
|
|
274
|
+
return s.isFile();
|
|
275
|
+
}
|
|
276
|
+
catch {
|
|
277
|
+
return false;
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
async function dirExists(path) {
|
|
281
|
+
try {
|
|
282
|
+
const { stat } = await import('node:fs/promises');
|
|
283
|
+
const s = await stat(path);
|
|
284
|
+
return s.isDirectory();
|
|
285
|
+
}
|
|
286
|
+
catch {
|
|
287
|
+
return false;
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
function determinePhase(version) {
|
|
291
|
+
if (/^0\.[0-3]\./.test(version))
|
|
292
|
+
return PHASES[0];
|
|
293
|
+
if (/^0\.[4-5]\./.test(version))
|
|
294
|
+
return PHASES[1];
|
|
295
|
+
if (/^0\.6\./.test(version))
|
|
296
|
+
return PHASES[2];
|
|
297
|
+
if (/^0\.7\./.test(version))
|
|
298
|
+
return PHASES[3];
|
|
299
|
+
if (/^0\.8\.0/.test(version))
|
|
300
|
+
return PHASES[4];
|
|
301
|
+
if (/^0\.8\./.test(version))
|
|
302
|
+
return PHASES[5];
|
|
303
|
+
if (/^0\.9\./.test(version))
|
|
304
|
+
return PHASES[6];
|
|
305
|
+
if (/^1\./.test(version))
|
|
306
|
+
return PHASES[7];
|
|
307
|
+
return PHASES[5];
|
|
308
|
+
}
|
|
309
|
+
function chalkDim(text) {
|
|
310
|
+
// Fallback dim for when chalk is not imported here
|
|
311
|
+
return `\x1b[2m${text}\x1b[0m`;
|
|
312
|
+
}
|
|
313
|
+
//# sourceMappingURL=status.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"status.js","sourceRoot":"","sources":["../../../src/workflows/sophie/status.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAExD,OAAO,EACL,iBAAiB,EACjB,iBAAiB,EACjB,mBAAmB,EACnB,iBAAiB,EACjB,eAAe,EACf,cAAc,EACd,kBAAkB,GACnB,MAAM,yBAAyB,CAAC;AA+BjC,MAAM,MAAM,GAAG;IACb,uBAAuB;IACvB,yBAAyB;IACzB,kBAAkB;IAClB,yBAAyB;IACz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CAAC,OAAO,CAAC;QAAE,OAAO,MAAM,CAAC,CAAC,CAAC,CAAC;IAC9C,IAAI,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC;QAAE,OAAO,MAAM,CAAC,CAAC,CAAC,CAAC;IAC/C,IAAI,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC;QAAE,OAAO,MAAM,CAAC,CAAC,CAAC,CAAC;IAC9C,IAAI,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC;QAAE,OAAO,MAAM,CAAC,CAAC,CAAC,CAAC;IAC9C,IAAI,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC;QAAE,OAAO,MAAM,CAAC,CAAC,CAAC,CAAC;IAC3C,OAAO,MAAM,CAAC,CAAC,CAAC,CAAC;AACnB,CAAC;AAED,SAAS,QAAQ,CAAC,IAAY;IAC5B,mDAAmD;IACnD,OAAO,UAAU,IAAI,SAAS,CAAC;AACjC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nexagent-cli/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.1",
|
|
4
4
|
"description": "NexAgent — locally-runnable AI agent CLI with file editing, tools, and beautiful TUI",
|
|
5
5
|
"bin": {
|
|
6
6
|
"nexagent": "dist/bin/nexagent.js",
|
|
@@ -30,7 +30,6 @@
|
|
|
30
30
|
"test:watch": "vitest",
|
|
31
31
|
"lint": "eslint src/",
|
|
32
32
|
"clean": "rm -rf dist/",
|
|
33
|
-
"prepublishOnly": "pnpm run build",
|
|
34
33
|
"validate:bin": "node --import tsx scripts/validate-bin-map.ts",
|
|
35
34
|
"smoke:pack": "node --import tsx scripts/smoke-pack.ts"
|
|
36
35
|
},
|