MCPcopy Create free account
hub / github.com/EvoMap/evolver / renderSessionsSpawnCall

Function renderSessionsSpawnCall

src/gep/bridge.js:53–65  ·  view source on GitHub ↗
({ task, agentId, label, cleanup })

Source from the content-addressed store, hash-verified

51}
52
53function renderSessionsSpawnCall({ task, agentId, label, cleanup }) {
54 const t = String(task || '').trim();
55 if (!t) throw new Error('bridge: missing task');
56 const a = String(agentId || 'main');
57 const l = String(label || 'gep_bridge');
58 const c = cleanup ? String(cleanup) : 'delete';
59
60 // Output valid JSON so consumers can parse with JSON.parse (not regex).
61 // The consumer side is extractFirstSpawnPayload()/parseFirstSpawnCall() below,
62 // which take the FIRST sessions_spawn( occurrence — see those functions for why.
63 const payload = JSON.stringify({ task: t, agentId: a, cleanup: c, label: l });
64 return `sessions_spawn(${payload})`;
65}
66
67const SPAWN_MARKER = 'sessions_spawn(';
68

Callers 2

bridge.test.jsFile · 0.85
pickOneFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected