open, interoperable sandbox platform for agents and humans 📦 ✨
pocketenv.io
claude-code
atproto
sandbox
openclaw
agent
1import { type InferInsertModel, type InferSelectModel, sql } from "drizzle-orm";
2import { pgTable, text, timestamp, uniqueIndex } from "drizzle-orm/pg-core";
3import sandboxes from "./sandboxes";
4
5const sshKeys = pgTable(
6 "ssh_keys",
7 {
8 id: text("id").primaryKey().default(sql`xata_id()`),
9 sandboxId: text("sandbox_id")
10 .notNull()
11 .references(() => sandboxes.id),
12 publicKey: text("public_key").notNull(),
13 privateKey: text("private_key").notNull(),
14 redacted: text("redacted"),
15 createdAt: timestamp("created_at").defaultNow().notNull(),
16 },
17 (t) => [uniqueIndex("unique_sandbox_ssh_key").on(t.publicKey, t.sandboxId)],
18);
19
20export type SelectSshKey = InferSelectModel<typeof sshKeys>;
21export type InsertSshKey = InferInsertModel<typeof sshKeys>;
22
23export default sshKeys;