Repository navigation
feat(bin): orchestrator dashboard layout with swappable worker watch panes and reference picker - #114
Closed
MerpGoaterman wants to merge 6 commits into
Closed
MerpGoaterman wants to merge 6 commits into
MerpGoaterman wants to merge 6 commits into
Conversation
…panes Add fm-layout.sh to arrange the firstmate window into a left command column (orchestrator chat top 2/3, terse active-worker summary bottom 1/3) and a right 2/3 column of three stacked worker watch slots. Watch slots are read-only capture-pane mirrors of live worker windows, so workers keep running untouched; the orchestrator pane stays focused and is never replaced or obscured. Workers are discovered from state/*.meta (live windows only; secondmates and stale metas excluded) with a terse repo + feature label. Slots autofill from the first active workers and any worker can be swapped into any slot via a reliable keyboard picker popup (fm-layout-pick.sh); right-click reassignment is offered as an opt-in, documented best-effort path given tmux's server-global key tables. arrange is safe to re-run: it rebuilds only its own viewer panes, never kills a worker or unrecognized pane, refuses worker windows and windows with unexpected panes, and never spawns work to fill a slot. Keybindings are opt-in and runtime-only (never ~/.tmux.conf). Covered by tests/fm-layout.test.sh (real tmux on a private socket): discovery, label truncation, assign/clear/reject, geometry, idempotent re-run, refusals, and rendered summary/mirror content.
… document tmux 3.1 requirement
Add a #-style worker picker to the dashboard. `fm-layout.sh bind` wires `prefix #` to a tmux display-menu of live workers (keyboard 1-9/arrows and mouse-clickable, like an @// picker); choosing one types that worker's reference straight into the composer pane via send-keys, so the captain stops hand-copying terminal targets. A bare # typed in a composer cannot be intercepted reliably - agent TUIs expose no custom-trigger hook, cmux's shortcuts only rebind its own actions (and its control socket is password-gated), and trapping literal # at the tmux root table would hijack every # keystroke. So this uses a prefix chord, documented with the full feasibility rationale. New subcommands: `ref` (open the picker, -p pane / -c client / --print) and `insert-ref -p <pane> -w <window>` (validate the worker is live, then type its reference). FM_LAYOUT_REF_FORMAT selects target|window|select; the same reference shows in each watch pane header. cmux's `cmux send` is documented as an optional delivery path. Covered by tests/fm-layout.test.sh (ref formats, ref --print listing/exclusion, insert-ref typing into a pane, dead-worker rejection). Based on the PR kunchenguid#110 dashboard branch; ships as its own PR.
…ref to window form
… agreement note for window default
Owner
|
Thanks for the PR. Wheelhouse found that this branch currently has a merge conflict with the base branch, so it is stepping out of the maintainer queue for now. Please rebase on or merge the base branch into your branch, resolve the conflict, and push the result. Once GitHub reports the PR as mergeable again, Wheelhouse will resurface it for maintainer review. Conflict noted for firstmate#114 at |
This was referenced Aug 11, 2026
Schedule and removal
|
Closed
fritznoff
pushed a commit
to fritznoff/starship
that referenced
this pull request
Nov 2, 2026
…unchenguid#114) * feat(bin): account pinning groundwork with the Claude vendor wired Add bin/fm-account-lib.sh, the owner of named vendor accounts backed by isolated homes derived as data/accounts/<vendor>/<name>, and wire the Claude vendor into bin/fm-primary.sh behind one new optional flag, --account <name>. An absent config/accounts.json stays a complete no-op: no pin, ambient home, unchanged argv. Every extra argument other than --account still refuses with the original message. A pinned home that is missing or explicitly logged out refuses the launch and names the exact login command; no credential is ever copied, linked, or seeded between homes. Checkpoint commit: the Codex vendor, spawn support, tests, and docs follow. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01PF2Ky9rzPsrL5oVaZWejmq * feat(bin): pin named vendor accounts for Claude and Codex launches Add --account to bin/fm-primary.sh and bin/fm-spawn.sh, backed by bin/fm-account-lib.sh and the local, gitignored config/accounts.json registry. A claude launch pins CLAUDE_CONFIG_DIR and a codex launch pins CODEX_HOME, both at a home derived as data/accounts/<vendor>/<name> rather than any path the registry could name. A spawn records the resolved name as account= in meta. An absent registry stays a complete no-op, proven by test for every primary profile and for the spawn launch line and meta. An unreadable registry warns and still launches on the ambient account, and refuses only an explicit pin. Safety comes from refusing rather than guessing. An unknown account, a vendorless profile or harness, and every other extra primary argument refuse. A pinned home that is missing or explicitly logged out refuses and names the exact login command; no credential is ever copied, linked, or seeded between homes. An account may declare an expect identity, which is verified against the home before exec so a pinned session cannot silently run on another seat; codex exposes no identity, so expect is refused there instead of being matched against something invented. Add bin/fm-account.sh to create an empty account home and print its login command, and ACCOUNTS: bootstrap validation of the registry. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01PF2Ky9rzPsrL5oVaZWejmq * feat(bin): verify the pinned account identity and cover Codex, spawn, and docs Complete account pinning: the Codex vendor in bin/fm-primary.sh, --account in bin/fm-spawn.sh with account= in task meta, ACCOUNTS: registry validation in bootstrap, bin/fm-account.sh for creating a home and printing its login command, and the documentation owners. The new safety property is identity verification. An account may declare an expect value, and a pinned home is confirmed to resolve to that identity before exec, refusing with both the wanted and the actual identity when it does not. That closes a real hole: on macOS a Claude config directory can be exported while the session still authenticates as some other seat. expect is matched against any identity field the vendor reports, because two Claude seats can share one email and only the org id separates them. It is refused for codex, which reports no identity at all, rather than matched against something invented. Verified 2026-09-09 and documented rather than worked around: claude 2.1.258 reads its macOS keychain credential only when CLAUDE_CONFIG_DIR is unset, so a Claude pin works only once that home holds its own credentials, and whether two Claude seats can be authenticated at once is unproven. Codex isolates properly because auth.json lives inside CODEX_HOME. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01PF2Ky9rzPsrL5oVaZWejmq * docs(bin): correct the Claude seat isolation record with login evidence A real second login disproves the earlier reading. Claude Code namespaces its macOS keychain item per config directory: logging the Team seat in under CLAUDE_CONFIG_DIR added a Claude Code-credentials-<hash> item beside the original and left the ambient seat untouched, and both seats now report logged in at once with neither home holding a .credentials.json. Replace the claim that a Claude pin cannot authenticate without its own credentials file, and the unproven-coexistence hedge, with what the login actually showed, in the launcher header, docs/configuration.md, the harness-adapters skill, and the library rationale. Two related corrections fall out of the same evidence. claude auth status exits 0 when logged in and 1 when logged out rather than always 1, so the test fakes now mirror that and the code's reason for reading the loggedIn field is stated correctly. Quota monitoring does reach a pinned Claude seat: it finds that home's namespaced keychain item and needs one keychain approval per item, rather than being unreadable without a credentials file. The identity verification is unchanged and is now the load-bearing part: the two seats share one email and differ only by organization and plan, so expect must match the organization. Drop the captain's real organization id from the tracked example in favour of a placeholder. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01PF2Ky9rzPsrL5oVaZWejmq * docs(bin): record per-seat quota and connector behaviour from live validation Two workers were run at once on 2026-09-09, one pinned to the Team seat through --account and one on the ambient Max seat, both on subscription auth with no API key present. They reported different organizations and plans, different connector inventories (38 tools against 4), and only the Team worker could call the organization's Asana connector, which returned its workspace. Record the two consequences that belong in the current-behaviour owners: each seat reports its own quota pools once its one-time keychain approval is granted, and hosted connectors follow the seat, so pinning selects the seat that has a connector and can never move one between seats. Full evidence, commands, and cleanup are in the task's private report. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01PF2Ky9rzPsrL5oVaZWejmq * feat(bin): cover the astra profile with Codex account pinning The astra primary profile landed on main while this branch was in flight. It is Codex-backed, so it takes a codex account exactly as the codex profile does. Record that in the launcher header and assert it: astra with --account exports the derived CODEX_HOME and keeps its own pinned model. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01PF2Ky9rzPsrL5oVaZWejmq * no-mistakes(review): share the account gate, fix name rule, dry-run order, respawn pin * no-mistakes(review): narrow dry-run claim to accounts, cover unsafe vendor default * no-mistakes(document): document named vendor accounts in porting, onboarding, toolbelt * no-mistakes: apply CI fixes * no-mistakes(rebase): keep the status-bar FM_ACCOUNT_NAME contract intact Rebasing onto the status-row work (kunchenguid#113) surfaced a name collision the textual conflicts could not show. That branch made FM_ACCOUNT_NAME an INBOUND variable: fm-status-bar.sh reads it as the account owner's role label, and fm-primary.sh forwards it onto its companion pane. This branch's fm-account-lib.sh had claimed the same name as an OUTBOUND global for the pinned account, and cleared it at source time, so sourcing the library wiped the label before it could be rendered. Rename the library's two output globals to FM_ACCOUNT_PIN_NAME and FM_ACCOUNT_PIN_HOME. A pin selects a home; it does not rename the seat's owner, so the two concepts keep separate names and the status row keeps rendering the label its own tests assert. Also repoint the vendor-account-pinning capability's pre-merge commits entry at the rebased first commit, so fm-fork-surface.sh check still resolves it. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> --------- Co-authored-by: Claude Opus 5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Intent
The developer (the orchestrator/captain) asked for a durable worker-reference shortcut for their Firstmate terminal dashboard, framed as a follow-up to already-completed orchestrator dashboard work. The desired UX was that typing # would open a picker of the current worker list, similar to @ or / pickers in agent composers, so the captain could write messages that reference and route to a selected worker without manually copying terminal targets. They asked the agent to first investigate feasibility across cmux/OpenCode/Codex/Claude terminal contexts, and if direct interception of # in agent composers was not possible, to implement the closest practical workflow: a command/shortcut/picker that lists current workers by short, human-readable names and inserts or sends the selected worker reference, with documentation. They explicitly required keeping worker names short and readable, doing the work cleanly on a separate branch/PR rather than mixing unsafe state into the finished dashboard PR, and reporting feasibility, implementation, and validation clearly. Across the broader session the developer also wanted off-screen workers made visible, and directed clearing the blocking PR and updating no-mistakes to v1.31.2 so validation could proceed.
What Changed
bin/fm-layout.sh,bin/fm-layout-lib.sh, andbin/fm-watch-pane.shto build a tmux orchestrator dashboard whose side panes watch live workers and can be swapped between them, surfacing off-screen workers without leaving the composer.bin/fm-layout-pick.shlists current workers by short, human-readable names andfm-layout.shinserts the selected reference (or sends it) into the composer pane, bound to aprefix-key chord; the reference format defaults to the shortfm-<id>window form and is configurable viaFM_LAYOUT_REF_FORMAT.tests/fm-layout.test.shplus documentation indocs/orchestrator-layout.md,docs/configuration.md,docs/scripts.md, and the README.Risk Assessment
✅ Low: Well-bounded, additive tmux-layout tooling with no behavior changes to existing supervision code; both prior-round errors are verifiably fixed, the new worker-reference path is read-only toward workers and well-tested, and helpers are bash-3.2 safe.
Testing
Ran the full
tests/fm-layout.test.shsuite against a real tmux (8/8 pass) and additionally drove the feature manually to produce reviewer-visible CLI/tmux transcripts: the picker listing workers by short readable names with the secondmate excluded, the selected reference being typed live into a composer pane mid-message, the dead-worker safety path typing nothing, the empty-picker not crashing on the system bash 3.2 (the review fix), and theprefix #chord being wired bybind. This is a tmux/terminal CLI surface with no rendered web/graphical UI, so evidence is captured as tmux pane captures and command transcripts rather than screenshots - that is the actual end-user surface here. All checks passed and the working tree was left clean.Evidence: Picker lists current workers by short names (secondmate excluded)
$ fm-layout.sh ref --print -p %composer 1 firstmate:fm-api-audit-p7 fm-api-audit-p7 2 firstmate:fm-cache-bug-z2 fm-cache-bug-z2 3 firstmate:fm-login-fix-k3 fm-login-fix-k3 (secondmate fm-triage-dd excluded)Evidence: Selected reference typed into the composer pane mid-message
composer reads: please rebase fm-login-fix-k3 onto main and rerun CI (short readable worker ref inserted mid-message with a trailing space; no hand-copied tmux target)Evidence: Dead-worker safety: nothing typed for a non-live worker
Evidence: bind wires the prefix # chord
bound: prefix+O = arrange/refresh, prefix+P = pick worker, prefix+# = insert worker reference bind-key -T prefix # run-shell ".../bin/fm-layout.sh ref -p '#{pane_id}' -c '#{client_name}'"Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
🔧 **Review** - 3 issues found → auto-fixed ✅
bin/fm-layout-pick.sh:38- fm-layout-pick.sh iteratesfor row in "${WORKERS[@]}"(lines 38 and 52) underset -u. On bash 3.2.57 (the macOS default shell this branch's prior commit explicitly hardened for), iterating an empty array withset -uaborts withWORKERS[@]: unbound variable(verified directly on the system bash). When no workers are live, the empty-workers branch at line 34 prints its message but does not exit, so control falls into the line-38 loop and the picker crashes before it can show "0) clear this slot" or read a choice. The picker is documented as the dependable path that "works on any tmux/terminal". Fix mechanically with the safe expansion"${WORKERS[@]+"${WORKERS[@]}"}"on both loops, or exit/guard after the empty message.bin/fm-layout.sh:50-bindmapsprefix #(KEY_REF default#), which overrides tmux's built-inprefix #= list-buffers binding, andunbindleaves#unbound rather than restoring the default. The in-code comment "Opt-in prefix keys (capitals, not default tmux bindings)" applies to O/P but not to#, which is a tmux default. This is an opt-in, documented tradeoff; noting for awareness.bin/fm-layout.sh:51- The worker-reference picker defaults to FM_LAYOUT_REF_FORMAT=target, inserting the fullfirstmate:fm-<long-id>tmux target into the composer. The captain's stated requirement emphasized short, human-readable names; the inserted token is the routing target, not the readable label shown in the menu. This is configurable (windowformat yields the shorterfm-<id>) and documented, so flagging only to confirm the default matches intent.🔧 Fix: fix bash 3.2 empty-picker crash, default worker-ref to window form
✅ Re-checked - no issues remain.
✅ **Test** - passed
✅ No issues found.
bash tests/fm-layout.test.sh(8/8 ok, including the worker-reference picker block: ref formats,ref --printlisting/exclusion,insert-reftyping into a real composer pane, dead-worker rejection)Manual end-to-end on a private tmux socket:fm-layout.sh ref --print -p %composerlists 3 live workers by short names, excludes the secondmateManual:fm-layout.sh insert-ref -p <composer> -w firstmate:fm-login-fix-k3insertsfm-login-fix-k3mid-message into a live composer pane (captured:please rebase fm-login-fix-k3 onto main and rerun CI)Manual:insert-reftargeting a non-live worker (fm-ghost-xx) types nothingManual on bash 3.2.57:fm-layout.sh ref --printwith zero workers exits 0 with no output (review-fix for the empty-array crash)Manual:fm-layout.sh bindfrom inside tmux reports theprefix+#binding andtmux list-keysconfirms theprefix #chord runsfm-layout.sh ref✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.