mirror of
https://github.com/harivansh-afk/sandbox-agent.git
synced 2026-04-17 05:00:20 +00:00
chore: update examples to use bypass permissions and remove inspect.sandboxagent.dev (#51)
* chore: update examples to use bypass permissions and remove inspect.sandboxagent.dev * chore: simplify examples and print UI URL in runPrompt - Remove logInspectorUrl calls from all examples - Remove isMainModule checks from e2b, docker, vercel examples - Simplify e2b, docker, vercel to match daytona's direct execution style - Print UI URL at start of runPrompt in shared module
This commit is contained in:
parent
63cef16adf
commit
a442efe4bd
7 changed files with 160 additions and 583 deletions
|
|
@ -1,5 +1,5 @@
|
|||
import { Daytona, Image } from "@daytonaio/sdk";
|
||||
import { logInspectorUrl, runPrompt } from "@sandbox-agent/example-shared";
|
||||
import { runPrompt } from "@sandbox-agent/example-shared";
|
||||
|
||||
const daytona = new Daytona();
|
||||
|
||||
|
|
@ -23,7 +23,6 @@ await sandbox.process.executeCommand(
|
|||
);
|
||||
|
||||
const baseUrl = (await sandbox.getSignedPreviewUrl(3000, 4 * 60 * 60)).url;
|
||||
logInspectorUrl({ baseUrl });
|
||||
|
||||
const cleanup = async () => {
|
||||
await sandbox.delete(60);
|
||||
|
|
@ -32,10 +31,5 @@ const cleanup = async () => {
|
|||
process.once("SIGINT", cleanup);
|
||||
process.once("SIGTERM", cleanup);
|
||||
|
||||
// When running as root in a container, Claude requires interactive permission prompts (bypass mode is not supported). Set autoApprovePermissions: true to auto-approve,
|
||||
// or leave false for interactive prompts.
|
||||
await runPrompt({
|
||||
baseUrl,
|
||||
autoApprovePermissions: process.env.AUTO_APPROVE_PERMISSIONS === "true",
|
||||
});
|
||||
await runPrompt(baseUrl);
|
||||
await cleanup();
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { Daytona } from "@daytonaio/sdk";
|
||||
import { logInspectorUrl, runPrompt } from "@sandbox-agent/example-shared";
|
||||
import { runPrompt } from "@sandbox-agent/example-shared";
|
||||
|
||||
const daytona = new Daytona();
|
||||
|
||||
|
|
@ -24,7 +24,6 @@ await sandbox.process.executeCommand(
|
|||
);
|
||||
|
||||
const baseUrl = (await sandbox.getSignedPreviewUrl(3000, 4 * 60 * 60)).url;
|
||||
logInspectorUrl({ baseUrl });
|
||||
|
||||
const cleanup = async () => {
|
||||
await sandbox.delete(60);
|
||||
|
|
@ -33,10 +32,5 @@ const cleanup = async () => {
|
|||
process.once("SIGINT", cleanup);
|
||||
process.once("SIGTERM", cleanup);
|
||||
|
||||
// When running as root in a container, Claude requires interactive permission prompts (bypass mode is not supported). Set autoApprovePermissions: true to auto-approve,
|
||||
// or leave false for interactive prompts.
|
||||
await runPrompt({
|
||||
baseUrl,
|
||||
autoApprovePermissions: process.env.AUTO_APPROVE_PERMISSIONS === "true",
|
||||
});
|
||||
await runPrompt(baseUrl);
|
||||
await cleanup();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue