-
Notifications
You must be signed in to change notification settings - Fork 1
✨ Open terminal grids with tmux in foreground runs (#732) #747
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
taras
wants to merge
15
commits into
agent/issue-731-pane-native-launch
from
agent/issue-732-tmux-grid
Open
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
7d0c87b
✨ Give the host a way to prove a terminal pane is free (#732)
taras 87dcba1
✨ Lay a tmux window out in the authored order (#732)
taras e04ac24
✨ Give a terminal pane a worker and a private channel (#732)
taras a58ece7
✨ Build the hidden tmux composite for a terminal grid (#732)
taras 50c8ab5
🐛 Narrow the visible client, and make teardown prove itself (#732)
taras 4876979
🐛 Refuse when the visible client will not stop (#732)
taras adfd895
✨ Install the tmux grid provider on the foreground hosts (#732)
taras 3e6d9ed
📝 Route pane-native launches through terminal composites (#732)
taras 3faa6e2
✨ Route a pane's native launch through its own composite (#732)
taras 3290221
✨ Complete the tmux terminal-grid provider (#732)
taras b7e8bfa
🐛 Finish fail-closed observation, teardown, listeners and host eviden…
taras e6ee878
🐛 Finish listener ownership and freeze the combined teardown (#732)
taras c3cc760
🐛 Freeze the foreground-host boundary, and repair what it exposed (#732)
taras 6c0076c
🐛 Freeze the combined grid teardown, and finish close-request failure…
taras 550b973
🐛 Keep the tmux grid suite off the runtimes that register no worker (…
taras File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
| Original file line number | Diff line number | Diff line change | ||
|---|---|---|---|---|
|
|
@@ -96,6 +96,8 @@ import { installWebComponents, installWebElicitation } from "@executablemd/web"; | |||
| import { timebox } from "@effectionx/timebox"; | ||||
| import { timeout as runTimeout } from "@executablemd/runtime"; | ||||
| import { installRunAgentStack, resolveAgentStack, resolvePlanWriterStack } from "./agent-stack.ts"; | ||||
| import { unsupportedTerminalGrid } from "./terminal/host.ts"; | ||||
| import type { TerminalGridInstaller } from "./terminal/host.ts"; | ||||
| import { planComponentDeclaration } from "./plan-component.ts"; | ||||
| import { planAgentContext } from "./plan-writer-profile.ts"; | ||||
| import { useVerboseComponent } from "./verbose-component.ts"; | ||||
|
|
@@ -781,8 +783,9 @@ function* underRunDeadline(timeouts: RunTimeouts, body: () => Operation<void>): | |||
| function* settleAgentStack( | ||||
| flags: AgentFlags, | ||||
| sessions: MachineSessionAssembly | undefined, | ||||
| installTerminalGrid: TerminalGridInstaller, | ||||
| ): Operation<AgentStack | undefined> { | ||||
| const stack = yield* resolveAgentStack(flags, sessions); | ||||
| const stack = yield* resolveAgentStack(flags, sessions, installTerminalGrid); | ||||
| if (!stack.ok) { | ||||
| console.error(stack.error.message); | ||||
| yield* exit(1); | ||||
|
|
@@ -2368,6 +2371,7 @@ function* dispatch( | |||
| readStandardInput: StandardInputReader, | ||||
| workflowHost: WorkflowHost | undefined, | ||||
| sessions: MachineSessionAssembly | undefined, | ||||
| installTerminalGrid: TerminalGridInstaller, | ||||
| ): Operation<void> { | ||||
| // Before the props phase, and before the help short-circuit below. `--help` | ||||
| // is lifted out of argv early enough that a command's own grammar never sees | ||||
|
|
@@ -2466,6 +2470,7 @@ function* dispatch( | |||
| denyAll: config.denyAll, | ||||
| }, | ||||
| sessions, | ||||
| installTerminalGrid, | ||||
| ); | ||||
| if (runStack === undefined) { | ||||
| break; | ||||
|
|
@@ -2836,6 +2841,10 @@ export function* runXmd( | |||
| // owns the session or which build it belongs to. A caller that names none | ||||
| // gets no machine sessions at all, which is the ordinary ACP behaviour. | ||||
| sessions?: MachineSessionAssembly, | ||||
| // What presents a terminal grid on this host. Deno and the compiled binary | ||||
| // supply the tmux provider; Node and Bun supply the one that installs none, | ||||
| // so those runtimes describe and validate the same grids and open none. | ||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Redundant comment — restates what the code does.
Suggested change
|
||||
| installTerminalGrid: TerminalGridInstaller = unsupportedTerminalGrid, | ||||
| ): Operation<void> { | ||||
| // Before every scanner, before command selection, and before anything reads a | ||||
| // path. `prompt` names no command, and a first token that names none is a | ||||
|
|
@@ -2905,6 +2914,7 @@ export function* runXmd( | |||
| readStandardInput, | ||||
| workflowHost, | ||||
| sessions, | ||||
| installTerminalGrid, | ||||
| ); | ||||
| } | ||||
|
|
||||
|
|
@@ -2927,6 +2937,7 @@ export function* runXmd( | |||
| readStandardInput, | ||||
| workflowHost, | ||||
| sessions, | ||||
| installTerminalGrid, | ||||
| ), | ||||
| ); | ||||
| } | ||||
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Redundant comment — restates what the code does.