MCPcopy Create free account
hub / github.com/Noumena-Network/code / onReject

Function onReject

src/utils/swarm/inProcessRunner.ts:293–305  ·  view source on GitHub ↗
(feedback?: string, contentBlocks?: ContentBlockParam[])

Source from the content-addressed store, hash-verified

291 })
292 },
293 onReject(feedback?: string, contentBlocks?: ContentBlockParam[]) {
294 if (decisionMade) return
295 decisionMade = true
296 abortController.signal.removeEventListener(
297 'abort',
298 onAbortListener,
299 )
300 reportPermissionWait()
301 const message = feedback
302 ? `${SUBAGENT_REJECT_MESSAGE_WITH_REASON_PREFIX}${feedback}`
303 : SUBAGENT_REJECT_MESSAGE
304 resolve({ behavior: 'ask', message, contentBlocks })
305 },
306 async recheckPermission() {
307 if (decisionMade) return
308 const freshResult = await hasPermissionsToUseTool(

Callers

nothing calls this directly

Calls 3

reportPermissionWaitFunction · 0.85
cleanupFunction · 0.70
resolveFunction · 0.50

Tested by

no test coverage detected