forked from 777genius/claude-code-source-code
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtransitions.ts
More file actions
37 lines (35 loc) · 871 Bytes
/
Copy pathtransitions.ts
File metadata and controls
37 lines (35 loc) · 871 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
/**
* Transition types for the query loop.
*
* Terminal: why the loop exited (returned).
* Continue: why the loop continued to the next iteration (not returned).
*/
/** Terminal transition — the query loop returned. */
export type Terminal = {
reason:
| 'completed'
| 'blocking_limit'
| 'image_error'
| 'model_error'
| 'aborted_streaming'
| 'aborted_tools'
| 'prompt_too_long'
| 'stop_hook_prevented'
| 'hook_stopped'
| 'max_turns'
| (string & {})
error?: unknown
}
/** Continue transition — the loop will iterate again. */
export type Continue = {
reason:
| 'tool_use'
| 'reactive_compact_retry'
| 'max_output_tokens_recovery'
| 'max_output_tokens_escalate'
| 'collapse_drain_retry'
| 'stop_hook_blocking'
| 'token_budget_continuation'
| 'queued_command'
| (string & {})
}