MCPcopy Index your code
hub / github.com/ChinaSiro/claude-code-sourcemap / rJK

Function rJK

package/cli.js:3583–3613  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3581
3582Task completed. Call TaskList now to find your next available task or see if your work unblocked others.`;if(O)w+=`
3583
3584NOTE: You just closed out 3+ tasks and none of them was a verification step. Before writing your final summary, spawn the verification agent (subagent_type="${vA8}"). You cannot self-assign PARTIAL by listing caveats in your summary — only the verifier issues a verdict.`;return{tool_use_id:K,type:"tool_result",content:w}}})});function rJK(){let q=nq()?`- Before assigning tasks to teammates, to see what's available
3585`:"",K=nq()?"- **id**: Task identifier (use with TaskGet, TaskUpdate)":"- **id**: Task identifier (use with TaskGet, TaskUpdate)",_=nq()?`
3586## Teammate Workflow
3587
3588When working as a teammate:
35891. After completing your current task, call TaskList to find available work
35902. Look for tasks with status 'pending', no owner, and empty blockedBy
35913. **Prefer tasks in ID order** (lowest ID first) when multiple tasks are available, as earlier tasks often set up context for later ones
35924. Claim an available task using TaskUpdate (set \`owner\` to your name), or wait for leader assignment
35935. If blocked, focus on unblocking tasks or notify the team lead
3594`:"";return`Use this tool to list all tasks in the task list.
3595
3596## When to Use This Tool
3597
3598- To see what tasks are available to work on (status: 'pending', no owner, not blocked)
3599- To check overall progress on the project
3600- To find tasks that are blocked and need dependencies resolved
3601${q}- After completing a task, to check for newly unblocked work or claim the next available task
3602- **Prefer working on tasks in ID order** (lowest ID first) when multiple tasks are available, as earlier tasks often set up context for later ones
3603
3604## Output
3605
3606Returns a summary of each task:
3607${K}
3608- **subject**: Brief description of the task
3609- **status**: 'pending', 'in_progress', or 'completed'
3610- **owner**: Agent ID if assigned, empty if available
3611- **blockedBy**: List of open task IDs that must be resolved first (tasks with blockedBy cannot be claimed until dependencies resolve)
3612
3613Use TaskGet with a specific task ID to view full details including description and comments.
3614${_}`}var iJK="List all tasks in the task list";var oJK=y(()=>{i$()});var HqY,JqY,aJK;var sJK=y(()=>{x7();Bq();gj();oJK();HqY=B6(()=>L.strictObject({})),JqY=B6(()=>L.object({tasks:L.array(L.object({id:L.string(),subject:L.string(),status:U26(),owner:L.string().optional(),blockedBy:L.array(L.string())}))})),aJK=sq({name:Tq6,searchHint:"list all tasks",maxResultSizeChars:1e5,async description(){return iJK},async prompt(){return rJK()},get inputSchema(){return HqY()},get outputSchema(){return JqY()},userFacingName(){return"TaskList"},shouldDefer:!0,isEnabled(){return IH()},isConcurrencySafe(){return!0},isReadOnly(){return!0},renderToolUseMessage(){return null},async call(){let q=cG(),K=(await LD(q)).filter((Y)=>!Y.metadata?._internal),_=new Set(K.filter((Y)=>Y.status==="completed").map((Y)=>Y.id));return{data:{tasks:K.map((Y)=>({id:Y.id,subject:Y.subject,status:Y.status,owner:Y.owner,blockedBy:Y.blockedBy.filter(($)=>!_.has($))}))}}},mapToolResultToToolResultBlockParam(q,K){let{tasks:_}=q;if(_.length===0)return{tool_use_id:K,type:"tool_result",content:"No tasks found"};let z=_.map((Y)=>{let $=Y.owner?` (${Y.owner})`:"",A=Y.blockedBy.length>0?` [blocked by ${Y.blockedBy.map((O)=>`#${O}`).join(", ")}]`:"";return`#${Y.id} [${Y.status}] ${Y.subject}${$}${A}`});return{tool_use_id:K,type:"tool_result",content:z.join(`
3615`)}}})});var tJK={};T8(tJK,{isWorktreeModeEnabled:()=>bR6});function bR6(){return!0}function eJK(q){return`${q.cron??""}${q.prompt?`: ${d5(q.prompt,60,!0)}`:""}`}function qMK(q){return jy.default.createElement(s8,null,jy.default.createElement(k,null,"Scheduled ",jy.default.createElement(k,{bold:!0},q.id)," ",jy.default.createElement(k,{dimColor:!0},"(",q.humanSchedule,")")))}function KMK(q){return q.id??""}function _MK(q){return jy.default.createElement(s8,null,jy.default.createElement(k,null,"Cancelled ",jy.default.createElement(k,{bold:!0},q.id)))}function zMK(){return""}function YMK(q){if(q.jobs.length===0)return jy.default.createElement(s8,null,jy.default.createElement(k,{dimColor:!0},"No scheduled jobs"));return jy.default.createElement(s8,null,q.jobs.map((K)=>jy.default.createElement(k,{key:K.id},jy.default.createElement(k,{bold:!0},K.id)," ",jy.default.createElement(k,{dimColor:!0},K.humanSchedule))))}var jy;var xm8=y(()=>{gK();s6();U7();jy=O6(D6(),1)});var AMK={};T8(AMK,{CronCreateTool:()=>PqY});var $MK=50,MqY,XqY,PqY;var OMK=y(()=>{x7();v8();Bq();Lo6();vq6();TK6();JG();gr();xm8();MqY=B6(()=>L.strictObject({cron:L.string().describe('Standard 5-field cron expression in local time: "M H DoM Mon DoW" (e.g. "*/5 * * * *" = every 5 minutes, "30 14 28 2 *" = Feb 28 at 2:30pm local once).'),prompt:L.string().describe("The prompt to enqueue at each fire time."),recurring:BX(L.boolean().optional()).describe(`true (default) = fire on every cron match until deleted or auto-expired after ${kq6} days. false = fire once at the next match, then auto-delete. Use false for "remind me at X" one-shot requests with pinned minute/hour/dom/month.`),durable:BX(L.boolean().optional()).describe("true = persist to .claude/scheduled_tasks.json and survive restarts. false (default) = in-memory only, dies when this Claude session ends. Use true only when the user asks the task to survive across sessions.")})),XqY=B6(()=>L.object({id:L.string(),humanSchedule:L.string(),recurring:L.boolean(),durable:L.boolean().optional()})),PqY=sq({name:xL,searchHint:"schedule a recurring or one-shot prompt",maxResultSizeChars:1e5,shouldDefer:!0,get inputSchema(){return MqY()},get outputSchema(){return XqY()},isEnabled(){return vN()},toAutoClassifierInput(q){return`${q.cron}: ${q.prompt}`},async description(){return Hp1(Br())},async prompt(){return Jp1(Br())},getPath(){return pr()},async validateInput(q){if(!Eo6(q.cron))return{result:!1,message:`Invalid cron expression '${q.cron}'. Expected 5 fields: M H DoM Mon DoW.`,errorCode:1};if(xV6(q.cron,Date.now())===null)return{result:!1,message:`Cron expression '${q.cron}' does not match any calendar date in the next year.`,errorCode:2};if((await uV6()).length>=$MK)return{result:!1,message:`Too many scheduled jobs (max ${$MK}). Cancel one first.`,errorCode:3};if(q.durable&&VP())return{result:!1,message:"durable crons are not supported for teammates (teammates do not persist across sessions)",errorCode:4};return{result:!0}},async call({cron:q,prompt:K,recurring:_=!0,durable:z=!1}){let Y=z&&Br(),$=await dy4(q,K,_,Y,VP()?.agentId);return ib6(!0),{data:{id:$,humanSchedule:bV6(q),recurring:_,durable:Y}}},mapToolResultToToolResultBlockParam(q,K){let _=q.durable?"Persisted to .claude/scheduled_tasks.json":"Session-only (not written to disk, dies when Claude exits)";return{tool_use_id:K,type:"tool_result",content:q.recurring?`Scheduled recurring job ${q.id} (${q.humanSchedule}). ${_}. Auto-expires after ${kq6} days. Use CronDelete to cancel sooner.`:`Scheduled one-shot task ${q.id} (${q.humanSchedule}). ${_}. It will fire once then auto-delete.`}},renderToolUseMessage:eJK,renderToolResultMessage:qMK})});var wMK={};T8(wMK,{CronDeleteTool:()=>fqY});var WqY,DqY,fqY;var jMK=y(()=>{x7();Bq();vq6();JG();gr();xm8();WqY=B6(()=>L.strictObject({id:L.string().describe("Job ID returned by CronCreate.")})),DqY=B6(()=>L.object({id:L.string()})),fqY=sq({name:Vq6,searchHint:"cancel a scheduled cron job",maxResultSizeChars:1e5,shouldDefer:!0,get inputSchema(){return WqY()},get outputSchema(){return DqY()},isEnabled(){return vN()},toAutoClassifierInput(q){return q.id},async description(){return Mp1},async prompt(){return Xp1(Br())},getPath(){return pr()},async validateInput(q){let _=(await uV6()).find((Y)=>Y.id===q.id);if(!_)return{result:!1,message:`No scheduled job with id '${q.id}'`,errorCode:1};let z=VP();if(z&&_.agentId!==z.agentId)return{result:!1,message:`Cannot delete cron job '${q.id}': owned by another agent`,errorCode:2};return{result:!0}},async call({id:q}){return await Jw6([q]),{data:{id:q}}},mapToolResultToToolResultBlockParam(q,K){return{tool_use_id:K,type:"tool_result",content:`Cancelled job ${q.id}.`}},renderToolUseMessage:KMK,renderToolResultMessage:_MK})});var HMK={};T8(HMK,{CronListTool:()=>TqY});var ZqY,GqY,TqY;var JMK=y(()=>{x7();Bq();Lo6();vq6();U7();JG();gr();xm8();ZqY=B6(()=>L.strictObject({})),GqY=B6(()=>L.object({jobs:L.array(L.object({id:L.string(),cron:L.string(),humanSchedule:L.string(),prompt:L.string(),recurring:L.boolean().optional(),durable:L.boolean().optional()}))})),TqY=sq({name:Ro6,searchHint:"list active cron jobs",maxResultSizeChars:1e5,shouldDefer:!0,get inputSchema(){return ZqY()},get outputSchema(){return GqY()},isEnabled(){return vN()},isConcurrencySafe(){return!0},isReadOnly(){return!0},async description(){return Pp1},async prompt(){return Wp1(Br())},async call(){let q=await uV6(),K=VP();return{data:{jobs:(K?q.filter((Y)=>Y.agentId===K.agentId):q).map((Y)=>({id:Y.id,cron:Y.cron,humanSchedule:bV6(Y.cron),prompt:Y.prompt,...Y.recurring?{recurring:!0}:{},...Y.durable===!1?{durable:!1}:{}}))}}},mapToolResultToToolResultBlockParam(q,K){return{tool_use_id:K,type:"tool_result",content:q.jobs.length>0?q.jobs.map((_)=>`${_.id} — ${_.humanSchedule}${_.recurring?" (recurring)":" (one-shot)"}${_.durable===!1?" [session-only]":""}: ${d5(_.prompt,80,!0)}`).join(`
3616`):"No scheduled jobs."}},renderToolUseMessage:zMK,renderToolResultMessage:YMK})});var _H6="RemoteTrigger",MMK="Manage scheduled remote Claude Code agents (triggers) via the claude.ai CCR API. Auth is handled in-process — the token never reaches the shell.",XMK=`Call the claude.ai remote-trigger API. Use this instead of curl — the OAuth token is added automatically in-process and never exposed.

Callers 1

promptFunction · 0.85

Calls 1

nqFunction · 0.85

Tested by

no test coverage detected