module.exports=[32311,99098,a=>{"use strict";var b=a.i(75211),c=a.i(15069),d=a.i(18245),e=a.i(69482),f=a.i(29855),g=a.i(8432),h=a.i(42548),i=a.i(57648);async function j(a){let b=(0,g.slugify)(a.name);if(!b.ok)return{ok:!1,error:`Invalid name: ${b.reason}`};let e=a.brief.trim();if(!e)return{ok:!1,error:"Brief is required."};let i=a.schedule_value.trim();if(!i)return{ok:!1,error:"Schedule is required."};let j=(await (0,f.listProjectAgents)(a.project_slug)).find(b=>b.template_key===a.specialist);if(!j)return{ok:!1,error:`No '${a.specialist}' agent found in project ${a.project_slug}.`};let k=j.slug,l=j.agent_id;try{let f=await (0,d.createCron)({project_slug:a.project_slug,agent_slug:k,agent_full_id:l,cron_name:b.slug,schedule:"cron"===a.schedule_kind?{kind:"cron",expr:i,tz:a.tz}:{kind:"every",duration:i},message:e});return(0,h.logAgentAction)({project_slug:a.project_slug,agent_id:l,action_type:"cron_created",summary:`Scheduled '${b.slug}' (${a.schedule_kind} ${i})`,payload:{cron_id:f.id,cron_name:f.name,brief:e}}),(0,c.revalidatePath)("/","layout"),(0,c.revalidatePath)("/","layout"),{ok:!0,cron_id:f.id,cron_name:f.name}}catch(a){return{ok:!1,error:a instanceof Error?a.message:String(a)}}}async function k(a){try{return await (0,d.disableCron)(a),(0,c.revalidatePath)("/","layout"),{ok:!0}}catch(a){return{ok:!1,error:a instanceof Error?a.message:String(a)}}}async function l(a){try{return await (0,d.enableCron)(a),(0,c.revalidatePath)("/","layout"),{ok:!0}}catch(a){return{ok:!1,error:a instanceof Error?a.message:String(a)}}}async function m(a){try{return await (0,d.removeCron)(a),(0,c.revalidatePath)("/","layout"),{ok:!0}}catch(a){return{ok:!1,error:a instanceof Error?a.message:String(a)}}}async function n(a,b){let f=b.trim();if(!f)return{ok:!1,error:"Prompt cannot be empty."};try{return await (0,e.updateCronMessage)(a,f),(0,d.invalidateCronCache)(),(0,c.revalidatePath)("/","layout"),{ok:!0}}catch(a){return{ok:!1,error:a instanceof Error?a.message:String(a)}}}(0,i.ensureServerEntryExports)([j,k,l,m,n]),(0,b.registerServerReference)(j,"40dd21d6db46808e1a47fa10420a1042744668800e",null),(0,b.registerServerReference)(k,"408c65b62cead68aa991ac8a1f38c1889731d89e7c",null),(0,b.registerServerReference)(l,"401475dce6ad58cf4db4e298148c4bfe78a6022360",null),(0,b.registerServerReference)(m,"40b6b96935472689e01cdccf4b144181d25d6c00e6",null),(0,b.registerServerReference)(n,"60a0ff474623eb0e72b434508303bd7f65d6e82a76",null),a.s(["deleteCronAction",0,m,"pauseCronAction",0,k,"resumeCronAction",0,l,"scheduleCronAction",0,j,"updateCronPromptAction",0,n],32311);var o=a.i(24771);async function p(a,b,c=100){try{let e=(0,d.loadCronRuns)(a,c).map(a=>({...a,owning_occurrence_at_ms:b?(0,o.tickAtOrBefore)(b,a.run_at_ms):void 0}));return{ok:!0,runs:e}}catch(a){return{ok:!1,error:a instanceof Error?a.message:String(a)}}}(0,i.ensureServerEntryExports)([p]),(0,b.registerServerReference)(p,"700451ad067a913b2dff4df6fbadb789593876c3c1",null),a.s(["getCronRunsAction",0,p],99098)},46767,a=>{"use strict";var b=a.i(56963),c=a.i(31806),d=a.i(32311),e=a.i(99098);a.s([],95317),a.i(95317),a.s(["003b2f2b7aa811e2a0171d110c2fea96ef3c8752fd",()=>c.listProjectAgentsAction,"0080551f846a8a446405ef54005e5ee92cb1170cea",()=>c.listOpenClawAgentsAction,"4001f3d2265bf9517aef1249ed9fedb18f85bb0bb6",()=>c.createAgentAction,"401475dce6ad58cf4db4e298148c4bfe78a6022360",()=>d.resumeCronAction,"40874ac941afbf59ecef4f3ffd8d323bc44d8dc1bd",()=>c.disableCronsAction,"408c65b62cead68aa991ac8a1f38c1889731d89e7c",()=>d.pauseCronAction,"409960037ddbb851eb634b8fdbb6fe7cc9cb749ae9",()=>b.switchProjectAction,"40b6b96935472689e01cdccf4b144181d25d6c00e6",()=>d.deleteCronAction,"40dd21d6db46808e1a47fa10420a1042744668800e",()=>d.scheduleCronAction,"40f3f75ea52bd131779b5f0a148c4344e062e2c1b5",()=>c.cloneAgentAction,"60a0ff474623eb0e72b434508303bd7f65d6e82a76",()=>d.updateCronPromptAction,"700451ad067a913b2dff4df6fbadb789593876c3c1",()=>e.getCronRunsAction],46767)},54786,a=>{a.v(a=>Promise.resolve().then(()=>a(69482)))},30859,a=>{a.v(a=>Promise.resolve().then(()=>a(6105)))},64708,a=>{a.v(b=>Promise.all(["server/chunks/ssr/src_server_onboarding_cmo-task-brief_ts_0gatf~b._.js"].map(b=>a.l(b))).then(()=>b(77469)))},9043,a=>{a.v(a=>Promise.resolve().then(()=>a(19078)))},45689,a=>{a.v(b=>Promise.all(["server/chunks/ssr/src_server_orchestration_0mbkr4-._.js"].map(b=>a.l(b))).then(()=>b(65454)))}];

//# sourceMappingURL=_0osb1~b._.js.map