package i18n

// English is the baseline catalogue. The drift-guard test reflects over its
// fields, so every other catalogue must populate the same set.
var English = Messages{
	WelcomeTitleFmt: "Welcome to %s",
	NoConfigYet:     "No configuration found yet — let's set it up.",

	InitHint: "Project memory (AGENTS.md) is generated in-session: run `reasonix`, then `/init` — the model analyzes the codebase and writes it. For configuration, use `reasonix setup`.",

	ChatTip:                "Context is kept across turns. Type 'exit' or Ctrl-D to quit.",
	TurnCancelled:          "cancelled — back to prompt",
	InterruptedRecovery:    "This turn was interrupted. Partial output is kept for reference; only completed tool pairs and a bounded recovery summary enter the next model turn. Inspect the workspace before continuing or reverting changes.",
	FinalReadinessRecovery: "Task work or completion checks are paused. Run /continue-checks to preserve completed evidence and finish the remaining work.",
	ReadinessContinuing:    "Reasonix is finishing the remaining task work or checks automatically.",
	RecoveryPaused:         "Automatic retries paused. Reasonix stopped repeated attempts and kept completed work. Send “Continue” to start a fresh attempt, or add instructions to change direction.",
	CompletionUncertain:    "Completion could not be confirmed. The current result and completed work are kept. Send \"continue\" to resume, or restate what should change.",
	ReceiptVerified:        "nothing left unverified",
	ReceiptGapsHeader:      "not verified:",
	ReceiptRisksHeader:     "declared risks:",
	ReceiptMore:            "and %d more",
	ReceiptGapKinds: map[string]string{
		"unbacked_claim":      "claimed but unsupported",
		"unproven_criterion":  "criterion without proof",
		"missing_check":       "expected check never passed",
		"failed_verification": "verification failed",
		"stale_verification":  "verified before the last change",
		"unverified_change":   "changed with nothing verifying it",
		"unreviewed_change":   "changed, never looked at again",
		"declared_unverified": "declared unverified",
	},
	NoSessionToResume: "no saved session to resume — start a new one with `reasonix`",
	ResumeRequiresTTY: "--resume needs an interactive terminal; pass --continue for the most recent session",
	PickSessionLabel:  "Resume which session?",

	ResumeBusy:          "finish or cancel the current turn before resuming",
	ResumeBadIndexFmt:   "pick a session 1–%d (run /resume to list)",
	ResumeAlreadyActive: "already in that session",
	ResumedTitle:        "resumed session",

	RenameUsage:            "usage: /rename <new title>  or  /rename <n> <new title>",
	RenameNoSession:        "no active session to rename",
	RenameDoneFmt:          "session renamed to %q",
	ResumePickTitle:        "Resume a saved session",
	ResumePickHint:         "↑/↓ move · Enter resume · Esc cancel",
	ResumeRecoveryBadgeFmt: "[recovery copy · parent %s]",

	ChatThinking:                           "thinking…",
	ChatThoughtForFmt:                      "thought for %ds",
	ChatStatusThinkingFmt:                  "%s thinking… (%ds · Esc cancels)",
	TurnPhaseWorking:                       "working",
	TurnPhaseChecking:                      "checking",
	TurnPhaseVerifying:                     "verifying",
	TurnPhaseReviewing:                     "reviewing",
	CompletionSummaryBlocked:               "This turn is blocked; review the changes for details.",
	CompletionSummaryNeedsAttention:        "This turn still has verification or review gaps.",
	ChatToolWorkingFmt:                     "%s working · %ds",
	ChatSubagentPhaseQueued:                "queued",
	ChatSubagentPhaseRunning:               "running",
	ChatSubagentPhaseReasoning:             "reasoning",
	ChatSubagentPhaseResponding:            "responding",
	ChatSubagentPhaseTool:                  "using tools",
	ChatSubagentPhaseRetrying:              "retrying",
	ChatSubagentPhaseCompleted:             "completed",
	ChatSubagentPhaseFailed:                "failed",
	ChatSubagentPhaseCancelled:             "cancelled",
	ChatSubagentProgressFmt:                "%s · %ds · %ds ago",
	ChatSubagentProgressDoneFmt:            "%s · %ds",
	ChatSubagentPreviewLabel:               "▎",
	ChatStatusRetryingFmt:                  "%s retrying (%d/%d)… (Esc cancels)",
	ChatStatusCancellingFmt:                "%s stopping… (%ds · Ctrl+C exits)",
	ChatStatusIdle:                         "ready",
	ChatStatusYoloIdle:                     "tool approvals skipped",
	ChatStatusCycleHint:                    "Shift+Tab ask/auto/plan · Ctrl+Y YOLO",
	ChatStatusCycleHintCompact:             "Shift+Tab ask/auto/plan · Ctrl+Y YOLO",
	ChatTurnReceiptLabel:                   "TURN",
	RateBandPeak:                           "peak",
	RateBandOffPeak:                        "off-peak",
	RateBandMixed:                          "mixed rates",
	ChatStatusModelLabel:                   "MODEL",
	ChatStatusEffortLabel:                  "EFFORT",
	ChatStatusCacheLabel:                   "CACHE",
	ChatStatusContextLabel:                 "CTX",
	ChatStatusCompactLabel:                 "COMPACT",
	ChatStatusJobsLabel:                    "JOBS",
	ChatStatusBalanceLabel:                 "BAL",
	ChatStatusCostLabel:                    "COST",
	ChatStatusCacheNowFmt:                  "turn hit %s",
	ChatStatusCacheAvgFmt:                  "avg %s",
	ChatStatusPlanApproval:                 "1 execute · 2 revise · 3 exit without executing · n/Esc keeps planning · PgUp/PgDn/Ctrl+Home/End scrolls",
	PlanApprovalPrompt:                     "Plan ready above — choose what to do next",
	PlanApprovalChoices:                    "1. Start execution\n2. Revise plan (keep planning)\n3. Exit without executing\nChoose [1/2/3] (y starts; n/Esc keeps planning)",
	ChatStatusToolApproval:                 "1 approve once · 2 allow scope this session · 3/4 prefix or save when offered · n/Esc deny · Ctrl-C cancels turn",
	AskTypeSomething:                       "Type something else",
	AskTypingHint:                          "type below, Enter to confirm",
	AskChatInstead:                         "None — just chat",
	ChatStatusQuestion:                     "↑/↓ move · number to pick · space multi · Enter confirm · ←/→ switch · Esc cancel",
	StatusResumePicker:                     "↑/↓ move · Enter resume · Esc cancel",
	AskSubmitTitle:                         "Submit answers",
	AskUnanswered:                          "(unanswered)",
	AskSubmitHint:                          "Enter submits · ← returns to edit",
	ElicitURLHint:                          "o opens the link · Enter accepts · d declines · Esc cancels",
	ElicitConfirmOnly:                      "Confirm with Enter; d declines; Esc cancels.",
	ElicitUnanswered:                       "(unanswered)",
	ElicitSubmit:                           "Submit",
	ElicitSubmitHint:                       "Enter edits the field · tab advances · on Submit: Enter accepts, d declines, Esc cancels",
	ToolApprovalPromptFmt:                  "Permission required\n\nWill call tool %s%s.\n%s\n%s",
	ToolApprovalChoices:                    "1. Allow once\n2. Allow %s for this session\n3. Always allow %s (save to config)\n4. Deny\nChoose [1/2/3/4] (y/a/p/n also work)",
	BashPrefixChoices:                      "1. Allow once\n2. Allow %s for this session\n3. Always allow %s (save to config)\n4. Deny\nChoose [1/2/3/4] (y/a/p/n also work)",
	PlanModeReadOnlyCommandChoices:         "1. Trust once\n2. Trust this prefix for this session\n3. Always trust this prefix for plan mode (save to config)\n4. Deny\nChoose [1/2/3/4] (y/a/p/n also work)",
	FreshHumanApprovalChoices:              "1. Allow once\n2. Deny\nChoose [1/2] (y/n also work)",
	RecoveryApprovalChoices:                "1. Continue once\n2. Try another approach",
	RecoveryPlanChangeChoices:              "1. Adopt the new plan and continue\n2. Do not adopt; let Auto adjust",
	RecoveryPlanDecisionPrompt:             "The execution plan needs your decision",
	RecoveryPlanBeforeFmt:                  "Previous plan: %s",
	RecoveryPlanAfterFmt:                   "Proposed plan: %s",
	RecoveryTaskGrantChoices:               "1. Continue once\n2. Continue and allow similar actions in this task\n3. Try another approach",
	SandboxEscapeApprovalChoices:           "1. Allow once\n2. Use real environment for this session\n3. Deny\nChoose [1/2/3] (y/a/n also work)",
	ApprovalNeededFmt:                      "approval needed: %s",
	ApprovalNeededWithSubjectFmt:           "approval needed: %s %s",
	ToolApprovalSourceFmt:                  "Source: %s",
	ToolApprovalBuiltIn:                    "built-in tool",
	ToolApprovalImageUse:                   "It will read provided image input for image understanding.",
	ApprovalToolLabelBash:                  "bash",
	ApprovalToolLabelEditFile:              "edit file",
	ApprovalToolLabelWriteFile:             "write file",
	ApprovalToolLabelMultiEdit:             "multi edit",
	ApprovalToolLabelMoveFile:              "move file",
	ApprovalToolLabelWebFetch:              "web fetch",
	ApprovalToolLabelRunSkill:              "run skill",
	ApprovalToolLabelRemember:              "remember",
	ApprovalToolLabelForget:                "forget",
	ApprovalToolLabelSandboxEscape:         "bash sandbox escape",
	ApprovalToolLabelPlanModeReadOnly:      "plan-mode read-only command",
	MemoryApprovalSaveUpdate:               "Save/update memory",
	MemoryApprovalBodyLabel:                "body",
	MemoryApprovalArchiveFmt:               "Archive memory %q",
	PlanModeBashTrustSubjectFmt:            "Trust %q as a read-only command prefix while planning\nCommand: %s",
	PlanModeBashTrustReason:                "This bash command is not in Reasonix's built-in read-only set. Confirm only if this exact prefix is read-only for planning and research. Auto/YOLO approval cannot answer this trust prompt.",
	PlanModeBashTrustDeclined:              "the user declined to trust this bash command as read-only for plan mode - do not retry it; continue with other trusted read-only tools or ask how to proceed.",
	SandboxEscapeSubjectFallback:           "run shell command unconfined once",
	SandboxEscapeSubjectPrefix:             "run unconfined once: ",
	SandboxEscapeWrapReason:                "Windows does not provide an OS-level Bash sandbox for this command. Run it unconfined one time? This bypasses OS isolation for this command only.",
	SandboxEscapeRuntimeReason:             "The OS sandbox could not start this command. Run it unconfined one time? This bypasses OS isolation for this command only.",
	SandboxEscapeDeclined:                  "the user declined to run this command without the OS sandbox - do not retry it unconfined; ask how they would like to proceed.",
	ApprovalToolLabelConfigWrite:           "Reasonix config write",
	ConfigWriteSubjectPrefix:               "write Reasonix config: ",
	ConfigWriteReason:                      "This write targets a Reasonix-managed configuration file outside the workspace. It can change providers, sandbox rules, permissions, and MCP servers for future sessions, so it needs your explicit approval.",
	ConfigWriteDeclined:                    "the user declined this Reasonix config write - do not retry it; ask how they would like to proceed.",
	ConfigWriteApprovalChoices:             "1. Allow once\n2. Allow for this session\n3. Deny\nChoose [1/2/3] (y/a/n also work)",
	WriteAccessApprovalChoices:             "1. Allow once\n2. Allow these directories for this session\n3. Add to project allow_write (save to reasonix.toml)\n4. Deny\nChoose [1/2/3/4] (y/a/p/n also work)",
	WriteAccessHomeWarning:                 "This grants write access to your entire home directory. Reasonix session and runtime-state files stay protected.",
	WriteAccessMergedPermissionHint:        "This choice also authorizes the current matching tool operation.",
	WriteAccessProjectHint:                 "Adding to the project writes [sandbox].allow_write (and the matching permission rule if needed) in this workspace's reasonix.toml.",
	PermissionSavedFmt:                     "permission saved to %s: %s",
	PermissionAlreadyAllowedFmt:            "permission already covered in %s: %s",
	PermissionSaveFailedFmt:                "permission save failed for %s: %v",
	PlanModeReadOnlyCommandTrustSavedFmt:   "plan-mode read-only command trust saved to %s: %s",
	PlanModeReadOnlyCommandTrustAlreadyFmt: "plan-mode read-only command trust already saved in %s: %s",
	PlanModeReadOnlyCommandTrustFailedFmt:  "plan-mode read-only command trust save failed for %s: %v",
	DiffFoldedFmt:                          "… +%d more lines",
	DiffFoldEnabledFmt:                     "diff folded to %d lines (/diff-fold to expand)",
	DiffFoldDisabled:                       "diff expanded — showing all lines (/diff-fold to fold)",

	OutputStyleNone:           "no output styles available",
	ThemeHeader:               "themes:",
	ThemeHint:                 "switch with /theme <auto|light|dark|style>",
	ThemeChangedFmt:           "theme switched to %s / %s",
	ThemeUnknownFmt:           "unknown theme %q",
	LanguageHeader:            "languages:",
	LanguageHint:              "switch with /language <auto|en|zh>",
	LanguageChangedFmt:        "language set to %s (resolved: %s)",
	CurrencyHeader:            "fee display currency:",
	CurrencyHint:              "switch with /currency <auto|CNY|USD>",
	CurrencyChangedFmt:        "fee display currency set to %s (resolved: %s)",
	RuntimeRefreshBusy:        "finish or cancel active work and stop background jobs before changing this setting",
	RuntimeRefreshUnavailable: "runtime refresh is unavailable in this session",

	CompactionWorking: "compacting conversation…",
	CompactionTitle:   "Context compacted",
	CompactionUnit:    "messages",
	CompactionAuto:    "auto",
	CompactionManual:  "manual",

	ExtFormFieldsHint:         "fields are collected through the usual prompts",
	ExtRunActionFmt:           "run %s",
	SlashCompactFailed:        "compaction failed",
	SlashNewDone:              "new session started — previous transcript saved",
	SlashNewFailed:            "could not start a new session",
	SlashClearPrompt:          "Clear current context without saving?",
	SlashClearDone:            "current context cleared",
	SlashClearFailed:          "could not clear current context",
	SlashClsDone:              "screen cleared",
	SlashUnknown:              "unknown command",
	SlashUnknownSentAsMessage: "sent as a regular message",
	SlashTodoCleared:          "task list dismissed",

	SkillPickerAvailableFmt:      "%d available",
	SkillPickerMatchingFmt:       "%d matching · %d total",
	SkillPickerHint:              "↑↓ navigate · Space toggle · Enter save · / search · s sources · r rescan · Esc cancel",
	SkillPickerDetailHint:        "↑↓ navigate · Enter select · Space toggle · Esc back",
	SkillPickerSearchEmpty:       "No skills match your search",
	SkillPickerSearchPlaceholder: "Search skills...",
	SkillPickerSourceTitle:       "Sources",
	SkillPickerSourceActiveFmt:   "%d active",
	SkillPickerSourceHint:        "↑↓ navigate · Enter skills · d diagnostics · s skills · r rescan · Esc close",
	SkillPickerDiagHidden:        "d show diagnostics",
	SkillPickerDiagShown:         "d hide diagnostics",
	SkillPickerBuiltinSource:     "builtin",
	SkillPickerRescanned:         "skills rescanned",
	SkillPickerNoDescription:     "(no description)",
	SkillPickerScopeProject:      "project",
	SkillPickerScopeCustom:       "custom",
	SkillPickerScopeGlobal:       "global",
	SkillPickerScopeBuiltin:      "builtin",
	SkillPickerSubagent:          "subagent",
	SkillPickerAvailableLabel:    "on",
	SkillPickerDisabledLabel:     "off",
	SkillPickerNoChanges:         "Skills dialog dismissed: No changes",
	SkillPickerSourceSkillsHint:  "↑↓ navigate · Space toggle · Enter details · Esc sources",
	SkillPickerSourceSkillsEmpty: "No skills in this source",
	SkillPickerActionToggle:      "Toggle enabled",
	SkillPickerActionDelete:      "Delete skill",
	SkillPickerDeleteTitleFmt:    "Delete skill /%s?",
	SkillPickerDeleteConfirm:     "Delete",
	SkillPickerDeleteCancel:      "Cancel",
	SkillPickerDeleteHint:        "Enter confirm · y delete · n/Esc cancel",
	SkillPickerDeletedFmt:        "deleted skill %s",
	SkillPickerMoreAboveFmt:      "↑ %d more above",
	SkillPickerMoreBelowFmt:      "↓ %d more below",
	SkillPickerTokenFmt:          "~%d tok",
	SkillPickerDetailMetaFmt:     "Scope: %s  Run as: %s",
	SkillPickerSkillsUnit:        "skills",
	SkillPickerLinesUnit:         "lines",
	SkillPickerStatusLabel:       "skill picker",
	SkillPickerStatusOK:          "ok",
	SkillPickerStatusMissing:     "missing",
	SkillPickerStatusNotDir:      "not-directory",
	SkillPickerStatusUnreadable:  "unreadable",
	SlashPromptEmpty:             "the MCP prompt returned no content to send",
	SlashMCPNone:                 "no MCP servers configured — add a [[plugins]] entry in reasonix.toml",
	CtrlCQuitHint:                "press Ctrl+C again to quit",
	CompHintSlash:                "↑/↓ move · Tab/Enter select · Esc close",
	CompHintFile:                 "↑/↓ move · Tab/Enter open folder or pick file · Esc close",
	MouseCopiedHint:              "copied to clipboard",
	ClipboardCopyOSC52Hint:       "copy sent via OSC 52 — terminal permission may be required",
	ClipboardCopyFallbackHint:    "native clipboard unavailable — copy sent via OSC 52",
	ClipboardTextPasteRemoteHint: "mouse paste cannot read your local clipboard or PRIMARY selection over SSH — use the terminal paste shortcut or /mouse",
	ClipboardTextPasteFailedFmt:  "paste text failed: %v",
	ClipboardImagePastingHint:    "Pasting image…",
	ClipboardImagePasteFailedFmt: "paste image failed: %v",
	MouseCaptureOnHint:           "mouse capture on — in-app drag-select/scrollbar/wheel active",
	MouseCaptureOffHint:          "mouse capture off — your terminal now handles selection and right-click",
	MouseCaptureTag:              "native mouse",

	ShellExecEmpty:      "usage: !<command>  (e.g. !ls -la)",
	ShellExecFailedFmt:  "shell command failed: %v",
	ShellExecTimeoutFmt: "shell command timed out (> %s)",
	ShellModeHint:       "Enter runs shell · Esc cancels · click output to expand",

	CmdNew:              "start new session; save transcript",
	CmdClear:            "discard current context",
	CmdCls:              "clear screen only (keep LLM context)",
	CmdCompact:          "compact context",
	CmdContinueChecks:   "continue a paused final-readiness check",
	CmdContext:          "show context window, thresholds, and last maintenance",
	CmdRewind:           "rewind to an earlier turn",
	CmdTree:             "show conversation branches",
	CmdBranch:           "create a conversation branch",
	CmdSwitchBranch:     "switch conversation branch",
	CmdResume:           "resume a saved session",
	CmdRename:           "rename a session",
	CmdModel:            "switch model",
	CmdStatus:           "show session status",
	CmdWorkMode:         "deprecated: adaptive standard execution",
	CmdDocs:             "search version-matched embedded documentation",
	CmdMemory:           "inspect instructions, memory, and recovery",
	CmdMigrate:          "retry legacy data migration",
	CmdGoal:             "set or clear the active goal",
	CmdRemember:         "save a memory note",
	CmdForget:           "archive a saved memory",
	CmdMcp:              "MCP servers",
	CmdRemote:           "remote SSH hosts",
	CmdHooks:            "manage hooks",
	CmdPlugins:          "manage plugin packages",
	CmdPasteImage:       "paste clipboard image",
	CmdOutputStyle:      "list output styles",
	CmdTheme:            "switch CLI theme",
	CmdLanguage:         "switch CLI language",
	CmdCurrency:         "switch fee display currency",
	CmdSkill:            "manage skills",
	CmdVerbose:          "toggle thinking text",
	CmdReloadCmd:        "reload custom commands",
	CmdReload:           "reload the agent runtime (tools, skills, commands, hooks, providers) keeping this session",
	CmdDiffFold:         "toggle diff fold/expand",
	CmdSandbox:          "show sandbox status",
	CmdEffort:           "set reasoning effort",
	CmdMouse:            "toggle in-app mouse capture (off = native terminal selection/right-click)",
	CmdReasonLang:       "set visible reasoning language",
	CmdHelp:             "list commands",
	CmdWeb:              "continue this session in the Web UI",
	CmdTodo:             "dismiss the task list",
	CmdQuit:             "exit the session",
	CmdCopy:             "pick a response to copy to clipboard",
	CmdExport:           "export session as markdown",
	SlashCopyDone:       "copied response to clipboard",
	SlashCopyEmpty:      "no assistant response to copy",
	SlashCopyListHeader: "pick a response to copy:",
	SlashExportDoneFmt:  "session exported to %s",
	SlashExportEmpty:    "no messages to export",
	ArgSkillShow:        "show a skill's body",
	ArgSkillNew:         "scaffold a new skill",
	ArgSkillPaths:       "show discovery paths",
	ArgMcpAdd:           "connect a server",
	ArgMcpRemove:        "disconnect a server",
	ArgMcpConnected:     "connected",
	ArgHooksList:        "list active hooks",
	ArgModelCurrent:     "current",
	ArgEffortAuto:       "use the model default",
	ArgEffortLow:        "lighter reasoning",
	ArgEffortMedium:     "balanced reasoning",
	ArgEffortHigh:       "deeper reasoning",
	ArgEffortXHigh:      "extra deep reasoning",
	ArgEffortMax:        "maximum reasoning",
	ArgThemeCurrent:     "current",
	ArgLanguageAuto:     "auto-detect from REASONIX_LANG / locale",
	ArgLanguageEn:       "English",
	ArgLanguageZh:       "中文",

	ListModelsHeaderFmt: "models (active: %s)",
	ListModelsHint:      "switch with the model switcher, or type /model <provider/model>",
	ListMemorySaved:     "saved memories",
	ListMemoryArchived:  "archived memories",
	ListMemoryNone:      "memory: none — add with “/remember <note>” or run /init to generate AGENTS.md",
	ListSkillsHeaderFmt: "skills (%d)",
	ListSkillsNone:      "skills: none defined — invoke a built-in like /init, or author one with install_skill",
	ListHooksHeaderFmt:  "hooks (%d active)",
	ListHooksNone:       "hooks: none active — configure in .reasonix/settings.json (project) or <Reasonix home>/settings.json (global)",
	ListMcpHeader:       "mcp servers",
	ListMcpNone:         "mcp: no servers connected — add one in reasonix.toml ([[plugins]]) or a project .mcp.json",

	MemoryEditHint:               "edit doc files or use “/remember <note>”; doc edits apply next session",
	ForgetUsage:                  "usage: /forget <name> — the slug shown under “saved memories” in /memory",
	ForgetDoneFmt:                "forgot and archived memory: %s",
	QuickRememberEmpty:           "nothing to remember",
	QuickRememberDoneFmt:         "remembered → %s",
	GoalEmpty:                    "goal: none — set one with /goal <objective>",
	GoalCurrentFmt:               "goal: %s",
	GoalSetFmt:                   "goal set → %s",
	GoalCleared:                  "goal cleared",
	GoalNotRunning:               "no running goal to pause",
	GoalNotPaused:                "no paused or blocked goal to resume",
	GoalPaused:                   "goal paused — /goal resume continues it",
	GoalPausedReason:             "paused by the user",
	GoalPausedFmt:                "goal is paused (%s) — use /goal resume to continue",
	GoalRuntimeFmt:               "runtime: turns %d · requests %d · tokens %d · work time %s",
	GoalRuntimeLastReason:        "last reason",
	ModelSwitchUnavailable:       "model switching is unavailable in this session",
	ModelSwitchBusy:              "finish or cancel active work and stop background jobs before switching models",
	ModelAlreadyOnFmt:            "already on %s",
	ModelSwitchingFmt:            "switching to %s…",
	ModelSwitchedFmt:             "switched to %s (conversation carried over; prompt cache resets)",
	ModelListHeader:              "models (/model <provider/model> to switch)",
	RuntimeSwitchPending:         "wait for the current runtime switch to finish",
	RuntimeReloadQueued:          "reload queued — will run when the current work finishes",
	RuntimeReloaded:              "runtime reloaded",
	RuntimeReloadedGenerationFmt: "runtime reloaded (generation %d)",
	WorkModeUsage:                "usage: /preset <standard|delivery>",
	WorkModeDeprecatedNotice:     "Execution modes are now a session quality floor: /preset standard (default) or /preset delivery. Light has been folded into standard; the adaptive policy already runs light work lightly.",
	QualityFloorApplied:          "Quality floor set: subsequent turns use the delivery completion gates.",
	RewindNone:                   "nothing to rewind yet",
	RewindCodeConversation:       "Code + conversation",
	RewindConversationOnly:       "Conversation only",
	RewindCodeOnly:               "Code only",
	RewindFork:                   "Fork",
	RewindSummarizeFrom:          "Compress after here (history kept)",
	RewindSummarizeUpto:          "Compress before here (history kept)",
	RewindPickTitle:              "⟲ Rewind — pick a turn",
	RewindPickHint:               "↑/↓ move · Enter choose · Esc close",
	RewindRestoreTitleFmt:        "⟲ Restore to turn %d ",
	RewindApplyHint:              "↑/↓ · Enter apply · Esc back",
	RewindCoverageTitle:          "⚠ Partial file coverage",
	RewindCoverageWarningFmt:     "%d coverage gap(s) mean some file changes may not be restored.",
	RewindConfirmHint:            "Enter/y confirm · Esc back",
	RewindUnavailableFmt:         "rewind unavailable: %s",
	RewindEmpty:                  "(empty)",

	EnterAPIKeysHeader:       "Enter API keys (Enter to skip and set later):",
	WroteFileFmt:             "Wrote %s",
	SetupComplete:            "Setup complete.",
	SetupCancelled:           "setup cancelled.",
	TryHintFmt:               "Try: %s",
	NextHint:                 "Next: set your API key (run `reasonix setup` or export DEEPSEEK_API_KEY=...), then run `reasonix run \"your task\"`.",
	ConfirmReconfigureFmt:    "%s already exists. Reconfigure and overwrite?",
	NotOverwritingFmt:        "%s already exists; not overwriting",
	SetupManagerTitle:        "Provider configuration",
	SetupAddOpenAI:           "Add OpenAI-compatible provider",
	SetupAddAnthropic:        "Add Anthropic-compatible provider",
	SetupProviderExistsFmt:   "Provider %q already exists. Manage the existing provider to edit its models or settings.",
	SetupSaveExit:            "Save and exit",
	SetupSaveExitDesc:        "write staged changes",
	SetupCancel:              "Cancel",
	SetupCancelDesc:          "discard all staged changes",
	SetupModelsUnit:          "models",
	SetupKeySet:              "key set",
	SetupKeyMissing:          "key missing",
	SetupDefaultBadge:        "default",
	SetupProviderActionsFmt:  "Manage %s",
	SetupEditProvider:        "Edit provider",
	SetupUpdateKey:           "Update API key",
	SetupTestRefresh:         "Test connection / refresh models",
	SetupSetDefault:          "Set default model",
	SetupRemoveProvider:      "Remove provider",
	SetupBack:                "Back",
	SetupPromptModels:        "Models (comma-separated)",
	SetupSharedKeyWarningFmt: "%s is also used by %s at %s. Share this credential?",
	SetupPromptAPIKeyFmt:     "Enter new value for %s",
	SetupSelectDefaultModel:  "Select default model",
	SetupConfirmRemoveFmt:    "Remove provider %s?",
	SetupSummaryTitle:        "Pending changes:",
	SetupSummaryAddedFmt:     "Added: %s",
	SetupSummaryEditedFmt:    "Edited: %s",
	SetupSummaryRemovedFmt:   "Removed: %s",
	SetupSummaryDefaultFmt:   "Default model: %s",
	SetupSummaryKeysFmt:      "API keys updated: %d",
	SetupSummaryNoChanges:    "No changes",
	SetupConfirmSave:         "Save these changes?",
	SetupConcurrentChangeFmt: "Configuration changed while setup was open (%s). No staged setup changes were saved; run setup again to review the latest configuration.",

	// model fetching
	FetchingModelsFmt:          "Fetching models for %s...",
	FetchModelsSuccessFmt:      "Found %d models for %s",
	FetchModelsFailedFmt:       "Failed to fetch models for %s: %v",
	FetchModelsUsingPresetsFmt: "Live fetch unavailable for %s, using preset model list",
	SelectModelsLabel:          "Select models to enable for %s",
	CustomFetchEmpty:           "/models returned an empty list — falling back to manual entry",
	AnthropicFetchEmpty:        "/models returned an empty list — Anthropic-compatible providers usually don't expose one, falling back to manual entry",
	APIKeyAlreadySetFmt:        "reusing existing value for %s",
	APIKeyResetPromptFmt:       "Re-enter %s?",
	InvalidAPIKeyEnvFmt:        "%q is not a valid API Key variable name. Use letters, numbers, and underscores (for example, MY_PROVIDER_API_KEY); do not enter a model name.",
	RepairedAPIKeyEnvFmt:       "provider %s: replaced invalid API Key variable name %q with %q",

	// custom provider
	CustomProviderDesc:   "Add third-party OpenAI compatible model",
	CustomAddMethodLabel: "Add third-party OpenAI compatible model - Select add method",
	CustomMethodManual:   "Enter model name manually",
	CustomMethodURL:      "Fetch models from URL",
	CustomPromptModel:    "Enter model name",
	CustomPromptBaseURL:  "Enter Base URL",
	CustomPromptKeyEnv:   "API Key variable name (press Enter to use the default; not the model name)",
	CustomPromptAPIKey:   "Enter API Key",
	CustomPromptWindow:   "Context window in tokens (a value below the model's real window makes compaction fire early)",
	CustomAddedFmt:       "Added custom model: %s",

	// Anthropic compatible provider
	AnthropicProviderDesc:          "Add third-party Anthropic compatible model",
	AnthropicAddMethodLabel:        "Add third-party Anthropic compatible model - Select add method",
	AnthropicMethodManual:          "Enter model name manually",
	AnthropicMethodURL:             "Fetch models from URL",
	AnthropicPromptModel:           "Enter model name",
	AnthropicPromptBaseURL:         "Enter Base URL",
	AnthropicPromptKeyEnv:          "API Key variable name (press Enter to use the default; not the model name)",
	AnthropicPromptAPIKey:          "Enter API Key",
	AnthropicAddedFmt:              "Added Anthropic compatible model: %s",
	AnthropicFetchingModelsFmt:     "Fetching models for %s...",
	AnthropicFetchModelsSuccessFmt: "Found %d models for %s",
	AnthropicFetchModelsFailedFmt:  "Failed to fetch models for %s: %v",
	AnthropicSelectModelsLabel:     "Select models to enable for %s",

	RemoteConnectingFmt:       "connecting to %s…",
	RemoteConnectedFmt:        "connected to %s",
	RemoteReconnectingFmt:     "reconnecting to %s (attempt %d)…",
	RemoteDegradedFmt:         "connected to %s, but some forwards are down",
	RemoteDisconnected:        "disconnected (remote serve keeps running)",
	RemoteServeReadyFmt:       "remote serve ready: %s",
	RemoteHostKeyPromptFmt:    "unknown host key for %s\n  type:        %s\n  fingerprint: %s",
	RemotePassphrasePromptFmt: "passphrase for %s:",
	RemotePasswordPromptFmt:   "password for %s:",
	RemoteBootstrapStepFmt:    "remote serve: %s %s",
	RemoteNoHostsHint:         "no remote hosts configured; add one with `reasonix remote add <name> [user@]host`",

	UnknownCommandFmt:         "unknown command %q",
	UsageRunHint:              "usage: reasonix -p [--model NAME] <task>",
	ErrorPrefix:               "error:",
	ReconfigureOnUnknownModel: "Configured model is no longer available — re-running setup.",
	WriteConfigErr:            "write config:",
	WriteEnvErr:               "write .env:",

	ProviderErrBadRequest:          "Malformed request (HTTP 400): the request body was rejected. This is likely a bug — please report it if it persists.",
	ProviderErrContextOverflowFmt:  "This request exceeds the shared context window: prompt %d + completion %d = %d tokens, but the window is %d. Compact, retry with a smaller output cap, fork, or rewind, then send again.",
	ProviderErrAuth:                "Authentication failed (HTTP 401): your API key is missing or unset. Add it to .env or run `reasonix setup`.",
	ProviderErrAuthRejected:        "Authentication failed (HTTP 401): the server rejected your API key. It may be wrong or expired, or the provider hit a transient auth/quota issue — retried with backoff and still failed. Try again shortly, or check the key in .env / run `reasonix setup`.",
	ProviderErrModelFormatMismatch: "Model/API format mismatch: the server does not support this model on the selected provider route. This is not an invalid API key; choose a provider route that supports the model.",
	ProviderErrOpenCodeGoGrokRoute: "For OpenCode Go, use the OpenCode Go Responses preset with `grok-4.5`.",
	ProviderErrInsufficientBalance: "Insufficient balance (HTTP 402): your account is out of credit. Top up your account, then retry.",
	ProviderErrUnprocessable:       "Invalid parameters (HTTP 422): a request parameter was rejected. This is likely a bug — please report it if it persists.",
	ProviderErrInputSensitive:      "MiniMax rejected the input during content review (error 1026). The review may include conversation history and tool results; adjust the relevant content or start a new session with only the necessary context. Repeating the same request is unlikely to help.",
	ProviderErrOutputSensitive:     "MiniMax rejected the generated output during content review (error 1027). Adjust the request and try again, or use another provider if the rejection persists.",
	ProviderErrRateLimited:         "Rate limit reached (HTTP 429): too many requests (TPM/RPM). Retried with backoff — slow down or try again shortly.",
	ProviderErrServer:              "Server error (HTTP 500): the provider hit an internal fault. Retried with backoff; if it keeps failing, try again later.",
	ProviderErrServerBusy:          "Server busy (HTTP 503): the provider is overloaded. Retried with backoff; please try again shortly.",

	SelectOneHint:  "(↑/↓ · Enter · q to cancel; / to search)",
	SelectManyHint: "(↑/↓ · Space · Enter · q; / to search)",

	SelectMoreAboveFmt: "  ↑ %d more above",
	SelectMoreBelowFmt: "  ↓ %d more below",
	SelectSearchHint:   "/ to search · type to filter · Esc cancel search",

	CmdProvider:          "switch provider",
	ProviderListHeader:   "providers (/provider <name> to switch)",
	ProviderAlreadyOnFmt: "already using provider %s",
	ProviderUnknownFmt:   "unknown provider %q",
	ProviderPickLabel:    "Select a model from %s",
	ProviderNoModelsFmt:  "provider %s has no configured models",

	// self-update
	UpgradeChecking:            "Checking for updates…",
	UpgradeChannelDeprecated:   "Release channels are retired; using the official release.",
	UpgradeDevBuild:            "dev builds cannot self-update",
	UpgradeFetchFailed:         "failed to check for updates: %v",
	UpgradeInvalidVersion:      "remote version is not valid semver",
	UpgradeAlreadyLatest:       "Already on the latest version.",
	UpgradeForcing:             "Reinstalling the same version…",
	UpgradeAvailableFmt:        "Current: %s → Latest: %s",
	UpgradeNoAssetFmt:          "no binary found for %s",
	UpgradeDownloadingFmt:      "Downloading %s (%s)…",
	UpgradeDownloadFailed:      "download failed: %v",
	UpgradeVerifying:           "Verifying checksum…",
	UpgradeChecksumFailed:      "could not fetch checksum file: %v",
	UpgradeChecksumMismatchFmt: "SHA256 mismatch: got %s, want %s",
	UpgradeChecksumNotFoundFmt: "%s not found in SHA256SUMS",
	UpgradeExtractFailed:       "failed to extract binary: %v",
	UpgradeApplying:            "Replacing binary…",
	UpgradeApplyFailed:         "failed to apply update: %v",
	UpgradeSuccessFmt:          "Updated %s → %s",

	ReportNoPending:           "No pending CLI crash reports.",
	ReportHeaderFmt:           "CLI crash report %s",
	ReportCapturedFmt:         "Captured: %s",
	ReportPreviewOnlyFmt:      "Preview only. Run `reasonix report send %s` to send this report.",
	ReportSendPrompt:          "Send this sanitized report to crash.reasonix.io?",
	ReportKept:                "Report kept locally.",
	ReportDeletedFmt:          "Deleted CLI crash report %s.",
	ReportSentFmt:             "Sent CLI crash report %s.",
	ReportConfigFailedFmt:     "cannot load network configuration: %v",
	ReportUploadFailedFmt:     "report upload failed; the local report was kept: %v",
	ReportSentDeleteFailedFmt: "report was sent but the local copy could not be deleted: %v",
	ReportUsageBody: `Usage:
  reasonix report                 preview the newest local report and confirm sending
  reasonix report list            list local CLI crash reports
  reasonix report show [ID]       preview a report (newest when ID is omitted)
  reasonix report send [ID]       send a reviewed report and delete it after success
  reasonix report delete [ID]     delete a local report without sending`,

	CLITelemetryConsentNotice:           "Reasonix can send anonymous, content-free CLI usage statistics to crash.reasonix.io: a random install ID, version, OS, and fixed quality buckets. It never sends prompts, answers, code, paths, model or tool content, or environment variables. You can disable this later with `reasonix config telemetry off`.",
	CLITelemetryConsentPrompt:           "Allow anonymous CLI usage statistics?",
	CLITelemetryConsentInvalid:          "Please answer y or n.",
	CLITelemetryConsentSaveFailedFmt:    "CLI telemetry remains disabled because the preference could not be saved: %v",
	CLITelemetryConsentCleanupFailedFmt: "CLI telemetry is disabled, but pending statistics could not be deleted: %v",

	UsageBody: `reasonix — a config- and plugin-driven coding agent (multi-model)

Usage:
  reasonix [--model NAME] [-c|--continue] [-r|--resume [QUERY]] [--permission-mode MODE] [--effort LEVEL] [--add-dir PATH]   interactive session
  reasonix -p|--print [--model NAME] [--output-format text|json|stream-json] [--allowed-tools RULES] [--add-dir PATH] <task>
  reasonix run [--model NAME] [--max-steps N] [-c|--continue] [--resume PATH] [--copy] [--output-format FORMAT] <task>
  reasonix run --events-jsonl [--model NAME] <task>      emit redacted structured events as JSONL
  reasonix review [--base BRANCH] [--commit SHA] [--model NAME]  AI-powered code review on local diffs
  reasonix web [--model NAME] [--addr HOST:PORT] [--no-open]  start the local Web UI and open it in the default browser
  reasonix serve [--model NAME] [--addr HOST:PORT] [--auth none|token|password] [--token STR] [--password STR] [--hash-password]  serve over HTTP+SSE (with optional auth)
  reasonix acp [--model NAME]                           serve Agent Client Protocol over stdio (also: reasonix --acp)
  reasonix setup [path]                                 interactive config wizard; writes reasonix.toml (+ .env)
  reasonix config reasoning-language [auto|zh|en]        configure visible reasoning language
  reasonix config compact-ratio [--local] [30..85]       configure automatic compaction threshold
  reasonix config telemetry [auto|on|off]                configure content-free CLI usage metrics
  reasonix report [list|show|send|delete] [ID]           review and explicitly send local CLI crash reports
  reasonix mcp <add|remove|list|import>                 manage MCP servers in reasonix.toml
  reasonix subagent <list|create|edit|delete|try|run>   manage and run isolated subagent profiles
  reasonix init                                         show how to generate project memory (AGENTS.md)
  reasonix doctor [--json]                              print redacted local diagnostics
  reasonix doctor session <branch-id> [--zip] [--out PATH]  export a session conflict diagnostic zip
  reasonix session list --json [--dir PATH]             list redacted sessions for machine clients
  reasonix session show|status <machine-session-id> --json [--dir PATH]  query one redacted session
  reasonix session recovery [<machine-session-id>] --json [--dir PATH]  query redacted recovery state
  reasonix hook list|status --json [--dir PATH]         inspect redacted hook state
  reasonix task list|show|status|events|stop|cancel|monitor|tmux --json [--dir PATH]
                                                         inspect or control redacted tasks
  reasonix bot start|doctor|weixin-login                multi-channel IM bot gateway
  reasonix upgrade [--check] [--force]                   update to the latest official release (also: reasonix update)
  reasonix completion bash|zsh|fish                     print a shell completion script to stdout
  reasonix version [--verbose|--json]                   print version (single line) or build metadata
  reasonix --version | -v                               single-line version (script-safe)
  reasonix help

Examples:
  reasonix
  reasonix --continue
  reasonix --resume provider-config
  reasonix web
  reasonix run "implement the TODOs in main.go"
  reasonix run --model mimo-pro "add unit tests for this function"
  reasonix -p "summarize this repository" --output-format json
  reasonix subagent run review "review the current changes"
  echo "explain this code" | reasonix run

Configuration:
  Resolution: flag > ./reasonix.toml > <Reasonix home>/config.toml > built-in defaults
  Secrets come from the environment via api_key_env (e.g. DEEPSEEK_API_KEY).
  Run 'reasonix setup' to scaffold a config; see docs/SPEC.md.
`,
}
