quantex-cli 0.29.1 → 1.1.0

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 (40) hide show
  1. package/dist/{agent-inspection-YgRBlO4j.mjs → agent-inspection-wRTbdD0j.mjs} +1 -1
  2. package/dist/{agent-installation-DYK5G54m.mjs → agent-installation-BkHxGD5U.mjs} +1 -1
  3. package/dist/{agents-BHbkPVvR.mjs → agents-QYkiyHCD.mjs} +1 -1
  4. package/dist/{capabilities-DwvTrIyT.mjs → capabilities-Bh_eBfhw.mjs} +1 -1
  5. package/dist/capabilities-ch-hI24w.mjs +1 -0
  6. package/dist/cli.mjs +1 -1
  7. package/dist/{color-DRZEEJuf.mjs → color-nTiVIiHx.mjs} +1 -1
  8. package/dist/commands-CYTtSxZf.mjs +1 -0
  9. package/dist/{commands-BV_8m8O3.mjs → commands-nkGABksp.mjs} +1 -1
  10. package/dist/{config-CW5KWpFO.mjs → config-EvqcZt-0.mjs} +1 -1
  11. package/dist/{doctor-oscs3vHZ.mjs → doctor-EOCE9dy3.mjs} +1 -1
  12. package/dist/{ensure-CtIsNpIc.mjs → ensure-D25oxWUc.mjs} +1 -1
  13. package/dist/ensure-dKuczClK.mjs +1 -0
  14. package/dist/index.mjs +1 -1
  15. package/dist/{info-CC9R6coD.mjs → info-BcXErzU4.mjs} +1 -1
  16. package/dist/inspect-OWIjKOVn.mjs +1 -0
  17. package/dist/{inspect-BBCaK7m4.mjs → inspect-twIhr3au.mjs} +1 -1
  18. package/dist/{install-Qs0Hjurc.mjs → install-DQDkbPV-.mjs} +1 -1
  19. package/dist/{lifecycle-observations-AFJINgqR.mjs → lifecycle-observations-DulNFMcZ.mjs} +1 -1
  20. package/dist/{lifecycle-policy-Djgq_8nm.mjs → lifecycle-policy-a_ing0Qc.mjs} +1 -1
  21. package/dist/{list-BdZDS8uV.mjs → list-DTqeDd5E.mjs} +1 -1
  22. package/dist/{provider-evidence-CQl_J-gP.mjs → provider-evidence-BjjRgpNG.mjs} +1 -1
  23. package/dist/{provider-observations-CjH7BgJJ.mjs → provider-observations-DWwL6PR0.mjs} +1 -1
  24. package/dist/{resolve-D8sxYL1V.mjs → resolve-BOxNGmVh.mjs} +1 -1
  25. package/dist/resolve-CTU1uwe8.mjs +1 -0
  26. package/dist/{schema-CGsjqfua.mjs → schema-Bl1ZPNI9.mjs} +1 -1
  27. package/dist/schema-zT2KCR-F.mjs +1 -0
  28. package/dist/{uninstall-jVywxQNe.mjs → uninstall-DV8hdNkb.mjs} +1 -1
  29. package/dist/{update-CNH0qEtB.mjs → update-BJCwO1ja.mjs} +1 -1
  30. package/dist/{update-planner-BhJnvNKA.mjs → update-planner-B74AB4_X.mjs} +1 -1
  31. package/dist/{upgrade-DUSUcwD7.mjs → upgrade-81zRKaAq.mjs} +1 -1
  32. package/dist/{user-output-CnLEBgDD.mjs → user-output-CgBsxSsM.mjs} +1 -1
  33. package/dist/{version-cache-BRDGus3W.mjs → version-cache-pl3cl25u.mjs} +1 -1
  34. package/package.json +1 -1
  35. package/dist/capabilities-CtAVoTl3.mjs +0 -1
  36. package/dist/commands-BFAz9rp0.mjs +0 -1
  37. package/dist/ensure-TjHi-p6p.mjs +0 -1
  38. package/dist/inspect-e9CX-iny.mjs +0 -1
  39. package/dist/resolve-BZug-bO0.mjs +0 -1
  40. package/dist/schema-BFd8FNZw.mjs +0 -1
@@ -1 +1 @@
1
- import{Ot as e,Zt as t,a as n,an as r,b as i,d as a,en as o,f as s,h as c,l,n as u,nn as d,on as f,p,r as m,t as h}from"./color-DRZEEJuf.mjs";import{a as g,i as _,n as v,r as y}from"./user-output-CnLEBgDD.mjs";import{n as b,t as x}from"./version-cache-BRDGus3W.mjs";const S={platform:process.platform,spawn:(e,t)=>o(e,{...t,stdio:t.stdio?[...t.stdio]:void 0}),terminate:d,writeStderr:e=>{process.stderr.write(e)}};function C(e=S){let t=b(e);return{run:e=>t.run({...e,forwardPipedOutput:e.forwardPipedOutput??!1})}}const w={fetch:globalThis.fetch.bind(globalThis)};function T(e=w){return{async request(t){if(t.signal.aborted)return E(t.signal);let n=new AbortController,r,i,a=!1,o=new Promise(e=>i=e),s=e=>{a||(a=!0,n.abort(),i(e))},c=()=>s(E(t.signal));t.signal.addEventListener(`abort`,c,{once:!0}),t.signal.aborted&&c(),t.timeoutMs!==void 0&&(r=setTimeout(()=>s(D(`timed-out`,`Network request timed out after ${t.timeoutMs}ms.`)),t.timeoutMs));let l=Promise.resolve().then(async()=>{let r=await e.fetch(t.url,{body:t.body,headers:t.headers,method:t.method,signal:n.signal}),i={};return r.headers.forEach((e,t)=>i[t.toLowerCase()]=e),{kind:`success`,value:{body:new Uint8Array(await r.arrayBuffer()),headers:i,status:r.status}}}).catch(e=>t.signal.aborted?E(t.signal):n.signal.aborted&&t.timeoutMs!==void 0?D(`timed-out`,`Network request timed out after ${t.timeoutMs}ms.`):D(`failed`,e instanceof Error?e.message:`Network request failed.`));try{return await Promise.race([l,o])}finally{a=!0,r&&clearTimeout(r),t.signal.removeEventListener(`abort`,c)}}}}function E(e){return D(`cancelled`,e.reason instanceof Error?e.reason.message:String(e.reason??`Network request was cancelled.`))}function D(e,t){return{error:{kind:e,message:t},kind:`failure`}}function O(e){let t=new AbortController,n=new Set,r=Object.freeze({cacheMode:e.cacheMode??`default`,dryRun:e.dryRun??!1,outputMode:e.outputMode??`human`,quiet:e.quiet??!1,timeoutMs:e.timeoutMs}),i=Object.freeze({...e.ports}),a;return{options:r,ports:i,signal:t.signal,cancel(e){if(a)return a;let r;a=new Promise(e=>{r=e}),t.abort(e);let i=[...n];return n.clear(),Promise.allSettled(i.map(t=>Promise.resolve().then(()=>t(e)))).then(()=>r()),a},onCancel(e){return t.signal.aborted?()=>void 0:(n.add(e),()=>{n.delete(e)})}}}async function k(e,t,n){if(t.signal.aborted)return A();let r=await n.plan({context:{signal:t.signal,timeoutMs:t.options.timeoutMs},metadataCache:t.ports.cache,networkPort:t.ports.network,persistencePort:t.ports.persistence,updateChannel:e.updateChannel});return t.signal.aborted?A(r):e.check||e.dryRun||r.status!==`update-available`?{kind:`planned`,plan:r}:{kind:`executed`,plan:r,result:await n.upgrade(r,{lockPort:t.ports.locks,networkPort:t.ports.network,processPort:t.ports.process,signal:t.signal,stdio:t.options.outputMode===`human`?[`inherit`,`inherit`,`inherit`]:[`ignore`,`pipe`,`pipe`],timeoutMs:t.options.timeoutMs})}}function A(e){return{error:{kind:`cancelled`,message:`Self-upgrade invocation was cancelled.`},kind:`interrupted`,...e?{plan:e}:{}}}function j(){let e=r(),t=O({cacheMode:e.cacheMode,dryRun:e.dryRun,outputMode:e.outputMode,ports:M(),quiet:e.quiet,timeoutMs:e.timeoutMs});e.cancelled&&t.cancel(`cancelled`);let n=f(()=>t.cancel(`cancelled`)),i=!1,a={plan:e=>p({context:e.context,metadataCache:e.metadataCache,networkPort:e.networkPort,persistencePort:e.persistencePort,updateChannel:e.updateChannel}),upgrade:(e,t)=>l(e,t)};return{dispose(){i||(i=!0,n())},run:e=>k(e,t,a)}}function M(){return{cache:x(),clock:{now:Date.now,sleep:N},fileSystem:{makeDirectory:N,readFile:N,remove:N,rename:N,writeFile:N},locks:c(),network:T(),persistence:i(),process:C()}}async function N(){return{error:{kind:`unavailable`,message:`Runtime port is not bound for this self-upgrade operation.`},kind:`failure`}}async function P(e={}){let r=v(),i=j(),o=await i.run({check:e.check??!1,dryRun:r,updateChannel:e.channel}).finally(()=>i.dispose());if(o.kind===`interrupted`)throw new t({kind:`cancelled`,reason:o.error.message});let c=o.plan,l=s(c),d=I(l),f=R(l);if(c.status===`up-to-date`)return n(m({action:`upgrade`,data:{canAutoUpdate:l.canAutoUpdate,channel:l.updateChannel,currentVersion:l.currentVersion,installSource:l.installSource,latestVersion:l.latestVersion,status:`up-to-date`},target:{kind:`self`,name:`quantex`},warnings:[...d,...f?[f]:[]]}),F);if(e.check||r)return c.status===`update-available`?n(m({action:`upgrade`,data:{canAutoUpdate:l.canAutoUpdate,channel:l.updateChannel,currentVersion:l.currentVersion,installSource:l.installSource,latestVersion:l.latestVersion,status:`update-available`},exitCode:e.check?1:void 0,target:{kind:`self`,name:`quantex`},warnings:[...d,...f?[f]:[],...r?[{code:`DRY_RUN`,message:`Dry run: would upgrade Quantex CLI.`}]:[]]}),F):n(u({action:`upgrade`,data:{canAutoUpdate:l.canAutoUpdate,channel:l.updateChannel,currentVersion:l.currentVersion,installSource:l.installSource,status:`check-unavailable`},error:{code:`NETWORK_ERROR`,message:`Unable to determine the latest Quantex CLI version.`},target:{kind:`self`,name:`quantex`},warnings:[...d,...f?[f]:[]]}),F);if(c.status===`manual-required`){let e=a(l);return n(u({action:`upgrade`,data:{canAutoUpdate:l.canAutoUpdate,channel:l.updateChannel,currentVersion:l.currentVersion,installSource:l.installSource,latestVersion:l.latestVersion,recoveryHint:e,status:`manual-required`},error:{code:`MANUAL_ACTION_REQUIRED`,message:`Quantex CLI cannot auto-update from the current install source: ${l.installSource}.`},target:{kind:`self`,name:`quantex`},warnings:[...d,...f?[f]:[]]}),F)}if(o.kind!==`executed`)throw Error(`Self-upgrade execution did not produce a result.`);let p=o.result;if(p.success)return n(m({action:`upgrade`,data:{canAutoUpdate:l.canAutoUpdate,channel:l.updateChannel,currentVersion:l.currentVersion,installSource:l.installSource,latestVersion:l.latestVersion,status:`updated`},target:{kind:`self`,name:`quantex`},warnings:[...d,...f?[f]:[]]}),F);let h=a(l,p);return n(u({action:`upgrade`,data:{canAutoUpdate:l.canAutoUpdate,channel:l.updateChannel,currentVersion:l.currentVersion,installSource:l.installSource,latestVersion:l.latestVersion,recoveryHint:h,status:`manual-required`},error:{code:`UPGRADE_FAILED`,details:p.error?.kind?{kind:p.error.kind}:void 0,message:p.error?.message??`Failed to upgrade Quantex CLI.`},target:{kind:`self`,name:`quantex`},warnings:[...d,...h?[{code:`MANUAL_RECOVERY`,message:`Manual recovery: ${h}`}]:[]]}),F)}function F(e){if(!e.data){e.error&&y(h.red(e.error.message));return}if(e.data.status===`up-to-date`){_(h.green(`Quantex CLI is already up to date (${e.data.currentVersion}).`)),L(e.warnings);return}if(e.data.status===`update-available`){let t=e.warnings.some(e=>e.message.includes(`Dry run`))?`Dry run: `:``;g(h.yellow(`${t}Update available for Quantex CLI: ${e.data.currentVersion} -> ${e.data.latestVersion} (${e.data.channel}).`)),L(e.warnings);return}if(e.data.status===`check-unavailable`){e.error&&g(h.yellow(e.error.message)),L(e.warnings);return}if(e.data.status===`manual-required`&&e.error?.code===`MANUAL_ACTION_REQUIRED`){g(h.yellow(e.error.message)),e.data.recoveryHint&&g(h.cyan(`Next step: ${e.data.recoveryHint}`));return}let t=e.data.latestVersion?` (${e.data.currentVersion} -> ${e.data.latestVersion})`:` (${e.data.currentVersion})`;if(_(h.cyan(`Upgrading Quantex CLI...${t}`)),!e.error){_(h.green(`Quantex CLI upgraded successfully.`)),L(e.warnings);return}y(h.red(`Failed to upgrade Quantex CLI.`)),g(h.yellow(`Reason: ${e.error.message}`));for(let t of e.warnings)g(h.cyan(t.message.replace(/^Manual recovery:/,`Next step:`)))}function I(e){return!e.latestVersion||!e.upstreamLatestVersion||e.latestVersion===e.upstreamLatestVersion||e.installSource!==`bun`&&e.installSource!==`npm`?[]:[{code:`MIRROR_LAG`,details:{installableLatestVersion:e.latestVersion,upstreamLatestVersion:e.upstreamLatestVersion},message:`The selected registry currently installs ${e.latestVersion}, while upstream npm has ${e.upstreamLatestVersion}. Retry later or set selfUpdateRegistry / QTX_SELF_UPDATE_REGISTRY to another registry if you need the upstream release now.`}]}function L(e){for(let t of e)t.code===`DRY_RUN`||t.code===`MANUAL_RECOVERY`||g(h.yellow(t.message))}function R(t){if(!t.latestVersion)return;let n=e(t.latestVersion,t.currentVersion);if(!(n===void 0||n>=0))return{code:`STALE_LATEST_VERSION`,details:{currentVersion:t.currentVersion,latestVersion:t.latestVersion},message:`The resolved latest version ${t.latestVersion} is older than the installed Quantex CLI ${t.currentVersion}. Quantex will not downgrade; retry with --refresh or --no-cache if you need a fresh check.`}}export{P as upgradeCommand};
1
+ import{Ot as e,Zt as t,a as n,an as r,b as i,d as a,en as o,f as s,h as c,l,n as u,nn as d,on as f,p,r as m,t as h}from"./color-nTiVIiHx.mjs";import{a as g,i as _,n as v,r as y}from"./user-output-CgBsxSsM.mjs";import{n as b,t as x}from"./version-cache-pl3cl25u.mjs";const S={platform:process.platform,spawn:(e,t)=>o(e,{...t,stdio:t.stdio?[...t.stdio]:void 0}),terminate:d,writeStderr:e=>{process.stderr.write(e)}};function C(e=S){let t=b(e);return{run:e=>t.run({...e,forwardPipedOutput:e.forwardPipedOutput??!1})}}const w={fetch:globalThis.fetch.bind(globalThis)};function T(e=w){return{async request(t){if(t.signal.aborted)return E(t.signal);let n=new AbortController,r,i,a=!1,o=new Promise(e=>i=e),s=e=>{a||(a=!0,n.abort(),i(e))},c=()=>s(E(t.signal));t.signal.addEventListener(`abort`,c,{once:!0}),t.signal.aborted&&c(),t.timeoutMs!==void 0&&(r=setTimeout(()=>s(D(`timed-out`,`Network request timed out after ${t.timeoutMs}ms.`)),t.timeoutMs));let l=Promise.resolve().then(async()=>{let r=await e.fetch(t.url,{body:t.body,headers:t.headers,method:t.method,signal:n.signal}),i={};return r.headers.forEach((e,t)=>i[t.toLowerCase()]=e),{kind:`success`,value:{body:new Uint8Array(await r.arrayBuffer()),headers:i,status:r.status}}}).catch(e=>t.signal.aborted?E(t.signal):n.signal.aborted&&t.timeoutMs!==void 0?D(`timed-out`,`Network request timed out after ${t.timeoutMs}ms.`):D(`failed`,e instanceof Error?e.message:`Network request failed.`));try{return await Promise.race([l,o])}finally{a=!0,r&&clearTimeout(r),t.signal.removeEventListener(`abort`,c)}}}}function E(e){return D(`cancelled`,e.reason instanceof Error?e.reason.message:String(e.reason??`Network request was cancelled.`))}function D(e,t){return{error:{kind:e,message:t},kind:`failure`}}function O(e){let t=new AbortController,n=new Set,r=Object.freeze({cacheMode:e.cacheMode??`default`,dryRun:e.dryRun??!1,outputMode:e.outputMode??`human`,quiet:e.quiet??!1,timeoutMs:e.timeoutMs}),i=Object.freeze({...e.ports}),a;return{options:r,ports:i,signal:t.signal,cancel(e){if(a)return a;let r;a=new Promise(e=>{r=e}),t.abort(e);let i=[...n];return n.clear(),Promise.allSettled(i.map(t=>Promise.resolve().then(()=>t(e)))).then(()=>r()),a},onCancel(e){return t.signal.aborted?()=>void 0:(n.add(e),()=>{n.delete(e)})}}}async function k(e,t,n){if(t.signal.aborted)return A();let r=await n.plan({context:{signal:t.signal,timeoutMs:t.options.timeoutMs},metadataCache:t.ports.cache,networkPort:t.ports.network,persistencePort:t.ports.persistence,updateChannel:e.updateChannel});return t.signal.aborted?A(r):e.check||e.dryRun||r.status!==`update-available`?{kind:`planned`,plan:r}:{kind:`executed`,plan:r,result:await n.upgrade(r,{lockPort:t.ports.locks,networkPort:t.ports.network,processPort:t.ports.process,signal:t.signal,stdio:t.options.outputMode===`human`?[`inherit`,`inherit`,`inherit`]:[`ignore`,`pipe`,`pipe`],timeoutMs:t.options.timeoutMs})}}function A(e){return{error:{kind:`cancelled`,message:`Self-upgrade invocation was cancelled.`},kind:`interrupted`,...e?{plan:e}:{}}}function j(){let e=r(),t=O({cacheMode:e.cacheMode,dryRun:e.dryRun,outputMode:e.outputMode,ports:M(),quiet:e.quiet,timeoutMs:e.timeoutMs});e.cancelled&&t.cancel(`cancelled`);let n=f(()=>t.cancel(`cancelled`)),i=!1,a={plan:e=>p({context:e.context,metadataCache:e.metadataCache,networkPort:e.networkPort,persistencePort:e.persistencePort,updateChannel:e.updateChannel}),upgrade:(e,t)=>l(e,t)};return{dispose(){i||(i=!0,n())},run:e=>k(e,t,a)}}function M(){return{cache:x(),clock:{now:Date.now,sleep:N},fileSystem:{makeDirectory:N,readFile:N,remove:N,rename:N,writeFile:N},locks:c(),network:T(),persistence:i(),process:C()}}async function N(){return{error:{kind:`unavailable`,message:`Runtime port is not bound for this self-upgrade operation.`},kind:`failure`}}async function P(e={}){let r=v(),i=j(),o=await i.run({check:e.check??!1,dryRun:r,updateChannel:e.channel}).finally(()=>i.dispose());if(o.kind===`interrupted`)throw new t({kind:`cancelled`,reason:o.error.message});let c=o.plan,l=s(c),d=I(l),f=R(l);if(c.status===`up-to-date`)return n(m({action:`upgrade`,data:{canAutoUpdate:l.canAutoUpdate,channel:l.updateChannel,currentVersion:l.currentVersion,installSource:l.installSource,latestVersion:l.latestVersion,status:`up-to-date`},target:{kind:`self`,name:`quantex`},warnings:[...d,...f?[f]:[]]}),F);if(e.check||r)return c.status===`update-available`?n(m({action:`upgrade`,data:{canAutoUpdate:l.canAutoUpdate,channel:l.updateChannel,currentVersion:l.currentVersion,installSource:l.installSource,latestVersion:l.latestVersion,status:`update-available`},exitCode:e.check?1:void 0,target:{kind:`self`,name:`quantex`},warnings:[...d,...f?[f]:[],...r?[{code:`DRY_RUN`,message:`Dry run: would upgrade Quantex CLI.`}]:[]]}),F):n(u({action:`upgrade`,data:{canAutoUpdate:l.canAutoUpdate,channel:l.updateChannel,currentVersion:l.currentVersion,installSource:l.installSource,status:`check-unavailable`},error:{code:`NETWORK_ERROR`,message:`Unable to determine the latest Quantex CLI version.`},target:{kind:`self`,name:`quantex`},warnings:[...d,...f?[f]:[]]}),F);if(c.status===`manual-required`){let e=a(l);return n(u({action:`upgrade`,data:{canAutoUpdate:l.canAutoUpdate,channel:l.updateChannel,currentVersion:l.currentVersion,installSource:l.installSource,latestVersion:l.latestVersion,recoveryHint:e,status:`manual-required`},error:{code:`MANUAL_ACTION_REQUIRED`,message:`Quantex CLI cannot auto-update from the current install source: ${l.installSource}.`},target:{kind:`self`,name:`quantex`},warnings:[...d,...f?[f]:[]]}),F)}if(o.kind!==`executed`)throw Error(`Self-upgrade execution did not produce a result.`);let p=o.result;if(p.success)return n(m({action:`upgrade`,data:{canAutoUpdate:l.canAutoUpdate,channel:l.updateChannel,currentVersion:l.currentVersion,installSource:l.installSource,latestVersion:l.latestVersion,status:`updated`},target:{kind:`self`,name:`quantex`},warnings:[...d,...f?[f]:[]]}),F);let h=a(l,p);return n(u({action:`upgrade`,data:{canAutoUpdate:l.canAutoUpdate,channel:l.updateChannel,currentVersion:l.currentVersion,installSource:l.installSource,latestVersion:l.latestVersion,recoveryHint:h,status:`manual-required`},error:{code:`UPGRADE_FAILED`,details:p.error?.kind?{kind:p.error.kind}:void 0,message:p.error?.message??`Failed to upgrade Quantex CLI.`},target:{kind:`self`,name:`quantex`},warnings:[...d,...h?[{code:`MANUAL_RECOVERY`,message:`Manual recovery: ${h}`}]:[]]}),F)}function F(e){if(!e.data){e.error&&y(h.red(e.error.message));return}if(e.data.status===`up-to-date`){_(h.green(`Quantex CLI is already up to date (${e.data.currentVersion}).`)),L(e.warnings);return}if(e.data.status===`update-available`){let t=e.warnings.some(e=>e.message.includes(`Dry run`))?`Dry run: `:``;g(h.yellow(`${t}Update available for Quantex CLI: ${e.data.currentVersion} -> ${e.data.latestVersion} (${e.data.channel}).`)),L(e.warnings);return}if(e.data.status===`check-unavailable`){e.error&&g(h.yellow(e.error.message)),L(e.warnings);return}if(e.data.status===`manual-required`&&e.error?.code===`MANUAL_ACTION_REQUIRED`){g(h.yellow(e.error.message)),e.data.recoveryHint&&g(h.cyan(`Next step: ${e.data.recoveryHint}`));return}let t=e.data.latestVersion?` (${e.data.currentVersion} -> ${e.data.latestVersion})`:` (${e.data.currentVersion})`;if(_(h.cyan(`Upgrading Quantex CLI...${t}`)),!e.error){_(h.green(`Quantex CLI upgraded successfully.`)),L(e.warnings);return}y(h.red(`Failed to upgrade Quantex CLI.`)),g(h.yellow(`Reason: ${e.error.message}`));for(let t of e.warnings)g(h.cyan(t.message.replace(/^Manual recovery:/,`Next step:`)))}function I(e){return!e.latestVersion||!e.upstreamLatestVersion||e.latestVersion===e.upstreamLatestVersion||e.installSource!==`bun`&&e.installSource!==`npm`?[]:[{code:`MIRROR_LAG`,details:{installableLatestVersion:e.latestVersion,upstreamLatestVersion:e.upstreamLatestVersion},message:`The selected registry currently installs ${e.latestVersion}, while upstream npm has ${e.upstreamLatestVersion}. Retry later or set selfUpdateRegistry / QTX_SELF_UPDATE_REGISTRY to another registry if you need the upstream release now.`}]}function L(e){for(let t of e)t.code===`DRY_RUN`||t.code===`MANUAL_RECOVERY`||g(h.yellow(t.message))}function R(t){if(!t.latestVersion)return;let n=e(t.latestVersion,t.currentVersion);if(!(n===void 0||n>=0))return{code:`STALE_LATEST_VERSION`,details:{currentVersion:t.currentVersion,latestVersion:t.latestVersion},message:`The resolved latest version ${t.latestVersion} is older than the installed Quantex CLI ${t.currentVersion}. Quantex will not downgrade; retry with --refresh or --no-cache if you need a fresh check.`}}export{P as upgradeCommand};
@@ -1 +1 @@
1
- import{an as e}from"./color-DRZEEJuf.mjs";import t from"node:process";const n={debug:4,error:1,info:3,silent:0,warn:2};function r(e){o(`info`)&&t.stdout.write(`${e}\n`)}function i(e){o(`warn`)&&t.stdout.write(`${e}\n`)}function a(e){o(`error`)&&t.stdout.write(`${e}\n`)}function o(t){let r=e();return r.outputMode===`human`?r.quiet&&t===`info`?!1:n[r.logLevel??`info`]>=n[t]:!0}function s(){return!!e().assumeYes}function c(){return!!e().dryRun}function l(e){t.stdout.write(`${e}\n`)}export{i as a,r as i,c as n,l as o,a as r,s as t};
1
+ import{an as e}from"./color-nTiVIiHx.mjs";import t from"node:process";const n={debug:4,error:1,info:3,silent:0,warn:2};function r(e){o(`info`)&&t.stdout.write(`${e}\n`)}function i(e){o(`warn`)&&t.stdout.write(`${e}\n`)}function a(e){o(`error`)&&t.stdout.write(`${e}\n`)}function o(t){let r=e();return r.outputMode===`human`?r.quiet&&t===`info`?!1:n[r.logLevel??`info`]>=n[t]:!0}function s(){return!!e().assumeYes}function c(){return!!e().dryRun}function l(e){t.stdout.write(`${e}\n`)}export{i as a,r as i,c as n,l as o,a as r,s as t};
@@ -1 +1 @@
1
- import{$t as e,Pt as t,an as n,en as r,nn as i}from"./color-DRZEEJuf.mjs";import{dirname as a,join as o}from"node:path";import{mkdir as s,readFile as c,writeFile as l}from"node:fs/promises";const u={platform:process.platform,spawn:(e,t)=>r(e,{...t,stdio:t.stdio?[...t.stdio]:void 0}),terminate:i,writeStderr:e=>{process.stderr.write(e)}};function d(t=u){return{async run(n){if(n.signal.aborted)return p(n.signal);let r;try{r=t.spawn(n.argv,{...n.cwd?{cwd:n.cwd}:{},detached:t.platform!==`win32`,...n.env?{env:{...process.env,...n.env}}:{},stdio:n.stdio})}catch(e){return m(`failed`,g(e,`Failed to launch agent process.`))}let i=e(r),a,o,s=new Promise(e=>{o=()=>e({kind:`cancelled`}),n.signal.addEventListener(`abort`,o,{once:!0}),n.signal.aborted&&o()}),c=i.then(e=>({kind:`completed`,result:e})),l=n.timeoutMs===void 0?void 0:new Promise(e=>{a=setTimeout(()=>e({kind:`timed-out`}),n.timeoutMs)});try{let e=await Promise.race(l?[c,s,l]:[c,s]);if(e.kind===`completed`)return f(e.result,n,t);if(e.kind===`cancelled`)return await t.terminate(r),await i.catch(()=>void 0),p(n.signal);let a=await v(c,_(n.timeoutMs));return a?f(a.result,n,t):(await t.terminate(r),await i.catch(()=>void 0),m(`timed-out`,`Agent process timed out after ${n.timeoutMs}ms.`))}finally{a&&clearTimeout(a),n.signal.removeEventListener(`abort`,o)}}}}function f(e,t,n){t.forwardPipedOutput!==!1&&(t.stdio?.[1]===`pipe`&&e.stdout&&n.writeStderr?.(e.stdout),t.stdio?.[2]===`pipe`&&e.stderr&&n.writeStderr?.(e.stderr));let r=new TextEncoder;return{kind:`success`,value:{exitCode:e.exitCode,...e.stderr?{stderr:r.encode(e.stderr)}:{},...e.stdout?{stdout:r.encode(e.stdout)}:{}}}}function p(e){return m(`cancelled`,h(e)??`Agent process was cancelled.`)}function m(e,t){return{error:{kind:e,message:t},kind:`failure`}}function h(e){if(e.reason!==void 0)return e.reason instanceof Error?e.reason.message:String(e.reason)}function g(e,t){return e instanceof Error&&e.message.trim()?e.message:t}function _(e){return Math.max(1,Math.min(e,250))}async function v(e,t){let n;try{return await Promise.race([e,new Promise(e=>{n=setTimeout(()=>e(void 0),t)})])}finally{n&&clearTimeout(n)}}function y(e={}){let r=e.filePath??o(t(),`cache`,`versions.json`),i=e.getCacheMode??(()=>n().cacheMode??`default`),a=e.now??Date.now;return{async read(e){let t=T(e.signal);if(t)return t;if(i()===`no-cache`)return C({kind:`miss`});try{let t=await b(r),n=T(e.signal);if(n)return n;let i=t.entries[e.key];if(!i||i.expiresAt<=a())return C({kind:`miss`});try{return C({expiresAtMs:i.expiresAt,kind:`hit`,value:JSON.parse(i.body)})}catch{return w(`invalid-data`,`Cached value for ${e.key} is not valid JSON.`)}}catch(e){return E(e,`Failed to read the version cache.`)}},async remove(e){let t=T(e.signal);if(t)return t;if(i()===`no-cache`)return C(void 0);try{let t=await b(r);return T(e.signal)||(Object.hasOwn(t.entries,e.key)?(delete t.entries[e.key],await x(r,t),T(e.signal)??C(void 0)):C(void 0))}catch(e){return E(e,`Failed to remove a version cache entry.`)}},async write(e){let t=T(e.signal);if(t)return t;if(i()===`no-cache`)return C(void 0);try{let t=await b(r),n=T(e.signal);if(n)return n;let i=a(),o=JSON.stringify(e.value);return o===void 0?w(`invalid-data`,`Cached value for ${e.key} is not JSON serializable.`):(t.entries[e.key]={body:o,expiresAt:e.expiresAtMs??2**53-1,fetchedAt:i},await x(r,t),T(e.signal)??C(void 0))}catch(e){return E(e,`Failed to write the version cache.`)}}}}async function b(e){try{return S(JSON.parse(await c(e,`utf8`)))}catch(e){if(D(e)||e instanceof SyntaxError)return{entries:{}};throw e}}async function x(e,t){await s(a(e),{recursive:!0}),await l(e,`${JSON.stringify(t,null,2)}\n`,`utf8`)}function S(e){if(!O(e)||!O(e.entries))return{entries:{}};let t={};for(let[n,r]of Object.entries(e.entries))!O(r)||typeof r.body!=`string`||!k(r.expiresAt)||(t[n]={body:r.body,etag:typeof r.etag==`string`?r.etag:void 0,expiresAt:r.expiresAt,fetchedAt:k(r.fetchedAt)?r.fetchedAt:void 0});return{entries:t}}function C(e){return{kind:`success`,value:e}}function w(e,t,n){return{error:{code:n,kind:e,message:t},kind:`failure`}}function T(e){return e.aborted?w(`cancelled`,`Cache operation was cancelled.`):void 0}function E(e,t){return w(`failed`,t,O(e)&&typeof e.code==`string`?e.code:void 0)}function D(e){return O(e)&&(e.code===`ENOENT`||e.code===`ENOTDIR`)}function O(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function k(e){return typeof e==`number`&&Number.isSafeInteger(e)&&e>=0}export{d as n,y as t};
1
+ import{$t as e,Pt as t,an as n,en as r,nn as i}from"./color-nTiVIiHx.mjs";import{dirname as a,join as o}from"node:path";import{mkdir as s,readFile as c,writeFile as l}from"node:fs/promises";const u={platform:process.platform,spawn:(e,t)=>r(e,{...t,stdio:t.stdio?[...t.stdio]:void 0}),terminate:i,writeStderr:e=>{process.stderr.write(e)}};function d(t=u){return{async run(n){if(n.signal.aborted)return p(n.signal);let r;try{r=t.spawn(n.argv,{...n.cwd?{cwd:n.cwd}:{},detached:t.platform!==`win32`,...n.env?{env:{...process.env,...n.env}}:{},stdio:n.stdio})}catch(e){return m(`failed`,g(e,`Failed to launch agent process.`))}let i=e(r),a,o,s=new Promise(e=>{o=()=>e({kind:`cancelled`}),n.signal.addEventListener(`abort`,o,{once:!0}),n.signal.aborted&&o()}),c=i.then(e=>({kind:`completed`,result:e})),l=n.timeoutMs===void 0?void 0:new Promise(e=>{a=setTimeout(()=>e({kind:`timed-out`}),n.timeoutMs)});try{let e=await Promise.race(l?[c,s,l]:[c,s]);if(e.kind===`completed`)return f(e.result,n,t);if(e.kind===`cancelled`)return await t.terminate(r),await i.catch(()=>void 0),p(n.signal);let a=await v(c,_(n.timeoutMs));return a?f(a.result,n,t):(await t.terminate(r),await i.catch(()=>void 0),m(`timed-out`,`Agent process timed out after ${n.timeoutMs}ms.`))}finally{a&&clearTimeout(a),n.signal.removeEventListener(`abort`,o)}}}}function f(e,t,n){t.forwardPipedOutput!==!1&&(t.stdio?.[1]===`pipe`&&e.stdout&&n.writeStderr?.(e.stdout),t.stdio?.[2]===`pipe`&&e.stderr&&n.writeStderr?.(e.stderr));let r=new TextEncoder;return{kind:`success`,value:{exitCode:e.exitCode,...e.stderr?{stderr:r.encode(e.stderr)}:{},...e.stdout?{stdout:r.encode(e.stdout)}:{}}}}function p(e){return m(`cancelled`,h(e)??`Agent process was cancelled.`)}function m(e,t){return{error:{kind:e,message:t},kind:`failure`}}function h(e){if(e.reason!==void 0)return e.reason instanceof Error?e.reason.message:String(e.reason)}function g(e,t){return e instanceof Error&&e.message.trim()?e.message:t}function _(e){return Math.max(1,Math.min(e,250))}async function v(e,t){let n;try{return await Promise.race([e,new Promise(e=>{n=setTimeout(()=>e(void 0),t)})])}finally{n&&clearTimeout(n)}}function y(e={}){let r=e.filePath??o(t(),`cache`,`versions.json`),i=e.getCacheMode??(()=>n().cacheMode??`default`),a=e.now??Date.now;return{async read(e){let t=T(e.signal);if(t)return t;if(i()===`no-cache`)return C({kind:`miss`});try{let t=await b(r),n=T(e.signal);if(n)return n;let i=t.entries[e.key];if(!i||i.expiresAt<=a())return C({kind:`miss`});try{return C({expiresAtMs:i.expiresAt,kind:`hit`,value:JSON.parse(i.body)})}catch{return w(`invalid-data`,`Cached value for ${e.key} is not valid JSON.`)}}catch(e){return E(e,`Failed to read the version cache.`)}},async remove(e){let t=T(e.signal);if(t)return t;if(i()===`no-cache`)return C(void 0);try{let t=await b(r);return T(e.signal)||(Object.hasOwn(t.entries,e.key)?(delete t.entries[e.key],await x(r,t),T(e.signal)??C(void 0)):C(void 0))}catch(e){return E(e,`Failed to remove a version cache entry.`)}},async write(e){let t=T(e.signal);if(t)return t;if(i()===`no-cache`)return C(void 0);try{let t=await b(r),n=T(e.signal);if(n)return n;let i=a(),o=JSON.stringify(e.value);return o===void 0?w(`invalid-data`,`Cached value for ${e.key} is not JSON serializable.`):(t.entries[e.key]={body:o,expiresAt:e.expiresAtMs??2**53-1,fetchedAt:i},await x(r,t),T(e.signal)??C(void 0))}catch(e){return E(e,`Failed to write the version cache.`)}}}}async function b(e){try{return S(JSON.parse(await c(e,`utf8`)))}catch(e){if(D(e)||e instanceof SyntaxError)return{entries:{}};throw e}}async function x(e,t){await s(a(e),{recursive:!0}),await l(e,`${JSON.stringify(t,null,2)}\n`,`utf8`)}function S(e){if(!O(e)||!O(e.entries))return{entries:{}};let t={};for(let[n,r]of Object.entries(e.entries))!O(r)||typeof r.body!=`string`||!k(r.expiresAt)||(t[n]={body:r.body,etag:typeof r.etag==`string`?r.etag:void 0,expiresAt:r.expiresAt,fetchedAt:k(r.fetchedAt)?r.fetchedAt:void 0});return{entries:t}}function C(e){return{kind:`success`,value:e}}function w(e,t,n){return{error:{code:n,kind:e,message:t},kind:`failure`}}function T(e){return e.aborted?w(`cancelled`,`Cache operation was cancelled.`):void 0}function E(e,t){return w(`failed`,t,O(e)&&typeof e.code==`string`?e.code:void 0)}function D(e){return O(e)&&(e.code===`ENOENT`||e.code===`ENOTDIR`)}function O(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function k(e){return typeof e==`number`&&Number.isSafeInteger(e)&&e>=0}export{d as n,y as t};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "quantex-cli",
3
- "version": "0.29.1",
3
+ "version": "1.1.0",
4
4
  "description": "Agent-friendly lifecycle CLI for AI coding assistant CLIs: install, inspect, update, uninstall, run, and automate Codex, Claude Code, Gemini, Cursor, OpenCode, and more",
5
5
  "keywords": [
6
6
  "agent-cli",
@@ -1 +0,0 @@
1
- import{t as e}from"./capabilities-DwvTrIyT.mjs";export{e as capabilitiesCommand};
@@ -1 +0,0 @@
1
- import{t as e}from"./commands-BV_8m8O3.mjs";export{e as commandsCommand};
@@ -1 +0,0 @@
1
- import{t as e}from"./ensure-CtIsNpIc.mjs";export{e as ensureCommand};
@@ -1 +0,0 @@
1
- import{t as e}from"./inspect-BBCaK7m4.mjs";export{e as inspectCommand};
@@ -1 +0,0 @@
1
- import{t as e}from"./resolve-D8sxYL1V.mjs";export{e as resolveCommand};
@@ -1 +0,0 @@
1
- import{n as e}from"./schema-CGsjqfua.mjs";export{e as schemaCommand};