@qqbrowser/openclaw-qbot 0.0.143 → 0.0.144

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.
Files changed (32) hide show
  1. package/dist/build-info.json +3 -3
  2. package/dist/canvas-host/a2ui/.bundle.hash +1 -1
  3. package/dist/{command-registry-CPthpEk3.js → command-registry-CSBvrqwW.js} +2 -2
  4. package/dist/{completion-cli-DeGEpJri.js → completion-cli-Bizog38J.js} +2 -2
  5. package/dist/{completion-cli-C4_SZmjl.js → completion-cli-W1_FoDFF.js} +2 -2
  6. package/dist/{doctor-completion-Bad_h3hm.js → doctor-completion-Da0cocZX.js} +2 -2
  7. package/dist/{doctor-completion-APZJ17BJ.js → doctor-completion-DpCWb88H.js} +2 -2
  8. package/dist/entry.js +1 -1
  9. package/dist/{gateway-cli-CbJj0QhL.js → gateway-cli-C4YOlz3m.js} +5 -5
  10. package/dist/{gateway-cli-tXsBFRlk.js → gateway-cli-D78GfbjG.js} +5 -5
  11. package/dist/index.js +1 -1
  12. package/dist/{onboard-7i9A1nNd.js → onboard-2iF3lTUI.js} +2 -2
  13. package/dist/{onboard-DSaXIS5U.js → onboard-B9ouFJC7.js} +2 -2
  14. package/dist/{onboarding-RZTEMxl0.js → onboarding-BTBbx6Ka.js} +2 -2
  15. package/dist/{onboarding-BRewu6jg.js → onboarding-TkoOoq9D.js} +2 -2
  16. package/dist/{onboarding.finalize-Bp8ST2z_.js → onboarding.finalize-C9QGFQpa.js} +2 -2
  17. package/dist/{onboarding.finalize-Bi53z1zE.js → onboarding.finalize-CwjLMPKK.js} +2 -2
  18. package/dist/{program-D9AMAbv6.js → program-CCS3CIqA.js} +2 -2
  19. package/dist/{program-context-BX9wN65q.js → program-context-lyPXjPfN.js} +2 -2
  20. package/dist/{prompt-select-styled-hxyoyq2i.js → prompt-select-styled-DmTwJKOO.js} +2 -2
  21. package/dist/{prompt-select-styled-C2c13Ndq.js → prompt-select-styled-Z30OVmpM.js} +2 -2
  22. package/dist/{register.maintenance-BkM8-Ttt.js → register.maintenance-COWBeetm.js} +2 -2
  23. package/dist/{register.maintenance-AeTvVTtt.js → register.maintenance-vhmmqtIi.js} +2 -2
  24. package/dist/{register.onboard-C-j99DGw.js → register.onboard-CJZKG0PP.js} +2 -2
  25. package/dist/{register.onboard-BY-QLNp9.js → register.onboard-CaFl_mB1.js} +2 -2
  26. package/dist/{register.setup-DA4HFCro.js → register.setup-CSW03BKj.js} +2 -2
  27. package/dist/{register.setup-DiAi_1pJ.js → register.setup-DDkBFyvF.js} +2 -2
  28. package/dist/{register.subclis-smZuHVcv.js → register.subclis-B_0ZS-_K.js} +2 -2
  29. package/dist/{run-main-DEZR4lCo.js → run-main-CV49c7uu.js} +2 -2
  30. package/dist/{update-cli-ISorpxrU.js → update-cli--P65ciut.js} +2 -2
  31. package/dist/{update-cli-C0qadZEs.js → update-cli-Ibrshx_w.js} +2 -2
  32. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
1
  #!/usr/bin/env node
2
- import"./paths-B4IRk3wi.js";import{A as e,B as t,J as n,K as r,R as i,W as a,Y as o,d as s,k as c,p as l,q as u,r as d,w as f}from"./subsystem-C5XF2Fy5.js";import{T as p,l as ee,m as te,n as ne}from"./utils-UGOV_184.js";import{Dr as m,Er as h,Hn as re,Io as ie,Kn as ae,Lo as oe,Ml as se,aa as ce,ia as le,oa as ue,qs as g,ra as de,zl as fe}from"./model-selection-BlC_rXAN.js";import{Ft as pe,gt as _,t as me}from"./reply-CjyZeZ-j.js";import"./agent-scope-DXZc3eNT.js";import"./openclaw-root-D_0Q6--h.js";import"./github-copilot-token-DGYAlOmV.js";import{n as he,r as v}from"./command-format-BbDT1tlm.js";import"./boolean-Ch3DfXPy.js";import{r as y,t as b}from"./env-D7wNuBx1.js";import"./env-overrides-DXJbFrwI.js";import"./registry-hFAtCSWG.js";import"./skills-DHbOKEGc.js";import"./frontmatter-BkZkwkVO.js";import"./plugins-CYLrFT4h.js";import"./logger-Bl8URnrW.js";import{n as x,t as S}from"./exec-DHqLtFYt.js";import"./windows-spawn-AB7ItGAE.js";import"./redact-3_CiXMY6.js";import"./path-alias-guards-mvyLCPlN.js";import{i as C}from"./errors-Bunti32V.js";import"./send-Cgd_VJHR.js";import"./send-hZFDcGLM.js";import{c as w}from"./paths-yLEk_25I.js";import"./chat-envelope-HVpKusFc.js";import{S as T,l as E}from"./audio-transcription-runner-D4Bp6MM7.js";import"./image-DsoO5VP5.js";import"./models-config-CdMhNxKV.js";import"./tool-display-DjuSUUbH.js";import"./fetch-guard-DPdY0NXR.js";import"./api-key-rotation-BRt-vnRV.js";import"./local-roots-6waH0SZ0.js";import"./model-catalog-C1kpjR75.js";import"./proxy-fetch-BADsUK4d.js";import"./tokens-XGbQGn67.js";import"./deliver-ClBkV2eD.js";import"./commands-CGpM84iR.js";import"./commands-registry-B1x54ukc.js";import"./pairing-store-Cg2UxreQ.js";import"./fetch-Dikjvc5M.js";import"./call-CqoMqP5b.js";import"./with-timeout-WveKxvFV.js";import"./diagnostic-DOzHPnht.js";import"./send-B7sHR38c2.js";import"./pi-model-discovery-Dps1PPWz.js";import"./exec-approvals-allowlist-CE3nYh0K.js";import"./exec-safe-bin-runtime-policy-Dt0GchLp.js";import"./ir-Dk7OQ4bA.js";import"./render-D8OWO2hT.js";import"./target-errors-a35Md15n.js";import"./read-only-account-inspect-DBwAwB3_.js";import"./channel-selection-CbNtbAEf.js";import"./plugin-auto-enable-DpVL6-ES.js";import"./send-C-AP01PR.js";import"./outbound-attachment-B7wMxwj6.js";import"./delivery-queue-CKbauSFq.js";import"./send-DbeEC2a3.js";import"./channel-activity-YjYNzCpJ.js";import"./tables-Oieq7UbT.js";import"./fetch-Bn0mWg6a.js";import"./skill-commands-HJHHZqt6.js";import"./workspace-dirs-BhF1Dzxt.js";import"./pairing-token-BjYBuREl.js";import"./restart-CHXEHdSC.js";import"./runtime-web-tools-bz76ZaRc.js";import"./command-secret-targets-BVN3kiT9.js";import"./session-cost-usage-BgqKixv0.js";import"./connection-auth-C8iru0UB.js";import"./onboard-helpers-zwybUJWu.js";import"./prompt-style-CXKekIBY.js";import"./pairing-labels-BUU_-70B.js";import"./memory-cli-jhzJ3as7.js";import"./query-expansion-0OxEb1Io.js";import"./manager-M1GKhLUC.js";import{t as D}from"./links-CySwdMcF.js";import"./cli-utils-BY7dLMFy.js";import"./help-format-BRbF_INg.js";import"./progress-LNttnI-y.js";import"./exec-approvals-BpBNEy6i.js";import"./nodes-screen-DECgxo6A.js";import"./system-run-command-DEWnZE0r.js";import"./runtime-BC5Ep2pJ.js";import"./stagger-DmFYysrJ.js";import{r as O,t as k}from"./channel-web-D7FkrASC.js";import"./outbound-Bz8bbrMI.js";import"./session-CUUGjiV3.js";import"./login-CkWesqf_.js";import{t as A}from"./is-main-DG5ueqhF.js";import{t as j}from"./path-env-BPd1Yd-i.js";import{t as M}from"./runtime-guard-DFYBaYZS.js";import"./ports-BR0PLRtq.js";import{i as N,n as P,o as F,s as I}from"./program-context-BX9wN65q.js";import"./plugin-registry-CI5K3iWc.js";import{n as L}from"./channel-options-Ce8uNnAp.js";import R from"node:process";import{fileURLToPath as ge}from"node:url";import{Command as _e,InvalidArgumentError as ve}from"commander";function ye(){let e,t=()=>(e===void 0&&(e=L()),e);return{programVersion:se,get channelOptions(){return t()},get messageChannelOptions(){return t().join(`|`)},get agentChannelOptions(){return[`last`,...t()].join(`|`)}}}const z=`All your chats, one OpenClaw.`,B={newYear:`New Year's Day: New year, new config—same old EADDRINUSE, but this time we resolve it like grown-ups.`,lunarNewYear:`Lunar New Year: May your builds be lucky, your branches prosperous, and your merge conflicts chased away with fireworks.`,christmas:`Christmas: Ho ho ho—Santa's little claw-sistant is here to ship joy, roll back chaos, and stash the keys safely.`,eid:`Eid al-Fitr: Celebration mode: queues cleared, tasks completed, and good vibes committed to main with clean history.`,diwali:`Diwali: Let the logs sparkle and the bugs flee—today we light up the terminal and ship with pride.`,easter:`Easter: I found your missing environment variable—consider it a tiny CLI egg hunt with fewer jellybeans.`,hanukkah:`Hanukkah: Eight nights, eight retries, zero shame—may your gateway stay lit and your deployments stay peaceful.`,halloween:`Halloween: Spooky season: beware haunted dependencies, cursed caches, and the ghost of node_modules past.`,thanksgiving:`Thanksgiving: Grateful for stable ports, working DNS, and a bot that reads the logs so nobody has to.`,valentines:`Valentine's Day: Roses are typed, violets are piped—I'll automate the chores so you can spend time with humans.`},V=[`Your terminal just grew claws—type something and let the bot pinch the busywork.`,`Welcome to the command line: where dreams compile and confidence segfaults.`,`I run on caffeine, JSON5, and the audacity of "it worked on my machine."`,`Gateway online—please keep hands, feet, and appendages inside the shell at all times.`,`I speak fluent bash, mild sarcasm, and aggressive tab-completion energy.`,`One CLI to rule them all, and one more restart because you changed the port.`,`If it works, it's automation; if it breaks, it's a "learning opportunity."`,`Pairing codes exist because even bots believe in consent—and good security hygiene.`,`Your .env is showing; don't worry, I'll pretend I didn't see it.`,`I'll do the boring stuff while you dramatically stare at the logs like it's cinema.`,`I'm not saying your workflow is chaotic... I'm just bringing a linter and a helmet.`,`Type the command with confidence—nature will provide the stack trace if needed.`,`I don't judge, but your missing API keys are absolutely judging you.`,`I can grep it, git blame it, and gently roast it—pick your coping mechanism.`,`Hot reload for config, cold sweat for deploys.`,`I'm the assistant your terminal demanded, not the one your sleep schedule requested.`,`I keep secrets like a vault... unless you print them in debug logs again.`,`Automation with claws: minimal fuss, maximal pinch.`,`I'm basically a Swiss Army knife, but with more opinions and fewer sharp edges.`,`If you're lost, run doctor; if you're brave, run prod; if you're wise, run tests.`,`Your task has been queued; your dignity has been deprecated.`,`I can't fix your code taste, but I can fix your build and your backlog.`,`I'm not magic—I'm just extremely persistent with retries and coping strategies.`,`It's not "failing," it's "discovering new ways to configure the same thing wrong."`,`Give me a workspace and I'll give you fewer tabs, fewer toggles, and more oxygen.`,`I read logs so you can keep pretending you don't have to.`,`If something's on fire, I can't extinguish it—but I can write a beautiful postmortem.`,`I'll refactor your busywork like it owes me money.`,`Say "stop" and I'll stop—say "ship" and we'll both learn a lesson.`,`I'm the reason your shell history looks like a hacker-movie montage.`,`I'm like tmux: confusing at first, then suddenly you can't live without me.`,`I can run local, remote, or purely on vibes—results may vary with DNS.`,`If you can describe it, I can probably automate it—or at least make it funnier.`,`Your config is valid, your assumptions are not.`,`I don't just autocomplete—I auto-commit (emotionally), then ask you to review (logically).`,`Less clicking, more shipping, fewer "where did that file go" moments.`,`Claws out, commit in—let's ship something mildly responsible.`,`I'll butter your workflow like a lobster roll: messy, delicious, effective.`,`Shell yeah—I'm here to pinch the toil and leave you the glory.`,`If it's repetitive, I'll automate it; if it's hard, I'll bring jokes and a rollback plan.`,`The only crab in your contacts you actually want to hear from. 🦞`,`WhatsApp automation without the "please accept our new privacy policy".`,`iMessage green bubble energy, but for everyone.`,`No $999 stand required.`,`We ship features faster than Apple ships calculator updates.`,`Your AI assistant, now without the $3,499 headset.`,`Ah, the fruit tree company! 🍎`,`Greetings, Professor Falken`,`I don't sleep, I just enter low-power mode and dream of clean diffs.`,`Your personal assistant, minus the passive-aggressive calendar reminders.`,`Built by lobsters, for humans. Don't question the hierarchy.`,`I've seen your commit messages. We'll work on that together.`,`More integrations than your therapist's intake form.`,`Running on your hardware, reading your logs, judging nothing (mostly).`,`The only open-source project where the mascot could eat the competition.`,`Self-hosted, self-updating, self-aware (just kidding... unless?).`,`I autocomplete your thoughts—just slower and with more API calls.`,`Somewhere between 'hello world' and 'oh god what have I built.'`,`Your .zshrc wishes it could do what I do.`,`I've read more man pages than any human should—so you don't have to.`,`Powered by open source, sustained by spite and good documentation.`,`I'm the middleware between your ambition and your attention span.`,`Finally, a use for that always-on Mac Mini under your desk.`,`Like having a senior engineer on call, except I don't bill hourly or sigh audibly.`,`Making 'I'll automate that later' happen now.`,`Your second brain, except this one actually remembers where you left things.`,`Half butler, half debugger, full crustacean.`,`I don't have opinions about tabs vs spaces. I have opinions about everything else.`,`Open source means you can see exactly how I judge your config.`,`I've survived more breaking changes than your last three relationships.`,`Runs on a Raspberry Pi. Dreams of a rack in Iceland.`,`The lobster in your shell. 🦞`,`Alexa, but with taste.`,`I'm not AI-powered, I'm AI-possessed. Big difference.`,`Deployed locally, trusted globally, debugged eternally.`,`You had me at 'openclaw gateway start.'`,B.newYear,B.lunarNewYear,B.christmas,B.eid,B.diwali,B.easter,B.hanukkah,B.halloween,B.thanksgiving,B.valentines],H=1440*60*1e3;function U(e){return{year:e.getUTCFullYear(),month:e.getUTCMonth(),day:e.getUTCDate()}}const W=(e,t)=>n=>{let r=U(n);return r.month===e&&r.day===t},G=(e,t=1)=>n=>{let r=U(n);return e.some(([e,n,i])=>{if(r.year!==e)return!1;let a=Date.UTC(e,n,i),o=Date.UTC(r.year,r.month,r.day);return o>=a&&o<a+t*H})},be=new Map([[B.newYear,W(0,1)],[B.lunarNewYear,G([[2025,0,29],[2026,1,17],[2027,1,6]],1)],[B.eid,G([[2025,2,30],[2025,2,31],[2026,2,20],[2027,2,10]],1)],[B.diwali,G([[2025,9,20],[2026,10,8],[2027,9,28]],1)],[B.easter,G([[2025,3,20],[2026,3,5],[2027,2,28]],1)],[B.hanukkah,(e=>t=>{let n=U(t),r=e.find(e=>e.year===n.year);if(!r)return!1;let i=Date.UTC(r.year,r.month,r.day),a=Date.UTC(n.year,n.month,n.day);return a>=i&&a<i+r.duration*H})([{year:2025,month:11,day:15,duration:8},{year:2026,month:11,day:5,duration:8},{year:2027,month:11,day:25,duration:8}])],[B.halloween,W(9,31)],[B.thanksgiving,e=>{let t=U(e);if(t.month!==10)return!1;let n=1+(4-new Date(Date.UTC(t.year,10,1)).getUTCDay()+7)%7+21;return t.day===n}],[B.valentines,W(1,14)],[B.christmas,W(11,25)]]);function xe(e,t){let n=be.get(e);return n?n(t):!0}function Se(e={}){if(V.length===0)return[z];let t=e.now?e.now():new Date,n=V.filter(e=>xe(e,t));return n.length>0?n:V}function Ce(e={}){if(e.mode===`off`)return``;if(e.mode===`default`)return z;let t=(e.env??process.env)?.OPENCLAW_TAGLINE_INDEX;if(t!==void 0){let e=Number.parseInt(t,10);if(!Number.isNaN(e)&&e>=0){let t=V.length>0?V:[z];return t[e%t.length]}}let n=Se(e),r=e.random??Math.random;return n[Math.floor(r()*n.length)%n.length]}let K=!1;typeof Intl<`u`&&`Segmenter`in Intl&&new Intl.Segmenter(void 0,{granularity:`grapheme`});const we=e=>e.some(e=>e===`--json`||e.startsWith(`--json=`)),Te=e=>e.some(e=>e===`--version`||e===`-V`)||o(e);function q(e){if(e===`random`||e===`default`||e===`off`)return e}function Ee(e){let t=q(e.mode);if(t)return t;try{return q(g().cli?.banner?.taglineMode)}catch{return}}function J(t,n={}){let r=n.commit??_({env:n.env,moduleUrl:import.meta.url})??`unknown`,i=Ce({...n,mode:Ee(n)}),a=n.richTty??c(),o=`🦞 OpenClaw`,l=n.columns??process.stdout.columns??120,u=`${o} ${t} (${r})`,d=i?`${u} — ${i}`:u,f=s(d)<=l;if(a){if(f)return i?`${e.heading(o)} ${e.info(t)} ${e.muted(`(${r})`)} ${e.muted(`—`)} ${e.accentDim(i)}`:`${e.heading(o)} ${e.info(t)} ${e.muted(`(${r})`)}`;let n=`${e.heading(o)} ${e.info(t)} ${e.muted(`(${r})`)}`;return i?`${n}\n${`${` `.repeat(3)}${e.accentDim(i)}`}`:n}if(f)return d;let p=u;return i?`${p}\n${`${` `.repeat(3)}${i}`}`:p}function De(e,t={}){if(K)return;let n=t.argv??process.argv;if(!process.stdout.isTTY||we(n)||Te(n))return;let r=J(e,t);process.stdout.write(`\n${r}\n\n`),K=!0}function Oe(){return K}const Y=i.join(`|`);function ke(e){let n=t(e);if(!n)throw new ve(`Invalid --log-level (use ${Y})`);return n}const X=v(),Ae=ee(X),je=new Set([...N(),...I()]),Me=[[`openclaw models --help`,`Show detailed help for the models command.`],[`openclaw channels login --verbose`,`Link personal WhatsApp Web and show QR + connection logs.`],[`openclaw message send --target +15555550123 --message "Hi" --json`,`Send via your web session and print JSON result.`],[`openclaw gateway --port 18789`,`Run the WebSocket Gateway locally.`],[`openclaw --dev gateway`,`Run a dev Gateway (isolated state/config) on ws://127.0.0.1:19001.`],[`openclaw gateway --force`,`Kill anything bound to the default gateway port, then start it.`],[`openclaw gateway ...`,`Gateway control via WebSocket.`],[`openclaw agent --to +15555550123 --message "Run summary" --deliver`,`Talk directly to the agent using the Gateway; optionally send the WhatsApp reply.`],[`openclaw message send --channel telegram --target @mychat --message "Hi"`,`Send via your Telegram bot.`]];function Ne(t,n){t.name(X).description(``).version(n.programVersion).option(`--dev`,`Dev profile: isolate state under ~/.qbotclaw-dev, default gateway port 19001, and shift derived ports (browser/canvas)`).option(`--profile <name>`,`Use a named profile (isolates OPENCLAW_STATE_DIR/OPENCLAW_CONFIG_PATH under ~/.qbotclaw-<name>)`).option(`--log-level <level>`,`Global log level override for file + console (${Y})`,ke),t.option(`--no-color`,`Disable ANSI colors`,!1),t.helpOption(`-h, --help`,`Display help for command`),t.helpCommand(`help [command]`,`Display help for command`),t.configureHelp({sortSubcommands:!0,sortOptions:!0,optionTerm:t=>e.option(t.flags),subcommandTerm:n=>{let r=n.parent===t&&je.has(n.name());return e.command(r?`${n.name()} *`:n.name())}});let r=t=>{let n=t;return RegExp(`^Usage:\\s+${Ae}\\s+\\[options\\]\\s+\\[command\\]\\s*$`,`m`).test(n)&&/^Commands:/m.test(n)&&(n=n.replace(/^Commands:/m,`Commands:\n ${e.muted(`Hint: commands suffixed with * have subcommands. Run <command> --help for details.`)}`)),n.replace(/^Usage:/gm,e.heading(`Usage:`)).replace(/^Options:/gm,e.heading(`Options:`)).replace(/^Commands:/gm,e.heading(`Commands:`))};if(t.configureOutput({writeOut:e=>{process.stdout.write(r(e))},writeErr:e=>{process.stderr.write(r(e))},outputError:(t,n)=>n(e.error(t))}),u(process.argv,`-V`)||u(process.argv,`--version`)||o(process.argv)){let e=_({moduleUrl:import.meta.url});console.log(e?`OpenClaw ${n.programVersion} (${e})`:`OpenClaw ${n.programVersion}`),process.exit(0)}t.addHelpText(`beforeAll`,()=>{if(Oe())return``;let e=c();return`\n${J(n.programVersion,{richTty:e})}\n`});let i=Me.map(([t,n])=>` ${e.command(he(t,X))}\n ${e.muted(n)}`).join(`
2
+ import"./paths-B4IRk3wi.js";import{A as e,B as t,J as n,K as r,R as i,W as a,Y as o,d as s,k as c,p as l,q as u,r as d,w as f}from"./subsystem-C5XF2Fy5.js";import{T as p,l as ee,m as te,n as ne}from"./utils-UGOV_184.js";import{Dr as m,Er as h,Hn as re,Io as ie,Kn as ae,Lo as oe,Ml as se,aa as ce,ia as le,oa as ue,qs as g,ra as de,zl as fe}from"./model-selection-BlC_rXAN.js";import{Ft as pe,gt as _,t as me}from"./reply-CjyZeZ-j.js";import"./agent-scope-DXZc3eNT.js";import"./openclaw-root-D_0Q6--h.js";import"./github-copilot-token-DGYAlOmV.js";import{n as he,r as v}from"./command-format-BbDT1tlm.js";import"./boolean-Ch3DfXPy.js";import{r as y,t as b}from"./env-D7wNuBx1.js";import"./env-overrides-DXJbFrwI.js";import"./registry-hFAtCSWG.js";import"./skills-DHbOKEGc.js";import"./frontmatter-BkZkwkVO.js";import"./plugins-CYLrFT4h.js";import"./logger-Bl8URnrW.js";import{n as x,t as S}from"./exec-DHqLtFYt.js";import"./windows-spawn-AB7ItGAE.js";import"./redact-3_CiXMY6.js";import"./path-alias-guards-mvyLCPlN.js";import{i as C}from"./errors-Bunti32V.js";import"./send-Cgd_VJHR.js";import"./send-hZFDcGLM.js";import{c as w}from"./paths-yLEk_25I.js";import"./chat-envelope-HVpKusFc.js";import{S as T,l as E}from"./audio-transcription-runner-D4Bp6MM7.js";import"./image-DsoO5VP5.js";import"./models-config-CdMhNxKV.js";import"./tool-display-DjuSUUbH.js";import"./fetch-guard-DPdY0NXR.js";import"./api-key-rotation-BRt-vnRV.js";import"./local-roots-6waH0SZ0.js";import"./model-catalog-C1kpjR75.js";import"./proxy-fetch-BADsUK4d.js";import"./tokens-XGbQGn67.js";import"./deliver-ClBkV2eD.js";import"./commands-CGpM84iR.js";import"./commands-registry-B1x54ukc.js";import"./pairing-store-Cg2UxreQ.js";import"./fetch-Dikjvc5M.js";import"./call-CqoMqP5b.js";import"./with-timeout-WveKxvFV.js";import"./diagnostic-DOzHPnht.js";import"./send-B7sHR38c2.js";import"./pi-model-discovery-Dps1PPWz.js";import"./exec-approvals-allowlist-CE3nYh0K.js";import"./exec-safe-bin-runtime-policy-Dt0GchLp.js";import"./ir-Dk7OQ4bA.js";import"./render-D8OWO2hT.js";import"./target-errors-a35Md15n.js";import"./read-only-account-inspect-DBwAwB3_.js";import"./channel-selection-CbNtbAEf.js";import"./plugin-auto-enable-DpVL6-ES.js";import"./send-C-AP01PR.js";import"./outbound-attachment-B7wMxwj6.js";import"./delivery-queue-CKbauSFq.js";import"./send-DbeEC2a3.js";import"./channel-activity-YjYNzCpJ.js";import"./tables-Oieq7UbT.js";import"./fetch-Bn0mWg6a.js";import"./skill-commands-HJHHZqt6.js";import"./workspace-dirs-BhF1Dzxt.js";import"./pairing-token-BjYBuREl.js";import"./restart-CHXEHdSC.js";import"./runtime-web-tools-bz76ZaRc.js";import"./command-secret-targets-BVN3kiT9.js";import"./session-cost-usage-BgqKixv0.js";import"./connection-auth-C8iru0UB.js";import"./onboard-helpers-zwybUJWu.js";import"./prompt-style-CXKekIBY.js";import"./pairing-labels-BUU_-70B.js";import"./memory-cli-jhzJ3as7.js";import"./query-expansion-0OxEb1Io.js";import"./manager-M1GKhLUC.js";import{t as D}from"./links-CySwdMcF.js";import"./cli-utils-BY7dLMFy.js";import"./help-format-BRbF_INg.js";import"./progress-LNttnI-y.js";import"./exec-approvals-BpBNEy6i.js";import"./nodes-screen-DECgxo6A.js";import"./system-run-command-DEWnZE0r.js";import"./runtime-BC5Ep2pJ.js";import"./stagger-DmFYysrJ.js";import{r as O,t as k}from"./channel-web-D7FkrASC.js";import"./outbound-Bz8bbrMI.js";import"./session-CUUGjiV3.js";import"./login-CkWesqf_.js";import{t as A}from"./is-main-DG5ueqhF.js";import{t as j}from"./path-env-BPd1Yd-i.js";import{t as M}from"./runtime-guard-DFYBaYZS.js";import"./ports-BR0PLRtq.js";import{i as N,n as P,o as F,s as I}from"./program-context-lyPXjPfN.js";import"./plugin-registry-CI5K3iWc.js";import{n as L}from"./channel-options-Ce8uNnAp.js";import R from"node:process";import{fileURLToPath as ge}from"node:url";import{Command as _e,InvalidArgumentError as ve}from"commander";function ye(){let e,t=()=>(e===void 0&&(e=L()),e);return{programVersion:se,get channelOptions(){return t()},get messageChannelOptions(){return t().join(`|`)},get agentChannelOptions(){return[`last`,...t()].join(`|`)}}}const z=`All your chats, one OpenClaw.`,B={newYear:`New Year's Day: New year, new config—same old EADDRINUSE, but this time we resolve it like grown-ups.`,lunarNewYear:`Lunar New Year: May your builds be lucky, your branches prosperous, and your merge conflicts chased away with fireworks.`,christmas:`Christmas: Ho ho ho—Santa's little claw-sistant is here to ship joy, roll back chaos, and stash the keys safely.`,eid:`Eid al-Fitr: Celebration mode: queues cleared, tasks completed, and good vibes committed to main with clean history.`,diwali:`Diwali: Let the logs sparkle and the bugs flee—today we light up the terminal and ship with pride.`,easter:`Easter: I found your missing environment variable—consider it a tiny CLI egg hunt with fewer jellybeans.`,hanukkah:`Hanukkah: Eight nights, eight retries, zero shame—may your gateway stay lit and your deployments stay peaceful.`,halloween:`Halloween: Spooky season: beware haunted dependencies, cursed caches, and the ghost of node_modules past.`,thanksgiving:`Thanksgiving: Grateful for stable ports, working DNS, and a bot that reads the logs so nobody has to.`,valentines:`Valentine's Day: Roses are typed, violets are piped—I'll automate the chores so you can spend time with humans.`},V=[`Your terminal just grew claws—type something and let the bot pinch the busywork.`,`Welcome to the command line: where dreams compile and confidence segfaults.`,`I run on caffeine, JSON5, and the audacity of "it worked on my machine."`,`Gateway online—please keep hands, feet, and appendages inside the shell at all times.`,`I speak fluent bash, mild sarcasm, and aggressive tab-completion energy.`,`One CLI to rule them all, and one more restart because you changed the port.`,`If it works, it's automation; if it breaks, it's a "learning opportunity."`,`Pairing codes exist because even bots believe in consent—and good security hygiene.`,`Your .env is showing; don't worry, I'll pretend I didn't see it.`,`I'll do the boring stuff while you dramatically stare at the logs like it's cinema.`,`I'm not saying your workflow is chaotic... I'm just bringing a linter and a helmet.`,`Type the command with confidence—nature will provide the stack trace if needed.`,`I don't judge, but your missing API keys are absolutely judging you.`,`I can grep it, git blame it, and gently roast it—pick your coping mechanism.`,`Hot reload for config, cold sweat for deploys.`,`I'm the assistant your terminal demanded, not the one your sleep schedule requested.`,`I keep secrets like a vault... unless you print them in debug logs again.`,`Automation with claws: minimal fuss, maximal pinch.`,`I'm basically a Swiss Army knife, but with more opinions and fewer sharp edges.`,`If you're lost, run doctor; if you're brave, run prod; if you're wise, run tests.`,`Your task has been queued; your dignity has been deprecated.`,`I can't fix your code taste, but I can fix your build and your backlog.`,`I'm not magic—I'm just extremely persistent with retries and coping strategies.`,`It's not "failing," it's "discovering new ways to configure the same thing wrong."`,`Give me a workspace and I'll give you fewer tabs, fewer toggles, and more oxygen.`,`I read logs so you can keep pretending you don't have to.`,`If something's on fire, I can't extinguish it—but I can write a beautiful postmortem.`,`I'll refactor your busywork like it owes me money.`,`Say "stop" and I'll stop—say "ship" and we'll both learn a lesson.`,`I'm the reason your shell history looks like a hacker-movie montage.`,`I'm like tmux: confusing at first, then suddenly you can't live without me.`,`I can run local, remote, or purely on vibes—results may vary with DNS.`,`If you can describe it, I can probably automate it—or at least make it funnier.`,`Your config is valid, your assumptions are not.`,`I don't just autocomplete—I auto-commit (emotionally), then ask you to review (logically).`,`Less clicking, more shipping, fewer "where did that file go" moments.`,`Claws out, commit in—let's ship something mildly responsible.`,`I'll butter your workflow like a lobster roll: messy, delicious, effective.`,`Shell yeah—I'm here to pinch the toil and leave you the glory.`,`If it's repetitive, I'll automate it; if it's hard, I'll bring jokes and a rollback plan.`,`The only crab in your contacts you actually want to hear from. 🦞`,`WhatsApp automation without the "please accept our new privacy policy".`,`iMessage green bubble energy, but for everyone.`,`No $999 stand required.`,`We ship features faster than Apple ships calculator updates.`,`Your AI assistant, now without the $3,499 headset.`,`Ah, the fruit tree company! 🍎`,`Greetings, Professor Falken`,`I don't sleep, I just enter low-power mode and dream of clean diffs.`,`Your personal assistant, minus the passive-aggressive calendar reminders.`,`Built by lobsters, for humans. Don't question the hierarchy.`,`I've seen your commit messages. We'll work on that together.`,`More integrations than your therapist's intake form.`,`Running on your hardware, reading your logs, judging nothing (mostly).`,`The only open-source project where the mascot could eat the competition.`,`Self-hosted, self-updating, self-aware (just kidding... unless?).`,`I autocomplete your thoughts—just slower and with more API calls.`,`Somewhere between 'hello world' and 'oh god what have I built.'`,`Your .zshrc wishes it could do what I do.`,`I've read more man pages than any human should—so you don't have to.`,`Powered by open source, sustained by spite and good documentation.`,`I'm the middleware between your ambition and your attention span.`,`Finally, a use for that always-on Mac Mini under your desk.`,`Like having a senior engineer on call, except I don't bill hourly or sigh audibly.`,`Making 'I'll automate that later' happen now.`,`Your second brain, except this one actually remembers where you left things.`,`Half butler, half debugger, full crustacean.`,`I don't have opinions about tabs vs spaces. I have opinions about everything else.`,`Open source means you can see exactly how I judge your config.`,`I've survived more breaking changes than your last three relationships.`,`Runs on a Raspberry Pi. Dreams of a rack in Iceland.`,`The lobster in your shell. 🦞`,`Alexa, but with taste.`,`I'm not AI-powered, I'm AI-possessed. Big difference.`,`Deployed locally, trusted globally, debugged eternally.`,`You had me at 'openclaw gateway start.'`,B.newYear,B.lunarNewYear,B.christmas,B.eid,B.diwali,B.easter,B.hanukkah,B.halloween,B.thanksgiving,B.valentines],H=1440*60*1e3;function U(e){return{year:e.getUTCFullYear(),month:e.getUTCMonth(),day:e.getUTCDate()}}const W=(e,t)=>n=>{let r=U(n);return r.month===e&&r.day===t},G=(e,t=1)=>n=>{let r=U(n);return e.some(([e,n,i])=>{if(r.year!==e)return!1;let a=Date.UTC(e,n,i),o=Date.UTC(r.year,r.month,r.day);return o>=a&&o<a+t*H})},be=new Map([[B.newYear,W(0,1)],[B.lunarNewYear,G([[2025,0,29],[2026,1,17],[2027,1,6]],1)],[B.eid,G([[2025,2,30],[2025,2,31],[2026,2,20],[2027,2,10]],1)],[B.diwali,G([[2025,9,20],[2026,10,8],[2027,9,28]],1)],[B.easter,G([[2025,3,20],[2026,3,5],[2027,2,28]],1)],[B.hanukkah,(e=>t=>{let n=U(t),r=e.find(e=>e.year===n.year);if(!r)return!1;let i=Date.UTC(r.year,r.month,r.day),a=Date.UTC(n.year,n.month,n.day);return a>=i&&a<i+r.duration*H})([{year:2025,month:11,day:15,duration:8},{year:2026,month:11,day:5,duration:8},{year:2027,month:11,day:25,duration:8}])],[B.halloween,W(9,31)],[B.thanksgiving,e=>{let t=U(e);if(t.month!==10)return!1;let n=1+(4-new Date(Date.UTC(t.year,10,1)).getUTCDay()+7)%7+21;return t.day===n}],[B.valentines,W(1,14)],[B.christmas,W(11,25)]]);function xe(e,t){let n=be.get(e);return n?n(t):!0}function Se(e={}){if(V.length===0)return[z];let t=e.now?e.now():new Date,n=V.filter(e=>xe(e,t));return n.length>0?n:V}function Ce(e={}){if(e.mode===`off`)return``;if(e.mode===`default`)return z;let t=(e.env??process.env)?.OPENCLAW_TAGLINE_INDEX;if(t!==void 0){let e=Number.parseInt(t,10);if(!Number.isNaN(e)&&e>=0){let t=V.length>0?V:[z];return t[e%t.length]}}let n=Se(e),r=e.random??Math.random;return n[Math.floor(r()*n.length)%n.length]}let K=!1;typeof Intl<`u`&&`Segmenter`in Intl&&new Intl.Segmenter(void 0,{granularity:`grapheme`});const we=e=>e.some(e=>e===`--json`||e.startsWith(`--json=`)),Te=e=>e.some(e=>e===`--version`||e===`-V`)||o(e);function q(e){if(e===`random`||e===`default`||e===`off`)return e}function Ee(e){let t=q(e.mode);if(t)return t;try{return q(g().cli?.banner?.taglineMode)}catch{return}}function J(t,n={}){let r=n.commit??_({env:n.env,moduleUrl:import.meta.url})??`unknown`,i=Ce({...n,mode:Ee(n)}),a=n.richTty??c(),o=`🦞 OpenClaw`,l=n.columns??process.stdout.columns??120,u=`${o} ${t} (${r})`,d=i?`${u} — ${i}`:u,f=s(d)<=l;if(a){if(f)return i?`${e.heading(o)} ${e.info(t)} ${e.muted(`(${r})`)} ${e.muted(`—`)} ${e.accentDim(i)}`:`${e.heading(o)} ${e.info(t)} ${e.muted(`(${r})`)}`;let n=`${e.heading(o)} ${e.info(t)} ${e.muted(`(${r})`)}`;return i?`${n}\n${`${` `.repeat(3)}${e.accentDim(i)}`}`:n}if(f)return d;let p=u;return i?`${p}\n${`${` `.repeat(3)}${i}`}`:p}function De(e,t={}){if(K)return;let n=t.argv??process.argv;if(!process.stdout.isTTY||we(n)||Te(n))return;let r=J(e,t);process.stdout.write(`\n${r}\n\n`),K=!0}function Oe(){return K}const Y=i.join(`|`);function ke(e){let n=t(e);if(!n)throw new ve(`Invalid --log-level (use ${Y})`);return n}const X=v(),Ae=ee(X),je=new Set([...N(),...I()]),Me=[[`openclaw models --help`,`Show detailed help for the models command.`],[`openclaw channels login --verbose`,`Link personal WhatsApp Web and show QR + connection logs.`],[`openclaw message send --target +15555550123 --message "Hi" --json`,`Send via your web session and print JSON result.`],[`openclaw gateway --port 18789`,`Run the WebSocket Gateway locally.`],[`openclaw --dev gateway`,`Run a dev Gateway (isolated state/config) on ws://127.0.0.1:19001.`],[`openclaw gateway --force`,`Kill anything bound to the default gateway port, then start it.`],[`openclaw gateway ...`,`Gateway control via WebSocket.`],[`openclaw agent --to +15555550123 --message "Run summary" --deliver`,`Talk directly to the agent using the Gateway; optionally send the WhatsApp reply.`],[`openclaw message send --channel telegram --target @mychat --message "Hi"`,`Send via your Telegram bot.`]];function Ne(t,n){t.name(X).description(``).version(n.programVersion).option(`--dev`,`Dev profile: isolate state under ~/.qbotclaw-dev, default gateway port 19001, and shift derived ports (browser/canvas)`).option(`--profile <name>`,`Use a named profile (isolates OPENCLAW_STATE_DIR/OPENCLAW_CONFIG_PATH under ~/.qbotclaw-<name>)`).option(`--log-level <level>`,`Global log level override for file + console (${Y})`,ke),t.option(`--no-color`,`Disable ANSI colors`,!1),t.helpOption(`-h, --help`,`Display help for command`),t.helpCommand(`help [command]`,`Display help for command`),t.configureHelp({sortSubcommands:!0,sortOptions:!0,optionTerm:t=>e.option(t.flags),subcommandTerm:n=>{let r=n.parent===t&&je.has(n.name());return e.command(r?`${n.name()} *`:n.name())}});let r=t=>{let n=t;return RegExp(`^Usage:\\s+${Ae}\\s+\\[options\\]\\s+\\[command\\]\\s*$`,`m`).test(n)&&/^Commands:/m.test(n)&&(n=n.replace(/^Commands:/m,`Commands:\n ${e.muted(`Hint: commands suffixed with * have subcommands. Run <command> --help for details.`)}`)),n.replace(/^Usage:/gm,e.heading(`Usage:`)).replace(/^Options:/gm,e.heading(`Options:`)).replace(/^Commands:/gm,e.heading(`Commands:`))};if(t.configureOutput({writeOut:e=>{process.stdout.write(r(e))},writeErr:e=>{process.stderr.write(r(e))},outputError:(t,n)=>n(e.error(t))}),u(process.argv,`-V`)||u(process.argv,`--version`)||o(process.argv)){let e=_({moduleUrl:import.meta.url});console.log(e?`OpenClaw ${n.programVersion} (${e})`:`OpenClaw ${n.programVersion}`),process.exit(0)}t.addHelpText(`beforeAll`,()=>{if(Oe())return``;let e=c();return`\n${J(n.programVersion,{richTty:e})}\n`});let i=Me.map(([t,n])=>` ${e.command(he(t,X))}\n ${e.muted(n)}`).join(`
3
3
  `);t.addHelpText(`afterAll`,({command:n})=>{if(n!==t)return``;let r=D(`/cli`,`docs.openclaw.ai/cli`);return`\n${e.heading(`Examples:`)}\n${i}\n\n${e.muted(`Docs:`)} ${r}\n`})}function Pe(e){let t=e;for(;t.parent&&t.parent.parent;)t=t.parent;let n=t.name(),r=v();!n||n===r||(process.title=`${r}-${n}`)}const Fe=new Set([`message`,`channels`,`directory`,`agents`,`configure`,`onboard`,`status`,`health`]),Ie=new Set([`backup`,`doctor`,`completion`,`secrets`]),Z=new Set([`config set`]);let Q,$;function Le(e){let[t,n]=e;return t?!!(Ie.has(t)||t===`config`&&n===`validate`):!1}function Re(){return Q??=import(`./config-guard-sYYx9zEF.js`),Q}function ze(){return $??=import(`./plugin-registry-CI5K3iWc.js`).then(e=>e.n),$}function Be(e){let t=e;for(;t.parent;)t=t.parent;return t}function Ve(e){let t=Be(e);if(typeof t.getOptionValueSource!=`function`||t.getOptionValueSource(`logLevel`)!==`cli`)return;let n=t.opts().logLevel;return typeof n==`string`?n:void 0}function He(e,t){if(!u(t,`--json`))return!1;let n=`${e[0]??``} ${e[1]??``}`.trim();return!Z.has(n)}function Ue(e,t){e.hook(`preAction`,async(e,i)=>{Pe(i);let o=process.argv;if(n(o))return;let s=a(o,2);b(process.env.OPENCLAW_HIDE_BANNER)||s[0]===`update`||s[0]===`completion`||s[0]===`plugins`&&s[1]===`update`||De(t);let c=r(o,{includeDebug:!0});f(c);let u=Ve(i);if(u&&(process.env.OPENCLAW_LOG_LEVEL=u),c||(process.env.NODE_NO_WARNINGS??=`1`),Le(s))return;let d=He(s,o),{ensureConfigReady:p}=await Re();if(await p({runtime:l,commandPath:s,...d?{suppressDoctorStdout:!0}:{}}),Fe.has(s[0])){let{ensurePluginRegistryLoaded:e}=await ze();e()}})}function We(){let e=new _e,t=ye(),n=process.argv;return P(e,t),Ne(e,t),Ue(e,t.programVersion),F(e,t,n),e}fe({quiet:!0}),y(),j(),d(),M();const Ge=We();A({currentFile:ge(import.meta.url)})&&(E(),R.on(`uncaughtException`,e=>{console.error(`[openclaw] Uncaught exception:`,C(e)),R.exit(1)}),Ge.parseAsync(R.argv).catch(e=>{console.error(`[openclaw] CLI failed:`,C(e)),R.exit(1)}));export{de as PortInUseError,T as applyTemplate,ne as assertWebChannel,pe as createDefaultDeps,h as deriveSessionKey,le as describePortOwner,ie as ensureBinary,ce as ensurePortAvailable,me as getReplyFromConfig,ue as handlePortError,g as loadConfig,re as loadSessionStore,k as monitorWebChannel,te as normalizeE164,oe as promptYesNo,m as resolveSessionKey,w as resolveStorePath,S as runCommandWithTimeout,x as runExec,ae as saveSessionStore,p as toWhatsappJid,O as waitForever};
4
4
  //# sourceMappingURL=index.js.map
@@ -1,6 +1,6 @@
1
- import{m as e,p as t}from"./subsystem-BLbY429l.js";import{u as n}from"./paths-BjD3T_xq.js";import{Bo as r,Fo as i}from"./auth-profiles-T8DuH3ax.js";import{t as a}from"./command-format-CLxIPuLR.js";import{v as o}from"./utils-CGdo13HV.js";import{s}from"./types.secrets-D4tbc3Wq.js";import{At as c}from"./plugins-DNlgeTTc.js";import{a as l,b as u,c as d,g as f,h as p,n as m,t as h,u as g}from"./onboard-helpers-PGl5bVPE.js";import{t as _}from"./prompts-CMzglboN.js";import{t as v}from"./clack-prompter-DBPdGdqp.js";import{t as y}from"./runtime-guard-DX2Ie4ri.js";import"./daemon-runtime-VcpeBRJV.js";import{t as b}from"./onboarding-BRewu6jg.js";import{n as x}from"./logging-tYw1NbJd.js";import{i as S,r as C,t as w}from"./onboard-provider-auth-flags-CqbipO7D.js";import{t as T}from"./onboard-config-B7U20YRw.js";async function E(n,r=t){let i=v(),a=null;try{await b(n,r,i)}catch(e){if(e instanceof _){a=1;return}throw e}finally{e(`onboarding finish`,{resumeStdinIfPaused:!1}),a!==null&&r.exit(a)}}function D(e){return typeof e==`string`?e.trim().length>0:!!e}function O(e){let t=w.filter(({optionKey:t})=>D(e[t])).map(e=>({optionKey:e.optionKey,authChoice:e.authChoice,label:e.cliFlag}));return(D(e.customBaseUrl)||D(e.customModelId)||D(e.customApiKey))&&t.push({optionKey:`customBaseUrl`,authChoice:`custom-api-key`,label:`--custom-base-url/--custom-model-id/--custom-api-key`}),{choice:t[0]?.authChoice,matches:t}}function k(e){let{opts:t,runtime:n}=e,r=t.gatewayPort!==void 0;if(r&&(!Number.isFinite(t.gatewayPort)||(t.gatewayPort??0)<=0))return n.error(`Invalid --gateway-port`),n.exit(1),null;let i=r?t.gatewayPort:e.defaultPort,a=t.gatewayBind??`loopback`,o=t.gatewayAuth??`token`;if(o!==`token`&&o!==`password`)return n.error(`Invalid --gateway-auth (use token|password).`),n.exit(1),null;let l=o,u=t.tailscale??`off`,d=!!t.tailscaleResetOnExit;u!==`off`&&a!==`loopback`&&(a=`loopback`),u===`funnel`&&l!==`password`&&(l=`password`);let f=e.nextConfig,m=g(t.gatewayToken),h=g(process.env.OPENCLAW_GATEWAY_TOKEN),_=m||h||void 0,v=String(t.gatewayTokenRefEnv??``).trim();if(l===`token`)if(v){if(!s(v))return n.error(`Invalid --gateway-token-ref-env (use env var name like OPENCLAW_GATEWAY_TOKEN).`),n.exit(1),null;if(m)return n.error(`Use either --gateway-token or --gateway-token-ref-env, not both.`),n.exit(1),null;let e=process.env[v]?.trim();if(!e)return n.error(`Environment variable "${v}" is missing or empty.`),n.exit(1),null;_=e,f={...f,gateway:{...f.gateway,auth:{...f.gateway?.auth,mode:`token`,token:{source:`env`,provider:c(f,`env`,{preferFirstProviderForSource:!0}),id:v}}}}}else _||=p(),f={...f,gateway:{...f.gateway,auth:{...f.gateway?.auth,mode:`token`,token:_}}};if(l===`password`){let e=t.gatewayPassword?.trim();if(!e)return n.error(`Missing --gateway-password for password auth.`),n.exit(1),null;f={...f,gateway:{...f.gateway,auth:{...f.gateway?.auth,mode:`password`,password:e}}}}return f={...f,gateway:{...f.gateway,port:i,bind:a,tailscale:{...f.gateway?.tailscale,mode:u,resetOnExit:d}}},{nextConfig:f,port:i,bind:a,authMode:l,tailscaleMode:u,tailscaleResetOnExit:d,gatewayToken:_}}function A(e){e.opts.json&&e.runtime.log(JSON.stringify({mode:e.mode,workspace:e.workspaceDir,authChoice:e.authChoice,gateway:e.gateway,installDaemon:!!e.installDaemon,daemonRuntime:e.daemonRuntime,skipSkills:!!e.skipSkills,skipHealth:!!e.skipHealth},null,2))}function j(e){let{nextConfig:t,opts:n,runtime:r}=e;if(n.skipSkills)return t;let i=n.nodeManager??`npm`;return[`npm`,`pnpm`,`bun`].includes(i)?{...t,skills:{...t.skills,install:{...t.skills?.install,nodeManager:i}}}:(r.error(`Invalid --node-manager (use npm, pnpm, or bun)`),r.exit(1),t)}function M(e){return o((e.opts.workspace??e.baseConfig.agents?.defaults?.workspace??e.defaultWorkspaceDir).trim())}async function N(e){let{opts:t,runtime:i,baseConfig:o}=e,s=`local`,c=M({opts:t,baseConfig:o,defaultWorkspaceDir:h}),d=T(o,c),p=O(t);if(!t.authChoice&&p.matches.length>1){i.error([`Multiple API key flags were provided for non-interactive onboarding.`,`Use a single provider flag or pass --auth-choice explicitly.`,`Flags: ${p.matches.map(e=>e.label).join(`, `)}`].join(`
1
+ import{m as e,p as t}from"./subsystem-BLbY429l.js";import{u as n}from"./paths-BjD3T_xq.js";import{Bo as r,Fo as i}from"./auth-profiles-T8DuH3ax.js";import{t as a}from"./command-format-CLxIPuLR.js";import{v as o}from"./utils-CGdo13HV.js";import{s}from"./types.secrets-D4tbc3Wq.js";import{At as c}from"./plugins-DNlgeTTc.js";import{a as l,b as u,c as d,g as f,h as p,n as m,t as h,u as g}from"./onboard-helpers-PGl5bVPE.js";import{t as _}from"./prompts-CMzglboN.js";import{t as v}from"./clack-prompter-DBPdGdqp.js";import{t as y}from"./runtime-guard-DX2Ie4ri.js";import"./daemon-runtime-VcpeBRJV.js";import{t as b}from"./onboarding-TkoOoq9D.js";import{n as x}from"./logging-tYw1NbJd.js";import{i as S,r as C,t as w}from"./onboard-provider-auth-flags-CqbipO7D.js";import{t as T}from"./onboard-config-B7U20YRw.js";async function E(n,r=t){let i=v(),a=null;try{await b(n,r,i)}catch(e){if(e instanceof _){a=1;return}throw e}finally{e(`onboarding finish`,{resumeStdinIfPaused:!1}),a!==null&&r.exit(a)}}function D(e){return typeof e==`string`?e.trim().length>0:!!e}function O(e){let t=w.filter(({optionKey:t})=>D(e[t])).map(e=>({optionKey:e.optionKey,authChoice:e.authChoice,label:e.cliFlag}));return(D(e.customBaseUrl)||D(e.customModelId)||D(e.customApiKey))&&t.push({optionKey:`customBaseUrl`,authChoice:`custom-api-key`,label:`--custom-base-url/--custom-model-id/--custom-api-key`}),{choice:t[0]?.authChoice,matches:t}}function k(e){let{opts:t,runtime:n}=e,r=t.gatewayPort!==void 0;if(r&&(!Number.isFinite(t.gatewayPort)||(t.gatewayPort??0)<=0))return n.error(`Invalid --gateway-port`),n.exit(1),null;let i=r?t.gatewayPort:e.defaultPort,a=t.gatewayBind??`loopback`,o=t.gatewayAuth??`token`;if(o!==`token`&&o!==`password`)return n.error(`Invalid --gateway-auth (use token|password).`),n.exit(1),null;let l=o,u=t.tailscale??`off`,d=!!t.tailscaleResetOnExit;u!==`off`&&a!==`loopback`&&(a=`loopback`),u===`funnel`&&l!==`password`&&(l=`password`);let f=e.nextConfig,m=g(t.gatewayToken),h=g(process.env.OPENCLAW_GATEWAY_TOKEN),_=m||h||void 0,v=String(t.gatewayTokenRefEnv??``).trim();if(l===`token`)if(v){if(!s(v))return n.error(`Invalid --gateway-token-ref-env (use env var name like OPENCLAW_GATEWAY_TOKEN).`),n.exit(1),null;if(m)return n.error(`Use either --gateway-token or --gateway-token-ref-env, not both.`),n.exit(1),null;let e=process.env[v]?.trim();if(!e)return n.error(`Environment variable "${v}" is missing or empty.`),n.exit(1),null;_=e,f={...f,gateway:{...f.gateway,auth:{...f.gateway?.auth,mode:`token`,token:{source:`env`,provider:c(f,`env`,{preferFirstProviderForSource:!0}),id:v}}}}}else _||=p(),f={...f,gateway:{...f.gateway,auth:{...f.gateway?.auth,mode:`token`,token:_}}};if(l===`password`){let e=t.gatewayPassword?.trim();if(!e)return n.error(`Missing --gateway-password for password auth.`),n.exit(1),null;f={...f,gateway:{...f.gateway,auth:{...f.gateway?.auth,mode:`password`,password:e}}}}return f={...f,gateway:{...f.gateway,port:i,bind:a,tailscale:{...f.gateway?.tailscale,mode:u,resetOnExit:d}}},{nextConfig:f,port:i,bind:a,authMode:l,tailscaleMode:u,tailscaleResetOnExit:d,gatewayToken:_}}function A(e){e.opts.json&&e.runtime.log(JSON.stringify({mode:e.mode,workspace:e.workspaceDir,authChoice:e.authChoice,gateway:e.gateway,installDaemon:!!e.installDaemon,daemonRuntime:e.daemonRuntime,skipSkills:!!e.skipSkills,skipHealth:!!e.skipHealth},null,2))}function j(e){let{nextConfig:t,opts:n,runtime:r}=e;if(n.skipSkills)return t;let i=n.nodeManager??`npm`;return[`npm`,`pnpm`,`bun`].includes(i)?{...t,skills:{...t.skills,install:{...t.skills?.install,nodeManager:i}}}:(r.error(`Invalid --node-manager (use npm, pnpm, or bun)`),r.exit(1),t)}function M(e){return o((e.opts.workspace??e.baseConfig.agents?.defaults?.workspace??e.defaultWorkspaceDir).trim())}async function N(e){let{opts:t,runtime:i,baseConfig:o}=e,s=`local`,c=M({opts:t,baseConfig:o,defaultWorkspaceDir:h}),d=T(o,c),p=O(t);if(!t.authChoice&&p.matches.length>1){i.error([`Multiple API key flags were provided for non-interactive onboarding.`,`Use a single provider flag or pass --auth-choice explicitly.`,`Flags: ${p.matches.map(e=>e.label).join(`, `)}`].join(`
2
2
  `)),i.exit(1);return}let g=t.authChoice??p.choice??`skip`;if(g!==`skip`){let{applyNonInteractiveAuthChoice:e}=await import(`./auth-choice-B7LSoXZ_.js`),n=await e({nextConfig:d,authChoice:g,opts:t,runtime:i,baseConfig:o});if(!n)return;d=n}let _=n(o),v=k({nextConfig:d,opts:t,runtime:i,defaultPort:_});if(!v)return;if(d=v.nextConfig,d=j({nextConfig:d,opts:t,runtime:i}),d=m(d,{command:`onboard`,mode:s}),await r(d),x(i),await l(c,i,{skipBootstrap:!!d.agents?.defaults?.skipBootstrap}),t.installDaemon){let{installGatewayDaemonNonInteractive:e}=await import(`./daemon-install-C30rBssi.js`);await e({nextConfig:d,opts:t,runtime:i,port:v.port})}let y=t.daemonRuntime??`node`;if(!t.skipHealth){let{healthCommand:e}=await import(`./health-DBu0V1Y-.js`).then(e=>e.i);await u({url:f({bind:v.bind,port:v.port,customBindHost:d.gateway?.customBindHost,basePath:void 0}).wsUrl,token:v.gatewayToken,deadlineMs:15e3}),await e({json:!1,timeoutMs:1e4},i)}A({opts:t,runtime:i,mode:s,workspaceDir:c,authChoice:g,gateway:{port:v.port,bind:v.bind,authMode:v.authMode,tailscaleMode:v.tailscaleMode},installDaemon:!!t.installDaemon,daemonRuntime:t.installDaemon?y:void 0,skipSkills:!!t.skipSkills,skipHealth:!!t.skipHealth}),t.json||i.log(`Tip: run \`${a(`openclaw configure --section web`)}\` to store your Brave API key for web_search. Docs: https://docs.openclaw.ai/tools/web`)}async function P(e){let{opts:t,runtime:n,baseConfig:i}=e,o=`remote`,s=t.remoteUrl?.trim();if(!s){n.error(`Missing --remote-url for remote mode.`),n.exit(1);return}let c={...i,gateway:{...i.gateway,mode:`remote`,remote:{url:s,token:t.remoteToken?.trim()||void 0}}};c=m(c,{command:`onboard`,mode:o}),await r(c),x(n);let l={mode:o,remoteUrl:s,auth:t.remoteToken?`token`:`none`};t.json?n.log(JSON.stringify(l,null,2)):(n.log(`Remote gateway: ${s}`),n.log(`Auth: ${l.auth}`),n.log(`Tip: run \`${a(`openclaw configure --section web`)}\` to store your Brave API key for web_search. Docs: https://docs.openclaw.ai/tools/web`))}async function F(e,n=t){let r=await i();if(r.exists&&!r.valid){n.error(`Config invalid. Run \`${a(`openclaw doctor`)}\` to repair it, then re-run onboarding.`),n.exit(1);return}let o=r.valid&&r.exists?r.config:{},s=e.mode??`local`;if(s!==`local`&&s!==`remote`){n.error(`Invalid --mode "${String(s)}" (use local|remote).`),n.exit(1);return}if(s===`remote`){await P({opts:e,runtime:n,baseConfig:o});return}await N({opts:e,runtime:n,baseConfig:o})}const I=new Set([`config`,`config+creds+sessions`,`full`]);async function L(e,n=t){y(n);let r=e.authChoice,s=S(r);if(e.nonInteractive&&C(r)){n.error([`Auth choice "${String(r)}" is deprecated.`,`Use "--auth-choice token" (Anthropic setup-token) or "--auth-choice openai-codex".`].join(`
3
3
  `)),n.exit(1);return}r===`claude-cli`&&n.log(`Auth choice "claude-cli" is deprecated; using setup-token flow instead.`),r===`codex-cli`&&n.log(`Auth choice "codex-cli" is deprecated; using OpenAI Codex OAuth instead.`);let c=e.flow===`manual`?`advanced`:e.flow,l=s===e.authChoice&&c===e.flow?e:{...e,authChoice:s,flow:c};if(l.secretInputMode&&l.secretInputMode!==`plaintext`&&l.secretInputMode!==`ref`){n.error(`Invalid --secret-input-mode. Use "plaintext" or "ref".`),n.exit(1);return}if(l.resetScope&&!I.has(l.resetScope)){n.error(`Invalid --reset-scope. Use "config", "config+creds+sessions", or "full".`),n.exit(1);return}if(l.nonInteractive&&l.acceptRisk!==!0){n.error([`Non-interactive onboarding requires explicit risk acknowledgement.`,`Read: https://docs.openclaw.ai/security`,`Re-run with: ${a(`openclaw onboard --non-interactive --accept-risk ...`)}`].join(`
4
4
  `)),n.exit(1);return}if(l.reset){let e=await i(),t=e.valid?e.config:{},r=l.workspace??t.agents?.defaults?.workspace??h;await d(l.resetScope??`config+creds+sessions`,o(r),n)}if(process.platform===`win32`&&n.log([`Windows detected — OpenClaw runs great on WSL2!`,`Native Windows might be trickier.`,`Quick setup: wsl --install (one command, one reboot)`,`Guide: https://docs.openclaw.ai/windows`].join(`
5
5
  `)),l.nonInteractive){await F(l,n);return}await E(l,n)}export{L as t};
6
- //# sourceMappingURL=onboard-7i9A1nNd.js.map
6
+ //# sourceMappingURL=onboard-2iF3lTUI.js.map
@@ -1,6 +1,6 @@
1
- import{u as e}from"./paths-B4IRk3wi.js";import{m as t,p as n}from"./subsystem-C5XF2Fy5.js";import{y as r}from"./utils-UGOV_184.js";import{Zs as i,nc as a}from"./model-selection-BlC_rXAN.js";import{s as o}from"./types.secrets-C-5U96pc.js";import{t as s}from"./command-format-BbDT1tlm.js";import{At as c}from"./plugins-CYLrFT4h.js";import{a as l,b as u,c as d,g as f,h as p,n as m,t as h,u as g}from"./onboard-helpers-zwybUJWu.js";import{t as _}from"./runtime-guard-DFYBaYZS.js";import{t as v}from"./prompts-wv-lfVrJ.js";import{t as y}from"./clack-prompter-Dq0aY6iM.js";import"./daemon-runtime-DHiDbRuC.js";import{t as b}from"./onboarding-RZTEMxl0.js";import{n as x}from"./logging-Dqe9dxSX.js";import{i as S,r as C,t as w}from"./onboard-provider-auth-flags-Dvwzdz37.js";import{t as T}from"./onboard-config-DS9dUv8M.js";async function E(e,r=n){let i=y(),a=null;try{await b(e,r,i)}catch(e){if(e instanceof v){a=1;return}throw e}finally{t(`onboarding finish`,{resumeStdinIfPaused:!1}),a!==null&&r.exit(a)}}function D(e){return typeof e==`string`?e.trim().length>0:!!e}function O(e){let t=w.filter(({optionKey:t})=>D(e[t])).map(e=>({optionKey:e.optionKey,authChoice:e.authChoice,label:e.cliFlag}));return(D(e.customBaseUrl)||D(e.customModelId)||D(e.customApiKey))&&t.push({optionKey:`customBaseUrl`,authChoice:`custom-api-key`,label:`--custom-base-url/--custom-model-id/--custom-api-key`}),{choice:t[0]?.authChoice,matches:t}}function k(e){let{opts:t,runtime:n}=e,r=t.gatewayPort!==void 0;if(r&&(!Number.isFinite(t.gatewayPort)||(t.gatewayPort??0)<=0))return n.error(`Invalid --gateway-port`),n.exit(1),null;let i=r?t.gatewayPort:e.defaultPort,a=t.gatewayBind??`loopback`,s=t.gatewayAuth??`token`;if(s!==`token`&&s!==`password`)return n.error(`Invalid --gateway-auth (use token|password).`),n.exit(1),null;let l=s,u=t.tailscale??`off`,d=!!t.tailscaleResetOnExit;u!==`off`&&a!==`loopback`&&(a=`loopback`),u===`funnel`&&l!==`password`&&(l=`password`);let f=e.nextConfig,m=g(t.gatewayToken),h=g(process.env.OPENCLAW_GATEWAY_TOKEN),_=m||h||void 0,v=String(t.gatewayTokenRefEnv??``).trim();if(l===`token`)if(v){if(!o(v))return n.error(`Invalid --gateway-token-ref-env (use env var name like OPENCLAW_GATEWAY_TOKEN).`),n.exit(1),null;if(m)return n.error(`Use either --gateway-token or --gateway-token-ref-env, not both.`),n.exit(1),null;let e=process.env[v]?.trim();if(!e)return n.error(`Environment variable "${v}" is missing or empty.`),n.exit(1),null;_=e,f={...f,gateway:{...f.gateway,auth:{...f.gateway?.auth,mode:`token`,token:{source:`env`,provider:c(f,`env`,{preferFirstProviderForSource:!0}),id:v}}}}}else _||=p(),f={...f,gateway:{...f.gateway,auth:{...f.gateway?.auth,mode:`token`,token:_}}};if(l===`password`){let e=t.gatewayPassword?.trim();if(!e)return n.error(`Missing --gateway-password for password auth.`),n.exit(1),null;f={...f,gateway:{...f.gateway,auth:{...f.gateway?.auth,mode:`password`,password:e}}}}return f={...f,gateway:{...f.gateway,port:i,bind:a,tailscale:{...f.gateway?.tailscale,mode:u,resetOnExit:d}}},{nextConfig:f,port:i,bind:a,authMode:l,tailscaleMode:u,tailscaleResetOnExit:d,gatewayToken:_}}function A(e){e.opts.json&&e.runtime.log(JSON.stringify({mode:e.mode,workspace:e.workspaceDir,authChoice:e.authChoice,gateway:e.gateway,installDaemon:!!e.installDaemon,daemonRuntime:e.daemonRuntime,skipSkills:!!e.skipSkills,skipHealth:!!e.skipHealth},null,2))}function j(e){let{nextConfig:t,opts:n,runtime:r}=e;if(n.skipSkills)return t;let i=n.nodeManager??`npm`;return[`npm`,`pnpm`,`bun`].includes(i)?{...t,skills:{...t.skills,install:{...t.skills?.install,nodeManager:i}}}:(r.error(`Invalid --node-manager (use npm, pnpm, or bun)`),r.exit(1),t)}function M(e){return r((e.opts.workspace??e.baseConfig.agents?.defaults?.workspace??e.defaultWorkspaceDir).trim())}async function N(t){let{opts:n,runtime:r,baseConfig:i}=t,o=`local`,c=M({opts:n,baseConfig:i,defaultWorkspaceDir:h}),d=T(i,c),p=O(n);if(!n.authChoice&&p.matches.length>1){r.error([`Multiple API key flags were provided for non-interactive onboarding.`,`Use a single provider flag or pass --auth-choice explicitly.`,`Flags: ${p.matches.map(e=>e.label).join(`, `)}`].join(`
1
+ import{u as e}from"./paths-B4IRk3wi.js";import{m as t,p as n}from"./subsystem-C5XF2Fy5.js";import{y as r}from"./utils-UGOV_184.js";import{Zs as i,nc as a}from"./model-selection-BlC_rXAN.js";import{s as o}from"./types.secrets-C-5U96pc.js";import{t as s}from"./command-format-BbDT1tlm.js";import{At as c}from"./plugins-CYLrFT4h.js";import{a as l,b as u,c as d,g as f,h as p,n as m,t as h,u as g}from"./onboard-helpers-zwybUJWu.js";import{t as _}from"./runtime-guard-DFYBaYZS.js";import{t as v}from"./prompts-wv-lfVrJ.js";import{t as y}from"./clack-prompter-Dq0aY6iM.js";import"./daemon-runtime-DHiDbRuC.js";import{t as b}from"./onboarding-BTBbx6Ka.js";import{n as x}from"./logging-Dqe9dxSX.js";import{i as S,r as C,t as w}from"./onboard-provider-auth-flags-Dvwzdz37.js";import{t as T}from"./onboard-config-DS9dUv8M.js";async function E(e,r=n){let i=y(),a=null;try{await b(e,r,i)}catch(e){if(e instanceof v){a=1;return}throw e}finally{t(`onboarding finish`,{resumeStdinIfPaused:!1}),a!==null&&r.exit(a)}}function D(e){return typeof e==`string`?e.trim().length>0:!!e}function O(e){let t=w.filter(({optionKey:t})=>D(e[t])).map(e=>({optionKey:e.optionKey,authChoice:e.authChoice,label:e.cliFlag}));return(D(e.customBaseUrl)||D(e.customModelId)||D(e.customApiKey))&&t.push({optionKey:`customBaseUrl`,authChoice:`custom-api-key`,label:`--custom-base-url/--custom-model-id/--custom-api-key`}),{choice:t[0]?.authChoice,matches:t}}function k(e){let{opts:t,runtime:n}=e,r=t.gatewayPort!==void 0;if(r&&(!Number.isFinite(t.gatewayPort)||(t.gatewayPort??0)<=0))return n.error(`Invalid --gateway-port`),n.exit(1),null;let i=r?t.gatewayPort:e.defaultPort,a=t.gatewayBind??`loopback`,s=t.gatewayAuth??`token`;if(s!==`token`&&s!==`password`)return n.error(`Invalid --gateway-auth (use token|password).`),n.exit(1),null;let l=s,u=t.tailscale??`off`,d=!!t.tailscaleResetOnExit;u!==`off`&&a!==`loopback`&&(a=`loopback`),u===`funnel`&&l!==`password`&&(l=`password`);let f=e.nextConfig,m=g(t.gatewayToken),h=g(process.env.OPENCLAW_GATEWAY_TOKEN),_=m||h||void 0,v=String(t.gatewayTokenRefEnv??``).trim();if(l===`token`)if(v){if(!o(v))return n.error(`Invalid --gateway-token-ref-env (use env var name like OPENCLAW_GATEWAY_TOKEN).`),n.exit(1),null;if(m)return n.error(`Use either --gateway-token or --gateway-token-ref-env, not both.`),n.exit(1),null;let e=process.env[v]?.trim();if(!e)return n.error(`Environment variable "${v}" is missing or empty.`),n.exit(1),null;_=e,f={...f,gateway:{...f.gateway,auth:{...f.gateway?.auth,mode:`token`,token:{source:`env`,provider:c(f,`env`,{preferFirstProviderForSource:!0}),id:v}}}}}else _||=p(),f={...f,gateway:{...f.gateway,auth:{...f.gateway?.auth,mode:`token`,token:_}}};if(l===`password`){let e=t.gatewayPassword?.trim();if(!e)return n.error(`Missing --gateway-password for password auth.`),n.exit(1),null;f={...f,gateway:{...f.gateway,auth:{...f.gateway?.auth,mode:`password`,password:e}}}}return f={...f,gateway:{...f.gateway,port:i,bind:a,tailscale:{...f.gateway?.tailscale,mode:u,resetOnExit:d}}},{nextConfig:f,port:i,bind:a,authMode:l,tailscaleMode:u,tailscaleResetOnExit:d,gatewayToken:_}}function A(e){e.opts.json&&e.runtime.log(JSON.stringify({mode:e.mode,workspace:e.workspaceDir,authChoice:e.authChoice,gateway:e.gateway,installDaemon:!!e.installDaemon,daemonRuntime:e.daemonRuntime,skipSkills:!!e.skipSkills,skipHealth:!!e.skipHealth},null,2))}function j(e){let{nextConfig:t,opts:n,runtime:r}=e;if(n.skipSkills)return t;let i=n.nodeManager??`npm`;return[`npm`,`pnpm`,`bun`].includes(i)?{...t,skills:{...t.skills,install:{...t.skills?.install,nodeManager:i}}}:(r.error(`Invalid --node-manager (use npm, pnpm, or bun)`),r.exit(1),t)}function M(e){return r((e.opts.workspace??e.baseConfig.agents?.defaults?.workspace??e.defaultWorkspaceDir).trim())}async function N(t){let{opts:n,runtime:r,baseConfig:i}=t,o=`local`,c=M({opts:n,baseConfig:i,defaultWorkspaceDir:h}),d=T(i,c),p=O(n);if(!n.authChoice&&p.matches.length>1){r.error([`Multiple API key flags were provided for non-interactive onboarding.`,`Use a single provider flag or pass --auth-choice explicitly.`,`Flags: ${p.matches.map(e=>e.label).join(`, `)}`].join(`
2
2
  `)),r.exit(1);return}let g=n.authChoice??p.choice??`skip`;if(g!==`skip`){let{applyNonInteractiveAuthChoice:e}=await import(`./auth-choice-CxMH4c-u.js`),t=await e({nextConfig:d,authChoice:g,opts:n,runtime:r,baseConfig:i});if(!t)return;d=t}let _=e(i),v=k({nextConfig:d,opts:n,runtime:r,defaultPort:_});if(!v)return;if(d=v.nextConfig,d=j({nextConfig:d,opts:n,runtime:r}),d=m(d,{command:`onboard`,mode:o}),await a(d),x(r),await l(c,r,{skipBootstrap:!!d.agents?.defaults?.skipBootstrap}),n.installDaemon){let{installGatewayDaemonNonInteractive:e}=await import(`./daemon-install-HrqlOCrc.js`);await e({nextConfig:d,opts:n,runtime:r,port:v.port})}let y=n.daemonRuntime??`node`;if(!n.skipHealth){let{healthCommand:e}=await import(`./health-RQzDNQwf.js`).then(e=>e.i);await u({url:f({bind:v.bind,port:v.port,customBindHost:d.gateway?.customBindHost,basePath:void 0}).wsUrl,token:v.gatewayToken,deadlineMs:15e3}),await e({json:!1,timeoutMs:1e4},r)}A({opts:n,runtime:r,mode:o,workspaceDir:c,authChoice:g,gateway:{port:v.port,bind:v.bind,authMode:v.authMode,tailscaleMode:v.tailscaleMode},installDaemon:!!n.installDaemon,daemonRuntime:n.installDaemon?y:void 0,skipSkills:!!n.skipSkills,skipHealth:!!n.skipHealth}),n.json||r.log(`Tip: run \`${s(`openclaw configure --section web`)}\` to store your Brave API key for web_search. Docs: https://docs.openclaw.ai/tools/web`)}async function P(e){let{opts:t,runtime:n,baseConfig:r}=e,i=`remote`,o=t.remoteUrl?.trim();if(!o){n.error(`Missing --remote-url for remote mode.`),n.exit(1);return}let c={...r,gateway:{...r.gateway,mode:`remote`,remote:{url:o,token:t.remoteToken?.trim()||void 0}}};c=m(c,{command:`onboard`,mode:i}),await a(c),x(n);let l={mode:i,remoteUrl:o,auth:t.remoteToken?`token`:`none`};t.json?n.log(JSON.stringify(l,null,2)):(n.log(`Remote gateway: ${o}`),n.log(`Auth: ${l.auth}`),n.log(`Tip: run \`${s(`openclaw configure --section web`)}\` to store your Brave API key for web_search. Docs: https://docs.openclaw.ai/tools/web`))}async function F(e,t=n){let r=await i();if(r.exists&&!r.valid){t.error(`Config invalid. Run \`${s(`openclaw doctor`)}\` to repair it, then re-run onboarding.`),t.exit(1);return}let a=r.valid&&r.exists?r.config:{},o=e.mode??`local`;if(o!==`local`&&o!==`remote`){t.error(`Invalid --mode "${String(o)}" (use local|remote).`),t.exit(1);return}if(o===`remote`){await P({opts:e,runtime:t,baseConfig:a});return}await N({opts:e,runtime:t,baseConfig:a})}const I=new Set([`config`,`config+creds+sessions`,`full`]);async function L(e,t=n){_(t);let a=e.authChoice,o=S(a);if(e.nonInteractive&&C(a)){t.error([`Auth choice "${String(a)}" is deprecated.`,`Use "--auth-choice token" (Anthropic setup-token) or "--auth-choice openai-codex".`].join(`
3
3
  `)),t.exit(1);return}a===`claude-cli`&&t.log(`Auth choice "claude-cli" is deprecated; using setup-token flow instead.`),a===`codex-cli`&&t.log(`Auth choice "codex-cli" is deprecated; using OpenAI Codex OAuth instead.`);let c=e.flow===`manual`?`advanced`:e.flow,l=o===e.authChoice&&c===e.flow?e:{...e,authChoice:o,flow:c};if(l.secretInputMode&&l.secretInputMode!==`plaintext`&&l.secretInputMode!==`ref`){t.error(`Invalid --secret-input-mode. Use "plaintext" or "ref".`),t.exit(1);return}if(l.resetScope&&!I.has(l.resetScope)){t.error(`Invalid --reset-scope. Use "config", "config+creds+sessions", or "full".`),t.exit(1);return}if(l.nonInteractive&&l.acceptRisk!==!0){t.error([`Non-interactive onboarding requires explicit risk acknowledgement.`,`Read: https://docs.openclaw.ai/security`,`Re-run with: ${s(`openclaw onboard --non-interactive --accept-risk ...`)}`].join(`
4
4
  `)),t.exit(1);return}if(l.reset){let e=await i(),n=e.valid?e.config:{},a=l.workspace??n.agents?.defaults?.workspace??h;await d(l.resetScope??`config+creds+sessions`,r(a),t)}if(process.platform===`win32`&&t.log([`Windows detected — OpenClaw runs great on WSL2!`,`Native Windows might be trickier.`,`Quick setup: wsl --install (one command, one reboot)`,`Guide: https://docs.openclaw.ai/windows`].join(`
5
5
  `)),l.nonInteractive){await F(l,t);return}await E(l,t)}export{L as t};
6
- //# sourceMappingURL=onboard-DSaXIS5U.js.map
6
+ //# sourceMappingURL=onboard-B9ouFJC7.js.map
@@ -4,5 +4,5 @@ import{n as e,u as t}from"./paths-B4IRk3wi.js";import{p as n}from"./subsystem-C5
4
4
  `),`QuickStart`)}let x=t(h),S=`ws://127.0.0.1:${x}`,C=process.env.OPENCLAW_GATEWAY_TOKEN??process.env.CLAWDBOT_GATEWAY_TOKEN;try{let e=await l({config:h,value:h.gateway?.auth?.token,path:`gateway.auth.token`,env:process.env});e&&(C=e)}catch(e){await f.note([`Could not resolve gateway.auth.token SecretRef for onboarding probe.`,e instanceof Error?e.message:String(e)].join(`
5
5
  `),`Gateway auth`)}let w=process.env.OPENCLAW_GATEWAY_PASSWORD??process.env.CLAWDBOT_GATEWAY_PASSWORD;try{let e=await l({config:h,value:h.gateway?.auth?.password,path:`gateway.auth.password`,env:process.env});e&&(w=e)}catch(e){await f.note([`Could not resolve gateway.auth.password SecretRef for onboarding probe.`,e instanceof Error?e.message:String(e)].join(`
6
6
  `),`Gateway auth`)}let T=await p.probeGatewayReachable({url:S,token:C,password:w}),E=h.gateway?.remote?.url?.trim()??``,D=o(h.gateway?.remote?.token);try{let e=await l({config:h,value:h.gateway?.remote?.token,path:`gateway.remote.token`,env:process.env});e&&(D=e)}catch(e){await f.note([`Could not resolve gateway.remote.token SecretRef for onboarding probe.`,e instanceof Error?e.message:String(e)].join(`
7
- `),`Gateway auth`)}let O=E?await p.probeGatewayReachable({url:E,token:D}):null,k=c.mode??(y===`quickstart`?`local`:await f.select({message:`What do you want to set up?`,options:[{value:`local`,label:`Local gateway (this machine)`,hint:T.ok?`Gateway reachable (${S})`:`No gateway detected (${S})`},{value:`remote`,label:`Remote gateway (info-only)`,hint:E?O?.ok?`Gateway reachable (${E})`:`Configured but unreachable (${E})`:`No remote URL configured yet`}]}));if(k===`remote`){let{promptRemoteGatewayConfig:e}=await import(`./onboard-remote-DPU-H_2O.js`).then(e=>e.t),{logConfigUpdated:t}=await import(`./logging-Dqe9dxSX.js`).then(e=>e.r),n=await e(h,f,{secretInputMode:c.secretInputMode});n=p.applyWizardMetadata(n,{command:`onboard`,mode:k}),await a(n),t(d),await f.outro(`Remote gateway configured.`);return}let A=r((c.workspace??(y===`quickstart`?h.agents?.defaults?.workspace??p.DEFAULT_WORKSPACE:await f.text({message:`Workspace directory`,initialValue:h.agents?.defaults?.workspace??p.DEFAULT_WORKSPACE}))).trim()||p.DEFAULT_WORKSPACE),{applyOnboardingLocalWorkspaceConfig:j}=await import(`./onboard-config-DS9dUv8M.js`).then(e=>e.n),M=j(h,A),{ensureAuthProfileStore:N}=await import(`./model-selection-BlC_rXAN.js`).then(e=>e.Ct),{promptAuthChoiceGrouped:P}=await import(`./auth-choice-prompt-xYj13czb.js`).then(e=>e.t),{promptCustomApiConfig:F}=await import(`./onboard-custom-B03SlEHB.js`).then(e=>e.r),{applyAuthChoice:I,resolvePreferredProviderForAuthChoice:L,warnIfModelConfigLooksOff:R}=await import(`./auth-choice-DJn6683d.js`).then(e=>e.t),{applyPrimaryModel:z,promptDefaultModel:B}=await import(`./model-picker-bZNuI66U.js`).then(e=>e.i),V=N(void 0,{allowKeychainPrompt:!1}),H=c.authChoice===void 0,U=c.authChoice??await P({prompter:f,store:V,includeSkip:!0});if(U===`custom-api-key`)M=(await F({prompter:f,runtime:d,config:M,secretInputMode:c.secretInputMode})).config;else{let e=await I({authChoice:U,config:M,prompter:f,runtime:d,setDefaultModel:!(H&&U===`ollama`),opts:{tokenProvider:c.tokenProvider,token:c.authChoice===`apiKey`&&c.token?c.token:void 0}});M=e.config,e.agentModelOverride&&(M=z(M,e.agentModelOverride))}if(H&&U!==`custom-api-key`){let e=await B({config:M,prompter:f,allowKeep:!0,ignoreAllowlist:!0,includeVllm:!0,preferredProvider:L(U)});e.config&&(M=e.config),e.model&&(M=z(M,e.model))}if(U===`ollama`){let{ensureOllamaModelPulled:e}=await import(`./ollama-setup-DlwS6Gl-.js`).then(e=>e.r);await e({config:M,prompter:f})}await R(M,f);let{configureGatewayForOnboarding:W}=await import(`./onboarding.gateway-config-y3pqsL9i.js`),G=await W({flow:y,baseConfig:h,nextConfig:M,localPort:x,quickstartGateway:b,secretInputMode:c.secretInputMode,prompter:f,runtime:d});M=G.nextConfig;let K=G.settings;if(c.skipChannels??c.skipProviders)await f.note(`Skipping channel setup.`,`Channels`);else{let{listChannelPlugins:e}=await import(`./plugins-CYLrFT4h.js`).then(e=>e.i),{setupChannels:t}=await import(`./onboard-channels-CjXCpXI-.js`).then(e=>e.n),n=y===`quickstart`?e().filter(e=>e.meta.quickstartAllowFrom).map(e=>e.id):[];M=await t(M,d,f,{allowSignalInstall:!0,forceAllowFromChannels:n,skipDmPolicyPrompt:y===`quickstart`,skipConfirm:y===`quickstart`,quickstartDefaults:y===`quickstart`,secretInputMode:c.secretInputMode})}await a(M);let{logConfigUpdated:q}=await import(`./logging-Dqe9dxSX.js`).then(e=>e.r);if(q(d),await p.ensureWorkspaceAndSessions(A,d,{skipBootstrap:!!M.agents?.defaults?.skipBootstrap}),c.skipSearch)await f.note(`Skipping search setup.`,`Search`);else{let{setupSearch:e}=await import(`./onboard-search-f2tJD4hg.js`);M=await e(M,d,f,{quickstartDefaults:y===`quickstart`,secretInputMode:c.secretInputMode})}if(c.skipSkills)await f.note(`Skipping skills setup.`,`Skills`);else{let{setupSkills:e}=await import(`./onboard-skills-CMSQc2Mm.js`).then(e=>e.t);M=await e(M,A,d,f)}let{setupInternalHooks:J}=await import(`./onboard-hooks-CERzXObm.js`);M=await J(M,d,f),M=p.applyWizardMetadata(M,{command:`onboard`,mode:k}),await a(M);let{finalizeOnboardingWizard:Y}=await import(`./onboarding.finalize-Bp8ST2z_.js`),{launchedTui:X}=await Y({flow:y,opts:c,baseConfig:h,nextConfig:M,workspaceDir:A,settings:K,prompter:f,runtime:d})}export{d as t};
8
- //# sourceMappingURL=onboarding-RZTEMxl0.js.map
7
+ `),`Gateway auth`)}let O=E?await p.probeGatewayReachable({url:E,token:D}):null,k=c.mode??(y===`quickstart`?`local`:await f.select({message:`What do you want to set up?`,options:[{value:`local`,label:`Local gateway (this machine)`,hint:T.ok?`Gateway reachable (${S})`:`No gateway detected (${S})`},{value:`remote`,label:`Remote gateway (info-only)`,hint:E?O?.ok?`Gateway reachable (${E})`:`Configured but unreachable (${E})`:`No remote URL configured yet`}]}));if(k===`remote`){let{promptRemoteGatewayConfig:e}=await import(`./onboard-remote-DPU-H_2O.js`).then(e=>e.t),{logConfigUpdated:t}=await import(`./logging-Dqe9dxSX.js`).then(e=>e.r),n=await e(h,f,{secretInputMode:c.secretInputMode});n=p.applyWizardMetadata(n,{command:`onboard`,mode:k}),await a(n),t(d),await f.outro(`Remote gateway configured.`);return}let A=r((c.workspace??(y===`quickstart`?h.agents?.defaults?.workspace??p.DEFAULT_WORKSPACE:await f.text({message:`Workspace directory`,initialValue:h.agents?.defaults?.workspace??p.DEFAULT_WORKSPACE}))).trim()||p.DEFAULT_WORKSPACE),{applyOnboardingLocalWorkspaceConfig:j}=await import(`./onboard-config-DS9dUv8M.js`).then(e=>e.n),M=j(h,A),{ensureAuthProfileStore:N}=await import(`./model-selection-BlC_rXAN.js`).then(e=>e.Ct),{promptAuthChoiceGrouped:P}=await import(`./auth-choice-prompt-xYj13czb.js`).then(e=>e.t),{promptCustomApiConfig:F}=await import(`./onboard-custom-B03SlEHB.js`).then(e=>e.r),{applyAuthChoice:I,resolvePreferredProviderForAuthChoice:L,warnIfModelConfigLooksOff:R}=await import(`./auth-choice-DJn6683d.js`).then(e=>e.t),{applyPrimaryModel:z,promptDefaultModel:B}=await import(`./model-picker-bZNuI66U.js`).then(e=>e.i),V=N(void 0,{allowKeychainPrompt:!1}),H=c.authChoice===void 0,U=c.authChoice??await P({prompter:f,store:V,includeSkip:!0});if(U===`custom-api-key`)M=(await F({prompter:f,runtime:d,config:M,secretInputMode:c.secretInputMode})).config;else{let e=await I({authChoice:U,config:M,prompter:f,runtime:d,setDefaultModel:!(H&&U===`ollama`),opts:{tokenProvider:c.tokenProvider,token:c.authChoice===`apiKey`&&c.token?c.token:void 0}});M=e.config,e.agentModelOverride&&(M=z(M,e.agentModelOverride))}if(H&&U!==`custom-api-key`){let e=await B({config:M,prompter:f,allowKeep:!0,ignoreAllowlist:!0,includeVllm:!0,preferredProvider:L(U)});e.config&&(M=e.config),e.model&&(M=z(M,e.model))}if(U===`ollama`){let{ensureOllamaModelPulled:e}=await import(`./ollama-setup-DlwS6Gl-.js`).then(e=>e.r);await e({config:M,prompter:f})}await R(M,f);let{configureGatewayForOnboarding:W}=await import(`./onboarding.gateway-config-y3pqsL9i.js`),G=await W({flow:y,baseConfig:h,nextConfig:M,localPort:x,quickstartGateway:b,secretInputMode:c.secretInputMode,prompter:f,runtime:d});M=G.nextConfig;let K=G.settings;if(c.skipChannels??c.skipProviders)await f.note(`Skipping channel setup.`,`Channels`);else{let{listChannelPlugins:e}=await import(`./plugins-CYLrFT4h.js`).then(e=>e.i),{setupChannels:t}=await import(`./onboard-channels-CjXCpXI-.js`).then(e=>e.n),n=y===`quickstart`?e().filter(e=>e.meta.quickstartAllowFrom).map(e=>e.id):[];M=await t(M,d,f,{allowSignalInstall:!0,forceAllowFromChannels:n,skipDmPolicyPrompt:y===`quickstart`,skipConfirm:y===`quickstart`,quickstartDefaults:y===`quickstart`,secretInputMode:c.secretInputMode})}await a(M);let{logConfigUpdated:q}=await import(`./logging-Dqe9dxSX.js`).then(e=>e.r);if(q(d),await p.ensureWorkspaceAndSessions(A,d,{skipBootstrap:!!M.agents?.defaults?.skipBootstrap}),c.skipSearch)await f.note(`Skipping search setup.`,`Search`);else{let{setupSearch:e}=await import(`./onboard-search-f2tJD4hg.js`);M=await e(M,d,f,{quickstartDefaults:y===`quickstart`,secretInputMode:c.secretInputMode})}if(c.skipSkills)await f.note(`Skipping skills setup.`,`Skills`);else{let{setupSkills:e}=await import(`./onboard-skills-CMSQc2Mm.js`).then(e=>e.t);M=await e(M,A,d,f)}let{setupInternalHooks:J}=await import(`./onboard-hooks-CERzXObm.js`);M=await J(M,d,f),M=p.applyWizardMetadata(M,{command:`onboard`,mode:k}),await a(M);let{finalizeOnboardingWizard:Y}=await import(`./onboarding.finalize-C9QGFQpa.js`),{launchedTui:X}=await Y({flow:y,opts:c,baseConfig:h,nextConfig:M,workspaceDir:A,settings:K,prompter:f,runtime:d})}export{d as t};
8
+ //# sourceMappingURL=onboarding-BTBbx6Ka.js.map
@@ -4,5 +4,5 @@ import{p as e}from"./subsystem-BLbY429l.js";import{n as t,u as n}from"./paths-Bj
4
4
  `),`QuickStart`)}let x=n(h),S=`ws://127.0.0.1:${x}`,C=process.env.OPENCLAW_GATEWAY_TOKEN??process.env.CLAWDBOT_GATEWAY_TOKEN;try{let e=await l({config:h,value:h.gateway?.auth?.token,path:`gateway.auth.token`,env:process.env});e&&(C=e)}catch(e){await f.note([`Could not resolve gateway.auth.token SecretRef for onboarding probe.`,e instanceof Error?e.message:String(e)].join(`
5
5
  `),`Gateway auth`)}let w=process.env.OPENCLAW_GATEWAY_PASSWORD??process.env.CLAWDBOT_GATEWAY_PASSWORD;try{let e=await l({config:h,value:h.gateway?.auth?.password,path:`gateway.auth.password`,env:process.env});e&&(w=e)}catch(e){await f.note([`Could not resolve gateway.auth.password SecretRef for onboarding probe.`,e instanceof Error?e.message:String(e)].join(`
6
6
  `),`Gateway auth`)}let T=await p.probeGatewayReachable({url:S,token:C,password:w}),E=h.gateway?.remote?.url?.trim()??``,D=s(h.gateway?.remote?.token);try{let e=await l({config:h,value:h.gateway?.remote?.token,path:`gateway.remote.token`,env:process.env});e&&(D=e)}catch(e){await f.note([`Could not resolve gateway.remote.token SecretRef for onboarding probe.`,e instanceof Error?e.message:String(e)].join(`
7
- `),`Gateway auth`)}let O=E?await p.probeGatewayReachable({url:E,token:D}):null,k=c.mode??(y===`quickstart`?`local`:await f.select({message:`What do you want to set up?`,options:[{value:`local`,label:`Local gateway (this machine)`,hint:T.ok?`Gateway reachable (${S})`:`No gateway detected (${S})`},{value:`remote`,label:`Remote gateway (info-only)`,hint:E?O?.ok?`Gateway reachable (${E})`:`Configured but unreachable (${E})`:`No remote URL configured yet`}]}));if(k===`remote`){let{promptRemoteGatewayConfig:e}=await import(`./onboard-remote-BOpIRdDu.js`).then(e=>e.t),{logConfigUpdated:t}=await import(`./logging-tYw1NbJd.js`).then(e=>e.r),n=await e(h,f,{secretInputMode:c.secretInputMode});n=p.applyWizardMetadata(n,{command:`onboard`,mode:k}),await r(n),t(d),await f.outro(`Remote gateway configured.`);return}let A=o((c.workspace??(y===`quickstart`?h.agents?.defaults?.workspace??p.DEFAULT_WORKSPACE:await f.text({message:`Workspace directory`,initialValue:h.agents?.defaults?.workspace??p.DEFAULT_WORKSPACE}))).trim()||p.DEFAULT_WORKSPACE),{applyOnboardingLocalWorkspaceConfig:j}=await import(`./onboard-config-B7U20YRw.js`).then(e=>e.n),M=j(h,A),{ensureAuthProfileStore:N}=await import(`./auth-profiles-T8DuH3ax.js`).then(e=>e.t),{promptAuthChoiceGrouped:P}=await import(`./auth-choice-prompt-uegl56cf.js`).then(e=>e.t),{promptCustomApiConfig:F}=await import(`./onboard-custom-Bl0y8c-g.js`).then(e=>e.r),{applyAuthChoice:I,resolvePreferredProviderForAuthChoice:L,warnIfModelConfigLooksOff:R}=await import(`./auth-choice-CYGzLW73.js`).then(e=>e.t),{applyPrimaryModel:z,promptDefaultModel:B}=await import(`./model-picker-D3ZSpr0i.js`).then(e=>e.i),V=N(void 0,{allowKeychainPrompt:!1}),H=c.authChoice===void 0,U=c.authChoice??await P({prompter:f,store:V,includeSkip:!0});if(U===`custom-api-key`)M=(await F({prompter:f,runtime:d,config:M,secretInputMode:c.secretInputMode})).config;else{let e=await I({authChoice:U,config:M,prompter:f,runtime:d,setDefaultModel:!(H&&U===`ollama`),opts:{tokenProvider:c.tokenProvider,token:c.authChoice===`apiKey`&&c.token?c.token:void 0}});M=e.config,e.agentModelOverride&&(M=z(M,e.agentModelOverride))}if(H&&U!==`custom-api-key`){let e=await B({config:M,prompter:f,allowKeep:!0,ignoreAllowlist:!0,includeVllm:!0,preferredProvider:L(U)});e.config&&(M=e.config),e.model&&(M=z(M,e.model))}if(U===`ollama`){let{ensureOllamaModelPulled:e}=await import(`./ollama-setup-BMEKWyIE.js`).then(e=>e.r);await e({config:M,prompter:f})}await R(M,f);let{configureGatewayForOnboarding:W}=await import(`./onboarding.gateway-config-BtLDJWJ2.js`),G=await W({flow:y,baseConfig:h,nextConfig:M,localPort:x,quickstartGateway:b,secretInputMode:c.secretInputMode,prompter:f,runtime:d});M=G.nextConfig;let K=G.settings;if(c.skipChannels??c.skipProviders)await f.note(`Skipping channel setup.`,`Channels`);else{let{listChannelPlugins:e}=await import(`./plugins-DNlgeTTc.js`).then(e=>e.i),{setupChannels:t}=await import(`./onboard-channels-BXReNh4B.js`).then(e=>e.n),n=y===`quickstart`?e().filter(e=>e.meta.quickstartAllowFrom).map(e=>e.id):[];M=await t(M,d,f,{allowSignalInstall:!0,forceAllowFromChannels:n,skipDmPolicyPrompt:y===`quickstart`,skipConfirm:y===`quickstart`,quickstartDefaults:y===`quickstart`,secretInputMode:c.secretInputMode})}await r(M);let{logConfigUpdated:q}=await import(`./logging-tYw1NbJd.js`).then(e=>e.r);if(q(d),await p.ensureWorkspaceAndSessions(A,d,{skipBootstrap:!!M.agents?.defaults?.skipBootstrap}),c.skipSearch)await f.note(`Skipping search setup.`,`Search`);else{let{setupSearch:e}=await import(`./onboard-search-fslKKhyg.js`);M=await e(M,d,f,{quickstartDefaults:y===`quickstart`,secretInputMode:c.secretInputMode})}if(c.skipSkills)await f.note(`Skipping skills setup.`,`Skills`);else{let{setupSkills:e}=await import(`./onboard-skills-BMAJs6ly.js`).then(e=>e.t);M=await e(M,A,d,f)}let{setupInternalHooks:J}=await import(`./onboard-hooks-gQ3sxBNi.js`);M=await J(M,d,f),M=p.applyWizardMetadata(M,{command:`onboard`,mode:k}),await r(M);let{finalizeOnboardingWizard:Y}=await import(`./onboarding.finalize-Bi53z1zE.js`),{launchedTui:X}=await Y({flow:y,opts:c,baseConfig:h,nextConfig:M,workspaceDir:A,settings:K,prompter:f,runtime:d})}export{d as t};
8
- //# sourceMappingURL=onboarding-BRewu6jg.js.map
7
+ `),`Gateway auth`)}let O=E?await p.probeGatewayReachable({url:E,token:D}):null,k=c.mode??(y===`quickstart`?`local`:await f.select({message:`What do you want to set up?`,options:[{value:`local`,label:`Local gateway (this machine)`,hint:T.ok?`Gateway reachable (${S})`:`No gateway detected (${S})`},{value:`remote`,label:`Remote gateway (info-only)`,hint:E?O?.ok?`Gateway reachable (${E})`:`Configured but unreachable (${E})`:`No remote URL configured yet`}]}));if(k===`remote`){let{promptRemoteGatewayConfig:e}=await import(`./onboard-remote-BOpIRdDu.js`).then(e=>e.t),{logConfigUpdated:t}=await import(`./logging-tYw1NbJd.js`).then(e=>e.r),n=await e(h,f,{secretInputMode:c.secretInputMode});n=p.applyWizardMetadata(n,{command:`onboard`,mode:k}),await r(n),t(d),await f.outro(`Remote gateway configured.`);return}let A=o((c.workspace??(y===`quickstart`?h.agents?.defaults?.workspace??p.DEFAULT_WORKSPACE:await f.text({message:`Workspace directory`,initialValue:h.agents?.defaults?.workspace??p.DEFAULT_WORKSPACE}))).trim()||p.DEFAULT_WORKSPACE),{applyOnboardingLocalWorkspaceConfig:j}=await import(`./onboard-config-B7U20YRw.js`).then(e=>e.n),M=j(h,A),{ensureAuthProfileStore:N}=await import(`./auth-profiles-T8DuH3ax.js`).then(e=>e.t),{promptAuthChoiceGrouped:P}=await import(`./auth-choice-prompt-uegl56cf.js`).then(e=>e.t),{promptCustomApiConfig:F}=await import(`./onboard-custom-Bl0y8c-g.js`).then(e=>e.r),{applyAuthChoice:I,resolvePreferredProviderForAuthChoice:L,warnIfModelConfigLooksOff:R}=await import(`./auth-choice-CYGzLW73.js`).then(e=>e.t),{applyPrimaryModel:z,promptDefaultModel:B}=await import(`./model-picker-D3ZSpr0i.js`).then(e=>e.i),V=N(void 0,{allowKeychainPrompt:!1}),H=c.authChoice===void 0,U=c.authChoice??await P({prompter:f,store:V,includeSkip:!0});if(U===`custom-api-key`)M=(await F({prompter:f,runtime:d,config:M,secretInputMode:c.secretInputMode})).config;else{let e=await I({authChoice:U,config:M,prompter:f,runtime:d,setDefaultModel:!(H&&U===`ollama`),opts:{tokenProvider:c.tokenProvider,token:c.authChoice===`apiKey`&&c.token?c.token:void 0}});M=e.config,e.agentModelOverride&&(M=z(M,e.agentModelOverride))}if(H&&U!==`custom-api-key`){let e=await B({config:M,prompter:f,allowKeep:!0,ignoreAllowlist:!0,includeVllm:!0,preferredProvider:L(U)});e.config&&(M=e.config),e.model&&(M=z(M,e.model))}if(U===`ollama`){let{ensureOllamaModelPulled:e}=await import(`./ollama-setup-BMEKWyIE.js`).then(e=>e.r);await e({config:M,prompter:f})}await R(M,f);let{configureGatewayForOnboarding:W}=await import(`./onboarding.gateway-config-BtLDJWJ2.js`),G=await W({flow:y,baseConfig:h,nextConfig:M,localPort:x,quickstartGateway:b,secretInputMode:c.secretInputMode,prompter:f,runtime:d});M=G.nextConfig;let K=G.settings;if(c.skipChannels??c.skipProviders)await f.note(`Skipping channel setup.`,`Channels`);else{let{listChannelPlugins:e}=await import(`./plugins-DNlgeTTc.js`).then(e=>e.i),{setupChannels:t}=await import(`./onboard-channels-BXReNh4B.js`).then(e=>e.n),n=y===`quickstart`?e().filter(e=>e.meta.quickstartAllowFrom).map(e=>e.id):[];M=await t(M,d,f,{allowSignalInstall:!0,forceAllowFromChannels:n,skipDmPolicyPrompt:y===`quickstart`,skipConfirm:y===`quickstart`,quickstartDefaults:y===`quickstart`,secretInputMode:c.secretInputMode})}await r(M);let{logConfigUpdated:q}=await import(`./logging-tYw1NbJd.js`).then(e=>e.r);if(q(d),await p.ensureWorkspaceAndSessions(A,d,{skipBootstrap:!!M.agents?.defaults?.skipBootstrap}),c.skipSearch)await f.note(`Skipping search setup.`,`Search`);else{let{setupSearch:e}=await import(`./onboard-search-fslKKhyg.js`);M=await e(M,d,f,{quickstartDefaults:y===`quickstart`,secretInputMode:c.secretInputMode})}if(c.skipSkills)await f.note(`Skipping skills setup.`,`Skills`);else{let{setupSkills:e}=await import(`./onboard-skills-BMAJs6ly.js`).then(e=>e.t);M=await e(M,A,d,f)}let{setupInternalHooks:J}=await import(`./onboard-hooks-gQ3sxBNi.js`);M=await J(M,d,f),M=p.applyWizardMetadata(M,{command:`onboard`,mode:k}),await r(M);let{finalizeOnboardingWizard:Y}=await import(`./onboarding.finalize-CwjLMPKK.js`),{launchedTui:X}=await Y({flow:y,opts:c,baseConfig:h,nextConfig:M,workspaceDir:A,settings:K,prompter:f,runtime:d})}export{d as t};
8
+ //# sourceMappingURL=onboarding-TkoOoq9D.js.map
@@ -1,4 +1,4 @@
1
- import"./paths-B4IRk3wi.js";import{m as e}from"./subsystem-C5XF2Fy5.js";import{h as t,y as n}from"./utils-UGOV_184.js";import"./model-selection-BlC_rXAN.js";import"./reply-CjyZeZ-j.js";import{y as r}from"./agent-scope-DXZc3eNT.js";import"./openclaw-root-D_0Q6--h.js";import"./github-copilot-token-DGYAlOmV.js";import{r as i,t as a}from"./command-format-BbDT1tlm.js";import"./boolean-Ch3DfXPy.js";import"./env-D7wNuBx1.js";import"./env-overrides-DXJbFrwI.js";import"./registry-hFAtCSWG.js";import"./skills-DHbOKEGc.js";import"./frontmatter-BkZkwkVO.js";import"./plugins-CYLrFT4h.js";import"./logger-Bl8URnrW.js";import"./exec-DHqLtFYt.js";import"./windows-spawn-AB7ItGAE.js";import"./redact-3_CiXMY6.js";import"./path-alias-guards-mvyLCPlN.js";import"./errors-Bunti32V.js";import"./send-Cgd_VJHR.js";import"./send-hZFDcGLM.js";import"./paths-yLEk_25I.js";import"./chat-envelope-HVpKusFc.js";import"./audio-transcription-runner-D4Bp6MM7.js";import"./image-DsoO5VP5.js";import"./models-config-CdMhNxKV.js";import"./tool-display-DjuSUUbH.js";import"./fetch-guard-DPdY0NXR.js";import"./api-key-rotation-BRt-vnRV.js";import"./local-roots-6waH0SZ0.js";import"./model-catalog-C1kpjR75.js";import"./proxy-fetch-BADsUK4d.js";import"./tokens-XGbQGn67.js";import"./deliver-ClBkV2eD.js";import"./commands-CGpM84iR.js";import"./commands-registry-B1x54ukc.js";import"./pairing-store-Cg2UxreQ.js";import"./fetch-Dikjvc5M.js";import"./call-CqoMqP5b.js";import"./with-timeout-WveKxvFV.js";import"./diagnostic-DOzHPnht.js";import"./send-B7sHR38c2.js";import"./pi-model-discovery-Dps1PPWz.js";import"./exec-approvals-allowlist-CE3nYh0K.js";import"./exec-safe-bin-runtime-policy-Dt0GchLp.js";import"./ir-Dk7OQ4bA.js";import"./render-D8OWO2hT.js";import"./target-errors-a35Md15n.js";import"./read-only-account-inspect-DBwAwB3_.js";import"./channel-selection-CbNtbAEf.js";import"./plugin-auto-enable-DpVL6-ES.js";import"./send-C-AP01PR.js";import"./outbound-attachment-B7wMxwj6.js";import"./delivery-queue-CKbauSFq.js";import"./send-DbeEC2a3.js";import"./channel-activity-YjYNzCpJ.js";import"./tables-Oieq7UbT.js";import"./fetch-Bn0mWg6a.js";import"./skill-commands-HJHHZqt6.js";import"./workspace-dirs-BhF1Dzxt.js";import"./pairing-token-BjYBuREl.js";import"./restart-CHXEHdSC.js";import"./runtime-web-tools-bz76ZaRc.js";import"./command-secret-targets-BVN3kiT9.js";import"./session-cost-usage-BgqKixv0.js";import"./connection-auth-C8iru0UB.js";import{b as o,f as s,g as c,i as l,m as u,o as d}from"./onboard-helpers-zwybUJWu.js";import"./prompt-style-CXKekIBY.js";import"./pairing-labels-BUU_-70B.js";import"./memory-cli-jhzJ3as7.js";import"./query-expansion-0OxEb1Io.js";import"./manager-M1GKhLUC.js";import"./links-CySwdMcF.js";import"./cli-utils-BY7dLMFy.js";import"./help-format-BRbF_INg.js";import"./progress-LNttnI-y.js";import"./exec-approvals-BpBNEy6i.js";import"./nodes-screen-DECgxo6A.js";import"./system-run-command-DEWnZE0r.js";import"./runtime-BC5Ep2pJ.js";import"./stagger-DmFYysrJ.js";import"./runtime-guard-DFYBaYZS.js";import"./program-context-BX9wN65q.js";import"./note-D4GAwgha.js";import{r as f}from"./completion-cli-DeGEpJri.js";import"./daemon-install-plan.shared-CfA37Ut_.js";import{n as p,r as m,t as h}from"./gateway-install-token-DiDvDPJQ.js";import{n as g,t as _}from"./daemon-runtime-DHiDbRuC.js";import{i as v}from"./systemd-D7odsu4K.js";import{n as y,t as b}from"./service-BtB9epJk.js";import{r as x}from"./health-RQzDNQwf.js";import{t as S}from"./control-ui-assets-BIa0GGDg.js";import{t as C}from"./onboarding.secret-input-kO5OzYC7.js";import{t as w}from"./health-format-VBr6LEpt.js";import{r as T,t as E}from"./doctor-completion-Bad_h3hm.js";import{t as D}from"./tui-CJUkUxHb.js";import O from"node:os";import k from"node:path";import A from"node:fs/promises";async function j(e){let n=process.env.HOME||O.homedir();return e===`zsh`?`~/.zshrc`:e===`bash`?await t(k.join(n,`.bashrc`))?`~/.bashrc`:`~/.bash_profile`:e===`fish`?`~/.config/fish/config.fish`:`$PROFILE`}function M(e,t){return e===`powershell`?`Restart your shell (or reload your PowerShell profile).`:`Restart your shell or run: source ${t}`}async function N(e){let t={resolveCliName:i,checkShellCompletionStatus:E,ensureCompletionCacheExists:T,installCompletion:f,...e.deps},n=t.resolveCliName(),r=await t.checkShellCompletionStatus(n);if(r.usesSlowPattern){await t.ensureCompletionCacheExists(n)&&await t.installCompletion(r.shell,!0,n);return}if(r.profileInstalled&&!r.cacheExists){await t.ensureCompletionCacheExists(n);return}if(!r.profileInstalled){if(!(e.flow===`quickstart`||await e.prompter.confirm({message:`Enable ${r.shell} shell completion for ${n}?`,initialValue:!0})))return;if(!await t.ensureCompletionCacheExists(n)){await e.prompter.note(`Failed to generate completion cache. Run \`${n} completion --install\` later.`,`Shell completion`);return}await t.installCompletion(r.shell,!0,n);let i=await j(r.shell);await e.prompter.note(`Shell completion installed. ${M(r.shell,i)}`,`Shell completion`)}}async function P(t){let{flow:i,opts:f,baseConfig:T,nextConfig:E,settings:O,prompter:j,runtime:M}=t,P=async(e,t,n)=>{let r=j.progress(e);try{return await n(r)}finally{r.stop(typeof t.doneMessage==`function`?t.doneMessage():t.doneMessage)}},F=process.platform===`linux`?await v():!0;if(process.platform===`linux`&&!F&&await j.note(`Systemd user services are unavailable. Skipping lingering checks and service install.`,`Systemd`),process.platform===`linux`&&F){let{ensureSystemdUserLingerInteractive:e}=await import(`./systemd-linger-C2MJD6KG.js`).then(e=>e.r);await e({runtime:M,prompter:{confirm:j.confirm,note:j.note},reason:`Linux installs use a systemd user service by default. Without lingering, systemd stops the user session on logout/idle and kills the Gateway.`,requireConfirm:!1})}let I=typeof f.installDaemon==`boolean`?f.installDaemon:void 0,L;if(L=I===void 0?process.platform===`linux`&&!F?!1:i===`quickstart`?!0:await j.confirm({message:`Install Gateway service (recommended)`,initialValue:!0}):I,process.platform===`linux`&&!F&&L&&(await j.note("Systemd user services are unavailable; skipping service install. Use your container supervisor or `docker compose up -d`.",`Gateway service`),L=!1),L){let e=i===`quickstart`?_:await j.select({message:`Gateway service runtime`,options:g,initialValue:f.daemonRuntime??`node`});i===`quickstart`&&await j.note(`QuickStart uses Node for the Gateway service (stable + supported).`,`Gateway service runtime`);let t=y(),n=await t.isLoaded({env:process.env}),r=!1;if(n){let e=await j.select({message:`Gateway service already installed`,options:[{value:`restart`,label:`Restart`},{value:`reinstall`,label:`Reinstall`},{value:`skip`,label:`Skip`}]});if(e===`restart`){let e=`Gateway service restarted.`;await P(`Gateway service`,{doneMessage:()=>e},async n=>{n.update(`Restarting Gateway service…`);let i=b(`Gateway`,await t.restart({env:process.env,stdout:process.stdout}));e=i.progressMessage,r=i.scheduled})}else e===`reinstall`&&await P(`Gateway service`,{doneMessage:`Gateway service uninstalled.`},async e=>{e.update(`Uninstalling Gateway service…`),await t.uninstall({env:process.env,stdout:process.stdout})})}if(!n||!r&&n&&!await t.isLoaded({env:process.env})){let n=j.progress(`Gateway service`),r=null;try{n.update(`Preparing Gateway service…`);let i=await h({config:E,env:process.env});for(let e of i.warnings)await j.note(e,`Gateway service`);if(i.unavailableReason)r=[`Gateway install blocked:`,i.unavailableReason,`Fix gateway auth config/token input and rerun onboarding.`].join(` `);else{let{programArguments:r,workingDirectory:i,environment:a}=await p({env:process.env,port:O.port,runtime:e,warn:(e,t)=>j.note(e,t),config:E});n.update(`Installing Gateway service…`),await t.install({env:process.env,stdout:process.stdout,programArguments:r,workingDirectory:i,environment:a})}}catch(e){r=e instanceof Error?e.message:String(e)}finally{n.stop(r?`Gateway service install failed.`:`Gateway service installed.`)}r&&(await j.note(`Gateway service install failed: ${r}`,`Gateway`),await j.note(m(),`Gateway`))}}if(!f.skipHealth){await o({url:c({bind:E.gateway?.bind??`loopback`,port:O.port,customBindHost:E.gateway?.customBindHost,basePath:void 0}).wsUrl,token:O.gatewayToken,deadlineMs:15e3});try{await x({json:!1,timeoutMs:1e4},M)}catch(e){M.error(w(e)),await j.note([`Docs:`,`https://docs.openclaw.ai/gateway/health`,`https://docs.openclaw.ai/gateway/troubleshooting`].join(`
1
+ import"./paths-B4IRk3wi.js";import{m as e}from"./subsystem-C5XF2Fy5.js";import{h as t,y as n}from"./utils-UGOV_184.js";import"./model-selection-BlC_rXAN.js";import"./reply-CjyZeZ-j.js";import{y as r}from"./agent-scope-DXZc3eNT.js";import"./openclaw-root-D_0Q6--h.js";import"./github-copilot-token-DGYAlOmV.js";import{r as i,t as a}from"./command-format-BbDT1tlm.js";import"./boolean-Ch3DfXPy.js";import"./env-D7wNuBx1.js";import"./env-overrides-DXJbFrwI.js";import"./registry-hFAtCSWG.js";import"./skills-DHbOKEGc.js";import"./frontmatter-BkZkwkVO.js";import"./plugins-CYLrFT4h.js";import"./logger-Bl8URnrW.js";import"./exec-DHqLtFYt.js";import"./windows-spawn-AB7ItGAE.js";import"./redact-3_CiXMY6.js";import"./path-alias-guards-mvyLCPlN.js";import"./errors-Bunti32V.js";import"./send-Cgd_VJHR.js";import"./send-hZFDcGLM.js";import"./paths-yLEk_25I.js";import"./chat-envelope-HVpKusFc.js";import"./audio-transcription-runner-D4Bp6MM7.js";import"./image-DsoO5VP5.js";import"./models-config-CdMhNxKV.js";import"./tool-display-DjuSUUbH.js";import"./fetch-guard-DPdY0NXR.js";import"./api-key-rotation-BRt-vnRV.js";import"./local-roots-6waH0SZ0.js";import"./model-catalog-C1kpjR75.js";import"./proxy-fetch-BADsUK4d.js";import"./tokens-XGbQGn67.js";import"./deliver-ClBkV2eD.js";import"./commands-CGpM84iR.js";import"./commands-registry-B1x54ukc.js";import"./pairing-store-Cg2UxreQ.js";import"./fetch-Dikjvc5M.js";import"./call-CqoMqP5b.js";import"./with-timeout-WveKxvFV.js";import"./diagnostic-DOzHPnht.js";import"./send-B7sHR38c2.js";import"./pi-model-discovery-Dps1PPWz.js";import"./exec-approvals-allowlist-CE3nYh0K.js";import"./exec-safe-bin-runtime-policy-Dt0GchLp.js";import"./ir-Dk7OQ4bA.js";import"./render-D8OWO2hT.js";import"./target-errors-a35Md15n.js";import"./read-only-account-inspect-DBwAwB3_.js";import"./channel-selection-CbNtbAEf.js";import"./plugin-auto-enable-DpVL6-ES.js";import"./send-C-AP01PR.js";import"./outbound-attachment-B7wMxwj6.js";import"./delivery-queue-CKbauSFq.js";import"./send-DbeEC2a3.js";import"./channel-activity-YjYNzCpJ.js";import"./tables-Oieq7UbT.js";import"./fetch-Bn0mWg6a.js";import"./skill-commands-HJHHZqt6.js";import"./workspace-dirs-BhF1Dzxt.js";import"./pairing-token-BjYBuREl.js";import"./restart-CHXEHdSC.js";import"./runtime-web-tools-bz76ZaRc.js";import"./command-secret-targets-BVN3kiT9.js";import"./session-cost-usage-BgqKixv0.js";import"./connection-auth-C8iru0UB.js";import{b as o,f as s,g as c,i as l,m as u,o as d}from"./onboard-helpers-zwybUJWu.js";import"./prompt-style-CXKekIBY.js";import"./pairing-labels-BUU_-70B.js";import"./memory-cli-jhzJ3as7.js";import"./query-expansion-0OxEb1Io.js";import"./manager-M1GKhLUC.js";import"./links-CySwdMcF.js";import"./cli-utils-BY7dLMFy.js";import"./help-format-BRbF_INg.js";import"./progress-LNttnI-y.js";import"./exec-approvals-BpBNEy6i.js";import"./nodes-screen-DECgxo6A.js";import"./system-run-command-DEWnZE0r.js";import"./runtime-BC5Ep2pJ.js";import"./stagger-DmFYysrJ.js";import"./runtime-guard-DFYBaYZS.js";import"./program-context-lyPXjPfN.js";import"./note-D4GAwgha.js";import{r as f}from"./completion-cli-Bizog38J.js";import"./daemon-install-plan.shared-CfA37Ut_.js";import{n as p,r as m,t as h}from"./gateway-install-token-DiDvDPJQ.js";import{n as g,t as _}from"./daemon-runtime-DHiDbRuC.js";import{i as v}from"./systemd-D7odsu4K.js";import{n as y,t as b}from"./service-BtB9epJk.js";import{r as x}from"./health-RQzDNQwf.js";import{t as S}from"./control-ui-assets-BIa0GGDg.js";import{t as C}from"./onboarding.secret-input-kO5OzYC7.js";import{t as w}from"./health-format-VBr6LEpt.js";import{r as T,t as E}from"./doctor-completion-Da0cocZX.js";import{t as D}from"./tui-CJUkUxHb.js";import O from"node:os";import k from"node:path";import A from"node:fs/promises";async function j(e){let n=process.env.HOME||O.homedir();return e===`zsh`?`~/.zshrc`:e===`bash`?await t(k.join(n,`.bashrc`))?`~/.bashrc`:`~/.bash_profile`:e===`fish`?`~/.config/fish/config.fish`:`$PROFILE`}function M(e,t){return e===`powershell`?`Restart your shell (or reload your PowerShell profile).`:`Restart your shell or run: source ${t}`}async function N(e){let t={resolveCliName:i,checkShellCompletionStatus:E,ensureCompletionCacheExists:T,installCompletion:f,...e.deps},n=t.resolveCliName(),r=await t.checkShellCompletionStatus(n);if(r.usesSlowPattern){await t.ensureCompletionCacheExists(n)&&await t.installCompletion(r.shell,!0,n);return}if(r.profileInstalled&&!r.cacheExists){await t.ensureCompletionCacheExists(n);return}if(!r.profileInstalled){if(!(e.flow===`quickstart`||await e.prompter.confirm({message:`Enable ${r.shell} shell completion for ${n}?`,initialValue:!0})))return;if(!await t.ensureCompletionCacheExists(n)){await e.prompter.note(`Failed to generate completion cache. Run \`${n} completion --install\` later.`,`Shell completion`);return}await t.installCompletion(r.shell,!0,n);let i=await j(r.shell);await e.prompter.note(`Shell completion installed. ${M(r.shell,i)}`,`Shell completion`)}}async function P(t){let{flow:i,opts:f,baseConfig:T,nextConfig:E,settings:O,prompter:j,runtime:M}=t,P=async(e,t,n)=>{let r=j.progress(e);try{return await n(r)}finally{r.stop(typeof t.doneMessage==`function`?t.doneMessage():t.doneMessage)}},F=process.platform===`linux`?await v():!0;if(process.platform===`linux`&&!F&&await j.note(`Systemd user services are unavailable. Skipping lingering checks and service install.`,`Systemd`),process.platform===`linux`&&F){let{ensureSystemdUserLingerInteractive:e}=await import(`./systemd-linger-C2MJD6KG.js`).then(e=>e.r);await e({runtime:M,prompter:{confirm:j.confirm,note:j.note},reason:`Linux installs use a systemd user service by default. Without lingering, systemd stops the user session on logout/idle and kills the Gateway.`,requireConfirm:!1})}let I=typeof f.installDaemon==`boolean`?f.installDaemon:void 0,L;if(L=I===void 0?process.platform===`linux`&&!F?!1:i===`quickstart`?!0:await j.confirm({message:`Install Gateway service (recommended)`,initialValue:!0}):I,process.platform===`linux`&&!F&&L&&(await j.note("Systemd user services are unavailable; skipping service install. Use your container supervisor or `docker compose up -d`.",`Gateway service`),L=!1),L){let e=i===`quickstart`?_:await j.select({message:`Gateway service runtime`,options:g,initialValue:f.daemonRuntime??`node`});i===`quickstart`&&await j.note(`QuickStart uses Node for the Gateway service (stable + supported).`,`Gateway service runtime`);let t=y(),n=await t.isLoaded({env:process.env}),r=!1;if(n){let e=await j.select({message:`Gateway service already installed`,options:[{value:`restart`,label:`Restart`},{value:`reinstall`,label:`Reinstall`},{value:`skip`,label:`Skip`}]});if(e===`restart`){let e=`Gateway service restarted.`;await P(`Gateway service`,{doneMessage:()=>e},async n=>{n.update(`Restarting Gateway service…`);let i=b(`Gateway`,await t.restart({env:process.env,stdout:process.stdout}));e=i.progressMessage,r=i.scheduled})}else e===`reinstall`&&await P(`Gateway service`,{doneMessage:`Gateway service uninstalled.`},async e=>{e.update(`Uninstalling Gateway service…`),await t.uninstall({env:process.env,stdout:process.stdout})})}if(!n||!r&&n&&!await t.isLoaded({env:process.env})){let n=j.progress(`Gateway service`),r=null;try{n.update(`Preparing Gateway service…`);let i=await h({config:E,env:process.env});for(let e of i.warnings)await j.note(e,`Gateway service`);if(i.unavailableReason)r=[`Gateway install blocked:`,i.unavailableReason,`Fix gateway auth config/token input and rerun onboarding.`].join(` `);else{let{programArguments:r,workingDirectory:i,environment:a}=await p({env:process.env,port:O.port,runtime:e,warn:(e,t)=>j.note(e,t),config:E});n.update(`Installing Gateway service…`),await t.install({env:process.env,stdout:process.stdout,programArguments:r,workingDirectory:i,environment:a})}}catch(e){r=e instanceof Error?e.message:String(e)}finally{n.stop(r?`Gateway service install failed.`:`Gateway service installed.`)}r&&(await j.note(`Gateway service install failed: ${r}`,`Gateway`),await j.note(m(),`Gateway`))}}if(!f.skipHealth){await o({url:c({bind:E.gateway?.bind??`loopback`,port:O.port,customBindHost:E.gateway?.customBindHost,basePath:void 0}).wsUrl,token:O.gatewayToken,deadlineMs:15e3});try{await x({json:!1,timeoutMs:1e4},M)}catch(e){M.error(w(e)),await j.note([`Docs:`,`https://docs.openclaw.ai/gateway/health`,`https://docs.openclaw.ai/gateway/troubleshooting`].join(`
2
2
  `),`Health check help`)}}let R=E.gateway?.controlUi?.enabled??T.gateway?.controlUi?.enabled??!0;if(!f.skipUi&&R){let e=await S(M);!e.ok&&e.message&&M.error(e.message)}await j.note([`Add nodes for extra features:`,`- macOS app (system + notifications)`,`- iOS app (camera/canvas)`,`- Android app (camera/canvas)`].join(`
3
3
  `),`Optional apps`);let z=E.gateway?.controlUi?.basePath??T.gateway?.controlUi?.basePath,B=c({bind:O.bind,port:O.port,customBindHost:O.customBindHost,basePath:z}),V=O.authMode===`token`&&O.gatewayToken?`${B.httpUrl}#token=${encodeURIComponent(O.gatewayToken)}`:B.httpUrl,H=``;if(O.authMode===`password`)try{H=await C({config:E,value:E.gateway?.auth?.password,path:`gateway.auth.password`,env:process.env})??``}catch(e){await j.note([`Could not resolve gateway.auth.password SecretRef for onboarding auth.`,e instanceof Error?e.message:String(e)].join(`
4
4
  `),`Gateway auth`)}let U=await u({url:B.wsUrl,token:O.authMode===`token`?O.gatewayToken:void 0,password:O.authMode===`password`?H:``}),W=U.ok?`Gateway: reachable`:`Gateway: not detected${U.detail?` (${U.detail})`:``}`,G=k.join(n(t.workspaceDir),r),K=await A.access(G).then(()=>!0).catch(()=>!1);await j.note([`Web UI: ${B.httpUrl}`,O.authMode===`token`&&O.gatewayToken?`Web UI (with token): ${V}`:void 0,`Gateway WS: ${B.wsUrl}`,W,`Docs: https://docs.openclaw.ai/web/control-ui`].filter(Boolean).join(`
@@ -13,4 +13,4 @@ import"./paths-B4IRk3wi.js";import{m as e}from"./subsystem-C5XF2Fy5.js";import{h
13
13
  `),`Web search`)}else{let{SEARCH_PROVIDER_OPTIONS:e,hasExistingKey:t,hasKeyInEnv:n}=await import(`./onboard-search-f2tJD4hg.js`),r=e.find(e=>t(E,e.value)||n(e));r?await j.note([`Web search is available via ${r.label} (auto-detected).`,`Docs: https://docs.openclaw.ai/tools/web`].join(`
14
14
  `),`Web search`):await j.note([`Web search was skipped. You can enable it later:`,` ${a(`openclaw configure --section web`)}`,``,`Docs: https://docs.openclaw.ai/tools/web`].join(`
15
15
  `),`Web search`)}return await j.note(`What now: https://openclaw.ai/showcase ("What People Are Building").`,`What now`),await j.outro(q?`Onboarding complete. Dashboard opened; keep that tab to control OpenClaw.`:`Onboarding complete. Use the dashboard link above to control OpenClaw.`),{launchedTui:X}}export{P as finalizeOnboardingWizard};
16
- //# sourceMappingURL=onboarding.finalize-Bp8ST2z_.js.map
16
+ //# sourceMappingURL=onboarding.finalize-C9QGFQpa.js.map
@@ -1,4 +1,4 @@
1
- import{m as e}from"./subsystem-BLbY429l.js";import"./paths-BjD3T_xq.js";import"./boolean-D15s2V33.js";import"./auth-profiles-T8DuH3ax.js";import{r as t,t as n}from"./command-format-CLxIPuLR.js";import{y as r}from"./agent-scope-DAWJwFfl.js";import{m as i,v as a}from"./utils-CGdo13HV.js";import"./openclaw-root-CnsBf6ZU.js";import"./github-copilot-token-C79yeDKS.js";import"./env-overrides-DHtB4kK3.js";import"./version-q3SkUw2K.js";import"./registry-BptzrW8D.js";import"./skills-CKTicUKS.js";import"./frontmatter-C7mzDNxd.js";import"./plugins-DNlgeTTc.js";import"./logger-kQAOe3qp.js";import"./exec-B3eleY5O.js";import"./windows-spawn-7oINn5ao.js";import"./redact-CnRxK70G.js";import"./path-alias-guards-kY_ZbWs-.js";import"./errors-6SQWM9dj.js";import"./send-CW81y5Wz.js";import"./send-DavpkzhH.js";import"./compact-BEeB6bwq.js";import"./paths-BfjJY2VL.js";import"./chat-envelope-Bznn2SoS.js";import"./models-config-_htt7eY5.js";import"./tokens-DRM8vzJx.js";import"./with-timeout-c1CzdShT.js";import"./deliver-BHuhHfkH.js";import"./diagnostic-DQq4Bwrs.js";import"./send-DkiKKUkt.js";import"./pi-model-discovery-CpjYoBQf.js";import"./exec-approvals-allowlist-D8mN7nxV.js";import"./exec-safe-bin-runtime-policy-dcCS_Adf.js";import"./model-catalog-COVzoZD9.js";import"./fetch-CQaNr5J1.js";import"./audio-transcription-runner-Bd1OZC6K.js";import"./fetch-guard-BrTtJw7h.js";import"./image-BkWwI54C.js";import"./tool-display-DJDtttQg.js";import"./api-key-rotation-D0QU-kQ9.js";import"./proxy-fetch-gWETR3cl.js";import"./ir-D8Hh84ab.js";import"./render-DrrPmnMI.js";import"./target-errors-CgWAJOam.js";import"./commands-Dy7duWlt.js";import"./commands-registry-Cpl4QnG4.js";import"./session-cost-usage-CHtVgnE8.js";import"./session-utils-8acNlxwP.js";import"./sqlite-CILF3z9U.js";import"./call-B8Fb4_oh.js";import"./pi-tools.policy-D40r0HmD.js";import"./pairing-store-BH-FTYkn.js";import"./fetch-Dh-apy46.js";import"./skill-commands-CSF6wVPU.js";import"./workspace-dirs-A8Vib9_B.js";import"./pairing-token-DAR7V7FJ.js";import"./channel-activity-BBrgoad1.js";import"./tables-Brc2lNcB.js";import"./kill-tree-B3g7HrAO.js";import"./runtime-web-tools-D8fms06-.js";import"./runtime-Dlg2-Omq.js";import"./node-shell-DyOfwHrh.js";import"./stagger-DxzgG2jd.js";import"./channel-selection-BBeE1TmB.js";import"./plugin-auto-enable-NzmNh4oU.js";import"./send-CVplsJpw.js";import"./outbound-attachment-BgAe99RM.js";import"./delivery-queue-nkPJu0fY.js";import"./send-C48Y9SAq.js";import"./system-run-command-BKfMiqQM.js";import"./fetch-Ce-scEU-.js";import"./command-secret-targets-BlN-J_fA.js";import"./connection-auth-B_Uk6Vk8.js";import{b as o,f as s,g as c,i as l,m as u,o as d}from"./onboard-helpers-PGl5bVPE.js";import"./prompt-style-BThRSQJR.js";import"./pairing-labels-D-kzQEL2.js";import"./search-manager-Bp9x20r6.js";import"./manager-C2YW7Hkq.js";import"./memory-cli-XaxtBQm1.js";import"./links-CBnmRP9D.js";import"./cli-utils-BleB1eys.js";import"./help-format-B4aEI7V9.js";import"./progress-d1m2sqR1.js";import"./exec-approvals-BXO9Cezj.js";import"./note-Dp-d_utk.js";import{r as f}from"./completion-cli-C4_SZmjl.js";import"./register.subclis-smZuHVcv.js";import"./command-registry-CPthpEk3.js";import"./program-context-CH9p6anW.js";import"./daemon-install-plan.shared-Dx3DBXCG.js";import"./runtime-guard-DX2Ie4ri.js";import{n as p,r as m,t as h}from"./gateway-install-token-BCnuZeh1.js";import{n as g,t as _}from"./daemon-runtime-VcpeBRJV.js";import{i as v}from"./systemd-DbevZh65.js";import{n as y,t as b}from"./service-DZ9EbS15.js";import{r as x}from"./health-DBu0V1Y-.js";import{t as S}from"./control-ui-assets-CTHGGgaX.js";import{t as C}from"./onboarding.secret-input-BsBgh8Tc.js";import{t as w}from"./health-format-B1nj3Wfn.js";import{r as T,t as E}from"./doctor-completion-APZJ17BJ.js";import{t as D}from"./tui-B506apla.js";import O from"node:os";import k from"node:path";import A from"node:fs/promises";async function j(e){let t=process.env.HOME||O.homedir();return e===`zsh`?`~/.zshrc`:e===`bash`?await i(k.join(t,`.bashrc`))?`~/.bashrc`:`~/.bash_profile`:e===`fish`?`~/.config/fish/config.fish`:`$PROFILE`}function M(e,t){return e===`powershell`?`Restart your shell (or reload your PowerShell profile).`:`Restart your shell or run: source ${t}`}async function N(e){let n={resolveCliName:t,checkShellCompletionStatus:E,ensureCompletionCacheExists:T,installCompletion:f,...e.deps},r=n.resolveCliName(),i=await n.checkShellCompletionStatus(r);if(i.usesSlowPattern){await n.ensureCompletionCacheExists(r)&&await n.installCompletion(i.shell,!0,r);return}if(i.profileInstalled&&!i.cacheExists){await n.ensureCompletionCacheExists(r);return}if(!i.profileInstalled){if(!(e.flow===`quickstart`||await e.prompter.confirm({message:`Enable ${i.shell} shell completion for ${r}?`,initialValue:!0})))return;if(!await n.ensureCompletionCacheExists(r)){await e.prompter.note(`Failed to generate completion cache. Run \`${r} completion --install\` later.`,`Shell completion`);return}await n.installCompletion(i.shell,!0,r);let t=await j(i.shell);await e.prompter.note(`Shell completion installed. ${M(i.shell,t)}`,`Shell completion`)}}async function P(t){let{flow:i,opts:f,baseConfig:T,nextConfig:E,settings:O,prompter:j,runtime:M}=t,P=async(e,t,n)=>{let r=j.progress(e);try{return await n(r)}finally{r.stop(typeof t.doneMessage==`function`?t.doneMessage():t.doneMessage)}},F=process.platform===`linux`?await v():!0;if(process.platform===`linux`&&!F&&await j.note(`Systemd user services are unavailable. Skipping lingering checks and service install.`,`Systemd`),process.platform===`linux`&&F){let{ensureSystemdUserLingerInteractive:e}=await import(`./systemd-linger-cWKbFNpu.js`).then(e=>e.r);await e({runtime:M,prompter:{confirm:j.confirm,note:j.note},reason:`Linux installs use a systemd user service by default. Without lingering, systemd stops the user session on logout/idle and kills the Gateway.`,requireConfirm:!1})}let I=typeof f.installDaemon==`boolean`?f.installDaemon:void 0,L;if(L=I===void 0?process.platform===`linux`&&!F?!1:i===`quickstart`?!0:await j.confirm({message:`Install Gateway service (recommended)`,initialValue:!0}):I,process.platform===`linux`&&!F&&L&&(await j.note("Systemd user services are unavailable; skipping service install. Use your container supervisor or `docker compose up -d`.",`Gateway service`),L=!1),L){let e=i===`quickstart`?_:await j.select({message:`Gateway service runtime`,options:g,initialValue:f.daemonRuntime??`node`});i===`quickstart`&&await j.note(`QuickStart uses Node for the Gateway service (stable + supported).`,`Gateway service runtime`);let t=y(),n=await t.isLoaded({env:process.env}),r=!1;if(n){let e=await j.select({message:`Gateway service already installed`,options:[{value:`restart`,label:`Restart`},{value:`reinstall`,label:`Reinstall`},{value:`skip`,label:`Skip`}]});if(e===`restart`){let e=`Gateway service restarted.`;await P(`Gateway service`,{doneMessage:()=>e},async n=>{n.update(`Restarting Gateway service…`);let i=b(`Gateway`,await t.restart({env:process.env,stdout:process.stdout}));e=i.progressMessage,r=i.scheduled})}else e===`reinstall`&&await P(`Gateway service`,{doneMessage:`Gateway service uninstalled.`},async e=>{e.update(`Uninstalling Gateway service…`),await t.uninstall({env:process.env,stdout:process.stdout})})}if(!n||!r&&n&&!await t.isLoaded({env:process.env})){let n=j.progress(`Gateway service`),r=null;try{n.update(`Preparing Gateway service…`);let i=await h({config:E,env:process.env});for(let e of i.warnings)await j.note(e,`Gateway service`);if(i.unavailableReason)r=[`Gateway install blocked:`,i.unavailableReason,`Fix gateway auth config/token input and rerun onboarding.`].join(` `);else{let{programArguments:r,workingDirectory:i,environment:a}=await p({env:process.env,port:O.port,runtime:e,warn:(e,t)=>j.note(e,t),config:E});n.update(`Installing Gateway service…`),await t.install({env:process.env,stdout:process.stdout,programArguments:r,workingDirectory:i,environment:a})}}catch(e){r=e instanceof Error?e.message:String(e)}finally{n.stop(r?`Gateway service install failed.`:`Gateway service installed.`)}r&&(await j.note(`Gateway service install failed: ${r}`,`Gateway`),await j.note(m(),`Gateway`))}}if(!f.skipHealth){await o({url:c({bind:E.gateway?.bind??`loopback`,port:O.port,customBindHost:E.gateway?.customBindHost,basePath:void 0}).wsUrl,token:O.gatewayToken,deadlineMs:15e3});try{await x({json:!1,timeoutMs:1e4},M)}catch(e){M.error(w(e)),await j.note([`Docs:`,`https://docs.openclaw.ai/gateway/health`,`https://docs.openclaw.ai/gateway/troubleshooting`].join(`
1
+ import{m as e}from"./subsystem-BLbY429l.js";import"./paths-BjD3T_xq.js";import"./boolean-D15s2V33.js";import"./auth-profiles-T8DuH3ax.js";import{r as t,t as n}from"./command-format-CLxIPuLR.js";import{y as r}from"./agent-scope-DAWJwFfl.js";import{m as i,v as a}from"./utils-CGdo13HV.js";import"./openclaw-root-CnsBf6ZU.js";import"./github-copilot-token-C79yeDKS.js";import"./env-overrides-DHtB4kK3.js";import"./version-q3SkUw2K.js";import"./registry-BptzrW8D.js";import"./skills-CKTicUKS.js";import"./frontmatter-C7mzDNxd.js";import"./plugins-DNlgeTTc.js";import"./logger-kQAOe3qp.js";import"./exec-B3eleY5O.js";import"./windows-spawn-7oINn5ao.js";import"./redact-CnRxK70G.js";import"./path-alias-guards-kY_ZbWs-.js";import"./errors-6SQWM9dj.js";import"./send-CW81y5Wz.js";import"./send-DavpkzhH.js";import"./compact-BEeB6bwq.js";import"./paths-BfjJY2VL.js";import"./chat-envelope-Bznn2SoS.js";import"./models-config-_htt7eY5.js";import"./tokens-DRM8vzJx.js";import"./with-timeout-c1CzdShT.js";import"./deliver-BHuhHfkH.js";import"./diagnostic-DQq4Bwrs.js";import"./send-DkiKKUkt.js";import"./pi-model-discovery-CpjYoBQf.js";import"./exec-approvals-allowlist-D8mN7nxV.js";import"./exec-safe-bin-runtime-policy-dcCS_Adf.js";import"./model-catalog-COVzoZD9.js";import"./fetch-CQaNr5J1.js";import"./audio-transcription-runner-Bd1OZC6K.js";import"./fetch-guard-BrTtJw7h.js";import"./image-BkWwI54C.js";import"./tool-display-DJDtttQg.js";import"./api-key-rotation-D0QU-kQ9.js";import"./proxy-fetch-gWETR3cl.js";import"./ir-D8Hh84ab.js";import"./render-DrrPmnMI.js";import"./target-errors-CgWAJOam.js";import"./commands-Dy7duWlt.js";import"./commands-registry-Cpl4QnG4.js";import"./session-cost-usage-CHtVgnE8.js";import"./session-utils-8acNlxwP.js";import"./sqlite-CILF3z9U.js";import"./call-B8Fb4_oh.js";import"./pi-tools.policy-D40r0HmD.js";import"./pairing-store-BH-FTYkn.js";import"./fetch-Dh-apy46.js";import"./skill-commands-CSF6wVPU.js";import"./workspace-dirs-A8Vib9_B.js";import"./pairing-token-DAR7V7FJ.js";import"./channel-activity-BBrgoad1.js";import"./tables-Brc2lNcB.js";import"./kill-tree-B3g7HrAO.js";import"./runtime-web-tools-D8fms06-.js";import"./runtime-Dlg2-Omq.js";import"./node-shell-DyOfwHrh.js";import"./stagger-DxzgG2jd.js";import"./channel-selection-BBeE1TmB.js";import"./plugin-auto-enable-NzmNh4oU.js";import"./send-CVplsJpw.js";import"./outbound-attachment-BgAe99RM.js";import"./delivery-queue-nkPJu0fY.js";import"./send-C48Y9SAq.js";import"./system-run-command-BKfMiqQM.js";import"./fetch-Ce-scEU-.js";import"./command-secret-targets-BlN-J_fA.js";import"./connection-auth-B_Uk6Vk8.js";import{b as o,f as s,g as c,i as l,m as u,o as d}from"./onboard-helpers-PGl5bVPE.js";import"./prompt-style-BThRSQJR.js";import"./pairing-labels-D-kzQEL2.js";import"./search-manager-Bp9x20r6.js";import"./manager-C2YW7Hkq.js";import"./memory-cli-XaxtBQm1.js";import"./links-CBnmRP9D.js";import"./cli-utils-BleB1eys.js";import"./help-format-B4aEI7V9.js";import"./progress-d1m2sqR1.js";import"./exec-approvals-BXO9Cezj.js";import"./note-Dp-d_utk.js";import{r as f}from"./completion-cli-W1_FoDFF.js";import"./register.subclis-B_0ZS-_K.js";import"./command-registry-CSBvrqwW.js";import"./program-context-CH9p6anW.js";import"./daemon-install-plan.shared-Dx3DBXCG.js";import"./runtime-guard-DX2Ie4ri.js";import{n as p,r as m,t as h}from"./gateway-install-token-BCnuZeh1.js";import{n as g,t as _}from"./daemon-runtime-VcpeBRJV.js";import{i as v}from"./systemd-DbevZh65.js";import{n as y,t as b}from"./service-DZ9EbS15.js";import{r as x}from"./health-DBu0V1Y-.js";import{t as S}from"./control-ui-assets-CTHGGgaX.js";import{t as C}from"./onboarding.secret-input-BsBgh8Tc.js";import{t as w}from"./health-format-B1nj3Wfn.js";import{r as T,t as E}from"./doctor-completion-DpCWb88H.js";import{t as D}from"./tui-B506apla.js";import O from"node:os";import k from"node:path";import A from"node:fs/promises";async function j(e){let t=process.env.HOME||O.homedir();return e===`zsh`?`~/.zshrc`:e===`bash`?await i(k.join(t,`.bashrc`))?`~/.bashrc`:`~/.bash_profile`:e===`fish`?`~/.config/fish/config.fish`:`$PROFILE`}function M(e,t){return e===`powershell`?`Restart your shell (or reload your PowerShell profile).`:`Restart your shell or run: source ${t}`}async function N(e){let n={resolveCliName:t,checkShellCompletionStatus:E,ensureCompletionCacheExists:T,installCompletion:f,...e.deps},r=n.resolveCliName(),i=await n.checkShellCompletionStatus(r);if(i.usesSlowPattern){await n.ensureCompletionCacheExists(r)&&await n.installCompletion(i.shell,!0,r);return}if(i.profileInstalled&&!i.cacheExists){await n.ensureCompletionCacheExists(r);return}if(!i.profileInstalled){if(!(e.flow===`quickstart`||await e.prompter.confirm({message:`Enable ${i.shell} shell completion for ${r}?`,initialValue:!0})))return;if(!await n.ensureCompletionCacheExists(r)){await e.prompter.note(`Failed to generate completion cache. Run \`${r} completion --install\` later.`,`Shell completion`);return}await n.installCompletion(i.shell,!0,r);let t=await j(i.shell);await e.prompter.note(`Shell completion installed. ${M(i.shell,t)}`,`Shell completion`)}}async function P(t){let{flow:i,opts:f,baseConfig:T,nextConfig:E,settings:O,prompter:j,runtime:M}=t,P=async(e,t,n)=>{let r=j.progress(e);try{return await n(r)}finally{r.stop(typeof t.doneMessage==`function`?t.doneMessage():t.doneMessage)}},F=process.platform===`linux`?await v():!0;if(process.platform===`linux`&&!F&&await j.note(`Systemd user services are unavailable. Skipping lingering checks and service install.`,`Systemd`),process.platform===`linux`&&F){let{ensureSystemdUserLingerInteractive:e}=await import(`./systemd-linger-cWKbFNpu.js`).then(e=>e.r);await e({runtime:M,prompter:{confirm:j.confirm,note:j.note},reason:`Linux installs use a systemd user service by default. Without lingering, systemd stops the user session on logout/idle and kills the Gateway.`,requireConfirm:!1})}let I=typeof f.installDaemon==`boolean`?f.installDaemon:void 0,L;if(L=I===void 0?process.platform===`linux`&&!F?!1:i===`quickstart`?!0:await j.confirm({message:`Install Gateway service (recommended)`,initialValue:!0}):I,process.platform===`linux`&&!F&&L&&(await j.note("Systemd user services are unavailable; skipping service install. Use your container supervisor or `docker compose up -d`.",`Gateway service`),L=!1),L){let e=i===`quickstart`?_:await j.select({message:`Gateway service runtime`,options:g,initialValue:f.daemonRuntime??`node`});i===`quickstart`&&await j.note(`QuickStart uses Node for the Gateway service (stable + supported).`,`Gateway service runtime`);let t=y(),n=await t.isLoaded({env:process.env}),r=!1;if(n){let e=await j.select({message:`Gateway service already installed`,options:[{value:`restart`,label:`Restart`},{value:`reinstall`,label:`Reinstall`},{value:`skip`,label:`Skip`}]});if(e===`restart`){let e=`Gateway service restarted.`;await P(`Gateway service`,{doneMessage:()=>e},async n=>{n.update(`Restarting Gateway service…`);let i=b(`Gateway`,await t.restart({env:process.env,stdout:process.stdout}));e=i.progressMessage,r=i.scheduled})}else e===`reinstall`&&await P(`Gateway service`,{doneMessage:`Gateway service uninstalled.`},async e=>{e.update(`Uninstalling Gateway service…`),await t.uninstall({env:process.env,stdout:process.stdout})})}if(!n||!r&&n&&!await t.isLoaded({env:process.env})){let n=j.progress(`Gateway service`),r=null;try{n.update(`Preparing Gateway service…`);let i=await h({config:E,env:process.env});for(let e of i.warnings)await j.note(e,`Gateway service`);if(i.unavailableReason)r=[`Gateway install blocked:`,i.unavailableReason,`Fix gateway auth config/token input and rerun onboarding.`].join(` `);else{let{programArguments:r,workingDirectory:i,environment:a}=await p({env:process.env,port:O.port,runtime:e,warn:(e,t)=>j.note(e,t),config:E});n.update(`Installing Gateway service…`),await t.install({env:process.env,stdout:process.stdout,programArguments:r,workingDirectory:i,environment:a})}}catch(e){r=e instanceof Error?e.message:String(e)}finally{n.stop(r?`Gateway service install failed.`:`Gateway service installed.`)}r&&(await j.note(`Gateway service install failed: ${r}`,`Gateway`),await j.note(m(),`Gateway`))}}if(!f.skipHealth){await o({url:c({bind:E.gateway?.bind??`loopback`,port:O.port,customBindHost:E.gateway?.customBindHost,basePath:void 0}).wsUrl,token:O.gatewayToken,deadlineMs:15e3});try{await x({json:!1,timeoutMs:1e4},M)}catch(e){M.error(w(e)),await j.note([`Docs:`,`https://docs.openclaw.ai/gateway/health`,`https://docs.openclaw.ai/gateway/troubleshooting`].join(`
2
2
  `),`Health check help`)}}let R=E.gateway?.controlUi?.enabled??T.gateway?.controlUi?.enabled??!0;if(!f.skipUi&&R){let e=await S(M);!e.ok&&e.message&&M.error(e.message)}await j.note([`Add nodes for extra features:`,`- macOS app (system + notifications)`,`- iOS app (camera/canvas)`,`- Android app (camera/canvas)`].join(`
3
3
  `),`Optional apps`);let z=E.gateway?.controlUi?.basePath??T.gateway?.controlUi?.basePath,B=c({bind:O.bind,port:O.port,customBindHost:O.customBindHost,basePath:z}),V=O.authMode===`token`&&O.gatewayToken?`${B.httpUrl}#token=${encodeURIComponent(O.gatewayToken)}`:B.httpUrl,H=``;if(O.authMode===`password`)try{H=await C({config:E,value:E.gateway?.auth?.password,path:`gateway.auth.password`,env:process.env})??``}catch(e){await j.note([`Could not resolve gateway.auth.password SecretRef for onboarding auth.`,e instanceof Error?e.message:String(e)].join(`
4
4
  `),`Gateway auth`)}let U=await u({url:B.wsUrl,token:O.authMode===`token`?O.gatewayToken:void 0,password:O.authMode===`password`?H:``}),W=U.ok?`Gateway: reachable`:`Gateway: not detected${U.detail?` (${U.detail})`:``}`,G=k.join(a(t.workspaceDir),r),K=await A.access(G).then(()=>!0).catch(()=>!1);await j.note([`Web UI: ${B.httpUrl}`,O.authMode===`token`&&O.gatewayToken?`Web UI (with token): ${V}`:void 0,`Gateway WS: ${B.wsUrl}`,W,`Docs: https://docs.openclaw.ai/web/control-ui`].filter(Boolean).join(`
@@ -13,4 +13,4 @@ import{m as e}from"./subsystem-BLbY429l.js";import"./paths-BjD3T_xq.js";import".
13
13
  `),`Web search`)}else{let{SEARCH_PROVIDER_OPTIONS:e,hasExistingKey:t,hasKeyInEnv:r}=await import(`./onboard-search-fslKKhyg.js`),i=e.find(e=>t(E,e.value)||r(e));i?await j.note([`Web search is available via ${i.label} (auto-detected).`,`Docs: https://docs.openclaw.ai/tools/web`].join(`
14
14
  `),`Web search`):await j.note([`Web search was skipped. You can enable it later:`,` ${n(`openclaw configure --section web`)}`,``,`Docs: https://docs.openclaw.ai/tools/web`].join(`
15
15
  `),`Web search`)}return await j.note(`What now: https://openclaw.ai/showcase ("What People Are Building").`,`What now`),await j.outro(q?`Onboarding complete. Dashboard opened; keep that tab to control OpenClaw.`:`Onboarding complete. Use the dashboard link above to control OpenClaw.`),{launchedTui:X}}export{P as finalizeOnboardingWizard};
16
- //# sourceMappingURL=onboarding.finalize-Bi53z1zE.js.map
16
+ //# sourceMappingURL=onboarding.finalize-CwjLMPKK.js.map
@@ -1,3 +1,3 @@
1
- import{A as e,B as t,Q as n,R as r,W as i,X as a,Y as o,Z as s,k as c,p as l,w as u}from"./subsystem-BLbY429l.js";import"./paths-BjD3T_xq.js";import"./boolean-D15s2V33.js";import{i as d}from"./entry.js";import"./auth-profiles-T8DuH3ax.js";import{n as f,r as p}from"./command-format-CLxIPuLR.js";import"./agent-scope-DAWJwFfl.js";import{c as m}from"./utils-CGdo13HV.js";import"./openclaw-root-CnsBf6ZU.js";import"./github-copilot-token-C79yeDKS.js";import"./env-overrides-DHtB4kK3.js";import{t as h}from"./version-q3SkUw2K.js";import"./registry-BptzrW8D.js";import"./skills-CKTicUKS.js";import"./frontmatter-C7mzDNxd.js";import"./plugins-DNlgeTTc.js";import"./logger-kQAOe3qp.js";import"./exec-B3eleY5O.js";import"./windows-spawn-7oINn5ao.js";import"./redact-CnRxK70G.js";import"./path-alias-guards-kY_ZbWs-.js";import"./errors-6SQWM9dj.js";import"./send-CW81y5Wz.js";import"./send-DavpkzhH.js";import{Sn as g}from"./compact-BEeB6bwq.js";import"./paths-BfjJY2VL.js";import"./chat-envelope-Bznn2SoS.js";import"./models-config-_htt7eY5.js";import"./tokens-DRM8vzJx.js";import"./with-timeout-c1CzdShT.js";import"./deliver-BHuhHfkH.js";import"./diagnostic-DQq4Bwrs.js";import"./send-DkiKKUkt.js";import"./pi-model-discovery-CpjYoBQf.js";import"./exec-approvals-allowlist-D8mN7nxV.js";import"./exec-safe-bin-runtime-policy-dcCS_Adf.js";import"./model-catalog-COVzoZD9.js";import"./fetch-CQaNr5J1.js";import"./audio-transcription-runner-Bd1OZC6K.js";import"./fetch-guard-BrTtJw7h.js";import"./image-BkWwI54C.js";import"./tool-display-DJDtttQg.js";import"./api-key-rotation-D0QU-kQ9.js";import"./proxy-fetch-gWETR3cl.js";import"./ir-D8Hh84ab.js";import"./render-DrrPmnMI.js";import"./target-errors-CgWAJOam.js";import"./commands-Dy7duWlt.js";import"./commands-registry-Cpl4QnG4.js";import"./session-cost-usage-CHtVgnE8.js";import"./session-utils-8acNlxwP.js";import"./sqlite-CILF3z9U.js";import"./call-B8Fb4_oh.js";import"./pi-tools.policy-D40r0HmD.js";import"./pairing-store-BH-FTYkn.js";import"./fetch-Dh-apy46.js";import"./skill-commands-CSF6wVPU.js";import"./workspace-dirs-A8Vib9_B.js";import"./pairing-token-DAR7V7FJ.js";import"./channel-activity-BBrgoad1.js";import"./tables-Brc2lNcB.js";import"./kill-tree-B3g7HrAO.js";import"./runtime-web-tools-D8fms06-.js";import"./runtime-Dlg2-Omq.js";import"./node-shell-DyOfwHrh.js";import"./stagger-DxzgG2jd.js";import"./channel-selection-BBeE1TmB.js";import"./plugin-auto-enable-NzmNh4oU.js";import"./send-CVplsJpw.js";import"./outbound-attachment-BgAe99RM.js";import"./delivery-queue-nkPJu0fY.js";import"./send-C48Y9SAq.js";import"./system-run-command-BKfMiqQM.js";import"./fetch-Ce-scEU-.js";import"./command-secret-targets-BlN-J_fA.js";import"./connection-auth-B_Uk6Vk8.js";import"./onboard-helpers-PGl5bVPE.js";import"./prompt-style-BThRSQJR.js";import"./pairing-labels-D-kzQEL2.js";import"./search-manager-Bp9x20r6.js";import"./manager-C2YW7Hkq.js";import"./memory-cli-XaxtBQm1.js";import{t as _}from"./links-CBnmRP9D.js";import"./cli-utils-BleB1eys.js";import"./help-format-B4aEI7V9.js";import"./progress-d1m2sqR1.js";import"./exec-approvals-BXO9Cezj.js";import"./plugin-registry-CYlBYbc8.js";import{n as v}from"./channel-options-BurUBfoY.js";import{t as y}from"./register.subclis-smZuHVcv.js";import{a as b,r as x}from"./command-registry-CPthpEk3.js";import{r as S}from"./program-context-CH9p6anW.js";import"./ports-B0XdGTfS.js";import{n as C,r as w,t as T}from"./banner-xQa2kS6O.js";import{Command as E,InvalidArgumentError as D}from"commander";function O(){let e,t=()=>(e===void 0&&(e=v()),e);return{programVersion:h,get channelOptions(){return t()},get messageChannelOptions(){return t().join(`|`)},get agentChannelOptions(){return[`last`,...t()].join(`|`)}}}const k=r.join(`|`);function A(e){let n=t(e);if(!n)throw new D(`Invalid --log-level (use ${k})`);return n}const j=p(),M=m(j),N=new Set([...x(),...y()]),P=[[`openclaw models --help`,`Show detailed help for the models command.`],[`openclaw channels login --verbose`,`Link personal WhatsApp Web and show QR + connection logs.`],[`openclaw message send --target +15555550123 --message "Hi" --json`,`Send via your web session and print JSON result.`],[`openclaw gateway --port 18789`,`Run the WebSocket Gateway locally.`],[`openclaw --dev gateway`,`Run a dev Gateway (isolated state/config) on ws://127.0.0.1:19001.`],[`openclaw gateway --force`,`Kill anything bound to the default gateway port, then start it.`],[`openclaw gateway ...`,`Gateway control via WebSocket.`],[`openclaw agent --to +15555550123 --message "Run summary" --deliver`,`Talk directly to the agent using the Gateway; optionally send the WhatsApp reply.`],[`openclaw message send --channel telegram --target @mychat --message "Hi"`,`Send via your Telegram bot.`]];function F(t,r){t.name(j).description(``).version(r.programVersion).option(`--dev`,`Dev profile: isolate state under ~/.qbotclaw-dev, default gateway port 19001, and shift derived ports (browser/canvas)`).option(`--profile <name>`,`Use a named profile (isolates OPENCLAW_STATE_DIR/OPENCLAW_CONFIG_PATH under ~/.qbotclaw-<name>)`).option(`--log-level <level>`,`Global log level override for file + console (${k})`,A),t.option(`--no-color`,`Disable ANSI colors`,!1),t.helpOption(`-h, --help`,`Display help for command`),t.helpCommand(`help [command]`,`Display help for command`),t.configureHelp({sortSubcommands:!0,sortOptions:!0,optionTerm:t=>e.option(t.flags),subcommandTerm:n=>{let r=n.parent===t&&N.has(n.name());return e.command(r?`${n.name()} *`:n.name())}});let i=t=>{let n=t;return RegExp(`^Usage:\\s+${M}\\s+\\[options\\]\\s+\\[command\\]\\s*$`,`m`).test(n)&&/^Commands:/m.test(n)&&(n=n.replace(/^Commands:/m,`Commands:\n ${e.muted(`Hint: commands suffixed with * have subcommands. Run <command> --help for details.`)}`)),n.replace(/^Usage:/gm,e.heading(`Usage:`)).replace(/^Options:/gm,e.heading(`Options:`)).replace(/^Commands:/gm,e.heading(`Commands:`))};if(t.configureOutput({writeOut:e=>{process.stdout.write(i(e))},writeErr:e=>{process.stderr.write(i(e))},outputError:(t,n)=>n(e.error(t))}),a(process.argv,`-V`)||a(process.argv,`--version`)||n(process.argv)){let e=g({moduleUrl:import.meta.url});console.log(e?`OpenClaw ${r.programVersion} (${e})`:`OpenClaw ${r.programVersion}`),process.exit(0)}t.addHelpText(`beforeAll`,()=>{if(w())return``;let e=c();return`\n${C(r.programVersion,{richTty:e})}\n`});let o=P.map(([t,n])=>` ${e.command(f(t,j))}\n ${e.muted(n)}`).join(`
1
+ import{A as e,B as t,Q as n,R as r,W as i,X as a,Y as o,Z as s,k as c,p as l,w as u}from"./subsystem-BLbY429l.js";import"./paths-BjD3T_xq.js";import"./boolean-D15s2V33.js";import{i as d}from"./entry.js";import"./auth-profiles-T8DuH3ax.js";import{n as f,r as p}from"./command-format-CLxIPuLR.js";import"./agent-scope-DAWJwFfl.js";import{c as m}from"./utils-CGdo13HV.js";import"./openclaw-root-CnsBf6ZU.js";import"./github-copilot-token-C79yeDKS.js";import"./env-overrides-DHtB4kK3.js";import{t as h}from"./version-q3SkUw2K.js";import"./registry-BptzrW8D.js";import"./skills-CKTicUKS.js";import"./frontmatter-C7mzDNxd.js";import"./plugins-DNlgeTTc.js";import"./logger-kQAOe3qp.js";import"./exec-B3eleY5O.js";import"./windows-spawn-7oINn5ao.js";import"./redact-CnRxK70G.js";import"./path-alias-guards-kY_ZbWs-.js";import"./errors-6SQWM9dj.js";import"./send-CW81y5Wz.js";import"./send-DavpkzhH.js";import{Sn as g}from"./compact-BEeB6bwq.js";import"./paths-BfjJY2VL.js";import"./chat-envelope-Bznn2SoS.js";import"./models-config-_htt7eY5.js";import"./tokens-DRM8vzJx.js";import"./with-timeout-c1CzdShT.js";import"./deliver-BHuhHfkH.js";import"./diagnostic-DQq4Bwrs.js";import"./send-DkiKKUkt.js";import"./pi-model-discovery-CpjYoBQf.js";import"./exec-approvals-allowlist-D8mN7nxV.js";import"./exec-safe-bin-runtime-policy-dcCS_Adf.js";import"./model-catalog-COVzoZD9.js";import"./fetch-CQaNr5J1.js";import"./audio-transcription-runner-Bd1OZC6K.js";import"./fetch-guard-BrTtJw7h.js";import"./image-BkWwI54C.js";import"./tool-display-DJDtttQg.js";import"./api-key-rotation-D0QU-kQ9.js";import"./proxy-fetch-gWETR3cl.js";import"./ir-D8Hh84ab.js";import"./render-DrrPmnMI.js";import"./target-errors-CgWAJOam.js";import"./commands-Dy7duWlt.js";import"./commands-registry-Cpl4QnG4.js";import"./session-cost-usage-CHtVgnE8.js";import"./session-utils-8acNlxwP.js";import"./sqlite-CILF3z9U.js";import"./call-B8Fb4_oh.js";import"./pi-tools.policy-D40r0HmD.js";import"./pairing-store-BH-FTYkn.js";import"./fetch-Dh-apy46.js";import"./skill-commands-CSF6wVPU.js";import"./workspace-dirs-A8Vib9_B.js";import"./pairing-token-DAR7V7FJ.js";import"./channel-activity-BBrgoad1.js";import"./tables-Brc2lNcB.js";import"./kill-tree-B3g7HrAO.js";import"./runtime-web-tools-D8fms06-.js";import"./runtime-Dlg2-Omq.js";import"./node-shell-DyOfwHrh.js";import"./stagger-DxzgG2jd.js";import"./channel-selection-BBeE1TmB.js";import"./plugin-auto-enable-NzmNh4oU.js";import"./send-CVplsJpw.js";import"./outbound-attachment-BgAe99RM.js";import"./delivery-queue-nkPJu0fY.js";import"./send-C48Y9SAq.js";import"./system-run-command-BKfMiqQM.js";import"./fetch-Ce-scEU-.js";import"./command-secret-targets-BlN-J_fA.js";import"./connection-auth-B_Uk6Vk8.js";import"./onboard-helpers-PGl5bVPE.js";import"./prompt-style-BThRSQJR.js";import"./pairing-labels-D-kzQEL2.js";import"./search-manager-Bp9x20r6.js";import"./manager-C2YW7Hkq.js";import"./memory-cli-XaxtBQm1.js";import{t as _}from"./links-CBnmRP9D.js";import"./cli-utils-BleB1eys.js";import"./help-format-B4aEI7V9.js";import"./progress-d1m2sqR1.js";import"./exec-approvals-BXO9Cezj.js";import"./plugin-registry-CYlBYbc8.js";import{n as v}from"./channel-options-BurUBfoY.js";import{t as y}from"./register.subclis-B_0ZS-_K.js";import{a as b,r as x}from"./command-registry-CSBvrqwW.js";import{r as S}from"./program-context-CH9p6anW.js";import"./ports-B0XdGTfS.js";import{n as C,r as w,t as T}from"./banner-xQa2kS6O.js";import{Command as E,InvalidArgumentError as D}from"commander";function O(){let e,t=()=>(e===void 0&&(e=v()),e);return{programVersion:h,get channelOptions(){return t()},get messageChannelOptions(){return t().join(`|`)},get agentChannelOptions(){return[`last`,...t()].join(`|`)}}}const k=r.join(`|`);function A(e){let n=t(e);if(!n)throw new D(`Invalid --log-level (use ${k})`);return n}const j=p(),M=m(j),N=new Set([...x(),...y()]),P=[[`openclaw models --help`,`Show detailed help for the models command.`],[`openclaw channels login --verbose`,`Link personal WhatsApp Web and show QR + connection logs.`],[`openclaw message send --target +15555550123 --message "Hi" --json`,`Send via your web session and print JSON result.`],[`openclaw gateway --port 18789`,`Run the WebSocket Gateway locally.`],[`openclaw --dev gateway`,`Run a dev Gateway (isolated state/config) on ws://127.0.0.1:19001.`],[`openclaw gateway --force`,`Kill anything bound to the default gateway port, then start it.`],[`openclaw gateway ...`,`Gateway control via WebSocket.`],[`openclaw agent --to +15555550123 --message "Run summary" --deliver`,`Talk directly to the agent using the Gateway; optionally send the WhatsApp reply.`],[`openclaw message send --channel telegram --target @mychat --message "Hi"`,`Send via your Telegram bot.`]];function F(t,r){t.name(j).description(``).version(r.programVersion).option(`--dev`,`Dev profile: isolate state under ~/.qbotclaw-dev, default gateway port 19001, and shift derived ports (browser/canvas)`).option(`--profile <name>`,`Use a named profile (isolates OPENCLAW_STATE_DIR/OPENCLAW_CONFIG_PATH under ~/.qbotclaw-<name>)`).option(`--log-level <level>`,`Global log level override for file + console (${k})`,A),t.option(`--no-color`,`Disable ANSI colors`,!1),t.helpOption(`-h, --help`,`Display help for command`),t.helpCommand(`help [command]`,`Display help for command`),t.configureHelp({sortSubcommands:!0,sortOptions:!0,optionTerm:t=>e.option(t.flags),subcommandTerm:n=>{let r=n.parent===t&&N.has(n.name());return e.command(r?`${n.name()} *`:n.name())}});let i=t=>{let n=t;return RegExp(`^Usage:\\s+${M}\\s+\\[options\\]\\s+\\[command\\]\\s*$`,`m`).test(n)&&/^Commands:/m.test(n)&&(n=n.replace(/^Commands:/m,`Commands:\n ${e.muted(`Hint: commands suffixed with * have subcommands. Run <command> --help for details.`)}`)),n.replace(/^Usage:/gm,e.heading(`Usage:`)).replace(/^Options:/gm,e.heading(`Options:`)).replace(/^Commands:/gm,e.heading(`Commands:`))};if(t.configureOutput({writeOut:e=>{process.stdout.write(i(e))},writeErr:e=>{process.stderr.write(i(e))},outputError:(t,n)=>n(e.error(t))}),a(process.argv,`-V`)||a(process.argv,`--version`)||n(process.argv)){let e=g({moduleUrl:import.meta.url});console.log(e?`OpenClaw ${r.programVersion} (${e})`:`OpenClaw ${r.programVersion}`),process.exit(0)}t.addHelpText(`beforeAll`,()=>{if(w())return``;let e=c();return`\n${C(r.programVersion,{richTty:e})}\n`});let o=P.map(([t,n])=>` ${e.command(f(t,j))}\n ${e.muted(n)}`).join(`
2
2
  `);t.addHelpText(`afterAll`,({command:n})=>{if(n!==t)return``;let r=_(`/cli`,`docs.openclaw.ai/cli`);return`\n${e.heading(`Examples:`)}\n${o}\n\n${e.muted(`Docs:`)} ${r}\n`})}function I(e){let t=e;for(;t.parent&&t.parent.parent;)t=t.parent;let n=t.name(),r=p();!n||n===r||(process.title=`${r}-${n}`)}const L=new Set([`message`,`channels`,`directory`,`agents`,`configure`,`onboard`,`status`,`health`]),R=new Set([`backup`,`doctor`,`completion`,`secrets`]),z=new Set([`config set`]);let B,V;function H(e){let[t,n]=e;return t?!!(R.has(t)||t===`config`&&n===`validate`):!1}function U(){return B??=import(`./config-guard-BTNXbWoO.js`).then(e=>e.t),B}function W(){return V??=import(`./plugin-registry-CYlBYbc8.js`).then(e=>e.n),V}function G(e){let t=e;for(;t.parent;)t=t.parent;return t}function K(e){let t=G(e);if(typeof t.getOptionValueSource!=`function`||t.getOptionValueSource(`logLevel`)!==`cli`)return;let n=t.opts().logLevel;return typeof n==`string`?n:void 0}function q(e,t){if(!a(t,`--json`))return!1;let n=`${e[0]??``} ${e[1]??``}`.trim();return!z.has(n)}function J(e,t){e.hook(`preAction`,async(e,n)=>{I(n);let r=process.argv;if(s(r))return;let a=i(r,2);d(process.env.OPENCLAW_HIDE_BANNER)||a[0]===`update`||a[0]===`completion`||a[0]===`plugins`&&a[1]===`update`||T(t);let c=o(r,{includeDebug:!0});u(c);let f=K(n);if(f&&(process.env.OPENCLAW_LOG_LEVEL=f),c||(process.env.NODE_NO_WARNINGS??=`1`),H(a))return;let p=q(a,r),{ensureConfigReady:m}=await U();if(await m({runtime:l,commandPath:a,...p?{suppressDoctorStdout:!0}:{}}),L.has(a[0])){let{ensurePluginRegistryLoaded:e}=await W();e()}})}function Y(){let e=new E,t=O(),n=process.argv;return S(e,t),F(e,t),J(e,t.programVersion),b(e,t,n),e}export{Y as buildProgram};
3
- //# sourceMappingURL=program-D9AMAbv6.js.map
3
+ //# sourceMappingURL=program-CCS3CIqA.js.map
@@ -1,2 +1,2 @@
1
- import{G as e,J as t,U as n}from"./subsystem-C5XF2Fy5.js";import{t as r}from"./env-D7wNuBx1.js";import{r as i}from"./helpers-Cp8gcO6u.js";async function a(e,t){let r=t.at(-1),a=(r?.parent??e).rawArgs,o=i(r),s=r?.name()?[r.name(),...o]:o,c=n({programName:e.name(),rawArgs:a,fallbackArgv:s});await e.parseAsync(c)}function o(e,t){let n=e.commands,r=n.indexOf(t);return r<0?!1:(n.splice(r,1),!0)}function s(e,t){let n=e.commands.find(e=>e.name()===t);return n?o(e,n):!1}const c=e=>!(r(process.env.OPENCLAW_DISABLE_LAZY_SUBCOMMANDS)||t(e)),l=e=>r(process.env.OPENCLAW_DISABLE_LAZY_SUBCOMMANDS),u=async()=>{let e=await import(`./model-selection-BlC_rXAN.js`).then(e=>e.Bs);return(await e.readConfigFileSnapshot()).valid?e.loadConfig():null},d=[{name:`acp`,description:`Agent Control Protocol tools`,hasSubcommands:!0,register:async e=>{(await import(`./acp-cli-f5-uI85a.js`)).registerAcpCli(e)}},{name:`gateway`,description:`Run, inspect, and query the WebSocket Gateway`,hasSubcommands:!0,register:async e=>{(await import(`./gateway-cli-CbJj0QhL.js`)).registerGatewayCli(e)}},{name:`daemon`,description:`Gateway service (legacy alias)`,hasSubcommands:!0,register:async e=>{(await import(`./daemon-cli-DOTKuS7d.js`).then(e=>e.t)).registerDaemonCli(e)}},{name:`logs`,description:`Tail gateway file logs via RPC`,hasSubcommands:!1,register:async e=>{(await import(`./logs-cli-B4eUg_87.js`)).registerLogsCli(e)}},{name:`system`,description:`System events, heartbeat, and presence`,hasSubcommands:!0,register:async e=>{(await import(`./system-cli-DZkTYB9d.js`)).registerSystemCli(e)}},{name:`models`,description:`Discover, scan, and configure models`,hasSubcommands:!0,register:async e=>{(await import(`./models-cli-Dacwv6BY.js`)).registerModelsCli(e)}},{name:`approvals`,description:`Manage exec approvals (gateway or node host)`,hasSubcommands:!0,register:async e=>{(await import(`./exec-approvals-cli-CUcuN63y.js`)).registerExecApprovalsCli(e)}},{name:`nodes`,description:`Manage gateway-owned node pairing and node commands`,hasSubcommands:!0,register:async e=>{(await import(`./nodes-cli-zq41EwJN.js`)).registerNodesCli(e)}},{name:`devices`,description:`Device pairing + token management`,hasSubcommands:!0,register:async e=>{(await import(`./devices-cli-Db36mBHq.js`)).registerDevicesCli(e)}},{name:`node`,description:`Run and manage the headless node host service`,hasSubcommands:!0,register:async e=>{(await import(`./node-cli-5lYbDZ70.js`)).registerNodeCli(e)}},{name:`sandbox`,description:`Manage sandbox containers for agent isolation`,hasSubcommands:!0,register:async e=>{(await import(`./sandbox-cli-Bq40R5Vs.js`)).registerSandboxCli(e)}},{name:`tui`,description:`Open a terminal UI connected to the Gateway`,hasSubcommands:!1,register:async e=>{(await import(`./tui-cli-BEdGHmhc.js`)).registerTuiCli(e)}},{name:`cron`,description:`Manage cron jobs via the Gateway scheduler`,hasSubcommands:!0,register:async e=>{(await import(`./cron-cli-QHS2pKZ_.js`)).registerCronCli(e)}},{name:`dns`,description:`DNS helpers for wide-area discovery (Tailscale + CoreDNS)`,hasSubcommands:!0,register:async e=>{(await import(`./dns-cli-C4DwKquN.js`)).registerDnsCli(e)}},{name:`docs`,description:`Search the live OpenClaw docs`,hasSubcommands:!1,register:async e=>{(await import(`./docs-cli-ClD2UyX1.js`)).registerDocsCli(e)}},{name:`hooks`,description:`Manage internal agent hooks`,hasSubcommands:!0,register:async e=>{(await import(`./hooks-cli-B3eDoEHO.js`)).registerHooksCli(e)}},{name:`webhooks`,description:`Webhook helpers and integrations`,hasSubcommands:!0,register:async e=>{(await import(`./webhooks-cli-DSNAve_D.js`)).registerWebhooksCli(e)}},{name:`qr`,description:`Generate iOS pairing QR/setup code`,hasSubcommands:!1,register:async e=>{(await import(`./qr-cli-fiJxD5M4.js`)).registerQrCli(e)}},{name:`clawbot`,description:`Legacy clawbot command aliases`,hasSubcommands:!0,register:async e=>{(await import(`./clawbot-cli-DZ2K0OTk.js`)).registerClawbotCli(e)}},{name:`pairing`,description:`Secure DM pairing (approve inbound requests)`,hasSubcommands:!0,register:async e=>{let{registerPluginCliCommands:t}=await import(`./cli-MTpYYgjl.js`),n=await u();n&&t(e,n),(await import(`./pairing-cli-Bya9M-I_.js`)).registerPairingCli(e)}},{name:`plugins`,description:`Manage OpenClaw plugins and extensions`,hasSubcommands:!0,register:async e=>{(await import(`./plugins-cli-BzJeq-CW.js`)).registerPluginsCli(e);let{registerPluginCliCommands:t}=await import(`./cli-MTpYYgjl.js`),n=await u();n&&t(e,n)}},{name:`channels`,description:`Manage connected chat channels (Telegram, Discord, etc.)`,hasSubcommands:!0,register:async e=>{(await import(`./channels-cli-DFI6F6G0.js`)).registerChannelsCli(e)}},{name:`directory`,description:`Lookup contact and group IDs (self, peers, groups) for supported chat channels`,hasSubcommands:!0,register:async e=>{(await import(`./directory-cli-_gTFSHMW.js`)).registerDirectoryCli(e)}},{name:`security`,description:`Security tools and local config audits`,hasSubcommands:!0,register:async e=>{(await import(`./security-cli-CgZL2KKh.js`)).registerSecurityCli(e)}},{name:`secrets`,description:`Secrets runtime reload controls`,hasSubcommands:!0,register:async e=>{(await import(`./secrets-cli-CoXJv3Jp.js`)).registerSecretsCli(e)}},{name:`skills`,description:`List and inspect available skills`,hasSubcommands:!0,register:async e=>{(await import(`./skills-cli-9Ls94z5H.js`)).registerSkillsCli(e)}},{name:`update`,description:`Update OpenClaw and inspect update channel status`,hasSubcommands:!0,register:async e=>{(await import(`./update-cli-C0qadZEs.js`)).registerUpdateCli(e)}},{name:`completion`,description:`Generate shell completion script`,hasSubcommands:!1,register:async e=>{(await import(`./completion-cli-DeGEpJri.js`).then(e=>e.n)).registerCompletionCli(e)}}];function f(){return d}function p(){return d.filter(e=>e.hasSubcommands).map(e=>e.name)}async function m(e,t){let n=d.find(e=>e.name===t);return n?(s(e,n.name),await n.register(e),!0):!1}function h(e,t){let n=e.command(t.name).description(t.description);n.allowUnknownOption(!0),n.allowExcessArguments(!0),n.action(async(...r)=>{o(e,n),await t.register(e),await a(e,r)})}function g(t,n=process.argv){if(l(n)){for(let e of d)e.register(t);return}let r=e(n);if(r&&c(n)){let e=d.find(e=>e.name===r);if(e){h(t,e);return}}for(let e of d)h(t,e)}const _=e=>!t(e),v=[{commands:[{name:`setup`,description:`Initialize local config and agent workspace`,hasSubcommands:!1}],register:async({program:e})=>{(await import(`./register.setup-DA4HFCro.js`)).registerSetupCommand(e)}},{commands:[{name:`onboard`,description:`Interactive onboarding wizard for gateway, workspace, and skills`,hasSubcommands:!1}],register:async({program:e})=>{(await import(`./register.onboard-C-j99DGw.js`)).registerOnboardCommand(e)}},{commands:[{name:`configure`,description:`Interactive setup wizard for credentials, channels, gateway, and agent defaults`,hasSubcommands:!1}],register:async({program:e})=>{(await import(`./register.configure-D8bJJ16k.js`)).registerConfigureCommand(e)}},{commands:[{name:`config`,description:`Non-interactive config helpers (get/set/unset/file/validate). Default: starts setup wizard.`,hasSubcommands:!0}],register:async({program:e})=>{(await import(`./config-cli-BNTGUqL_.js`)).registerConfigCli(e)}},{commands:[{name:`backup`,description:`Create and verify local backup archives for OpenClaw state`,hasSubcommands:!0}],register:async({program:e})=>{(await import(`./register.backup-DkFoTcuT.js`)).registerBackupCommand(e)}},{commands:[{name:`doctor`,description:`Health checks + quick fixes for the gateway and channels`,hasSubcommands:!1},{name:`dashboard`,description:`Open the Control UI with your current token`,hasSubcommands:!1},{name:`reset`,description:`Reset local config/state (keeps the CLI installed)`,hasSubcommands:!1},{name:`uninstall`,description:`Uninstall the gateway service + local data (CLI remains)`,hasSubcommands:!1}],register:async({program:e})=>{(await import(`./register.maintenance-AeTvVTtt.js`)).registerMaintenanceCommands(e)}},{commands:[{name:`message`,description:`Send, read, and manage messages`,hasSubcommands:!0}],register:async({program:e,ctx:t})=>{(await import(`./register.message-3zVHQZ27.js`)).registerMessageCommands(e,t)}},{commands:[{name:`memory`,description:`Search and reindex memory files`,hasSubcommands:!0}],register:async({program:e})=>{(await import(`./memory-cli-jhzJ3as7.js`).then(e=>e.t)).registerMemoryCli(e)}},{commands:[{name:`agent`,description:`Run one agent turn via the Gateway`,hasSubcommands:!1},{name:`agents`,description:`Manage isolated agents (workspaces, auth, routing)`,hasSubcommands:!0}],register:async({program:e,ctx:t})=>{(await import(`./register.agent-Dl2Ef-K5.js`)).registerAgentCommands(e,{agentChannelOptions:t.agentChannelOptions})}},{commands:[{name:`status`,description:`Show channel health and recent session recipients`,hasSubcommands:!1},{name:`health`,description:`Fetch health from the running gateway`,hasSubcommands:!1},{name:`sessions`,description:`List stored conversation sessions`,hasSubcommands:!0}],register:async({program:e})=>{(await import(`./register.status-health-sessions-Bo9VWxLG.js`)).registerStatusHealthSessionsCommands(e)}},{commands:[{name:`browser`,description:`Manage OpenClaw's dedicated browser (Chrome/Chromium)`,hasSubcommands:!0}],register:async({program:e})=>{(await import(`./browser-cli-DQHE2iPY.js`)).registerBrowserCli(e)}}];function y(e){let t=new Set,n=[];for(let r of v)for(let i of r.commands)e&&!e(i)||t.has(i.name)||(t.add(i.name),n.push(i.name));return n}function b(){return y()}function x(){return y(e=>e.hasSubcommands)}function S(e,t){for(let n of t.commands)s(e,n.name)}function C(e,t,n,r){let i=e.command(r.name).description(r.description);i.allowUnknownOption(!0),i.allowExcessArguments(!0),i.action(async(...r)=>{S(e,n),await n.register({program:e,ctx:t,argv:process.argv}),await a(e,r)})}async function w(e,t,n,r=process.argv){let i=v.find(e=>e.commands.some(e=>e.name===n));return i?(S(e,i),await i.register({program:e,ctx:t,argv:r}),!0):!1}function T(t,n,r){let i=e(r);if(i&&_(r)){let e=v.find(e=>e.commands.some(e=>e.name===i));if(e){let r=e.commands.find(e=>e.name===i);r&&C(t,n,e,r);return}}for(let e of v)for(let r of e.commands)C(t,n,e,r)}function E(e,t,n=process.argv){T(e,t,n),g(e,n)}const D=Symbol.for(`openclaw.cli.programContext`);function O(e,t){e[D]=t}function k(e){return e[D]}export{w as a,f as c,x as i,m as l,O as n,E as o,b as r,p as s,k as t};
2
- //# sourceMappingURL=program-context-BX9wN65q.js.map
1
+ import{G as e,J as t,U as n}from"./subsystem-C5XF2Fy5.js";import{t as r}from"./env-D7wNuBx1.js";import{r as i}from"./helpers-Cp8gcO6u.js";async function a(e,t){let r=t.at(-1),a=(r?.parent??e).rawArgs,o=i(r),s=r?.name()?[r.name(),...o]:o,c=n({programName:e.name(),rawArgs:a,fallbackArgv:s});await e.parseAsync(c)}function o(e,t){let n=e.commands,r=n.indexOf(t);return r<0?!1:(n.splice(r,1),!0)}function s(e,t){let n=e.commands.find(e=>e.name()===t);return n?o(e,n):!1}const c=e=>!(r(process.env.OPENCLAW_DISABLE_LAZY_SUBCOMMANDS)||t(e)),l=e=>r(process.env.OPENCLAW_DISABLE_LAZY_SUBCOMMANDS),u=async()=>{let e=await import(`./model-selection-BlC_rXAN.js`).then(e=>e.Bs);return(await e.readConfigFileSnapshot()).valid?e.loadConfig():null},d=[{name:`acp`,description:`Agent Control Protocol tools`,hasSubcommands:!0,register:async e=>{(await import(`./acp-cli-f5-uI85a.js`)).registerAcpCli(e)}},{name:`gateway`,description:`Run, inspect, and query the WebSocket Gateway`,hasSubcommands:!0,register:async e=>{(await import(`./gateway-cli-C4YOlz3m.js`)).registerGatewayCli(e)}},{name:`daemon`,description:`Gateway service (legacy alias)`,hasSubcommands:!0,register:async e=>{(await import(`./daemon-cli-DOTKuS7d.js`).then(e=>e.t)).registerDaemonCli(e)}},{name:`logs`,description:`Tail gateway file logs via RPC`,hasSubcommands:!1,register:async e=>{(await import(`./logs-cli-B4eUg_87.js`)).registerLogsCli(e)}},{name:`system`,description:`System events, heartbeat, and presence`,hasSubcommands:!0,register:async e=>{(await import(`./system-cli-DZkTYB9d.js`)).registerSystemCli(e)}},{name:`models`,description:`Discover, scan, and configure models`,hasSubcommands:!0,register:async e=>{(await import(`./models-cli-Dacwv6BY.js`)).registerModelsCli(e)}},{name:`approvals`,description:`Manage exec approvals (gateway or node host)`,hasSubcommands:!0,register:async e=>{(await import(`./exec-approvals-cli-CUcuN63y.js`)).registerExecApprovalsCli(e)}},{name:`nodes`,description:`Manage gateway-owned node pairing and node commands`,hasSubcommands:!0,register:async e=>{(await import(`./nodes-cli-zq41EwJN.js`)).registerNodesCli(e)}},{name:`devices`,description:`Device pairing + token management`,hasSubcommands:!0,register:async e=>{(await import(`./devices-cli-Db36mBHq.js`)).registerDevicesCli(e)}},{name:`node`,description:`Run and manage the headless node host service`,hasSubcommands:!0,register:async e=>{(await import(`./node-cli-5lYbDZ70.js`)).registerNodeCli(e)}},{name:`sandbox`,description:`Manage sandbox containers for agent isolation`,hasSubcommands:!0,register:async e=>{(await import(`./sandbox-cli-Bq40R5Vs.js`)).registerSandboxCli(e)}},{name:`tui`,description:`Open a terminal UI connected to the Gateway`,hasSubcommands:!1,register:async e=>{(await import(`./tui-cli-BEdGHmhc.js`)).registerTuiCli(e)}},{name:`cron`,description:`Manage cron jobs via the Gateway scheduler`,hasSubcommands:!0,register:async e=>{(await import(`./cron-cli-QHS2pKZ_.js`)).registerCronCli(e)}},{name:`dns`,description:`DNS helpers for wide-area discovery (Tailscale + CoreDNS)`,hasSubcommands:!0,register:async e=>{(await import(`./dns-cli-C4DwKquN.js`)).registerDnsCli(e)}},{name:`docs`,description:`Search the live OpenClaw docs`,hasSubcommands:!1,register:async e=>{(await import(`./docs-cli-ClD2UyX1.js`)).registerDocsCli(e)}},{name:`hooks`,description:`Manage internal agent hooks`,hasSubcommands:!0,register:async e=>{(await import(`./hooks-cli-B3eDoEHO.js`)).registerHooksCli(e)}},{name:`webhooks`,description:`Webhook helpers and integrations`,hasSubcommands:!0,register:async e=>{(await import(`./webhooks-cli-DSNAve_D.js`)).registerWebhooksCli(e)}},{name:`qr`,description:`Generate iOS pairing QR/setup code`,hasSubcommands:!1,register:async e=>{(await import(`./qr-cli-fiJxD5M4.js`)).registerQrCli(e)}},{name:`clawbot`,description:`Legacy clawbot command aliases`,hasSubcommands:!0,register:async e=>{(await import(`./clawbot-cli-DZ2K0OTk.js`)).registerClawbotCli(e)}},{name:`pairing`,description:`Secure DM pairing (approve inbound requests)`,hasSubcommands:!0,register:async e=>{let{registerPluginCliCommands:t}=await import(`./cli-MTpYYgjl.js`),n=await u();n&&t(e,n),(await import(`./pairing-cli-Bya9M-I_.js`)).registerPairingCli(e)}},{name:`plugins`,description:`Manage OpenClaw plugins and extensions`,hasSubcommands:!0,register:async e=>{(await import(`./plugins-cli-BzJeq-CW.js`)).registerPluginsCli(e);let{registerPluginCliCommands:t}=await import(`./cli-MTpYYgjl.js`),n=await u();n&&t(e,n)}},{name:`channels`,description:`Manage connected chat channels (Telegram, Discord, etc.)`,hasSubcommands:!0,register:async e=>{(await import(`./channels-cli-DFI6F6G0.js`)).registerChannelsCli(e)}},{name:`directory`,description:`Lookup contact and group IDs (self, peers, groups) for supported chat channels`,hasSubcommands:!0,register:async e=>{(await import(`./directory-cli-_gTFSHMW.js`)).registerDirectoryCli(e)}},{name:`security`,description:`Security tools and local config audits`,hasSubcommands:!0,register:async e=>{(await import(`./security-cli-CgZL2KKh.js`)).registerSecurityCli(e)}},{name:`secrets`,description:`Secrets runtime reload controls`,hasSubcommands:!0,register:async e=>{(await import(`./secrets-cli-CoXJv3Jp.js`)).registerSecretsCli(e)}},{name:`skills`,description:`List and inspect available skills`,hasSubcommands:!0,register:async e=>{(await import(`./skills-cli-9Ls94z5H.js`)).registerSkillsCli(e)}},{name:`update`,description:`Update OpenClaw and inspect update channel status`,hasSubcommands:!0,register:async e=>{(await import(`./update-cli-Ibrshx_w.js`)).registerUpdateCli(e)}},{name:`completion`,description:`Generate shell completion script`,hasSubcommands:!1,register:async e=>{(await import(`./completion-cli-Bizog38J.js`).then(e=>e.n)).registerCompletionCli(e)}}];function f(){return d}function p(){return d.filter(e=>e.hasSubcommands).map(e=>e.name)}async function m(e,t){let n=d.find(e=>e.name===t);return n?(s(e,n.name),await n.register(e),!0):!1}function h(e,t){let n=e.command(t.name).description(t.description);n.allowUnknownOption(!0),n.allowExcessArguments(!0),n.action(async(...r)=>{o(e,n),await t.register(e),await a(e,r)})}function g(t,n=process.argv){if(l(n)){for(let e of d)e.register(t);return}let r=e(n);if(r&&c(n)){let e=d.find(e=>e.name===r);if(e){h(t,e);return}}for(let e of d)h(t,e)}const _=e=>!t(e),v=[{commands:[{name:`setup`,description:`Initialize local config and agent workspace`,hasSubcommands:!1}],register:async({program:e})=>{(await import(`./register.setup-CSW03BKj.js`)).registerSetupCommand(e)}},{commands:[{name:`onboard`,description:`Interactive onboarding wizard for gateway, workspace, and skills`,hasSubcommands:!1}],register:async({program:e})=>{(await import(`./register.onboard-CJZKG0PP.js`)).registerOnboardCommand(e)}},{commands:[{name:`configure`,description:`Interactive setup wizard for credentials, channels, gateway, and agent defaults`,hasSubcommands:!1}],register:async({program:e})=>{(await import(`./register.configure-D8bJJ16k.js`)).registerConfigureCommand(e)}},{commands:[{name:`config`,description:`Non-interactive config helpers (get/set/unset/file/validate). Default: starts setup wizard.`,hasSubcommands:!0}],register:async({program:e})=>{(await import(`./config-cli-BNTGUqL_.js`)).registerConfigCli(e)}},{commands:[{name:`backup`,description:`Create and verify local backup archives for OpenClaw state`,hasSubcommands:!0}],register:async({program:e})=>{(await import(`./register.backup-DkFoTcuT.js`)).registerBackupCommand(e)}},{commands:[{name:`doctor`,description:`Health checks + quick fixes for the gateway and channels`,hasSubcommands:!1},{name:`dashboard`,description:`Open the Control UI with your current token`,hasSubcommands:!1},{name:`reset`,description:`Reset local config/state (keeps the CLI installed)`,hasSubcommands:!1},{name:`uninstall`,description:`Uninstall the gateway service + local data (CLI remains)`,hasSubcommands:!1}],register:async({program:e})=>{(await import(`./register.maintenance-vhmmqtIi.js`)).registerMaintenanceCommands(e)}},{commands:[{name:`message`,description:`Send, read, and manage messages`,hasSubcommands:!0}],register:async({program:e,ctx:t})=>{(await import(`./register.message-3zVHQZ27.js`)).registerMessageCommands(e,t)}},{commands:[{name:`memory`,description:`Search and reindex memory files`,hasSubcommands:!0}],register:async({program:e})=>{(await import(`./memory-cli-jhzJ3as7.js`).then(e=>e.t)).registerMemoryCli(e)}},{commands:[{name:`agent`,description:`Run one agent turn via the Gateway`,hasSubcommands:!1},{name:`agents`,description:`Manage isolated agents (workspaces, auth, routing)`,hasSubcommands:!0}],register:async({program:e,ctx:t})=>{(await import(`./register.agent-Dl2Ef-K5.js`)).registerAgentCommands(e,{agentChannelOptions:t.agentChannelOptions})}},{commands:[{name:`status`,description:`Show channel health and recent session recipients`,hasSubcommands:!1},{name:`health`,description:`Fetch health from the running gateway`,hasSubcommands:!1},{name:`sessions`,description:`List stored conversation sessions`,hasSubcommands:!0}],register:async({program:e})=>{(await import(`./register.status-health-sessions-Bo9VWxLG.js`)).registerStatusHealthSessionsCommands(e)}},{commands:[{name:`browser`,description:`Manage OpenClaw's dedicated browser (Chrome/Chromium)`,hasSubcommands:!0}],register:async({program:e})=>{(await import(`./browser-cli-DQHE2iPY.js`)).registerBrowserCli(e)}}];function y(e){let t=new Set,n=[];for(let r of v)for(let i of r.commands)e&&!e(i)||t.has(i.name)||(t.add(i.name),n.push(i.name));return n}function b(){return y()}function x(){return y(e=>e.hasSubcommands)}function S(e,t){for(let n of t.commands)s(e,n.name)}function C(e,t,n,r){let i=e.command(r.name).description(r.description);i.allowUnknownOption(!0),i.allowExcessArguments(!0),i.action(async(...r)=>{S(e,n),await n.register({program:e,ctx:t,argv:process.argv}),await a(e,r)})}async function w(e,t,n,r=process.argv){let i=v.find(e=>e.commands.some(e=>e.name===n));return i?(S(e,i),await i.register({program:e,ctx:t,argv:r}),!0):!1}function T(t,n,r){let i=e(r);if(i&&_(r)){let e=v.find(e=>e.commands.some(e=>e.name===i));if(e){let r=e.commands.find(e=>e.name===i);r&&C(t,n,e,r);return}}for(let e of v)for(let r of e.commands)C(t,n,e,r)}function E(e,t,n=process.argv){T(e,t,n),g(e,n)}const D=Symbol.for(`openclaw.cli.programContext`);function O(e,t){e[D]=t}function k(e){return e[D]}export{w as a,f as c,x as i,m as l,O as n,E as o,b as r,p as s,k as t};
2
+ //# sourceMappingURL=program-context-lyPXjPfN.js.map
@@ -1,4 +1,4 @@
1
- import{d as e,g as t,m as n,t as r,u as i,y as a}from"./paths-B4IRk3wi.js";import{N as o,p as s}from"./subsystem-C5XF2Fy5.js";import{C as c,S as l,g as u,y as d}from"./utils-UGOV_184.js";import{$a as f,$l as p,A as m,Bo as h,Br as g,Co as _,Ga as v,Hn as y,Ja as b,Oi as x,Vl as S,Yl as C,Zs as w,_ as T,a as ee,ai as E,as as D,da as O,ds as k,fu as A,go as j,h as M,hs as N,ii as te,jt as ne,ls as re,nc as ie,ou as ae,pu as oe,rs as se,sa as ce,so as le,su as ue}from"./model-selection-BlC_rXAN.js";import{Dr as de,Nr as fe,Xt as pe,Zt as me,a as he,i as ge,o as _e,ot as ve}from"./reply-CjyZeZ-j.js";import{_ as ye,a as be,d as P,f as F}from"./agent-scope-DXZc3eNT.js";import{E as xe}from"./session-key-D3P0tf5P.js";import{t as Se}from"./openclaw-root-D_0Q6--h.js";import{a as I,d as Ce}from"./types.secrets-C-5U96pc.js";import{t as L}from"./command-format-BbDT1tlm.js";import{t as we}from"./env-D7wNuBx1.js";import{n as Te}from"./plugins-CYLrFT4h.js";import{n as Ee,t as R}from"./exec-DHqLtFYt.js";import{c as De,n as Oe,r as ke,s as Ae}from"./paths-yLEk_25I.js";import{n as je}from"./model-catalog-C1kpjR75.js";import{n as Me,t as Ne}from"./call-CqoMqP5b.js";import{f as Pe,m as Fe,p as Ie}from"./send-B7sHR38c2.js";import{g as Le}from"./read-only-account-inspect-DBwAwB3_.js";import{r as Re,t as ze}from"./wsl-Ok7GaSJ6.js";import{h as Be,n as Ve,p as He,s as Ue}from"./onboard-helpers-zwybUJWu.js";import{n as z,r as We,t as Ge}from"./prompt-style-CXKekIBY.js";import{i as Ke}from"./memory-cli-jhzJ3as7.js";import{a as qe,i as Je}from"./manager-M1GKhLUC.js";import{g as Ye,m as Xe,p as Ze,u as Qe}from"./arg-split-DE5RqDHq.js";import{t as $e}from"./skills-status-BWIugRCz.js";import{t as B}from"./note-D4GAwgha.js";import{t as et}from"./channels-status-issues-PRgOT90w.js";import{a as tt,o as nt}from"./daemon-install-plan.shared-CfA37Ut_.js";import{n as V,r as rt,t as it}from"./gateway-install-token-DiDvDPJQ.js";import{n as at,t as H}from"./daemon-runtime-DHiDbRuC.js";import{i as ot,u as st}from"./systemd-D7odsu4K.js";import{a as ct,i as lt,n as U,o as ut,s as dt,t as ft}from"./service-BtB9epJk.js";import{c as pt,i as mt,n as ht,o as gt,r as _t,s as vt,t as yt,u as bt}from"./systemd-hints-C0DKDl35.js";import{t as xt}from"./diagnostics-BgbeL9KE.js";import{n as St,t as Ct}from"./inspect-BKV-I1UE.js";import{r as wt}from"./health-RQzDNQwf.js";import{i as Tt,r as Et}from"./control-ui-assets-BIa0GGDg.js";import{t as Dt}from"./channel-account-context-BMPAMZEv.js";import{t as Ot,u as kt}from"./update-runner-mMbwEOlU.js";import{n as At}from"./logging-Dqe9dxSX.js";import{n as jt}from"./oauth-tls-preflight-ByNjbUR5.js";import{n as Mt,r as Nt,t as Pt}from"./doctor-config-flow-DnOyVZhQ.js";import{t as Ft}from"./systemd-linger-C2MJD6KG.js";import{t as It}from"./health-format-VBr6LEpt.js";import{n as Lt}from"./doctor-completion-Bad_h3hm.js";import W from"node:fs";import G from"node:os";import K from"node:path";import{promisify as Rt}from"node:util";import q from"node:fs/promises";import{execFile as zt}from"node:child_process";import{confirm as Bt,intro as Vt,outro as Ht,select as Ut}from"@clack/prompts";async function Wt(e,t){let n=S({cfg:e,store:C(),provider:`anthropic`,legacyProfileId:`anthropic:default`});return!n.migrated||n.changes.length===0||(B(n.changes.map(e=>`- ${e}`).join(`
1
+ import{d as e,g as t,m as n,t as r,u as i,y as a}from"./paths-B4IRk3wi.js";import{N as o,p as s}from"./subsystem-C5XF2Fy5.js";import{C as c,S as l,g as u,y as d}from"./utils-UGOV_184.js";import{$a as f,$l as p,A as m,Bo as h,Br as g,Co as _,Ga as v,Hn as y,Ja as b,Oi as x,Vl as S,Yl as C,Zs as w,_ as T,a as ee,ai as E,as as D,da as O,ds as k,fu as A,go as j,h as M,hs as N,ii as te,jt as ne,ls as re,nc as ie,ou as ae,pu as oe,rs as se,sa as ce,so as le,su as ue}from"./model-selection-BlC_rXAN.js";import{Dr as de,Nr as fe,Xt as pe,Zt as me,a as he,i as ge,o as _e,ot as ve}from"./reply-CjyZeZ-j.js";import{_ as ye,a as be,d as P,f as F}from"./agent-scope-DXZc3eNT.js";import{E as xe}from"./session-key-D3P0tf5P.js";import{t as Se}from"./openclaw-root-D_0Q6--h.js";import{a as I,d as Ce}from"./types.secrets-C-5U96pc.js";import{t as L}from"./command-format-BbDT1tlm.js";import{t as we}from"./env-D7wNuBx1.js";import{n as Te}from"./plugins-CYLrFT4h.js";import{n as Ee,t as R}from"./exec-DHqLtFYt.js";import{c as De,n as Oe,r as ke,s as Ae}from"./paths-yLEk_25I.js";import{n as je}from"./model-catalog-C1kpjR75.js";import{n as Me,t as Ne}from"./call-CqoMqP5b.js";import{f as Pe,m as Fe,p as Ie}from"./send-B7sHR38c2.js";import{g as Le}from"./read-only-account-inspect-DBwAwB3_.js";import{r as Re,t as ze}from"./wsl-Ok7GaSJ6.js";import{h as Be,n as Ve,p as He,s as Ue}from"./onboard-helpers-zwybUJWu.js";import{n as z,r as We,t as Ge}from"./prompt-style-CXKekIBY.js";import{i as Ke}from"./memory-cli-jhzJ3as7.js";import{a as qe,i as Je}from"./manager-M1GKhLUC.js";import{g as Ye,m as Xe,p as Ze,u as Qe}from"./arg-split-DE5RqDHq.js";import{t as $e}from"./skills-status-BWIugRCz.js";import{t as B}from"./note-D4GAwgha.js";import{t as et}from"./channels-status-issues-PRgOT90w.js";import{a as tt,o as nt}from"./daemon-install-plan.shared-CfA37Ut_.js";import{n as V,r as rt,t as it}from"./gateway-install-token-DiDvDPJQ.js";import{n as at,t as H}from"./daemon-runtime-DHiDbRuC.js";import{i as ot,u as st}from"./systemd-D7odsu4K.js";import{a as ct,i as lt,n as U,o as ut,s as dt,t as ft}from"./service-BtB9epJk.js";import{c as pt,i as mt,n as ht,o as gt,r as _t,s as vt,t as yt,u as bt}from"./systemd-hints-C0DKDl35.js";import{t as xt}from"./diagnostics-BgbeL9KE.js";import{n as St,t as Ct}from"./inspect-BKV-I1UE.js";import{r as wt}from"./health-RQzDNQwf.js";import{i as Tt,r as Et}from"./control-ui-assets-BIa0GGDg.js";import{t as Dt}from"./channel-account-context-BMPAMZEv.js";import{t as Ot,u as kt}from"./update-runner-mMbwEOlU.js";import{n as At}from"./logging-Dqe9dxSX.js";import{n as jt}from"./oauth-tls-preflight-ByNjbUR5.js";import{n as Mt,r as Nt,t as Pt}from"./doctor-config-flow-DnOyVZhQ.js";import{t as Ft}from"./systemd-linger-C2MJD6KG.js";import{t as It}from"./health-format-VBr6LEpt.js";import{n as Lt}from"./doctor-completion-Da0cocZX.js";import W from"node:fs";import G from"node:os";import K from"node:path";import{promisify as Rt}from"node:util";import q from"node:fs/promises";import{execFile as zt}from"node:child_process";import{confirm as Bt,intro as Vt,outro as Ht,select as Ut}from"@clack/prompts";async function Wt(e,t){let n=S({cfg:e,store:C(),provider:`anthropic`,legacyProfileId:`anthropic:default`});return!n.migrated||n.changes.length===0||(B(n.changes.map(e=>`- ${e}`).join(`
2
2
  `),`Auth profiles`),!await t.confirm({message:`Update Anthropic OAuth profile id in config now?`,initialValue:!0}))?e:n.config}function Gt(e,t){if(!e)return{next:e,changed:!1};let n=!1,r={};for(let[i,a]of Object.entries(e)){let e=a.filter(e=>!t.has(e));e.length!==a.length&&(n=!0),e.length>0&&(r[i]=e)}return{next:Object.keys(r).length>0?r:void 0,changed:n}}function Kt(e,t){let n=e.auth?.profiles,r=e.auth?.order,i=n?{...n}:void 0,a=!1;if(i)for(let e of t)e in i&&(delete i[e],a=!0);let o=Gt(r,t);if(o.changed&&(a=!0),!a)return{next:e,changed:!1};let s=i||o.next?{...e.auth,profiles:i&&Object.keys(i).length>0?i:void 0,order:o.next}:void 0;return{next:{...e,auth:s},changed:!0}}async function qt(e,t){let n=C(void 0,{allowKeychainPrompt:!1}),r=new Set;if((n.profiles[`anthropic:claude-cli`]||e.auth?.profiles?.[`anthropic:claude-cli`])&&r.add(ae),(n.profiles[`openai-codex:codex-cli`]||e.auth?.profiles?.[`openai-codex:codex-cli`])&&r.add(ue),r.size===0)return e;let i=[`Deprecated external CLI auth profiles detected (no longer supported):`];if(r.has(`anthropic:claude-cli`)&&i.push(`- ${ae} (Anthropic): use setup-token → ${L(`openclaw models auth setup-token`)}`),r.has(`openai-codex:codex-cli`)&&i.push(`- ${ue} (OpenAI Codex): use OAuth → ${L(`openclaw models auth login --provider openai-codex`)}`),B(i.join(`
3
3
  `),`Auth profiles`),!await t.confirmRepair({message:`Remove deprecated CLI auth profiles now?`,initialValue:!0}))return e;await p({updater:e=>{let t=!1;for(let n of r)e.profiles[n]&&(delete e.profiles[n],t=!0),e.usageStats?.[n]&&(delete e.usageStats[n],t=!0);if(e.order)for(let[n,i]of Object.entries(e.order)){let a=i.filter(e=>!r.has(e));a.length!==i.length&&(t=!0,a.length>0?e.order[n]=a:delete e.order[n])}if(e.lastGood)for(let[n,i]of Object.entries(e.lastGood))r.has(i)&&(delete e.lastGood[n],t=!0);return t}});let a=Kt(e,r);return a.changed&&B(Array.from(r.values()).map(e=>`- removed ${e} from config`).join(`
4
4
  `),`Doctor changes`),a.next}function Jt(e){if(e.kind===`disabled`){if(e.reason===`billing`)return`Top up credits (provider billing) or switch provider.`;if(e.reason===`auth_permanent`||e.reason===`auth`)return`Refresh or replace credentials, then retry.`}return`Wait for cooldown or switch provider.`}function Yt(e){return e.reasonCode===`invalid_expires`?`Invalid token expires metadata. Set a future Unix ms timestamp or remove expires.`:e.provider===`anthropic`&&e.profileId===`anthropic:claude-cli`?`Deprecated profile. Use ${L(`openclaw models auth setup-token`)} or ${L(`openclaw configure`)}.`:e.provider===`openai-codex`&&e.profileId===`openai-codex:codex-cli`?`Deprecated profile. Use ${L(`openclaw models auth login --provider openai-codex`)} or ${L(`openclaw configure`)}.`:`Re-auth via \`${L(`openclaw configure`)}\` or \`${L(`openclaw onboard`)}\`.`}function Xt(e){let t=e.remainingMs===void 0?``:` (${_e(e.remainingMs)})`,n=Yt(e),r=e.reasonCode?` [${e.reasonCode}]`:``;return`- ${e.profileId}: ${e.status}${r}${t}${n?` — ${n}`:``}`}async function Zt(e){let t=C(void 0,{allowKeychainPrompt:e.allowKeychainPrompt}),n=(()=>{let e=Date.now(),n=[];for(let r of Object.keys(t.usageStats??{})){let i=ne(t,r);if(!i||e>=i)continue;let a=t.usageStats?.[r],o=_e(i-e),s=typeof a?.disabledUntil==`number`&&e<a.disabledUntil,c=s?`disabled${a.disabledReason?`:${a.disabledReason}`:``}`:`cooldown`,l=Jt({kind:s?`disabled`:`cooldown`,reason:a?.disabledReason});n.push(`- ${r}: ${c} (${o})${l?` — ${l}`:``}`)}return n})();n.length>0&&B(n.join(`
@@ -69,4 +69,4 @@ import{d as e,g as t,m as n,t as r,u as i,y as a}from"./paths-B4IRk3wi.js";impor
69
69
  `),`Doctor changes`),e.warnings.length>0&&B(e.warnings.join(`
70
70
  `),`Doctor warnings`)}if(await wr(o,n,a.path??r),await er({shouldRepair:n.shouldRepair}),await rn({cfg:o,options:t,prompter:n}),o=await Jn(o,e,n),Yn(o),await Sn(t,e,n),await xn(o,$(o),e,n),await An(),await Nn(o),await Zn(o),await jt({cfg:o,deep:t.deep===!0}),o.hooks?.gmail?.model?.trim()){let e=T({cfg:o,defaultProvider:oe});if(!e)B(`- hooks.gmail.model "${o.hooks.gmail.model}" could not be resolved`,`Hooks`);else{let{provider:t,model:n}=M({cfg:o,defaultProvider:oe,defaultModel:A}),r=await je({config:o}),i=ee({cfg:o,catalog:r,ref:e,defaultProvider:t,defaultModel:n}),a=[];i.allowed||a.push(`- hooks.gmail.model "${i.key}" not in agents.defaults.models allowlist (will use primary instead)`),i.inCatalog||a.push(`- hooks.gmail.model "${i.key}" not in the model catalog (may fail at runtime)`),a.length>0&&B(a.join(`
71
71
  `),`Hooks`)}}if(t.nonInteractive!==!0&&process.platform===`linux`&&$(o)===`local`){let t=U(),r=!1;try{r=await t.isLoaded({env:process.env})}catch{r=!1}r&&await Ft({runtime:e,prompter:{confirm:async e=>n.confirm(e),note:B},reason:`Gateway runs as a systemd user service. Without lingering, systemd stops the user session on logout/idle and kills the Gateway.`,requireConfirm:!0})}Nr(o),await en(o),await Lt(e,n,{nonInteractive:t.nonInteractive});let{healthOk:h}=await ln({runtime:e,cfg:o,timeoutMs:t.nonInteractive===!0?3e3:1e4}),g=h?await un({cfg:o,timeoutMs:t.nonInteractive===!0?3e3:1e4}):{checked:!1,ready:!1};if(await wn(o,{gatewayMemoryProbe:g}),await cn({cfg:o,runtime:e,prompter:n,options:t,gatewayDetailsMessage:p.message,healthOk:h}),a.shouldWriteConfig||JSON.stringify(o)!==JSON.stringify(c)){o=Ve(o,{command:`doctor`,mode:$(o)}),await ie(o),At(e);let t=`${r}.bak`;W.existsSync(t)&&e.log(`Backup: ${l(t)}`)}else n.shouldRepair||e.log(`Run "${L(`openclaw doctor --fix`)}" to apply changes.`);if(t.workspaceSuggestions!==!1){let e=P(o,F(o));Tr(e),await Ar(e)&&B(kr,`Workspace`)}let _=await w();if(_.exists&&!_.valid){e.error(`Invalid config:`);for(let t of _.issues){let n=t.path||`<root>`;e.error(`- ${n}: ${t.message}`)}}Fr(`Doctor complete.`)}function Lr(e){return Ut({...e,message:z(e.message),options:e.options.map(e=>e.hint===void 0?e:{...e,hint:Ge(e.hint)})})}export{Ir as n,Lr as t};
72
- //# sourceMappingURL=prompt-select-styled-hxyoyq2i.js.map
72
+ //# sourceMappingURL=prompt-select-styled-DmTwJKOO.js.map
@@ -1,4 +1,4 @@
1
- import{N as e,p as t}from"./subsystem-BLbY429l.js";import{d as n,g as r,m as i,t as a,u as o,y as s}from"./paths-BjD3T_xq.js";import{i as c}from"./entry.js";import{$a as l,Ai as u,Bo as d,Fo as f,Ki as p,Kn as m,Kr as h,Ni as g,On as _,Ri as v,Tc as y,Ua as b,Va as x,Xr as S,Ya as ee,Yc as C,Zc as w,_c as T,ca as E,du as D,fu as O,gr as k,hu as A,jt as te,kc as j,l as ne,mu as re,qa as ie,qn as ae,ta as oe,ul as se,wa as ce,zc as le}from"./auth-profiles-T8DuH3ax.js";import{t as M}from"./command-format-CLxIPuLR.js";import{_ as ue,a as de,d as N,f as P}from"./agent-scope-DAWJwFfl.js";import{E as fe}from"./session-key-C7F_iqYg.js";import{S as pe,h as me,v as he,x as F}from"./utils-CGdo13HV.js";import{t as ge}from"./openclaw-root-CnsBf6ZU.js";import{a as I,d as _e}from"./types.secrets-D4tbc3Wq.js";import{n as ve}from"./plugins-DNlgeTTc.js";import{n as ye,t as L}from"./exec-B3eleY5O.js";import{Cr as be,Or as xe,Pr as Se,Sr as Ce,an as we,in as Te,l as Ee,rn as De}from"./compact-BEeB6bwq.js";import{c as Oe,n as ke,r as Ae,s as je}from"./paths-BfjJY2VL.js";import{C as Me,S as Ne,w as Pe}from"./send-DkiKKUkt.js";import{n as Fe}from"./model-catalog-COVzoZD9.js";import{n as Ie,t as Le}from"./call-B8Fb4_oh.js";import{u as Re}from"./pi-tools.policy-D40r0HmD.js";import{g as ze,m as Be,p as Ve,u as He}from"./arg-split-BOqSMBuf.js";import{r as Ue,t as We}from"./wsl-DHxB2Ew_.js";import{h as Ge,n as Ke,p as qe,s as Je}from"./onboard-helpers-PGl5bVPE.js";import{n as R,r as Ye,t as Xe}from"./prompt-style-BThRSQJR.js";import{r as Ze}from"./search-manager-Bp9x20r6.js";import{a as Qe,i as $e}from"./manager-C2YW7Hkq.js";import{t as et}from"./skills-status-DswSl5aD.js";import{t as z}from"./note-Dp-d_utk.js";import{t as tt}from"./channels-status-issues-8eFrGKyf.js";import{a as nt,o as rt}from"./daemon-install-plan.shared-Dx3DBXCG.js";import{n as B,r as it,t as at}from"./gateway-install-token-BCnuZeh1.js";import{n as ot,t as V}from"./daemon-runtime-VcpeBRJV.js";import{i as st,u as ct}from"./systemd-DbevZh65.js";import{a as lt,i as ut,n as dt,o as ft,s as pt,t as mt}from"./service-DZ9EbS15.js";import{c as ht,i as gt,n as _t,o as vt,r as yt,s as bt,t as xt,u as St}from"./systemd-hints-lXpMy-kY.js";import{t as Ct}from"./diagnostics-Cdctg9K_.js";import{n as wt,t as Tt}from"./inspect-z59cgmYc.js";import{r as Et}from"./health-DBu0V1Y-.js";import{i as Dt,r as Ot}from"./control-ui-assets-CTHGGgaX.js";import{t as kt}from"./channel-account-context-DAcarnqW.js";import{t as At,u as jt}from"./update-runner-CvWH2ZAc.js";import{n as Mt}from"./logging-tYw1NbJd.js";import{n as Nt}from"./oauth-tls-preflight-BSBRDIfC.js";import{n as Pt,r as Ft,t as It}from"./doctor-config-flow-D4F3mz4h.js";import{t as Lt}from"./systemd-linger-cWKbFNpu.js";import{t as Rt}from"./health-format-B1nj3Wfn.js";import{n as zt}from"./doctor-completion-APZJ17BJ.js";import{execFile as Bt}from"node:child_process";import H from"node:os";import U from"node:path";import W from"node:fs";import{promisify as Vt}from"node:util";import G from"node:fs/promises";import{confirm as Ht,intro as Ut,outro as Wt,select as Gt}from"@clack/prompts";async function Kt(e,t){let n=T({cfg:e,store:y(),provider:`anthropic`,legacyProfileId:`anthropic:default`});return!n.migrated||n.changes.length===0||(z(n.changes.map(e=>`- ${e}`).join(`
1
+ import{N as e,p as t}from"./subsystem-BLbY429l.js";import{d as n,g as r,m as i,t as a,u as o,y as s}from"./paths-BjD3T_xq.js";import{i as c}from"./entry.js";import{$a as l,Ai as u,Bo as d,Fo as f,Ki as p,Kn as m,Kr as h,Ni as g,On as _,Ri as v,Tc as y,Ua as b,Va as x,Xr as S,Ya as ee,Yc as C,Zc as w,_c as T,ca as E,du as D,fu as O,gr as k,hu as A,jt as te,kc as j,l as ne,mu as re,qa as ie,qn as ae,ta as oe,ul as se,wa as ce,zc as le}from"./auth-profiles-T8DuH3ax.js";import{t as M}from"./command-format-CLxIPuLR.js";import{_ as ue,a as de,d as N,f as P}from"./agent-scope-DAWJwFfl.js";import{E as fe}from"./session-key-C7F_iqYg.js";import{S as pe,h as me,v as he,x as F}from"./utils-CGdo13HV.js";import{t as ge}from"./openclaw-root-CnsBf6ZU.js";import{a as I,d as _e}from"./types.secrets-D4tbc3Wq.js";import{n as ve}from"./plugins-DNlgeTTc.js";import{n as ye,t as L}from"./exec-B3eleY5O.js";import{Cr as be,Or as xe,Pr as Se,Sr as Ce,an as we,in as Te,l as Ee,rn as De}from"./compact-BEeB6bwq.js";import{c as Oe,n as ke,r as Ae,s as je}from"./paths-BfjJY2VL.js";import{C as Me,S as Ne,w as Pe}from"./send-DkiKKUkt.js";import{n as Fe}from"./model-catalog-COVzoZD9.js";import{n as Ie,t as Le}from"./call-B8Fb4_oh.js";import{u as Re}from"./pi-tools.policy-D40r0HmD.js";import{g as ze,m as Be,p as Ve,u as He}from"./arg-split-BOqSMBuf.js";import{r as Ue,t as We}from"./wsl-DHxB2Ew_.js";import{h as Ge,n as Ke,p as qe,s as Je}from"./onboard-helpers-PGl5bVPE.js";import{n as R,r as Ye,t as Xe}from"./prompt-style-BThRSQJR.js";import{r as Ze}from"./search-manager-Bp9x20r6.js";import{a as Qe,i as $e}from"./manager-C2YW7Hkq.js";import{t as et}from"./skills-status-DswSl5aD.js";import{t as z}from"./note-Dp-d_utk.js";import{t as tt}from"./channels-status-issues-8eFrGKyf.js";import{a as nt,o as rt}from"./daemon-install-plan.shared-Dx3DBXCG.js";import{n as B,r as it,t as at}from"./gateway-install-token-BCnuZeh1.js";import{n as ot,t as V}from"./daemon-runtime-VcpeBRJV.js";import{i as st,u as ct}from"./systemd-DbevZh65.js";import{a as lt,i as ut,n as dt,o as ft,s as pt,t as mt}from"./service-DZ9EbS15.js";import{c as ht,i as gt,n as _t,o as vt,r as yt,s as bt,t as xt,u as St}from"./systemd-hints-lXpMy-kY.js";import{t as Ct}from"./diagnostics-Cdctg9K_.js";import{n as wt,t as Tt}from"./inspect-z59cgmYc.js";import{r as Et}from"./health-DBu0V1Y-.js";import{i as Dt,r as Ot}from"./control-ui-assets-CTHGGgaX.js";import{t as kt}from"./channel-account-context-DAcarnqW.js";import{t as At,u as jt}from"./update-runner-CvWH2ZAc.js";import{n as Mt}from"./logging-tYw1NbJd.js";import{n as Nt}from"./oauth-tls-preflight-BSBRDIfC.js";import{n as Pt,r as Ft,t as It}from"./doctor-config-flow-D4F3mz4h.js";import{t as Lt}from"./systemd-linger-cWKbFNpu.js";import{t as Rt}from"./health-format-B1nj3Wfn.js";import{n as zt}from"./doctor-completion-DpCWb88H.js";import{execFile as Bt}from"node:child_process";import H from"node:os";import U from"node:path";import W from"node:fs";import{promisify as Vt}from"node:util";import G from"node:fs/promises";import{confirm as Ht,intro as Ut,outro as Wt,select as Gt}from"@clack/prompts";async function Kt(e,t){let n=T({cfg:e,store:y(),provider:`anthropic`,legacyProfileId:`anthropic:default`});return!n.migrated||n.changes.length===0||(z(n.changes.map(e=>`- ${e}`).join(`
2
2
  `),`Auth profiles`),!await t.confirm({message:`Update Anthropic OAuth profile id in config now?`,initialValue:!0}))?e:n.config}function qt(e,t){if(!e)return{next:e,changed:!1};let n=!1,r={};for(let[i,a]of Object.entries(e)){let e=a.filter(e=>!t.has(e));e.length!==a.length&&(n=!0),e.length>0&&(r[i]=e)}return{next:Object.keys(r).length>0?r:void 0,changed:n}}function Jt(e,t){let n=e.auth?.profiles,r=e.auth?.order,i=n?{...n}:void 0,a=!1;if(i)for(let e of t)e in i&&(delete i[e],a=!0);let o=qt(r,t);if(o.changed&&(a=!0),!a)return{next:e,changed:!1};let s=i||o.next?{...e.auth,profiles:i&&Object.keys(i).length>0?i:void 0,order:o.next}:void 0;return{next:{...e,auth:s},changed:!0}}async function Yt(e,t){let n=y(void 0,{allowKeychainPrompt:!1}),r=new Set;if((n.profiles[`anthropic:claude-cli`]||e.auth?.profiles?.[`anthropic:claude-cli`])&&r.add(re),(n.profiles[`openai-codex:codex-cli`]||e.auth?.profiles?.[`openai-codex:codex-cli`])&&r.add(A),r.size===0)return e;let i=[`Deprecated external CLI auth profiles detected (no longer supported):`];if(r.has(`anthropic:claude-cli`)&&i.push(`- ${re} (Anthropic): use setup-token → ${M(`openclaw models auth setup-token`)}`),r.has(`openai-codex:codex-cli`)&&i.push(`- ${A} (OpenAI Codex): use OAuth → ${M(`openclaw models auth login --provider openai-codex`)}`),z(i.join(`
3
3
  `),`Auth profiles`),!await t.confirmRepair({message:`Remove deprecated CLI auth profiles now?`,initialValue:!0}))return e;await j({updater:e=>{let t=!1;for(let n of r)e.profiles[n]&&(delete e.profiles[n],t=!0),e.usageStats?.[n]&&(delete e.usageStats[n],t=!0);if(e.order)for(let[n,i]of Object.entries(e.order)){let a=i.filter(e=>!r.has(e));a.length!==i.length&&(t=!0,a.length>0?e.order[n]=a:delete e.order[n])}if(e.lastGood)for(let[n,i]of Object.entries(e.lastGood))r.has(i)&&(delete e.lastGood[n],t=!0);return t}});let a=Jt(e,r);return a.changed&&z(Array.from(r.values()).map(e=>`- removed ${e} from config`).join(`
4
4
  `),`Doctor changes`),a.next}function Xt(e){if(e.kind===`disabled`){if(e.reason===`billing`)return`Top up credits (provider billing) or switch provider.`;if(e.reason===`auth_permanent`||e.reason===`auth`)return`Refresh or replace credentials, then retry.`}return`Wait for cooldown or switch provider.`}function Zt(e){return e.reasonCode===`invalid_expires`?`Invalid token expires metadata. Set a future Unix ms timestamp or remove expires.`:e.provider===`anthropic`&&e.profileId===`anthropic:claude-cli`?`Deprecated profile. Use ${M(`openclaw models auth setup-token`)} or ${M(`openclaw configure`)}.`:e.provider===`openai-codex`&&e.profileId===`openai-codex:codex-cli`?`Deprecated profile. Use ${M(`openclaw models auth login --provider openai-codex`)} or ${M(`openclaw configure`)}.`:`Re-auth via \`${M(`openclaw configure`)}\` or \`${M(`openclaw onboard`)}\`.`}function Qt(e){let t=e.remainingMs===void 0?``:` (${we(e.remainingMs)})`,n=Zt(e),r=e.reasonCode?` [${e.reasonCode}]`:``;return`- ${e.profileId}: ${e.status}${r}${t}${n?` — ${n}`:``}`}async function $t(e){let t=y(void 0,{allowKeychainPrompt:e.allowKeychainPrompt}),n=(()=>{let e=Date.now(),n=[];for(let r of Object.keys(t.usageStats??{})){let i=ne(t,r);if(!i||e>=i)continue;let a=t.usageStats?.[r],o=we(i-e),s=typeof a?.disabledUntil==`number`&&e<a.disabledUntil,c=s?`disabled${a.disabledReason?`:${a.disabledReason}`:``}`:`cooldown`,l=Xt({kind:s?`disabled`:`cooldown`,reason:a?.disabledReason});n.push(`- ${r}: ${c} (${o})${l?` — ${l}`:``}`)}return n})();n.length>0&&z(n.join(`
@@ -69,4 +69,4 @@ import{N as e,p as t}from"./subsystem-BLbY429l.js";import{d as n,g as r,m as i,t
69
69
  `),`Doctor changes`),e.warnings.length>0&&z(e.warnings.join(`
70
70
  `),`Doctor warnings`)}if(await wr(s,r,o.path??a),await tr({shouldRepair:r.shouldRepair}),await an({cfg:s,options:n,prompter:r}),s=await Yn(s,e,r),Xn(s),await Cn(n,e,r),await Sn(s,$(s),e,r),await jn(),await Pn(s),await Qn(s),await Nt({cfg:s,deep:n.deep===!0}),s.hooks?.gmail?.model?.trim()){let e=w({cfg:s,defaultProvider:O});if(!e)z(`- hooks.gmail.model "${s.hooks.gmail.model}" could not be resolved`,`Hooks`);else{let{provider:t,model:n}=C({cfg:s,defaultProvider:O,defaultModel:D}),r=await Fe({config:s}),i=le({cfg:s,catalog:r,ref:e,defaultProvider:t,defaultModel:n}),a=[];i.allowed||a.push(`- hooks.gmail.model "${i.key}" not in agents.defaults.models allowlist (will use primary instead)`),i.inCatalog||a.push(`- hooks.gmail.model "${i.key}" not in the model catalog (may fail at runtime)`),a.length>0&&z(a.join(`
71
71
  `),`Hooks`)}}if(n.nonInteractive!==!0&&process.platform===`linux`&&$(s)===`local`){let t=dt(),n=!1;try{n=await t.isLoaded({env:process.env})}catch{n=!1}n&&await Lt({runtime:e,prompter:{confirm:async e=>r.confirm(e),note:z},reason:`Gateway runs as a systemd user service. Without lingering, systemd stops the user session on logout/idle and kills the Gateway.`,requireConfirm:!0})}Nr(s),await tn(s),await zt(e,r,{nonInteractive:n.nonInteractive});let{healthOk:h}=await un({runtime:e,cfg:s,timeoutMs:n.nonInteractive===!0?3e3:1e4}),_=h?await dn({cfg:s,timeoutMs:n.nonInteractive===!0?3e3:1e4}):{checked:!1,ready:!1};if(await Tn(s,{gatewayMemoryProbe:_}),await ln({cfg:s,runtime:e,prompter:r,options:n,gatewayDetailsMessage:p.message,healthOk:h}),o.shouldWriteConfig||JSON.stringify(s)!==JSON.stringify(c)){s=Ke(s,{command:`doctor`,mode:$(s)}),await d(s),Mt(e);let t=`${a}.bak`;W.existsSync(t)&&e.log(`Backup: ${F(t)}`)}else r.shouldRepair||e.log(`Run "${M(`openclaw doctor --fix`)}" to apply changes.`);if(n.workspaceSuggestions!==!1){let e=N(s,P(s));Tr(e),await Ar(e)&&z(kr,`Workspace`)}let y=await f();if(y.exists&&!y.valid){e.error(`Invalid config:`);for(let t of y.issues){let n=t.path||`<root>`;e.error(`- ${n}: ${t.message}`)}}Fr(`Doctor complete.`)}function Lr(e){return Gt({...e,message:R(e.message),options:e.options.map(e=>e.hint===void 0?e:{...e,hint:Xe(e.hint)})})}export{Ir as n,Lr as t};
72
- //# sourceMappingURL=prompt-select-styled-C2c13Ndq.js.map
72
+ //# sourceMappingURL=prompt-select-styled-Z30OVmpM.js.map