herdr-orchestra 6.20.0 → 6.22.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 CHANGED
@@ -2,6 +2,15 @@
2
2
 
3
3
  All notable changes. Versions follow [semantic versioning](https://semver.org).
4
4
 
5
+ ## [6.22.0] - 2026-11-26
6
+
7
+ The board popup (`prefix+a`) now opens in the repo of the pane you were in. Before, it could answer "This folder is not a git repo with an orch run" even while a run was going.
8
+
9
+ Example: you are in the `rupee-flow` space with a run going and press `ctrl+b`, then `a`. The popup used to start in a folder that was not your repo. Now it starts in your pane's folder and shows the run.
10
+
11
+ ### Fixed
12
+ - **The popup started in the wrong folder.** Herdr starts a popup in the plugin's own folder unless it is told otherwise. orch looked for the pane's folder under field names Herdr does not use, found none, and told Herdr nothing. It now reads Herdr's real fields: the focused pane's folder, else the space's folder, else its worktree. It prefers the folder whose repo has an orch run (also from a coder's worktree pane), and always passes the folder to Herdr with `--cwd`.
13
+ - When the popup still is not in a repo, it now says which folder it is in.
5
14
  ## [6.20.0] - 2026-11-26
6
15
 
7
16
  The tests run in about 5 minutes instead of about 21. Nothing in orch changed, and no check was removed, skipped or made easier.
package/VERSION CHANGED
@@ -1 +1 @@
1
- 6.20.0
1
+ 6.22.0
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "herdr-orchestra",
3
- "version": "6.20.0",
3
+ "version": "6.22.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": {
@@ -3,6 +3,6 @@
3
3
  orch=$(command -v orch || echo "$HOME/.local/bin/orch")
4
4
  [ -x "$orch" ] || { echo "orch not found on PATH — install herdr-orchestra (npx herdr-orchestra@latest)"; sleep 5; exit 1; }
5
5
  if ! git rev-parse --show-toplevel >/dev/null 2>&1; then
6
- echo "This folder is not a git repo with an orch run. Open the board from a pane inside the repo."; sleep 5; exit 1
6
+ echo "This folder ($(pwd)) is not a git repo with an orch run. Open the board from a pane inside the repo."; sleep 5; exit 1
7
7
  fi
8
8
  exec "$orch" board
@@ -1,23 +1,29 @@
1
1
  #!/bin/sh
2
- # Opens the board popup in the folder of the pane you were in (that is where the run's repo is).
2
+ # Opens the board popup in the repo of the pane you were in. Herdr starts a popup in the plugin's own folder unless
3
+ # told otherwise, so the folder is passed with --cwd: the focused pane's folder, else the space's folder, else its worktree.
3
4
  dir=$(python3 - <<'PY' 2>/dev/null
4
- import json, os
5
- def find(o, keys):
6
- if isinstance(o, dict):
7
- for k in keys:
8
- if isinstance(o.get(k), str) and os.path.isdir(o[k]):
9
- return o[k]
10
- o = list(o.values())
11
- if isinstance(o, list):
12
- for v in o:
13
- r = find(v, keys)
14
- if r:
15
- return r
16
- return None
5
+ import json, os, subprocess
17
6
  try:
18
- print(find(json.loads(os.environ.get("HERDR_PLUGIN_CONTEXT_JSON") or "{}"), ("foreground_cwd", "cwd", "path")) or "")
7
+ ctx = json.loads(os.environ.get("HERDR_PLUGIN_CONTEXT_JSON") or "{}")
19
8
  except ValueError:
20
- print("")
9
+ ctx = {}
10
+ wt = ctx.get("worktree") if isinstance(ctx.get("worktree"), dict) else {}
11
+ cands = [c for c in (ctx.get("focused_pane_cwd"), ctx.get("workspace_cwd"), wt.get("path")) if isinstance(c, str) and os.path.isdir(c)]
12
+
13
+ def toplevel(d):
14
+ r = subprocess.run(["git", "-C", d, "rev-parse", "--show-toplevel"], capture_output=True, text=True)
15
+ return r.stdout.strip() if r.returncode == 0 else None
16
+
17
+ def has_run(d):
18
+ # a worktree's pane has its own top level; the run lives in the main repo (the git common dir's parent)
19
+ r = subprocess.run(["git", "-C", d, "rev-parse", "--git-common-dir"], capture_output=True, text=True)
20
+ if r.returncode != 0:
21
+ return False
22
+ common = os.path.normpath(os.path.join(d, r.stdout.strip()))
23
+ return os.path.isfile(os.path.join(os.path.dirname(common), ".orchestrate", "state.json"))
24
+
25
+ pick = next((c for c in cands if has_run(c)), None) or next((c for c in cands if toplevel(c)), None) or (cands[0] if cands else "")
26
+ print(pick)
21
27
  PY
22
28
  )
23
29
  herdr=${HERDR_BIN_PATH:-herdr}