@hmharness/cli 0.10.0 → 0.12.0
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 -1
- package/dist/state.js +8 -2
- package/package.json +3 -3
package/dist/main.js
CHANGED
|
@@ -775,7 +775,7 @@ flags:
|
|
|
775
775
|
// a bounded repair loop; the judge's VERDICT line is the only stage gate.
|
|
776
776
|
const task = rest.join(' ').trim();
|
|
777
777
|
if (!task) {
|
|
778
|
-
stdout.write('usage: hmh pipeline "<task>" [--repairs=N] [--turns=N]\n');
|
|
778
|
+
stdout.write('usage: hmh pipeline "<task>" [--repairs=N] [--turns=N] [--release=<ver>] [--device=<hdc> --hap=<path> --bundle=<id> --ability=<name> --target=<t> --expect-log=<marker>]\n');
|
|
779
779
|
return;
|
|
780
780
|
}
|
|
781
781
|
await initHome();
|
|
@@ -795,6 +795,27 @@ flags:
|
|
|
795
795
|
locale: cfg2.locale,
|
|
796
796
|
maxRepairs: Number((rest.find((a) => a.startsWith('--repairs=')) ?? '').slice(10)) || 2,
|
|
797
797
|
maxTurnsPerStage: Number((rest.find((a) => a.startsWith('--turns=')) ?? '').slice(8)) || 6,
|
|
798
|
+
// V3 device gate (ADR-0007): --device=<hdc> enables the on-device
|
|
799
|
+
// install/launch/log-marker pass; hap/bundle/ability come from flags
|
|
800
|
+
...(() => {
|
|
801
|
+
const dev = rest.find((a) => a.startsWith('--device='));
|
|
802
|
+
const rel = rest.find((a) => a.startsWith('--release='));
|
|
803
|
+
const flag = (name) => (rest.find((a) => a.startsWith(`--${name}=`)) ?? '').split('=').slice(1).join('=');
|
|
804
|
+
const out = {};
|
|
805
|
+
if (dev) {
|
|
806
|
+
out.deviceGate = {
|
|
807
|
+
hdc: dev.slice(9),
|
|
808
|
+
...(flag('target') ? { target: flag('target') } : {}),
|
|
809
|
+
hap: flag('hap'),
|
|
810
|
+
bundle: flag('bundle'),
|
|
811
|
+
ability: flag('ability') || 'EntryAbility',
|
|
812
|
+
expectLog: flag('expect-log') || 'onCreate',
|
|
813
|
+
};
|
|
814
|
+
}
|
|
815
|
+
if (rel)
|
|
816
|
+
out.release = { version: rel.slice(10), ...(flag('notes') ? { notes: flag('notes') } : {}) };
|
|
817
|
+
return out;
|
|
818
|
+
})(),
|
|
798
819
|
});
|
|
799
820
|
for (const s of r.stages) {
|
|
800
821
|
const mark = s.verdict === 'PASS' ? GREEN('PASS') : s.verdict === 'FAIL' ? RED('FAIL') : DIM('····');
|
|
@@ -802,6 +823,8 @@ flags:
|
|
|
802
823
|
}
|
|
803
824
|
const verdict = r.finalVerdict === 'PASS' ? GREEN('VERDICT: PASS') : RED(`VERDICT: ${r.finalVerdict}`);
|
|
804
825
|
stdout.write(`${verdict} ${DIM(`· status ${r.status} · repairs ${r.repairsUsed} · report ${home}\\pipelines\\${r.pipelineId}`)}\n`);
|
|
826
|
+
if (r.release)
|
|
827
|
+
stdout.write(GREEN('✓') + ` released ${r.release.version} → project ${r.release.projectId} @ checkpoint ${r.release.checkpointId}\n`);
|
|
805
828
|
}
|
|
806
829
|
catch (err) {
|
|
807
830
|
stdout.write(RED(String(err)) + '\n');
|
package/dist/state.js
CHANGED
|
@@ -11,7 +11,11 @@
|
|
|
11
11
|
import { cp, mkdir, readdir, rename, rm, stat, writeFile } from 'node:fs/promises';
|
|
12
12
|
import { join } from 'node:path';
|
|
13
13
|
/** The irreplaceable set. `sessions/` (large, and evidence rather than
|
|
14
|
-
* state) is only included with --full
|
|
14
|
+
* state) is only included with --full; `pipelines/` (stage reports,
|
|
15
|
+
* re-runnable) likewise. `projects/` (M8 decisions+checkpoint refs) and
|
|
16
|
+
* `runs/` (M1 trajectories - the dataset source and readiness evidence)
|
|
17
|
+
* joined the default set with the V2 milestones: losing them wipes the
|
|
18
|
+
* learning history that M10/M11 are built on. */
|
|
15
19
|
const STATE_ITEMS = [
|
|
16
20
|
'config.json',
|
|
17
21
|
'workspaces.json',
|
|
@@ -22,6 +26,8 @@ const STATE_ITEMS = [
|
|
|
22
26
|
'evolution',
|
|
23
27
|
'bench',
|
|
24
28
|
'ops',
|
|
29
|
+
'projects',
|
|
30
|
+
'runs',
|
|
25
31
|
];
|
|
26
32
|
async function exists(p) {
|
|
27
33
|
try {
|
|
@@ -42,7 +48,7 @@ export async function backupState(home, opts = {}) {
|
|
|
42
48
|
await mkdir(dir, { recursive: true });
|
|
43
49
|
const items = [...STATE_ITEMS];
|
|
44
50
|
if (opts.full)
|
|
45
|
-
items.push('sessions');
|
|
51
|
+
items.push('sessions', 'pipelines');
|
|
46
52
|
const copied = [];
|
|
47
53
|
for (const item of items) {
|
|
48
54
|
const src = join(home, item);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hmharness/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.12.0",
|
|
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",
|
|
@@ -46,9 +46,9 @@
|
|
|
46
46
|
"@hmharness/kernel": "0.9.0",
|
|
47
47
|
"@hmharness/observability": "0.7.0",
|
|
48
48
|
"@hmharness/evolution": "0.9.0",
|
|
49
|
-
"@hmharness/domain-harmony": "0.
|
|
49
|
+
"@hmharness/domain-harmony": "0.11.0",
|
|
50
50
|
"@hmharness/domain-ops": "0.8.0",
|
|
51
|
-
"@hmharness/agent": "0.
|
|
51
|
+
"@hmharness/agent": "0.11.0",
|
|
52
52
|
"@hmharness/evaluation": "0.8.0",
|
|
53
53
|
"@hmharness/web": "0.8.2"
|
|
54
54
|
}
|