Repository navigation
Bind Herdr pane adoption to OS lineage, pre-authorize worker trust, and clarify browser handoff - #263
Merged
Merged
Conversation
… align handoff copy
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.
When a developer ran
/surla($surla) inside an existing Herdr terminal tab whose coding agent stripped child environment variables or spawnedsurla stdiofrom a shared background daemon,attach_guidereceived either noHC_TERMINAL_IDor a stale terminal ID, reportedherdr_mode: "available"as if the session were outside Herdr, and opened a second Herdr window when starting a build. Once a build started, newly launched builder and test-writer sessions paused on interactive folder-trust dialogs for.surla-buildand.surla-testsand per-tool MCP approval prompts (get_builder_assignmentand related Surla or Chorus tools). In addition, the initialopen_viewshandoff and status copy relied on the internal"Guide"term and did not explain how to reopen Surla's browser window without a URL token.This change ties Herdr pane adoption to OS process lineage, pre-populates user-scoped folder trust and Surla/Chorus MCP tool approvals while preserving explicit client restrictions and clean Git worktrees, branches chat handoff guidance on observed browser-opener results with Open Surla Window, and replaces user-facing
"Guide"wording with"your coding agent".Resulting behavior
surla setup -globaladds"HC_TERMINAL_ID"toenv_varsin TOML MCP server configuration (supporting both plain strings and structuredenv_varsentries) so direct TUI sessions forward their pane identifier.surla stdioalso passes its OS ancestor PIDs (ancestor_pids)—while dropping inherited daemon terminal IDs and declining unproved shared app-server daemon attaches so remote or multiplexed sessions stay external—andAttachGuiderevalidates the project directory, client family, and invoking process lineage on the final terminal read before labeling so live Herdr tabs are adopted and reused on Build while external terminal sessions and stale terminal IDs remain unattached..surla-buildand.surla-testsenforce clean Git status including untracked files, Surla refuses any configuration destination or symlink resolving inside a worker tree.surla setup -globalconfiguressurla(andchoruswhen present) MCP tool approvals across supported TOML and JSON client locations (preserving existing tool filters such asincludeToolsandexcludeTools, supporting alternate CLI home and trusted-folders override environment variables, and updating deny-onlycli-config.jsonfiles), whilePrepareWorkerTrustwrites only missing folder-trust entries under a context-bounded operator file lock without touching MCP settings files during Build. Explicit user restrictions (untrustedorDO_NOT_TRUSTfolders, explicitprompt/writes/trust: falsemodes, and wildcarddeny/askrules matching an operation required by the selected worker role) are never overwritten and surface a bounded actionable step on both Build and Team → Start workers; headless worker invocations scope flags to--trustandmcp__surla__*without approving unrelated MCP servers."coding agent"copy:open_views,skills/surla/SKILL.md, androleFirstMessage("guide")branch onopened: trueversusopened: false, avoid claiming foreground focus beyond browser-opener dispatch, keep#linkfragments out of chat, and name both reopen routes: asking the coding agent or clicking Open Surla Window (Cmd+Alt+Shift+Son macOS) in the Herdr companion. Companion, status, refusal, and documentation prose now say"Coding agent"/"your coding agent"(keeping unknown external pane state at"status unknown"rather than claiming live attachment).Verification
Proven in Goa regeneration (
goa gen),node ui/checkpoint/build.mjs --check, unit, race, and served-transport tests acrosscmd/surla,internal/project, andinternal/controlplane(covering OS-lineage Herdr adoption and Build space reuse, conflicting-label and stale-terminal rejection, external-session non-adoption, preserved client restrictions and malformed-setting preflight refusals across both Build and Team, concurrent shared-config writes and worktree symlink refusals, structuredenv_varsand alternate home paths, Herdr companion Node tests, andherdr-app check). Live desktop coding-client startup and Herdr pane adoption are verified through deterministicTeamHostfixtures rather than a live GUI harness, and shared app-server daemon sessions without per-requester lineage remain unbound.