@springbrand/agent-runtime 0.2.0-alpha.47 → 0.2.0-alpha.48

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.2.0-alpha.47",
3
+ "version": "0.2.0-alpha.48",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "src",
@@ -30,11 +30,11 @@
30
30
  "zod": "^4.4.3"
31
31
  },
32
32
  "peerDependencies": {
33
- "agents": "^0.20.1",
33
+ "agents": "^0.22.0",
34
34
  "ai": "^7.0.0"
35
35
  },
36
36
  "devDependencies": {
37
- "agents": "0.20.1",
37
+ "agents": "0.22.0",
38
38
  "ai": "7.0.37"
39
39
  }
40
40
  }
@@ -620,10 +620,7 @@ export abstract class RecoverableChatAgent<
620
620
  protected async scheduleChatRecoveryRetry(
621
621
  data: RecoveryData,
622
622
  beforeSchedule: () => void | Promise<void>,
623
- ): Promise<"disabled" | "scheduled" | "exhausted"> {
624
- if (!resolveChatRecoveryConfig(this.chatRecovery).enabled) {
625
- return "disabled";
626
- }
623
+ ): Promise<"scheduled" | "exhausted"> {
627
624
  const recoveryRootRequestId =
628
625
  this.activeRecoveryRootRequestId ?? data.requestId;
629
626
  const { incident, exhausted } = await this.engine().beginIncident({
package/src/runtime.ts CHANGED
@@ -3231,17 +3231,14 @@ export abstract class AgentRuntimeKernel<
3231
3231
  );
3232
3232
  const stoppedAfterScheduling = this.readSubmission(submissionId)
3233
3233
  ?.abortReason;
3234
- if (recoveryOutcome !== "disabled" && stoppedAfterScheduling) {
3234
+ if (stoppedAfterScheduling) {
3235
3235
  await this.settleChatRecovery(
3236
3236
  submission.requestId,
3237
3237
  "skipped",
3238
3238
  stoppedAfterScheduling,
3239
3239
  );
3240
3240
  }
3241
- if (
3242
- recoveryOutcome !== "disabled" &&
3243
- !stoppedAfterScheduling
3244
- ) {
3241
+ if (!stoppedAfterScheduling) {
3245
3242
  // 只有恢复通道的调用方(`_chatRecoveryRetry`)靠这次重抛判定 "scheduled"。
3246
3243
  // 让步续跑由 alarm 驱动,重抛只会把那次 alarm 变成一次失败。
3247
3244
  if (mode === "recovery" && recoveryOutcome === "scheduled") {