@hmharness/cli 0.11.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 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] [--device=<hdc> --hap=<path> --bundle=<id> --ability=<name> --target=<t> --expect-log=<marker>]\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();
@@ -799,19 +799,22 @@ flags:
799
799
  // install/launch/log-marker pass; hap/bundle/ability come from flags
800
800
  ...(() => {
801
801
  const dev = rest.find((a) => a.startsWith('--device='));
802
- if (!dev)
803
- return {};
802
+ const rel = rest.find((a) => a.startsWith('--release='));
804
803
  const flag = (name) => (rest.find((a) => a.startsWith(`--${name}=`)) ?? '').split('=').slice(1).join('=');
805
- return {
806
- deviceGate: {
804
+ const out = {};
805
+ if (dev) {
806
+ out.deviceGate = {
807
807
  hdc: dev.slice(9),
808
808
  ...(flag('target') ? { target: flag('target') } : {}),
809
809
  hap: flag('hap'),
810
810
  bundle: flag('bundle'),
811
811
  ability: flag('ability') || 'EntryAbility',
812
812
  expectLog: flag('expect-log') || 'onCreate',
813
- },
814
- };
813
+ };
814
+ }
815
+ if (rel)
816
+ out.release = { version: rel.slice(10), ...(flag('notes') ? { notes: flag('notes') } : {}) };
817
+ return out;
815
818
  })(),
816
819
  });
817
820
  for (const s of r.stages) {
@@ -820,6 +823,8 @@ flags:
820
823
  }
821
824
  const verdict = r.finalVerdict === 'PASS' ? GREEN('VERDICT: PASS') : RED(`VERDICT: ${r.finalVerdict}`);
822
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`);
823
828
  }
824
829
  catch (err) {
825
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.11.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",