feat: add guarded TTY ACP bridge - #451
Open
yattdev wants to merge 2 commits into
Open
Conversation
yattdev
marked this pull request as ready for review
August 30, 2026 10:01
Author
|
@nikita-ashihmin This first-time fork PR is ready to run CI at exact head |
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.
Overview
Add a narrow, versioned ACP extension that lets an authorized Kandev integration request a one-shot TTY command through the already-running Codex App Server process.
This closes the upstream ACP bridge gap only. Deployment authorization, audit persistence, and model-tool registration remain owned by Kandev; the deployment-only non-TTY repair is unchanged.
Changes
1and register:_kandev/guarded_tty/capability_kandev/guarded_tty/exec{ sessionId, argv }with strict count, per-argument, total-byte, and NUL bounds.cwdandsandboxPolicyfrom the active trusted ACP session.command/execwithtty: true, streaming enabled, and fixed timeout/output caps.commandExecutionmapping and non-TTY output behavior unchanged.Security boundaries
The extension does not accept caller-controlled
cwd, sandbox policy, permission profile, process ID, TTY flags, environment, stdin/write/resize/attach, or interactive lifecycle controls. It does not create a host-side executor, mutateCODEX_CONFIG, enableunified_exec, or alter mounts or credentials.Testing
npx vitest run src/__tests__/CodexACPAgent/guarded-tty-exec.test.ts src/__tests__/CodexACPAgent/terminal-output-events.test.ts --no-file-parallelism— 28 passednpm run typecheck— passednpm run build— passednpm test— 495 passed, 26 skippedgit diff --check origin/main...HEAD— passedCredentialed
npm run test:e2ewas not rerun becauseCODEX_API_KEYandOPENAI_API_KEYare unavailable. Prior ChatGPT-authenticated App Server probes verified TTY stdin/stdout,stty, the trusted worktreepwd, and exit code 0. Bun-only release bundling was not run because Bun is unavailable; the normal production build passed.Breaking changes
None. This adds versioned underscore extension methods and does not change existing ACP command behavior.
Screenshots
N/A — no UI-visible changes.