Revert "Merge pull request #2607 from code-yeongyu/feat/openclaw-integration"
This reverts commit8213534e87, reversing changes made to84fb1113f1.
This commit is contained in:
@@ -51,7 +51,6 @@ export const HookNameSchema = z.enum([
|
||||
"anthropic-effort",
|
||||
"hashline-read-enhancer",
|
||||
"read-image-resizer",
|
||||
"openclaw-sender",
|
||||
])
|
||||
|
||||
export type HookName = z.infer<typeof HookNameSchema>
|
||||
|
||||
@@ -12,7 +12,6 @@ import { BuiltinCommandNameSchema } from "./commands"
|
||||
import { ExperimentalConfigSchema } from "./experimental"
|
||||
import { GitMasterConfigSchema } from "./git-master"
|
||||
import { NotificationConfigSchema } from "./notification"
|
||||
import { OpenClawConfigSchema } from "./openclaw"
|
||||
import { RalphLoopConfigSchema } from "./ralph-loop"
|
||||
import { RuntimeFallbackConfigSchema } from "./runtime-fallback"
|
||||
import { SkillsConfigSchema } from "./skills"
|
||||
@@ -56,7 +55,6 @@ export const OhMyOpenCodeConfigSchema = z.object({
|
||||
runtime_fallback: z.union([z.boolean(), RuntimeFallbackConfigSchema]).optional(),
|
||||
background_task: BackgroundTaskConfigSchema.optional(),
|
||||
notification: NotificationConfigSchema.optional(),
|
||||
openclaw: OpenClawConfigSchema.optional(),
|
||||
babysitting: BabysittingConfigSchema.optional(),
|
||||
git_master: GitMasterConfigSchema.optional(),
|
||||
browser_automation_engine: BrowserAutomationConfigSchema.optional(),
|
||||
|
||||
@@ -1,51 +0,0 @@
|
||||
import { z } from "zod";
|
||||
|
||||
export const OpenClawHookEventSchema = z.enum([
|
||||
"session-start",
|
||||
"session-end",
|
||||
"session-idle",
|
||||
"ask-user-question",
|
||||
"stop",
|
||||
]);
|
||||
|
||||
export const OpenClawHttpGatewayConfigSchema = z.object({
|
||||
type: z.literal("http").optional(),
|
||||
url: z.string(), // Allow looser URL validation as it might contain placeholders
|
||||
headers: z.record(z.string(), z.string()).optional(),
|
||||
method: z.enum(["POST", "PUT"]).optional(),
|
||||
timeout: z.number().optional(),
|
||||
});
|
||||
|
||||
export const OpenClawCommandGatewayConfigSchema = z.object({
|
||||
type: z.literal("command"),
|
||||
command: z.string(),
|
||||
timeout: z.number().optional(),
|
||||
});
|
||||
|
||||
export const OpenClawGatewayConfigSchema = z.union([
|
||||
OpenClawHttpGatewayConfigSchema,
|
||||
OpenClawCommandGatewayConfigSchema,
|
||||
]);
|
||||
|
||||
export const OpenClawHookMappingSchema = z.object({
|
||||
gateway: z.string(),
|
||||
instruction: z.string(),
|
||||
enabled: z.boolean(),
|
||||
});
|
||||
|
||||
export const OpenClawConfigSchema = z.object({
|
||||
enabled: z.boolean(),
|
||||
gateways: z.record(z.string(), OpenClawGatewayConfigSchema),
|
||||
hooks: z
|
||||
.object({
|
||||
"session-start": OpenClawHookMappingSchema.optional(),
|
||||
"session-end": OpenClawHookMappingSchema.optional(),
|
||||
"session-idle": OpenClawHookMappingSchema.optional(),
|
||||
"ask-user-question": OpenClawHookMappingSchema.optional(),
|
||||
stop: OpenClawHookMappingSchema.optional(),
|
||||
})
|
||||
.strict()
|
||||
.optional(),
|
||||
});
|
||||
|
||||
export type OpenClawConfig = z.infer<typeof OpenClawConfigSchema>;
|
||||
Reference in New Issue
Block a user