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

Method finalizeOwnedRun

packages/runtime/src/runtime-kernel.ts:3670–3690  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3668 }
3669
3670 private async finalizeOwnedRun(): Promise<void> {
3671 const failures = new FailureCollector();
3672 const interactionRun = this.interactionRun;
3673 if (interactionRun) {
3674 await failures.capture(async () => {
3675 await interactionRun.close(interactionClosureReason(this.run));
3676 await interactionRun.settleLocalClosures();
3677 });
3678 }
3679
3680 await failures.capture(() => this.run.finalize());
3681 if (!failures.hasFailures && interactionRun) {
3682 await failures.capture(() => this.callbacks.releaseInteraction(interactionRun));
3683 }
3684 const message = `Interaction and Run finalization failed for ${this.run.runId}`;
3685 try {
3686 failures.throwIfAny(message);
3687 } catch (error) {
3688 throw runtimeOwnerCleanupFailure(message, error);
3689 }
3690 }
3691}
3692
3693function childActiveKey(sessionId: string, turnId: string): string {

Callers 1

finalizeMethod · 0.95

Calls 8

captureMethod · 0.95
throwIfAnyMethod · 0.95
interactionClosureReasonFunction · 0.85
settleLocalClosuresMethod · 0.80
releaseInteractionMethod · 0.80
closeMethod · 0.65
finalizeMethod · 0.45

Tested by

no test coverage detected