quantex-cli 0.18.5 → 0.19.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 (41) hide show
  1. package/dist/agents-ZNosvpri.mjs +1 -0
  2. package/dist/capabilities-CH1g9Wyv.mjs +1 -0
  3. package/dist/capabilities-CKB3soqZ.mjs +5 -0
  4. package/dist/cli.mjs +1 -1
  5. package/dist/{color-DPVCVxkr.mjs → color-BgHjt9pg.mjs} +2 -2
  6. package/dist/commands-DW43XU0t.mjs +1 -0
  7. package/dist/{commands-BtmyjCx1.mjs → commands-TfkZ40FQ.mjs} +1 -1
  8. package/dist/{config-B6pPWz2n.mjs → config-BviiWqlK.mjs} +1 -1
  9. package/dist/detect-Q1nnDcca.mjs +1 -0
  10. package/dist/doctor-C_dl2rTA.mjs +3 -0
  11. package/dist/{ensure-gz-U0dLB.mjs → ensure-Bsodatwu.mjs} +1 -1
  12. package/dist/ensure-C6muP4LG.mjs +1 -0
  13. package/dist/index.d.mts +500 -2
  14. package/dist/index.mjs +2 -2
  15. package/dist/{info-BImqGoFh.mjs → info-L1EKkDNs.mjs} +1 -1
  16. package/dist/{inspect-BYkFiCr4.mjs → inspect-DOELzVla.mjs} +1 -1
  17. package/dist/inspect-VWWSSGk4.mjs +1 -0
  18. package/dist/{install-BlrGWHOk.mjs → install-BA0iWXm3.mjs} +1 -1
  19. package/dist/{list-szBoZRQ0.mjs → list-BzfNq_Hq.mjs} +1 -1
  20. package/dist/resolve-BbcQHghj.mjs +1 -0
  21. package/dist/{resolve-D67Ham9Q.mjs → resolve-DD2lh-Rl.mjs} +1 -1
  22. package/dist/schema-CH18r4wk.mjs +1 -0
  23. package/dist/{schema-C5qyYzdx.mjs → schema-Dh6SqSrc.mjs} +2 -2
  24. package/dist/{uninstall-GV6FgdBN.mjs → uninstall-SefKbL8a.mjs} +1 -1
  25. package/dist/update-BNzZDPvJ.mjs +1 -0
  26. package/dist/update-Gat4pKeS.mjs +1 -0
  27. package/dist/{upgrade-CrOevmFQ.mjs → upgrade-CVxQ8XFg.mjs} +1 -1
  28. package/dist/{user-output-Bb3bt9ss.mjs → user-output-C9oDB7iF.mjs} +1 -1
  29. package/package.json +4 -2
  30. package/dist/agents-XljEY0Vt.mjs +0 -1
  31. package/dist/capabilities-C79bDKbV.mjs +0 -5
  32. package/dist/capabilities-CiHKQ7Vg.mjs +0 -1
  33. package/dist/commands-DW6yZtuy.mjs +0 -1
  34. package/dist/detect-DQJbxlSn.mjs +0 -1
  35. package/dist/doctor-lsSzS5D5.mjs +0 -3
  36. package/dist/ensure-DoHI7HaT.mjs +0 -1
  37. package/dist/inspect-B4aUB04l.mjs +0 -1
  38. package/dist/resolve-C-hYtghC.mjs +0 -1
  39. package/dist/schema-C-U1n2xE.mjs +0 -1
  40. package/dist/update-BwoFH6zN.mjs +0 -1
  41. package/dist/update-DoeWcNiV.mjs +0 -1
@@ -1 +1 @@
1
- import{r as e,v as t,y as n}from"./agents-XljEY0Vt.mjs";import{a as r,n as i,r as a,t as o}from"./color-DPVCVxkr.mjs";async function s(o){let s=await e(o);if(!s)return r(i({action:`resolve`,error:{code:`AGENT_NOT_FOUND`,details:{input:o},message:`Unknown agent: ${o}`},target:{kind:`agent`,name:o}}),c);let{agent:l,inspection:u}=s;if(!u.inPath||!u.binaryPath){let e=u.methods.map(e=>({command:t(l,e),label:n(e),type:e.type})).filter(e=>e.command);return r(i({action:`resolve`,data:{agent:{binaryName:l.binaryName,displayName:l.displayName,name:l.name},resolution:{binaryPath:``,installGuidance:{docsRef:`skills/quantex-cli/references/command-recipes.md`,installMethods:e,suggestedAction:`ensure-agent-installed`,suggestedEnsureCommand:`quantex ensure ${l.name}`},installed:!1,installSource:`not-installed`,lifecycle:`unmanaged`,sourceLabel:`not installed`,suggestedLaunchCommand:[]}},error:{code:`AGENT_NOT_INSTALLED`,details:{docsRef:`skills/quantex-cli/references/command-recipes.md`,installMethods:e,suggestedAction:`ensure-agent-installed`,suggestedEnsureCommand:`quantex ensure ${l.name}`},message:`${l.displayName} is not installed.`},target:{kind:`agent`,name:l.name}}),c)}return r(a({action:`resolve`,data:{agent:{binaryName:l.binaryName,displayName:l.displayName,name:l.name},resolution:{binaryPath:u.binaryPath,installed:!0,installSource:u.installedState?.installType??`detected-in-path`,installedVersion:u.installedVersion,lifecycle:u.lifecycle,sourceLabel:u.sourceLabel,suggestedLaunchCommand:[u.binaryPath]}},target:{kind:`agent`,name:l.name}}),c)}function c(e){if(e.error){console.log(o.red(e.error.message));let t=e.data?.resolution.installGuidance;if(t){console.log(o.dim(`Try: ${t.suggestedEnsureCommand}`));for(let e of t.installMethods)console.log(o.dim(`Install: [${e.label}] ${e.command}`))}return}e.data&&(console.log(o.bold(`\n${e.data.agent.displayName}\n`)),console.log(` Name: ${e.data.agent.name}`),console.log(` Binary: ${e.data.agent.binaryName}`),console.log(` Path: ${e.data.resolution.binaryPath}`),console.log(` Source: ${e.data.resolution.sourceLabel}`),console.log(` Lifecycle: ${e.data.resolution.lifecycle}`),console.log(` Install Type: ${e.data.resolution.installSource}`),e.data.resolution.installedVersion&&console.log(` Version: ${e.data.resolution.installedVersion}`),console.log(` Launch: ${e.data.resolution.suggestedLaunchCommand.join(` `)}`),console.log())}export{s as t};
1
+ import{r as e,v as t,y as n}from"./agents-ZNosvpri.mjs";import{a as r,n as i,r as a,t as o}from"./color-BgHjt9pg.mjs";async function s(o){let s=await e(o);if(!s)return r(i({action:`resolve`,error:{code:`AGENT_NOT_FOUND`,details:{input:o},message:`Unknown agent: ${o}`},target:{kind:`agent`,name:o}}),c);let{agent:l,inspection:u}=s;if(!u.inPath||!u.binaryPath){let e=u.methods.map(e=>({command:t(l,e),label:n(e),type:e.type})).filter(e=>e.command);return r(i({action:`resolve`,data:{agent:{binaryName:l.binaryName,displayName:l.displayName,name:l.name},resolution:{binaryPath:``,installGuidance:{docsRef:`skills/quantex-cli/references/command-recipes.md`,installMethods:e,suggestedAction:`ensure-agent-installed`,suggestedEnsureCommand:`quantex ensure ${l.name}`},installed:!1,installSource:`not-installed`,lifecycle:`unmanaged`,sourceLabel:`not installed`,suggestedLaunchCommand:[]}},error:{code:`AGENT_NOT_INSTALLED`,details:{docsRef:`skills/quantex-cli/references/command-recipes.md`,installMethods:e,suggestedAction:`ensure-agent-installed`,suggestedEnsureCommand:`quantex ensure ${l.name}`},message:`${l.displayName} is not installed.`},target:{kind:`agent`,name:l.name}}),c)}return r(a({action:`resolve`,data:{agent:{binaryName:l.binaryName,displayName:l.displayName,name:l.name},resolution:{binaryPath:u.binaryPath,installed:!0,installSource:u.installedState?.installType??`detected-in-path`,installedVersion:u.installedVersion,lifecycle:u.lifecycle,sourceLabel:u.sourceLabel,suggestedLaunchCommand:[u.binaryPath]}},target:{kind:`agent`,name:l.name}}),c)}function c(e){if(e.error){console.log(o.red(e.error.message));let t=e.data?.resolution.installGuidance;if(t){console.log(o.dim(`Try: ${t.suggestedEnsureCommand}`));for(let e of t.installMethods)console.log(o.dim(`Install: [${e.label}] ${e.command}`))}return}e.data&&(console.log(o.bold(`\n${e.data.agent.displayName}\n`)),console.log(` Name: ${e.data.agent.name}`),console.log(` Binary: ${e.data.agent.binaryName}`),console.log(` Path: ${e.data.resolution.binaryPath}`),console.log(` Source: ${e.data.resolution.sourceLabel}`),console.log(` Lifecycle: ${e.data.resolution.lifecycle}`),console.log(` Install Type: ${e.data.resolution.installSource}`),e.data.resolution.installedVersion&&console.log(` Version: ${e.data.resolution.installedVersion}`),console.log(` Launch: ${e.data.resolution.suggestedLaunchCommand.join(` `)}`),console.log())}export{s as t};
@@ -0,0 +1 @@
1
+ import{n as e}from"./schema-Dh6SqSrc.mjs";export{e as schemaCommand};
@@ -1,3 +1,3 @@
1
- import{a as e,n as t,r as n,t as r}from"./color-DPVCVxkr.mjs";const i={additionalProperties:!1,properties:{action:{type:`string`},data:{type:`object`},error:{additionalProperties:!1,properties:{code:{type:`string`},message:{type:`string`}},required:[`code`,`message`],type:`object`},exitCode:{type:`integer`},meta:{additionalProperties:!1,properties:{mode:{type:`string`},runId:{type:`string`},schemaVersion:{type:`string`},source:{type:`string`},fetchedAt:{type:`string`},staleAfter:{type:`string`},timestamp:{type:`string`},version:{type:`string`}},required:[`mode`,`runId`,`schemaVersion`,`timestamp`,`version`],type:`object`},ok:{type:`boolean`},target:{additionalProperties:!1,properties:{kind:{type:`string`},name:{type:`string`}},required:[`kind`],type:`object`},warnings:{items:{additionalProperties:!1,properties:{code:{type:`string`},message:{type:`string`}},required:[`code`,`message`],type:`object`},type:`array`}},required:[`action`,`error`,`meta`,`ok`,`warnings`],type:`object`},a={additionalProperties:!1,properties:{action:{type:`string`},data:{type:`object`},meta:{additionalProperties:!1,properties:{mode:{type:`string`},runId:{type:`string`},schemaVersion:{type:`string`},source:{type:`string`},fetchedAt:{type:`string`},staleAfter:{type:`string`},timestamp:{type:`string`},version:{type:`string`}},required:[`mode`,`runId`,`schemaVersion`,`timestamp`,`version`],type:`object`},target:{additionalProperties:!1,properties:{kind:{type:`string`},name:{type:`string`}},required:[`kind`],type:`object`},type:{type:`string`}},required:[`action`,`meta`,`type`],type:`object`},o=[{dataSchema:{additionalProperties:!1,properties:{agents:{items:{type:`string`},type:`array`},features:{additionalProperties:!1,properties:{assumeYes:{type:`boolean`},cacheBypass:{type:`boolean`},cacheRefresh:{type:`boolean`},channels:{items:{type:`string`},type:`array`},colorModes:{items:{type:`string`},type:`array`},dryRun:{type:`boolean`},execInstallPolicies:{items:{type:`string`},type:`array`},freshnessMetadata:{type:`boolean`},idempotencyKey:{type:`boolean`},logLevels:{items:{type:`string`},type:`array`},quietLogs:{type:`boolean`},selfUpgrade:{type:`boolean`},timeout:{type:`boolean`}},required:[`assumeYes`,`cacheBypass`,`cacheRefresh`,`channels`,`colorModes`,`dryRun`,`execInstallPolicies`,`freshnessMetadata`,`idempotencyKey`,`logLevels`,`quietLogs`,`selfUpgrade`,`timeout`],type:`object`},installers:{type:`object`},outputModes:{items:{type:`string`},type:`array`},platform:{additionalProperties:!1,properties:{arch:{type:`string`},os:{type:`string`}},required:[`arch`,`os`],type:`object`}},required:[`agents`,`features`,`installers`,`outputModes`,`platform`],type:`object`},description:`Environment and surface capabilities`,envelopeSchema:i,name:`capabilities`,ndjsonEventSchema:a},{dataSchema:{additionalProperties:!1,properties:{commands:{items:{additionalProperties:!1,properties:{flags:{items:{type:`string`},type:`array`},name:{type:`string`},outputSchemaRef:{type:`string`},stability:{type:`string`},summary:{type:`string`}},required:[`flags`,`name`,`outputSchemaRef`,`stability`,`summary`],type:`object`},type:`array`}},required:[`commands`],type:`object`},description:`Stable command catalog`,envelopeSchema:i,name:`commands`,ndjsonEventSchema:a},{dataSchema:{additionalProperties:!1,properties:{agents:{items:{additionalProperties:!1,properties:{displayName:{type:`string`},installedVersion:{type:`string`},latestVersion:{type:`string`},lifecycle:{type:`string`},outdated:{type:`boolean`},sourceLabel:{type:`string`}},required:[`displayName`,`lifecycle`,`outdated`,`sourceLabel`],type:`object`},type:`array`},installers:{additionalProperties:!1,properties:{brew:{type:`boolean`},bun:{type:`boolean`},cargo:{type:`boolean`},npm:{type:`boolean`},pip:{type:`boolean`},winget:{type:`boolean`}},required:[`brew`,`bun`,`cargo`,`npm`,`pip`,`winget`],type:`object`},issues:{items:{additionalProperties:!1,properties:{blocking:{type:`boolean`},category:{type:`string`},code:{type:`string`},docsRef:{type:`string`},message:{type:`string`},severity:{type:`string`},subject:{additionalProperties:!1,properties:{kind:{type:`string`},name:{type:`string`}},required:[`kind`],type:`object`},suggestedAction:{type:`string`},suggestedCommands:{items:{type:`string`},type:`array`}},required:[`blocking`,`category`,`code`,`message`,`severity`,`subject`,`suggestedAction`,`suggestedCommands`],type:`object`},type:`array`},self:{additionalProperties:!1,properties:{canAutoUpdate:{type:`boolean`},currentVersion:{type:`string`},installSource:{type:`string`},latestVersion:{type:`string`},outdated:{type:`boolean`},recoveryHint:{type:`string`}},required:[`canAutoUpdate`,`currentVersion`,`installSource`,`outdated`],type:`object`}},required:[`agents`,`installers`,`issues`,`self`],type:`object`},description:`Diagnostic state and remediation guidance for the current environment`,envelopeSchema:i,name:`doctor`,ndjsonEventSchema:a},{dataSchema:{additionalProperties:!1,properties:{agent:{additionalProperties:!1,properties:{binaryName:{type:`string`},displayName:{type:`string`},name:{type:`string`}},required:[`name`],type:`object`},execution:{additionalProperties:!1,properties:{args:{items:{type:`string`},type:`array`},installGuidance:{additionalProperties:!1,properties:{docsRef:{type:`string`},installMethods:{items:{additionalProperties:!1,properties:{command:{type:`string`},label:{type:`string`},type:{type:`string`}},required:[`command`,`label`,`type`],type:`object`},type:`array`},suggestedAction:{type:`string`},suggestedEnsureCommand:{type:`string`},suggestedExecCommand:{type:`string`}},required:[`docsRef`,`installMethods`,`suggestedAction`,`suggestedEnsureCommand`,`suggestedExecCommand`],type:`object`},installPolicy:{type:`string`},installed:{type:`boolean`},interactive:{type:`boolean`},launched:{type:`boolean`}},required:[`args`,`installPolicy`,`installed`,`interactive`,`launched`],type:`object`}},required:[`agent`,`execution`],type:`object`},description:`Preflight contract for managed agent execution`,envelopeSchema:i,name:`exec`,ndjsonEventSchema:a},{dataSchema:{additionalProperties:!1,properties:{agent:{type:`object`},changed:{type:`boolean`},installState:{type:`object`},installed:{type:`boolean`},results:{items:{additionalProperties:!1,properties:{agent:{type:`object`},changed:{type:`boolean`},error:{type:`object`},input:{type:`string`},installState:{type:`object`},installed:{type:`boolean`},ok:{type:`boolean`},status:{type:`string`},warnings:{items:{type:`object`},type:`array`}},required:[`agent`,`changed`,`input`,`installed`,`ok`,`status`,`warnings`],type:`object`},type:`array`},scope:{type:`string`},summary:{type:`object`}},type:`object`},description:`Install result for one or more agents`,envelopeSchema:i,name:`install`,ndjsonEventSchema:a},{dataSchema:{additionalProperties:!1,properties:{agent:{type:`object`},changed:{type:`boolean`},installState:{type:`object`},installed:{type:`boolean`}},required:[`agent`,`changed`,`installed`],type:`object`},description:`Ensure result for an agent`,envelopeSchema:i,name:`ensure`,ndjsonEventSchema:a},{dataSchema:{additionalProperties:!1,properties:{agent:{type:`object`},capabilities:{type:`object`},inspection:{type:`object`}},required:[`agent`,`capabilities`,`inspection`],type:`object`},description:`Structured inspection result for an agent`,envelopeSchema:i,name:`inspect`,ndjsonEventSchema:a},{dataSchema:{additionalProperties:!1,properties:{agent:{type:`object`},resolution:{additionalProperties:!1,properties:{binaryPath:{type:`string`},installGuidance:{additionalProperties:!1,properties:{docsRef:{type:`string`},installMethods:{items:{additionalProperties:!1,properties:{command:{type:`string`},label:{type:`string`},type:{type:`string`}},required:[`command`,`label`,`type`],type:`object`},type:`array`},suggestedAction:{type:`string`},suggestedEnsureCommand:{type:`string`}},required:[`docsRef`,`installMethods`,`suggestedAction`,`suggestedEnsureCommand`],type:`object`},installed:{type:`boolean`},installSource:{type:`string`},installedVersion:{type:`string`},lifecycle:{type:`string`},sourceLabel:{type:`string`},suggestedLaunchCommand:{items:{type:`string`},type:`array`}},required:[`binaryPath`,`installed`,`installSource`,`lifecycle`,`sourceLabel`,`suggestedLaunchCommand`],type:`object`}},required:[`agent`,`resolution`],type:`object`},description:`Resolved executable entrypoint for an agent`,envelopeSchema:i,name:`resolve`,ndjsonEventSchema:a},{dataSchema:{additionalProperties:!1,properties:{commands:{items:{additionalProperties:!1,properties:{dataSchema:{type:`object`},description:{type:`string`},envelopeSchema:{type:`object`},name:{type:`string`},ndjsonEventSchema:{type:`object`}},required:[`dataSchema`,`description`,`envelopeSchema`,`name`],type:`object`},type:`array`}},required:[`commands`],type:`object`},description:`Structured schema catalog`,envelopeSchema:i,name:`schema`,ndjsonEventSchema:a}];async function s(r){let i=r?o.filter(e=>e.name===r):o;return r&&i.length===0?e(t({action:`schema`,error:{code:`INVALID_ARGUMENT`,details:{command:r},message:`Unknown schema target: ${r}`},target:{kind:`system`,name:`schema`}}),c):e(n({action:`schema`,data:{commands:i},target:{kind:`system`,name:`schema`}}),c)}function c(e){if(e.error){console.log(r.red(e.error.message));return}if(e.data){console.log(r.bold(`
1
+ import{a as e,n as t,r as n,t as r}from"./color-BgHjt9pg.mjs";const i={additionalProperties:!1,properties:{action:{type:`string`},data:{type:`object`},error:{additionalProperties:!1,properties:{code:{type:`string`},message:{type:`string`}},required:[`code`,`message`],type:`object`},exitCode:{type:`integer`},meta:{additionalProperties:!1,properties:{mode:{type:`string`},runId:{type:`string`},schemaVersion:{type:`string`},source:{type:`string`},fetchedAt:{type:`string`},staleAfter:{type:`string`},timestamp:{type:`string`},version:{type:`string`}},required:[`mode`,`runId`,`schemaVersion`,`timestamp`,`version`],type:`object`},ok:{type:`boolean`},target:{additionalProperties:!1,properties:{kind:{type:`string`},name:{type:`string`}},required:[`kind`],type:`object`},warnings:{items:{additionalProperties:!1,properties:{code:{type:`string`},message:{type:`string`}},required:[`code`,`message`],type:`object`},type:`array`}},required:[`action`,`error`,`meta`,`ok`,`warnings`],type:`object`},a={additionalProperties:!1,properties:{action:{type:`string`},data:{type:`object`},meta:{additionalProperties:!1,properties:{mode:{type:`string`},runId:{type:`string`},schemaVersion:{type:`string`},source:{type:`string`},fetchedAt:{type:`string`},staleAfter:{type:`string`},timestamp:{type:`string`},version:{type:`string`}},required:[`mode`,`runId`,`schemaVersion`,`timestamp`,`version`],type:`object`},target:{additionalProperties:!1,properties:{kind:{type:`string`},name:{type:`string`}},required:[`kind`],type:`object`},type:{type:`string`}},required:[`action`,`meta`,`type`],type:`object`},o={additionalProperties:!1,properties:{available:{type:`boolean`},reason:{type:`string`}},required:[`available`],type:`object`},s={brew:o,bun:o,cargo:o,npm:o,pip:o,uv:o,winget:o},c=[`brew`,`bun`,`cargo`,`npm`,`pip`,`uv`,`winget`],l=[{dataSchema:{additionalProperties:!1,properties:{agents:{items:{type:`string`},type:`array`},features:{additionalProperties:!1,properties:{assumeYes:{type:`boolean`},cacheBypass:{type:`boolean`},cacheRefresh:{type:`boolean`},channels:{items:{type:`string`},type:`array`},colorModes:{items:{type:`string`},type:`array`},dryRun:{type:`boolean`},execInstallPolicies:{items:{type:`string`},type:`array`},freshnessMetadata:{type:`boolean`},idempotencyKey:{type:`boolean`},logLevels:{items:{type:`string`},type:`array`},quietLogs:{type:`boolean`},selfUpgrade:{type:`boolean`},timeout:{type:`boolean`}},required:[`assumeYes`,`cacheBypass`,`cacheRefresh`,`channels`,`colorModes`,`dryRun`,`execInstallPolicies`,`freshnessMetadata`,`idempotencyKey`,`logLevels`,`quietLogs`,`selfUpgrade`,`timeout`],type:`object`},installers:{additionalProperties:!1,properties:s,required:c,type:`object`},outputModes:{items:{type:`string`},type:`array`},platform:{additionalProperties:!1,properties:{arch:{type:`string`},os:{type:`string`}},required:[`arch`,`os`],type:`object`}},required:[`agents`,`features`,`installers`,`outputModes`,`platform`],type:`object`},description:`Environment and surface capabilities`,envelopeSchema:i,name:`capabilities`,ndjsonEventSchema:a},{dataSchema:{additionalProperties:!1,properties:{commands:{items:{additionalProperties:!1,properties:{flags:{items:{type:`string`},type:`array`},name:{type:`string`},outputSchemaRef:{type:`string`},stability:{type:`string`},summary:{type:`string`}},required:[`flags`,`name`,`outputSchemaRef`,`stability`,`summary`],type:`object`},type:`array`}},required:[`commands`],type:`object`},description:`Stable command catalog`,envelopeSchema:i,name:`commands`,ndjsonEventSchema:a},{dataSchema:{additionalProperties:!1,properties:{agents:{items:{additionalProperties:!1,properties:{displayName:{type:`string`},installedVersion:{type:`string`},latestVersion:{type:`string`},lifecycle:{type:`string`},outdated:{type:`boolean`},sourceLabel:{type:`string`}},required:[`displayName`,`lifecycle`,`outdated`,`sourceLabel`],type:`object`},type:`array`},installers:{additionalProperties:!1,properties:{brew:{type:`boolean`},bun:{type:`boolean`},cargo:{type:`boolean`},npm:{type:`boolean`},pip:{type:`boolean`},uv:{type:`boolean`},winget:{type:`boolean`}},required:c,type:`object`},issues:{items:{additionalProperties:!1,properties:{blocking:{type:`boolean`},category:{type:`string`},code:{type:`string`},docsRef:{type:`string`},message:{type:`string`},severity:{type:`string`},subject:{additionalProperties:!1,properties:{kind:{type:`string`},name:{type:`string`}},required:[`kind`],type:`object`},suggestedAction:{type:`string`},suggestedCommands:{items:{type:`string`},type:`array`}},required:[`blocking`,`category`,`code`,`message`,`severity`,`subject`,`suggestedAction`,`suggestedCommands`],type:`object`},type:`array`},self:{additionalProperties:!1,properties:{canAutoUpdate:{type:`boolean`},currentVersion:{type:`string`},installSource:{type:`string`},latestVersion:{type:`string`},outdated:{type:`boolean`},recoveryHint:{type:`string`}},required:[`canAutoUpdate`,`currentVersion`,`installSource`,`outdated`],type:`object`}},required:[`agents`,`installers`,`issues`,`self`],type:`object`},description:`Diagnostic state and remediation guidance for the current environment`,envelopeSchema:i,name:`doctor`,ndjsonEventSchema:a},{dataSchema:{additionalProperties:!1,properties:{agent:{additionalProperties:!1,properties:{binaryName:{type:`string`},displayName:{type:`string`},name:{type:`string`}},required:[`name`],type:`object`},execution:{additionalProperties:!1,properties:{args:{items:{type:`string`},type:`array`},installGuidance:{additionalProperties:!1,properties:{docsRef:{type:`string`},installMethods:{items:{additionalProperties:!1,properties:{command:{type:`string`},label:{type:`string`},type:{type:`string`}},required:[`command`,`label`,`type`],type:`object`},type:`array`},suggestedAction:{type:`string`},suggestedEnsureCommand:{type:`string`},suggestedExecCommand:{type:`string`}},required:[`docsRef`,`installMethods`,`suggestedAction`,`suggestedEnsureCommand`,`suggestedExecCommand`],type:`object`},installPolicy:{type:`string`},installed:{type:`boolean`},interactive:{type:`boolean`},launched:{type:`boolean`}},required:[`args`,`installPolicy`,`installed`,`interactive`,`launched`],type:`object`}},required:[`agent`,`execution`],type:`object`},description:`Preflight contract for managed agent execution`,envelopeSchema:i,name:`exec`,ndjsonEventSchema:a},{dataSchema:{additionalProperties:!1,properties:{agent:{type:`object`},changed:{type:`boolean`},installState:{type:`object`},installed:{type:`boolean`},results:{items:{additionalProperties:!1,properties:{agent:{type:`object`},changed:{type:`boolean`},error:{type:`object`},input:{type:`string`},installState:{type:`object`},installed:{type:`boolean`},ok:{type:`boolean`},status:{type:`string`},warnings:{items:{type:`object`},type:`array`}},required:[`agent`,`changed`,`input`,`installed`,`ok`,`status`,`warnings`],type:`object`},type:`array`},scope:{type:`string`},summary:{type:`object`}},type:`object`},description:`Install result for one or more agents`,envelopeSchema:i,name:`install`,ndjsonEventSchema:a},{dataSchema:{additionalProperties:!1,properties:{agent:{type:`object`},changed:{type:`boolean`},installState:{type:`object`},installed:{type:`boolean`}},required:[`agent`,`changed`,`installed`],type:`object`},description:`Ensure result for an agent`,envelopeSchema:i,name:`ensure`,ndjsonEventSchema:a},{dataSchema:{additionalProperties:!1,properties:{agent:{type:`object`},capabilities:{type:`object`},inspection:{type:`object`}},required:[`agent`,`capabilities`,`inspection`],type:`object`},description:`Structured inspection result for an agent`,envelopeSchema:i,name:`inspect`,ndjsonEventSchema:a},{dataSchema:{additionalProperties:!1,properties:{agent:{type:`object`},resolution:{additionalProperties:!1,properties:{binaryPath:{type:`string`},installGuidance:{additionalProperties:!1,properties:{docsRef:{type:`string`},installMethods:{items:{additionalProperties:!1,properties:{command:{type:`string`},label:{type:`string`},type:{type:`string`}},required:[`command`,`label`,`type`],type:`object`},type:`array`},suggestedAction:{type:`string`},suggestedEnsureCommand:{type:`string`}},required:[`docsRef`,`installMethods`,`suggestedAction`,`suggestedEnsureCommand`],type:`object`},installed:{type:`boolean`},installSource:{type:`string`},installedVersion:{type:`string`},lifecycle:{type:`string`},sourceLabel:{type:`string`},suggestedLaunchCommand:{items:{type:`string`},type:`array`}},required:[`binaryPath`,`installed`,`installSource`,`lifecycle`,`sourceLabel`,`suggestedLaunchCommand`],type:`object`}},required:[`agent`,`resolution`],type:`object`},description:`Resolved executable entrypoint for an agent`,envelopeSchema:i,name:`resolve`,ndjsonEventSchema:a},{dataSchema:{additionalProperties:!1,properties:{commands:{items:{additionalProperties:!1,properties:{dataSchema:{type:`object`},description:{type:`string`},envelopeSchema:{type:`object`},name:{type:`string`},ndjsonEventSchema:{type:`object`}},required:[`dataSchema`,`description`,`envelopeSchema`,`name`],type:`object`},type:`array`}},required:[`commands`],type:`object`},description:`Structured schema catalog`,envelopeSchema:i,name:`schema`,ndjsonEventSchema:a}];async function u(r){let i=r?l.filter(e=>e.name===r):l;return r&&i.length===0?e(t({action:`schema`,error:{code:`INVALID_ARGUMENT`,details:{command:r},message:`Unknown schema target: ${r}`},target:{kind:`system`,name:`schema`}}),d):e(n({action:`schema`,data:{commands:i},target:{kind:`system`,name:`schema`}}),d)}function d(e){if(e.error){console.log(r.red(e.error.message));return}if(e.data){console.log(r.bold(`
2
2
  Quantex Schemas
3
- `));for(let t of e.data.commands)console.log(` ${r.cyan(t.name)}`),console.log(` ${t.description}`);console.log()}}function l(){return o}export{s as n,l as t};
3
+ `));for(let t of e.data.commands)console.log(` ${r.cyan(t.name)}`),console.log(` ${t.description}`);console.log()}}function f(){return l}export{u as n,f as t};
@@ -1 +1 @@
1
- import{l as e,n as t}from"./agents-XljEY0Vt.mjs";import{J as n,O as r,a as i,n as a,r as o,t as s}from"./color-DPVCVxkr.mjs";import{t as c}from"./lifecycle-errors-D7JpbOsK.mjs";import{a as l,i as u,n as d,r as f}from"./user-output-Bb3bt9ss.mjs";async function p(s){let l=t(s);if(!l)return i(a({action:`uninstall`,error:{code:`AGENT_NOT_FOUND`,details:{input:s},message:`Unknown agent: ${s}`},target:{kind:`agent`,name:s}}),m);if(d())return await r(l.name)?i(o({action:`uninstall`,data:{agent:{displayName:l.displayName,name:l.name},changed:!1},target:{kind:`agent`,name:l.name},warnings:[{code:`DRY_RUN`,message:`Dry run: would uninstall ${l.displayName}.`}]}),m):i(a({action:`uninstall`,data:{agent:{displayName:l.displayName,name:l.name},changed:!1},error:{code:`UNINSTALL_FAILED`,message:`Failed to uninstall ${l.displayName}.`},target:{kind:`agent`,name:l.name}}),m);let u;try{u=await e(l)}catch(e){if(n(e))return i(a({action:`uninstall`,data:{agent:{displayName:l.displayName,name:l.name},changed:!1},...c(e,{kind:`agent`,name:l.name})}),m);throw e}return i(u?o({action:`uninstall`,data:{agent:{displayName:l.displayName,name:l.name},changed:!0},target:{kind:`agent`,name:l.name}}):a({action:`uninstall`,data:{agent:{displayName:l.displayName,name:l.name},changed:!1},error:{code:`UNINSTALL_FAILED`,message:`Failed to uninstall ${l.displayName}.`},target:{kind:`agent`,name:l.name}}),m)}function m(e){if(e.error){f(s.red(e.error.message));return}if(e.data){if(e.warnings&&e.warnings.length>0){for(let t of e.warnings)l(s.yellow(t.message));return}u(s.cyan(`Uninstalling ${e.data.agent.displayName}...`)),u(s.green(`${e.data.agent.displayName} uninstalled successfully!`))}}export{p as uninstallCommand};
1
+ import{l as e,n as t}from"./agents-ZNosvpri.mjs";import{J as n,O as r,a as i,n as a,r as o,t as s}from"./color-BgHjt9pg.mjs";import{t as c}from"./lifecycle-errors-D7JpbOsK.mjs";import{a as l,i as u,n as d,r as f}from"./user-output-C9oDB7iF.mjs";async function p(s){let l=t(s);if(!l)return i(a({action:`uninstall`,error:{code:`AGENT_NOT_FOUND`,details:{input:s},message:`Unknown agent: ${s}`},target:{kind:`agent`,name:s}}),m);if(d())return await r(l.name)?i(o({action:`uninstall`,data:{agent:{displayName:l.displayName,name:l.name},changed:!1},target:{kind:`agent`,name:l.name},warnings:[{code:`DRY_RUN`,message:`Dry run: would uninstall ${l.displayName}.`}]}),m):i(a({action:`uninstall`,data:{agent:{displayName:l.displayName,name:l.name},changed:!1},error:{code:`UNINSTALL_FAILED`,message:`Failed to uninstall ${l.displayName}.`},target:{kind:`agent`,name:l.name}}),m);let u;try{u=await e(l)}catch(e){if(n(e))return i(a({action:`uninstall`,data:{agent:{displayName:l.displayName,name:l.name},changed:!1},...c(e,{kind:`agent`,name:l.name})}),m);throw e}return i(u?o({action:`uninstall`,data:{agent:{displayName:l.displayName,name:l.name},changed:!0},target:{kind:`agent`,name:l.name}}):a({action:`uninstall`,data:{agent:{displayName:l.displayName,name:l.name},changed:!1},error:{code:`UNINSTALL_FAILED`,message:`Failed to uninstall ${l.displayName}.`},target:{kind:`agent`,name:l.name}}),m)}function m(e){if(e.error){f(s.red(e.error.message));return}if(e.data){if(e.warnings&&e.warnings.length>0){for(let t of e.warnings)l(s.yellow(t.message));return}u(s.cyan(`Uninstalling ${e.data.agent.displayName}...`)),u(s.green(`${e.data.agent.displayName} uninstalled successfully!`))}}export{p as uninstallCommand};
@@ -0,0 +1 @@
1
+ import{n as e,r as t,t as n}from"./messages-qcLhD-Gc.mjs";import{_ as r,d as i,h as a,n as o,u as s}from"./agents-ZNosvpri.mjs";import{J as c,a as l,i as u,n as d,r as f,t as p,z as m}from"./color-BgHjt9pg.mjs";import{a as h,i as g,n as _,r as v}from"./user-output-C9oDB7iF.mjs";import{n as y,r as b}from"./update-Gat4pKeS.mjs";async function x(e,t){if(t)return S();if(!e)return l(d({action:`update`,error:{code:`INVALID_ARGUMENT`,message:`Please specify an agent name or use --all flag`},target:{kind:`agent`}}),k);let n=o(e);return n?C(n):l(d({action:`update`,error:{code:`AGENT_NOT_FOUND`,details:{input:e},message:`Unknown agent: ${e}`},target:{kind:`agent`,name:e}}),k)}async function S(){u({action:`update`,data:{scope:`all`},target:{kind:`agent`},type:`started`});let e=await w(await y());return e.hasFailures?l(d({action:`update`,data:{results:e.results,scope:`all`},error:{code:`UPDATE_FAILED`,message:`One or more agents failed to update.`},target:{kind:`agent`}}),k):l(f({action:`update`,data:{results:e.results,scope:`all`},target:{kind:`agent`}}),k)}async function C(e){u({action:`update`,data:{agent:e.name,scope:`single`},target:{kind:`agent`,name:e.name},type:`started`});let{inspection:t,plan:n}=await b(e);if(!t.inPath)return l(d({action:`update`,error:{code:`AGENT_NOT_INSTALLED`,message:`${e.displayName} is not installed.`},target:{kind:`agent`,name:e.name}}),k);let r=await w(n),i=O(r.results);return i?l(d({action:`update`,data:{results:r.results,scope:`single`},error:{code:`RESOURCE_LOCKED`,details:i.resource?{resource:i.resource}:void 0,message:i.message??`Another quantex process is already updating ${e.displayName}.`},target:{kind:`agent`,name:e.name}}),k):r.hasFailures?l(d({action:`update`,data:{results:r.results,scope:`single`},error:{code:`UPDATE_FAILED`,message:`Failed to update ${e.displayName}.`},target:{kind:`agent`,name:e.name}}),k):l(f({action:`update`,data:{results:r.results,scope:`single`},target:{kind:`agent`,name:e.name}}),k)}async function w(n){let r=[];for(let e of n.upToDate)T(r,{displayName:e.agent.displayName,installedVersion:e.installedVersion,latestVersion:e.latestVersion,name:e.agent.name,status:`up-to-date`});for(let t of n.skippedManualCheck)T(r,{displayName:t.agent.displayName,message:e(t.agent),name:t.agent.name,status:`manual-required`});for(let e of n.untrackedInPath)T(r,{displayName:e.agent.displayName,message:t(e.agent),name:e.agent.name,status:`manual-required`});for(let e of n.grouped){let t=await E(e.type,e.packages,e.updates);for(let e of t)T(r,e)}for(let e of n.manual)T(r,await D(e.agent,e.state,e.inspection.methods,e.inspection));return{hasFailures:r.some(e=>e.status===`failed`||e.status===`locked`),results:r}}function T(e,t){e.push(t),u({action:`update`,data:t,target:{kind:`agent`,name:t.name},type:`progress`})}async function E(e,t,n){if(n.length===0)return[];if(_())return n.map(({agent:t,inspection:n,strategy:r})=>({displayName:t.displayName,installedVersion:n.installedVersion,latestVersion:n.latestVersion,message:`Dry run: would update ${t.displayName}.`,name:t.name,status:`planned`,strategy:r===`managed`?`managed/${e}`:r}));try{if(await i(e,t))return n.map(({agent:t,inspection:n,strategy:r})=>({displayName:t.displayName,installedVersion:n.installedVersion,latestVersion:n.latestVersion,name:t.name,status:`updated`,strategy:r===`managed`?`managed/${e}`:r}));let r=[];for(let{agent:e,inspection:t,state:i}of n)r.push(await D(e,i,t.methods,t));return r}catch(t){if(!c(t))throw t;return n.map(({agent:n,inspection:r,strategy:i})=>({displayName:n.displayName,installedVersion:r.installedVersion,latestVersion:r.latestVersion,message:t.message,name:n.name,resource:t.resource,status:`locked`,strategy:i===`managed`?`managed/${e}`:i}))}}async function D(t,i,o,l){let u=a({agent:t,installedState:i,methods:o??l?.methods??[]}),d=l?.installedVersion,f=l?.latestVersion;if(u===`manual-hint`&&!r(t,i))return{displayName:t.displayName,installedVersion:d,latestVersion:f,message:e(t),name:t.name,status:`manual-required`,strategy:u};if(_())return{displayName:t.displayName,installedVersion:d,latestVersion:f,message:`Dry run: would update ${t.displayName}.`,name:t.name,status:`planned`,strategy:u};let p;try{p=await s(t,i)}catch(e){if(c(e))return{displayName:t.displayName,installedVersion:d,latestVersion:f,message:e.message,name:t.name,resource:e.resource,status:`locked`,strategy:u};throw e}if(p.success){if(u===`self-update`){let e=await m(t.binaryName,t.versionProbe);if(d&&e)return e===d?{displayName:t.displayName,installedVersion:e,latestVersion:e,name:t.name,status:`up-to-date`,strategy:u}:{displayName:t.displayName,installedVersion:d,latestVersion:e,name:t.name,status:`updated`,strategy:u}}return{displayName:t.displayName,installedVersion:d,latestVersion:f,name:t.name,status:`updated`,strategy:u}}return{displayName:t.displayName,hint:n(t,u),installedVersion:d,latestVersion:f,name:t.name,status:`failed`,strategy:u}}function O(e){if(e.length===1)return e[0]?.status===`locked`?e[0]:void 0}function k(e){if(!e.data){e.error&&v(p.red(e.error.message));return}for(let t of e.data.results)switch(t.status){case`up-to-date`:g(p.green(`${t.displayName} is up to date (${t.installedVersion??`unknown`})`));break;case`manual-required`:h(p.yellow(`${t.displayName}: manual action required.`)),t.message&&h(p.cyan(`Next step: ${t.message}`));break;case`planned`:h(p.cyan(`Would update ${t.displayName}${t.strategy?` via ${t.strategy}`:``}${A(t.installedVersion,t.latestVersion)}`));break;case`updated`:g(p.cyan(`Updating ${t.displayName}${t.strategy?` via ${t.strategy}`:``}...${A(t.installedVersion,t.latestVersion)}`)),g(p.green(`${t.displayName} updated successfully!`));break;case`failed`:g(p.cyan(`Updating ${t.displayName}${t.strategy?` via ${t.strategy}`:``}...${A(t.installedVersion,t.latestVersion)}`)),v(p.red(`Failed to update ${t.displayName}.`)),t.hint&&h(p.cyan(`Next step: ${t.hint}`));break;case`locked`:h(p.yellow(t.message??`Another quantex process is already updating ${t.displayName}.`));break}e.data.results.length>1&&j(e.data.results),!e.data.results.length&&e.error&&v(p.red(e.error.message))}function A(e,t){return e?` (${e} -> ${t??`latest`})`:``}function j(e){let t={failed:0,locked:0,manualRequired:0,planned:0,upToDate:0,updated:0};for(let n of e)switch(n.status){case`up-to-date`:t.upToDate+=1;break;case`manual-required`:t.manualRequired+=1;break;case`planned`:t.planned+=1;break;case`updated`:t.updated+=1;break;case`failed`:t.failed+=1;break;case`locked`:t.locked+=1;break}let n=[t.updated?`updated ${t.updated}`:void 0,t.upToDate?`up to date ${t.upToDate}`:void 0,t.manualRequired?`manual ${t.manualRequired}`:void 0,t.failed?`failed ${t.failed}`:void 0,t.locked?`locked ${t.locked}`:void 0,t.planned?`planned ${t.planned}`:void 0].filter(Boolean);n.length>0&&g(p.bold(`Summary: ${n.join(`, `)}`))}export{x as updateCommand};
@@ -0,0 +1 @@
1
+ import{_ as e,g as t,i as n,t as r,x as i}from"./agents-ZNosvpri.mjs";function a(e,n={}){let r={bun:[],npm:[],brew:[],cargo:[],pip:[],uv:[],winget:[]},i=[],a=[],c=[],l=[];for(let u of e){if(!u.inPath)continue;if(n.skipUntrackedInPath&&!u.installedState){c.push(u);continue}if(s(u)){a.push(u);continue}if(!o(u)){l.push(u);continue}let e=t({agent:u.agent,installedState:u.installedState,methods:u.methods}),d=e.strategy===`managed`?e.getManagedInstallerType?.({agent:u.agent,installedState:u.installedState,methods:u.methods}):void 0;if(d){let e={inspection:u,installerType:d,strategy:`grouped`};r[d].push(e);continue}i.push({inspection:u,strategy:e.strategy===`self-update`?`self-update`:`manual`})}return{entries:[...r.bun,...r.npm,...r.brew,...r.cargo,...r.pip,...r.uv,...r.winget,...i],grouped:r,manual:i,skippedManualCheck:a,untrackedInPath:c,upToDate:l}}function o(e){return e.installedVersion&&e.latestVersion?e.installedVersion!==e.latestVersion:!0}function s(t){return!t.latestVersion&&!e(t.agent,t.installedState)}const c=[`bun`,`npm`,`brew`,`cargo`,`pip`,`uv`,`winget`];async function l(e){let t=await n(e);return{agent:e,inspection:t,updateAvailable:o(t)}}async function u(){return f(await r(),{skipUntrackedInPath:!0})}async function d(e){let t=await n(e);return{inspection:t,plan:f([t])}}function f(e,t={}){let n=a(e,t),r=[],i=c.map(e=>p(e,n.grouped[e],r)).filter(e=>e!==void 0);return{entries:n.entries.map(e=>h(e.inspection)),grouped:i,manual:[...r,...n.manual.map(e=>h(e.inspection))],skippedManualCheck:n.skippedManualCheck,untrackedInPath:n.untrackedInPath,upToDate:n.upToDate}}function p(e,t,n){if(t.length===0)return;let r=t.map(e=>h(e.inspection)),i=r.filter(m);if(n.push(...r.filter(e=>!m(e))),i.length!==0)return{type:e,packages:i.map(e=>e.package),updates:i}}function m(e){return!!e.package?.packageName}function h(e){let n=t({agent:e.agent,installedState:e.installedState,methods:e.methods}),r=n.getManagedInstallerType?.({agent:e.agent,installedState:e.installedState,methods:e.methods});return{agent:e.agent,inspection:e,installerType:r,package:r?g(e.agent,e.installedState,e.methods,r):void 0,state:e.installedState,strategy:n.strategy}}function g(e,t,n,r){if(t?.packageName&&t.installType===r)return{packageName:t.packageName,packageInstallArgs:t.packageInstallArgs,packageTargetKind:t.packageTargetKind};let a=n.find(e=>e.type===r);if(!a)return;let o=i(e,a);if(o)return{packageName:o,packageInstallArgs:a.packageInstallArgs,packageTargetKind:a.packageTargetKind}}export{o as a,a as i,u as n,d as r,l as t};
@@ -1 +1 @@
1
- import{L as e,S as t,a as n,c as r,n as i,r as a,t as o,u as s,x as c}from"./color-DPVCVxkr.mjs";import{a as l,i as u,n as d,r as f}from"./user-output-Bb3bt9ss.mjs";async function p(e={}){let o=await t({updateChannel:e.channel}),l=c(o),u=d(),f=h(l),p=_(l);if(o.status===`up-to-date`)return n(a({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:[...f,...p?[p]:[]]}),m);if(e.check||u)return o.status===`update-available`?n(a({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:[...f,...p?[p]:[],...u?[{code:`DRY_RUN`,message:`Dry run: would upgrade Quantex CLI.`}]:[]]}),m):n(i({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:[...f,...p?[p]:[]]}),m);if(o.status===`manual-required`){let e=s(l);return n(i({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:[...f,...p?[p]:[]]}),m)}let g=await r(o);if(g.success)return n(a({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:[...f,...p?[p]:[]]}),m);let v=s(l,g);return n(i({action:`upgrade`,data:{canAutoUpdate:l.canAutoUpdate,channel:l.updateChannel,currentVersion:l.currentVersion,installSource:l.installSource,latestVersion:l.latestVersion,recoveryHint:v,status:`manual-required`},error:{code:`UPGRADE_FAILED`,details:g.error?.kind?{kind:g.error.kind}:void 0,message:g.error?.message??`Failed to upgrade Quantex CLI.`},target:{kind:`self`,name:`quantex`},warnings:[...f,...v?[{code:`MANUAL_RECOVERY`,message:`Manual recovery: ${v}`}]:[]]}),m)}function m(e){if(!e.data){e.error&&f(o.red(e.error.message));return}if(e.data.status===`up-to-date`){u(o.green(`Quantex CLI is already up to date (${e.data.currentVersion}).`)),g(e.warnings);return}if(e.data.status===`update-available`){let t=e.warnings.some(e=>e.message.includes(`Dry run`))?`Dry run: `:``;l(o.yellow(`${t}Update available for Quantex CLI: ${e.data.currentVersion} -> ${e.data.latestVersion} (${e.data.channel}).`)),g(e.warnings);return}if(e.data.status===`check-unavailable`){e.error&&l(o.yellow(e.error.message)),g(e.warnings);return}if(e.data.status===`manual-required`&&e.error?.code===`MANUAL_ACTION_REQUIRED`){l(o.yellow(e.error.message)),e.data.recoveryHint&&l(o.cyan(`Next step: ${e.data.recoveryHint}`));return}let t=e.data.latestVersion?` (${e.data.currentVersion} -> ${e.data.latestVersion})`:` (${e.data.currentVersion})`;if(u(o.cyan(`Upgrading Quantex CLI...${t}`)),!e.error){u(o.green(`Quantex CLI upgraded successfully.`)),g(e.warnings);return}f(o.red(`Failed to upgrade Quantex CLI.`)),l(o.yellow(`Reason: ${e.error.message}`));for(let t of e.warnings)l(o.cyan(t.message.replace(/^Manual recovery:/,`Next step:`)))}function h(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 g(e){for(let t of e)t.code===`DRY_RUN`||t.code===`MANUAL_RECOVERY`||l(o.yellow(t.message))}function _(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{L as e,S as t,a as n,c as r,n as i,r as a,t as o,u as s,x as c}from"./color-BgHjt9pg.mjs";import{a as l,i as u,n as d,r as f}from"./user-output-C9oDB7iF.mjs";async function p(e={}){let o=await t({updateChannel:e.channel}),l=c(o),u=d(),f=h(l),p=_(l);if(o.status===`up-to-date`)return n(a({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:[...f,...p?[p]:[]]}),m);if(e.check||u)return o.status===`update-available`?n(a({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:[...f,...p?[p]:[],...u?[{code:`DRY_RUN`,message:`Dry run: would upgrade Quantex CLI.`}]:[]]}),m):n(i({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:[...f,...p?[p]:[]]}),m);if(o.status===`manual-required`){let e=s(l);return n(i({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:[...f,...p?[p]:[]]}),m)}let g=await r(o);if(g.success)return n(a({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:[...f,...p?[p]:[]]}),m);let v=s(l,g);return n(i({action:`upgrade`,data:{canAutoUpdate:l.canAutoUpdate,channel:l.updateChannel,currentVersion:l.currentVersion,installSource:l.installSource,latestVersion:l.latestVersion,recoveryHint:v,status:`manual-required`},error:{code:`UPGRADE_FAILED`,details:g.error?.kind?{kind:g.error.kind}:void 0,message:g.error?.message??`Failed to upgrade Quantex CLI.`},target:{kind:`self`,name:`quantex`},warnings:[...f,...v?[{code:`MANUAL_RECOVERY`,message:`Manual recovery: ${v}`}]:[]]}),m)}function m(e){if(!e.data){e.error&&f(o.red(e.error.message));return}if(e.data.status===`up-to-date`){u(o.green(`Quantex CLI is already up to date (${e.data.currentVersion}).`)),g(e.warnings);return}if(e.data.status===`update-available`){let t=e.warnings.some(e=>e.message.includes(`Dry run`))?`Dry run: `:``;l(o.yellow(`${t}Update available for Quantex CLI: ${e.data.currentVersion} -> ${e.data.latestVersion} (${e.data.channel}).`)),g(e.warnings);return}if(e.data.status===`check-unavailable`){e.error&&l(o.yellow(e.error.message)),g(e.warnings);return}if(e.data.status===`manual-required`&&e.error?.code===`MANUAL_ACTION_REQUIRED`){l(o.yellow(e.error.message)),e.data.recoveryHint&&l(o.cyan(`Next step: ${e.data.recoveryHint}`));return}let t=e.data.latestVersion?` (${e.data.currentVersion} -> ${e.data.latestVersion})`:` (${e.data.currentVersion})`;if(u(o.cyan(`Upgrading Quantex CLI...${t}`)),!e.error){u(o.green(`Quantex CLI upgraded successfully.`)),g(e.warnings);return}f(o.red(`Failed to upgrade Quantex CLI.`)),l(o.yellow(`Reason: ${e.error.message}`));for(let t of e.warnings)l(o.cyan(t.message.replace(/^Manual recovery:/,`Next step:`)))}function h(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 g(e){for(let t of e)t.code===`DRY_RUN`||t.code===`MANUAL_RECOVERY`||l(o.yellow(t.message))}function _(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{it as e}from"./color-DPVCVxkr.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{it as e}from"./color-BgHjt9pg.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};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "quantex-cli",
3
- "version": "0.18.5",
3
+ "version": "0.19.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",
@@ -51,6 +51,7 @@
51
51
  "./package.json": "./package.json"
52
52
  },
53
53
  "scripts": {
54
+ "agent-catalog:schema": "bun run scripts/write-agent-catalog-schema.ts",
54
55
  "build": "tsdown",
55
56
  "build:bin": "bun run scripts/write-build-metadata.ts && bun run scripts/build-bin.ts",
56
57
  "dev": "bun run src/cli.ts",
@@ -83,7 +84,8 @@
83
84
  "dependencies": {
84
85
  "commander": "^14.0.3",
85
86
  "picocolors": "^1.1.1",
86
- "prompts": "^2.4.2"
87
+ "prompts": "^2.4.2",
88
+ "zod": "^4.3.6"
87
89
  },
88
90
  "devDependencies": {
89
91
  "@fission-ai/openspec": "1.3.1",
@@ -1 +0,0 @@
1
- import{a as e,c as t,d as n,i as r,n as i,o as a,r as o,s,t as c,u as ee}from"./detect-DQJbxlSn.mjs";import{$ as l,B as te,G as u,K as d,M as ne,O as f,P as p,R as re,U as ie,V as ae,W as oe,Y as m,_ as se,b as ce,d as h,f as le,g as ue,h as de,m as fe,p as pe,v as me,y as he,z as ge}from"./color-DPVCVxkr.mjs";import _e from"node:process";const ve={binary:{canInstall:!0,canLookupLatestVersion:!1,canUninstall:!1,canUpdate:!1,lifecycle:`unmanaged`},brew:{canInstall:!0,canLookupLatestVersion:!1,canUninstall:!0,canUpdate:!0,lifecycle:`managed`},bun:{canInstall:!0,canLookupLatestVersion:!0,canUninstall:!0,canUpdate:!0,lifecycle:`managed`},cargo:{canInstall:!0,canLookupLatestVersion:!1,canUninstall:!0,canUpdate:!0,lifecycle:`managed`},npm:{canInstall:!0,canLookupLatestVersion:!0,canUninstall:!0,canUpdate:!0,lifecycle:`managed`},pip:{canInstall:!0,canLookupLatestVersion:!1,canUninstall:!0,canUpdate:!0,lifecycle:`managed`},script:{canInstall:!0,canLookupLatestVersion:!1,canUninstall:!1,canUpdate:!1,lifecycle:`unmanaged`},winget:{canInstall:!0,canLookupLatestVersion:!1,canUninstall:!0,canUpdate:!0,lifecycle:`managed`}};function g(e){return ve[e]}function _(e){return g(e).lifecycle===`managed`}function v(e){return g(e).lifecycle}function y(e){return g(e).canUpdate}function ye(e){return g(e).canUninstall}function b(e){return g(e).canLookupLatestVersion}function x(e,t){return e?t===`cask`?` (${e} cask)`:t===`id`?` (${e} id)`:` (${e})`:``}function S(e,t){if(t.packageName)return t.packageName;if(t.type===`cargo`)return e.packages?.cargo;if(t.type===`pip`)return e.packages?.pip;if(t.type===`bun`||t.type===`npm`)return e.packages?.npm}function C(e){return e?y(e.installType):!1}function w(e,t){return C(t)||!!e.selfUpdate}function be(e){return!!e&&b(e.installType)}function xe(e){return e.length>0&&e.every(e=>b(e.type))}function Se(e){return _(e.type)?`${v(e.type)}/${e.type}${x(e.packageName,e.packageTargetKind)}`:e.type===`script`?`unmanaged/script`:`unmanaged/binary`}function Ce(e){return e?_(e.installType)?`managed via ${e.installType}${x(e.packageName,e.packageTargetKind)}`:e.installType===`script`?`script installer`:`binary installer`:`detected in PATH`}function we(e,t){let n=A({agent:e,installedState:t,methods:[]});return n===`managed`?`managed update`:n===`self-update`?`command update`:`manual update`}function Te(e,t){if(t.type===`bun`){let n=S(e,t);return n?`bun add -g ${n}`:``}if(t.type===`npm`){let n=S(e,t);return n?`npm i -g ${n}`:``}if(t.type===`brew`)return t.packageName?t.packageTargetKind===`cask`?`brew install --cask ${t.packageName}`:`brew install ${t.packageName}`:``;if(t.type===`cargo`){let n=S(e,t);return n?[`cargo`,`install`,n,...t.packageInstallArgs??[]].join(` `):``}if(t.type===`pip`){let n=S(e,t);return n?`pip install ${n}`:``}return t.type===`winget`?t.packageName?`winget install --id ${t.packageName} -e`:``:t.command??``}function Ee(e,t,n){if(t)return be(t)&&(t.packageName||e.packages?.npm)||void 0;if(!(!e.packages?.npm||!xe(n)))return e.packages.npm}function De(e,t){let n=T(t);if(n){let t=e.find(e=>e.type===n);if(t)return t}if(e.length!==1)return;let[r]=e;if(!(r.type!==`script`&&r.type!==`binary`))return r}function T(e){if(!e)return;let t=e.replaceAll(`\\`,`/`);if(t.includes(`/.bun/bin/`)||t.includes(`/.bun/install/global/`))return`bun`;if(t.includes(`/node_modules/.bin/`)||t.includes(`/node_modules/`))return`npm`}function E(e){if(e.installedState)return _(e.installedState.installType)?e.installedState.installType:void 0;for(let t of e.methods)if(_(t.type)&&y(t.type))return t.type}const Oe={strategy:`managed`,canHandle:e=>!!E(e),getManagedInstallerType:e=>E(e)},ke={strategy:`self-update`,canHandle:e=>!C(e.installedState)&&!!e.agent.selfUpdate},D={strategy:`manual-hint`,canHandle:()=>!0},O=[Oe,ke,D];function k(e){return O.find(t=>t.canHandle(e))??D}function A(e){return k(e).strategy}function Ae(e){return w(e.agent,e.installedState)}async function j(e){let t=c(),n=typeof e==`function`?e(t):e;try{return _e.platform===`win32`?await d(u([`powershell.exe`,`-Command`,n]))===0:await d(u([`sh`,`-c`,n]))===0}catch{return!1}}function je(e){return e===`cask`?[`--cask`]:[]}async function M(e,t,n){try{return await d(u([`brew`,e,...je(n),t]))===0}catch{return!1}}async function Me(e,t){return M(`install`,e,t)}async function N(e,t){return M(`upgrade`,e,t)}async function Ne(e){for(let t of e)if(!await N(t.packageName,t.packageTargetKind))return!1;return!0}async function Pe(e,t){return M(`uninstall`,e,t)}async function P(e,t,n=[]){try{return await d(u([`cargo`,e,t,...n]))===0}catch{return!1}}async function F(e,t){return P(`install`,e,t)}async function I(e,t){return F(e,[`--force`,...t??[]])}async function Fe(e){for(let t of e)if(!await I(t.packageName,t.packageInstallArgs))return!1;return!0}async function Ie(e){return P(`uninstall`,e)}let L=null;async function Le(){if(L)return L;for(let e of[[`pip`],[`pip3`],[`python`,`-m`,`pip`],[`python3`,`-m`,`pip`]])try{let{exitCode:t}=await ie(oe([...e,`--version`]));if(t===0)return L=e,e}catch{}return L=[`pip`],L}async function R(e){try{return await d(u([...await Le(),...e]))===0}catch{return!1}}async function Re(e){return R([`install`,e])}async function z(e){return R([`install`,`--upgrade`,e])}async function ze(e){if(e.length===0)return!0;for(let t of e)if(!await z(t.packageName))return!1;return!0}async function Be(e){return R([`uninstall`,`-y`,e])}async function B(e,t){try{return await d(u([`winget`,e,`--id`,t,`-e`]))===0}catch{return!1}}async function Ve(e){return B(`install`,e)}async function V(e){return B(`upgrade`,e)}async function He(e){for(let t of e)if(!await V(t.packageName))return!1;return!0}async function Ue(e){return B(`uninstall`,e)}const We={brew:{type:`brew`,isAvailable:async()=>o(),install:async(e,t)=>Me(e,t),uninstall:async(e,t)=>Pe(e,t),update:async(e,t)=>N(e,t),updateMany:async e=>Ne(e)},bun:{type:`bun`,getInstalledVersion:async e=>ue(e),isAvailable:async()=>r(),install:async e=>se(e),uninstall:async e=>me(e),update:async(e,t,n)=>he(e,n?.npmBunUpdateStrategy),updateMany:async(e,t)=>ce(e.map(e=>e.packageName),t?.npmBunUpdateStrategy)},cargo:{type:`cargo`,isAvailable:async()=>e(),install:async(e,t,n)=>F(e,n),uninstall:async e=>Ie(e),update:async(e,t,n)=>I(e,n?.packageInstallArgs),updateMany:async e=>Fe(e.map(e=>({packageInstallArgs:e.packageInstallArgs,packageName:e.packageName})))},npm:{type:`npm`,getInstalledVersion:async e=>h(e),isAvailable:async()=>a(),install:async e=>le(e),uninstall:async e=>pe(e),update:async(e,t,n)=>fe(e,n?.npmBunUpdateStrategy),updateMany:async(e,t)=>de(e.map(e=>e.packageName),t?.npmBunUpdateStrategy)},pip:{type:`pip`,isAvailable:async()=>s(),install:async e=>Re(e),uninstall:async e=>Be(e),update:async e=>z(e),updateMany:async e=>ze(e.map(e=>({packageName:e.packageName})))},winget:{type:`winget`,isAvailable:async()=>t(),install:async e=>Ve(e),uninstall:async e=>Ue(e),update:async e=>V(e),updateMany:async e=>He(e.map(e=>({packageName:e.packageName})))}};function H(e){return We[e]}const U={resource:`agent lifecycle`,scope:[`agent-lifecycle`]};async function Ge(){return(await l()).defaultPackageManager}async function W(){return{npmBunUpdateStrategy:(await l()).npmBunUpdateStrategy}}async function G(e){let t=c(),n=e.platforms[t];if(!n)return[];let r=await Ge();return r?[...n.filter(e=>e.type===r),...n.filter(e=>e.type!==r)]:[...n]}async function K(e,t,n,r,i,a){let o=H(e);return await o.isAvailable()?i===`install`?o.install(t,r,n):i===`update`?o.update(t,r,{npmBunUpdateStrategy:a,packageInstallArgs:n}):o.uninstall(t,r):!1}async function q(e,t,n,r){if(_(t.type)){let i=S(e,t);return i?K(t.type,i,t.packageInstallArgs,t.packageTargetKind,n,r):!1}return n===`update`&&!y(t.type)||!t.command?!1:j(t.command)}async function J(e,t,n){return _(e.installType)?e.packageName?K(e.installType,e.packageName,e.packageInstallArgs,e.packageTargetKind,t,n):!1:t!==`install`||!e.command?!1:j(e.command)}async function Ke(e){if(!e.selfUpdate)return!1;let t=[e.selfUpdate.command,...e.selfUpdate.fallbackCommands??[]];for(let e of t)if(await j(e.join(` `)))return!0;return!1}async function Y(e,t){let n={agentName:e.name,installType:t.type,packageName:S(e,t),packageTargetKind:t.packageTargetKind,command:`command`in t?t.command:void 0};return t.packageInstallArgs?.length&&(n.packageInstallArgs=t.packageInstallArgs),await p(n),n}async function qe(e,t){return m(U,async()=>Y(e,t))}async function X(e){return m(U,async()=>{let t=await G(e);for(let n of t)if(await q(e,n,`install`))return{success:!0,installedState:await Y(e,n)};return{success:!1}})}async function Je(e,t){return m(U,async()=>{let{npmBunUpdateStrategy:n}=await W(),r=await G(e);if(t&&await J(t,`update`,n))return await p(t),{success:!0,installedState:t};if(!t){for(let t of r)if(await q(e,t,`update`,n))return{success:!0,installedState:await Y(e,t)}}return await Ke(e)?{success:!0}:{success:!1}})}async function Ye(e,t){return m(U,async()=>{let n=[...new Map(t.filter(e=>e.packageName).map(e=>[`${e.packageTargetKind??`package`}:${e.packageName}:${e.packageInstallArgs?.join(` `)??``}`,e])).values()];if(n.length===0)return!1;let r=H(e);return await r.isAvailable()?r.updateMany(n,await W()):!1})}async function Xe(e,t,n){let r=H(e);if(r.getInstalledVersion&&await r.isAvailable())return r.getInstalledVersion(t,n)}async function Ze(e){return m(U,async()=>{let t=await f(e.name);if(!t)return!1;let n=await J(t,`uninstall`);return n&&await ne(e.name),n})}async function Z(e){let[t,n,r]=await Promise.all([G(e),f(e.name),i(e.binaryName)]),[a,o,s]=await Promise.all([r?Qe(e,n):Promise.resolve(void 0),r?re(e.binaryName):Promise.resolve(void 0),$e(e,n,t)]);return{agent:e,methods:t,installedState:n,inPath:r,installedVersion:a,latestVersion:s,binaryPath:o,resolvedBinaryPath:await ae(o),sourceLabel:Ce(n),updateLabel:we(e,n),lifecycle:n?v(n.installType):`unmanaged`}}async function Q(e){return Promise.all(e.map(Z))}async function Qe(e,t){if(t&&_(t.installType)&&t.packageName){let e=await Xe(t.installType,t.packageName,t.packageTargetKind);if(e)return e}return ge(e.binaryName,e.versionProbe)}async function $e(e,t,n){let r=Ee(e,t,n);if(r)return te(r)}function $(e){return ee(e)}async function et(e){let t=$(e);if(t)return{agent:t,inspection:await Z(t)}}async function tt(){return Q(n())}export{ye as C,_ as D,g as E,b as S,v as T,w as _,Q as a,De as b,qe as c,Ye as d,H as f,k as g,A as h,Z as i,Ze as l,Ae as m,$ as n,G as o,O as p,et as r,X as s,tt as t,Je as u,Te as v,y as w,S as x,Se as y};
@@ -1,5 +0,0 @@
1
- import{a as e,c as t,d as n,i as r,o as i,r as a,s as o,t as s}from"./detect-DQJbxlSn.mjs";import{a as c,r as l,s as u,t as d}from"./color-DPVCVxkr.mjs";import f from"node:process";async function p(){let[d,p,g,_,v,y,b]=await Promise.all([r(),i(),a(),e(),o(),t(),u()]);return c(l({action:`capabilities`,data:{agents:n().map(e=>e.name),features:{assumeYes:!0,cacheBypass:!0,cacheRefresh:!0,channels:[`stable`,`beta`],colorModes:[`auto`,`always`,`never`],dryRun:!0,execInstallPolicies:[`never`,`if-missing`,`always`],freshnessMetadata:!0,idempotencyKey:!0,logLevels:[`silent`,`error`,`warn`,`info`,`debug`],quietLogs:!0,selfUpgrade:b.canAutoUpdate,timeout:!0},installers:{brew:{available:g,reason:g?void 0:m(`brew`)},bun:{available:d,reason:d?void 0:m(`bun`)},cargo:{available:_,reason:_?void 0:m(`cargo`)},npm:{available:p,reason:p?void 0:m(`npm`)},pip:{available:v,reason:v?void 0:m(`pip`)},winget:{available:y,reason:y?void 0:m(`winget`)}},outputModes:[`human`,`json`,`ndjson`],platform:{arch:f.arch,os:s()}},target:{kind:`system`,name:`capabilities`}}),h)}function m(e){return e===`winget`&&f.platform!==`win32`||e===`brew`&&f.platform===`win32`?`not-on-platform`:`not-found`}function h(e){e.data&&(console.log(d.bold(`
2
- Quantex Capabilities
3
- `)),console.log(` Platform: ${e.data.platform.os}/${e.data.platform.arch}`),console.log(` Output Modes: ${e.data.outputModes.join(`, `)}`),console.log(` Agents: ${e.data.agents.join(`, `)}`),console.log(d.bold(`
4
- Installers:`)),console.log(` bun: ${g(e.data.installers.bun)}`),console.log(` npm: ${g(e.data.installers.npm)}`),console.log(` brew: ${g(e.data.installers.brew)}`),console.log(` cargo: ${g(e.data.installers.cargo)}`),console.log(` pip: ${g(e.data.installers.pip)}`),console.log(` winget: ${g(e.data.installers.winget)}`),console.log(d.bold(`
5
- Features:`)),console.log(` --yes: ${e.data.features.assumeYes?`yes`:`no`}`),console.log(` cache-refresh: ${e.data.features.cacheRefresh?`yes`:`no`}`),console.log(` color-modes: ${e.data.features.colorModes.join(`, `)}`),console.log(` no-cache: ${e.data.features.cacheBypass?`yes`:`no`}`),console.log(` dry-run: ${e.data.features.dryRun?`yes`:`no`}`),console.log(` freshness-metadata: ${e.data.features.freshnessMetadata?`yes`:`no`}`),console.log(` self-upgrade: ${e.data.features.selfUpgrade?`yes`:`no`}`),console.log(` idempotency-key: ${e.data.features.idempotencyKey?`yes`:`no`}`),console.log(` log-levels: ${e.data.features.logLevels.join(`, `)}`),console.log(` quiet-logs: ${e.data.features.quietLogs?`yes`:`no`}`),console.log(` timeout: ${e.data.features.timeout?`yes`:`no`}`),console.log(` channels: ${e.data.features.channels.join(`, `)}`),console.log(` exec-install-policy: ${e.data.features.execInstallPolicies.join(`, `)}`),console.log())}function g(e){return e.available?d.green(`available`):d.red(e.reason??`not-found`)}export{p as t};
@@ -1 +0,0 @@
1
- import{t as e}from"./capabilities-C79bDKbV.mjs";export{e as capabilitiesCommand};
@@ -1 +0,0 @@
1
- import{t as e}from"./commands-BtmyjCx1.mjs";export{e as commandsCommand};
@@ -1 +0,0 @@
1
- import{U as e,W as t}from"./color-DPVCVxkr.mjs";import n from"node:process";function r(e){return{packageName:e,type:`bun`}}function i(e){return{packageName:e,type:`npm`}}function a(e,t){return{packageName:e,packageTargetKind:t,type:`brew`}}function o(e,t){return{packageInstallArgs:t,packageName:e,type:`cargo`}}function s(e){return{packageName:e,type:`pip`}}function c(e){return{packageName:e,packageTargetKind:`id`,type:`winget`}}function l(e){return{command:e,type:`script`}}function u(e){return{command:e,type:`binary`}}const d={name:`amp`,displayName:`Amp`,homepage:`https://ampcode.com/`,packages:{npm:`@sourcegraph/amp`},binaryName:`amp`,selfUpdate:{command:[`amp`,`update`]},versionProbe:{command:[`amp`,`version`]},platforms:{windows:[r(),i()],macos:[r(),i()],linux:[r(),i()]}},f={name:`auggie`,displayName:`Auggie CLI`,homepage:`https://docs.augmentcode.com/cli/overview`,packages:{npm:`@augmentcode/auggie`},binaryName:`auggie`,selfUpdate:{command:[`auggie`,`upgrade`]},versionProbe:{command:[`auggie`,`--version`]},platforms:{macos:[r(),i()],linux:[r(),i()]}},p={name:`autohand`,lookupAliases:[`autohand-cli`],displayName:`Autohand Code CLI`,homepage:`https://autohand.ai/cli/`,packages:{npm:`autohand-cli`},binaryName:`autohand`,versionProbe:{command:[`autohand`,`--version`]},platforms:{windows:[l(`iwr -useb https://autohand.ai/install.ps1 | iex`)],macos:[l(`curl -fsSL https://autohand.ai/install.sh | bash`)],linux:[l(`curl -fsSL https://autohand.ai/install.sh | bash`)]}},m={name:`claude`,displayName:`Claude Code`,homepage:`https://code.claude.com/docs`,packages:{npm:`@anthropic-ai/claude-code`},binaryName:`claude`,selfUpdate:{command:[`claude`,`update`],fallbackCommands:[[`claude`,`upgrade`]]},platforms:{windows:[r(),i(),l(`irm https://claude.ai/install.ps1 | iex`),c(`Anthropic.ClaudeCode`)],macos:[r(),i(),l(`curl -fsSL https://claude.ai/install.sh | bash`),a(`claude-code`,`cask`)],linux:[r(),i(),l(`curl -fsSL https://claude.ai/install.sh | bash`),a(`claude-code`,`cask`)]}},h={name:`codebuddy`,lookupAliases:[`codebuddy-code`],displayName:`CodeBuddy Code`,homepage:`https://www.codebuddy.cn/docs/cli/installation`,packages:{npm:`@tencent-ai/codebuddy-code`},binaryName:`codebuddy`,selfUpdate:{command:[`codebuddy`,`update`]},versionProbe:{command:[`codebuddy`,`--version`]},platforms:{windows:[r(),i(),l(`irm https://www.codebuddy.cn/cli/install.ps1 | iex`)],macos:[r(),i(),l(`curl -fsSL https://www.codebuddy.cn/cli/install.sh | bash`),a(`Tencent-CodeBuddy/tap/codebuddy-code`)],linux:[r(),i(),l(`curl -fsSL https://www.codebuddy.cn/cli/install.sh | bash`),a(`Tencent-CodeBuddy/tap/codebuddy-code`)]}},g={name:`codex`,displayName:`Codex CLI`,homepage:`https://developers.openai.com/codex/cli`,packages:{npm:`@openai/codex`},binaryName:`codex`,selfUpdate:{command:[`codex`,`--upgrade`]},platforms:{windows:[r(),i()],macos:[r(),i(),a(`codex`)],linux:[r(),i(),a(`codex`)]}},_={name:`copilot`,displayName:`GitHub Copilot CLI`,homepage:`https://github.com/features/copilot/cli`,packages:{npm:`@github/copilot`},binaryName:`copilot`,platforms:{windows:[c(`GitHub.Copilot`)],macos:[r(),i(),l(`curl -fsSL https://gh.io/copilot-install | bash`),a(`copilot-cli`)],linux:[r(),i(),l(`curl -fsSL https://gh.io/copilot-install | bash`),a(`copilot-cli`)]}},v={name:`crush`,displayName:`Crush`,homepage:`https://github.com/charmbracelet/crush`,packages:{npm:`@charmland/crush`},binaryName:`crush`,selfUpdate:{command:[`crush`,`update`]},versionProbe:{command:[`crush`,`--version`]},platforms:{windows:[r(),i(),c(`charmbracelet.crush`)],macos:[r(),i(),a(`charmbracelet/tap/crush`)],linux:[r(),i(),a(`charmbracelet/tap/crush`)]}},y={name:`cursor`,lookupAliases:[`agent`],displayName:`Cursor CLI`,homepage:`https://cursor.com/docs/cli`,binaryName:`agent`,selfUpdate:{command:[`agent`,`update`]},versionProbe:{command:[`agent`,`--version`]},platforms:{windows:[l(`irm 'https://cursor.com/install?win32=true' | iex`)],macos:[l(`curl https://cursor.com/install -fsS | bash`)],linux:[l(`curl https://cursor.com/install -fsS | bash`)]}},b={name:`deepseek`,lookupAliases:[`deepseek-tui`],displayName:`DeepSeek TUI`,homepage:`https://github.com/Hmbown/DeepSeek-TUI`,packages:{cargo:`deepseek-tui-cli`,npm:`deepseek-tui`},binaryName:`deepseek`,selfUpdate:{command:[`deepseek`,`update`]},versionProbe:{command:[`deepseek`,`--version`]},platforms:{windows:[i(),o(void 0,[`--locked`])],macos:[i(),o(void 0,[`--locked`])],linux:[i(),o(void 0,[`--locked`])]}},x={name:`devin`,displayName:`Devin for Terminal`,homepage:`https://cli.devin.ai/`,binaryName:`devin`,selfUpdate:{command:[`devin`,`update`]},versionProbe:{command:[`devin`,`version`]},platforms:{windows:[l(`irm https://static.devin.ai/cli/setup.ps1 | iex`)],macos:[l(`curl -fsSL https://cli.devin.ai/install.sh | bash`)],linux:[l(`curl -fsSL https://cli.devin.ai/install.sh | bash`)]}},S={name:`droid`,displayName:`Droid`,homepage:`https://docs.factory.ai/cli/getting-started/overview`,packages:{npm:`droid`},binaryName:`droid`,selfUpdate:{command:[`droid`,`update`]},platforms:{windows:[r(),i(),l(`irm https://app.factory.ai/cli/windows | iex`)],macos:[r(),i(),l(`curl -fsSL https://app.factory.ai/cli | sh`),a(`droid`,`cask`)],linux:[r(),i(),l(`curl -fsSL https://app.factory.ai/cli | sh`),a(`droid`,`cask`)]}},C={name:`forgecode`,lookupAliases:[`forge`],displayName:`ForgeCode`,homepage:`https://forgecode.dev`,packages:{npm:`forgecode`},binaryName:`forge`,selfUpdate:{command:[`forge`,`update`]},versionProbe:{command:[`forge`,`--version`]},platforms:{windows:[r(),i(),l(`irm https://forgecode.dev/cli | iex`)],macos:[r(),i(),l(`curl -fsSL https://forgecode.dev/cli | sh`)],linux:[r(),i(),l(`curl -fsSL https://forgecode.dev/cli | sh`)]}},w={name:`gemini`,displayName:`Gemini CLI`,homepage:`https://google-gemini.github.io/gemini-cli/docs/`,packages:{npm:`@google/gemini-cli`},binaryName:`gemini`,platforms:{windows:[r(),i()],macos:[r(),i(),a(`gemini-cli`)],linux:[r(),i(),a(`gemini-cli`)]}},T={name:`goose`,displayName:`Goose`,homepage:`https://github.com/aaif-goose/goose`,binaryName:`goose`,selfUpdate:{command:[`goose`,`update`]},versionProbe:{command:[`goose`,`--version`]},platforms:{windows:[l(`curl -fsSL https://github.com/aaif-goose/goose/releases/download/stable/download_cli.sh | bash`),l(`Invoke-WebRequest -Uri "https://raw.githubusercontent.com/aaif-goose/goose/main/download_cli.ps1" -OutFile "download_cli.ps1"; ./download_cli.ps1`)],macos:[l(`curl -fsSL https://github.com/aaif-goose/goose/releases/download/stable/download_cli.sh | bash`),a(`block-goose-cli`)],linux:[l(`curl -fsSL https://github.com/aaif-goose/goose/releases/download/stable/download_cli.sh | bash`),a(`block-goose-cli`)]}},E={name:`jcode`,displayName:`JCode`,homepage:`https://github.com/1jehuang/jcode`,binaryName:`jcode`,versionProbe:{command:[`jcode`,`--version`]},platforms:{windows:[l(`irm https://raw.githubusercontent.com/1jehuang/jcode/master/scripts/install.ps1 | iex`)],macos:[a(`1jehuang/jcode/jcode`),l(`curl -fsSL https://raw.githubusercontent.com/1jehuang/jcode/master/scripts/install.sh | bash`)],linux:[l(`curl -fsSL https://raw.githubusercontent.com/1jehuang/jcode/master/scripts/install.sh | bash`)]}},D={name:`junie`,displayName:`Junie CLI`,homepage:`https://junie.jetbrains.com/docs/junie-cli.html`,packages:{npm:`@jetbrains/junie`},binaryName:`junie`,versionProbe:{command:[`junie`,`--version`]},platforms:{windows:[r(),i(),l(`iex (irm 'https://junie.jetbrains.com/install.ps1')`)],macos:[r(),i(),l(`curl -fsSL https://junie.jetbrains.com/install.sh | bash`),a(`jetbrains-junie/junie/junie`)],linux:[r(),i(),l(`curl -fsSL https://junie.jetbrains.com/install.sh | bash`),a(`jetbrains-junie/junie/junie`)]}},O={name:`kilo`,displayName:`Kilo CLI`,homepage:`https://kilo.ai/docs/cli`,packages:{npm:`@kilocode/cli`},binaryName:`kilo`,selfUpdate:{command:[`kilo`,`upgrade`]},platforms:{windows:[r(),i()],macos:[r(),i()],linux:[r(),i()]}},k={name:`kimi`,lookupAliases:[`kimi-code`,`kimi-cli`],displayName:`Kimi Code`,homepage:`https://moonshotai.github.io/kimi-cli/`,binaryName:`kimi`,selfUpdate:{command:[`uv`,`tool`,`upgrade`,`kimi-cli`,`--no-cache`]},versionProbe:{command:[`kimi`,`--version`]},platforms:{windows:[l(`irm https://code.kimi.com/install.ps1 | iex`)],macos:[l(`curl -LsSf https://code.kimi.com/install.sh | bash`)],linux:[l(`curl -LsSf https://code.kimi.com/install.sh | bash`)]}},A={name:`kiro`,lookupAliases:[`kiro-cli`],displayName:`Kiro CLI`,homepage:`https://kiro.dev/cli/`,binaryName:`kiro-cli`,versionProbe:{command:[`kiro-cli`,`--version`]},platforms:{windows:[l(`irm 'https://cli.kiro.dev/install.ps1' | iex`)],macos:[l(`curl -fsSL https://cli.kiro.dev/install | bash`)],linux:[l(`curl -fsSL https://cli.kiro.dev/install | bash`)]}},j={name:`opencode`,displayName:`OpenCode`,homepage:`https://opencode.ai`,packages:{npm:`opencode-ai`},binaryName:`opencode`,selfUpdate:{command:[`opencode`,`upgrade`]},platforms:{windows:[r(),i()],macos:[r(),i(),l(`curl -fsSL https://opencode.ai/install | bash`),a(`anomalyco/tap/opencode`)],linux:[r(),i(),l(`curl -fsSL https://opencode.ai/install | bash`),a(`anomalyco/tap/opencode`)]}},M={name:`openhands`,displayName:`OpenHands CLI`,homepage:`https://docs.openhands.dev/openhands/usage/cli/installation`,binaryName:`openhands`,selfUpdate:{command:[`uv`,`tool`,`upgrade`,`openhands`,`--python`,`3.12`]},versionProbe:{command:[`openhands`,`--version`]},platforms:{macos:[u(`uv tool install openhands --python 3.12`),l(`curl -fsSL https://install.openhands.dev/install.sh | sh`)],linux:[u(`uv tool install openhands --python 3.12`),l(`curl -fsSL https://install.openhands.dev/install.sh | sh`)]}},N={name:`pi`,displayName:`Pi`,homepage:`https://pi.dev`,packages:{npm:`@mariozechner/pi-coding-agent`},binaryName:`pi`,selfUpdate:{command:[`pi`,`update`]},platforms:{windows:[r(),i()],macos:[r(),i()],linux:[r(),i()]}},P={name:`qoder`,lookupAliases:[`qodercli`],displayName:`Qoder CLI`,homepage:`https://docs.qoder.com/cli/quick-start`,packages:{npm:`@qoder-ai/qodercli`},binaryName:`qodercli`,selfUpdate:{command:[`qodercli`,`update`]},platforms:{windows:[r(),i()],macos:[r(),i(),l(`curl -fsSL https://qoder.com/install | bash`),a(`qoderai/qoder/qodercli`,`cask`)],linux:[r(),i(),l(`curl -fsSL https://qoder.com/install | bash`),a(`qoderai/qoder/qodercli`,`cask`)]}},F={name:`qwen`,displayName:`Qwen Code`,homepage:`https://qwenlm.github.io/qwen-code-docs/`,packages:{npm:`@qwen-code/qwen-code`},binaryName:`qwen`,platforms:{windows:[l(`curl -fsSL -o %TEMP%\\install-qwen.bat https://qwen-code-assets.oss-cn-hangzhou.aliyuncs.com/installation/install-qwen.bat && %TEMP%\\install-qwen.bat`),r(),i()],macos:[l(`curl -fsSL https://qwen-code-assets.oss-cn-hangzhou.aliyuncs.com/installation/install-qwen.sh | bash`),r(),i(),a(`qwen-code`)],linux:[l(`curl -fsSL https://qwen-code-assets.oss-cn-hangzhou.aliyuncs.com/installation/install-qwen.sh | bash`),r(),i(),a(`qwen-code`)]}},I={name:`reasonix`,lookupAliases:[`deepseek-reasonix`],displayName:`Reasonix`,homepage:`https://github.com/esengine/DeepSeek-Reasonix`,packages:{npm:`reasonix`},binaryName:`reasonix`,selfUpdate:{command:[`reasonix`,`update`]},versionProbe:{command:[`reasonix`,`--version`]},platforms:{windows:[i()],macos:[i()],linux:[i()]}},L={name:`vibe`,lookupAliases:[`mistral-vibe`],displayName:`Mistral Vibe`,homepage:`https://docs.mistral.ai/mistral-vibe/terminal/install`,binaryName:`vibe`,packages:{pip:`mistral-vibe`},versionProbe:{command:[`vibe`,`--version`]},platforms:{windows:[u(`uv tool install mistral-vibe`),s(`mistral-vibe`)],macos:[l(`curl -LsSf https://mistral.ai/vibe/install.sh | bash`),u(`uv tool install mistral-vibe`),s(`mistral-vibe`)],linux:[l(`curl -LsSf https://mistral.ai/vibe/install.sh | bash`),u(`uv tool install mistral-vibe`),s(`mistral-vibe`)]}},R={name:`vtcode`,displayName:`VTCode`,homepage:`https://github.com/vinhnx/vtcode`,packages:{cargo:`vtcode`},binaryName:`vtcode`,selfUpdate:{command:[`vtcode`,`update`]},versionProbe:{command:[`vtcode`,`--version`]},platforms:{windows:[l(`irm https://raw.githubusercontent.com/vinhnx/vtcode/main/scripts/install.ps1 | iex`),o()],macos:[l(`curl -fsSL https://raw.githubusercontent.com/vinhnx/vtcode/main/scripts/install.sh | bash`),o(),a(`vtcode`)],linux:[l(`curl -fsSL https://raw.githubusercontent.com/vinhnx/vtcode/main/scripts/install.sh | bash`),o(),a(`vtcode`)]}},z=[f,p,d,m,h,g,_,v,y,b,x,S,C,w,T,E,D,O,k,A,M,j,N,P,F,I,L,R];function B(){return z}function V(e){return z.find(t=>t.name===e||(t.lookupAliases?.includes(e)??!1))}function H(e){return V(e)}function U(){switch(n.platform){case`win32`:return`windows`;case`darwin`:return`macos`;default:return`linux`}}async function W(n){try{let{exitCode:r}=await e(t([n,`--version`]));return r===0}catch{return!1}}async function G(){return W(`bun`)}async function K(){return W(`npm`)}async function q(){return W(`brew`)}async function J(){return W(`cargo`)}async function Y(){return W(`winget`)}async function X(){return await W(`pip`)||await W(`pip3`)?!0:Z()}async function Z(){try{let{exitCode:n}=await e(t([`python`,`-m`,`pip`,`--version`]));if(n===0)return!0}catch{}try{let{exitCode:n}=await e(t([`python3`,`-m`,`pip`,`--version`]));return n===0}catch{return!1}}async function Q(r){try{let{exitCode:i}=await e(t([n.platform===`win32`?`where`:`which`,r]));return i===0}catch{return!1}}export{m as A,S as C,_ as D,y as E,g as O,w as S,b as T,M as _,J as a,D as b,Y as c,B as d,R as f,N as g,P as h,G as i,p as j,h as k,V as l,I as m,Q as n,K as o,L as p,q as r,X as s,U as t,H as u,j as v,x as w,E as x,O as y};
@@ -1,3 +0,0 @@
1
- import{n as e,t}from"./messages-qcLhD-Gc.mjs";import{t as n}from"./agents-XljEY0Vt.mjs";import{a as r,c as i,i as a,o,r as s,s as c}from"./detect-DQJbxlSn.mjs";import{H as l,a as u,q as d,r as f,s as p,t as m,u as h}from"./color-DPVCVxkr.mjs";async function g(){let d=await a(),m=await o(),g=await s(),y=await r(),b=await c(),x=await i(),S=await p(),C=S.latestVersion?l(S.latestVersion,S.currentVersion):!1,w=await n(),T=w.filter(e=>e.inPath).map(e=>({displayName:e.agent.displayName,installedVersion:e.installedVersion,latestVersion:e.latestVersion,lifecycle:e.lifecycle,outdated:!!(e.installedVersion&&e.latestVersion&&e.installedVersion!==e.latestVersion),sourceLabel:e.sourceLabel})),E=[],D=`docs/runbooks/quantex-troubleshooting.md`,O=`docs/runbooks/release-and-self-upgrade-debugging.md`;if(!d&&!m&&!g&&!y&&!b&&!x&&E.push({blocking:!0,category:`installers`,code:`NO_MANAGED_INSTALLER`,docsRef:D,message:`No managed installer found. Install bun, npm, brew, cargo, pip, or winget before relying on managed lifecycle operations.`,severity:`warning`,subject:{kind:`system`},suggestedAction:`restore-managed-installer`,suggestedCommands:[]}),(S.installSource===`bun`&&!d||S.installSource===`npm`&&!m)&&E.push({blocking:!0,category:`self`,code:`SELF_INSTALLER_MISSING`,docsRef:O,message:`Quantex CLI is tracked as a ${S.installSource} install, but ${S.installSource} is not available in PATH. Reinstall that package manager or reinstall Quantex from a supported source.`,severity:`warning`,subject:{kind:`self`,name:`quantex`},suggestedAction:`restore-self-installer`,suggestedCommands:v(S.installSource,S.updateChannel)}),S.canAutoUpdate||E.push({blocking:!1,category:`self`,code:`SELF_AUTO_UPDATE_UNAVAILABLE`,docsRef:O,message:`Quantex CLI cannot auto-update from install source "${S.installSource}". Reinstall via bun, npm, or the standalone binary if you want \`quantex upgrade\` support.`,severity:`warning`,subject:{kind:`self`,name:`quantex`},suggestedAction:`reinstall-self-with-auto-update-source`,suggestedCommands:[]}),C&&S.recommendedUpgradeCommand){let e=h(S);E.push({blocking:!1,category:`self`,code:`SELF_UPDATE_AVAILABLE`,docsRef:O,message:e?`Quantex CLI ${S.currentVersion} is behind ${S.latestVersion}. Run ${S.recommendedUpgradeCommand} or follow: ${e}`:`Quantex CLI ${S.currentVersion} is behind ${S.latestVersion}. Run ${S.recommendedUpgradeCommand}.`,severity:`warning`,subject:{kind:`self`,name:`quantex`},suggestedAction:`run-self-upgrade`,suggestedCommands:[S.recommendedUpgradeCommand]})}for(let n of w.filter(e=>e.inPath)){if(n.installedState||E.push({blocking:!1,category:`agent`,code:`AGENT_UNTRACKED_IN_PATH`,docsRef:D,message:`${n.agent.displayName} is available in PATH but not tracked as a managed Quantex install. Use \`quantex inspect ${n.agent.name} --json\` to confirm the source, then reinstall through Quantex if you want managed lifecycle operations.`,severity:`warning`,subject:{kind:`agent`,name:n.agent.name},suggestedAction:`inspect-agent-install-source`,suggestedCommands:[`quantex inspect ${n.agent.name} --json`,`quantex install ${n.agent.name}`]}),!(n.installedVersion&&n.latestVersion&&n.installedVersion!==n.latestVersion)||n.lifecycle===`managed`)continue;let r=t(n.agent,n.agent.selfUpdate?`self-update`:`manual-hint`)??e(n.agent);E.push({blocking:!1,category:`agent`,code:`AGENT_MANUAL_UPDATE_REQUIRED`,docsRef:D,message:`${n.agent.displayName} ${n.installedVersion} is behind ${n.latestVersion}, but the current source is ${n.sourceLabel}. ${r}`,severity:`warning`,subject:{kind:`agent`,name:n.agent.name},suggestedAction:n.agent.selfUpdate?`run-agent-self-update`:`follow-manual-agent-update`,suggestedCommands:n.agent.selfUpdate?[n.agent.selfUpdate.command.join(` `)]:[]})}return u(f({action:`doctor`,data:{agents:T,issues:E,installers:{brew:g,bun:d,cargo:y,npm:m,pip:b,winget:x},self:{canAutoUpdate:S.canAutoUpdate,currentVersion:S.currentVersion,installSource:S.installSource,latestVersion:S.latestVersion,outdated:!!C,recoveryHint:C?h(S):void 0}},target:{kind:`system`,name:`doctor`}}),_)}function _(e){if(e.data){if(console.log(m.bold(`
2
- Quantex CLI Environment Check
3
- `)),console.log(m.bold(`Managed Installers:`)),console.log(` Bun: ${e.data.installers.bun?m.green(`available`):m.red(`not found`)}`),console.log(` npm: ${e.data.installers.npm?m.green(`available`):m.red(`not found`)}`),console.log(` brew: ${e.data.installers.brew?m.green(`available`):m.red(`not found`)}`),console.log(` cargo: ${e.data.installers.cargo?m.green(`available`):m.red(`not found`)}`),console.log(` pip: ${e.data.installers.pip?m.green(`available`):m.red(`not found`)}`),console.log(` winget:${e.data.installers.winget?m.green(`available`):m.red(`not found`)}`),console.log(`\n${m.bold(`Quantex CLI:`)}`),console.log(` Version: ${e.data.self.currentVersion}`),console.log(` Source: ${e.data.self.installSource}`),console.log(` Auto-update: ${e.data.self.canAutoUpdate?m.green(`supported`):m.yellow(`unsupported`)}`),e.data.self.latestVersion&&console.log(` Latest: ${e.data.self.latestVersion}${e.data.self.outdated?m.yellow(` (update available)`):``}`),e.data.self.recoveryHint&&console.log(` Recovery: ${e.data.self.recoveryHint}`),console.log(`\n${m.bold(`Installed Agents:`)}`),e.data.agents.length===0)console.log(m.dim(` No agents installed`));else for(let t of e.data.agents)console.log(` ${t.displayName}: ${t.installedVersion??`unknown`} [${t.lifecycle}; ${t.sourceLabel}]${t.outdated?m.yellow(` (update available: ${t.latestVersion})`):``}`);if(console.log(`\n${m.bold(`Issues:`)}`),e.data.issues.length===0)console.log(m.green(` No issues found.`));else for(let t of e.data.issues)console.log(m.yellow(` - ${t.message}`)),t.suggestedCommands.length>0&&console.log(m.dim(` Next: ${t.suggestedCommands.join(` | `)}`));console.log()}}function v(e,t){let n=t===`beta`?`beta`:`latest`;return e===`bun`?[`bun add -g ${d}@${n}`]:e===`npm`?[`npm install -g ${d}@${n}`]:[]}export{g as doctorCommand};
@@ -1 +0,0 @@
1
- import{t as e}from"./ensure-gz-U0dLB.mjs";export{e as ensureCommand};
@@ -1 +0,0 @@
1
- import{t as e}from"./inspect-BYkFiCr4.mjs";export{e as inspectCommand};
@@ -1 +0,0 @@
1
- import{t as e}from"./resolve-D67Ham9Q.mjs";export{e as resolveCommand};
@@ -1 +0,0 @@
1
- import{n as e}from"./schema-C5qyYzdx.mjs";export{e as schemaCommand};
@@ -1 +0,0 @@
1
- import{n as e,r as t,t as n}from"./messages-qcLhD-Gc.mjs";import{_ as r,d as i,h as a,n as o,u as s}from"./agents-XljEY0Vt.mjs";import{J as c,a as l,i as u,n as d,r as f,t as p,z as m}from"./color-DPVCVxkr.mjs";import{a as h,i as g,n as _,r as v}from"./user-output-Bb3bt9ss.mjs";import{n as y,r as b}from"./update-DoeWcNiV.mjs";async function x(e,t){if(t)return S();if(!e)return l(d({action:`update`,error:{code:`INVALID_ARGUMENT`,message:`Please specify an agent name or use --all flag`},target:{kind:`agent`}}),k);let n=o(e);return n?C(n):l(d({action:`update`,error:{code:`AGENT_NOT_FOUND`,details:{input:e},message:`Unknown agent: ${e}`},target:{kind:`agent`,name:e}}),k)}async function S(){u({action:`update`,data:{scope:`all`},target:{kind:`agent`},type:`started`});let e=await w(await y());return e.hasFailures?l(d({action:`update`,data:{results:e.results,scope:`all`},error:{code:`UPDATE_FAILED`,message:`One or more agents failed to update.`},target:{kind:`agent`}}),k):l(f({action:`update`,data:{results:e.results,scope:`all`},target:{kind:`agent`}}),k)}async function C(e){u({action:`update`,data:{agent:e.name,scope:`single`},target:{kind:`agent`,name:e.name},type:`started`});let{inspection:t,plan:n}=await b(e);if(!t.inPath)return l(d({action:`update`,error:{code:`AGENT_NOT_INSTALLED`,message:`${e.displayName} is not installed.`},target:{kind:`agent`,name:e.name}}),k);let r=await w(n),i=O(r.results);return i?l(d({action:`update`,data:{results:r.results,scope:`single`},error:{code:`RESOURCE_LOCKED`,details:i.resource?{resource:i.resource}:void 0,message:i.message??`Another quantex process is already updating ${e.displayName}.`},target:{kind:`agent`,name:e.name}}),k):r.hasFailures?l(d({action:`update`,data:{results:r.results,scope:`single`},error:{code:`UPDATE_FAILED`,message:`Failed to update ${e.displayName}.`},target:{kind:`agent`,name:e.name}}),k):l(f({action:`update`,data:{results:r.results,scope:`single`},target:{kind:`agent`,name:e.name}}),k)}async function w(n){let r=[];for(let e of n.upToDate)T(r,{displayName:e.agent.displayName,installedVersion:e.installedVersion,latestVersion:e.latestVersion,name:e.agent.name,status:`up-to-date`});for(let t of n.skippedManualCheck)T(r,{displayName:t.agent.displayName,message:e(t.agent),name:t.agent.name,status:`manual-required`});for(let e of n.untrackedInPath)T(r,{displayName:e.agent.displayName,message:t(e.agent),name:e.agent.name,status:`manual-required`});for(let e of n.grouped){let t=await E(e.type,e.packages,e.updates);for(let e of t)T(r,e)}for(let e of n.manual)T(r,await D(e.agent,e.state,e.inspection.methods,e.inspection));return{hasFailures:r.some(e=>e.status===`failed`||e.status===`locked`),results:r}}function T(e,t){e.push(t),u({action:`update`,data:t,target:{kind:`agent`,name:t.name},type:`progress`})}async function E(e,t,n){if(n.length===0)return[];if(_())return n.map(({agent:t,inspection:n,strategy:r})=>({displayName:t.displayName,installedVersion:n.installedVersion,latestVersion:n.latestVersion,message:`Dry run: would update ${t.displayName}.`,name:t.name,status:`planned`,strategy:r===`managed`?`managed/${e}`:r}));try{return await i(e,t)?n.map(({agent:t,inspection:n,strategy:r})=>({displayName:t.displayName,installedVersion:n.installedVersion,latestVersion:n.latestVersion,name:t.name,status:`updated`,strategy:r===`managed`?`managed/${e}`:r})):await Promise.all(n.map(({agent:e,inspection:t,state:n})=>D(e,n,t.methods,t)))}catch(t){if(!c(t))throw t;return n.map(({agent:n,inspection:r,strategy:i})=>({displayName:n.displayName,installedVersion:r.installedVersion,latestVersion:r.latestVersion,message:t.message,name:n.name,resource:t.resource,status:`locked`,strategy:i===`managed`?`managed/${e}`:i}))}}async function D(t,i,o,l){let u=a({agent:t,installedState:i,methods:o??l?.methods??[]}),d=l?.installedVersion,f=l?.latestVersion;if(u===`manual-hint`&&!r(t,i))return{displayName:t.displayName,installedVersion:d,latestVersion:f,message:e(t),name:t.name,status:`manual-required`,strategy:u};if(_())return{displayName:t.displayName,installedVersion:d,latestVersion:f,message:`Dry run: would update ${t.displayName}.`,name:t.name,status:`planned`,strategy:u};let p;try{p=await s(t,i)}catch(e){if(c(e))return{displayName:t.displayName,installedVersion:d,latestVersion:f,message:e.message,name:t.name,resource:e.resource,status:`locked`,strategy:u};throw e}if(p.success){if(u===`self-update`){let e=await m(t.binaryName,t.versionProbe);if(d&&e)return e===d?{displayName:t.displayName,installedVersion:e,latestVersion:e,name:t.name,status:`up-to-date`,strategy:u}:{displayName:t.displayName,installedVersion:d,latestVersion:e,name:t.name,status:`updated`,strategy:u}}return{displayName:t.displayName,installedVersion:d,latestVersion:f,name:t.name,status:`updated`,strategy:u}}return{displayName:t.displayName,hint:n(t,u),installedVersion:d,latestVersion:f,name:t.name,status:`failed`,strategy:u}}function O(e){if(e.length===1)return e[0]?.status===`locked`?e[0]:void 0}function k(e){if(!e.data){e.error&&v(p.red(e.error.message));return}for(let t of e.data.results)switch(t.status){case`up-to-date`:g(p.green(`${t.displayName} is up to date (${t.installedVersion??`unknown`})`));break;case`manual-required`:h(p.yellow(`${t.displayName}: manual action required.`)),t.message&&h(p.cyan(`Next step: ${t.message}`));break;case`planned`:h(p.cyan(`Would update ${t.displayName}${t.strategy?` via ${t.strategy}`:``}${A(t.installedVersion,t.latestVersion)}`));break;case`updated`:g(p.cyan(`Updating ${t.displayName}${t.strategy?` via ${t.strategy}`:``}...${A(t.installedVersion,t.latestVersion)}`)),g(p.green(`${t.displayName} updated successfully!`));break;case`failed`:g(p.cyan(`Updating ${t.displayName}${t.strategy?` via ${t.strategy}`:``}...${A(t.installedVersion,t.latestVersion)}`)),v(p.red(`Failed to update ${t.displayName}.`)),t.hint&&h(p.cyan(`Next step: ${t.hint}`));break;case`locked`:h(p.yellow(t.message??`Another quantex process is already updating ${t.displayName}.`));break}e.data.results.length>1&&j(e.data.results),!e.data.results.length&&e.error&&v(p.red(e.error.message))}function A(e,t){return e?` (${e} -> ${t??`latest`})`:``}function j(e){let t={failed:0,locked:0,manualRequired:0,planned:0,upToDate:0,updated:0};for(let n of e)switch(n.status){case`up-to-date`:t.upToDate+=1;break;case`manual-required`:t.manualRequired+=1;break;case`planned`:t.planned+=1;break;case`updated`:t.updated+=1;break;case`failed`:t.failed+=1;break;case`locked`:t.locked+=1;break}let n=[t.updated?`updated ${t.updated}`:void 0,t.upToDate?`up to date ${t.upToDate}`:void 0,t.manualRequired?`manual ${t.manualRequired}`:void 0,t.failed?`failed ${t.failed}`:void 0,t.locked?`locked ${t.locked}`:void 0,t.planned?`planned ${t.planned}`:void 0].filter(Boolean);n.length>0&&g(p.bold(`Summary: ${n.join(`, `)}`))}export{x as updateCommand};
@@ -1 +0,0 @@
1
- import{_ as e,g as t,i as n,t as r,x as i}from"./agents-XljEY0Vt.mjs";function a(e,n={}){let r={bun:[],npm:[],brew:[],cargo:[],pip:[],winget:[]},i=[],a=[],c=[],l=[];for(let u of e){if(!u.inPath)continue;if(n.skipUntrackedInPath&&!u.installedState){c.push(u);continue}if(s(u)){a.push(u);continue}if(!o(u)){l.push(u);continue}let e=t({agent:u.agent,installedState:u.installedState,methods:u.methods}),d=e.strategy===`managed`?e.getManagedInstallerType?.({agent:u.agent,installedState:u.installedState,methods:u.methods}):void 0;if(d){let e={inspection:u,installerType:d,strategy:`grouped`};r[d].push(e);continue}i.push({inspection:u,strategy:e.strategy===`self-update`?`self-update`:`manual`})}return{entries:[...r.bun,...r.npm,...r.brew,...r.cargo,...r.pip,...r.winget,...i],grouped:r,manual:i,skippedManualCheck:a,untrackedInPath:c,upToDate:l}}function o(e){return e.installedVersion&&e.latestVersion?e.installedVersion!==e.latestVersion:!0}function s(t){return!t.latestVersion&&!e(t.agent,t.installedState)}const c=[`bun`,`npm`,`brew`,`cargo`,`pip`,`winget`];async function l(e){let t=await n(e);return{agent:e,inspection:t,updateAvailable:o(t)}}async function u(){return f(await r(),{skipUntrackedInPath:!0})}async function d(e){let t=await n(e);return{inspection:t,plan:f([t])}}function f(e,t={}){let n=a(e,t),r=[],i=c.map(e=>p(e,n.grouped[e],r)).filter(e=>e!==void 0);return{entries:n.entries.map(e=>h(e.inspection)),grouped:i,manual:[...r,...n.manual.map(e=>h(e.inspection))],skippedManualCheck:n.skippedManualCheck,untrackedInPath:n.untrackedInPath,upToDate:n.upToDate}}function p(e,t,n){if(t.length===0)return;let r=t.map(e=>h(e.inspection)),i=r.filter(m);if(n.push(...r.filter(e=>!m(e))),i.length!==0)return{type:e,packages:i.map(e=>e.package),updates:i}}function m(e){return!!e.package?.packageName}function h(e){let n=t({agent:e.agent,installedState:e.installedState,methods:e.methods}),r=n.getManagedInstallerType?.({agent:e.agent,installedState:e.installedState,methods:e.methods});return{agent:e.agent,inspection:e,installerType:r,package:r?g(e.agent,e.installedState,e.methods,r):void 0,state:e.installedState,strategy:n.strategy}}function g(e,t,n,r){if(t?.packageName&&t.installType===r)return{packageName:t.packageName,packageInstallArgs:t.packageInstallArgs,packageTargetKind:t.packageTargetKind};let a=n.find(e=>e.type===r);if(!a)return;let o=i(e,a);if(o)return{packageName:o,packageInstallArgs:a.packageInstallArgs,packageTargetKind:a.packageTargetKind}}export{o as a,a as i,u as n,d as r,l as t};