@hmharness/cli 0.14.12 → 0.14.13
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/main.js +24 -8
- package/dist/tui.js +7 -3
- package/package.json +2 -2
package/dist/main.js
CHANGED
|
@@ -308,11 +308,19 @@ async function repl(yes, initialHistory, initialSessionId) {
|
|
|
308
308
|
continue;
|
|
309
309
|
}
|
|
310
310
|
if (line === '/ops' || line === '/ops scan') {
|
|
311
|
-
const {
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
311
|
+
const { harmonyOpsRadarScan, opsStatus, describeSources } = await import('@hmharness/domain-ops');
|
|
312
|
+
if (line === '/ops') {
|
|
313
|
+
const s = await opsStatus(home);
|
|
314
|
+
stdout.write((s.lastScan
|
|
315
|
+
? t.opsRadarLine(s.scans, s.lastScan.replace('T', ' ').slice(0, 19))
|
|
316
|
+
: t.opsRadarNone) + '\n');
|
|
317
|
+
stdout.write(t.opsWatchingLabel + ' ' + describeSources(s.sources) + '\n');
|
|
318
|
+
stdout.write(DIM(t.opsHint) + '\n');
|
|
319
|
+
}
|
|
320
|
+
else {
|
|
321
|
+
const r = await harmonyOpsRadarScan.execute({}, { cwd: process.cwd(), home });
|
|
322
|
+
stdout.write(r.output + '\n');
|
|
323
|
+
}
|
|
316
324
|
continue;
|
|
317
325
|
}
|
|
318
326
|
if (line === '/bench') {
|
|
@@ -744,7 +752,7 @@ flags:
|
|
|
744
752
|
}
|
|
745
753
|
if (cmd === 'ops') {
|
|
746
754
|
await initHome();
|
|
747
|
-
const { harmonyOpsRadarScan, harmonyOpsRadarBrief
|
|
755
|
+
const { harmonyOpsRadarScan, harmonyOpsRadarBrief } = await import('@hmharness/domain-ops');
|
|
748
756
|
const sub = rest[0] ?? 'status';
|
|
749
757
|
const ctx = { cwd: process.cwd(), home: homeDir() };
|
|
750
758
|
if (sub === 'scan') {
|
|
@@ -766,8 +774,16 @@ flags:
|
|
|
766
774
|
}
|
|
767
775
|
}
|
|
768
776
|
else {
|
|
769
|
-
|
|
770
|
-
|
|
777
|
+
// bare `hmh ops` (= status): localized human view, not raw keys
|
|
778
|
+
const { opsStatus, describeSources } = await import('@hmharness/domain-ops');
|
|
779
|
+
const cfgNow = await loadConfig();
|
|
780
|
+
const ot = strings((cfgNow.locale ?? 'zh'));
|
|
781
|
+
const s = await opsStatus(ctx.home);
|
|
782
|
+
stdout.write((s.lastScan
|
|
783
|
+
? ot.opsRadarLine(s.scans, s.lastScan.replace('T', ' ').slice(0, 19))
|
|
784
|
+
: ot.opsRadarNone) + '\n');
|
|
785
|
+
stdout.write(ot.opsWatchingLabel + ' ' + describeSources(s.sources) + '\n');
|
|
786
|
+
stdout.write(DIM(ot.opsHint) + '\n');
|
|
771
787
|
}
|
|
772
788
|
return;
|
|
773
789
|
}
|
package/dist/tui.js
CHANGED
|
@@ -2467,9 +2467,13 @@ export async function tui(yes, noWeb = false, opts = {}) {
|
|
|
2467
2467
|
if (line === '/ops') {
|
|
2468
2468
|
rt.setBusy(true, '/ops');
|
|
2469
2469
|
try {
|
|
2470
|
-
const {
|
|
2471
|
-
const
|
|
2472
|
-
rt.addText(
|
|
2470
|
+
const { opsStatus, describeSources } = await import('@hmharness/domain-ops');
|
|
2471
|
+
const s = await opsStatus(home);
|
|
2472
|
+
rt.addText(s.lastScan
|
|
2473
|
+
? t.opsRadarLine(s.scans, s.lastScan.replace('T', ' ').slice(0, 19))
|
|
2474
|
+
: t.opsRadarNone);
|
|
2475
|
+
rt.addText(t.opsWatchingLabel + ' ' + describeSources(s.sources));
|
|
2476
|
+
rt.addText(DIM(t.opsHint));
|
|
2473
2477
|
}
|
|
2474
2478
|
catch (err) {
|
|
2475
2479
|
rt.addText(String(err), 'err');
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hmharness/cli",
|
|
3
|
-
"version": "0.14.
|
|
3
|
+
"version": "0.14.13",
|
|
4
4
|
"description": "hmharness command line: one-shot tasks, an interactive REPL, a fullscreen TUI, the web frontend, and direct tool invocation.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/main.js",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"@hmharness/observability": "0.7.0",
|
|
48
48
|
"@hmharness/evolution": "0.14.9",
|
|
49
49
|
"@hmharness/domain-harmony": "0.13.5",
|
|
50
|
-
"@hmharness/domain-ops": "0.8.
|
|
50
|
+
"@hmharness/domain-ops": "0.8.1",
|
|
51
51
|
"@hmharness/agent": "0.14.9",
|
|
52
52
|
"@hmharness/evaluation": "0.8.0",
|
|
53
53
|
"@hmharness/web": "0.9.1"
|