Skip to content

Restore sandbox package behavior#1560

Merged
parteeksingh24 merged 1 commit into
mainfrom
fix/explorer-package-rollback
Jun 13, 2026
Merged

Restore sandbox package behavior#1560
parteeksingh24 merged 1 commit into
mainfrom
fix/explorer-package-rollback

Conversation

@parteeksingh24

@parteeksingh24 parteeksingh24 commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Summary

Restores the sandbox package files changed by #1559 and keeps the SDK Explorer fix scoped to the docs app.

  • Restores packages/core/src/services/sandbox/execute.ts to pre-merge behavior
  • Restores packages/core/src/services/sandbox/run.ts to pre-merge behavior
  • Restores packages/server/test/sandbox-client.test.ts to pre-merge behavior
  • Writes Explorer script files from docs/src/api/sandbox/route.ts before calling sandboxExecute()
  • Updates the docs route test so sandboxExecute() is called without inline files

Why

#1559 fixed the Explorer hang, but it also changed package-level sandbox behavior. That was too broad for a docs Explorer bug.

The safer correction is to keep package APIs and behavior unchanged, then make the Explorer route do its own staging:

await sandboxWriteFiles(client, {
  sandboxId,
  files,
  orgId,
});

const execution = await sandboxExecute(client, {
  sandboxId,
  options: { command, timeout: SANDBOX_EXEC_TIMEOUT },
  orgId,
});

That keeps the workaround at the call site that needs it.

Verification

  • git diff --check
  • bun test src/api/test/sandbox-route.test.ts
  • bunx biome check docs/src/api/sandbox/route.ts docs/src/api/test/sandbox-route.test.ts packages/core/src/services/sandbox/execute.ts packages/core/src/services/sandbox/run.ts packages/server/test/sandbox-client.test.ts
  • cd docs && bun run typecheck
  • cd packages/core && bun run typecheck
  • cd packages/server && bun run typecheck
  • Verified package files match the pre-Fix SDK Explorer sandbox execution hangs #1559 merge commit byte-for-byte

Summary by CodeRabbit

  • Refactor
    • Optimized sandbox file upload and execution handling to process file uploads and output streaming concurrently, reducing execution latency.
    • Improved test coverage for file upload scenarios in sandbox execution workflows.

- Move Explorer file staging into the docs route
- Restore sandbox package files to pre-merge behavior
- Keep Explorer route regression coverage docs-scoped
@agentuity-agent

agentuity-agent Bot commented Jun 12, 2026

Copy link
Copy Markdown

The latest Agentuity deployment details.

Project Deployment Preview Updated (UTC)
docs 🔴 Failed (deploy_39ae22f5df39cdc4a76f88ebff734050) - 2026-06-13T00:01:12Z

@coderabbitai

coderabbitai Bot commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Caution

Review failed

Pull request was closed or merged during review

📝 Walkthrough

Walkthrough

Files are now base64-encoded and sent directly in sandbox execute requests instead of being staged separately. The route layer calls sandboxWriteFiles before execute, execution and stream draining happen in parallel, and tests verify the new inline-file behavior throughout the stack.

Changes

Sandbox inline file encoding and execution

Layer / File(s) Summary
Execute service with inline base64-encoded files
packages/core/src/services/sandbox/execute.ts
sandboxExecute replaces file staging with direct base64 encoding in the request body. Staging helpers, cleanup infrastructure, and cleanup paths in error/non-success handling are removed.
Parallel execution and stream draining
packages/core/src/services/sandbox/run.ts
Execution completion and output-stream draining are now awaited concurrently via Promise.all, removing sequential execution-first and conditional abort logic.
Route integration with sandboxWriteFiles
docs/src/api/sandbox/route.ts
The route imports and calls sandboxWriteFiles to upload files before sandboxExecute, removing files from the execute options.
Route test mocking for file uploads
docs/src/api/test/sandbox-route.test.ts
Test suite adds SandboxWriteFilesParams, a mock implementation with call tracking, and assertions verifying sandboxWriteFiles is invoked with the correct files before sandboxExecute is called with options.files undefined.
Client test updates for execute and stream behavior
packages/server/test/sandbox-client.test.ts
Execute tests now verify base64-encoded files are sent inline in the request body. Stream-handling and output-capture tests are refactored to reflect parallel execution and new output normalization.
🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@parteeksingh24 parteeksingh24 enabled auto-merge (squash) June 12, 2026 23:59
@github-actions

Copy link
Copy Markdown

📦 Canary Packages Published

version: 3.0.8-42073a2

Packages
Package Version URL
@agentuity/vector 3.0.8-42073a2 https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.8-42073a2/agentuity-vector-3.0.8-42073a2.tgz
@agentuity/server 3.0.8-42073a2 https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.8-42073a2/agentuity-server-3.0.8-42073a2.tgz
@agentuity/sandbox 3.0.8-42073a2 https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.8-42073a2/agentuity-sandbox-3.0.8-42073a2.tgz
@agentuity/analytics 3.0.8-42073a2 https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.8-42073a2/agentuity-analytics-3.0.8-42073a2.tgz
@agentuity/core 3.0.8-42073a2 https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.8-42073a2/agentuity-core-3.0.8-42073a2.tgz
@agentuity/telemetry 3.0.8-42073a2 https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.8-42073a2/agentuity-telemetry-3.0.8-42073a2.tgz
@agentuity/local 3.0.8-42073a2 https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.8-42073a2/agentuity-local-3.0.8-42073a2.tgz
@agentuity/cli 3.0.8-42073a2 https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.8-42073a2/agentuity-cli-3.0.8-42073a2.tgz
@agentuity/postgres 3.0.8-42073a2 https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.8-42073a2/agentuity-postgres-3.0.8-42073a2.tgz
@agentuity/runtime 3.0.8-42073a2 https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.8-42073a2/agentuity-runtime-3.0.8-42073a2.tgz
@agentuity/storage 3.0.8-42073a2 https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.8-42073a2/agentuity-storage-3.0.8-42073a2.tgz
@agentuity/aigateway 3.0.8-42073a2 https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.8-42073a2/agentuity-aigateway-3.0.8-42073a2.tgz
@agentuity/claude-code 3.0.8-42073a2 https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.8-42073a2/agentuity-claude-code-3.0.8-42073a2.tgz
@agentuity/email 3.0.8-42073a2 https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.8-42073a2/agentuity-email-3.0.8-42073a2.tgz
@agentuity/adapter 3.0.8-42073a2 https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.8-42073a2/agentuity-adapter-3.0.8-42073a2.tgz
@agentuity/hono 3.0.8-42073a2 https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.8-42073a2/agentuity-hono-3.0.8-42073a2.tgz
@agentuity/keyvalue 3.0.8-42073a2 https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.8-42073a2/agentuity-keyvalue-3.0.8-42073a2.tgz
@agentuity/schema 3.0.8-42073a2 https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.8-42073a2/agentuity-schema-3.0.8-42073a2.tgz
@agentuity/task 3.0.8-42073a2 https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.8-42073a2/agentuity-task-3.0.8-42073a2.tgz
@agentuity/webhook 3.0.8-42073a2 https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.8-42073a2/agentuity-webhook-3.0.8-42073a2.tgz
@agentuity/db 3.0.8-42073a2 https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.8-42073a2/agentuity-db-3.0.8-42073a2.tgz
@agentuity/migrate 3.0.8-42073a2 https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.8-42073a2/agentuity-migrate-3.0.8-42073a2.tgz
@agentuity/vite 3.0.8-42073a2 https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.8-42073a2/agentuity-vite-3.0.8-42073a2.tgz
@agentuity/queue 3.0.8-42073a2 https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.8-42073a2/agentuity-queue-3.0.8-42073a2.tgz
@agentuity/opencode 3.0.8-42073a2 https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.8-42073a2/agentuity-opencode-3.0.8-42073a2.tgz
@agentuity/coder 3.0.8-42073a2 https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.8-42073a2/agentuity-coder-3.0.8-42073a2.tgz
@agentuity/stream 3.0.8-42073a2 https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.8-42073a2/agentuity-stream-3.0.8-42073a2.tgz
@agentuity/coder-tui 3.0.8-42073a2 https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.8-42073a2/agentuity-coder-tui-3.0.8-42073a2.tgz
@agentuity/schedule 3.0.8-42073a2 https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.8-42073a2/agentuity-schedule-3.0.8-42073a2.tgz
@agentuity/drizzle 3.0.8-42073a2 https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.8-42073a2/agentuity-drizzle-3.0.8-42073a2.tgz
create-agentuity 3.0.8-42073a2 https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.8-42073a2/create-agentuity-3.0.8-42073a2.tgz
@agentuity/pi 3.0.8-42073a2 https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.8-42073a2/agentuity-pi-3.0.8-42073a2.tgz
Install

Add to your package.json:

{
  "dependencies": {
    "@agentuity/vector": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.8-42073a2/agentuity-vector-3.0.8-42073a2.tgz",
    "@agentuity/server": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.8-42073a2/agentuity-server-3.0.8-42073a2.tgz",
    "@agentuity/sandbox": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.8-42073a2/agentuity-sandbox-3.0.8-42073a2.tgz",
    "@agentuity/analytics": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.8-42073a2/agentuity-analytics-3.0.8-42073a2.tgz",
    "@agentuity/core": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.8-42073a2/agentuity-core-3.0.8-42073a2.tgz",
    "@agentuity/telemetry": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.8-42073a2/agentuity-telemetry-3.0.8-42073a2.tgz",
    "@agentuity/local": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.8-42073a2/agentuity-local-3.0.8-42073a2.tgz",
    "@agentuity/cli": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.8-42073a2/agentuity-cli-3.0.8-42073a2.tgz",
    "@agentuity/postgres": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.8-42073a2/agentuity-postgres-3.0.8-42073a2.tgz",
    "@agentuity/runtime": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.8-42073a2/agentuity-runtime-3.0.8-42073a2.tgz",
    "@agentuity/storage": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.8-42073a2/agentuity-storage-3.0.8-42073a2.tgz",
    "@agentuity/aigateway": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.8-42073a2/agentuity-aigateway-3.0.8-42073a2.tgz",
    "@agentuity/claude-code": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.8-42073a2/agentuity-claude-code-3.0.8-42073a2.tgz",
    "@agentuity/email": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.8-42073a2/agentuity-email-3.0.8-42073a2.tgz",
    "@agentuity/adapter": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.8-42073a2/agentuity-adapter-3.0.8-42073a2.tgz",
    "@agentuity/hono": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.8-42073a2/agentuity-hono-3.0.8-42073a2.tgz",
    "@agentuity/keyvalue": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.8-42073a2/agentuity-keyvalue-3.0.8-42073a2.tgz",
    "@agentuity/schema": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.8-42073a2/agentuity-schema-3.0.8-42073a2.tgz",
    "@agentuity/task": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.8-42073a2/agentuity-task-3.0.8-42073a2.tgz",
    "@agentuity/webhook": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.8-42073a2/agentuity-webhook-3.0.8-42073a2.tgz",
    "@agentuity/db": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.8-42073a2/agentuity-db-3.0.8-42073a2.tgz",
    "@agentuity/migrate": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.8-42073a2/agentuity-migrate-3.0.8-42073a2.tgz",
    "@agentuity/vite": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.8-42073a2/agentuity-vite-3.0.8-42073a2.tgz",
    "@agentuity/queue": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.8-42073a2/agentuity-queue-3.0.8-42073a2.tgz",
    "@agentuity/opencode": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.8-42073a2/agentuity-opencode-3.0.8-42073a2.tgz",
    "@agentuity/coder": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.8-42073a2/agentuity-coder-3.0.8-42073a2.tgz",
    "@agentuity/stream": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.8-42073a2/agentuity-stream-3.0.8-42073a2.tgz",
    "@agentuity/coder-tui": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.8-42073a2/agentuity-coder-tui-3.0.8-42073a2.tgz",
    "@agentuity/schedule": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.8-42073a2/agentuity-schedule-3.0.8-42073a2.tgz",
    "@agentuity/drizzle": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.8-42073a2/agentuity-drizzle-3.0.8-42073a2.tgz",
    "create-agentuity": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.8-42073a2/create-agentuity-3.0.8-42073a2.tgz",
    "@agentuity/pi": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.8-42073a2/agentuity-pi-3.0.8-42073a2.tgz"
  }
}

Or install directly:

bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.8-42073a2/agentuity-vector-3.0.8-42073a2.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.8-42073a2/agentuity-server-3.0.8-42073a2.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.8-42073a2/agentuity-sandbox-3.0.8-42073a2.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.8-42073a2/agentuity-analytics-3.0.8-42073a2.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.8-42073a2/agentuity-core-3.0.8-42073a2.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.8-42073a2/agentuity-telemetry-3.0.8-42073a2.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.8-42073a2/agentuity-local-3.0.8-42073a2.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.8-42073a2/agentuity-cli-3.0.8-42073a2.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.8-42073a2/agentuity-postgres-3.0.8-42073a2.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.8-42073a2/agentuity-runtime-3.0.8-42073a2.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.8-42073a2/agentuity-storage-3.0.8-42073a2.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.8-42073a2/agentuity-aigateway-3.0.8-42073a2.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.8-42073a2/agentuity-claude-code-3.0.8-42073a2.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.8-42073a2/agentuity-email-3.0.8-42073a2.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.8-42073a2/agentuity-adapter-3.0.8-42073a2.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.8-42073a2/agentuity-hono-3.0.8-42073a2.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.8-42073a2/agentuity-keyvalue-3.0.8-42073a2.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.8-42073a2/agentuity-schema-3.0.8-42073a2.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.8-42073a2/agentuity-task-3.0.8-42073a2.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.8-42073a2/agentuity-webhook-3.0.8-42073a2.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.8-42073a2/agentuity-db-3.0.8-42073a2.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.8-42073a2/agentuity-migrate-3.0.8-42073a2.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.8-42073a2/agentuity-vite-3.0.8-42073a2.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.8-42073a2/agentuity-queue-3.0.8-42073a2.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.8-42073a2/agentuity-opencode-3.0.8-42073a2.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.8-42073a2/agentuity-coder-3.0.8-42073a2.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.8-42073a2/agentuity-stream-3.0.8-42073a2.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.8-42073a2/agentuity-coder-tui-3.0.8-42073a2.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.8-42073a2/agentuity-schedule-3.0.8-42073a2.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.8-42073a2/agentuity-drizzle-3.0.8-42073a2.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.8-42073a2/create-agentuity-3.0.8-42073a2.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.0.8-42073a2/agentuity-pi-3.0.8-42073a2.tgz

@parteeksingh24 parteeksingh24 merged commit f2a5f6a into main Jun 13, 2026
27 of 30 checks passed
@parteeksingh24 parteeksingh24 deleted the fix/explorer-package-rollback branch June 13, 2026 00:03
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