Repository navigation
Conversation
Interactive tool family (interactive_start/write/wait/cancel) for driving long-lived child processes (gdb, REPLs, installers) across provider turns: PTY jobs with per-job spool files and delivery cursor, quiescence-based settle with automatic output feeding, per-job exchange and lifetime budgets, orphan-process ledger with startup sweep, Location-scoped job store, permission gating, config keys (interactive.*), V2 registration and V1 session bridge, spec (specs/tool-interactive.md) and tests.
Contributor
|
The following comment was made by an LLM, it may be inaccurate: |
1 task done
Member
|
This branch has been upgraded to V2. We're no longer taking PRs for V1. If you think this is still relevant, please port it over and open it for V2. — from 𝕺𝖕𝖊𝖓𝕮𝖔𝖉𝖊 |
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.
Issue for this PR
Closes # (no tracking issue — the spec below is the source of truth for this feature)
Type of change
What does this PR do?
Adds an interactive tool family —
interactive_start,interactive_write,interactive_wait,interactive_cancel— for driving long-lived child processes (gdb, REPLs, installers) across provider turns. Until now the only process tool was a one-shot exec, so any task that needs a conversation with a running process (send a command, read output, decide, send another) had to be crammed into a single blocking call with a hard timeout.How it works, briefly:
interactive_startlaunches the child under a PTY and returns a job ID immediately; output is written to a per-job spool file with a monotonically advancing delivery cursor, so eachinteractive_waitpicks up where the previous read stopped.interactive.*config keys.The change is spec-first:
specs/tool-interactive.md(included in this PR) defines the tool contract, budgeting, and lifecycle rules that the implementation follows.How did you verify your code works?
packages/core:bun test test/tool-interactive.test.ts test/tool-interactive-store.test.ts test/tool-interactive-spool.test.ts test/tool-interactive-governor.test.ts test/tool-interactive-ledger.test.ts test/session-execution-interactive.test.ts— 48 pass, 0 fail (covers tool behavior against a real fixture process, spool/cursor semantics, settle/governor budgets, orphan ledger + startup sweep, job store, and the V2 session execution wiring).packages/core:bun typecheck— clean.packages/opencode:bun test test/tool/interactive.test.ts— 4 pass, 0 fail (V1 bridge and registry wiring).Screenshots / recordings
Not a UI change — no screenshots.
Checklist