revert: remove command sandbox preview - #287
Conversation
WalkthroughThe command-sandbox implementation and its agent, chat, runtime, build, dependency, settings, and documentation integrations are removed. Permission handling no longer synchronizes sandbox policies, and trusted session copying excludes attachment paths. Full-access mode now requires an acknowledgement dialog before activation. Runtime capabilities and OpenCode configuration no longer expose command-sandbox fields. Localized messages, tests, packaging configuration, and verification scripts are updated accordingly. Sequence Diagram(s)sequenceDiagram
participant ChatComposer
participant ChatArea
participant FullAccessConfirmDialog
ChatComposer->>ChatArea: request full access
ChatArea->>FullAccessConfirmDialog: open confirmation
FullAccessConfirmDialog->>ChatArea: confirm acknowledgement
ChatArea->>ChatComposer: activate full_access
Possibly related PRs
🚥 Pre-merge checks | ✅ 3 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (3 passed)
✨ Finishing Touches✨ Simplify code
Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
src/routes/Chat/index.tsx (1)
317-339: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winConsider test coverage for the full-access confirmation gate.
Both sites implement the same new security-relevant flow (confirmation required before enabling full access) with no accompanying test.
src/routes/Chat/index.tsx#L317-L339: add a test assertingonPermissionModeChange("full_access")is only called afterconfirmFullAccessruns (i.e.,requestFullAccessalone must not switch the mode).src/routes/Chat/FullAccessConfirmDialog.tsx#L1-L70: add a component test asserting the confirm button is disabled until the checkbox is checked, and thatonConfirmfires only then.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/routes/Chat/index.tsx` around lines 317 - 339, The full-access confirmation gate lacks tests covering both the request flow and dialog behavior. In src/routes/Chat/index.tsx lines 317-339, add a test around requestFullAccess and confirmFullAccess verifying that requesting alone does not call onPermissionModeChange and confirmation calls it with "full_access"; in src/routes/Chat/FullAccessConfirmDialog.tsx lines 1-70, add a component test verifying the confirm button remains disabled until the checkbox is checked and onConfirm fires only after confirmation.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@src/routes/Chat/index.tsx`:
- Around line 317-339: The full-access confirmation gate lacks tests covering
both the request flow and dialog behavior. In src/routes/Chat/index.tsx lines
317-339, add a test around requestFullAccess and confirmFullAccess verifying
that requesting alone does not call onPermissionModeChange and confirmation
calls it with "full_access"; in src/routes/Chat/FullAccessConfirmDialog.tsx
lines 1-70, add a component test verifying the confirm button remains disabled
until the checkbox is checked and onConfirm fires only after confirmation.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 79dffc80-6b5b-4357-b773-d3a9b830b352
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (43)
AGENTS.mddocs/ai/README.mddocs/ai/command-sandbox-implementation.mddocs/architecture.mddocs/conventions.mddocs/key-decisions.mdelectron-builder.tselectron/agent/command-sandbox-shell.tselectron/agent/command-sandbox/broker.test.tselectron/agent/command-sandbox/broker.tselectron/agent/command-sandbox/network-address.test.tselectron/agent/command-sandbox/network-address.tselectron/agent/command-sandbox/network-proxy.test.tselectron/agent/command-sandbox/network-proxy.tselectron/agent/command-sandbox/plugin.tselectron/agent/command-sandbox/policy-reviewer.test.tselectron/agent/command-sandbox/policy-reviewer.tselectron/agent/command-sandbox/policy.test.tselectron/agent/command-sandbox/policy.tselectron/agent/command-sandbox/runtime.tselectron/agent/command-sandbox/shell-bin.test.tselectron/agent/command-sandbox/shell-bin.tselectron/agent/config.tselectron/agent/manager.test.tselectron/agent/manager.tselectron/chat/node.test.tselectron/chat/node.tselectron/chat/trusted-local-access.test.tselectron/chat/trusted-local-access.tselectron/main.tselectron/runtime/common.test.tselectron/runtime/common.tspackage.jsonpatches/@vscode__sandbox-runtime@0.0.1.patchscripts/verify-command-sandbox.tssrc/i18n/app-messages.en.tssrc/i18n/app-messages.zh.tssrc/i18n/i18n.test.tssrc/routes/Chat/FullAccessConfirmDialog.tsxsrc/routes/Chat/PermissionModePicker.tsxsrc/routes/Chat/index.tsxsrc/routes/Settings/index.tsxvite.config.ts
💤 Files with no reviewable changes (28)
- electron/agent/command-sandbox/shell-bin.test.ts
- docs/ai/command-sandbox-implementation.md
- electron/agent/command-sandbox-shell.ts
- electron/agent/command-sandbox/plugin.ts
- electron/agent/command-sandbox/broker.test.ts
- electron/agent/command-sandbox/policy.test.ts
- electron/agent/command-sandbox/network-address.test.ts
- scripts/verify-command-sandbox.ts
- electron/agent/command-sandbox/network-proxy.test.ts
- electron/agent/command-sandbox/runtime.ts
- docs/ai/README.md
- electron/agent/command-sandbox/shell-bin.ts
- electron/agent/command-sandbox/broker.ts
- AGENTS.md
- electron/agent/command-sandbox/policy-reviewer.test.ts
- electron/agent/command-sandbox/policy.ts
- vite.config.ts
- electron/agent/command-sandbox/network-proxy.ts
- electron/agent/command-sandbox/policy-reviewer.ts
- electron/agent/command-sandbox/network-address.ts
- electron/main.ts
- electron/agent/config.ts
- patches/@vscode__sandbox-runtime@0.0.1.patch
- electron/runtime/common.test.ts
- electron/chat/trusted-local-access.test.ts
- src/routes/Settings/index.tsx
- electron/runtime/common.ts
- electron/chat/node.test.ts
Summary
OO_API_KEYand managed Node environment exposed to Skill commandsWhy
The sandbox shell replaced the normal command execution environment and scrubbed or isolated values that external Registry Skills need. In particular, proxy-based Skills such as Public Social Registry execute local shell scripts after resolving credentials; those scripts need both the OOMOL session environment and Wanta's Electron-as-Node runtime. The sandbox boundary made that flow fail even though the desktop application itself was logged in.
This rollback deliberately removes the sandbox boundary instead of adding SDK-specific behavior to Wanta. Approved local commands now inherit the sidecar environment again, including managed OOMOL credentials. Default Access still keeps per-request approval checks, while Full Access remains an explicitly confirmed session-level mode.
Validation
pnpm install --frozen-lockfilepnpm formatpnpm lintpnpm ts-checkpnpm test— 281 files / 2107 tests passed before the final regression testpnpm exec vitest run electron/agent/manager.test.ts— 33 tests passed, including the new credential/runtime regressionpnpm build:appgit diff --check