mirror of
https://github.com/harivansh-afk/sandbox-agent.git
synced 2026-04-15 20:03:11 +00:00
* chore: recover hamburg workspace state * chore: drop workspace context files * refactor: generalize permissions example * refactor: parse permissions example flags * docs: clarify why fs and terminal stay native * feat: add interactive permission prompt UI to Inspector Add permission request handling to the Inspector UI so users can Allow, Always Allow, or Reject tool calls that require permissions instead of having them auto-cancelled. Wires up SDK onPermissionRequest/respondPermission through App → ChatPanel → ChatMessages with proper toolCallId-to-pendingId mapping. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix: prevent permission reply from silently escalating "once" to "always" Remove allow_always from the fallback chain when the user replies "once", aligning with the ACP spec which says "map by option kind first" with no fallback for allow_once. Also fix Inspector to use rawSend, revert hydration guard to accept empty configOptions, and handle respondPermission errors by rejecting the pending promise. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
52 lines
1.5 KiB
Text
52 lines
1.5 KiB
Text
---
|
|
title: "Inspector"
|
|
description: "Debug and inspect agent sessions with the Inspector UI."
|
|
---
|
|
|
|
The Inspector is a web UI for inspecting Sandbox Agent sessions. Use it to view events, inspect payloads, and troubleshoot behavior.
|
|
|
|
<Frame>
|
|
<img src="/images/inspector.png" alt="Sandbox Agent Inspector" />
|
|
</Frame>
|
|
|
|
## Open the Inspector
|
|
|
|
The Inspector is served at `/ui/` on your Sandbox Agent server.
|
|
For example, if your server runs at `http://localhost:2468`, open `http://localhost:2468/ui/`.
|
|
|
|
You can also generate a pre-filled Inspector URL from the SDK:
|
|
|
|
```typescript
|
|
import { buildInspectorUrl } from "sandbox-agent";
|
|
|
|
const url = buildInspectorUrl({
|
|
baseUrl: "http://127.0.0.1:2468",
|
|
});
|
|
|
|
console.log(url);
|
|
// http://127.0.0.1:2468/ui/
|
|
```
|
|
|
|
## Features
|
|
|
|
- Session list
|
|
- Event stream view
|
|
- Event JSON inspector
|
|
- Prompt testing
|
|
- Request/response debugging
|
|
- Interactive permission prompts (approve, always-allow, or reject tool-use requests)
|
|
- Process management (create, stop, kill, delete, view logs)
|
|
- Interactive PTY terminal for tty processes
|
|
- One-shot command execution
|
|
|
|
## When to use
|
|
|
|
- Development: validate session behavior quickly
|
|
- Debugging: inspect raw event payloads
|
|
- Integration work: compare UI behavior with SDK/API calls
|
|
|
|
## Process terminal
|
|
|
|
The Inspector includes an embedded Ghostty-based terminal for interactive tty
|
|
processes. The UI uses the SDK's high-level `connectProcessTerminal(...)`
|
|
wrapper via the shared `@sandbox-agent/react` `ProcessTerminal` component.
|