chore: remove inspect.sandboxagent.dev in favor of /ui/

This commit is contained in:
Nathan Flurry 2026-02-01 21:58:54 -08:00
parent cacb63ef17
commit 05488f157c
10 changed files with 26 additions and 73 deletions

View file

@ -1,5 +1,3 @@
const INSPECTOR_URL = "https://inspect.sandboxagent.dev";
export interface InspectorUrlOptions {
/**
* Base URL of the sandbox-agent server.
@ -18,15 +16,17 @@ export interface InspectorUrlOptions {
/**
* Builds a URL to the sandbox-agent inspector UI with the given connection parameters.
* The inspector UI is served at /ui/ on the sandbox-agent server.
*/
export function buildInspectorUrl(options: InspectorUrlOptions): string {
const normalized = options.baseUrl.replace(/\/+$/, "");
const params = new URLSearchParams({ url: normalized });
const params = new URLSearchParams();
if (options.token) {
params.set("token", options.token);
}
if (options.headers && Object.keys(options.headers).length > 0) {
params.set("headers", JSON.stringify(options.headers));
}
return `${INSPECTOR_URL}?${params.toString()}`;
const queryString = params.toString();
return `${normalized}/ui/${queryString ? `?${queryString}` : ""}`;
}