Skip to content

feat(cli): add native world browser tool - #12753

Open
IamCoder18 wants to merge 2 commits into
Kilo-Org:mainfrom
IamCoder18:feat/world-cli
Open

feat(cli): add native world browser tool#12753
IamCoder18 wants to merge 2 commits into
Kilo-Org:mainfrom
IamCoder18:feat/world-cli

Conversation

@IamCoder18

@IamCoder18 IamCoder18 commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

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 world tool 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 --session arguments 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.

before after

How to Test

Manual/local verification

  • Ran the CLI typecheck and 26 targeted World/config/registry tests successfully.
  • Built the standalone CLI with the bundled world-daemon.cjs; the CLI, models, sandbox worker, and World daemon smoke tests passed.
  • Confirmed the OpenCode annotation and Promise-facade guards pass.

Reviewer test steps

  1. From packages/opencode, run bun run script/build.ts --single --skip-install.
  2. Run the built kilo binary from dist/@kilocode/cli-*/bin/kilo.
  3. Ask Kilo to open a local web app with the World tool, inspect it with snapshot, interact with an element, and capture a screenshot.
  4. Confirm browser state persists across World calls and visual actions return an inline image.
  5. Disable experimental.world_browser and confirm the World tool is no longer exposed.

Checklist

  • Issue linked above, or exception explained
  • Tests/verification described
  • Screenshots/video included for visual changes, or marked N/A
  • Changeset considered for user-facing changes
  • I personally reviewed the diff and can explain the changes, including any AI-assisted work.

Get in Touch

Discord: @IamCoder18

Comment thread packages/opencode/src/kilocode/tool/registry.ts Outdated
Comment thread packages/opencode/src/kilocode/tool/world.ts Outdated
Comment thread packages/opencode/src/kilocode/tool/world-script.ts
Comment thread packages/opencode/src/kilocode/tool/world.ts Outdated
Comment thread packages/opencode/src/kilocode/tool/world.ts
Comment thread packages/opencode/src/kilocode/tool/world.ts Outdated
Comment thread packages/opencode/src/kilocode/plugins/world-palette.tsx Outdated
Comment thread packages/opencode/src/kilocode/plugins/world-palette.tsx Outdated
Comment thread packages/core/src/v1/config/config.ts
@kilo-code-bot

kilo-code-bot Bot commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Incremental review of ca6f4680 (previous review: 90d8169d). The branch was rebased onto newer main, but the tree at HEAD is byte-identical to the previously reviewed tree (92287653), so the incremental diff is empty and there is no new code to review. The previous rounds' outcomes stand: the World CLI-layer delta (tool registration, world tool with permission inspection, per-session daemon/browser state, inline screenshots, daemon build plumbing, and config/SDK schema for headless/viewport/timeout/executable options) was reviewed in earlier rounds and its findings remain as active inline comments.

Overview

Severity Count
CRITICAL 0
WARNING 0
SUGGESTION 0
Files Reviewed (0 files)

No files changed since the previous review at 90d8169d (rebase with identical tree).

Scope: PR-content changes between 90d8169d and ca6f4680 (empty). Files outside that delta were not re-reviewed. Notes / assumptions: dependencies are not installed in this environment, so no build, typecheck, or test was run.

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 1895a90a (previous review: 90d8169d). The branch was rebased, but the tree at HEAD is byte-identical to the previously reviewed tree (92287653), so the incremental diff is empty and there is no new code to review. The previous rounds' outcomes stand: the World CLI-layer delta (tool registration, world tool with permission inspection, per-session daemon/browser state, inline screenshots, daemon build plumbing, and config/SDK schema for headless/viewport/timeout/executable options) was reviewed in earlier rounds and its findings remain as active inline comments.

Overview

Severity Count
CRITICAL 0
WARNING 0
SUGGESTION 0
Files Reviewed (0 files)

No files changed since the previous review at 90d8169d (rebase with identical tree).

Scope: PR-content changes between 90d8169d and 1895a90a (empty). Files outside that delta were not re-reviewed. Notes / assumptions: dependencies are not installed in this environment, so no build, typecheck, or test was run.


Reviewed by kimi-k3 · Input: 71.6K · Output: 4.5K · Cached: 194K

Review guidance: REVIEW.md from base branch main

unixcrh pushed a commit to unixcrh/kilocode that referenced this pull request Aug 1, 2026
Comment thread packages/opencode/src/kilocode/tool/world-config.ts
Comment thread packages/opencode/src/kilocode/tool/world.ts Outdated
Comment thread packages/opencode/src/kilocode/tool/world.ts
Comment thread packages/opencode/src/kilocode/tool/world.ts
@IamCoder18
IamCoder18 force-pushed the feat/world-cli branch 2 times, most recently from b99a646 to 7cf8fc3 Compare August 2, 2026 01:07
Comment thread packages/kilo-world/package.json Outdated
Comment thread packages/kilo-world/src/core/browser/runner.ts Outdated
Comment thread packages/opencode/src/kilocode/plugins/world-palette.tsx Outdated
Comment thread packages/opencode/src/kilocode/plugins/world-palette.tsx Outdated
Comment thread packages/opencode/src/kilocode/plugins/world-palette.tsx Outdated
Comment thread package.json Outdated
Comment thread packages/opencode/src/kilocode/tool/world.ts Outdated
Comment thread packages/opencode/src/kilocode/tool/world.ts Outdated
Comment thread packages/plugin/src/tui.ts Outdated
Comment thread packages/kilo-world/src/daemon/client.ts Outdated
Comment thread packages/kilo-world/src/daemon/client.ts
Comment thread packages/kilo-world/test/daemon.test.ts
Comment thread packages/kilo-world/script/build-daemon.ts Outdated
Comment thread packages/kilo-world/src/daemon/client.ts Outdated
Comment thread packages/kilo-world/src/daemon/client.ts Outdated
Comment thread packages/kilo-world/src/daemon/build.ts Outdated
Comment thread packages/kilo-world/src/daemon/server.ts Outdated
Comment thread packages/kilo-world/test/daemon.test.ts Outdated
Comment thread packages/kilo-world/test/daemon.test.ts Outdated
Comment thread packages/kilo-world/script/build-daemon.ts
Comment thread packages/kilo-world/script/build-daemon.ts Outdated
Comment thread packages/kilo-world/src/daemon/client.ts Outdated
Comment thread packages/kilo-world/src/daemon/client.ts Outdated
@IamCoder18
IamCoder18 force-pushed the feat/world-cli branch 3 times, most recently from 1d2b387 to e8be436 Compare August 3, 2026 04:30
Comment thread packages/kilo-world/script/build-daemon.ts Outdated
Comment thread packages/kilo-world/src/daemon/build.ts Outdated
Comment thread packages/kilo-world/src/daemon/build.ts Outdated
@IamCoder18
IamCoder18 force-pushed the feat/world-cli branch 2 times, most recently from 90d8169 to 1895a90 Compare August 3, 2026 22:55
@IamCoder18

Copy link
Copy Markdown
Contributor Author

No issues found and check are green!

t7tran pushed a commit to t7tran/kilocode that referenced this pull request Aug 14, 2026
@IamCoder18

Copy link
Copy Markdown
Contributor Author

Comment to prevent this PR from automatically closing due to 30 days of inactivity.

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