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

Method reserveExecutionClaim

packages/runtime/src/runtime-kernel.ts:559–578  ·  view source on GitHub ↗
(
    execution: PendingExecutionClaim,
    active: BackendGeneration,
    run: AgentRun,
  )

Source from the content-addressed store, hash-verified

557 }
558
559 private reserveExecutionClaim(
560 execution: PendingExecutionClaim,
561 active: BackendGeneration,
562 run: AgentRun,
563 ): void {
564 if (execution.phase !== 'attached' || execution.run !== run) {
565 throw new Error(`Execution claim does not own attached Run ${run.runId}`);
566 }
567 try {
568 if (execution.stopIntent) {
569 this.claimRunForStop(execution.sessionId, execution.stopIntent.input, active, run);
570 }
571 } catch (error) {
572 this.unregisterRun(active, run);
573 execution.phase = 'failed';
574 this.settleExecutionClaim(execution, { ok: false, error });
575 throw error;
576 }
577 execution.phase = 'reserved';
578 }
579
580 private settleReservedExecutionClaim(
581 execution: PendingExecutionClaim,

Callers 5

startTurnMethod · 0.95
compactSessionClaimedMethod · 0.95
startChildTurnClaimedMethod · 0.95

Calls 3

claimRunForStopMethod · 0.95
unregisterRunMethod · 0.95
settleExecutionClaimMethod · 0.95

Tested by

no test coverage detected