MCPcopy Create free account
hub / github.com/ChinaSiro/claude-code-sourcemap / PrY

Function PrY

package/cli.js:9303–9467  ·  view source on GitHub ↗
(q)

Source from the content-addressed store, hash-verified

9301 /loop check the deploy every 20m`});var M85={};T8(M85,{registerScheduleRemoteAgentsSkill:()=>WrY});function jrY(q){if(!q.startsWith("mcpsrv_"))return null;let z=q.slice(7).slice(2),Y=0n;for(let A of z){let O=wrY.indexOf(A);if(O===-1)return null;Y=Y*58n+BigInt(O)}let $=Y.toString(16).padStart(32,"0");return`${$.slice(0,8)}-${$.slice(8,12)}-${$.slice(12,16)}-${$.slice(16,20)}-${$.slice(20,32)}`}function HrY(q){let K=[];for(let _ of q){if(_.type!=="connected")continue;if(_.config.type!=="claudeai-proxy")continue;let z=jrY(_.config.id);if(!z)continue;K.push({uuid:z,name:_.name,url:_.config.url})}return K}function JrY(q){return q.replace(/^claude[.\s-]ai[.\s-]/i,"").replace(/[^a-zA-Z0-9_-]/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,"")}function MrY(q){if(q.length===0)return"No connected MCP connectors found. The user may need to connect servers at https://claude.ai/settings/connectors";let K=["Connected connectors (available for triggers):"];for(let _ of q){let z=JrY(_.name);K.push(`- ${_.name} (connector_uuid: ${_.uuid}, name: ${z}, url: ${_.url})`)}return K.join(`
9302`)}function J85(q){return`⚠ Heads-up:
9303${q.map((_)=>`- ${_}`).join(`
9304`)}`}async function XrY(){let q=await EB();if(!q)return null;let K=P_6(q);if(!K)return null;return`https://${K.host}/${K.owner}/${K.name}`}function PrY(q){let{userTimezone:K,connectorsInfo:_,gitRepoUrl:z,environmentsInfo:Y,createdEnvironment:$,setupNotes:A,needsGitHubAccessReminder:O,userArgs:w}=q,j=w&&A.length>0?`
9305## Setup Notes
9306
9307${J85(A)}
9308`:"",H=A.length>0?`${J85(A)}
9309
9310${H85}`:H85;return`# Schedule Remote Agents
9311
9312You are helping the user schedule, update, list, or run **remote** Claude Code agents. These are NOT local cron jobs — each trigger spawns a fully isolated remote session (CCR) in Anthropic's cloud infrastructure on a cron schedule. The agent runs in a sandboxed environment with its own git checkout, tools, and optional MCP connections.
9313
9314## First Step
9315
9316${w?"The user has already told you what they want (see User Request at the bottom). Skip the initial question and go directly to the matching workflow.":`Your FIRST action must be a single ${a$} tool call (no preamble). Use this EXACT string for the \`question\` field — do not paraphrase or shorten it:
9317
9318${g6(H)}
9319
9320Set \`header: "Action"\` and offer the four actions (create/list/update/run) as options. After the user picks, follow the matching workflow below.`}
9321${j}
9322
9323## What You Can Do
9324
9325Use the \`${_H6}\` tool (load it first with \`ToolSearch select:${_H6}\`; auth is handled in-process — do not use curl):
9326
9327- \`{action: "list"}\` — list all triggers
9328- \`{action: "get", trigger_id: "..."}\` — fetch one trigger
9329- \`{action: "create", body: {...}}\` — create a trigger
9330- \`{action: "update", trigger_id: "...", body: {...}}\` — partial update
9331- \`{action: "run", trigger_id: "..."}\` — run a trigger now
9332
9333You CANNOT delete triggers. If the user asks to delete, direct them to: https://claude.ai/code/scheduled
9334
9335## Create body shape
9336
9337\`\`\`json
9338{
9339 "name": "AGENT_NAME",
9340 "cron_expression": "CRON_EXPR",
9341 "enabled": true,
9342 "job_config": {
9343 "ccr": {
9344 "environment_id": "ENVIRONMENT_ID",
9345 "session_context": {
9346 "model": "claude-sonnet-4-6",
9347 "sources": [
9348 {"git_repository": {"url": "${z||"https://github.com/ORG/REPO"}"}}
9349 ],
9350 "allowed_tools": ["Bash", "Read", "Write", "Edit", "Glob", "Grep"]
9351 },
9352 "events": [
9353 {"data": {
9354 "uuid": "<lowercase v4 uuid>",
9355 "session_id": "",
9356 "type": "user",
9357 "parent_tool_use_id": null,
9358 "message": {"content": "PROMPT_HERE", "role": "user"}
9359 }}
9360 ]

Callers 1

getPromptForCommandFunction · 0.85

Calls 3

J85Function · 0.85
g6Function · 0.85
g8Function · 0.85

Tested by

no test coverage detected