mirror of
https://github.com/harivansh-afk/sandbox-agent.git
synced 2026-04-18 08:02:55 +00:00
Integrate OpenHandoff factory workspace (#212)
This commit is contained in:
parent
3d9476ed0b
commit
bf282199b5
251 changed files with 42824 additions and 692 deletions
54
factory/packages/shared/src/config.ts
Normal file
54
factory/packages/shared/src/config.ts
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
import { z } from "zod";
|
||||
|
||||
export const AgentEnumSchema = z.enum(["claude", "codex"]);
|
||||
|
||||
export const NotifyBackendSchema = z.enum([
|
||||
"openclaw",
|
||||
"macos-osascript",
|
||||
"linux-notify-send",
|
||||
"terminal"
|
||||
]);
|
||||
|
||||
export const ConfigSchema = z.object({
|
||||
theme: z.string().min(1).optional(),
|
||||
auto_submit: z.boolean().default(false),
|
||||
default_agent: AgentEnumSchema.default("codex"),
|
||||
model: z.object({
|
||||
provider: z.string(),
|
||||
model: z.string()
|
||||
}).optional(),
|
||||
notify: z.array(NotifyBackendSchema).default(["terminal"]),
|
||||
workspace: z.object({
|
||||
default: z.string().min(1).default("default")
|
||||
}).default({ default: "default" }),
|
||||
backend: z.object({
|
||||
host: z.string().default("127.0.0.1"),
|
||||
port: z.number().int().min(1).max(65535).default(7741),
|
||||
dbPath: z.string().default("~/.local/share/openhandoff/handoff.db"),
|
||||
opencode_poll_interval: z.number().default(2),
|
||||
github_poll_interval: z.number().default(30),
|
||||
backup_interval_secs: z.number().default(3600),
|
||||
backup_retention_days: z.number().default(7)
|
||||
}).default({
|
||||
host: "127.0.0.1",
|
||||
port: 7741,
|
||||
dbPath: "~/.local/share/openhandoff/handoff.db",
|
||||
opencode_poll_interval: 2,
|
||||
github_poll_interval: 30,
|
||||
backup_interval_secs: 3600,
|
||||
backup_retention_days: 7
|
||||
}),
|
||||
providers: z.object({
|
||||
local: z.object({
|
||||
rootDir: z.string().optional(),
|
||||
sandboxAgentPort: z.number().int().min(1).max(65535).optional(),
|
||||
}).default({}),
|
||||
daytona: z.object({
|
||||
endpoint: z.string().optional(),
|
||||
apiKey: z.string().optional(),
|
||||
image: z.string().default("ubuntu:24.04")
|
||||
}).default({ image: "ubuntu:24.04" })
|
||||
}).default({ local: {}, daytona: { image: "ubuntu:24.04" } })
|
||||
});
|
||||
|
||||
export type AppConfig = z.infer<typeof ConfigSchema>;
|
||||
Loading…
Add table
Add a link
Reference in a new issue