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

Method createCodeModeExecTool

packages/runtime/src/ai-sdk-backend.ts:1344–1362  ·  view source on GitHub ↗
(
    scope: TurnScope,
    eventSink: DurableSessionEventSink,
  )

Source from the content-addressed store, hash-verified

1342 }
1343
1344 private createCodeModeExecTool(
1345 scope: TurnScope,
1346 eventSink: DurableSessionEventSink,
1347 ): MakaTool<{ code: string }> {
1348 return {
1349 name: 'exec',
1350 description: [
1351 'Execute a bounded orchestration cell over the active tools.',
1352 'Use tools.<name>(args), await dependent calls, and Promise.all for independent calls.',
1353 'The sandbox has no process, filesystem, network, timer, eval, import, or cross-cell state.',
1354 'Terminate by returning a JSON-serializable value. Failures return a structured diagnostic.',
1355 ].join(' '),
1356 parameters: z.object({ code: z.string() }),
1357 executionSemantics: 'exclusive_step',
1358 nesting: 'direct_only',
1359 recoveryMode: 'never_auto_retry',
1360 impl: (args, context) => this.executeCodeModeCell(scope, eventSink, args.code, context),
1361 };
1362 }
1363
1364 // --------------------------------------------------------------------------
1365 // manual history compaction

Callers 1

sendWithinScopeMethod · 0.95

Calls 2

executeCodeModeCellMethod · 0.95
joinMethod · 0.80

Tested by

no test coverage detected