Conversation
Add a cosmetic in-page cursor so a human watching the Agent Window can see what the agent is about to do. Before each click/hover the background sends a `bsk/cursor` message to the tab; the content script glides an arrow to the target (120-500 ms, distance based) and ripples on click. Failures never affect the tool result, and the overlay host is still hidden during captures so agent screenshots stay clean. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LTT2U726RDMrj22dDy1YMF
… wiring
Extension:
- Status pill shows the current action ("点击 @e3", "输入 …") via a
`bsk/action-status` message sent around every input tool.
- "中断" becomes "接管": it cancels inflight tools and emits
`session.control_taken`; the paused pill offers a note box and
"交还给 Agent", which emits `session.control_returned { note }`.
- Paused/interrupting sessions no longer auto-resume on passive reads;
a failed take-over request rolls back to control instead of locking
the page.
- Wire the virtual cursor into the dispatcher and content script.
Daemon / CLI:
- Sessions gain a held state: while control=user every input tool is
rejected with a message pointing at `bsk session wait-control`.
- New `bsk session status` and `bsk session wait-control --timeout`
(max 30m) return control state and the user's note; returning control
also clears the one-shot interrupt marker.
- Events from browsers that do not own the session, or for unknown
sessions, are ignored; notes are capped at 4 KiB.
- Protocol version 1.3 -> 1.4; schemas, CHANGELOG and SKILL.md updated.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LTT2U726RDMrj22dDy1YMF
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.
背景
当人类在 Agent Window 旁边观察 agent 操作时,目前缺两件事:一是看不出 agent 正在做什么、下一步要点哪里;二是想临时接手页面时,只能"中断",中断后没有一个干净的交还入口。
这个 PR 加入了一个完整的「人类接管」回路,以及配套的虚拟光标。
改动
虚拟光标(
feat(extension): visible virtual agent cursor before CDP input)bsk/cursor消息,content script 把一个箭头滑向目标(120–500 ms,按距离计算),点击时带一圈涟漪。接管回路(
feat: human takeover loop with action status, wait-control and cursor wiring)Extension 侧:
bsk/action-status驱动。session.control_taken;暂停态的胶囊提供备注框和"交还给 Agent",交还时发出session.control_returned { note }。Daemon / CLI 侧:
control=user期间所有输入类工具都会被拒绝,并在报错里指向bsk session wait-control。bsk session status和bsk session wait-control --timeout(上限 30 分钟),返回控制权状态和用户备注;交还控制权时会同时清掉一次性的 interrupt 标记。测试
新增 / 更新了覆盖上述行为的单测与集成测试,包括
crates/bsk-cli/tests/session_takeover.rs、action-status-bridge、cursor-bridge、dispatcher 与 interaction 的测试。🤖 Generated with Claude Code