@gajae-code/agent-core 0.11.1 → 0.11.3

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/src/types.ts CHANGED
@@ -13,6 +13,7 @@ import type {
13
13
  Tool,
14
14
  ToolChoice,
15
15
  ToolResultMessage,
16
+ TransportFailureFacts,
16
17
  TSchema,
17
18
  } from "@gajae-code/ai";
18
19
  import type { AppendOnlyContextManager } from "./append-only-context";
@@ -58,6 +59,7 @@ export type ManagedAttemptContinuation = (ownership: ManagedAttemptContinuationO
58
59
  /** Decision returned by managed fallback policy for one provisional attempt. */
59
60
  export type ManagedAttemptDecision =
60
61
  | { type: "retry"; continuation: ManagedAttemptContinuation }
62
+ | { type: "maintenance"; continuation: ManagedAttemptContinuation }
61
63
  | { type: "terminal"; terminal: RunTerminalRequest };
62
64
 
63
65
  /** Structured result for one managed upstream invocation. */
@@ -67,9 +69,10 @@ export type ManagedAttemptOutcome =
67
69
  failure: {
68
70
  message: AssistantMessage;
69
71
  /** Exact provider transport facts, including retry headers, for fallback policy. */
70
- transportFailure?: import("@gajae-code/ai").TransportFailureFacts;
72
+ transportFailure?: TransportFailureFacts;
71
73
  };
72
74
  }
75
+ | { type: "context_overflow_discarded"; message: AssistantMessage }
73
76
  | { type: "run_terminal"; reason: "cancelled" | "error" | "exhausted" };
74
77
 
75
78
  export type ManagedAttemptOutcomeHandler = (