feat(agent): integrate sandboxed bash tool and sandbox settings

This commit is contained in:
yiling
2026-05-20 10:36:47 +08:00
parent 9cad96210c
commit 53594194cc
32 changed files with 2205 additions and 110 deletions
@@ -0,0 +1,16 @@
-- CreateTable
CREATE TABLE "sandboxes" (
"id" TEXT NOT NULL,
"allowedDomains" TEXT[] DEFAULT ARRAY['github.com', 'api.github.com', 'raw.githubusercontent.com']::TEXT[],
"created_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updated_at" TIMESTAMP(3) NOT NULL,
"team_id" TEXT NOT NULL,
CONSTRAINT "sandboxes_pkey" PRIMARY KEY ("id")
);
-- CreateIndex
CREATE UNIQUE INDEX "sandboxes_team_id_key" ON "sandboxes"("team_id");
-- AddForeignKey
ALTER TABLE "sandboxes" ADD CONSTRAINT "sandboxes_team_id_fkey" FOREIGN KEY ("team_id") REFERENCES "teams"("id") ON DELETE CASCADE ON UPDATE CASCADE;
+13
View File
@@ -219,10 +219,23 @@ model Team {
userMetadata UserMetadata[] @relation("TeamToUserMetadata")
providers Provider[] @relation("TeamToProvider")
skills Skill[] @relation("TeamToSkill")
sandbox Sandbox? @relation("TeamToSandbox")
@@map("teams")
}
model Sandbox {
id String @id @default(ulid())
allowedDomains String[] @default(["github.com", "api.github.com", "raw.githubusercontent.com"])
createdAt DateTime @default(now()) @map("created_at")
updatedAt DateTime @updatedAt @map("updated_at")
teamId String @unique @map("team_id")
team Team @relation("TeamToSandbox", fields: [teamId], references: [id], onDelete: Cascade)
@@map("sandboxes")
}
model Skill {
id String @id @default(ulid())
name String