feat(cli): add native world browser tool - #12753
Conversation
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Incremental review of Overview
Files Reviewed (0 files)No files changed since the previous review at Scope: PR-content changes between Previous Review Summary (commit 90d8169)Current summary above is authoritative. Previous snapshots are kept for context only. Previous review (commit 90d8169)Status: No Issues Found | Recommendation: Merge Incremental review of Overview
Files Reviewed (0 files)No files changed since the previous review at Scope: PR-content changes between Reviewed by kimi-k3 · Input: 71.6K · Output: 4.5K · Cached: 194K Review guidance: REVIEW.md from base branch |
c3a7316 to
0529d51
Compare
0529d51 to
7c89a62
Compare
b99a646 to
7cf8fc3
Compare
7cf8fc3 to
9f828a3
Compare
9f828a3 to
039c923
Compare
039c923 to
b10e678
Compare
b10e678 to
51be086
Compare
51be086 to
6f3e780
Compare
6f3e780 to
8e5542a
Compare
1d2b387 to
e8be436
Compare
e8be436 to
a19105f
Compare
a19105f to
374e2f5
Compare
90d8169 to
1895a90
Compare
1895a90 to
ca6f468
Compare
|
No issues found and check are green! |
|
Comment to prevent this PR from automatically closing due to 30 days of inactivity. |
Context
The runtime from the preceding PR needs a first-class CLI surface before agents can use it. This PR adds World as a built-in Kilo tool, enabled by default, so browser verification is available without external MCP registration or client-specific setup.
World asks for browser, network, read, and write permissions before executing the corresponding actions. It also tells agents to proactively verify visual changes, making browser validation part of the normal implementation loop rather than something users must request separately.
Part of #12751.
Depends on #12752. Until that PR merges, review the focused CLI-layer diff; GitHub will then reduce this PR’s Files changed tab to this layer automatically.
Implementation
I, a human, have manually reviewed every change in this PR.
Register the
worldtool in the Kilo tool registry and expose a semicolon-separated action script covering navigation, snapshots, interaction, evaluation, tabs, cookies, screenshots, and daemon lifecycle. The tool inspects the complete script before execution so Kilo can request URL and filesystem permissions up front, including fully expanded output paths.Each Kilo session receives its own daemon and browser state. Agent-provided
--sessionarguments are rejected both during inspection and again inside runtime dispatch, preventing a tool call from selecting another session. Visual actions return an inline screenshot automatically, and the tool description instructs agents to use that feedback to verify UI changes.The CLI build now bundles and smoke-tests the Node daemon beside the compiled binary. Configuration and generated SDK schema support headless mode, viewport and timeout controls, Chromium arguments, an explicit executable, and optional system Chrome selection. This PR also introduces the user-facing changeset; the next PR updates the same file for VS Code delivery.
Screenshots / Video
I’ll upload images and a CLI demonstration video soon.
How to Test
Manual/local verification
world-daemon.cjs; the CLI, models, sandbox worker, and World daemon smoke tests passed.Reviewer test steps
packages/opencode, runbun run script/build.ts --single --skip-install.kilobinary fromdist/@kilocode/cli-*/bin/kilo.snapshot, interact with an element, and capture a screenshot.experimental.world_browserand confirm the World tool is no longer exposed.Checklist
Get in Touch
Discord: @IamCoder18