MCPcopy Create free account
hub / github.com/apache/maka / cleanSubagentSpawnInput

Function cleanSubagentSpawnInput

packages/runtime/src/subagent-tools.ts:298–304  ·  view source on GitHub ↗
(input: unknown, taskBindingAvailable: boolean)

Source from the content-addressed store, hash-verified

296}
297
298function cleanSubagentSpawnInput(input: unknown, taskBindingAvailable: boolean): unknown {
299 if (!input || typeof input !== 'object' || Array.isArray(input)) return input;
300 const cleaned = { ...(input as Record<string, unknown>) };
301 if (cleaned.subagent_id !== undefined) delete cleaned.profile;
302 if (!taskBindingAvailable) delete cleaned.task_id;
303 return cleaned;
304}
305
306async function resolvePresetDefinition(
307 subagentId: string,

Callers 1

buildSubagentSpawnToolFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected