@testmuai/kane-cli 0.4.2 → 0.4.4

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 (84) hide show
  1. package/dist/{ChromeProfilePicker-HNP7QQ4J.js → ChromeProfilePicker-H427EL5U.js} +1 -1
  2. package/dist/{CliFeedbackPrompt-OSNATI4W.js → CliFeedbackPrompt-D7DXZR4B.js} +1 -1
  3. package/dist/{CliUploadProgress-7HRWDZ4P.js → CliUploadProgress-TZOIZVBK.js} +1 -1
  4. package/dist/{ConfigView-PQH67FUK.js → ConfigView-ZU5ZNKUD.js} +1 -1
  5. package/dist/FolderPicker-3NJWN2F2.js +2 -0
  6. package/dist/{HelpView-HFKFRKG3.js → HelpView-DWUH3LLF.js} +1 -1
  7. package/dist/{InfoBox-3IN3IZ2I.js → InfoBox-5GHCKHZE.js} +1 -1
  8. package/dist/{LinksBox-DI5QKX6K.js → LinksBox-7RJTKT4B.js} +1 -1
  9. package/dist/{ProfilesView-N6XNSUHQ.js → ProfilesView-YSIGYTJM.js} +1 -1
  10. package/dist/{ProjectPicker-6QIVHOO7.js → ProjectPicker-XC6TSIR2.js} +1 -1
  11. package/dist/{SaveSessionPrompt-7CZHPNYK.js → SaveSessionPrompt-MRUJIK7M.js} +1 -1
  12. package/dist/SingleShotApp-M6GGEFNF.js +2 -0
  13. package/dist/{SummaryBox-7ZK2A6MA.js → SummaryBox-ANGQ3UJN.js} +1 -1
  14. package/dist/TestMdRunView-PMTEPMCQ.js +2 -0
  15. package/dist/{WhoamiView-3E447A3G.js → WhoamiView-D5XIL6WM.js} +1 -1
  16. package/dist/{changelog-ZBTZCYKI.js → changelog-LAWVQATM.js} +1 -1
  17. package/dist/{chunk-CZBHDBID.js → chunk-2COEECXK.js} +1 -1
  18. package/dist/{chunk-NKFXY5TF.js → chunk-2PAQTECV.js} +2 -2
  19. package/dist/{chunk-RCL22HDJ.js → chunk-34JPQPWA.js} +1 -1
  20. package/dist/{chunk-VBZIIF5N.js → chunk-5JCW7SWD.js} +1 -1
  21. package/dist/{chunk-S7JV4A3U.js → chunk-6TJO4BQP.js} +1 -1
  22. package/dist/{chunk-YB67GRWE.js → chunk-ALVFWRMC.js} +1 -1
  23. package/dist/{chunk-4ZHU4DLD.js → chunk-CIJJJRAO.js} +1 -1
  24. package/dist/{chunk-EEF6OT52.js → chunk-D3NAXZ2R.js} +8 -8
  25. package/dist/{chunk-34YRU7WM.js → chunk-F5QI2E6V.js} +2 -2
  26. package/dist/{chunk-KPF3BPJ5.js → chunk-FNRTXVR2.js} +1 -1
  27. package/dist/chunk-FS2B5IHO.js +2 -0
  28. package/dist/{chunk-GNJBT6SS.js → chunk-GAZK7QSI.js} +1 -1
  29. package/dist/{chunk-PQIPYWTP.js → chunk-H6SXCNLJ.js} +1 -1
  30. package/dist/{chunk-UHGECBEN.js → chunk-IUECYFR6.js} +1 -1
  31. package/dist/{chunk-RD6G3CMN.js → chunk-JRBDKEHJ.js} +1 -1
  32. package/dist/chunk-JSCT5YQ6.js +2 -0
  33. package/dist/chunk-JULO4KDA.js +22 -0
  34. package/dist/{chunk-VL57GII7.js → chunk-JWJAOZT6.js} +1 -1
  35. package/dist/{chunk-QXVI3LI4.js → chunk-KXRQELOX.js} +1 -1
  36. package/dist/{chunk-ELZIC2EH.js → chunk-LCLMSRS3.js} +1 -1
  37. package/dist/{chunk-OISHNB7D.js → chunk-LUYOWEJW.js} +1 -1
  38. package/dist/{chunk-7CBWZLRS.js → chunk-M23DF6UM.js} +1 -1
  39. package/dist/{chunk-PF7PBYCJ.js → chunk-MCYS4R5P.js} +1 -1
  40. package/dist/{chunk-R7T6Z6QW.js → chunk-MRKDRLID.js} +1 -1
  41. package/dist/{chunk-FFTIDI5K.js → chunk-POFY6TC3.js} +1 -1
  42. package/dist/{chunk-HN7DVSVI.js → chunk-PUU7A26K.js} +1 -1
  43. package/dist/chunk-QAS2SVT3.js +5 -0
  44. package/dist/chunk-QIMR6EU3.js +8 -0
  45. package/dist/{chunk-AAJSF67A.js → chunk-QSOQ2JMW.js} +1 -1
  46. package/dist/{chunk-4UKCDU64.js → chunk-RKAQBRNT.js} +1 -1
  47. package/dist/{chunk-DGUXTSHM.js → chunk-RSRBUJRW.js} +1 -1
  48. package/dist/chunk-TTRJNNAV.js +2 -0
  49. package/dist/{chunk-BM25JQ3Z.js → chunk-W4OWTRMO.js} +1 -1
  50. package/dist/{chunk-Y6IUJZMV.js → chunk-WUY26ICP.js} +1 -1
  51. package/dist/{chunk-TQGNNJX5.js → chunk-YJY3HPGV.js} +1 -1
  52. package/dist/{chunk-LOSNFBZV.js → chunk-YPOA4277.js} +1 -1
  53. package/dist/{chunk-AKKATURY.js → chunk-Z5YG763L.js} +2 -2
  54. package/dist/chunk-ZTYRCGGQ.js +60 -0
  55. package/dist/{generate-headless-WL6A6ACX.js → generate-headless-FYQ4IAPL.js} +2 -2
  56. package/dist/index.js +36 -36
  57. package/dist/{list-commands-MK4W3Q7O.js → list-commands-JMSIAYLR.js} +1 -1
  58. package/dist/login-flow-WMUIDH7C.js +2 -0
  59. package/dist/{persist-recorded-session-A5EJ25AE.js → persist-recorded-session-QUEFYH4U.js} +1 -1
  60. package/dist/{pipeline-L5TDZMLS.js → pipeline-IXEPO6AR.js} +1 -1
  61. package/dist/{recording-banner-6UI6NNRK.js → recording-banner-TI2Q7HV5.js} +1 -1
  62. package/dist/{require-project-folder-J5WZR653.js → require-project-folder-HOSORDUO.js} +1 -1
  63. package/dist/{run-test-md-I76IV7QA.js → run-test-md-XFQCBCIC.js} +6 -6
  64. package/dist/{skill-installer-ZLBRT4QP.js → skill-installer-WYDRFJRS.js} +1 -1
  65. package/dist/tcg-generate-7IZZWQSU.js +2 -0
  66. package/dist/testmd-actions-QH7EQAOK.js +2 -0
  67. package/dist/token-refresh-YTRMAHED.js +2 -0
  68. package/dist/{validate-basic-QUPVT2EV.js → validate-basic-CAF6WSCM.js} +1 -1
  69. package/dist/{version-check-RVK5YKDZ.js → version-check-2RMMQEZJ.js} +1 -1
  70. package/package.json +6 -5
  71. package/dist/FolderPicker-SET7IG6S.js +0 -2
  72. package/dist/SingleShotApp-A4VXMXEZ.js +0 -2
  73. package/dist/TestMdRunView-KGHEZZBK.js +0 -2
  74. package/dist/chunk-3QWAABMG.js +0 -2
  75. package/dist/chunk-DQASLGFG.js +0 -60
  76. package/dist/chunk-H2P7UJAU.js +0 -8
  77. package/dist/chunk-K4PLPKPF.js +0 -5
  78. package/dist/chunk-LY5LHKGG.js +0 -18
  79. package/dist/chunk-RLSBAT6P.js +0 -2
  80. package/dist/chunk-WFSTRBQF.js +0 -2
  81. package/dist/login-flow-CDR6ARK3.js +0 -2
  82. package/dist/tcg-generate-R6P4QUGO.js +0 -2
  83. package/dist/testmd-actions-W2INQVTH.js +0 -2
  84. package/dist/token-refresh-4QLWR5ZI.js +0 -2
@@ -1,2 +1,2 @@
1
1
  import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{a,b,c}from"./chunk-YB67GRWE.js";import"./chunk-GNJBT6SS.js";import"./chunk-3QWAABMG.js";import"./chunk-HCBYKLMW.js";import"./chunk-C44QQJR4.js";import"./chunk-6YGTRKDT.js";import"./chunk-UR6MHSHU.js";export{c as ChromeProfilePicker,b as formatChromeProfileLine,a as listChromeProfiles};
2
+ import{a,b,c}from"./chunk-ALVFWRMC.js";import"./chunk-GAZK7QSI.js";import"./chunk-FS2B5IHO.js";import"./chunk-HCBYKLMW.js";import"./chunk-C44QQJR4.js";import"./chunk-6YGTRKDT.js";import"./chunk-UR6MHSHU.js";export{c as ChromeProfilePicker,b as formatChromeProfileLine,a as listChromeProfiles};
@@ -1,2 +1,2 @@
1
1
  import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{a as r}from"./chunk-OISHNB7D.js";import"./chunk-GNJBT6SS.js";import"./chunk-3QWAABMG.js";import"./chunk-HCBYKLMW.js";import{c as e}from"./chunk-C44QQJR4.js";import{a as i}from"./chunk-6YGTRKDT.js";import{e as m}from"./chunk-UR6MHSHU.js";var t=m(i(),1);async function d(){return new Promise(o=>{let c=e(t.default.createElement(r,{onSubmit:n=>{c.unmount(),o(n)}}),{stdout:process.stderr,exitOnCtrlC:!1})})}export{d as renderFeedbackPrompt};
2
+ import{a as r}from"./chunk-LUYOWEJW.js";import"./chunk-GAZK7QSI.js";import"./chunk-FS2B5IHO.js";import"./chunk-HCBYKLMW.js";import{c as e}from"./chunk-C44QQJR4.js";import{a as i}from"./chunk-6YGTRKDT.js";import{e as m}from"./chunk-UR6MHSHU.js";var t=m(i(),1);async function d(){return new Promise(o=>{let c=e(t.default.createElement(r,{onSubmit:n=>{c.unmount(),o(n)}}),{stdout:process.stderr,exitOnCtrlC:!1})})}export{d as renderFeedbackPrompt};
@@ -1,2 +1,2 @@
1
1
  import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{a as P,b as g,c as f}from"./chunk-VL57GII7.js";import"./chunk-PQIPYWTP.js";import"./chunk-3QWAABMG.js";import{a as c}from"./chunk-HCBYKLMW.js";import{c as d}from"./chunk-C44QQJR4.js";import{a as h}from"./chunk-6YGTRKDT.js";import{e as p}from"./chunk-UR6MHSHU.js";var e=p(h(),1);var m=p(c(),1);function w({pipeline:t,buildShareUrl:r,onDone:o}){let[n,i]=(0,e.useState)(P()),[S,l]=(0,e.useState)("uploading"),[U,R]=(0,e.useState)(),[C,E]=(0,e.useState)();return(0,e.useEffect)(()=>{let x=t.config.onProgress;t.config.onProgress=(s,u,a)=>{x(s,u,a),i(y=>g(y,s,u,a))},t.execute().then(s=>{s.success?(R(r?.(s)),l("success")):(E(s.error),l("failed")),setTimeout(()=>o(s),1500)})},[]),(0,m.jsx)(f,{steps:n,status:S,testUrl:U,error:C})}async function O(t,r){return new Promise(o=>{let n=d(e.default.createElement(w,{pipeline:t,buildShareUrl:r,onDone:i=>{n.unmount(),o(i)}}),{stdout:process.stderr,exitOnCtrlC:!1})})}export{O as renderUploadProgress};
2
+ import{a as P,b as g,c as f}from"./chunk-JWJAOZT6.js";import"./chunk-H6SXCNLJ.js";import"./chunk-FS2B5IHO.js";import{a as c}from"./chunk-HCBYKLMW.js";import{c as d}from"./chunk-C44QQJR4.js";import{a as h}from"./chunk-6YGTRKDT.js";import{e as p}from"./chunk-UR6MHSHU.js";var e=p(h(),1);var m=p(c(),1);function w({pipeline:t,buildShareUrl:r,onDone:o}){let[n,i]=(0,e.useState)(P()),[S,l]=(0,e.useState)("uploading"),[U,R]=(0,e.useState)(),[C,E]=(0,e.useState)();return(0,e.useEffect)(()=>{let x=t.config.onProgress;t.config.onProgress=(s,u,a)=>{x(s,u,a),i(y=>g(y,s,u,a))},t.execute().then(s=>{s.success?(R(r?.(s)),l("success")):(E(s.error),l("failed")),setTimeout(()=>o(s),1500)})},[]),(0,m.jsx)(f,{steps:n,status:S,testUrl:U,error:C})}async function O(t,r){return new Promise(o=>{let n=d(e.default.createElement(w,{pipeline:t,buildShareUrl:r,onDone:i=>{n.unmount(),o(i)}}),{stdout:process.stderr,exitOnCtrlC:!1})})}export{O as renderUploadProgress};
@@ -1,2 +1,2 @@
1
1
  import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{a as p,b as l,c as n}from"./chunk-UHGECBEN.js";import{v as o}from"./chunk-3QWAABMG.js";import{a as g}from"./chunk-HCBYKLMW.js";import{a,j as c}from"./chunk-C44QQJR4.js";import{a as R}from"./chunk-6YGTRKDT.js";import{e as t}from"./chunk-UR6MHSHU.js";var b=t(R(),1);var e=t(g(),1);function A({model:d,authLabel:v,profile:x,env:w,defaultUrl:u,projectId:r,projectName:s,folderId:i,folderName:f,windowSize:B,chromeProfile:C}){let h=r?s?`${s} (${r})`:r:"(none)",D=i?f?`${f} (${i})`:i:"(none)",{exit:m}=c();return(0,b.useEffect)(()=>{let P=setTimeout(()=>m(),50);return()=>clearTimeout(P)},[m]),(0,e.jsx)(a,{flexDirection:"column",children:(0,e.jsx)(p,{title:"Configuration",children:(0,e.jsxs)(a,{flexDirection:"column",paddingY:1,children:[(0,e.jsx)(n,{label:"Auth"}),(0,e.jsx)(l,{label:" method",value:v}),(0,e.jsx)(l,{label:" profile",value:x}),(0,e.jsx)(l,{label:" env",value:w}),(0,e.jsx)(n,{label:"Defaults"}),(0,e.jsx)(l,{label:" url",value:u??"(none)",valueColor:u?o.orange:o.dim}),(0,e.jsx)(l,{label:" model",value:d}),(0,e.jsx)(l,{label:" window",value:B}),(0,e.jsx)(l,{label:" project",value:h}),(0,e.jsx)(l,{label:" folder",value:D}),(0,e.jsx)(n,{label:"Paths"}),(0,e.jsx)(l,{label:" chrome",value:C,valueColor:o.dim})]})})})}export{A as ConfigView};
2
+ import{a as p,b as l,c as n}from"./chunk-IUECYFR6.js";import{x as o}from"./chunk-FS2B5IHO.js";import{a as g}from"./chunk-HCBYKLMW.js";import{a,j as c}from"./chunk-C44QQJR4.js";import{a as R}from"./chunk-6YGTRKDT.js";import{e as t}from"./chunk-UR6MHSHU.js";var b=t(R(),1);var e=t(g(),1);function A({model:d,authLabel:v,profile:x,env:w,defaultUrl:u,projectId:r,projectName:s,folderId:i,folderName:f,windowSize:B,chromeProfile:C}){let h=r?s?`${s} (${r})`:r:"(none)",D=i?f?`${f} (${i})`:i:"(none)",{exit:m}=c();return(0,b.useEffect)(()=>{let P=setTimeout(()=>m(),50);return()=>clearTimeout(P)},[m]),(0,e.jsx)(a,{flexDirection:"column",children:(0,e.jsx)(p,{title:"Configuration",children:(0,e.jsxs)(a,{flexDirection:"column",paddingY:1,children:[(0,e.jsx)(n,{label:"Auth"}),(0,e.jsx)(l,{label:" method",value:v}),(0,e.jsx)(l,{label:" profile",value:x}),(0,e.jsx)(l,{label:" env",value:w}),(0,e.jsx)(n,{label:"Defaults"}),(0,e.jsx)(l,{label:" url",value:u??"(none)",valueColor:u?o.orange:o.dim}),(0,e.jsx)(l,{label:" model",value:d}),(0,e.jsx)(l,{label:" window",value:B}),(0,e.jsx)(l,{label:" project",value:h}),(0,e.jsx)(l,{label:" folder",value:D}),(0,e.jsx)(n,{label:"Paths"}),(0,e.jsx)(l,{label:" chrome",value:C,valueColor:o.dim})]})})})}export{A as ConfigView};
@@ -0,0 +1,2 @@
1
+ import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
+ import{a,b}from"./chunk-RKAQBRNT.js";import"./chunk-YCCUBQY4.js";import"./chunk-2COEECXK.js";import"./chunk-LPUQ4HWQ.js";import"./chunk-NLCCBXXV.js";import"./chunk-6TJO4BQP.js";import"./chunk-RZ4F3BHX.js";import"./chunk-GAZK7QSI.js";import"./chunk-FS2B5IHO.js";import"./chunk-HCBYKLMW.js";import"./chunk-C44QQJR4.js";import"./chunk-6YGTRKDT.js";import"./chunk-UR6MHSHU.js";export{b as FolderPicker,a as formatFolderLine};
@@ -1,2 +1,2 @@
1
1
  import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{a as f,b as i,v as t}from"./chunk-3QWAABMG.js";import{a as T}from"./chunk-HCBYKLMW.js";import{a as n,b as o,j as p,k as x}from"./chunk-C44QQJR4.js";import{a as b}from"./chunk-6YGTRKDT.js";import{e as h}from"./chunk-UR6MHSHU.js";var w=h(b(),1);var e=h(T(),1),S="https://www.testmuai.com/support/docs/kane-cli-introduction",v="https://github.com/LambdaTest/kane-cli/issues";function k(){let{exit:l}=p(),{stdout:r}=x(),c=r?.columns??80;return(0,w.useEffect)(()=>{let m=setTimeout(()=>l(),50);return()=>clearTimeout(m)},[l]),(0,e.jsxs)(n,{flexDirection:"column",children:[(0,e.jsxs)(n,{paddingX:1,paddingTop:1,flexDirection:"column",children:[(0,e.jsx)(o,{color:t.orange,bold:!0,children:i}),(0,e.jsxs)(n,{children:[(0,e.jsx)(o,{color:t.dim,children:"Browser automation powered by AI "}),(0,e.jsxs)(o,{color:t.muted,children:[" v",f]})]})]}),(0,e.jsx)(o,{children:" "}),(0,e.jsxs)(d,{title:"USAGE",children:[(0,e.jsx)(g,{cmd:`${i}`,desc:"Single-shot prompt (no args, TTY)"}),(0,e.jsx)(g,{cmd:`${i} --tui`,desc:"Full interactive TUI",highlight:!0}),(0,e.jsx)(g,{cmd:`${i} run "<objective>"`,desc:"Inline objective"}),(0,e.jsx)(g,{cmd:`${i} testmd run <path>.md`,desc:"Replay a saved *_test.md file"})]}),(0,e.jsxs)(d,{title:"HELP",children:[(0,e.jsx)(g,{cmd:`${i} --help`,desc:"Show this help (long form)"}),(0,e.jsx)(g,{cmd:`${i} -h`,desc:"Show this help (short form)"}),(0,e.jsx)(g,{cmd:`${i} help`,desc:"Show this help (subcommand form)"}),(0,e.jsxs)(n,{marginLeft:2,marginTop:0,flexDirection:"column",children:[(0,e.jsxs)(o,{color:t.dim,children:["These are the only supported help invocations. Anything else (e.g. ",(0,e.jsx)(o,{color:t.orange,children:"-help"}),") is an unknown flag."]}),(0,e.jsxs)(o,{color:t.dim,children:["Terminal tab-completion is a shell feature; ",i," does not ship shell-completion scripts, so any flag your shell suggests is a generic guess \u2014 not from ",i,"."]})]})]}),(0,e.jsxs)(d,{title:"COMMANDS",children:[(0,e.jsx)(a,{cmd:"run",args:"<objective>",desc:"Run an objective (inline string)",highlight:!0}),(0,e.jsx)(a,{cmd:"testmd",args:"run|list|status|delete|export",desc:"Manage *_test.md files"}),(0,e.jsx)(a,{cmd:"login",desc:"Auth setup (interactive, --oauth, or --username)"}),(0,e.jsx)(a,{cmd:"logout",desc:"Revoke tokens + delete profile"}),(0,e.jsx)(a,{cmd:"whoami",desc:"Show authenticated identity"}),(0,e.jsx)(a,{cmd:"config",args:"show|set-\u2026|reset",desc:"Manage configuration"}),(0,e.jsx)(a,{cmd:"profiles",args:"list|switch|delete",desc:"Manage auth profiles"}),(0,e.jsx)(a,{cmd:"changelog",args:"[--all]",desc:"Show recent release notes"})]}),(0,e.jsxs)(d,{title:"TESTMD ACTIONS",children:[(0,e.jsx)(a,{cmd:"testmd run",args:"<path>",desc:"Replay a saved *_test.md file",highlight:!0}),(0,e.jsx)(a,{cmd:"testmd list",desc:"List *_test.md files in cwd (recursive)"}),(0,e.jsx)(a,{cmd:"testmd status",args:"<path>",desc:"Print local meta.json for a test"}),(0,e.jsx)(a,{cmd:"testmd delete",args:"<path>",desc:"Remove output-<stem>/ and the source file"}),(0,e.jsx)(a,{cmd:"testmd export",args:"<path> --language <py|js>",desc:"Generate standalone Playwright code"})]}),(0,e.jsxs)(d,{title:"RUN FLAGS",children:[(0,e.jsx)(s,{long:"--max-steps",arg:"<n>",desc:"Max agent steps (default: 30)"}),(0,e.jsx)(s,{long:"--timeout",arg:"<sec>",desc:"Kill run after N seconds"}),(0,e.jsx)(s,{long:"--headless",desc:"No visible browser window"}),(0,e.jsx)(s,{long:"--mode",arg:"<action|testing>",desc:"Run mode (default: testing)"}),(0,e.jsx)(s,{long:"--name",arg:"<name>",desc:"Persist session under this name"}),(0,e.jsx)(s,{long:"--variables",arg:"<json>",desc:"Inline variables as JSON"}),(0,e.jsx)(s,{long:"--variables-file",arg:"<path>",desc:"Load variables from file"}),(0,e.jsx)(s,{long:"--session-context",arg:"<json>",desc:"Prior runs context JSON"}),(0,e.jsx)(s,{long:"--global-context",arg:"<file>",desc:"Override global context markdown"}),(0,e.jsx)(s,{long:"--local-context",arg:"<file>",desc:"Override local context markdown"}),(0,e.jsx)(s,{long:"--ws-endpoint",arg:"<url>",desc:"Remote browser (LambdaTest)"}),(0,e.jsx)(s,{long:"--cdp-endpoint",arg:"<url>",desc:"Connect to existing Chrome CDP"}),(0,e.jsx)(s,{long:"--task-skills",desc:"Domain-specific task skills (experimental)"}),(0,e.jsx)(s,{long:"--code-export",desc:"Generate code export after upload"}),(0,e.jsx)(s,{long:"--code-language",arg:"<lang>",desc:"Code export language: python | javascript"}),(0,e.jsx)(s,{long:"--skip-code-validation",desc:"Skip post-codegen validation"}),(0,e.jsx)(s,{long:"--username",arg:"<user>",desc:"Basic auth (skip OAuth)"}),(0,e.jsx)(s,{long:"--access-key",arg:"<key>",desc:"Basic auth access key"}),(0,e.jsx)(s,{long:"--env",arg:"<name>",desc:"Environment (prod or stage)"}),(0,e.jsx)(s,{long:"--agent",desc:"NDJSON output (no UI)",highlight:!0})]}),(0,e.jsxs)(d,{title:"EXAMPLES",children:[(0,e.jsx)(u,{label:"Inline objective",cmd:`${i} run "Search for laptop"`}),(0,e.jsx)(u,{label:"Replay a saved test",cmd:`${i} testmd run smoke_test.md`}),(0,e.jsx)(u,{label:"Variables",cmd:`${i} run "Login as {{user}}" --variables '{"user":{"value":"alice"}}'`}),(0,e.jsx)(u,{label:"Agent mode (NDJSON)",cmd:`${i} run "Add to cart" --agent | jq .status`})]}),(0,e.jsx)(d,{title:"TEST FILES",children:(0,e.jsxs)(n,{marginLeft:2,flexDirection:"column",children:[(0,e.jsxs)(o,{color:t.dim,children:[(0,e.jsx)(o,{color:t.orange,children:"*_test.md"})," \u2014 markdown test files with YAML frontmatter and ",(0,e.jsx)(o,{color:t.orange,children:"## "}),"step headings."]}),(0,e.jsxs)(o,{color:t.dim,children:["Run with ",(0,e.jsxs)(o,{color:t.orange,children:[i," testmd run path/to/foo_test.md"]}),". (`.md` paths are not accepted by `",i," run`.)"]}),(0,e.jsxs)(o,{color:t.dim,children:["Sessions you run in TUI auto-save to ",(0,e.jsx)(o,{color:t.orange,children:"<cwd>/.testmuai/tests/<name>_test.md"})," (testing mode prompts on exit)."]})]})}),(0,e.jsxs)(n,{flexDirection:"column",marginTop:0,paddingX:1,children:[(0,e.jsx)(o,{color:t.muted,children:"\u2500".repeat(Math.min(c-2,70))}),(0,e.jsxs)(n,{gap:3,children:[(0,e.jsxs)(n,{children:[(0,e.jsx)(o,{color:t.dim,children:"Docs "}),(0,e.jsx)(o,{color:t.orange,underline:!0,children:S})]}),(0,e.jsxs)(n,{children:[(0,e.jsx)(o,{color:t.dim,children:"Bugs "}),(0,e.jsx)(o,{color:t.orange,underline:!0,children:v})]})]})]}),(0,e.jsx)(o,{children:" "})]})}function d({title:l,children:r}){return(0,e.jsxs)(n,{flexDirection:"column",marginBottom:1,children:[(0,e.jsx)(n,{marginLeft:1,children:(0,e.jsx)(o,{bold:!0,color:t.dim,children:l})}),r]})}function g({cmd:l,desc:r,highlight:c}){return(0,e.jsxs)(n,{marginLeft:2,children:[(0,e.jsxs)(n,{width:40,children:[(0,e.jsx)(o,{color:t.dim,children:"$ "}),(0,e.jsx)(o,{color:c?t.orange:t.orange,children:l})]}),(0,e.jsx)(o,{color:t.dim,children:r})]})}function a({cmd:l,args:r,desc:c,highlight:m}){return(0,e.jsxs)(n,{marginLeft:2,children:[(0,e.jsx)(n,{width:16,children:(0,e.jsx)(o,{color:m?t.orange:t.green,bold:!0,children:l})}),(0,e.jsx)(n,{width:32,children:r?(0,e.jsx)(o,{color:t.dim,children:r}):null}),(0,e.jsx)(o,{color:t.dim,children:c})]})}function s({long:l,arg:r,desc:c,highlight:m}){return(0,e.jsxs)(n,{marginLeft:2,children:[(0,e.jsxs)(n,{width:30,children:[(0,e.jsx)(o,{color:m?t.orange:t.orange,children:l}),r&&(0,e.jsxs)(o,{color:t.dim,children:[" ",r]})]}),(0,e.jsx)(o,{color:t.dim,children:c})]})}function u({label:l,cmd:r}){return(0,e.jsxs)(n,{marginLeft:2,flexDirection:"column",children:[(0,e.jsxs)(o,{color:t.dim,children:["# ",l]}),(0,e.jsxs)(o,{color:t.orange,children:["$ ",r]})]})}export{k as HelpView};
2
+ import{a as f,b as i,x as t}from"./chunk-FS2B5IHO.js";import{a as T}from"./chunk-HCBYKLMW.js";import{a as n,b as o,j as p,k as x}from"./chunk-C44QQJR4.js";import{a as b}from"./chunk-6YGTRKDT.js";import{e as h}from"./chunk-UR6MHSHU.js";var w=h(b(),1);var e=h(T(),1),S="https://www.testmuai.com/support/docs/kane-cli-introduction",v="https://github.com/LambdaTest/kane-cli/issues";function k(){let{exit:l}=p(),{stdout:r}=x(),c=r?.columns??80;return(0,w.useEffect)(()=>{let m=setTimeout(()=>l(),50);return()=>clearTimeout(m)},[l]),(0,e.jsxs)(n,{flexDirection:"column",children:[(0,e.jsxs)(n,{paddingX:1,paddingTop:1,flexDirection:"column",children:[(0,e.jsx)(o,{color:t.orange,bold:!0,children:i}),(0,e.jsxs)(n,{children:[(0,e.jsx)(o,{color:t.dim,children:"Browser automation powered by AI "}),(0,e.jsxs)(o,{color:t.muted,children:[" v",f]})]})]}),(0,e.jsx)(o,{children:" "}),(0,e.jsxs)(d,{title:"USAGE",children:[(0,e.jsx)(g,{cmd:`${i}`,desc:"Single-shot prompt (no args, TTY)"}),(0,e.jsx)(g,{cmd:`${i} --tui`,desc:"Full interactive TUI",highlight:!0}),(0,e.jsx)(g,{cmd:`${i} run "<objective>"`,desc:"Inline objective"}),(0,e.jsx)(g,{cmd:`${i} testmd run <path>.md`,desc:"Replay a saved *_test.md file"})]}),(0,e.jsxs)(d,{title:"HELP",children:[(0,e.jsx)(g,{cmd:`${i} --help`,desc:"Show this help (long form)"}),(0,e.jsx)(g,{cmd:`${i} -h`,desc:"Show this help (short form)"}),(0,e.jsx)(g,{cmd:`${i} help`,desc:"Show this help (subcommand form)"}),(0,e.jsxs)(n,{marginLeft:2,marginTop:0,flexDirection:"column",children:[(0,e.jsxs)(o,{color:t.dim,children:["These are the only supported help invocations. Anything else (e.g. ",(0,e.jsx)(o,{color:t.orange,children:"-help"}),") is an unknown flag."]}),(0,e.jsxs)(o,{color:t.dim,children:["Terminal tab-completion is a shell feature; ",i," does not ship shell-completion scripts, so any flag your shell suggests is a generic guess \u2014 not from ",i,"."]})]})]}),(0,e.jsxs)(d,{title:"COMMANDS",children:[(0,e.jsx)(a,{cmd:"run",args:"<objective>",desc:"Run an objective (inline string)",highlight:!0}),(0,e.jsx)(a,{cmd:"testmd",args:"run|list|status|delete|export",desc:"Manage *_test.md files"}),(0,e.jsx)(a,{cmd:"login",desc:"Auth setup (interactive, --oauth, or --username)"}),(0,e.jsx)(a,{cmd:"logout",desc:"Revoke tokens + delete profile"}),(0,e.jsx)(a,{cmd:"whoami",desc:"Show authenticated identity"}),(0,e.jsx)(a,{cmd:"config",args:"show|set-\u2026|reset",desc:"Manage configuration"}),(0,e.jsx)(a,{cmd:"profiles",args:"list|switch|delete",desc:"Manage auth profiles"}),(0,e.jsx)(a,{cmd:"changelog",args:"[--all]",desc:"Show recent release notes"})]}),(0,e.jsxs)(d,{title:"TESTMD ACTIONS",children:[(0,e.jsx)(a,{cmd:"testmd run",args:"<path>",desc:"Replay a saved *_test.md file",highlight:!0}),(0,e.jsx)(a,{cmd:"testmd list",desc:"List *_test.md files in cwd (recursive)"}),(0,e.jsx)(a,{cmd:"testmd status",args:"<path>",desc:"Print local meta.json for a test"}),(0,e.jsx)(a,{cmd:"testmd delete",args:"<path>",desc:"Remove output-<stem>/ and the source file"}),(0,e.jsx)(a,{cmd:"testmd export",args:"<path> --language <py|js>",desc:"Generate standalone Playwright code"})]}),(0,e.jsxs)(d,{title:"RUN FLAGS",children:[(0,e.jsx)(s,{long:"--max-steps",arg:"<n>",desc:"Max agent steps (default: 30)"}),(0,e.jsx)(s,{long:"--timeout",arg:"<sec>",desc:"Kill run after N seconds"}),(0,e.jsx)(s,{long:"--headless",desc:"No visible browser window"}),(0,e.jsx)(s,{long:"--mode",arg:"<action|testing>",desc:"Run mode (default: testing)"}),(0,e.jsx)(s,{long:"--name",arg:"<name>",desc:"Persist session under this name"}),(0,e.jsx)(s,{long:"--variables",arg:"<json>",desc:"Inline variables as JSON"}),(0,e.jsx)(s,{long:"--variables-file",arg:"<path>",desc:"Load variables from file"}),(0,e.jsx)(s,{long:"--session-context",arg:"<json>",desc:"Prior runs context JSON"}),(0,e.jsx)(s,{long:"--global-context",arg:"<file>",desc:"Override global context markdown"}),(0,e.jsx)(s,{long:"--local-context",arg:"<file>",desc:"Override local context markdown"}),(0,e.jsx)(s,{long:"--ws-endpoint",arg:"<url>",desc:"Remote browser (LambdaTest)"}),(0,e.jsx)(s,{long:"--cdp-endpoint",arg:"<url>",desc:"Connect to existing Chrome CDP"}),(0,e.jsx)(s,{long:"--task-skills",desc:"Domain-specific task skills (experimental)"}),(0,e.jsx)(s,{long:"--code-export",desc:"Generate code export after upload"}),(0,e.jsx)(s,{long:"--code-language",arg:"<lang>",desc:"Code export language: python | javascript"}),(0,e.jsx)(s,{long:"--skip-code-validation",desc:"Skip post-codegen validation"}),(0,e.jsx)(s,{long:"--username",arg:"<user>",desc:"Basic auth (skip OAuth)"}),(0,e.jsx)(s,{long:"--access-key",arg:"<key>",desc:"Basic auth access key"}),(0,e.jsx)(s,{long:"--env",arg:"<name>",desc:"Environment (prod or stage)"}),(0,e.jsx)(s,{long:"--agent",desc:"NDJSON output (no UI)",highlight:!0})]}),(0,e.jsxs)(d,{title:"EXAMPLES",children:[(0,e.jsx)(u,{label:"Inline objective",cmd:`${i} run "Search for laptop"`}),(0,e.jsx)(u,{label:"Replay a saved test",cmd:`${i} testmd run smoke_test.md`}),(0,e.jsx)(u,{label:"Variables",cmd:`${i} run "Login as {{user}}" --variables '{"user":{"value":"alice"}}'`}),(0,e.jsx)(u,{label:"Agent mode (NDJSON)",cmd:`${i} run "Add to cart" --agent | jq .status`})]}),(0,e.jsx)(d,{title:"TEST FILES",children:(0,e.jsxs)(n,{marginLeft:2,flexDirection:"column",children:[(0,e.jsxs)(o,{color:t.dim,children:[(0,e.jsx)(o,{color:t.orange,children:"*_test.md"})," \u2014 markdown test files with YAML frontmatter and ",(0,e.jsx)(o,{color:t.orange,children:"## "}),"step headings."]}),(0,e.jsxs)(o,{color:t.dim,children:["Run with ",(0,e.jsxs)(o,{color:t.orange,children:[i," testmd run path/to/foo_test.md"]}),". (`.md` paths are not accepted by `",i," run`.)"]}),(0,e.jsxs)(o,{color:t.dim,children:["Sessions you run in TUI auto-save to ",(0,e.jsx)(o,{color:t.orange,children:"<cwd>/.testmuai/tests/<name>_test.md"})," (testing mode prompts on exit)."]})]})}),(0,e.jsxs)(n,{flexDirection:"column",marginTop:0,paddingX:1,children:[(0,e.jsx)(o,{color:t.muted,children:"\u2500".repeat(Math.min(c-2,70))}),(0,e.jsxs)(n,{gap:3,children:[(0,e.jsxs)(n,{children:[(0,e.jsx)(o,{color:t.dim,children:"Docs "}),(0,e.jsx)(o,{color:t.orange,underline:!0,children:S})]}),(0,e.jsxs)(n,{children:[(0,e.jsx)(o,{color:t.dim,children:"Bugs "}),(0,e.jsx)(o,{color:t.orange,underline:!0,children:v})]})]})]}),(0,e.jsx)(o,{children:" "})]})}function d({title:l,children:r}){return(0,e.jsxs)(n,{flexDirection:"column",marginBottom:1,children:[(0,e.jsx)(n,{marginLeft:1,children:(0,e.jsx)(o,{bold:!0,color:t.dim,children:l})}),r]})}function g({cmd:l,desc:r,highlight:c}){return(0,e.jsxs)(n,{marginLeft:2,children:[(0,e.jsxs)(n,{width:40,children:[(0,e.jsx)(o,{color:t.dim,children:"$ "}),(0,e.jsx)(o,{color:c?t.orange:t.orange,children:l})]}),(0,e.jsx)(o,{color:t.dim,children:r})]})}function a({cmd:l,args:r,desc:c,highlight:m}){return(0,e.jsxs)(n,{marginLeft:2,children:[(0,e.jsx)(n,{width:16,children:(0,e.jsx)(o,{color:m?t.orange:t.green,bold:!0,children:l})}),(0,e.jsx)(n,{width:32,children:r?(0,e.jsx)(o,{color:t.dim,children:r}):null}),(0,e.jsx)(o,{color:t.dim,children:c})]})}function s({long:l,arg:r,desc:c,highlight:m}){return(0,e.jsxs)(n,{marginLeft:2,children:[(0,e.jsxs)(n,{width:30,children:[(0,e.jsx)(o,{color:m?t.orange:t.orange,children:l}),r&&(0,e.jsxs)(o,{color:t.dim,children:[" ",r]})]}),(0,e.jsx)(o,{color:t.dim,children:c})]})}function u({label:l,cmd:r}){return(0,e.jsxs)(n,{marginLeft:2,flexDirection:"column",children:[(0,e.jsxs)(o,{color:t.dim,children:["# ",l]}),(0,e.jsxs)(o,{color:t.orange,children:["$ ",r]})]})}export{k as HelpView};
@@ -1,2 +1,2 @@
1
1
  import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{a}from"./chunk-7CBWZLRS.js";import"./chunk-UHGECBEN.js";import"./chunk-3QWAABMG.js";import"./chunk-HCBYKLMW.js";import"./chunk-C44QQJR4.js";import"./chunk-6YGTRKDT.js";import"./chunk-UR6MHSHU.js";export{a as InfoBox};
2
+ import{a}from"./chunk-M23DF6UM.js";import"./chunk-IUECYFR6.js";import"./chunk-FS2B5IHO.js";import"./chunk-HCBYKLMW.js";import"./chunk-C44QQJR4.js";import"./chunk-6YGTRKDT.js";import"./chunk-UR6MHSHU.js";export{a as InfoBox};
@@ -1,2 +1,2 @@
1
1
  import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{a}from"./chunk-RD6G3CMN.js";import"./chunk-3QWAABMG.js";import"./chunk-HCBYKLMW.js";import"./chunk-C44QQJR4.js";import"./chunk-6YGTRKDT.js";import"./chunk-UR6MHSHU.js";export{a as LinksBox};
2
+ import{a}from"./chunk-JRBDKEHJ.js";import"./chunk-FS2B5IHO.js";import"./chunk-HCBYKLMW.js";import"./chunk-C44QQJR4.js";import"./chunk-6YGTRKDT.js";import"./chunk-UR6MHSHU.js";export{a as LinksBox};
@@ -1,2 +1,2 @@
1
1
  import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{a,b}from"./chunk-ELZIC2EH.js";import"./chunk-GNJBT6SS.js";import"./chunk-3QWAABMG.js";import"./chunk-HCBYKLMW.js";import"./chunk-C44QQJR4.js";import"./chunk-6YGTRKDT.js";import"./chunk-UR6MHSHU.js";export{b as ProfilesView,a as formatProfileLine};
2
+ import{a,b}from"./chunk-LCLMSRS3.js";import"./chunk-GAZK7QSI.js";import"./chunk-FS2B5IHO.js";import"./chunk-HCBYKLMW.js";import"./chunk-C44QQJR4.js";import"./chunk-6YGTRKDT.js";import"./chunk-UR6MHSHU.js";export{b as ProfilesView,a as formatProfileLine};
@@ -1,2 +1,2 @@
1
1
  import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{a,b}from"./chunk-4ZHU4DLD.js";import"./chunk-YCCUBQY4.js";import"./chunk-CZBHDBID.js";import"./chunk-LPUQ4HWQ.js";import"./chunk-NLCCBXXV.js";import"./chunk-S7JV4A3U.js";import"./chunk-RZ4F3BHX.js";import"./chunk-GNJBT6SS.js";import"./chunk-3QWAABMG.js";import"./chunk-HCBYKLMW.js";import"./chunk-C44QQJR4.js";import"./chunk-6YGTRKDT.js";import"./chunk-UR6MHSHU.js";export{b as ProjectPicker,a as formatProjectLine};
2
+ import{a,b}from"./chunk-CIJJJRAO.js";import"./chunk-YCCUBQY4.js";import"./chunk-2COEECXK.js";import"./chunk-LPUQ4HWQ.js";import"./chunk-NLCCBXXV.js";import"./chunk-6TJO4BQP.js";import"./chunk-RZ4F3BHX.js";import"./chunk-GAZK7QSI.js";import"./chunk-FS2B5IHO.js";import"./chunk-HCBYKLMW.js";import"./chunk-C44QQJR4.js";import"./chunk-6YGTRKDT.js";import"./chunk-UR6MHSHU.js";export{b as ProjectPicker,a as formatProjectLine};
@@ -1,2 +1,2 @@
1
1
  import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{a,b,c}from"./chunk-R7T6Z6QW.js";import"./chunk-S3DAAAE5.js";import"./chunk-7CBWZLRS.js";import"./chunk-UHGECBEN.js";import"./chunk-3QWAABMG.js";import"./chunk-HCBYKLMW.js";import"./chunk-C44QQJR4.js";import"./chunk-6YGTRKDT.js";import"./chunk-UR6MHSHU.js";export{a as SaveSessionPrompt,b as defaultSessionTimestamp,c as renderSavePrompt};
2
+ import{a,b,c}from"./chunk-MRKDRLID.js";import"./chunk-S3DAAAE5.js";import"./chunk-M23DF6UM.js";import"./chunk-IUECYFR6.js";import"./chunk-FS2B5IHO.js";import"./chunk-HCBYKLMW.js";import"./chunk-C44QQJR4.js";import"./chunk-6YGTRKDT.js";import"./chunk-UR6MHSHU.js";export{a as SaveSessionPrompt,b as defaultSessionTimestamp,c as renderSavePrompt};
@@ -0,0 +1,2 @@
1
+ import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
+ import{a}from"./chunk-QSOQ2JMW.js";import"./chunk-RSRBUJRW.js";import"./chunk-W4OWTRMO.js";import"./chunk-L5LI2JF4.js";import"./chunk-QIMR6EU3.js";import"./chunk-FPFOW6BS.js";import"./chunk-WAOCHXJ5.js";import"./chunk-CIJJJRAO.js";import"./chunk-RKAQBRNT.js";import"./chunk-YCCUBQY4.js";import"./chunk-2COEECXK.js";import"./chunk-LOIRZFV3.js";import"./chunk-LPUQ4HWQ.js";import"./chunk-NLCCBXXV.js";import"./chunk-VE3SUJMA.js";import"./chunk-MCYS4R5P.js";import"./chunk-JSCT5YQ6.js";import"./chunk-6TJO4BQP.js";import"./chunk-RZ4F3BHX.js";import"./chunk-GAZK7QSI.js";import"./chunk-FS2B5IHO.js";import"./chunk-HCBYKLMW.js";import"./chunk-C44QQJR4.js";import"./chunk-6YGTRKDT.js";import"./chunk-UR6MHSHU.js";export{a as SingleShotApp};
@@ -1,2 +1,2 @@
1
1
  import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{a,b,c,d}from"./chunk-TQGNNJX5.js";import"./chunk-7CBWZLRS.js";import"./chunk-UHGECBEN.js";import"./chunk-3QWAABMG.js";import"./chunk-HCBYKLMW.js";import"./chunk-C44QQJR4.js";import"./chunk-6YGTRKDT.js";import"./chunk-UR6MHSHU.js";export{d as AutoExitSummaryBox,c as SummaryBox,b as buildSummaryEvent,a as buildSummaryRendered};
2
+ import{a,b,c,d}from"./chunk-YJY3HPGV.js";import"./chunk-M23DF6UM.js";import"./chunk-IUECYFR6.js";import"./chunk-FS2B5IHO.js";import"./chunk-HCBYKLMW.js";import"./chunk-C44QQJR4.js";import"./chunk-6YGTRKDT.js";import"./chunk-UR6MHSHU.js";export{d as AutoExitSummaryBox,c as SummaryBox,b as buildSummaryEvent,a as buildSummaryRendered};
@@ -0,0 +1,2 @@
1
+ import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
+ import{h as a}from"./chunk-POFY6TC3.js";import"./chunk-QAS2SVT3.js";import"./chunk-H6SXCNLJ.js";import"./chunk-LOIRZFV3.js";import"./chunk-6TJO4BQP.js";import"./chunk-M23DF6UM.js";import"./chunk-IUECYFR6.js";import"./chunk-C6S4IEBC.js";import"./chunk-FS2B5IHO.js";import"./chunk-HCBYKLMW.js";import"./chunk-C44QQJR4.js";import"./chunk-6YGTRKDT.js";import"./chunk-UR6MHSHU.js";export{a as TestMdRunView};
@@ -1,2 +1,2 @@
1
1
  import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{a as b,b as r}from"./chunk-UHGECBEN.js";import{v as o}from"./chunk-3QWAABMG.js";import{a as p}from"./chunk-HCBYKLMW.js";import{a as i,b as l,j as s}from"./chunk-C44QQJR4.js";import{a as T}from"./chunk-6YGTRKDT.js";import{e as a}from"./chunk-UR6MHSHU.js";var f=a(T(),1);var e=a(p(),1);function V({profile:g,env:v,authenticated:n,authMethod:h,username:c,tokenStatus:t,expiresAt:d,serverStatus:u,detail:m}){let{exit:x}=s();return(0,f.useEffect)(()=>{let B=setTimeout(()=>x(),50);return()=>clearTimeout(B)},[x]),(0,e.jsx)(i,{flexDirection:"column",children:(0,e.jsx)(b,{title:"Identity",variant:n?"success":"warning",children:(0,e.jsxs)(i,{flexDirection:"column",paddingY:1,children:[(0,e.jsx)(i,{children:u==="rejected"?(0,e.jsx)(l,{color:o.red,bold:!0,children:"\u2717 Not authenticated"}):u==="unreachable"?(0,e.jsx)(l,{color:o.orange,bold:!0,children:"\u26A0 Couldn't verify"}):n?(0,e.jsx)(l,{color:o.green,bold:!0,children:"\u2713 Authenticated"}):(0,e.jsx)(l,{color:o.orange,bold:!0,children:"\u26A0 Not logged in"})}),(0,e.jsxs)(i,{flexDirection:"column",marginTop:1,children:[(0,e.jsx)(r,{label:"Profile",value:g}),(0,e.jsx)(r,{label:"Environment",value:v}),(0,e.jsx)(r,{label:"Method",value:h}),c&&(0,e.jsx)(r,{label:"User",value:c}),t&&(0,e.jsx)(r,{label:"Token",value:t,valueColor:t==="valid"?o.green:t==="expired"?o.red:o.dim}),d&&(0,e.jsx)(r,{label:"Expires",value:d}),m&&(0,e.jsx)(r,{label:"Detail",value:m})]})]})})})}export{V as WhoamiView};
2
+ import{a as b,b as r}from"./chunk-IUECYFR6.js";import{x as o}from"./chunk-FS2B5IHO.js";import{a as p}from"./chunk-HCBYKLMW.js";import{a as i,b as l,j as s}from"./chunk-C44QQJR4.js";import{a as T}from"./chunk-6YGTRKDT.js";import{e as a}from"./chunk-UR6MHSHU.js";var f=a(T(),1);var e=a(p(),1);function V({profile:g,env:v,authenticated:n,authMethod:h,username:c,tokenStatus:t,expiresAt:d,serverStatus:u,detail:m}){let{exit:x}=s();return(0,f.useEffect)(()=>{let B=setTimeout(()=>x(),50);return()=>clearTimeout(B)},[x]),(0,e.jsx)(i,{flexDirection:"column",children:(0,e.jsx)(b,{title:"Identity",variant:n?"success":"warning",children:(0,e.jsxs)(i,{flexDirection:"column",paddingY:1,children:[(0,e.jsx)(i,{children:u==="rejected"?(0,e.jsx)(l,{color:o.red,bold:!0,children:"\u2717 Not authenticated"}):u==="unreachable"?(0,e.jsx)(l,{color:o.orange,bold:!0,children:"\u26A0 Couldn't verify"}):n?(0,e.jsx)(l,{color:o.green,bold:!0,children:"\u2713 Authenticated"}):(0,e.jsx)(l,{color:o.orange,bold:!0,children:"\u26A0 Not logged in"})}),(0,e.jsxs)(i,{flexDirection:"column",marginTop:1,children:[(0,e.jsx)(r,{label:"Profile",value:g}),(0,e.jsx)(r,{label:"Environment",value:v}),(0,e.jsx)(r,{label:"Method",value:h}),c&&(0,e.jsx)(r,{label:"User",value:c}),t&&(0,e.jsx)(r,{label:"Token",value:t,valueColor:t==="valid"?o.green:t==="expired"?o.red:o.dim}),d&&(0,e.jsx)(r,{label:"Expires",value:d}),m&&(0,e.jsx)(r,{label:"Detail",value:m})]})]})})})}export{V as WhoamiView};
@@ -1,4 +1,4 @@
1
1
  import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{a as l}from"./chunk-RZ4F3BHX.js";import{c as i,f as c}from"./chunk-3QWAABMG.js";import"./chunk-UR6MHSHU.js";import{readFileSync as u,writeFileSync as g,mkdirSync as d}from"fs";import{join as f}from"path";var h=f(i,"changelog-cache.json"),p=3600*1e3;function y(){try{let e=JSON.parse(u(h,"utf-8"));if(Date.now()-e.cachedAt<p)return e}catch{}return null}function m(e){try{d(i,{recursive:!0}),g(h,JSON.stringify({entries:e,cachedAt:Date.now()}))}catch{}}async function A(e){try{let t=y();if(t){let r=t.entries;return e?.all?r:r.slice(0,5)}let n=new AbortController,o=setTimeout(()=>n.abort(),5e3),a=await l(`${c}?per_page=30`,{headers:{Accept:"application/vnd.github+json"},signal:n.signal});if(clearTimeout(o),!a.ok)return[];let s=(await a.json()).map(r=>({version:r.tag_name.replace(/^v/,""),date:r.published_at?r.published_at.slice(0,10):"",body:r.body??""}));return m(s),e?.all?s:s.slice(0,5)}catch{return[]}}function v(e){if(e.length===0)return"Could not fetch changelog. Visit https://github.com/LambdaTest/kane-cli/releases";let t=["kane-cli Changelog","\u2500".repeat(40),""];for(let n of e){if(t.push(`v${n.version} (${n.date})`),n.body){let o=n.body.split(`
2
+ import{a as l}from"./chunk-RZ4F3BHX.js";import{c as i,f as c}from"./chunk-FS2B5IHO.js";import"./chunk-UR6MHSHU.js";import{readFileSync as u,writeFileSync as g,mkdirSync as d}from"fs";import{join as f}from"path";var h=f(i,"changelog-cache.json"),p=3600*1e3;function y(){try{let e=JSON.parse(u(h,"utf-8"));if(Date.now()-e.cachedAt<p)return e}catch{}return null}function m(e){try{d(i,{recursive:!0}),g(h,JSON.stringify({entries:e,cachedAt:Date.now()}))}catch{}}async function A(e){try{let t=y();if(t){let r=t.entries;return e?.all?r:r.slice(0,5)}let n=new AbortController,o=setTimeout(()=>n.abort(),5e3),a=await l(`${c}?per_page=30`,{headers:{Accept:"application/vnd.github+json"},signal:n.signal});if(clearTimeout(o),!a.ok)return[];let s=(await a.json()).map(r=>({version:r.tag_name.replace(/^v/,""),date:r.published_at?r.published_at.slice(0,10):"",body:r.body??""}));return m(s),e?.all?s:s.slice(0,5)}catch{return[]}}function v(e){if(e.length===0)return"Could not fetch changelog. Visit https://github.com/LambdaTest/kane-cli/releases";let t=["kane-cli Changelog","\u2500".repeat(40),""];for(let n of e){if(t.push(`v${n.version} (${n.date})`),n.body){let o=n.body.split(`
3
3
  `).filter(a=>a.trim());for(let a of o)t.push(` ${a}`)}t.push("")}return t.join(`
4
4
  `)}export{A as fetchChangelog,v as formatChangelog};
@@ -1,2 +1,2 @@
1
1
  import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{a as R}from"./chunk-GNJBT6SS.js";import{v as r}from"./chunk-3QWAABMG.js";import{a as Y}from"./chunk-HCBYKLMW.js";import{a,b as i,i as X}from"./chunk-C44QQJR4.js";import{a as G}from"./chunk-6YGTRKDT.js";import{e as P}from"./chunk-UR6MHSHU.js";var u=P(G(),1);var e=P(Y(),1),f=5;function K(t,I){if(!I)return t;let c=I.toLowerCase();return t.filter(B=>B.label.toLowerCase().includes(c))}function J(t){let{title:I,items:c,loading:B=!1,loadingText:F,error:L=null,itemNoun:T="items",onSelect:H,onCancel:E,defaultActiveId:w,onTab:y,extraHint:N}=t,[x,d]=(0,u.useState)(0),[S,g]=(0,u.useState)(0),[s,A]=(0,u.useState)(""),[C,h]=(0,u.useState)(null);(0,u.useEffect)(()=>{if(c.length===0)return;if(t.preserveSelectionById&&C!==null){let n=c.findIndex(o=>o.id===C);if(n>=0){g(Math.floor(n/f)),d(n%f);return}}let l=w?c.findIndex(n=>n.id===w):c.findIndex(n=>n.isActive);l>=0?(g(Math.floor(l/f)),d(l%f),t.preserveSelectionById&&h(c[l].id)):t.preserveSelectionById&&(g(0),d(0),h(c[0]?.id??null))},[c,w,t.preserveSelectionById,C]),(0,u.useEffect)(()=>{if(!t.onSearch)return;let l=setTimeout(()=>t.onSearch(s),t.searchDebounceMs??250);return()=>clearTimeout(l)},[s,t.onSearch,t.searchDebounceMs]);let m=t.onSearch?c:K(c,s),M=S*f,p=Math.min(M+f,m.length),D=Math.ceil(m.length/f),O=p-M,v=m.slice(M,p);return X((l,n)=>{if(L){n.escape&&E();return}if(n.escape){s?(A(""),d(0),g(0)):E();return}if(n.tab&&y){y();return}if(n.upArrow){if(x>0){let o=x-1;d(o),t.preserveSelectionById&&h(v[o]?.id??null)}else if(S>0){let o=S-1,b=f-1;g(o),d(b),t.preserveSelectionById&&h(m[o*f+b]?.id??null)}return}if(n.downArrow){if(x<O-1){let o=x+1;d(o),t.preserveSelectionById&&h(v[o]?.id??null)}else if(S<D-1){let o=S+1,b=0;g(o),d(b),t.preserveSelectionById&&h(m[o*f+b]?.id??null)}return}if(n.return&&v[x]){H(v[x]);return}if(n.backspace||n.delete){A(o=>o.slice(0,-1)),d(0),g(0);return}l&&!n.ctrl&&!n.meta&&(A(o=>o+l),d(0),g(0))},{isActive:!B}),B?(0,e.jsxs)(a,{flexDirection:"column",borderStyle:"round",borderColor:r.orange,paddingX:2,paddingY:1,children:[(0,e.jsx)(i,{color:r.orange,bold:!0,children:I}),(0,e.jsx)(a,{marginTop:1,children:(0,e.jsx)(i,{color:r.secondary,children:F??`Loading ${T}\u2026`})})]}):L?(0,e.jsxs)(a,{flexDirection:"column",borderStyle:"round",borderColor:r.red,paddingX:2,paddingY:1,children:[(0,e.jsx)(i,{color:r.red,bold:!0,children:I}),(0,e.jsx)(a,{marginTop:1,children:(0,e.jsx)(i,{color:r.red,children:L})}),(0,e.jsx)(R,{bindings:[]})]}):(0,e.jsxs)(a,{flexDirection:"column",borderStyle:"round",borderColor:r.orange,paddingX:2,paddingY:1,children:[(0,e.jsxs)(a,{children:[(0,e.jsx)(i,{color:r.orange,bold:!0,children:I}),(0,e.jsxs)(i,{color:r.dim,children:[" (",m.length,!t.onSearch&&s?`/${c.length}`:""," ",T,t.loadingMore?" \xB7 loading more":"",")"]})]}),(0,e.jsxs)(a,{marginTop:1,children:[(0,e.jsx)(i,{color:r.secondary,children:s?"filter: ":""}),s?(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(i,{children:s}),(0,e.jsx)(i,{inverse:!0,children:" "})]}):(0,e.jsxs)(e.Fragment,{children:[(0,e.jsxs)(i,{color:r.dim,children:["Search ",T,"\u2026"]}),(0,e.jsx)(i,{inverse:!0,children:" "})]})]}),(0,e.jsx)(a,{flexDirection:"column",marginTop:1,children:t.searching?(0,e.jsxs)(i,{color:r.secondary,children:["Searching ",T,"\u2026"]}):m.length===0?(0,e.jsxs)(i,{color:r.dim,children:["No ",T,' match "',s,'"']}):v.map((l,n)=>{let o=n===x,b=o?"\u276F ":" ",$=l.isActive?r.green:o?r.orange:void 0;return(0,e.jsxs)(i,{color:$,children:[b,l.label,l.isActive?" \u25CF selected":""]},l.id)})}),!t.searching&&D>1&&(0,e.jsx)(a,{marginTop:1,children:(0,e.jsxs)(i,{color:r.dim,children:["Page ",S+1,"/",D]})}),t.footer&&(0,e.jsx)(a,{marginTop:1,flexDirection:"column",children:t.footer}),(0,e.jsx)(R,{bindings:[{keys:"\u2191\u2193",label:"navigate"},{keys:"type",label:"to search"},{keys:"\u21B5",label:"select"},...y&&N?[{keys:"tab",label:N}]:[]],escBackLabel:s?"clear":"back to chat"})]})}export{J as a};
2
+ import{a as R}from"./chunk-GAZK7QSI.js";import{x as r}from"./chunk-FS2B5IHO.js";import{a as Y}from"./chunk-HCBYKLMW.js";import{a,b as i,i as X}from"./chunk-C44QQJR4.js";import{a as G}from"./chunk-6YGTRKDT.js";import{e as P}from"./chunk-UR6MHSHU.js";var u=P(G(),1);var e=P(Y(),1),f=5;function K(t,I){if(!I)return t;let c=I.toLowerCase();return t.filter(B=>B.label.toLowerCase().includes(c))}function J(t){let{title:I,items:c,loading:B=!1,loadingText:F,error:L=null,itemNoun:T="items",onSelect:H,onCancel:E,defaultActiveId:w,onTab:y,extraHint:N}=t,[x,d]=(0,u.useState)(0),[S,g]=(0,u.useState)(0),[s,A]=(0,u.useState)(""),[C,h]=(0,u.useState)(null);(0,u.useEffect)(()=>{if(c.length===0)return;if(t.preserveSelectionById&&C!==null){let n=c.findIndex(o=>o.id===C);if(n>=0){g(Math.floor(n/f)),d(n%f);return}}let l=w?c.findIndex(n=>n.id===w):c.findIndex(n=>n.isActive);l>=0?(g(Math.floor(l/f)),d(l%f),t.preserveSelectionById&&h(c[l].id)):t.preserveSelectionById&&(g(0),d(0),h(c[0]?.id??null))},[c,w,t.preserveSelectionById,C]),(0,u.useEffect)(()=>{if(!t.onSearch)return;let l=setTimeout(()=>t.onSearch(s),t.searchDebounceMs??250);return()=>clearTimeout(l)},[s,t.onSearch,t.searchDebounceMs]);let m=t.onSearch?c:K(c,s),M=S*f,p=Math.min(M+f,m.length),D=Math.ceil(m.length/f),O=p-M,v=m.slice(M,p);return X((l,n)=>{if(L){n.escape&&E();return}if(n.escape){s?(A(""),d(0),g(0)):E();return}if(n.tab&&y){y();return}if(n.upArrow){if(x>0){let o=x-1;d(o),t.preserveSelectionById&&h(v[o]?.id??null)}else if(S>0){let o=S-1,b=f-1;g(o),d(b),t.preserveSelectionById&&h(m[o*f+b]?.id??null)}return}if(n.downArrow){if(x<O-1){let o=x+1;d(o),t.preserveSelectionById&&h(v[o]?.id??null)}else if(S<D-1){let o=S+1,b=0;g(o),d(b),t.preserveSelectionById&&h(m[o*f+b]?.id??null)}return}if(n.return&&v[x]){H(v[x]);return}if(n.backspace||n.delete){A(o=>o.slice(0,-1)),d(0),g(0);return}l&&!n.ctrl&&!n.meta&&(A(o=>o+l),d(0),g(0))},{isActive:!B}),B?(0,e.jsxs)(a,{flexDirection:"column",borderStyle:"round",borderColor:r.orange,paddingX:2,paddingY:1,children:[(0,e.jsx)(i,{color:r.orange,bold:!0,children:I}),(0,e.jsx)(a,{marginTop:1,children:(0,e.jsx)(i,{color:r.secondary,children:F??`Loading ${T}\u2026`})})]}):L?(0,e.jsxs)(a,{flexDirection:"column",borderStyle:"round",borderColor:r.red,paddingX:2,paddingY:1,children:[(0,e.jsx)(i,{color:r.red,bold:!0,children:I}),(0,e.jsx)(a,{marginTop:1,children:(0,e.jsx)(i,{color:r.red,children:L})}),(0,e.jsx)(R,{bindings:[]})]}):(0,e.jsxs)(a,{flexDirection:"column",borderStyle:"round",borderColor:r.orange,paddingX:2,paddingY:1,children:[(0,e.jsxs)(a,{children:[(0,e.jsx)(i,{color:r.orange,bold:!0,children:I}),(0,e.jsxs)(i,{color:r.dim,children:[" (",m.length,!t.onSearch&&s?`/${c.length}`:""," ",T,t.loadingMore?" \xB7 loading more":"",")"]})]}),(0,e.jsxs)(a,{marginTop:1,children:[(0,e.jsx)(i,{color:r.secondary,children:s?"filter: ":""}),s?(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(i,{children:s}),(0,e.jsx)(i,{inverse:!0,children:" "})]}):(0,e.jsxs)(e.Fragment,{children:[(0,e.jsxs)(i,{color:r.dim,children:["Search ",T,"\u2026"]}),(0,e.jsx)(i,{inverse:!0,children:" "})]})]}),(0,e.jsx)(a,{flexDirection:"column",marginTop:1,children:t.searching?(0,e.jsxs)(i,{color:r.secondary,children:["Searching ",T,"\u2026"]}):m.length===0?(0,e.jsxs)(i,{color:r.dim,children:["No ",T,' match "',s,'"']}):v.map((l,n)=>{let o=n===x,b=o?"\u276F ":" ",$=l.isActive?r.green:o?r.orange:void 0;return(0,e.jsxs)(i,{color:$,children:[b,l.label,l.isActive?" \u25CF selected":""]},l.id)})}),!t.searching&&D>1&&(0,e.jsx)(a,{marginTop:1,children:(0,e.jsxs)(i,{color:r.dim,children:["Page ",S+1,"/",D]})}),t.footer&&(0,e.jsx)(a,{marginTop:1,flexDirection:"column",children:t.footer}),(0,e.jsx)(R,{bindings:[{keys:"\u2191\u2193",label:"navigate"},{keys:"type",label:"to search"},{keys:"\u21B5",label:"select"},...y&&N?[{keys:"tab",label:N}]:[]],escBackLabel:s?"clear":"back to chat"})]})}export{J as a};
@@ -1,7 +1,7 @@
1
1
  import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{a as k}from"./chunk-FPFOW6BS.js";import{g as a}from"./chunk-LOIRZFV3.js";import{a as m}from"./chunk-LPUQ4HWQ.js";import{a as h}from"./chunk-PF7PBYCJ.js";import{a as y}from"./chunk-S7JV4A3U.js";var $=10,u=200,N=1e4,S=1e6;function T(t,e,r="streaming"){let n=r==="full-fetch"?S:N,o=$,i=0;if(t!==void 0){let s=Number(t);if(!Number.isInteger(s)||s<1||s>u)return{error:`--limit must be an integer in [1, ${u}] (got "${t}")`};o=s}if(e!==void 0){let s=Number(e);if(!Number.isInteger(s)||s<0||s>n)return{error:`--offset must be an integer in [0, ${n}] (got "${e}")`};i=s}return{limit:o,offset:i}}function C(t,e){if(!e)return t;let r=e.toLowerCase();return t.filter(n=>n.name.toLowerCase().includes(r))}function j(t,{limit:e,offset:r}){let n=t.slice(r,r+e),o=t.length>r+e;return{slice:n,hasMore:o}}function v(t,e,r=n=>process.stdout.write(`${n}
2
+ import{a as k}from"./chunk-FPFOW6BS.js";import{g as a}from"./chunk-LOIRZFV3.js";import{a as m}from"./chunk-LPUQ4HWQ.js";import{a as h}from"./chunk-MCYS4R5P.js";import{a as y}from"./chunk-6TJO4BQP.js";var $=10,u=200,N=1e4,S=1e6;function T(t,e,r="streaming"){let n=r==="full-fetch"?S:N,o=$,i=0;if(t!==void 0){let s=Number(t);if(!Number.isInteger(s)||s<1||s>u)return{error:`--limit must be an integer in [1, ${u}] (got "${t}")`};o=s}if(e!==void 0){let s=Number(e);if(!Number.isInteger(s)||s<0||s>n)return{error:`--offset must be an integer in [0, ${n}] (got "${e}")`};i=s}return{limit:o,offset:i}}function C(t,e){if(!e)return t;let r=e.toLowerCase();return t.filter(n=>n.name.toLowerCase().includes(r))}function j(t,{limit:e,offset:r}){let n=t.slice(r,r+e),o=t.length>r+e;return{slice:n,hasMore:o}}function v(t,e,r=n=>process.stdout.write(`${n}
3
3
  `)){for(let n of t)r(JSON.stringify(n));r(JSON.stringify({_meta:"page",limit:e.limit,offset:e.offset,returned:t.length,has_more:e.has_more}))}function b(t,e,r=n=>process.stdout.write(`${n}
4
- `)){if(t.length===0){r("(no results)");return}let n=Math.max(2,...t.map(s=>s.id.length)),o=`${"ID".padEnd(n)} NAME`;r(o),r(`${"-".repeat(n)} ----`);for(let s of t)r(`${s.id.padEnd(n)} ${s.name}`);r("");let i=e.offset+t.length;if(e.hasMore){let s=e.totalIsLowerBound?`${e.total}+`:`${e.total}`;r(`${i} of ${s} \u2014 next: --offset ${e.offset+e.limit}`)}else r(`${t.length} shown (${e.total} total)`)}async function B(t,e,r){if(r.username&&r.accessKey)return{ok:!0,creds:{username:r.username,access_key:r.accessKey}};let n=new h,o=n.loadBasicAuth(t,e);if(o)return{ok:!0,creds:{username:o.username,access_key:o.access_key}};let i=n.loadCredentials(t,e);if(!i)return{ok:!1,reason:"no_credentials"};let s=i.access_token;try{let{refreshOAuthToken:d}=await import("./token-refresh-4QLWR5ZI.js"),w=await d({creds:n,profile:t,env:e,credentials:i});w&&(s=w.accessToken)}catch(d){return{ok:!1,reason:"refresh_failed",detail:d instanceof Error?d.message:String(d)}}let c=y(e),f=await new k(c.controllerBaseUrl,async()=>s,null).resolve();return f?{ok:!0,creds:{username:f.username,access_key:f.access_key}}:{ok:!1,reason:"exchange_failed"}}function E(t,e,r){switch(r.reason){case"no_credentials":return{message:`error: no credentials for profile "${t}" [${e}]. Run \`kane-cli login\` or pass --username/--access-key.
4
+ `)){if(t.length===0){r("(no results)");return}let n=Math.max(2,...t.map(s=>s.id.length)),o=`${"ID".padEnd(n)} NAME`;r(o),r(`${"-".repeat(n)} ----`);for(let s of t)r(`${s.id.padEnd(n)} ${s.name}`);r("");let i=e.offset+t.length;if(e.hasMore){let s=e.totalIsLowerBound?`${e.total}+`:`${e.total}`;r(`${i} of ${s} \u2014 next: --offset ${e.offset+e.limit}`)}else r(`${t.length} shown (${e.total} total)`)}async function B(t,e,r){if(r.username&&r.accessKey)return{ok:!0,creds:{username:r.username,access_key:r.accessKey}};let n=new h,o=n.loadBasicAuth(t,e);if(o)return{ok:!0,creds:{username:o.username,access_key:o.access_key}};let i=n.loadCredentials(t,e);if(!i)return{ok:!1,reason:"no_credentials"};let s=i.access_token;try{let{refreshOAuthToken:d}=await import("./token-refresh-YTRMAHED.js"),w=await d({creds:n,profile:t,env:e,credentials:i});w&&(s=w.accessToken)}catch(d){return{ok:!1,reason:"refresh_failed",detail:d instanceof Error?d.message:String(d)}}let c=y(e),f=await new k(c.controllerBaseUrl,async()=>s,null).resolve();return f?{ok:!0,creds:{username:f.username,access_key:f.access_key}}:{ok:!1,reason:"exchange_failed"}}function E(t,e,r){switch(r.reason){case"no_credentials":return{message:`error: no credentials for profile "${t}" [${e}]. Run \`kane-cli login\` or pass --username/--access-key.
5
5
  `,exitCode:2};case"refresh_failed":return{message:`error: OAuth token refresh failed for profile "${t}" [${e}]${r.detail?`: ${r.detail}`:""}. Run \`kane-cli login\` to re-auth.
6
6
  `,exitCode:2};case"exchange_failed":return{message:`error: TMS credential exchange failed for profile "${t}" [${e}]. Token may be revoked \u2014 try \`kane-cli login\`; if the problem persists, TMS may be down.
7
7
  `,exitCode:2}}}function O(t){return{id:t.project_id,name:t.name}}function M(t){return{id:t.id,name:t.name}}async function P(t,e,r,n){let o=r+n+1,i=[],s=!0;for await(let c of t.listProjectsStream({name:e})){if(i.push(...c.projects),c.done){s=!0;break}if(i.length>=o){s=!1;break}}return{items:i,doneStreaming:s}}function g(t){return!!t.agent||!process.stdin.isTTY||!process.stdout.isTTY}function _(t,e=r=>process.stdout.write(`${r}
@@ -1,2 +1,2 @@
1
1
  import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{a as f}from"./chunk-FPFOW6BS.js";import{a as h}from"./chunk-Y6IUJZMV.js";import{a as d}from"./chunk-S7JV4A3U.js";var o=class extends Error{constructor(a,l){super(a);this.code=l;this.name="AuthError"}};async function k(c){let{creds:i,env:a,usernameFlag:l,accessKeyFlag:g,log:t}=c,e=null,u=null;if(l&&g)e={username:l,access_key:g},t("info","AUTH_RESOLVE_FLAGS","Auth resolved via CLI flags",{username:l});else{let r=i.resolveAuth();r?.method==="basic"&&(e={username:r.username,access_key:r.access_key},t("info","AUTH_RESOLVE_CONFIG","Auth resolved via config",{username:r.username}))}if(!e){let{credentials:r,profile:E}=i.getActiveCredentials();if(!r)throw new o("Not authenticated \u2014 no credentials found","not_authenticated");if(u=r.access_token,r.expires_at-Date.now()/1e3<300)try{let n=await h({creds:i,profile:E,env:a,credentials:r});n&&(u=n.accessToken,t("info","AUTH_TOKEN_REFRESHED","OAuth token refreshed"))}catch(n){let m=n instanceof Error?n.message:String(n);throw t("error","TOKEN_REFRESH_FAILED","Token refresh failed",{error:m}),new o(`Token refresh failed: ${m}`,"refresh_failed")}}let v=d(a),b=async()=>u,y=e?{username:e.username,access_key:e.access_key}:null,p=new f(v.controllerBaseUrl,b,y,t),s=await p.resolve();return s&&!e&&(e={username:s.username,access_key:s.access_key},t("info","AUTH_RESOLVE_CONTROLLER","Auth resolved via controller",{username:s.username})),{basicAuth:e,token:u,resolver:p,resolvedCreds:s}}export{o as a,k as b};
2
+ import{a as f}from"./chunk-FPFOW6BS.js";import{a as h}from"./chunk-WUY26ICP.js";import{a as d}from"./chunk-6TJO4BQP.js";var o=class extends Error{constructor(a,l){super(a);this.code=l;this.name="AuthError"}};async function k(c){let{creds:i,env:a,usernameFlag:l,accessKeyFlag:g,log:t}=c,e=null,u=null;if(l&&g)e={username:l,access_key:g},t("info","AUTH_RESOLVE_FLAGS","Auth resolved via CLI flags",{username:l});else{let r=i.resolveAuth();r?.method==="basic"&&(e={username:r.username,access_key:r.access_key},t("info","AUTH_RESOLVE_CONFIG","Auth resolved via config",{username:r.username}))}if(!e){let{credentials:r,profile:E}=i.getActiveCredentials();if(!r)throw new o("Not authenticated \u2014 no credentials found","not_authenticated");if(u=r.access_token,r.expires_at-Date.now()/1e3<300)try{let n=await h({creds:i,profile:E,env:a,credentials:r});n&&(u=n.accessToken,t("info","AUTH_TOKEN_REFRESHED","OAuth token refreshed"))}catch(n){let m=n instanceof Error?n.message:String(n);throw t("error","TOKEN_REFRESH_FAILED","Token refresh failed",{error:m}),new o(`Token refresh failed: ${m}`,"refresh_failed")}}let v=d(a),b=async()=>u,y=e?{username:e.username,access_key:e.access_key}:null,p=new f(v.controllerBaseUrl,b,y,t),s=await p.resolve();return s&&!e&&(e={username:s.username,access_key:s.access_key},t("info","AUTH_RESOLVE_CONTROLLER","Auth resolved via controller",{username:s.username})),{basicAuth:e,token:u,resolver:p,resolvedCreds:s}}export{o as a,k as b};
@@ -1,5 +1,5 @@
1
1
  import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{a as m}from"./chunk-LPUQ4HWQ.js";import{b as f,c as j}from"./chunk-VE3SUJMA.js";import{a as g}from"./chunk-S7JV4A3U.js";var _="KaneAI Generated",E="Untitled";async function p(e){let r=e.config.load(),d=new m(g(e.env).tmsBaseUrl,e.tmsCreds.username,e.tmsCreds.access_key),l=e.projectName??_,o=e.folderName??E,t=r.project_id??null,s=r.project_name??null;if(!t){let a=(await d.listProjects()).find(n=>n.name===l);if(a)t=a.project_id,s=a.name,e.log("info","ENSURE_PROJECT_FOUND","Found default project",{project_id:t,name:s});else{let n=await d.createProject(l);t=n.id,s=n.name,e.log("info","ENSURE_PROJECT_CREATED","Created default project",{project_id:t,name:s})}f(e.creds,e.config,e.profile,e.env,{projectId:t,projectName:s})}let c=r.folder_id??null,i=r.folder_name??null,u=!r.project_id;if(!c||u){let a=(await d.listFolders(t)).find(n=>n.name===o);if(a)c=a.id,i=a.name,e.log("info","ENSURE_FOLDER_FOUND","Found default folder",{folder_id:c,name:i});else{let n=await d.createFolder(t,o);c=n.id,i=n.name,e.log("info","ENSURE_FOLDER_CREATED","Created default folder",{folder_id:c,name:i})}f(e.creds,e.config,e.profile,e.env,{folderId:c,folderName:i})}return{projectId:t,projectName:s??l,folderId:c,folderName:i??o}}function N(e,r,d){let l=e.loadProfileConfig(r,d)??{};return{projectId:l.project_id??null,folderId:l.folder_id??null}}function A(e,r){return e.projectId===null||e.folderId===null||r===null?"needs-picker":r.project==="ok"&&r.folder==="ok"?"ok":r.project==="error"&&r.folder==="error"?"ok-tms-degraded":"needs-picker"}var k=(e,r)=>`error: profile "${e}" (${r}) has no project/folder configured AND no TMS credentials were available to auto-configure one.
2
+ import{a as m}from"./chunk-LPUQ4HWQ.js";import{b as f,c as j}from"./chunk-VE3SUJMA.js";import{a as g}from"./chunk-6TJO4BQP.js";var _="KaneAI Generated",E="Untitled";async function p(e){let r=e.config.load(),d=new m(g(e.env).tmsBaseUrl,e.tmsCreds.username,e.tmsCreds.access_key),l=e.projectName??_,o=e.folderName??E,t=r.project_id??null,s=r.project_name??null;if(!t){let a=(await d.listProjects()).find(n=>n.name===l);if(a)t=a.project_id,s=a.name,e.log("info","ENSURE_PROJECT_FOUND","Found default project",{project_id:t,name:s});else{let n=await d.createProject(l);t=n.id,s=n.name,e.log("info","ENSURE_PROJECT_CREATED","Created default project",{project_id:t,name:s})}f(e.creds,e.config,e.profile,e.env,{projectId:t,projectName:s})}let c=r.folder_id??null,i=r.folder_name??null,u=!r.project_id;if(!c||u){let a=(await d.listFolders(t)).find(n=>n.name===o);if(a)c=a.id,i=a.name,e.log("info","ENSURE_FOLDER_FOUND","Found default folder",{folder_id:c,name:i});else{let n=await d.createFolder(t,o);c=n.id,i=n.name,e.log("info","ENSURE_FOLDER_CREATED","Created default folder",{folder_id:c,name:i})}f(e.creds,e.config,e.profile,e.env,{folderId:c,folderName:i})}return{projectId:t,projectName:s??l,folderId:c,folderName:i??o}}function N(e,r,d){let l=e.loadProfileConfig(r,d)??{};return{projectId:l.project_id??null,folderId:l.folder_id??null}}function A(e,r){return e.projectId===null||e.folderId===null||r===null?"needs-picker":r.project==="ok"&&r.folder==="ok"?"ok":r.project==="error"&&r.folder==="error"?"ok-tms-degraded":"needs-picker"}var k=(e,r)=>`error: profile "${e}" (${r}) has no project/folder configured AND no TMS credentials were available to auto-configure one.
3
3
 
4
4
  discover IDs:
5
5
  kane-cli projects list --search "<keyword>" --limit 10
@@ -1,2 +1,2 @@
1
1
  import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{u as s}from"./chunk-3QWAABMG.js";function n(r="prod"){let e=s[r];return r!=="stage"?e:{authBaseUrl:process.env.KANE_STAGE_AUTH_URL??e.authBaseUrl,consentUrl:process.env.KANE_STAGE_CONSENT_URL??e.consentUrl,controllerBaseUrl:process.env.TESTMUAI_BASE_URL??e.controllerBaseUrl,tmsBaseUrl:process.env.KANE_STAGE_TMS_URL??e.tmsBaseUrl,testGeneratorBaseUrl:process.env.KANE_STAGE_TCG_URL??e.testGeneratorBaseUrl,secretsBaseUrl:process.env.KANE_STAGE_SECRETS_URL??e.secretsBaseUrl,testManagerUiUrl:process.env.KANE_STAGE_TEST_MANAGER_UI_URL??e.testManagerUiUrl,shareApiBaseUrl:process.env.KANE_STAGE_SHARE_API_URL??e.shareApiBaseUrl,v16ServerHost:process.env.KANE_STAGE_V16_SERVER_HOST??e.v16ServerHost}}export{n as a};
2
+ import{w as s}from"./chunk-FS2B5IHO.js";function n(r="prod"){let e=s[r];return r!=="stage"?e:{authBaseUrl:process.env.KANE_STAGE_AUTH_URL??e.authBaseUrl,consentUrl:process.env.KANE_STAGE_CONSENT_URL??e.consentUrl,controllerBaseUrl:process.env.TESTMUAI_BASE_URL??e.controllerBaseUrl,tmsBaseUrl:process.env.KANE_STAGE_TMS_URL??e.tmsBaseUrl,testGeneratorBaseUrl:process.env.KANE_STAGE_TCG_URL??e.testGeneratorBaseUrl,secretsBaseUrl:process.env.KANE_STAGE_SECRETS_URL??e.secretsBaseUrl,testManagerUiUrl:process.env.KANE_STAGE_TEST_MANAGER_UI_URL??e.testManagerUiUrl,shareApiBaseUrl:process.env.KANE_STAGE_SHARE_API_URL??e.shareApiBaseUrl,v16ServerHost:process.env.KANE_STAGE_V16_SERVER_HOST??e.v16ServerHost}}export{n as a};
@@ -1,2 +1,2 @@
1
1
  import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{a as b}from"./chunk-GNJBT6SS.js";import{m as d,v as o}from"./chunk-3QWAABMG.js";import{a as L}from"./chunk-HCBYKLMW.js";import{a as u,b as c,i as A}from"./chunk-C44QQJR4.js";import{a as D}from"./chunk-6YGTRKDT.js";import{e as h}from"./chunk-UR6MHSHU.js";var x=h(D(),1);import{readdirSync as N,mkdirSync as B,statSync as k}from"fs";import{join as P}from"path";var r=h(L(),1);function O(n){try{return N(n).filter(l=>{try{return k(P(n,l)).isDirectory()}catch{return!1}})}catch{return[]}}function E(n,l,f,v){return{name:n,path:l,label:n,isActive:v}}function H({currentPath:n,onSelect:l,onCancel:f}){let s=O(d).map(i=>{let e=P(d,i);return E(i,e,n,e===n)}),p=!n,R=s.length+2,[a,C]=(0,x.useState)(()=>{if(p)return 0;let i=s.findIndex(e=>e.isActive);return i>=0?i+1:0}),[T,I]=(0,x.useState)(!1),[S,g]=(0,x.useState)("");return A((i,e)=>{if(T){if(e.escape){I(!1),g("");return}if(e.return){let t=S.trim();if(t){let m=P(d,t);B(m,{recursive:!0}),l(m),f()}return}if(e.backspace||e.delete){g(t=>t.slice(0,-1));return}i&&!e.ctrl&&!e.meta&&g(t=>t+i);return}if(e.escape){f();return}if(e.upArrow){C(t=>Math.max(0,t-1));return}if(e.downArrow){C(t=>Math.min(R-1,t+1));return}if(e.return){if(a===0){p||l(""),f();return}if(a===s.length+1){B(d,{recursive:!0}),I(!0),g("");return}let t=s[a-1];t&&!t.isActive&&l(t.path),f();return}}),T?(0,r.jsxs)(u,{flexDirection:"column",borderStyle:"round",borderColor:o.orange,paddingX:2,paddingY:1,children:[(0,r.jsx)(c,{color:o.orange,bold:!0,children:"Chrome Profile \u203A New"}),(0,r.jsxs)(u,{marginTop:1,children:[(0,r.jsx)(c,{color:o.secondary,children:"Name: "}),(0,r.jsx)(c,{children:S}),(0,r.jsx)(c,{color:o.dim,children:"\u2588"})]}),(0,r.jsx)(b,{bindings:[{keys:"\u21B5",label:"create"}],escBackLabel:"back"})]}):(0,r.jsxs)(u,{flexDirection:"column",borderStyle:"round",borderColor:o.orange,paddingX:2,paddingY:1,children:[(0,r.jsx)(c,{color:o.orange,bold:!0,children:"Chrome Profile"}),(0,r.jsxs)(u,{flexDirection:"column",marginTop:1,children:[(0,r.jsxs)(c,{color:p?o.green:a===0?o.orange:o.dim,children:[a===0?"\u276F ":" ","Use temporary (no profile)",p?" \u25CF active":""]}),s.map((i,e)=>{let m=e+1===a,w=m?"\u276F ":" ",y=i.isActive?o.green:m?o.orange:void 0;return(0,r.jsxs)(c,{color:y,children:[w,i.label,i.isActive?" \u25CF active":""]},i.name)}),(0,r.jsxs)(c,{color:a===s.length+1?o.orange:o.dim,children:[a===s.length+1?"\u276F ":" ","+ Create new"]})]}),(0,r.jsx)(b,{bindings:[{keys:"\u2191\u2193",label:"navigate"},{keys:"\u21B5",label:"select"}],escBackLabel:"back"})]})}export{O as a,E as b,H as c};
2
+ import{a as b}from"./chunk-GAZK7QSI.js";import{m as d,x as o}from"./chunk-FS2B5IHO.js";import{a as L}from"./chunk-HCBYKLMW.js";import{a as u,b as c,i as A}from"./chunk-C44QQJR4.js";import{a as D}from"./chunk-6YGTRKDT.js";import{e as h}from"./chunk-UR6MHSHU.js";var x=h(D(),1);import{readdirSync as N,mkdirSync as B,statSync as k}from"fs";import{join as P}from"path";var r=h(L(),1);function O(n){try{return N(n).filter(l=>{try{return k(P(n,l)).isDirectory()}catch{return!1}})}catch{return[]}}function E(n,l,f,v){return{name:n,path:l,label:n,isActive:v}}function H({currentPath:n,onSelect:l,onCancel:f}){let s=O(d).map(i=>{let e=P(d,i);return E(i,e,n,e===n)}),p=!n,R=s.length+2,[a,C]=(0,x.useState)(()=>{if(p)return 0;let i=s.findIndex(e=>e.isActive);return i>=0?i+1:0}),[T,I]=(0,x.useState)(!1),[S,g]=(0,x.useState)("");return A((i,e)=>{if(T){if(e.escape){I(!1),g("");return}if(e.return){let t=S.trim();if(t){let m=P(d,t);B(m,{recursive:!0}),l(m),f()}return}if(e.backspace||e.delete){g(t=>t.slice(0,-1));return}i&&!e.ctrl&&!e.meta&&g(t=>t+i);return}if(e.escape){f();return}if(e.upArrow){C(t=>Math.max(0,t-1));return}if(e.downArrow){C(t=>Math.min(R-1,t+1));return}if(e.return){if(a===0){p||l(""),f();return}if(a===s.length+1){B(d,{recursive:!0}),I(!0),g("");return}let t=s[a-1];t&&!t.isActive&&l(t.path),f();return}}),T?(0,r.jsxs)(u,{flexDirection:"column",borderStyle:"round",borderColor:o.orange,paddingX:2,paddingY:1,children:[(0,r.jsx)(c,{color:o.orange,bold:!0,children:"Chrome Profile \u203A New"}),(0,r.jsxs)(u,{marginTop:1,children:[(0,r.jsx)(c,{color:o.secondary,children:"Name: "}),(0,r.jsx)(c,{children:S}),(0,r.jsx)(c,{color:o.dim,children:"\u2588"})]}),(0,r.jsx)(b,{bindings:[{keys:"\u21B5",label:"create"}],escBackLabel:"back"})]}):(0,r.jsxs)(u,{flexDirection:"column",borderStyle:"round",borderColor:o.orange,paddingX:2,paddingY:1,children:[(0,r.jsx)(c,{color:o.orange,bold:!0,children:"Chrome Profile"}),(0,r.jsxs)(u,{flexDirection:"column",marginTop:1,children:[(0,r.jsxs)(c,{color:p?o.green:a===0?o.orange:o.dim,children:[a===0?"\u276F ":" ","Use temporary (no profile)",p?" \u25CF active":""]}),s.map((i,e)=>{let m=e+1===a,w=m?"\u276F ":" ",y=i.isActive?o.green:m?o.orange:void 0;return(0,r.jsxs)(c,{color:y,children:[w,i.label,i.isActive?" \u25CF active":""]},i.name)}),(0,r.jsxs)(c,{color:a===s.length+1?o.orange:o.dim,children:[a===s.length+1?"\u276F ":" ","+ Create new"]})]}),(0,r.jsx)(b,{bindings:[{keys:"\u2191\u2193",label:"navigate"},{keys:"\u21B5",label:"select"}],escBackLabel:"back"})]})}export{O as a,E as b,H as c};
@@ -1,2 +1,2 @@
1
1
  import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{a as $}from"./chunk-YCCUBQY4.js";import{a as U}from"./chunk-CZBHDBID.js";import{a as T}from"./chunk-LPUQ4HWQ.js";import{a as k}from"./chunk-S7JV4A3U.js";import{a as _}from"./chunk-GNJBT6SS.js";import{v as i}from"./chunk-3QWAABMG.js";import{a as O}from"./chunk-HCBYKLMW.js";import{a as u,b as s}from"./chunk-C44QQJR4.js";import{a as K}from"./chunk-6YGTRKDT.js";import{e as S}from"./chunk-UR6MHSHU.js";var e=S(K(),1);var r=S(O(),1);function V(n,x,c){return{id:n,label:`${x} (${n})`,isActive:n===c}}function se({resolver:n,currentProjectId:x,env:c,onSelect:w,onCancel:C}){let[q,B]=(0,e.useState)([]),[D,l]=(0,e.useState)(!0),[H,m]=(0,e.useState)(!1),[J,g]=(0,e.useState)(!1),[Q,P]=(0,e.useState)(null),[d,p]=(0,e.useState)("list"),[v,R]=(0,e.useState)(""),[E,h]=(0,e.useState)(null),[I,X]=(0,e.useState)(""),b=(0,e.useRef)(!1),A=(0,e.useRef)(!0);(0,e.useEffect)(()=>{if(!n){P("Login first to browse projects"),l(!1);return}let o=new AbortController,a=I.trim();return A.current?l(!0):a&&g(!0),m(!0),P(null),(async()=>{try{let t=n.cached??await n.resolve();if(!t){P("Login first to browse projects"),l(!1),m(!1),g(!1);return}let L=k(c),F=new T(L.tmsBaseUrl,t.username,t.access_key),f=!0,N=0,G=a?{signal:o.signal,name:a,perPage:10}:{signal:o.signal,perPage:10};for await(let y of F.listProjectsStream(G)){if(f&&(l(!1),g(!1),A.current=!1,f=!1),y.totalLoaded===0&&y.done&&N===0&&!a){b.current=!0,p("naming"),m(!1);return}let M=y.projects.map(j=>V(j.project_id,j.name,x));B(N===0?M:j=>[...j,...M]),N+=y.projects.length,y.done&&m(!1)}f&&(l(!1),m(!1),g(!1))}catch(t){if(t?.name==="AbortError")return;P(t instanceof Error?t.message:String(t)),l(!1),m(!1),g(!1)}})(),()=>o.abort()},[n,x,c,I]);let Y=(0,e.useCallback)(o=>{let a=o.trim();if(!a){h("Name cannot be empty");return}h(null),p("creating"),(async()=>{try{if(!n)throw new Error("Not authenticated");let t=n.cached??await n.resolve();if(!t)throw new Error("Not authenticated");let L=k(c),f=await new T(L.tmsBaseUrl,t.username,t.access_key).createProject(a);w(f.id,f.name)}catch(t){h(t instanceof Error?t.message:String(t)),p("naming")}})()},[n,c,w]),z=(0,e.useCallback)(()=>{R(""),h(null),b.current?C():p("list")},[C]);return d==="naming"||d==="creating"?(0,r.jsxs)(u,{flexDirection:"column",borderStyle:"round",borderColor:i.orange,paddingX:2,paddingY:1,children:[(0,r.jsx)(s,{color:i.orange,bold:!0,children:"Create new project"}),b.current&&(0,r.jsx)(u,{marginTop:1,children:(0,r.jsx)(s,{color:i.dim,children:"No projects yet \u2014 let's create one."})}),(0,r.jsxs)(u,{marginTop:1,children:[(0,r.jsx)(s,{color:i.dim,children:"Name: "}),d==="naming"?(0,r.jsx)($,{value:v,onChange:o=>{R(o),E&&h(null)},onSubmit:Y,onCancel:z}):(0,r.jsx)(s,{children:v})]}),E&&(0,r.jsx)(u,{marginTop:1,children:(0,r.jsx)(s,{color:i.red,children:E})}),d==="creating"&&(0,r.jsx)(u,{marginTop:1,children:(0,r.jsx)(s,{color:i.dim,children:"Creating..."})}),d==="naming"&&(0,r.jsx)(_,{bindings:[{keys:"\u21B5",label:"create"}],escBackLabel:b.current?"cancel":"back"})]}):(0,r.jsx)(U,{title:"Projects",items:q,loading:D,loadingMore:H,searching:J,preserveSelectionById:!0,onSearch:X,error:Q,itemNoun:"projects",onTab:()=>{b.current=!1,p("naming")},extraHint:"tab to create new",onSelect:o=>{let a=o.label.replace(` (${o.id})`,"");w(o.id,a)},onCancel:C})}export{V as a,se as b};
2
+ import{a as $}from"./chunk-YCCUBQY4.js";import{a as U}from"./chunk-2COEECXK.js";import{a as T}from"./chunk-LPUQ4HWQ.js";import{a as k}from"./chunk-6TJO4BQP.js";import{a as _}from"./chunk-GAZK7QSI.js";import{x as i}from"./chunk-FS2B5IHO.js";import{a as O}from"./chunk-HCBYKLMW.js";import{a as u,b as s}from"./chunk-C44QQJR4.js";import{a as K}from"./chunk-6YGTRKDT.js";import{e as S}from"./chunk-UR6MHSHU.js";var e=S(K(),1);var r=S(O(),1);function V(n,x,c){return{id:n,label:`${x} (${n})`,isActive:n===c}}function se({resolver:n,currentProjectId:x,env:c,onSelect:w,onCancel:C}){let[q,B]=(0,e.useState)([]),[D,l]=(0,e.useState)(!0),[H,m]=(0,e.useState)(!1),[J,g]=(0,e.useState)(!1),[Q,P]=(0,e.useState)(null),[d,p]=(0,e.useState)("list"),[v,R]=(0,e.useState)(""),[E,h]=(0,e.useState)(null),[I,X]=(0,e.useState)(""),b=(0,e.useRef)(!1),A=(0,e.useRef)(!0);(0,e.useEffect)(()=>{if(!n){P("Login first to browse projects"),l(!1);return}let o=new AbortController,a=I.trim();return A.current?l(!0):a&&g(!0),m(!0),P(null),(async()=>{try{let t=n.cached??await n.resolve();if(!t){P("Login first to browse projects"),l(!1),m(!1),g(!1);return}let L=k(c),F=new T(L.tmsBaseUrl,t.username,t.access_key),f=!0,N=0,G=a?{signal:o.signal,name:a,perPage:10}:{signal:o.signal,perPage:10};for await(let y of F.listProjectsStream(G)){if(f&&(l(!1),g(!1),A.current=!1,f=!1),y.totalLoaded===0&&y.done&&N===0&&!a){b.current=!0,p("naming"),m(!1);return}let M=y.projects.map(j=>V(j.project_id,j.name,x));B(N===0?M:j=>[...j,...M]),N+=y.projects.length,y.done&&m(!1)}f&&(l(!1),m(!1),g(!1))}catch(t){if(t?.name==="AbortError")return;P(t instanceof Error?t.message:String(t)),l(!1),m(!1),g(!1)}})(),()=>o.abort()},[n,x,c,I]);let Y=(0,e.useCallback)(o=>{let a=o.trim();if(!a){h("Name cannot be empty");return}h(null),p("creating"),(async()=>{try{if(!n)throw new Error("Not authenticated");let t=n.cached??await n.resolve();if(!t)throw new Error("Not authenticated");let L=k(c),f=await new T(L.tmsBaseUrl,t.username,t.access_key).createProject(a);w(f.id,f.name)}catch(t){h(t instanceof Error?t.message:String(t)),p("naming")}})()},[n,c,w]),z=(0,e.useCallback)(()=>{R(""),h(null),b.current?C():p("list")},[C]);return d==="naming"||d==="creating"?(0,r.jsxs)(u,{flexDirection:"column",borderStyle:"round",borderColor:i.orange,paddingX:2,paddingY:1,children:[(0,r.jsx)(s,{color:i.orange,bold:!0,children:"Create new project"}),b.current&&(0,r.jsx)(u,{marginTop:1,children:(0,r.jsx)(s,{color:i.dim,children:"No projects yet \u2014 let's create one."})}),(0,r.jsxs)(u,{marginTop:1,children:[(0,r.jsx)(s,{color:i.dim,children:"Name: "}),d==="naming"?(0,r.jsx)($,{value:v,onChange:o=>{R(o),E&&h(null)},onSubmit:Y,onCancel:z}):(0,r.jsx)(s,{children:v})]}),E&&(0,r.jsx)(u,{marginTop:1,children:(0,r.jsx)(s,{color:i.red,children:E})}),d==="creating"&&(0,r.jsx)(u,{marginTop:1,children:(0,r.jsx)(s,{color:i.dim,children:"Creating..."})}),d==="naming"&&(0,r.jsx)(_,{bindings:[{keys:"\u21B5",label:"create"}],escBackLabel:b.current?"cancel":"back"})]}):(0,r.jsx)(U,{title:"Projects",items:q,loading:D,loadingMore:H,searching:J,preserveSelectionById:!0,onSearch:X,error:Q,itemNoun:"projects",onTab:()=>{b.current=!1,p("naming")},extraHint:"tab to create new",onSelect:o=>{let a=o.label.replace(` (${o.id})`,"");w(o.id,a)},onCancel:C})}export{V as a,se as b};