refactor(config): share install record schema shape

This commit is contained in:
Peter Steinberger
2026-02-18 17:58:05 +00:00
parent 0dc004fd21
commit 2d55cc446a
3 changed files with 20 additions and 12 deletions

View File

@@ -4,6 +4,7 @@ import { AgentsSchema, AudioSchema, BindingsSchema, BroadcastSchema } from "./zo
import { ApprovalsSchema } from "./zod-schema.approvals.js";
import { HexColorSchema, ModelsConfigSchema } from "./zod-schema.core.js";
import { HookMappingSchema, HooksGmailSchema, InternalHooksSchema } from "./zod-schema.hooks.js";
import { InstallRecordShape } from "./zod-schema.installs.js";
import { ChannelsSchema } from "./zod-schema.providers.js";
import { sensitive } from "./zod-schema.sensitive.js";
import {
@@ -639,12 +640,7 @@ export const OpenClawSchema = z
z.string(),
z
.object({
source: z.union([z.literal("npm"), z.literal("archive"), z.literal("path")]),
spec: z.string().optional(),
sourcePath: z.string().optional(),
installPath: z.string().optional(),
version: z.string().optional(),
installedAt: z.string().optional(),
...InstallRecordShape,
})
.strict(),
)