@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.
- package/dist/build-info.json +3 -3
- package/dist/canvas-host/a2ui/.bundle.hash +1 -1
- package/dist/{command-registry-CPthpEk3.js → command-registry-CSBvrqwW.js} +2 -2
- package/dist/{completion-cli-DeGEpJri.js → completion-cli-Bizog38J.js} +2 -2
- package/dist/{completion-cli-C4_SZmjl.js → completion-cli-W1_FoDFF.js} +2 -2
- package/dist/{doctor-completion-Bad_h3hm.js → doctor-completion-Da0cocZX.js} +2 -2
- package/dist/{doctor-completion-APZJ17BJ.js → doctor-completion-DpCWb88H.js} +2 -2
- package/dist/entry.js +1 -1
- package/dist/{gateway-cli-CbJj0QhL.js → gateway-cli-C4YOlz3m.js} +5 -5
- package/dist/{gateway-cli-tXsBFRlk.js → gateway-cli-D78GfbjG.js} +5 -5
- package/dist/index.js +1 -1
- package/dist/{onboard-7i9A1nNd.js → onboard-2iF3lTUI.js} +2 -2
- package/dist/{onboard-DSaXIS5U.js → onboard-B9ouFJC7.js} +2 -2
- package/dist/{onboarding-RZTEMxl0.js → onboarding-BTBbx6Ka.js} +2 -2
- package/dist/{onboarding-BRewu6jg.js → onboarding-TkoOoq9D.js} +2 -2
- package/dist/{onboarding.finalize-Bp8ST2z_.js → onboarding.finalize-C9QGFQpa.js} +2 -2
- package/dist/{onboarding.finalize-Bi53z1zE.js → onboarding.finalize-CwjLMPKK.js} +2 -2
- package/dist/{program-D9AMAbv6.js → program-CCS3CIqA.js} +2 -2
- package/dist/{program-context-BX9wN65q.js → program-context-lyPXjPfN.js} +2 -2
- package/dist/{prompt-select-styled-hxyoyq2i.js → prompt-select-styled-DmTwJKOO.js} +2 -2
- package/dist/{prompt-select-styled-C2c13Ndq.js → prompt-select-styled-Z30OVmpM.js} +2 -2
- package/dist/{register.maintenance-BkM8-Ttt.js → register.maintenance-COWBeetm.js} +2 -2
- package/dist/{register.maintenance-AeTvVTtt.js → register.maintenance-vhmmqtIi.js} +2 -2
- package/dist/{register.onboard-C-j99DGw.js → register.onboard-CJZKG0PP.js} +2 -2
- package/dist/{register.onboard-BY-QLNp9.js → register.onboard-CaFl_mB1.js} +2 -2
- package/dist/{register.setup-DA4HFCro.js → register.setup-CSW03BKj.js} +2 -2
- package/dist/{register.setup-DiAi_1pJ.js → register.setup-DDkBFyvF.js} +2 -2
- package/dist/{register.subclis-smZuHVcv.js → register.subclis-B_0ZS-_K.js} +2 -2
- package/dist/{run-main-DEZR4lCo.js → run-main-CV49c7uu.js} +2 -2
- package/dist/{update-cli-ISorpxrU.js → update-cli--P65ciut.js} +2 -2
- package/dist/{update-cli-C0qadZEs.js → update-cli-Ibrshx_w.js} +2 -2
- package/package.json +1 -1
package/dist/build-info.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
e89823f0632d601e4fc7f1ab50adde522eab3e654d23a00d771f31fe0388fff8
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{t as e}from"./rolldown-runtime-CNxR59P3.js";import{J as t,Z as n}from"./subsystem-BLbY429l.js";import{i as r,o as i,s as a}from"./register.subclis-
|
|
2
|
-
//# sourceMappingURL=command-registry-
|
|
1
|
+
import{t as e}from"./rolldown-runtime-CNxR59P3.js";import{J as t,Z as n}from"./subsystem-BLbY429l.js";import{i as r,o as i,s as a}from"./register.subclis-B_0ZS-_K.js";var o=e({getCoreCliCommandNames:()=>u,getCoreCliCommandsWithSubcommands:()=>d,registerCoreCliByName:()=>m,registerCoreCliCommands:()=>h,registerProgramCommands:()=>g});const s=e=>!n(e),c=[{commands:[{name:`setup`,description:`Initialize local config and agent workspace`,hasSubcommands:!1}],register:async({program:e})=>{(await import(`./register.setup-DDkBFyvF.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-CaFl_mB1.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-CvPihXst.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-B9hEiZsw.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-PzF5rmeU.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-COWBeetm.js`)).registerMaintenanceCommands(e)}},{commands:[{name:`message`,description:`Send, read, and manage messages`,hasSubcommands:!0}],register:async({program:e,ctx:t})=>{(await import(`./register.message-CM_Qudzn.js`)).registerMessageCommands(e,t)}},{commands:[{name:`memory`,description:`Search and reindex memory files`,hasSubcommands:!0}],register:async({program:e})=>{(await import(`./memory-cli-XaxtBQm1.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-CisptTv_.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-BXiMraHZ.js`)).registerStatusHealthSessionsCommands(e)}},{commands:[{name:`browser`,description:`Manage OpenClaw's dedicated browser (Chrome/Chromium)`,hasSubcommands:!0}],register:async({program:e})=>{(await import(`./browser-cli-Dt0ds-an.js`)).registerBrowserCli(e)}}];function l(e){let t=new Set,n=[];for(let r of c)for(let i of r.commands)e&&!e(i)||t.has(i.name)||(t.add(i.name),n.push(i.name));return n}function u(){return l()}function d(){return l(e=>e.hasSubcommands)}function f(e,t){for(let n of t.commands)i(e,n.name)}function p(e,t,n,r){let i=e.command(r.name).description(r.description);i.allowUnknownOption(!0),i.allowExcessArguments(!0),i.action(async(...r)=>{f(e,n),await n.register({program:e,ctx:t,argv:process.argv}),await a(e,r)})}async function m(e,t,n,r=process.argv){let i=c.find(e=>e.commands.some(e=>e.name===n));return i?(f(e,i),await i.register({program:e,ctx:t,argv:r}),!0):!1}function h(e,n,r){let i=t(r);if(i&&s(r)){let t=c.find(e=>e.commands.some(e=>e.name===i));if(t){let r=t.commands.find(e=>e.name===i);r&&p(e,n,t,r);return}}for(let t of c)for(let r of t.commands)p(e,n,t,r)}function g(e,t,n=process.argv){h(e,t,n),r(e,n)}export{g as a,m as i,u as n,d as r,o as t};
|
|
2
|
+
//# sourceMappingURL=command-registry-CSBvrqwW.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{t as e}from"./rolldown-runtime-CNxR59P3.js";import{g as t}from"./paths-B4IRk3wi.js";import{A as n,i as r}from"./subsystem-C5XF2Fy5.js";import{h as i}from"./utils-UGOV_184.js";import{t as a}from"./links-CySwdMcF.js";import{a as o,c as s,l as c,r as l,t as u}from"./program-context-
|
|
1
|
+
import{t as e}from"./rolldown-runtime-CNxR59P3.js";import{g as t}from"./paths-B4IRk3wi.js";import{A as n,i as r}from"./subsystem-C5XF2Fy5.js";import{h as i}from"./utils-UGOV_184.js";import{t as a}from"./links-CySwdMcF.js";import{a as o,c as s,l as c,r as l,t as u}from"./program-context-lyPXjPfN.js";import d from"node:os";import f from"node:path";import p from"node:fs/promises";import{Option as m}from"commander";function h(e){return e.replace(/'/g,`'\\''`)}function g(e){let t=e.split(/[ ,|]+/);return{long:t.find(e=>e.startsWith(`--`))?.replace(/^--/,``),short:t.find(e=>e.startsWith(`-`)&&!e.startsWith(`--`))?.replace(/^-/,``)}}function _(e){let t=h(e.description);return`complete -c ${e.rootCmd} -n "${e.condition}" -a "${e.name}" -d '${t}'\n`}function v(e){let{short:t,long:n}=g(e.flags),r=h(e.description),i=`complete -c ${e.rootCmd} -n "${e.condition}"`;return t&&(i+=` -s ${t}`),n&&(i+=` -l ${n}`),i+=` -d '${r}'\n`,i}var y=e({completionCacheExists:()=>E,installCompletion:()=>R,isCompletionInstalled:()=>F,registerCompletionCli:()=>L,resolveCompletionCachePath:()=>T,resolveShellFromEnv:()=>S,usesSlowDynamicCompletion:()=>I});const b=[`zsh`,`bash`,`powershell`,`fish`];function x(e){return b.includes(e)}function S(e=process.env){let t=e.SHELL?.trim()??``,n=t?f.basename(t).toLowerCase():``;return n===`zsh`?`zsh`:n===`bash`?`bash`:n===`fish`?`fish`:n===`pwsh`||n===`powershell`?`powershell`:`zsh`}function C(e){let t=e.trim();return t?t.replace(/[^a-zA-Z0-9._-]/g,`-`):`openclaw`}function w(e=process.env){let n=t(e,d.homedir);return f.join(n,`completions`)}function T(e,t){let n=C(t),r=e===`powershell`?`ps1`:e===`fish`?`fish`:e===`bash`?`bash`:`zsh`;return f.join(w(),`${n}.${r}`)}async function E(e,t=`openclaw`){return i(T(e,t))}function D(e,t){return e===`zsh`?z(t):e===`bash`?U(t):e===`powershell`?G(t):K(t)}async function O(e){let t=w();await p.mkdir(t,{recursive:!0});for(let t of e.shells){let n=D(t,e.program),r=T(t,e.binName);await p.writeFile(r,n,`utf-8`)}}function k(e,t,n){return`source "${n}"`}function A(e){return e.trim()===`# OpenClaw Completion`}function j(e,t,n){return!!(e.includes(`${t} completion`)||n&&e.includes(n))}function M(e,t){return e.includes(`<(${t} completion`)||e.includes(`${t} completion`)&&e.includes(`| source`)}function N(e,t,n,r){let i=e.split(`
|
|
2
2
|
`),a=[],o=!1;for(let e=0;e<i.length;e+=1){let r=i[e]??``;if(A(r)){o=!0,e+=1;continue}if(j(r,t,n)){o=!0;continue}a.push(r)}let s=a.join(`
|
|
3
3
|
`).trimEnd(),c=`# OpenClaw Completion\n${r}`,l=s?`${s}\n\n${c}\n`:`${c}\n`;return{next:l,changed:l!==e,hadExisting:o}}function P(e){let t=process.env.HOME||d.homedir();return e===`zsh`?f.join(t,`.zshrc`):e===`bash`?f.join(t,`.bashrc`):e===`fish`?f.join(t,`.config`,`fish`,`config.fish`):process.platform===`win32`?f.join(process.env.USERPROFILE||t,`Documents`,`PowerShell`,`Microsoft.PowerShell_profile.ps1`):f.join(t,`.config`,`powershell`,`Microsoft.PowerShell_profile.ps1`)}async function F(e,t=`openclaw`){let n=P(e);if(!await i(n))return!1;let r=T(e,t),a=await i(r)?r:null;return(await p.readFile(n,`utf-8`)).split(`
|
|
4
4
|
`).some(e=>A(e)||j(e,t,a))}async function I(e,t=`openclaw`){let n=P(e);if(!await i(n))return!1;let r=T(e,t),a=(await p.readFile(n,`utf-8`)).split(`
|
|
@@ -116,4 +116,4 @@ Register-ArgumentCompleter -Native -CommandName ${t} -ScriptBlock {
|
|
|
116
116
|
${r}
|
|
117
117
|
}
|
|
118
118
|
`}function K(e){let t=e.name(),n=``,r=(e,i)=>{let a=e.name(),o=[...i];if(i.length>0&&o.push(a),i.length===0){for(let r of e.commands)n+=_({rootCmd:t,condition:`__fish_use_subcommand`,name:r.name(),description:r.description()});for(let r of e.options)n+=v({rootCmd:t,condition:`__fish_use_subcommand`,flags:r.flags,description:r.description})}else{for(let r of e.commands)n+=_({rootCmd:t,condition:`__fish_seen_subcommand_from ${a}`,name:r.name(),description:r.description()});for(let r of e.options)n+=v({rootCmd:t,condition:`__fish_seen_subcommand_from ${a}`,flags:r.flags,description:r.description})}for(let t of e.commands)r(t,[...i,a])};return r(e,[]),n}export{T as a,F as i,y as n,S as o,R as r,I as s,E as t};
|
|
119
|
-
//# sourceMappingURL=completion-cli-
|
|
119
|
+
//# sourceMappingURL=completion-cli-Bizog38J.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{t as e}from"./rolldown-runtime-CNxR59P3.js";import{A as t,i as n}from"./subsystem-BLbY429l.js";import{g as r}from"./paths-BjD3T_xq.js";import{m as i}from"./utils-CGdo13HV.js";import{t as a}from"./links-CBnmRP9D.js";import{n as o,r as s}from"./register.subclis-
|
|
1
|
+
import{t as e}from"./rolldown-runtime-CNxR59P3.js";import{A as t,i as n}from"./subsystem-BLbY429l.js";import{g as r}from"./paths-BjD3T_xq.js";import{m as i}from"./utils-CGdo13HV.js";import{t as a}from"./links-CBnmRP9D.js";import{n as o,r as s}from"./register.subclis-B_0ZS-_K.js";import{i as c,n as l}from"./command-registry-CSBvrqwW.js";import{t as u}from"./program-context-CH9p6anW.js";import d from"node:os";import f from"node:path";import p from"node:fs/promises";import{Option as m}from"commander";function h(e){return e.replace(/'/g,`'\\''`)}function g(e){let t=e.split(/[ ,|]+/);return{long:t.find(e=>e.startsWith(`--`))?.replace(/^--/,``),short:t.find(e=>e.startsWith(`-`)&&!e.startsWith(`--`))?.replace(/^-/,``)}}function _(e){let t=h(e.description);return`complete -c ${e.rootCmd} -n "${e.condition}" -a "${e.name}" -d '${t}'\n`}function v(e){let{short:t,long:n}=g(e.flags),r=h(e.description),i=`complete -c ${e.rootCmd} -n "${e.condition}"`;return t&&(i+=` -s ${t}`),n&&(i+=` -l ${n}`),i+=` -d '${r}'\n`,i}var y=e({completionCacheExists:()=>E,installCompletion:()=>R,isCompletionInstalled:()=>F,registerCompletionCli:()=>L,resolveCompletionCachePath:()=>T,resolveShellFromEnv:()=>S,usesSlowDynamicCompletion:()=>I});const b=[`zsh`,`bash`,`powershell`,`fish`];function x(e){return b.includes(e)}function S(e=process.env){let t=e.SHELL?.trim()??``,n=t?f.basename(t).toLowerCase():``;return n===`zsh`?`zsh`:n===`bash`?`bash`:n===`fish`?`fish`:n===`pwsh`||n===`powershell`?`powershell`:`zsh`}function C(e){let t=e.trim();return t?t.replace(/[^a-zA-Z0-9._-]/g,`-`):`openclaw`}function w(e=process.env){let t=r(e,d.homedir);return f.join(t,`completions`)}function T(e,t){let n=C(t),r=e===`powershell`?`ps1`:e===`fish`?`fish`:e===`bash`?`bash`:`zsh`;return f.join(w(),`${n}.${r}`)}async function E(e,t=`openclaw`){return i(T(e,t))}function D(e,t){return e===`zsh`?z(t):e===`bash`?U(t):e===`powershell`?G(t):K(t)}async function O(e){let t=w();await p.mkdir(t,{recursive:!0});for(let t of e.shells){let n=D(t,e.program),r=T(t,e.binName);await p.writeFile(r,n,`utf-8`)}}function k(e,t,n){return`source "${n}"`}function A(e){return e.trim()===`# OpenClaw Completion`}function j(e,t,n){return!!(e.includes(`${t} completion`)||n&&e.includes(n))}function M(e,t){return e.includes(`<(${t} completion`)||e.includes(`${t} completion`)&&e.includes(`| source`)}function N(e,t,n,r){let i=e.split(`
|
|
2
2
|
`),a=[],o=!1;for(let e=0;e<i.length;e+=1){let r=i[e]??``;if(A(r)){o=!0,e+=1;continue}if(j(r,t,n)){o=!0;continue}a.push(r)}let s=a.join(`
|
|
3
3
|
`).trimEnd(),c=`# OpenClaw Completion\n${r}`,l=s?`${s}\n\n${c}\n`:`${c}\n`;return{next:l,changed:l!==e,hadExisting:o}}function P(e){let t=process.env.HOME||d.homedir();return e===`zsh`?f.join(t,`.zshrc`):e===`bash`?f.join(t,`.bashrc`):e===`fish`?f.join(t,`.config`,`fish`,`config.fish`):process.platform===`win32`?f.join(process.env.USERPROFILE||t,`Documents`,`PowerShell`,`Microsoft.PowerShell_profile.ps1`):f.join(t,`.config`,`powershell`,`Microsoft.PowerShell_profile.ps1`)}async function F(e,t=`openclaw`){let n=P(e);if(!await i(n))return!1;let r=T(e,t),a=await i(r)?r:null;return(await p.readFile(n,`utf-8`)).split(`
|
|
4
4
|
`).some(e=>A(e)||j(e,t,a))}async function I(e,t=`openclaw`){let n=P(e);if(!await i(n))return!1;let r=T(e,t),a=(await p.readFile(n,`utf-8`)).split(`
|
|
@@ -116,4 +116,4 @@ Register-ArgumentCompleter -Native -CommandName ${t} -ScriptBlock {
|
|
|
116
116
|
${r}
|
|
117
117
|
}
|
|
118
118
|
`}function K(e){let t=e.name(),n=``,r=(e,i)=>{let a=e.name(),o=[...i];if(i.length>0&&o.push(a),i.length===0){for(let r of e.commands)n+=_({rootCmd:t,condition:`__fish_use_subcommand`,name:r.name(),description:r.description()});for(let r of e.options)n+=v({rootCmd:t,condition:`__fish_use_subcommand`,flags:r.flags,description:r.description})}else{for(let r of e.commands)n+=_({rootCmd:t,condition:`__fish_seen_subcommand_from ${a}`,name:r.name(),description:r.description()});for(let r of e.options)n+=v({rootCmd:t,condition:`__fish_seen_subcommand_from ${a}`,flags:r.flags,description:r.description})}for(let t of e.commands)r(t,[...i,a])};return r(e,[]),n}export{T as a,F as i,y as n,S as o,R as r,I as s,E as t};
|
|
119
|
-
//# sourceMappingURL=completion-cli-
|
|
119
|
+
//# sourceMappingURL=completion-cli-W1_FoDFF.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{t as e}from"./openclaw-root-D_0Q6--h.js";import{r as t}from"./command-format-BbDT1tlm.js";import{t as n}from"./note-D4GAwgha.js";import{a as r,i,o as a,r as o,s,t as c}from"./completion-cli-
|
|
2
|
-
//# sourceMappingURL=doctor-completion-
|
|
1
|
+
import{t as e}from"./openclaw-root-D_0Q6--h.js";import{r as t}from"./command-format-BbDT1tlm.js";import{t as n}from"./note-D4GAwgha.js";import{a as r,i,o as a,r as o,s,t as c}from"./completion-cli-Bizog38J.js";import l from"node:path";import{spawnSync as u}from"node:child_process";async function d(){let t=await e({moduleUrl:import.meta.url,argv1:process.argv[1],cwd:process.cwd()});if(!t)return!1;let n=l.join(t,`openclaw.mjs`);return u(process.execPath,[n,`completion`,`--write-state`],{cwd:t,env:process.env,encoding:`utf-8`}).status===0}async function f(e=`openclaw`){let t=a();return{shell:t,profileInstalled:await i(t,e),cacheExists:await c(t,e),cachePath:r(t,e),usesSlowPattern:await s(t,e)}}async function p(e,r,i={}){let a=t(),s=await f(a);if(s.usesSlowPattern){if(n(`Your ${s.shell} profile uses slow dynamic completion (source <(...)).\nUpgrading to cached completion for faster shell startup...`,`Shell completion`),!s.cacheExists&&!await d()){n(`Failed to generate completion cache. Run \`${a} completion --write-state\` manually.`,`Shell completion`);return}await o(s.shell,!0,a),n(`Shell completion upgraded. Restart your shell or run: source ~/.${s.shell===`zsh`?`zshrc`:s.shell===`bash`?`bashrc`:`config/fish/config.fish`}`,`Shell completion`);return}if(s.profileInstalled&&!s.cacheExists){n(`Shell completion is configured in your ${s.shell} profile but the cache is missing.\nRegenerating cache...`,`Shell completion`),await d()?n(`Completion cache regenerated at ${s.cachePath}`,`Shell completion`):n(`Failed to regenerate completion cache. Run \`${a} completion --write-state\` manually.`,`Shell completion`);return}if(!s.profileInstalled){if(i.nonInteractive)return;if(await r.confirm({message:`Enable ${s.shell} shell completion for ${a}?`,initialValue:!0})){if(!await d()){n(`Failed to generate completion cache. Run \`${a} completion --write-state\` manually.`,`Shell completion`);return}await o(s.shell,!0,a),n(`Shell completion installed. Restart your shell or run: source ~/.${s.shell===`zsh`?`zshrc`:s.shell===`bash`?`bashrc`:`config/fish/config.fish`}`,`Shell completion`)}}}async function m(e=`openclaw`){return await c(a(),e)?!0:d()}export{p as n,m as r,f as t};
|
|
2
|
+
//# sourceMappingURL=doctor-completion-Da0cocZX.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as e}from"./command-format-CLxIPuLR.js";import{t}from"./openclaw-root-CnsBf6ZU.js";import{t as n}from"./note-Dp-d_utk.js";import{a as r,i,o as a,r as o,s,t as c}from"./completion-cli-
|
|
2
|
-
//# sourceMappingURL=doctor-completion-
|
|
1
|
+
import{r as e}from"./command-format-CLxIPuLR.js";import{t}from"./openclaw-root-CnsBf6ZU.js";import{t as n}from"./note-Dp-d_utk.js";import{a as r,i,o as a,r as o,s,t as c}from"./completion-cli-W1_FoDFF.js";import{spawnSync as l}from"node:child_process";import u from"node:path";async function d(){let e=await t({moduleUrl:import.meta.url,argv1:process.argv[1],cwd:process.cwd()});if(!e)return!1;let n=u.join(e,`openclaw.mjs`);return l(process.execPath,[n,`completion`,`--write-state`],{cwd:e,env:process.env,encoding:`utf-8`}).status===0}async function f(e=`openclaw`){let t=a();return{shell:t,profileInstalled:await i(t,e),cacheExists:await c(t,e),cachePath:r(t,e),usesSlowPattern:await s(t,e)}}async function p(t,r,i={}){let a=e(),s=await f(a);if(s.usesSlowPattern){if(n(`Your ${s.shell} profile uses slow dynamic completion (source <(...)).\nUpgrading to cached completion for faster shell startup...`,`Shell completion`),!s.cacheExists&&!await d()){n(`Failed to generate completion cache. Run \`${a} completion --write-state\` manually.`,`Shell completion`);return}await o(s.shell,!0,a),n(`Shell completion upgraded. Restart your shell or run: source ~/.${s.shell===`zsh`?`zshrc`:s.shell===`bash`?`bashrc`:`config/fish/config.fish`}`,`Shell completion`);return}if(s.profileInstalled&&!s.cacheExists){n(`Shell completion is configured in your ${s.shell} profile but the cache is missing.\nRegenerating cache...`,`Shell completion`),await d()?n(`Completion cache regenerated at ${s.cachePath}`,`Shell completion`):n(`Failed to regenerate completion cache. Run \`${a} completion --write-state\` manually.`,`Shell completion`);return}if(!s.profileInstalled){if(i.nonInteractive)return;if(await r.confirm({message:`Enable ${s.shell} shell completion for ${a}?`,initialValue:!0})){if(!await d()){n(`Failed to generate completion cache. Run \`${a} completion --write-state\` manually.`,`Shell completion`);return}await o(s.shell,!0,a),n(`Shell completion installed. Restart your shell or run: source ~/.${s.shell===`zsh`?`zshrc`:s.shell===`bash`?`bashrc`:`config/fish/config.fish`}`,`Shell completion`)}}}async function m(e=`openclaw`){return await c(a(),e)?!0:d()}export{p as n,m as r,f as t};
|
|
2
|
+
//# sourceMappingURL=doctor-completion-DpCWb88H.js.map
|
package/dist/entry.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{$ as e,Z as t,et as n,t as r}from"./subsystem-BLbY429l.js";import{y as i}from"./paths-BjD3T_xq.js";import{t as a}from"./profile-utils-CWmra1aY.js";import{t as o}from"./boolean-D15s2V33.js";import{enableCompileCache as s}from"node:module";import{spawn as c}from"node:child_process";import l from"node:process";import{fileURLToPath as u}from"node:url";import d from"node:os";import f from"node:path";import p from"node:fs";function m(e,t){if(e.includes(`=`)){let[,t]=e.split(`=`,2);return{value:(t??``).trim()||null,consumedNext:!1}}return{value:(t??``).trim()||null,consumedNext:!!t}}function h(e){if(e.length<2)return{ok:!0,profile:null,argv:e};let t=e.slice(0,2),n=null,r=!1,i=!1,o=e.slice(2);for(let e=0;e<o.length;e+=1){let s=o[e];if(s!==void 0){if(i){t.push(s);continue}if(s===`--dev`){if(n&&n!==`dev`)return{ok:!1,error:`Cannot combine --dev with --profile`};r=!0,n=`dev`;continue}if(s===`--profile`||s.startsWith(`--profile=`)){if(r)return{ok:!1,error:`Cannot combine --dev with --profile`};let t=o[e+1],{value:i,consumedNext:c}=m(s,t);if(c&&(e+=1),!i)return{ok:!1,error:`--profile requires a value`};if(!a(i))return{ok:!1,error:`Invalid --profile (use letters, numbers, "_", "-" only)`};n=i;continue}if(!s.startsWith(`-`)){i=!0,t.push(s);continue}t.push(s)}}return{ok:!0,profile:n,argv:t}}function g(e,t,n){let r=e.toLowerCase()===`default`?``:`-${e}`;return f.join(i(t,n),`.qbotclaw${r}`)}function _(e){let t=e.env??process.env,n=e.homedir??d.homedir,r=e.profile.trim();if(!r)return;t.OPENCLAW_PROFILE=r;let i=t.OPENCLAW_STATE_DIR?.trim()||g(r,t,n);t.OPENCLAW_STATE_DIR?.trim()||(t.OPENCLAW_STATE_DIR=i),t.OPENCLAW_CONFIG_PATH?.trim()||(t.OPENCLAW_CONFIG_PATH=f.join(i,`openclaw.json`)),r===`dev`&&!t.OPENCLAW_GATEWAY_PORT?.trim()&&(t.OPENCLAW_GATEWAY_PORT=`19001`)}function v(e){return t(e)}function y(e){if(process.platform!==`win32`||e.length<2)return e;let t=e=>{let t=``;for(let n=0;n<e.length;n+=1){let r=e.charCodeAt(n);r>=32&&r!==127&&(t+=e[n])}return t},n=e=>t(e).replace(/^['"]+|['"]+$/g,``).trim(),r=e=>n(e).replace(/^\\\\\\?\\/,``),i=r(process.execPath),a=i.toLowerCase(),o=f.basename(i).toLowerCase(),s=e=>{if(!e)return!1;let t=r(e);if(!t)return!1;let n=t.toLowerCase();return n===a||f.basename(n)===o||n.endsWith(`\\node.exe`)||n.endsWith(`/node.exe`)||n.includes(`node.exe`)||f.basename(n)===`node.exe`&&p.existsSync(t)},c=[...e];for(let e=1;e<=3&&e<c.length;){if(s(c[e])){c.splice(e,1);continue}e+=1}let l=c.filter((e,t)=>t===0||!s(e));if(l.length<3)return l;let u=[...l];for(let e=2;e<u.length;){let t=u[e];if(!t||t.startsWith(`-`)){e+=1;continue}if(s(t)){u.splice(e,1);continue}break}return u}const b=r(`env`),x=new Set;function S(e,t){if(t)return`<redacted>`;let n=e.replace(/\s+/g,` `).trim();return n.length<=160?n:`${n.slice(0,160)}…`}function C(e){if(process.env.VITEST||x.has(e.key))return;let t=e.value??process.env[e.key];!t||!t.trim()||(x.add(e.key),b.info(`env: ${e.key}=${S(t,e.redact)} (${e.description})`))}function w(){!process.env.ZAI_API_KEY?.trim()&&process.env.Z_AI_API_KEY?.trim()&&(process.env.ZAI_API_KEY=process.env.Z_AI_API_KEY)}function T(e){return o(e)===!0}function E(){w()}function D(e,t){if(!e)return;let n=f.resolve(t,e);try{return p.realpathSync.native(n)}catch{return n}}function O({currentFile:e,argv:t=process.argv,env:n=process.env,cwd:r=process.cwd(),wrapperEntryPairs:i=[]}){let a=D(e,r),o=D(t[1],r);if(a&&o&&a===o)return!0;let s=D(n.pm_exec_path,r);if(a&&s&&a===s)return!0;if(a&&o&&i.length>0){let e=f.basename(a),t=f.basename(o);if(i.some(({wrapperBasename:n,entryBasename:r})=>e===r&&t===n))return!0}return!!(a&&o&&f.basename(a)===f.basename(o))}const k=`OPENCLAW_CLI`;function A(e){return{...e,[k]:`1`}}function j(e=process.env){return e[k]=`1`,e}const M=Symbol.for(`openclaw.warning-filter`);function N(e){return!!(e.code===`DEP0040`&&e.message?.includes(`punycode`)||e.code===`DEP0060`&&e.message?.includes(`util._extend`)||e.name===`ExperimentalWarning`&&e.message?.includes(`SQLite is an experimental feature`))}function P(e){let t=e[0],n=e[1],r=e[2],i,a,o;if(t instanceof Error?(i=t.name,o=t.message,a=t.code):typeof t==`string`&&(o=t),n&&typeof n==`object`&&!Array.isArray(n)){let e=n;typeof e.type==`string`&&(i=e.type),typeof e.code==`string`&&(a=e.code)}else typeof n==`string`&&(i=n),typeof r==`string`&&(a=r);return{name:i,code:a,message:o}}function F(){let e=globalThis;if(e[M]?.installed)return;let t=process.emitWarning.bind(process),n=((...e)=>{if(!N(P(e)))return Reflect.apply(t,process,e)});process.emitWarning=n,e[M]={installed:!0}}const I=l.platform===`win32`?[`SIGTERM`,`SIGINT`,`SIGBREAK`]:[`SIGTERM`,`SIGINT`,`SIGHUP`,`SIGQUIT`];function L(e,{signals:t=I,onSignal:n}={}){let r=new Map;for(let i of t){let t=()=>{n?.(i);try{e.kill(i)}catch{}};try{l.on(i,t),r.set(i,t)}catch{}}let i=()=>{for(let[e,t]of r)l.off(e,t);r.clear()};return e.once(`exit`,i),e.once(`error`,i),{detach:i}}const R=[{wrapperBasename:`openclaw.mjs`,entryBasename:`entry.js`},{wrapperBasename:`openclaw.js`,entryBasename:`entry.js`}];function z(e){let t=e.slice(2).filter(e=>e.length>0&&!e.startsWith(`-`));for(let e=0;e<t.length-1;e+=1)if(t[e]===`secrets`&&t[e+1]===`audit`)return!0;return!1}if(O({currentFile:u(import.meta.url),wrapperEntryPairs:[...R]})){if(l.title=`openclaw`,j(),F(),E(),!T(l.env.NODE_DISABLE_COMPILE_CACHE))try{s()}catch{}z(l.argv)&&(l.env.OPENCLAW_AUTH_STORE_READONLY=`1`),l.argv.includes(`--no-color`)&&(l.env.NO_COLOR=`1`,l.env.FORCE_COLOR=`0`);let t=`--disable-warning=ExperimentalWarning`;function r(){let e=l.env.NODE_OPTIONS??``;if(e.includes(t)||e.includes(`--no-warnings`))return!0;for(let e of l.execArgv)if(e===t||e===`--no-warnings`)return!0;return!1}function i(){if(v(l.argv)||T(l.env.OPENCLAW_NO_RESPAWN)||T(l.env.OPENCLAW_NODE_OPTIONS_READY)||r())return!1;l.env.OPENCLAW_NODE_OPTIONS_READY=`1`;let e=c(l.execPath,[t,...l.execArgv,...l.argv.slice(1)],{stdio:`inherit`,env:l.env});return L(e),e.once(`exit`,(e,t)=>{if(t){l.exitCode=1;return}l.exit(e??1)}),e.once(`error`,e=>{console.error(`[openclaw] Failed to respawn CLI:`,e instanceof Error?e.stack??e.message:e),l.exit(1)}),!0}function a(e){return n(e)?(import(`./version-q3SkUw2K.js`).then(e=>e.r).then(({VERSION:e})=>{console.log(e),l.exit(0)}).catch(e=>{console.error(`[openclaw] Failed to resolve version:`,e instanceof Error?e.stack??e.message:e),l.exitCode=1}),!0):!1}function o(t){return e(t)?(import(`./program-
|
|
2
|
+
import{$ as e,Z as t,et as n,t as r}from"./subsystem-BLbY429l.js";import{y as i}from"./paths-BjD3T_xq.js";import{t as a}from"./profile-utils-CWmra1aY.js";import{t as o}from"./boolean-D15s2V33.js";import{enableCompileCache as s}from"node:module";import{spawn as c}from"node:child_process";import l from"node:process";import{fileURLToPath as u}from"node:url";import d from"node:os";import f from"node:path";import p from"node:fs";function m(e,t){if(e.includes(`=`)){let[,t]=e.split(`=`,2);return{value:(t??``).trim()||null,consumedNext:!1}}return{value:(t??``).trim()||null,consumedNext:!!t}}function h(e){if(e.length<2)return{ok:!0,profile:null,argv:e};let t=e.slice(0,2),n=null,r=!1,i=!1,o=e.slice(2);for(let e=0;e<o.length;e+=1){let s=o[e];if(s!==void 0){if(i){t.push(s);continue}if(s===`--dev`){if(n&&n!==`dev`)return{ok:!1,error:`Cannot combine --dev with --profile`};r=!0,n=`dev`;continue}if(s===`--profile`||s.startsWith(`--profile=`)){if(r)return{ok:!1,error:`Cannot combine --dev with --profile`};let t=o[e+1],{value:i,consumedNext:c}=m(s,t);if(c&&(e+=1),!i)return{ok:!1,error:`--profile requires a value`};if(!a(i))return{ok:!1,error:`Invalid --profile (use letters, numbers, "_", "-" only)`};n=i;continue}if(!s.startsWith(`-`)){i=!0,t.push(s);continue}t.push(s)}}return{ok:!0,profile:n,argv:t}}function g(e,t,n){let r=e.toLowerCase()===`default`?``:`-${e}`;return f.join(i(t,n),`.qbotclaw${r}`)}function _(e){let t=e.env??process.env,n=e.homedir??d.homedir,r=e.profile.trim();if(!r)return;t.OPENCLAW_PROFILE=r;let i=t.OPENCLAW_STATE_DIR?.trim()||g(r,t,n);t.OPENCLAW_STATE_DIR?.trim()||(t.OPENCLAW_STATE_DIR=i),t.OPENCLAW_CONFIG_PATH?.trim()||(t.OPENCLAW_CONFIG_PATH=f.join(i,`openclaw.json`)),r===`dev`&&!t.OPENCLAW_GATEWAY_PORT?.trim()&&(t.OPENCLAW_GATEWAY_PORT=`19001`)}function v(e){return t(e)}function y(e){if(process.platform!==`win32`||e.length<2)return e;let t=e=>{let t=``;for(let n=0;n<e.length;n+=1){let r=e.charCodeAt(n);r>=32&&r!==127&&(t+=e[n])}return t},n=e=>t(e).replace(/^['"]+|['"]+$/g,``).trim(),r=e=>n(e).replace(/^\\\\\\?\\/,``),i=r(process.execPath),a=i.toLowerCase(),o=f.basename(i).toLowerCase(),s=e=>{if(!e)return!1;let t=r(e);if(!t)return!1;let n=t.toLowerCase();return n===a||f.basename(n)===o||n.endsWith(`\\node.exe`)||n.endsWith(`/node.exe`)||n.includes(`node.exe`)||f.basename(n)===`node.exe`&&p.existsSync(t)},c=[...e];for(let e=1;e<=3&&e<c.length;){if(s(c[e])){c.splice(e,1);continue}e+=1}let l=c.filter((e,t)=>t===0||!s(e));if(l.length<3)return l;let u=[...l];for(let e=2;e<u.length;){let t=u[e];if(!t||t.startsWith(`-`)){e+=1;continue}if(s(t)){u.splice(e,1);continue}break}return u}const b=r(`env`),x=new Set;function S(e,t){if(t)return`<redacted>`;let n=e.replace(/\s+/g,` `).trim();return n.length<=160?n:`${n.slice(0,160)}…`}function C(e){if(process.env.VITEST||x.has(e.key))return;let t=e.value??process.env[e.key];!t||!t.trim()||(x.add(e.key),b.info(`env: ${e.key}=${S(t,e.redact)} (${e.description})`))}function w(){!process.env.ZAI_API_KEY?.trim()&&process.env.Z_AI_API_KEY?.trim()&&(process.env.ZAI_API_KEY=process.env.Z_AI_API_KEY)}function T(e){return o(e)===!0}function E(){w()}function D(e,t){if(!e)return;let n=f.resolve(t,e);try{return p.realpathSync.native(n)}catch{return n}}function O({currentFile:e,argv:t=process.argv,env:n=process.env,cwd:r=process.cwd(),wrapperEntryPairs:i=[]}){let a=D(e,r),o=D(t[1],r);if(a&&o&&a===o)return!0;let s=D(n.pm_exec_path,r);if(a&&s&&a===s)return!0;if(a&&o&&i.length>0){let e=f.basename(a),t=f.basename(o);if(i.some(({wrapperBasename:n,entryBasename:r})=>e===r&&t===n))return!0}return!!(a&&o&&f.basename(a)===f.basename(o))}const k=`OPENCLAW_CLI`;function A(e){return{...e,[k]:`1`}}function j(e=process.env){return e[k]=`1`,e}const M=Symbol.for(`openclaw.warning-filter`);function N(e){return!!(e.code===`DEP0040`&&e.message?.includes(`punycode`)||e.code===`DEP0060`&&e.message?.includes(`util._extend`)||e.name===`ExperimentalWarning`&&e.message?.includes(`SQLite is an experimental feature`))}function P(e){let t=e[0],n=e[1],r=e[2],i,a,o;if(t instanceof Error?(i=t.name,o=t.message,a=t.code):typeof t==`string`&&(o=t),n&&typeof n==`object`&&!Array.isArray(n)){let e=n;typeof e.type==`string`&&(i=e.type),typeof e.code==`string`&&(a=e.code)}else typeof n==`string`&&(i=n),typeof r==`string`&&(a=r);return{name:i,code:a,message:o}}function F(){let e=globalThis;if(e[M]?.installed)return;let t=process.emitWarning.bind(process),n=((...e)=>{if(!N(P(e)))return Reflect.apply(t,process,e)});process.emitWarning=n,e[M]={installed:!0}}const I=l.platform===`win32`?[`SIGTERM`,`SIGINT`,`SIGBREAK`]:[`SIGTERM`,`SIGINT`,`SIGHUP`,`SIGQUIT`];function L(e,{signals:t=I,onSignal:n}={}){let r=new Map;for(let i of t){let t=()=>{n?.(i);try{e.kill(i)}catch{}};try{l.on(i,t),r.set(i,t)}catch{}}let i=()=>{for(let[e,t]of r)l.off(e,t);r.clear()};return e.once(`exit`,i),e.once(`error`,i),{detach:i}}const R=[{wrapperBasename:`openclaw.mjs`,entryBasename:`entry.js`},{wrapperBasename:`openclaw.js`,entryBasename:`entry.js`}];function z(e){let t=e.slice(2).filter(e=>e.length>0&&!e.startsWith(`-`));for(let e=0;e<t.length-1;e+=1)if(t[e]===`secrets`&&t[e+1]===`audit`)return!0;return!1}if(O({currentFile:u(import.meta.url),wrapperEntryPairs:[...R]})){if(l.title=`openclaw`,j(),F(),E(),!T(l.env.NODE_DISABLE_COMPILE_CACHE))try{s()}catch{}z(l.argv)&&(l.env.OPENCLAW_AUTH_STORE_READONLY=`1`),l.argv.includes(`--no-color`)&&(l.env.NO_COLOR=`1`,l.env.FORCE_COLOR=`0`);let t=`--disable-warning=ExperimentalWarning`;function r(){let e=l.env.NODE_OPTIONS??``;if(e.includes(t)||e.includes(`--no-warnings`))return!0;for(let e of l.execArgv)if(e===t||e===`--no-warnings`)return!0;return!1}function i(){if(v(l.argv)||T(l.env.OPENCLAW_NO_RESPAWN)||T(l.env.OPENCLAW_NODE_OPTIONS_READY)||r())return!1;l.env.OPENCLAW_NODE_OPTIONS_READY=`1`;let e=c(l.execPath,[t,...l.execArgv,...l.argv.slice(1)],{stdio:`inherit`,env:l.env});return L(e),e.once(`exit`,(e,t)=>{if(t){l.exitCode=1;return}l.exit(e??1)}),e.once(`error`,e=>{console.error(`[openclaw] Failed to respawn CLI:`,e instanceof Error?e.stack??e.message:e),l.exit(1)}),!0}function a(e){return n(e)?(import(`./version-q3SkUw2K.js`).then(e=>e.r).then(({VERSION:e})=>{console.log(e),l.exit(0)}).catch(e=>{console.error(`[openclaw] Failed to resolve version:`,e instanceof Error?e.stack??e.message:e),l.exitCode=1}),!0):!1}function o(t){return e(t)?(import(`./program-CCS3CIqA.js`).then(({buildProgram:e})=>{e().outputHelp()}).catch(e=>{console.error(`[openclaw] Failed to display help:`,e instanceof Error?e.stack??e.message:e),l.exitCode=1}),!0):!1}if(l.argv=y(l.argv),!i()){let e=h(l.argv);e.ok||(console.error(`[openclaw] ${e.error}`),l.exit(2)),e.profile&&(_({profile:e.profile}),l.argv=e.argv),!a(l.argv)&&!o(l.argv)&&import(`./run-main-CV49c7uu.js`).then(({runCli:e})=>e(l.argv)).catch(e=>{console.error(`[openclaw] Failed to start CLI:`,e instanceof Error?e.stack??e.message:e),l.exitCode=1})}}export{C as a,_ as c,T as i,h as l,A as n,E as o,O as r,y as s,F as t};
|
|
3
3
|
//# sourceMappingURL=entry.js.map
|