MCPcopy Create free account
hub / github.com/cursor/plugins / buildSlackBlock

Function buildSlackBlock

orchestrate/skills/orchestrate/scripts/core/prompts.ts:262–285  ·  view source on GitHub ↗
(
  t: PlanTask,
  agentId: string | undefined,
  ctx: PromptRenderContext
)

Source from the content-addressed store, hash-verified

260}
261
262function buildSlackBlock(
263 t: PlanTask,
264 agentId: string | undefined,
265 ctx: PromptRenderContext
266): string {
267 const ref = ctx.plan.slackKickoffRef;
268 // `agentIdFlag` is rendered into CLI invocations directly. Omit the flag
269 // entirely when no agentId is known so a worker doesn't copy a malformed
270 // `--agent-id --workspace` into shell.
271 const agentIdFlag = agentId ? ` --agent-id ${agentId}` : "";
272 const slackBlock = ref
273 ? renderPromptTemplate("slack-block", {
274 channel: ref.channel,
275 threadTs: ref.ts,
276 destination: `slack:${ref.channel}:${ref.ts}`,
277 taskName: t.name,
278 agentIdFlag,
279 })
280 : "";
281 const andonBlock = ref
282 ? renderPromptTemplate("andon-block", { agentIdFlag })
283 : "";
284 return `${slackBlock}${andonBlock}`;
285}
286
287function buildPromptScopedGoal(t: PlanTask): string {
288 const inlineBrief = buildInlineBriefBlock(t);

Callers 3

buildWorkerPromptFunction · 0.85
buildVerifierPromptFunction · 0.85
buildSubplannerPromptFunction · 0.85

Calls 1

renderPromptTemplateFunction · 0.85

Tested by

no test coverage detected