Skip to content

feat(terminal): interrupt foreground programs in an authorized Debug terminal - #438

Merged
Qiyuanqiii merged 1 commit into
mainfrom
Qiyuanqiii/debug-terminal-interrupt
Oct 22, 2026
Merged

Qiyuanqiii merged 1 commit into
mainfrom
Qiyuanqiii/debug-terminal-interrupt

Conversation

@Qiyuanqiii

@Qiyuanqiii Qiyuanqiii commented Oct 21, 2026 •

Copy link
Copy Markdown
Member

已授权的 Debug 终端遇到持续运行的前台程序时,模型现在可以用 debug_terminal 的 interrupt 动作发送 Ctrl+C,再读取输出确认程序是否停止。固定发送一个 0x03 字节,不附加回车、不接受自定义输入,保留现有持久 shell。

动作复用当前输入租约、Run/Workspace 绑定、宿主策略、操作去重、审计与原生授权。过期或撤销的权限不能中断进程;不确定是否写入成功时不会自动重试。

基于 #434,依赖其运行时安全更新;请在前置 PR 合并后处理。没有界面变更。

验证:

  • go test ./internal/toolgateway -count=1 通过。
  • application 的 DebugTerminal 与 Supervisor 工具可见性相关测试通过,覆盖固定输入、策略拒绝、租约/权限变化、重复操作和不确定写入。
  • Windows 真实 ConPTY 测试通过:前台子进程收到中断,同一个 PowerShell 随后成功执行下一条命令。
  • protocol registry 检查及 git diff --check 通过。
  • Linux CI 已执行并通过 POSIX 原生前台中断测试;同一 shell 可继续执行后续命令。最新 b1d2e5f 的 CI 已全部结束通过。

@Qiyuanqiii
Qiyuanqiii changed the base branch from Qiyuanqiii/runtime-security-october to main October 22, 2026 02:41
@Qiyuanqiii
Qiyuanqiii merged commit 24d2887 into main Oct 22, 2026
20 checks passed
@Qiyuanqiii
Qiyuanqiii deleted the Qiyuanqiii/debug-terminal-interrupt branch October 28, 2026 17:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant