infinity-harness 2.8.5 → 2.8.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/CHANGELOG.md CHANGED
@@ -4,6 +4,14 @@ All notable changes to this project are documented here.
4
4
  Format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/); versions follow
5
5
  [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
6
 
7
+ ## [2.8.6] — 2026-08-31
8
+
9
+ Parked stays parked.
10
+
11
+ ### Fixed
12
+
13
+ - **Main session started harness work without a widget after declining the final wizard prompt.** The post-wizard "parked" note was sent as `sendUserMessage(..., { deliverAs: "followUp" })`, which intentionally wakes the agent on the main-session model. Changed to `sendMessage(..., { triggerTurn: false })` (visible `infinity:brief` with `parked: true` but no turn) and hardened the control-panel system prompt to explicitly say "PARKED — do NOT start building/researching/validating; only answer questions; only `/infinity:run` starts the harness; background uses default/tiered models, not the main session model" when not armed. Session now simply does nothing until `/infinity:run`.
14
+
7
15
  ## [2.8.5] — 2026-08-31
8
16
 
9
17
  Richer top widget, one panel.
@@ -1933,22 +1933,23 @@ export default function (pi: ExtensionAPI): void {
1933
1933
  if (!dr.spawned) await startEngine(ctx, dir);
1934
1934
  notify(ctx, "infinity-harness: run armed — background run started. /infinity:halt stops it.", "info");
1935
1935
  } else {
1936
+ // The harness is parked — do NOT trigger an agent turn. The
1937
+ // control-panel contract (before_agent_start) already stops
1938
+ // autonomous work, but a `followUp` brief starts one anyway.
1939
+ // `triggerTurn: false` keeps it visible without waking the model.
1936
1940
  const brief = await briefText(dir);
1937
- if (!plan.brief) {
1938
- pi.sendUserMessage(
1939
- `The human has not said what they want built yet. Ask them, in one short question, and do not start any work or invent a scope until they answer. The harness is NOT running — "/infinity:run" starts it.\n\n${brief}`,
1940
- { deliverAs: "followUp" },
1941
- );
1942
- } else if (plan.phases[0] === "research") {
1943
- pi.sendUserMessage(
1944
- `${brief}\n\nThis is RESEARCH — survey constraints and options first, then validate (infinity_validate) to advance. The harness is NOT running yet. Run "/infinity:run" when you are ready, or answer "yes start the run now" next time you init.`,
1945
- { deliverAs: "followUp" },
1946
- );
1947
- } else {
1948
- pi.sendUserMessage(
1949
- `${brief}\n\nThe harness is ready but NOT running. Run "/infinity:run" to start, or answer "yes — start the run now" in the wizard next time.`,
1950
- { deliverAs: "followUp" },
1941
+ const parkedNote = !plan.brief
1942
+ ? `The human has not said what they want built yet. Ask them, in one short question, and do not start any work or invent a scope until they answer. The harness is NOT running — "/infinity:run" starts it.\n\n${brief}`
1943
+ : plan.phases[0] === "research"
1944
+ ? `${brief}\n\nThis is RESEARCH — survey constraints and options first, then validate (infinity_validate) to advance. The harness is NOT running yet. Run "/infinity:run" when you are ready, or answer "yes — start the run now" next time you init.`
1945
+ : `${brief}\n\nThe harness is ready but NOT running. Run "/infinity:run" to start, or answer "yes — start the run now" in the wizard next time.`;
1946
+ try {
1947
+ pi.sendMessage(
1948
+ { customType: "infinity:brief", content: parkedNote, display: true, details: { parked: true, phase: plan.phases[0] ?? null } },
1949
+ { triggerTurn: false },
1951
1950
  );
1951
+ } catch (e) {
1952
+ notify(ctx, `infinity-harness: ${errMsg(e as Error)}`, "warning");
1952
1953
  }
1953
1954
  }
1954
1955
  },
@@ -3394,19 +3395,47 @@ function controlPanelContract(dir: string): string | null {
3394
3395
  if (!ok || !config.currentPhase) return null;
3395
3396
  const { list } = loadFeatureList(dir);
3396
3397
  const p = computeProgress(list);
3398
+ let armed = false;
3399
+ try {
3400
+ const r = readJsonSafe<{ armed?: boolean } | null>(runStatePathSync(dir), null);
3401
+ armed = r?.armed === true;
3402
+ } catch {}
3403
+ // When parked, the harness does NO work anywhere — not in this session and
3404
+ // not in background sessions. When armed, background sessions do the work
3405
+ // and this session is idle by design (it never spends the human's model).
3406
+ const workLine = armed
3407
+ ? "The work is being done by separate background pi sessions on their own models, not by you."
3408
+ : "The harness is NOT running — nothing is happening in background. Only `/infinity:run` starts it.";
3409
+ const rule1 = armed
3410
+ ? "1. Do not implement plan tasks, advance phases, or edit `harness/` by hand. Answer the"
3411
+ : "1. Do NOT start building, researching, or validating. The harness is parked. If the human";
3412
+ const rule1b = armed
3413
+ ? " human's questions about the run, and use `/infinity:workers` and `infinity_status`"
3414
+ : " asks you to do harness work anyway, tell them it is parked and needs `/infinity:run`,";
3415
+ const rule1c = armed
3416
+ ? " to see what the background sessions are doing."
3417
+ : " then stop. Do not touch `harness/` files.";
3418
+ const rule2 = armed
3419
+ ? "2. If the human asks you to build something, say that the harness is driving it and offer"
3420
+ : "2. While parked, you may ONLY answer questions about the project — its stack, commands,";
3421
+ const rule2b = armed
3422
+ ? " `/infinity:run`, `/infinity:halt`, or `/infinity:replan` instead."
3423
+ : " files, and how the harness would run. Do not write code, docs, plans, or validation.";
3424
+ const rule3 = "3. The plan of record is `harness/features/feature-list.json`; your memory of it is not.";
3425
+ const extra = armed ? [] : ["", "Parked means parked. No tool calls that mutate the project while parked."];
3397
3426
  return [
3398
- "## infinity-harness — you are the control panel",
3427
+ "## infinity-harness — you are the control panel" + (armed ? "" : " (PARKED)"),
3399
3428
  "",
3400
3429
  `This project runs an infinity-harness pipeline at **${config.currentPhase.toUpperCase()}**, ` +
3401
- `${p.tasksDone}/${p.tasksTotal} tasks done. The work is being done by separate background ` +
3402
- `pi sessions on their own models, not by you.`,
3430
+ `${p.tasksDone}/${p.tasksTotal} tasks done. ` + workLine,
3403
3431
  "",
3404
- "1. Do not implement plan tasks, advance phases, or edit `harness/` by hand. Answer the",
3405
- " human's questions about the run, and use `/infinity:workers` and `infinity_status`",
3406
- " to see what the background sessions are doing.",
3407
- "2. If the human asks you to build something, say that the harness is driving it and offer",
3408
- " `/infinity:run`, `/infinity:halt`, or `/infinity:replan` instead.",
3409
- "3. The plan of record is `harness/features/feature-list.json`; your memory of it is not.",
3432
+ rule1,
3433
+ rule1b,
3434
+ rule1c,
3435
+ rule2,
3436
+ rule2b,
3437
+ rule3,
3438
+ ...extra,
3410
3439
  ].join("\n");
3411
3440
  }
3412
3441
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "infinity-harness",
3
- "version": "2.8.5",
3
+ "version": "2.8.6",
4
4
  "description": "A pi agent extension that runs a gated build pipeline unattended — enforces phases, validates with deterministic gates, and keeps working for hours or days without losing the plan.",
5
5
  "type": "module",
6
6
  "keywords": [