diff --git a/src/shared/agent-session-failure-words.ts b/src/shared/agent-session-failure-words.ts index 9a0cbea46dee..de3ff2dcb70a 100644 --- a/src/shared/agent-session-failure-words.ts +++ b/src/shared/agent-session-failure-words.ts @@ -26,7 +26,7 @@ import { type AgentSessionFailureCopyValues, type AgentSessionFailureSay } from './agent-session-failure-copy' -import type { AgentSessionWireRefusalCode } from './agent-session-wire-refusals' +import { START_REFUSAL_RESUMABLE } from './agent-session-wire-refusals' import { providerRetryWords, withRetryCause } from './agent-session-provider-retry-words' import { commandRefusedByReason } from './agent-session-command-refusal-words' import { joinSentences } from './sentence-joining' @@ -73,29 +73,6 @@ export type AgentSessionFailureWordsContext = { messageSubmitted?: boolean } -/** - * Whether a refused start leaves the chat anything to start again from. `false`: this host has - * nothing to restart it from — no record, or none it can run — so only a new chat continues. - * A new wire code does not compile until it is classified here. - */ -export const START_REFUSAL_RESUMABLE: Record = { - execution_owner_reconciling: true, - agent_session_conflict: true, - agent_session_checkpoint_stale: true, - agent_session_ownership_unknown: true, - agent_session_operation_capacity: true, - structured_agent_session_unsupported: false, - agent_session_operation_conflict: true, - agent_session_operation_expired: true, - agent_session_operation_invalid: true, - agent_session_operation_unknown: true, - agent_session_item_revision_stale: true, - agent_session_already_resolved: true, - agent_session_identity_required: false, - agent_session_journal_unreadable: true, - agent_session_owner_restart_failed: true -} - /** Person-facing provider text is quoted, but bounded so the sentence stays one. */ const MAX_QUOTED_DETAIL_CHARS = 512 const BYTES_PER_MB = 1024 * 1024 diff --git a/src/shared/agent-session-wire-refusals.ts b/src/shared/agent-session-wire-refusals.ts index 8fd1602377b5..fda33cbe2d47 100644 --- a/src/shared/agent-session-wire-refusals.ts +++ b/src/shared/agent-session-wire-refusals.ts @@ -40,6 +40,29 @@ export const AGENT_SESSION_WIRE_REFUSAL_CODES = [ ] as const export type AgentSessionWireRefusalCode = (typeof AGENT_SESSION_WIRE_REFUSAL_CODES)[number] +/** + * Whether a refused start leaves the chat anything to start again from. `false`: this host has + * nothing to restart it from — no record, or none it can run — so only a new chat continues. + * A new wire code does not compile until it is classified here. + */ +export const START_REFUSAL_RESUMABLE: Record = { + execution_owner_reconciling: true, + agent_session_conflict: true, + agent_session_checkpoint_stale: true, + agent_session_ownership_unknown: true, + agent_session_operation_capacity: true, + structured_agent_session_unsupported: false, + agent_session_operation_conflict: true, + agent_session_operation_expired: true, + agent_session_operation_invalid: true, + agent_session_operation_unknown: true, + agent_session_item_revision_stale: true, + agent_session_already_resolved: true, + agent_session_identity_required: false, + agent_session_journal_unreadable: true, + agent_session_owner_restart_failed: true +} + /** For a host path that raises its refusal as the thrown code. Narrowing through this keeps an * unrelated fault from being reported to the client as a tidy, wrong refusal. */ export function isAgentSessionWireRefusalCode(