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

Function GMK

package/cli.js:3626–3736  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3624
3625The response is the raw JSON from the API.`;function PMK(q){return`${q.action??""}${q.trigger_id?` ${q.trigger_id}`:""}`}function WMK(q){let K=G$(q.json,`
3626`)+1;return Im8.default.createElement(s8,null,Im8.default.createElement(k,null,"HTTP ",q.status," ",Im8.default.createElement(k,{dimColor:!0},"(",K," lines)")))}var Im8;var DMK=y(()=>{gK();s6();Im8=O6(D6(),1)});var fMK={};T8(fMK,{RemoteTriggerTool:()=>NqY});var vqY,kqY,VqY="ccr-triggers-2026-01-30",NqY;var ZMK=y(()=>{CK();x7();H3();o1();pW();ZD();Bq();G7();l8();DMK();vqY=B6(()=>L.strictObject({action:L.enum(["list","get","create","update","run"]),trigger_id:L.string().regex(/^[\w-]+$/).optional().describe("Required for get, update, and run"),body:L.record(L.string(),L.unknown()).optional().describe("JSON body for create and update")})),kqY=B6(()=>L.object({status:L.number(),json:L.string()})),NqY=sq({name:_H6,searchHint:"manage scheduled remote agent triggers",maxResultSizeChars:1e5,shouldDefer:!0,get inputSchema(){return vqY()},get outputSchema(){return kqY()},isEnabled(){return g8("tengu_surreal_dali",!1)&&OO("allow_remote_sessions")},isConcurrencySafe(){return!0},isReadOnly(q){return q.action==="list"||q.action==="get"},toAutoClassifierInput(q){return`RemoteTrigger ${q.action}${q.trigger_id?` ${q.trigger_id}`:""}`},async description(){return MMK},async prompt(){return XMK},async call(q,K){await k$();let _=Kq()?.accessToken;if(!_)throw Error("Not authenticated with a claude.ai account. Run /login and try again.");let z=await mW();if(!z)throw Error("Unable to resolve organization UUID.");let Y=`${u7().BASE_API_URL}/v1/code/triggers`,$={Authorization:`Bearer ${_}`,"Content-Type":"application/json","anthropic-version":"2023-06-01","anthropic-beta":VqY,"x-organization-uuid":z},{action:A,trigger_id:O,body:w}=q,j,H,J;switch(A){case"list":j="GET",H=Y;break;case"get":if(!O)throw Error("get requires trigger_id");j="GET",H=`${Y}/${O}`;break;case"create":if(!w)throw Error("create requires body");j="POST",H=Y,J=w;break;case"update":if(!O)throw Error("update requires trigger_id");if(!w)throw Error("update requires body");j="POST",H=`${Y}/${O}`,J=w;break;case"run":if(!O)throw Error("run requires trigger_id");j="POST",H=`${Y}/${O}/run`,J={};break}let M=await $1.request({method:j,url:H,headers:$,data:J,timeout:20000,signal:K.abortController.signal,validateStatus:()=>!0});return{data:{status:M.status,json:g6(M.data)}}},mapToolResultToToolResultBlockParam(q,K){return{tool_use_id:K,type:"tool_result",content:`HTTP ${q.status}
3627${q.json}`}},renderToolUseMessage:PMK,renderToolResultMessage:WMK})});function GMK(){return`
3628# TeamCreate
3629
3630## When to Use
3631
3632Use this tool proactively whenever:
3633- The user explicitly asks to use a team, swarm, or group of agents
3634- The user mentions wanting agents to work together, coordinate, or collaborate
3635- A task is complex enough that it would benefit from parallel work by multiple agents (e.g., building a full-stack feature with frontend and backend work, refactoring a codebase while keeping tests passing, implementing a multi-step project with research, planning, and coding phases)
3636
3637When in doubt about whether a task warrants a team, prefer spawning a team.
3638
3639## Choosing Agent Types for Teammates
3640
3641When spawning teammates via the Agent tool, choose the \`subagent_type\` based on what tools the agent needs for its task. Each agent type has a different set of available tools — match the agent to the work:
3642
3643- **Read-only agents** (e.g., Explore, Plan) cannot edit or write files. Only assign them research, search, or planning tasks. Never assign them implementation work.
3644- **Full-capability agents** (e.g., general-purpose) have access to all tools including file editing, writing, and bash. Use these for tasks that require making changes.
3645- **Custom agents** defined in \`.claude/agents/\` may have their own tool restrictions. Check their descriptions to understand what they can and cannot do.
3646
3647Always review the agent type descriptions and their available tools listed in the Agent tool prompt before selecting a \`subagent_type\` for a teammate.
3648
3649Create a new team to coordinate multiple agents working on a project. Teams have a 1:1 correspondence with task lists (Team = TaskList).
3650
3651\`\`\`
3652{
3653 "team_name": "my-project",
3654 "description": "Working on feature X"
3655}
3656\`\`\`
3657
3658This creates:
3659- A team file at \`~/.claude/teams/{team-name}/config.json\`
3660- A corresponding task list directory at \`~/.claude/tasks/{team-name}/\`
3661
3662## Team Workflow
3663
36641. **Create a team** with TeamCreate - this creates both the team and its task list
36652. **Create tasks** using the Task tools (TaskCreate, TaskList, etc.) - they automatically use the team's task list
36663. **Spawn teammates** using the Agent tool with \`team_name\` and \`name\` parameters to create teammates that join the team
36674. **Assign tasks** using TaskUpdate with \`owner\` to give tasks to idle teammates
36685. **Teammates work on assigned tasks** and mark them completed via TaskUpdate
36696. **Teammates go idle between turns** - after each turn, teammates automatically go idle and send a notification. IMPORTANT: Be patient with idle teammates! Don't comment on their idleness until it actually impacts your work.
36707. **Shutdown your team** - when the task is completed, gracefully shut down your teammates via SendMessage with \`message: {type: "shutdown_request"}\`.
3671
3672## Task Ownership
3673
3674Tasks are assigned using TaskUpdate with the \`owner\` parameter. Any agent can set or change task ownership via TaskUpdate.
3675
3676## Automatic Message Delivery
3677
3678**IMPORTANT**: Messages from teammates are automatically delivered to you. You do NOT need to manually check your inbox.
3679
3680When you spawn teammates:
3681- They will send you messages when they complete tasks or need help
3682- These messages appear automatically as new conversation turns (like user messages)
3683- If you're busy (mid-turn), messages are queued and delivered when your turn ends

Callers 1

promptFunction · 0.85

Calls 1

trimMethod · 0.45

Tested by

no test coverage detected