| 9468 | Start by understanding their intent and working through the appropriate workflow above.`:""}`}function WrY(){rO({name:"schedule",description:"Create, update, list, or run scheduled remote agents (triggers) that execute on a cron schedule.",whenToUse:"When the user wants to schedule a recurring remote agent, set up automated tasks, create a cron job for Claude Code, or manage their scheduled agents/triggers.",userInvocable:!0,isEnabled:()=>g8("tengu_surreal_dali",!1)&&OO("allow_remote_sessions"),allowedTools:[_H6,a$],async getPromptForCommand(q,K){if(!Kq()?.accessToken)return[{type:"text",text:"You need to authenticate with a claude.ai account first. API accounts are not supported. Run /login, then try /schedule again."}];let _;try{_=await rm()}catch(P){return N(`[schedule] Failed to fetch environments: ${P}`,{level:"warn"}),[{type:"text",text:"We're having trouble connecting with your remote claude.ai account to set up a scheduled task. Please try /schedule again in a few minutes."}]}let z=null;if(_.length===0)try{z=await A5K("claude-code-default"),_=[z]}catch(P){return N(`[schedule] Failed to create environment: ${P}`,{level:"warn"}),[{type:"text",text:"No remote environments found, and we could not create one automatically. Visit https://claude.ai/code to set one up, then run /schedule again."}]}let Y=[],$=!1,A=await Dh();if(A===null)Y.push("Not in a git repo — you'll need to specify a repo URL manually (or skip repos entirely).");else if(A.host==="github.com"){let{hasAccess:P}=await H5K(A.owner,A.name);if(!P){$=!0;let D=g8("tengu_cobalt_lantern",!1)?`GitHub not connected for ${A.owner}/${A.name} — run /web-setup to sync your GitHub credentials, or install the Claude GitHub App at https://claude.ai/code/onboarding?magic=github-app-setup.`:`Claude GitHub App not installed on ${A.owner}/${A.name} — install at https://claude.ai/code/onboarding?magic=github-app-setup if your trigger needs this repo.`;Y.push(D)}}let O=HrY(K.options.mcpClients);if(O.length===0)Y.push("No MCP connectors — connect at https://claude.ai/settings/connectors if needed.");let w=Intl.DateTimeFormat().resolvedOptions().timeZone,j=MrY(O),H=await XrY(),J=["Available environments:"];for(let P of _)J.push(`- ${P.name} (id: ${P.environment_id}, kind: ${P.kind})`);let M=J.join(` |
| 9469 | `);return[{type:"text",text:PrY({userTimezone:w,connectorsInfo:j,gitRepoUrl:H,environmentsInfo:M,createdEnvironment:z,setupNotes:Y,needsGitHubAccessReminder:$,userArgs:q})}]}})}var wrY="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz",H85="What would you like to do with scheduled remote agents?";var X85=y(()=>{o1();ZD();vU();G7();_68();_8();mZ();E5();l8();oE6();WT()});var W85=`# Claude API — C# |