herdr-orchestra 6.12.1 → 6.13.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/CHANGELOG.md +13 -0
- package/VERSION +1 -1
- package/bin/__pycache__/orchcpython-314.pyc +0 -0
- package/bin/orch +77 -4
- package/package.json +1 -1
- package/view/index.html +5 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,19 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes. Versions follow [semantic versioning](https://semver.org).
|
|
4
4
|
|
|
5
|
+
## [6.13.0] - 2026-11-26
|
|
6
|
+
|
|
7
|
+
The views no longer pass an old run off as the current one, and orch says when a plan file has a name it does not read.
|
|
8
|
+
|
|
9
|
+
Example: a developer saves the new plan as `.orchestrate/csv-import.md` and opens `orch view`. Before, the page still showed last week's `plan.md` milestones as if they were live. Now a note at the top reads "This is the last run (Categories): all its milestones landed 2 d ago. No run is going now" and "`.orchestrate/csv-import.md` is not used: orch only reads `.orchestrate/plan.md`. Rename or copy it to plan.md, then run `orch sync`."
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
- **Notes about old runs and unread plans** in `orch view` (a bar at the top), `orch board`, `orch status` (a `note:` line) and `orch status --json` (a `notices` list). They appear only when no run is going: the last run landed everything (`old_run`), `plan.md` changed after the last run (`plan_unsynced`), or a `.orchestrate/*.md` file that orch does not read is newer than the run (`other_plan`). Files orch writes itself (summary, story, pr-body, manual-tests) are never counted. While a milestone is being worked on there are no notes.
|
|
13
|
+
- **`orch sync` points out a plan it does not read.** With no `plan.md` it names the other `.md` file and says to rename it; with a newer file beside `plan.md` it warns and still loads `plan.md` as before.
|
|
14
|
+
|
|
15
|
+
### Not changed
|
|
16
|
+
- orch still reads only `.orchestrate/plan.md`, and one repo still has one run at a time.
|
|
17
|
+
|
|
5
18
|
## [6.12.1] - 2026-11-26
|
|
6
19
|
|
|
7
20
|
### Fixed
|
package/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
6.
|
|
1
|
+
6.13.0
|
|
Binary file
|
package/bin/orch
CHANGED
|
@@ -13,7 +13,7 @@ Task status flow (every change goes through move(), which checks TRANSITIONS)
|
|
|
13
13
|
side states: needs-answer, paused, failed, conflict, needs-fix, held (waiting for `orch approve`), skipped
|
|
14
14
|
Also: .orchestrate/events.jsonl (one line per transition), driver.lock (held by autopilot while it drives).
|
|
15
15
|
"""
|
|
16
|
-
import atexit, contextlib, fcntl, fnmatch, hashlib, json, os, re, shlex, shutil, signal, socket, subprocess, sys, tempfile, time
|
|
16
|
+
import atexit, contextlib, fcntl, fnmatch, hashlib, json, os, re, shlex, shutil, signal, socket, subprocess, sys, tempfile, textwrap, time
|
|
17
17
|
from pathlib import Path
|
|
18
18
|
|
|
19
19
|
HERDR = os.environ.get("HERDR", "herdr")
|
|
@@ -1273,10 +1273,17 @@ def parse_workers(s):
|
|
|
1273
1273
|
def cmd_sync(args):
|
|
1274
1274
|
plan = ORCH / "plan.md"
|
|
1275
1275
|
if not plan.exists():
|
|
1276
|
-
|
|
1276
|
+
others = other_plan_files()
|
|
1277
|
+
die("missing .orchestrate/plan.md" + (
|
|
1278
|
+
f" (found {', '.join(others[:3])}, but orch only reads plan.md: rename or copy it to plan.md)"
|
|
1279
|
+
if others else ""))
|
|
1277
1280
|
plan_text = plan.read_text()
|
|
1278
1281
|
cfg, tasks = parse_plan(plan_text)
|
|
1279
1282
|
errors, warns = [], []
|
|
1283
|
+
newer = other_plan_files(plan.stat().st_mtime)
|
|
1284
|
+
if newer:
|
|
1285
|
+
warns.append(f"{', '.join(newer[:3])} {'is' if len(newer) == 1 else 'are'} newer than plan.md, but orch only "
|
|
1286
|
+
f"reads plan.md. If that is the plan you mean, copy it to plan.md and run `orch sync` again")
|
|
1280
1287
|
|
|
1281
1288
|
get = lambda k, d="": " ".join(cfg.get(k, [])).strip() or d
|
|
1282
1289
|
branch = get("branch").split()[0] if get("branch") else die("plan header needs `Branch: feature/<slug>`")
|
|
@@ -3638,6 +3645,8 @@ def cmd_status(args):
|
|
|
3638
3645
|
f"max_parallel={st['max_parallel']} reviewer={st['reviewer']} (busy: {st.get('reviewer_busy')})")
|
|
3639
3646
|
vu = view_url()
|
|
3640
3647
|
print(f"live view: {vu}" if vu else "live view: off — `orch view` shows this run as a picture in your browser")
|
|
3648
|
+
for n in run_notices(st):
|
|
3649
|
+
print("note: " + n["text"])
|
|
3641
3650
|
if st.get("integration_broken"):
|
|
3642
3651
|
print(f" INTEGRATION BROKEN: the check failed on {st['branch']} after merging "
|
|
3643
3652
|
f"{st['integration_broken']} — fix it; autopilot re-checks before it continues")
|
|
@@ -6984,6 +6993,65 @@ def view_events(limit=None):
|
|
|
6984
6993
|
return out
|
|
6985
6994
|
|
|
6986
6995
|
|
|
6996
|
+
ORCH_OWN_MD = {"plan.md", "summary.md", "summary.prev.md", "story.md", "pr-body.md", "manual-tests.md"}
|
|
6997
|
+
|
|
6998
|
+
|
|
6999
|
+
def other_plan_files(newer_than=0):
|
|
7000
|
+
""".orchestrate/*.md files that orch does not write itself and does not read (it reads plan.md only)."""
|
|
7001
|
+
out = []
|
|
7002
|
+
try:
|
|
7003
|
+
for f in sorted(ORCH.glob("*.md")):
|
|
7004
|
+
if f.name not in ORCH_OWN_MD and f.stat().st_mtime > newer_than:
|
|
7005
|
+
out.append(f.name)
|
|
7006
|
+
except OSError:
|
|
7007
|
+
pass
|
|
7008
|
+
return out
|
|
7009
|
+
|
|
7010
|
+
|
|
7011
|
+
def _ago(secs):
|
|
7012
|
+
secs = max(0, int(secs))
|
|
7013
|
+
return ("less than a minute" if secs < 60 else f"{secs // 60} min" if secs < 3600 else
|
|
7014
|
+
f"{secs // 3600} h" if secs < 86400 else f"{secs // 86400} d")
|
|
7015
|
+
|
|
7016
|
+
|
|
7017
|
+
def run_notices(st):
|
|
7018
|
+
"""Plain-words notes for the views and `orch status` when what they show is not a run that is going now:
|
|
7019
|
+
the last run finished long ago, or a plan was written that orch will not read. Never fails."""
|
|
7020
|
+
try:
|
|
7021
|
+
try:
|
|
7022
|
+
state_t = STATE.stat().st_mtime
|
|
7023
|
+
except OSError:
|
|
7024
|
+
state_t = 0
|
|
7025
|
+
out = []
|
|
7026
|
+
if st is not None:
|
|
7027
|
+
tasks = st.get("tasks", {})
|
|
7028
|
+
active = any((tasks.get(t) or {}).get("status") in ACTIVE for t in st.get("order", []))
|
|
7029
|
+
done = bool(st.get("order")) and (
|
|
7030
|
+
all((tasks.get(t) or {}).get("status") in ("merged", "skipped") for t in st["order"])
|
|
7031
|
+
or any(e.get("kind") == "finished" for e in st.get("lead_events", [])))
|
|
7032
|
+
if active or driver_alive() or not done:
|
|
7033
|
+
return out # a run is going (or stopped half way): nothing to add
|
|
7034
|
+
out.append({"kind": "old_run", "text": (
|
|
7035
|
+
f"This is the last run ({st.get('title') or st.get('branch')}): all its milestones landed "
|
|
7036
|
+
f"{_ago(now() - state_t)} ago. No run is going now. For a new run, put the plan in "
|
|
7037
|
+
f".orchestrate/plan.md and run `orch sync`.")})
|
|
7038
|
+
try:
|
|
7039
|
+
if (ORCH / "plan.md").stat().st_mtime > state_t:
|
|
7040
|
+
out.append({"kind": "plan_unsynced", "text": (
|
|
7041
|
+
".orchestrate/plan.md was changed after this run. Run `orch sync` to load it.")})
|
|
7042
|
+
except OSError:
|
|
7043
|
+
pass
|
|
7044
|
+
others = other_plan_files(state_t)
|
|
7045
|
+
if others:
|
|
7046
|
+
out.append({"kind": "other_plan", "text": (
|
|
7047
|
+
f"{', '.join('.orchestrate/' + o for o in others[:3])} "
|
|
7048
|
+
f"{'is' if len(others) == 1 else 'are'} not used: orch only reads .orchestrate/plan.md. "
|
|
7049
|
+
f"Rename or copy it to plan.md, then run `orch sync`.")})
|
|
7050
|
+
return out
|
|
7051
|
+
except Exception:
|
|
7052
|
+
return []
|
|
7053
|
+
|
|
7054
|
+
|
|
6987
7055
|
def view_model(st=None, recent=40):
|
|
6988
7056
|
"""The run in one stable shape ("view": 1). Adding fields is fine; renaming one needs "view": 2."""
|
|
6989
7057
|
if st is None:
|
|
@@ -6991,7 +7059,8 @@ def view_model(st=None, recent=40):
|
|
|
6991
7059
|
st = json.loads(STATE.read_text())
|
|
6992
7060
|
except (OSError, ValueError):
|
|
6993
7061
|
return {"view": VIEW_SCHEMA, "empty": True, "repo": ROOT.name,
|
|
6994
|
-
"text": "No run in this repo yet: the lead writes the plan, then `orch sync` / `orch start`."
|
|
7062
|
+
"text": "No run in this repo yet: the lead writes the plan, then `orch sync` / `orch start`.",
|
|
7063
|
+
"notices": run_notices(None)}
|
|
6995
7064
|
tasks, t_now = st.get("tasks", {}), now()
|
|
6996
7065
|
ms, by_model = [], {}
|
|
6997
7066
|
for tid in st.get("order", []):
|
|
@@ -7062,6 +7131,7 @@ def view_model(st=None, recent=40):
|
|
|
7062
7131
|
"open": len([e for e in st.get("lead_events", []) if event_open(st, e)])} if st.get("lead") else None),
|
|
7063
7132
|
"recent": view_events(recent)[::-1],
|
|
7064
7133
|
"all_done": bool(ms) and all(m["status"] in ("merged", "skipped") for m in ms),
|
|
7134
|
+
"notices": run_notices(st),
|
|
7065
7135
|
}
|
|
7066
7136
|
|
|
7067
7137
|
|
|
@@ -7521,8 +7591,10 @@ def render_board(vm, width=100, color=True, sel=None, note=""):
|
|
|
7521
7591
|
|
|
7522
7592
|
def cut(s, n):
|
|
7523
7593
|
return s if len(s) <= n else s[:max(0, n - 1)] + "…"
|
|
7594
|
+
notes = [c("a", ln) for n in vm.get("notices", [])
|
|
7595
|
+
for ln in textwrap.wrap("! " + n["text"], max(30, width - 2), subsequent_indent=" ")]
|
|
7524
7596
|
if vm.get("empty"):
|
|
7525
|
-
return [c("a", "orch board"), "", vm.get("text", "No run yet.")]
|
|
7597
|
+
return [c("a", "orch board"), "", vm.get("text", "No run yet.")] + ([""] + notes if notes else [])
|
|
7526
7598
|
cn = vm["counts"]
|
|
7527
7599
|
out = [c("a", f"orch board · {vm.get('branch')}") + c("d", f" {time.strftime('%H:%M')} · live"),
|
|
7528
7600
|
c("B", f"{cn['landed']} of {cn['total']} landed")
|
|
@@ -7534,6 +7606,7 @@ def render_board(vm, width=100, color=True, sel=None, note=""):
|
|
|
7534
7606
|
out.append(c("d", f"tokens {u['tokens'] / 1e6:.1f}M · cost ~${u['cost_usd']:.2f}"))
|
|
7535
7607
|
if vm.get("all_done"):
|
|
7536
7608
|
out.append(c("g", "ALL DONE — `orch finish` pushes the branch and opens the PR"))
|
|
7609
|
+
out += notes
|
|
7537
7610
|
out += ["", c("d", "MILESTONES")]
|
|
7538
7611
|
ms = {m["id"]: m for m in vm["milestones"]}
|
|
7539
7612
|
kids = {}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "herdr-orchestra",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.13.0",
|
|
4
4
|
"description": "Orchestrate AI coding agents (Claude Code, Codex, OpenCode, Amp, Pi) as one team: a lead plans, coders build, a reviewer checks, you get one PR. Runs in Herdr panes, or in one Pi window with subagents.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"bin": {
|
package/view/index.html
CHANGED
|
@@ -63,6 +63,8 @@ button:hover{border-color:var(--accent)}
|
|
|
63
63
|
.card code{background:var(--bg);padding:5px 8px;display:block;border-radius:3px;margin-top:6px;color:var(--accent);word-break:break-all}
|
|
64
64
|
.card table{width:100%;border-collapse:collapse;font-family:var(--mono);font-size:11.5px}.card td{padding:3px 0;vertical-align:top}.card td:last-child{text-align:right}
|
|
65
65
|
.muted{color:var(--muted)}.faint{color:var(--faint)}.bad{color:var(--bad)}.ok{color:var(--landed)}.warn{color:var(--accent)}
|
|
66
|
+
.notes{margin:10px 16px 0;padding:8px 12px;border:1px solid var(--accent);border-radius:4px;color:var(--accent);font-size:13px;line-height:1.5}
|
|
67
|
+
.notes div+div{margin-top:4px}
|
|
66
68
|
.empty{padding:60px 20px;text-align:center;color:var(--muted);font-size:14px}
|
|
67
69
|
@media (max-width:820px){
|
|
68
70
|
.grid{grid-template-columns:1fr}.left{border-right:0}
|
|
@@ -78,6 +80,7 @@ button:hover{border-color:var(--accent)}
|
|
|
78
80
|
<span id="chips" style="display:flex;gap:8px;flex-wrap:wrap"></span>
|
|
79
81
|
<span class="live" id="live"><button id="alerts" title="Show a notification when a milestone needs you">alerts: off</button><span id="livetxt">connecting…</span></span>
|
|
80
82
|
</div>
|
|
83
|
+
<div id="notes"></div>
|
|
81
84
|
<div id="root"></div>
|
|
82
85
|
<script>
|
|
83
86
|
"use strict";
|
|
@@ -117,6 +120,8 @@ function replayed(vm, hist, upto) {
|
|
|
117
120
|
function render() {
|
|
118
121
|
const v = view();
|
|
119
122
|
if (!v) return;
|
|
123
|
+
$("notes").innerHTML = (v.notices || []).length
|
|
124
|
+
? `<div class="notes">${v.notices.map(n => `<div>${esc(n.text)}</div>`).join("")}</div>` : "";
|
|
120
125
|
if (v.empty) { $("root").innerHTML = `<div class="empty">${esc(v.text)}</div>`; $("t-title").textContent = v.repo; return; }
|
|
121
126
|
const c = v.counts;
|
|
122
127
|
document.title = (c.needs_you ? `(${c.needs_you}) ` : "") + `orch view · ${v.title}`;
|