From 663ae6d627706edaaca712b432b5ea637627a3db Mon Sep 17 00:00:00 2001 From: James Feng <47167674+GhostDragon124@users.noreply.github.com> Date: Thu, 4 Jun 2026 11:29:30 +0800 Subject: [PATCH] partial: apply autonomy lifecycle fixes from f2e9af4 (queue lifecycle + transitions types) --- src/query/transitions.ts | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/src/query/transitions.ts b/src/query/transitions.ts index f8fe51551..ba2fa8b40 100644 --- a/src/query/transitions.ts +++ b/src/query/transitions.ts @@ -1,3 +1,20 @@ -// Auto-generated stub — replace with real implementation -export type Terminal = any; -export type Continue = any; +export type Terminal = + | { reason: 'completed' } + | { reason: 'blocking_limit' } + | { reason: 'image_error' } + | { reason: 'model_error'; error?: unknown } + | { reason: 'aborted_streaming' } + | { reason: 'aborted_tools' } + | { reason: 'prompt_too_long' } + | { reason: 'stop_hook_prevented' } + | { reason: 'hook_stopped' } + | { reason: 'max_turns'; turnCount: number } + +export type Continue = + | { reason: 'collapse_drain_retry'; committed: number } + | { reason: 'reactive_compact_retry' } + | { reason: 'max_output_tokens_escalate' } + | { reason: 'max_output_tokens_recovery'; attempt: number } + | { reason: 'stop_hook_blocking' } + | { reason: 'token_budget_continuation' } + | { reason: 'next_turn' }