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

Method settleToolCallRaw

packages/runtime/src/tool-runtime.ts:726–737  ·  view source on GitHub ↗

* Settle a tool without producing provider-visible output. Runtime-owned * nested calls use this path because their result is consumed by Code Mode, * not sent as a provider tool-result part; materializing it could spend * turn-scoped provider resources such as the image budget.

(call: ResolvedMakaToolCall)

Source from the content-addressed store, hash-verified

724 * turn-scoped provider resources such as the image budget.
725 */
726 async settleToolCallRaw(call: ResolvedMakaToolCall): Promise<RawToolSettlement> {
727 const settlement = this.performToolSettlement(call);
728 // Tracked so endTurn can wait out unwinds already in flight (#2253):
729 // their T2 outcomes must land before the stop path settles the run's
730 // terminal fact, and nested Code Mode calls route through here too.
731 // The caller observes the settlement itself; the tracking handler only
732 // removes the entry.
733 this.activeToolSettlements.add(settlement);
734 const untrack = () => this.activeToolSettlements.delete(settlement);
735 void settlement.then(untrack, untrack);
736 return settlement;
737 }
738
739 private async performToolSettlement(call: ResolvedMakaToolCall): Promise<RawToolSettlement> {
740 const result = await this.executeTool(

Callers 2

settleToolCallMethod · 0.95
executeCodeModeCellMethod · 0.80

Calls 2

performToolSettlementMethod · 0.95
addMethod · 0.65

Tested by

no test coverage detected