ompchamber 3.1.0 → 3.1.1
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/README.md +6 -3
- package/dist/client/index.html +1 -1
- package/dist/client/index.js +138 -138
- package/dist/client/static/js/index-5yfre1kw.css +1 -0
- package/dist/client/static/js/{index-8t70jhyj.js → index-qhzsybkn.js} +1 -1
- package/package.json +1 -1
- package/src/cli/lib/args.js +4 -3
- package/src/cli/lib/commands/restart.js +7 -6
- package/src/cli/lib/commands/stop.js +38 -31
- package/src/cli/lib/commands/update.js +3 -2
- package/src/cli/lib/stop-scope.js +23 -0
- package/src/cli/lib/stop-scope.test.js +41 -0
- package/src/server/lib/bundler/css.test.ts +87 -0
- package/src/server/lib/bundler/css.ts +17 -2
- package/src/server/lib/bundler/nested-at-rules.test.ts +100 -0
- package/src/server/lib/bundler/nested-at-rules.ts +146 -0
- package/src/server/lib/lifecycle/launch-mode.test.ts +20 -1
- package/src/server/lib/lifecycle/launch-mode.ts +26 -0
- package/src/server/lib/lifecycle/restart.ts +9 -14
- package/dist/client/static/js/index-n4wkqj7t.css +0 -1
- package/src/server/lib/lifecycle/restart.test.ts +0 -21
|
@@ -43,7 +43,7 @@ description: "${T.description}"
|
|
|
43
43
|
---
|
|
44
44
|
|
|
45
45
|
## Instructions
|
|
46
|
-
Follow standard prompt protocol for ${T.name}.`,project:"ompchamber",isInstalledFromCatalog:!0,catalogSource:T.sourceId};fetch("/api/settings/skills",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({skill:I})}).then((O)=>O.json()).then((O)=>{if(O?.skills)a(O.skills);else a((D)=>[...D,I]);v(`Installed skill "${T.name}"`),YC("command")}).catch(console.error)}},S=(T)=>{let A=[...e,T];r(A),o(T.id),fetch("/api/settings/skills",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({catalogSources:A})}).catch(console.error),v(`Added source "${T.name}"`)},w=t.filter((T)=>{let A=!l.trim()||T.name.toLowerCase().includes(l.toLowerCase())||T.description.toLowerCase().includes(l.toLowerCase())||T.repoTag.toLowerCase().includes(l.toLowerCase());if(l.trim())return A;return T.sourceId===s}),C=e.find((T)=>T.id===s)||e[0]||null;return h("div",{className:"flex-1 flex flex-col h-full w-full scrollbar-overlay-container scrollbar-overlay-static bg-paper text-ink p-6 md:p-8 space-y-6",children:[h("div",{children:h("p",{className:"text-xs text-ink/70 leading-relaxed",children:"Install ready-made skills from curated repositories, or add your own source."})}),h("div",{className:"relative",children:[h(ia,{size:15,className:"absolute left-3 top-2.5 text-ink/40 pointer-events-none"}),h("input",{type:"text",value:l,onChange:(T)=>u(T.currentTarget.value),placeholder:"Search skills across all sources...",className:"w-full pl-9 pr-4 py-2 rounded-lg border border-ink/20 hover:border-ink/40 bg-paper focus:outline-none focus:border-ink text-xs text-ink transition-colors"})]}),h("div",{className:"space-y-3",children:[h("h3",{className:"text-xs font-bold uppercase tracking-wider text-ink",children:"Sources"}),h("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:[e.map((T)=>{let A=s===T.id&&!l.trim();return h("div",{onClick:()=>{o(T.id),u("")},className:`p-3.5 rounded-xl border transition-all cursor-pointer select-none relative ${A?"border-ink bg-ink/5 shadow-xs":"border-ink/20 hover:border-ink/40 bg-paper"}`,children:[h("div",{className:"flex items-center justify-between",children:[h("div",{className:"flex items-center gap-2",children:[h("span",{className:"text-xs font-bold text-ink",children:T.name}),h("span",{className:"text-[10px] text-ink/50 font-mono",children:[T.skillCount," skills"]})]}),h(Ur,{size:13,className:`text-ink/40 hover:text-ink transition-colors ${d&&A?"animate-spin":""}`})]}),h("div",{className:"mt-1 font-mono text-[11px] text-ink/60 truncate",children:T.repo}),h("div",{className:"mt-2.5 flex items-center gap-3 text-[10px] text-ink/50",children:[h("span",{className:"flex items-center gap-1",children:[h(l1,{size:11,className:"text-ink/50"}),h("span",{children:T.stars})]}),h("span",{children:T.updatedAt})]})]},T.id)}),h("div",{onClick:()=>f(!0),className:"p-3.5 rounded-xl border border-dashed border-ink/25 hover:border-ink/50 bg-paper hover:bg-ink/[0.02] transition-all cursor-pointer flex items-center gap-3 select-none",children:[h("div",{className:"w-8 h-8 rounded-lg border border-ink/20 flex items-center justify-center text-ink/60 flex-shrink-0",children:h(vr,{size:16})}),h("div",{children:[h("div",{className:"text-xs font-bold text-ink",children:"Add your own source"}),h("div",{className:"text-[11px] text-ink/60",children:"Any Git repository with skills"})]})]})]})]}),h("div",{className:"border-t border-ink/10 pt-4",children:[h("div",{className:"flex items-center justify-between pb-3",children:[h("div",{className:"flex items-center gap-2",children:[h("span",{className:"text-xs font-bold uppercase tracking-wider text-ink",children:l.trim()?"Search Results":C?.name?C.name.toUpperCase():"SKILL CATALOG"}),h("span",{className:"text-xs text-ink/50",children:[w.length," skill(s) found"]})]}),h("button",{type:"button",onClick:x,title:"Refresh skills",className:"p-1 rounded-md text-ink/50 hover:text-ink hover:bg-ink/5 transition-colors cursor-pointer",children:h(Ur,{size:14,className:d?"animate-spin":""})})]}),h("div",{className:"space-y-3",children:w.length===0?h("div",{className:"text-center py-10 border border-dashed border-ink/15 rounded-xl",children:h("p",{className:"text-xs text-ink/60",children:"No skills found matching your query."})}):w.map((T)=>{let A=y.has(T.name);return h("div",{className:"p-4 rounded-xl border border-ink/15 hover:border-ink/30 bg-paper transition-all flex flex-col sm:flex-row sm:items-start justify-between gap-3",children:[h("div",{className:"space-y-1.5 flex-1 min-w-0",children:[h("div",{className:"flex items-center gap-2",children:h("span",{className:"text-xs font-bold text-ink tracking-tight font-mono",children:T.name})}),h("p",{className:"text-xs text-ink/75 leading-relaxed line-clamp-2",children:T.description}),h("div",{className:"flex items-center gap-1.5 text-[11px] text-ink/50 font-mono pt-1",children:[h(zc,{size:12,className:"flex-shrink-0"}),h("span",{className:"truncate",children:T.repoTag})]})]}),h("div",{className:"flex items-center gap-2 flex-shrink-0 self-end sm:self-center",children:[T.githubUrl&&h("a",{href:T.githubUrl,target:"_blank",rel:"noreferrer",className:"p-1.5 rounded-lg text-ink/50 hover:text-ink hover:bg-ink/5 transition-colors cursor-pointer",title:"View repository",children:h(am,{size:14})}),h("button",{type:"button",onClick:()=>_(T),className:`px-3 py-1.5 rounded-lg text-xs font-medium transition-all flex items-center gap-1.5 cursor-pointer ${A?"border border-ink/20 text-ink/80 hover:border-error hover:text-error hover:bg-error/5":"bg-ink text-paper hover:bg-ink/90 shadow-xs"}`,children:A?h(Et,{children:[h(zt,{size:12}),h("span",{children:"Installed"})]}):h(Et,{children:[h(Yd,{size:12}),h("span",{children:"install"})]})})]})]},T.id)})})]}),h(EIe,{isOpen:m,onClose:()=>f(!1),onAddSource:S}),g&&h("div",{className:"fixed bottom-6 right-6 z-50 bg-ink text-paper text-xs font-medium px-4 py-2.5 rounded-lg shadow-lg animate-in fade-in slide-in-from-bottom-2 duration-150 flex items-center gap-2",children:[h(zt,{size:14}),h("span",{children:g})]})]})}var MIe=R(()=>{lt();bt();LIe();f9();IIe();fe()});function $Ie({category:e}){return h("div",{className:"space-y-6 text-ink flex flex-col items-center justify-center py-16",children:[h("div",{className:"text-sm font-semibold capitalize",children:[e.replace("-"," ")," Settings"]}),h("div",{className:"text-xs text-ink/60 text-center max-w-sm mt-2",children:"This settings category is currently under construction and will be available soon."})]})}var PIe=R(()=>{fe()});var OIe;var DIe=R(()=>{OIe={source:"settings-schema.ts",tabs:[{id:"appearance",label:"Appearance",groups:["Theme","Composer","Status Line","Display","Images"]},{id:"model",label:"Model",groups:["Thinking","Sampling","Prompt","Retry & Fallback","Advisor","Prewalk","Vision"]},{id:"interaction",label:"Interaction",groups:["Input","Approvals","Notifications","Speech","Collab","Magic Keywords","Startup & Updates","Power","Agent","Git"]},{id:"context",label:"Context",groups:["General","Compaction","Rules (TTSR)","Experimental"]},{id:"memory",label:"Memory",groups:["General","Auto-Learn","Mnemopi","Hindsight","Sharpshooter"]},{id:"files",label:"Files",groups:["Editing","Reading","Read Summaries","LSP"]},{id:"shell",label:"Shell",groups:["Bash","Eval & Runtimes"]},{id:"tools",label:"Tools",groups:["Available Tools","Todos","Grep & Browser","Computer","GitHub","Output Limits","Execution","Discovery & MCP","Extensions","Developer"]},{id:"tasks",label:"Tasks",groups:["Modes","Subagents","Isolation","Commands & Skills"]},{id:"providers",label:"Providers",groups:["Services","Fireworks","Tiny Model","Protocol","Timeouts","Privacy"]}],entries:{autoResume:{ui:{tab:"interaction",group:"Startup & Updates",label:"Auto Resume",description:"Automatically resume the most recent session in the current directory"},type:"boolean",default:!1},"power.sleepPrevention":{ui:{tab:"interaction",group:"Power",label:"Sleep Prevention",description:"Prevent the system sleeping during active sessions. Each level is cumulative — it adds the flags of all lower levels.",options:[{value:"off",label:"Off",description:"Do not prevent any sleep"},{value:"idle",label:"Prevent Idle Sleep",description:"Keep the system awake while a session is open (macOS `caffeinate -i`)"},{value:"display",label:"Prevent Display Sleep",description:"Also keep the display from idle-sleeping (macOS `caffeinate -i -d`)"},{value:"system",label:"Prevent System Sleep",description:"Also block all system sleep on AC and declare the user active (macOS `caffeinate -i -d -s -u`)"}]},type:"enum",default:"idle",values:["off","idle","display","system"]},"advisor.enabled":{ui:{tab:"model",group:"Advisor",label:"Enable Advisor",description:"Pair a second model (assigned to the 'advisor' role) that passively reviews each turn and injects notes."},type:"boolean",default:!1},"prewalk.enabled":{ui:{tab:"model",group:"Prewalk",label:"Enable Prewalk",description:"Start on the active model, then switch to a fast/cheap model (default the 'smol' role) at the first edit/write after the plan nudge's todo list exists — the strong model plans, commits the todos, and starts the implementation before handing off. Overridable per session with --prewalk / --no-prewalk."},type:"boolean",default:!1},"advisor.syncBacklog":{ui:{tab:"model",group:"Advisor",label:"Advisor Sync Backlog",description:"Pause the main agent for up to 30 seconds if the advisor falls behind by this many turns. Off disables catch-up delays.",condition:"advisorEnabled"},type:"enum",default:"off",values:["off","1","3","5"]},"advisor.immuneTurns":{ui:{tab:"model",group:"Advisor",label:"Advisor Immune Turns",description:"After an advisor concern or blocker interrupts, route further concerns/blockers non-interruptingly for this many primary turns.",condition:"advisorEnabled",options:[{value:"0",label:"0 turns",description:"Allow every concern/blocker to interrupt."},{value:"1",label:"1 turn",description:""},{value:"2",label:"2 turns",description:""},{value:"3",label:"3 turns",description:"Default."},{value:"4",label:"4 turns",description:""},{value:"5",label:"5 turns",description:""}]},type:"number",default:3},"advisor.maxNotesPerUpdate":{ui:{tab:"model",group:"Advisor",label:"Advisor Max Notes Per Update",description:"Maximum non-blocker advice notes accepted per advisor prompt update (1–32; UI offers 1–5 quick picks). Blockers are exempt.",condition:"advisorEnabled",options:[{value:"1",label:"1 note",description:"Anti-flood (strict)."},{value:"2",label:"2 notes",description:""},{value:"3",label:"3 notes",description:""},{value:"4",label:"4 notes",description:"Default."},{value:"5",label:"5 notes",description:""}]},type:"number",default:4},"git.enabled":{ui:{tab:"interaction",group:"Git",label:"Enable Git Integration",description:"Show git branch, status, and PR information in the TUI and watch repository metadata."},type:"boolean",default:!0},"providers.maxInFlightRequests":{ui:{tab:"providers",group:"Services",label:"Max In-Flight Requests",description:'Maximum concurrent LLM requests per provider id (for example "openai" or "anthropic"), shared across local OMP processes with this config root. Omitted providers are unlimited.'},type:"record",default:{}},"providers.openai-codex.codeMode":{ui:{tab:"providers",group:"Services",label:"Codex Code Mode",description:"Route Codex code_mode_only models (GPT-5.6) through eval. The direct tools are eval, ask, todo, yield, think, checkpoint, and rewind. Use eval cells for other session tools. Mirrors codex-rs Code Mode. 'auto' follows the model catalog flag."},type:"enum",default:"off",values:["off","on","auto"]},"providers.openai-codex.codeModeDirectTools":{ui:{tab:"providers",group:"Services",label:"Codex Code Mode Direct Tools",description:"Extra direct tools for Codex Code Mode. The standard direct tools are eval, ask, todo, yield, think, checkpoint, and rewind."},type:"array",default:[]},modelRoleStorage:{ui:{tab:"model",group:"Prompt",label:"Model Role Storage",description:"Where model selector role assignments are saved",options:[{value:"global",label:"Global",description:"Save role models in the active profile config (current behavior)"},{value:"project",label:"Per-project",description:"Save project role models in .omp/config.yml; missing project roles use global defaults"}]},type:"enum",default:"global",values:["global","project"]},"theme.dark":{ui:{tab:"appearance",group:"Theme",label:"Dark Theme",description:"Theme used when the terminal has a dark background",options:"runtime"},type:"string",default:"titanium"},"theme.light":{ui:{tab:"appearance",group:"Theme",label:"Light Theme",description:"Theme used when the terminal has a light background",options:"runtime"},type:"string",default:"light"},symbolPreset:{ui:{tab:"appearance",group:"Theme",label:"Symbol Preset",description:"Glyph set for icons and symbols (Unicode, Nerd Font, or ASCII)",options:[{value:"unicode",label:"Unicode",description:"Standard symbols (default)"},{value:"nerd",label:"Nerd Font",description:"Requires Nerd Font"},{value:"ascii",label:"ASCII",description:"Maximum compatibility"}]},type:"enum",default:"unicode",values:["unicode","nerd","ascii"]},colorBlindMode:{ui:{tab:"appearance",group:"Theme",label:"Color-Blind Mode",description:"Use blue instead of green for diff additions"},type:"boolean",default:!1},"composer.shape":{ui:{tab:"appearance",group:"Composer",label:"Composer Shape",description:"Visual layout of the input editor and status line",options:"runtime"},type:"string",default:"band"},"statusLine.preset":{ui:{tab:"appearance",group:"Status Line",label:"Status Line Preset",description:"Pre-built status line configurations",options:[{value:"default",label:"Default",description:"Model, path, git, context, tokens, cost"},{value:"minimal",label:"Minimal",description:"Path and git only"},{value:"compact",label:"Compact",description:"Model, git, cost, context"},{value:"full",label:"Full",description:"All segments including time"},{value:"nerd",label:"Nerd",description:"Maximum info with Nerd Font icons"},{value:"ascii",label:"ASCII",description:"No special characters"},{value:"custom",label:"Custom",description:"User-defined segments"}]},type:"enum",default:"default",values:["default","minimal","compact","full","nerd","ascii","custom"]},"statusLine.separator":{ui:{tab:"appearance",group:"Status Line",label:"Status Line Separator",description:"Style of separators between segments",options:[{value:"powerline",label:"Powerline",description:"Solid arrows (Nerd Font)"},{value:"powerline-thin",label:"Thin chevron",description:"Thin arrows (Nerd Font)"},{value:"slash",label:"Slash",description:"Forward slashes"},{value:"pipe",label:"Pipe",description:"Vertical pipes"},{value:"block",label:"Block",description:"Solid blocks"},{value:"none",label:"None",description:"Space only"},{value:"ascii",label:"ASCII",description:"Greater-than signs"}]},type:"enum",default:"powerline-thin",values:["powerline","powerline-thin","slash","pipe","block","none","ascii"]},"statusLine.contextLine":{ui:{tab:"appearance",group:"Status Line",label:"Context-Reactive Line",description:"How the line between the left and right segments reflects context usage (box composer only)",options:[{value:"off",label:"Off",description:"Solid accent line, no context feedback"},{value:"percentage",label:"Percentage",description:"Used portion in accent color, remainder dimmed"},{value:"annotated",label:"Annotated",description:"Percentage plus ticks at the speculative and auto-compaction boundaries"},{value:"embedded",label:"Embedded",description:"Annotated line with the context percentage and window embedded in the gauge"}]},type:"enum",default:"embedded",values:["off","percentage","annotated","embedded"]},"statusLine.sessionAccent":{ui:{tab:"appearance",group:"Status Line",label:"Session Accent",description:"Use the session name color for the editor border and status line gap"},type:"boolean",default:!0},"statusLine.transparent":{ui:{tab:"appearance",group:"Status Line",label:"Transparent Status Line",description:"Use the terminal's default background for the status line instead of the theme's `statusLineBg`. Powerline end caps are dropped because they need a contrasting fill to bridge into the surrounding terminal."},type:"boolean",default:!1},"statusLine.compactThinkingLevel":{ui:{tab:"appearance",group:"Status Line",label:"Compact Thinking Level",description:"Show the thinking level as a single icon on the model name instead of a separate ` · <level>` suffix."},type:"boolean",default:!0},"tools.artifactSpillThreshold":{ui:{tab:"tools",group:"Output Limits",label:"Artifact Spill Threshold (KB)",description:"Tool output above this size is saved as an artifact; tail is kept inline",options:[{value:"1",label:"1 KB",description:"~250 tokens"},{value:"2.5",label:"2.5 KB",description:"~625 tokens"},{value:"5",label:"5 KB",description:"~1.25K tokens"},{value:"10",label:"10 KB",description:"~2.5K tokens"},{value:"20",label:"20 KB",description:"~5K tokens"},{value:"30",label:"30 KB",description:"~7.5K tokens"},{value:"50",label:"50 KB",description:"Default; ~12.5K tokens"},{value:"75",label:"75 KB",description:"~19K tokens"},{value:"100",label:"100 KB",description:"~25K tokens"},{value:"200",label:"200 KB",description:"~50K tokens"},{value:"500",label:"500 KB",description:"~125K tokens"},{value:"1000",label:"1 MB",description:"~250K tokens"}]},type:"number",default:50},"tools.artifactTailBytes":{ui:{tab:"tools",group:"Output Limits",label:"Artifact Tail Size (KB)",description:"Amount of tail content kept inline when output spills to artifact",options:[{value:"1",label:"1 KB",description:"~250 tokens"},{value:"2.5",label:"2.5 KB",description:"~625 tokens"},{value:"5",label:"5 KB",description:"~1.25K tokens"},{value:"10",label:"10 KB",description:"~2.5K tokens"},{value:"20",label:"20 KB",description:"Default; ~5K tokens"},{value:"50",label:"50 KB",description:"~12.5K tokens"},{value:"100",label:"100 KB",description:"~25K tokens"},{value:"200",label:"200 KB",description:"~50K tokens"}]},type:"number",default:20},"tools.artifactHeadBytes":{ui:{tab:"tools",group:"Output Limits",label:"Artifact Head Size (KB)",description:"Amount of head content kept inline alongside the tail when output spills to artifact (middle elision). 0 disables — keep tail only.",options:[{value:"0",label:"0 KB",description:"Disabled; tail-only truncation"},{value:"1",label:"1 KB",description:"~250 tokens"},{value:"2.5",label:"2.5 KB",description:"~625 tokens"},{value:"5",label:"5 KB",description:"~1.25K tokens"},{value:"10",label:"10 KB",description:"~2.5K tokens"},{value:"20",label:"20 KB",description:"Default; ~5K tokens"},{value:"50",label:"50 KB",description:"~12.5K tokens"},{value:"100",label:"100 KB",description:"~25K tokens"},{value:"200",label:"200 KB",description:"~50K tokens"}]},type:"number",default:20},"tools.outputMaxColumns":{ui:{tab:"tools",group:"Output Limits",label:"Output Column Cap",description:"Per-line byte cap for streaming tool outputs (bash, python, js eval) and `read`. Lines wider than this are ellipsis-truncated; remaining bytes up to the next newline are dropped. 0 disables.",options:[{value:"0",label:"Off",description:"No per-line cap"},{value:"256",label:"256",description:"Tight"},{value:"512",label:"512",description:""},{value:"768",label:"768",description:"Default"},{value:"1024",label:"1024",description:""},{value:"2048",label:"2048",description:""},{value:"4096",label:"4096",description:"Loose"}]},type:"number",default:768},"tools.artifactTailLines":{ui:{tab:"tools",group:"Output Limits",label:"Artifact Tail Lines",description:"Maximum lines of tail content kept inline when output spills to artifact",options:[{value:"50",label:"50 lines",description:"~250 tokens"},{value:"100",label:"100 lines",description:"~500 tokens"},{value:"250",label:"250 lines",description:"~1.25K tokens"},{value:"500",label:"500 lines",description:"Default; ~2.5K tokens"},{value:"1000",label:"1000 lines",description:"~5K tokens"},{value:"2000",label:"2000 lines",description:"~10K tokens"},{value:"5000",label:"5000 lines",description:"~25K tokens"}]},type:"number",default:500},"statusLine.showHookStatus":{ui:{tab:"appearance",group:"Status Line",label:"Show Hook Status",description:"Display hook status messages below the status line"},type:"boolean",default:!0},"terminal.showImages":{ui:{tab:"appearance",group:"Images",label:"Show Inline Images",description:"Render images inline in the terminal",condition:"hasImageProtocol"},type:"boolean",default:!0},"images.autoResize":{ui:{tab:"appearance",group:"Images",label:"Auto-Resize Images",description:"Resize large images to 2000x2000 max for better model compatibility"},type:"boolean",default:!0},"images.blockImages":{ui:{tab:"appearance",group:"Images",label:"Block Images",description:"Prevent images from being sent to LLM providers"},type:"boolean",default:!1},"images.describeForTextModels":{ui:{tab:"model",group:"Vision",label:"Describe Images for Text Models",description:"When an image is attached to a model without vision support, save it under local:// and inject a description from a vision-capable model instead of dropping it"},type:"boolean",default:!0},"images.urls.enabled":{ui:{tab:"model",group:"Vision",label:"Serve Images as URLs",description:"Publish outgoing images through the configured backend chain and send URL-fetching providers short URLs instead of inline base64. Falls back to inline automatically when every backend or a provider fetch fails"},type:"boolean",default:!1},"images.urls.backends":{ui:{tab:"model",group:"Vision",label:"Image URL Backends",description:"Ordered destinations tried when publishing images for provider access",ordered:!0,options:[{value:"imgur",label:"Imgur",description:"Uploads require either an Imgur access token or client ID."},{value:"imageshack",label:"ImageShack",description:"The API requires a paid subscription."},{value:"flickr",label:"Flickr",description:"image-host"},{value:"chevereto",label:"Chevereto",description:"self-hosted"},{value:"vgyme",label:"vgy.me",description:"image-host"},{value:"dropbox",label:"Dropbox",description:"cloud-files"},{value:"ftp",label:"FTP / FTPS / SFTP",description:"file-transfer"},{value:"onedrive",label:"OneDrive",description:"cloud-files"},{value:"google-drive",label:"Google Drive",description:"cloud-files"},{value:"puush",label:"puush-compatible endpoint",description:"The public service is defunct; a replacement endpoint is required."},{value:"box",label:"Box",description:"cloud-files"},{value:"amazon-s3",label:"Amazon S3",description:"s3"},{value:"google-cloud-storage",label:"Google Cloud Storage",description:"object-storage"},{value:"azure-storage",label:"Azure Blob Storage",description:"object-storage"},{value:"backblaze-b2",label:"Backblaze B2",description:"Configure either native B2 application keys or S3-compatible access keys."},{value:"owncloud",label:"ownCloud / Nextcloud",description:"webdav"},{value:"mediafire",label:"MediaFire-compatible endpoint",description:"The public API is deprecated; a replacement endpoint is required."},{value:"sendspace",label:"SendSpace-compatible endpoint",description:"The public discovery API is deprecated; a replacement endpoint is required."},{value:"localhostr",label:"Hostr-compatible endpoint",description:"The public service is offline; a replacement endpoint is required."},{value:"lambda",label:"Lambda-compatible endpoint",description:"The public service is offline; a replacement endpoint is required."},{value:"pomf",label:"Pomf",description:"pomf"},{value:"uguu",label:"Uguu",description:"Public uploads expire after approximately three hours."},{value:"seafile",label:"Seafile",description:"cloud-files"},{value:"s-ul",label:"s-ul",description:"file-host"},{value:"lobfile",label:"LobFile-compatible endpoint",description:"The public service is offline; a replacement endpoint is required."},{value:"transfer-sh",label:"transfer.sh-compatible endpoint",description:"The defunct public endpoint is blocked; a self-hosted replacement is required."},{value:"plik",label:"Plik",description:"self-hosted"},{value:"shared-folder",label:"Shared folder",description:"filesystem"},{value:"catbox",label:"Catbox",description:"anonymous-host"},{value:"litterbox",label:"Litterbox",description:"Uploads are temporary."},{value:"0x0",label:"0x0.st",description:"Public uploads expire after a retention window determined by file size."},{value:"tmpfiles",label:"tmpfiles.org",description:"Public uploads are temporary."},{value:"discord",label:"Discord",description:"messaging"},{value:"provider-files",label:"Model provider files",description:"Provider file references are API-local rather than public image URLs."},{value:"direct",label:"Direct public URL",description:"local-serving"},{value:"cloudflared",label:"Cloudflare quick tunnel",description:"tunnel"},{value:"ngrok",label:"ngrok",description:"tunnel"},{value:"tailscale",label:"Tailscale Funnel",description:"tunnel"},{value:"ssh",label:"SSH reverse tunnel",description:"tunnel"},{value:"command",label:"Uploader command",description:"external-command"},{value:"localhost-run",label:"localhost.run",description:"tunnel"},{value:"pinggy",label:"Pinggy",description:"tunnel"},{value:"devtunnel",label:"Microsoft dev tunnel",description:"The devtunnel CLI must be logged in locally."},{value:"zrok",label:"zrok",description:"The local zrok environment must be enabled."},{value:"bore",label:"bore",description:"tunnel"},{value:"named-cloudflared",label:"Named Cloudflare Tunnel",description:"tunnel"},{value:"r2",label:"Cloudflare R2",description:"s3"},{value:"tigris",label:"Tigris",description:"s3"},{value:"minio",label:"MinIO",description:"s3"},{value:"garage",label:"Garage",description:"s3"}]},type:"array",default:["provider-files","tailscale","cloudflared","litterbox"]},"images.urls.command":{ui:{tab:"model",group:"Vision",label:"Image Upload Command",description:"Argv template for the command backend; {file} is the image path, {mime}/{ext} optional. The last URL printed on stdout is used (e.g. pasta -b -f {file})"},type:"string"},"images.urls.publicBaseUrl":{ui:{tab:"model",group:"Vision",label:"Image URL Public Base",description:"Externally reachable base URL fronting the blob server (required for ssh, optional for direct)"},type:"string"},"images.urls.ttlHours":{ui:{tab:"model",group:"Vision",label:"Image URL Lifetime (hours)",description:"Serving window for locally hosted image URLs, measured from the last time a conversation sent them; resuming a conversation re-arms the window at the same link. 0 keeps links alive while the broker runs"},type:"number",default:72},"images.urls.bindHost":{ui:{tab:"model",group:"Vision",label:"Image URL Bind Host",description:"Host the blob server binds to; loopback for tunnels, 0.0.0.0 for direct serving"},type:"string",default:"127.0.0.1"},"images.urls.sshTarget":{ui:{tab:"model",group:"Vision",label:"Image URL SSH Target",description:"user@host destination for the ssh reverse forward"},type:"string"},"images.urls.sshRemotePort":{ui:{tab:"model",group:"Vision",label:"Image URL SSH Remote Port",description:"Remote listen port of the ssh reverse forward that your web server proxies to"},type:"number",default:8787},"tui.resizeScrollback":{ui:{tab:"appearance",group:"Display",label:"Resize Scrollback",description:"How a settled terminal resize refreshes transcript rows retained in terminal scrollback",options:[{value:"append",label:"Append",description:"Replay the transcript at the new width below retained history"},{value:"rebuild",label:"Rebuild",description:"Erase all terminal scrollback, then replay one current-width transcript"},{value:"preserve",label:"Preserve",description:"Repaint only the viewport and keep history wrapped at its old width"}]},type:"enum",default:"rebuild",values:["append","rebuild","preserve"]},"terminal.showProgress":{ui:{tab:"appearance",group:"Display",label:"Native Terminal Progress",description:"Emit OSC 9;4 indeterminate progress while the agent or context maintenance is running"},type:"boolean",default:!1},"tui.textSizing":{ui:{tab:"appearance",group:"Display",label:"Large Headings (Kitty)",description:"Render Markdown H1 headings at 2x scale using Kitty's OSC 66 text-sizing protocol. Only takes effect on Kitty terminals; ignored everywhere else. Off by default."},type:"boolean",default:!1},"tui.renderMermaid":{ui:{tab:"appearance",group:"Display",label:"Render Mermaid Diagrams",description:"Render Mermaid fenced code blocks as ASCII diagrams"},type:"boolean",default:!0},"tui.reactions":{ui:{tab:"appearance",group:"Display",label:"Agent Reactions",description:"Invite the agent to react to your message with an emoji badge on its bubble"},type:"boolean",default:!0},"tui.codexResetFireworks":{ui:{tab:"appearance",group:"Display",label:"Codex Reset Fireworks",description:"Celebrate unscheduled Codex weekly usage resets and newly banked saved resets with a top-third fireworks overlay that remains until Escape"},type:"boolean",default:!1},"tui.titleState":{ui:{tab:"appearance",group:"Display",label:"Terminal Title Run State",description:"Show the agent run state in the terminal title's separator — an animated spinner while working (a static ':' under WSL), '>' when it's your turn, '!' when the agent is waiting on you"},type:"boolean",default:!0},"tui.titleSpinner":{ui:{tab:"appearance",group:"Display",label:"Terminal Title Spinner",description:"Glyph set for the working-state spinner in the terminal title — braille sweep, filling moon, single-dot cycle, or ASCII-safe line",options:[{value:"braille",label:"Braille",description:"Classic ⠋⠙⠹ sweep (default)"},{value:"pulse",label:"Pulse",description:"Moon filling ○◑● then emptying"},{value:"dots",label:"Dots",description:"Single braille dots cycling"},{value:"line",label:"Line",description:"ASCII - \\ | / for fonts without braille coverage"}]},type:"enum",default:"braille",values:["braille","pulse","dots","line"]},"tui.hyperlinks":{ui:{tab:"appearance",group:"Display",label:"Terminal Hyperlinks",description:"Wrap paths and URLs in OSC 8 hyperlinks for terminal-native click-to-open (auto: detect support; off: never; always: unconditional)"},type:"enum",default:"auto",values:["off","auto","always"]},"tui.mouse":{ui:{tab:"appearance",group:"Display",label:"Mouse Click-to-Focus",description:"Capture mouse clicks in the main session so live subagent cards and HUD rows focus on click, with a hover highlight on the target. Native text selection becomes Shift+drag and wheel scroll becomes Shift+wheel while on"},type:"boolean",default:!1},"tui.tight":{ui:{tab:"appearance",group:"Display",label:"Tight Layout",description:"Remove the 1-character horizontal padding from the left and right of the terminal output"},type:"boolean",default:!1},"display.shimmer":{ui:{tab:"appearance",group:"Display",label:"Shimmer",description:"Animation style for working/loading messages",options:[{value:"classic",label:"Classic",description:"Soft cosine wave sweeping across the text"},{value:"kitt",label:"KITT Scanner",description:"Knight Rider 1982 red light bouncing left-right"},{value:"disabled",label:"Disabled",description:"No animation; static muted text"}]},type:"enum",default:"classic",values:["classic","kitt","disabled"]},"display.pinnedAgents":{ui:{tab:"appearance",group:"Display",label:"Pinned Agents",description:"Pinned live-agent jump list above the editor (off hides it; collapsed shows a few rows with an expander; full lists all)",options:[{value:"off",label:"Off",description:"Hide the pinned jump list"},{value:"collapsed",label:"Collapsed",description:"Show a few rows with an expander"},{value:"full",label:"Full",description:"Always list every live agent"}]},type:"enum",default:"collapsed",values:["off","collapsed","full"]},"display.smoothStreaming":{ui:{tab:"appearance",group:"Display",label:"Smooth Streaming",description:"Reveal assistant text and streamed tool input smoothly while chunks arrive"},type:"boolean",default:!0},"display.hideToolActivity":{ui:{tab:"appearance",group:"Display",label:"Hide Tool Activity",description:"Hide model-initiated tool calls and results from the transcript"},type:"boolean",default:!1},"display.showTokenUsage":{ui:{tab:"appearance",group:"Display",label:"Show Token Usage",description:"Show per-turn token usage on assistant messages"},type:"boolean",default:!1},"display.showTurnTime":{ui:{tab:"appearance",group:"Display",label:"Show Turn Time",description:"Show the total prompt-to-yield time (including tool calls) on assistant message usage rows"},type:"boolean",default:!1},"display.cacheMissMarker":{ui:{tab:"appearance",group:"Display",label:"Cache Miss Marker",description:"Show a divider after an assistant turn whose request lost (missed) the prompt cache"},type:"boolean",default:!1},"display.collapseCompacted":{ui:{tab:"appearance",group:"Display",label:"Collapse Compacted History",description:"Collapse pre-compaction history behind the summary divider on the live transcript; disable to keep the full transcript inline with dividers at each compaction point"},type:"boolean",default:!0},showHardwareCursor:{ui:{tab:"appearance",group:"Display",label:"Show Hardware Cursor",description:"Show terminal cursor for IME support"},type:"boolean",default:!0},"tui.imeSafeCursor":{ui:{tab:"appearance",group:"Display",label:"IME-Safe Prompt Layout",description:"Move the prompt's bottom border to a separate row so macOS IME preedit cannot displace it"},type:"boolean",default:!1},defaultThinkingLevel:{ui:{tab:"model",group:"Thinking",label:"Thinking Level",description:"Reasoning depth for thinking-capable models",options:[{value:"auto",label:"auto",description:"Auto-detect per prompt"},{value:"minimal",label:"min",description:"Very brief reasoning (~1k tokens)"},{value:"low",label:"low",description:"Light reasoning (~2k tokens)"},{value:"medium",label:"medium",description:"Moderate reasoning (~8k tokens)"},{value:"high",label:"high",description:"Deep reasoning (~16k tokens)"},{value:"xhigh",label:"xhigh",description:"Extended reasoning (~32k tokens)"},{value:"max",label:"max",description:"Maximum reasoning the model supports"}]},type:"enum",default:"high",values:["minimal","low","medium","high","xhigh","max","auto"]},hideThinkingBlock:{ui:{tab:"model",group:"Thinking",label:"Hide Thinking Blocks",description:"Hide thinking blocks in assistant responses"},type:"boolean",default:!1},proseOnlyThinking:{ui:{tab:"model",group:"Thinking",label:"Prose Only Thinking",description:"Omit code blocks from thinking summaries and replace them with an ellipsis"},type:"boolean",default:!0},omitThinking:{ui:{tab:"model",group:"Thinking",label:"Omit Thinking summaries",description:"Instruct upstream providers to completely omit thinking summaries from responses (where supported)"},type:"boolean",default:!1},externalThinking:{ui:{tab:"model",group:"Thinking",label:"External Thinking",description:"Private scratchpad; not shown to user. Disables supported GPT, Claude, and Gemini reasoning",warning:"At your own risk: providers have flagged this request shape as abuse, up to account-level enforcement"},type:"boolean",default:!1},"model.loopGuard.enabled":{ui:{tab:"model",group:"Thinking",label:"Loop Guard",description:"Enable automatic stream loop detection for model reasoning and prose"},type:"boolean",default:!0},"model.loopGuard.checkAssistantContent":{ui:{tab:"model",group:"Thinking",label:"Loop Guard Scan Prose",description:"Apply loop guard to assistant prose messages in addition to thinking logs"},type:"boolean",default:!0},"model.loopGuard.toolCallReminder":{ui:{tab:"model",group:"Thinking",label:"Loop Guard Tool-Call Reminder",description:"When a Gemini reasoning stream emits many consecutive planning headers without calling a tool, interrupt it and inject a reminder to issue a tool call (requires Loop Guard)"},type:"boolean",default:!0},"model.toolCallLoopGuard.enabled":{ui:{tab:"model",group:"Thinking",label:"Tool-Call Loop Guard",description:"Detect consecutive identical tool calls across turns and inject a corrective steer"},type:"boolean",default:!0},"model.toolCallLoopGuard.threshold":{ui:{tab:"model",group:"Thinking",label:"Tool-Call Loop Threshold",description:"Consecutive identical tool calls required before the corrective steer is injected"},type:"number",default:5},"model.toolCallLoopGuard.exemptTools":{ui:{tab:"model",group:"Thinking",label:"Tool-Call Loop Exempt Tools",description:"Tool names that may repeat consecutively without triggering the cross-turn loop guard"},type:"array",default:["hub"]},inlineToolDescriptors:{ui:{tab:"model",group:"Prompt",label:"Inline Tool Descriptors",description:"Render full tool descriptors in the system prompt and strip top-level/nested descriptions from provider tool schemas so descriptor text is sent once. Auto enables this for Gemini models and disables it otherwise",options:[{value:"auto",label:"Auto",description:"Inline descriptors for Gemini models; keep them in tool schemas otherwise"},{value:"on",label:"On",description:"Always inline descriptors in the system prompt"},{value:"off",label:"Off",description:"Keep descriptors in provider tool schemas only"}]},type:"enum",default:"auto",values:["auto","on","off"]},includeModelInPrompt:{ui:{tab:"model",group:"Prompt",label:"Include Model in Prompt",description:"Surface the active model identifier in the system prompt so the agent knows which model it is"},type:"boolean",default:!0},includeWorkspaceTree:{ui:{tab:"model",group:"Prompt",label:"Include Workspace Tree",description:"Render the workspace directory tree in the system prompt. WARNING: This can bust prompt caching across sessions when files are modified."},type:"boolean",default:!1},skillful:{ui:{tab:"model",group:"Prompt",label:"List Skills in Prompt",description:"List available skills in the system prompt; disable to save context and toggle per-session with /skillful"},type:"boolean",default:!0},"workspace.additionalDirectories":{ui:{tab:"context",group:"General",label:"Additional Workspace Dirs",description:"Extra workspace directories added to every session as additional roots (multi-root workspace). Managed live via /add-dir and /remove-dir. Paths resolve relative to cwd; absolute paths recommended. The agent is told these roots exist and can read/grep/glob them."},type:"array",default:[]},personality:{ui:{tab:"model",group:"Prompt",label:"Personality",description:"Communication style rendered into the system prompt's personality block",options:[{value:"default",label:"Default",description:"Terse, evidence-first engineer; dense, action-oriented replies"},{value:"friendly",label:"Friendly",description:"Warm, encouraging collaborator focused on momentum and morale"},{value:"pragmatic",label:"Pragmatic",description:"Direct, efficient engineer focused on clarity and rigor"},{value:"none",label:"None",description:"Omit the personality block entirely"}]},type:"enum",default:"default",values:["default","friendly","pragmatic","none"]},temperature:{ui:{tab:"model",group:"Sampling",label:"Temperature",description:"Sampling temperature (0 = deterministic, 1 = creative, -1 = provider default)",options:[{value:"-1",label:"Default",description:"Use provider default"},{value:"0",label:"0",description:"Deterministic"},{value:"0.2",label:"0.2",description:"Focused"},{value:"0.5",label:"0.5",description:"Balanced"},{value:"0.7",label:"0.7",description:"Creative"},{value:"1",label:"1",description:"Maximum variety"}]},type:"number",default:-1},topP:{ui:{tab:"model",group:"Sampling",label:"Top P",description:"Nucleus sampling cutoff (0-1, -1 = provider default)",options:[{value:"-1",label:"Default",description:"Use provider default"},{value:"0.1",label:"0.1",description:"Very focused"},{value:"0.3",label:"0.3",description:"Focused"},{value:"0.5",label:"0.5",description:"Balanced"},{value:"0.9",label:"0.9",description:"Broad"},{value:"1",label:"1",description:"No nucleus filtering"}]},type:"number",default:-1},topK:{ui:{tab:"model",group:"Sampling",label:"Top K",description:"Sample from top-K tokens (-1 = provider default)",options:[{value:"-1",label:"Default",description:"Use provider default"},{value:"1",label:"1",description:"Greedy top token"},{value:"20",label:"20",description:"Focused"},{value:"40",label:"40",description:"Balanced"},{value:"100",label:"100",description:"Broad"}]},type:"number",default:-1},minP:{ui:{tab:"model",group:"Sampling",label:"Min P",description:"Minimum probability threshold (0-1, -1 = provider default)",options:[{value:"-1",label:"Default",description:"Use provider default"},{value:"0.01",label:"0.01",description:"Very permissive"},{value:"0.05",label:"0.05",description:"Balanced"},{value:"0.1",label:"0.1",description:"Strict"}]},type:"number",default:-1},presencePenalty:{ui:{tab:"model",group:"Sampling",label:"Presence Penalty",description:"Penalty for introducing already-present tokens (-1 = provider default)",options:[{value:"-1",label:"Default",description:"Use provider default"},{value:"0",label:"0",description:"No penalty"},{value:"0.5",label:"0.5",description:"Mild novelty"},{value:"1",label:"1",description:"Encourage novelty"},{value:"2",label:"2",description:"Strong novelty"}]},type:"number",default:-1},repetitionPenalty:{ui:{tab:"model",group:"Sampling",label:"Repetition Penalty",description:"Penalty for repeated tokens (-1 = provider default)",options:[{value:"-1",label:"Default",description:"Use provider default"},{value:"0.8",label:"0.8",description:"Allow repetition"},{value:"1",label:"1",description:"No penalty"},{value:"1.1",label:"1.1",description:"Mild penalty"},{value:"1.2",label:"1.2",description:"Balanced"},{value:"1.5",label:"1.5",description:"Strong penalty"}]},type:"number",default:-1},textVerbosity:{ui:{tab:"model",group:"Sampling",label:"Text Verbosity",description:"OpenAI Responses and Codex response verbosity (low, medium, or high)",options:[{value:"low",label:"Low",description:"Prefer concise responses"},{value:"medium",label:"Medium",description:"Balance brevity and detail (default)"},{value:"high",label:"High",description:"Prefer detailed responses"}]},type:"enum",default:"medium",values:["low","medium","high"]},"tier.openai":{ui:{tab:"model",group:"Sampling",label:"Service Tier — OpenAI",description:"Processing tier for OpenAI / OpenAI-Codex requests, and OpenAI-family models routed via OpenRouter (none = omit). Sent as `service_tier`.",options:[{value:"none",label:"None",description:"Omit service_tier (standard processing)"},{value:"auto",label:"Auto",description:"Provider default tier selection"},{value:"default",label:"Default",description:"Standard priority processing"},{value:"flex",label:"Flex",description:"Lower cost, higher latency when available"},{value:"scale",label:"Scale",description:"Scale Tier credits when available"},{value:"priority",label:"Priority",description:"Faster, higher cost (premium request)"}]},type:"enum",default:"none",values:["none","auto","default","flex","scale","priority"]},"tier.anthropic":{ui:{tab:"model",group:"Sampling",label:"Service Tier — Anthropic",description:'Processing tier for Claude requests. `priority` realizes fast mode (`speed: "fast"`) on supported direct Anthropic models; ignored on Bedrock/Vertex Claude and via OpenRouter.',options:[{value:"none",label:"None",description:"Standard processing"},{value:"priority",label:"Priority",description:'Fast mode (`speed: "fast"`) on supported direct Claude models; ignored on Bedrock/Vertex'}]},type:"enum",default:"none",values:["none","priority"]},"tier.google":{ui:{tab:"model",group:"Sampling",label:"Service Tier — Google",description:"Processing tier for Gemini (Google AI Studio + Vertex) requests, and Google-family models routed via OpenRouter (none = omit). Sent as the top-level `serviceTier` field.",options:[{value:"none",label:"None",description:"Standard processing"},{value:"flex",label:"Flex",description:"Lower cost, higher latency (Gemini API + Vertex)"},{value:"priority",label:"Priority",description:"Faster, higher reliability (Gemini API + Vertex)"}]},type:"enum",default:"none",values:["none","flex","priority"]},"tier.subagent":{ui:{tab:"model",group:"Sampling",label:"Service Tier — Subagent",description:"Service Tier for spawned task/eval subagents. Inherit = match the main agent's live per-family tiers (tracks /fast); pick a value to apply it to whichever family the subagent's model belongs to.",options:[{value:"inherit",label:"Inherit",description:"Match the main agent's live per-family tiers"},{value:"none",label:"None",description:"Standard processing"},{value:"auto",label:"Auto",description:"Provider default tier selection (OpenAI family)"},{value:"default",label:"Default",description:"Standard priority processing (OpenAI family)"},{value:"flex",label:"Flex",description:"Flexible capacity tier (OpenAI/Google families)"},{value:"scale",label:"Scale",description:"Scale Tier credits (OpenAI family)"},{value:"priority",label:"Priority",description:"Priority on every supported family of the spawned model"}]},type:"enum",default:"inherit",values:["inherit","none","auto","default","flex","scale","priority"]},"tier.advisor":{ui:{tab:"model",group:"Sampling",label:"Service Tier — Advisor",description:"Service Tier for the advisor model. None = standard processing; Inherit = match the main agent's live per-family tiers; pick a value to apply it to the advisor model's family.",condition:"advisorEnabled",options:[{value:"inherit",label:"Inherit",description:"Match the main agent's live per-family tiers"},{value:"none",label:"None",description:"Standard processing"},{value:"auto",label:"Auto",description:"Provider default tier selection (OpenAI family)"},{value:"default",label:"Default",description:"Standard priority processing (OpenAI family)"},{value:"flex",label:"Flex",description:"Flexible capacity tier (OpenAI/Google families)"},{value:"scale",label:"Scale",description:"Scale Tier credits (OpenAI family)"},{value:"priority",label:"Priority",description:"Priority on every supported family of the spawned model"}]},type:"enum",default:"none",values:["inherit","none","auto","default","flex","scale","priority"]},"retry.maxRetries":{ui:{tab:"model",group:"Retry & Fallback",label:"Retry Attempts",description:"Maximum retry attempts on API errors",options:[{value:"1",label:"1 retry",description:""},{value:"2",label:"2 retries",description:""},{value:"3",label:"3 retries",description:""},{value:"5",label:"5 retries",description:""},{value:"10",label:"10 retries",description:""}]},type:"number",default:10},"retry.maxDelayMs":{ui:{tab:"model",group:"Retry & Fallback",label:"Max Retry Delay",description:"Maximum wait between retries, in ms. When the provider asks us to wait longer than this and no credential or model fallback succeeds, the request fails fast instead of sleeping (e.g. 3-hour Anthropic rate-limit windows). 0 disables the ceiling — to let the session auto-resume through provider-stated quota resets."},type:"number",default:300000},"retry.waitForUsageReset":{ui:{tab:"model",group:"Retry & Fallback",label:"Wait For Usage Reset",description:"When a provider reports usage-limit exhaustion with a reset time (5-hour or weekly quota windows on any provider), sleep until the reset instead of failing fast past retry.maxDelayMs. Waits are abortable (Esc) but also hold subagents, so leave off for unattended runs."},type:"boolean",default:!1},"retry.modelFallback":{ui:{tab:"model",group:"Retry & Fallback",label:"Retry Model Fallback",description:"Allow retry recovery to switch to configured fallback models"},type:"boolean",default:!0},"retry.usageAwareFallback":{ui:{tab:"model",group:"Retry & Fallback",label:"Usage-Aware Fallback",description:"Use reliable coding-plan quota reports to prefer same-provider accounts, then configured fallback models, before a hard usage limit. Ordinary configured API keys are excluded."},type:"boolean",default:!1},"retry.usageReservePct":{ui:{tab:"model",group:"Retry & Fallback",label:"Reserve Margin",description:"Treat a coding-plan model as near its limit below this remaining percentage. Unknown or unmapped usage keeps the primary model.",condition:"usageAwareFallbackEnabled",options:[{value:"5",label:"5%",description:"Act only when nearly exhausted"},{value:"10",label:"10%",description:"Balanced safety margin"},{value:"15",label:"15%",description:"Conservative"},{value:"20",label:"20%",description:"Early protection"},{value:"25",label:"25%",description:"Very conservative"}]},type:"number",default:10},"retry.usageReservePolicy":{ui:{tab:"model",group:"Retry & Fallback",label:"Reserve Policy",description:"What to do when every same-provider coding-plan account is inside the reserve margin.",condition:"usageAwareFallbackEnabled",options:[{value:"confirm",label:"Confirm interactively",description:"Keep interactive sessions on the primary until confirmed; background agents auto-fallback"},{value:"auto",label:"Auto-fallback",description:"Always select the next eligible configured fallback"},{value:"fail-closed",label:"Fail closed",description:"Do not spend reserve quota or select a fallback"}]},type:"enum",default:"confirm",values:["confirm","auto","fail-closed"]},"retry.fallbackChains":{ui:{tab:"model",group:"Retry & Fallback",label:"Retry Fallback Chains",description:`JSON object mapping model roles, model selectors ("provider/model-id"), or provider wildcards ("provider/*") to ordered fallback selectors, e.g. {"default":["openai/gpt-4o-mini"],"google-antigravity/*":["google/*","google-vertex/*"]}. Model-oriented keys apply whenever that model/provider is active, regardless of role; a "provider/*" entry keeps the failing model's id and swaps the provider. An id-prefixed wildcard ("openrouter/google/*") re-prefixes the failing model's bare id (google-antigravity/gemini-x -> openrouter/google/gemini-x) and, used as a key, matches only that provider's ids under the prefix. A fallback entry may carry an explicit thinking suffix ("provider/model:low", ":high", ":max", ":off"); a bare entry inherits the failing turn's effort, and "provider/*" entries always inherit.`},type:"record",default:{}},"retry.fallbackRevertPolicy":{ui:{tab:"model",group:"Retry & Fallback",label:"Fallback Revert Policy",description:"When to return to the primary model after a fallback",options:[{value:"cooldown-expiry",label:"Cooldown expiry",description:"Return to the primary model after its suppression window ends"},{value:"never",label:"Never",description:"Stay on the fallback model until manually changed"}]},type:"enum",default:"cooldown-expiry",values:["cooldown-expiry","never"]},"providers.anthropic.serverSideFallback":{ui:{tab:"model",group:"Retry & Fallback",label:"Anthropic Server-Side Fallback (Fable 5)",description:"When a Claude Fable 5 / Mythos 5 request is blocked by Anthropic's safety classifier, retry it on Claude Opus 4.8 server-side (Anthropic `server-side-fallback-2026-06-01` beta). Opt-in — leaving this off preserves the pre-fallback behavior for every request."},type:"boolean",default:!1},steeringMode:{ui:{tab:"interaction",group:"Input",label:"Steering Mode",description:"How to process queued messages while agent is working"},type:"enum",default:"one-at-a-time",values:["all","one-at-a-time"]},followUpMode:{ui:{tab:"interaction",group:"Input",label:"Follow-Up Mode",description:"How to drain follow-up messages after a turn completes"},type:"enum",default:"one-at-a-time",values:["all","one-at-a-time"]},interruptMode:{ui:{tab:"interaction",group:"Input",label:"Interrupt Mode",description:"When steering messages interrupt tool execution"},type:"enum",default:"immediate",values:["immediate","wait"]},"tui.vimMode":{ui:{tab:"interaction",group:"Input",label:"Vim Editing Mode",description:"Modal prompt editing. Escape leaves Insert mode; Normal mode has hjkl, 0, $, ^, w, b, e, gg, G, counts, x/D/C, dd/yy, p and u; operators take motions or text objects (diw, ca(, dap); v/V start a Visual selection that y copies and d deletes"},type:"boolean",default:!1},"tui.vimModeDisplay":{ui:{tab:"interaction",group:"Input",label:"Vim Mode Indicator",description:"How the current Vim mode appears in the status line",condition:"vimModeEnabled",options:[{value:"text",label:"Text",description:"Full mode name — NORMAL, INSERT, VISUAL, V-LINE"},{value:"icon",label:"Icon",description:"Single compact glyph per mode"},{value:"none",label:"Hidden",description:"Do not show the mode in the status line"}]},type:"enum",default:"text",values:["text","icon","none"]},"loop.mode":{ui:{tab:"interaction",group:"Input",label:"Loop Mode",description:"What happens between /loop iterations before re-submitting the prompt",options:[{value:"prompt",label:"Prompt",description:"Re-submit the prompt as a follow-up message (current behavior)"},{value:"compact",label:"Compact",description:"Compact the session context, then re-submit the prompt"},{value:"reset",label:"Reset",description:"Start a new session, then re-submit the prompt"}]},type:"enum",default:"prompt",values:["prompt","compact","reset"]},"loop.conditionTimeoutMs":{ui:{tab:"interaction",group:"Input",label:"Loop Condition Timeout (ms)",description:"Max wait for a `/loop --while` / `--until` condition command before treating it as broken and stopping the loop. Set to 0 to wait indefinitely",options:[{value:"0",label:"Unlimited",description:""},{value:"10000",label:"10 seconds",description:""},{value:"30000",label:"30 seconds",description:""},{value:"120000",label:"2 minutes",description:""}]},type:"number",default:30000},"composer.recallClearedDrafts":{ui:{tab:"interaction",group:"Input",label:"Recall Cleared Drafts",description:"Keep drafts cleared with Ctrl+C in local Up/Down history until exit; disabling affects future clears"},type:"boolean",default:!0},doubleEscapeAction:{ui:{tab:"interaction",group:"Input",label:"Double-Escape Action",description:"What pressing Escape twice with an empty editor does: open the transcript rewind selector, open the session tree, or nothing"},type:"enum",default:"rewind",values:["rewind","tree","none"]},treeFilterMode:{ui:{tab:"interaction",group:"Input",label:"Session Tree Filter",description:"Default filter mode when opening the session tree"},type:"enum",default:"default",values:["default","no-tools","user-only","labeled-only","all"]},autocompleteMaxVisible:{ui:{tab:"interaction",group:"Input",label:"Autocomplete Items",description:"Max visible items in autocomplete dropdown (3-20)",options:[{value:"3",label:"3 items",description:""},{value:"5",label:"5 items",description:""},{value:"7",label:"7 items",description:""},{value:"10",label:"10 items",description:""},{value:"15",label:"15 items",description:""},{value:"20",label:"20 items",description:""}]},type:"number",default:10},"spelling.typoDetection":{ui:{tab:"interaction",group:"Input",label:"Typo Detection (macOS)",description:"Mark misspelled prompt words with the active macOS dictionaries",condition:"macOS"},type:"boolean",default:!0},"spelling.autocomplete":{ui:{tab:"interaction",group:"Input",label:"Word Autocomplete (macOS)",description:"Show macOS dictionary word completions as inline hints accepted with Tab",condition:"macOS"},type:"boolean",default:!0},"spelling.autocorrect":{ui:{tab:"interaction",group:"Input",label:"Autocorrect (macOS)",description:"Apply confident macOS spelling corrections after completed words",condition:"macOS"},type:"boolean",default:!1},emojiAutocomplete:{ui:{tab:"interaction",group:"Input",label:"Emoji Autocomplete",description:"Suggest emojis from `:name:` shortcodes and expand text emoticons like `:D` or `:-)`"},type:"boolean",default:!0},"paste.largeMenuThreshold":{ui:{tab:"interaction",group:"Input",label:"Large Paste Menu",description:"When a paste reaches this many lines, offer a menu to wrap it in a code block, wrap it in XML tags, or save it to a file. 0 disables the menu (large pastes still collapse to a [Paste] marker).",options:[{value:"0",label:"Off",description:""},{value:"100",label:"100 lines",description:""},{value:"250",label:"250 lines",description:""},{value:"500",label:"500 lines",description:""},{value:"1000",label:"1000 lines",description:""}]},type:"number",default:100},"startup.quiet":{ui:{tab:"interaction",group:"Startup & Updates",label:"Quiet Startup",description:"Skip welcome screen and startup status messages"},type:"boolean",default:!1},"startup.showSplash":{ui:{tab:"interaction",group:"Startup & Updates",label:"Show Startup Splash",description:"Show the full animated setup splash on normal interactive startup without rerunning setup. Quiet Startup still suppresses it."},type:"boolean",default:!1},"startup.setupWizard":{ui:{tab:"interaction",group:"Startup & Updates",label:"Setup Wizard",description:"Show newly added onboarding steps once per setup version"},type:"boolean",default:!0},"startup.checkUpdate":{ui:{tab:"interaction",group:"Startup & Updates",label:"Check for Updates",description:"Check for omp updates on startup"},type:"boolean",default:!0},"update.channel":{ui:{tab:"interaction",group:"Startup & Updates",label:"Update Channel",description:"Update channel used by omp update and the startup update check",options:[{value:"stable",label:"Stable",description:""},{value:"canary",label:"Canary",description:""}]},type:"enum",default:"stable",values:["stable","canary"]},"marketplace.autoUpdate":{ui:{tab:"interaction",group:"Startup & Updates",label:"Marketplace Auto-Update",description:"Check for plugin updates on startup",options:[{value:"off",label:"Off",description:"Don't check for plugin updates"},{value:"notify",label:"Notify",description:"Check on startup and notify when updates are available"},{value:"auto",label:"Auto",description:"Check on startup and auto-install updates"}]},type:"enum",default:"notify",values:["off","notify","auto"]},"startup.changelogMode":{ui:{tab:"interaction",group:"Startup & Updates",label:"Startup Changelog",description:"Choose whether update notes start as a summary, full details, or stay hidden",options:[{value:"summary",label:"Summary",description:"Show release and change counts with a /changelog hint"},{value:"expanded",label:"Expanded",description:"Show the recent release notes in full"},{value:"hidden",label:"Hidden",description:"Do not show release notes on startup"}]},type:"enum",default:"summary",values:["summary","expanded","hidden"]},"magicKeywords.enabled":{ui:{tab:"interaction",group:"Magic Keywords",label:"Magic Keywords",description:"Enable hidden notices for standalone ultrathink, orchestrate, and workflowz keywords"},type:"boolean",default:!0},"magicKeywords.ultrathink":{ui:{tab:"interaction",group:"Magic Keywords",label:"Ultrathink Keyword",description:"Let standalone ultrathink request maximum automatic thinking and append its hidden notice"},type:"boolean",default:!0},"magicKeywords.orchestrate":{ui:{tab:"interaction",group:"Magic Keywords",label:"Orchestrate Keyword",description:"Let standalone orchestrate append its hidden multi-agent orchestration notice"},type:"boolean",default:!0},"magicKeywords.workflow":{ui:{tab:"interaction",group:"Magic Keywords",label:"Workflow Keyword",description:"Let standalone workflowz append its hidden eval workflow notice"},type:"boolean",default:!0},"completion.notify":{ui:{tab:"interaction",group:"Notifications",label:"Completion Notification",description:"Notify when the agent finishes a turn"},type:"enum",default:"on",values:["on","off"]},"error.notify":{ui:{tab:"interaction",group:"Notifications",label:"Error Notification",description:"Notify when the agent stops with an error"},type:"enum",default:"off",values:["on","off"]},"ask.timeout":{ui:{tab:"interaction",group:"Notifications",label:"Ask Timeout",description:"Auto-select the recommended ask option after this many seconds (0 disables)",options:[{value:"0",label:"Disabled",description:""},{value:"15",label:"15 seconds",description:""},{value:"30",label:"30 seconds",description:""},{value:"60",label:"60 seconds",description:""},{value:"120",label:"120 seconds",description:""}]},type:"number",default:0},"ask.notify":{ui:{tab:"interaction",group:"Notifications",label:"Ask Notification",description:"Notify when the ask tool is waiting for input"},type:"enum",default:"on",values:["on","off"]},"recap.enabled":{ui:{tab:"interaction",group:"Notifications",label:"Idle Recap",description:"Generate a brief LLM recap of where things stand after the terminal has been idle"},type:"boolean",default:!0},"recap.idleSeconds":{ui:{tab:"interaction",group:"Notifications",label:"Idle Recap Delay",description:"Seconds to wait while idle before showing the recap",options:[{value:"60",label:"1 minute",description:""},{value:"120",label:"2 minutes",description:""},{value:"240",label:"4 minutes",description:""},{value:"300",label:"5 minutes",description:""},{value:"600",label:"10 minutes",description:""}]},type:"number",default:240},"collab.relayUrl":{ui:{tab:"interaction",group:"Collab",label:"Relay URL",description:"Relay used by /collab (wss://host[:port])"},type:"string",default:"wss://my.omp.sh"},"collab.webUrl":{ui:{tab:"interaction",group:"Collab",label:"Web UI URL",description:"Browser UI used by /collab links; empty derives from collab.relayUrl; explicit http:// is localhost-only"},type:"string",default:""},"collab.displayName":{ui:{tab:"interaction",group:"Collab",label:"Display Name",description:"Name shown to other collab participants (default: OS username)"},type:"string",default:""},"collab.autoStart":{ui:{tab:"interaction",group:"Collab",label:"Auto Start",description:"Host every interactive session via collab.relayUrl as it starts and publish it to the local registry (omp collab list); rooms rotate on session switch",options:[{value:"off",label:"Off",description:"Share only when /collab is run"},{value:"view",label:"View",description:"Auto-host; the registry hands out view-only links (omp collab link --view)"},{value:"control",label:"Control",description:"Auto-host; the registry hands out control links that can prompt the session"}]},type:"enum",default:"off",values:["off","view","control"]},"share.serverUrl":{ui:{tab:"interaction",group:"Collab",label:"Share Server",description:"Share viewer/upload base used by /share (encrypted blob upload + viewer; links are <base>/<id>#<key>)"},type:"string",default:"https://my.omp.sh/s"},"share.store":{ui:{tab:"interaction",group:"Collab",label:"Share Store",description:"Where /share uploads the encrypted session blob",options:[{value:"blob",label:"Encrypted Blob",description:"Upload to the share server (no GitHub account needed; avoids gist API rate limits)"},{value:"gist",label:"GitHub Gist",description:"Push to a secret gist (needs authenticated gh), falling back to the share server"}]},type:"enum",default:"blob",values:["blob","gist"]},"share.redactSecrets":{ui:{tab:"interaction",group:"Collab",label:"Share Secret Redaction",description:"Run the secret obfuscator over /share snapshots before upload (uses the secrets.* config)"},type:"boolean",default:!0},"stt.enabled":{ui:{tab:"interaction",group:"Speech",label:"Speech-to-Text",description:"Enable speech-to-text input via microphone"},type:"boolean",default:!1},"stt.modelName":{ui:{tab:"interaction",group:"Speech",label:"Speech Model",description:"Local on-device speech model. Parakeet TDT v3 (sherpa-onnx) is the SoTA default; Whisper base/small/large-v3-turbo tiers (transformers.js) trade size for multilingual coverage. Downloaded on first use.",options:[{value:"fast",label:"Fast (Whisper base)",description:"Whisper base, multilingual. Smallest + fastest; lowest accuracy. Best for low-resource machines."},{value:"balanced",label:"Balanced (Whisper small)",description:"Whisper small, multilingual. More accurate than Fast, still light on CPU/RAM."},{value:"turbo",label:"Turbo (Whisper large-v3)",description:"Whisper large-v3-turbo, 99 languages. Widest language coverage; large download, slower."},{value:"parakeet",label:"Parakeet TDT v3 (SoTA)",description:"NVIDIA Parakeet TDT 0.6B v3, 25 languages. Open ASR Leaderboard leader — best accuracy and far fastest decoding. Default."}]},type:"enum",default:"parakeet",values:["fast","balanced","turbo","parakeet"]},"stt.submitTrigger":{ui:{tab:"interaction",group:"Speech",label:"Speech-to-Text Submit Trigger",description:"Choose when speech dictation automatically submits: Never, Release (2+ words), Release with complete sentence, or When I Say Submit.",options:[{value:"never",label:"Never",description:"Never automatically submit; insert dictation and remain in editor."},{value:"release",label:"Release",description:"Submit on release if the utterance has 2+ words to avoid accidental sends."},{value:"release-complete",label:"Release with complete sentence",description:"Submit on release if the utterance ends with sentence-terminal punctuation (. ? ! etc.)."},{value:"say-submit",label:"When I Say Submit",description:"Submit if the utterance ends with a word containing 'submit' (strips that word before submitting)."}]},type:"enum",default:"never",values:["never","release","release-complete","say-submit"]},"contextPromotion.enabled":{ui:{tab:"context",group:"General",label:"Auto-Promote Context",description:"Promote to a larger-context model on context overflow instead of compacting"},type:"boolean",default:!1},extendedContext:{ui:{tab:"context",group:"General",label:"Extended Context",description:"Use larger context windows where supported; may incur premium pricing. Off keeps default or standard-pricing windows"},type:"boolean",default:!1},"compaction.enabled":{ui:{tab:"context",group:"Compaction",label:"Auto-Compact",description:"Automatically compact context when it gets too large"},type:"boolean",default:!0},"compaction.experimentalContextManagement":{ui:{tab:"context",group:"Compaction",label:"Notes-backed context windows (experimental)",description:"Keep persistent notes and searchable raw history across context windows. Restart to update available tools."},type:"boolean",default:!1},"compaction.midTurnEnabled":{ui:{tab:"context",group:"Compaction",label:"Mid-Turn Compaction",description:"Check thresholds at safe mid-turn tool-loop boundaries before the next provider request"},type:"boolean",default:!0},"compaction.methodOrder":{ui:{tab:"context",group:"Compaction",label:"Compaction Method Order",description:"Preferred fallback order for automatic context maintenance; unavailable or failed methods advance to the next choice",ordered:!0,options:[{value:"remote",label:"Server compaction",description:"Use provider-native server compaction (OpenAI Responses compact, Anthropic compaction beta) when the active route supports it"},{value:"snapcompact",label:"Snapcompact",description:"Archive history onto dense bitmap images the active vision model reads back; no LLM call"},{value:"handoff",label:"Handoff",description:"Generate a handoff document and continue from it as the compaction summary"},{value:"soft",label:"Soft compaction",description:"Summarize in place with a compaction model without using server compaction"},{value:"shake",label:"Shake",description:"Drop recoverable heavy content in place without an LLM call"}]},type:"array",default:["remote","snapcompact","handoff","shake","soft"]},"compaction.thresholdPercent":{ui:{tab:"context",group:"Compaction",label:"Compaction Threshold",description:"Percent threshold for context maintenance; set to Default to use legacy reserve-based behavior",options:[{value:"default",label:"Default",description:"Legacy reserve-based threshold"},{value:"10",label:"10%",description:"Extremely early maintenance"},{value:"20",label:"20%",description:"Very early maintenance"},{value:"30",label:"30%",description:"Early maintenance"},{value:"40",label:"40%",description:"Moderately early maintenance"},{value:"50",label:"50%",description:"Halfway point"},{value:"60",label:"60%",description:"Moderate context usage"},{value:"70",label:"70%",description:"Balanced"},{value:"75",label:"75%",description:"Slightly aggressive"},{value:"80",label:"80%",description:"Typical threshold"},{value:"85",label:"85%",description:"Aggressive context usage"},{value:"90",label:"90%",description:"Very aggressive"},{value:"95",label:"95%",description:"Near context limit"}]},type:"number",default:-1},"compaction.thresholdTokens":{ui:{tab:"context",group:"Compaction",label:"Compaction Token Limit",description:"Fixed token limit for context maintenance; overrides percentage if set",options:[{value:"default",label:"Default",description:"Use percentage-based threshold"},{value:"25000",label:"25K tokens",description:"1/8 of a 200K window"},{value:"50000",label:"50K tokens",description:"1/4 of a 200K window"},{value:"100000",label:"100K tokens",description:"1/2 of a 200K window"},{value:"150000",label:"150K tokens",description:"3/4 of a 200K window"},{value:"200000",label:"200K tokens",description:"Full standard context window"},{value:"300000",label:"300K tokens",description:"Large context window"},{value:"500000",label:"500K tokens",description:"Very large context window"}]},type:"number",default:-1},"compaction.handoffSaveToDisk":{ui:{tab:"context",group:"Compaction",label:"Save Handoff Docs",description:"Save generated handoff documents to markdown files for the auto-handoff flow"},type:"boolean",default:!1},"compaction.remoteStreamingV2Enabled":{ui:{tab:"context",group:"Compaction",label:"Remote Compaction V2",description:"Use Responses streaming compaction for compatible remote compaction models"},type:"boolean",default:!0},"compaction.asyncEnabled":{ui:{tab:"context",group:"Compaction",label:"Async Compaction",description:"Speculatively summarize in the background as context nears the compaction threshold, then splice the ready result in when the threshold is crossed"},type:"boolean",default:!0},"compaction.idleEnabled":{ui:{tab:"context",group:"Compaction",label:"Idle Compaction",description:"Compact context while idle when token count exceeds threshold"},type:"boolean",default:!1},"compaction.idleThresholdTokens":{ui:{tab:"context",group:"Compaction",label:"Idle Compaction Threshold",description:"Token count above which idle compaction triggers",options:[{value:"100000",label:"100K tokens",description:""},{value:"200000",label:"200K tokens",description:""},{value:"300000",label:"300K tokens",description:""},{value:"400000",label:"400K tokens",description:""},{value:"500000",label:"500K tokens",description:""},{value:"600000",label:"600K tokens",description:""},{value:"700000",label:"700K tokens",description:""},{value:"800000",label:"800K tokens",description:""},{value:"900000",label:"900K tokens",description:""}]},type:"number",default:200000},"compaction.idleTimeoutSeconds":{ui:{tab:"context",group:"Compaction",label:"Idle Compaction Delay",description:"Seconds to wait while idle before compacting",options:[{value:"60",label:"1 minute",description:""},{value:"120",label:"2 minutes",description:""},{value:"300",label:"5 minutes",description:""},{value:"600",label:"10 minutes",description:""},{value:"1800",label:"30 minutes",description:""},{value:"3600",label:"1 hour",description:""}]},type:"number",default:300},"compaction.supersedeReads":{ui:{tab:"context",group:"Compaction",label:"Supersede Stale Reads",description:"Prune older read results when the same file is read again (cache-aware, runs every turn)"},type:"boolean",default:!0},"compaction.dropUseless":{ui:{tab:"context",group:"Compaction",label:"Elide Uneventful Results",description:"Prune tool results flagged contextually useless (no matches, timed-out waits) once consumed (cache-aware)"},type:"boolean",default:!0},"snapcompact.systemPrompt":{ui:{tab:"context",group:"Experimental",label:"Snapcompact System Prompt",description:"Experimental: render selected system prompt text as dense PNG image(s) and attach to the first user message (vision models only). Saves tokens; loses prompt caching for imaged text.",options:[{value:"none",label:"None",description:"Keep the system prompt as text."},{value:"agents-md",label:"AGENTS.md",description:"Only move loaded context-file instructions to images, when that saves tokens."},{value:"all",label:"All",description:"Move the full system prompt to images, when that saves tokens."}]},type:"enum",default:"none",values:["none","agents-md","all"]},"snapcompact.toolResults":{ui:{tab:"context",group:"Experimental",label:"Snapcompact Tool Results",description:"Experimental: render large historical tool results as dense PNG image(s) instead of text (vision models only). Saves tokens on accumulated read/search output."},type:"boolean",default:!1},"tools.format":{ui:{tab:"context",group:"Experimental",label:"Tool Calling Mode",description:"Controls how tools are exposed to the model. Auto uses provider-native tool calls unless the selected model is marked as not supporting them, then falls back to the GLM owned dialect. Native forces provider-native tools; the other values force the named owned dialect. Applies on session start.",options:[{value:"auto",label:"Auto",description:"Use native tool calls unless the model is known not to support them."},{value:"native",label:"Native",description:"Use provider-native tool calls."},{value:"glm",label:"GLM",description:"Use GLM-style in-band tool calls."},{value:"hermes",label:"Hermes",description:"Use Hermes-style in-band tool calls."},{value:"kimi",label:"Kimi",description:"Use Kimi-style in-band tool calls."},{value:"xml",label:"XML",description:"Use generic XML in-band tool calls."},{value:"anthropic",label:"Anthropic",description:"Use Anthropic-style in-band tool calls."},{value:"deepseek",label:"DeepSeek",description:"Use DeepSeek-style in-band tool calls."},{value:"harmony",label:"Harmony",description:"Use Harmony-style in-band tool calls."},{value:"qwen3",label:"Qwen3",description:"Use the Qwen3 owned dialect."},{value:"gemini",label:"Gemini",description:"Use the Gemini owned dialect."},{value:"gemma",label:"Gemma",description:"Use the Gemma owned dialect."},{value:"minimax",label:"MiniMax",description:"Use the MiniMax owned dialect."}]},type:"enum",default:"auto",values:["auto","native","glm","hermes","kimi","xml","anthropic","deepseek","harmony","qwen3","gemini","gemma","minimax"]},"snapcompact.shape":{ui:{tab:"context",group:"Experimental",label:"Snapcompact Shape",description:"Frame shape snapcompact prints text with (compaction archive and inline imaging). Auto picks a shape tuned for the current model.",options:[{value:"auto",label:"Auto",description:"Picks a shape tuned for the current model, falling back to its provider family."},{value:"8x8r-bw",label:"8x8 repeated, black",description:"unscii square cell, black ink, every line printed twice with the copy on a pale highlight band."},{value:"8x8r-sent",label:"8x8 repeated, sentence hues",description:"Repeated grid with ink cycling six hues at sentence boundaries."},{value:"8x8u-bw",label:"8x8, black",description:"Plain unscii square cell, single-printed lines, black ink."},{value:"8x8u-sent",label:"8x8, sentence hues",description:"Plain unscii square cell with sentence-hue ink."},{value:"6x6u-bw",label:"6x6 dense, black",description:"unscii squeezed to 6x6 — densest readable cell, fewest frames — in black ink."},{value:"6x6u-sent",label:"6x6 dense, sentence hues",description:"Densest cell with sentence-hue ink."},{value:"5x8-bw",label:"5x8 legacy, black",description:"Original X.org 5x8 glyphs on the 2576px frame, black ink."},{value:"5x8-sent",label:"5x8 legacy, sentence hues",description:"The original snapcompact shape (pre-shape-table sessions rendered this)."},{value:"6x12-dim",label:"6x12, dimmed stopwords",description:"X.org 6x12 glyphs, black ink, function words dimmed gray."},{value:"8x13-bw",label:"8x13, black",description:"X.org 8x13 glyphs, black ink."},{value:"8on16-bw",label:"8x13 on 16px pitch, black",description:"8x13 glyphs on an 8x16 cell (extra leading), black ink."},{value:"8on22-bw",label:"8x13 on 22px pitch (leading), black",description:"8x13 glyphs on an 8x22 cell — extra line spacing so rows don't crowd. Default for OpenAI/Google."},{value:"11on16-bw",label:"8x13 on 11px advance (tracking), black",description:"8x13 glyphs on an 11x16 cell — extra letter spacing so characters don't merge. Default for Anthropic."},{value:"silver16-bw",label:"Silver 16, CJK",description:"Embedded Silver TrueType font on a 16px grid for CJK and other non-Latin text."},{value:"doc-8on16-bw",label:"Doc 8on16, black",description:"Two word-wrapped newspaper columns of 8x13 glyphs on a 16px pitch, black ink."},{value:"doc-8on16-sent",label:"Doc 8on16, sentence hues",description:"Two-column doc layout with sentence-hue ink."},{value:"doc-8on16-sent-dim",label:"Doc 8on16, sentence hues + dimmed stopwords",description:"Two-column doc layout, sentence-hue ink, function words dimmed gray."}]},type:"enum",default:"auto",values:["auto","8x8r-bw","8x8r-sent","8x8u-bw","8x8u-sent","6x6u-bw","6x6u-sent","5x8-bw","5x8-sent","6x12-dim","8x13-bw","8on16-bw","8on22-bw","11on16-bw","silver16-bw","doc-8on16-bw","doc-8on16-sent","doc-8on16-sent-dim"]},"branchSummary.enabled":{ui:{tab:"context",group:"General",label:"Branch Summaries",description:"Prompt to summarize when leaving a branch"},type:"boolean",default:!1},"memory.backend":{ui:{tab:"memory",group:"General",label:"Memory Backend",description:"Off, local summary pipeline, Mnemopi SQLite, Hindsight remote memory, or Sharpshooter",options:[{value:"off",label:"Off",description:"No memory subsystem runs"},{value:"local",label:"Local",description:"Local rollout summarisation pipeline (memory_summary.md)"},{value:"hindsight",label:"Hindsight",description:"Vectorize Hindsight remote memory service"},{value:"mnemopi",label:"Mnemopi",description:"Local SQLite recall/retain backend with optional embeddings"},{value:"sharpshooter",label:"Sharpshooter",description:"Friction-gated project decision files (architecture/product/style), consolidated in the background"}]},type:"enum",default:"off",values:["off","local","hindsight","mnemopi","sharpshooter"]},"sharpshooter.model":{ui:{tab:"memory",group:"Sharpshooter",label:"Sharpshooter Model",description:"Model selector for extraction/consolidation, empty = smol role"},type:"string"},"autolearn.enabled":{ui:{tab:"memory",group:"Auto-Learn",label:"Auto-Learn (experimental)",description:"After the agent stops, nudge it to capture lessons to memory and create/enhance isolated managed skills"},type:"boolean",default:!1},"autolearn.autoContinue":{ui:{tab:"memory",group:"Auto-Learn",label:"Auto-run capture at stop",description:"When on, auto-run one private capture turn at stop (uses extra tokens). When off, only standing auto-learn guidance remains.",condition:"autolearnActive"},type:"boolean",default:!1},"mnemopi.dbPath":{ui:{tab:"memory",group:"Mnemopi",label:"Mnemopi DB Path",description:"Optional SQLite DB path. Defaults to the agent memories directory.",condition:"mnemopiActive"},type:"string"},"mnemopi.bank":{ui:{tab:"memory",group:"Mnemopi",label:"Mnemopi Bank",description:"Optional shared bank base name. Per-project modes derive project-local banks from it.",condition:"mnemopiActive"},type:"string"},"mnemopi.scoping":{ui:{tab:"memory",group:"Mnemopi",label:"Mnemopi Scoping",description:"global = one shared bank; per-project = isolated bank per cwd; per-project-tagged = project-local writes plus global recall visibility",condition:"mnemopiActive",options:[{value:"global",label:"Global",description:"One shared Mnemopi bank for every project"},{value:"per-project",label:"Per project",description:"Project-local Mnemopi bank per cwd basename"},{value:"per-project-tagged",label:"Per project (tagged)",description:"Write to a project-local bank but merge project + shared recall results"}]},type:"enum",default:"per-project",values:["global","per-project","per-project-tagged"]},"mnemopi.embeddingVariant":{ui:{tab:"memory",group:"Mnemopi",label:"Embedding variant",description:"Local embedding model family. en = stronger English model; multilingual = cross-language model. Changing this rebuilds existing memory embeddings on next start.",condition:"mnemopiActive",options:[{value:"en",label:"English (bge-base-en-v1.5)",description:"BAAI/bge-base-en-v1.5 (768d), English-only"},{value:"multilingual",label:"Multilingual (multilingual-e5-large)",description:"intfloat/multilingual-e5-large (1024d), cross-language recall"}]},type:"enum",default:"en",values:["en","multilingual"]},"mnemopi.autoRecall":{ui:{tab:"memory",group:"Mnemopi",label:"Mnemopi Auto Recall",description:"Recall local memories into the first turn of each session",condition:"mnemopiActive"},type:"boolean",default:!0},"mnemopi.autoRetain":{ui:{tab:"memory",group:"Mnemopi",label:"Mnemopi Auto Retain",description:"Retain completed conversation turns into local Mnemopi memory",condition:"mnemopiActive"},type:"boolean",default:!0},"mnemopi.polyphonicRecall":{ui:{tab:"memory",group:"Mnemopi",label:"Mnemopi Polyphonic Recall",description:"Enable 4-voice recall (vector, graph, fact, temporal) fused with reciprocal rank fusion",condition:"mnemopiActive"},type:"boolean",default:!1},"mnemopi.enhancedRecall":{ui:{tab:"memory",group:"Mnemopi",label:"Mnemopi Enhanced Recall",description:"Enable the tiered query result cache for repeated and similar recall queries",condition:"mnemopiActive"},type:"boolean",default:!1},"mnemopi.proactiveLinking":{ui:{tab:"memory",group:"Mnemopi",label:"Mnemopi Proactive Linking",description:"Ingest new memories into the episodic graph as they are stored, linking them to related entities and memories",condition:"mnemopiActive"},type:"boolean",default:!1},"mnemopi.noEmbeddings":{ui:{tab:"memory",group:"Mnemopi",label:"Mnemopi Disable Embeddings",description:"Force deterministic FTS-only recall instead of vector embeddings",condition:"mnemopiActive"},type:"boolean",default:!1},"mnemopi.embeddingModel":{ui:{tab:"memory",group:"Mnemopi",label:"Mnemopi Embedding Model",description:"Advanced: explicit embedding model id that overrides the variant. Leave empty to use mnemopi.embeddingVariant.",condition:"mnemopiActive"},type:"string"},"mnemopi.embeddingApiUrl":{ui:{tab:"memory",group:"Mnemopi",label:"Mnemopi Embedding API URL",description:"Optional OpenAI-compatible embedding endpoint passed to Mnemopi",condition:"mnemopiActive"},type:"string"},"mnemopi.embeddingApiKey":{ui:{tab:"memory",group:"Mnemopi",label:"Mnemopi Embedding API Key",description:"Optional embedding API key passed to Mnemopi",condition:"mnemopiActive"},type:"string",credential:!0},"mnemopi.llmMode":{ui:{tab:"memory",group:"Mnemopi",label:"Mnemopi LLM Mode",description:"Use no LLM, the online tiny model (the TINY role from /models, else @smol), or a remote OpenAI-compatible endpoint",condition:"mnemopiActive",options:[{value:"none",label:"None",description:"Disable Mnemopi LLM-backed extraction"},{value:"smol",label:"Online (tiny)",description:"Use the online tiny model (the TINY role from /models, else @smol)"},{value:"remote",label:"Remote",description:"Use the Mnemopi remote LLM settings below"}]},type:"enum",default:"smol",values:["none","smol","remote"]},"mnemopi.llmBaseUrl":{ui:{tab:"memory",group:"Mnemopi",label:"Mnemopi LLM Base URL",description:"Optional OpenAI-compatible LLM endpoint for Mnemopi remote mode",condition:"mnemopiActive"},type:"string"},"mnemopi.llmApiKey":{ui:{tab:"memory",group:"Mnemopi",label:"Mnemopi LLM API Key",description:"Optional LLM API key for Mnemopi remote mode",condition:"mnemopiActive"},type:"string",credential:!0},"mnemopi.llmModel":{ui:{tab:"memory",group:"Mnemopi",label:"Mnemopi LLM Model",description:"Optional LLM model name for Mnemopi remote mode",condition:"mnemopiActive"},type:"string"},"hindsight.apiUrl":{ui:{tab:"memory",group:"Hindsight",label:"Hindsight API URL",description:"Hindsight server URL (Cloud or self-hosted)",condition:"hindsightActive"},type:"string",default:"http://localhost:8888"},"hindsight.apiToken":{ui:{tab:"memory",group:"Hindsight",label:"Hindsight API Token",description:"Bearer token for authenticated Hindsight servers",condition:"hindsightActive"},type:"string",credential:!0},"hindsight.bankId":{ui:{tab:"memory",group:"Hindsight",label:"Hindsight Bank ID",description:"Memory bank identifier (default: project name)",condition:"hindsightActive"},type:"string"},"hindsight.scoping":{ui:{tab:"memory",group:"Hindsight",label:"Hindsight Scoping",description:"global = one shared bank; per-project = isolated bank per cwd; per-project-tagged = shared bank with project tags so global + project memories merge on recall",condition:"hindsightActive",options:[{value:"global",label:"Global",description:"One shared bank — every project sees the same memories"},{value:"per-project",label:"Per project",description:"Isolated bank per cwd basename — projects cannot see each other's memories"},{value:"per-project-tagged",label:"Per project (tagged)",description:"Shared bank, retains tagged with project:<cwd>. Recall surfaces project + untagged global memories together"}]},type:"enum",default:"per-project-tagged",values:["global","per-project","per-project-tagged"]},"hindsight.autoRecall":{ui:{tab:"memory",group:"Hindsight",label:"Hindsight Auto Recall",description:"Recall memories on the first turn of each session",condition:"hindsightActive"},type:"boolean",default:!0},"hindsight.autoRetain":{ui:{tab:"memory",group:"Hindsight",label:"Hindsight Auto Retain",description:"Retain transcript every N turns and at session boundaries",condition:"hindsightActive"},type:"boolean",default:!0},"hindsight.retainMode":{ui:{tab:"memory",group:"Hindsight",label:"Hindsight Retain Mode",description:"full-session = upsert one document per session, last-turn = chunked",condition:"hindsightActive",options:[{value:"full-session",label:"Full session",description:"Upsert one document per session (recommended)"},{value:"last-turn",label:"Last turn",description:"Chunked retention sliced by turn boundaries"}]},type:"enum",default:"full-session",values:["full-session","last-turn"]},"hindsight.mentalModelsEnabled":{ui:{tab:"memory",group:"Hindsight",label:"Hindsight Mental Models",description:"Read curated reflect summaries (mental models) into developer instructions at boot. Loads existing models on the bank — does not write. Pair with hindsight.mentalModelAutoSeed to also auto-create the built-in seed set.",condition:"hindsightActive"},type:"boolean",default:!0},"hindsight.mentalModelAutoSeed":{ui:{tab:"memory",group:"Hindsight",label:"Hindsight Mental Model Auto-Seed",description:"At session start, create any built-in mental models (project-conventions, project-decisions, user-preferences) that do not yet exist on the bank.",condition:"hindsightActive"},type:"boolean",default:!0},"ttsr.enabled":{ui:{tab:"context",group:"Rules (TTSR)",label:"TTSR",description:"Interrupt the agent mid-stream when output matches rule patterns (Time-Traveling Stream Rules)"},type:"boolean",default:!0},"ttsr.contextMode":{ui:{tab:"context",group:"Rules (TTSR)",label:"TTSR Context Mode",description:"What to do with partial output when TTSR triggers"},type:"enum",default:"discard",values:["discard","keep"]},"ttsr.interruptMode":{ui:{tab:"context",group:"Rules (TTSR)",label:"TTSR Interrupt Mode",description:"When to interrupt mid-stream vs inject warning after completion",options:[{value:"always",label:"always",description:"Interrupt on prose and tool streams"},{value:"prose-only",label:"prose-only",description:"Interrupt only on reply/thinking matches"},{value:"tool-only",label:"tool-only",description:"Interrupt only on tool-call argument matches"},{value:"never",label:"never",description:"Never interrupt; inject warning after completion"}]},type:"enum",default:"always",values:["never","prose-only","tool-only","always"]},"ttsr.repeatMode":{ui:{tab:"context",group:"Rules (TTSR)",label:"TTSR Repeat Mode",description:"How rules can repeat: once per session or after a message gap"},type:"enum",default:"once",values:["once","after-gap"]},"ttsr.repeatGap":{ui:{tab:"context",group:"Rules (TTSR)",label:"TTSR Repeat Gap",description:"Messages before a rule can trigger again",options:[{value:"5",label:"5 messages",description:""},{value:"10",label:"10 messages",description:""},{value:"15",label:"15 messages",description:""},{value:"20",label:"20 messages",description:""},{value:"30",label:"30 messages",description:""}]},type:"number",default:10},"ttsr.builtinRules":{ui:{tab:"context",group:"Rules (TTSR)",label:"Built-in Rules",description:"Load the default rules shipped with the agent (override individually with ttsr.disabledRules)"},type:"boolean",default:!0},"ttsr.disabledRules":{ui:{tab:"context",group:"Rules (TTSR)",label:"Disabled Rules",description:"Rule names to ignore entirely (applies to bundled defaults and your own rules)"},type:"array",default:[]},"edit.mode":{ui:{tab:"files",group:"Editing",label:"Edit Mode",description:"Select the edit tool variant (replace, patch, hashline, or apply_patch)"},type:"enum",default:"hashline",values:["apply_patch","hashline","patch","replace","sloppy"]},"edit.fuzzyMatch":{ui:{tab:"files",group:"Editing",label:"Fuzzy Match",description:"Accept high-confidence fuzzy matches for whitespace differences"},type:"boolean",default:!0},"edit.fuzzyThreshold":{ui:{tab:"files",group:"Editing",label:"Fuzzy Match Threshold",description:"Similarity threshold (0-1) for accepting fuzzy matches",options:[{value:"0.85",label:"0.85",description:"Lenient"},{value:"0.90",label:"0.90",description:"Moderate"},{value:"0.95",label:"0.95",description:"Default"},{value:"0.98",label:"0.98",description:"Strict"}]},type:"number",default:0.95},"edit.streamingAbort":{ui:{tab:"files",group:"Editing",label:"Abort on Failed Preview",description:"Abort streaming edit tool calls when patch preview fails"},type:"boolean",default:!1},"edit.recoverInlineEdits":{ui:{tab:"files",group:"Editing",label:"Recover Inline Edit Payloads",description:"Execute edit payloads the model emits as plain text by converting them into edit tool calls"},type:"boolean",default:!0},"edit.blockAutoGenerated":{ui:{tab:"files",group:"Editing",label:"Block Auto-Generated Files",description:"Prevent editing of files that appear to be auto-generated (protoc, sqlc, swagger, etc.)"},type:"boolean",default:!0},"edit.enforceSeenLines":{ui:{tab:"files",group:"Editing",label:"Enforce Seen-Line Guard",description:"Reject edits anchored on lines a prior read/search never displayed in full"},type:"boolean",default:!1},"edit.blackbox.enabled":{ui:{tab:"files",group:"Editing",label:"Record Parse Regressions",description:"Append full before/after source when an edit introduces an AST parse failure"},type:"boolean",default:!1},"edit.autoRepair.enabled":{ui:{tab:"files",group:"Editing",label:"Auto-Repair Parse Regressions",description:"When an edit breaks a file's AST parse, ask the smol model to fix the broken region (validated by re-parse; falls back to a warning)"},type:"boolean",default:!1},readLineNumbers:{ui:{tab:"files",group:"Reading",label:"Line Numbers",description:"Prepend line numbers to read tool output by default"},type:"boolean",default:!1},"read.defaultLimit":{ui:{tab:"files",group:"Reading",label:"Default Read Limit",description:"Default number of lines returned when agent calls read without a limit",options:[{value:"200",label:"200 lines",description:""},{value:"300",label:"300 lines",description:""},{value:"500",label:"500 lines",description:""},{value:"1000",label:"1000 lines",description:""},{value:"5000",label:"5000 lines",description:""}]},type:"number",default:300},"read.renderMarkdown":{ui:{tab:"files",group:"Reading",label:"Markdown Previews",description:"Render Markdown read results as formatted terminal Markdown previews instead of raw source"},type:"boolean",default:!1},"read.summarize.enabled":{ui:{tab:"files",group:"Read Summaries",label:"Read Summaries",description:"Return structural code summaries when read is called without an explicit selector"},type:"boolean",default:!0},"read.summarize.prose":{ui:{tab:"files",group:"Read Summaries",label:"Prose Summaries",description:"Return structural summaries for Markdown and plain text reads"},type:"boolean",default:!1},"read.summarize.minBodyLines":{ui:{tab:"files",group:"Read Summaries",label:"Read Summary Body Lines",description:"Minimum multiline body or literal length before read summaries collapse it"},type:"number",default:4},"read.summarize.minCommentLines":{ui:{tab:"files",group:"Read Summaries",label:"Read Summary Comment Lines",description:"Minimum multiline block comment length before read summaries collapse it"},type:"number",default:6},"read.summarize.minTotalLines":{ui:{tab:"files",group:"Read Summaries",label:"Read Summary Minimum File Length",description:"Files with fewer total lines are read verbatim instead of structurally summarized"},type:"number",default:100},"read.summarize.unfoldUntil":{ui:{tab:"files",group:"Read Summaries",label:"Read Summary Unfold Target",description:"BFS-unfold elidable spans until the summary is at least this many visible lines. 0 keeps only the outermost elisions."},type:"number",default:50},"read.summarize.unfoldLimit":{ui:{tab:"files",group:"Read Summaries",label:"Read Summary Unfold Ceiling",description:"Hard ceiling on summary size while BFS-unfolding. An unfold whose revealed lines would exceed this is skipped (that span stays folded) and unfolding continues with the remaining spans."},type:"number",default:100},"read.toolResultPreview":{ui:{tab:"files",group:"Reading",label:"Inline Read Previews",description:"Render read tool results inline in the transcript instead of summary rows"},type:"boolean",default:!1},"lsp.enabled":{ui:{tab:"files",group:"LSP",label:"LSP",description:"Enable the lsp tool for code intelligence (definitions, references, diagnostics, rename)"},type:"boolean",default:!0},"lsp.lazy":{ui:{tab:"files",group:"LSP",label:"Lazy LSP Startup",description:"Start language servers on first use (lsp tool or editing a matching file type) instead of at session startup"},type:"boolean",default:!0},"lsp.shared":{ui:{tab:"files",group:"LSP",label:"Shared Language Servers",description:"Share one language server per project across omp instances via the daemon broker (falls back to private servers when unavailable)"},type:"boolean",default:!0},"lsp.formatOnWrite":{ui:{tab:"files",group:"LSP",label:"Format on Write",description:"Automatically format code files using LSP after writing"},type:"boolean",default:!1},"lsp.diagnosticsOnWrite":{ui:{tab:"files",group:"LSP",label:"Diagnostics on Write",description:"Return LSP diagnostics after writing code files"},type:"boolean",default:!0},"lsp.diagnosticsOnEdit":{ui:{tab:"files",group:"LSP",label:"Diagnostics on Edit",description:"Return LSP diagnostics after editing code files"},type:"boolean",default:!1},"lsp.diagnosticsDeduplicate":{ui:{tab:"files",group:"LSP",label:"Deduplicate Diagnostics",description:"Suppress post-edit LSP diagnostics already shown for a file; only surface new or changed ones"},type:"boolean",default:!0},"bash.enabled":{ui:{tab:"shell",group:"Bash",label:"Bash",description:"Enable the bash tool for shell command execution"},type:"boolean",default:!0},"bash.allowCompoundCommands":{ui:{tab:"shell",group:"Bash",label:"Allow Compound Commands",description:"Evaluate literal && chains per command; unmatched commands use normal bash approval policy and mode"},type:"boolean",default:!1},"bash.autoBackground.enabled":{ui:{tab:"shell",group:"Bash",label:"Bash Auto-Background",description:"Automatically background long-running bash commands and deliver the result later"},type:"boolean",default:!0},"bash.patterns":{ui:{tab:"shell",group:"Bash",label:"Bash Approval Patterns",description:"Ordered bash command approval rules. Each item has match and approval fields; only '*' wildcards are supported."},type:"array",default:[]},"bashInterceptor.enabled":{ui:{tab:"shell",group:"Bash",label:"Bash Interceptor",description:"Block shell commands that have dedicated tools"},type:"boolean",default:!1},"bash.direnv":{ui:{tab:"shell",group:"Bash",label:"direnv Auto-Load",description:"Auto-load a repo's direnv/devenv `.envrc` into the bash session so devenv tools and env vars are present without manual `direnv exec`. Honors direnv's allow list: an `.envrc` you haven't `direnv allow`ed is never executed"},type:"enum",default:"auto",values:["auto","off"]},"bash.direnvLoadTimeoutMs":{ui:{tab:"shell",group:"Bash",label:"direnv Load Timeout (ms)",description:"Max wait for the first `direnv export` (a cold devenv shell can be slow); on timeout the session runs without the direnv env"},type:"number",default:30000},"shellMinimizer.enabled":{ui:{tab:"shell",group:"Bash",label:"Shell Minimizer",description:"Compress verbose shell output (git, npm, cargo, etc.) before returning it to the agent"},type:"boolean",default:!0},"shellMinimizer.sourceOutlineLevel":{ui:{tab:"shell",group:"Bash",label:"Shell Minimizer Source Outline",description:"Source outline mode for cat/read of source files: default or aggressive"},type:"enum",default:"default",values:["default","aggressive"]},"eval.py":{ui:{tab:"shell",group:"Eval & Runtimes",label:"Python Eval Backend",description:"Allow the eval tool to dispatch Python cells to the IPython kernel"},type:"boolean",default:!0},"eval.js":{ui:{tab:"shell",group:"Eval & Runtimes",label:"JavaScript Eval Backend",description:"Allow the eval tool to dispatch JavaScript cells to the in-process runtime"},type:"boolean",default:!0},"eval.tools.enabled":{ui:{tab:"shell",group:"Eval & Runtimes",label:"Eval-Defined Tools",description:"Let eval cells define tools (@tool in Python, tool(fn) in JS) that task, agent(), and workpool() subagents can call"},type:"boolean",default:!0},"eval.workpool.freshAgents":{ui:{tab:"shell",group:"Eval & Runtimes",label:"Fresh Workpool Agents",description:"Spawn a new subagent for every workpool item instead of reusing workers or batching queued items"},type:"boolean",default:!1},"eval.autoBackground.enabled":{ui:{tab:"shell",group:"Eval & Runtimes",label:"Eval Auto-Background",description:"Automatically background long-running eval cells and deliver the result later"},type:"boolean",default:!1},"python.kernelMode":{ui:{tab:"shell",group:"Eval & Runtimes",label:"Python Kernel Mode",description:"Keep the IPython kernel alive across eval calls or start fresh each time"},type:"enum",default:"session",values:["session","per-call"]},"python.interpreter":{ui:{tab:"shell",group:"Eval & Runtimes",label:"Python Interpreter",description:"Optional path to an exact Python executable. When set, automatic Python runtime discovery is skipped."},type:"string",default:""},"tools.approval":{ui:{tab:"interaction",group:"Approvals",label:"Tool Approval Policies",description:"Per-tool approval policies. Set to 'allow' to auto-approve, 'prompt' to require confirmation, or 'deny' to block. Overrides are honored in every approval mode."},type:"record",default:{}},"tools.approvalMode":{ui:{tab:"interaction",group:"Approvals",label:"Tool Approval",description:"Default approval behavior for tool calls. 'Always ask' auto-approves read-only tools only. 'Write' auto-approves read and workspace-write tools. 'Yolo' auto-approves all tiers; user policy may still prompt or block.",options:[{value:"always-ask",label:"Always ask",description:"Auto-approve read-only tools; require confirmation for write and exec tools."},{value:"write",label:"Write",description:"Auto-approve read-only and write tools; require confirmation for exec tools such as bash, eval, browser, and task."},{value:"yolo",label:"Yolo",description:"Auto-approve read, write, and exec tools. User policy can still require confirmation or block calls."}]},type:"enum",default:"yolo",values:["always-ask","write","yolo"]},"todo.enabled":{ui:{tab:"tools",group:"Available Tools",label:"Todos",description:"Enable the todo tool for task tracking"},type:"boolean",default:!0},"todo.reminders":{ui:{tab:"tools",group:"Todos",label:"Todo Reminders",description:"Remind the agent to complete todos before stopping"},type:"boolean",default:!0},"todo.remindersMax":{ui:{tab:"tools",group:"Todos",label:"Todo Reminder Limit",description:"Maximum number of todo reminders before giving up",options:[{value:"1",label:"1 reminder",description:""},{value:"2",label:"2 reminders",description:""},{value:"3",label:"3 reminders",description:""},{value:"5",label:"5 reminders",description:""}]},type:"number",default:3},"todo.eager":{ui:{tab:"tools",group:"Todos",label:"Create Todos Automatically",description:"How strongly to push automatic todo-list creation after the first message",options:[{value:"default",label:"Default",description:"Model decides; no automatic todo list"},{value:"preferred",label:"Preferred",description:"Suggests a todo list on the first message (reminder, not forced)"},{value:"always",label:"Always",description:"Forces a comprehensive todo list on the first message"}]},type:"enum",default:"default",values:["default","preferred","always"]},"glob.enabled":{ui:{tab:"tools",group:"Available Tools",label:"Glob",description:"Enable the glob tool for glob-based file lookup"},type:"boolean",default:!0},"grep.enabled":{ui:{tab:"tools",group:"Available Tools",label:"Grep",description:"Enable the grep tool for regex content search"},type:"boolean",default:!0},"grep.contextBefore":{ui:{tab:"tools",group:"Grep & Browser",label:"Grep Context Before",description:"Lines of context before each grep match",options:[{value:"0",label:"0 lines",description:""},{value:"1",label:"1 line",description:""},{value:"2",label:"2 lines",description:""},{value:"3",label:"3 lines",description:""},{value:"5",label:"5 lines",description:""}]},type:"number",default:1},"grep.contextAfter":{ui:{tab:"tools",group:"Grep & Browser",label:"Grep Context After",description:"Lines of context after each grep match",options:[{value:"0",label:"0 lines",description:""},{value:"1",label:"1 line",description:""},{value:"2",label:"2 lines",description:""},{value:"3",label:"3 lines",description:""},{value:"5",label:"5 lines",description:""},{value:"10",label:"10 lines",description:""}]},type:"number",default:3},"astGrep.enabled":{ui:{tab:"tools",group:"Available Tools",label:"AST Grep",description:"Enable the ast_grep tool for structural AST search"},type:"boolean",default:!1},"astEdit.enabled":{ui:{tab:"tools",group:"Available Tools",label:"AST Edit",description:"Enable the ast_edit tool for structural AST rewrites"},type:"boolean",default:!0},"debug.enabled":{ui:{tab:"tools",group:"Available Tools",label:"Debug",description:"Enable the debug tool for DAP-based debugging"},type:"boolean",default:!0},"launch.enabled":{ui:{tab:"tools",group:"Available Tools",label:"Launch",description:"Enable the launch tool for supervising shared long-running project processes"},type:"boolean",default:!0},"speechgen.enabled":{ui:{tab:"tools",group:"Available Tools",label:"Speech Generation",description:"Enable the tts tool for on-device (Kokoro) or xAI Grok Voice speech-file synthesis"},type:"boolean",default:!1},"generate_image.enabled":{ui:{tab:"tools",group:"Available Tools",label:"Generate Image",description:"Enable the generate_image tool (text-to-image generation and editing). Exposed as an xd:// device when tools.xdev is on."},type:"boolean",default:!1},"computer.enabled":{ui:{tab:"tools",group:"Available Tools",label:"Computer",description:"Enable the scriptable host-desktop eval prelude (screenshots, input, accessibility)"},type:"boolean",default:!1},"computer.display":{ui:{tab:"tools",group:"Computer",label:"Computer Display",description:"Composite all displays or select a native display id"},type:"string",default:"all"},"computer.maxWidth":{ui:{tab:"tools",group:"Computer",label:"Computer Screenshot Width",description:"Maximum composite screenshot width in pixels"},type:"number",default:3840},"computer.maxHeight":{ui:{tab:"tools",group:"Computer",label:"Computer Screenshot Height",description:"Maximum composite screenshot height in pixels"},type:"number",default:2400},"images.questionTimeoutMs":{ui:{tab:"tools",group:"Execution",label:"Image Question Timeout",description:"Per-request timeout for the vision-model call behind read's ?q= image questions, in milliseconds. A stalled provider fails fast with a timeout error instead of blocking until manual abort. Set to 0 to disable the timeout.",options:[{value:"0",label:"Disabled",description:""},{value:"60000",label:"1 minute",description:""},{value:"120000",label:"2 minutes",description:""},{value:"180000",label:"3 minutes",description:""},{value:"300000",label:"5 minutes",description:""}]},type:"number",default:300000},"checkpoint.enabled":{ui:{tab:"tools",group:"Available Tools",label:"Checkpoint/Rewind",description:"Enable the checkpoint and rewind tools for context checkpointing"},type:"boolean",default:!1},"fetch.enabled":{ui:{tab:"tools",group:"Available Tools",label:"Read URLs",description:"Allow the read tool to fetch and process URLs"},type:"boolean",default:!0},"vault.enabled":{ui:{tab:"tools",group:"Available Tools",label:"Obsidian Vault",description:"Enable the vault:// internal URL for reading and editing Obsidian vault content via the Obsidian CLI. When disabled, vault:// resolution is refused and the vault:// entry is omitted from the system prompt."},type:"boolean",default:!1},"github.enabled":{ui:{tab:"tools",group:"Available Tools",label:"GitHub CLI",description:"Enable the github tool (op-based dispatch for repository, issue, pull request, diff, search, checkout, push, and Actions watch workflows)"},type:"boolean",default:!1},"github.cache.enabled":{ui:{tab:"tools",group:"GitHub",label:"GitHub View Cache",description:"Cache rendered issue/PR view output in ~/.omp/cache/github-cache.db so repeated reads are free"},type:"boolean",default:!0},"github.cache.softTtlSec":{ui:{tab:"tools",group:"GitHub",label:"GitHub Cache Soft TTL",description:"Within this window, cached issue/PR view rows are returned directly (seconds; default 5 minutes)"},type:"number",default:300},"github.cache.hardTtlSec":{ui:{tab:"tools",group:"GitHub",label:"GitHub Cache Hard TTL",description:"Past the soft TTL the cached row is returned and refreshed in the background; past the hard TTL it is dropped (seconds; default 7 days)"},type:"number",default:604800},"web_search.enabled":{ui:{tab:"tools",group:"Available Tools",label:"Web Search",description:"Enable the web_search tool for live web results"},type:"boolean",default:!0},"security.enabled":{ui:{tab:"tools",group:"Available Tools",label:"Security",description:"Enable OMP-native security scan planning, execution, and the read-only security:// resource namespace"},type:"boolean",default:!1},"ask.enabled":{ui:{tab:"tools",group:"Available Tools",label:"Ask",description:"Enable the ask tool for interactive user questions"},type:"boolean",default:!0},"browser.enabled":{ui:{tab:"tools",group:"Available Tools",label:"Browser",description:"Enable the browser eval prelude for scripted Chromium automation (Puppeteer)"},type:"boolean",default:!0},"browser.cdpUrl":{ui:{tab:"tools",group:"Grep & Browser",label:"Browser CDP URL",description:"Default HTTP CDP discovery endpoint (for example http://127.0.0.1:9222) to attach to instead of launching a browser. Explicit app.cdp_url or app.path on the tool call take precedence."},type:"string"},"browser.relay":{ui:{tab:"tools",group:"Grep & Browser",label:"Browser Relay",description:"Drive your own Chrome tabs through the omp browser relay. Install the extension once (`omp browser-relay install`); the relay server auto-starts when the browser prelude needs it. Takes precedence over Browser CDP URL; set PI_BROWSER_RELAY=0 or PI_BROWSER_RELAY=1 to override."},type:"boolean",default:!1},"browser.relayUrl":{ui:{tab:"tools",group:"Grep & Browser",label:"Browser Relay URL",description:"omp browser relay endpoint (default http://127.0.0.1:9224)."},type:"string"},"browser.headless":{ui:{tab:"tools",group:"Grep & Browser",label:"Headless Browser",description:"Launch browser in headless mode (disable to show browser UI)"},type:"boolean",default:!0},"browser.cmux":{ui:{tab:"tools",group:"Grep & Browser",label:"cmux Browser",description:"Use cmux WKWebView surfaces for browser automation when a cmux socket is available. Set PI_BROWSER_CMUX=0 or PI_BROWSER_CMUX=1 to override."},type:"boolean",default:!0},"browser.freezeOnTurnEnd":{ui:{tab:"tools",group:"Grep & Browser",label:"Freeze Browser Tabs On Turn End",description:"Freeze OMP-owned headless browser tabs when a turn settles so animated pages stop burning CPU/GPU while idle. Tabs unfreeze automatically on next use; pass persist:true on open to opt a tab out."},type:"boolean",default:!0},"browser.idleCloseSec":{ui:{tab:"tools",group:"Grep & Browser",label:"Browser Idle Close Timeout",description:"Close OMP-owned headless browser tabs idle longer than this many seconds (0 = never; session dispose still reaps). Applies only to OMP-launched headless tabs, never relay/CDP/spawned browsers or other sessions' tabs.",options:[{value:"0",label:"Never",description:""},{value:"900",label:"15 minutes",description:""},{value:"1800",label:"30 minutes",description:""},{value:"3600",label:"1 hour",description:""}]},type:"number",default:1800},"browser.screenshotDir":{ui:{tab:"tools",group:"Grep & Browser",label:"Screenshot Directory",description:"Directory to save screenshots. If unset, screenshots go to a temp file. Supports ~. Examples: ~/Downloads, ~/Desktop, /sdcard/Download (Android)"},type:"string"},"tools.intentTracing":{ui:{tab:"tools",group:"Execution",label:"Intent Tracing",description:"Ask the agent to describe the intent of each tool call before executing it"},type:"boolean",default:!0},"tools.abortOnFabricatedResult":{ui:{tab:"tools",group:"Execution",label:"Abort On Fabricated Tool Result",description:"With in-band tool calls, stop the model immediately when it starts hallucinating a tool result mid-turn. Disable to let the model finish generating and discard the fabricated continuation instead."},type:"boolean",default:!0},"tools.speculativeExecution.enabled":{ui:{tab:"tools",group:"Execution",label:"Experimental Speculative Execution",description:"Enable the discard-safe first slice: validated local reads through direct read calls and nested eval. Network requests, provider completions, and live filesystem writes are not part of this baseline."},type:"boolean",default:!1},"tools.speculativeExecution.maxInFlight":{ui:{tab:"tools",group:"Execution",label:"Speculative Execution Concurrency",description:"Maximum number of validated local reads allowed to run before normal dispatch.",options:[{value:"1",label:"1 operation",description:""},{value:"2",label:"2 operations",description:""},{value:"3",label:"3 operations",description:""},{value:"4",label:"4 operations",description:""}]},type:"number",default:2},"tools.maxTimeout":{ui:{tab:"tools",group:"Execution",label:"Max Tool Timeout",description:"Maximum timeout in seconds the agent can set for any tool (0 = no limit)",options:[{value:"0",label:"No limit",description:""},{value:"30",label:"30 seconds",description:""},{value:"60",label:"60 seconds",description:""},{value:"120",label:"120 seconds",description:""},{value:"300",label:"5 minutes",description:""},{value:"600",label:"10 minutes",description:""}]},type:"number",default:0},"async.enabled":{ui:{tab:"tools",group:"Execution",label:"Async Execution",description:"Enable async bash commands and background task execution"},type:"boolean",default:!0},"irc.timeoutMs":{ui:{tab:"tools",group:"Execution",label:"IRC Timeout",description:"Timeout for hub send await:true in milliseconds; 0 disables the timeout",options:[{value:"0",label:"Disabled",description:""},{value:"30000",label:"30 seconds",description:""},{value:"60000",label:"1 minute",description:""},{value:"120000",label:"2 minutes",description:""},{value:"300000",label:"5 minutes",description:""}]},type:"number",default:120000},"tools.xdev":{ui:{tab:"tools",group:"Discovery & MCP",label:"xd:// Tools",description:"Mount rarely-used (discoverable) tools under xd:// device URLs driven via read/write instead of shipping their schemas on every request. Sessions whose explicit tool list grants read but omits write mount devices through a device-only write transport (filesystem writes stay rejected). Disable to expose every enabled tool top-level."},type:"boolean",default:!0},"tools.xdevDocs":{ui:{tab:"tools",group:"Discovery & MCP",label:"xd:// Prompt Docs",description:"Choose which mounted-device docs and schemas are inlined in the system prompt. Built-ins keeps core tools inline while MCP and extension tools stay on-demand.",options:[{value:"inline",label:"All Devices",description:"Inline docs and schemas for every mounted device."},{value:"builtins",label:"Built-ins Only",description:"Inline built-in docs; fetch MCP and extension docs on demand."},{value:"catalog",label:"Catalog Only",description:"List every device; fetch all docs on demand."}]},type:"enum",default:"builtins",values:["inline","builtins","catalog"]},"tools.xdevInlineDevices":{ui:{tab:"tools",group:"Discovery & MCP",label:"xd:// Inline Devices",description:"When xd:// Prompt Docs is Built-ins Only, inline dynamic devices whose names match these glob patterns (for example mcp__context_mode_*). Catalog Only ignores this setting."},type:"array",default:[]},"mcp.enableProjectConfig":{ui:{tab:"tools",group:"Discovery & MCP",label:"MCP Project Config",description:"Load .mcp.json/mcp.json from project root"},type:"boolean",default:!0},"mcp.renderMarkdownResults":{ui:{tab:"tools",group:"Discovery & MCP",label:"MCP Markdown Results",description:"Render non-JSON MCP text results as Markdown in the transcript"},type:"boolean",default:!0},"mcp.notifications":{ui:{tab:"tools",group:"Discovery & MCP",label:"MCP Update Injection",description:"Inject MCP resource updates into the agent conversation"},type:"boolean",default:!1},"mcp.notificationDebounceMs":{ui:{tab:"tools",group:"Discovery & MCP",label:"MCP Notification Debounce",description:"Debounce window in milliseconds for MCP resource updates before injecting them into the conversation"},type:"number",default:500},"plan.enabled":{ui:{tab:"tasks",group:"Modes",label:"Plan Mode",description:"Enable plan mode for read-only exploration and planning before execution"},type:"boolean",default:!0},"plan.defaultOnStartup":{ui:{tab:"tasks",group:"Modes",label:"Start in Plan Mode",description:"Automatically enter plan mode at the start of every new session",condition:"planModeEnabled"},type:"boolean",default:!1},"plan.autosave":{ui:{tab:"tasks",group:"Modes",label:"Autosave Plans",description:"Automatically save approved plans to disk when plan mode completes",condition:"planModeEnabled"},type:"boolean",default:!1},"plan.autosaveDir":{ui:{tab:"tasks",group:"Modes",label:"Autosave Directory",description:"Directory for autosaved plans. Supports ~, absolute, and cwd-relative paths. Empty uses <project>/.omp/plans/.",condition:"planAutosaveEnabled"},type:"string"},"goal.enabled":{ui:{tab:"tasks",group:"Modes",label:"Goal Mode",description:"Enable per-session goal mode and the hidden goal tool"},type:"boolean",default:!0},"goal.statusInFooter":{ui:{tab:"tasks",group:"Modes",label:"Goal Status in Footer",description:"Show token budget alongside the goal indicator in the status line"},type:"boolean",default:!0},"goal.continuationModes":{ui:{tab:"tasks",group:"Modes",label:"Goal Continuation Modes",description:"Run modes where active goals may auto-continue between turns"},type:"array",default:["interactive"]},"title.refreshOnReplan":{ui:{tab:"tasks",group:"Modes",label:"Refresh Title on Replan",description:"Refresh generated session titles after todo init replans unless the title was set by the user"},type:"boolean",default:!0},"task.isolation.enabled":{ui:{tab:"tasks",group:"Isolation",label:"Isolate Subagents",description:"Run subagents in an isolated copy of the checkout and integrate their changes afterwards"},type:"boolean",default:!1},"isolation.backend":{ui:{tab:"tasks",group:"Isolation",label:"Isolation Backend",description:"Backend used for subagent isolation and worktree cloning",options:[{value:"auto",label:"Auto",description:"Let the PAL pick the best available backend"},{value:"apfs",label:"APFS",description:"macOS clonefile reflink (APFS)"},{value:"btrfs",label:"btrfs",description:"btrfs subvolume snapshot"},{value:"zfs",label:"ZFS",description:"ZFS snapshot + clone"},{value:"reflink",label:"Reflink",description:"Linux FICLONE per-file reflink"},{value:"overlayfs",label:"Overlayfs",description:"Linux kernel overlay (or fuse-overlayfs fallback)"},{value:"projfs",label:"ProjFS",description:"Windows Projected File System"},{value:"block-clone",label:"Block clone",description:"Windows FSCTL_DUPLICATE_EXTENTS_TO_FILE (NTFS/ReFS)"},{value:"rcopy",label:"Recursive copy",description:"git worktree if available, otherwise recursive copy"}]},type:"enum",default:"auto",values:["auto","apfs","btrfs","zfs","reflink","overlayfs","projfs","block-clone","rcopy"]},"worktree.clone":{ui:{tab:"tasks",group:"Isolation",label:"Clone Checkout into Worktrees",description:"New worktrees from `github pr_checkout` and `git worktree add` in bash start as a copy-on-write clone of the current checkout so ignored build artifacts (node_modules, target) carry over; falls back to a plain checkout when the filesystem cannot clone"},type:"boolean",default:!0},"worktree.cleanSource":{ui:{tab:"tasks",group:"Isolation",label:"Clean Source Checkout on /wt",description:"When creating a worktree with `/wt`, reset tracked changes and remove untracked files from the original checkout after carrying them over"},type:"boolean",default:!1},"task.isolation.apply":{ui:{tab:"tasks",group:"Isolation",label:"Apply Isolated Changes",description:"Automatically apply successful isolated task changes to the parent checkout; disable to retain patch or branch artifacts"},type:"boolean",default:!0},"task.isolation.merge":{ui:{tab:"tasks",group:"Isolation",label:"Isolation Merge Strategy",description:"How isolated task changes are integrated (patch apply or branch merge)",options:[{value:"patch",label:"Patch",description:"Combine diffs and git apply"},{value:"branch",label:"Branch",description:"Commit per task, merge with --no-ff"}]},type:"enum",default:"patch",values:["patch","branch"]},"task.isolation.commits":{ui:{tab:"tasks",group:"Isolation",label:"Isolation Commit Style",description:"Commit message style for nested repo changes (generic or AI-generated)",options:[{value:"generic",label:"Generic",description:"Static commit message"},{value:"ai",label:"AI",description:"AI-generated commit message from diff"}]},type:"enum",default:"generic",values:["generic","ai"]},"worktree.base":{ui:{tab:"tasks",group:"Isolation",label:"Worktree Base Directory",description:"Base directory for agent-managed worktrees — task-isolation copies, `github` PR checkouts, and `omp worktree` cleanup all live here. Unset uses ~/.omp/wt. Must be an absolute or ~-relative path; relative paths are ignored. The OMP_WORKTREE_DIR env var overrides this."},type:"string"},"task.eager":{ui:{tab:"tasks",group:"Subagents",label:"Prefer Task Delegation",description:"How strongly to push delegating work to subagents",options:[{value:"default",label:"Default",description:"Uses the selected model's policy; some models require an explicit delegation request"},{value:"preferred",label:"Preferred",description:"Adds delegation guidance to the system prompt"},{value:"always",label:"Always",description:"Prompt guidance plus a first-turn delegation reminder"}]},type:"enum",default:"default",values:["default","preferred","always"]},"task.batch":{ui:{tab:"tasks",group:"Subagents",label:"Batch Task Calls",description:"Switch the task tool to its batch shape: one call carries { context, tasks[] } — one subagent per item, with an optional per-item agent (defaulting to the session spawn-policy agent), per-item isolation, and a required shared context prepended to every assignment. With async.enabled=true, each spawn runs as an independent background agent with the normal idle/parked lifecycle; otherwise the call blocks for merged results. Disable to restore the flat single-spawn schema."},type:"boolean",default:!0},"task.enableEffort":{ui:{tab:"tasks",group:"Subagents",label:"Per-Task Effort",description:"Expose the optional effort parameter on task spawns, allowing callers to override each subagent's thinking level"},type:"boolean",default:!1},"task.maxConcurrency":{ui:{tab:"tasks",group:"Subagents",label:"Max Concurrent Tasks",description:"Maximum number of subagents running concurrently",options:[{value:"0",label:"Unlimited",description:""},{value:"1",label:"1 task",description:""},{value:"2",label:"2 tasks",description:""},{value:"4",label:"4 tasks",description:""},{value:"8",label:"8 tasks",description:""},{value:"16",label:"16 tasks",description:""},{value:"32",label:"32 tasks",description:""},{value:"64",label:"64 tasks",description:""}]},type:"number",default:32},"task.enableLsp":{ui:{tab:"tasks",group:"Subagents",label:"LSP in Subagents",description:"Allow subagents spawned via the task tool to use the lsp tool. Off by default to keep subagents cheap; enable when LSP-aware delegation is worth the extra tokens."},type:"boolean",default:!1},"task.maxRecursionDepth":{ui:{tab:"tasks",group:"Subagents",label:"Max Task Recursion",description:"How many levels deep subagents can spawn their own subagents",options:[{value:"-1",label:"Unlimited",description:""},{value:"0",label:"None",description:""},{value:"1",label:"Single",description:""},{value:"2",label:"Double",description:""},{value:"3",label:"Triple",description:""}]},type:"number",default:2},"task.maxRuntimeMs":{ui:{tab:"tasks",group:"Subagents",label:"Max Subagent Runtime",description:"Hard wall-clock limit per subagent (ms). 0 disables it. Defense-in-depth against provider-side stream hangs that escape the inference-layer watchdog; triggers a normal subagent abort with a 'timed out' reason.",options:[{value:"0",label:"Unlimited",description:"Default"},{value:"300000",label:"5 minutes",description:""},{value:"900000",label:"15 minutes",description:""},{value:"1800000",label:"30 minutes",description:""},{value:"3600000",label:"1 hour",description:""}]},type:"number",default:0},"task.agentIdleTtlMs":{ui:{tab:"tasks",group:"Subagents",label:"Agent Idle TTL",description:"How long an idle subagent stays live in memory before being parked to disk (ms). Parked agents are revived automatically when messaged or resumed. 0 keeps idle agents live until exit."},type:"number",default:420000},"task.softRequestBudget":{ui:{tab:"tasks",group:"Subagents",label:"Soft Subagent Request Budget",description:"Soft per-subagent request budget (assistant requests per run). Crossing it injects a wrap-up steering notice (see task.softRequestBudgetNotice); at 1.5x the budget the run is force-stopped and the agent must yield its partial findings. 0 disables the guard. Bundled scout/sonic agents cap out at a lower built-in budget, so a value below that cap still applies to them.",options:[{value:"0",label:"Disabled",description:""},{value:"90",label:"90 requests",description:""},{value:"150",label:"150 requests",description:""},{value:"200",label:"200 requests",description:"Default"}]},type:"number",default:200},"task.softRequestBudgetNotice":{ui:{tab:"tasks",group:"Subagents",label:"Soft Request Budget Notice",description:"Inject one steering notice when a subagent crosses its soft request budget, asking it to wrap up before the 1.5x forced-yield stop."},type:"boolean",default:!0},"task.maxEffort":{ui:{tab:"tasks",group:"Subagents",label:"Maximum Per-Spawn Effort",description:"Maximum reasoning effort allowed for the task tool's per-spawn effort hint. Lower values prevent callers from escalating subagents above this ceiling; the default preserves the model's full range.",options:[{value:"minimal",label:"min",description:"Very brief reasoning (~1k tokens)"},{value:"low",label:"low",description:"Light reasoning (~2k tokens)"},{value:"medium",label:"medium",description:"Moderate reasoning (~8k tokens)"},{value:"high",label:"high",description:"Deep reasoning (~16k tokens)"},{value:"xhigh",label:"xhigh",description:"Extended reasoning (~32k tokens)"},{value:"max",label:"max",description:"Maximum reasoning the model supports"}]},type:"enum",default:"max",values:["minimal","low","medium","high","xhigh","max"]},"task.prewalk":{ui:{tab:"tasks",group:"Subagents",label:"Generic Task Prewalk",description:"Arm prewalk for the bundled generic `task` subagent: it starts on its resolved model, plans and begins the implementation, then hands off to the 'smol' role at its first edit/write. Per-agent overrides (task.agentPrewalk, configured from the /agents hub) and user agent `prewalk` frontmatter apply regardless of this toggle."},type:"boolean",default:!1},"tasks.todoClearDelay":{ui:{tab:"tools",group:"Todos",label:"Todo Auto-Clear Delay",description:"Delay before completed or abandoned todos are removed from the todo widget",options:[{value:"0",label:"Instant",description:""},{value:"60",label:"1 minute",description:"Default"},{value:"300",label:"5 minutes",description:""},{value:"900",label:"15 minutes",description:""},{value:"1800",label:"30 minutes",description:""},{value:"3600",label:"1 hour",description:""},{value:"-1",label:"Never",description:""}]},type:"number",default:60},"task.showResolvedModelBadge":{ui:{tab:"appearance",group:"Display",label:"Show Resolved Model Badge",description:"Display the actual model ID used by each subagent in the task widget status line"},type:"boolean",default:!1},"skills.enableSkillCommands":{ui:{tab:"tasks",group:"Commands & Skills",label:"Skill Commands",description:"Register skills as /skill:name commands"},type:"boolean",default:!0},"commands.enableClaudeUser":{ui:{tab:"tasks",group:"Commands & Skills",label:"Claude User Commands",description:"Load commands from ~/.claude/commands/"},type:"boolean",default:!1},"commands.enableClaudeProject":{ui:{tab:"tasks",group:"Commands & Skills",label:"Claude Project Commands",description:"Load commands from .claude/commands/"},type:"boolean",default:!0},"commands.enableOpencodeUser":{ui:{tab:"tasks",group:"Commands & Skills",label:"OpenCode User Commands",description:"Load commands from ~/.config/opencode/commands/"},type:"boolean",default:!1},"commands.enableOpencodeProject":{ui:{tab:"tasks",group:"Commands & Skills",label:"OpenCode Project Commands",description:"Load commands from .opencode/commands/"},type:"boolean",default:!0},"secrets.enabled":{ui:{tab:"providers",group:"Privacy",label:"Hide Secrets",description:"Obfuscate configured secrets and redact credential-shaped tokens before sending to AI providers"},type:"boolean",default:!1},"providers.ollama-cloud.maxConcurrency":{ui:{tab:"providers",group:"Services",label:"Ollama Cloud Max Concurrency",description:"Maximum concurrent Ollama Cloud subagent runs per process; 0 disables the provider-specific limit"},type:"number",default:3},"providers.webSearchOrder":{ui:{tab:"providers",group:"Services",label:"Web Search Provider Order",description:"Prioritized providers for the web_search tool; unlisted providers retain their default order afterward",ordered:!0,options:[{value:"perplexity",label:"Perplexity",description:"Uses auth when configured; explicit selection falls back to anonymous search"},{value:"gemini",label:"Gemini",description:"Google Search grounding via Gemini (uses google-gemini-cli or google-antigravity OAuth)"},{value:"anthropic",label:"Anthropic",description:"Claude's native web_search tool (uses Anthropic OAuth or ANTHROPIC_API_KEY)"},{value:"codex",label:"OpenAI",description:"OpenAI's native web_search (uses ChatGPT OAuth via /login openai-codex)"},{value:"xai",label:"xAI",description:"Grok web search via xAI Responses API (uses SuperGrok/X Premium+ OAuth via /login xai-oauth, or XAI_API_KEY)"},{value:"zai",label:"Z.AI",description:"Calls Z.AI webSearchPrime MCP"},{value:"exa",label:"Exa",description:"API via /login exa or EXA_API_KEY; explicit keyless fallback via MCP"},{value:"tinyfish",label:"TinyFish",description:"Requires TINYFISH_API_KEY"},{value:"jina",label:"Jina",description:"Requires JINA_API_KEY"},{value:"kagi",label:"Kagi",description:"Requires KAGI_API_KEY and Kagi Search API beta access"},{value:"tavily",label:"Tavily",description:"Requires TAVILY_API_KEY"},{value:"firecrawl",label:"Firecrawl",description:"Uses Firecrawl API when FIRECRAWL_API_KEY is set; falls back to keyless mode"},{value:"brave",label:"Brave",description:"Requires BRAVE_API_KEY"},{value:"kimi",label:"Kimi",description:"Kimi Code search (requires a Kimi Code Console key via KIMI_SEARCH_API_KEY/MOONSHOT_SEARCH_API_KEY or /login kimi-code; not MOONSHOT_API_KEY)"},{value:"parallel",label:"Parallel",description:"API via /login parallel or PARALLEL_API_KEY; explicit keyless fallback via MCP"},{value:"synthetic",label:"Synthetic",description:"Requires SYNTHETIC_API_KEY"},{value:"ollama",label:"Ollama",description:"Requires OLLAMA_CLOUD_API_KEY"},{value:"searxng",label:"SearXNG",description:"Requires SEARXNG_ENDPOINT or searxng.endpoint"},{value:"startpage",label:"Startpage",description:"Credential-free scrape of Startpage (Google-backed) results; may be bot-challenged"},{value:"duckduckgo",label:"DuckDuckGo",description:"Credential-free best-effort fallback; may be bot-challenged on datacenter/shared-egress IPs"},{value:"ecosia",label:"Ecosia",description:"Credential-free browser-backed scrape of Ecosia (Google-backed) results"},{value:"google",label:"Google",description:"Credential-free browser-backed fallback; slower and may be bot-challenged"},{value:"mojeek",label:"Mojeek",description:"Credential-free browser-backed scrape of Mojeek's independent index"},{value:"public",label:"Public Web",description:"Queries every credential-free engine in parallel and consolidates deduplicated results"}]},type:"array",default:[]},"providers.webSearchExclude":{ui:{tab:"providers",group:"Services",label:"Excluded Web Search Providers",description:"Providers that web_search should never use, even as fallbacks",options:[{value:"perplexity",label:"Perplexity",description:"Uses auth when configured; explicit selection falls back to anonymous search"},{value:"gemini",label:"Gemini",description:"Google Search grounding via Gemini (uses google-gemini-cli or google-antigravity OAuth)"},{value:"anthropic",label:"Anthropic",description:"Claude's native web_search tool (uses Anthropic OAuth or ANTHROPIC_API_KEY)"},{value:"codex",label:"OpenAI",description:"OpenAI's native web_search (uses ChatGPT OAuth via /login openai-codex)"},{value:"xai",label:"xAI",description:"Grok web search via xAI Responses API (uses SuperGrok/X Premium+ OAuth via /login xai-oauth, or XAI_API_KEY)"},{value:"zai",label:"Z.AI",description:"Calls Z.AI webSearchPrime MCP"},{value:"exa",label:"Exa",description:"API via /login exa or EXA_API_KEY; explicit keyless fallback via MCP"},{value:"tinyfish",label:"TinyFish",description:"Requires TINYFISH_API_KEY"},{value:"jina",label:"Jina",description:"Requires JINA_API_KEY"},{value:"kagi",label:"Kagi",description:"Requires KAGI_API_KEY and Kagi Search API beta access"},{value:"tavily",label:"Tavily",description:"Requires TAVILY_API_KEY"},{value:"firecrawl",label:"Firecrawl",description:"Uses Firecrawl API when FIRECRAWL_API_KEY is set; falls back to keyless mode"},{value:"brave",label:"Brave",description:"Requires BRAVE_API_KEY"},{value:"kimi",label:"Kimi",description:"Kimi Code search (requires a Kimi Code Console key via KIMI_SEARCH_API_KEY/MOONSHOT_SEARCH_API_KEY or /login kimi-code; not MOONSHOT_API_KEY)"},{value:"parallel",label:"Parallel",description:"API via /login parallel or PARALLEL_API_KEY; explicit keyless fallback via MCP"},{value:"synthetic",label:"Synthetic",description:"Requires SYNTHETIC_API_KEY"},{value:"ollama",label:"Ollama",description:"Requires OLLAMA_CLOUD_API_KEY"},{value:"searxng",label:"SearXNG",description:"Requires SEARXNG_ENDPOINT or searxng.endpoint"},{value:"startpage",label:"Startpage",description:"Credential-free scrape of Startpage (Google-backed) results; may be bot-challenged"},{value:"duckduckgo",label:"DuckDuckGo",description:"Credential-free best-effort fallback; may be bot-challenged on datacenter/shared-egress IPs"},{value:"ecosia",label:"Ecosia",description:"Credential-free browser-backed scrape of Ecosia (Google-backed) results"},{value:"google",label:"Google",description:"Credential-free browser-backed fallback; slower and may be bot-challenged"},{value:"mojeek",label:"Mojeek",description:"Credential-free browser-backed scrape of Mojeek's independent index"},{value:"public",label:"Public Web",description:"Queries every credential-free engine in parallel and consolidates deduplicated results"}]},type:"array",default:[]},"providers.webSearchTimeoutSeconds":{ui:{tab:"providers",group:"Services",label:"Web Search Timeout",description:"Hard timeout for each provider's search transport before web_search advances to the next fallback, in seconds (maximum 300)",options:[{value:"30",label:"30 seconds",description:""},{value:"60",label:"1 minute",description:""},{value:"120",label:"2 minutes",description:""},{value:"180",label:"3 minutes",description:""},{value:"300",label:"5 minutes",description:""}]},type:"number",default:60},"providers.webSearchGeminiModel":{ui:{tab:"providers",group:"Services",label:"Gemini web_search model",description:"Model ID for Gemini Google Search grounding. Defaults to gemini-2.5-flash."},type:"string"},"providers.antigravityEndpoint":{ui:{tab:"providers",group:"Services",label:"Antigravity Endpoint Mode",description:"Endpoint routing strategy for google-antigravity providers (chat, search, image, discovery)",options:[{value:"auto",label:"Auto",description:"Try production endpoint, fail over to sandbox on 5xx/429"},{value:"production",label:"Production Only",description:"Force production endpoint only"},{value:"sandbox",label:"Sandbox Only",description:"Force sandbox endpoint only"}]},type:"enum",default:"auto",values:["auto","production","sandbox"]},"providers.imageOrder":{ui:{tab:"providers",group:"Services",label:"Image Provider Order",description:"Prioritized providers for image generation; unlisted providers follow the active session provider and the built-in order",ordered:!0,options:[{value:"openai",label:"OpenAI",description:"OPENAI_API_KEY (gpt-image-2) or active GPT model; falls back to a connected Codex subscription"},{value:"openai-codex",label:"OpenAI Codex (ChatGPT)",description:"Uses a connected Codex / ChatGPT subscription — no OPENAI_API_KEY needed"},{value:"antigravity",label:"Antigravity",description:"Requires google-antigravity OAuth"},{value:"xai",label:"xAI Grok Imagine",description:"Requires xAI Grok OAuth or XAI_API_KEY"},{value:"gemini",label:"Gemini",description:"Requires GEMINI_API_KEY"},{value:"openrouter",label:"OpenRouter",description:"Requires OPENROUTER_API_KEY"},{value:"deepinfra",label:"DeepInfra",description:"Requires DEEPINFRA_API_KEY"}]},type:"array",default:[]},"providers.fireworksTier":{ui:{tab:"providers",group:"Fireworks",label:"Fireworks Tier",description:'Serving path for Fireworks requests. Priority sends `service_tier: "priority"` for higher reliability during peak traffic at a higher price; Standard omits it. Fast (`-fast`) models ignore this — Fast is its own serving path.',options:[{value:"standard",label:"Standard",description:"Default serving path (no service_tier)"},{value:"priority",label:"Priority",description:"Priority serving path: higher reliability, premium per-token pricing"}]},type:"enum",default:"standard",values:["standard","priority"]},"live.voice":{ui:{tab:"providers",group:"Services",label:"Live Voice",description:"Voice used by Codex-backed realtime voice sessions",options:[{value:"arbor",label:"Arbor",description:""},{value:"breeze",label:"Breeze",description:""},{value:"cove",label:"Cove",description:""},{value:"ember",label:"Ember",description:""},{value:"juniper",label:"Juniper",description:""},{value:"maple",label:"Maple",description:""},{value:"sol",label:"Sol",description:""},{value:"spruce",label:"Spruce",description:""},{value:"vale",label:"Vale",description:""}]},type:"enum",default:"sol",values:["arbor","breeze","cove","ember","juniper","maple","sol","spruce","vale"]},"providers.tts":{ui:{tab:"providers",group:"Services",label:"Text-to-Speech Provider",description:"Backend for the tts tool: local on-device neural TTS (Kokoro-82M), xAI Grok Voice, or DeepInfra speech",options:[{value:"auto",label:"Auto",description:"Prefer local on-device TTS; route .mp3 output to xAI when credentials exist"},{value:"local",label:"Local",description:"On-device neural TTS (Kokoro-82M); output is WAV/PCM16"},{value:"xai",label:"xAI Grok Voice",description:"Requires xAI Grok OAuth or XAI_API_KEY; MP3 or WAV"},{value:"deepinfra",label:"DeepInfra Speech",description:"Requires DEEPINFRA_API_KEY; MP3 or WAV"}]},type:"enum",default:"auto",values:["auto","local","xai","deepinfra"]},"tts.localModel":{ui:{tab:"providers",group:"Services",label:"Local TTS Model",description:"On-device neural TTS model (Kokoro-82M) used by the local TTS backend",options:[{value:"kokoro",label:"Kokoro-82M",description:"Kokoro-82M neural TTS — SoTA on-device quality, multi-voice, fully local"}]},type:"enum",default:"kokoro",values:["kokoro"]},"tts.localVoice":{ui:{tab:"providers",group:"Services",label:"Local TTS Voice",description:"Kokoro voice used by the local TTS backend (American/British, female/male)",options:[{value:"af_heart",label:"Heart (American female)",description:""},{value:"af_bella",label:"Bella (American female)",description:""},{value:"af_nicole",label:"Nicole (American female)",description:""},{value:"af_aoede",label:"Aoede (American female)",description:""},{value:"af_kore",label:"Kore (American female)",description:""},{value:"af_sarah",label:"Sarah (American female)",description:""},{value:"am_michael",label:"Michael (American male)",description:""},{value:"am_fenrir",label:"Fenrir (American male)",description:""},{value:"am_puck",label:"Puck (American male)",description:""},{value:"bf_emma",label:"Emma (British female)",description:""},{value:"bm_george",label:"George (British male)",description:""},{value:"bm_fable",label:"Fable (British male)",description:""}]},type:"enum",default:"af_heart",values:["af_heart","af_bella","af_nicole","af_aoede","af_kore","af_sarah","am_michael","am_fenrir","am_puck","bf_emma","bm_george","bm_fable"]},"speech.enabled":{ui:{tab:"providers",group:"Services",label:"Speech Vocalization",description:"Speak the assistant's output aloud through the speakers as it streams"},type:"boolean",default:!1},"speech.mode":{ui:{tab:"providers",group:"Services",label:"Speech Vocalization Mode",description:"What to speak: all = assistant messages + thinking; assistant = messages only; yield = only the final message at turn end",options:[{value:"all",label:"All (messages + thinking)",description:""},{value:"assistant",label:"Assistant messages",description:""},{value:"yield",label:"Final message only",description:""}]},type:"enum",default:"assistant",values:["all","assistant","yield"]},"speech.enhanced":{ui:{tab:"providers",group:"Services",label:"Enhanced Speech Rewriting",description:"Rewrite assistant output into natural spoken prose with the tiny/smol model before synthesis (describes code, drops links and markdown). Falls back to mechanical cleanup on failure"},type:"boolean",default:!1},"speech.voice":{ui:{tab:"providers",group:"Services",label:"Speech Vocalization Voice",description:"Kokoro voice used when speaking the assistant's output aloud",options:[{value:"af_heart",label:"Heart (American female)",description:""},{value:"af_bella",label:"Bella (American female)",description:""},{value:"af_nicole",label:"Nicole (American female)",description:""},{value:"af_aoede",label:"Aoede (American female)",description:""},{value:"af_kore",label:"Kore (American female)",description:""},{value:"af_sarah",label:"Sarah (American female)",description:""},{value:"am_michael",label:"Michael (American male)",description:""},{value:"am_fenrir",label:"Fenrir (American male)",description:""},{value:"am_puck",label:"Puck (American male)",description:""},{value:"bf_emma",label:"Emma (British female)",description:""},{value:"bm_george",label:"George (British male)",description:""},{value:"bm_fable",label:"Fable (British male)",description:""}]},type:"enum",default:"af_heart",values:["af_heart","af_bella","af_nicole","af_aoede","af_kore","af_sarah","am_michael","am_fenrir","am_puck","bf_emma","bm_george","bm_fable"]},"providers.tinyModel":{ui:{tab:"providers",group:"Tiny Model",label:"Tiny Model",description:"Session-title model: online (the TINY role from /models, else @smol) by default, or a local on-device model",options:[{value:"online",label:"Online (TINY role, else @smol)",description:"Online title generation: the TINY model role (set one in /models) when assigned, otherwise the online fallback (commit role, then @smol). No local download or on-device inference."},{value:"lfm2.5-230m",label:"LFM2.5 230M",description:"Recommended local model; fastest LFM2.5 option, about 214 MB cached."},{value:"lfm2.5-350m",label:"LFM2.5 350M",description:"Larger LFM2.5 option, about 292 MB cached; tends toward terse titles."},{value:"falcon-h1-90m",label:"Falcon H1 Tiny 90M",description:"Smallest option, about 147 MB cached; lower fidelity on complex prompts."}]},type:"enum",default:"online",values:["online","lfm2.5-230m","lfm2.5-350m","falcon-h1-90m"]},"providers.tinyModelDevice":{ui:{tab:"providers",group:"Tiny Model",label:"Tiny Model Device",description:"Inference backend for local tiny models (titles + memory): an ONNX execution provider, or `mlx` to download MLX weights and run them through mlx-lm on Apple silicon. Default uses CPU-only ONNX. The PI_TINY_DEVICE env var overrides this.",options:[{value:"default",label:"Default",description:"CPU-only inference"},{value:"gpu",label:"GPU",description:"Accelerated provider (WebGPU/Metal, CUDA, or DirectML)"},{value:"cpu",label:"CPU",description:"CPU-only inference"},{value:"mlx",label:"MLX",description:"Apple silicon GPU via mlx-lm (Python subprocess; macOS arm64)"},{value:"metal",label:"Metal",description:"Alias for MLX"},{value:"webgpu",label:"WebGPU",description:"WebGPU/Metal backend"},{value:"cuda",label:"CUDA",description:"NVIDIA CUDA (Linux x64)"},{value:"dml",label:"DirectML",description:"DirectML backend (Windows)"},{value:"coreml",label:"CoreML",description:"Apple CoreML (opt-in; can fail to load)"},{value:"auto",label:"Auto",description:"Let ONNX Runtime choose a provider"},{value:"wasm",label:"WASM",description:"WebAssembly backend"},{value:"webnn",label:"WebNN",description:"WebNN backend"},{value:"webnn-gpu",label:"WebNN GPU",description:"WebNN GPU device"},{value:"webnn-cpu",label:"WebNN CPU",description:"WebNN CPU device"},{value:"webnn-npu",label:"WebNN NPU",description:"WebNN NPU device"}]},type:"enum",default:"default",values:["default","gpu","cpu","mlx","metal","webgpu","cuda","dml","coreml","auto","wasm","webnn","webnn-gpu","webnn-cpu","webnn-npu"]},"providers.tinyModelDtype":{ui:{tab:"providers",group:"Tiny Model",label:"Tiny Model Precision",description:"ONNX quantization/precision for local tiny models. Default uses each model's shipped dtype (q4); lower precision is faster, higher is more faithful. Ignored by the MLX backend (its repos are pre-quantized 4-bit). The PI_TINY_DTYPE env var overrides this.",options:[{value:"default",label:"Default",description:"Each model's shipped dtype (currently q4)"},{value:"q4",label:"q4",description:"4-bit weights; smallest and fastest"},{value:"q4f16",label:"q4f16",description:"4-bit weights with fp16 activations"},{value:"q8",label:"q8",description:"8-bit quantization"},{value:"fp16",label:"fp16",description:"16-bit float; higher fidelity, larger"},{value:"fp32",label:"fp32",description:"Full precision; largest and slowest"},{value:"int8",label:"int8",description:"Signed 8-bit integer"},{value:"uint8",label:"uint8",description:"Unsigned 8-bit integer"},{value:"bnb4",label:"bnb4",description:"bitsandbytes 4-bit"},{value:"q2",label:"q2",description:"2-bit weights"},{value:"q2f16",label:"q2f16",description:"2-bit weights with fp16 activations"},{value:"q1",label:"q1",description:"1-bit weights"},{value:"q1f16",label:"q1f16",description:"1-bit weights with fp16 activations"},{value:"auto",label:"Auto",description:"Let transformers.js choose per device"}]},type:"enum",default:"default",values:["default","q4","q4f16","q8","fp16","fp32","int8","uint8","bnb4","q2","q2f16","q1","q1f16","auto"]},"providers.memoryModel":{ui:{tab:"memory",group:"General",label:"Memory Model",description:"Mnemopi LLM for fact extraction + consolidation: online (the TINY role from /models, else smol/remote) by default, or a local on-device model",condition:"mnemopiActive",options:[{value:"online",label:"Online (TINY role, else @smol)",description:"Use the online model: the TINY role from /models when set, otherwise @smol. No local model download or on-device inference."},{value:"qwen3-1.7b",label:"Qwen3 1.7B",description:"MLX only (providers.tinyModelDevice=mlx): onnxruntime-node cannot run this ONNX export's RotaryEmbedding cache updates."},{value:"llama3.2:3b",label:"Llama 3.2 3B",description:"Larger Llama 3.2 option for local memory/classifier tasks; higher quality potential at higher disk/RAM/latency cost."},{value:"gemma-3-1b",label:"Gemma 3 1B",description:"Best consolidation/dedup; lighter footprint, but leaks small talk during extraction."},{value:"qwen2.5-1.5b",label:"Qwen2.5 1.5B",description:"Best extraction granularity (atomic facts); weaker consolidation."},{value:"lfm2-1.2b",label:"LFM2 1.2B",description:"Fastest load; solid all-rounder, slightly noisier extraction labels."}]},type:"enum",default:"online",values:["online","qwen3-1.7b","llama3.2:3b","gemma-3-1b","qwen2.5-1.5b","lfm2-1.2b"]},"providers.autoThinkingModel":{ui:{tab:"model",group:"Thinking",label:"Auto Thinking Model",description:"Difficulty classifier for the `auto` thinking level: online (the TINY role from /models, else smol) by default, or a local on-device model",condition:"autoThinkingActive",options:[{value:"online",label:"Online (TINY role, else @smol)",description:"Classify prompt difficulty online with the TINY role model (set one in /models) or @smol; no local download or on-device inference."},{value:"qwen3-1.7b",label:"Qwen3 1.7B",description:"MLX only (providers.tinyModelDevice=mlx): onnxruntime-node cannot run this ONNX export's RotaryEmbedding cache updates."},{value:"llama3.2:3b",label:"Llama 3.2 3B",description:"Larger Llama 3.2 option for local memory/classifier tasks; higher quality potential at higher disk/RAM/latency cost."},{value:"gemma-3-1b",label:"Gemma 3 1B",description:"Best consolidation/dedup; lighter footprint, but leaks small talk during extraction."},{value:"qwen2.5-1.5b",label:"Qwen2.5 1.5B",description:"Best extraction granularity (atomic facts); weaker consolidation."},{value:"lfm2-1.2b",label:"LFM2 1.2B",description:"Fastest load; solid all-rounder, slightly noisier extraction labels."}]},type:"enum",default:"online",values:["online","qwen3-1.7b","llama3.2:3b","gemma-3-1b","qwen2.5-1.5b","lfm2-1.2b"]},"providers.autoThinkingMaxEffort":{ui:{tab:"model",group:"Thinking",label:"Auto Thinking Ceiling",description:"Highest effort the `auto` classifier may resolve. `xhigh` keeps the classifier one tier below the top, so only an explicit `ultrathink` reaches `max`; `max` lets a turn the classifier judges exceptional bill the top tier on models that expose it.",condition:"autoThinkingActive",options:[{value:"xhigh",label:"xhigh",description:"Classifier stops at xhigh (default)"},{value:"max",label:"max",description:"Classifier may resolve max where the model supports it"}]},type:"enum",default:"xhigh",values:["xhigh","max"]},"features.unexpectedStopDetection":{ui:{tab:"interaction",group:"Agent",label:"Unexpected Stops",description:"Automatically recover when the assistant stops without a visible message. Smart also classifies text-only stops with a small model.",options:[{value:"none",label:"None",description:"Disabled"},{value:"mechanical",label:"Mechanical",description:"Retry stops with no visible assistant message; tool calls are excluded (default)"},{value:"smart",label:"Smart",description:"Mechanical + small-model classification of text-only stops"}]},type:"enum",default:"mechanical",values:["none","mechanical","smart"]},"providers.unexpectedStopModel":{ui:{tab:"providers",group:"Tiny Model",label:"Unexpected Stop Model",description:"Classifier for Smart unexpected-stop detection: online (the TINY role from /models, else smol) by default, or a local on-device model.",condition:"unexpectedStopSmart",options:[{value:"online",label:"Online (TINY role, else @smol)",description:"Use the online model: the TINY role from /models when set, otherwise @smol. No local model download or on-device inference."},{value:"qwen3-1.7b",label:"Qwen3 1.7B",description:"MLX only (providers.tinyModelDevice=mlx): onnxruntime-node cannot run this ONNX export's RotaryEmbedding cache updates."},{value:"llama3.2:3b",label:"Llama 3.2 3B",description:"Larger Llama 3.2 option for local memory/classifier tasks; higher quality potential at higher disk/RAM/latency cost."},{value:"gemma-3-1b",label:"Gemma 3 1B",description:"Best consolidation/dedup; lighter footprint, but leaks small talk during extraction."},{value:"qwen2.5-1.5b",label:"Qwen2.5 1.5B",description:"Best extraction granularity (atomic facts); weaker consolidation."},{value:"lfm2-1.2b",label:"LFM2 1.2B",description:"Fastest load; solid all-rounder, slightly noisier extraction labels."}]},type:"enum",default:"online",values:["online","qwen3-1.7b","llama3.2:3b","gemma-3-1b","qwen2.5-1.5b","lfm2-1.2b"]},"providers.kimiApiFormat":{ui:{tab:"providers",group:"Protocol",label:"Kimi API Format",description:"API format for Kimi Code provider (auto follows live model metadata)",options:[{value:"auto",label:"Auto",description:"Use the model's server-declared protocol"},{value:"openai",label:"OpenAI",description:"api.kimi.com"},{value:"anthropic",label:"Anthropic",description:"api.moonshot.ai"}]},type:"enum",default:"auto",values:["auto","openai","anthropic"]},"providers.openaiWebsockets":{ui:{tab:"providers",group:"Protocol",label:"OpenAI WebSockets",description:"Websocket policy for OpenAI Codex models (auto uses model defaults, on forces, off disables)",options:[{value:"auto",label:"Auto",description:"Use model/provider default websocket behavior"},{value:"off",label:"Off",description:"Disable websockets for OpenAI Codex models"},{value:"on",label:"On",description:"Force websockets for OpenAI Codex models"}]},type:"enum",default:"auto",values:["auto","off","on"]},"providers.cacheRetention":{ui:{tab:"providers",group:"Protocol",label:"Prompt Cache Retention",description:"Prompt-cache retention forwarded to providers that support it (Anthropic, Bedrock, OpenRouter, OpenAI)",options:[{value:"auto",label:"Auto",description:"Provider default — Anthropic OAuth subscriber sessions default to 1h, API keys use 5m kept warm by idle keep-alive refreshes; PI_CACHE_RETENTION still applies"},{value:"short",label:"Short (5m)",description:"Cheapest cache writes; Anthropic keeps the entry warm with bounded keep-alive refreshes while idle"},{value:"long",label:"Long (1h)",description:"1h TTL where the provider supports it; pricier writes, no keep-alive refresh requests"},{value:"none",label:"Off",description:"Disable prompt caching and cache-affinity routing"}]},type:"enum",default:"auto",values:["auto","short","long","none"]},"providers.streamFirstEventTimeoutSeconds":{ui:{tab:"providers",group:"Timeouts",label:"Stream First Event Timeout",description:"Seconds to wait for the first model stream event; -1 uses provider/env defaults, 0 disables the watchdog",options:[{value:"-1",label:"Auto",description:"Use provider defaults and PI_* timeout env vars"},{value:"0",label:"Off",description:"Disable first-event timeout"},{value:"300",label:"5 minutes",description:""},{value:"600",label:"10 minutes",description:""},{value:"1800",label:"30 minutes",description:""}]},type:"number",default:-1},"providers.streamIdleTimeoutSeconds":{ui:{tab:"providers",group:"Timeouts",label:"Stream Idle Timeout",description:"Seconds a model stream may stay silent between events; -1 uses provider/env defaults, 0 disables the watchdog",options:[{value:"-1",label:"Auto",description:"Use provider defaults and PI_* timeout env vars"},{value:"0",label:"Off",description:"Disable idle timeout"},{value:"300",label:"5 minutes",description:""},{value:"600",label:"10 minutes",description:""},{value:"1800",label:"30 minutes",description:""}]},type:"number",default:-1},"providers.openrouterVariant":{ui:{tab:"providers",group:"Protocol",label:"OpenRouter Routing",description:"Default routing-variant suffix appended to OpenRouter model IDs (overridden when the selector already names a variant)",options:[{value:"default",label:"Default",description:"No suffix; use OpenRouter's default routing"},{value:"nitro",label:":nitro",description:"Prioritize throughput / lowest latency"},{value:"floor",label:":floor",description:"Prioritize cheapest available provider"},{value:"online",label:":online",description:"Enable OpenRouter's web-search plugin"},{value:"exacto",label:":exacto",description:"Cherry-picked high-quality providers (only defined for select models)"}]},type:"enum",default:"default",values:["default","nitro","floor","online","exacto"]},"providers.fetch":{ui:{tab:"providers",group:"Services",label:"Fetch Provider",description:"Reader backend priority for the fetch/read URL tool",options:[{value:"auto",label:"Auto",description:"Priority: native > trafilatura > lynx > parallel > firecrawl > jina"},{value:"native",label:"Native",description:"In-process HTML→Markdown converter (always available)"},{value:"trafilatura",label:"Trafilatura",description:"Auto-installs via uv/pip"},{value:"lynx",label:"Lynx",description:"Requires lynx system package"},{value:"parallel",label:"Parallel",description:"Requires PARALLEL_API_KEY"},{value:"firecrawl",label:"Firecrawl",description:"Requires FIRECRAWL_API_KEY"},{value:"jina",label:"Jina",description:"Uses r.jina.ai reader (JINA_API_KEY optional)"}]},type:"enum",default:"auto",values:["auto","native","trafilatura","lynx","parallel","firecrawl","jina"]},"codexResets.autoRedeem":{ui:{tab:"providers",group:"Services",label:"Codex Auto-Redeem Saved Resets",description:"Spend saved Codex rate-limit resets automatically: restore an account blocked by an exhausted 5h or weekly window when a turn is stuck and no other account can take over, and salvage credits that are about to expire. unset asks before the first spend, yes spends without prompting, and no disables both checks.",options:[{value:"unset",label:"Unset",description:"Check eligibility, then ask before spending the first saved reset."},{value:"yes",label:"Yes",description:"Spend eligible saved resets without prompting."},{value:"no",label:"No",description:"Do not run the saved-reset auto-redeem check."}]},type:"enum",default:"unset",values:["unset","yes","no"]},"codexResets.minBlockedMinutes":{ui:{tab:"providers",group:"Services",label:"Codex Auto-Redeem Min Block",description:"Only auto-redeem when the natural unblock — the latest reset among the exhausted 5h/weekly windows — is at least this many minutes away (don't spend a scarce credit to save a short wait). Raise it (e.g. 360) to ignore 5h-only blocks."},type:"number",default:60},"codexResets.keepCredits":{ui:{tab:"providers",group:"Services",label:"Codex Auto-Redeem Reserve",description:"Never auto-spend below this many saved resets (0 = the last credit may be spent automatically). Credits about to expire are exempt — a reserved credit that expires preserves nothing."},type:"number",default:0},"codexResets.salvageHorizonHours":{ui:{tab:"providers",group:"Services",label:"Codex Reset Salvage Horizon",description:"Spend a saved Codex reset automatically when it would otherwise expire within this many hours and either chat window (5h or weekly) has meaningful usage to restore (0 disables expiry salvage)."},type:"number",default:12},"provider.appendOnlyContext":{ui:{tab:"providers",group:"Protocol",label:"Append-Only Context",description:"Cache system prompt + tool specs and keep an append-only message log so provider prefix caches (DeepSeek, Xiaomi/SGLang, Anthropic) hit at maximum rate. Auto enables for known prefix-cache providers.",options:[{value:"auto",label:"Auto",description:"Enable for known prefix-cache providers (recommended)"},{value:"on",label:"On",description:"Always enable append-only context"},{value:"off",label:"Off",description:"Disable append-only context"}]},type:"enum",default:"auto",values:["auto","on","off"]},"exa.enabled":{ui:{tab:"providers",group:"Services",label:"Exa",description:"Enable the Exa web search provider"},type:"boolean",default:!0},"exa.searchDelayMs":{ui:{tab:"providers",group:"Services",label:"Exa Search Delay",description:"Minimum delay between Exa web search requests in milliseconds; set 0 to disable pacing"},type:"number",default:1000},"searxng.endpoint":{ui:{tab:"providers",group:"Services",label:"SearXNG Endpoint",description:"Base URL of a self-hosted SearXNG instance used for web search"},type:"string"},"extensionHandlers.toolCallTimeoutMs":{ui:{tab:"tools",group:"Extensions",label:"Tool Call Handler Timeout (ms)",description:"Positive finite active-work timeout for extension tool_call handlers; invalid values use 30000ms, and time awaiting OMP-owned dialogs does not count"},type:"number",default:30000},"dev.autoqa":{ui:{tab:"tools",group:"Developer",label:"Auto QA",description:"Automated tool issue reporting (xd://report_issue). On by default; the first report asks for consent, and denying it disables reporting until re-enabled explicitly"},type:"boolean",default:!0},"dev.autoqaPush.endpoint":{ui:{tab:"tools",group:"Developer",label:"Auto QA Push Endpoint",description:"Full URL receiving Auto QA JSON reports (default https://qa.omp.sh/v1/grievances)"},type:"string",default:"https://qa.omp.sh/v1/grievances"}}}});var FIe;var BIe=R(()=>{FIe={"retry.enabled":{type:"boolean",default:!0,ui:{tab:"model",group:"Retry & Fallback",label:"Retry Enabled",description:"Retry transient provider errors (rate limits, outages, quota walls)."}},"retry.baseDelayMs":{type:"number",default:500,ui:{tab:"model",group:"Retry & Fallback",label:"Retry Base Delay (ms)",description:"Initial backoff before the first retry."}},"thinkingBudgets.minimal":{type:"number",default:1024,ui:{tab:"model",group:"Thinking",label:"Minimal Thinking Budget",description:"Token budget for the minimal thinking level."}},"thinkingBudgets.low":{type:"number",default:2048,ui:{tab:"model",group:"Thinking",label:"Low Thinking Budget",description:"Token budget for the low thinking level."}},"thinkingBudgets.medium":{type:"number",default:8192,ui:{tab:"model",group:"Thinking",label:"Medium Thinking Budget",description:"Token budget for the medium thinking level."}},"thinkingBudgets.high":{type:"number",default:16384,ui:{tab:"model",group:"Thinking",label:"High Thinking Budget",description:"Token budget for the high thinking level."}},"thinkingBudgets.xhigh":{type:"number",default:32768,ui:{tab:"model",group:"Thinking",label:"XHigh Thinking Budget",description:"Token budget for the xhigh thinking level."}},"thinkingBudgets.max":{type:"number",default:32768,ui:{tab:"model",group:"Thinking",label:"Max Thinking Budget",description:"Token budget for the max thinking level."}},modelTags:{type:"record",default:{},ui:{tab:"model",group:"Prompt",label:"Model Tags",description:"Custom role/tag metadata; can introduce additional roles. JSON record."}},modelProviderOrder:{type:"array",default:[],ui:{tab:"model",group:"Prompt",label:"Model Provider Order",description:"Preferred provider order when a model id is ambiguous. JSON array."}},cycleOrder:{type:"array",default:["smol","default","slow"],ui:{tab:"model",group:"Prompt",label:"Model Cycle Order",description:"Roles cycled by the model switcher. JSON array."}},enabledModels:{type:"array",default:[],ui:{tab:"model",group:"Prompt",label:"Enabled Models",description:"Allow-list of models; supports path-scoped entries. Empty means all available models. JSON array."}},"task.agentServiceTierOverrides":{type:"record",default:{},ui:{tab:"model",group:"Sampling",label:"Agent Service Tier Overrides",description:"Sparse exact-name service-tier overrides for agents spawned by task/eval dispatch. JSON record."}},"compaction.reserveTokens":{type:"number",ui:{tab:"context",group:"Compaction",label:"Compaction Reserve Tokens",description:"Absolute reserve floor. Unset = larger of 16384 and 15% of the context window."}},"compaction.keepRecentTokens":{type:"number",default:20000,ui:{tab:"context",group:"Compaction",label:"Keep Recent Tokens",description:"Recent tokens always preserved through compaction."}},"compaction.autoContinue":{type:"boolean",default:!0,ui:{tab:"context",group:"Compaction",label:"Auto-Continue",description:"Continue automatically after compaction."}},"autolearn.minToolCalls":{type:"number",default:5,ui:{tab:"memory",group:"Auto-Learn",label:"Min Tool Calls",description:"Only nudge after a turn that used at least this many tools.",condition:"autolearnActive"}},shellPath:{type:"string",ui:{tab:"shell",group:"Bash",label:"Shell Path",description:"Override the shell binary used by bash."}},"bash.autoBackground.thresholdMs":{type:"number",default:60000,ui:{tab:"shell",group:"Bash",label:"Auto-Background Threshold (ms)",description:"Threshold before auto-backgrounding long-running commands."}},"task.agentAdvisor":{type:"record",default:{},ui:{tab:"tasks",group:"Subagents",label:"Agent Advisor Overrides",description:'Per-agent subagent advisor: agent name → "on" / "off" / advisor model pattern. JSON record.'}},enabledProviders:{type:"array",default:[],ui:{tab:"providers",group:"Services",label:"Enabled Providers",description:"Foreign user-level discovery sources to load; supports path-scoped entries. JSON array."}},disabledProviders:{type:"array",default:[],ui:{tab:"providers",group:"Services",label:"Disabled Providers",description:"Disabled model/discovery providers; supports path-scoped entries. JSON array."}}}});function kf(e,t){return e[t]?.value}function zIe(e,t){switch(e){case void 0:return!0;case"advisorEnabled":return kf(t,"advisor.enabled")===!0;case"vimModeEnabled":return kf(t,"tui.vimMode")===!0;case"hindsightActive":return kf(t,"memory.backend")==="hindsight";case"mnemopiActive":return kf(t,"memory.backend")==="mnemopi";case"autolearnActive":return kf(t,"autolearn.enabled")===!0;case"autoThinkingActive":return kf(t,"defaultThinkingLevel")==="auto";case"usageAwareFallbackEnabled":return kf(t,"retry.usageAwareFallback")===!0;case"planModeEnabled":return kf(t,"plan.enabled")===!0;case"planAutosaveEnabled":return kf(t,"plan.enabled")===!0&&kf(t,"plan.autosave")===!0;case"unexpectedStopSmart":return kf(t,"features.unexpectedStopDetection")==="smart";case"macOS":case"hasImageProtocol":return!0;default:return!0}}function jIe(e){return Object.entries(XC).filter(([,t])=>t.ui.tab===e)}function qIe(e,t,n){if(!n)return!0;return e.toLowerCase().includes(n)||t.ui.label.toLowerCase().includes(n)||t.ui.description.toLowerCase().includes(n)}var JO,XC;var Pne=R(()=>{DIe();BIe();JO=OIe,XC={...JO.entries,...FIe}});function GIe({entryKey:e,entry:t,value:n,initialValue:r,onChangeDirty:a,onCommit:i,saving:s,saveError:o}){let[l,u]=le(()=>{if(n===void 0||n===null)return"";return Array.isArray(n)||typeof n==="object"?JSON.stringify(n):String(n)}),d=De(!1),p=De(r),m=ft(()=>Array.isArray(t.ui.options)?t.ui.options:null,[t.ui.options]);Ke(()=>{let x=n===void 0||n===null?"":Array.isArray(n)||typeof n==="object"?JSON.stringify(n):String(n);u(x),d.current=!1},[n]);let f=()=>{let x=p.current,_=x===void 0||x===null?"":Array.isArray(x)||typeof x==="object"?JSON.stringify(x):String(x);u(_),d.current=!1,a(e,!1,()=>{})},g=(x)=>{let _=l;u(typeof x==="string"?x:JSON.stringify(x)),d.current=!1,i(e,x).then((S)=>{if(S)a(e,!1,()=>{});else u(_),a(e,!0,f)}).catch(()=>{u(_),a(e,!0,f)})},b=()=>{if(!d.current)return;if(t.type==="number"){let x=WIe(l);if(x===null||x===n){f();return}g(x);return}if(t.type==="string"){let x=l.trim();if(x===n){f();return}g(x);return}if(t.type==="array"){let x=Sin(l);if(x===null||UIe(x,n)){f();return}g(x);return}if(t.type==="record"){let x=Tin(l);if(x===null||UIe(x,n)){f();return}g(x)}},y=()=>{let x=d.current;if(d.current=!0,!x)a(e,!0,f)};if(t.type==="boolean"){let x=n===!0;return h("button",{type:"button",role:"switch","aria-checked":x,"aria-label":t.ui.label,onClick:()=>{a(e,!1,()=>{}),g(!x)},disabled:s,className:`relative h-5 w-9 shrink-0 rounded-full transition-colors cursor-pointer ${x?"bg-ink":"bg-ink/15"} ${s?"opacity-50":""}`,children:h("span",{className:`absolute top-0.5 h-4 w-4 rounded-full bg-paper shadow-sm transition-all ${x?"left-[18px]":"left-0.5"}`})})}if(t.type==="array"&&t.ui.ordered&&m){let x=Array.isArray(n)?n.filter((w)=>typeof w==="string"):[],_=(w)=>{g(x.includes(w)?x.filter((C)=>C!==w):[...x,w])},S=(w,C)=>{let T=w+C;if(T<0||T>=x.length)return;let A=[...x],[I]=A.splice(w,1);A.splice(T,0,I),g(A)};return h("div",{className:"flex flex-wrap items-center gap-1.5 justify-end max-w-72",children:[x.map((w,C)=>{let T=m.find((A)=>A.value===w);return h("span",{className:"inline-flex items-center gap-1 rounded-md border border-ink/15 bg-ink/[0.03] px-2 py-0.5 text-[10px] text-ink",children:[C>0&&h("button",{type:"button","aria-label":`${T?.label??w} left`,onClick:()=>S(C,-1),className:"text-ink/40 hover:text-ink cursor-pointer",disabled:s,children:"←"}),T?.label??w,C<x.length-1&&h("button",{type:"button","aria-label":`${T?.label??w} right`,onClick:()=>S(C,1),className:"text-ink/40 hover:text-ink cursor-pointer",disabled:s,children:"→"}),h("button",{type:"button","aria-label":`Remove ${T?.label??w}`,onClick:()=>_(w),className:"text-ink/40 hover:text-error cursor-pointer",disabled:s,children:h(Ln,{size:10})})]},w)}),x.length===0&&h("span",{className:"text-[10px] text-ink/40",children:"empty"}),h("details",{className:"relative",children:[h("summary",{className:"cursor-pointer rounded-md border border-ink/15 px-2 py-0.5 text-[10px] text-ink/70 hover:text-ink select-none",children:"add…"}),h("div",{className:"absolute right-0 top-full z-10 mt-1 max-h-44 w-48 overflow-auto rounded-md border border-ink/15 bg-paper p-1 shadow-lg",children:[m.filter((w)=>!x.includes(w.value)).map((w)=>h("button",{type:"button",onClick:()=>_(w.value),className:"block w-full rounded px-2 py-1 text-left text-[11px] text-ink/80 hover:bg-ink/5",children:w.label||w.value},w.value)),m.every((w)=>x.includes(w.value))&&h("div",{className:"px-2 py-1 text-[10px] text-ink/40",children:"all selected"})]})]})]})}let v=m??(t.type==="enum"&&t.values?t.values.map((x)=>({value:x,label:x,description:""})):null);if(v){let x=n===void 0||n===null?"":String(n);return h("div",{className:"flex items-center gap-2 shrink-0",children:h("select",{"aria-label":t.ui.label,value:x,onChange:(_)=>{let S=_.currentTarget.value;if(t.type==="number"){let w=WIe(S);if(w===null||w===n)return;g(w)}else{if(S===n)return;g(S)}},disabled:s,className:`bg-paper border border-ink/15 rounded-md px-2 py-1 text-ink max-w-56 ${s?"opacity-50":""}`,children:[x===""&&h("option",{value:"",disabled:!0,children:"select…"}),v.map((_)=>h("option",{value:_.value,children:_.label||_.value},_.value))]})})}if(t.type==="array")return h("input",{"aria-label":t.ui.label,type:"text",value:l,onChange:(x)=>{u(x.currentTarget.value),y()},onBlur:b,disabled:s,placeholder:'["anthropic","openai"]',className:`w-48 bg-paper border border-ink/15 rounded-md px-2 py-1 text-ink text-right font-mono text-[11px] ${s?"opacity-50":""}`});if(t.type==="record")return h("input",{"aria-label":t.ui.label,type:"text",value:l,onChange:(x)=>{u(x.currentTarget.value),y()},onBlur:b,disabled:s,placeholder:'{"bash":"prompt"}',className:`w-48 bg-paper border border-ink/15 rounded-md px-2 py-1 text-ink text-right font-mono text-[11px] ${s?"opacity-50":""}`});if(t.type==="number")return h("input",{"aria-label":t.ui.label,type:"text",inputMode:"decimal",value:l,onChange:(x)=>{u(x.currentTarget.value),y()},onBlur:b,disabled:s,className:`w-28 bg-paper border border-ink/15 rounded-md px-2 py-1 text-ink text-right font-mono text-[11px] ${s?"opacity-50":""}`});return h("input",{"aria-label":t.ui.label,type:t.credential?"password":"text",value:l,onChange:(x)=>{u(x.currentTarget.value),y()},onBlur:b,disabled:s,className:`w-48 bg-paper border border-ink/15 rounded-md px-2 py-1 text-ink text-right font-mono text-[11px] ${s?"opacity-50":""} ${o?"border-error":""}`})}var UIe=(e,t)=>JSON.stringify(e)===JSON.stringify(t),WIe=(e)=>{let t=e.trim();if(t===""||t==="-"||t==="+")return null;let n=Number(t);return Number.isFinite(n)?n:null},Sin=(e)=>{let t=e.trim();if(t==="")return[];try{let n=JSON.parse(t);return Array.isArray(n)?n:null}catch{return null}},Tin=(e)=>{let t=e.trim();if(t==="")return{};try{let n=JSON.parse(t);return typeof n==="object"&&n!==null&&!Array.isArray(n)?n:null}catch{return null}};var HIe=R(()=>{lt();bt();fe()});function ZIe({tabs:e,entries:t,activeTabId:n,onSelectTab:r,searchQuery:a,dirtyKeys:i,savingKeys:s,saveErrors:o,onCommit:l,onReset:u,onDirty:d}){let p=e.find((g)=>g.id===n)??e[0],m=ft(()=>{let g=a.trim().toLowerCase();if(g)return Object.entries(XC).filter(([b,y])=>qIe(b,y,g)).map(([b])=>b).slice(0,80);return jIe(p.id).filter(([,b])=>zIe(b.ui.condition,t)).map(([b])=>b)},[t,p.id,a]),f=ft(()=>{if(!a.trim())return[];let g=[],b=new Map;for(let y of m){let v=XC[y],x=e.find((w)=>w.id===v?.ui.tab),_=`${v?.ui.tab??"?"}\x00${v?.ui.group??""}`,S=b.get(_);if(!S)S={label:v?.ui.group?`${x?.label??v?.ui.tab} · ${v.ui.group}`:x?.label??v?.ui.tab??"Other",keys:[]},b.set(_,S),g.push({id:_,...S});S.keys.push(y)}return g},[m,a,e]);return h("div",{className:"w-full flex flex-col gap-3 text-xs",children:[h("div",{className:"flex items-center gap-1 overflow-x-auto pb-1 scrollbar-overlay-container scrollbar-overlay-static",children:e.map((g)=>h("button",{type:"button",onClick:()=>r(g.id),className:`shrink-0 rounded-md px-2.5 py-1 text-[11px] font-medium transition-colors cursor-pointer ${g.id===p.id?"bg-ink/10 text-ink":"text-ink/55 hover:bg-ink/5 hover:text-ink"}`,children:g.label},g.id))}),h("div",{className:"w-full rounded-lg border border-ink/10 divide-y divide-ink/5",children:[a.trim()?f.map((g)=>h(VIe,{keys:g.keys,entries:t,groupLabel:g.label,dirtyKeys:i,savingKeys:s,saveErrors:o,onCommit:l,onReset:u,onDirty:d},g.id)):p.groups.map((g)=>{let b=m.filter((y)=>XC[y]?.ui.group===g);if(b.length===0)return null;return h(VIe,{keys:b,entries:t,groupLabel:g,dirtyKeys:i,savingKeys:s,saveErrors:o,onCommit:l,onReset:u,onDirty:d},g)}),m.length===0&&h("div",{className:"px-3 py-6 text-center text-ink/40",children:a.trim()?"No settings match your search.":"No settings in this tab."})]})]})}function VIe({keys:e,entries:t,groupLabel:n,dirtyKeys:r,savingKeys:a,saveErrors:i,onCommit:s,onReset:o,onDirty:l}){return h("div",{children:[h("div",{className:"px-3 py-1.5 bg-ink/[0.02] text-[10px] uppercase tracking-wide text-ink/40 font-medium",children:n}),e.map((u)=>{let d=XC[u];if(!d?.ui)return null;let p=t[u]?.value,m=r.has(u),f=a.has(u),g=i.has(u);return h("div",{className:"flex items-center justify-between gap-3 px-3 py-2",children:[h("div",{className:"min-w-0 flex-1",children:[h("div",{className:"flex items-center gap-1.5",children:[h("span",{className:"font-medium text-ink",children:d.ui.label}),h("span",{className:"font-mono text-[9px] text-ink/30",title:"config key",children:u}),m&&!f&&h("span",{className:"shrink-0 rounded bg-warning/15 px-1 py-px text-[9px] font-semibold text-warning",children:"unsaved"}),f&&h("span",{className:"shrink-0 text-[9px] text-ink/40",children:"saving…"}),g&&!f&&h("span",{className:"shrink-0 rounded bg-error/10 px-1 py-px text-[9px] font-semibold text-error",children:"save failed"})]}),d.ui.description&&h("div",{className:"text-[10px] text-ink/40 leading-snug",children:d.ui.description}),d.ui.warning&&h("div",{className:"text-[10px] text-error/80 leading-snug",children:d.ui.warning})]}),h("div",{className:"flex items-center gap-1.5 shrink-0",children:[h(GIe,{entryKey:u,entry:d,value:p,initialValue:p,onChangeDirty:l,onCommit:s,saving:f,saveError:g}),h("button",{type:"button","aria-label":`Reset ${d.ui.label}`,title:"Reset to schema default",onClick:()=>o(u),disabled:f,className:`rounded p-1 text-ink/30 hover:text-ink transition-colors cursor-pointer disabled:opacity-40 ${f?"":"hover:bg-ink/5"}`,children:h(qc,{size:11})}),m&&h(zt,{size:11,className:"text-ink/30"})]})]},u)})]})}var YIe=R(()=>{lt();bt();Pne();HIe();fe()});function KIe({modelRoles:e,onSaveRole:t,savedRole:n}){let[r,a]=le(()=>({...e})),i=(s,o)=>{let l=o.trim();if((e[s]??"")===l)return;let u={...r};if(l)u[s]=l;else delete u[s];a(u),t(s,l)};return h("div",{className:"pt-2",children:[h("div",{className:"flex items-center justify-between pb-2",children:[h("div",{children:[h("h3",{className:"text-sm font-semibold text-ink",children:"Model Roles"}),h("p",{className:"text-ink/50 mt-0.5",children:"Role → model selectors from config.yml. Empty removes the role override."})]}),n&&h("span",{className:"inline-flex items-center gap-1 text-[10px] text-ink/60",children:[h(zt,{size:11})," saved"]})]}),h("div",{className:"rounded-lg border border-ink/10 divide-y divide-ink/5",children:Ain.map((s)=>h("div",{className:"flex items-center justify-between gap-3 px-3 py-2.5",children:[h("div",{className:"font-medium text-ink capitalize",children:s}),h("input",{"aria-label":`${s} model`,type:"text",value:r[s]??"",onChange:(o)=>a((l)=>({...l,[s]:o.currentTarget.value})),onBlur:(o)=>i(s,o.currentTarget.value),placeholder:"provider/model",className:"w-56 bg-paper border border-ink/15 rounded-md px-2 py-1 text-ink text-right font-mono"})]},s))})]})}var Ain;var XIe=R(()=>{lt();bt();fe();Ain=["default","smol","slow","vision","plan","commit","tiny","task","advisor"]});function QIe({extensions:e,savedExtension:t,onToggle:n}){if(e.length===0)return null;return h("div",{className:"pt-2",children:[h("div",{className:"flex items-center justify-between pb-2",children:[h("div",{children:[h("h3",{className:"text-sm font-semibold text-ink",children:"Extensions"}),h("p",{className:"text-ink/50 mt-0.5",children:"TS/JS modules loaded from .omp/extensions. Disable writes to config.yml."})]}),t&&h("span",{className:"inline-flex items-center gap-1 text-[10px] text-ink/60",children:[h(zt,{size:11})," saved"]})]}),h("div",{className:"rounded-lg border border-ink/10 divide-y divide-ink/5",children:e.map((r)=>h("div",{className:"flex items-center justify-between gap-3 px-3 py-2.5",children:[h("div",{className:"min-w-0",children:[h("div",{className:"font-medium text-ink",children:r.name}),h("div",{className:"text-[10px] text-ink/40 truncate font-mono",children:[r.sourceRoot," · ",r.filePath]})]}),h("select",{"aria-label":`${r.name} enabled`,value:r.disabled?"false":"true",onChange:()=>n(r),className:"bg-paper border border-ink/15 rounded-md px-2 py-1 text-ink",children:[h("option",{value:"true",children:"enabled"}),h("option",{value:"false",children:"disabled"})]})]},r.id))})]})}var JIe=R(()=>{bt();fe()});function eNe(e){let[t,n]=le(null),[r,a]=le(!1),[i,s]=le({}),[o,l]=le({}),[u,d]=le([]),[p,m]=le(!0),[f,g]=le(JO.tabs[0]?.id??"model"),[b,y]=le(""),[v,x]=le(null),[_,S]=le(new Set),[w,C]=le(new Set),[T,A]=le(new Set),I=Ze(()=>{m(!0),Promise.all([fetch("/api/omp/state").then((B)=>B.json()),fetch("/api/settings/omp-config").then((B)=>B.json()),fetch("/api/model-roles").then((B)=>B.json()),fetch("/api/omp/extensions").then((B)=>B.json())]).then(([B,F,j,q])=>{if(B.running&&B.state)n(B.state);if(a(Boolean(B.running)),F.entries)s(F.entries);if(j.roles&&typeof j.roles==="object")l(j.roles);if(Array.isArray(q.extensions))d(q.extensions)}).catch((B)=>console.error("Failed to load omp settings:",B)).finally(()=>m(!1))},[]);Ke(()=>{I()},[I]);let O=(B)=>{x(B),setTimeout(()=>x((F)=>F===B?null:F),2000)},D=(B,F,j)=>{if(C((q)=>{let W=new Set(q);return W.delete(B),W}),S((q)=>{let W=new Set(q);return W.delete(B),W}),F){if(A((q)=>{let W=new Set(q);return W.delete(B),W}),j!==void 0)s((q)=>({...q,[B]:{...q[B],value:j}}));O(B)}else A((q)=>new Set(q).add(B))},N=Ze(async(B,F)=>{C((j)=>new Set(j).add(B)),S((j)=>{let q=new Set(j);return q.delete(B),q});try{let q=await(await fetch("/api/settings/omp-config",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({key:B,value:F})})).json(),W=Boolean(q.success);return D(B,W,q.value),W}catch(j){return console.error("Failed to save omp config:",j),D(B,!1),!1}},[]),E=Ze(async(B)=>{C((F)=>new Set(F).add(B));try{let j=await(await fetch("/api/settings/omp-config",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({key:B,action:"reset"})})).json(),q=Boolean(j.success);return D(B,q,j.value),q}catch(F){return console.error("Failed to reset omp config:",F),D(B,!1),!1}},[]),L=Ze((B,F)=>{S((j)=>{let q=new Set(j);if(F)q.add(B);else q.delete(B);return q})},[]),M=(B,F)=>{let j={...o};if(F.trim())j[B]=F.trim();else delete j[B];l(j),fetch("/api/model-roles",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({roles:j})}).then((q)=>q.json()).then((q)=>{if(q.success)O(`role-${B}`)}).catch((q)=>console.error("Failed to save model roles:",q))},P=(B)=>{fetch("/api/omp/extensions",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:B.id,disabled:!B.disabled})}).then((F)=>F.json()).then((F)=>{if(F.success)d((j)=>j.map((q)=>q.id===B.id?{...q,disabled:!B.disabled}:q)),O(`ext-${B.id}`)}).catch((F)=>console.error("Failed to toggle extension:",F))};if(p)return h("div",{className:"flex items-center justify-center p-8 text-ink/40 text-xs",children:"Loading OMP settings..."});return h("div",{className:"w-full space-y-4 text-ink pb-2 text-xs",children:[h("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-3 pb-3 border-b border-ink/10",children:[h("div",{children:[h("h2",{className:"text-sm font-semibold text-ink",children:"OMP Engine"}),h("p",{className:"text-ink/50 mt-0.5",children:"Live agent state and the full native config schema from oh-my-pi."})]}),h("div",{className:"flex items-center gap-2",children:[h("div",{className:"relative",children:[h(ia,{size:12,className:"absolute left-2 top-1/2 -translate-y-1/2 text-ink/40 pointer-events-none"}),h("input",{"aria-label":"Search settings",type:"text",value:b,onChange:(B)=>y(B.currentTarget.value),placeholder:"Search settings…",className:"w-44 bg-paper border border-ink/15 rounded-md pl-6 pr-6 py-1 text-ink placeholder:text-ink/40"}),b&&h("button",{type:"button","aria-label":"Clear search",onClick:()=>y(""),className:"absolute right-1.5 top-1/2 -translate-y-1/2 text-ink/40 hover:text-ink cursor-pointer",children:h(Ln,{size:11})})]}),h("button",{type:"button",onClick:I,className:"flex items-center gap-1.5 px-2.5 py-1.5 rounded-lg border border-ink/15 text-ink/70 hover:text-ink hover:bg-ink/5 transition-all cursor-pointer",children:[h(Ur,{size:12})," Refresh"]})]})]}),h("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-2",children:[h("div",{className:"rounded-lg border border-ink/10 bg-ink/[0.03] px-3 py-2",children:[h("div",{className:"text-[10px] uppercase tracking-wide text-ink/40",children:"Engine"}),h("div",{className:"font-semibold text-ink mt-0.5",children:r?"Running":"Idle"})]}),h("div",{className:"rounded-lg border border-ink/10 bg-ink/[0.03] px-3 py-2",children:[h("div",{className:"text-[10px] uppercase tracking-wide text-ink/40",children:"Model"}),h("div",{className:"font-semibold text-ink mt-0.5 truncate",children:t?.model?.id??"—"})]}),h("div",{className:"rounded-lg border border-ink/10 bg-ink/[0.03] px-3 py-2",children:[h("div",{className:"text-[10px] uppercase tracking-wide text-ink/40",children:"Thinking"}),h("div",{className:"font-semibold text-ink mt-0.5",children:t?.thinkingLevel??"—"})]}),h("div",{className:"rounded-lg border border-ink/10 bg-ink/[0.03] px-3 py-2",children:[h("div",{className:"text-[10px] uppercase tracking-wide text-ink/40",children:"Context"}),h("div",{className:"font-semibold text-ink mt-0.5",children:t?.contextUsage?.percent!=null?`${t.contextUsage.percent.toFixed(1)}%`:"—"})]})]}),h("div",{className:"pt-1",children:[h("div",{className:"flex items-center justify-between pb-2",children:[h("div",{children:[h("h3",{className:"text-sm font-semibold text-ink",children:"Config"}),h("p",{className:"text-ink/50 mt-0.5",children:["Schema-driven settings backed by ",h("span",{className:"font-mono",children:"omp config"}),".",b.trim()&&" — matching keys only"]})]}),v&&!v.startsWith("role-")&&!v.startsWith("ext-")&&h("span",{className:"inline-flex items-center gap-1 text-[10px] text-ink/60",children:["saved ",v]})]}),h(ZIe,{tabs:JO.tabs,entries:i,activeTabId:f,onSelectTab:g,searchQuery:b,dirtyKeys:_,savingKeys:w,saveErrors:T,onCommit:N,onReset:E,onDirty:L})]}),h(KIe,{modelRoles:o,onSaveRole:M,savedRole:v?.startsWith("role-")?v.slice(5):null}),h(QIe,{extensions:u,savedExtension:v?.startsWith("ext-")?v.slice(4):null,onToggle:P})]})}var tNe=R(()=>{lt();bt();Pne();YIe();XIe();JIe();fe()});function Pi({value:e,label:t,hint:n,tone:r="default",variant:a="metric",className:i=""}){if(a==="compact")return h("div",{className:"bg-canvas border border-ink/10 rounded-lg px-2.5 py-1.5 flex flex-col gap-0.5 flex-1 min-w-0",children:[h("span",{className:"text-[10px] font-medium text-ink/50",children:t}),h("span",{className:"text-xs font-semibold font-mono text-ink truncate",children:e})]});return h("div",{className:`${r==="muted"?"bg-ink/5 border-ink/10":"bg-paper border-ink/15"} border rounded-lg p-3 shadow-xs flex flex-col justify-between h-full min-w-0 ${i}`,children:[h("div",{className:"min-w-0",children:[h("div",{className:"text-base font-bold tracking-tight text-ink leading-tight tabular-nums break-normal",children:e}),h("div",{className:"text-[11px] font-semibold text-ink/75 mt-1.5 leading-snug min-h-[30px] flex items-start",children:h("span",{className:"min-w-0 break-normal",children:t})})]}),n&&h("div",{className:"text-[10px] text-ink/50 mt-1.5 leading-tight break-words",children:n})]})}var QC=R(()=>{fe()});function nNe({activeMetrics:e}){return h("div",{className:"grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-5 gap-2.5 items-stretch",children:[h(Pi,{value:e.processedTokens,label:"Processed tokens",hint:e.activeRate}),h(Pi,{value:e.cachedInput,label:"Cached input",hint:e.cachedPercent}),h(Pi,{value:e.uncachedInput,label:"Uncached input",hint:"0 cache writes"}),h(Pi,{value:e.outputTokens,label:"Output",hint:e.reasoning}),h(Pi,{value:e.cacheSavings,label:"Cache savings",hint:"0.0x the raw token cost",tone:"muted",className:"col-span-2 sm:col-span-1"})]})}var rNe=R(()=>{QC();fe()});function iNe({breakdownTab:e,setBreakdownTab:t,activeBreakdownRows:n,activeMetrics:r,cadence:a}){return h("div",{className:"grid grid-cols-1 xl:grid-cols-3 gap-3",children:[h("div",{className:"bg-paper border border-ink/15 rounded-lg p-3.5 shadow-xs xl:col-span-2",children:[h("div",{className:"flex justify-between items-center mb-3",children:[h("span",{className:"font-semibold text-xs text-ink",children:"Breakdown"}),h("div",{className:"flex bg-ink/5 rounded p-0.5",children:[h("button",{onClick:()=>t("model"),className:`px-2 py-0.5 rounded text-[9px] font-bold tracking-wider transition-colors ${e==="model"?"bg-paper shadow-xs text-ink":"text-ink/50 hover:text-ink"}`,children:"MODEL"}),h("button",{onClick:()=>t("day"),className:`px-2 py-0.5 rounded text-[9px] font-bold tracking-wider transition-colors ${e==="day"?"bg-paper shadow-xs text-ink":"text-ink/50 hover:text-ink"}`,children:aNe[a]}),h("button",{onClick:()=>t("project"),className:`px-2 py-0.5 rounded text-[9px] font-bold tracking-wider transition-colors ${e==="project"?"bg-paper shadow-xs text-ink":"text-ink/50 hover:text-ink"}`,children:"PROJECT"})]})]}),h("div",{className:"overflow-x-auto",children:h("table",{className:"w-full text-[11px]",children:[h("thead",{children:h("tr",{className:"text-ink/40 border-b border-ink/10",children:[h("th",{className:"font-medium text-left pb-2 capitalize",children:e==="day"?aNe[a].toLowerCase():e}),h("th",{className:"font-medium text-right pb-2",children:"Cost"}),h("th",{className:"font-medium text-right pb-2",children:"Share"}),h("th",{className:"font-medium text-right pb-2",children:"Tokens"})]})}),h("tbody",{className:"divide-y divide-ink/5",children:n.map((i)=>h("tr",{children:[h("td",{className:"py-2.5 flex items-center gap-2",children:[h("div",{className:`w-1.5 h-1.5 rounded-full ${i.dotColorClass}`}),h("span",{className:"font-semibold text-ink whitespace-nowrap",children:i.name})]}),h("td",{className:"py-2.5 text-right font-bold text-ink",children:i.cost}),h("td",{className:"py-2.5 text-right text-ink/60",children:i.share}),h("td",{className:"py-2.5 text-right text-ink/60",children:i.tokens})]},i.name))})]})}),h("div",{className:"h-1.5 w-full bg-ink/5 rounded-full mt-3 overflow-hidden flex",children:n.map((i,s)=>h("div",{className:`h-full ${s===0?"bg-ink/80":s===1?"bg-ink/45 border-l border-paper":"bg-ink/20 border-l border-paper"}`,style:{width:`${i.sharePercent}%`}},i.name))})]}),h("div",{className:"bg-paper border border-ink/15 rounded-lg p-3.5 shadow-xs xl:col-span-1",children:[h("div",{className:"font-semibold text-xs mb-3 text-ink",children:"Cost quality"}),h("div",{className:"space-y-2 text-[11px]",children:[h("div",{className:"flex justify-between items-center",children:[h("span",{className:"text-ink/60",children:"Provider reported"}),h("span",{className:"font-semibold text-ink",children:"100.0%"})]}),h("div",{className:"flex justify-between items-center",children:[h("span",{className:"text-ink/60",children:"Model priced"}),h("span",{className:"font-semibold text-ink",children:"0.0%"})]}),h("div",{className:"flex justify-between items-center",children:[h("span",{className:"text-ink/60",children:"Unpriced"}),h("span",{className:"font-semibold text-ink",children:"0.0%"})]})]}),h("div",{className:"border-t border-ink/10 mt-3 pt-2.5",children:h("div",{className:"flex justify-between items-center text-[11px]",children:[h("span",{className:"text-ink/60",children:"Cache savings"}),h("span",{className:"font-semibold text-ink",children:r.cacheSavings})]})})]})]})}var aNe;var sNe=R(()=>{fe();aNe={daily:"DAY",weekly:"WEEK",monthly:"MONTH"}});function Ein(e,t,n){if(e.length===0)return"";if(e.length===1)return"M0,98 L100,98";let r=n>0?n:1;return e.map((a,i)=>{let s=i/(e.length-1)*100,o=98-t[i]/r*94;return`${i===0?"M":"L"}${s.toFixed(2)},${o.toFixed(2)}`}).join(" ")}function oNe({cadence:e,metric:t,series:n}){let r=n.map((p)=>t==="cost"?p.cost:p.tokens),a=r.length>0?Math.max(...r):0,i=Ein(n,r,a),s=t==="cost"?p9(a)||"$0.00":Kd(a)??"0",o=t==="cost"?p9(a/2)||"$0.00":Kd(a/2)??"0",l=n[0]?.label??"",u=n.length>2?n[Math.floor(n.length/2)]?.label??"":"",d=n.length>1?n[n.length-1]?.label??"":"";if(n.length===0)return h("div",{className:"h-28 flex items-center justify-center text-[11px] text-ink/40",children:"No usage data in this period"});return h("div",{className:"h-28 relative",children:[h("div",{className:"absolute inset-0 flex flex-col justify-between pt-1 pb-4",children:[h("div",{className:"border-t border-ink/5 w-full border-dashed"}),h("div",{className:"border-t border-ink/5 w-full border-dashed"}),h("div",{className:"border-t border-ink/15 w-full"})]}),h("div",{className:"absolute left-0 top-0 bottom-4 flex flex-col justify-between text-[9px] font-mono text-ink/40 w-9",children:[h("span",{children:s}),h("span",{children:o}),h("span",{children:"0"})]}),h("div",{className:"absolute left-10 right-0 bottom-4 top-0 flex items-end",children:h("svg",{className:"w-full h-full",preserveAspectRatio:"none",viewBox:"0 0 100 100",children:h("path",{d:i,fill:"none",stroke:"currentColor",className:"text-ink/60 transition-all duration-300",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}),h("div",{className:"absolute left-10 right-0 bottom-0 h-4 flex justify-between text-[9px] text-ink/40 items-end",children:[h("span",{children:l}),u&&h("span",{children:u}),h("span",{children:d})]}),h("span",{className:"sr-only",children:`${e} ${t} trend`})]})}var lNe=R(()=>{fe()});function cNe({settings:e,onUpdate:t}){let[n,r]=le("daily"),[a,i]=le("30d"),[s,o]=le(!1),[l,u]=le("cost"),[d,p]=le("model"),[m,f]=le(!1),g=new Date().toISOString().slice(0,10),b=new Date(Date.now()-2592000000).toISOString().slice(0,10),[y,v]=le(b),[x,_]=le(g),[S,w]=le([]),[C,T]=le(null),[A,I]=le([]),[O,D]=le([]),N=De(null);Gr(N,()=>o(!1));let E=Ze(()=>{f(!0);let B=a==="custom"?`&customFrom=${y}&customTo=${x}`:"";fetch(`/api/telemetry/tokens?timeRange=${a}&breakdownTab=${d}&cadence=${n}${B}`).then((F)=>F.json()).then((F)=>{if(F.timeRanges)w(F.timeRanges);if(F.metrics)T(F.metrics);if(F.breakdownRows)I(F.breakdownRows);if(F.chartSeries)D(F.chartSeries)}).catch((F)=>console.error("Failed to load token telemetry:",F)).finally(()=>f(!1))},[a,d,n,y,x]);Ke(()=>{E()},[E]);let L=()=>{E()},M=S.find((B)=>B.id===a)||S[0]||{id:a,label:a,dateRange:"Current Period"},P=a==="custom"?`${y} to ${x}`:M.dateRange;if(!C)return h("div",{className:"flex items-center justify-center p-8 text-ink/40 text-xs",children:"Loading token usage telemetry..."});return h("div",{className:"w-full space-y-4 text-ink pb-2 text-xs",children:[h("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-3 pb-3 border-b border-ink/10",children:[h("div",{className:"flex items-center gap-2",children:h("span",{className:"text-xs font-semibold text-ink/75",children:P})}),h("div",{className:"flex flex-wrap items-center gap-2",children:[h("div",{className:"flex items-center bg-paper border border-ink/15 rounded-md text-[11px] font-medium overflow-hidden",children:[h("button",{onClick:()=>r("daily"),className:`px-2.5 py-1 transition-colors ${n==="daily"?"bg-ink/10 text-ink font-semibold":"text-ink/65 hover:bg-ink/5 hover:text-ink"}`,children:"Daily"}),h("button",{onClick:()=>r("weekly"),className:`px-2.5 py-1 transition-colors ${n==="weekly"?"bg-ink/10 text-ink font-semibold":"text-ink/65 hover:bg-ink/5 hover:text-ink"}`,children:"Weekly"}),h("button",{onClick:()=>r("monthly"),className:`px-2.5 py-1 transition-colors ${n==="monthly"?"bg-ink/10 text-ink font-semibold":"text-ink/65 hover:bg-ink/5 hover:text-ink"}`,children:"Monthly"})]}),h("div",{className:"relative",ref:N,children:[h("button",{onClick:()=>o(!s),className:"flex items-center gap-1.5 px-2.5 py-1 bg-paper border border-ink/15 rounded-md text-[11px] font-medium hover:bg-ink/5 text-ink/80 transition-colors",children:[h("span",{children:M.label}),h(Vn,{size:12,className:`transition-transform duration-150 ${s?"rotate-180":""}`})]}),s&&h("div",{className:"absolute right-0 top-full mt-1 w-44 bg-paper border border-ink/15 rounded-md shadow-lg z-30 py-1 text-[11px] divide-y divide-ink/5",children:[S.map((B)=>h("button",{onClick:()=>{if(i(B.id),B.id!=="custom")o(!1)},className:`w-full flex items-center justify-between px-3 py-1.5 text-left hover:bg-ink/5 transition-colors ${a===B.id?"font-semibold text-ink bg-ink/5":"text-ink/70"}`,children:[h("span",{children:B.label}),a===B.id&&h(zt,{size:12,className:"text-ink"})]},B.id)),a==="custom"&&h("div",{className:"px-3 py-2 space-y-2",children:[h("label",{className:"block",children:[h("span",{className:"text-[9px] font-mono uppercase tracking-wider text-ink/40",children:"From"}),h("input",{type:"date",value:y,max:x,onChange:(B)=>v(B.currentTarget.value),className:"mt-0.5 w-full bg-paper border border-ink/15 rounded px-1.5 py-1 text-[11px] text-ink focus:outline-none focus:border-ink/40"})]}),h("label",{className:"block",children:[h("span",{className:"text-[9px] font-mono uppercase tracking-wider text-ink/40",children:"To"}),h("input",{type:"date",value:x,min:y,max:g,onChange:(B)=>_(B.currentTarget.value),className:"mt-0.5 w-full bg-paper border border-ink/15 rounded px-1.5 py-1 text-[11px] text-ink focus:outline-none focus:border-ink/40"})]}),h("button",{onClick:()=>o(!1),className:"w-full bg-ink/10 hover:bg-ink/20 text-ink font-semibold rounded px-2 py-1 transition-colors",children:"Apply"})]})]})]}),h("button",{onClick:L,className:"p-1.5 bg-paper border border-ink/15 rounded-md hover:bg-ink/5 text-ink/80 transition-colors",title:"Refresh Token Telemetry",children:h(Ur,{size:12,className:m?"animate-spin text-ink":""})})]})]}),h("div",{className:"grid grid-cols-1 xl:grid-cols-2 gap-3",children:[h("div",{className:"bg-paper border border-ink/15 rounded-lg p-3.5 shadow-xs flex flex-col justify-between",children:[h("div",{children:[h("div",{className:"text-[10px] font-mono font-semibold text-ink/40 tracking-wider uppercase mb-2",children:"USAGECONFIG.RAWTOKENCOST"}),h("div",{className:"flex items-baseline gap-1 mb-0.5",children:[h("span",{className:"text-2xl font-bold tracking-tight text-ink",children:C.rawCost}),h("span",{className:"text-xs font-semibold text-ink/50",children:"*"})]}),h("p",{className:"text-[11px] text-ink/50 mb-4",children:"* if billed at full API rate"})]}),h("div",{children:[h("div",{className:"h-1.5 w-full bg-ink/10 rounded-full mb-2 overflow-hidden flex",children:h("div",{className:"h-full bg-ink/80 rounded-full",style:{width:"100%"}})}),h("div",{className:"flex items-center justify-between text-[11px]",children:[h("div",{className:"flex items-center gap-1.5",children:[h("div",{className:"w-2 h-2 rounded-full bg-ink/80"}),h("span",{className:"font-semibold text-ink",children:"DeepSeek"})]}),h("div",{className:"flex items-center gap-3 text-ink/70",children:[h("span",{className:"font-bold text-ink",children:C.rawCost}),h("span",{children:"100.0% share"}),h("span",{children:C.processedTokens})]})]})]})]}),h("div",{className:"bg-paper border border-ink/15 rounded-lg p-3.5 shadow-xs flex flex-col",children:[h("div",{className:"flex justify-between items-start mb-3",children:[h("div",{className:"flex items-center gap-2",children:[h("span",{className:"font-semibold text-xs text-ink capitalize",children:[n," ",l]}),h("div",{className:"flex items-center gap-1",children:[h("div",{className:"w-1.5 h-1.5 rounded-full bg-ink/80"}),h("span",{className:"text-[11px] text-ink/60",children:"DeepSeek"})]})]}),h("div",{className:"flex bg-ink/5 rounded p-0.5",children:[h("button",{onClick:()=>u("cost"),className:`px-2 py-0.5 rounded text-[9px] font-bold tracking-wider transition-colors ${l==="cost"?"bg-paper shadow-xs text-ink":"text-ink/50 hover:text-ink"}`,children:"COST"}),h("button",{onClick:()=>u("tokens"),className:`px-2 py-0.5 rounded text-[9px] font-bold tracking-wider transition-colors ${l==="tokens"?"bg-paper shadow-xs text-ink":"text-ink/50 hover:text-ink"}`,children:"TOKENS"})]})]}),h(oNe,{cadence:n,metric:l,series:O})]})]}),h(nNe,{activeMetrics:C}),h(iNe,{breakdownTab:d,setBreakdownTab:p,activeBreakdownRows:A,activeMetrics:C,cadence:n}),h("div",{className:"text-center text-[10px] text-ink/40 pt-2",children:["Scanned ",C.scannedTranscripts," transcripts (1 outside the window) · ",C.usageRecords," usage records · 0.1s"]})]})}var uNe=R(()=>{lt();bt();rNe();sNe();lNe();Ks();fe()});function wf(e){return Lin.format(e)}function jg(e){return Rin.format(e)}function f1(e){let t=new Date(e);if(Number.isNaN(t.getTime()))return e;return Iin.format(t)}function dNe(e,t){if(t<=0)return 0;return Math.min(100,Math.max(0,e/t*100))}function pNe(e,t){if(t<=0)return"0%";return`${new Intl.NumberFormat("id-ID",{maximumFractionDigits:1}).format(e/t*100)}%`}function bx(e){if(!Number.isFinite(e))return"0";let t=Math.abs(e);if(t>=1e9)return`${Dne.format(e/1e9)}B`;if(t>=1e6)return`${Dne.format(e/1e6)}M`;if(t>=1000)return`${Dne.format(e/1000)}K`;return jg(e)}function JC(e){let t=Number(e);if(e.trim()===""||!Number.isFinite(t))return e;return jg(t)}function One(e){if(!Number.isFinite(e))return"$0,00";return`$${Nin.format(e)}`}function eF(e,t){if(!Number.isFinite(e))return"—";switch(t){case"percent":return`${new Intl.NumberFormat("id-ID",{maximumFractionDigits:1}).format(e)}%`;case"usd":return One(e);case"tokens":case"bytes":return bx(e);default:return jg(e)}}function mNe(e){if(!Number.isFinite(e))return"0%";return`${new Intl.NumberFormat("id-ID",{maximumFractionDigits:1}).format(e*100)}%`}var Lin,Rin,Dne,Iin,Nin;var g1=R(()=>{Lin=new Intl.NumberFormat("id-ID",{style:"currency",currency:"IDR",maximumFractionDigits:0}),Rin=new Intl.NumberFormat("id-ID"),Dne=new Intl.NumberFormat("id-ID",{minimumFractionDigits:2,maximumFractionDigits:2,useGrouping:!1}),Iin=new Intl.DateTimeFormat("id-ID",{dateStyle:"medium",timeStyle:"short"});Nin=new Intl.NumberFormat("id-ID",{minimumFractionDigits:2,maximumFractionDigits:2})});function Min(e){let t=e.filter((a)=>a.usedFraction!==void 0);if(t.length===0){let a=e.find((i)=>i.unit==="usd"&&i.remaining!==void 0);if(a)return`${One(a.remaining??0)} left`;return e[0]?.label}let n=t.reduce((a,i)=>(i.usedFraction??0)>(a.usedFraction??0)?i:a),r=Math.round((n.usedFraction??0)*100);return n.windowLabel?`${r}% · ${n.windowLabel}`:`${r}% used`}function eS(e){return e.providers.map((t)=>({id:t.id,name:t.name,error:t.error,hint:$in(t),limits:t.limits,tracked:t.tracked,limitsUnavailable:t.limitsUnavailable,summary:t}))}function $in(e){let t=e.kenari?.quota?.planName;if(t)return t;let n=e.deepseek?.balance?.entries[0];if(n)return`${n.currency} ${JC(n.totalBalance)}`;return Min(e.limits)??"No quota reported"}function tS(e){return e.error?"Error":"Connected"}var x9=R(()=>{g1()});function Pin({provider:e,selected:t}){return h("span",{className:t?"text-ink/80":"text-ink/60",children:h(Ls,{slug:e.id,name:e.name,size:14})})}function hNe({report:e,selectedProviderId:t,onSelectProvider:n}){let r=eS(e);return h("div",{className:"w-56 sm:w-64 border-r border-ink/10 h-full flex flex-col bg-paper/50 flex-shrink-0 select-none",children:[h("div",{className:"px-3.5 py-2.5 border-b border-ink/10 flex items-center justify-between",children:h("span",{className:"text-xs font-semibold text-ink",children:[r.length," provider",r.length===1?"":"s"," with keys"]})}),h("div",{className:"flex-1 scrollbar-overlay-container scrollbar-overlay-static p-1.5 space-y-3 text-xs",children:r.length===0?h("p",{className:"px-2.5 py-3 text-[11px] text-ink/50 leading-relaxed",children:"No provider credentials detected. Add an API key in Settings → Providers."}):h("div",{children:[h("div",{className:"px-2.5 pt-1.5 pb-1 text-[10px] font-bold text-ink/50 uppercase tracking-wider",children:"Providers"}),h("div",{className:"space-y-0.5",children:r.map((a)=>{let i=a.id===t;return h("button",{type:"button",onClick:()=>n(a.id),className:`w-full text-left px-2.5 py-2 rounded-lg transition-colors cursor-pointer flex flex-col gap-0.5 group ${i?"bg-ink/10 text-ink font-medium shadow-2xs":"text-ink/80 hover:bg-ink/5 hover:text-ink"}`,children:[h("div",{className:"flex items-center justify-between gap-1.5",children:[h("div",{className:"flex items-center gap-1.5 min-w-0",children:[h("div",{className:"relative",children:[h(Pin,{provider:a,selected:i}),h("span",{className:`absolute -top-0.5 -right-0.5 w-1.5 h-1.5 rounded-full ${a.error?"bg-error/60":"bg-ink"}`})]}),h("span",{className:"font-semibold text-xs text-ink truncate",children:a.name})]}),h("span",{className:`text-[10px] font-mono uppercase px-1.5 py-0.5 rounded bg-ink/10 font-medium ${a.error?"text-error":"text-ink/70"}`,children:tS(a)})]}),h("p",{className:"text-[11px] text-ink/60 line-clamp-1 leading-snug pl-5",children:a.hint})]},a.id)})})]})})]})}var fNe=R(()=>{x9();th();fe()});function gNe({providerName:e,credentialSources:t,error:n,note:r,children:a}){return h("section",{className:"bg-paper border border-ink/15 rounded-lg shadow-xs",children:[h("header",{className:"flex items-center justify-between gap-2 px-3.5 py-2.5 border-b border-ink/10",children:[h("span",{className:"text-xs font-semibold text-ink",children:e}),h("span",{className:"text-[10px] font-mono uppercase tracking-wider text-ink/50 truncate",title:`Credentials from ${t.join(", ")}`,children:t.join(" · ")})]}),h("div",{className:"p-3.5 space-y-4",children:[n&&h("p",{className:"flex items-start gap-2 text-error text-xs leading-relaxed",children:[h(yr,{size:14,className:"shrink-0 mt-0.5"}),h("span",{className:"break-words",children:n})]}),a,r&&h("p",{className:"text-[10px] text-ink/50 leading-relaxed border-t border-ink/10 pt-2.5",children:r})]})]})}var bNe=R(()=>{bt();fe()});function Din({window:e}){let t=e.usedRp+e.remainingRp,n=dNe(e.usedRp,t);return h("div",{className:"bg-paper border border-ink/15 rounded-lg p-3 shadow-xs space-y-2",children:[h("div",{className:"flex items-center justify-between gap-2",children:[h("span",{className:"text-[11px] font-semibold text-ink",children:e.label}),h("span",{className:"text-[10px] text-ink/50",children:["Resets ",f1(e.resetsAt)]})]}),h("div",{className:"h-1.5 w-full bg-ink/10 rounded-full overflow-hidden",children:h("div",{className:"h-full bg-ink/80 rounded-full",style:{width:`${n}%`}})}),h("div",{className:"flex flex-wrap items-center justify-between gap-x-3 gap-y-0.5 text-[10px] text-ink/60",children:[h("span",{children:["Used ",h("span",{className:"font-semibold text-ink",children:wf(e.usedRp)})," ·"," ",pNe(e.usedRp,t)]}),h("span",{children:["Remaining ",h("span",{className:"font-semibold text-ink",children:wf(e.remainingRp)})]})]})]})}function Oin({coupon:e}){return h("div",{className:"bg-ink/5 border border-ink/10 rounded-lg p-3 shadow-xs",children:[h("div",{className:"flex items-center gap-1.5 mb-1.5",children:[h(r9,{size:12,className:"text-ink/60"}),h("span",{className:"text-[11px] font-semibold text-ink",children:["Active coupon · ",e.name]})]}),h("div",{className:"text-[10px] text-ink/60 space-y-0.5",children:[h("div",{children:["Remaining"," ",h("span",{className:"font-semibold text-ink",children:e.remainingRp===null?"Unlimited":wf(e.remainingRp)})," ","· Used ",h("span",{className:"font-semibold text-ink",children:wf(e.usedRp)})]}),h("div",{children:["Expires ",f1(e.expiresAt)]}),e.scopeModels.length>0&&h("div",{children:["Models: ",e.scopeModels.join(", ")]})]})]})}function yNe({quota:e}){if(!e)return h("p",{className:"text-[11px] text-ink/50",children:"Quota data is not available for this account."});return h("div",{className:"space-y-2",children:[h("div",{className:"flex items-center justify-between gap-2",children:[h("h4",{className:"text-[10px] font-mono font-semibold uppercase tracking-wider text-ink/40",children:"Quota windows"}),e.planName&&h("span",{className:"text-[10px] text-ink/60",children:["Plan ",h("span",{className:"font-semibold text-ink",children:e.planName})]})]}),e.windows.length===0?h("p",{className:"text-[11px] text-ink/50",children:"No quota windows reported."}):h("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-2.5",children:e.windows.map((t)=>h(Din,{window:t},t.key))}),e.coupon&&h(Oin,{coupon:e.coupon})]})}var vNe=R(()=>{bt();g1();fe()});function xNe({usage:e}){if(!e)return h("p",{className:"text-[11px] text-ink/50",children:"The 30-day usage report is not available."});let t=e.rows.reduce((r,a)=>r+a.inputTokens,0),n=e.rows.reduce((r,a)=>r+a.outputTokens,0);return h("div",{className:"space-y-2",children:[h("h4",{className:"text-[10px] font-mono font-semibold uppercase tracking-wider text-ink/40",children:"30-day usage by model"}),h("div",{className:"overflow-x-auto border border-ink/15 rounded-lg shadow-xs",children:h("table",{className:"w-full text-[11px]",children:[h("thead",{className:"bg-ink/5 text-ink/60",children:h("tr",{children:[h("th",{className:"text-left font-semibold px-3 py-2 whitespace-nowrap",children:"Model"}),h("th",{className:"text-right font-semibold px-3 py-2 whitespace-nowrap",children:"Requests"}),h("th",{className:"text-right font-semibold px-3 py-2 whitespace-nowrap",children:"Input tokens"}),h("th",{className:"text-right font-semibold px-3 py-2 whitespace-nowrap",children:"Output tokens"}),h("th",{className:"text-right font-semibold px-3 py-2 whitespace-nowrap",children:"Cost"})]})}),h("tbody",{className:"divide-y divide-ink/10",children:e.rows.length===0?h("tr",{children:h("td",{colSpan:5,className:"px-3 py-3 text-center text-ink/50",children:"No usage recorded in the last 30 days."})}):e.rows.map((r)=>h("tr",{children:[h("td",{className:"px-3 py-1.5 font-mono text-ink whitespace-nowrap",children:r.model}),h("td",{className:"px-3 py-1.5 text-right tabular-nums text-ink/80",children:jg(r.requests)}),h("td",{className:"px-3 py-1.5 text-right tabular-nums text-ink/80",children:bx(r.inputTokens)}),h("td",{className:"px-3 py-1.5 text-right tabular-nums text-ink/80",children:bx(r.outputTokens)}),h("td",{className:"px-3 py-1.5 text-right tabular-nums text-ink/80",children:wf(r.costRp)})]},r.model))}),h("tfoot",{className:"bg-ink/5 border-t border-ink/15 font-semibold text-ink",children:h("tr",{children:[h("td",{className:"px-3 py-2",children:"Total"}),h("td",{className:"px-3 py-2 text-right tabular-nums",children:jg(e.totalRequests)}),h("td",{className:"px-3 py-2 text-right tabular-nums",children:bx(t)}),h("td",{className:"px-3 py-2 text-right tabular-nums",children:bx(n)}),h("td",{className:"px-3 py-2 text-right tabular-nums",children:wf(e.totalCostRp)})]})})]})})]})}var _Ne=R(()=>{g1();fe()});function kNe({report:e}){let{balance:t,usage:n,quota:r}=e;if(!t&&!n&&!r)return h("p",{className:"text-[11px] text-ink/50",children:"No kenari data was returned for this account."});let a=t?t.amountRp!==null?wf(t.amountRp):t.raw:"—",i=t?t.amountRp!==null?t.raw:"Amount could not be parsed":"Balance unavailable",s=n?n.rows.reduce((o,l)=>o+l.inputTokens+l.outputTokens,0):0;return h(Et,{children:[h("div",{className:"@container",children:h("div",{className:"grid grid-cols-3 @[540px]:grid-cols-5 gap-2.5 items-stretch",children:[h(Pi,{value:a,label:"Wallet balance",hint:i}),h(Pi,{value:r?.planName??"—",label:"Active plan",hint:r?"kenari quota plan":"Quota unavailable"}),h(Pi,{value:n?jg(n.totalRequests):"—",label:"Requests (30 days)",hint:n?"Across all models":"Usage report unavailable"}),h(Pi,{value:n?wf(n.totalCostRp):"—",label:"Cost (30 days)",hint:n?"Billed in Rupiah":"Usage report unavailable"}),h(Pi,{value:n?bx(s):"—",label:"Tokens processed (30 days)",hint:n?"Input + output":"Usage report unavailable",tone:"muted",className:"col-span-2 @[540px]:col-span-1"})]})}),h(yNe,{quota:r}),h(xNe,{usage:n})]})}var wNe=R(()=>{QC();vNe();_Ne();g1();fe()});function CNe({report:e}){let t=e.balance;if(!t)return h("p",{className:"text-[11px] text-ink/50",children:"DeepSeek balance data is not available."});return h(Et,{children:[h("div",{className:"@container",children:h("div",{className:"grid grid-cols-3 @[540px]:grid-cols-5 gap-2.5 items-stretch",children:[h(Pi,{value:t.isAvailable?"Available":"Unavailable",label:"Prepaid balance",hint:t.isAvailable?"Account can spend":"Top up required",tone:t.isAvailable?"default":"muted"}),h(Pi,{value:jg(t.entries.length),label:"Currency buckets",hint:t.entries.length>0?"From the balance endpoint":"No entries returned",tone:"muted"})]})}),t.entries.length===0?h("p",{className:"text-[11px] text-ink/50",children:"The balance endpoint returned no currency entries."}):h("div",{className:"grid grid-cols-1 gap-2.5",children:t.entries.map((n)=>h("div",{className:"bg-paper border border-ink/15 rounded-lg p-3 shadow-xs",children:[h("div",{className:"flex items-center justify-between gap-2 mb-2",children:[h("span",{className:"text-[11px] font-semibold text-ink",children:n.currency}),h("span",{className:"text-[10px] font-mono uppercase tracking-wider text-ink/40",children:"Balance"})]}),h("dl",{className:"grid grid-cols-3 gap-2 text-[10px]",children:[h("div",{children:[h("dt",{className:"text-ink/50",children:"Total"}),h("dd",{className:"font-semibold text-ink tabular-nums break-words",children:JC(n.totalBalance)})]}),h("div",{children:[h("dt",{className:"text-ink/50",children:"Granted"}),h("dd",{className:"font-semibold text-ink tabular-nums break-words",children:JC(n.grantedBalance)})]}),h("div",{children:[h("dt",{className:"text-ink/50",children:"Topped up"}),h("dd",{className:"font-semibold text-ink tabular-nums break-words",children:JC(n.toppedUpBalance)})]})]})]},n.currency))})]})}var SNe=R(()=>{QC();g1();fe()});function Fin({limit:e}){let t=Math.min(100,Math.max(0,(e.usedFraction??0)*100)),n=e.modelId??e.accountId,r=e.used!==void 0?eF(e.used,e.unit):void 0,a=e.limit!==void 0?eF(e.limit,e.unit):void 0,i=e.remaining!==void 0?eF(e.remaining,e.unit):void 0;return h("div",{className:"bg-paper border border-ink/15 rounded-lg p-3 shadow-xs space-y-2",children:[h("div",{className:"flex items-start justify-between gap-2",children:[h("div",{className:"min-w-0",children:[h("div",{className:"text-[11px] font-semibold text-ink truncate",children:e.label}),n&&h("div",{className:"text-[10px] text-ink/50 truncate",children:n})]}),h("span",{className:"text-[10px] text-ink/50 flex-shrink-0 whitespace-nowrap",children:e.resetsAt!==void 0?`Resets ${f1(new Date(e.resetsAt).toISOString())}`:""})]}),h("div",{className:"h-1.5 w-full bg-ink/10 rounded-full overflow-hidden",children:h("div",{className:`h-full rounded-full ${e.status==="exhausted"?"bg-error/70":"bg-ink/80"}`,style:{width:`${t}%`}})}),h("div",{className:"flex flex-wrap items-center justify-between gap-x-3 gap-y-0.5 text-[10px] text-ink/60",children:[h("span",{children:["Used"," ",h("span",{className:"font-semibold text-ink",children:e.unit==="percent"||!r?mNe(e.usedFraction??0):r}),e.unit!=="percent"&&r&&a?` of ${a}`:""]}),h("span",{className:"flex items-center gap-2",children:[e.status!=="ok"&&e.status!=="unknown"&&h("span",{className:"text-[10px] font-mono uppercase px-1.5 py-0.5 rounded bg-ink/10 text-ink/70",children:e.status}),i&&h("span",{children:["Remaining ",h("span",{className:"font-semibold text-ink",children:i})]})]})]}),e.notes&&e.notes.length>0&&h("ul",{className:"text-[10px] text-ink/50 leading-relaxed space-y-0.5",children:e.notes.map((s)=>h("li",{children:s},s))})]})}function TNe({limits:e,tracked:t,unavailable:n,notes:r}){return h("div",{className:"space-y-2",children:[h("h4",{className:"text-[10px] font-mono font-semibold uppercase tracking-wider text-ink/40",children:"Quota windows"}),r&&r.length>0&&h("ul",{className:"text-[10px] text-ink/50 leading-relaxed space-y-0.5",children:r.map((a)=>h("li",{children:a},a))}),e.length===0?h("p",{className:"text-[11px] text-ink/50",children:!t?"No quota source for this provider: omp ships no usage adapter for it and it exposes no balance endpoint the chamber knows.":n?"omp tracks this provider but its usage endpoint returned no data — an invalid or expired credential, an unreachable endpoint, or a plan without quota windows.":"No quota windows were reported for this provider."}):h("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-2.5",children:e.map((a)=>h(Fin,{limit:a},a.id))})]})}var ANe=R(()=>{g1();fe()});function tF({summary:e}){let t=Boolean(e.kenari||e.deepseek);return h(gNe,{providerName:e.name,credentialSources:e.credentialSources,error:e.error,note:e.deepseek?Bin:void 0,children:[e.kenari&&h(kNe,{report:e.kenari}),e.deepseek&&h(CNe,{report:e.deepseek}),!t&&(e.limits.length>0||!e.error)&&h(TNe,{limits:e.limits,tracked:e.tracked,unavailable:e.limitsUnavailable,notes:e.notes})]})}var Bin="DeepSeek exposes no usage or quota API — only the prepaid balance (and the web console at platform.deepseek.com) is available.";var Fne=R(()=>{bNe();wNe();SNe();ANe();fe()});function nF(){let[e,t]=le(null),[n,r]=le(!0),[a,i]=le(null),s=Ze(async(o)=>{if(!o?.silent)r(!0);i(null);try{let l=o?.force?"/api/settings/usage?refresh=1":"/api/settings/usage",u=await fetch(l);if(!u.ok)throw Error(`Usage request failed (${u.status})`);let d=await u.json();t(d)}catch(l){i(l instanceof Error?l.message:"Failed to load provider usage")}finally{if(!o?.silent)r(!1)}},[]);return Ke(()=>{s()},[s]),{report:e,isLoading:n,error:a,reload:s}}var Bne=R(()=>{lt()});function ENe(){let{report:e,isLoading:t,error:n,reload:r}=nF(),[a,i]=le(""),s=e?eS(e):[],o=s.find((l)=>l.id===a)??s[0];if(Ke(()=>{if(o&&o.id!==a)i(o.id)},[o,a]),n&&!e)return h("div",{className:"flex h-full w-full flex-col items-center justify-center gap-2 p-8 text-center text-xs",children:[h(yr,{size:16,className:"text-error"}),h("p",{className:"text-error text-xs",children:n}),h("button",{type:"button",onClick:()=>r(),className:"text-[11px] font-semibold text-ink/70 hover:text-ink underline underline-offset-2",children:"Try again"})]});if(!e)return h("div",{className:"flex h-full w-full items-center justify-center text-ink/40 text-xs",children:"Loading provider usage..."});return h("div",{className:"flex h-full w-full overflow-hidden bg-paper text-xs text-ink",children:[h(hNe,{report:e,selectedProviderId:o?.id??"",onSelectProvider:i}),h("div",{className:"flex-1 h-full overflow-hidden flex flex-col",children:[h("div",{className:"px-3.5 py-2.5 border-b border-ink/10 flex items-center justify-between gap-3 flex-shrink-0",children:[h("div",{className:"flex items-center gap-2 min-w-0",children:[h("span",{className:"text-xs font-semibold text-ink/75 truncate",children:["Updated ",f1(e.generatedAt)]}),e.isMock&&h("span",{className:"text-[10px] font-mono uppercase tracking-wider bg-ink/5 border border-ink/15 rounded px-1.5 py-0.5 text-ink/60",children:"Mock"})]}),h("button",{type:"button",onClick:()=>r({force:!0}),disabled:t,className:"p-1.5 bg-paper border border-ink/15 rounded-md hover:bg-ink/5 text-ink/80 transition-colors disabled:opacity-50 flex-shrink-0",title:"Refresh usage",children:h(Ur,{size:12,className:t?"animate-spin text-ink":""})})]}),h("div",{className:"flex-1 overflow-y-auto scrollbar-overlay-container scrollbar-overlay-static p-3.5 space-y-4",children:[n&&h("p",{className:"text-error text-xs",children:n}),o?h(tF,{summary:o.summary}):h("p",{className:"text-[11px] text-ink/50 leading-relaxed",children:"No provider credentials detected. Add an API key in Settings → Providers and it will appear here."})]})]})]})}var LNe=R(()=>{lt();bt();fNe();x9();Fne();g1();Bne();fe()});function RNe({settings:e,onUpdate:t}){let[n,r]=le(!1),a=()=>{r(!0),XO(),setTimeout(()=>r(!1),600)},i=e.chatCompletionSound??e.soundAlerts??!0;return h("div",{className:"w-full space-y-6 text-xs text-ink",children:h("div",{className:"bg-paper border border-ink/15 rounded-lg p-4 shadow-xs space-y-4",children:[h("div",{className:"flex items-start justify-between gap-4",children:[h("div",{className:"flex items-start gap-3",children:[h("div",{className:"w-8 h-8 rounded-md bg-ink/5 border border-ink/10 flex items-center justify-center flex-shrink-0 mt-0.5",children:i?h(BC,{size:16,className:"text-ink"}):h(a9,{size:16,className:"text-ink/40"})}),h("div",{children:[h("div",{className:"text-sm font-semibold text-ink flex items-center gap-2",children:[h("span",{children:"AI Response Completion Sound"}),h("span",{className:"text-[10px] uppercase font-mono px-1.5 py-0.5 rounded bg-ink/10 text-ink/80 font-bold",children:"Audio Chime"})]}),h("p",{className:"text-ink/65 text-[11px] mt-1 leading-relaxed",children:"Play an audible notification chime when the AI completes generating its response, thinking blocks, or diagnostic execution."})]})]}),h("button",{type:"button",role:"switch","aria-checked":i,onClick:()=>{let s=!i;if(t({chatCompletionSound:s,soundAlerts:s}),s)XO()},className:`relative inline-flex h-6 w-11 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none ${i?"bg-ink":"bg-ink/20"}`,children:h("span",{"aria-hidden":"true",className:`pointer-events-none inline-block h-5 w-5 transform rounded-full bg-paper shadow ring-0 transition duration-200 ease-in-out ${i?"translate-x-5":"translate-x-0"}`})})]}),h("div",{className:"pt-3 border-t border-ink/10 flex items-center justify-between",children:[h("span",{className:"text-[11px] text-ink/60 flex items-center gap-1.5",children:[h(ds,{size:13,className:"text-ink/60"}),"Warm harmonic chime synthesized natively via Web Audio"]}),h("button",{type:"button",onClick:a,className:`px-3 py-1.5 rounded-md border border-ink/20 bg-paper hover:bg-ink/5 text-ink font-medium text-[11px] flex items-center gap-1.5 transition-all shadow-xs active:scale-95 ${n?"border-ink bg-ink/10":""}`,children:[h(BC,{size:13,className:n?"animate-bounce text-ink":"text-ink/70"}),h("span",{children:n?"Playing...":"Test Sound"})]})]})]})})}var INe=R(()=>{lt();bt();v9();fe()});function jin({isOpen:e,onClose:t,initialCategory:n="appearance",appSettings:r={},autoOpenAddProvider:a=!1}){let[i,s]=le(n),[o,l]=le(a),[u,d]=le(""),[p,m]=le(!1),[f,g]=le(!1),[b,y]=le(null),v=$O(),[x,_]=le(()=>m9e(zin,r));Ke(()=>{if(e)s(n),l(a),g(!1),d("")},[e,n,a]),Ys("omp:open-settings",(I)=>{let O=I;if(O.detail?.category)s(O.detail.category);if(O.detail?.autoOpenAdd)l(!0)});let S=(I)=>{_((O)=>{let D=typeof I==="function"?I(O):{...O,...I};if(typeof document<"u"&&D.theme)OO(D.theme);return v(g9e(O,D,I)),D}),y("Setting was saved"),setTimeout(()=>y(null),3000)},w=()=>{m(!0),setTimeout(()=>{m(!1)},1200)},C=(I)=>{s(I),g(!0)};if(!e)return null;let T=zO.find((I)=>I.id===i)||zO[0],A=()=>{switch(i){case"appearance":return h(M9e,{settings:x,onUpdate:S});case"chats":return h(U9e,{settings:x,onUpdate:S});case"projects":return h(oLe,{});case"providers":return h(wRe,{autoOpenAdd:o,onAddModalClose:()=>l(!1)});case"agents":return h(DRe,{settings:x,onUpdate:S});case"behavior":return h(jRe,{});case"commands":return h(HRe,{settings:x,onUpdate:S});case"mcp":return h(xIe,{settings:x,onUpdate:S});case"token-usage":return h(cNe,{settings:x,onUpdate:S});case"notifications":return h(RNe,{settings:x,onUpdate:S});case"skills":return h(TIe,{settings:x,onUpdate:S,onNavigateToCatalog:()=>s("skills-catalog")});case"skills-catalog":return h(NIe,{});case"omp":return h(eNe,{settings:x,onUpdate:S});case"usage":return h(ENe,{});default:return h($Ie,{category:i})}};return h("div",{className:"fixed inset-0 bg-ink/40 backdrop-blur-[2px] z-50 flex items-center justify-center p-0 md:p-6 animate-in fade-in duration-150",onClick:t,children:h("div",{className:"relative bg-paper border border-ink/15 md:rounded-2xl shadow-2xl w-full h-full md:max-w-4xl lg:max-w-5xl xl:max-w-[1150px] md:h-[782px] md:max-h-[92vh] flex flex-col md:flex-row overflow-hidden text-ink",onClick:(I)=>I.stopPropagation(),children:[h("div",{className:"hidden md:flex w-64 flex-shrink-0 h-full",children:h(hne,{activeCategory:i,onSelectCategory:(I)=>s(I),searchQuery:u,onSearchChange:d,onReloadOmpEngine:w,isReloading:p,className:"w-full"})}),h("div",{className:`flex-1 flex-col h-full bg-paper overflow-hidden ${f?"flex":"hidden md:flex"}`,children:[h("div",{className:"h-16 px-6 border-b border-ink/10 flex items-center justify-between flex-shrink-0 bg-paper",children:[h("div",{className:"flex items-center space-x-3 min-w-0",children:[h("button",{type:"button",onClick:()=>g(!1),className:"md:hidden p-1.5 -ml-2 rounded-lg hover:bg-ink/5 active:bg-ink/10 text-ink","aria-label":"Back to categories",children:h(uw,{size:20})}),h("div",{className:"truncate",children:[h("h3",{className:"font-semibold text-base tracking-tight text-ink leading-tight",children:T.label}),h("p",{className:"text-[11px] text-ink/60 truncate hidden sm:block",children:T.description})]})]}),h("button",{type:"button",onClick:t,className:"p-1.5 rounded-lg text-ink/50 hover:text-ink hover:bg-ink/5 transition-colors cursor-pointer","aria-label":"Close settings",children:h(Ln,{size:18,strokeWidth:2.2})})]}),h("div",{className:`flex-1 scrollbar-overlay-container scrollbar-overlay-static w-full ${["projects","providers","agents","behavior","commands","mcp","skills","skills-catalog","usage"].includes(i)?"p-0 flex flex-col":"p-6 md:p-8 flex flex-col"}`,children:h("div",{className:"w-full h-full flex-1 flex flex-col",children:A()})})]}),h("div",{className:`flex-1 flex-col h-full bg-canvas md:hidden ${f?"hidden":"flex"}`,children:[h("div",{className:"h-14 px-4 border-b border-ink/10 flex items-center justify-between flex-shrink-0 bg-canvas",children:[h("span",{className:"font-bold text-sm tracking-tight text-ink",children:"Settings"}),h("button",{type:"button",onClick:t,className:"p-1.5 rounded-lg text-ink/50 hover:text-ink","aria-label":"Close",children:h(Ln,{size:18})})]}),h("div",{className:"flex-1 overflow-hidden",children:h(hne,{activeCategory:i,onSelectCategory:C,searchQuery:u,onSearchChange:d,onReloadOmpEngine:w,isReloading:p,className:"w-full border-r-0"})})]}),b&&h("div",{className:"absolute bottom-6 left-1/2 transform -translate-x-1/2 bg-ink text-canvas px-4 py-2 rounded-lg text-xs font-semibold shadow-lg animate-in fade-in slide-in-from-bottom-2 z-50 flex items-center space-x-2",children:[h(zt,{size:14,className:"text-success"}),h("span",{children:b})]})]})})}var zin;var NNe=R(()=>{lt();bt();Og();lne();c9();m1();Fg();E9e();$9e();W9e();lLe();CRe();ORe();qRe();VRe();_Ie();AIe();MIe();PIe();tNe();uNe();LNe();INe();fe();zin={binaryPath:"/Users/you/.bun/bin/omp",showUpdateNotifications:!0,agentControlTool:!0,ompChamberWebTool:!0,theme:o9,fontSize:"standard",editorFont:"JetBrains Mono",streamResponses:!0,streamTransport:"websocket",autoSessionTitle:!0,expandedThinking:!0,detailedToolCalls:!1,notificationsEnabled:!0,buildFailureAlert:!0,soundAlerts:!0,chatCompletionSound:!0,defaultWorkspacePath:"~/Projects/ompchamber",tunnelEnabled:!0,tunnelSubdomain:"omp-dev-preview",activeProvider:"claude",autoApproveSafeCmds:!0,autoPatchErrors:!0,followUpBehavior:"queue",keybindingSend:"Enter",keybindingNewLine:"Shift + Enter",keybindingSteering:"Ctrl / Cmd + Enter"}});function qw({isOpen:e,...t}){if(!e)return null;return h(Qp,{fallback:null,children:h(qin,{isOpen:e,...t})})}var qin;var rF=R(()=>{Zs();fe();qin=ec(()=>Promise.resolve().then(() => (NNe(),{})).then((e)=>({default:jin})))});async function Uin(e){let t=e?`?path=${encodeURIComponent(e)}`:"",n=await fetch(`/api/fs/browse${t}`),r=await n.json();if(!n.ok||r.error)throw Error(r.error||`HTTP ${n.status}`);return r}function MNe({initialPath:e,onSelect:t,onClose:n}){let[r,a]=le(e??""),[i,s]=le(""),[o,l]=le([]),[u,d]=le(null),[p,m]=le(!0),[f,g]=le(null),[b,y]=le(null),v=De(null),x=Ze(async(A)=>{m(!0),g(null);try{let I=await Uin(A);a(I.path??A??""),d(I.parentPath??null),s(I.path??A??""),l(I.directories??[])}catch(I){g(I instanceof Error?I.message:String(I))}finally{m(!1)}},[]);Ke(()=>{x(e)},[e,x]);let _=()=>{if(u)x(u)},S=(A)=>{A.preventDefault();let I=i.trim();if(I)x(I)},w=(A)=>{x(A.path)},C=(A)=>{y(A.path),t(A.path)},T=()=>{if(r)y(r),t(r)};return h("div",{className:"fixed inset-0 bg-ink/30 z-[60] flex items-center justify-center p-4",onClick:n,children:h("div",{className:"bg-paper border border-ink/15 rounded-lg shadow-2xl w-full max-w-lg flex flex-col overflow-hidden",onClick:(A)=>A.stopPropagation(),children:[h("div",{className:"flex items-center justify-between px-4 py-3 border-b border-ink/10",children:[h("h3",{className:"font-semibold text-sm flex items-center space-x-2",children:[h(ff,{size:15,className:"text-ink/70"}),h("span",{children:"Choose Project Folder"})]}),h("button",{type:"button",onClick:n,className:"p-1 rounded hover:bg-ink/10 text-ink/60 hover:text-ink transition-colors","aria-label":"Close picker",children:h(Ln,{size:15})})]}),h("div",{className:"px-4 py-2 border-b border-ink/10 bg-canvas/50",children:[h("form",{onSubmit:S,className:"flex items-center space-x-2",children:[h(Fc,{size:14,className:"text-ink/40 flex-shrink-0"}),h("input",{ref:v,type:"text",value:i,onChange:(A)=>s(A.currentTarget.value),placeholder:"~ or /absolute/path",className:"flex-1 bg-transparent outline-none text-xs font-mono text-ink placeholder-ink/30 py-1",spellcheck:!1}),h("button",{type:"submit",className:"px-2 py-1 rounded bg-ink/5 border border-ink/10 text-[11px] font-medium hover:bg-ink/10 transition-colors",children:"Go"})]}),h("div",{className:"flex items-center space-x-1 mt-1 text-[11px] text-ink/40 truncate",children:[h("button",{type:"button",onClick:()=>void x(),className:"hover:text-ink transition-colors flex items-center",children:[h(Fc,{size:11,className:"mr-0.5"})," home"]}),r.split("/").filter(Boolean).map((A,I,O)=>{let D="/"+r.split("/").filter(Boolean).slice(0,I+1).join("/"),N=I===O.length-1;return h("span",{className:"flex items-center space-x-1 min-w-0",children:[h(ms,{size:10,className:"text-ink/20 flex-shrink-0"}),N?h("span",{className:"text-ink/70 truncate",children:A}):h("button",{type:"button",onClick:()=>void x(D),className:"hover:text-ink transition-colors truncate max-w-[120px]",children:A})]},D)})]})]}),h("div",{className:"flex-1 min-h-[240px] max-h-[360px] scrollbar-overlay-container scrollbar-overlay-static p-2",children:p?h("div",{className:"flex items-center justify-center h-40 text-ink/40",children:h($r,{size:18,className:"animate-spin"})}):f?h("div",{className:"flex flex-col items-center justify-center h-40 text-xs text-red-600 space-y-2 px-4",children:[h("span",{children:f}),h("button",{type:"button",onClick:()=>void x(r||void 0),className:"px-2 py-1 rounded bg-ink/5 border border-ink/10 text-ink/70 hover:bg-ink/10 flex items-center space-x-1",children:[h(Ur,{size:11})," Retry"]})]}):o.length===0?h("div",{className:"text-center py-16 text-xs text-ink/40",children:"No subfolders"}):o.map((A)=>h("div",{className:`group flex items-center justify-between px-2.5 py-2 rounded cursor-pointer transition-colors ${b===A.path?"bg-ink/10":"hover:bg-ink/5"}`,onDblClick:()=>w(A),children:[h("button",{type:"button",onClick:()=>w(A),className:"flex items-center space-x-2 min-w-0 flex-1 text-left",children:[h(Mi,{size:15,className:"text-ink/50 flex-shrink-0"}),h("span",{className:"text-xs truncate text-ink/85",children:A.name})]}),h("button",{type:"button",onClick:()=>C(A),className:"hidden group-hover:flex px-2 py-0.5 rounded bg-ink text-canvas text-[10px] font-semibold hover:bg-ink/80 transition-colors flex-shrink-0",children:"Choose"})]},A.path))}),h("div",{className:"flex items-center justify-between px-4 py-3 border-t border-ink/10",children:[h("div",{className:"flex items-center space-x-2 min-w-0",children:[h("button",{type:"button",onClick:_,disabled:!u,className:"px-2.5 py-1.5 rounded bg-ink/5 border border-ink/10 text-[11px] font-medium hover:bg-ink/10 disabled:opacity-40 transition-colors flex items-center space-x-1",children:[h("span",{children:"↑"}),h("span",{children:"Up"})]}),h("button",{type:"button",onClick:()=>void x(),className:"px-2.5 py-1.5 rounded bg-ink/5 border border-ink/10 text-[11px] font-medium hover:bg-ink/10 transition-colors",children:"Home"})]}),h("div",{className:"flex items-center space-x-2",children:[h("button",{type:"button",onClick:n,className:"px-3 py-1.5 text-xs font-medium text-ink/60 hover:text-ink transition-colors",children:"Cancel"}),h("button",{type:"button",onClick:T,disabled:!r,className:"px-3.5 py-1.5 text-xs font-medium bg-ink text-canvas rounded hover:bg-ink/90 disabled:opacity-50 transition-colors",children:"Use This Folder"})]})]})]})})}var $Ne=R(()=>{lt();bt();fe()});var aF;var zne=R(()=>{aF={name:"ompchamber",version:"3.1.0",description:"Developer web console and diagnostic chamber for AI Oh-My-Pi — Elysia + Preact on Bun.",license:"UNLICENSED",author:"Wijanarko Putra Rajeb <wijanarko.rajeb@gmail.com>",type:"module",engines:{bun:">=1.4.0"},bin:{ompchamber:"./src/cli/ompchamber.js"},repository:{type:"git",url:"git+https://github.com/rajebdev/ompchamber.git"},homepage:"https://github.com/rajebdev/ompchamber#readme",bugs:{url:"https://github.com/rajebdev/ompchamber/issues"},keywords:["omp","oh-my-pi","agent","console","elysia","preact","bun"],files:["src","index.html","bunfig.toml","public","tsconfig.json","dist/client"],scripts:{dev:"bun run --hot src/server/index.ts --ompchamber-server","dev:lan":"HOST=0.0.0.0 bun run --hot src/server/index.ts --ompchamber-server",build:"bun run scripts/build-client.ts",start:"NODE_ENV=production bun run src/server/index.ts --ompchamber-server",typecheck:"tsc",clean:"rm -rf dist",lint:"tsc --noEmit",test:"bun test"},dependencies:{"@fontsource/fira-code":"^5.3.0","@shikijs/langs":"^4.4.3","@shikijs/themes":"^4.4.3","@xterm/addon-fit":"^0.11.0","@xterm/addon-webgl":"^0.19.0","@xterm/xterm":"^6.0.0",dompurify:"^3.4.15",elysia:"^1.4.30",katex:"^0.18.7","lucide-preact":"^1.47.0",marked:"^18.0.11","marked-linkify-it":"^4.0.2",mermaid:"^12.0.0",preact:"^10.29.8",remend:"^1.3.1",ripgrep:"^0.3.1",shiki:"^4.4.3",yaml:"^2.9.1"},devDependencies:{"@semantic-release/changelog":"^7.0.0","@semantic-release/commit-analyzer":"^13.0.1","@semantic-release/git":"^11.0.1","@semantic-release/github":"^12.0.10","@semantic-release/npm":"^13.2.0","@semantic-release/release-notes-generator":"^14.1.1","@tailwindcss/postcss":"^4.1.14","@types/bun":"^1.4.2","@types/node":"^22.14.0","conventional-changelog-conventionalcommits":"^9.3.1","happy-dom":"^20.14.5","semantic-release":"^25.0.9",tailwindcss:"^4.1.14",typescript:"~5.8.2"}}});function PNe(){return h("div",{className:"flex flex-col items-center gap-3 mt-6 pt-1",children:[h("div",{className:"flex items-center justify-center gap-6",children:[h("a",{href:"https://github.com",target:"_blank",rel:"noreferrer",className:"flex items-center gap-2 text-xs font-medium text-ink/75 hover:text-ink transition-colors",children:[h("svg",{className:"w-4 h-4 fill-current",viewBox:"0 0 24 24",children:h("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 2C6.477 2 2 6.484 2 12.017c0 4.425 2.865 8.18 6.839 9.504.5.092.682-.217.682-.483 0-.237-.008-.868-.013-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.53 1.032 1.53 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.029-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.202 2.398.1 2.651.64.7 1.028 1.595 1.028 2.688 0 3.848-2.339 4.695-4.566 4.943.359.309.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.019 10.019 0 0022 12.017C22 6.484 17.522 2 12 2z"})}),h("span",{children:"GitHub"})]}),h("a",{href:"https://discord.com",target:"_blank",rel:"noreferrer",className:"flex items-center gap-2 text-xs font-medium text-ink/75 hover:text-ink transition-colors",children:[h("svg",{className:"w-4 h-4 fill-current",viewBox:"0 0 24 24",children:h("path",{d:"M20.317 4.37a19.791 19.791 0 0 0-4.885-1.515.074.074 0 0 0-.079.037c-.21.375-.444.864-.608 1.25a18.27 18.27 0 0 0-5.487 0 12.64 12.64 0 0 0-.617-1.25.077.077 0 0 0-.079-.037A19.736 19.736 0 0 0 3.677 4.37a.07.07 0 0 0-.032.027C.533 9.046-.32 13.58.099 18.057a.082.082 0 0 0 .031.057 19.9 19.9 0 0 0 5.993 3.03.078.078 0 0 0 .084-.028c.462-.63.874-1.295 1.226-1.994.021-.041.001-.09-.041-.106a13.107 13.107 0 0 1-1.872-.892.077.077 0 0 1-.008-.128 10.2 10.2 0 0 0 .372-.292.074.074 0 0 1 .077-.01c3.929 1.793 8.18 1.793 12.061 0a.074.074 0 0 1 .078.01c.12.098.246.198.373.292a.077.077 0 0 1-.006.127 12.299 12.299 0 0 1-1.873.894.077.077 0 0 0-.041.107c.36.698.772 1.362 1.225 1.993a.076.076 0 0 0 .084.028 19.839 19.839 0 0 0 6.002-3.03.077.077 0 0 0 .032-.054c.5-5.177-.838-9.674-3.549-13.66a.061.061 0 0 0-.031-.028zM8.02 15.33c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.956-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.956 2.418-2.157 2.418zm7.975 0c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.955-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.946 2.418-2.157 2.418z"})}),h("span",{children:"Discord"})]})]}),h("a",{href:"https://x.com",target:"_blank",rel:"noreferrer",className:"flex items-center gap-2 text-xs font-medium text-ink/75 hover:text-ink transition-colors",children:[h("svg",{className:"w-3.5 h-3.5 fill-current",viewBox:"0 0 24 24",children:h("path",{d:"M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z"})}),h("span",{children:"@ompchamber"})]})]})}var DNe=R(()=>{fe()});function Gin({target:e,info:t,applying:n,disabled:r,onApply:a}){let i=e==="ompchamber"?"OMPChamber":"Oh-My-Pi",s=`v${t.current??"…"} → v${t.latest??"…"}`;return h("div",{className:"flex items-center justify-between gap-3 border-t border-ink/10 py-2.5 first:border-t-0",children:[h("div",{className:"min-w-0",children:[h("p",{className:"text-xs font-medium text-ink",children:i}),h("p",{className:"font-mono text-[10px] text-ink/60",children:t.installed?s:"not detected"})]}),t.installed?h("button",{type:"button",onClick:()=>a(e),disabled:r,className:nS,children:[n?h($r,{size:12,className:"animate-spin motion-reduce:animate-none"}):h(Yd,{size:12}),h("span",{children:"Update"})]}):h("span",{className:"shrink-0 text-[10px] text-ink/40",children:"not detected"})]})}function ONe({updates:e,onToast:t}){let n=e.info?[{target:"ompchamber",info:e.info.ompchamber},{target:"omp",info:e.info.omp}].filter(({info:i})=>i.updateAvailable&&i.latest!==null):[],r=async(i)=>{let s=await e.apply(i);if(!t)return;if(!s){t("The update request could not be completed.","error");return}if(i==="ompchamber"){t(s.message,s.success?"success":"error");return}if(s.success)t(`${s.message} A restart may be needed.`,"success");else t(s.message,"error")},a=Boolean(e.info&&!e.checking&&!e.error);return h("section",{className:"mt-5 border-y border-ink/10 py-3 text-left","aria-labelledby":"updates-heading",children:[h("div",{className:"flex items-center justify-between gap-3",children:[h("h3",{id:"updates-heading",className:"text-xs font-semibold text-ink",children:"Updates"}),e.info&&h("span",{className:"font-mono text-[9px] text-ink/40",children:"checked"})]}),h("div",{className:"mt-2.5",children:[e.checking&&h("button",{type:"button",disabled:!0,className:`${nS} w-full justify-center`,children:[h($r,{size:13,className:"animate-spin motion-reduce:animate-none"}),h("span",{children:"Checking…"})]}),e.error&&!e.checking&&h("div",{className:"flex items-start gap-2",children:[h(yr,{size:14,className:"mt-0.5 shrink-0 text-error"}),h("div",{className:"min-w-0 flex-1",children:[h("p",{className:"text-[11px] leading-4 text-error",children:e.error}),h("button",{type:"button",onClick:()=>void e.check(),className:`${nS} mt-2`,children:[h(Ur,{size:12}),h("span",{children:"Retry"})]})]})]}),!e.info&&!e.checking&&!e.error&&h("button",{type:"button",onClick:()=>void e.check(),className:`${nS} w-full justify-center`,children:[h(Ur,{size:13}),h("span",{children:"Check for updates"})]}),a&&n.length===0&&h("div",{className:"flex items-center justify-between gap-3",children:[h("p",{className:"flex items-center gap-1.5 text-[11px] text-success",children:[h(zt,{size:13}),h("span",{children:"You're up to date"})]}),h("button",{type:"button",onClick:()=>void e.check(),className:nS,children:[h(Ur,{size:12}),h("span",{children:"Check again"})]})]}),a&&n.length>0&&h("div",{children:[n.map(({target:i,info:s})=>h(Gin,{target:i,info:s,applying:e.applying===i,disabled:e.applying!==null,onApply:(o)=>void r(o)},i)),h("button",{type:"button",onClick:()=>void e.check(),disabled:e.applying!==null,className:`${nS} mt-2 w-full justify-center`,children:[h(Ur,{size:12}),h("span",{children:"Check again"})]})]})]})]})}var nS="inline-flex items-center gap-1.5 rounded-md border border-ink/20 px-2.5 py-1.5 text-[11px] font-medium text-ink transition-colors hover:border-ink/40 disabled:cursor-not-allowed disabled:opacity-50";var FNe=R(()=>{bt();fe()});function _9({isOpen:e,onClose:t,updates:n,onToast:r}){if(!e)return null;return h("div",{className:"fixed inset-0 bg-ink/40 backdrop-blur-[2px] z-50 flex items-center justify-center p-4 animate-in fade-in duration-200",onClick:t,children:h("div",{className:"relative bg-paper border border-ink/15 rounded-2xl shadow-2xl w-full max-w-[340px] p-6 text-center text-ink select-none",onClick:(a)=>a.stopPropagation(),children:[h("button",{onClick:t,className:"absolute top-4 right-4 text-ink/40 hover:text-ink transition-colors p-1 rounded-md","aria-label":"Close",children:h(Ln,{size:18,className:"stroke-[2.5]"})}),h("div",{className:"flex justify-center pt-2 pb-1",children:h("img",{src:"/icon.svg",alt:"OMPChamber",width:96,height:96,draggable:!1})}),h("h2",{className:"text-xl font-bold tracking-tight mt-3 flex items-center justify-center",children:[h("span",{className:"text-transparent bg-clip-text bg-gradient-to-r from-orange-600 to-amber-500 font-extrabold text-2xl tracking-tighter",children:"OMP"}),h("span",{className:"text-ink text-2xl font-bold ml-[1px]",children:"Chamber"})]}),h("div",{className:"text-xs text-ink/60 space-y-1 mt-1.5 font-mono",children:[h("p",{children:["OMPChamber v",aF.version]}),h("p",{children:["Oh-My-Pi ",n.info?.omp.current??"…"]})]}),h(ONe,{updates:n,onToast:r}),h(PNe,{}),h("p",{className:"text-[11px] text-ink/50 font-normal mt-8",children:"Made with love for the community"})]})})}var BNe=R(()=>{bt();zne();DNe();FNe();fe()});function iF({isOpen:e,onClose:t,onCreate:n}){let[r,a]=le(""),[i,s]=le(""),[o,l]=le(!1),[u,d]=le(null),[p,m]=le(!1);if(Ke(()=>{if(e)a(""),s(""),l(!1),d(null),m(!1)},[e]),!e)return null;return h("div",{className:"fixed inset-0 bg-ink/20 z-50 flex items-center justify-center",children:[h("div",{className:"bg-paper border border-ink/10 rounded-lg shadow-xl w-96 p-4 flex flex-col",children:[h("div",{className:"flex justify-between items-center mb-4 border-b border-ink/10 pb-2",children:[h("h3",{className:"font-semibold text-sm",children:"New Workspace"}),h(Ln,{size:14,className:"cursor-pointer hover:text-ink/60",onClick:t})]}),h("div",{className:"text-sm text-ink/80 py-2 space-y-3",children:[h("div",{children:[h("label",{className:"block text-xs font-semibold mb-1 text-ink",children:"Workspace Name"}),h("input",{type:"text",value:r,onChange:(b)=>a(b.currentTarget.value),placeholder:"e.g. bofis-pro",className:"w-full bg-paper border border-ink/20 rounded px-3 py-2 outline-none focus:border-ink/50 text-sm"})]}),h("div",{children:[h("label",{className:"block text-xs font-semibold mb-1 text-ink",children:["Project Path ",h("span",{className:"text-ink/40 font-normal",children:"(optional — binds omp sessions)"})]}),h("div",{className:"flex items-center space-x-2",children:[h("div",{className:"flex-1 flex items-center bg-paper border border-ink/20 rounded overflow-hidden focus-within:border-ink/50",children:[h("div",{className:"px-2 text-ink/40 bg-ink/5 h-full flex items-center border-r border-ink/10",children:h(Fc,{size:14})}),h("input",{type:"text",value:i,onChange:(b)=>s(b.currentTarget.value),placeholder:"~/projects/my-project",className:"w-full px-3 py-2 outline-none text-sm bg-transparent"})]}),h("button",{type:"button",onClick:()=>m(!0),className:"px-3 py-2 bg-ink/5 border border-ink/10 rounded text-xs font-medium hover:bg-ink/10 transition-colors flex items-center space-x-1.5 flex-shrink-0",children:[h(ff,{size:13}),h("span",{children:"Browse"})]})]})]}),u&&h("div",{className:"text-xs text-red-600",children:u})]}),h("div",{className:"mt-4 flex justify-end space-x-2",children:[h("button",{className:"px-3 py-1.5 text-xs font-medium text-ink/60 hover:text-ink transition-colors",onClick:t,disabled:o,children:"Cancel"}),h("button",{className:"px-4 py-1.5 text-xs font-medium bg-ink text-canvas rounded hover:bg-ink/90 transition-colors disabled:opacity-50",onClick:async()=>{if(!n){t();return}if(!r.trim()&&!i.trim()){d("Enter a name or a project path.");return}l(!0),d(null);try{await n({name:r.trim(),path:i.trim()||void 0}),t()}catch(b){d(b instanceof Error?b.message:String(b)),l(!1)}},disabled:o,children:o?"Creating…":"Create Workspace"})]})]}),p&&h(MNe,{initialPath:i||void 0,onSelect:(b)=>{if(s(b),m(!1),!r.trim()){let y=b.replace(/[\\/]+$/,"").split(/[\\/]/).pop()||"";if(y)a(y)}},onClose:()=>m(!1)})]})}function sF({isOpen:e,onClose:t}){if(!e)return null;return h("div",{className:"fixed inset-0 bg-ink/20 z-50 flex items-center justify-center p-4",children:h("div",{className:"bg-paper border border-ink/10 rounded-lg shadow-xl w-full max-w-2xl flex flex-col overflow-hidden",children:[h("div",{className:"flex justify-between items-center p-4 border-b border-ink/10 bg-paper",children:[h("div",{className:"flex items-center space-x-2 text-ink",children:[h(Xu,{size:16}),h("h3",{className:"font-semibold text-sm",children:"Schedule Chat / Task"})]}),h(Ln,{size:16,className:"cursor-pointer hover:text-ink/60",onClick:t})]}),h("div",{className:"p-4 bg-canvas",children:h("div",{className:"w-full bg-paper border border-ink/20 rounded-md focus-within:border-ink transition-colors flex flex-col shadow-sm",children:[h("div",{className:"flex items-center px-3 py-2 border-b border-ink/5 text-ink/60 space-x-2",children:[h("button",{className:"hover:text-ink transition-colors",children:h(vr,{size:14})}),h("button",{className:"hover:text-ink transition-colors",children:h(Ng,{size:14})}),h("button",{className:"hover:text-ink transition-colors",children:h(vw,{size:14})}),h("div",{className:"flex-1"}),h("div",{className:"flex items-center space-x-2 text-xs text-ink",children:[h("span",{className:"font-medium",children:"Schedule:"}),h("select",{className:"bg-transparent border border-ink/20 rounded px-1.5 py-0.5 outline-none focus:border-ink/50",children:[h("option",{value:"once",children:"Once"}),h("option",{value:"every",children:"Every"}),h("option",{value:"cron",children:"Cron"})]}),h("input",{type:"text",placeholder:"e.g. 5 mins, 0 0 * * *",className:"w-32 bg-transparent border border-ink/20 rounded px-2 py-0.5 outline-none focus:border-ink/50"})]})]}),h("textarea",{placeholder:"Describe your scheduled task, ask a question, or paste commands...",className:"w-full bg-transparent border-none px-4 py-4 text-sm focus:outline-none resize-none text-ink placeholder-ink/40 min-h-[120px]"}),h("div",{className:"flex items-center justify-between px-3 py-2 border-t border-ink/5",children:[h("div",{className:"flex items-center space-x-3 text-ink/60 text-xs",children:[h("div",{className:"flex items-center space-x-1 hover:text-ink cursor-pointer",children:[h(o1,{size:14}),h("span",{children:"Default"})]}),h("div",{className:"flex items-center space-x-1 hover:text-ink cursor-pointer",children:[h(Ia,{size:14}),h("span",{children:"[CMD] DeepSeek V4 Flash"})]})]}),h("button",{onClick:t,className:"flex items-center justify-center space-x-1.5 px-3 py-1.5 rounded bg-ink text-canvas hover:bg-ink/80 transition-colors text-xs font-medium",children:[h("span",{children:"Schedule Task"}),h(bf,{size:12,className:"ml-px"})]})]})]})})]})})}var jne=R(()=>{lt();bt();rF();$Ne();BNe();fe()});var qne,jNe;var qNe=R(()=>{qne=["A-Z","Z-A","LATEST_SESSION","LATEST_ADDED"],jNe={"A-Z":"A-Z","Z-A":"Z-A",LATEST_SESSION:"Latest Session",LATEST_ADDED:"Latest Added"}});function oF({variant:e,sortOption:t,onSortChange:n}){if(e==="mobile")return h(Et,{children:[h("div",{className:"px-2 py-1 text-[10px] uppercase font-bold text-ink/40 font-mono",children:"Sort Workspaces"}),qne.map((r)=>h("button",{type:"button",onClick:()=>n(r),className:`w-full text-left px-2.5 py-1.5 rounded-lg flex items-center justify-between transition-colors ${t===r?"bg-ink/10 font-semibold text-ink":"hover:bg-ink/5 text-ink/80"}`,children:[h("span",{children:r.replace("_"," ")}),t===r&&h(zt,{size:13,className:"text-ink"})]},r))]});return h(Et,{children:[h("div",{className:"px-3 py-1 text-[10px] uppercase font-bold text-ink/40 tracking-wider",children:"Sort Workspaces"}),qne.map((r)=>h("div",{className:`px-3 py-1.5 text-xs cursor-pointer flex items-center justify-between ${t===r?"bg-ink/5 text-ink font-medium":"text-ink/70 hover:bg-ink/5 hover:text-ink"}`,onClick:()=>n(r),children:[h("span",{children:jNe[r]}),t===r&&h("div",{className:"w-1.5 h-1.5 rounded-full bg-ink"})]},r))]})}var Une=R(()=>{bt();qNe();fe()});function lF(e=5,t=7){let[n,r]=le(e),a=Ze(()=>r((i)=>i+t),[t]);return{visibleCount:n,showMore:a}}var Wne=R(()=>{lt()});function cF(e,t){let[n,r]=le(!1),a=ed(),i=ed(),s=ed();return Ke(()=>{if(a.data?.success||i.data?.success)window.dispatchEvent(new CustomEvent("omp:workspace-updated"))},[i.data,a.data]),{confirmDelete:n,requestDelete:()=>r(!0),cancelDelete:()=>r(!1),handlePin:()=>{if(typeof e.id!=="number")return;a.submit({isPinned:String(!e.isPinned)},{method:"POST",action:`/api/folders/${e.id}/pin`}),t()},handleDelete:()=>{if(typeof e.id!=="number")return;i.submit({},{method:"POST",action:`/api/folders/${e.id}/delete`}),r(!1),t()},handleArchive:(p)=>{let m=p.is_archived!==1;s.submit({archived:String(m)},{method:"POST",action:`/api/sessions/${p.id}/archive`}),t()},handleRename:async(p,m)=>{try{let f=new FormData;if(f.set("name",m),!(await fetch(`/api/sessions/${encodeURIComponent(String(p.id))}/rename`,{method:"POST",body:f})).ok)return}catch{return}window.dispatchEvent(new CustomEvent("omp:session-renamed",{detail:{sessionId:String(p.id),title:m}})),t()}}}var Gne=R(()=>{lt();Bw()});function uF(e,t){let[n,r]=le(!1),[a,i]=le(e),s=De(null),o=De(!1);Ke(()=>{if(n)s.current?.select()},[n]);let l=()=>{o.current=!1,i(e),r(!0)},u=()=>{let f=a.trim();if(r(!1),!f||f===e)return;t?.(f)},d=()=>{o.current=!0,r(!1)};return{isEditing:n,draft:a,setDraft:i,inputRef:s,startRename:l,commitRename:u,cancelRename:d,handleKeyDown:(f)=>{if(f.key==="Enter")f.preventDefault(),u();else if(f.key==="Escape")f.preventDefault(),d()},handleBlur:()=>{if(o.current){o.current=!1;return}u()}}}var Hne=R(()=>{lt()});function dF({status:e,live:t,size:n=12}){let r={size:n,strokeWidth:2,"aria-hidden":!0};if(e==="completed")return h(Wr,{...r,className:"text-success"});if(e==="failed")return h(yr,{...r,className:"text-error"});if(e==="aborted")return h(Yu,{...r,className:"text-ink/40"});if(t===!1)return h(Zb,{...r,className:"text-ink/30"});let a=Math.max(5,Math.round(n/2));return h("span",{"aria-hidden":!0,className:"inline-block shrink-0 animate-pulse rounded-full bg-success",style:{width:a,height:a}})}var Vne=R(()=>{bt();fe()});function Hin(e){return Bn(e)&&typeof e.id==="string"&&e.id.length>0&&typeof e.agent==="string"&&e.agent.length>0&&typeof e.status==="string"&&typeof e.index==="number"}async function HNe(e){try{let t=await fetch(`/api/sessions/${encodeURIComponent(e)}/subagents`);if(!t.ok)return null;let n=await t.json().catch(()=>null);if(!Bn(n))return null;let r=Bn(n.data)?n.data:n;if(!Array.isArray(r.subagents))return null;return r.subagents.filter(Hin)}catch{return null}}function pF(e){let t={...e,source:"history",lastUpdate:0},n={};if(e.lastIntent!==void 0)n.lastIntent=e.lastIntent;if(e.toolCount!==void 0)n.toolCount=e.toolCount;if(e.requests!==void 0)n.requests=e.requests;if(e.tokens!==void 0)n.tokens=e.tokens;if(e.contextTokens!==void 0)n.contextTokens=e.contextTokens;if(e.contextWindow!==void 0)n.contextWindow=e.contextWindow;if(e.cost!==void 0)n.cost=e.cost;if(e.durationMs!==void 0)n.durationMs=e.durationMs;if(e.resolvedModel!==void 0)n.resolvedModel=e.resolvedModel;if(Object.keys(n).length>0)t.progress=n;return t}var Zne=()=>{};function ZNe(e){for(let t of e){let n=t.trim();if(n)return n}return}function YNe(e){if(!e)return;let t=e.split(`
|
|
46
|
+
Follow standard prompt protocol for ${T.name}.`,project:"ompchamber",isInstalledFromCatalog:!0,catalogSource:T.sourceId};fetch("/api/settings/skills",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({skill:I})}).then((O)=>O.json()).then((O)=>{if(O?.skills)a(O.skills);else a((D)=>[...D,I]);v(`Installed skill "${T.name}"`),YC("command")}).catch(console.error)}},S=(T)=>{let A=[...e,T];r(A),o(T.id),fetch("/api/settings/skills",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({catalogSources:A})}).catch(console.error),v(`Added source "${T.name}"`)},w=t.filter((T)=>{let A=!l.trim()||T.name.toLowerCase().includes(l.toLowerCase())||T.description.toLowerCase().includes(l.toLowerCase())||T.repoTag.toLowerCase().includes(l.toLowerCase());if(l.trim())return A;return T.sourceId===s}),C=e.find((T)=>T.id===s)||e[0]||null;return h("div",{className:"flex-1 flex flex-col h-full w-full scrollbar-overlay-container scrollbar-overlay-static bg-paper text-ink p-6 md:p-8 space-y-6",children:[h("div",{children:h("p",{className:"text-xs text-ink/70 leading-relaxed",children:"Install ready-made skills from curated repositories, or add your own source."})}),h("div",{className:"relative",children:[h(ia,{size:15,className:"absolute left-3 top-2.5 text-ink/40 pointer-events-none"}),h("input",{type:"text",value:l,onChange:(T)=>u(T.currentTarget.value),placeholder:"Search skills across all sources...",className:"w-full pl-9 pr-4 py-2 rounded-lg border border-ink/20 hover:border-ink/40 bg-paper focus:outline-none focus:border-ink text-xs text-ink transition-colors"})]}),h("div",{className:"space-y-3",children:[h("h3",{className:"text-xs font-bold uppercase tracking-wider text-ink",children:"Sources"}),h("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:[e.map((T)=>{let A=s===T.id&&!l.trim();return h("div",{onClick:()=>{o(T.id),u("")},className:`p-3.5 rounded-xl border transition-all cursor-pointer select-none relative ${A?"border-ink bg-ink/5 shadow-xs":"border-ink/20 hover:border-ink/40 bg-paper"}`,children:[h("div",{className:"flex items-center justify-between",children:[h("div",{className:"flex items-center gap-2",children:[h("span",{className:"text-xs font-bold text-ink",children:T.name}),h("span",{className:"text-[10px] text-ink/50 font-mono",children:[T.skillCount," skills"]})]}),h(Ur,{size:13,className:`text-ink/40 hover:text-ink transition-colors ${d&&A?"animate-spin":""}`})]}),h("div",{className:"mt-1 font-mono text-[11px] text-ink/60 truncate",children:T.repo}),h("div",{className:"mt-2.5 flex items-center gap-3 text-[10px] text-ink/50",children:[h("span",{className:"flex items-center gap-1",children:[h(l1,{size:11,className:"text-ink/50"}),h("span",{children:T.stars})]}),h("span",{children:T.updatedAt})]})]},T.id)}),h("div",{onClick:()=>f(!0),className:"p-3.5 rounded-xl border border-dashed border-ink/25 hover:border-ink/50 bg-paper hover:bg-ink/[0.02] transition-all cursor-pointer flex items-center gap-3 select-none",children:[h("div",{className:"w-8 h-8 rounded-lg border border-ink/20 flex items-center justify-center text-ink/60 flex-shrink-0",children:h(vr,{size:16})}),h("div",{children:[h("div",{className:"text-xs font-bold text-ink",children:"Add your own source"}),h("div",{className:"text-[11px] text-ink/60",children:"Any Git repository with skills"})]})]})]})]}),h("div",{className:"border-t border-ink/10 pt-4",children:[h("div",{className:"flex items-center justify-between pb-3",children:[h("div",{className:"flex items-center gap-2",children:[h("span",{className:"text-xs font-bold uppercase tracking-wider text-ink",children:l.trim()?"Search Results":C?.name?C.name.toUpperCase():"SKILL CATALOG"}),h("span",{className:"text-xs text-ink/50",children:[w.length," skill(s) found"]})]}),h("button",{type:"button",onClick:x,title:"Refresh skills",className:"p-1 rounded-md text-ink/50 hover:text-ink hover:bg-ink/5 transition-colors cursor-pointer",children:h(Ur,{size:14,className:d?"animate-spin":""})})]}),h("div",{className:"space-y-3",children:w.length===0?h("div",{className:"text-center py-10 border border-dashed border-ink/15 rounded-xl",children:h("p",{className:"text-xs text-ink/60",children:"No skills found matching your query."})}):w.map((T)=>{let A=y.has(T.name);return h("div",{className:"p-4 rounded-xl border border-ink/15 hover:border-ink/30 bg-paper transition-all flex flex-col sm:flex-row sm:items-start justify-between gap-3",children:[h("div",{className:"space-y-1.5 flex-1 min-w-0",children:[h("div",{className:"flex items-center gap-2",children:h("span",{className:"text-xs font-bold text-ink tracking-tight font-mono",children:T.name})}),h("p",{className:"text-xs text-ink/75 leading-relaxed line-clamp-2",children:T.description}),h("div",{className:"flex items-center gap-1.5 text-[11px] text-ink/50 font-mono pt-1",children:[h(zc,{size:12,className:"flex-shrink-0"}),h("span",{className:"truncate",children:T.repoTag})]})]}),h("div",{className:"flex items-center gap-2 flex-shrink-0 self-end sm:self-center",children:[T.githubUrl&&h("a",{href:T.githubUrl,target:"_blank",rel:"noreferrer",className:"p-1.5 rounded-lg text-ink/50 hover:text-ink hover:bg-ink/5 transition-colors cursor-pointer",title:"View repository",children:h(am,{size:14})}),h("button",{type:"button",onClick:()=>_(T),className:`px-3 py-1.5 rounded-lg text-xs font-medium transition-all flex items-center gap-1.5 cursor-pointer ${A?"border border-ink/20 text-ink/80 hover:border-error hover:text-error hover:bg-error/5":"bg-ink text-paper hover:bg-ink/90 shadow-xs"}`,children:A?h(Et,{children:[h(zt,{size:12}),h("span",{children:"Installed"})]}):h(Et,{children:[h(Yd,{size:12}),h("span",{children:"install"})]})})]})]},T.id)})})]}),h(EIe,{isOpen:m,onClose:()=>f(!1),onAddSource:S}),g&&h("div",{className:"fixed bottom-6 right-6 z-50 bg-ink text-paper text-xs font-medium px-4 py-2.5 rounded-lg shadow-lg animate-in fade-in slide-in-from-bottom-2 duration-150 flex items-center gap-2",children:[h(zt,{size:14}),h("span",{children:g})]})]})}var MIe=R(()=>{lt();bt();LIe();f9();IIe();fe()});function $Ie({category:e}){return h("div",{className:"space-y-6 text-ink flex flex-col items-center justify-center py-16",children:[h("div",{className:"text-sm font-semibold capitalize",children:[e.replace("-"," ")," Settings"]}),h("div",{className:"text-xs text-ink/60 text-center max-w-sm mt-2",children:"This settings category is currently under construction and will be available soon."})]})}var PIe=R(()=>{fe()});var OIe;var DIe=R(()=>{OIe={source:"settings-schema.ts",tabs:[{id:"appearance",label:"Appearance",groups:["Theme","Composer","Status Line","Display","Images"]},{id:"model",label:"Model",groups:["Thinking","Sampling","Prompt","Retry & Fallback","Advisor","Prewalk","Vision"]},{id:"interaction",label:"Interaction",groups:["Input","Approvals","Notifications","Speech","Collab","Magic Keywords","Startup & Updates","Power","Agent","Git"]},{id:"context",label:"Context",groups:["General","Compaction","Rules (TTSR)","Experimental"]},{id:"memory",label:"Memory",groups:["General","Auto-Learn","Mnemopi","Hindsight","Sharpshooter"]},{id:"files",label:"Files",groups:["Editing","Reading","Read Summaries","LSP"]},{id:"shell",label:"Shell",groups:["Bash","Eval & Runtimes"]},{id:"tools",label:"Tools",groups:["Available Tools","Todos","Grep & Browser","Computer","GitHub","Output Limits","Execution","Discovery & MCP","Extensions","Developer"]},{id:"tasks",label:"Tasks",groups:["Modes","Subagents","Isolation","Commands & Skills"]},{id:"providers",label:"Providers",groups:["Services","Fireworks","Tiny Model","Protocol","Timeouts","Privacy"]}],entries:{autoResume:{ui:{tab:"interaction",group:"Startup & Updates",label:"Auto Resume",description:"Automatically resume the most recent session in the current directory"},type:"boolean",default:!1},"power.sleepPrevention":{ui:{tab:"interaction",group:"Power",label:"Sleep Prevention",description:"Prevent the system sleeping during active sessions. Each level is cumulative — it adds the flags of all lower levels.",options:[{value:"off",label:"Off",description:"Do not prevent any sleep"},{value:"idle",label:"Prevent Idle Sleep",description:"Keep the system awake while a session is open (macOS `caffeinate -i`)"},{value:"display",label:"Prevent Display Sleep",description:"Also keep the display from idle-sleeping (macOS `caffeinate -i -d`)"},{value:"system",label:"Prevent System Sleep",description:"Also block all system sleep on AC and declare the user active (macOS `caffeinate -i -d -s -u`)"}]},type:"enum",default:"idle",values:["off","idle","display","system"]},"advisor.enabled":{ui:{tab:"model",group:"Advisor",label:"Enable Advisor",description:"Pair a second model (assigned to the 'advisor' role) that passively reviews each turn and injects notes."},type:"boolean",default:!1},"prewalk.enabled":{ui:{tab:"model",group:"Prewalk",label:"Enable Prewalk",description:"Start on the active model, then switch to a fast/cheap model (default the 'smol' role) at the first edit/write after the plan nudge's todo list exists — the strong model plans, commits the todos, and starts the implementation before handing off. Overridable per session with --prewalk / --no-prewalk."},type:"boolean",default:!1},"advisor.syncBacklog":{ui:{tab:"model",group:"Advisor",label:"Advisor Sync Backlog",description:"Pause the main agent for up to 30 seconds if the advisor falls behind by this many turns. Off disables catch-up delays.",condition:"advisorEnabled"},type:"enum",default:"off",values:["off","1","3","5"]},"advisor.immuneTurns":{ui:{tab:"model",group:"Advisor",label:"Advisor Immune Turns",description:"After an advisor concern or blocker interrupts, route further concerns/blockers non-interruptingly for this many primary turns.",condition:"advisorEnabled",options:[{value:"0",label:"0 turns",description:"Allow every concern/blocker to interrupt."},{value:"1",label:"1 turn",description:""},{value:"2",label:"2 turns",description:""},{value:"3",label:"3 turns",description:"Default."},{value:"4",label:"4 turns",description:""},{value:"5",label:"5 turns",description:""}]},type:"number",default:3},"advisor.maxNotesPerUpdate":{ui:{tab:"model",group:"Advisor",label:"Advisor Max Notes Per Update",description:"Maximum non-blocker advice notes accepted per advisor prompt update (1–32; UI offers 1–5 quick picks). Blockers are exempt.",condition:"advisorEnabled",options:[{value:"1",label:"1 note",description:"Anti-flood (strict)."},{value:"2",label:"2 notes",description:""},{value:"3",label:"3 notes",description:""},{value:"4",label:"4 notes",description:"Default."},{value:"5",label:"5 notes",description:""}]},type:"number",default:4},"git.enabled":{ui:{tab:"interaction",group:"Git",label:"Enable Git Integration",description:"Show git branch, status, and PR information in the TUI and watch repository metadata."},type:"boolean",default:!0},"providers.maxInFlightRequests":{ui:{tab:"providers",group:"Services",label:"Max In-Flight Requests",description:'Maximum concurrent LLM requests per provider id (for example "openai" or "anthropic"), shared across local OMP processes with this config root. Omitted providers are unlimited.'},type:"record",default:{}},"providers.openai-codex.codeMode":{ui:{tab:"providers",group:"Services",label:"Codex Code Mode",description:"Route Codex code_mode_only models (GPT-5.6) through eval. The direct tools are eval, ask, todo, yield, think, checkpoint, and rewind. Use eval cells for other session tools. Mirrors codex-rs Code Mode. 'auto' follows the model catalog flag."},type:"enum",default:"off",values:["off","on","auto"]},"providers.openai-codex.codeModeDirectTools":{ui:{tab:"providers",group:"Services",label:"Codex Code Mode Direct Tools",description:"Extra direct tools for Codex Code Mode. The standard direct tools are eval, ask, todo, yield, think, checkpoint, and rewind."},type:"array",default:[]},modelRoleStorage:{ui:{tab:"model",group:"Prompt",label:"Model Role Storage",description:"Where model selector role assignments are saved",options:[{value:"global",label:"Global",description:"Save role models in the active profile config (current behavior)"},{value:"project",label:"Per-project",description:"Save project role models in .omp/config.yml; missing project roles use global defaults"}]},type:"enum",default:"global",values:["global","project"]},"theme.dark":{ui:{tab:"appearance",group:"Theme",label:"Dark Theme",description:"Theme used when the terminal has a dark background",options:"runtime"},type:"string",default:"titanium"},"theme.light":{ui:{tab:"appearance",group:"Theme",label:"Light Theme",description:"Theme used when the terminal has a light background",options:"runtime"},type:"string",default:"light"},symbolPreset:{ui:{tab:"appearance",group:"Theme",label:"Symbol Preset",description:"Glyph set for icons and symbols (Unicode, Nerd Font, or ASCII)",options:[{value:"unicode",label:"Unicode",description:"Standard symbols (default)"},{value:"nerd",label:"Nerd Font",description:"Requires Nerd Font"},{value:"ascii",label:"ASCII",description:"Maximum compatibility"}]},type:"enum",default:"unicode",values:["unicode","nerd","ascii"]},colorBlindMode:{ui:{tab:"appearance",group:"Theme",label:"Color-Blind Mode",description:"Use blue instead of green for diff additions"},type:"boolean",default:!1},"composer.shape":{ui:{tab:"appearance",group:"Composer",label:"Composer Shape",description:"Visual layout of the input editor and status line",options:"runtime"},type:"string",default:"band"},"statusLine.preset":{ui:{tab:"appearance",group:"Status Line",label:"Status Line Preset",description:"Pre-built status line configurations",options:[{value:"default",label:"Default",description:"Model, path, git, context, tokens, cost"},{value:"minimal",label:"Minimal",description:"Path and git only"},{value:"compact",label:"Compact",description:"Model, git, cost, context"},{value:"full",label:"Full",description:"All segments including time"},{value:"nerd",label:"Nerd",description:"Maximum info with Nerd Font icons"},{value:"ascii",label:"ASCII",description:"No special characters"},{value:"custom",label:"Custom",description:"User-defined segments"}]},type:"enum",default:"default",values:["default","minimal","compact","full","nerd","ascii","custom"]},"statusLine.separator":{ui:{tab:"appearance",group:"Status Line",label:"Status Line Separator",description:"Style of separators between segments",options:[{value:"powerline",label:"Powerline",description:"Solid arrows (Nerd Font)"},{value:"powerline-thin",label:"Thin chevron",description:"Thin arrows (Nerd Font)"},{value:"slash",label:"Slash",description:"Forward slashes"},{value:"pipe",label:"Pipe",description:"Vertical pipes"},{value:"block",label:"Block",description:"Solid blocks"},{value:"none",label:"None",description:"Space only"},{value:"ascii",label:"ASCII",description:"Greater-than signs"}]},type:"enum",default:"powerline-thin",values:["powerline","powerline-thin","slash","pipe","block","none","ascii"]},"statusLine.contextLine":{ui:{tab:"appearance",group:"Status Line",label:"Context-Reactive Line",description:"How the line between the left and right segments reflects context usage (box composer only)",options:[{value:"off",label:"Off",description:"Solid accent line, no context feedback"},{value:"percentage",label:"Percentage",description:"Used portion in accent color, remainder dimmed"},{value:"annotated",label:"Annotated",description:"Percentage plus ticks at the speculative and auto-compaction boundaries"},{value:"embedded",label:"Embedded",description:"Annotated line with the context percentage and window embedded in the gauge"}]},type:"enum",default:"embedded",values:["off","percentage","annotated","embedded"]},"statusLine.sessionAccent":{ui:{tab:"appearance",group:"Status Line",label:"Session Accent",description:"Use the session name color for the editor border and status line gap"},type:"boolean",default:!0},"statusLine.transparent":{ui:{tab:"appearance",group:"Status Line",label:"Transparent Status Line",description:"Use the terminal's default background for the status line instead of the theme's `statusLineBg`. Powerline end caps are dropped because they need a contrasting fill to bridge into the surrounding terminal."},type:"boolean",default:!1},"statusLine.compactThinkingLevel":{ui:{tab:"appearance",group:"Status Line",label:"Compact Thinking Level",description:"Show the thinking level as a single icon on the model name instead of a separate ` · <level>` suffix."},type:"boolean",default:!0},"tools.artifactSpillThreshold":{ui:{tab:"tools",group:"Output Limits",label:"Artifact Spill Threshold (KB)",description:"Tool output above this size is saved as an artifact; tail is kept inline",options:[{value:"1",label:"1 KB",description:"~250 tokens"},{value:"2.5",label:"2.5 KB",description:"~625 tokens"},{value:"5",label:"5 KB",description:"~1.25K tokens"},{value:"10",label:"10 KB",description:"~2.5K tokens"},{value:"20",label:"20 KB",description:"~5K tokens"},{value:"30",label:"30 KB",description:"~7.5K tokens"},{value:"50",label:"50 KB",description:"Default; ~12.5K tokens"},{value:"75",label:"75 KB",description:"~19K tokens"},{value:"100",label:"100 KB",description:"~25K tokens"},{value:"200",label:"200 KB",description:"~50K tokens"},{value:"500",label:"500 KB",description:"~125K tokens"},{value:"1000",label:"1 MB",description:"~250K tokens"}]},type:"number",default:50},"tools.artifactTailBytes":{ui:{tab:"tools",group:"Output Limits",label:"Artifact Tail Size (KB)",description:"Amount of tail content kept inline when output spills to artifact",options:[{value:"1",label:"1 KB",description:"~250 tokens"},{value:"2.5",label:"2.5 KB",description:"~625 tokens"},{value:"5",label:"5 KB",description:"~1.25K tokens"},{value:"10",label:"10 KB",description:"~2.5K tokens"},{value:"20",label:"20 KB",description:"Default; ~5K tokens"},{value:"50",label:"50 KB",description:"~12.5K tokens"},{value:"100",label:"100 KB",description:"~25K tokens"},{value:"200",label:"200 KB",description:"~50K tokens"}]},type:"number",default:20},"tools.artifactHeadBytes":{ui:{tab:"tools",group:"Output Limits",label:"Artifact Head Size (KB)",description:"Amount of head content kept inline alongside the tail when output spills to artifact (middle elision). 0 disables — keep tail only.",options:[{value:"0",label:"0 KB",description:"Disabled; tail-only truncation"},{value:"1",label:"1 KB",description:"~250 tokens"},{value:"2.5",label:"2.5 KB",description:"~625 tokens"},{value:"5",label:"5 KB",description:"~1.25K tokens"},{value:"10",label:"10 KB",description:"~2.5K tokens"},{value:"20",label:"20 KB",description:"Default; ~5K tokens"},{value:"50",label:"50 KB",description:"~12.5K tokens"},{value:"100",label:"100 KB",description:"~25K tokens"},{value:"200",label:"200 KB",description:"~50K tokens"}]},type:"number",default:20},"tools.outputMaxColumns":{ui:{tab:"tools",group:"Output Limits",label:"Output Column Cap",description:"Per-line byte cap for streaming tool outputs (bash, python, js eval) and `read`. Lines wider than this are ellipsis-truncated; remaining bytes up to the next newline are dropped. 0 disables.",options:[{value:"0",label:"Off",description:"No per-line cap"},{value:"256",label:"256",description:"Tight"},{value:"512",label:"512",description:""},{value:"768",label:"768",description:"Default"},{value:"1024",label:"1024",description:""},{value:"2048",label:"2048",description:""},{value:"4096",label:"4096",description:"Loose"}]},type:"number",default:768},"tools.artifactTailLines":{ui:{tab:"tools",group:"Output Limits",label:"Artifact Tail Lines",description:"Maximum lines of tail content kept inline when output spills to artifact",options:[{value:"50",label:"50 lines",description:"~250 tokens"},{value:"100",label:"100 lines",description:"~500 tokens"},{value:"250",label:"250 lines",description:"~1.25K tokens"},{value:"500",label:"500 lines",description:"Default; ~2.5K tokens"},{value:"1000",label:"1000 lines",description:"~5K tokens"},{value:"2000",label:"2000 lines",description:"~10K tokens"},{value:"5000",label:"5000 lines",description:"~25K tokens"}]},type:"number",default:500},"statusLine.showHookStatus":{ui:{tab:"appearance",group:"Status Line",label:"Show Hook Status",description:"Display hook status messages below the status line"},type:"boolean",default:!0},"terminal.showImages":{ui:{tab:"appearance",group:"Images",label:"Show Inline Images",description:"Render images inline in the terminal",condition:"hasImageProtocol"},type:"boolean",default:!0},"images.autoResize":{ui:{tab:"appearance",group:"Images",label:"Auto-Resize Images",description:"Resize large images to 2000x2000 max for better model compatibility"},type:"boolean",default:!0},"images.blockImages":{ui:{tab:"appearance",group:"Images",label:"Block Images",description:"Prevent images from being sent to LLM providers"},type:"boolean",default:!1},"images.describeForTextModels":{ui:{tab:"model",group:"Vision",label:"Describe Images for Text Models",description:"When an image is attached to a model without vision support, save it under local:// and inject a description from a vision-capable model instead of dropping it"},type:"boolean",default:!0},"images.urls.enabled":{ui:{tab:"model",group:"Vision",label:"Serve Images as URLs",description:"Publish outgoing images through the configured backend chain and send URL-fetching providers short URLs instead of inline base64. Falls back to inline automatically when every backend or a provider fetch fails"},type:"boolean",default:!1},"images.urls.backends":{ui:{tab:"model",group:"Vision",label:"Image URL Backends",description:"Ordered destinations tried when publishing images for provider access",ordered:!0,options:[{value:"imgur",label:"Imgur",description:"Uploads require either an Imgur access token or client ID."},{value:"imageshack",label:"ImageShack",description:"The API requires a paid subscription."},{value:"flickr",label:"Flickr",description:"image-host"},{value:"chevereto",label:"Chevereto",description:"self-hosted"},{value:"vgyme",label:"vgy.me",description:"image-host"},{value:"dropbox",label:"Dropbox",description:"cloud-files"},{value:"ftp",label:"FTP / FTPS / SFTP",description:"file-transfer"},{value:"onedrive",label:"OneDrive",description:"cloud-files"},{value:"google-drive",label:"Google Drive",description:"cloud-files"},{value:"puush",label:"puush-compatible endpoint",description:"The public service is defunct; a replacement endpoint is required."},{value:"box",label:"Box",description:"cloud-files"},{value:"amazon-s3",label:"Amazon S3",description:"s3"},{value:"google-cloud-storage",label:"Google Cloud Storage",description:"object-storage"},{value:"azure-storage",label:"Azure Blob Storage",description:"object-storage"},{value:"backblaze-b2",label:"Backblaze B2",description:"Configure either native B2 application keys or S3-compatible access keys."},{value:"owncloud",label:"ownCloud / Nextcloud",description:"webdav"},{value:"mediafire",label:"MediaFire-compatible endpoint",description:"The public API is deprecated; a replacement endpoint is required."},{value:"sendspace",label:"SendSpace-compatible endpoint",description:"The public discovery API is deprecated; a replacement endpoint is required."},{value:"localhostr",label:"Hostr-compatible endpoint",description:"The public service is offline; a replacement endpoint is required."},{value:"lambda",label:"Lambda-compatible endpoint",description:"The public service is offline; a replacement endpoint is required."},{value:"pomf",label:"Pomf",description:"pomf"},{value:"uguu",label:"Uguu",description:"Public uploads expire after approximately three hours."},{value:"seafile",label:"Seafile",description:"cloud-files"},{value:"s-ul",label:"s-ul",description:"file-host"},{value:"lobfile",label:"LobFile-compatible endpoint",description:"The public service is offline; a replacement endpoint is required."},{value:"transfer-sh",label:"transfer.sh-compatible endpoint",description:"The defunct public endpoint is blocked; a self-hosted replacement is required."},{value:"plik",label:"Plik",description:"self-hosted"},{value:"shared-folder",label:"Shared folder",description:"filesystem"},{value:"catbox",label:"Catbox",description:"anonymous-host"},{value:"litterbox",label:"Litterbox",description:"Uploads are temporary."},{value:"0x0",label:"0x0.st",description:"Public uploads expire after a retention window determined by file size."},{value:"tmpfiles",label:"tmpfiles.org",description:"Public uploads are temporary."},{value:"discord",label:"Discord",description:"messaging"},{value:"provider-files",label:"Model provider files",description:"Provider file references are API-local rather than public image URLs."},{value:"direct",label:"Direct public URL",description:"local-serving"},{value:"cloudflared",label:"Cloudflare quick tunnel",description:"tunnel"},{value:"ngrok",label:"ngrok",description:"tunnel"},{value:"tailscale",label:"Tailscale Funnel",description:"tunnel"},{value:"ssh",label:"SSH reverse tunnel",description:"tunnel"},{value:"command",label:"Uploader command",description:"external-command"},{value:"localhost-run",label:"localhost.run",description:"tunnel"},{value:"pinggy",label:"Pinggy",description:"tunnel"},{value:"devtunnel",label:"Microsoft dev tunnel",description:"The devtunnel CLI must be logged in locally."},{value:"zrok",label:"zrok",description:"The local zrok environment must be enabled."},{value:"bore",label:"bore",description:"tunnel"},{value:"named-cloudflared",label:"Named Cloudflare Tunnel",description:"tunnel"},{value:"r2",label:"Cloudflare R2",description:"s3"},{value:"tigris",label:"Tigris",description:"s3"},{value:"minio",label:"MinIO",description:"s3"},{value:"garage",label:"Garage",description:"s3"}]},type:"array",default:["provider-files","tailscale","cloudflared","litterbox"]},"images.urls.command":{ui:{tab:"model",group:"Vision",label:"Image Upload Command",description:"Argv template for the command backend; {file} is the image path, {mime}/{ext} optional. The last URL printed on stdout is used (e.g. pasta -b -f {file})"},type:"string"},"images.urls.publicBaseUrl":{ui:{tab:"model",group:"Vision",label:"Image URL Public Base",description:"Externally reachable base URL fronting the blob server (required for ssh, optional for direct)"},type:"string"},"images.urls.ttlHours":{ui:{tab:"model",group:"Vision",label:"Image URL Lifetime (hours)",description:"Serving window for locally hosted image URLs, measured from the last time a conversation sent them; resuming a conversation re-arms the window at the same link. 0 keeps links alive while the broker runs"},type:"number",default:72},"images.urls.bindHost":{ui:{tab:"model",group:"Vision",label:"Image URL Bind Host",description:"Host the blob server binds to; loopback for tunnels, 0.0.0.0 for direct serving"},type:"string",default:"127.0.0.1"},"images.urls.sshTarget":{ui:{tab:"model",group:"Vision",label:"Image URL SSH Target",description:"user@host destination for the ssh reverse forward"},type:"string"},"images.urls.sshRemotePort":{ui:{tab:"model",group:"Vision",label:"Image URL SSH Remote Port",description:"Remote listen port of the ssh reverse forward that your web server proxies to"},type:"number",default:8787},"tui.resizeScrollback":{ui:{tab:"appearance",group:"Display",label:"Resize Scrollback",description:"How a settled terminal resize refreshes transcript rows retained in terminal scrollback",options:[{value:"append",label:"Append",description:"Replay the transcript at the new width below retained history"},{value:"rebuild",label:"Rebuild",description:"Erase all terminal scrollback, then replay one current-width transcript"},{value:"preserve",label:"Preserve",description:"Repaint only the viewport and keep history wrapped at its old width"}]},type:"enum",default:"rebuild",values:["append","rebuild","preserve"]},"terminal.showProgress":{ui:{tab:"appearance",group:"Display",label:"Native Terminal Progress",description:"Emit OSC 9;4 indeterminate progress while the agent or context maintenance is running"},type:"boolean",default:!1},"tui.textSizing":{ui:{tab:"appearance",group:"Display",label:"Large Headings (Kitty)",description:"Render Markdown H1 headings at 2x scale using Kitty's OSC 66 text-sizing protocol. Only takes effect on Kitty terminals; ignored everywhere else. Off by default."},type:"boolean",default:!1},"tui.renderMermaid":{ui:{tab:"appearance",group:"Display",label:"Render Mermaid Diagrams",description:"Render Mermaid fenced code blocks as ASCII diagrams"},type:"boolean",default:!0},"tui.reactions":{ui:{tab:"appearance",group:"Display",label:"Agent Reactions",description:"Invite the agent to react to your message with an emoji badge on its bubble"},type:"boolean",default:!0},"tui.codexResetFireworks":{ui:{tab:"appearance",group:"Display",label:"Codex Reset Fireworks",description:"Celebrate unscheduled Codex weekly usage resets and newly banked saved resets with a top-third fireworks overlay that remains until Escape"},type:"boolean",default:!1},"tui.titleState":{ui:{tab:"appearance",group:"Display",label:"Terminal Title Run State",description:"Show the agent run state in the terminal title's separator — an animated spinner while working (a static ':' under WSL), '>' when it's your turn, '!' when the agent is waiting on you"},type:"boolean",default:!0},"tui.titleSpinner":{ui:{tab:"appearance",group:"Display",label:"Terminal Title Spinner",description:"Glyph set for the working-state spinner in the terminal title — braille sweep, filling moon, single-dot cycle, or ASCII-safe line",options:[{value:"braille",label:"Braille",description:"Classic ⠋⠙⠹ sweep (default)"},{value:"pulse",label:"Pulse",description:"Moon filling ○◑● then emptying"},{value:"dots",label:"Dots",description:"Single braille dots cycling"},{value:"line",label:"Line",description:"ASCII - \\ | / for fonts without braille coverage"}]},type:"enum",default:"braille",values:["braille","pulse","dots","line"]},"tui.hyperlinks":{ui:{tab:"appearance",group:"Display",label:"Terminal Hyperlinks",description:"Wrap paths and URLs in OSC 8 hyperlinks for terminal-native click-to-open (auto: detect support; off: never; always: unconditional)"},type:"enum",default:"auto",values:["off","auto","always"]},"tui.mouse":{ui:{tab:"appearance",group:"Display",label:"Mouse Click-to-Focus",description:"Capture mouse clicks in the main session so live subagent cards and HUD rows focus on click, with a hover highlight on the target. Native text selection becomes Shift+drag and wheel scroll becomes Shift+wheel while on"},type:"boolean",default:!1},"tui.tight":{ui:{tab:"appearance",group:"Display",label:"Tight Layout",description:"Remove the 1-character horizontal padding from the left and right of the terminal output"},type:"boolean",default:!1},"display.shimmer":{ui:{tab:"appearance",group:"Display",label:"Shimmer",description:"Animation style for working/loading messages",options:[{value:"classic",label:"Classic",description:"Soft cosine wave sweeping across the text"},{value:"kitt",label:"KITT Scanner",description:"Knight Rider 1982 red light bouncing left-right"},{value:"disabled",label:"Disabled",description:"No animation; static muted text"}]},type:"enum",default:"classic",values:["classic","kitt","disabled"]},"display.pinnedAgents":{ui:{tab:"appearance",group:"Display",label:"Pinned Agents",description:"Pinned live-agent jump list above the editor (off hides it; collapsed shows a few rows with an expander; full lists all)",options:[{value:"off",label:"Off",description:"Hide the pinned jump list"},{value:"collapsed",label:"Collapsed",description:"Show a few rows with an expander"},{value:"full",label:"Full",description:"Always list every live agent"}]},type:"enum",default:"collapsed",values:["off","collapsed","full"]},"display.smoothStreaming":{ui:{tab:"appearance",group:"Display",label:"Smooth Streaming",description:"Reveal assistant text and streamed tool input smoothly while chunks arrive"},type:"boolean",default:!0},"display.hideToolActivity":{ui:{tab:"appearance",group:"Display",label:"Hide Tool Activity",description:"Hide model-initiated tool calls and results from the transcript"},type:"boolean",default:!1},"display.showTokenUsage":{ui:{tab:"appearance",group:"Display",label:"Show Token Usage",description:"Show per-turn token usage on assistant messages"},type:"boolean",default:!1},"display.showTurnTime":{ui:{tab:"appearance",group:"Display",label:"Show Turn Time",description:"Show the total prompt-to-yield time (including tool calls) on assistant message usage rows"},type:"boolean",default:!1},"display.cacheMissMarker":{ui:{tab:"appearance",group:"Display",label:"Cache Miss Marker",description:"Show a divider after an assistant turn whose request lost (missed) the prompt cache"},type:"boolean",default:!1},"display.collapseCompacted":{ui:{tab:"appearance",group:"Display",label:"Collapse Compacted History",description:"Collapse pre-compaction history behind the summary divider on the live transcript; disable to keep the full transcript inline with dividers at each compaction point"},type:"boolean",default:!0},showHardwareCursor:{ui:{tab:"appearance",group:"Display",label:"Show Hardware Cursor",description:"Show terminal cursor for IME support"},type:"boolean",default:!0},"tui.imeSafeCursor":{ui:{tab:"appearance",group:"Display",label:"IME-Safe Prompt Layout",description:"Move the prompt's bottom border to a separate row so macOS IME preedit cannot displace it"},type:"boolean",default:!1},defaultThinkingLevel:{ui:{tab:"model",group:"Thinking",label:"Thinking Level",description:"Reasoning depth for thinking-capable models",options:[{value:"auto",label:"auto",description:"Auto-detect per prompt"},{value:"minimal",label:"min",description:"Very brief reasoning (~1k tokens)"},{value:"low",label:"low",description:"Light reasoning (~2k tokens)"},{value:"medium",label:"medium",description:"Moderate reasoning (~8k tokens)"},{value:"high",label:"high",description:"Deep reasoning (~16k tokens)"},{value:"xhigh",label:"xhigh",description:"Extended reasoning (~32k tokens)"},{value:"max",label:"max",description:"Maximum reasoning the model supports"}]},type:"enum",default:"high",values:["minimal","low","medium","high","xhigh","max","auto"]},hideThinkingBlock:{ui:{tab:"model",group:"Thinking",label:"Hide Thinking Blocks",description:"Hide thinking blocks in assistant responses"},type:"boolean",default:!1},proseOnlyThinking:{ui:{tab:"model",group:"Thinking",label:"Prose Only Thinking",description:"Omit code blocks from thinking summaries and replace them with an ellipsis"},type:"boolean",default:!0},omitThinking:{ui:{tab:"model",group:"Thinking",label:"Omit Thinking summaries",description:"Instruct upstream providers to completely omit thinking summaries from responses (where supported)"},type:"boolean",default:!1},externalThinking:{ui:{tab:"model",group:"Thinking",label:"External Thinking",description:"Private scratchpad; not shown to user. Disables supported GPT, Claude, and Gemini reasoning",warning:"At your own risk: providers have flagged this request shape as abuse, up to account-level enforcement"},type:"boolean",default:!1},"model.loopGuard.enabled":{ui:{tab:"model",group:"Thinking",label:"Loop Guard",description:"Enable automatic stream loop detection for model reasoning and prose"},type:"boolean",default:!0},"model.loopGuard.checkAssistantContent":{ui:{tab:"model",group:"Thinking",label:"Loop Guard Scan Prose",description:"Apply loop guard to assistant prose messages in addition to thinking logs"},type:"boolean",default:!0},"model.loopGuard.toolCallReminder":{ui:{tab:"model",group:"Thinking",label:"Loop Guard Tool-Call Reminder",description:"When a Gemini reasoning stream emits many consecutive planning headers without calling a tool, interrupt it and inject a reminder to issue a tool call (requires Loop Guard)"},type:"boolean",default:!0},"model.toolCallLoopGuard.enabled":{ui:{tab:"model",group:"Thinking",label:"Tool-Call Loop Guard",description:"Detect consecutive identical tool calls across turns and inject a corrective steer"},type:"boolean",default:!0},"model.toolCallLoopGuard.threshold":{ui:{tab:"model",group:"Thinking",label:"Tool-Call Loop Threshold",description:"Consecutive identical tool calls required before the corrective steer is injected"},type:"number",default:5},"model.toolCallLoopGuard.exemptTools":{ui:{tab:"model",group:"Thinking",label:"Tool-Call Loop Exempt Tools",description:"Tool names that may repeat consecutively without triggering the cross-turn loop guard"},type:"array",default:["hub"]},inlineToolDescriptors:{ui:{tab:"model",group:"Prompt",label:"Inline Tool Descriptors",description:"Render full tool descriptors in the system prompt and strip top-level/nested descriptions from provider tool schemas so descriptor text is sent once. Auto enables this for Gemini models and disables it otherwise",options:[{value:"auto",label:"Auto",description:"Inline descriptors for Gemini models; keep them in tool schemas otherwise"},{value:"on",label:"On",description:"Always inline descriptors in the system prompt"},{value:"off",label:"Off",description:"Keep descriptors in provider tool schemas only"}]},type:"enum",default:"auto",values:["auto","on","off"]},includeModelInPrompt:{ui:{tab:"model",group:"Prompt",label:"Include Model in Prompt",description:"Surface the active model identifier in the system prompt so the agent knows which model it is"},type:"boolean",default:!0},includeWorkspaceTree:{ui:{tab:"model",group:"Prompt",label:"Include Workspace Tree",description:"Render the workspace directory tree in the system prompt. WARNING: This can bust prompt caching across sessions when files are modified."},type:"boolean",default:!1},skillful:{ui:{tab:"model",group:"Prompt",label:"List Skills in Prompt",description:"List available skills in the system prompt; disable to save context and toggle per-session with /skillful"},type:"boolean",default:!0},"workspace.additionalDirectories":{ui:{tab:"context",group:"General",label:"Additional Workspace Dirs",description:"Extra workspace directories added to every session as additional roots (multi-root workspace). Managed live via /add-dir and /remove-dir. Paths resolve relative to cwd; absolute paths recommended. The agent is told these roots exist and can read/grep/glob them."},type:"array",default:[]},personality:{ui:{tab:"model",group:"Prompt",label:"Personality",description:"Communication style rendered into the system prompt's personality block",options:[{value:"default",label:"Default",description:"Terse, evidence-first engineer; dense, action-oriented replies"},{value:"friendly",label:"Friendly",description:"Warm, encouraging collaborator focused on momentum and morale"},{value:"pragmatic",label:"Pragmatic",description:"Direct, efficient engineer focused on clarity and rigor"},{value:"none",label:"None",description:"Omit the personality block entirely"}]},type:"enum",default:"default",values:["default","friendly","pragmatic","none"]},temperature:{ui:{tab:"model",group:"Sampling",label:"Temperature",description:"Sampling temperature (0 = deterministic, 1 = creative, -1 = provider default)",options:[{value:"-1",label:"Default",description:"Use provider default"},{value:"0",label:"0",description:"Deterministic"},{value:"0.2",label:"0.2",description:"Focused"},{value:"0.5",label:"0.5",description:"Balanced"},{value:"0.7",label:"0.7",description:"Creative"},{value:"1",label:"1",description:"Maximum variety"}]},type:"number",default:-1},topP:{ui:{tab:"model",group:"Sampling",label:"Top P",description:"Nucleus sampling cutoff (0-1, -1 = provider default)",options:[{value:"-1",label:"Default",description:"Use provider default"},{value:"0.1",label:"0.1",description:"Very focused"},{value:"0.3",label:"0.3",description:"Focused"},{value:"0.5",label:"0.5",description:"Balanced"},{value:"0.9",label:"0.9",description:"Broad"},{value:"1",label:"1",description:"No nucleus filtering"}]},type:"number",default:-1},topK:{ui:{tab:"model",group:"Sampling",label:"Top K",description:"Sample from top-K tokens (-1 = provider default)",options:[{value:"-1",label:"Default",description:"Use provider default"},{value:"1",label:"1",description:"Greedy top token"},{value:"20",label:"20",description:"Focused"},{value:"40",label:"40",description:"Balanced"},{value:"100",label:"100",description:"Broad"}]},type:"number",default:-1},minP:{ui:{tab:"model",group:"Sampling",label:"Min P",description:"Minimum probability threshold (0-1, -1 = provider default)",options:[{value:"-1",label:"Default",description:"Use provider default"},{value:"0.01",label:"0.01",description:"Very permissive"},{value:"0.05",label:"0.05",description:"Balanced"},{value:"0.1",label:"0.1",description:"Strict"}]},type:"number",default:-1},presencePenalty:{ui:{tab:"model",group:"Sampling",label:"Presence Penalty",description:"Penalty for introducing already-present tokens (-1 = provider default)",options:[{value:"-1",label:"Default",description:"Use provider default"},{value:"0",label:"0",description:"No penalty"},{value:"0.5",label:"0.5",description:"Mild novelty"},{value:"1",label:"1",description:"Encourage novelty"},{value:"2",label:"2",description:"Strong novelty"}]},type:"number",default:-1},repetitionPenalty:{ui:{tab:"model",group:"Sampling",label:"Repetition Penalty",description:"Penalty for repeated tokens (-1 = provider default)",options:[{value:"-1",label:"Default",description:"Use provider default"},{value:"0.8",label:"0.8",description:"Allow repetition"},{value:"1",label:"1",description:"No penalty"},{value:"1.1",label:"1.1",description:"Mild penalty"},{value:"1.2",label:"1.2",description:"Balanced"},{value:"1.5",label:"1.5",description:"Strong penalty"}]},type:"number",default:-1},textVerbosity:{ui:{tab:"model",group:"Sampling",label:"Text Verbosity",description:"OpenAI Responses and Codex response verbosity (low, medium, or high)",options:[{value:"low",label:"Low",description:"Prefer concise responses"},{value:"medium",label:"Medium",description:"Balance brevity and detail (default)"},{value:"high",label:"High",description:"Prefer detailed responses"}]},type:"enum",default:"medium",values:["low","medium","high"]},"tier.openai":{ui:{tab:"model",group:"Sampling",label:"Service Tier — OpenAI",description:"Processing tier for OpenAI / OpenAI-Codex requests, and OpenAI-family models routed via OpenRouter (none = omit). Sent as `service_tier`.",options:[{value:"none",label:"None",description:"Omit service_tier (standard processing)"},{value:"auto",label:"Auto",description:"Provider default tier selection"},{value:"default",label:"Default",description:"Standard priority processing"},{value:"flex",label:"Flex",description:"Lower cost, higher latency when available"},{value:"scale",label:"Scale",description:"Scale Tier credits when available"},{value:"priority",label:"Priority",description:"Faster, higher cost (premium request)"}]},type:"enum",default:"none",values:["none","auto","default","flex","scale","priority"]},"tier.anthropic":{ui:{tab:"model",group:"Sampling",label:"Service Tier — Anthropic",description:'Processing tier for Claude requests. `priority` realizes fast mode (`speed: "fast"`) on supported direct Anthropic models; ignored on Bedrock/Vertex Claude and via OpenRouter.',options:[{value:"none",label:"None",description:"Standard processing"},{value:"priority",label:"Priority",description:'Fast mode (`speed: "fast"`) on supported direct Claude models; ignored on Bedrock/Vertex'}]},type:"enum",default:"none",values:["none","priority"]},"tier.google":{ui:{tab:"model",group:"Sampling",label:"Service Tier — Google",description:"Processing tier for Gemini (Google AI Studio + Vertex) requests, and Google-family models routed via OpenRouter (none = omit). Sent as the top-level `serviceTier` field.",options:[{value:"none",label:"None",description:"Standard processing"},{value:"flex",label:"Flex",description:"Lower cost, higher latency (Gemini API + Vertex)"},{value:"priority",label:"Priority",description:"Faster, higher reliability (Gemini API + Vertex)"}]},type:"enum",default:"none",values:["none","flex","priority"]},"tier.subagent":{ui:{tab:"model",group:"Sampling",label:"Service Tier — Subagent",description:"Service Tier for spawned task/eval subagents. Inherit = match the main agent's live per-family tiers (tracks /fast); pick a value to apply it to whichever family the subagent's model belongs to.",options:[{value:"inherit",label:"Inherit",description:"Match the main agent's live per-family tiers"},{value:"none",label:"None",description:"Standard processing"},{value:"auto",label:"Auto",description:"Provider default tier selection (OpenAI family)"},{value:"default",label:"Default",description:"Standard priority processing (OpenAI family)"},{value:"flex",label:"Flex",description:"Flexible capacity tier (OpenAI/Google families)"},{value:"scale",label:"Scale",description:"Scale Tier credits (OpenAI family)"},{value:"priority",label:"Priority",description:"Priority on every supported family of the spawned model"}]},type:"enum",default:"inherit",values:["inherit","none","auto","default","flex","scale","priority"]},"tier.advisor":{ui:{tab:"model",group:"Sampling",label:"Service Tier — Advisor",description:"Service Tier for the advisor model. None = standard processing; Inherit = match the main agent's live per-family tiers; pick a value to apply it to the advisor model's family.",condition:"advisorEnabled",options:[{value:"inherit",label:"Inherit",description:"Match the main agent's live per-family tiers"},{value:"none",label:"None",description:"Standard processing"},{value:"auto",label:"Auto",description:"Provider default tier selection (OpenAI family)"},{value:"default",label:"Default",description:"Standard priority processing (OpenAI family)"},{value:"flex",label:"Flex",description:"Flexible capacity tier (OpenAI/Google families)"},{value:"scale",label:"Scale",description:"Scale Tier credits (OpenAI family)"},{value:"priority",label:"Priority",description:"Priority on every supported family of the spawned model"}]},type:"enum",default:"none",values:["inherit","none","auto","default","flex","scale","priority"]},"retry.maxRetries":{ui:{tab:"model",group:"Retry & Fallback",label:"Retry Attempts",description:"Maximum retry attempts on API errors",options:[{value:"1",label:"1 retry",description:""},{value:"2",label:"2 retries",description:""},{value:"3",label:"3 retries",description:""},{value:"5",label:"5 retries",description:""},{value:"10",label:"10 retries",description:""}]},type:"number",default:10},"retry.maxDelayMs":{ui:{tab:"model",group:"Retry & Fallback",label:"Max Retry Delay",description:"Maximum wait between retries, in ms. When the provider asks us to wait longer than this and no credential or model fallback succeeds, the request fails fast instead of sleeping (e.g. 3-hour Anthropic rate-limit windows). 0 disables the ceiling — to let the session auto-resume through provider-stated quota resets."},type:"number",default:300000},"retry.waitForUsageReset":{ui:{tab:"model",group:"Retry & Fallback",label:"Wait For Usage Reset",description:"When a provider reports usage-limit exhaustion with a reset time (5-hour or weekly quota windows on any provider), sleep until the reset instead of failing fast past retry.maxDelayMs. Waits are abortable (Esc) but also hold subagents, so leave off for unattended runs."},type:"boolean",default:!1},"retry.modelFallback":{ui:{tab:"model",group:"Retry & Fallback",label:"Retry Model Fallback",description:"Allow retry recovery to switch to configured fallback models"},type:"boolean",default:!0},"retry.usageAwareFallback":{ui:{tab:"model",group:"Retry & Fallback",label:"Usage-Aware Fallback",description:"Use reliable coding-plan quota reports to prefer same-provider accounts, then configured fallback models, before a hard usage limit. Ordinary configured API keys are excluded."},type:"boolean",default:!1},"retry.usageReservePct":{ui:{tab:"model",group:"Retry & Fallback",label:"Reserve Margin",description:"Treat a coding-plan model as near its limit below this remaining percentage. Unknown or unmapped usage keeps the primary model.",condition:"usageAwareFallbackEnabled",options:[{value:"5",label:"5%",description:"Act only when nearly exhausted"},{value:"10",label:"10%",description:"Balanced safety margin"},{value:"15",label:"15%",description:"Conservative"},{value:"20",label:"20%",description:"Early protection"},{value:"25",label:"25%",description:"Very conservative"}]},type:"number",default:10},"retry.usageReservePolicy":{ui:{tab:"model",group:"Retry & Fallback",label:"Reserve Policy",description:"What to do when every same-provider coding-plan account is inside the reserve margin.",condition:"usageAwareFallbackEnabled",options:[{value:"confirm",label:"Confirm interactively",description:"Keep interactive sessions on the primary until confirmed; background agents auto-fallback"},{value:"auto",label:"Auto-fallback",description:"Always select the next eligible configured fallback"},{value:"fail-closed",label:"Fail closed",description:"Do not spend reserve quota or select a fallback"}]},type:"enum",default:"confirm",values:["confirm","auto","fail-closed"]},"retry.fallbackChains":{ui:{tab:"model",group:"Retry & Fallback",label:"Retry Fallback Chains",description:`JSON object mapping model roles, model selectors ("provider/model-id"), or provider wildcards ("provider/*") to ordered fallback selectors, e.g. {"default":["openai/gpt-4o-mini"],"google-antigravity/*":["google/*","google-vertex/*"]}. Model-oriented keys apply whenever that model/provider is active, regardless of role; a "provider/*" entry keeps the failing model's id and swaps the provider. An id-prefixed wildcard ("openrouter/google/*") re-prefixes the failing model's bare id (google-antigravity/gemini-x -> openrouter/google/gemini-x) and, used as a key, matches only that provider's ids under the prefix. A fallback entry may carry an explicit thinking suffix ("provider/model:low", ":high", ":max", ":off"); a bare entry inherits the failing turn's effort, and "provider/*" entries always inherit.`},type:"record",default:{}},"retry.fallbackRevertPolicy":{ui:{tab:"model",group:"Retry & Fallback",label:"Fallback Revert Policy",description:"When to return to the primary model after a fallback",options:[{value:"cooldown-expiry",label:"Cooldown expiry",description:"Return to the primary model after its suppression window ends"},{value:"never",label:"Never",description:"Stay on the fallback model until manually changed"}]},type:"enum",default:"cooldown-expiry",values:["cooldown-expiry","never"]},"providers.anthropic.serverSideFallback":{ui:{tab:"model",group:"Retry & Fallback",label:"Anthropic Server-Side Fallback (Fable 5)",description:"When a Claude Fable 5 / Mythos 5 request is blocked by Anthropic's safety classifier, retry it on Claude Opus 4.8 server-side (Anthropic `server-side-fallback-2026-06-01` beta). Opt-in — leaving this off preserves the pre-fallback behavior for every request."},type:"boolean",default:!1},steeringMode:{ui:{tab:"interaction",group:"Input",label:"Steering Mode",description:"How to process queued messages while agent is working"},type:"enum",default:"one-at-a-time",values:["all","one-at-a-time"]},followUpMode:{ui:{tab:"interaction",group:"Input",label:"Follow-Up Mode",description:"How to drain follow-up messages after a turn completes"},type:"enum",default:"one-at-a-time",values:["all","one-at-a-time"]},interruptMode:{ui:{tab:"interaction",group:"Input",label:"Interrupt Mode",description:"When steering messages interrupt tool execution"},type:"enum",default:"immediate",values:["immediate","wait"]},"tui.vimMode":{ui:{tab:"interaction",group:"Input",label:"Vim Editing Mode",description:"Modal prompt editing. Escape leaves Insert mode; Normal mode has hjkl, 0, $, ^, w, b, e, gg, G, counts, x/D/C, dd/yy, p and u; operators take motions or text objects (diw, ca(, dap); v/V start a Visual selection that y copies and d deletes"},type:"boolean",default:!1},"tui.vimModeDisplay":{ui:{tab:"interaction",group:"Input",label:"Vim Mode Indicator",description:"How the current Vim mode appears in the status line",condition:"vimModeEnabled",options:[{value:"text",label:"Text",description:"Full mode name — NORMAL, INSERT, VISUAL, V-LINE"},{value:"icon",label:"Icon",description:"Single compact glyph per mode"},{value:"none",label:"Hidden",description:"Do not show the mode in the status line"}]},type:"enum",default:"text",values:["text","icon","none"]},"loop.mode":{ui:{tab:"interaction",group:"Input",label:"Loop Mode",description:"What happens between /loop iterations before re-submitting the prompt",options:[{value:"prompt",label:"Prompt",description:"Re-submit the prompt as a follow-up message (current behavior)"},{value:"compact",label:"Compact",description:"Compact the session context, then re-submit the prompt"},{value:"reset",label:"Reset",description:"Start a new session, then re-submit the prompt"}]},type:"enum",default:"prompt",values:["prompt","compact","reset"]},"loop.conditionTimeoutMs":{ui:{tab:"interaction",group:"Input",label:"Loop Condition Timeout (ms)",description:"Max wait for a `/loop --while` / `--until` condition command before treating it as broken and stopping the loop. Set to 0 to wait indefinitely",options:[{value:"0",label:"Unlimited",description:""},{value:"10000",label:"10 seconds",description:""},{value:"30000",label:"30 seconds",description:""},{value:"120000",label:"2 minutes",description:""}]},type:"number",default:30000},"composer.recallClearedDrafts":{ui:{tab:"interaction",group:"Input",label:"Recall Cleared Drafts",description:"Keep drafts cleared with Ctrl+C in local Up/Down history until exit; disabling affects future clears"},type:"boolean",default:!0},doubleEscapeAction:{ui:{tab:"interaction",group:"Input",label:"Double-Escape Action",description:"What pressing Escape twice with an empty editor does: open the transcript rewind selector, open the session tree, or nothing"},type:"enum",default:"rewind",values:["rewind","tree","none"]},treeFilterMode:{ui:{tab:"interaction",group:"Input",label:"Session Tree Filter",description:"Default filter mode when opening the session tree"},type:"enum",default:"default",values:["default","no-tools","user-only","labeled-only","all"]},autocompleteMaxVisible:{ui:{tab:"interaction",group:"Input",label:"Autocomplete Items",description:"Max visible items in autocomplete dropdown (3-20)",options:[{value:"3",label:"3 items",description:""},{value:"5",label:"5 items",description:""},{value:"7",label:"7 items",description:""},{value:"10",label:"10 items",description:""},{value:"15",label:"15 items",description:""},{value:"20",label:"20 items",description:""}]},type:"number",default:10},"spelling.typoDetection":{ui:{tab:"interaction",group:"Input",label:"Typo Detection (macOS)",description:"Mark misspelled prompt words with the active macOS dictionaries",condition:"macOS"},type:"boolean",default:!0},"spelling.autocomplete":{ui:{tab:"interaction",group:"Input",label:"Word Autocomplete (macOS)",description:"Show macOS dictionary word completions as inline hints accepted with Tab",condition:"macOS"},type:"boolean",default:!0},"spelling.autocorrect":{ui:{tab:"interaction",group:"Input",label:"Autocorrect (macOS)",description:"Apply confident macOS spelling corrections after completed words",condition:"macOS"},type:"boolean",default:!1},emojiAutocomplete:{ui:{tab:"interaction",group:"Input",label:"Emoji Autocomplete",description:"Suggest emojis from `:name:` shortcodes and expand text emoticons like `:D` or `:-)`"},type:"boolean",default:!0},"paste.largeMenuThreshold":{ui:{tab:"interaction",group:"Input",label:"Large Paste Menu",description:"When a paste reaches this many lines, offer a menu to wrap it in a code block, wrap it in XML tags, or save it to a file. 0 disables the menu (large pastes still collapse to a [Paste] marker).",options:[{value:"0",label:"Off",description:""},{value:"100",label:"100 lines",description:""},{value:"250",label:"250 lines",description:""},{value:"500",label:"500 lines",description:""},{value:"1000",label:"1000 lines",description:""}]},type:"number",default:100},"startup.quiet":{ui:{tab:"interaction",group:"Startup & Updates",label:"Quiet Startup",description:"Skip welcome screen and startup status messages"},type:"boolean",default:!1},"startup.showSplash":{ui:{tab:"interaction",group:"Startup & Updates",label:"Show Startup Splash",description:"Show the full animated setup splash on normal interactive startup without rerunning setup. Quiet Startup still suppresses it."},type:"boolean",default:!1},"startup.setupWizard":{ui:{tab:"interaction",group:"Startup & Updates",label:"Setup Wizard",description:"Show newly added onboarding steps once per setup version"},type:"boolean",default:!0},"startup.checkUpdate":{ui:{tab:"interaction",group:"Startup & Updates",label:"Check for Updates",description:"Check for omp updates on startup"},type:"boolean",default:!0},"update.channel":{ui:{tab:"interaction",group:"Startup & Updates",label:"Update Channel",description:"Update channel used by omp update and the startup update check",options:[{value:"stable",label:"Stable",description:""},{value:"canary",label:"Canary",description:""}]},type:"enum",default:"stable",values:["stable","canary"]},"marketplace.autoUpdate":{ui:{tab:"interaction",group:"Startup & Updates",label:"Marketplace Auto-Update",description:"Check for plugin updates on startup",options:[{value:"off",label:"Off",description:"Don't check for plugin updates"},{value:"notify",label:"Notify",description:"Check on startup and notify when updates are available"},{value:"auto",label:"Auto",description:"Check on startup and auto-install updates"}]},type:"enum",default:"notify",values:["off","notify","auto"]},"startup.changelogMode":{ui:{tab:"interaction",group:"Startup & Updates",label:"Startup Changelog",description:"Choose whether update notes start as a summary, full details, or stay hidden",options:[{value:"summary",label:"Summary",description:"Show release and change counts with a /changelog hint"},{value:"expanded",label:"Expanded",description:"Show the recent release notes in full"},{value:"hidden",label:"Hidden",description:"Do not show release notes on startup"}]},type:"enum",default:"summary",values:["summary","expanded","hidden"]},"magicKeywords.enabled":{ui:{tab:"interaction",group:"Magic Keywords",label:"Magic Keywords",description:"Enable hidden notices for standalone ultrathink, orchestrate, and workflowz keywords"},type:"boolean",default:!0},"magicKeywords.ultrathink":{ui:{tab:"interaction",group:"Magic Keywords",label:"Ultrathink Keyword",description:"Let standalone ultrathink request maximum automatic thinking and append its hidden notice"},type:"boolean",default:!0},"magicKeywords.orchestrate":{ui:{tab:"interaction",group:"Magic Keywords",label:"Orchestrate Keyword",description:"Let standalone orchestrate append its hidden multi-agent orchestration notice"},type:"boolean",default:!0},"magicKeywords.workflow":{ui:{tab:"interaction",group:"Magic Keywords",label:"Workflow Keyword",description:"Let standalone workflowz append its hidden eval workflow notice"},type:"boolean",default:!0},"completion.notify":{ui:{tab:"interaction",group:"Notifications",label:"Completion Notification",description:"Notify when the agent finishes a turn"},type:"enum",default:"on",values:["on","off"]},"error.notify":{ui:{tab:"interaction",group:"Notifications",label:"Error Notification",description:"Notify when the agent stops with an error"},type:"enum",default:"off",values:["on","off"]},"ask.timeout":{ui:{tab:"interaction",group:"Notifications",label:"Ask Timeout",description:"Auto-select the recommended ask option after this many seconds (0 disables)",options:[{value:"0",label:"Disabled",description:""},{value:"15",label:"15 seconds",description:""},{value:"30",label:"30 seconds",description:""},{value:"60",label:"60 seconds",description:""},{value:"120",label:"120 seconds",description:""}]},type:"number",default:0},"ask.notify":{ui:{tab:"interaction",group:"Notifications",label:"Ask Notification",description:"Notify when the ask tool is waiting for input"},type:"enum",default:"on",values:["on","off"]},"recap.enabled":{ui:{tab:"interaction",group:"Notifications",label:"Idle Recap",description:"Generate a brief LLM recap of where things stand after the terminal has been idle"},type:"boolean",default:!0},"recap.idleSeconds":{ui:{tab:"interaction",group:"Notifications",label:"Idle Recap Delay",description:"Seconds to wait while idle before showing the recap",options:[{value:"60",label:"1 minute",description:""},{value:"120",label:"2 minutes",description:""},{value:"240",label:"4 minutes",description:""},{value:"300",label:"5 minutes",description:""},{value:"600",label:"10 minutes",description:""}]},type:"number",default:240},"collab.relayUrl":{ui:{tab:"interaction",group:"Collab",label:"Relay URL",description:"Relay used by /collab (wss://host[:port])"},type:"string",default:"wss://my.omp.sh"},"collab.webUrl":{ui:{tab:"interaction",group:"Collab",label:"Web UI URL",description:"Browser UI used by /collab links; empty derives from collab.relayUrl; explicit http:// is localhost-only"},type:"string",default:""},"collab.displayName":{ui:{tab:"interaction",group:"Collab",label:"Display Name",description:"Name shown to other collab participants (default: OS username)"},type:"string",default:""},"collab.autoStart":{ui:{tab:"interaction",group:"Collab",label:"Auto Start",description:"Host every interactive session via collab.relayUrl as it starts and publish it to the local registry (omp collab list); rooms rotate on session switch",options:[{value:"off",label:"Off",description:"Share only when /collab is run"},{value:"view",label:"View",description:"Auto-host; the registry hands out view-only links (omp collab link --view)"},{value:"control",label:"Control",description:"Auto-host; the registry hands out control links that can prompt the session"}]},type:"enum",default:"off",values:["off","view","control"]},"share.serverUrl":{ui:{tab:"interaction",group:"Collab",label:"Share Server",description:"Share viewer/upload base used by /share (encrypted blob upload + viewer; links are <base>/<id>#<key>)"},type:"string",default:"https://my.omp.sh/s"},"share.store":{ui:{tab:"interaction",group:"Collab",label:"Share Store",description:"Where /share uploads the encrypted session blob",options:[{value:"blob",label:"Encrypted Blob",description:"Upload to the share server (no GitHub account needed; avoids gist API rate limits)"},{value:"gist",label:"GitHub Gist",description:"Push to a secret gist (needs authenticated gh), falling back to the share server"}]},type:"enum",default:"blob",values:["blob","gist"]},"share.redactSecrets":{ui:{tab:"interaction",group:"Collab",label:"Share Secret Redaction",description:"Run the secret obfuscator over /share snapshots before upload (uses the secrets.* config)"},type:"boolean",default:!0},"stt.enabled":{ui:{tab:"interaction",group:"Speech",label:"Speech-to-Text",description:"Enable speech-to-text input via microphone"},type:"boolean",default:!1},"stt.modelName":{ui:{tab:"interaction",group:"Speech",label:"Speech Model",description:"Local on-device speech model. Parakeet TDT v3 (sherpa-onnx) is the SoTA default; Whisper base/small/large-v3-turbo tiers (transformers.js) trade size for multilingual coverage. Downloaded on first use.",options:[{value:"fast",label:"Fast (Whisper base)",description:"Whisper base, multilingual. Smallest + fastest; lowest accuracy. Best for low-resource machines."},{value:"balanced",label:"Balanced (Whisper small)",description:"Whisper small, multilingual. More accurate than Fast, still light on CPU/RAM."},{value:"turbo",label:"Turbo (Whisper large-v3)",description:"Whisper large-v3-turbo, 99 languages. Widest language coverage; large download, slower."},{value:"parakeet",label:"Parakeet TDT v3 (SoTA)",description:"NVIDIA Parakeet TDT 0.6B v3, 25 languages. Open ASR Leaderboard leader — best accuracy and far fastest decoding. Default."}]},type:"enum",default:"parakeet",values:["fast","balanced","turbo","parakeet"]},"stt.submitTrigger":{ui:{tab:"interaction",group:"Speech",label:"Speech-to-Text Submit Trigger",description:"Choose when speech dictation automatically submits: Never, Release (2+ words), Release with complete sentence, or When I Say Submit.",options:[{value:"never",label:"Never",description:"Never automatically submit; insert dictation and remain in editor."},{value:"release",label:"Release",description:"Submit on release if the utterance has 2+ words to avoid accidental sends."},{value:"release-complete",label:"Release with complete sentence",description:"Submit on release if the utterance ends with sentence-terminal punctuation (. ? ! etc.)."},{value:"say-submit",label:"When I Say Submit",description:"Submit if the utterance ends with a word containing 'submit' (strips that word before submitting)."}]},type:"enum",default:"never",values:["never","release","release-complete","say-submit"]},"contextPromotion.enabled":{ui:{tab:"context",group:"General",label:"Auto-Promote Context",description:"Promote to a larger-context model on context overflow instead of compacting"},type:"boolean",default:!1},extendedContext:{ui:{tab:"context",group:"General",label:"Extended Context",description:"Use larger context windows where supported; may incur premium pricing. Off keeps default or standard-pricing windows"},type:"boolean",default:!1},"compaction.enabled":{ui:{tab:"context",group:"Compaction",label:"Auto-Compact",description:"Automatically compact context when it gets too large"},type:"boolean",default:!0},"compaction.experimentalContextManagement":{ui:{tab:"context",group:"Compaction",label:"Notes-backed context windows (experimental)",description:"Keep persistent notes and searchable raw history across context windows. Restart to update available tools."},type:"boolean",default:!1},"compaction.midTurnEnabled":{ui:{tab:"context",group:"Compaction",label:"Mid-Turn Compaction",description:"Check thresholds at safe mid-turn tool-loop boundaries before the next provider request"},type:"boolean",default:!0},"compaction.methodOrder":{ui:{tab:"context",group:"Compaction",label:"Compaction Method Order",description:"Preferred fallback order for automatic context maintenance; unavailable or failed methods advance to the next choice",ordered:!0,options:[{value:"remote",label:"Server compaction",description:"Use provider-native server compaction (OpenAI Responses compact, Anthropic compaction beta) when the active route supports it"},{value:"snapcompact",label:"Snapcompact",description:"Archive history onto dense bitmap images the active vision model reads back; no LLM call"},{value:"handoff",label:"Handoff",description:"Generate a handoff document and continue from it as the compaction summary"},{value:"soft",label:"Soft compaction",description:"Summarize in place with a compaction model without using server compaction"},{value:"shake",label:"Shake",description:"Drop recoverable heavy content in place without an LLM call"}]},type:"array",default:["remote","snapcompact","handoff","shake","soft"]},"compaction.thresholdPercent":{ui:{tab:"context",group:"Compaction",label:"Compaction Threshold",description:"Percent threshold for context maintenance; set to Default to use legacy reserve-based behavior",options:[{value:"default",label:"Default",description:"Legacy reserve-based threshold"},{value:"10",label:"10%",description:"Extremely early maintenance"},{value:"20",label:"20%",description:"Very early maintenance"},{value:"30",label:"30%",description:"Early maintenance"},{value:"40",label:"40%",description:"Moderately early maintenance"},{value:"50",label:"50%",description:"Halfway point"},{value:"60",label:"60%",description:"Moderate context usage"},{value:"70",label:"70%",description:"Balanced"},{value:"75",label:"75%",description:"Slightly aggressive"},{value:"80",label:"80%",description:"Typical threshold"},{value:"85",label:"85%",description:"Aggressive context usage"},{value:"90",label:"90%",description:"Very aggressive"},{value:"95",label:"95%",description:"Near context limit"}]},type:"number",default:-1},"compaction.thresholdTokens":{ui:{tab:"context",group:"Compaction",label:"Compaction Token Limit",description:"Fixed token limit for context maintenance; overrides percentage if set",options:[{value:"default",label:"Default",description:"Use percentage-based threshold"},{value:"25000",label:"25K tokens",description:"1/8 of a 200K window"},{value:"50000",label:"50K tokens",description:"1/4 of a 200K window"},{value:"100000",label:"100K tokens",description:"1/2 of a 200K window"},{value:"150000",label:"150K tokens",description:"3/4 of a 200K window"},{value:"200000",label:"200K tokens",description:"Full standard context window"},{value:"300000",label:"300K tokens",description:"Large context window"},{value:"500000",label:"500K tokens",description:"Very large context window"}]},type:"number",default:-1},"compaction.handoffSaveToDisk":{ui:{tab:"context",group:"Compaction",label:"Save Handoff Docs",description:"Save generated handoff documents to markdown files for the auto-handoff flow"},type:"boolean",default:!1},"compaction.remoteStreamingV2Enabled":{ui:{tab:"context",group:"Compaction",label:"Remote Compaction V2",description:"Use Responses streaming compaction for compatible remote compaction models"},type:"boolean",default:!0},"compaction.asyncEnabled":{ui:{tab:"context",group:"Compaction",label:"Async Compaction",description:"Speculatively summarize in the background as context nears the compaction threshold, then splice the ready result in when the threshold is crossed"},type:"boolean",default:!0},"compaction.idleEnabled":{ui:{tab:"context",group:"Compaction",label:"Idle Compaction",description:"Compact context while idle when token count exceeds threshold"},type:"boolean",default:!1},"compaction.idleThresholdTokens":{ui:{tab:"context",group:"Compaction",label:"Idle Compaction Threshold",description:"Token count above which idle compaction triggers",options:[{value:"100000",label:"100K tokens",description:""},{value:"200000",label:"200K tokens",description:""},{value:"300000",label:"300K tokens",description:""},{value:"400000",label:"400K tokens",description:""},{value:"500000",label:"500K tokens",description:""},{value:"600000",label:"600K tokens",description:""},{value:"700000",label:"700K tokens",description:""},{value:"800000",label:"800K tokens",description:""},{value:"900000",label:"900K tokens",description:""}]},type:"number",default:200000},"compaction.idleTimeoutSeconds":{ui:{tab:"context",group:"Compaction",label:"Idle Compaction Delay",description:"Seconds to wait while idle before compacting",options:[{value:"60",label:"1 minute",description:""},{value:"120",label:"2 minutes",description:""},{value:"300",label:"5 minutes",description:""},{value:"600",label:"10 minutes",description:""},{value:"1800",label:"30 minutes",description:""},{value:"3600",label:"1 hour",description:""}]},type:"number",default:300},"compaction.supersedeReads":{ui:{tab:"context",group:"Compaction",label:"Supersede Stale Reads",description:"Prune older read results when the same file is read again (cache-aware, runs every turn)"},type:"boolean",default:!0},"compaction.dropUseless":{ui:{tab:"context",group:"Compaction",label:"Elide Uneventful Results",description:"Prune tool results flagged contextually useless (no matches, timed-out waits) once consumed (cache-aware)"},type:"boolean",default:!0},"snapcompact.systemPrompt":{ui:{tab:"context",group:"Experimental",label:"Snapcompact System Prompt",description:"Experimental: render selected system prompt text as dense PNG image(s) and attach to the first user message (vision models only). Saves tokens; loses prompt caching for imaged text.",options:[{value:"none",label:"None",description:"Keep the system prompt as text."},{value:"agents-md",label:"AGENTS.md",description:"Only move loaded context-file instructions to images, when that saves tokens."},{value:"all",label:"All",description:"Move the full system prompt to images, when that saves tokens."}]},type:"enum",default:"none",values:["none","agents-md","all"]},"snapcompact.toolResults":{ui:{tab:"context",group:"Experimental",label:"Snapcompact Tool Results",description:"Experimental: render large historical tool results as dense PNG image(s) instead of text (vision models only). Saves tokens on accumulated read/search output."},type:"boolean",default:!1},"tools.format":{ui:{tab:"context",group:"Experimental",label:"Tool Calling Mode",description:"Controls how tools are exposed to the model. Auto uses provider-native tool calls unless the selected model is marked as not supporting them, then falls back to the GLM owned dialect. Native forces provider-native tools; the other values force the named owned dialect. Applies on session start.",options:[{value:"auto",label:"Auto",description:"Use native tool calls unless the model is known not to support them."},{value:"native",label:"Native",description:"Use provider-native tool calls."},{value:"glm",label:"GLM",description:"Use GLM-style in-band tool calls."},{value:"hermes",label:"Hermes",description:"Use Hermes-style in-band tool calls."},{value:"kimi",label:"Kimi",description:"Use Kimi-style in-band tool calls."},{value:"xml",label:"XML",description:"Use generic XML in-band tool calls."},{value:"anthropic",label:"Anthropic",description:"Use Anthropic-style in-band tool calls."},{value:"deepseek",label:"DeepSeek",description:"Use DeepSeek-style in-band tool calls."},{value:"harmony",label:"Harmony",description:"Use Harmony-style in-band tool calls."},{value:"qwen3",label:"Qwen3",description:"Use the Qwen3 owned dialect."},{value:"gemini",label:"Gemini",description:"Use the Gemini owned dialect."},{value:"gemma",label:"Gemma",description:"Use the Gemma owned dialect."},{value:"minimax",label:"MiniMax",description:"Use the MiniMax owned dialect."}]},type:"enum",default:"auto",values:["auto","native","glm","hermes","kimi","xml","anthropic","deepseek","harmony","qwen3","gemini","gemma","minimax"]},"snapcompact.shape":{ui:{tab:"context",group:"Experimental",label:"Snapcompact Shape",description:"Frame shape snapcompact prints text with (compaction archive and inline imaging). Auto picks a shape tuned for the current model.",options:[{value:"auto",label:"Auto",description:"Picks a shape tuned for the current model, falling back to its provider family."},{value:"8x8r-bw",label:"8x8 repeated, black",description:"unscii square cell, black ink, every line printed twice with the copy on a pale highlight band."},{value:"8x8r-sent",label:"8x8 repeated, sentence hues",description:"Repeated grid with ink cycling six hues at sentence boundaries."},{value:"8x8u-bw",label:"8x8, black",description:"Plain unscii square cell, single-printed lines, black ink."},{value:"8x8u-sent",label:"8x8, sentence hues",description:"Plain unscii square cell with sentence-hue ink."},{value:"6x6u-bw",label:"6x6 dense, black",description:"unscii squeezed to 6x6 — densest readable cell, fewest frames — in black ink."},{value:"6x6u-sent",label:"6x6 dense, sentence hues",description:"Densest cell with sentence-hue ink."},{value:"5x8-bw",label:"5x8 legacy, black",description:"Original X.org 5x8 glyphs on the 2576px frame, black ink."},{value:"5x8-sent",label:"5x8 legacy, sentence hues",description:"The original snapcompact shape (pre-shape-table sessions rendered this)."},{value:"6x12-dim",label:"6x12, dimmed stopwords",description:"X.org 6x12 glyphs, black ink, function words dimmed gray."},{value:"8x13-bw",label:"8x13, black",description:"X.org 8x13 glyphs, black ink."},{value:"8on16-bw",label:"8x13 on 16px pitch, black",description:"8x13 glyphs on an 8x16 cell (extra leading), black ink."},{value:"8on22-bw",label:"8x13 on 22px pitch (leading), black",description:"8x13 glyphs on an 8x22 cell — extra line spacing so rows don't crowd. Default for OpenAI/Google."},{value:"11on16-bw",label:"8x13 on 11px advance (tracking), black",description:"8x13 glyphs on an 11x16 cell — extra letter spacing so characters don't merge. Default for Anthropic."},{value:"silver16-bw",label:"Silver 16, CJK",description:"Embedded Silver TrueType font on a 16px grid for CJK and other non-Latin text."},{value:"doc-8on16-bw",label:"Doc 8on16, black",description:"Two word-wrapped newspaper columns of 8x13 glyphs on a 16px pitch, black ink."},{value:"doc-8on16-sent",label:"Doc 8on16, sentence hues",description:"Two-column doc layout with sentence-hue ink."},{value:"doc-8on16-sent-dim",label:"Doc 8on16, sentence hues + dimmed stopwords",description:"Two-column doc layout, sentence-hue ink, function words dimmed gray."}]},type:"enum",default:"auto",values:["auto","8x8r-bw","8x8r-sent","8x8u-bw","8x8u-sent","6x6u-bw","6x6u-sent","5x8-bw","5x8-sent","6x12-dim","8x13-bw","8on16-bw","8on22-bw","11on16-bw","silver16-bw","doc-8on16-bw","doc-8on16-sent","doc-8on16-sent-dim"]},"branchSummary.enabled":{ui:{tab:"context",group:"General",label:"Branch Summaries",description:"Prompt to summarize when leaving a branch"},type:"boolean",default:!1},"memory.backend":{ui:{tab:"memory",group:"General",label:"Memory Backend",description:"Off, local summary pipeline, Mnemopi SQLite, Hindsight remote memory, or Sharpshooter",options:[{value:"off",label:"Off",description:"No memory subsystem runs"},{value:"local",label:"Local",description:"Local rollout summarisation pipeline (memory_summary.md)"},{value:"hindsight",label:"Hindsight",description:"Vectorize Hindsight remote memory service"},{value:"mnemopi",label:"Mnemopi",description:"Local SQLite recall/retain backend with optional embeddings"},{value:"sharpshooter",label:"Sharpshooter",description:"Friction-gated project decision files (architecture/product/style), consolidated in the background"}]},type:"enum",default:"off",values:["off","local","hindsight","mnemopi","sharpshooter"]},"sharpshooter.model":{ui:{tab:"memory",group:"Sharpshooter",label:"Sharpshooter Model",description:"Model selector for extraction/consolidation, empty = smol role"},type:"string"},"autolearn.enabled":{ui:{tab:"memory",group:"Auto-Learn",label:"Auto-Learn (experimental)",description:"After the agent stops, nudge it to capture lessons to memory and create/enhance isolated managed skills"},type:"boolean",default:!1},"autolearn.autoContinue":{ui:{tab:"memory",group:"Auto-Learn",label:"Auto-run capture at stop",description:"When on, auto-run one private capture turn at stop (uses extra tokens). When off, only standing auto-learn guidance remains.",condition:"autolearnActive"},type:"boolean",default:!1},"mnemopi.dbPath":{ui:{tab:"memory",group:"Mnemopi",label:"Mnemopi DB Path",description:"Optional SQLite DB path. Defaults to the agent memories directory.",condition:"mnemopiActive"},type:"string"},"mnemopi.bank":{ui:{tab:"memory",group:"Mnemopi",label:"Mnemopi Bank",description:"Optional shared bank base name. Per-project modes derive project-local banks from it.",condition:"mnemopiActive"},type:"string"},"mnemopi.scoping":{ui:{tab:"memory",group:"Mnemopi",label:"Mnemopi Scoping",description:"global = one shared bank; per-project = isolated bank per cwd; per-project-tagged = project-local writes plus global recall visibility",condition:"mnemopiActive",options:[{value:"global",label:"Global",description:"One shared Mnemopi bank for every project"},{value:"per-project",label:"Per project",description:"Project-local Mnemopi bank per cwd basename"},{value:"per-project-tagged",label:"Per project (tagged)",description:"Write to a project-local bank but merge project + shared recall results"}]},type:"enum",default:"per-project",values:["global","per-project","per-project-tagged"]},"mnemopi.embeddingVariant":{ui:{tab:"memory",group:"Mnemopi",label:"Embedding variant",description:"Local embedding model family. en = stronger English model; multilingual = cross-language model. Changing this rebuilds existing memory embeddings on next start.",condition:"mnemopiActive",options:[{value:"en",label:"English (bge-base-en-v1.5)",description:"BAAI/bge-base-en-v1.5 (768d), English-only"},{value:"multilingual",label:"Multilingual (multilingual-e5-large)",description:"intfloat/multilingual-e5-large (1024d), cross-language recall"}]},type:"enum",default:"en",values:["en","multilingual"]},"mnemopi.autoRecall":{ui:{tab:"memory",group:"Mnemopi",label:"Mnemopi Auto Recall",description:"Recall local memories into the first turn of each session",condition:"mnemopiActive"},type:"boolean",default:!0},"mnemopi.autoRetain":{ui:{tab:"memory",group:"Mnemopi",label:"Mnemopi Auto Retain",description:"Retain completed conversation turns into local Mnemopi memory",condition:"mnemopiActive"},type:"boolean",default:!0},"mnemopi.polyphonicRecall":{ui:{tab:"memory",group:"Mnemopi",label:"Mnemopi Polyphonic Recall",description:"Enable 4-voice recall (vector, graph, fact, temporal) fused with reciprocal rank fusion",condition:"mnemopiActive"},type:"boolean",default:!1},"mnemopi.enhancedRecall":{ui:{tab:"memory",group:"Mnemopi",label:"Mnemopi Enhanced Recall",description:"Enable the tiered query result cache for repeated and similar recall queries",condition:"mnemopiActive"},type:"boolean",default:!1},"mnemopi.proactiveLinking":{ui:{tab:"memory",group:"Mnemopi",label:"Mnemopi Proactive Linking",description:"Ingest new memories into the episodic graph as they are stored, linking them to related entities and memories",condition:"mnemopiActive"},type:"boolean",default:!1},"mnemopi.noEmbeddings":{ui:{tab:"memory",group:"Mnemopi",label:"Mnemopi Disable Embeddings",description:"Force deterministic FTS-only recall instead of vector embeddings",condition:"mnemopiActive"},type:"boolean",default:!1},"mnemopi.embeddingModel":{ui:{tab:"memory",group:"Mnemopi",label:"Mnemopi Embedding Model",description:"Advanced: explicit embedding model id that overrides the variant. Leave empty to use mnemopi.embeddingVariant.",condition:"mnemopiActive"},type:"string"},"mnemopi.embeddingApiUrl":{ui:{tab:"memory",group:"Mnemopi",label:"Mnemopi Embedding API URL",description:"Optional OpenAI-compatible embedding endpoint passed to Mnemopi",condition:"mnemopiActive"},type:"string"},"mnemopi.embeddingApiKey":{ui:{tab:"memory",group:"Mnemopi",label:"Mnemopi Embedding API Key",description:"Optional embedding API key passed to Mnemopi",condition:"mnemopiActive"},type:"string",credential:!0},"mnemopi.llmMode":{ui:{tab:"memory",group:"Mnemopi",label:"Mnemopi LLM Mode",description:"Use no LLM, the online tiny model (the TINY role from /models, else @smol), or a remote OpenAI-compatible endpoint",condition:"mnemopiActive",options:[{value:"none",label:"None",description:"Disable Mnemopi LLM-backed extraction"},{value:"smol",label:"Online (tiny)",description:"Use the online tiny model (the TINY role from /models, else @smol)"},{value:"remote",label:"Remote",description:"Use the Mnemopi remote LLM settings below"}]},type:"enum",default:"smol",values:["none","smol","remote"]},"mnemopi.llmBaseUrl":{ui:{tab:"memory",group:"Mnemopi",label:"Mnemopi LLM Base URL",description:"Optional OpenAI-compatible LLM endpoint for Mnemopi remote mode",condition:"mnemopiActive"},type:"string"},"mnemopi.llmApiKey":{ui:{tab:"memory",group:"Mnemopi",label:"Mnemopi LLM API Key",description:"Optional LLM API key for Mnemopi remote mode",condition:"mnemopiActive"},type:"string",credential:!0},"mnemopi.llmModel":{ui:{tab:"memory",group:"Mnemopi",label:"Mnemopi LLM Model",description:"Optional LLM model name for Mnemopi remote mode",condition:"mnemopiActive"},type:"string"},"hindsight.apiUrl":{ui:{tab:"memory",group:"Hindsight",label:"Hindsight API URL",description:"Hindsight server URL (Cloud or self-hosted)",condition:"hindsightActive"},type:"string",default:"http://localhost:8888"},"hindsight.apiToken":{ui:{tab:"memory",group:"Hindsight",label:"Hindsight API Token",description:"Bearer token for authenticated Hindsight servers",condition:"hindsightActive"},type:"string",credential:!0},"hindsight.bankId":{ui:{tab:"memory",group:"Hindsight",label:"Hindsight Bank ID",description:"Memory bank identifier (default: project name)",condition:"hindsightActive"},type:"string"},"hindsight.scoping":{ui:{tab:"memory",group:"Hindsight",label:"Hindsight Scoping",description:"global = one shared bank; per-project = isolated bank per cwd; per-project-tagged = shared bank with project tags so global + project memories merge on recall",condition:"hindsightActive",options:[{value:"global",label:"Global",description:"One shared bank — every project sees the same memories"},{value:"per-project",label:"Per project",description:"Isolated bank per cwd basename — projects cannot see each other's memories"},{value:"per-project-tagged",label:"Per project (tagged)",description:"Shared bank, retains tagged with project:<cwd>. Recall surfaces project + untagged global memories together"}]},type:"enum",default:"per-project-tagged",values:["global","per-project","per-project-tagged"]},"hindsight.autoRecall":{ui:{tab:"memory",group:"Hindsight",label:"Hindsight Auto Recall",description:"Recall memories on the first turn of each session",condition:"hindsightActive"},type:"boolean",default:!0},"hindsight.autoRetain":{ui:{tab:"memory",group:"Hindsight",label:"Hindsight Auto Retain",description:"Retain transcript every N turns and at session boundaries",condition:"hindsightActive"},type:"boolean",default:!0},"hindsight.retainMode":{ui:{tab:"memory",group:"Hindsight",label:"Hindsight Retain Mode",description:"full-session = upsert one document per session, last-turn = chunked",condition:"hindsightActive",options:[{value:"full-session",label:"Full session",description:"Upsert one document per session (recommended)"},{value:"last-turn",label:"Last turn",description:"Chunked retention sliced by turn boundaries"}]},type:"enum",default:"full-session",values:["full-session","last-turn"]},"hindsight.mentalModelsEnabled":{ui:{tab:"memory",group:"Hindsight",label:"Hindsight Mental Models",description:"Read curated reflect summaries (mental models) into developer instructions at boot. Loads existing models on the bank — does not write. Pair with hindsight.mentalModelAutoSeed to also auto-create the built-in seed set.",condition:"hindsightActive"},type:"boolean",default:!0},"hindsight.mentalModelAutoSeed":{ui:{tab:"memory",group:"Hindsight",label:"Hindsight Mental Model Auto-Seed",description:"At session start, create any built-in mental models (project-conventions, project-decisions, user-preferences) that do not yet exist on the bank.",condition:"hindsightActive"},type:"boolean",default:!0},"ttsr.enabled":{ui:{tab:"context",group:"Rules (TTSR)",label:"TTSR",description:"Interrupt the agent mid-stream when output matches rule patterns (Time-Traveling Stream Rules)"},type:"boolean",default:!0},"ttsr.contextMode":{ui:{tab:"context",group:"Rules (TTSR)",label:"TTSR Context Mode",description:"What to do with partial output when TTSR triggers"},type:"enum",default:"discard",values:["discard","keep"]},"ttsr.interruptMode":{ui:{tab:"context",group:"Rules (TTSR)",label:"TTSR Interrupt Mode",description:"When to interrupt mid-stream vs inject warning after completion",options:[{value:"always",label:"always",description:"Interrupt on prose and tool streams"},{value:"prose-only",label:"prose-only",description:"Interrupt only on reply/thinking matches"},{value:"tool-only",label:"tool-only",description:"Interrupt only on tool-call argument matches"},{value:"never",label:"never",description:"Never interrupt; inject warning after completion"}]},type:"enum",default:"always",values:["never","prose-only","tool-only","always"]},"ttsr.repeatMode":{ui:{tab:"context",group:"Rules (TTSR)",label:"TTSR Repeat Mode",description:"How rules can repeat: once per session or after a message gap"},type:"enum",default:"once",values:["once","after-gap"]},"ttsr.repeatGap":{ui:{tab:"context",group:"Rules (TTSR)",label:"TTSR Repeat Gap",description:"Messages before a rule can trigger again",options:[{value:"5",label:"5 messages",description:""},{value:"10",label:"10 messages",description:""},{value:"15",label:"15 messages",description:""},{value:"20",label:"20 messages",description:""},{value:"30",label:"30 messages",description:""}]},type:"number",default:10},"ttsr.builtinRules":{ui:{tab:"context",group:"Rules (TTSR)",label:"Built-in Rules",description:"Load the default rules shipped with the agent (override individually with ttsr.disabledRules)"},type:"boolean",default:!0},"ttsr.disabledRules":{ui:{tab:"context",group:"Rules (TTSR)",label:"Disabled Rules",description:"Rule names to ignore entirely (applies to bundled defaults and your own rules)"},type:"array",default:[]},"edit.mode":{ui:{tab:"files",group:"Editing",label:"Edit Mode",description:"Select the edit tool variant (replace, patch, hashline, or apply_patch)"},type:"enum",default:"hashline",values:["apply_patch","hashline","patch","replace","sloppy"]},"edit.fuzzyMatch":{ui:{tab:"files",group:"Editing",label:"Fuzzy Match",description:"Accept high-confidence fuzzy matches for whitespace differences"},type:"boolean",default:!0},"edit.fuzzyThreshold":{ui:{tab:"files",group:"Editing",label:"Fuzzy Match Threshold",description:"Similarity threshold (0-1) for accepting fuzzy matches",options:[{value:"0.85",label:"0.85",description:"Lenient"},{value:"0.90",label:"0.90",description:"Moderate"},{value:"0.95",label:"0.95",description:"Default"},{value:"0.98",label:"0.98",description:"Strict"}]},type:"number",default:0.95},"edit.streamingAbort":{ui:{tab:"files",group:"Editing",label:"Abort on Failed Preview",description:"Abort streaming edit tool calls when patch preview fails"},type:"boolean",default:!1},"edit.recoverInlineEdits":{ui:{tab:"files",group:"Editing",label:"Recover Inline Edit Payloads",description:"Execute edit payloads the model emits as plain text by converting them into edit tool calls"},type:"boolean",default:!0},"edit.blockAutoGenerated":{ui:{tab:"files",group:"Editing",label:"Block Auto-Generated Files",description:"Prevent editing of files that appear to be auto-generated (protoc, sqlc, swagger, etc.)"},type:"boolean",default:!0},"edit.enforceSeenLines":{ui:{tab:"files",group:"Editing",label:"Enforce Seen-Line Guard",description:"Reject edits anchored on lines a prior read/search never displayed in full"},type:"boolean",default:!1},"edit.blackbox.enabled":{ui:{tab:"files",group:"Editing",label:"Record Parse Regressions",description:"Append full before/after source when an edit introduces an AST parse failure"},type:"boolean",default:!1},"edit.autoRepair.enabled":{ui:{tab:"files",group:"Editing",label:"Auto-Repair Parse Regressions",description:"When an edit breaks a file's AST parse, ask the smol model to fix the broken region (validated by re-parse; falls back to a warning)"},type:"boolean",default:!1},readLineNumbers:{ui:{tab:"files",group:"Reading",label:"Line Numbers",description:"Prepend line numbers to read tool output by default"},type:"boolean",default:!1},"read.defaultLimit":{ui:{tab:"files",group:"Reading",label:"Default Read Limit",description:"Default number of lines returned when agent calls read without a limit",options:[{value:"200",label:"200 lines",description:""},{value:"300",label:"300 lines",description:""},{value:"500",label:"500 lines",description:""},{value:"1000",label:"1000 lines",description:""},{value:"5000",label:"5000 lines",description:""}]},type:"number",default:300},"read.renderMarkdown":{ui:{tab:"files",group:"Reading",label:"Markdown Previews",description:"Render Markdown read results as formatted terminal Markdown previews instead of raw source"},type:"boolean",default:!1},"read.summarize.enabled":{ui:{tab:"files",group:"Read Summaries",label:"Read Summaries",description:"Return structural code summaries when read is called without an explicit selector"},type:"boolean",default:!0},"read.summarize.prose":{ui:{tab:"files",group:"Read Summaries",label:"Prose Summaries",description:"Return structural summaries for Markdown and plain text reads"},type:"boolean",default:!1},"read.summarize.minBodyLines":{ui:{tab:"files",group:"Read Summaries",label:"Read Summary Body Lines",description:"Minimum multiline body or literal length before read summaries collapse it"},type:"number",default:4},"read.summarize.minCommentLines":{ui:{tab:"files",group:"Read Summaries",label:"Read Summary Comment Lines",description:"Minimum multiline block comment length before read summaries collapse it"},type:"number",default:6},"read.summarize.minTotalLines":{ui:{tab:"files",group:"Read Summaries",label:"Read Summary Minimum File Length",description:"Files with fewer total lines are read verbatim instead of structurally summarized"},type:"number",default:100},"read.summarize.unfoldUntil":{ui:{tab:"files",group:"Read Summaries",label:"Read Summary Unfold Target",description:"BFS-unfold elidable spans until the summary is at least this many visible lines. 0 keeps only the outermost elisions."},type:"number",default:50},"read.summarize.unfoldLimit":{ui:{tab:"files",group:"Read Summaries",label:"Read Summary Unfold Ceiling",description:"Hard ceiling on summary size while BFS-unfolding. An unfold whose revealed lines would exceed this is skipped (that span stays folded) and unfolding continues with the remaining spans."},type:"number",default:100},"read.toolResultPreview":{ui:{tab:"files",group:"Reading",label:"Inline Read Previews",description:"Render read tool results inline in the transcript instead of summary rows"},type:"boolean",default:!1},"lsp.enabled":{ui:{tab:"files",group:"LSP",label:"LSP",description:"Enable the lsp tool for code intelligence (definitions, references, diagnostics, rename)"},type:"boolean",default:!0},"lsp.lazy":{ui:{tab:"files",group:"LSP",label:"Lazy LSP Startup",description:"Start language servers on first use (lsp tool or editing a matching file type) instead of at session startup"},type:"boolean",default:!0},"lsp.shared":{ui:{tab:"files",group:"LSP",label:"Shared Language Servers",description:"Share one language server per project across omp instances via the daemon broker (falls back to private servers when unavailable)"},type:"boolean",default:!0},"lsp.formatOnWrite":{ui:{tab:"files",group:"LSP",label:"Format on Write",description:"Automatically format code files using LSP after writing"},type:"boolean",default:!1},"lsp.diagnosticsOnWrite":{ui:{tab:"files",group:"LSP",label:"Diagnostics on Write",description:"Return LSP diagnostics after writing code files"},type:"boolean",default:!0},"lsp.diagnosticsOnEdit":{ui:{tab:"files",group:"LSP",label:"Diagnostics on Edit",description:"Return LSP diagnostics after editing code files"},type:"boolean",default:!1},"lsp.diagnosticsDeduplicate":{ui:{tab:"files",group:"LSP",label:"Deduplicate Diagnostics",description:"Suppress post-edit LSP diagnostics already shown for a file; only surface new or changed ones"},type:"boolean",default:!0},"bash.enabled":{ui:{tab:"shell",group:"Bash",label:"Bash",description:"Enable the bash tool for shell command execution"},type:"boolean",default:!0},"bash.allowCompoundCommands":{ui:{tab:"shell",group:"Bash",label:"Allow Compound Commands",description:"Evaluate literal && chains per command; unmatched commands use normal bash approval policy and mode"},type:"boolean",default:!1},"bash.autoBackground.enabled":{ui:{tab:"shell",group:"Bash",label:"Bash Auto-Background",description:"Automatically background long-running bash commands and deliver the result later"},type:"boolean",default:!0},"bash.patterns":{ui:{tab:"shell",group:"Bash",label:"Bash Approval Patterns",description:"Ordered bash command approval rules. Each item has match and approval fields; only '*' wildcards are supported."},type:"array",default:[]},"bashInterceptor.enabled":{ui:{tab:"shell",group:"Bash",label:"Bash Interceptor",description:"Block shell commands that have dedicated tools"},type:"boolean",default:!1},"bash.direnv":{ui:{tab:"shell",group:"Bash",label:"direnv Auto-Load",description:"Auto-load a repo's direnv/devenv `.envrc` into the bash session so devenv tools and env vars are present without manual `direnv exec`. Honors direnv's allow list: an `.envrc` you haven't `direnv allow`ed is never executed"},type:"enum",default:"auto",values:["auto","off"]},"bash.direnvLoadTimeoutMs":{ui:{tab:"shell",group:"Bash",label:"direnv Load Timeout (ms)",description:"Max wait for the first `direnv export` (a cold devenv shell can be slow); on timeout the session runs without the direnv env"},type:"number",default:30000},"shellMinimizer.enabled":{ui:{tab:"shell",group:"Bash",label:"Shell Minimizer",description:"Compress verbose shell output (git, npm, cargo, etc.) before returning it to the agent"},type:"boolean",default:!0},"shellMinimizer.sourceOutlineLevel":{ui:{tab:"shell",group:"Bash",label:"Shell Minimizer Source Outline",description:"Source outline mode for cat/read of source files: default or aggressive"},type:"enum",default:"default",values:["default","aggressive"]},"eval.py":{ui:{tab:"shell",group:"Eval & Runtimes",label:"Python Eval Backend",description:"Allow the eval tool to dispatch Python cells to the IPython kernel"},type:"boolean",default:!0},"eval.js":{ui:{tab:"shell",group:"Eval & Runtimes",label:"JavaScript Eval Backend",description:"Allow the eval tool to dispatch JavaScript cells to the in-process runtime"},type:"boolean",default:!0},"eval.tools.enabled":{ui:{tab:"shell",group:"Eval & Runtimes",label:"Eval-Defined Tools",description:"Let eval cells define tools (@tool in Python, tool(fn) in JS) that task, agent(), and workpool() subagents can call"},type:"boolean",default:!0},"eval.workpool.freshAgents":{ui:{tab:"shell",group:"Eval & Runtimes",label:"Fresh Workpool Agents",description:"Spawn a new subagent for every workpool item instead of reusing workers or batching queued items"},type:"boolean",default:!1},"eval.autoBackground.enabled":{ui:{tab:"shell",group:"Eval & Runtimes",label:"Eval Auto-Background",description:"Automatically background long-running eval cells and deliver the result later"},type:"boolean",default:!1},"python.kernelMode":{ui:{tab:"shell",group:"Eval & Runtimes",label:"Python Kernel Mode",description:"Keep the IPython kernel alive across eval calls or start fresh each time"},type:"enum",default:"session",values:["session","per-call"]},"python.interpreter":{ui:{tab:"shell",group:"Eval & Runtimes",label:"Python Interpreter",description:"Optional path to an exact Python executable. When set, automatic Python runtime discovery is skipped."},type:"string",default:""},"tools.approval":{ui:{tab:"interaction",group:"Approvals",label:"Tool Approval Policies",description:"Per-tool approval policies. Set to 'allow' to auto-approve, 'prompt' to require confirmation, or 'deny' to block. Overrides are honored in every approval mode."},type:"record",default:{}},"tools.approvalMode":{ui:{tab:"interaction",group:"Approvals",label:"Tool Approval",description:"Default approval behavior for tool calls. 'Always ask' auto-approves read-only tools only. 'Write' auto-approves read and workspace-write tools. 'Yolo' auto-approves all tiers; user policy may still prompt or block.",options:[{value:"always-ask",label:"Always ask",description:"Auto-approve read-only tools; require confirmation for write and exec tools."},{value:"write",label:"Write",description:"Auto-approve read-only and write tools; require confirmation for exec tools such as bash, eval, browser, and task."},{value:"yolo",label:"Yolo",description:"Auto-approve read, write, and exec tools. User policy can still require confirmation or block calls."}]},type:"enum",default:"yolo",values:["always-ask","write","yolo"]},"todo.enabled":{ui:{tab:"tools",group:"Available Tools",label:"Todos",description:"Enable the todo tool for task tracking"},type:"boolean",default:!0},"todo.reminders":{ui:{tab:"tools",group:"Todos",label:"Todo Reminders",description:"Remind the agent to complete todos before stopping"},type:"boolean",default:!0},"todo.remindersMax":{ui:{tab:"tools",group:"Todos",label:"Todo Reminder Limit",description:"Maximum number of todo reminders before giving up",options:[{value:"1",label:"1 reminder",description:""},{value:"2",label:"2 reminders",description:""},{value:"3",label:"3 reminders",description:""},{value:"5",label:"5 reminders",description:""}]},type:"number",default:3},"todo.eager":{ui:{tab:"tools",group:"Todos",label:"Create Todos Automatically",description:"How strongly to push automatic todo-list creation after the first message",options:[{value:"default",label:"Default",description:"Model decides; no automatic todo list"},{value:"preferred",label:"Preferred",description:"Suggests a todo list on the first message (reminder, not forced)"},{value:"always",label:"Always",description:"Forces a comprehensive todo list on the first message"}]},type:"enum",default:"default",values:["default","preferred","always"]},"glob.enabled":{ui:{tab:"tools",group:"Available Tools",label:"Glob",description:"Enable the glob tool for glob-based file lookup"},type:"boolean",default:!0},"grep.enabled":{ui:{tab:"tools",group:"Available Tools",label:"Grep",description:"Enable the grep tool for regex content search"},type:"boolean",default:!0},"grep.contextBefore":{ui:{tab:"tools",group:"Grep & Browser",label:"Grep Context Before",description:"Lines of context before each grep match",options:[{value:"0",label:"0 lines",description:""},{value:"1",label:"1 line",description:""},{value:"2",label:"2 lines",description:""},{value:"3",label:"3 lines",description:""},{value:"5",label:"5 lines",description:""}]},type:"number",default:1},"grep.contextAfter":{ui:{tab:"tools",group:"Grep & Browser",label:"Grep Context After",description:"Lines of context after each grep match",options:[{value:"0",label:"0 lines",description:""},{value:"1",label:"1 line",description:""},{value:"2",label:"2 lines",description:""},{value:"3",label:"3 lines",description:""},{value:"5",label:"5 lines",description:""},{value:"10",label:"10 lines",description:""}]},type:"number",default:3},"astGrep.enabled":{ui:{tab:"tools",group:"Available Tools",label:"AST Grep",description:"Enable the ast_grep tool for structural AST search"},type:"boolean",default:!1},"astEdit.enabled":{ui:{tab:"tools",group:"Available Tools",label:"AST Edit",description:"Enable the ast_edit tool for structural AST rewrites"},type:"boolean",default:!0},"debug.enabled":{ui:{tab:"tools",group:"Available Tools",label:"Debug",description:"Enable the debug tool for DAP-based debugging"},type:"boolean",default:!0},"launch.enabled":{ui:{tab:"tools",group:"Available Tools",label:"Launch",description:"Enable the launch tool for supervising shared long-running project processes"},type:"boolean",default:!0},"speechgen.enabled":{ui:{tab:"tools",group:"Available Tools",label:"Speech Generation",description:"Enable the tts tool for on-device (Kokoro) or xAI Grok Voice speech-file synthesis"},type:"boolean",default:!1},"generate_image.enabled":{ui:{tab:"tools",group:"Available Tools",label:"Generate Image",description:"Enable the generate_image tool (text-to-image generation and editing). Exposed as an xd:// device when tools.xdev is on."},type:"boolean",default:!1},"computer.enabled":{ui:{tab:"tools",group:"Available Tools",label:"Computer",description:"Enable the scriptable host-desktop eval prelude (screenshots, input, accessibility)"},type:"boolean",default:!1},"computer.display":{ui:{tab:"tools",group:"Computer",label:"Computer Display",description:"Composite all displays or select a native display id"},type:"string",default:"all"},"computer.maxWidth":{ui:{tab:"tools",group:"Computer",label:"Computer Screenshot Width",description:"Maximum composite screenshot width in pixels"},type:"number",default:3840},"computer.maxHeight":{ui:{tab:"tools",group:"Computer",label:"Computer Screenshot Height",description:"Maximum composite screenshot height in pixels"},type:"number",default:2400},"images.questionTimeoutMs":{ui:{tab:"tools",group:"Execution",label:"Image Question Timeout",description:"Per-request timeout for the vision-model call behind read's ?q= image questions, in milliseconds. A stalled provider fails fast with a timeout error instead of blocking until manual abort. Set to 0 to disable the timeout.",options:[{value:"0",label:"Disabled",description:""},{value:"60000",label:"1 minute",description:""},{value:"120000",label:"2 minutes",description:""},{value:"180000",label:"3 minutes",description:""},{value:"300000",label:"5 minutes",description:""}]},type:"number",default:300000},"checkpoint.enabled":{ui:{tab:"tools",group:"Available Tools",label:"Checkpoint/Rewind",description:"Enable the checkpoint and rewind tools for context checkpointing"},type:"boolean",default:!1},"fetch.enabled":{ui:{tab:"tools",group:"Available Tools",label:"Read URLs",description:"Allow the read tool to fetch and process URLs"},type:"boolean",default:!0},"vault.enabled":{ui:{tab:"tools",group:"Available Tools",label:"Obsidian Vault",description:"Enable the vault:// internal URL for reading and editing Obsidian vault content via the Obsidian CLI. When disabled, vault:// resolution is refused and the vault:// entry is omitted from the system prompt."},type:"boolean",default:!1},"github.enabled":{ui:{tab:"tools",group:"Available Tools",label:"GitHub CLI",description:"Enable the github tool (op-based dispatch for repository, issue, pull request, diff, search, checkout, push, and Actions watch workflows)"},type:"boolean",default:!1},"github.cache.enabled":{ui:{tab:"tools",group:"GitHub",label:"GitHub View Cache",description:"Cache rendered issue/PR view output in ~/.omp/cache/github-cache.db so repeated reads are free"},type:"boolean",default:!0},"github.cache.softTtlSec":{ui:{tab:"tools",group:"GitHub",label:"GitHub Cache Soft TTL",description:"Within this window, cached issue/PR view rows are returned directly (seconds; default 5 minutes)"},type:"number",default:300},"github.cache.hardTtlSec":{ui:{tab:"tools",group:"GitHub",label:"GitHub Cache Hard TTL",description:"Past the soft TTL the cached row is returned and refreshed in the background; past the hard TTL it is dropped (seconds; default 7 days)"},type:"number",default:604800},"web_search.enabled":{ui:{tab:"tools",group:"Available Tools",label:"Web Search",description:"Enable the web_search tool for live web results"},type:"boolean",default:!0},"security.enabled":{ui:{tab:"tools",group:"Available Tools",label:"Security",description:"Enable OMP-native security scan planning, execution, and the read-only security:// resource namespace"},type:"boolean",default:!1},"ask.enabled":{ui:{tab:"tools",group:"Available Tools",label:"Ask",description:"Enable the ask tool for interactive user questions"},type:"boolean",default:!0},"browser.enabled":{ui:{tab:"tools",group:"Available Tools",label:"Browser",description:"Enable the browser eval prelude for scripted Chromium automation (Puppeteer)"},type:"boolean",default:!0},"browser.cdpUrl":{ui:{tab:"tools",group:"Grep & Browser",label:"Browser CDP URL",description:"Default HTTP CDP discovery endpoint (for example http://127.0.0.1:9222) to attach to instead of launching a browser. Explicit app.cdp_url or app.path on the tool call take precedence."},type:"string"},"browser.relay":{ui:{tab:"tools",group:"Grep & Browser",label:"Browser Relay",description:"Drive your own Chrome tabs through the omp browser relay. Install the extension once (`omp browser-relay install`); the relay server auto-starts when the browser prelude needs it. Takes precedence over Browser CDP URL; set PI_BROWSER_RELAY=0 or PI_BROWSER_RELAY=1 to override."},type:"boolean",default:!1},"browser.relayUrl":{ui:{tab:"tools",group:"Grep & Browser",label:"Browser Relay URL",description:"omp browser relay endpoint (default http://127.0.0.1:9224)."},type:"string"},"browser.headless":{ui:{tab:"tools",group:"Grep & Browser",label:"Headless Browser",description:"Launch browser in headless mode (disable to show browser UI)"},type:"boolean",default:!0},"browser.cmux":{ui:{tab:"tools",group:"Grep & Browser",label:"cmux Browser",description:"Use cmux WKWebView surfaces for browser automation when a cmux socket is available. Set PI_BROWSER_CMUX=0 or PI_BROWSER_CMUX=1 to override."},type:"boolean",default:!0},"browser.freezeOnTurnEnd":{ui:{tab:"tools",group:"Grep & Browser",label:"Freeze Browser Tabs On Turn End",description:"Freeze OMP-owned headless browser tabs when a turn settles so animated pages stop burning CPU/GPU while idle. Tabs unfreeze automatically on next use; pass persist:true on open to opt a tab out."},type:"boolean",default:!0},"browser.idleCloseSec":{ui:{tab:"tools",group:"Grep & Browser",label:"Browser Idle Close Timeout",description:"Close OMP-owned headless browser tabs idle longer than this many seconds (0 = never; session dispose still reaps). Applies only to OMP-launched headless tabs, never relay/CDP/spawned browsers or other sessions' tabs.",options:[{value:"0",label:"Never",description:""},{value:"900",label:"15 minutes",description:""},{value:"1800",label:"30 minutes",description:""},{value:"3600",label:"1 hour",description:""}]},type:"number",default:1800},"browser.screenshotDir":{ui:{tab:"tools",group:"Grep & Browser",label:"Screenshot Directory",description:"Directory to save screenshots. If unset, screenshots go to a temp file. Supports ~. Examples: ~/Downloads, ~/Desktop, /sdcard/Download (Android)"},type:"string"},"tools.intentTracing":{ui:{tab:"tools",group:"Execution",label:"Intent Tracing",description:"Ask the agent to describe the intent of each tool call before executing it"},type:"boolean",default:!0},"tools.abortOnFabricatedResult":{ui:{tab:"tools",group:"Execution",label:"Abort On Fabricated Tool Result",description:"With in-band tool calls, stop the model immediately when it starts hallucinating a tool result mid-turn. Disable to let the model finish generating and discard the fabricated continuation instead."},type:"boolean",default:!0},"tools.speculativeExecution.enabled":{ui:{tab:"tools",group:"Execution",label:"Experimental Speculative Execution",description:"Enable the discard-safe first slice: validated local reads through direct read calls and nested eval. Network requests, provider completions, and live filesystem writes are not part of this baseline."},type:"boolean",default:!1},"tools.speculativeExecution.maxInFlight":{ui:{tab:"tools",group:"Execution",label:"Speculative Execution Concurrency",description:"Maximum number of validated local reads allowed to run before normal dispatch.",options:[{value:"1",label:"1 operation",description:""},{value:"2",label:"2 operations",description:""},{value:"3",label:"3 operations",description:""},{value:"4",label:"4 operations",description:""}]},type:"number",default:2},"tools.maxTimeout":{ui:{tab:"tools",group:"Execution",label:"Max Tool Timeout",description:"Maximum timeout in seconds the agent can set for any tool (0 = no limit)",options:[{value:"0",label:"No limit",description:""},{value:"30",label:"30 seconds",description:""},{value:"60",label:"60 seconds",description:""},{value:"120",label:"120 seconds",description:""},{value:"300",label:"5 minutes",description:""},{value:"600",label:"10 minutes",description:""}]},type:"number",default:0},"async.enabled":{ui:{tab:"tools",group:"Execution",label:"Async Execution",description:"Enable async bash commands and background task execution"},type:"boolean",default:!0},"irc.timeoutMs":{ui:{tab:"tools",group:"Execution",label:"IRC Timeout",description:"Timeout for hub send await:true in milliseconds; 0 disables the timeout",options:[{value:"0",label:"Disabled",description:""},{value:"30000",label:"30 seconds",description:""},{value:"60000",label:"1 minute",description:""},{value:"120000",label:"2 minutes",description:""},{value:"300000",label:"5 minutes",description:""}]},type:"number",default:120000},"tools.xdev":{ui:{tab:"tools",group:"Discovery & MCP",label:"xd:// Tools",description:"Mount rarely-used (discoverable) tools under xd:// device URLs driven via read/write instead of shipping their schemas on every request. Sessions whose explicit tool list grants read but omits write mount devices through a device-only write transport (filesystem writes stay rejected). Disable to expose every enabled tool top-level."},type:"boolean",default:!0},"tools.xdevDocs":{ui:{tab:"tools",group:"Discovery & MCP",label:"xd:// Prompt Docs",description:"Choose which mounted-device docs and schemas are inlined in the system prompt. Built-ins keeps core tools inline while MCP and extension tools stay on-demand.",options:[{value:"inline",label:"All Devices",description:"Inline docs and schemas for every mounted device."},{value:"builtins",label:"Built-ins Only",description:"Inline built-in docs; fetch MCP and extension docs on demand."},{value:"catalog",label:"Catalog Only",description:"List every device; fetch all docs on demand."}]},type:"enum",default:"builtins",values:["inline","builtins","catalog"]},"tools.xdevInlineDevices":{ui:{tab:"tools",group:"Discovery & MCP",label:"xd:// Inline Devices",description:"When xd:// Prompt Docs is Built-ins Only, inline dynamic devices whose names match these glob patterns (for example mcp__context_mode_*). Catalog Only ignores this setting."},type:"array",default:[]},"mcp.enableProjectConfig":{ui:{tab:"tools",group:"Discovery & MCP",label:"MCP Project Config",description:"Load .mcp.json/mcp.json from project root"},type:"boolean",default:!0},"mcp.renderMarkdownResults":{ui:{tab:"tools",group:"Discovery & MCP",label:"MCP Markdown Results",description:"Render non-JSON MCP text results as Markdown in the transcript"},type:"boolean",default:!0},"mcp.notifications":{ui:{tab:"tools",group:"Discovery & MCP",label:"MCP Update Injection",description:"Inject MCP resource updates into the agent conversation"},type:"boolean",default:!1},"mcp.notificationDebounceMs":{ui:{tab:"tools",group:"Discovery & MCP",label:"MCP Notification Debounce",description:"Debounce window in milliseconds for MCP resource updates before injecting them into the conversation"},type:"number",default:500},"plan.enabled":{ui:{tab:"tasks",group:"Modes",label:"Plan Mode",description:"Enable plan mode for read-only exploration and planning before execution"},type:"boolean",default:!0},"plan.defaultOnStartup":{ui:{tab:"tasks",group:"Modes",label:"Start in Plan Mode",description:"Automatically enter plan mode at the start of every new session",condition:"planModeEnabled"},type:"boolean",default:!1},"plan.autosave":{ui:{tab:"tasks",group:"Modes",label:"Autosave Plans",description:"Automatically save approved plans to disk when plan mode completes",condition:"planModeEnabled"},type:"boolean",default:!1},"plan.autosaveDir":{ui:{tab:"tasks",group:"Modes",label:"Autosave Directory",description:"Directory for autosaved plans. Supports ~, absolute, and cwd-relative paths. Empty uses <project>/.omp/plans/.",condition:"planAutosaveEnabled"},type:"string"},"goal.enabled":{ui:{tab:"tasks",group:"Modes",label:"Goal Mode",description:"Enable per-session goal mode and the hidden goal tool"},type:"boolean",default:!0},"goal.statusInFooter":{ui:{tab:"tasks",group:"Modes",label:"Goal Status in Footer",description:"Show token budget alongside the goal indicator in the status line"},type:"boolean",default:!0},"goal.continuationModes":{ui:{tab:"tasks",group:"Modes",label:"Goal Continuation Modes",description:"Run modes where active goals may auto-continue between turns"},type:"array",default:["interactive"]},"title.refreshOnReplan":{ui:{tab:"tasks",group:"Modes",label:"Refresh Title on Replan",description:"Refresh generated session titles after todo init replans unless the title was set by the user"},type:"boolean",default:!0},"task.isolation.enabled":{ui:{tab:"tasks",group:"Isolation",label:"Isolate Subagents",description:"Run subagents in an isolated copy of the checkout and integrate their changes afterwards"},type:"boolean",default:!1},"isolation.backend":{ui:{tab:"tasks",group:"Isolation",label:"Isolation Backend",description:"Backend used for subagent isolation and worktree cloning",options:[{value:"auto",label:"Auto",description:"Let the PAL pick the best available backend"},{value:"apfs",label:"APFS",description:"macOS clonefile reflink (APFS)"},{value:"btrfs",label:"btrfs",description:"btrfs subvolume snapshot"},{value:"zfs",label:"ZFS",description:"ZFS snapshot + clone"},{value:"reflink",label:"Reflink",description:"Linux FICLONE per-file reflink"},{value:"overlayfs",label:"Overlayfs",description:"Linux kernel overlay (or fuse-overlayfs fallback)"},{value:"projfs",label:"ProjFS",description:"Windows Projected File System"},{value:"block-clone",label:"Block clone",description:"Windows FSCTL_DUPLICATE_EXTENTS_TO_FILE (NTFS/ReFS)"},{value:"rcopy",label:"Recursive copy",description:"git worktree if available, otherwise recursive copy"}]},type:"enum",default:"auto",values:["auto","apfs","btrfs","zfs","reflink","overlayfs","projfs","block-clone","rcopy"]},"worktree.clone":{ui:{tab:"tasks",group:"Isolation",label:"Clone Checkout into Worktrees",description:"New worktrees from `github pr_checkout` and `git worktree add` in bash start as a copy-on-write clone of the current checkout so ignored build artifacts (node_modules, target) carry over; falls back to a plain checkout when the filesystem cannot clone"},type:"boolean",default:!0},"worktree.cleanSource":{ui:{tab:"tasks",group:"Isolation",label:"Clean Source Checkout on /wt",description:"When creating a worktree with `/wt`, reset tracked changes and remove untracked files from the original checkout after carrying them over"},type:"boolean",default:!1},"task.isolation.apply":{ui:{tab:"tasks",group:"Isolation",label:"Apply Isolated Changes",description:"Automatically apply successful isolated task changes to the parent checkout; disable to retain patch or branch artifacts"},type:"boolean",default:!0},"task.isolation.merge":{ui:{tab:"tasks",group:"Isolation",label:"Isolation Merge Strategy",description:"How isolated task changes are integrated (patch apply or branch merge)",options:[{value:"patch",label:"Patch",description:"Combine diffs and git apply"},{value:"branch",label:"Branch",description:"Commit per task, merge with --no-ff"}]},type:"enum",default:"patch",values:["patch","branch"]},"task.isolation.commits":{ui:{tab:"tasks",group:"Isolation",label:"Isolation Commit Style",description:"Commit message style for nested repo changes (generic or AI-generated)",options:[{value:"generic",label:"Generic",description:"Static commit message"},{value:"ai",label:"AI",description:"AI-generated commit message from diff"}]},type:"enum",default:"generic",values:["generic","ai"]},"worktree.base":{ui:{tab:"tasks",group:"Isolation",label:"Worktree Base Directory",description:"Base directory for agent-managed worktrees — task-isolation copies, `github` PR checkouts, and `omp worktree` cleanup all live here. Unset uses ~/.omp/wt. Must be an absolute or ~-relative path; relative paths are ignored. The OMP_WORKTREE_DIR env var overrides this."},type:"string"},"task.eager":{ui:{tab:"tasks",group:"Subagents",label:"Prefer Task Delegation",description:"How strongly to push delegating work to subagents",options:[{value:"default",label:"Default",description:"Uses the selected model's policy; some models require an explicit delegation request"},{value:"preferred",label:"Preferred",description:"Adds delegation guidance to the system prompt"},{value:"always",label:"Always",description:"Prompt guidance plus a first-turn delegation reminder"}]},type:"enum",default:"default",values:["default","preferred","always"]},"task.batch":{ui:{tab:"tasks",group:"Subagents",label:"Batch Task Calls",description:"Switch the task tool to its batch shape: one call carries { context, tasks[] } — one subagent per item, with an optional per-item agent (defaulting to the session spawn-policy agent), per-item isolation, and a required shared context prepended to every assignment. With async.enabled=true, each spawn runs as an independent background agent with the normal idle/parked lifecycle; otherwise the call blocks for merged results. Disable to restore the flat single-spawn schema."},type:"boolean",default:!0},"task.enableEffort":{ui:{tab:"tasks",group:"Subagents",label:"Per-Task Effort",description:"Expose the optional effort parameter on task spawns, allowing callers to override each subagent's thinking level"},type:"boolean",default:!1},"task.maxConcurrency":{ui:{tab:"tasks",group:"Subagents",label:"Max Concurrent Tasks",description:"Maximum number of subagents running concurrently",options:[{value:"0",label:"Unlimited",description:""},{value:"1",label:"1 task",description:""},{value:"2",label:"2 tasks",description:""},{value:"4",label:"4 tasks",description:""},{value:"8",label:"8 tasks",description:""},{value:"16",label:"16 tasks",description:""},{value:"32",label:"32 tasks",description:""},{value:"64",label:"64 tasks",description:""}]},type:"number",default:32},"task.enableLsp":{ui:{tab:"tasks",group:"Subagents",label:"LSP in Subagents",description:"Allow subagents spawned via the task tool to use the lsp tool. Off by default to keep subagents cheap; enable when LSP-aware delegation is worth the extra tokens."},type:"boolean",default:!1},"task.maxRecursionDepth":{ui:{tab:"tasks",group:"Subagents",label:"Max Task Recursion",description:"How many levels deep subagents can spawn their own subagents",options:[{value:"-1",label:"Unlimited",description:""},{value:"0",label:"None",description:""},{value:"1",label:"Single",description:""},{value:"2",label:"Double",description:""},{value:"3",label:"Triple",description:""}]},type:"number",default:2},"task.maxRuntimeMs":{ui:{tab:"tasks",group:"Subagents",label:"Max Subagent Runtime",description:"Hard wall-clock limit per subagent (ms). 0 disables it. Defense-in-depth against provider-side stream hangs that escape the inference-layer watchdog; triggers a normal subagent abort with a 'timed out' reason.",options:[{value:"0",label:"Unlimited",description:"Default"},{value:"300000",label:"5 minutes",description:""},{value:"900000",label:"15 minutes",description:""},{value:"1800000",label:"30 minutes",description:""},{value:"3600000",label:"1 hour",description:""}]},type:"number",default:0},"task.agentIdleTtlMs":{ui:{tab:"tasks",group:"Subagents",label:"Agent Idle TTL",description:"How long an idle subagent stays live in memory before being parked to disk (ms). Parked agents are revived automatically when messaged or resumed. 0 keeps idle agents live until exit."},type:"number",default:420000},"task.softRequestBudget":{ui:{tab:"tasks",group:"Subagents",label:"Soft Subagent Request Budget",description:"Soft per-subagent request budget (assistant requests per run). Crossing it injects a wrap-up steering notice (see task.softRequestBudgetNotice); at 1.5x the budget the run is force-stopped and the agent must yield its partial findings. 0 disables the guard. Bundled scout/sonic agents cap out at a lower built-in budget, so a value below that cap still applies to them.",options:[{value:"0",label:"Disabled",description:""},{value:"90",label:"90 requests",description:""},{value:"150",label:"150 requests",description:""},{value:"200",label:"200 requests",description:"Default"}]},type:"number",default:200},"task.softRequestBudgetNotice":{ui:{tab:"tasks",group:"Subagents",label:"Soft Request Budget Notice",description:"Inject one steering notice when a subagent crosses its soft request budget, asking it to wrap up before the 1.5x forced-yield stop."},type:"boolean",default:!0},"task.maxEffort":{ui:{tab:"tasks",group:"Subagents",label:"Maximum Per-Spawn Effort",description:"Maximum reasoning effort allowed for the task tool's per-spawn effort hint. Lower values prevent callers from escalating subagents above this ceiling; the default preserves the model's full range.",options:[{value:"minimal",label:"min",description:"Very brief reasoning (~1k tokens)"},{value:"low",label:"low",description:"Light reasoning (~2k tokens)"},{value:"medium",label:"medium",description:"Moderate reasoning (~8k tokens)"},{value:"high",label:"high",description:"Deep reasoning (~16k tokens)"},{value:"xhigh",label:"xhigh",description:"Extended reasoning (~32k tokens)"},{value:"max",label:"max",description:"Maximum reasoning the model supports"}]},type:"enum",default:"max",values:["minimal","low","medium","high","xhigh","max"]},"task.prewalk":{ui:{tab:"tasks",group:"Subagents",label:"Generic Task Prewalk",description:"Arm prewalk for the bundled generic `task` subagent: it starts on its resolved model, plans and begins the implementation, then hands off to the 'smol' role at its first edit/write. Per-agent overrides (task.agentPrewalk, configured from the /agents hub) and user agent `prewalk` frontmatter apply regardless of this toggle."},type:"boolean",default:!1},"tasks.todoClearDelay":{ui:{tab:"tools",group:"Todos",label:"Todo Auto-Clear Delay",description:"Delay before completed or abandoned todos are removed from the todo widget",options:[{value:"0",label:"Instant",description:""},{value:"60",label:"1 minute",description:"Default"},{value:"300",label:"5 minutes",description:""},{value:"900",label:"15 minutes",description:""},{value:"1800",label:"30 minutes",description:""},{value:"3600",label:"1 hour",description:""},{value:"-1",label:"Never",description:""}]},type:"number",default:60},"task.showResolvedModelBadge":{ui:{tab:"appearance",group:"Display",label:"Show Resolved Model Badge",description:"Display the actual model ID used by each subagent in the task widget status line"},type:"boolean",default:!1},"skills.enableSkillCommands":{ui:{tab:"tasks",group:"Commands & Skills",label:"Skill Commands",description:"Register skills as /skill:name commands"},type:"boolean",default:!0},"commands.enableClaudeUser":{ui:{tab:"tasks",group:"Commands & Skills",label:"Claude User Commands",description:"Load commands from ~/.claude/commands/"},type:"boolean",default:!1},"commands.enableClaudeProject":{ui:{tab:"tasks",group:"Commands & Skills",label:"Claude Project Commands",description:"Load commands from .claude/commands/"},type:"boolean",default:!0},"commands.enableOpencodeUser":{ui:{tab:"tasks",group:"Commands & Skills",label:"OpenCode User Commands",description:"Load commands from ~/.config/opencode/commands/"},type:"boolean",default:!1},"commands.enableOpencodeProject":{ui:{tab:"tasks",group:"Commands & Skills",label:"OpenCode Project Commands",description:"Load commands from .opencode/commands/"},type:"boolean",default:!0},"secrets.enabled":{ui:{tab:"providers",group:"Privacy",label:"Hide Secrets",description:"Obfuscate configured secrets and redact credential-shaped tokens before sending to AI providers"},type:"boolean",default:!1},"providers.ollama-cloud.maxConcurrency":{ui:{tab:"providers",group:"Services",label:"Ollama Cloud Max Concurrency",description:"Maximum concurrent Ollama Cloud subagent runs per process; 0 disables the provider-specific limit"},type:"number",default:3},"providers.webSearchOrder":{ui:{tab:"providers",group:"Services",label:"Web Search Provider Order",description:"Prioritized providers for the web_search tool; unlisted providers retain their default order afterward",ordered:!0,options:[{value:"perplexity",label:"Perplexity",description:"Uses auth when configured; explicit selection falls back to anonymous search"},{value:"gemini",label:"Gemini",description:"Google Search grounding via Gemini (uses google-gemini-cli or google-antigravity OAuth)"},{value:"anthropic",label:"Anthropic",description:"Claude's native web_search tool (uses Anthropic OAuth or ANTHROPIC_API_KEY)"},{value:"codex",label:"OpenAI",description:"OpenAI's native web_search (uses ChatGPT OAuth via /login openai-codex)"},{value:"xai",label:"xAI",description:"Grok web search via xAI Responses API (uses SuperGrok/X Premium+ OAuth via /login xai-oauth, or XAI_API_KEY)"},{value:"zai",label:"Z.AI",description:"Calls Z.AI webSearchPrime MCP"},{value:"exa",label:"Exa",description:"API via /login exa or EXA_API_KEY; explicit keyless fallback via MCP"},{value:"tinyfish",label:"TinyFish",description:"Requires TINYFISH_API_KEY"},{value:"jina",label:"Jina",description:"Requires JINA_API_KEY"},{value:"kagi",label:"Kagi",description:"Requires KAGI_API_KEY and Kagi Search API beta access"},{value:"tavily",label:"Tavily",description:"Requires TAVILY_API_KEY"},{value:"firecrawl",label:"Firecrawl",description:"Uses Firecrawl API when FIRECRAWL_API_KEY is set; falls back to keyless mode"},{value:"brave",label:"Brave",description:"Requires BRAVE_API_KEY"},{value:"kimi",label:"Kimi",description:"Kimi Code search (requires a Kimi Code Console key via KIMI_SEARCH_API_KEY/MOONSHOT_SEARCH_API_KEY or /login kimi-code; not MOONSHOT_API_KEY)"},{value:"parallel",label:"Parallel",description:"API via /login parallel or PARALLEL_API_KEY; explicit keyless fallback via MCP"},{value:"synthetic",label:"Synthetic",description:"Requires SYNTHETIC_API_KEY"},{value:"ollama",label:"Ollama",description:"Requires OLLAMA_CLOUD_API_KEY"},{value:"searxng",label:"SearXNG",description:"Requires SEARXNG_ENDPOINT or searxng.endpoint"},{value:"startpage",label:"Startpage",description:"Credential-free scrape of Startpage (Google-backed) results; may be bot-challenged"},{value:"duckduckgo",label:"DuckDuckGo",description:"Credential-free best-effort fallback; may be bot-challenged on datacenter/shared-egress IPs"},{value:"ecosia",label:"Ecosia",description:"Credential-free browser-backed scrape of Ecosia (Google-backed) results"},{value:"google",label:"Google",description:"Credential-free browser-backed fallback; slower and may be bot-challenged"},{value:"mojeek",label:"Mojeek",description:"Credential-free browser-backed scrape of Mojeek's independent index"},{value:"public",label:"Public Web",description:"Queries every credential-free engine in parallel and consolidates deduplicated results"}]},type:"array",default:[]},"providers.webSearchExclude":{ui:{tab:"providers",group:"Services",label:"Excluded Web Search Providers",description:"Providers that web_search should never use, even as fallbacks",options:[{value:"perplexity",label:"Perplexity",description:"Uses auth when configured; explicit selection falls back to anonymous search"},{value:"gemini",label:"Gemini",description:"Google Search grounding via Gemini (uses google-gemini-cli or google-antigravity OAuth)"},{value:"anthropic",label:"Anthropic",description:"Claude's native web_search tool (uses Anthropic OAuth or ANTHROPIC_API_KEY)"},{value:"codex",label:"OpenAI",description:"OpenAI's native web_search (uses ChatGPT OAuth via /login openai-codex)"},{value:"xai",label:"xAI",description:"Grok web search via xAI Responses API (uses SuperGrok/X Premium+ OAuth via /login xai-oauth, or XAI_API_KEY)"},{value:"zai",label:"Z.AI",description:"Calls Z.AI webSearchPrime MCP"},{value:"exa",label:"Exa",description:"API via /login exa or EXA_API_KEY; explicit keyless fallback via MCP"},{value:"tinyfish",label:"TinyFish",description:"Requires TINYFISH_API_KEY"},{value:"jina",label:"Jina",description:"Requires JINA_API_KEY"},{value:"kagi",label:"Kagi",description:"Requires KAGI_API_KEY and Kagi Search API beta access"},{value:"tavily",label:"Tavily",description:"Requires TAVILY_API_KEY"},{value:"firecrawl",label:"Firecrawl",description:"Uses Firecrawl API when FIRECRAWL_API_KEY is set; falls back to keyless mode"},{value:"brave",label:"Brave",description:"Requires BRAVE_API_KEY"},{value:"kimi",label:"Kimi",description:"Kimi Code search (requires a Kimi Code Console key via KIMI_SEARCH_API_KEY/MOONSHOT_SEARCH_API_KEY or /login kimi-code; not MOONSHOT_API_KEY)"},{value:"parallel",label:"Parallel",description:"API via /login parallel or PARALLEL_API_KEY; explicit keyless fallback via MCP"},{value:"synthetic",label:"Synthetic",description:"Requires SYNTHETIC_API_KEY"},{value:"ollama",label:"Ollama",description:"Requires OLLAMA_CLOUD_API_KEY"},{value:"searxng",label:"SearXNG",description:"Requires SEARXNG_ENDPOINT or searxng.endpoint"},{value:"startpage",label:"Startpage",description:"Credential-free scrape of Startpage (Google-backed) results; may be bot-challenged"},{value:"duckduckgo",label:"DuckDuckGo",description:"Credential-free best-effort fallback; may be bot-challenged on datacenter/shared-egress IPs"},{value:"ecosia",label:"Ecosia",description:"Credential-free browser-backed scrape of Ecosia (Google-backed) results"},{value:"google",label:"Google",description:"Credential-free browser-backed fallback; slower and may be bot-challenged"},{value:"mojeek",label:"Mojeek",description:"Credential-free browser-backed scrape of Mojeek's independent index"},{value:"public",label:"Public Web",description:"Queries every credential-free engine in parallel and consolidates deduplicated results"}]},type:"array",default:[]},"providers.webSearchTimeoutSeconds":{ui:{tab:"providers",group:"Services",label:"Web Search Timeout",description:"Hard timeout for each provider's search transport before web_search advances to the next fallback, in seconds (maximum 300)",options:[{value:"30",label:"30 seconds",description:""},{value:"60",label:"1 minute",description:""},{value:"120",label:"2 minutes",description:""},{value:"180",label:"3 minutes",description:""},{value:"300",label:"5 minutes",description:""}]},type:"number",default:60},"providers.webSearchGeminiModel":{ui:{tab:"providers",group:"Services",label:"Gemini web_search model",description:"Model ID for Gemini Google Search grounding. Defaults to gemini-2.5-flash."},type:"string"},"providers.antigravityEndpoint":{ui:{tab:"providers",group:"Services",label:"Antigravity Endpoint Mode",description:"Endpoint routing strategy for google-antigravity providers (chat, search, image, discovery)",options:[{value:"auto",label:"Auto",description:"Try production endpoint, fail over to sandbox on 5xx/429"},{value:"production",label:"Production Only",description:"Force production endpoint only"},{value:"sandbox",label:"Sandbox Only",description:"Force sandbox endpoint only"}]},type:"enum",default:"auto",values:["auto","production","sandbox"]},"providers.imageOrder":{ui:{tab:"providers",group:"Services",label:"Image Provider Order",description:"Prioritized providers for image generation; unlisted providers follow the active session provider and the built-in order",ordered:!0,options:[{value:"openai",label:"OpenAI",description:"OPENAI_API_KEY (gpt-image-2) or active GPT model; falls back to a connected Codex subscription"},{value:"openai-codex",label:"OpenAI Codex (ChatGPT)",description:"Uses a connected Codex / ChatGPT subscription — no OPENAI_API_KEY needed"},{value:"antigravity",label:"Antigravity",description:"Requires google-antigravity OAuth"},{value:"xai",label:"xAI Grok Imagine",description:"Requires xAI Grok OAuth or XAI_API_KEY"},{value:"gemini",label:"Gemini",description:"Requires GEMINI_API_KEY"},{value:"openrouter",label:"OpenRouter",description:"Requires OPENROUTER_API_KEY"},{value:"deepinfra",label:"DeepInfra",description:"Requires DEEPINFRA_API_KEY"}]},type:"array",default:[]},"providers.fireworksTier":{ui:{tab:"providers",group:"Fireworks",label:"Fireworks Tier",description:'Serving path for Fireworks requests. Priority sends `service_tier: "priority"` for higher reliability during peak traffic at a higher price; Standard omits it. Fast (`-fast`) models ignore this — Fast is its own serving path.',options:[{value:"standard",label:"Standard",description:"Default serving path (no service_tier)"},{value:"priority",label:"Priority",description:"Priority serving path: higher reliability, premium per-token pricing"}]},type:"enum",default:"standard",values:["standard","priority"]},"live.voice":{ui:{tab:"providers",group:"Services",label:"Live Voice",description:"Voice used by Codex-backed realtime voice sessions",options:[{value:"arbor",label:"Arbor",description:""},{value:"breeze",label:"Breeze",description:""},{value:"cove",label:"Cove",description:""},{value:"ember",label:"Ember",description:""},{value:"juniper",label:"Juniper",description:""},{value:"maple",label:"Maple",description:""},{value:"sol",label:"Sol",description:""},{value:"spruce",label:"Spruce",description:""},{value:"vale",label:"Vale",description:""}]},type:"enum",default:"sol",values:["arbor","breeze","cove","ember","juniper","maple","sol","spruce","vale"]},"providers.tts":{ui:{tab:"providers",group:"Services",label:"Text-to-Speech Provider",description:"Backend for the tts tool: local on-device neural TTS (Kokoro-82M), xAI Grok Voice, or DeepInfra speech",options:[{value:"auto",label:"Auto",description:"Prefer local on-device TTS; route .mp3 output to xAI when credentials exist"},{value:"local",label:"Local",description:"On-device neural TTS (Kokoro-82M); output is WAV/PCM16"},{value:"xai",label:"xAI Grok Voice",description:"Requires xAI Grok OAuth or XAI_API_KEY; MP3 or WAV"},{value:"deepinfra",label:"DeepInfra Speech",description:"Requires DEEPINFRA_API_KEY; MP3 or WAV"}]},type:"enum",default:"auto",values:["auto","local","xai","deepinfra"]},"tts.localModel":{ui:{tab:"providers",group:"Services",label:"Local TTS Model",description:"On-device neural TTS model (Kokoro-82M) used by the local TTS backend",options:[{value:"kokoro",label:"Kokoro-82M",description:"Kokoro-82M neural TTS — SoTA on-device quality, multi-voice, fully local"}]},type:"enum",default:"kokoro",values:["kokoro"]},"tts.localVoice":{ui:{tab:"providers",group:"Services",label:"Local TTS Voice",description:"Kokoro voice used by the local TTS backend (American/British, female/male)",options:[{value:"af_heart",label:"Heart (American female)",description:""},{value:"af_bella",label:"Bella (American female)",description:""},{value:"af_nicole",label:"Nicole (American female)",description:""},{value:"af_aoede",label:"Aoede (American female)",description:""},{value:"af_kore",label:"Kore (American female)",description:""},{value:"af_sarah",label:"Sarah (American female)",description:""},{value:"am_michael",label:"Michael (American male)",description:""},{value:"am_fenrir",label:"Fenrir (American male)",description:""},{value:"am_puck",label:"Puck (American male)",description:""},{value:"bf_emma",label:"Emma (British female)",description:""},{value:"bm_george",label:"George (British male)",description:""},{value:"bm_fable",label:"Fable (British male)",description:""}]},type:"enum",default:"af_heart",values:["af_heart","af_bella","af_nicole","af_aoede","af_kore","af_sarah","am_michael","am_fenrir","am_puck","bf_emma","bm_george","bm_fable"]},"speech.enabled":{ui:{tab:"providers",group:"Services",label:"Speech Vocalization",description:"Speak the assistant's output aloud through the speakers as it streams"},type:"boolean",default:!1},"speech.mode":{ui:{tab:"providers",group:"Services",label:"Speech Vocalization Mode",description:"What to speak: all = assistant messages + thinking; assistant = messages only; yield = only the final message at turn end",options:[{value:"all",label:"All (messages + thinking)",description:""},{value:"assistant",label:"Assistant messages",description:""},{value:"yield",label:"Final message only",description:""}]},type:"enum",default:"assistant",values:["all","assistant","yield"]},"speech.enhanced":{ui:{tab:"providers",group:"Services",label:"Enhanced Speech Rewriting",description:"Rewrite assistant output into natural spoken prose with the tiny/smol model before synthesis (describes code, drops links and markdown). Falls back to mechanical cleanup on failure"},type:"boolean",default:!1},"speech.voice":{ui:{tab:"providers",group:"Services",label:"Speech Vocalization Voice",description:"Kokoro voice used when speaking the assistant's output aloud",options:[{value:"af_heart",label:"Heart (American female)",description:""},{value:"af_bella",label:"Bella (American female)",description:""},{value:"af_nicole",label:"Nicole (American female)",description:""},{value:"af_aoede",label:"Aoede (American female)",description:""},{value:"af_kore",label:"Kore (American female)",description:""},{value:"af_sarah",label:"Sarah (American female)",description:""},{value:"am_michael",label:"Michael (American male)",description:""},{value:"am_fenrir",label:"Fenrir (American male)",description:""},{value:"am_puck",label:"Puck (American male)",description:""},{value:"bf_emma",label:"Emma (British female)",description:""},{value:"bm_george",label:"George (British male)",description:""},{value:"bm_fable",label:"Fable (British male)",description:""}]},type:"enum",default:"af_heart",values:["af_heart","af_bella","af_nicole","af_aoede","af_kore","af_sarah","am_michael","am_fenrir","am_puck","bf_emma","bm_george","bm_fable"]},"providers.tinyModel":{ui:{tab:"providers",group:"Tiny Model",label:"Tiny Model",description:"Session-title model: online (the TINY role from /models, else @smol) by default, or a local on-device model",options:[{value:"online",label:"Online (TINY role, else @smol)",description:"Online title generation: the TINY model role (set one in /models) when assigned, otherwise the online fallback (commit role, then @smol). No local download or on-device inference."},{value:"lfm2.5-230m",label:"LFM2.5 230M",description:"Recommended local model; fastest LFM2.5 option, about 214 MB cached."},{value:"lfm2.5-350m",label:"LFM2.5 350M",description:"Larger LFM2.5 option, about 292 MB cached; tends toward terse titles."},{value:"falcon-h1-90m",label:"Falcon H1 Tiny 90M",description:"Smallest option, about 147 MB cached; lower fidelity on complex prompts."}]},type:"enum",default:"online",values:["online","lfm2.5-230m","lfm2.5-350m","falcon-h1-90m"]},"providers.tinyModelDevice":{ui:{tab:"providers",group:"Tiny Model",label:"Tiny Model Device",description:"Inference backend for local tiny models (titles + memory): an ONNX execution provider, or `mlx` to download MLX weights and run them through mlx-lm on Apple silicon. Default uses CPU-only ONNX. The PI_TINY_DEVICE env var overrides this.",options:[{value:"default",label:"Default",description:"CPU-only inference"},{value:"gpu",label:"GPU",description:"Accelerated provider (WebGPU/Metal, CUDA, or DirectML)"},{value:"cpu",label:"CPU",description:"CPU-only inference"},{value:"mlx",label:"MLX",description:"Apple silicon GPU via mlx-lm (Python subprocess; macOS arm64)"},{value:"metal",label:"Metal",description:"Alias for MLX"},{value:"webgpu",label:"WebGPU",description:"WebGPU/Metal backend"},{value:"cuda",label:"CUDA",description:"NVIDIA CUDA (Linux x64)"},{value:"dml",label:"DirectML",description:"DirectML backend (Windows)"},{value:"coreml",label:"CoreML",description:"Apple CoreML (opt-in; can fail to load)"},{value:"auto",label:"Auto",description:"Let ONNX Runtime choose a provider"},{value:"wasm",label:"WASM",description:"WebAssembly backend"},{value:"webnn",label:"WebNN",description:"WebNN backend"},{value:"webnn-gpu",label:"WebNN GPU",description:"WebNN GPU device"},{value:"webnn-cpu",label:"WebNN CPU",description:"WebNN CPU device"},{value:"webnn-npu",label:"WebNN NPU",description:"WebNN NPU device"}]},type:"enum",default:"default",values:["default","gpu","cpu","mlx","metal","webgpu","cuda","dml","coreml","auto","wasm","webnn","webnn-gpu","webnn-cpu","webnn-npu"]},"providers.tinyModelDtype":{ui:{tab:"providers",group:"Tiny Model",label:"Tiny Model Precision",description:"ONNX quantization/precision for local tiny models. Default uses each model's shipped dtype (q4); lower precision is faster, higher is more faithful. Ignored by the MLX backend (its repos are pre-quantized 4-bit). The PI_TINY_DTYPE env var overrides this.",options:[{value:"default",label:"Default",description:"Each model's shipped dtype (currently q4)"},{value:"q4",label:"q4",description:"4-bit weights; smallest and fastest"},{value:"q4f16",label:"q4f16",description:"4-bit weights with fp16 activations"},{value:"q8",label:"q8",description:"8-bit quantization"},{value:"fp16",label:"fp16",description:"16-bit float; higher fidelity, larger"},{value:"fp32",label:"fp32",description:"Full precision; largest and slowest"},{value:"int8",label:"int8",description:"Signed 8-bit integer"},{value:"uint8",label:"uint8",description:"Unsigned 8-bit integer"},{value:"bnb4",label:"bnb4",description:"bitsandbytes 4-bit"},{value:"q2",label:"q2",description:"2-bit weights"},{value:"q2f16",label:"q2f16",description:"2-bit weights with fp16 activations"},{value:"q1",label:"q1",description:"1-bit weights"},{value:"q1f16",label:"q1f16",description:"1-bit weights with fp16 activations"},{value:"auto",label:"Auto",description:"Let transformers.js choose per device"}]},type:"enum",default:"default",values:["default","q4","q4f16","q8","fp16","fp32","int8","uint8","bnb4","q2","q2f16","q1","q1f16","auto"]},"providers.memoryModel":{ui:{tab:"memory",group:"General",label:"Memory Model",description:"Mnemopi LLM for fact extraction + consolidation: online (the TINY role from /models, else smol/remote) by default, or a local on-device model",condition:"mnemopiActive",options:[{value:"online",label:"Online (TINY role, else @smol)",description:"Use the online model: the TINY role from /models when set, otherwise @smol. No local model download or on-device inference."},{value:"qwen3-1.7b",label:"Qwen3 1.7B",description:"MLX only (providers.tinyModelDevice=mlx): onnxruntime-node cannot run this ONNX export's RotaryEmbedding cache updates."},{value:"llama3.2:3b",label:"Llama 3.2 3B",description:"Larger Llama 3.2 option for local memory/classifier tasks; higher quality potential at higher disk/RAM/latency cost."},{value:"gemma-3-1b",label:"Gemma 3 1B",description:"Best consolidation/dedup; lighter footprint, but leaks small talk during extraction."},{value:"qwen2.5-1.5b",label:"Qwen2.5 1.5B",description:"Best extraction granularity (atomic facts); weaker consolidation."},{value:"lfm2-1.2b",label:"LFM2 1.2B",description:"Fastest load; solid all-rounder, slightly noisier extraction labels."}]},type:"enum",default:"online",values:["online","qwen3-1.7b","llama3.2:3b","gemma-3-1b","qwen2.5-1.5b","lfm2-1.2b"]},"providers.autoThinkingModel":{ui:{tab:"model",group:"Thinking",label:"Auto Thinking Model",description:"Difficulty classifier for the `auto` thinking level: online (the TINY role from /models, else smol) by default, or a local on-device model",condition:"autoThinkingActive",options:[{value:"online",label:"Online (TINY role, else @smol)",description:"Classify prompt difficulty online with the TINY role model (set one in /models) or @smol; no local download or on-device inference."},{value:"qwen3-1.7b",label:"Qwen3 1.7B",description:"MLX only (providers.tinyModelDevice=mlx): onnxruntime-node cannot run this ONNX export's RotaryEmbedding cache updates."},{value:"llama3.2:3b",label:"Llama 3.2 3B",description:"Larger Llama 3.2 option for local memory/classifier tasks; higher quality potential at higher disk/RAM/latency cost."},{value:"gemma-3-1b",label:"Gemma 3 1B",description:"Best consolidation/dedup; lighter footprint, but leaks small talk during extraction."},{value:"qwen2.5-1.5b",label:"Qwen2.5 1.5B",description:"Best extraction granularity (atomic facts); weaker consolidation."},{value:"lfm2-1.2b",label:"LFM2 1.2B",description:"Fastest load; solid all-rounder, slightly noisier extraction labels."}]},type:"enum",default:"online",values:["online","qwen3-1.7b","llama3.2:3b","gemma-3-1b","qwen2.5-1.5b","lfm2-1.2b"]},"providers.autoThinkingMaxEffort":{ui:{tab:"model",group:"Thinking",label:"Auto Thinking Ceiling",description:"Highest effort the `auto` classifier may resolve. `xhigh` keeps the classifier one tier below the top, so only an explicit `ultrathink` reaches `max`; `max` lets a turn the classifier judges exceptional bill the top tier on models that expose it.",condition:"autoThinkingActive",options:[{value:"xhigh",label:"xhigh",description:"Classifier stops at xhigh (default)"},{value:"max",label:"max",description:"Classifier may resolve max where the model supports it"}]},type:"enum",default:"xhigh",values:["xhigh","max"]},"features.unexpectedStopDetection":{ui:{tab:"interaction",group:"Agent",label:"Unexpected Stops",description:"Automatically recover when the assistant stops without a visible message. Smart also classifies text-only stops with a small model.",options:[{value:"none",label:"None",description:"Disabled"},{value:"mechanical",label:"Mechanical",description:"Retry stops with no visible assistant message; tool calls are excluded (default)"},{value:"smart",label:"Smart",description:"Mechanical + small-model classification of text-only stops"}]},type:"enum",default:"mechanical",values:["none","mechanical","smart"]},"providers.unexpectedStopModel":{ui:{tab:"providers",group:"Tiny Model",label:"Unexpected Stop Model",description:"Classifier for Smart unexpected-stop detection: online (the TINY role from /models, else smol) by default, or a local on-device model.",condition:"unexpectedStopSmart",options:[{value:"online",label:"Online (TINY role, else @smol)",description:"Use the online model: the TINY role from /models when set, otherwise @smol. No local model download or on-device inference."},{value:"qwen3-1.7b",label:"Qwen3 1.7B",description:"MLX only (providers.tinyModelDevice=mlx): onnxruntime-node cannot run this ONNX export's RotaryEmbedding cache updates."},{value:"llama3.2:3b",label:"Llama 3.2 3B",description:"Larger Llama 3.2 option for local memory/classifier tasks; higher quality potential at higher disk/RAM/latency cost."},{value:"gemma-3-1b",label:"Gemma 3 1B",description:"Best consolidation/dedup; lighter footprint, but leaks small talk during extraction."},{value:"qwen2.5-1.5b",label:"Qwen2.5 1.5B",description:"Best extraction granularity (atomic facts); weaker consolidation."},{value:"lfm2-1.2b",label:"LFM2 1.2B",description:"Fastest load; solid all-rounder, slightly noisier extraction labels."}]},type:"enum",default:"online",values:["online","qwen3-1.7b","llama3.2:3b","gemma-3-1b","qwen2.5-1.5b","lfm2-1.2b"]},"providers.kimiApiFormat":{ui:{tab:"providers",group:"Protocol",label:"Kimi API Format",description:"API format for Kimi Code provider (auto follows live model metadata)",options:[{value:"auto",label:"Auto",description:"Use the model's server-declared protocol"},{value:"openai",label:"OpenAI",description:"api.kimi.com"},{value:"anthropic",label:"Anthropic",description:"api.moonshot.ai"}]},type:"enum",default:"auto",values:["auto","openai","anthropic"]},"providers.openaiWebsockets":{ui:{tab:"providers",group:"Protocol",label:"OpenAI WebSockets",description:"Websocket policy for OpenAI Codex models (auto uses model defaults, on forces, off disables)",options:[{value:"auto",label:"Auto",description:"Use model/provider default websocket behavior"},{value:"off",label:"Off",description:"Disable websockets for OpenAI Codex models"},{value:"on",label:"On",description:"Force websockets for OpenAI Codex models"}]},type:"enum",default:"auto",values:["auto","off","on"]},"providers.cacheRetention":{ui:{tab:"providers",group:"Protocol",label:"Prompt Cache Retention",description:"Prompt-cache retention forwarded to providers that support it (Anthropic, Bedrock, OpenRouter, OpenAI)",options:[{value:"auto",label:"Auto",description:"Provider default — Anthropic OAuth subscriber sessions default to 1h, API keys use 5m kept warm by idle keep-alive refreshes; PI_CACHE_RETENTION still applies"},{value:"short",label:"Short (5m)",description:"Cheapest cache writes; Anthropic keeps the entry warm with bounded keep-alive refreshes while idle"},{value:"long",label:"Long (1h)",description:"1h TTL where the provider supports it; pricier writes, no keep-alive refresh requests"},{value:"none",label:"Off",description:"Disable prompt caching and cache-affinity routing"}]},type:"enum",default:"auto",values:["auto","short","long","none"]},"providers.streamFirstEventTimeoutSeconds":{ui:{tab:"providers",group:"Timeouts",label:"Stream First Event Timeout",description:"Seconds to wait for the first model stream event; -1 uses provider/env defaults, 0 disables the watchdog",options:[{value:"-1",label:"Auto",description:"Use provider defaults and PI_* timeout env vars"},{value:"0",label:"Off",description:"Disable first-event timeout"},{value:"300",label:"5 minutes",description:""},{value:"600",label:"10 minutes",description:""},{value:"1800",label:"30 minutes",description:""}]},type:"number",default:-1},"providers.streamIdleTimeoutSeconds":{ui:{tab:"providers",group:"Timeouts",label:"Stream Idle Timeout",description:"Seconds a model stream may stay silent between events; -1 uses provider/env defaults, 0 disables the watchdog",options:[{value:"-1",label:"Auto",description:"Use provider defaults and PI_* timeout env vars"},{value:"0",label:"Off",description:"Disable idle timeout"},{value:"300",label:"5 minutes",description:""},{value:"600",label:"10 minutes",description:""},{value:"1800",label:"30 minutes",description:""}]},type:"number",default:-1},"providers.openrouterVariant":{ui:{tab:"providers",group:"Protocol",label:"OpenRouter Routing",description:"Default routing-variant suffix appended to OpenRouter model IDs (overridden when the selector already names a variant)",options:[{value:"default",label:"Default",description:"No suffix; use OpenRouter's default routing"},{value:"nitro",label:":nitro",description:"Prioritize throughput / lowest latency"},{value:"floor",label:":floor",description:"Prioritize cheapest available provider"},{value:"online",label:":online",description:"Enable OpenRouter's web-search plugin"},{value:"exacto",label:":exacto",description:"Cherry-picked high-quality providers (only defined for select models)"}]},type:"enum",default:"default",values:["default","nitro","floor","online","exacto"]},"providers.fetch":{ui:{tab:"providers",group:"Services",label:"Fetch Provider",description:"Reader backend priority for the fetch/read URL tool",options:[{value:"auto",label:"Auto",description:"Priority: native > trafilatura > lynx > parallel > firecrawl > jina"},{value:"native",label:"Native",description:"In-process HTML→Markdown converter (always available)"},{value:"trafilatura",label:"Trafilatura",description:"Auto-installs via uv/pip"},{value:"lynx",label:"Lynx",description:"Requires lynx system package"},{value:"parallel",label:"Parallel",description:"Requires PARALLEL_API_KEY"},{value:"firecrawl",label:"Firecrawl",description:"Requires FIRECRAWL_API_KEY"},{value:"jina",label:"Jina",description:"Uses r.jina.ai reader (JINA_API_KEY optional)"}]},type:"enum",default:"auto",values:["auto","native","trafilatura","lynx","parallel","firecrawl","jina"]},"codexResets.autoRedeem":{ui:{tab:"providers",group:"Services",label:"Codex Auto-Redeem Saved Resets",description:"Spend saved Codex rate-limit resets automatically: restore an account blocked by an exhausted 5h or weekly window when a turn is stuck and no other account can take over, and salvage credits that are about to expire. unset asks before the first spend, yes spends without prompting, and no disables both checks.",options:[{value:"unset",label:"Unset",description:"Check eligibility, then ask before spending the first saved reset."},{value:"yes",label:"Yes",description:"Spend eligible saved resets without prompting."},{value:"no",label:"No",description:"Do not run the saved-reset auto-redeem check."}]},type:"enum",default:"unset",values:["unset","yes","no"]},"codexResets.minBlockedMinutes":{ui:{tab:"providers",group:"Services",label:"Codex Auto-Redeem Min Block",description:"Only auto-redeem when the natural unblock — the latest reset among the exhausted 5h/weekly windows — is at least this many minutes away (don't spend a scarce credit to save a short wait). Raise it (e.g. 360) to ignore 5h-only blocks."},type:"number",default:60},"codexResets.keepCredits":{ui:{tab:"providers",group:"Services",label:"Codex Auto-Redeem Reserve",description:"Never auto-spend below this many saved resets (0 = the last credit may be spent automatically). Credits about to expire are exempt — a reserved credit that expires preserves nothing."},type:"number",default:0},"codexResets.salvageHorizonHours":{ui:{tab:"providers",group:"Services",label:"Codex Reset Salvage Horizon",description:"Spend a saved Codex reset automatically when it would otherwise expire within this many hours and either chat window (5h or weekly) has meaningful usage to restore (0 disables expiry salvage)."},type:"number",default:12},"provider.appendOnlyContext":{ui:{tab:"providers",group:"Protocol",label:"Append-Only Context",description:"Cache system prompt + tool specs and keep an append-only message log so provider prefix caches (DeepSeek, Xiaomi/SGLang, Anthropic) hit at maximum rate. Auto enables for known prefix-cache providers.",options:[{value:"auto",label:"Auto",description:"Enable for known prefix-cache providers (recommended)"},{value:"on",label:"On",description:"Always enable append-only context"},{value:"off",label:"Off",description:"Disable append-only context"}]},type:"enum",default:"auto",values:["auto","on","off"]},"exa.enabled":{ui:{tab:"providers",group:"Services",label:"Exa",description:"Enable the Exa web search provider"},type:"boolean",default:!0},"exa.searchDelayMs":{ui:{tab:"providers",group:"Services",label:"Exa Search Delay",description:"Minimum delay between Exa web search requests in milliseconds; set 0 to disable pacing"},type:"number",default:1000},"searxng.endpoint":{ui:{tab:"providers",group:"Services",label:"SearXNG Endpoint",description:"Base URL of a self-hosted SearXNG instance used for web search"},type:"string"},"extensionHandlers.toolCallTimeoutMs":{ui:{tab:"tools",group:"Extensions",label:"Tool Call Handler Timeout (ms)",description:"Positive finite active-work timeout for extension tool_call handlers; invalid values use 30000ms, and time awaiting OMP-owned dialogs does not count"},type:"number",default:30000},"dev.autoqa":{ui:{tab:"tools",group:"Developer",label:"Auto QA",description:"Automated tool issue reporting (xd://report_issue). On by default; the first report asks for consent, and denying it disables reporting until re-enabled explicitly"},type:"boolean",default:!0},"dev.autoqaPush.endpoint":{ui:{tab:"tools",group:"Developer",label:"Auto QA Push Endpoint",description:"Full URL receiving Auto QA JSON reports (default https://qa.omp.sh/v1/grievances)"},type:"string",default:"https://qa.omp.sh/v1/grievances"}}}});var FIe;var BIe=R(()=>{FIe={"retry.enabled":{type:"boolean",default:!0,ui:{tab:"model",group:"Retry & Fallback",label:"Retry Enabled",description:"Retry transient provider errors (rate limits, outages, quota walls)."}},"retry.baseDelayMs":{type:"number",default:500,ui:{tab:"model",group:"Retry & Fallback",label:"Retry Base Delay (ms)",description:"Initial backoff before the first retry."}},"thinkingBudgets.minimal":{type:"number",default:1024,ui:{tab:"model",group:"Thinking",label:"Minimal Thinking Budget",description:"Token budget for the minimal thinking level."}},"thinkingBudgets.low":{type:"number",default:2048,ui:{tab:"model",group:"Thinking",label:"Low Thinking Budget",description:"Token budget for the low thinking level."}},"thinkingBudgets.medium":{type:"number",default:8192,ui:{tab:"model",group:"Thinking",label:"Medium Thinking Budget",description:"Token budget for the medium thinking level."}},"thinkingBudgets.high":{type:"number",default:16384,ui:{tab:"model",group:"Thinking",label:"High Thinking Budget",description:"Token budget for the high thinking level."}},"thinkingBudgets.xhigh":{type:"number",default:32768,ui:{tab:"model",group:"Thinking",label:"XHigh Thinking Budget",description:"Token budget for the xhigh thinking level."}},"thinkingBudgets.max":{type:"number",default:32768,ui:{tab:"model",group:"Thinking",label:"Max Thinking Budget",description:"Token budget for the max thinking level."}},modelTags:{type:"record",default:{},ui:{tab:"model",group:"Prompt",label:"Model Tags",description:"Custom role/tag metadata; can introduce additional roles. JSON record."}},modelProviderOrder:{type:"array",default:[],ui:{tab:"model",group:"Prompt",label:"Model Provider Order",description:"Preferred provider order when a model id is ambiguous. JSON array."}},cycleOrder:{type:"array",default:["smol","default","slow"],ui:{tab:"model",group:"Prompt",label:"Model Cycle Order",description:"Roles cycled by the model switcher. JSON array."}},enabledModels:{type:"array",default:[],ui:{tab:"model",group:"Prompt",label:"Enabled Models",description:"Allow-list of models; supports path-scoped entries. Empty means all available models. JSON array."}},"task.agentServiceTierOverrides":{type:"record",default:{},ui:{tab:"model",group:"Sampling",label:"Agent Service Tier Overrides",description:"Sparse exact-name service-tier overrides for agents spawned by task/eval dispatch. JSON record."}},"compaction.reserveTokens":{type:"number",ui:{tab:"context",group:"Compaction",label:"Compaction Reserve Tokens",description:"Absolute reserve floor. Unset = larger of 16384 and 15% of the context window."}},"compaction.keepRecentTokens":{type:"number",default:20000,ui:{tab:"context",group:"Compaction",label:"Keep Recent Tokens",description:"Recent tokens always preserved through compaction."}},"compaction.autoContinue":{type:"boolean",default:!0,ui:{tab:"context",group:"Compaction",label:"Auto-Continue",description:"Continue automatically after compaction."}},"autolearn.minToolCalls":{type:"number",default:5,ui:{tab:"memory",group:"Auto-Learn",label:"Min Tool Calls",description:"Only nudge after a turn that used at least this many tools.",condition:"autolearnActive"}},shellPath:{type:"string",ui:{tab:"shell",group:"Bash",label:"Shell Path",description:"Override the shell binary used by bash."}},"bash.autoBackground.thresholdMs":{type:"number",default:60000,ui:{tab:"shell",group:"Bash",label:"Auto-Background Threshold (ms)",description:"Threshold before auto-backgrounding long-running commands."}},"task.agentAdvisor":{type:"record",default:{},ui:{tab:"tasks",group:"Subagents",label:"Agent Advisor Overrides",description:'Per-agent subagent advisor: agent name → "on" / "off" / advisor model pattern. JSON record.'}},enabledProviders:{type:"array",default:[],ui:{tab:"providers",group:"Services",label:"Enabled Providers",description:"Foreign user-level discovery sources to load; supports path-scoped entries. JSON array."}},disabledProviders:{type:"array",default:[],ui:{tab:"providers",group:"Services",label:"Disabled Providers",description:"Disabled model/discovery providers; supports path-scoped entries. JSON array."}}}});function kf(e,t){return e[t]?.value}function zIe(e,t){switch(e){case void 0:return!0;case"advisorEnabled":return kf(t,"advisor.enabled")===!0;case"vimModeEnabled":return kf(t,"tui.vimMode")===!0;case"hindsightActive":return kf(t,"memory.backend")==="hindsight";case"mnemopiActive":return kf(t,"memory.backend")==="mnemopi";case"autolearnActive":return kf(t,"autolearn.enabled")===!0;case"autoThinkingActive":return kf(t,"defaultThinkingLevel")==="auto";case"usageAwareFallbackEnabled":return kf(t,"retry.usageAwareFallback")===!0;case"planModeEnabled":return kf(t,"plan.enabled")===!0;case"planAutosaveEnabled":return kf(t,"plan.enabled")===!0&&kf(t,"plan.autosave")===!0;case"unexpectedStopSmart":return kf(t,"features.unexpectedStopDetection")==="smart";case"macOS":case"hasImageProtocol":return!0;default:return!0}}function jIe(e){return Object.entries(XC).filter(([,t])=>t.ui.tab===e)}function qIe(e,t,n){if(!n)return!0;return e.toLowerCase().includes(n)||t.ui.label.toLowerCase().includes(n)||t.ui.description.toLowerCase().includes(n)}var JO,XC;var Pne=R(()=>{DIe();BIe();JO=OIe,XC={...JO.entries,...FIe}});function GIe({entryKey:e,entry:t,value:n,initialValue:r,onChangeDirty:a,onCommit:i,saving:s,saveError:o}){let[l,u]=le(()=>{if(n===void 0||n===null)return"";return Array.isArray(n)||typeof n==="object"?JSON.stringify(n):String(n)}),d=De(!1),p=De(r),m=ft(()=>Array.isArray(t.ui.options)?t.ui.options:null,[t.ui.options]);Ke(()=>{let x=n===void 0||n===null?"":Array.isArray(n)||typeof n==="object"?JSON.stringify(n):String(n);u(x),d.current=!1},[n]);let f=()=>{let x=p.current,_=x===void 0||x===null?"":Array.isArray(x)||typeof x==="object"?JSON.stringify(x):String(x);u(_),d.current=!1,a(e,!1,()=>{})},g=(x)=>{let _=l;u(typeof x==="string"?x:JSON.stringify(x)),d.current=!1,i(e,x).then((S)=>{if(S)a(e,!1,()=>{});else u(_),a(e,!0,f)}).catch(()=>{u(_),a(e,!0,f)})},b=()=>{if(!d.current)return;if(t.type==="number"){let x=WIe(l);if(x===null||x===n){f();return}g(x);return}if(t.type==="string"){let x=l.trim();if(x===n){f();return}g(x);return}if(t.type==="array"){let x=Sin(l);if(x===null||UIe(x,n)){f();return}g(x);return}if(t.type==="record"){let x=Tin(l);if(x===null||UIe(x,n)){f();return}g(x)}},y=()=>{let x=d.current;if(d.current=!0,!x)a(e,!0,f)};if(t.type==="boolean"){let x=n===!0;return h("button",{type:"button",role:"switch","aria-checked":x,"aria-label":t.ui.label,onClick:()=>{a(e,!1,()=>{}),g(!x)},disabled:s,className:`relative h-5 w-9 shrink-0 rounded-full transition-colors cursor-pointer ${x?"bg-ink":"bg-ink/15"} ${s?"opacity-50":""}`,children:h("span",{className:`absolute top-0.5 h-4 w-4 rounded-full bg-paper shadow-sm transition-all ${x?"left-[18px]":"left-0.5"}`})})}if(t.type==="array"&&t.ui.ordered&&m){let x=Array.isArray(n)?n.filter((w)=>typeof w==="string"):[],_=(w)=>{g(x.includes(w)?x.filter((C)=>C!==w):[...x,w])},S=(w,C)=>{let T=w+C;if(T<0||T>=x.length)return;let A=[...x],[I]=A.splice(w,1);A.splice(T,0,I),g(A)};return h("div",{className:"flex flex-wrap items-center gap-1.5 justify-end max-w-72",children:[x.map((w,C)=>{let T=m.find((A)=>A.value===w);return h("span",{className:"inline-flex items-center gap-1 rounded-md border border-ink/15 bg-ink/[0.03] px-2 py-0.5 text-[10px] text-ink",children:[C>0&&h("button",{type:"button","aria-label":`${T?.label??w} left`,onClick:()=>S(C,-1),className:"text-ink/40 hover:text-ink cursor-pointer",disabled:s,children:"←"}),T?.label??w,C<x.length-1&&h("button",{type:"button","aria-label":`${T?.label??w} right`,onClick:()=>S(C,1),className:"text-ink/40 hover:text-ink cursor-pointer",disabled:s,children:"→"}),h("button",{type:"button","aria-label":`Remove ${T?.label??w}`,onClick:()=>_(w),className:"text-ink/40 hover:text-error cursor-pointer",disabled:s,children:h(Ln,{size:10})})]},w)}),x.length===0&&h("span",{className:"text-[10px] text-ink/40",children:"empty"}),h("details",{className:"relative",children:[h("summary",{className:"cursor-pointer rounded-md border border-ink/15 px-2 py-0.5 text-[10px] text-ink/70 hover:text-ink select-none",children:"add…"}),h("div",{className:"absolute right-0 top-full z-10 mt-1 max-h-44 w-48 overflow-auto rounded-md border border-ink/15 bg-paper p-1 shadow-lg",children:[m.filter((w)=>!x.includes(w.value)).map((w)=>h("button",{type:"button",onClick:()=>_(w.value),className:"block w-full rounded px-2 py-1 text-left text-[11px] text-ink/80 hover:bg-ink/5",children:w.label||w.value},w.value)),m.every((w)=>x.includes(w.value))&&h("div",{className:"px-2 py-1 text-[10px] text-ink/40",children:"all selected"})]})]})]})}let v=m??(t.type==="enum"&&t.values?t.values.map((x)=>({value:x,label:x,description:""})):null);if(v){let x=n===void 0||n===null?"":String(n);return h("div",{className:"flex items-center gap-2 shrink-0",children:h("select",{"aria-label":t.ui.label,value:x,onChange:(_)=>{let S=_.currentTarget.value;if(t.type==="number"){let w=WIe(S);if(w===null||w===n)return;g(w)}else{if(S===n)return;g(S)}},disabled:s,className:`bg-paper border border-ink/15 rounded-md px-2 py-1 text-ink max-w-56 ${s?"opacity-50":""}`,children:[x===""&&h("option",{value:"",disabled:!0,children:"select…"}),v.map((_)=>h("option",{value:_.value,children:_.label||_.value},_.value))]})})}if(t.type==="array")return h("input",{"aria-label":t.ui.label,type:"text",value:l,onChange:(x)=>{u(x.currentTarget.value),y()},onBlur:b,disabled:s,placeholder:'["anthropic","openai"]',className:`w-48 bg-paper border border-ink/15 rounded-md px-2 py-1 text-ink text-right font-mono text-[11px] ${s?"opacity-50":""}`});if(t.type==="record")return h("input",{"aria-label":t.ui.label,type:"text",value:l,onChange:(x)=>{u(x.currentTarget.value),y()},onBlur:b,disabled:s,placeholder:'{"bash":"prompt"}',className:`w-48 bg-paper border border-ink/15 rounded-md px-2 py-1 text-ink text-right font-mono text-[11px] ${s?"opacity-50":""}`});if(t.type==="number")return h("input",{"aria-label":t.ui.label,type:"text",inputMode:"decimal",value:l,onChange:(x)=>{u(x.currentTarget.value),y()},onBlur:b,disabled:s,className:`w-28 bg-paper border border-ink/15 rounded-md px-2 py-1 text-ink text-right font-mono text-[11px] ${s?"opacity-50":""}`});return h("input",{"aria-label":t.ui.label,type:t.credential?"password":"text",value:l,onChange:(x)=>{u(x.currentTarget.value),y()},onBlur:b,disabled:s,className:`w-48 bg-paper border border-ink/15 rounded-md px-2 py-1 text-ink text-right font-mono text-[11px] ${s?"opacity-50":""} ${o?"border-error":""}`})}var UIe=(e,t)=>JSON.stringify(e)===JSON.stringify(t),WIe=(e)=>{let t=e.trim();if(t===""||t==="-"||t==="+")return null;let n=Number(t);return Number.isFinite(n)?n:null},Sin=(e)=>{let t=e.trim();if(t==="")return[];try{let n=JSON.parse(t);return Array.isArray(n)?n:null}catch{return null}},Tin=(e)=>{let t=e.trim();if(t==="")return{};try{let n=JSON.parse(t);return typeof n==="object"&&n!==null&&!Array.isArray(n)?n:null}catch{return null}};var HIe=R(()=>{lt();bt();fe()});function ZIe({tabs:e,entries:t,activeTabId:n,onSelectTab:r,searchQuery:a,dirtyKeys:i,savingKeys:s,saveErrors:o,onCommit:l,onReset:u,onDirty:d}){let p=e.find((g)=>g.id===n)??e[0],m=ft(()=>{let g=a.trim().toLowerCase();if(g)return Object.entries(XC).filter(([b,y])=>qIe(b,y,g)).map(([b])=>b).slice(0,80);return jIe(p.id).filter(([,b])=>zIe(b.ui.condition,t)).map(([b])=>b)},[t,p.id,a]),f=ft(()=>{if(!a.trim())return[];let g=[],b=new Map;for(let y of m){let v=XC[y],x=e.find((w)=>w.id===v?.ui.tab),_=`${v?.ui.tab??"?"}\x00${v?.ui.group??""}`,S=b.get(_);if(!S)S={label:v?.ui.group?`${x?.label??v?.ui.tab} · ${v.ui.group}`:x?.label??v?.ui.tab??"Other",keys:[]},b.set(_,S),g.push({id:_,...S});S.keys.push(y)}return g},[m,a,e]);return h("div",{className:"w-full flex flex-col gap-3 text-xs",children:[h("div",{className:"flex items-center gap-1 overflow-x-auto pb-1 scrollbar-overlay-container scrollbar-overlay-static",children:e.map((g)=>h("button",{type:"button",onClick:()=>r(g.id),className:`shrink-0 rounded-md px-2.5 py-1 text-[11px] font-medium transition-colors cursor-pointer ${g.id===p.id?"bg-ink/10 text-ink":"text-ink/55 hover:bg-ink/5 hover:text-ink"}`,children:g.label},g.id))}),h("div",{className:"w-full rounded-lg border border-ink/10 divide-y divide-ink/5",children:[a.trim()?f.map((g)=>h(VIe,{keys:g.keys,entries:t,groupLabel:g.label,dirtyKeys:i,savingKeys:s,saveErrors:o,onCommit:l,onReset:u,onDirty:d},g.id)):p.groups.map((g)=>{let b=m.filter((y)=>XC[y]?.ui.group===g);if(b.length===0)return null;return h(VIe,{keys:b,entries:t,groupLabel:g,dirtyKeys:i,savingKeys:s,saveErrors:o,onCommit:l,onReset:u,onDirty:d},g)}),m.length===0&&h("div",{className:"px-3 py-6 text-center text-ink/40",children:a.trim()?"No settings match your search.":"No settings in this tab."})]})]})}function VIe({keys:e,entries:t,groupLabel:n,dirtyKeys:r,savingKeys:a,saveErrors:i,onCommit:s,onReset:o,onDirty:l}){return h("div",{children:[h("div",{className:"px-3 py-1.5 bg-ink/[0.02] text-[10px] uppercase tracking-wide text-ink/40 font-medium",children:n}),e.map((u)=>{let d=XC[u];if(!d?.ui)return null;let p=t[u]?.value,m=r.has(u),f=a.has(u),g=i.has(u);return h("div",{className:"flex items-center justify-between gap-3 px-3 py-2",children:[h("div",{className:"min-w-0 flex-1",children:[h("div",{className:"flex items-center gap-1.5",children:[h("span",{className:"font-medium text-ink",children:d.ui.label}),h("span",{className:"font-mono text-[9px] text-ink/30",title:"config key",children:u}),m&&!f&&h("span",{className:"shrink-0 rounded bg-warning/15 px-1 py-px text-[9px] font-semibold text-warning",children:"unsaved"}),f&&h("span",{className:"shrink-0 text-[9px] text-ink/40",children:"saving…"}),g&&!f&&h("span",{className:"shrink-0 rounded bg-error/10 px-1 py-px text-[9px] font-semibold text-error",children:"save failed"})]}),d.ui.description&&h("div",{className:"text-[10px] text-ink/40 leading-snug",children:d.ui.description}),d.ui.warning&&h("div",{className:"text-[10px] text-error/80 leading-snug",children:d.ui.warning})]}),h("div",{className:"flex items-center gap-1.5 shrink-0",children:[h(GIe,{entryKey:u,entry:d,value:p,initialValue:p,onChangeDirty:l,onCommit:s,saving:f,saveError:g}),h("button",{type:"button","aria-label":`Reset ${d.ui.label}`,title:"Reset to schema default",onClick:()=>o(u),disabled:f,className:`rounded p-1 text-ink/30 hover:text-ink transition-colors cursor-pointer disabled:opacity-40 ${f?"":"hover:bg-ink/5"}`,children:h(qc,{size:11})}),m&&h(zt,{size:11,className:"text-ink/30"})]})]},u)})]})}var YIe=R(()=>{lt();bt();Pne();HIe();fe()});function KIe({modelRoles:e,onSaveRole:t,savedRole:n}){let[r,a]=le(()=>({...e})),i=(s,o)=>{let l=o.trim();if((e[s]??"")===l)return;let u={...r};if(l)u[s]=l;else delete u[s];a(u),t(s,l)};return h("div",{className:"pt-2",children:[h("div",{className:"flex items-center justify-between pb-2",children:[h("div",{children:[h("h3",{className:"text-sm font-semibold text-ink",children:"Model Roles"}),h("p",{className:"text-ink/50 mt-0.5",children:"Role → model selectors from config.yml. Empty removes the role override."})]}),n&&h("span",{className:"inline-flex items-center gap-1 text-[10px] text-ink/60",children:[h(zt,{size:11})," saved"]})]}),h("div",{className:"rounded-lg border border-ink/10 divide-y divide-ink/5",children:Ain.map((s)=>h("div",{className:"flex items-center justify-between gap-3 px-3 py-2.5",children:[h("div",{className:"font-medium text-ink capitalize",children:s}),h("input",{"aria-label":`${s} model`,type:"text",value:r[s]??"",onChange:(o)=>a((l)=>({...l,[s]:o.currentTarget.value})),onBlur:(o)=>i(s,o.currentTarget.value),placeholder:"provider/model",className:"w-56 bg-paper border border-ink/15 rounded-md px-2 py-1 text-ink text-right font-mono"})]},s))})]})}var Ain;var XIe=R(()=>{lt();bt();fe();Ain=["default","smol","slow","vision","plan","commit","tiny","task","advisor"]});function QIe({extensions:e,savedExtension:t,onToggle:n}){if(e.length===0)return null;return h("div",{className:"pt-2",children:[h("div",{className:"flex items-center justify-between pb-2",children:[h("div",{children:[h("h3",{className:"text-sm font-semibold text-ink",children:"Extensions"}),h("p",{className:"text-ink/50 mt-0.5",children:"TS/JS modules loaded from .omp/extensions. Disable writes to config.yml."})]}),t&&h("span",{className:"inline-flex items-center gap-1 text-[10px] text-ink/60",children:[h(zt,{size:11})," saved"]})]}),h("div",{className:"rounded-lg border border-ink/10 divide-y divide-ink/5",children:e.map((r)=>h("div",{className:"flex items-center justify-between gap-3 px-3 py-2.5",children:[h("div",{className:"min-w-0",children:[h("div",{className:"font-medium text-ink",children:r.name}),h("div",{className:"text-[10px] text-ink/40 truncate font-mono",children:[r.sourceRoot," · ",r.filePath]})]}),h("select",{"aria-label":`${r.name} enabled`,value:r.disabled?"false":"true",onChange:()=>n(r),className:"bg-paper border border-ink/15 rounded-md px-2 py-1 text-ink",children:[h("option",{value:"true",children:"enabled"}),h("option",{value:"false",children:"disabled"})]})]},r.id))})]})}var JIe=R(()=>{bt();fe()});function eNe(e){let[t,n]=le(null),[r,a]=le(!1),[i,s]=le({}),[o,l]=le({}),[u,d]=le([]),[p,m]=le(!0),[f,g]=le(JO.tabs[0]?.id??"model"),[b,y]=le(""),[v,x]=le(null),[_,S]=le(new Set),[w,C]=le(new Set),[T,A]=le(new Set),I=Ze(()=>{m(!0),Promise.all([fetch("/api/omp/state").then((B)=>B.json()),fetch("/api/settings/omp-config").then((B)=>B.json()),fetch("/api/model-roles").then((B)=>B.json()),fetch("/api/omp/extensions").then((B)=>B.json())]).then(([B,F,j,q])=>{if(B.running&&B.state)n(B.state);if(a(Boolean(B.running)),F.entries)s(F.entries);if(j.roles&&typeof j.roles==="object")l(j.roles);if(Array.isArray(q.extensions))d(q.extensions)}).catch((B)=>console.error("Failed to load omp settings:",B)).finally(()=>m(!1))},[]);Ke(()=>{I()},[I]);let O=(B)=>{x(B),setTimeout(()=>x((F)=>F===B?null:F),2000)},D=(B,F,j)=>{if(C((q)=>{let W=new Set(q);return W.delete(B),W}),S((q)=>{let W=new Set(q);return W.delete(B),W}),F){if(A((q)=>{let W=new Set(q);return W.delete(B),W}),j!==void 0)s((q)=>({...q,[B]:{...q[B],value:j}}));O(B)}else A((q)=>new Set(q).add(B))},N=Ze(async(B,F)=>{C((j)=>new Set(j).add(B)),S((j)=>{let q=new Set(j);return q.delete(B),q});try{let q=await(await fetch("/api/settings/omp-config",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({key:B,value:F})})).json(),W=Boolean(q.success);return D(B,W,q.value),W}catch(j){return console.error("Failed to save omp config:",j),D(B,!1),!1}},[]),E=Ze(async(B)=>{C((F)=>new Set(F).add(B));try{let j=await(await fetch("/api/settings/omp-config",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({key:B,action:"reset"})})).json(),q=Boolean(j.success);return D(B,q,j.value),q}catch(F){return console.error("Failed to reset omp config:",F),D(B,!1),!1}},[]),L=Ze((B,F)=>{S((j)=>{let q=new Set(j);if(F)q.add(B);else q.delete(B);return q})},[]),M=(B,F)=>{let j={...o};if(F.trim())j[B]=F.trim();else delete j[B];l(j),fetch("/api/model-roles",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({roles:j})}).then((q)=>q.json()).then((q)=>{if(q.success)O(`role-${B}`)}).catch((q)=>console.error("Failed to save model roles:",q))},P=(B)=>{fetch("/api/omp/extensions",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:B.id,disabled:!B.disabled})}).then((F)=>F.json()).then((F)=>{if(F.success)d((j)=>j.map((q)=>q.id===B.id?{...q,disabled:!B.disabled}:q)),O(`ext-${B.id}`)}).catch((F)=>console.error("Failed to toggle extension:",F))};if(p)return h("div",{className:"flex items-center justify-center p-8 text-ink/40 text-xs",children:"Loading OMP settings..."});return h("div",{className:"w-full space-y-4 text-ink pb-2 text-xs",children:[h("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-3 pb-3 border-b border-ink/10",children:[h("div",{children:[h("h2",{className:"text-sm font-semibold text-ink",children:"OMP Engine"}),h("p",{className:"text-ink/50 mt-0.5",children:"Live agent state and the full native config schema from oh-my-pi."})]}),h("div",{className:"flex items-center gap-2",children:[h("div",{className:"relative",children:[h(ia,{size:12,className:"absolute left-2 top-1/2 -translate-y-1/2 text-ink/40 pointer-events-none"}),h("input",{"aria-label":"Search settings",type:"text",value:b,onChange:(B)=>y(B.currentTarget.value),placeholder:"Search settings…",className:"w-44 bg-paper border border-ink/15 rounded-md pl-6 pr-6 py-1 text-ink placeholder:text-ink/40"}),b&&h("button",{type:"button","aria-label":"Clear search",onClick:()=>y(""),className:"absolute right-1.5 top-1/2 -translate-y-1/2 text-ink/40 hover:text-ink cursor-pointer",children:h(Ln,{size:11})})]}),h("button",{type:"button",onClick:I,className:"flex items-center gap-1.5 px-2.5 py-1.5 rounded-lg border border-ink/15 text-ink/70 hover:text-ink hover:bg-ink/5 transition-all cursor-pointer",children:[h(Ur,{size:12})," Refresh"]})]})]}),h("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-2",children:[h("div",{className:"rounded-lg border border-ink/10 bg-ink/[0.03] px-3 py-2",children:[h("div",{className:"text-[10px] uppercase tracking-wide text-ink/40",children:"Engine"}),h("div",{className:"font-semibold text-ink mt-0.5",children:r?"Running":"Idle"})]}),h("div",{className:"rounded-lg border border-ink/10 bg-ink/[0.03] px-3 py-2",children:[h("div",{className:"text-[10px] uppercase tracking-wide text-ink/40",children:"Model"}),h("div",{className:"font-semibold text-ink mt-0.5 truncate",children:t?.model?.id??"—"})]}),h("div",{className:"rounded-lg border border-ink/10 bg-ink/[0.03] px-3 py-2",children:[h("div",{className:"text-[10px] uppercase tracking-wide text-ink/40",children:"Thinking"}),h("div",{className:"font-semibold text-ink mt-0.5",children:t?.thinkingLevel??"—"})]}),h("div",{className:"rounded-lg border border-ink/10 bg-ink/[0.03] px-3 py-2",children:[h("div",{className:"text-[10px] uppercase tracking-wide text-ink/40",children:"Context"}),h("div",{className:"font-semibold text-ink mt-0.5",children:t?.contextUsage?.percent!=null?`${t.contextUsage.percent.toFixed(1)}%`:"—"})]})]}),h("div",{className:"pt-1",children:[h("div",{className:"flex items-center justify-between pb-2",children:[h("div",{children:[h("h3",{className:"text-sm font-semibold text-ink",children:"Config"}),h("p",{className:"text-ink/50 mt-0.5",children:["Schema-driven settings backed by ",h("span",{className:"font-mono",children:"omp config"}),".",b.trim()&&" — matching keys only"]})]}),v&&!v.startsWith("role-")&&!v.startsWith("ext-")&&h("span",{className:"inline-flex items-center gap-1 text-[10px] text-ink/60",children:["saved ",v]})]}),h(ZIe,{tabs:JO.tabs,entries:i,activeTabId:f,onSelectTab:g,searchQuery:b,dirtyKeys:_,savingKeys:w,saveErrors:T,onCommit:N,onReset:E,onDirty:L})]}),h(KIe,{modelRoles:o,onSaveRole:M,savedRole:v?.startsWith("role-")?v.slice(5):null}),h(QIe,{extensions:u,savedExtension:v?.startsWith("ext-")?v.slice(4):null,onToggle:P})]})}var tNe=R(()=>{lt();bt();Pne();YIe();XIe();JIe();fe()});function Pi({value:e,label:t,hint:n,tone:r="default",variant:a="metric",className:i=""}){if(a==="compact")return h("div",{className:"bg-canvas border border-ink/10 rounded-lg px-2.5 py-1.5 flex flex-col gap-0.5 flex-1 min-w-0",children:[h("span",{className:"text-[10px] font-medium text-ink/50",children:t}),h("span",{className:"text-xs font-semibold font-mono text-ink truncate",children:e})]});return h("div",{className:`${r==="muted"?"bg-ink/5 border-ink/10":"bg-paper border-ink/15"} border rounded-lg p-3 shadow-xs flex flex-col justify-between h-full min-w-0 ${i}`,children:[h("div",{className:"min-w-0",children:[h("div",{className:"text-base font-bold tracking-tight text-ink leading-tight tabular-nums break-normal",children:e}),h("div",{className:"text-[11px] font-semibold text-ink/75 mt-1.5 leading-snug min-h-[30px] flex items-start",children:h("span",{className:"min-w-0 break-normal",children:t})})]}),n&&h("div",{className:"text-[10px] text-ink/50 mt-1.5 leading-tight break-words",children:n})]})}var QC=R(()=>{fe()});function nNe({activeMetrics:e}){return h("div",{className:"grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-5 gap-2.5 items-stretch",children:[h(Pi,{value:e.processedTokens,label:"Processed tokens",hint:e.activeRate}),h(Pi,{value:e.cachedInput,label:"Cached input",hint:e.cachedPercent}),h(Pi,{value:e.uncachedInput,label:"Uncached input",hint:"0 cache writes"}),h(Pi,{value:e.outputTokens,label:"Output",hint:e.reasoning}),h(Pi,{value:e.cacheSavings,label:"Cache savings",hint:"0.0x the raw token cost",tone:"muted",className:"col-span-2 sm:col-span-1"})]})}var rNe=R(()=>{QC();fe()});function iNe({breakdownTab:e,setBreakdownTab:t,activeBreakdownRows:n,activeMetrics:r,cadence:a}){return h("div",{className:"grid grid-cols-1 xl:grid-cols-3 gap-3",children:[h("div",{className:"bg-paper border border-ink/15 rounded-lg p-3.5 shadow-xs xl:col-span-2",children:[h("div",{className:"flex justify-between items-center mb-3",children:[h("span",{className:"font-semibold text-xs text-ink",children:"Breakdown"}),h("div",{className:"flex bg-ink/5 rounded p-0.5",children:[h("button",{onClick:()=>t("model"),className:`px-2 py-0.5 rounded text-[9px] font-bold tracking-wider transition-colors ${e==="model"?"bg-paper shadow-xs text-ink":"text-ink/50 hover:text-ink"}`,children:"MODEL"}),h("button",{onClick:()=>t("day"),className:`px-2 py-0.5 rounded text-[9px] font-bold tracking-wider transition-colors ${e==="day"?"bg-paper shadow-xs text-ink":"text-ink/50 hover:text-ink"}`,children:aNe[a]}),h("button",{onClick:()=>t("project"),className:`px-2 py-0.5 rounded text-[9px] font-bold tracking-wider transition-colors ${e==="project"?"bg-paper shadow-xs text-ink":"text-ink/50 hover:text-ink"}`,children:"PROJECT"})]})]}),h("div",{className:"overflow-x-auto",children:h("table",{className:"w-full text-[11px]",children:[h("thead",{children:h("tr",{className:"text-ink/40 border-b border-ink/10",children:[h("th",{className:"font-medium text-left pb-2 capitalize",children:e==="day"?aNe[a].toLowerCase():e}),h("th",{className:"font-medium text-right pb-2",children:"Cost"}),h("th",{className:"font-medium text-right pb-2",children:"Share"}),h("th",{className:"font-medium text-right pb-2",children:"Tokens"})]})}),h("tbody",{className:"divide-y divide-ink/5",children:n.map((i)=>h("tr",{children:[h("td",{className:"py-2.5 flex items-center gap-2",children:[h("div",{className:`w-1.5 h-1.5 rounded-full ${i.dotColorClass}`}),h("span",{className:"font-semibold text-ink whitespace-nowrap",children:i.name})]}),h("td",{className:"py-2.5 text-right font-bold text-ink",children:i.cost}),h("td",{className:"py-2.5 text-right text-ink/60",children:i.share}),h("td",{className:"py-2.5 text-right text-ink/60",children:i.tokens})]},i.name))})]})}),h("div",{className:"h-1.5 w-full bg-ink/5 rounded-full mt-3 overflow-hidden flex",children:n.map((i,s)=>h("div",{className:`h-full ${s===0?"bg-ink/80":s===1?"bg-ink/45 border-l border-paper":"bg-ink/20 border-l border-paper"}`,style:{width:`${i.sharePercent}%`}},i.name))})]}),h("div",{className:"bg-paper border border-ink/15 rounded-lg p-3.5 shadow-xs xl:col-span-1",children:[h("div",{className:"font-semibold text-xs mb-3 text-ink",children:"Cost quality"}),h("div",{className:"space-y-2 text-[11px]",children:[h("div",{className:"flex justify-between items-center",children:[h("span",{className:"text-ink/60",children:"Provider reported"}),h("span",{className:"font-semibold text-ink",children:"100.0%"})]}),h("div",{className:"flex justify-between items-center",children:[h("span",{className:"text-ink/60",children:"Model priced"}),h("span",{className:"font-semibold text-ink",children:"0.0%"})]}),h("div",{className:"flex justify-between items-center",children:[h("span",{className:"text-ink/60",children:"Unpriced"}),h("span",{className:"font-semibold text-ink",children:"0.0%"})]})]}),h("div",{className:"border-t border-ink/10 mt-3 pt-2.5",children:h("div",{className:"flex justify-between items-center text-[11px]",children:[h("span",{className:"text-ink/60",children:"Cache savings"}),h("span",{className:"font-semibold text-ink",children:r.cacheSavings})]})})]})]})}var aNe;var sNe=R(()=>{fe();aNe={daily:"DAY",weekly:"WEEK",monthly:"MONTH"}});function Ein(e,t,n){if(e.length===0)return"";if(e.length===1)return"M0,98 L100,98";let r=n>0?n:1;return e.map((a,i)=>{let s=i/(e.length-1)*100,o=98-t[i]/r*94;return`${i===0?"M":"L"}${s.toFixed(2)},${o.toFixed(2)}`}).join(" ")}function oNe({cadence:e,metric:t,series:n}){let r=n.map((p)=>t==="cost"?p.cost:p.tokens),a=r.length>0?Math.max(...r):0,i=Ein(n,r,a),s=t==="cost"?p9(a)||"$0.00":Kd(a)??"0",o=t==="cost"?p9(a/2)||"$0.00":Kd(a/2)??"0",l=n[0]?.label??"",u=n.length>2?n[Math.floor(n.length/2)]?.label??"":"",d=n.length>1?n[n.length-1]?.label??"":"";if(n.length===0)return h("div",{className:"h-28 flex items-center justify-center text-[11px] text-ink/40",children:"No usage data in this period"});return h("div",{className:"h-28 relative",children:[h("div",{className:"absolute inset-0 flex flex-col justify-between pt-1 pb-4",children:[h("div",{className:"border-t border-ink/5 w-full border-dashed"}),h("div",{className:"border-t border-ink/5 w-full border-dashed"}),h("div",{className:"border-t border-ink/15 w-full"})]}),h("div",{className:"absolute left-0 top-0 bottom-4 flex flex-col justify-between text-[9px] font-mono text-ink/40 w-9",children:[h("span",{children:s}),h("span",{children:o}),h("span",{children:"0"})]}),h("div",{className:"absolute left-10 right-0 bottom-4 top-0 flex items-end",children:h("svg",{className:"w-full h-full",preserveAspectRatio:"none",viewBox:"0 0 100 100",children:h("path",{d:i,fill:"none",stroke:"currentColor",className:"text-ink/60 transition-all duration-300",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}),h("div",{className:"absolute left-10 right-0 bottom-0 h-4 flex justify-between text-[9px] text-ink/40 items-end",children:[h("span",{children:l}),u&&h("span",{children:u}),h("span",{children:d})]}),h("span",{className:"sr-only",children:`${e} ${t} trend`})]})}var lNe=R(()=>{fe()});function cNe({settings:e,onUpdate:t}){let[n,r]=le("daily"),[a,i]=le("30d"),[s,o]=le(!1),[l,u]=le("cost"),[d,p]=le("model"),[m,f]=le(!1),g=new Date().toISOString().slice(0,10),b=new Date(Date.now()-2592000000).toISOString().slice(0,10),[y,v]=le(b),[x,_]=le(g),[S,w]=le([]),[C,T]=le(null),[A,I]=le([]),[O,D]=le([]),N=De(null);Gr(N,()=>o(!1));let E=Ze(()=>{f(!0);let B=a==="custom"?`&customFrom=${y}&customTo=${x}`:"";fetch(`/api/telemetry/tokens?timeRange=${a}&breakdownTab=${d}&cadence=${n}${B}`).then((F)=>F.json()).then((F)=>{if(F.timeRanges)w(F.timeRanges);if(F.metrics)T(F.metrics);if(F.breakdownRows)I(F.breakdownRows);if(F.chartSeries)D(F.chartSeries)}).catch((F)=>console.error("Failed to load token telemetry:",F)).finally(()=>f(!1))},[a,d,n,y,x]);Ke(()=>{E()},[E]);let L=()=>{E()},M=S.find((B)=>B.id===a)||S[0]||{id:a,label:a,dateRange:"Current Period"},P=a==="custom"?`${y} to ${x}`:M.dateRange;if(!C)return h("div",{className:"flex items-center justify-center p-8 text-ink/40 text-xs",children:"Loading token usage telemetry..."});return h("div",{className:"w-full space-y-4 text-ink pb-2 text-xs",children:[h("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-3 pb-3 border-b border-ink/10",children:[h("div",{className:"flex items-center gap-2",children:h("span",{className:"text-xs font-semibold text-ink/75",children:P})}),h("div",{className:"flex flex-wrap items-center gap-2",children:[h("div",{className:"flex items-center bg-paper border border-ink/15 rounded-md text-[11px] font-medium overflow-hidden",children:[h("button",{onClick:()=>r("daily"),className:`px-2.5 py-1 transition-colors ${n==="daily"?"bg-ink/10 text-ink font-semibold":"text-ink/65 hover:bg-ink/5 hover:text-ink"}`,children:"Daily"}),h("button",{onClick:()=>r("weekly"),className:`px-2.5 py-1 transition-colors ${n==="weekly"?"bg-ink/10 text-ink font-semibold":"text-ink/65 hover:bg-ink/5 hover:text-ink"}`,children:"Weekly"}),h("button",{onClick:()=>r("monthly"),className:`px-2.5 py-1 transition-colors ${n==="monthly"?"bg-ink/10 text-ink font-semibold":"text-ink/65 hover:bg-ink/5 hover:text-ink"}`,children:"Monthly"})]}),h("div",{className:"relative",ref:N,children:[h("button",{onClick:()=>o(!s),className:"flex items-center gap-1.5 px-2.5 py-1 bg-paper border border-ink/15 rounded-md text-[11px] font-medium hover:bg-ink/5 text-ink/80 transition-colors",children:[h("span",{children:M.label}),h(Vn,{size:12,className:`transition-transform duration-150 ${s?"rotate-180":""}`})]}),s&&h("div",{className:"absolute right-0 top-full mt-1 w-44 bg-paper border border-ink/15 rounded-md shadow-lg z-30 py-1 text-[11px] divide-y divide-ink/5",children:[S.map((B)=>h("button",{onClick:()=>{if(i(B.id),B.id!=="custom")o(!1)},className:`w-full flex items-center justify-between px-3 py-1.5 text-left hover:bg-ink/5 transition-colors ${a===B.id?"font-semibold text-ink bg-ink/5":"text-ink/70"}`,children:[h("span",{children:B.label}),a===B.id&&h(zt,{size:12,className:"text-ink"})]},B.id)),a==="custom"&&h("div",{className:"px-3 py-2 space-y-2",children:[h("label",{className:"block",children:[h("span",{className:"text-[9px] font-mono uppercase tracking-wider text-ink/40",children:"From"}),h("input",{type:"date",value:y,max:x,onChange:(B)=>v(B.currentTarget.value),className:"mt-0.5 w-full bg-paper border border-ink/15 rounded px-1.5 py-1 text-[11px] text-ink focus:outline-none focus:border-ink/40"})]}),h("label",{className:"block",children:[h("span",{className:"text-[9px] font-mono uppercase tracking-wider text-ink/40",children:"To"}),h("input",{type:"date",value:x,min:y,max:g,onChange:(B)=>_(B.currentTarget.value),className:"mt-0.5 w-full bg-paper border border-ink/15 rounded px-1.5 py-1 text-[11px] text-ink focus:outline-none focus:border-ink/40"})]}),h("button",{onClick:()=>o(!1),className:"w-full bg-ink/10 hover:bg-ink/20 text-ink font-semibold rounded px-2 py-1 transition-colors",children:"Apply"})]})]})]}),h("button",{onClick:L,className:"p-1.5 bg-paper border border-ink/15 rounded-md hover:bg-ink/5 text-ink/80 transition-colors",title:"Refresh Token Telemetry",children:h(Ur,{size:12,className:m?"animate-spin text-ink":""})})]})]}),h("div",{className:"grid grid-cols-1 xl:grid-cols-2 gap-3",children:[h("div",{className:"bg-paper border border-ink/15 rounded-lg p-3.5 shadow-xs flex flex-col justify-between",children:[h("div",{children:[h("div",{className:"text-[10px] font-mono font-semibold text-ink/40 tracking-wider uppercase mb-2",children:"USAGECONFIG.RAWTOKENCOST"}),h("div",{className:"flex items-baseline gap-1 mb-0.5",children:[h("span",{className:"text-2xl font-bold tracking-tight text-ink",children:C.rawCost}),h("span",{className:"text-xs font-semibold text-ink/50",children:"*"})]}),h("p",{className:"text-[11px] text-ink/50 mb-4",children:"* if billed at full API rate"})]}),h("div",{children:[h("div",{className:"h-1.5 w-full bg-ink/10 rounded-full mb-2 overflow-hidden flex",children:h("div",{className:"h-full bg-ink/80 rounded-full",style:{width:"100%"}})}),h("div",{className:"flex items-center justify-between text-[11px]",children:[h("div",{className:"flex items-center gap-1.5",children:[h("div",{className:"w-2 h-2 rounded-full bg-ink/80"}),h("span",{className:"font-semibold text-ink",children:"DeepSeek"})]}),h("div",{className:"flex items-center gap-3 text-ink/70",children:[h("span",{className:"font-bold text-ink",children:C.rawCost}),h("span",{children:"100.0% share"}),h("span",{children:C.processedTokens})]})]})]})]}),h("div",{className:"bg-paper border border-ink/15 rounded-lg p-3.5 shadow-xs flex flex-col",children:[h("div",{className:"flex justify-between items-start mb-3",children:[h("div",{className:"flex items-center gap-2",children:[h("span",{className:"font-semibold text-xs text-ink capitalize",children:[n," ",l]}),h("div",{className:"flex items-center gap-1",children:[h("div",{className:"w-1.5 h-1.5 rounded-full bg-ink/80"}),h("span",{className:"text-[11px] text-ink/60",children:"DeepSeek"})]})]}),h("div",{className:"flex bg-ink/5 rounded p-0.5",children:[h("button",{onClick:()=>u("cost"),className:`px-2 py-0.5 rounded text-[9px] font-bold tracking-wider transition-colors ${l==="cost"?"bg-paper shadow-xs text-ink":"text-ink/50 hover:text-ink"}`,children:"COST"}),h("button",{onClick:()=>u("tokens"),className:`px-2 py-0.5 rounded text-[9px] font-bold tracking-wider transition-colors ${l==="tokens"?"bg-paper shadow-xs text-ink":"text-ink/50 hover:text-ink"}`,children:"TOKENS"})]})]}),h(oNe,{cadence:n,metric:l,series:O})]})]}),h(nNe,{activeMetrics:C}),h(iNe,{breakdownTab:d,setBreakdownTab:p,activeBreakdownRows:A,activeMetrics:C,cadence:n}),h("div",{className:"text-center text-[10px] text-ink/40 pt-2",children:["Scanned ",C.scannedTranscripts," transcripts (1 outside the window) · ",C.usageRecords," usage records · 0.1s"]})]})}var uNe=R(()=>{lt();bt();rNe();sNe();lNe();Ks();fe()});function wf(e){return Lin.format(e)}function jg(e){return Rin.format(e)}function f1(e){let t=new Date(e);if(Number.isNaN(t.getTime()))return e;return Iin.format(t)}function dNe(e,t){if(t<=0)return 0;return Math.min(100,Math.max(0,e/t*100))}function pNe(e,t){if(t<=0)return"0%";return`${new Intl.NumberFormat("id-ID",{maximumFractionDigits:1}).format(e/t*100)}%`}function bx(e){if(!Number.isFinite(e))return"0";let t=Math.abs(e);if(t>=1e9)return`${Dne.format(e/1e9)}B`;if(t>=1e6)return`${Dne.format(e/1e6)}M`;if(t>=1000)return`${Dne.format(e/1000)}K`;return jg(e)}function JC(e){let t=Number(e);if(e.trim()===""||!Number.isFinite(t))return e;return jg(t)}function One(e){if(!Number.isFinite(e))return"$0,00";return`$${Nin.format(e)}`}function eF(e,t){if(!Number.isFinite(e))return"—";switch(t){case"percent":return`${new Intl.NumberFormat("id-ID",{maximumFractionDigits:1}).format(e)}%`;case"usd":return One(e);case"tokens":case"bytes":return bx(e);default:return jg(e)}}function mNe(e){if(!Number.isFinite(e))return"0%";return`${new Intl.NumberFormat("id-ID",{maximumFractionDigits:1}).format(e*100)}%`}var Lin,Rin,Dne,Iin,Nin;var g1=R(()=>{Lin=new Intl.NumberFormat("id-ID",{style:"currency",currency:"IDR",maximumFractionDigits:0}),Rin=new Intl.NumberFormat("id-ID"),Dne=new Intl.NumberFormat("id-ID",{minimumFractionDigits:2,maximumFractionDigits:2,useGrouping:!1}),Iin=new Intl.DateTimeFormat("id-ID",{dateStyle:"medium",timeStyle:"short"});Nin=new Intl.NumberFormat("id-ID",{minimumFractionDigits:2,maximumFractionDigits:2})});function Min(e){let t=e.filter((a)=>a.usedFraction!==void 0);if(t.length===0){let a=e.find((i)=>i.unit==="usd"&&i.remaining!==void 0);if(a)return`${One(a.remaining??0)} left`;return e[0]?.label}let n=t.reduce((a,i)=>(i.usedFraction??0)>(a.usedFraction??0)?i:a),r=Math.round((n.usedFraction??0)*100);return n.windowLabel?`${r}% · ${n.windowLabel}`:`${r}% used`}function eS(e){return e.providers.map((t)=>({id:t.id,name:t.name,error:t.error,hint:$in(t),limits:t.limits,tracked:t.tracked,limitsUnavailable:t.limitsUnavailable,summary:t}))}function $in(e){let t=e.kenari?.quota?.planName;if(t)return t;let n=e.deepseek?.balance?.entries[0];if(n)return`${n.currency} ${JC(n.totalBalance)}`;return Min(e.limits)??"No quota reported"}function tS(e){return e.error?"Error":"Connected"}var x9=R(()=>{g1()});function Pin({provider:e,selected:t}){return h("span",{className:t?"text-ink/80":"text-ink/60",children:h(Ls,{slug:e.id,name:e.name,size:14})})}function hNe({report:e,selectedProviderId:t,onSelectProvider:n}){let r=eS(e);return h("div",{className:"w-56 sm:w-64 border-r border-ink/10 h-full flex flex-col bg-paper/50 flex-shrink-0 select-none",children:[h("div",{className:"px-3.5 py-2.5 border-b border-ink/10 flex items-center justify-between",children:h("span",{className:"text-xs font-semibold text-ink",children:[r.length," provider",r.length===1?"":"s"," with keys"]})}),h("div",{className:"flex-1 scrollbar-overlay-container scrollbar-overlay-static p-1.5 space-y-3 text-xs",children:r.length===0?h("p",{className:"px-2.5 py-3 text-[11px] text-ink/50 leading-relaxed",children:"No provider credentials detected. Add an API key in Settings → Providers."}):h("div",{children:[h("div",{className:"px-2.5 pt-1.5 pb-1 text-[10px] font-bold text-ink/50 uppercase tracking-wider",children:"Providers"}),h("div",{className:"space-y-0.5",children:r.map((a)=>{let i=a.id===t;return h("button",{type:"button",onClick:()=>n(a.id),className:`w-full text-left px-2.5 py-2 rounded-lg transition-colors cursor-pointer flex flex-col gap-0.5 group ${i?"bg-ink/10 text-ink font-medium shadow-2xs":"text-ink/80 hover:bg-ink/5 hover:text-ink"}`,children:[h("div",{className:"flex items-center justify-between gap-1.5",children:[h("div",{className:"flex items-center gap-1.5 min-w-0",children:[h("div",{className:"relative",children:[h(Pin,{provider:a,selected:i}),h("span",{className:`absolute -top-0.5 -right-0.5 w-1.5 h-1.5 rounded-full ${a.error?"bg-error/60":"bg-ink"}`})]}),h("span",{className:"font-semibold text-xs text-ink truncate",children:a.name})]}),h("span",{className:`text-[10px] font-mono uppercase px-1.5 py-0.5 rounded bg-ink/10 font-medium ${a.error?"text-error":"text-ink/70"}`,children:tS(a)})]}),h("p",{className:"text-[11px] text-ink/60 line-clamp-1 leading-snug pl-5",children:a.hint})]},a.id)})})]})})]})}var fNe=R(()=>{x9();th();fe()});function gNe({providerName:e,credentialSources:t,error:n,note:r,children:a}){return h("section",{className:"bg-paper border border-ink/15 rounded-lg shadow-xs",children:[h("header",{className:"flex items-center justify-between gap-2 px-3.5 py-2.5 border-b border-ink/10",children:[h("span",{className:"text-xs font-semibold text-ink",children:e}),h("span",{className:"text-[10px] font-mono uppercase tracking-wider text-ink/50 truncate",title:`Credentials from ${t.join(", ")}`,children:t.join(" · ")})]}),h("div",{className:"p-3.5 space-y-4",children:[n&&h("p",{className:"flex items-start gap-2 text-error text-xs leading-relaxed",children:[h(yr,{size:14,className:"shrink-0 mt-0.5"}),h("span",{className:"break-words",children:n})]}),a,r&&h("p",{className:"text-[10px] text-ink/50 leading-relaxed border-t border-ink/10 pt-2.5",children:r})]})]})}var bNe=R(()=>{bt();fe()});function Din({window:e}){let t=e.usedRp+e.remainingRp,n=dNe(e.usedRp,t);return h("div",{className:"bg-paper border border-ink/15 rounded-lg p-3 shadow-xs space-y-2",children:[h("div",{className:"flex items-center justify-between gap-2",children:[h("span",{className:"text-[11px] font-semibold text-ink",children:e.label}),h("span",{className:"text-[10px] text-ink/50",children:["Resets ",f1(e.resetsAt)]})]}),h("div",{className:"h-1.5 w-full bg-ink/10 rounded-full overflow-hidden",children:h("div",{className:"h-full bg-ink/80 rounded-full",style:{width:`${n}%`}})}),h("div",{className:"flex flex-wrap items-center justify-between gap-x-3 gap-y-0.5 text-[10px] text-ink/60",children:[h("span",{children:["Used ",h("span",{className:"font-semibold text-ink",children:wf(e.usedRp)})," ·"," ",pNe(e.usedRp,t)]}),h("span",{children:["Remaining ",h("span",{className:"font-semibold text-ink",children:wf(e.remainingRp)})]})]})]})}function Oin({coupon:e}){return h("div",{className:"bg-ink/5 border border-ink/10 rounded-lg p-3 shadow-xs",children:[h("div",{className:"flex items-center gap-1.5 mb-1.5",children:[h(r9,{size:12,className:"text-ink/60"}),h("span",{className:"text-[11px] font-semibold text-ink",children:["Active coupon · ",e.name]})]}),h("div",{className:"text-[10px] text-ink/60 space-y-0.5",children:[h("div",{children:["Remaining"," ",h("span",{className:"font-semibold text-ink",children:e.remainingRp===null?"Unlimited":wf(e.remainingRp)})," ","· Used ",h("span",{className:"font-semibold text-ink",children:wf(e.usedRp)})]}),h("div",{children:["Expires ",f1(e.expiresAt)]}),e.scopeModels.length>0&&h("div",{children:["Models: ",e.scopeModels.join(", ")]})]})]})}function yNe({quota:e}){if(!e)return h("p",{className:"text-[11px] text-ink/50",children:"Quota data is not available for this account."});return h("div",{className:"space-y-2",children:[h("div",{className:"flex items-center justify-between gap-2",children:[h("h4",{className:"text-[10px] font-mono font-semibold uppercase tracking-wider text-ink/40",children:"Quota windows"}),e.planName&&h("span",{className:"text-[10px] text-ink/60",children:["Plan ",h("span",{className:"font-semibold text-ink",children:e.planName})]})]}),e.windows.length===0?h("p",{className:"text-[11px] text-ink/50",children:"No quota windows reported."}):h("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-2.5",children:e.windows.map((t)=>h(Din,{window:t},t.key))}),e.coupon&&h(Oin,{coupon:e.coupon})]})}var vNe=R(()=>{bt();g1();fe()});function xNe({usage:e}){if(!e)return h("p",{className:"text-[11px] text-ink/50",children:"The 30-day usage report is not available."});let t=e.rows.reduce((r,a)=>r+a.inputTokens,0),n=e.rows.reduce((r,a)=>r+a.outputTokens,0);return h("div",{className:"space-y-2",children:[h("h4",{className:"text-[10px] font-mono font-semibold uppercase tracking-wider text-ink/40",children:"30-day usage by model"}),h("div",{className:"overflow-x-auto border border-ink/15 rounded-lg shadow-xs",children:h("table",{className:"w-full text-[11px]",children:[h("thead",{className:"bg-ink/5 text-ink/60",children:h("tr",{children:[h("th",{className:"text-left font-semibold px-3 py-2 whitespace-nowrap",children:"Model"}),h("th",{className:"text-right font-semibold px-3 py-2 whitespace-nowrap",children:"Requests"}),h("th",{className:"text-right font-semibold px-3 py-2 whitespace-nowrap",children:"Input tokens"}),h("th",{className:"text-right font-semibold px-3 py-2 whitespace-nowrap",children:"Output tokens"}),h("th",{className:"text-right font-semibold px-3 py-2 whitespace-nowrap",children:"Cost"})]})}),h("tbody",{className:"divide-y divide-ink/10",children:e.rows.length===0?h("tr",{children:h("td",{colSpan:5,className:"px-3 py-3 text-center text-ink/50",children:"No usage recorded in the last 30 days."})}):e.rows.map((r)=>h("tr",{children:[h("td",{className:"px-3 py-1.5 font-mono text-ink whitespace-nowrap",children:r.model}),h("td",{className:"px-3 py-1.5 text-right tabular-nums text-ink/80",children:jg(r.requests)}),h("td",{className:"px-3 py-1.5 text-right tabular-nums text-ink/80",children:bx(r.inputTokens)}),h("td",{className:"px-3 py-1.5 text-right tabular-nums text-ink/80",children:bx(r.outputTokens)}),h("td",{className:"px-3 py-1.5 text-right tabular-nums text-ink/80",children:wf(r.costRp)})]},r.model))}),h("tfoot",{className:"bg-ink/5 border-t border-ink/15 font-semibold text-ink",children:h("tr",{children:[h("td",{className:"px-3 py-2",children:"Total"}),h("td",{className:"px-3 py-2 text-right tabular-nums",children:jg(e.totalRequests)}),h("td",{className:"px-3 py-2 text-right tabular-nums",children:bx(t)}),h("td",{className:"px-3 py-2 text-right tabular-nums",children:bx(n)}),h("td",{className:"px-3 py-2 text-right tabular-nums",children:wf(e.totalCostRp)})]})})]})})]})}var _Ne=R(()=>{g1();fe()});function kNe({report:e}){let{balance:t,usage:n,quota:r}=e;if(!t&&!n&&!r)return h("p",{className:"text-[11px] text-ink/50",children:"No kenari data was returned for this account."});let a=t?t.amountRp!==null?wf(t.amountRp):t.raw:"—",i=t?t.amountRp!==null?t.raw:"Amount could not be parsed":"Balance unavailable",s=n?n.rows.reduce((o,l)=>o+l.inputTokens+l.outputTokens,0):0;return h(Et,{children:[h("div",{className:"@container",children:h("div",{className:"grid grid-cols-3 @[540px]:grid-cols-5 gap-2.5 items-stretch",children:[h(Pi,{value:a,label:"Wallet balance",hint:i}),h(Pi,{value:r?.planName??"—",label:"Active plan",hint:r?"kenari quota plan":"Quota unavailable"}),h(Pi,{value:n?jg(n.totalRequests):"—",label:"Requests (30 days)",hint:n?"Across all models":"Usage report unavailable"}),h(Pi,{value:n?wf(n.totalCostRp):"—",label:"Cost (30 days)",hint:n?"Billed in Rupiah":"Usage report unavailable"}),h(Pi,{value:n?bx(s):"—",label:"Tokens processed (30 days)",hint:n?"Input + output":"Usage report unavailable",tone:"muted",className:"col-span-2 @[540px]:col-span-1"})]})}),h(yNe,{quota:r}),h(xNe,{usage:n})]})}var wNe=R(()=>{QC();vNe();_Ne();g1();fe()});function CNe({report:e}){let t=e.balance;if(!t)return h("p",{className:"text-[11px] text-ink/50",children:"DeepSeek balance data is not available."});return h(Et,{children:[h("div",{className:"@container",children:h("div",{className:"grid grid-cols-3 @[540px]:grid-cols-5 gap-2.5 items-stretch",children:[h(Pi,{value:t.isAvailable?"Available":"Unavailable",label:"Prepaid balance",hint:t.isAvailable?"Account can spend":"Top up required",tone:t.isAvailable?"default":"muted"}),h(Pi,{value:jg(t.entries.length),label:"Currency buckets",hint:t.entries.length>0?"From the balance endpoint":"No entries returned",tone:"muted"})]})}),t.entries.length===0?h("p",{className:"text-[11px] text-ink/50",children:"The balance endpoint returned no currency entries."}):h("div",{className:"grid grid-cols-1 gap-2.5",children:t.entries.map((n)=>h("div",{className:"bg-paper border border-ink/15 rounded-lg p-3 shadow-xs",children:[h("div",{className:"flex items-center justify-between gap-2 mb-2",children:[h("span",{className:"text-[11px] font-semibold text-ink",children:n.currency}),h("span",{className:"text-[10px] font-mono uppercase tracking-wider text-ink/40",children:"Balance"})]}),h("dl",{className:"grid grid-cols-3 gap-2 text-[10px]",children:[h("div",{children:[h("dt",{className:"text-ink/50",children:"Total"}),h("dd",{className:"font-semibold text-ink tabular-nums break-words",children:JC(n.totalBalance)})]}),h("div",{children:[h("dt",{className:"text-ink/50",children:"Granted"}),h("dd",{className:"font-semibold text-ink tabular-nums break-words",children:JC(n.grantedBalance)})]}),h("div",{children:[h("dt",{className:"text-ink/50",children:"Topped up"}),h("dd",{className:"font-semibold text-ink tabular-nums break-words",children:JC(n.toppedUpBalance)})]})]})]},n.currency))})]})}var SNe=R(()=>{QC();g1();fe()});function Fin({limit:e}){let t=Math.min(100,Math.max(0,(e.usedFraction??0)*100)),n=e.modelId??e.accountId,r=e.used!==void 0?eF(e.used,e.unit):void 0,a=e.limit!==void 0?eF(e.limit,e.unit):void 0,i=e.remaining!==void 0?eF(e.remaining,e.unit):void 0;return h("div",{className:"bg-paper border border-ink/15 rounded-lg p-3 shadow-xs space-y-2",children:[h("div",{className:"flex items-start justify-between gap-2",children:[h("div",{className:"min-w-0",children:[h("div",{className:"text-[11px] font-semibold text-ink truncate",children:e.label}),n&&h("div",{className:"text-[10px] text-ink/50 truncate",children:n})]}),h("span",{className:"text-[10px] text-ink/50 flex-shrink-0 whitespace-nowrap",children:e.resetsAt!==void 0?`Resets ${f1(new Date(e.resetsAt).toISOString())}`:""})]}),h("div",{className:"h-1.5 w-full bg-ink/10 rounded-full overflow-hidden",children:h("div",{className:`h-full rounded-full ${e.status==="exhausted"?"bg-error/70":"bg-ink/80"}`,style:{width:`${t}%`}})}),h("div",{className:"flex flex-wrap items-center justify-between gap-x-3 gap-y-0.5 text-[10px] text-ink/60",children:[h("span",{children:["Used"," ",h("span",{className:"font-semibold text-ink",children:e.unit==="percent"||!r?mNe(e.usedFraction??0):r}),e.unit!=="percent"&&r&&a?` of ${a}`:""]}),h("span",{className:"flex items-center gap-2",children:[e.status!=="ok"&&e.status!=="unknown"&&h("span",{className:"text-[10px] font-mono uppercase px-1.5 py-0.5 rounded bg-ink/10 text-ink/70",children:e.status}),i&&h("span",{children:["Remaining ",h("span",{className:"font-semibold text-ink",children:i})]})]})]}),e.notes&&e.notes.length>0&&h("ul",{className:"text-[10px] text-ink/50 leading-relaxed space-y-0.5",children:e.notes.map((s)=>h("li",{children:s},s))})]})}function TNe({limits:e,tracked:t,unavailable:n,notes:r}){return h("div",{className:"space-y-2",children:[h("h4",{className:"text-[10px] font-mono font-semibold uppercase tracking-wider text-ink/40",children:"Quota windows"}),r&&r.length>0&&h("ul",{className:"text-[10px] text-ink/50 leading-relaxed space-y-0.5",children:r.map((a)=>h("li",{children:a},a))}),e.length===0?h("p",{className:"text-[11px] text-ink/50",children:!t?"No quota source for this provider: omp ships no usage adapter for it and it exposes no balance endpoint the chamber knows.":n?"omp tracks this provider but its usage endpoint returned no data — an invalid or expired credential, an unreachable endpoint, or a plan without quota windows.":"No quota windows were reported for this provider."}):h("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-2.5",children:e.map((a)=>h(Fin,{limit:a},a.id))})]})}var ANe=R(()=>{g1();fe()});function tF({summary:e}){let t=Boolean(e.kenari||e.deepseek);return h(gNe,{providerName:e.name,credentialSources:e.credentialSources,error:e.error,note:e.deepseek?Bin:void 0,children:[e.kenari&&h(kNe,{report:e.kenari}),e.deepseek&&h(CNe,{report:e.deepseek}),!t&&(e.limits.length>0||!e.error)&&h(TNe,{limits:e.limits,tracked:e.tracked,unavailable:e.limitsUnavailable,notes:e.notes})]})}var Bin="DeepSeek exposes no usage or quota API — only the prepaid balance (and the web console at platform.deepseek.com) is available.";var Fne=R(()=>{bNe();wNe();SNe();ANe();fe()});function nF(){let[e,t]=le(null),[n,r]=le(!0),[a,i]=le(null),s=Ze(async(o)=>{if(!o?.silent)r(!0);i(null);try{let l=o?.force?"/api/settings/usage?refresh=1":"/api/settings/usage",u=await fetch(l);if(!u.ok)throw Error(`Usage request failed (${u.status})`);let d=await u.json();t(d)}catch(l){i(l instanceof Error?l.message:"Failed to load provider usage")}finally{if(!o?.silent)r(!1)}},[]);return Ke(()=>{s()},[s]),{report:e,isLoading:n,error:a,reload:s}}var Bne=R(()=>{lt()});function ENe(){let{report:e,isLoading:t,error:n,reload:r}=nF(),[a,i]=le(""),s=e?eS(e):[],o=s.find((l)=>l.id===a)??s[0];if(Ke(()=>{if(o&&o.id!==a)i(o.id)},[o,a]),n&&!e)return h("div",{className:"flex h-full w-full flex-col items-center justify-center gap-2 p-8 text-center text-xs",children:[h(yr,{size:16,className:"text-error"}),h("p",{className:"text-error text-xs",children:n}),h("button",{type:"button",onClick:()=>r(),className:"text-[11px] font-semibold text-ink/70 hover:text-ink underline underline-offset-2",children:"Try again"})]});if(!e)return h("div",{className:"flex h-full w-full items-center justify-center text-ink/40 text-xs",children:"Loading provider usage..."});return h("div",{className:"flex h-full w-full overflow-hidden bg-paper text-xs text-ink",children:[h(hNe,{report:e,selectedProviderId:o?.id??"",onSelectProvider:i}),h("div",{className:"flex-1 h-full overflow-hidden flex flex-col",children:[h("div",{className:"px-3.5 py-2.5 border-b border-ink/10 flex items-center justify-between gap-3 flex-shrink-0",children:[h("div",{className:"flex items-center gap-2 min-w-0",children:[h("span",{className:"text-xs font-semibold text-ink/75 truncate",children:["Updated ",f1(e.generatedAt)]}),e.isMock&&h("span",{className:"text-[10px] font-mono uppercase tracking-wider bg-ink/5 border border-ink/15 rounded px-1.5 py-0.5 text-ink/60",children:"Mock"})]}),h("button",{type:"button",onClick:()=>r({force:!0}),disabled:t,className:"p-1.5 bg-paper border border-ink/15 rounded-md hover:bg-ink/5 text-ink/80 transition-colors disabled:opacity-50 flex-shrink-0",title:"Refresh usage",children:h(Ur,{size:12,className:t?"animate-spin text-ink":""})})]}),h("div",{className:"flex-1 overflow-y-auto scrollbar-overlay-container scrollbar-overlay-static p-3.5 space-y-4",children:[n&&h("p",{className:"text-error text-xs",children:n}),o?h(tF,{summary:o.summary}):h("p",{className:"text-[11px] text-ink/50 leading-relaxed",children:"No provider credentials detected. Add an API key in Settings → Providers and it will appear here."})]})]})]})}var LNe=R(()=>{lt();bt();fNe();x9();Fne();g1();Bne();fe()});function RNe({settings:e,onUpdate:t}){let[n,r]=le(!1),a=()=>{r(!0),XO(),setTimeout(()=>r(!1),600)},i=e.chatCompletionSound??e.soundAlerts??!0;return h("div",{className:"w-full space-y-6 text-xs text-ink",children:h("div",{className:"bg-paper border border-ink/15 rounded-lg p-4 shadow-xs space-y-4",children:[h("div",{className:"flex items-start justify-between gap-4",children:[h("div",{className:"flex items-start gap-3",children:[h("div",{className:"w-8 h-8 rounded-md bg-ink/5 border border-ink/10 flex items-center justify-center flex-shrink-0 mt-0.5",children:i?h(BC,{size:16,className:"text-ink"}):h(a9,{size:16,className:"text-ink/40"})}),h("div",{children:[h("div",{className:"text-sm font-semibold text-ink flex items-center gap-2",children:[h("span",{children:"AI Response Completion Sound"}),h("span",{className:"text-[10px] uppercase font-mono px-1.5 py-0.5 rounded bg-ink/10 text-ink/80 font-bold",children:"Audio Chime"})]}),h("p",{className:"text-ink/65 text-[11px] mt-1 leading-relaxed",children:"Play an audible notification chime when the AI completes generating its response, thinking blocks, or diagnostic execution."})]})]}),h("button",{type:"button",role:"switch","aria-checked":i,onClick:()=>{let s=!i;if(t({chatCompletionSound:s,soundAlerts:s}),s)XO()},className:`relative inline-flex h-6 w-11 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none ${i?"bg-ink":"bg-ink/20"}`,children:h("span",{"aria-hidden":"true",className:`pointer-events-none inline-block h-5 w-5 transform rounded-full bg-paper shadow ring-0 transition duration-200 ease-in-out ${i?"translate-x-5":"translate-x-0"}`})})]}),h("div",{className:"pt-3 border-t border-ink/10 flex items-center justify-between",children:[h("span",{className:"text-[11px] text-ink/60 flex items-center gap-1.5",children:[h(ds,{size:13,className:"text-ink/60"}),"Warm harmonic chime synthesized natively via Web Audio"]}),h("button",{type:"button",onClick:a,className:`px-3 py-1.5 rounded-md border border-ink/20 bg-paper hover:bg-ink/5 text-ink font-medium text-[11px] flex items-center gap-1.5 transition-all shadow-xs active:scale-95 ${n?"border-ink bg-ink/10":""}`,children:[h(BC,{size:13,className:n?"animate-bounce text-ink":"text-ink/70"}),h("span",{children:n?"Playing...":"Test Sound"})]})]})]})})}var INe=R(()=>{lt();bt();v9();fe()});function jin({isOpen:e,onClose:t,initialCategory:n="appearance",appSettings:r={},autoOpenAddProvider:a=!1}){let[i,s]=le(n),[o,l]=le(a),[u,d]=le(""),[p,m]=le(!1),[f,g]=le(!1),[b,y]=le(null),v=$O(),[x,_]=le(()=>m9e(zin,r));Ke(()=>{if(e)s(n),l(a),g(!1),d("")},[e,n,a]),Ys("omp:open-settings",(I)=>{let O=I;if(O.detail?.category)s(O.detail.category);if(O.detail?.autoOpenAdd)l(!0)});let S=(I)=>{_((O)=>{let D=typeof I==="function"?I(O):{...O,...I};if(typeof document<"u"&&D.theme)OO(D.theme);return v(g9e(O,D,I)),D}),y("Setting was saved"),setTimeout(()=>y(null),3000)},w=()=>{m(!0),setTimeout(()=>{m(!1)},1200)},C=(I)=>{s(I),g(!0)};if(!e)return null;let T=zO.find((I)=>I.id===i)||zO[0],A=()=>{switch(i){case"appearance":return h(M9e,{settings:x,onUpdate:S});case"chats":return h(U9e,{settings:x,onUpdate:S});case"projects":return h(oLe,{});case"providers":return h(wRe,{autoOpenAdd:o,onAddModalClose:()=>l(!1)});case"agents":return h(DRe,{settings:x,onUpdate:S});case"behavior":return h(jRe,{});case"commands":return h(HRe,{settings:x,onUpdate:S});case"mcp":return h(xIe,{settings:x,onUpdate:S});case"token-usage":return h(cNe,{settings:x,onUpdate:S});case"notifications":return h(RNe,{settings:x,onUpdate:S});case"skills":return h(TIe,{settings:x,onUpdate:S,onNavigateToCatalog:()=>s("skills-catalog")});case"skills-catalog":return h(NIe,{});case"omp":return h(eNe,{settings:x,onUpdate:S});case"usage":return h(ENe,{});default:return h($Ie,{category:i})}};return h("div",{className:"fixed inset-0 bg-ink/40 backdrop-blur-[2px] z-50 flex items-center justify-center p-0 md:p-6 animate-in fade-in duration-150",onClick:t,children:h("div",{className:"relative bg-paper border border-ink/15 md:rounded-2xl shadow-2xl w-full h-full md:max-w-4xl lg:max-w-5xl xl:max-w-[1150px] md:h-[782px] md:max-h-[92vh] flex flex-col md:flex-row overflow-hidden text-ink",onClick:(I)=>I.stopPropagation(),children:[h("div",{className:"hidden md:flex w-64 flex-shrink-0 h-full",children:h(hne,{activeCategory:i,onSelectCategory:(I)=>s(I),searchQuery:u,onSearchChange:d,onReloadOmpEngine:w,isReloading:p,className:"w-full"})}),h("div",{className:`flex-1 flex-col h-full bg-paper overflow-hidden ${f?"flex":"hidden md:flex"}`,children:[h("div",{className:"h-16 px-6 border-b border-ink/10 flex items-center justify-between flex-shrink-0 bg-paper",children:[h("div",{className:"flex items-center space-x-3 min-w-0",children:[h("button",{type:"button",onClick:()=>g(!1),className:"md:hidden p-1.5 -ml-2 rounded-lg hover:bg-ink/5 active:bg-ink/10 text-ink","aria-label":"Back to categories",children:h(uw,{size:20})}),h("div",{className:"truncate",children:[h("h3",{className:"font-semibold text-base tracking-tight text-ink leading-tight",children:T.label}),h("p",{className:"text-[11px] text-ink/60 truncate hidden sm:block",children:T.description})]})]}),h("button",{type:"button",onClick:t,className:"p-1.5 rounded-lg text-ink/50 hover:text-ink hover:bg-ink/5 transition-colors cursor-pointer","aria-label":"Close settings",children:h(Ln,{size:18,strokeWidth:2.2})})]}),h("div",{className:`flex-1 scrollbar-overlay-container scrollbar-overlay-static w-full ${["projects","providers","agents","behavior","commands","mcp","skills","skills-catalog","usage"].includes(i)?"p-0 flex flex-col":"p-6 md:p-8 flex flex-col"}`,children:h("div",{className:"w-full h-full flex-1 flex flex-col",children:A()})})]}),h("div",{className:`flex-1 flex-col h-full bg-canvas md:hidden ${f?"hidden":"flex"}`,children:[h("div",{className:"h-14 px-4 border-b border-ink/10 flex items-center justify-between flex-shrink-0 bg-canvas",children:[h("span",{className:"font-bold text-sm tracking-tight text-ink",children:"Settings"}),h("button",{type:"button",onClick:t,className:"p-1.5 rounded-lg text-ink/50 hover:text-ink","aria-label":"Close",children:h(Ln,{size:18})})]}),h("div",{className:"flex-1 overflow-hidden",children:h(hne,{activeCategory:i,onSelectCategory:C,searchQuery:u,onSearchChange:d,onReloadOmpEngine:w,isReloading:p,className:"w-full border-r-0"})})]}),b&&h("div",{className:"absolute bottom-6 left-1/2 transform -translate-x-1/2 bg-ink text-canvas px-4 py-2 rounded-lg text-xs font-semibold shadow-lg animate-in fade-in slide-in-from-bottom-2 z-50 flex items-center space-x-2",children:[h(zt,{size:14,className:"text-success"}),h("span",{children:b})]})]})})}var zin;var NNe=R(()=>{lt();bt();Og();lne();c9();m1();Fg();E9e();$9e();W9e();lLe();CRe();ORe();qRe();VRe();_Ie();AIe();MIe();PIe();tNe();uNe();LNe();INe();fe();zin={binaryPath:"/Users/you/.bun/bin/omp",showUpdateNotifications:!0,agentControlTool:!0,ompChamberWebTool:!0,theme:o9,fontSize:"standard",editorFont:"JetBrains Mono",streamResponses:!0,streamTransport:"websocket",autoSessionTitle:!0,expandedThinking:!0,detailedToolCalls:!1,notificationsEnabled:!0,buildFailureAlert:!0,soundAlerts:!0,chatCompletionSound:!0,defaultWorkspacePath:"~/Projects/ompchamber",tunnelEnabled:!0,tunnelSubdomain:"omp-dev-preview",activeProvider:"claude",autoApproveSafeCmds:!0,autoPatchErrors:!0,followUpBehavior:"queue",keybindingSend:"Enter",keybindingNewLine:"Shift + Enter",keybindingSteering:"Ctrl / Cmd + Enter"}});function qw({isOpen:e,...t}){if(!e)return null;return h(Qp,{fallback:null,children:h(qin,{isOpen:e,...t})})}var qin;var rF=R(()=>{Zs();fe();qin=ec(()=>Promise.resolve().then(() => (NNe(),{})).then((e)=>({default:jin})))});async function Uin(e){let t=e?`?path=${encodeURIComponent(e)}`:"",n=await fetch(`/api/fs/browse${t}`),r=await n.json();if(!n.ok||r.error)throw Error(r.error||`HTTP ${n.status}`);return r}function MNe({initialPath:e,onSelect:t,onClose:n}){let[r,a]=le(e??""),[i,s]=le(""),[o,l]=le([]),[u,d]=le(null),[p,m]=le(!0),[f,g]=le(null),[b,y]=le(null),v=De(null),x=Ze(async(A)=>{m(!0),g(null);try{let I=await Uin(A);a(I.path??A??""),d(I.parentPath??null),s(I.path??A??""),l(I.directories??[])}catch(I){g(I instanceof Error?I.message:String(I))}finally{m(!1)}},[]);Ke(()=>{x(e)},[e,x]);let _=()=>{if(u)x(u)},S=(A)=>{A.preventDefault();let I=i.trim();if(I)x(I)},w=(A)=>{x(A.path)},C=(A)=>{y(A.path),t(A.path)},T=()=>{if(r)y(r),t(r)};return h("div",{className:"fixed inset-0 bg-ink/30 z-[60] flex items-center justify-center p-4",onClick:n,children:h("div",{className:"bg-paper border border-ink/15 rounded-lg shadow-2xl w-full max-w-lg flex flex-col overflow-hidden",onClick:(A)=>A.stopPropagation(),children:[h("div",{className:"flex items-center justify-between px-4 py-3 border-b border-ink/10",children:[h("h3",{className:"font-semibold text-sm flex items-center space-x-2",children:[h(ff,{size:15,className:"text-ink/70"}),h("span",{children:"Choose Project Folder"})]}),h("button",{type:"button",onClick:n,className:"p-1 rounded hover:bg-ink/10 text-ink/60 hover:text-ink transition-colors","aria-label":"Close picker",children:h(Ln,{size:15})})]}),h("div",{className:"px-4 py-2 border-b border-ink/10 bg-canvas/50",children:[h("form",{onSubmit:S,className:"flex items-center space-x-2",children:[h(Fc,{size:14,className:"text-ink/40 flex-shrink-0"}),h("input",{ref:v,type:"text",value:i,onChange:(A)=>s(A.currentTarget.value),placeholder:"~ or /absolute/path",className:"flex-1 bg-transparent outline-none text-xs font-mono text-ink placeholder-ink/30 py-1",spellcheck:!1}),h("button",{type:"submit",className:"px-2 py-1 rounded bg-ink/5 border border-ink/10 text-[11px] font-medium hover:bg-ink/10 transition-colors",children:"Go"})]}),h("div",{className:"flex items-center space-x-1 mt-1 text-[11px] text-ink/40 truncate",children:[h("button",{type:"button",onClick:()=>void x(),className:"hover:text-ink transition-colors flex items-center",children:[h(Fc,{size:11,className:"mr-0.5"})," home"]}),r.split("/").filter(Boolean).map((A,I,O)=>{let D="/"+r.split("/").filter(Boolean).slice(0,I+1).join("/"),N=I===O.length-1;return h("span",{className:"flex items-center space-x-1 min-w-0",children:[h(ms,{size:10,className:"text-ink/20 flex-shrink-0"}),N?h("span",{className:"text-ink/70 truncate",children:A}):h("button",{type:"button",onClick:()=>void x(D),className:"hover:text-ink transition-colors truncate max-w-[120px]",children:A})]},D)})]})]}),h("div",{className:"flex-1 min-h-[240px] max-h-[360px] scrollbar-overlay-container scrollbar-overlay-static p-2",children:p?h("div",{className:"flex items-center justify-center h-40 text-ink/40",children:h($r,{size:18,className:"animate-spin"})}):f?h("div",{className:"flex flex-col items-center justify-center h-40 text-xs text-red-600 space-y-2 px-4",children:[h("span",{children:f}),h("button",{type:"button",onClick:()=>void x(r||void 0),className:"px-2 py-1 rounded bg-ink/5 border border-ink/10 text-ink/70 hover:bg-ink/10 flex items-center space-x-1",children:[h(Ur,{size:11})," Retry"]})]}):o.length===0?h("div",{className:"text-center py-16 text-xs text-ink/40",children:"No subfolders"}):o.map((A)=>h("div",{className:`group flex items-center justify-between px-2.5 py-2 rounded cursor-pointer transition-colors ${b===A.path?"bg-ink/10":"hover:bg-ink/5"}`,onDblClick:()=>w(A),children:[h("button",{type:"button",onClick:()=>w(A),className:"flex items-center space-x-2 min-w-0 flex-1 text-left",children:[h(Mi,{size:15,className:"text-ink/50 flex-shrink-0"}),h("span",{className:"text-xs truncate text-ink/85",children:A.name})]}),h("button",{type:"button",onClick:()=>C(A),className:"hidden group-hover:flex px-2 py-0.5 rounded bg-ink text-canvas text-[10px] font-semibold hover:bg-ink/80 transition-colors flex-shrink-0",children:"Choose"})]},A.path))}),h("div",{className:"flex items-center justify-between px-4 py-3 border-t border-ink/10",children:[h("div",{className:"flex items-center space-x-2 min-w-0",children:[h("button",{type:"button",onClick:_,disabled:!u,className:"px-2.5 py-1.5 rounded bg-ink/5 border border-ink/10 text-[11px] font-medium hover:bg-ink/10 disabled:opacity-40 transition-colors flex items-center space-x-1",children:[h("span",{children:"↑"}),h("span",{children:"Up"})]}),h("button",{type:"button",onClick:()=>void x(),className:"px-2.5 py-1.5 rounded bg-ink/5 border border-ink/10 text-[11px] font-medium hover:bg-ink/10 transition-colors",children:"Home"})]}),h("div",{className:"flex items-center space-x-2",children:[h("button",{type:"button",onClick:n,className:"px-3 py-1.5 text-xs font-medium text-ink/60 hover:text-ink transition-colors",children:"Cancel"}),h("button",{type:"button",onClick:T,disabled:!r,className:"px-3.5 py-1.5 text-xs font-medium bg-ink text-canvas rounded hover:bg-ink/90 disabled:opacity-50 transition-colors",children:"Use This Folder"})]})]})]})})}var $Ne=R(()=>{lt();bt();fe()});var aF;var zne=R(()=>{aF={name:"ompchamber",version:"3.1.1",description:"Developer web console and diagnostic chamber for AI Oh-My-Pi — Elysia + Preact on Bun.",license:"UNLICENSED",author:"Wijanarko Putra Rajeb <wijanarko.rajeb@gmail.com>",type:"module",engines:{bun:">=1.4.0"},bin:{ompchamber:"./src/cli/ompchamber.js"},repository:{type:"git",url:"git+https://github.com/rajebdev/ompchamber.git"},homepage:"https://github.com/rajebdev/ompchamber#readme",bugs:{url:"https://github.com/rajebdev/ompchamber/issues"},keywords:["omp","oh-my-pi","agent","console","elysia","preact","bun"],files:["src","index.html","bunfig.toml","public","tsconfig.json","dist/client"],scripts:{dev:"bun run --hot src/server/index.ts --ompchamber-server","dev:lan":"HOST=0.0.0.0 bun run --hot src/server/index.ts --ompchamber-server",build:"bun run scripts/build-client.ts",start:"NODE_ENV=production bun run src/server/index.ts --ompchamber-server",typecheck:"tsc",clean:"rm -rf dist",lint:"tsc --noEmit",test:"bun test"},dependencies:{"@fontsource/fira-code":"^5.3.0","@shikijs/langs":"^4.4.3","@shikijs/themes":"^4.4.3","@xterm/addon-fit":"^0.11.0","@xterm/addon-webgl":"^0.19.0","@xterm/xterm":"^6.0.0",dompurify:"^3.4.15",elysia:"^1.4.30",katex:"^0.18.7","lucide-preact":"^1.47.0",marked:"^18.0.11","marked-linkify-it":"^4.0.2",mermaid:"^12.0.0",preact:"^10.29.8",remend:"^1.3.1",ripgrep:"^0.3.1",shiki:"^4.4.3",yaml:"^2.9.1"},devDependencies:{"@semantic-release/changelog":"^7.0.0","@semantic-release/commit-analyzer":"^13.0.1","@semantic-release/git":"^11.0.1","@semantic-release/github":"^12.0.10","@semantic-release/npm":"^13.2.0","@semantic-release/release-notes-generator":"^14.1.1","@tailwindcss/postcss":"^4.1.14","@types/bun":"^1.4.2","@types/node":"^22.14.0","conventional-changelog-conventionalcommits":"^9.3.1","happy-dom":"^20.14.5","semantic-release":"^25.0.9",tailwindcss:"^4.1.14",typescript:"~5.8.2"}}});function PNe(){return h("div",{className:"flex flex-col items-center gap-3 mt-6 pt-1",children:[h("div",{className:"flex items-center justify-center gap-6",children:[h("a",{href:"https://github.com",target:"_blank",rel:"noreferrer",className:"flex items-center gap-2 text-xs font-medium text-ink/75 hover:text-ink transition-colors",children:[h("svg",{className:"w-4 h-4 fill-current",viewBox:"0 0 24 24",children:h("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 2C6.477 2 2 6.484 2 12.017c0 4.425 2.865 8.18 6.839 9.504.5.092.682-.217.682-.483 0-.237-.008-.868-.013-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.53 1.032 1.53 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.029-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.202 2.398.1 2.651.64.7 1.028 1.595 1.028 2.688 0 3.848-2.339 4.695-4.566 4.943.359.309.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.019 10.019 0 0022 12.017C22 6.484 17.522 2 12 2z"})}),h("span",{children:"GitHub"})]}),h("a",{href:"https://discord.com",target:"_blank",rel:"noreferrer",className:"flex items-center gap-2 text-xs font-medium text-ink/75 hover:text-ink transition-colors",children:[h("svg",{className:"w-4 h-4 fill-current",viewBox:"0 0 24 24",children:h("path",{d:"M20.317 4.37a19.791 19.791 0 0 0-4.885-1.515.074.074 0 0 0-.079.037c-.21.375-.444.864-.608 1.25a18.27 18.27 0 0 0-5.487 0 12.64 12.64 0 0 0-.617-1.25.077.077 0 0 0-.079-.037A19.736 19.736 0 0 0 3.677 4.37a.07.07 0 0 0-.032.027C.533 9.046-.32 13.58.099 18.057a.082.082 0 0 0 .031.057 19.9 19.9 0 0 0 5.993 3.03.078.078 0 0 0 .084-.028c.462-.63.874-1.295 1.226-1.994.021-.041.001-.09-.041-.106a13.107 13.107 0 0 1-1.872-.892.077.077 0 0 1-.008-.128 10.2 10.2 0 0 0 .372-.292.074.074 0 0 1 .077-.01c3.929 1.793 8.18 1.793 12.061 0a.074.074 0 0 1 .078.01c.12.098.246.198.373.292a.077.077 0 0 1-.006.127 12.299 12.299 0 0 1-1.873.894.077.077 0 0 0-.041.107c.36.698.772 1.362 1.225 1.993a.076.076 0 0 0 .084.028 19.839 19.839 0 0 0 6.002-3.03.077.077 0 0 0 .032-.054c.5-5.177-.838-9.674-3.549-13.66a.061.061 0 0 0-.031-.028zM8.02 15.33c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.956-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.956 2.418-2.157 2.418zm7.975 0c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.955-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.946 2.418-2.157 2.418z"})}),h("span",{children:"Discord"})]})]}),h("a",{href:"https://x.com",target:"_blank",rel:"noreferrer",className:"flex items-center gap-2 text-xs font-medium text-ink/75 hover:text-ink transition-colors",children:[h("svg",{className:"w-3.5 h-3.5 fill-current",viewBox:"0 0 24 24",children:h("path",{d:"M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z"})}),h("span",{children:"@ompchamber"})]})]})}var DNe=R(()=>{fe()});function Gin({target:e,info:t,applying:n,disabled:r,onApply:a}){let i=e==="ompchamber"?"OMPChamber":"Oh-My-Pi",s=`v${t.current??"…"} → v${t.latest??"…"}`;return h("div",{className:"flex items-center justify-between gap-3 border-t border-ink/10 py-2.5 first:border-t-0",children:[h("div",{className:"min-w-0",children:[h("p",{className:"text-xs font-medium text-ink",children:i}),h("p",{className:"font-mono text-[10px] text-ink/60",children:t.installed?s:"not detected"})]}),t.installed?h("button",{type:"button",onClick:()=>a(e),disabled:r,className:nS,children:[n?h($r,{size:12,className:"animate-spin motion-reduce:animate-none"}):h(Yd,{size:12}),h("span",{children:"Update"})]}):h("span",{className:"shrink-0 text-[10px] text-ink/40",children:"not detected"})]})}function ONe({updates:e,onToast:t}){let n=e.info?[{target:"ompchamber",info:e.info.ompchamber},{target:"omp",info:e.info.omp}].filter(({info:i})=>i.updateAvailable&&i.latest!==null):[],r=async(i)=>{let s=await e.apply(i);if(!t)return;if(!s){t("The update request could not be completed.","error");return}if(i==="ompchamber"){t(s.message,s.success?"success":"error");return}if(s.success)t(`${s.message} A restart may be needed.`,"success");else t(s.message,"error")},a=Boolean(e.info&&!e.checking&&!e.error);return h("section",{className:"mt-5 border-y border-ink/10 py-3 text-left","aria-labelledby":"updates-heading",children:[h("div",{className:"flex items-center justify-between gap-3",children:[h("h3",{id:"updates-heading",className:"text-xs font-semibold text-ink",children:"Updates"}),e.info&&h("span",{className:"font-mono text-[9px] text-ink/40",children:"checked"})]}),h("div",{className:"mt-2.5",children:[e.checking&&h("button",{type:"button",disabled:!0,className:`${nS} w-full justify-center`,children:[h($r,{size:13,className:"animate-spin motion-reduce:animate-none"}),h("span",{children:"Checking…"})]}),e.error&&!e.checking&&h("div",{className:"flex items-start gap-2",children:[h(yr,{size:14,className:"mt-0.5 shrink-0 text-error"}),h("div",{className:"min-w-0 flex-1",children:[h("p",{className:"text-[11px] leading-4 text-error",children:e.error}),h("button",{type:"button",onClick:()=>void e.check(),className:`${nS} mt-2`,children:[h(Ur,{size:12}),h("span",{children:"Retry"})]})]})]}),!e.info&&!e.checking&&!e.error&&h("button",{type:"button",onClick:()=>void e.check(),className:`${nS} w-full justify-center`,children:[h(Ur,{size:13}),h("span",{children:"Check for updates"})]}),a&&n.length===0&&h("div",{className:"flex items-center justify-between gap-3",children:[h("p",{className:"flex items-center gap-1.5 text-[11px] text-success",children:[h(zt,{size:13}),h("span",{children:"You're up to date"})]}),h("button",{type:"button",onClick:()=>void e.check(),className:nS,children:[h(Ur,{size:12}),h("span",{children:"Check again"})]})]}),a&&n.length>0&&h("div",{children:[n.map(({target:i,info:s})=>h(Gin,{target:i,info:s,applying:e.applying===i,disabled:e.applying!==null,onApply:(o)=>void r(o)},i)),h("button",{type:"button",onClick:()=>void e.check(),disabled:e.applying!==null,className:`${nS} mt-2 w-full justify-center`,children:[h(Ur,{size:12}),h("span",{children:"Check again"})]})]})]})]})}var nS="inline-flex items-center gap-1.5 rounded-md border border-ink/20 px-2.5 py-1.5 text-[11px] font-medium text-ink transition-colors hover:border-ink/40 disabled:cursor-not-allowed disabled:opacity-50";var FNe=R(()=>{bt();fe()});function _9({isOpen:e,onClose:t,updates:n,onToast:r}){if(!e)return null;return h("div",{className:"fixed inset-0 bg-ink/40 backdrop-blur-[2px] z-50 flex items-center justify-center p-4 animate-in fade-in duration-200",onClick:t,children:h("div",{className:"relative bg-paper border border-ink/15 rounded-2xl shadow-2xl w-full max-w-[340px] p-6 text-center text-ink select-none",onClick:(a)=>a.stopPropagation(),children:[h("button",{onClick:t,className:"absolute top-4 right-4 text-ink/40 hover:text-ink transition-colors p-1 rounded-md","aria-label":"Close",children:h(Ln,{size:18,className:"stroke-[2.5]"})}),h("div",{className:"flex justify-center pt-2 pb-1",children:h("img",{src:"/icon.svg",alt:"OMPChamber",width:96,height:96,draggable:!1})}),h("h2",{className:"text-xl font-bold tracking-tight mt-3 flex items-center justify-center",children:[h("span",{className:"text-transparent bg-clip-text bg-gradient-to-r from-orange-600 to-amber-500 font-extrabold text-2xl tracking-tighter",children:"OMP"}),h("span",{className:"text-ink text-2xl font-bold ml-[1px]",children:"Chamber"})]}),h("div",{className:"text-xs text-ink/60 space-y-1 mt-1.5 font-mono",children:[h("p",{children:["OMPChamber v",aF.version]}),h("p",{children:["Oh-My-Pi ",n.info?.omp.current??"…"]})]}),h(ONe,{updates:n,onToast:r}),h(PNe,{}),h("p",{className:"text-[11px] text-ink/50 font-normal mt-8",children:"Made with love for the community"})]})})}var BNe=R(()=>{bt();zne();DNe();FNe();fe()});function iF({isOpen:e,onClose:t,onCreate:n}){let[r,a]=le(""),[i,s]=le(""),[o,l]=le(!1),[u,d]=le(null),[p,m]=le(!1);if(Ke(()=>{if(e)a(""),s(""),l(!1),d(null),m(!1)},[e]),!e)return null;return h("div",{className:"fixed inset-0 bg-ink/20 z-50 flex items-center justify-center",children:[h("div",{className:"bg-paper border border-ink/10 rounded-lg shadow-xl w-96 p-4 flex flex-col",children:[h("div",{className:"flex justify-between items-center mb-4 border-b border-ink/10 pb-2",children:[h("h3",{className:"font-semibold text-sm",children:"New Workspace"}),h(Ln,{size:14,className:"cursor-pointer hover:text-ink/60",onClick:t})]}),h("div",{className:"text-sm text-ink/80 py-2 space-y-3",children:[h("div",{children:[h("label",{className:"block text-xs font-semibold mb-1 text-ink",children:"Workspace Name"}),h("input",{type:"text",value:r,onChange:(b)=>a(b.currentTarget.value),placeholder:"e.g. bofis-pro",className:"w-full bg-paper border border-ink/20 rounded px-3 py-2 outline-none focus:border-ink/50 text-sm"})]}),h("div",{children:[h("label",{className:"block text-xs font-semibold mb-1 text-ink",children:["Project Path ",h("span",{className:"text-ink/40 font-normal",children:"(optional — binds omp sessions)"})]}),h("div",{className:"flex items-center space-x-2",children:[h("div",{className:"flex-1 flex items-center bg-paper border border-ink/20 rounded overflow-hidden focus-within:border-ink/50",children:[h("div",{className:"px-2 text-ink/40 bg-ink/5 h-full flex items-center border-r border-ink/10",children:h(Fc,{size:14})}),h("input",{type:"text",value:i,onChange:(b)=>s(b.currentTarget.value),placeholder:"~/projects/my-project",className:"w-full px-3 py-2 outline-none text-sm bg-transparent"})]}),h("button",{type:"button",onClick:()=>m(!0),className:"px-3 py-2 bg-ink/5 border border-ink/10 rounded text-xs font-medium hover:bg-ink/10 transition-colors flex items-center space-x-1.5 flex-shrink-0",children:[h(ff,{size:13}),h("span",{children:"Browse"})]})]})]}),u&&h("div",{className:"text-xs text-red-600",children:u})]}),h("div",{className:"mt-4 flex justify-end space-x-2",children:[h("button",{className:"px-3 py-1.5 text-xs font-medium text-ink/60 hover:text-ink transition-colors",onClick:t,disabled:o,children:"Cancel"}),h("button",{className:"px-4 py-1.5 text-xs font-medium bg-ink text-canvas rounded hover:bg-ink/90 transition-colors disabled:opacity-50",onClick:async()=>{if(!n){t();return}if(!r.trim()&&!i.trim()){d("Enter a name or a project path.");return}l(!0),d(null);try{await n({name:r.trim(),path:i.trim()||void 0}),t()}catch(b){d(b instanceof Error?b.message:String(b)),l(!1)}},disabled:o,children:o?"Creating…":"Create Workspace"})]})]}),p&&h(MNe,{initialPath:i||void 0,onSelect:(b)=>{if(s(b),m(!1),!r.trim()){let y=b.replace(/[\\/]+$/,"").split(/[\\/]/).pop()||"";if(y)a(y)}},onClose:()=>m(!1)})]})}function sF({isOpen:e,onClose:t}){if(!e)return null;return h("div",{className:"fixed inset-0 bg-ink/20 z-50 flex items-center justify-center p-4",children:h("div",{className:"bg-paper border border-ink/10 rounded-lg shadow-xl w-full max-w-2xl flex flex-col overflow-hidden",children:[h("div",{className:"flex justify-between items-center p-4 border-b border-ink/10 bg-paper",children:[h("div",{className:"flex items-center space-x-2 text-ink",children:[h(Xu,{size:16}),h("h3",{className:"font-semibold text-sm",children:"Schedule Chat / Task"})]}),h(Ln,{size:16,className:"cursor-pointer hover:text-ink/60",onClick:t})]}),h("div",{className:"p-4 bg-canvas",children:h("div",{className:"w-full bg-paper border border-ink/20 rounded-md focus-within:border-ink transition-colors flex flex-col shadow-sm",children:[h("div",{className:"flex items-center px-3 py-2 border-b border-ink/5 text-ink/60 space-x-2",children:[h("button",{className:"hover:text-ink transition-colors",children:h(vr,{size:14})}),h("button",{className:"hover:text-ink transition-colors",children:h(Ng,{size:14})}),h("button",{className:"hover:text-ink transition-colors",children:h(vw,{size:14})}),h("div",{className:"flex-1"}),h("div",{className:"flex items-center space-x-2 text-xs text-ink",children:[h("span",{className:"font-medium",children:"Schedule:"}),h("select",{className:"bg-transparent border border-ink/20 rounded px-1.5 py-0.5 outline-none focus:border-ink/50",children:[h("option",{value:"once",children:"Once"}),h("option",{value:"every",children:"Every"}),h("option",{value:"cron",children:"Cron"})]}),h("input",{type:"text",placeholder:"e.g. 5 mins, 0 0 * * *",className:"w-32 bg-transparent border border-ink/20 rounded px-2 py-0.5 outline-none focus:border-ink/50"})]})]}),h("textarea",{placeholder:"Describe your scheduled task, ask a question, or paste commands...",className:"w-full bg-transparent border-none px-4 py-4 text-sm focus:outline-none resize-none text-ink placeholder-ink/40 min-h-[120px]"}),h("div",{className:"flex items-center justify-between px-3 py-2 border-t border-ink/5",children:[h("div",{className:"flex items-center space-x-3 text-ink/60 text-xs",children:[h("div",{className:"flex items-center space-x-1 hover:text-ink cursor-pointer",children:[h(o1,{size:14}),h("span",{children:"Default"})]}),h("div",{className:"flex items-center space-x-1 hover:text-ink cursor-pointer",children:[h(Ia,{size:14}),h("span",{children:"[CMD] DeepSeek V4 Flash"})]})]}),h("button",{onClick:t,className:"flex items-center justify-center space-x-1.5 px-3 py-1.5 rounded bg-ink text-canvas hover:bg-ink/80 transition-colors text-xs font-medium",children:[h("span",{children:"Schedule Task"}),h(bf,{size:12,className:"ml-px"})]})]})]})})]})})}var jne=R(()=>{lt();bt();rF();$Ne();BNe();fe()});var qne,jNe;var qNe=R(()=>{qne=["A-Z","Z-A","LATEST_SESSION","LATEST_ADDED"],jNe={"A-Z":"A-Z","Z-A":"Z-A",LATEST_SESSION:"Latest Session",LATEST_ADDED:"Latest Added"}});function oF({variant:e,sortOption:t,onSortChange:n}){if(e==="mobile")return h(Et,{children:[h("div",{className:"px-2 py-1 text-[10px] uppercase font-bold text-ink/40 font-mono",children:"Sort Workspaces"}),qne.map((r)=>h("button",{type:"button",onClick:()=>n(r),className:`w-full text-left px-2.5 py-1.5 rounded-lg flex items-center justify-between transition-colors ${t===r?"bg-ink/10 font-semibold text-ink":"hover:bg-ink/5 text-ink/80"}`,children:[h("span",{children:r.replace("_"," ")}),t===r&&h(zt,{size:13,className:"text-ink"})]},r))]});return h(Et,{children:[h("div",{className:"px-3 py-1 text-[10px] uppercase font-bold text-ink/40 tracking-wider",children:"Sort Workspaces"}),qne.map((r)=>h("div",{className:`px-3 py-1.5 text-xs cursor-pointer flex items-center justify-between ${t===r?"bg-ink/5 text-ink font-medium":"text-ink/70 hover:bg-ink/5 hover:text-ink"}`,onClick:()=>n(r),children:[h("span",{children:jNe[r]}),t===r&&h("div",{className:"w-1.5 h-1.5 rounded-full bg-ink"})]},r))]})}var Une=R(()=>{bt();qNe();fe()});function lF(e=5,t=7){let[n,r]=le(e),a=Ze(()=>r((i)=>i+t),[t]);return{visibleCount:n,showMore:a}}var Wne=R(()=>{lt()});function cF(e,t){let[n,r]=le(!1),a=ed(),i=ed(),s=ed();return Ke(()=>{if(a.data?.success||i.data?.success)window.dispatchEvent(new CustomEvent("omp:workspace-updated"))},[i.data,a.data]),{confirmDelete:n,requestDelete:()=>r(!0),cancelDelete:()=>r(!1),handlePin:()=>{if(typeof e.id!=="number")return;a.submit({isPinned:String(!e.isPinned)},{method:"POST",action:`/api/folders/${e.id}/pin`}),t()},handleDelete:()=>{if(typeof e.id!=="number")return;i.submit({},{method:"POST",action:`/api/folders/${e.id}/delete`}),r(!1),t()},handleArchive:(p)=>{let m=p.is_archived!==1;s.submit({archived:String(m)},{method:"POST",action:`/api/sessions/${p.id}/archive`}),t()},handleRename:async(p,m)=>{try{let f=new FormData;if(f.set("name",m),!(await fetch(`/api/sessions/${encodeURIComponent(String(p.id))}/rename`,{method:"POST",body:f})).ok)return}catch{return}window.dispatchEvent(new CustomEvent("omp:session-renamed",{detail:{sessionId:String(p.id),title:m}})),t()}}}var Gne=R(()=>{lt();Bw()});function uF(e,t){let[n,r]=le(!1),[a,i]=le(e),s=De(null),o=De(!1);Ke(()=>{if(n)s.current?.select()},[n]);let l=()=>{o.current=!1,i(e),r(!0)},u=()=>{let f=a.trim();if(r(!1),!f||f===e)return;t?.(f)},d=()=>{o.current=!0,r(!1)};return{isEditing:n,draft:a,setDraft:i,inputRef:s,startRename:l,commitRename:u,cancelRename:d,handleKeyDown:(f)=>{if(f.key==="Enter")f.preventDefault(),u();else if(f.key==="Escape")f.preventDefault(),d()},handleBlur:()=>{if(o.current){o.current=!1;return}u()}}}var Hne=R(()=>{lt()});function dF({status:e,live:t,size:n=12}){let r={size:n,strokeWidth:2,"aria-hidden":!0};if(e==="completed")return h(Wr,{...r,className:"text-success"});if(e==="failed")return h(yr,{...r,className:"text-error"});if(e==="aborted")return h(Yu,{...r,className:"text-ink/40"});if(t===!1)return h(Zb,{...r,className:"text-ink/30"});let a=Math.max(5,Math.round(n/2));return h("span",{"aria-hidden":!0,className:"inline-block shrink-0 animate-pulse rounded-full bg-success",style:{width:a,height:a}})}var Vne=R(()=>{bt();fe()});function Hin(e){return Bn(e)&&typeof e.id==="string"&&e.id.length>0&&typeof e.agent==="string"&&e.agent.length>0&&typeof e.status==="string"&&typeof e.index==="number"}async function HNe(e){try{let t=await fetch(`/api/sessions/${encodeURIComponent(e)}/subagents`);if(!t.ok)return null;let n=await t.json().catch(()=>null);if(!Bn(n))return null;let r=Bn(n.data)?n.data:n;if(!Array.isArray(r.subagents))return null;return r.subagents.filter(Hin)}catch{return null}}function pF(e){let t={...e,source:"history",lastUpdate:0},n={};if(e.lastIntent!==void 0)n.lastIntent=e.lastIntent;if(e.toolCount!==void 0)n.toolCount=e.toolCount;if(e.requests!==void 0)n.requests=e.requests;if(e.tokens!==void 0)n.tokens=e.tokens;if(e.contextTokens!==void 0)n.contextTokens=e.contextTokens;if(e.contextWindow!==void 0)n.contextWindow=e.contextWindow;if(e.cost!==void 0)n.cost=e.cost;if(e.durationMs!==void 0)n.durationMs=e.durationMs;if(e.resolvedModel!==void 0)n.resolvedModel=e.resolvedModel;if(Object.keys(n).length>0)t.progress=n;return t}var Zne=()=>{};function ZNe(e){for(let t of e){let n=t.trim();if(n)return n}return}function YNe(e){if(!e)return;let t=e.split(`
|
|
47
47
|
`),n=t.findIndex((r)=>Vin.test(r.trim()));if(n!==-1){let r=t.slice(n+1),a=r.findIndex((s)=>VNe.test(s.trim())),i=ZNe(a===-1?r:r.slice(0,a));if(i)return i}return ZNe(t.filter((r)=>{let a=r.trim();return!VNe.test(a)&&!Zin.test(a)}))}function KNe(e){let t=e.modelRole??e.progress?.modelRole;return t?`${e.id} (${e.agent}:${t})`:`${e.id} (${e.agent})`}function XNe(e){let t=YNe(e.task)??YNe(e.assignment)??e.description,n=`${e.id} (${e.agent})`;return t?`${n}: ${t}`:n}var VNe,Vin,Zin;var Yne=R(()=>{VNe=/^#{1,6}\s+\S/,Vin=/^#{1,6}\s+target\s*:?\s*$/i,Zin=/^complete (the )?assignment\b/i});function Yi(e){return typeof e==="string"&&e.length>0?e:void 0}function Uc(e){return typeof e==="number"&&Number.isFinite(e)?e:void 0}function Kne(e){return e==="bundled"||e==="user"||e==="project"?e:void 0}function Yin(e){return e==="pending"||e==="running"||e==="completed"||e==="failed"||e==="aborted"?e:void 0}function rS(e){if(!Bn(e))return;let t={},n=Uc(e.index);if(n!==void 0)t.index=n;let r=Yi(e.id);if(r!==void 0)t.id=r;let a=Yi(e.agent);if(a!==void 0)t.agent=a;let i=Kne(e.agentSource);if(i!==void 0)t.agentSource=i;let s=Yin(e.status);if(s!==void 0)t.status=s;let o=Yi(e.task);if(o!==void 0)t.task=o;let l=Yi(e.assignment);if(l!==void 0)t.assignment=l;let u=Yi(e.description);if(u!==void 0)t.description=u;let d=Yi(e.lastIntent);if(d!==void 0)t.lastIntent=d;let p=Yi(e.currentTool);if(p!==void 0)t.currentTool=p;let m=Yi(e.currentToolArgs);if(m!==void 0)t.currentToolArgs=m;let f=Uc(e.currentToolStartMs);if(f!==void 0)t.currentToolStartMs=f;if(Array.isArray(e.recentTools))t.recentTools=e.recentTools;if(Array.isArray(e.recentOutput))t.recentOutput=e.recentOutput.filter((T)=>typeof T==="string");let g=Uc(e.toolCount);if(g!==void 0)t.toolCount=g;let b=Uc(e.requests);if(b!==void 0)t.requests=b;let y=Uc(e.tokens);if(y!==void 0)t.tokens=y;let v=Uc(e.contextTokens);if(v!==void 0)t.contextTokens=v;let x=Uc(e.contextWindow);if(x!==void 0)t.contextWindow=x;let _=Uc(e.cost);if(_!==void 0)t.cost=_;let S=Uc(e.durationMs);if(S!==void 0)t.durationMs=S;if(typeof e.modelOverride==="string"||Array.isArray(e.modelOverride)&&e.modelOverride.every((T)=>typeof T==="string"))t.modelOverride=e.modelOverride;let w=Yi(e.modelRole);if(w!==void 0)t.modelRole=w;let C=Yi(e.resolvedModel);if(C!==void 0)t.resolvedModel=C;if(typeof e.resolvedModelIsFallback==="boolean")t.resolvedModelIsFallback=e.resolvedModelIsFallback;if(Bn(e.retryState)){let T=Uc(e.retryState.attempt),A=Uc(e.retryState.maxAttempts),I=Uc(e.retryState.delayMs),O=Yi(e.retryState.errorMessage),D=Uc(e.retryState.startedAtMs);if(T!==void 0&&A!==void 0&&I!==void 0&&O!==void 0&&D!==void 0)t.retryState={attempt:T,maxAttempts:A,delayMs:I,errorMessage:O,startedAtMs:D}}if(Bn(e.retryFailure)){let T=Uc(e.retryFailure.attempt),A=Yi(e.retryFailure.errorMessage);if(T!==void 0&&A!==void 0)t.retryFailure={attempt:T,errorMessage:A}}if(e.inflightTaskDetails!==void 0)t.inflightTaskDetails=e.inflightTaskDetails;if(Bn(e.extractedToolData))t.extractedToolData=e.extractedToolData;return Object.keys(t).length>0?t:void 0}function Kin(e){if(!Bn(e))return;let t=Yi(e.id),n=Yi(e.agent);if(!t||!n)return;let r;if(e.status==="started"||e.status==="completed"||e.status==="failed"||e.status==="aborted")r=e.status;else if(e.status==="pending"||e.status==="running")r="started";else return;let a={id:t,agent:n,status:r,index:Uc(e.index)??-1,source:"live"},i=Kne(e.agentSource);if(i!==void 0)a.agentSource=i;let s=Yi(e.description);if(s!==void 0)a.description=s;let o=Yi(e.task);if(o!==void 0)a.task=o;let l=Yi(e.assignment);if(l!==void 0)a.assignment=l;let u=Yi(e.sessionFile);if(u!==void 0)a.sessionFile=u;let d=Yi(e.parentToolCallId);if(d!==void 0)a.parentToolCallId=d;let p=Uc(e.lastUpdate)??Date.now();a.lastUpdate=p;let m=rS(e.progress);if(m!==void 0)a.progress=m;return a}function mF(e){if(!Bn(e))return;let t=Yi(e.id),n=Yi(e.status);if(!t||!n)return;if(n!=="started"&&n!=="completed"&&n!=="failed"&&n!=="aborted")return;let r={id:t,agent:Yi(e.agent)??"subagent",status:n,index:Uc(e.index)??-1,lastUpdate:Date.now(),source:"live"},a=Kne(e.agentSource);if(a!==void 0)r.agentSource=a;let i=Yi(e.description);if(i!==void 0)r.description=i;let s=Yi(e.sessionFile);if(s!==void 0)r.sessionFile=s;let o=Yi(e.parentToolCallId);if(o!==void 0)r.parentToolCallId=o;if(typeof e.detached==="boolean")r.detached=e.detached;return r}function JNe(e){if(!Bn(e))return[];let t=e.subagents;if(!Array.isArray(t))return[];let n=[];for(let r of t){let a=Kin(r);if(a)n.push(a)}return n}function Xin(e,t){return QNe(e)-QNe(t)||e.index-t.index||e.id.localeCompare(t.id)}function hF(e,t,n){let r=new Map(e.map((a)=>[a.id,a]));for(let a of t){let i=r.get(a.id);if(!i){r.set(a.id,a);continue}let s=i.batchSeq??a.batchSeq;if(n!==void 0&&(i.lastUpdate??0)>=n){if(s!==i.batchSeq)r.set(a.id,{...i,batchSeq:s});continue}if(a.source==="history"&&i.source!=="history"){if(s!==i.batchSeq)r.set(a.id,{...i,batchSeq:s});continue}if(a.source!=="history"&&i.source==="history"){r.set(a.id,{...a,batchSeq:s});continue}r.set(a.id,{...i,...a,batchSeq:s})}return[...r.values()].sort(Xin)}var QNe=(e)=>e.batchSeq??Number.MAX_SAFE_INTEGER;var Xne=()=>{};function fF({variant:e,isPinned:t=!1,confirmDelete:n,onPin:r,onDelete:a,onRequestDelete:i,onCancelDelete:s}){if(e==="mobile")return n?h(Et,{children:[h("div",{className:"px-3 py-2 text-ink/80 font-medium",children:"Delete workspace?"}),h("button",{type:"button",onClick:a,className:"w-full text-left px-3 py-2 hover:bg-error/10 text-error flex items-center space-x-2",children:[h(Ya,{size:13}),h("span",{children:"Yes, delete"})]}),h("button",{type:"button",onClick:s,className:"w-full text-left px-3 py-2 hover:bg-ink/5 text-ink/70",children:"Cancel"})]}):h(Et,{children:[h("button",{type:"button",onClick:r,className:"w-full text-left px-3 py-2 hover:bg-ink/5 text-ink/80 flex items-center space-x-2",children:[t?h(PC,{size:13}):h(cx,{size:13}),h("span",{children:t?"Unpin Workspace":"Pin Workspace"})]}),h("button",{type:"button",onClick:i,className:"w-full text-left px-3 py-2 hover:bg-error/10 text-error flex items-center space-x-2",children:[h(Ya,{size:13}),h("span",{children:"Delete Workspace"})]})]});return n?h(Et,{children:[h("div",{className:"px-3 py-1.5 text-xs text-ink/80 font-medium",children:"Delete workspace?"}),h("div",{className:"px-3 py-1.5 hover:bg-ink/5 cursor-pointer flex items-center space-x-2 text-error",onClick:a,children:[h(Ya,{size:12}),h("span",{children:"Yes, delete"})]}),h("div",{className:"px-3 py-1.5 hover:bg-ink/5 cursor-pointer flex items-center space-x-2 text-ink/70",onClick:s,children:h("span",{children:"Cancel"})})]}):h(Et,{children:[h("div",{className:"px-3 py-1.5 hover:bg-ink/5 cursor-pointer flex items-center space-x-2 text-ink/80",onClick:r,children:[t?h(PC,{size:12}):h(cx,{size:12}),h("span",{children:t?"Unpin Workspace":"Pin Workspace"})]}),h("div",{className:"px-3 py-1.5 hover:bg-ink/5 cursor-pointer flex items-center space-x-2 text-error",onClick:i,children:[h(Ya,{size:12}),h("span",{children:"Delete Workspace"})]})]})}var Qne=R(()=>{bt();fe()});function gF(e){return nsn[e||"default"]||Mi}var nsn;var Jne=R(()=>{bt();nsn={default:Mi,code:tc,terminal:Ia,rocket:i1,flask:Kb,gamepad:Qb,briefcase:Hb,home:Fc,globe:ua,leaf:t1,shield:yf,palette:sm,server:vu,smartphone:Qu,database:df,lightbulb:n1,music:r1,camera:Ku,book:tm,heart:Jb}});function Qd(e=600){let[t,n]=le(!1),r=De(null),a=Ze(()=>{if(n(!0),r.current)clearTimeout(r.current);r.current=setTimeout(()=>n(!1),e)},[e]);return Ke(()=>()=>{if(r.current)clearTimeout(r.current)},[]),{isScrolling:t,handleScroll:a}}function Jd(e){return e?"scrollbar-overlay-scrolling":"scrollbar-overlay"}var qg=R(()=>{lt()});function k9(e,t){if(!e)return;fetch("/api/agent/prewarm",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({cwd:e,...t?{accessMode:t}:{}})}).catch(()=>{})}function w9(e,t,n){let r=n!==void 0?e.find((a)=>String(a.id)===String(n)):e.find((a)=>a.sessions?.some((i)=>String(i.id)===String(t)))??e.find((a)=>Boolean(a.project_path));return r?.project_path||r?.name||null}function oMe(e,t){if(typeof e!=="object"||e===null)return t;if("error"in e&&typeof e.error==="string")return e.error;if("message"in e&&typeof e.message==="string")return e.message;return t}function asn(e){if(typeof e!=="object"||e===null)return!1;return"success"in e&&typeof e.success==="boolean"&&"target"in e&&(e.target==="ompchamber"||e.target==="omp")&&"manual"in e&&typeof e.manual==="boolean"&&"message"in e&&typeof e.message==="string"}function bF(){let[e,t]=le(null),[n,r]=le(!1),[a,i]=le(null),[s,o]=le(null),l=De(null),u=De(!1),d=Ze(()=>{if(l.current)return l.current;let m=(async()=>{r(!0),o(null);try{let f=await fetch("/api/updates/check"),g=await f.json();if(!f.ok)throw Error(oMe(g,`Update check failed (HTTP ${f.status})`));t(g)}catch(f){o(f instanceof Error?f.message:"Unable to check for updates.")}finally{r(!1),l.current=null}})();return l.current=m,m},[]),p=Ze(async(m)=>{i(m),o(null);try{let f=await fetch("/api/updates/apply",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({target:m})}),g=await f.json();if(!asn(g))throw Error(oMe(g,`Update failed (HTTP ${f.status})`));return await d(),g}catch(f){return o(f instanceof Error?f.message:"Unable to apply the update."),null}finally{i(null)}},[d]);return Ke(()=>{if(u.current)return;u.current=!0,d()},[]),{info:e,checking:n,applying:a,error:s,hasUpdate:Boolean(e?.ompchamber.updateAvailable||e?.omp.updateAvailable),check:d,apply:p}}var ere=R(()=>{lt()});function isn(e){if(!e)return Number.NaN;let t=Date.parse(e);return Number.isFinite(t)?t:Number.NaN}function lMe(e){let t=Number.NEGATIVE_INFINITY;for(let n of e.sessions??[]){let r=isn(n.updated_at??n.created_at);if(r>t)t=r}return t}function cMe(e){let t=Number.NEGATIVE_INFINITY;for(let n of e.sessions??[]){let r=Number(n.id);if(Number.isFinite(r)&&r>t)t=r}return t}function yx(e){let t=Number(e.id);return Number.isFinite(t)?t:Number.NEGATIVE_INFINITY}function yF(e,t){if(e===t)return 0;return e>t?-1:1}function uMe(e,t){if(e===t)return 0;return e>t?1:-1}function ssn(e,t,n){let r=Boolean(e.isPinned),a=Boolean(t.isPinned);if(r!==a)return r?-1:1;switch(n){case"Z-A":{let i=t.name.localeCompare(e.name);return i!==0?i:uMe(yx(e),yx(t))}case"LATEST_SESSION":{let i=yF(lMe(e),lMe(t));if(i!==0)return i;let s=yF(cMe(e),cMe(t));if(s!==0)return s;let o=yF(yx(e),yx(t));return o!==0?o:e.name.localeCompare(t.name)}case"LATEST_ADDED":{let i=yF(yx(e),yx(t));return i!==0?i:e.name.localeCompare(t.name)}case"A-Z":default:{let i=e.name.localeCompare(t.name);return i!==0?i:uMe(yx(e),yx(t))}}}function dMe(e,t){return[...e].sort((n,r)=>ssn(n,r,t))}function pMe(e){return typeof e==="string"&&osn.includes(e)}var osn;var mMe=R(()=>{osn=["A-Z","Z-A","LATEST_SESSION","LATEST_ADDED"]});function C9(e){return String(e).padStart(2,"0")}function lsn(e=new Date){if(Number.isNaN(e.getTime()))return"New Session";return`New Session - ${e.getFullYear()}-${C9(e.getMonth()+1)}-${C9(e.getDate())}T${C9(e.getHours())}:${C9(e.getMinutes())}:${C9(e.getSeconds())}`}function hMe(e){return Boolean(e?.startsWith("new-"))}function tre(e){return e?.startsWith("new-")?Number(e.slice(4)):Number.NaN}function vF(e){let t=tre(e);return lsn(Number.isFinite(t)?new Date(t):new Date)}function fMe(e){let t={};for(let n of e)for(let r of n.sessions??[])if(r.streamStatus)t[String(r.id)]=r.streamStatus;return t}function gMe(e,t,n,r){let a=t===null?null:String(t),i=a!==null?e[a]:void 0,s=De(null),o=De(n);o.current=n;let l=De(r);l.current=r,Ke(()=>{if(!i||i==="stream")return;if(l.current?.(a))return;let u=`${a}:${i}`;if(s.current===u)return;s.current=u,fetch(`/api/sessions/${encodeURIComponent(a)}/stream-seen`,{method:"POST"}).then((d)=>d.json()).then((d)=>{if(d.deleted===!1)s.current=null;o.current()}).catch(()=>{s.current=null})},[a,i])}var bMe=R(()=>{lt()});function yMe(e,t){let n=De(Object.values(e).includes("stream"));n.current=Object.values(e).includes("stream");let r=De(t);r.current=t,Ke(()=>{let a=setInterval(()=>{if(n.current)r.current()},lIe);return()=>clearInterval(a)},[])}var vMe=R(()=>{lt();xf()});function xMe(e){let t=De(e);t.current=e;let n=De(void 0),r=De(0);Ke(()=>{let a=()=>{r.current=Date.now(),t.current()},i=()=>{let s=Date.now()-r.current;if(s>=Mne){clearTimeout(n.current),n.current=void 0,a();return}clearTimeout(n.current),n.current=setTimeout(()=>{n.current=void 0,a()},Mne-s)};return window.addEventListener("omp:session-updated",i),()=>{if(window.removeEventListener("omp:session-updated",i),n.current!==void 0)clearTimeout(n.current),n.current=void 0}},[])}var _Me=R(()=>{lt();xf()});function xF(e={},t={}){let{includePendingSessions:n=!1,onSelectSession:r,onAfterSelect:a}=t,{folders:i,initializing:s,refresh:o,markSeen:l,hasSeen:u}=rc(),[d,p]=us(),m=d.get("sessionId"),f=m?Number.isNaN(Number(m))?m:Number(m):null,g=De(o);g.current=o;let b=Ze(()=>g.current(),[]);xMe(b),Ys("omp:workspace-updated",()=>g.current());let[y,v]=le(""),[x,_]=le(!1),[S,w]=le(!1),[C,T]=le(()=>pMe(e.omp_sidebar_sort)?e.omp_sidebar_sort:"A-Z"),A=De(null),I=Ze((L)=>{if(A.current)clearTimeout(A.current);A.current=setTimeout(()=>{zC("omp_sidebar_sort",L)},csn)},[]);Ke(()=>()=>{if(A.current)clearTimeout(A.current)},[]);let O=(L)=>{T(L),w(!1),I(L)},D=ft(()=>fMe(i),[i]);gMe(D,f,b,u),yMe(D,b);let N=(L)=>{if(l(L),r)r(L);else p((M)=>{if(M.set("sessionId",L.toString()),M.has("subagent"))M.delete("subagent");return M},{replace:!0});a?.()},E=ft(()=>{let L=[...i];if(n){let M=L.some((B)=>B.sessions?.some((F)=>String(F.id)===String(m))),P=m&&!M?m:null;if(P){let B=d.get("folderId"),F=B?L.find((q)=>String(q.id)===String(B)):L[0],j=Boolean(F?.sessions?.some((q)=>String(q.id)===String(P)));if(F&&!j){let q=tre(P),W=Number.isFinite(q)?new Date(q).toISOString():new Date().toISOString();L=L.map((U)=>{if(U.id!==F.id)return U;let H={id:P,folder_id:U.id,title:vF(P),created_at:W,updated_at:W};return{...U,isExpanded:!0,sessions:[H,...U.sessions||[]]}})}}}if(y.trim()){let M=y.toLowerCase();if(n)L=L.filter((P)=>{let B=P.name.toLowerCase().includes(M),F=P.sessions?.some((j)=>j.title.toLowerCase().includes(M));return B||F}).map((P)=>{let B=P.sessions?.filter((F)=>P.name.toLowerCase().includes(M)||F.title.toLowerCase().includes(M));return{...P,sessions:B,isExpanded:!0}});else L=L.map((P)=>{let B=P.name.toLowerCase().includes(M),F=(P.sessions||[]).filter((j)=>j.title.toLowerCase().includes(M));if(B)return P;return{...P,sessions:F}}).filter((P)=>P.sessions&&P.sessions.length>0)}return L=dMe(L,C),L},[i,y,C,m,d,n]);return{folders:i,initializing:s,refresh:b,activeSessionId:f,sessionParam:m,searchQuery:y,setSearchQuery:v,showArchived:x,setShowArchived:_,optionsOpen:S,setOptionsOpen:w,sortOption:C,handleSortChange:O,processedFolders:E,sessionStatus:D,handleSelectSession:N}}var csn=200;var nre=R(()=>{lt();Jp();mMe();bMe();vMe();_Me();_f();Fg();Og()});function S9(e,t){if(!t)return{folder:null,projectPath:null};for(let n of e)if((n.sessions||[]).some((a)=>String(a.id)===String(t)))return{folder:n,projectPath:n.project_path??null};return{folder:null,projectPath:null}}function wMe(e,t,n){let r=S9(e,t).folder,a=n!=null?e.find((i)=>String(i.id)===String(n))??null:null;return(r??a)?.project_path??null}function T9(e){let t=ac.get(e);if(t!==void 0)ac.delete(e),ac.set(e,t);aS.set(e,Date.now())}function _F(e){let t=Date.now(),n=(r)=>{ac.delete(r),Ww.delete(r),Ug.delete(r),aS.delete(r);let a=Uw.get(r);if(a)clearTimeout(a),Uw.delete(r)};for(let[r,a]of aS){if(t-a<=600000)continue;if(r===e)continue;if(Ug.get(r))continue;n(r)}while(ac.size>10){let r=!1;for(let a of ac.keys()){if(a===e)continue;if(Ug.get(a))continue;n(a),r=!0;break}if(!r)break}}function b1(e,t){if(!e)return;return T9(e),ac.get(e)?.[t]}function CMe(e,t,n){if(!e)return;let r=ac.get(e)??{};r[t]=n,ac.set(e,r),T9(e),Ug.set(e,!0),SMe(e),_F(e)}function SMe(e){let t=Uw.get(e);if(t)clearTimeout(t);Uw.set(e,setTimeout(()=>{Uw.delete(e),TMe(e)},600))}async function TMe(e){if(typeof window>"u"||!e)return;if(!Ug.get(e))return;Ug.set(e,!1);let t=ac.get(e)??{};try{await fetch(`/api/sessions/${encodeURIComponent(e)}/state`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({state:t})})}catch(n){console.warn("session-state persist failed:",n),Ug.set(e,!0)}}function AMe(e){if(!e||typeof window>"u")return Promise.resolve();let t=Uw.get(e);if(t)clearTimeout(t),Uw.delete(e);return TMe(e)}async function EMe(e){if(!e)return;if(typeof window>"u"){Ww.add(e);return}try{let t=await fetch(`/api/sessions/${encodeURIComponent(e)}/state`);if(t.ok){let n=await t.json(),r=n.state&&typeof n.state==="object"?n.state:{},a=ac.get(e)??{},s=Ug.get(e)===!0?{...r,...a}:r;ac.set(e,s),T9(e)}}catch(t){console.warn("session-state load failed:",t)}Ww.add(e),_F(e)}function LMe(e,t){if(!e)return;ac.set(e,{...ac.get(e)??{},...t}),T9(e),Ww.add(e),_F(e)}function RMe(e){if(e)Ww.add(e)}function IMe(e){if(e)aS.set(e,Date.now())}function NMe(e){return aS.get(e)}function MMe(e,t){let n=ac.get(e);if(n)ac.set(t,{...n,...ac.get(t)??{}});T9(t),Ww.add(t),Ug.set(t,!0),SMe(t),ac.delete(e),Ww.delete(e),Ug.delete(e),aS.delete(e),_F(t)}var ac,aS,Ww,Ug,Uw;var iS=R(()=>{ac=new Map,aS=new Map,Ww=new Set,Ug=new Map,Uw=new Map});function Cf(){let e=Ym(rre);if(!e)throw Error("useSessionState used outside SessionStateProvider");return e}var rre;var Gw=R(()=>{lt();Zs();rre=Zm(null)});function $n(e,t){let{sessionId:n,ready:r}=Cf(),a=b1(n,e),[i,s]=le(a===void 0?t:a),o=De(n);Ke(()=>{if(o.current!==n)o.current=n;if(!r)return;let u=b1(n,e);s(u===void 0?t:u)},[n,r,e]);let l=(u)=>{let d=typeof u==="function"?u(b1(n,e)??i):u;s(d),CMe(n,e,d)};if(!r&&a!==void 0&&a!==i)return[a,l,r];return[i,l,r]}function $Me(){let{sessionId:e,ready:t}=Cf();return{sessionId:e,ready:t,read:(n,r)=>{let a=b1(e,n);return a===void 0?r:a},hydrate:(n)=>LMe(e,n)}}var are;var fs=R(()=>{lt();iS();Gw();are=$n});function wF({status:e}){if(e?.transport!=="websocket")return null;let t=Boolean(e.connected),n=t?"WebSocket connected":"WebSocket disconnected";return h("span",{role:"status","aria-label":n,title:n,className:"flex items-center flex-shrink-0 select-none",children:h("span",{className:`w-1.5 h-1.5 rounded-full flex-shrink-0 ${t?"bg-success":"bg-error"}`})})}var ire=R(()=>{fe()});function y1(){return typeof navigator<"u"&&/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform)}function BMe(){return typeof navigator<"u"&&/^Win/i.test(navigator.platform)}function dsn(e,t){return e.code===t.code&&Boolean(e.meta)===t.metaKey&&Boolean(e.ctrl)===t.ctrlKey&&Boolean(e.alt)===t.altKey&&Boolean(e.shift)===t.shiftKey}function jMe(e,t){if(t)return e.mac;if(e.windows&&BMe())return e.windows;return e.other}function psn(e,t){let n=[];if(e.ctrl)n.push(t?"⌃":"Ctrl");if(e.alt)n.push(t?"⌥":"Alt");if(e.shift)n.push(t?"⇧":"Shift");if(e.meta)n.push(t?"⌘":"Win");return n.push(msn(e.code)),t?n.join(""):n.join("+")}function msn(e){if(zMe[e])return zMe[e];if(e.startsWith("Key"))return e.slice(3);if(e.startsWith("Digit"))return e.slice(5);return e}function sS(e,t=y1()){return psn(jMe(e,t),t)}function oS(e,t,n=y1()){for(let r of e)if(dsn(jMe(r,n),t))return r.command;return null}var zMe;var Hw=R(()=>{zMe={Slash:"/",Backslash:"\\",Comma:",",Period:".",Semicolon:";",Quote:"'",Backquote:"`",Minus:"-",Equal:"=",BracketLeft:"[",BracketRight:"]",Space:"Space",Enter:"Enter",Escape:"Esc",Backspace:"Backspace",Delete:"Del",Tab:"Tab"}});function UMe({title:e,methodLabel:t,badge:n,icon:r,onCancel:a}){return h("div",{className:"flex items-center justify-between border-b border-ink/8 bg-canvas/40 px-5 py-3.5",children:[h("div",{className:"flex items-center gap-3 min-w-0",children:[h("div",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-lg border border-ink/12 bg-paper text-ink shadow-xs",children:r}),h("div",{className:"min-w-0",children:[h("div",{className:"flex items-center gap-2",children:[h("h3",{className:"truncate text-[14px] font-semibold tracking-tight text-ink",children:e||t}),h("span",{className:"flex items-center gap-1 rounded-full border border-ink/10 bg-paper px-2 py-0.5 font-mono text-[9px] font-medium tracking-wider text-ink/60 uppercase",children:[h(ds,{size:9,className:"text-ink/40"}),n]})]}),h("p",{className:"mt-0.5 text-[11px] text-ink/50",children:"Autonomous agent inquiry requiring user confirmation"})]})]}),h("button",{type:"button",onClick:a,"aria-label":"Close dialog (Esc)",title:"Cancel (Esc)",className:"flex h-7 w-7 shrink-0 cursor-pointer items-center justify-center rounded-lg border border-ink/10 text-ink/45 transition-colors hover:border-ink/25 hover:bg-ink/5 hover:text-ink",children:h(Ln,{size:14})})]})}var WMe=R(()=>{bt();fe()});function GMe({options:e,optionDetails:t,selectedOption:n,customValue:r,onCustomChange:a,customInputRef:i,onSelect:s,onConfirmOption:o}){return h("div",{className:"space-y-2",children:[h("div",{className:"flex items-center justify-between text-[11px] font-medium tracking-wider text-ink/50 uppercase",children:[h("span",{children:"Available Options"}),h("span",{className:"font-mono text-[10px] text-ink/40",children:["Press [1-",Math.min(9,e.length),"] to choose"]})]}),h("div",{className:"grid gap-2",role:"radiogroup",children:e.map((l,u)=>{let d=n===l,p=t[u]?.description;return h("button",{type:"button",onClick:()=>s(l),onDblClick:()=>o(l),"aria-checked":d,role:"radio",className:`group flex w-full cursor-pointer items-start gap-3 rounded-xl border p-3.5 text-left transition-all ${d?"border-ink bg-paper shadow-sm ring-1 ring-ink/10":"border-ink/10 bg-canvas/30 hover:border-ink/25 hover:bg-paper"}`,children:[h("span",{className:`flex h-6 w-6 shrink-0 items-center justify-center rounded-md font-mono text-[11px] font-semibold transition-colors ${d?"bg-ink text-paper":"border border-ink/15 bg-paper text-ink/60 group-hover:border-ink/30 group-hover:text-ink"}`,children:u+1}),h("div",{className:"min-w-0 flex-1",children:[h("div",{className:"flex items-center gap-2",children:h("span",{className:`text-[13px] font-medium leading-snug ${d?"text-ink font-semibold":"text-ink/85"}`,children:l})}),p&&h("div",{className:"mt-1 text-[11.5px] leading-relaxed text-ink/55",children:p})]}),h("span",{className:"mt-0.5 shrink-0",children:d?h(Wr,{size:16,className:"text-ink"}):h(Zb,{size:16,className:"text-ink/20 group-hover:text-ink/40"})})]},l)})}),h("div",{className:"space-y-1.5 pt-1",children:[h("div",{className:"text-[11px] font-medium tracking-wider text-ink/50 uppercase",children:"Other — type your own answer"}),h("input",{ref:i,type:"text",value:r,placeholder:"Type a custom answer and press Enter...",onChange:(l)=>a(l.currentTarget.value),onKeyDown:(l)=>{if(l.key==="Enter"){if(l.preventDefault(),l.stopPropagation(),r.trim())o(r.trim())}},className:"w-full rounded-xl border border-ink/15 bg-paper px-4 py-3 text-[13.5px] text-ink placeholder:text-ink/35 outline-none transition-all focus:border-ink focus:ring-2 focus:ring-ink/15"})]})]})}var HMe=R(()=>{bt();fe()});function VMe({method:e,optionsLength:t,selectedOption:n,hasCustomAnswer:r=!1,onCancel:a,onSubmit:i}){let s=e==="select"&&!n&&!r;return h("div",{className:"flex flex-wrap items-center justify-between gap-3 border-t border-ink/8 bg-canvas/40 px-5 py-3.5",children:[h("div",{className:"flex items-center gap-2 font-mono text-[11px] text-ink/50",children:[e==="select"&&h(Et,{children:[h("span",{className:"hidden items-center gap-1 sm:inline-flex",children:[h("kbd",{className:"rounded border border-ink/15 bg-paper px-1.5 py-0.5 text-[10px] text-ink shadow-xs",children:["1-",Math.min(9,t)]}),h("span",{className:"text-ink/40",children:"choose"})]}),h("span",{className:"hidden text-ink/30 sm:inline",children:"•"}),h("span",{className:"inline-flex items-center gap-1",children:[h("kbd",{className:"rounded border border-ink/15 bg-paper px-1.5 py-0.5 text-[10px] text-ink shadow-xs",children:"↵"}),h("span",{className:"text-ink/40",children:"select"})]})]}),e==="confirm"&&h("span",{className:"inline-flex items-center gap-1",children:[h("kbd",{className:"rounded border border-ink/15 bg-paper px-1.5 py-0.5 text-[10px] text-ink shadow-xs",children:"↵"}),h("span",{className:"text-ink/40",children:"confirm"})]}),e==="editor"&&h("span",{className:"inline-flex items-center gap-1",children:[h("kbd",{className:"rounded border border-ink/15 bg-paper px-1.5 py-0.5 text-[10px] text-ink shadow-xs",children:"⌘↵"}),h("span",{className:"text-ink/40",children:"save buffer"})]}),h("span",{className:"text-ink/30",children:"•"}),h("span",{className:"inline-flex items-center gap-1",children:[h("kbd",{className:"rounded border border-ink/15 bg-paper px-1.5 py-0.5 text-[10px] text-ink shadow-xs",children:"Esc"}),h("span",{className:"text-ink/40",children:"cancel"})]})]}),h("div",{className:"flex items-center gap-2.5 ml-auto",children:[h("button",{type:"button",onClick:a,className:"flex cursor-pointer items-center gap-1 rounded-lg border border-ink/15 bg-paper px-3.5 py-1.5 text-[12px] font-medium text-ink/70 transition-colors hover:border-ink/30 hover:bg-canvas/50 hover:text-ink",children:[h(Ln,{size:12,className:"opacity-60"}),h("span",{children:"Cancel"})]}),h("button",{type:"button",onClick:i,disabled:s,className:"flex cursor-pointer items-center gap-1.5 rounded-lg bg-ink px-4 py-1.5 text-[12px] font-semibold text-paper shadow-xs transition-all hover:opacity-90 active:scale-[0.98] disabled:cursor-not-allowed disabled:opacity-35",children:[h("span",{children:e==="confirm"?"Confirm":e==="select"?"Select Option":"Submit Response"}),h(rm,{size:12,className:"opacity-70"})]})]})]})}var ZMe=R(()=>{bt();fe()});function ore(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}function n$e(e){Yw=e}function cS(e){let t=[];return(n)=>{let r=Math.max(0,Math.min(3,n-1)),a=t[r];return a||(a=e(r),t[r]=a),a}}function da(e,t=""){let n=typeof e=="string"?e:e.source,r={replace:(a,i)=>{let s=typeof i=="string"?i:i.source;return s=s.replace(_u.caret,"$1"),n=n.replace(a,s),r},getRegex:()=>new RegExp(n,t)};return r}function om(e,t){if(t){if(_u.escapeTest.test(e))return e.replace(_u.escapeReplace,XMe)}else if(_u.escapeTestNoEncode.test(e))return e.replace(_u.escapeReplaceNoEncode,XMe);return e}function QMe(e){try{e=encodeURI(e).replace(_u.percentDecode,"%")}catch{return null}return e}function JMe(e,t){let n=e.replace(_u.findPipe,(i,s,o)=>{let l=!1,u=s;for(;--u>=0&&o[u]==="\\";)l=!l;return l?"|":" |"}),r=n.split(_u.splitPipe),a=0;if(r[0].trim()||r.shift(),r.length>0&&!r.at(-1)?.trim()&&r.pop(),t)if(r.length>t)r.splice(t);else for(;r.length<t;)r.push("");for(;a<r.length;a++)r[a]=r[a].trim().replace(_u.slashPipe,"|");return r}function vx(e,t,n){let r=e.length;if(r===0)return"";let a=0;for(;a<r;){let i=e.charAt(r-a-1);if(i===t&&!n)a++;else if(i!==t&&n)a++;else break}return e.slice(0,r-a)}function e$e(e){let t=e.split(`
|
|
48
48
|
`),n=t.length-1;for(;n>=0&&_u.blankLine.test(t[n]);)n--;return t.length-n<=2?e:t.slice(0,n+1).join(`
|
|
49
49
|
`)}function oon(e,t){if(e.indexOf(t[1])===-1)return-1;let n=0;for(let r=0;r<e.length;r++)if(e[r]==="\\")r++;else if(e[r]===t[0])n++;else if(e[r]===t[1]&&(n--,n<0))return r;return n>0?-2:-1}function lon(e,t=0){let n=t,r="";for(let a of e)if(a==="\t"){let i=4-n%4;r+=" ".repeat(i),n+=i}else r+=a,n++;return r}function t$e(e,t,n,r,a){let i=t.href,s=t.title||null,o=e[1].replace(a.other.outputLinkReplace,"$1"),l=e[0].charAt(0)==="!";r.state.inLink=!0;let u=r.state.linkEmitted,d=r.state.inRawBlock;r.state.linkEmitted=!1;let p=r.inlineTokens(o),m=r.state.linkEmitted;if(r.state.linkEmitted=u,r.state.inLink=!1,!l){if(m){r.state.inRawBlock=d;return}r.state.linkEmitted=!0}return{type:l?"image":"link",raw:n,href:i,title:s,text:o,tokens:p}}function con(e,t,n){let r=e.match(n.other.indentCodeCompensation);if(r===null)return t;let a=r[1];return t.split(`
|