diff --git a/README.md b/README.md index d87082c..8b48fc4 100644 --- a/README.md +++ b/README.md @@ -47,7 +47,6 @@ The repo is split into a bot, a worker, and a handful of focused packages: - `packages/rag`: archives, chunking, embedding backends, retrieval, vector stores - `packages/config`: environment-driven configuration - `packages/shared`: shared contracts and types -- `packages/sandbox`: policy-first sandbox scaffolding The durable local state is split on purpose: Postgres holds jobs, audit events, and interaction memory, while `.voidbot/` keeps artifacts, archives, logs, and detached indexing status. @@ -702,7 +701,6 @@ Useful local state and docs: - the Discord-safe owner lane is read-only - the bot does not expose arbitrary shell execution - deeper tasks are handed off instead of turning Discord into a cursed remote terminal -- sandbox support is still policy-first and dry-run only - `manual_package` remains available when you want explicit review points ## Development Roadmap @@ -712,7 +710,6 @@ Reasonable next steps from here: 1. Add a real scheduled restore drill instead of stopping at backup verification and freshness checks. 2. Expand worker processing into richer provider run records, moderation hooks, and admin inspection tools. 3. Replace the remaining scaffolded provider paths with funded, production-grade implementations. -4. Add real constrained sandbox execution instead of policy-only dry runs. ## Related Docs diff --git a/docs/architecture/overview.md b/docs/architecture/overview.md index ab1db34..8a6488b 100644 --- a/docs/architecture/overview.md +++ b/docs/architecture/overview.md @@ -24,7 +24,6 @@ Discord Gateway - `packages/core` contains permissions, context assembly, Postgres-backed state storage, style loading, and the rotating system message catalog. - `packages/providers` isolates provider contracts from Discord code. - `packages/rag` contains the message archive, chunking pipeline, local embedding backends, pluggable vector-store backends, and log import state. -- `packages/sandbox` defines policy profiles and a dry-run policy runner. VoidBot's Verse-facing service contract lives in `docs/architecture/voidbot-verse-service-contract.md`. The short version: @@ -68,4 +67,3 @@ surfaces; Eve/CultUI is the presentation contract. 5. Add a true restore drill path instead of stopping at backup verification plus freshness monitoring. 6. Add moderation, budgeting, and rate limits before enabling `openai_api` for member traffic. 7. Expand worker-side run records and admin tooling around the interaction memory/event stores. -8. Expand sandbox execution from dry-run policy checks to real constrained runners. diff --git a/package-lock.json b/package-lock.json index 985b03e..3b23989 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1177,10 +1177,6 @@ "resolved": "packages/rag", "link": true }, - "node_modules/@voidbot/sandbox": { - "resolved": "packages/sandbox", - "link": true - }, "node_modules/@voidbot/shared": { "resolved": "packages/shared", "link": true @@ -2814,7 +2810,6 @@ "name": "@voidbot/core", "version": "0.1.0", "dependencies": { - "@msgpack/msgpack": "^3.1.3", "@voidbot/shared": "0.1.0", "cultcache-ts": "file:../../vendor/cultcache-ts", "pg": "^8.20.0", @@ -2836,13 +2831,6 @@ "@voidbot/shared": "0.1.0" } }, - "packages/sandbox": { - "name": "@voidbot/sandbox", - "version": "0.1.0", - "dependencies": { - "@voidbot/shared": "0.1.0" - } - }, "packages/shared": { "name": "@voidbot/shared", "version": "0.1.0" diff --git a/package.json b/package.json index 08ad760..41b474f 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,6 @@ "state:check": "powershell -ExecutionPolicy Bypass -File scripts/check-voidbot-operations.ps1", "state:dashboard": "powershell -ExecutionPolicy Bypass -File scripts/render-voidbot-operations-dashboard.ps1 -Open", "state:render-dashboard": "powershell -ExecutionPolicy Bypass -File scripts/render-voidbot-operations-dashboard.ps1", - "swarm:dashboard": "node scripts/render-voidbot-swarm-dashboard.mjs", "swarm:render-dashboard": "node scripts/render-voidbot-swarm-dashboard.mjs", "verse:advertisements": "node scripts/export-voidbot-provider-advertisements.mjs", "verse:advertisements:check": "node scripts/export-voidbot-provider-advertisements.mjs --check", diff --git a/packages/core/package.json b/packages/core/package.json index cf5d6e9..932e59e 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -5,7 +5,6 @@ "main": "dist/index.js", "types": "dist/index.d.ts", "dependencies": { - "@msgpack/msgpack": "^3.1.3", "@voidbot/shared": "0.1.0", "cultcache-ts": "file:../../vendor/cultcache-ts", "pg": "^8.20.0", diff --git a/packages/sandbox/package.json b/packages/sandbox/package.json deleted file mode 100644 index 7eaf03d..0000000 --- a/packages/sandbox/package.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "name": "@voidbot/sandbox", - "version": "0.1.0", - "private": true, - "main": "dist/index.js", - "types": "dist/index.d.ts", - "dependencies": { - "@voidbot/shared": "0.1.0" - } -} diff --git a/packages/sandbox/src/index.ts b/packages/sandbox/src/index.ts deleted file mode 100644 index d5b8d21..0000000 --- a/packages/sandbox/src/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -export * from "./policy-runner"; -export * from "./profiles"; - diff --git a/packages/sandbox/src/policy-runner.ts b/packages/sandbox/src/policy-runner.ts deleted file mode 100644 index 3608868..0000000 --- a/packages/sandbox/src/policy-runner.ts +++ /dev/null @@ -1,59 +0,0 @@ -import { - type SandboxCommandRequest, - type SandboxExecutionResult, - type SandboxProfileName, -} from "@voidbot/shared"; - -import { defaultSandboxProfiles } from "./profiles"; - -export class PolicySandboxRunner { - public getProfile(profileName: SandboxProfileName) { - return defaultSandboxProfiles[profileName]; - } - - public async run(request: SandboxCommandRequest): Promise { - const profile = this.getProfile(request.profile); - - if (!profile.allowedCommands.includes(request.command)) { - return { - status: "denied", - stdout: "", - stderr: "", - exitCode: 1, - deniedReason: `Command "${request.command}" is not allowed for profile "${request.profile}".`, - dryRun: true, - }; - } - - if (request.networkAccess && !profile.networkAccess) { - return { - status: "denied", - stdout: "", - stderr: "", - exitCode: 1, - deniedReason: `Profile "${request.profile}" does not permit network access.`, - dryRun: true, - }; - } - - if (profile.requiresApproval && !request.approved) { - return { - status: "denied", - stdout: "", - stderr: "", - exitCode: 1, - deniedReason: `Profile "${request.profile}" requires explicit approval before execution.`, - dryRun: true, - }; - } - - return { - status: "planned", - stdout: "", - stderr: "", - exitCode: 0, - dryRun: true, - }; - } -} - diff --git a/packages/sandbox/src/profiles.ts b/packages/sandbox/src/profiles.ts deleted file mode 100644 index 935758a..0000000 --- a/packages/sandbox/src/profiles.ts +++ /dev/null @@ -1,32 +0,0 @@ -import { type SandboxProfile, type SandboxProfileName } from "@voidbot/shared"; - -export const defaultSandboxProfiles: Record = { - read_only_lookup: { - name: "read_only_lookup", - allowedCommands: ["lookup", "search_index"], - networkAccess: false, - timeoutMs: 5000, - requiresApproval: false, - }, - rag_maintenance: { - name: "rag_maintenance", - allowedCommands: ["reindex_channel", "backfill_embeddings"], - networkAccess: false, - timeoutMs: 30000, - requiresApproval: true, - }, - owner_workflow: { - name: "owner_workflow", - allowedCommands: ["prepare_manual_bundle", "publish_owner_reply"], - networkAccess: false, - timeoutMs: 30000, - requiresApproval: true, - }, - public_low_risk: { - name: "public_low_risk", - allowedCommands: ["summarize_channel", "search_history", "search_sources"], - networkAccess: false, - timeoutMs: 10000, - requiresApproval: false, - }, -}; diff --git a/packages/sandbox/tsconfig.json b/packages/sandbox/tsconfig.json deleted file mode 100644 index 2a65163..0000000 --- a/packages/sandbox/tsconfig.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "extends": "../../tsconfig.base.json", - "compilerOptions": { - "composite": true, - "rootDir": "src", - "outDir": "dist" - }, - "include": [ - "src/**/*.ts" - ], - "references": [ - { - "path": "../shared" - } - ] -} - diff --git a/tsconfig.json b/tsconfig.json index cef896a..ca4ad1b 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -16,9 +16,6 @@ { "path": "./packages/rag" }, - { - "path": "./packages/sandbox" - }, { "path": "./apps/bot" },