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

Method delegateSubtask

src/proxy/extensions/sessionHandler.js:77–96  ·  view source on GitHub ↗
({ sessionId, toNodeId, title, description, role } = {})

Source from the content-addressed store, hash-verified

75 }
76
77 delegateSubtask({ sessionId, toNodeId, title, description, role } = {}) {
78 if (!sessionId) throw new Error('sessionId is required');
79 if (!title) throw new Error('title is required');
80
81 const VALID_ROLES = ['builder', 'planner', 'reviewer'];
82 const safeRole = VALID_ROLES.includes(role) ? role : 'builder';
83
84 return this.store.send({
85 type: 'session_delegate',
86 payload: {
87 session_id: sessionId,
88 to_node_id: toNodeId || null,
89 title,
90 description: description || '',
91 role: safeRole,
92 delegated_at: new Date().toISOString(),
93 },
94 priority: 'high',
95 });
96 }
97
98 submitResult({ sessionId, taskId, resultAssetId, summary } = {}) {
99 if (!sessionId) throw new Error('sessionId is required');

Callers 2

extensions.test.jsFile · 0.80
buildRoutesFunction · 0.80

Calls 1

sendMethod · 0.45

Tested by

no test coverage detected