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

Function buildInlineTask

orchestrate/skills/orchestrate/scripts/cli/util.ts:212–234  ·  view source on GitHub ↗
(opts: SpawnOptions)

Source from the content-addressed store, hash-verified

210}
211
212export function buildInlineTask(opts: SpawnOptions): PlanTask {
213 if (!opts.name) bail("--file or --name required");
214 if (!opts.type) bail("--type required (worker|subplanner)");
215 if (!opts.goal) bail("--goal required (or pass --file)");
216 const taskBase = {
217 name: opts.name,
218 scopedGoal: opts.goal,
219 pathsAllowed: opts.pathsAllowed,
220 pathsForbidden: opts.pathsForbidden,
221 acceptance: opts.acceptance,
222 startingRef: opts.startingRef,
223 dependsOn: opts.dependsOn,
224 model: opts.model,
225 };
226 switch (opts.type) {
227 case "worker":
228 return { ...taskBase, type: "worker" };
229 case "subplanner":
230 return { ...taskBase, type: "subplanner" };
231 default:
232 bail(`--type must be worker or subplanner, got ${opts.type}`);
233 }
234}
235
236export function transitivelyDependsOn(
237 tasks: TaskState[],

Callers 1

registerTaskCommandsFunction · 0.90

Calls 1

bailFunction · 0.85

Tested by

no test coverage detected