Repository navigation
Add live guide attachment, Herdr-optional execution, in-place init, and merge API - #258
Merged
Merged
Conversation
AgentCredential reads the bearer credential saved for one agent handle through the existing private-file and format checks, so surla stdio can present it to /mcp for the guide it attached or the worker whose working copy it runs in. A missing file still matches os.ErrNotExist.
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.
Starting and completing a Surla change previously required leaving a coding agent for a shell at four points: running
surla(which hard-failed without Herdr and opened thechorus-launchermodal before any change existed), creating a starter in a nested subfolder rather than an empty current directory, runningsurlaagain whenever a browser tab closed or reloaded, and running twogit mergecommands by hand after approving a verification result. In addition, worker panes stayed open after a build was merged or dropped, and builds could not run on machines without Herdr.Resulting behavior
POST /project/attach-guideregisters theguiderole and, when given a live local Herdr terminal ID (HC_TERMINAL_ID) in an unconflicted tab, adopts its space and tab in place via terminal labels (normalizingchorus.agent, clearingchorus.options, and opening the non-modalsurlacompanion window if installed and not already open) while deleting automaticchorus-launcherdialog invocations.GET /project/statusandsurla status [--json]report read-only project, stage, active-change, attention, and role status without starting a server when stopped. Baresurlabecomes Herdr-optional, and the newopen_viewsMCP tool (guideanduser) mints a one-use browser link internally and opens the browser server-side without returning link or session secrets to any agent.init_projectwithdir: "."): While keeping omitteddirdefaulting to a<service>child folder for existing callers,init_projectnow acceptsdir: "."to initialize an empty workspace root in place (permitting harmless agent/IDE dot-entries while refusing.git, project markers, or colliding files, and committing an inode-bound write-ahead record that moves.gitlast for deterministic crash recovery).hcis unavailable,surlalaunchessurla serveas a detached OS daemon (Setsid, boundedserve-startup.logdiagnostics).GET /teamstays subprocess-free (herdr_mode,saved_choices,dismissed_notices), whileGET /team/agent-optionsdiscovers locally installed agent CLIs and model/YOLO capabilities on demand.StartBuildandStartAgentsaccept explicit rolechoices(falling back to saved choices or cross-family defaults), writeconnections: []rosters (worker-only whenguidehas no live Herdr pane) viachorus team launch, and—when Herdr is absent—executebuilderandtest_writerinside bounded, server-managed process groups (herdrEnvpreserved, Chorus-optional, gated on in-flight report/verification checks, and drained on server shutdown).merge_changeand build-scopedStopWorkers:POST /changes/{change_id}/merge(CallerUseronly) re-verifies livecurrentCardapproval and an undropped open build, checks a named branch, clean tracked working tree, and safe Git attribute/hook/include configuration, merges the candidate and accepted tests commits with deterministicgit reset --mergerollback to the originalHEADon any failure, and triggersStopWorkers(ctx, buildIdentity)(also called ondrop_buildand first observed manual merge in supervision) to close only finished worker panes or processes without touchingguide.Compatibility and verification
Existing Change Card, build, and verification files load unchanged; omitted
dironinit_projectretains child-directory creation, and repositories using.gitattributes,hook.<name>.command, or in-worktree Git config includes refuse automatic server merge cleanly in favor of manualgit merge. Unit and integration suites verify detached daemon startup withouthc, liveHC_TERMINAL_IDpane adoption and conflict fallback,open_viewssecret non-leakage,init_project(dir: ".")publication and crash replay,chorus team launchand headless process-group execution (including single-agent installs and Chorus-absent mode), two-stepmerge_changerollback across conflicts and ignored-file collisions, andBuildIdentity-guarded worker teardown. CLI and stdio setup entrypoints (surla stdio,surla setup -global,surla up) and the browser picker/merge controls land in the immediately following slices.