herdr-orchestra 6.45.0 → 6.46.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 +16 -0
- package/README.md +1 -1
- package/VERSION +1 -1
- package/bin/__pycache__/orchcpython-314.pyc +0 -0
- package/bin/orch +233 -13
- package/package.json +1 -1
- package/playbooks/run.md +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,22 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes. Versions follow [semantic versioning](https://semver.org).
|
|
4
4
|
|
|
5
|
+
## [6.46.0] - 2026-11-30
|
|
6
|
+
|
|
7
|
+
The team's panes are readable. `orch team up` used to put every new pane in the lead's tab: the first one to the right of the lead, each next one split down from the one before. With two coders and a reviewer the lead got half the screen and the agents got thin strips, so text was cut off.
|
|
8
|
+
|
|
9
|
+
Example: a Codex lead with codex-1, codex-2 and a reviewer. Before, the lead's tab held all four panes. Now the lead keeps its whole tab, and a new herdr tab `team` holds codex-1 and codex-2 side by side on top and the reviewer full width below.
|
|
10
|
+
|
|
11
|
+
### Changed
|
|
12
|
+
- **`orch team up` opens the team in a herdr tab of its own, as a grid of equal panes.** The tab is called `team` (`backend team` in a workspace of several repos). Layout: 1 agent full size, 2 side by side, 3 as two on top and the reviewer below, 4 as 2×2. At most 4 go in a tab; more go to `team 2`. orch reads the screen size from `herdr pane layout` and keeps each pane at least 80 columns × 20 rows, so a small screen gets fewer panes per tab. The reviewer always comes last. Sizes are set with `--ratio`, so the panes are equal. The lead's tab is never split.
|
|
13
|
+
- `orch team up --here` splits next to the lead as before. A herdr that can't make tabs gets a `NOTE`, and the panes then open next to the lead.
|
|
14
|
+
- Settings: `ORCH_TEAM_MAX_PER_TAB` (default 4), `ORCH_PANE_MIN_COLS` (80), `ORCH_PANE_MIN_ROWS` (20).
|
|
15
|
+
|
|
16
|
+
### Added
|
|
17
|
+
- **`orch team tidy [--dry-run]`** moves the coder and reviewer panes that are already open (opened by hand, or next to the lead by an older orch) into the same `team` tab grid with `herdr pane move`. The agents keep running and keep their names, so wake-ups and prompts still reach them. It never moves the lead's pane or the pane it runs in.
|
|
18
|
+
|
|
19
|
+
Not yet tried on a real herdr: tested with the simulated herdr only. The herdr commands it uses (`tab create`, `pane split --ratio`, `pane layout`, `pane move`) were checked against herdr 0.9.5's source and docs.
|
|
20
|
+
|
|
5
21
|
## [6.45.0] - 2026-11-30
|
|
6
22
|
|
|
7
23
|
The board stopped showing the wrong run, the board popup key is set up by one command, and the board comes to the Herdr desktop app. A lead planned new work as `.orchestrate/sap-business-one-hana-plan.md` because `plan.md` still held the last, finished run. orch reads only `plan.md`, so the new plan was never loaded: the work got done, but orch never tracked it, and the board kept showing the old run. Separately, `orch view plugin link` linked the popup, but `prefix+a` did nothing: Herdr takes keys only from its own config, and nothing put the key there.
|
package/README.md
CHANGED
|
@@ -135,7 +135,7 @@ Version choice, first match wins: `--version` flag › `ORCH_VERSION` env › `.
|
|
|
135
135
|
|
|
136
136
|
`orch agents launch <kind> --model <id>` prints the command with the model (`--role reviewer` gives the reviewer's command: for Claude Code its edit tools are off, it only reads the change and writes its review file); `orch models` lists the models and their tiers. Use whatever your installed agents already reach.
|
|
137
137
|
|
|
138
|
-
**Only one tool installed, or just one window open?** Open only the lead and start the plan playbook. The lead sees it is alone and builds the team from its own tool: `orch team codex` picks coders and a reviewer of that tool on the models the catalog allows, spread over its tiers, and the lead writes them into the plan. When you say go, `orch team up` opens their panes
|
|
138
|
+
**Only one tool installed, or just one window open?** Open only the lead and start the plan playbook. The lead sees it is alone and builds the team from its own tool: `orch team codex` picks coders and a reviewer of that tool on the models the catalog allows, spread over its tiers, and the lead writes them into the plan. When you say go, `orch team up` opens their panes in a herdr tab of their own called `team`, as a grid of equal panes (2 side by side, 3 as two on top and the reviewer below, 4 as 2×2; a fifth goes to `team 2`, and a small screen gets fewer per tab), each in its own folder and on its model, and names them. The lead keeps its whole tab. `orch team tidy` moves panes that are already open (by hand, or next to the lead) into that grid; `orch team up --here` splits next to the lead as before. You never type either command yourself (you can: `orch team codex --coders 1`, `orch team up --dry-run`). Each pane is a separate session of the same tool, on your existing login.
|
|
139
139
|
|
|
140
140
|
```
|
|
141
141
|
you (1 Codex pane) ──► $orch-plan add a login page
|
package/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
6.
|
|
1
|
+
6.46.0
|
|
Binary file
|
package/bin/orch
CHANGED
|
@@ -8578,11 +8578,14 @@ def team_pick(cands, n):
|
|
|
8578
8578
|
|
|
8579
8579
|
def cmd_team(args):
|
|
8580
8580
|
"""orch team <kind> [--coders N] [--models a,b] [--no-reviewer] -> the plan's team built from one tool.
|
|
8581
|
-
orch team up [--dry-run] -> open a herdr pane for every agent in the plan that herdr cannot find.
|
|
8581
|
+
orch team up [--dry-run] [--here] -> open a herdr pane for every agent in the plan that herdr cannot find.
|
|
8582
|
+
orch team tidy [--dry-run] -> move the open coder/reviewer panes into the team tab grid."""
|
|
8582
8583
|
if args and args[0] == "up":
|
|
8583
8584
|
return team_up(args[1:])
|
|
8585
|
+
if args and args[0] == "tidy":
|
|
8586
|
+
return team_tidy(args[1:])
|
|
8584
8587
|
usage = ("usage: orch team <kind> [--coders N] [--models a,b] [--no-reviewer] [--prefix <name>] | "
|
|
8585
|
-
"orch team up [--dry-run]")
|
|
8588
|
+
"orch team up [--dry-run] [--here] | orch team tidy [--dry-run]")
|
|
8586
8589
|
rest, coders, models, reviewer, prefix = list(args), None, None, True, None
|
|
8587
8590
|
if "--prefix" in rest:
|
|
8588
8591
|
i = rest.index("--prefix")
|
|
@@ -8672,14 +8675,207 @@ def _herdr_json(cmd):
|
|
|
8672
8675
|
return r.returncode == 0, data, out
|
|
8673
8676
|
|
|
8674
8677
|
|
|
8678
|
+
TEAM_MAX_PER_TAB = max(1, int(os.environ.get("ORCH_TEAM_MAX_PER_TAB", "4")))
|
|
8679
|
+
PANE_MIN_COLS = max(20, int(os.environ.get("ORCH_PANE_MIN_COLS", "80"))) # an agent's screen stays readable at this size
|
|
8680
|
+
PANE_MIN_ROWS = max(8, int(os.environ.get("ORCH_PANE_MIN_ROWS", "20")))
|
|
8681
|
+
|
|
8682
|
+
|
|
8683
|
+
def herdr_screen(pane=None):
|
|
8684
|
+
"""(workspace id, width, height) of the tab `pane` sits in (default: the pane this runs in), in terminal cells,
|
|
8685
|
+
from `herdr pane layout`. Nones for what herdr can't tell."""
|
|
8686
|
+
cmd = [HERDR, "pane", "layout"] + (["--pane", pane] if pane else
|
|
8687
|
+
["--current"] if os.environ.get("HERDR_PANE_ID") else [])
|
|
8688
|
+
ok, data, _ = _herdr_json(cmd)
|
|
8689
|
+
lay = _dicts_with(data, "tab_id") if ok and data is not None else []
|
|
8690
|
+
lay = next((d for d, _ in lay if isinstance(d.get("area"), dict)), None)
|
|
8691
|
+
ws = os.environ.get("HERDR_WORKSPACE_ID") or (lay or {}).get("workspace_id")
|
|
8692
|
+
area = (lay or {}).get("area") or {}
|
|
8693
|
+
w, h = area.get("width"), area.get("height")
|
|
8694
|
+
return ws, (w if isinstance(w, int) and w > 0 else None), (h if isinstance(h, int) and h > 0 else None)
|
|
8695
|
+
|
|
8696
|
+
|
|
8697
|
+
def team_grid(n, width, height):
|
|
8698
|
+
"""How many panes go in one team tab, and the rows for n of them: [panes in row 1, row 2, ...]. Every pane gets
|
|
8699
|
+
at least PANE_MIN_COLS x PANE_MIN_ROWS of a screen this size (2 across when the size is unknown), at most
|
|
8700
|
+
TEAM_MAX_PER_TAB per tab, rows as even as they can be (3 -> [2, 1], 4 -> [2, 2])."""
|
|
8701
|
+
cols = max(1, width // PANE_MIN_COLS) if width else 2
|
|
8702
|
+
rows = max(1, height // PANE_MIN_ROWS) if height else 2
|
|
8703
|
+
cap = max(1, min(TEAM_MAX_PER_TAB, cols * rows))
|
|
8704
|
+
n = min(n, cap)
|
|
8705
|
+
r = max(1, -(-n // min(cols, n))) if n else 0
|
|
8706
|
+
return cap, [n // r + (1 if i < n % r else 0) for i in range(r)]
|
|
8707
|
+
|
|
8708
|
+
|
|
8709
|
+
def build_grid(rows, first, split):
|
|
8710
|
+
"""Make a grid of equal panes, row by row: first() -> the top-left pane id; split(pane, direction, ratio, slot)
|
|
8711
|
+
-> the pane id for grid slot `slot` (row-major), cut from `pane`. Returns the pane id of every slot, None where
|
|
8712
|
+
herdr refused. herdr's ratio is the share the pane being split keeps, so 1/k for k panes left gives equal sizes."""
|
|
8713
|
+
out = [None] * sum(rows)
|
|
8714
|
+
top = first()
|
|
8715
|
+
if not top:
|
|
8716
|
+
return out
|
|
8717
|
+
starts = [sum(rows[:i]) for i in range(len(rows))]
|
|
8718
|
+
heads, cur = [top], top
|
|
8719
|
+
for i in range(1, len(rows)):
|
|
8720
|
+
cur = split(cur, "down", 1 / (len(rows) - i + 1), starts[i]) if cur else None
|
|
8721
|
+
heads.append(cur)
|
|
8722
|
+
for head, k, s in zip(heads, rows, starts):
|
|
8723
|
+
cur = out[s] = head
|
|
8724
|
+
for j in range(1, k):
|
|
8725
|
+
cur = out[s + j] = split(cur, "right", 1 / (k - j + 1), s + j) if cur else None
|
|
8726
|
+
return out
|
|
8727
|
+
|
|
8728
|
+
|
|
8729
|
+
def team_tab_label(i, st=None):
|
|
8730
|
+
""""team", "team 2", ...; in a workspace of several repos each repo's team gets its own: "backend team"."""
|
|
8731
|
+
base = f"{ROOT.name} team" if (st or {}).get("workspace") and ROOT else "team"
|
|
8732
|
+
return base if i == 0 else f"{base} {i + 1}"
|
|
8733
|
+
|
|
8734
|
+
|
|
8735
|
+
def _new_pane_id(ok, data, out, key="pane"):
|
|
8736
|
+
"""The pane id in a herdr answer: .result.<key>.pane_id (pane split: pane, tab create: root_pane), loosely."""
|
|
8737
|
+
if not ok:
|
|
8738
|
+
return None
|
|
8739
|
+
res = (data or {}).get("result") if isinstance(data, dict) else None
|
|
8740
|
+
pid = _find_key((res or {}).get(key), "pane_id") if isinstance(res, dict) else None
|
|
8741
|
+
return pid or (re.search(r'"pane_id"\s*:\s*"([\w:.-]+)"', out or "") or [None, None])[1]
|
|
8742
|
+
|
|
8743
|
+
|
|
8744
|
+
def team_tab_panes(new, dry=False, lead_pane=None, st=None):
|
|
8745
|
+
"""Open one pane per (name, folder) in `new`, in new herdr tabs ("team", "team 2", ...) laid out by team_grid.
|
|
8746
|
+
Returns ({name: pane id, None when herdr refused; dry: the command it would run}, {name: why it failed},
|
|
8747
|
+
[tab labels]). When herdr can't make the first tab (an older herdr), returns ({}, {}, []) after a NOTE, and
|
|
8748
|
+
team up opens the panes next to this one as before."""
|
|
8749
|
+
ws, w, h = herdr_screen(lead_pane)
|
|
8750
|
+
cap, _ = team_grid(len(new), w, h)
|
|
8751
|
+
placed, errs, labels = {}, {}, []
|
|
8752
|
+
q = lambda c: " ".join(shlex.quote(str(x)) for x in c)
|
|
8753
|
+
for c, i in enumerate(range(0, len(new), cap)):
|
|
8754
|
+
chunk, label = new[i:i + cap], team_tab_label(c, st)
|
|
8755
|
+
_, rows = team_grid(len(chunk), w, h)
|
|
8756
|
+
tab_cmd = [HERDR, "tab", "create"] + (["--workspace", ws] if ws else []) + \
|
|
8757
|
+
["--cwd", chunk[0][1], "--label", label, "--no-focus"]
|
|
8758
|
+
|
|
8759
|
+
def first():
|
|
8760
|
+
if dry:
|
|
8761
|
+
placed[chunk[0][0]] = f"new tab: {q(tab_cmd)}"
|
|
8762
|
+
return f"<{chunk[0][0]}>"
|
|
8763
|
+
ok, data, out = _herdr_json(tab_cmd)
|
|
8764
|
+
pid = _new_pane_id(ok, data, out, "root_pane")
|
|
8765
|
+
if not pid:
|
|
8766
|
+
errs[chunk[0][0]] = out.splitlines()[-1] if out else "no output"
|
|
8767
|
+
return pid
|
|
8768
|
+
|
|
8769
|
+
def split(cur, direction, ratio, slot):
|
|
8770
|
+
name, d = chunk[slot]
|
|
8771
|
+
cmd = [HERDR, "pane", "split", cur, "--direction", direction, "--ratio", f"{ratio:.3f}",
|
|
8772
|
+
"--cwd", d, "--no-focus"]
|
|
8773
|
+
if dry:
|
|
8774
|
+
placed[name] = q(cmd)
|
|
8775
|
+
return f"<{name}>"
|
|
8776
|
+
ok, data, out = _herdr_json(cmd)
|
|
8777
|
+
pid = _new_pane_id(ok, data, out)
|
|
8778
|
+
if not pid:
|
|
8779
|
+
errs[name] = out.splitlines()[-1] if out else "no output"
|
|
8780
|
+
return pid
|
|
8781
|
+
|
|
8782
|
+
pids = build_grid(rows, first, split)
|
|
8783
|
+
if c == 0 and not pids[0] and not dry:
|
|
8784
|
+
print(f"NOTE herdr could not open a tab for the team ({errs.get(chunk[0][0])}), so the panes open "
|
|
8785
|
+
f"next to this one")
|
|
8786
|
+
return {}, {}, []
|
|
8787
|
+
if not dry:
|
|
8788
|
+
placed.update({n: p for (n, _), p in zip(chunk, pids)})
|
|
8789
|
+
for (n, _), p in zip(chunk, pids):
|
|
8790
|
+
if not p and n not in errs:
|
|
8791
|
+
errs[n] = "the pane it splits from was not opened"
|
|
8792
|
+
labels.append(label)
|
|
8793
|
+
return placed, errs, labels
|
|
8794
|
+
|
|
8795
|
+
|
|
8796
|
+
def team_tidy(args):
|
|
8797
|
+
"""Move the coders' and the reviewer's panes that are open now (opened by hand, or by an older orch next to the
|
|
8798
|
+
lead) into team tabs, as a grid of equal panes, the same layout `orch team up` opens. The agents keep running
|
|
8799
|
+
and keep their names. Never moves the lead's pane or the pane this runs in."""
|
|
8800
|
+
usage = "usage: orch team tidy [--dry-run]"
|
|
8801
|
+
if any(a != "--dry-run" for a in args):
|
|
8802
|
+
die(usage)
|
|
8803
|
+
dry = "--dry-run" in args
|
|
8804
|
+
st = load()
|
|
8805
|
+
if run_mode(st) == "subagent":
|
|
8806
|
+
print("mode subagent: no panes to arrange; the coder and the reviewer are Pi subagents")
|
|
8807
|
+
return
|
|
8808
|
+
names = [(n, w) for n, w in st["workers"].items()]
|
|
8809
|
+
if st.get("reviewer"):
|
|
8810
|
+
names.append((st["reviewer"], st.get("reviewer_info") or {}))
|
|
8811
|
+
lead = (st.get("lead") or {}).get("name")
|
|
8812
|
+
lead_pane = (st.get("lead") or {}).get("pane") or (agent_pane(lead) if lead else None)
|
|
8813
|
+
keep = {lead_pane, os.environ.get("HERDR_PANE_ID")} - {None}
|
|
8814
|
+
panes = []
|
|
8815
|
+
for n, w in names:
|
|
8816
|
+
p = w.get("pane") or agent_pane(n)
|
|
8817
|
+
if not p:
|
|
8818
|
+
print(f"skip {n}: herdr can't find it (`orch team up` opens it)")
|
|
8819
|
+
elif p in keep:
|
|
8820
|
+
print(f"skip {n}: pane {p} is the lead's (or this) pane, it stays where it is")
|
|
8821
|
+
else:
|
|
8822
|
+
panes.append((n, p))
|
|
8823
|
+
if not panes:
|
|
8824
|
+
print("TEAM TIDY: no coder or reviewer pane to arrange")
|
|
8825
|
+
return
|
|
8826
|
+
ws, w, h = herdr_screen(lead_pane)
|
|
8827
|
+
cap, _ = team_grid(len(panes), w, h)
|
|
8828
|
+
q = lambda c: " ".join(shlex.quote(str(x)) for x in c)
|
|
8829
|
+
failed, labels = 0, []
|
|
8830
|
+
for c, i in enumerate(range(0, len(panes), cap)):
|
|
8831
|
+
chunk, label, tab = panes[i:i + cap], team_tab_label(c, st), [None]
|
|
8832
|
+
_, rows = team_grid(len(chunk), w, h)
|
|
8833
|
+
|
|
8834
|
+
def move(cmd, name, old):
|
|
8835
|
+
if dry:
|
|
8836
|
+
print(f"WOULD {name}: {q(cmd)}")
|
|
8837
|
+
return f"<{name}>"
|
|
8838
|
+
ok, data, out = _herdr_json(cmd)
|
|
8839
|
+
res = ((data or {}).get("result") or {}).get("move_result") if ok and isinstance(data, dict) else None
|
|
8840
|
+
pid = _find_key((res or {}).get("pane"), "pane_id") if isinstance(res, dict) else None
|
|
8841
|
+
tab[0] = tab[0] or (_find_key((res or {}).get("pane"), "tab_id") if isinstance(res, dict) else None)
|
|
8842
|
+
if not pid:
|
|
8843
|
+
print(f"FAILED {name}: herdr could not move pane {old} ({out.splitlines()[-1] if out else 'no output'})")
|
|
8844
|
+
return None
|
|
8845
|
+
print(f"MOVED {name}: pane {old} -> tab \"{label}\"" + (f" (now {pid})" if pid != old else ""))
|
|
8846
|
+
return pid
|
|
8847
|
+
|
|
8848
|
+
def first():
|
|
8849
|
+
n, p = chunk[0]
|
|
8850
|
+
return move([HERDR, "pane", "move", p, "--new-tab"] + (["--workspace", ws] if ws else []) +
|
|
8851
|
+
["--label", label, "--no-focus"], n, p)
|
|
8852
|
+
|
|
8853
|
+
def split(cur, direction, ratio, slot):
|
|
8854
|
+
n, p = chunk[slot]
|
|
8855
|
+
if not dry and not tab[0]:
|
|
8856
|
+
print(f"FAILED {n}: herdr did not say which tab \"{label}\" is, so pane {p} stays where it is")
|
|
8857
|
+
return None
|
|
8858
|
+
return move([HERDR, "pane", "move", p, "--tab", tab[0] or f"<tab {label}>", "--split", direction,
|
|
8859
|
+
"--target-pane", cur, "--ratio", f"{ratio:.3f}", "--no-focus"], n, p)
|
|
8860
|
+
|
|
8861
|
+
failed += sum(1 for x in build_grid(rows, first, split) if not x)
|
|
8862
|
+
labels.append(label)
|
|
8863
|
+
if dry:
|
|
8864
|
+
return
|
|
8865
|
+
print(f"TEAM TIDY: {'done' if not failed else f'{failed} pane(s) not moved — see above'}; the team is in the "
|
|
8866
|
+
f"herdr tab{'s' if len(labels) > 1 else ''} " + ", ".join(f'"{t}"' for t in labels))
|
|
8867
|
+
if failed:
|
|
8868
|
+
sys.exit(3)
|
|
8869
|
+
|
|
8870
|
+
|
|
8675
8871
|
def team_up(args):
|
|
8676
8872
|
"""Open a pane for every worker and the reviewer in the plan that herdr can't find: split from this pane, cd
|
|
8677
8873
|
into the agent's folder (its worktree, or the repo), start it on its plan model, and give it its plan name."""
|
|
8678
8874
|
args = list(args)
|
|
8679
|
-
flag = mode_flag(args, "usage: orch team up [--dry-run] [--mode panes|subagent]")
|
|
8875
|
+
flag = mode_flag(args, "usage: orch team up [--dry-run] [--here] [--mode panes|subagent]")
|
|
8680
8876
|
dry = "--dry-run" in args
|
|
8681
8877
|
if flag and not dry:
|
|
8682
|
-
set_mode(flag, hint=False, agent=mode_target(flag, "usage: orch team up [--dry-run] [--mode panes|subagent]"))
|
|
8878
|
+
set_mode(flag, hint=False, agent=mode_target(flag, "usage: orch team up [--dry-run] [--here] [--mode panes|subagent]"))
|
|
8683
8879
|
st = load()
|
|
8684
8880
|
if (flag or run_mode(st)) == "subagent":
|
|
8685
8881
|
print("mode subagent: no panes to open; the coder and the reviewer are Pi subagents")
|
|
@@ -8713,22 +8909,38 @@ def team_up(args):
|
|
|
8713
8909
|
print("TEAM UP: every agent in the plan is running")
|
|
8714
8910
|
return
|
|
8715
8911
|
failed, last, opened = 0, None, []
|
|
8912
|
+
runnable = []
|
|
8716
8913
|
for name, w, d in todo:
|
|
8717
|
-
|
|
8718
|
-
v = reg.get(kind)
|
|
8914
|
+
v = reg.get(w.get("kind"))
|
|
8719
8915
|
if not v:
|
|
8720
|
-
print(f"SKIP {name}: kind {kind!r} is not in the agent registry — start it yourself in {d}")
|
|
8916
|
+
print(f"SKIP {name}: kind {w.get('kind')!r} is not in the agent registry — start it yourself in {d}")
|
|
8721
8917
|
failed += 1
|
|
8722
8918
|
continue
|
|
8919
|
+
runnable.append((name, w, d, v))
|
|
8920
|
+
# new panes go in a herdr tab of their own ("team"), as a grid of equal panes, so the lead keeps its whole
|
|
8921
|
+
# screen and every agent stays readable; --here (or a herdr that can't make tabs) splits next to this pane
|
|
8922
|
+
new = [(n, d) for n, w, d, v in runnable if not empty.get(n)]
|
|
8923
|
+
placed, errs, tabs = {}, {}, []
|
|
8924
|
+
if new and "--here" not in args:
|
|
8925
|
+
placed, errs, tabs = team_tab_panes(new, dry, lead_pane, st)
|
|
8926
|
+
for name, w, d, v in runnable:
|
|
8927
|
+
kind, model = w.get("kind"), w.get("model")
|
|
8723
8928
|
cmd = launch_cmd(kind, v, model, strict=False, role="reviewer" if name == st.get("reviewer") else None, cwd=d)
|
|
8724
8929
|
split = [HERDR, "pane", "split"] + ([last] if last else []) + \
|
|
8725
8930
|
["--direction", "down" if last else "right", "--cwd", d, "--no-focus"]
|
|
8726
8931
|
if dry:
|
|
8727
|
-
|
|
8932
|
+
how = placed.get(name) or " ".join(shlex.quote(x) for x in split)
|
|
8933
|
+
print(f"WOULD {name}: {how} then herdr pane run <new pane> "
|
|
8728
8934
|
f"{shlex.quote(cmd)} then herdr agent rename <new pane> {name}")
|
|
8729
8935
|
continue
|
|
8730
8936
|
pid = empty.get(name)
|
|
8731
|
-
if not pid:
|
|
8937
|
+
if not pid and name in placed:
|
|
8938
|
+
pid = placed[name]
|
|
8939
|
+
if not pid:
|
|
8940
|
+
print(f"FAILED {name}: herdr could not open its pane in the team tab ({errs.get(name) or 'no output'})")
|
|
8941
|
+
failed += 1
|
|
8942
|
+
continue
|
|
8943
|
+
elif not pid:
|
|
8732
8944
|
ok, data, out = _herdr_json(split)
|
|
8733
8945
|
try:
|
|
8734
8946
|
pid = data["result"]["pane"]["pane_id"] if ok else None
|
|
@@ -8782,6 +8994,10 @@ def team_up(args):
|
|
|
8782
8994
|
+ (f" (its last screen is in {short(saved)})" if saved else "") + ", then `orch team up` again")
|
|
8783
8995
|
log_line(f"{run_tag(st)} QUIT {name}: {w.get('kind')} exited right after `orch team up` started it "
|
|
8784
8996
|
f"in pane {pid}")
|
|
8997
|
+
if tabs and not dry:
|
|
8998
|
+
print(f"TAB the team is in the herdr tab{'s' if len(tabs) > 1 else ''} " + ", ".join(f'"{t}"' for t in tabs)
|
|
8999
|
+
+ ", so the lead keeps its whole screen — switch tabs to watch them (`orch team tidy` moves panes "
|
|
9000
|
+
"opened by hand there too)")
|
|
8785
9001
|
print("TEAM UP: done — run `orch start` again; every agent should show herdr=found" if not failed else
|
|
8786
9002
|
f"TEAM UP: {failed} agent(s) not ready — see above, then `orch team up` again")
|
|
8787
9003
|
if failed:
|
|
@@ -10636,9 +10852,13 @@ USAGE = """usage: orch <command> [args]
|
|
|
10636
10852
|
team <kind> [--coders N] [--models a,b] [--no-reviewer] [--prefix <name>]
|
|
10637
10853
|
the plan's team built from one installed tool: coders + reviewer on its catalog models
|
|
10638
10854
|
(named after the repo, e.g. app-codex-1, while another run is going on this machine)
|
|
10639
|
-
team up [--dry-run] [--mode panes|subagent]
|
|
10640
|
-
open a herdr pane for every agent in the plan herdr can't find, in its folder, and name it
|
|
10641
|
-
(
|
|
10855
|
+
team up [--dry-run] [--here] [--mode panes|subagent]
|
|
10856
|
+
open a herdr pane for every agent in the plan herdr can't find, in its folder, and name it,
|
|
10857
|
+
in a herdr tab of their own ("team") as a grid of equal panes (at most 4 a tab, fewer on a
|
|
10858
|
+
small screen; more go to "team 2"), so the lead keeps its whole screen. --here: split
|
|
10859
|
+
next to this pane instead (subagent mode: no panes; sets up the Pi subagents instead)
|
|
10860
|
+
team tidy [--dry-run] move the coder and reviewer panes already open (by hand, or next to the lead) into that
|
|
10861
|
+
team tab grid; they keep running and keep their names. Never moves the lead's pane
|
|
10642
10862
|
mode [panes|subagent] [--agent <kind>] this agent's mode, or save one: panes (herdr panes, the default for
|
|
10643
10863
|
every agent) or subagent (one Pi window; Pi only). Saved per agent in
|
|
10644
10864
|
~/.config/herdr-orchestra/config.json ("modes": {"pi": "subagent"}); ORCH_MODE=panes|subagent
|
|
@@ -12974,7 +13194,7 @@ if __name__ == "__main__":
|
|
|
12974
13194
|
"team": cmd_team, "update": cmd_update, "config": cmd_config, "mode": cmd_mode,
|
|
12975
13195
|
"setup": cmd_setup, "guard": cmd_guard}
|
|
12976
13196
|
if (len(sys.argv) >= 2 and sys.argv[1] in NO_REPO_COMMANDS # work outside a git repo
|
|
12977
|
-
and sys.argv[2:3]
|
|
13197
|
+
and sys.argv[2:3] not in (["up"], ["tidy"], ["--crash"])): # (`orch team up|tidy` read the run's state)
|
|
12978
13198
|
try:
|
|
12979
13199
|
NO_REPO_COMMANDS[sys.argv[1]](sys.argv[2:])
|
|
12980
13200
|
sys.stdout.flush()
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "herdr-orchestra",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.46.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/playbooks/run.md
CHANGED
|
@@ -28,7 +28,7 @@ A run behaves like a call stack. You **dispatch** work and **pause**. The **even
|
|
|
28
28
|
|
|
29
29
|
## 1. Start the run (the developer said go)
|
|
30
30
|
1. Run `orch sync`. Stop on ERROR; report every WARN.
|
|
31
|
-
2. Run `orch start`. It checks that herdr can wake you: it names your pane `lead` if it is not named yet (`NAMED`), or refuses with `NO LEAD` and the exact `herdr agent rename <pane> lead` command; give that to the developer and stop. `orch dispatch` makes the same check. If a worker or the reviewer shows `herdr=NOT FOUND`, run `orch team up`: it opens a pane for each missing agent
|
|
31
|
+
2. Run `orch start`. It checks that herdr can wake you: it names your pane `lead` if it is not named yet (`NAMED`), or refuses with `NO LEAD` and the exact `herdr agent rename <pane> lead` command; give that to the developer and stop. `orch dispatch` makes the same check. If a worker or the reviewer shows `herdr=NOT FOUND`, run `orch team up`: it opens a pane for each missing agent in a herdr tab called `team` (your tab stays whole), in its folder (its worktree, or the repo), starts it on its plan model and gives it its plan name. Then run `orch start` again. If team up reports `WAITING` (the new pane shows a first-run question such as "trust this folder" or a sign-in) or `FAILED`, or a worker shows `STALE pane`, tell the developer exactly what to do in which pane (`orch agents launch <kind> --model <id>` gives the start command), and stop. `WARN agent <kind>: …` means a launch flag in the registry is out of date for the installed tool; show it (`orch doctor <kind>` has the detail). Workers shown as `detect:off` are fine.
|
|
32
32
|
3. Dispatch every milestone whose dependencies are met: `orch dispatch M1 M2`. It prints who can take each one, and starts the event manager if none is running. If it says it could not start it, ask the developer to run `orch autopilot` in a terminal.
|
|
33
33
|
- `--to <worker>` gives a milestone to one coder; `--tier high` asks for a stronger model than the plan says. Use them only with a reason, and tell the developer.
|
|
34
34
|
4. Tell the developer in two lines what is running where (milestone → coder and model). **STOP.**
|