mirror of
https://github.com/chriswritescode-dev/opencode-manager.git
synced 2026-12-06 04:44:21 +01:00
Refactor schedule service and add cron support
This commit is contained in:
1 parent
dbf48d4691
commit
47524876aa
24 files changed
+652
-139
No files matched your search
@@ -8,3 +8,4 @@ export * from './notifications'
|
||||
export * from './ssh'
|
||||
export * from './memory'
|
||||
export * from './schedule'
|
||||
export * from './skills'
|
||||
@@ -60,7 +60,7 @@ const ScheduleJobBaseRequestSchema = z.object({
|
||||
agentSlug: z.string().min(1).max(100).optional(),
|
||||
prompt: z.string().min(1).max(20000),
|
||||
model: z.string().min(1).max(200).optional(),
|
||||
skillMetadata: ScheduleSkillMetadataSchema.optional(),
|
||||
skillMetadata: ScheduleSkillMetadataSchema.nullable().optional(),
|
||||
})
|
||||
|
||||
export const CreateScheduleJobRequestSchema = z.discriminatedUnion('scheduleMode', [
|
||||
|
||||
@@ -198,6 +198,10 @@ export const OpenCodeConfigSchema = z.object({
|
||||
disabled_providers: z.array(z.string()).optional(),
|
||||
share: z.enum(["manual", "auto", "disabled"]).optional(),
|
||||
plugin: z.array(z.string()).optional(),
|
||||
skills: z.object({
|
||||
paths: z.array(z.string()).optional(),
|
||||
urls: z.array(z.string()).optional(),
|
||||
}).optional(),
|
||||
}).strip();
|
||||
|
||||
export type OpenCodeConfigContent = z.infer<typeof OpenCodeConfigSchema>;
|
||||
|
||||
@@ -113,3 +113,19 @@ export type {
|
||||
CreatePromptTemplateRequest,
|
||||
UpdatePromptTemplateRequest,
|
||||
} from '../schemas/schedule'
|
||||
|
||||
export type {
|
||||
SkillScope,
|
||||
SkillFrontmatter,
|
||||
CreateSkillRequest,
|
||||
UpdateSkillRequest,
|
||||
SkillFileInfo,
|
||||
} from '../schemas/skills'
|
||||
export {
|
||||
SKILL_NAME_REGEX,
|
||||
SkillNameSchema,
|
||||
SkillScopeSchema,
|
||||
SkillFrontmatterSchema,
|
||||
CreateSkillRequestSchema,
|
||||
UpdateSkillRequestSchema,
|
||||
} from '../schemas/skills'
|
||||
Reference in new issue
Block a user