Skip to content

Commit f67b6fc

Browse files
committed
wip inspector
1 parent 7a5bb2b commit f67b6fc

8 files changed

Lines changed: 198 additions & 152 deletions

File tree

File renamed without changes.

frontend/packages/inspector/src/App.tsx

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,24 @@ const getDefaultEndpoint = () => {
5151
return origin;
5252
};
5353

54+
const getInitialConnection = () => {
55+
if (typeof window === "undefined") {
56+
return { endpoint: "http://127.0.0.1:2468", token: "" };
57+
}
58+
const params = new URLSearchParams(window.location.search);
59+
const urlParam = params.get("url")?.trim();
60+
const tokenParam = params.get("token") ?? "";
61+
return {
62+
endpoint: urlParam && urlParam.length > 0 ? urlParam : getDefaultEndpoint(),
63+
token: tokenParam
64+
};
65+
};
66+
5467
export default function App() {
5568
const issueTrackerUrl = "https://github.com/rivet-dev/sandbox-agent/issues/new";
56-
const [endpoint, setEndpoint] = useState(getDefaultEndpoint);
57-
const [token, setToken] = useState("");
69+
const initialConnectionRef = useRef(getInitialConnection());
70+
const [endpoint, setEndpoint] = useState(initialConnectionRef.current.endpoint);
71+
const [token, setToken] = useState(initialConnectionRef.current.token);
5872
const [connected, setConnected] = useState(false);
5973
const [connecting, setConnecting] = useState(false);
6074
const [connectError, setConnectError] = useState<string | null>(null);

frontend/packages/inspector/src/components/agents/CapabilityBadges.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import {
55
Brain,
66
Download,
77
FileDiff,
8+
Gauge,
89
GitBranch,
910
HelpCircle,
1011
Image,
@@ -30,6 +31,7 @@ const badges = [
3031
{ key: "sessionLifecycle", label: "Lifecycle", icon: PlayCircle },
3132
{ key: "errorEvents", label: "Errors", icon: AlertTriangle },
3233
{ key: "reasoning", label: "Reasoning", icon: Brain },
34+
{ key: "status", label: "Status", icon: Gauge },
3335
{ key: "commandExecution", label: "Commands", icon: Terminal },
3436
{ key: "fileChanges", label: "File Changes", icon: FileDiff },
3537
{ key: "mcpTools", label: "MCP", icon: Plug },

frontend/packages/inspector/src/types/agents.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ export type AgentCapabilitiesView = AgentCapabilities & {
88
sessionLifecycle?: boolean;
99
errorEvents?: boolean;
1010
reasoning?: boolean;
11+
status?: boolean;
1112
commandExecution?: boolean;
1213
fileChanges?: boolean;
1314
mcpTools?: boolean;
@@ -26,6 +27,7 @@ export const emptyCapabilities: AgentCapabilitiesView = {
2627
sessionLifecycle: false,
2728
errorEvents: false,
2829
reasoning: false,
30+
status: false,
2931
commandExecution: false,
3032
fileChanges: false,
3133
mcpTools: false,

sdks/typescript/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "sandbox-agent",
33
"version": "0.1.0",
4-
"description": "TypeScript SDK for sandbox-agent",
4+
"description": "Universal API for automatic coding agents in sandboxes. Supprots Claude Code, Codex, OpenCode, and Amp.",
55
"license": "Apache-2.0",
66
"repository": {
77
"type": "git",

sdks/typescript/src/generated/openapi.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ export interface components {
6767
sessionLifecycle: boolean;
6868
/** @description Whether this agent uses a shared long-running server process (vs per-turn subprocess) */
6969
sharedProcess: boolean;
70+
status: boolean;
7071
streamingDeltas: boolean;
7172
textMessages: boolean;
7273
toolCalls: boolean;

server/CLAUDE.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,8 @@ To keep snapshots deterministic:
7676
- Permission flow snapshots are truncated after the permission request (or first assistant) event.
7777
- Unknown events are preserved as `kind: unknown` (raw payload in universal schema).
7878
- Prefer snapshot-based event skeleton assertions over manual event-order assertions in tests.
79+
- **Never update snapshots based on any agent that is not the mock agent.** The mock agent is the source of truth for snapshots; other agents must be compared against the mock snapshots without regenerating them.
80+
- Agent-specific endpoints keep per-agent snapshots; any session-related snapshots must use the mock baseline as the single source of truth.
7981

8082
## Typical commands
8183

0 commit comments

Comments
 (0)