chore: migrate to oxlint and oxfmt
Co-authored-by: Christoph Nakazawa <christoph.pojer@gmail.com>
This commit is contained in:
@@ -1,19 +1,10 @@
|
||||
import { z } from "zod";
|
||||
import { ToolsSchema } from "./zod-schema.agent-runtime.js";
|
||||
import {
|
||||
AgentsSchema,
|
||||
AudioSchema,
|
||||
BindingsSchema,
|
||||
BroadcastSchema,
|
||||
} from "./zod-schema.agents.js";
|
||||
import { AgentsSchema, AudioSchema, BindingsSchema, BroadcastSchema } from "./zod-schema.agents.js";
|
||||
import { HexColorSchema, ModelsConfigSchema } from "./zod-schema.core.js";
|
||||
import { HookMappingSchema, HooksGmailSchema } from "./zod-schema.hooks.js";
|
||||
import { ChannelsSchema } from "./zod-schema.providers.js";
|
||||
import {
|
||||
CommandsSchema,
|
||||
MessagesSchema,
|
||||
SessionSchema,
|
||||
} from "./zod-schema.session.js";
|
||||
import { CommandsSchema, MessagesSchema, SessionSchema } from "./zod-schema.session.js";
|
||||
|
||||
export const ClawdbotSchema = z
|
||||
.object({
|
||||
@@ -35,9 +26,7 @@ export const ClawdbotSchema = z
|
||||
lastRunVersion: z.string().optional(),
|
||||
lastRunCommit: z.string().optional(),
|
||||
lastRunCommand: z.string().optional(),
|
||||
lastRunMode: z
|
||||
.union([z.literal("local"), z.literal("remote")])
|
||||
.optional(),
|
||||
lastRunMode: z.union([z.literal("local"), z.literal("remote")]).optional(),
|
||||
})
|
||||
.optional(),
|
||||
logging: z
|
||||
@@ -68,9 +57,7 @@ export const ClawdbotSchema = z
|
||||
consoleStyle: z
|
||||
.union([z.literal("pretty"), z.literal("compact"), z.literal("json")])
|
||||
.optional(),
|
||||
redactSensitive: z
|
||||
.union([z.literal("off"), z.literal("tools")])
|
||||
.optional(),
|
||||
redactSensitive: z.union([z.literal("off"), z.literal("tools")]).optional(),
|
||||
redactPatterns: z.array(z.string()).optional(),
|
||||
})
|
||||
.optional(),
|
||||
@@ -89,10 +76,7 @@ export const ClawdbotSchema = z
|
||||
.record(
|
||||
z
|
||||
.string()
|
||||
.regex(
|
||||
/^[a-z0-9-]+$/,
|
||||
"Profile names must be alphanumeric with hyphens only",
|
||||
),
|
||||
.regex(/^[a-z0-9-]+$/, "Profile names must be alphanumeric with hyphens only"),
|
||||
z
|
||||
.object({
|
||||
cdpPort: z.number().int().min(1).max(65535).optional(),
|
||||
@@ -118,11 +102,7 @@ export const ClawdbotSchema = z
|
||||
z.string(),
|
||||
z.object({
|
||||
provider: z.string(),
|
||||
mode: z.union([
|
||||
z.literal("api_key"),
|
||||
z.literal("oauth"),
|
||||
z.literal("token"),
|
||||
]),
|
||||
mode: z.union([z.literal("api_key"), z.literal("oauth"), z.literal("token")]),
|
||||
email: z.string().optional(),
|
||||
}),
|
||||
)
|
||||
@@ -131,9 +111,7 @@ export const ClawdbotSchema = z
|
||||
cooldowns: z
|
||||
.object({
|
||||
billingBackoffHours: z.number().positive().optional(),
|
||||
billingBackoffHoursByProvider: z
|
||||
.record(z.string(), z.number().positive())
|
||||
.optional(),
|
||||
billingBackoffHoursByProvider: z.record(z.string(), z.number().positive()).optional(),
|
||||
billingMaxHours: z.number().positive().optional(),
|
||||
failureWindowHours: z.number().positive().optional(),
|
||||
})
|
||||
@@ -189,12 +167,7 @@ export const ClawdbotSchema = z
|
||||
enabled: z.boolean().optional(),
|
||||
port: z.number().int().positive().optional(),
|
||||
bind: z
|
||||
.union([
|
||||
z.literal("auto"),
|
||||
z.literal("lan"),
|
||||
z.literal("tailnet"),
|
||||
z.literal("loopback"),
|
||||
])
|
||||
.union([z.literal("auto"), z.literal("lan"), z.literal("tailnet"), z.literal("loopback")])
|
||||
.optional(),
|
||||
})
|
||||
.optional(),
|
||||
@@ -230,12 +203,7 @@ export const ClawdbotSchema = z
|
||||
port: z.number().int().positive().optional(),
|
||||
mode: z.union([z.literal("local"), z.literal("remote")]).optional(),
|
||||
bind: z
|
||||
.union([
|
||||
z.literal("auto"),
|
||||
z.literal("lan"),
|
||||
z.literal("tailnet"),
|
||||
z.literal("loopback"),
|
||||
])
|
||||
.union([z.literal("auto"), z.literal("lan"), z.literal("tailnet"), z.literal("loopback")])
|
||||
.optional(),
|
||||
controlUi: z
|
||||
.object({
|
||||
@@ -245,9 +213,7 @@ export const ClawdbotSchema = z
|
||||
.optional(),
|
||||
auth: z
|
||||
.object({
|
||||
mode: z
|
||||
.union([z.literal("token"), z.literal("password")])
|
||||
.optional(),
|
||||
mode: z.union([z.literal("token"), z.literal("password")]).optional(),
|
||||
token: z.string().optional(),
|
||||
password: z.string().optional(),
|
||||
allowTailscale: z.boolean().optional(),
|
||||
@@ -255,13 +221,7 @@ export const ClawdbotSchema = z
|
||||
.optional(),
|
||||
tailscale: z
|
||||
.object({
|
||||
mode: z
|
||||
.union([
|
||||
z.literal("off"),
|
||||
z.literal("serve"),
|
||||
z.literal("funnel"),
|
||||
])
|
||||
.optional(),
|
||||
mode: z.union([z.literal("off"), z.literal("serve"), z.literal("funnel")]).optional(),
|
||||
resetOnExit: z.boolean().optional(),
|
||||
})
|
||||
.optional(),
|
||||
@@ -314,12 +274,7 @@ export const ClawdbotSchema = z
|
||||
.object({
|
||||
preferBrew: z.boolean().optional(),
|
||||
nodeManager: z
|
||||
.union([
|
||||
z.literal("npm"),
|
||||
z.literal("pnpm"),
|
||||
z.literal("yarn"),
|
||||
z.literal("bun"),
|
||||
])
|
||||
.union([z.literal("npm"), z.literal("pnpm"), z.literal("yarn"), z.literal("bun")])
|
||||
.optional(),
|
||||
})
|
||||
.optional(),
|
||||
|
||||
Reference in New Issue
Block a user