@springbrand/agent-runtime 0.3.0-alpha.27 → 0.3.0-alpha.28

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@springbrand/agent-runtime",
3
- "version": "0.3.0-alpha.27",
3
+ "version": "0.3.0-alpha.28",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "src",
@@ -766,8 +766,25 @@ export abstract class AgentRuntimeKernel<
766
766
  }
767
767
  }
768
768
 
769
+ /**
770
+ * Run or recover the Submission while an alarm heartbeat keeps the DO resident.
771
+ *
772
+ * A Turn makes only outbound model and Tool calls, which do not count as DO
773
+ * activity. Once every client disconnects, an unheld DO is evicted after
774
+ * 70-140s, taking the in-memory Turn and its stall watchdog with it while the
775
+ * row stays `running`. If the DO is still evicted (deploy, runtime restart),
776
+ * the pending heartbeat alarm wakes it and `onStart` recovers the Submission.
777
+ * A Turn parked for approval or input returns `released`, which drops the hold.
778
+ */
779
+ private executeHarnessSubmission(
780
+ submission: StoredSubmission,
781
+ mode: SubmissionExecutionMode,
782
+ ): Promise<StoredSubmission> {
783
+ return this.keepAliveWhile(() => this.runHarnessSubmission(submission, mode));
784
+ }
785
+
769
786
  /** Run or recover the Submission through Pi's single durable AgentHarness. */
770
- private async executeHarnessSubmission(
787
+ private async runHarnessSubmission(
771
788
  submission: StoredSubmission,
772
789
  mode: SubmissionExecutionMode,
773
790
  ): Promise<StoredSubmission> {