@testmuai/kane-cli 0.4.0 → 0.4.1

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 (99) hide show
  1. package/dist/{ChromeProfilePicker-27QCT4NT.js → ChromeProfilePicker-63JS7QX6.js} +1 -1
  2. package/dist/{CliFeedbackPrompt-LMXDRY5F.js → CliFeedbackPrompt-3SDJ5GZP.js} +1 -1
  3. package/dist/{CliUploadProgress-QP5SPC7G.js → CliUploadProgress-ZSZ7TGCN.js} +1 -1
  4. package/dist/ConfigView-OOQYCHWM.js +2 -0
  5. package/dist/FolderPicker-FILMS64I.js +2 -0
  6. package/dist/{HelpView-2IYG5AC3.js → HelpView-KBFE4EMP.js} +1 -1
  7. package/dist/{InfoBox-JELKGWY5.js → InfoBox-QECFIGGW.js} +1 -1
  8. package/dist/{LinksBox-NUSUOUIW.js → LinksBox-2L2UX4LB.js} +1 -1
  9. package/dist/{ProfilesView-RXYI2IS3.js → ProfilesView-72UTQ5PX.js} +1 -1
  10. package/dist/ProjectPicker-NLEAW232.js +2 -0
  11. package/dist/{SaveSessionPrompt-GUBVAQ3O.js → SaveSessionPrompt-VNJDLJTF.js} +1 -1
  12. package/dist/SingleShotApp-V2UTGNZO.js +2 -0
  13. package/dist/{SummaryBox-5Y2YYOUM.js → SummaryBox-O772FRGO.js} +1 -1
  14. package/dist/TestMdRunView-OVHCLNI7.js +2 -0
  15. package/dist/WhoamiView-LR2EFCTK.js +2 -0
  16. package/dist/{changelog-N4SSER5V.js → changelog-VCAUV47V.js} +1 -1
  17. package/dist/{chunk-H4XV224I.js → chunk-45VTQLJS.js} +1 -1
  18. package/dist/{chunk-LMV2F35W.js → chunk-4QO6JYHX.js} +1 -1
  19. package/dist/chunk-77SZF4ZU.js +2 -0
  20. package/dist/{chunk-PKQJHIKJ.js → chunk-7I2SQ2KP.js} +1 -1
  21. package/dist/{chunk-VS2BXLH4.js → chunk-7NDFOI6Z.js} +1 -1
  22. package/dist/chunk-7U4NY37W.js +22 -0
  23. package/dist/chunk-AGS57DSG.js +17 -0
  24. package/dist/chunk-C6S4IEBC.js +2 -0
  25. package/dist/chunk-CMRNCZGV.js +6 -0
  26. package/dist/{chunk-XQXSPUIX.js → chunk-DAVPOA2L.js} +1 -1
  27. package/dist/{chunk-6NEJEMA6.js → chunk-EEF6OT52.js} +1 -1
  28. package/dist/{chunk-H6OVTXJQ.js → chunk-FGC74Z76.js} +1 -1
  29. package/dist/chunk-FPFOW6BS.js +2 -0
  30. package/dist/{chunk-6IQWD272.js → chunk-G6AXOEED.js} +1 -1
  31. package/dist/{chunk-PN7LNQ7G.js → chunk-H4XK55B3.js} +1 -1
  32. package/dist/{chunk-VTDVK3DK.js → chunk-HUOC7DUT.js} +1 -1
  33. package/dist/{chunk-3Z4EHIOW.js → chunk-IBDWHXNE.js} +1 -1
  34. package/dist/{chunk-O2UU4TS5.js → chunk-J2KTLZAW.js} +1 -1
  35. package/dist/{chunk-AT2Y5UNP.js → chunk-JGXJDTMO.js} +1 -1
  36. package/dist/chunk-JJERCR2W.js +5 -0
  37. package/dist/{chunk-PWHFNSDC.js → chunk-KJEJ7VW5.js} +1 -1
  38. package/dist/{chunk-J37YPPCD.js → chunk-LAR7I5SR.js} +1 -1
  39. package/dist/chunk-LEXQLAWB.js +60 -0
  40. package/dist/chunk-LOIRZFV3.js +10 -0
  41. package/dist/chunk-LPUQ4HWQ.js +2 -0
  42. package/dist/{chunk-7RPMUEEN.js → chunk-OFEPMULV.js} +1 -1
  43. package/dist/chunk-OIPVMEM7.js +2 -0
  44. package/dist/{chunk-CKY3UXTY.js → chunk-P7ZUISQG.js} +1 -1
  45. package/dist/{chunk-JCR3T34A.js → chunk-RHUD7MK4.js} +2 -2
  46. package/dist/{chunk-CGAX3AXA.js → chunk-RJNGCQCL.js} +1 -1
  47. package/dist/chunk-T46Z27UL.js +5 -0
  48. package/dist/chunk-TCLKNUAL.js +17 -0
  49. package/dist/{chunk-TAEW7PXN.js → chunk-UHFCCGVX.js} +1 -1
  50. package/dist/{chunk-5TOE4RHH.js → chunk-UYHNJUPY.js} +1 -1
  51. package/dist/{chunk-IH45REQA.js → chunk-V3FSESZ4.js} +1 -1
  52. package/dist/{chunk-HYVAYSRZ.js → chunk-VKG45YIL.js} +1 -1
  53. package/dist/chunk-YAVIOVVP.js +2 -0
  54. package/dist/{chunk-UJZCMEEH.js → chunk-YSSBAIJI.js} +1 -1
  55. package/dist/{chunk-M5RHRHFC.js → chunk-Z7AXAKPX.js} +1 -1
  56. package/dist/chunk-ZUIWBVGF.js +14 -0
  57. package/dist/exit-manager-V2NW7A7U.js +2 -0
  58. package/dist/generate-headless-XWVVEFQR.js +18 -0
  59. package/dist/index.js +38 -33
  60. package/dist/list-commands-Y6A3XR4L.js +2 -0
  61. package/dist/login-flow-MKAYO6IS.js +2 -0
  62. package/dist/{persist-recorded-session-VEFILVPX.js → persist-recorded-session-WBPLUA55.js} +1 -1
  63. package/dist/{pipeline-3GVPCDRE.js → pipeline-L5TDZMLS.js} +1 -1
  64. package/dist/{recording-banner-WS4Y7LVH.js → recording-banner-Q36WARSF.js} +1 -1
  65. package/dist/require-project-folder-DBXAG7FB.js +2 -0
  66. package/dist/resolver-IDCGRPFJ.js +2 -0
  67. package/dist/run-test-md-H2X6CUIX.js +14 -0
  68. package/dist/scrollback-6GINSTL2.js +2 -0
  69. package/dist/tcg-generate-WURS7TXW.js +2 -0
  70. package/dist/testmd-actions-MQ3N7IS4.js +2 -0
  71. package/dist/{tms-client-R5ZIAOBH.js → tms-client-NNYXLXZK.js} +1 -1
  72. package/dist/token-refresh-HHNMHTYX.js +2 -0
  73. package/dist/validate-basic-VFJZKHOE.js +2 -0
  74. package/dist/{version-check-LNKXGYZE.js → version-check-5NUDIYG4.js} +1 -1
  75. package/package.json +5 -5
  76. package/dist/ConfigView-RQM2JY4K.js +0 -2
  77. package/dist/FolderPicker-YN2YQJXI.js +0 -2
  78. package/dist/ProjectPicker-RUR7HH2P.js +0 -2
  79. package/dist/SingleShotApp-3XDTU2BU.js +0 -2
  80. package/dist/TestMdRunView-PPZPUVVZ.js +0 -2
  81. package/dist/WhoamiView-IJZUFJ7B.js +0 -2
  82. package/dist/chunk-3C7ATCDM.js +0 -2
  83. package/dist/chunk-7CLUJYMW.js +0 -2
  84. package/dist/chunk-7G7ZLAJH.js +0 -5
  85. package/dist/chunk-BKXTOQWL.js +0 -5
  86. package/dist/chunk-BPF7TDRU.js +0 -2
  87. package/dist/chunk-DTFPHZE7.js +0 -62
  88. package/dist/chunk-JLOY7SNA.js +0 -14
  89. package/dist/chunk-L3RTVAPG.js +0 -6
  90. package/dist/chunk-LRF6UP42.js +0 -10
  91. package/dist/chunk-SJ7VGRQU.js +0 -17
  92. package/dist/chunk-UVBDUDSL.js +0 -2
  93. package/dist/generate-headless-7UYAPXE5.js +0 -18
  94. package/dist/login-flow-LK7GAUCZ.js +0 -2
  95. package/dist/resolver-OA35IO7J.js +0 -2
  96. package/dist/run-test-md-SXZUOYSG.js +0 -14
  97. package/dist/tcg-generate-CEBFKKJE.js +0 -2
  98. package/dist/testmd-actions-IZPOBSTC.js +0 -2
  99. package/dist/validate-basic-Y73NBDAD.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-HYVAYSRZ.js";import"./chunk-AT2Y5UNP.js";import"./chunk-HCBYKLMW.js";import"./chunk-3Z4EHIOW.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-VKG45YIL.js";import"./chunk-JGXJDTMO.js";import"./chunk-IBDWHXNE.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-H6OVTXJQ.js";import"./chunk-AT2Y5UNP.js";import"./chunk-HCBYKLMW.js";import"./chunk-3Z4EHIOW.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-FGC74Z76.js";import"./chunk-JGXJDTMO.js";import"./chunk-IBDWHXNE.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-6IQWD272.js";import"./chunk-VS2BXLH4.js";import{a as c}from"./chunk-HCBYKLMW.js";import"./chunk-3Z4EHIOW.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-G6AXOEED.js";import"./chunk-7NDFOI6Z.js";import"./chunk-IBDWHXNE.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};
@@ -0,0 +1,2 @@
1
+ import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
+ import{a as p,b as l,c as n}from"./chunk-HUOC7DUT.js";import{t as o}from"./chunk-IBDWHXNE.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-P7ZUISQG.js";import"./chunk-YCCUBQY4.js";import"./chunk-UHFCCGVX.js";import"./chunk-LPUQ4HWQ.js";import"./chunk-NLCCBXXV.js";import"./chunk-LAR7I5SR.js";import"./chunk-RZ4F3BHX.js";import"./chunk-JGXJDTMO.js";import"./chunk-IBDWHXNE.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 T}from"./chunk-HCBYKLMW.js";import{a as f,b as i,t}from"./chunk-3Z4EHIOW.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,t}from"./chunk-IBDWHXNE.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-5TOE4RHH.js";import"./chunk-VTDVK3DK.js";import"./chunk-HCBYKLMW.js";import"./chunk-3Z4EHIOW.js";import"./chunk-C44QQJR4.js";import"./chunk-6YGTRKDT.js";import"./chunk-UR6MHSHU.js";export{a as InfoBox};
2
+ import{a}from"./chunk-UYHNJUPY.js";import"./chunk-HUOC7DUT.js";import"./chunk-IBDWHXNE.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-XQXSPUIX.js";import"./chunk-HCBYKLMW.js";import"./chunk-3Z4EHIOW.js";import"./chunk-C44QQJR4.js";import"./chunk-6YGTRKDT.js";import"./chunk-UR6MHSHU.js";export{a as LinksBox};
2
+ import{a}from"./chunk-DAVPOA2L.js";import"./chunk-IBDWHXNE.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-LMV2F35W.js";import"./chunk-AT2Y5UNP.js";import"./chunk-HCBYKLMW.js";import"./chunk-3Z4EHIOW.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-4QO6JYHX.js";import"./chunk-JGXJDTMO.js";import"./chunk-IBDWHXNE.js";import"./chunk-HCBYKLMW.js";import"./chunk-C44QQJR4.js";import"./chunk-6YGTRKDT.js";import"./chunk-UR6MHSHU.js";export{b as ProfilesView,a as formatProfileLine};
@@ -0,0 +1,2 @@
1
+ import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
+ import{a,b}from"./chunk-KJEJ7VW5.js";import"./chunk-YCCUBQY4.js";import"./chunk-UHFCCGVX.js";import"./chunk-LPUQ4HWQ.js";import"./chunk-NLCCBXXV.js";import"./chunk-LAR7I5SR.js";import"./chunk-RZ4F3BHX.js";import"./chunk-JGXJDTMO.js";import"./chunk-IBDWHXNE.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-CGAX3AXA.js";import"./chunk-S3DAAAE5.js";import"./chunk-5TOE4RHH.js";import"./chunk-VTDVK3DK.js";import"./chunk-HCBYKLMW.js";import"./chunk-3Z4EHIOW.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-RJNGCQCL.js";import"./chunk-S3DAAAE5.js";import"./chunk-UYHNJUPY.js";import"./chunk-HUOC7DUT.js";import"./chunk-IBDWHXNE.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-7I2SQ2KP.js";import"./chunk-Z7AXAKPX.js";import"./chunk-AGS57DSG.js";import"./chunk-L5LI2JF4.js";import"./chunk-YSSBAIJI.js";import"./chunk-FPFOW6BS.js";import"./chunk-WAOCHXJ5.js";import"./chunk-KJEJ7VW5.js";import"./chunk-P7ZUISQG.js";import"./chunk-YCCUBQY4.js";import"./chunk-UHFCCGVX.js";import"./chunk-LOIRZFV3.js";import"./chunk-LPUQ4HWQ.js";import"./chunk-NLCCBXXV.js";import"./chunk-VE3SUJMA.js";import"./chunk-T46Z27UL.js";import"./chunk-OIPVMEM7.js";import"./chunk-LAR7I5SR.js";import"./chunk-RZ4F3BHX.js";import"./chunk-JGXJDTMO.js";import"./chunk-IBDWHXNE.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-IH45REQA.js";import"./chunk-5TOE4RHH.js";import"./chunk-VTDVK3DK.js";import"./chunk-HCBYKLMW.js";import"./chunk-3Z4EHIOW.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-V3FSESZ4.js";import"./chunk-UYHNJUPY.js";import"./chunk-HUOC7DUT.js";import"./chunk-IBDWHXNE.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-JJERCR2W.js";import"./chunk-H4XK55B3.js";import"./chunk-7NDFOI6Z.js";import"./chunk-LOIRZFV3.js";import"./chunk-LAR7I5SR.js";import"./chunk-UYHNJUPY.js";import"./chunk-HUOC7DUT.js";import"./chunk-C6S4IEBC.js";import"./chunk-IBDWHXNE.js";import"./chunk-HCBYKLMW.js";import"./chunk-C44QQJR4.js";import"./chunk-6YGTRKDT.js";import"./chunk-UR6MHSHU.js";export{a as TestMdRunView};
@@ -0,0 +1,2 @@
1
+ import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
+ import{a as b,b as r}from"./chunk-HUOC7DUT.js";import{t as o}from"./chunk-IBDWHXNE.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{c as i,f as c}from"./chunk-3Z4EHIOW.js";import{a as l}from"./chunk-RZ4F3BHX.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-IBDWHXNE.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,5 +1,5 @@
1
1
  import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{b as z}from"./chunk-PN7LNQ7G.js";import{a as R}from"./chunk-SJ7VGRQU.js";import{a as q}from"./chunk-NLCCBXXV.js";function O(e){return["completed","failed","ended","stopped"].includes(e.trim().toLowerCase())}function ue(e){return["ended","stopped"].includes(e.trim().toLowerCase())}function D(e){return{requestId:e.requestId,objective:e.objective,status:"",turnActive:!1,scenarios:[],thinking:"",thinkingLog:[],chatLog:[],progress:0}}function de(e){return e.pendingClarification===void 0?e:{...e,pendingClarification:void 0}}function le(e){return{...e,turnActive:!0,error:void 0,thinking:"",thinkingLog:[]}}function A(e,t){switch(t.type){case"thinking":return{...e,status:"thinking",thinking:e.thinking+t.delta};case"thinking_done":return{...e,thinkingLog:[...e.thinkingLog,{text:e.thinking,tookMs:t.tookMs}],thinking:""};case"progress":return{...e,progress:t.pct};case"snapshot":return{...e,scenarios:t.data.scenarios,status:t.data.status,headline:t.data.headline??e.headline};case"chat":return{...e,turnActive:!1,chatLog:[...e.chatLog,{role:"model",text:t.text}]};case"clarification":return{...e,turnActive:!1,chatLog:[...e.chatLog,{role:"model",text:t.text}],pendingClarification:t.text};case"limit":return{...e,limits:{scenarioLimit:t.scenarioLimit,perScenarioLimit:t.perScenarioLimit}};case"error":return{...e,error:t.message};case"done":return{...e,status:t.status,turnActive:!1,error:t.status==="failed"&&!e.error?"generation failed":e.error}}}function N(e,t){let n=[],i=e.type??"",p=e.status??"";if(i==="ping")return n;switch(i){case"thinking_token":typeof e.data=="string"&&n.push({type:"thinking",delta:e.data});break;case"thinking_stopped":{let s=e.data??{},u=Q(s.time_taken);n.push({type:"thinking_done",text:typeof e.data=="string"?e.data:s.message??"",tookMs:u});break}case"progress":{let s=e.data??{};typeof s.progress=="number"&&n.push({type:"progress",pct:s.progress});break}case"clarification":{let s=e.data??{};typeof s.message=="string"&&n.push({type:"clarification",text:s.message});break}case"chatting_stopped":{let s=e.data??{};typeof s.message=="string"&&s.message.length>0&&n.push({type:"chat",text:s.message});break}case"limit_update":{let s=e.data??{},u=s.test_cases_limit??e.test_cases_limit,f=s.per_scenario_test_cases_limit??e.per_scenario_test_cases_limit;n.push({type:"limit",scenarioLimit:u,perScenarioLimit:f});break}case"error":{let s=typeof e.data=="string"?e.data:e.data?.message??"generation error";n.push({type:"error",message:s});break}case"request_cancelled":return n.push({type:"done",status:"stopped"}),n;case"session_ended":return n.push({type:"done",status:"ended"}),n;default:break}if(Array.isArray(e.scenarios)&&n.push({type:"snapshot",data:{requestId:t,status:p,headline:e.headline,scenarios:e.scenarios}}),p&&O(p)){let s=p.trim().toLowerCase();n.push({type:"done",status:s})}return n}function Q(e){if(!e)return;let t=/^([\d.]+)(ms|s)?$/.exec(e.trim());if(!t)return;let n=Number(t[1]);if(Number.isFinite(n))return t[2]==="ms"?Math.round(n):Math.round(n*1e3)}var E=class extends Error{constructor(t){super(t),this.name="AuthError"}},M=class extends Error{constructor(t){super(t),this.name="ForbiddenError"}},F=class extends Error{constructor(t){super(t),this.name="InsufficientCreditsError"}},k=class extends Error{constructor(n,i){super(n);this.cause=i;this.name="TransportError"}};function v(e,t){let n=t?.message??t?.error??`HTTP ${e}`;return e===401?new E(n):e===403?t?.key==="insufficient_credits"?new F(n):new M(n):new k(n)}async function*H(e){let t=e.fetchImpl??fetch,n=e.maxRetries??5,i=e.maxBackoffMs??3e4,p=e.connectTimeoutMs??1e4,s=0,u=!1;for(;;){if(e.signal.aborted)return;let f=new AbortController,d=()=>f.abort();e.signal.addEventListener("abort",d,{once:!0});let g=setTimeout(()=>f.abort(),p),b;try{b=await t(e.url,{method:"GET",headers:{Authorization:await e.authHeader(),Accept:"text/event-stream"},signal:f.signal})}catch(m){if(clearTimeout(g),e.signal.removeEventListener("abort",d),e.signal.aborted)return;if(++s>n)throw new k("SSE connect failed",m);await B(I(s,i));continue}if(clearTimeout(g),!b.ok){e.signal.removeEventListener("abort",d);let m=await Y(b);if(b.status===401&&u){if(++s>n)throw v(401,m);await B(I(s,i));continue}throw v(b.status,m)}if(!b.body)throw e.signal.removeEventListener("abort",d),new k("SSE response had no body");u=!0,s=0;let w=b.body.getReader(),h=new TextDecoder("utf-8"),y="";try{for(;;){if(e.signal.aborted){await w.cancel().catch(()=>{});return}let{done:m,value:r}=await w.read();if(m)break;y+=h.decode(r,{stream:!0});let a;for(;(a=y.indexOf(`
2
+ import{a as R}from"./chunk-AGS57DSG.js";import{b as z}from"./chunk-H4XK55B3.js";import{a as q}from"./chunk-NLCCBXXV.js";function O(e){return["completed","failed","ended","stopped"].includes(e.trim().toLowerCase())}function ue(e){return["ended","stopped"].includes(e.trim().toLowerCase())}function D(e){return{requestId:e.requestId,objective:e.objective,status:"",turnActive:!1,scenarios:[],thinking:"",thinkingLog:[],chatLog:[],progress:0}}function de(e){return e.pendingClarification===void 0?e:{...e,pendingClarification:void 0}}function le(e){return{...e,turnActive:!0,error:void 0,thinking:"",thinkingLog:[]}}function A(e,t){switch(t.type){case"thinking":return{...e,status:"thinking",thinking:e.thinking+t.delta};case"thinking_done":return{...e,thinkingLog:[...e.thinkingLog,{text:e.thinking,tookMs:t.tookMs}],thinking:""};case"progress":return{...e,progress:t.pct};case"snapshot":return{...e,scenarios:t.data.scenarios,status:t.data.status,headline:t.data.headline??e.headline};case"chat":return{...e,turnActive:!1,chatLog:[...e.chatLog,{role:"model",text:t.text}]};case"clarification":return{...e,turnActive:!1,chatLog:[...e.chatLog,{role:"model",text:t.text}],pendingClarification:t.text};case"limit":return{...e,limits:{scenarioLimit:t.scenarioLimit,perScenarioLimit:t.perScenarioLimit}};case"error":return{...e,error:t.message};case"done":return{...e,status:t.status,turnActive:!1,error:t.status==="failed"&&!e.error?"generation failed":e.error}}}function N(e,t){let n=[],i=e.type??"",p=e.status??"";if(i==="ping")return n;switch(i){case"thinking_token":typeof e.data=="string"&&n.push({type:"thinking",delta:e.data});break;case"thinking_stopped":{let s=e.data??{},u=Q(s.time_taken);n.push({type:"thinking_done",text:typeof e.data=="string"?e.data:s.message??"",tookMs:u});break}case"progress":{let s=e.data??{};typeof s.progress=="number"&&n.push({type:"progress",pct:s.progress});break}case"clarification":{let s=e.data??{};typeof s.message=="string"&&n.push({type:"clarification",text:s.message});break}case"chatting_stopped":{let s=e.data??{};typeof s.message=="string"&&s.message.length>0&&n.push({type:"chat",text:s.message});break}case"limit_update":{let s=e.data??{},u=s.test_cases_limit??e.test_cases_limit,f=s.per_scenario_test_cases_limit??e.per_scenario_test_cases_limit;n.push({type:"limit",scenarioLimit:u,perScenarioLimit:f});break}case"error":{let s=typeof e.data=="string"?e.data:e.data?.message??"generation error";n.push({type:"error",message:s});break}case"request_cancelled":return n.push({type:"done",status:"stopped"}),n;case"session_ended":return n.push({type:"done",status:"ended"}),n;default:break}if(Array.isArray(e.scenarios)&&n.push({type:"snapshot",data:{requestId:t,status:p,headline:e.headline,scenarios:e.scenarios}}),p&&O(p)){let s=p.trim().toLowerCase();n.push({type:"done",status:s})}return n}function Q(e){if(!e)return;let t=/^([\d.]+)(ms|s)?$/.exec(e.trim());if(!t)return;let n=Number(t[1]);if(Number.isFinite(n))return t[2]==="ms"?Math.round(n):Math.round(n*1e3)}var E=class extends Error{constructor(t){super(t),this.name="AuthError"}},M=class extends Error{constructor(t){super(t),this.name="ForbiddenError"}},F=class extends Error{constructor(t){super(t),this.name="InsufficientCreditsError"}},k=class extends Error{constructor(n,i){super(n);this.cause=i;this.name="TransportError"}};function v(e,t){let n=t?.message??t?.error??`HTTP ${e}`;return e===401?new E(n):e===403?t?.key==="insufficient_credits"?new F(n):new M(n):new k(n)}async function*H(e){let t=e.fetchImpl??fetch,n=e.maxRetries??5,i=e.maxBackoffMs??3e4,p=e.connectTimeoutMs??1e4,s=0,u=!1;for(;;){if(e.signal.aborted)return;let f=new AbortController,d=()=>f.abort();e.signal.addEventListener("abort",d,{once:!0});let g=setTimeout(()=>f.abort(),p),b;try{b=await t(e.url,{method:"GET",headers:{Authorization:await e.authHeader(),Accept:"text/event-stream"},signal:f.signal})}catch(m){if(clearTimeout(g),e.signal.removeEventListener("abort",d),e.signal.aborted)return;if(++s>n)throw new k("SSE connect failed",m);await B(I(s,i));continue}if(clearTimeout(g),!b.ok){e.signal.removeEventListener("abort",d);let m=await Y(b);if(b.status===401&&u){if(++s>n)throw v(401,m);await B(I(s,i));continue}throw v(b.status,m)}if(!b.body)throw e.signal.removeEventListener("abort",d),new k("SSE response had no body");u=!0,s=0;let w=b.body.getReader(),h=new TextDecoder("utf-8"),y="";try{for(;;){if(e.signal.aborted){await w.cancel().catch(()=>{});return}let{done:m,value:r}=await w.read();if(m)break;y+=h.decode(r,{stream:!0});let a;for(;(a=y.indexOf(`
3
3
 
4
4
  `))>=0;){let o=y.slice(0,a);y=y.slice(a+2);let c=V(o);c&&(yield c)}}}catch(m){if(e.signal.aborted)return;if(++s>n)throw new k("SSE stream dropped",m);await B(I(s,i));continue}finally{e.signal.removeEventListener("abort",d)}return}}function V(e){let t="message",n="";for(let i of e.split(`
5
5
  `))i.startsWith("event:")?t=i.slice(6).trim():i.startsWith("data:")&&(n+=i.slice(5).trim());if(t!=="message"||!n)return null;try{let i=Buffer.from(n,"base64").toString("utf-8");return JSON.parse(i)}catch{return null}}function I(e,t){return Math.min(t,1e3*2**(e-1))}function B(e){return new Promise(t=>setTimeout(t,e))}async function Y(e){try{return await e.clone().json()}catch{return}}function ke(e,t={}){let n=t.fetchImpl??fetch,i=new Map,p=!0;async function s(){let r=await e.authResolver.resolve();if(!r)throw new E("unauthorized; run `kane-cli login`");return q(r.username,r.access_key)}function u(r){return`${e.baseUrl}${r}`}async function f(r){if(!r.ok){let a;try{a=await r.clone().json()}catch{a=void 0}throw v(r.status,a)}return r.json()}function d(r){let a=r?.data??r;return{request_id:a.request_id??a.id,status:a.status??""}}function g(r,a,o,c){let l=D({requestId:r,objective:a});c&&(l=A(l,{type:"snapshot",data:c}),c.status==="cleaned_up"&&(l={...l,error:"session was reaped (cleaned_up) \u2014 continuing will destructively regenerate"}));let S=new AbortController;o&&(o.aborted?S.abort():o.addEventListener("abort",()=>S.abort(),{once:!0})),i.set(r,S);let x={requestId:r,state:l,events:void 0};return x.events=(async function*(){try{let C=H({url:u(`/requests/${r}/sse`),authHeader:s,signal:S.signal,log:e.log,fetchImpl:n});for await(let L of C)for(let $ of N(L,r))x.state=A(x.state,$),yield $}finally{i.delete(r)}})(),x}async function b(r,a){let o=new FormData;o.append("prompt",r.prompt),p=r.memoryEnhancement??!0,o.append("memory_enhancement",String(p)),r.scenarioLimit!==void 0&&o.append("test_scenario_limit",String(r.scenarioLimit)),r.perScenarioLimit!==void 0&&o.append("per_scenario_test_cases_limit",String(r.perScenarioLimit));let c=r.projectId??e.projectId,l=r.folderId??e.folderId;c&&o.append("project_id",c),l&&o.append("folder_id",l);let S=await n(u("/requests"),{method:"POST",headers:{Authorization:await s()},body:o}),x=await f(S),{request_id:C}=d(x),L=String(C);return g(L,r.prompt,a)}async function w(r,a){let o=await n(u(`/requests/${r}`),{method:"GET",headers:{Authorization:await s()}}),c=await f(o),l=c?.data??c,S={requestId:r,status:l.status??"",headline:l.headline,scenarios:Array.isArray(l.scenarios)?l.scenarios:[]};return g(r,"",a,S)}async function h(r,a,o){let c=new FormData;c.append("prompt",a),c.append("chat_enabled","true"),c.append("memory_enhancement",String(p)),o&&c.append("mappings",JSON.stringify(o));let l=await n(u(`/requests/${r}`),{method:"PUT",headers:{Authorization:await s()},body:c});if(!l.ok){let S;try{S=await l.clone().json()}catch{}throw v(l.status,S)}}async function y(r){i.get(r)?.abort();let o=await n(u(`/requests/${r}/stop`),{method:"DELETE",headers:{Authorization:await s()}});if(!o.ok&&o.status!==404){let c;try{c=await o.clone().json()}catch{}throw v(o.status,c)}}async function m(r){i.get(r)?.abort();let o=await n(u(`/requests/${r}/end`),{method:"DELETE",headers:{Authorization:await s()}});if(!o.ok&&o.status!==404){let c;try{c=await o.clone().json()}catch{}throw v(o.status,c)}}return{start:b,attach:w,chat:h,cancel:y,end:m}}function j(e){if(!Array.isArray(e))return[];let t=[];for(let n of e){if(n==null||typeof n!="object")return[];let i=n;if(typeof i.step!="string")return[];let p=typeof i.expected_result=="string"?i.expected_result:typeof i.outcome=="string"?i.outcome:"";t.push({step:i.step,expected:p})}return t}var ee=30,te=300;function J(){return{mode:"testing",max_steps:ee,timeout:te,variables:{}}}function U(e){return e.title??`Test case ${e.id}`}function Ce(e,t){return R({frontmatter:J(),heading:U(t),steps:e.sub_objectives.map(n=>n.objective)})}function G(e){let t=j(e.manual_steps).map(n=>n.step);return R({frontmatter:J(),heading:U(e),steps:t})}import{mkdtempSync as ne,mkdirSync as P,writeFileSync as W,rmSync as X,renameSync as re,existsSync as Z,readFileSync as se}from"fs";import{join as _,resolve as ie}from"path";async function Fe(e,t,n,i=G){(n.redirectBareCwd??!0)&&ie(t)===process.cwd()&&(t=_(t,".testmuai","tests"));let p=T(e.objective)??e.headline,s=T(n.suiteName)??`${T(K(p,4))??"tcg"}-${e.requestId}`,u=s,f=_(t,s);Z(f)&&!ae(f,e.requestId)&&(u=`${s}-${e.requestId}`);let d=_(t,u),g=[],b=new Map;for(let h of e.scenarios){let y=(h.test_cases??[]).filter(oe);if(y.length===0)continue;let m=T(ce(h.scode))??T(h.sid)??`s${h.id}`,r=b.get(m)??new Set;b.set(m,r);for(let a of y){let o=T(K(a.title,5))??"case",c=`${o}_test.md`;for(let l=2;r.has(c);l++)c=`${o}-${l}_test.md`;r.add(c),g.push({dir:m,file:c,tc:a})}}if(g.length===0)return{suiteDir:d,paths:[],warning:"no functional test cases generated"};P(t,{recursive:!0});let w=ne(_(t,".tcg-tmp-"));try{P(_(w,"helpers"),{recursive:!0}),W(_(w,".tcg-suite.json"),JSON.stringify({requestId:e.requestId,suiteName:u}));let h=[],y=new Set;for(let r of g){let a=_(w,r.dir);y.has(a)||(P(a,{recursive:!0}),y.add(a));let o=_(a,r.file);W(o,i(r.tc)),h.push(o)}Z(d)&&X(d,{recursive:!0,force:!0}),re(w,d);let m=h.map(r=>r.replace(w,d));return{suiteDir:d,paths:m}}catch(h){try{X(w,{recursive:!0,force:!0})}catch{}throw h}}function oe(e){return(e.category??"").trim().toLowerCase()==="functional"}function ae(e,t){try{return JSON.parse(se(_(e,".tcg-suite.json"),"utf-8"))?.requestId===t}catch{return!1}}function T(e){return e&&e.length>0?e:void 0}function K(e,t){return e?e.toLowerCase().replace(/[^a-z0-9]+/g," ").trim().split(/\s+/).filter(Boolean).slice(0,t).join("-"):""}function ce(e){return e?e.replace(/[^A-Za-z0-9._-]+/g,"-").replace(/^-+|-+$/g,""):""}function Pe(e){let t=[];e.title&&t.push(e.title),e.description&&t.push("",e.description);let n=j(e.manual_steps);return n.length>0&&(t.push("","Steps:"),n.forEach((i,p)=>{t.push(`${p+1}. ${i.step}`)})),t.join(`
@@ -1,2 +1,2 @@
1
1
  import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{a as h}from"./chunk-AT2Y5UNP.js";import{a as A}from"./chunk-HCBYKLMW.js";import{t as l}from"./chunk-3Z4EHIOW.js";import{a as c,b as f,i as P}from"./chunk-C44QQJR4.js";import{a as B}from"./chunk-6YGTRKDT.js";import{e as x}from"./chunk-UR6MHSHU.js";var L=x(B(),1);var n=x(A(),1);function S(r,d,s,u,m){let p=s==="basic"&&u?`basic (${u})`:s,i=20,a=`${r} [${d}]`,g="\xB7".repeat(Math.max(2,i-a.length+3));return{label:`${a} ${g} ${p}`,profile:r,env:d,isActive:m}}function M({creds:r,onSwitch:d,onCancel:s}){let u=r.listProfiles(),m=r.getActiveProfile(),p=r.getDefaultEnv(),i=u.map(e=>{let o=r.loadBasicAuth(e.profile,e.env),t=r.loadCredentials(e.profile,e.env)!==null,v=o?"basic":t?"oauth":"none",b=o?o.username:null,w=e.profile===m&&e.env===p;return S(e.profile,e.env,v,b,w)}),[a,g]=(0,L.useState)(()=>{let e=i.findIndex(o=>o.isActive);return e>=0?e:0});return P((e,o)=>{if(o.escape){s();return}if(o.upArrow){g(t=>Math.max(0,t-1));return}if(o.downArrow){g(t=>Math.min(i.length-1,t+1));return}if(o.return&&i[a]){let t=i[a];t.isActive||d(t.profile,t.env),s();return}}),i.length===0?(0,n.jsxs)(c,{flexDirection:"column",borderStyle:"round",borderColor:l.orange,paddingX:2,paddingY:1,children:[(0,n.jsx)(f,{color:l.orange,bold:!0,children:"Profiles"}),(0,n.jsx)(c,{marginTop:1,children:(0,n.jsx)(f,{color:l.dim,children:"No profiles \u2014 use Login to create one"})}),(0,n.jsx)(h,{bindings:[],escBackLabel:"back"})]}):(0,n.jsxs)(c,{flexDirection:"column",borderStyle:"round",borderColor:l.orange,paddingX:2,paddingY:1,children:[(0,n.jsx)(f,{color:l.orange,bold:!0,children:"Profiles"}),(0,n.jsx)(c,{flexDirection:"column",marginTop:1,children:i.map((e,o)=>{let t=o===a,v=t?"\u276F ":" ",b=e.isActive?l.green:t?l.orange:void 0;return(0,n.jsxs)(f,{color:b,children:[v,e.label,e.isActive?" \u25CF active":""]},`${e.profile}-${e.env}`)})}),(0,n.jsx)(h,{bindings:[{keys:"\u2191\u2193",label:"navigate"},{keys:"\u21B5",label:"switch"}],escBackLabel:"back"})]})}export{S as a,M as b};
2
+ import{a as h}from"./chunk-JGXJDTMO.js";import{t as l}from"./chunk-IBDWHXNE.js";import{a as A}from"./chunk-HCBYKLMW.js";import{a as c,b as f,i as P}from"./chunk-C44QQJR4.js";import{a as B}from"./chunk-6YGTRKDT.js";import{e as x}from"./chunk-UR6MHSHU.js";var L=x(B(),1);var n=x(A(),1);function S(r,d,s,u,m){let p=s==="basic"&&u?`basic (${u})`:s,i=20,a=`${r} [${d}]`,g="\xB7".repeat(Math.max(2,i-a.length+3));return{label:`${a} ${g} ${p}`,profile:r,env:d,isActive:m}}function M({creds:r,onSwitch:d,onCancel:s}){let u=r.listProfiles(),m=r.getActiveProfile(),p=r.getDefaultEnv(),i=u.map(e=>{let o=r.loadBasicAuth(e.profile,e.env),t=r.loadCredentials(e.profile,e.env)!==null,v=o?"basic":t?"oauth":"none",b=o?o.username:null,w=e.profile===m&&e.env===p;return S(e.profile,e.env,v,b,w)}),[a,g]=(0,L.useState)(()=>{let e=i.findIndex(o=>o.isActive);return e>=0?e:0});return P((e,o)=>{if(o.escape){s();return}if(o.upArrow){g(t=>Math.max(0,t-1));return}if(o.downArrow){g(t=>Math.min(i.length-1,t+1));return}if(o.return&&i[a]){let t=i[a];t.isActive||d(t.profile,t.env),s();return}}),i.length===0?(0,n.jsxs)(c,{flexDirection:"column",borderStyle:"round",borderColor:l.orange,paddingX:2,paddingY:1,children:[(0,n.jsx)(f,{color:l.orange,bold:!0,children:"Profiles"}),(0,n.jsx)(c,{marginTop:1,children:(0,n.jsx)(f,{color:l.dim,children:"No profiles \u2014 use Login to create one"})}),(0,n.jsx)(h,{bindings:[],escBackLabel:"back"})]}):(0,n.jsxs)(c,{flexDirection:"column",borderStyle:"round",borderColor:l.orange,paddingX:2,paddingY:1,children:[(0,n.jsx)(f,{color:l.orange,bold:!0,children:"Profiles"}),(0,n.jsx)(c,{flexDirection:"column",marginTop:1,children:i.map((e,o)=>{let t=o===a,v=t?"\u276F ":" ",b=e.isActive?l.green:t?l.orange:void 0;return(0,n.jsxs)(f,{color:b,children:[v,e.label,e.isActive?" \u25CF active":""]},`${e.profile}-${e.env}`)})}),(0,n.jsx)(h,{bindings:[{keys:"\u2191\u2193",label:"navigate"},{keys:"\u21B5",label:"switch"}],escBackLabel:"back"})]})}export{S as a,M as b};
@@ -0,0 +1,2 @@
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-YAVIOVVP.js";import{a as d}from"./chunk-LAR7I5SR.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,2 +1,2 @@
1
1
  import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{a as K,b as V,c as z,d as ee,e as te}from"./chunk-M5RHRHFC.js";import{b as J}from"./chunk-SJ7VGRQU.js";import{a as Q}from"./chunk-UJZCMEEH.js";import{g as E}from"./chunk-LRF6UP42.js";import{b as H}from"./chunk-PWHFNSDC.js";import{b as W}from"./chunk-CKY3UXTY.js";import{a as k,b as A,d as Y}from"./chunk-VE3SUJMA.js";import{a as q}from"./chunk-7G7ZLAJH.js";import{a as Z}from"./chunk-BPF7TDRU.js";import{a as _}from"./chunk-J37YPPCD.js";import{a as G}from"./chunk-HCBYKLMW.js";import{a as c,b as u,i as I,j as X}from"./chunk-C44QQJR4.js";import{a as ue}from"./chunk-6YGTRKDT.js";import{a as O}from"./chunk-7CLUJYMW.js";import{e as F}from"./chunk-UR6MHSHU.js";var i=F(ue(),1);var r=F(G(),1);function _e({resultRef:h,mode:d="singleshot",loginCompleteRef:f}){let{exit:m}=X(),C=(0,i.useRef)(new q),S=(0,i.useRef)(new Q),v=(0,i.useRef)(new J),t=C.current,l=S.current,$=v.current,ne=K(),[P,g]=(0,i.useState)(d==="login"?"login":"gate"),[L,re]=(0,i.useState)(null),[de,R]=(0,i.useState)(null),[ge,T]=(0,i.useState)(null),[N,oe]=(0,i.useState)(null),[U,B]=(0,i.useState)([]),x=(0,i.useCallback)((e,n,s,o)=>$.log(e,n,s,o),[$]),pe=(0,i.useCallback)((e,n)=>{e?k(t,l,e,n):l.save({project_id:null,project_name:null,folder_id:null,folder_name:null})},[t,l]),y=(0,i.useCallback)(()=>{d==="login"?(f&&(f.current=!0),m()):g("input")},[d,m,f]),D=(0,i.useCallback)((e,n)=>{let s=k(t,l,e,n);if(d==="login"){g("ensure-project");return}Y(s)?y():s.projectId?g("ensure-folder"):g("ensure-project")},[t,l,y,d]);I((e,n)=>{n.ctrl&&e==="c"&&E(0,"Ctrl+C exit")});let M=(0,i.useRef)(!1);i.default.useEffect(()=>{M.current||(M.current=!0,d!=="login"&&te(t,x).then(e=>{re(e),e.status==="authenticated"?D(e.result.profile,e.result.env):e.status==="needs_pick"?g("pick"):(R(e.profile??null),T(e.env??null),g("login"))}).catch(e=>{oe(`Auth check failed: ${e instanceof Error?e.message:String(e)}`)}))},[t,x]);let ie=(0,i.useCallback)(e=>{h.current={objective:e},m()},[h,m]),se=(0,i.useCallback)(async(e,n)=>{t.setActiveProfile(e),t.setDefaultEnv(n),(await ee(t,e,n,x)).status==="authenticated"?D(e,n):(R(e),T(n),g("login"))},[t,x,D]),w=(0,i.useCallback)(()=>{let e=t.getActiveProfile(),n=t.getDefaultEnv();if(!e)return null;let s=_(n),o=t.loadBasicAuth(e,n);return new Z(s.controllerBaseUrl,async()=>t.loadCredentials(e,n)?.access_token??null,o,x)},[t,x]),le=(0,i.useCallback)(async()=>{let e=w();if(!e)return null;let n=e.cached??await e.resolve();if(!n)return null;let s=_(t.getDefaultEnv()),o=new O(s.tmsBaseUrl,n.username,n.access_key);try{let p=(await o.listProjects()).find(b=>b.name==="KaneAI Generated");if(p)return{id:p.project_id,name:p.name};let j=await o.createProject("KaneAI Generated");return{id:j.id,name:j.name}}catch{return null}},[w,t]),ae=(0,i.useCallback)(async e=>{let n=w();if(!n)return null;let s=n.cached??await n.resolve();if(!s)return null;let o=_(t.getDefaultEnv()),a=new O(o.tmsBaseUrl,s.username,s.access_key);try{let j=(await a.listFolders(e)).find(ce=>ce.name==="Untitled");if(j)return{id:j.id,name:j.name};let b=await a.createFolder(e,"Untitled");return{id:b.id,name:b.name}}catch{return null}},[w,t]);if(P==="gate")return(0,r.jsx)(c,{paddingX:1,children:(0,r.jsx)(u,{color:"yellow",children:"Checking authentication..."})});if(N)return(0,r.jsxs)(c,{flexDirection:"column",paddingX:1,children:[(0,r.jsx)(u,{color:"red",children:N}),(0,r.jsx)(u,{color:"gray",children:"Press Ctrl+C to exit."})]});if(P==="pick"&&L?.status==="needs_pick")return(0,r.jsx)(fe,{profiles:L.profiles,onSelect:se});if(P==="login")return(0,r.jsx)(z,{devMode:process.env.KANE_DEV_MODE==="1",profiles:t.listProfiles(),onBasicLogin:async(e,n,s,o)=>{let{validateBasicAuth:a}=await import("./validate-basic-Y73NBDAD.js");await a(n,s,o),t.saveBasicAuth(e,n,{username:s,access_key:o}),t.setActiveProfile(e),t.setDefaultEnv(n)},onOAuthLogin:async(e,n)=>{let{LoginFlow:s}=await import("./login-flow-LK7GAUCZ.js");t.setDefaultEnv(n),t.setActiveProfile(e),await new s(e,n,t).login()},onComplete:(e,n)=>{R(e),T(n),t.setActiveProfile(e),t.setDefaultEnv(n),D(e,n)},onCancel:()=>{E(0,"Login cancelled")}});if(P==="ensure-project"){let e=t.getActiveProfile()??"default",n=t.getDefaultEnv(),s=()=>{if(d==="login"){g("ensure-folder");return}k(t,l,e,n).folderId?y():g("ensure-folder")};return(0,r.jsxs)(c,{flexDirection:"column",children:[(0,r.jsx)(c,{paddingX:1,marginBottom:1,children:(0,r.jsx)(u,{color:"yellow",children:"Project & folder are required to save tests \xB7 Esc to use defaults \xB7 Ctrl+C to exit"})}),(0,r.jsx)(H,{resolver:w(),currentProjectId:l.load().project_id,env:n,onSelect:(o,a)=>{A(t,l,e,n,{projectId:o,projectName:a}),B(p=>[...p,`\u2713 Project: ${a} (${o})`]),s()},onCancel:async()=>{let o=await le();o&&(A(t,l,e,n,{projectId:o.id,projectName:o.name}),B(a=>[...a,`\u2713 Default project: ${o.name} (${o.id})`]),s())}})]})}if(P==="ensure-folder"){let e=t.getActiveProfile()??"default",n=t.getDefaultEnv(),s=t.loadProfileConfig(e,n);return(0,r.jsxs)(c,{flexDirection:"column",children:[(0,r.jsx)(c,{paddingX:1,marginBottom:1,children:(0,r.jsx)(u,{color:"yellow",children:"Project & folder are required to save tests \xB7 Esc to use defaults \xB7 Ctrl+C to exit"})}),(0,r.jsx)(W,{resolver:w(),projectId:s?.project_id??"",currentFolderId:l.load().folder_id,env:n,onSelect:(o,a)=>{A(t,l,e,n,{folderId:o,folderName:a}),B(p=>[...p,`\u2713 Folder: ${a} (${o})`]),y()},onCancel:async()=>{if(!s?.project_id)return;let o=await ae(s.project_id);o&&(A(t,l,e,n,{folderId:o.id,folderName:o.name}),B(a=>[...a,`\u2713 Default folder: ${o.name} (${o.id})`]),y())}})]})}return P==="input"?(0,r.jsxs)(c,{flexDirection:"column",children:[U.length>0&&(0,r.jsx)(c,{flexDirection:"column",paddingX:1,marginBottom:1,children:U.map((e,n)=>(0,r.jsx)(u,{color:"green",children:e},n))}),(0,r.jsx)(V,{onSubmit:ie,onEscape:()=>E(0,"User pressed Escape"),history:ne,placeholder:"Type an objective..."})]}):(0,r.jsx)(r.Fragment,{})}function fe({profiles:h,onSelect:d}){let[f,m]=(0,i.useState)(0),[C,S]=(0,i.useState)(!1);return I((v,t)=>{if(!C){if(t.escape){E(0,"Profile picker cancelled");return}if(t.upArrow&&f>0&&m(l=>l-1),t.downArrow&&f<h.length-1&&m(l=>l+1),t.return){S(!0);let l=h[f];d(l.profile,l.env).catch(()=>S(!1))}}}),(0,r.jsxs)(c,{flexDirection:"column",paddingX:1,children:[(0,r.jsx)(u,{color:"#ff9500",bold:!0,children:"Select a profile:"}),(0,r.jsx)(c,{marginTop:1,flexDirection:"column",children:h.map((v,t)=>(0,r.jsxs)(u,{children:[t===f?"\u276F ":" ",(0,r.jsx)(u,{color:t===f?"#ff9500":"white",bold:t===f,children:v.profile}),(0,r.jsxs)(u,{color:"gray",children:[" [",v.env,"]"]})]},`${v.profile}-${v.env}`))}),C&&(0,r.jsx)(c,{marginTop:1,children:(0,r.jsx)(u,{color:"yellow",children:"Validating credentials..."})})]})}export{_e as a};
2
+ import{a as K,b as V,c as z,d as ee,e as te}from"./chunk-Z7AXAKPX.js";import{c as J}from"./chunk-AGS57DSG.js";import{a as Q}from"./chunk-YSSBAIJI.js";import{a as Z}from"./chunk-FPFOW6BS.js";import{b as H}from"./chunk-KJEJ7VW5.js";import{b as W}from"./chunk-P7ZUISQG.js";import{g as E}from"./chunk-LOIRZFV3.js";import{a as O}from"./chunk-LPUQ4HWQ.js";import{a as k,b as A,d as Y}from"./chunk-VE3SUJMA.js";import{a as q}from"./chunk-T46Z27UL.js";import{a as _}from"./chunk-LAR7I5SR.js";import{a as G}from"./chunk-HCBYKLMW.js";import{a as c,b as u,i as I,j as X}from"./chunk-C44QQJR4.js";import{a as ue}from"./chunk-6YGTRKDT.js";import{e as F}from"./chunk-UR6MHSHU.js";var i=F(ue(),1);var r=F(G(),1);function _e({resultRef:h,mode:d="singleshot",loginCompleteRef:f}){let{exit:m}=X(),C=(0,i.useRef)(new q),S=(0,i.useRef)(new Q),v=(0,i.useRef)(new J),t=C.current,l=S.current,$=v.current,ne=K(),[P,g]=(0,i.useState)(d==="login"?"login":"gate"),[L,re]=(0,i.useState)(null),[de,R]=(0,i.useState)(null),[ge,T]=(0,i.useState)(null),[N,oe]=(0,i.useState)(null),[U,B]=(0,i.useState)([]),x=(0,i.useCallback)((e,n,s,o)=>$.log(e,n,s,o),[$]),pe=(0,i.useCallback)((e,n)=>{e?k(t,l,e,n):l.save({project_id:null,project_name:null,folder_id:null,folder_name:null})},[t,l]),y=(0,i.useCallback)(()=>{d==="login"?(f&&(f.current=!0),m()):g("input")},[d,m,f]),D=(0,i.useCallback)((e,n)=>{let s=k(t,l,e,n);if(d==="login"){g("ensure-project");return}Y(s)?y():s.projectId?g("ensure-folder"):g("ensure-project")},[t,l,y,d]);I((e,n)=>{n.ctrl&&e==="c"&&E(0,"Ctrl+C exit")});let M=(0,i.useRef)(!1);i.default.useEffect(()=>{M.current||(M.current=!0,d!=="login"&&te(t,x).then(e=>{re(e),e.status==="authenticated"?D(e.result.profile,e.result.env):e.status==="needs_pick"?g("pick"):(R(e.profile??null),T(e.env??null),g("login"))}).catch(e=>{oe(`Auth check failed: ${e instanceof Error?e.message:String(e)}`)}))},[t,x]);let ie=(0,i.useCallback)(e=>{h.current={objective:e},m()},[h,m]),se=(0,i.useCallback)(async(e,n)=>{t.setActiveProfile(e),t.setDefaultEnv(n),(await ee(t,e,n,x)).status==="authenticated"?D(e,n):(R(e),T(n),g("login"))},[t,x,D]),w=(0,i.useCallback)(()=>{let e=t.getActiveProfile(),n=t.getDefaultEnv();if(!e)return null;let s=_(n),o=t.loadBasicAuth(e,n);return new Z(s.controllerBaseUrl,async()=>t.loadCredentials(e,n)?.access_token??null,o,x)},[t,x]),le=(0,i.useCallback)(async()=>{let e=w();if(!e)return null;let n=e.cached??await e.resolve();if(!n)return null;let s=_(t.getDefaultEnv()),o=new O(s.tmsBaseUrl,n.username,n.access_key);try{let p=(await o.listProjects()).find(b=>b.name==="KaneAI Generated");if(p)return{id:p.project_id,name:p.name};let j=await o.createProject("KaneAI Generated");return{id:j.id,name:j.name}}catch{return null}},[w,t]),ae=(0,i.useCallback)(async e=>{let n=w();if(!n)return null;let s=n.cached??await n.resolve();if(!s)return null;let o=_(t.getDefaultEnv()),a=new O(o.tmsBaseUrl,s.username,s.access_key);try{let j=(await a.listFolders(e)).find(ce=>ce.name==="Untitled");if(j)return{id:j.id,name:j.name};let b=await a.createFolder(e,"Untitled");return{id:b.id,name:b.name}}catch{return null}},[w,t]);if(P==="gate")return(0,r.jsx)(c,{paddingX:1,children:(0,r.jsx)(u,{color:"yellow",children:"Checking authentication..."})});if(N)return(0,r.jsxs)(c,{flexDirection:"column",paddingX:1,children:[(0,r.jsx)(u,{color:"red",children:N}),(0,r.jsx)(u,{color:"gray",children:"Press Ctrl+C to exit."})]});if(P==="pick"&&L?.status==="needs_pick")return(0,r.jsx)(fe,{profiles:L.profiles,onSelect:se});if(P==="login")return(0,r.jsx)(z,{devMode:process.env.KANE_DEV_MODE==="1",profiles:t.listProfiles(),onBasicLogin:async(e,n,s,o)=>{let{validateBasicAuth:a}=await import("./validate-basic-VFJZKHOE.js");await a(n,s,o),t.saveBasicAuth(e,n,{username:s,access_key:o}),t.setActiveProfile(e),t.setDefaultEnv(n)},onOAuthLogin:async(e,n)=>{let{LoginFlow:s}=await import("./login-flow-MKAYO6IS.js");t.setDefaultEnv(n),t.setActiveProfile(e),await new s(e,n,t).login()},onComplete:(e,n)=>{R(e),T(n),t.setActiveProfile(e),t.setDefaultEnv(n),D(e,n)},onCancel:()=>{E(0,"Login cancelled")}});if(P==="ensure-project"){let e=t.getActiveProfile()??"default",n=t.getDefaultEnv(),s=()=>{if(d==="login"){g("ensure-folder");return}k(t,l,e,n).folderId?y():g("ensure-folder")};return(0,r.jsxs)(c,{flexDirection:"column",children:[(0,r.jsx)(c,{paddingX:1,marginBottom:1,children:(0,r.jsx)(u,{color:"yellow",children:"Project & folder are required to save tests \xB7 Esc to use defaults \xB7 Ctrl+C to exit"})}),(0,r.jsx)(H,{resolver:w(),currentProjectId:l.load().project_id,env:n,onSelect:(o,a)=>{A(t,l,e,n,{projectId:o,projectName:a}),B(p=>[...p,`\u2713 Project: ${a} (${o})`]),s()},onCancel:async()=>{let o=await le();o&&(A(t,l,e,n,{projectId:o.id,projectName:o.name}),B(a=>[...a,`\u2713 Default project: ${o.name} (${o.id})`]),s())}})]})}if(P==="ensure-folder"){let e=t.getActiveProfile()??"default",n=t.getDefaultEnv(),s=t.loadProfileConfig(e,n);return(0,r.jsxs)(c,{flexDirection:"column",children:[(0,r.jsx)(c,{paddingX:1,marginBottom:1,children:(0,r.jsx)(u,{color:"yellow",children:"Project & folder are required to save tests \xB7 Esc to use defaults \xB7 Ctrl+C to exit"})}),(0,r.jsx)(W,{resolver:w(),projectId:s?.project_id??"",currentFolderId:l.load().folder_id,env:n,onSelect:(o,a)=>{A(t,l,e,n,{folderId:o,folderName:a}),B(p=>[...p,`\u2713 Folder: ${a} (${o})`]),y()},onCancel:async()=>{if(!s?.project_id)return;let o=await ae(s.project_id);o&&(A(t,l,e,n,{folderId:o.id,folderName:o.name}),B(a=>[...a,`\u2713 Default folder: ${o.name} (${o.id})`]),y())}})]})}return P==="input"?(0,r.jsxs)(c,{flexDirection:"column",children:[U.length>0&&(0,r.jsx)(c,{flexDirection:"column",paddingX:1,marginBottom:1,children:U.map((e,n)=>(0,r.jsx)(u,{color:"green",children:e},n))}),(0,r.jsx)(V,{onSubmit:ie,onEscape:()=>E(0,"User pressed Escape"),history:ne,placeholder:"Type an objective..."})]}):(0,r.jsx)(r.Fragment,{})}function fe({profiles:h,onSelect:d}){let[f,m]=(0,i.useState)(0),[C,S]=(0,i.useState)(!1);return I((v,t)=>{if(!C){if(t.escape){E(0,"Profile picker cancelled");return}if(t.upArrow&&f>0&&m(l=>l-1),t.downArrow&&f<h.length-1&&m(l=>l+1),t.return){S(!0);let l=h[f];d(l.profile,l.env).catch(()=>S(!1))}}}),(0,r.jsxs)(c,{flexDirection:"column",paddingX:1,children:[(0,r.jsx)(u,{color:"#ff9500",bold:!0,children:"Select a profile:"}),(0,r.jsx)(c,{marginTop:1,flexDirection:"column",children:h.map((v,t)=>(0,r.jsxs)(u,{children:[t===f?"\u276F ":" ",(0,r.jsx)(u,{color:t===f?"#ff9500":"white",bold:t===f,children:v.profile}),(0,r.jsxs)(u,{color:"gray",children:[" [",v.env,"]"]})]},`${v.profile}-${v.env}`))}),C&&(0,r.jsx)(c,{marginTop:1,children:(0,r.jsx)(u,{color:"yellow",children:"Validating credentials..."})})]})}export{_e as a};
@@ -1,2 +1,2 @@
1
1
  import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{a as c}from"./chunk-HCBYKLMW.js";import{t as a}from"./chunk-3Z4EHIOW.js";import{b as u}from"./chunk-C44QQJR4.js";import{a as l}from"./chunk-6YGTRKDT.js";import{e as n}from"./chunk-UR6MHSHU.js";var s=n(l(),1);var o=n(l(),1);function f(r,e){let t=(0,o.useRef)(r);t.current=r,(0,o.useEffect)(()=>{if(e===null)return;let i=setInterval(()=>t.current(),e);return()=>clearInterval(i)},[e])}var p=n(c(),1),m=["\u280B","\u2819","\u2839","\u2838","\u283C","\u2834","\u2826","\u2827","\u2807","\u280F"];function I({active:r=!0}){let[e,t]=(0,s.useState)(0);return f(()=>{t(i=>(i+1)%m.length)},r?80:null),(0,p.jsx)(u,{color:a.orange,children:r?m[e]:"\u25CF"})}export{f as a,I as b};
2
+ import{t as a}from"./chunk-IBDWHXNE.js";import{a as c}from"./chunk-HCBYKLMW.js";import{b as u}from"./chunk-C44QQJR4.js";import{a as l}from"./chunk-6YGTRKDT.js";import{e as n}from"./chunk-UR6MHSHU.js";var s=n(l(),1);var o=n(l(),1);function f(r,e){let t=(0,o.useRef)(r);t.current=r,(0,o.useEffect)(()=>{if(e===null)return;let i=setInterval(()=>t.current(),e);return()=>clearInterval(i)},[e])}var p=n(c(),1),m=["\u280B","\u2819","\u2839","\u2838","\u283C","\u2834","\u2826","\u2827","\u2807","\u280F"];function I({active:r=!0}){let[e,t]=(0,s.useState)(0);return f(()=>{t(i=>(i+1)%m.length)},r?80:null),(0,p.jsx)(u,{color:a.orange,children:r?m[e]:"\u25CF"})}export{f as a,I as b};
@@ -0,0 +1,22 @@
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-T46Z27UL.js";import{a as y}from"./chunk-LAR7I5SR.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
+ `)){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-HHNMHTYX.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
+ `,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
+ `,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
+ `,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}
8
+ `)){e(JSON.stringify(t))}function x(t,e){if(!t)return{error:`${e} name is required: kane-cli ${e}s create "<name>"`};let r=t.trim();return r.length===0?{error:`${e} name cannot be empty or whitespace`}:r.length>255?{error:`${e} name must be <= 255 characters`}:{name:r}}async function A(t){let e=T(t.limit,t.offset);if("error"in e){process.stderr.write(`error: ${e.error}
9
+ `),a(2,`projects: ${e.error}`);return}let r=await p(t);if(r)try{let n=new m(r.tmsBaseUrl,r.auth.username,r.auth.access_key),{items:o,doneStreaming:i}=await P(n,t.search,e.offset,e.limit),{slice:s,hasMore:c}=j(o,e),l=!i||c,f=s.map(O);g(t)?v(f,{limit:e.limit,offset:e.offset,has_more:l}):b(f,{limit:e.limit,offset:e.offset,total:o.length,hasMore:l,totalIsLowerBound:!i}),a(0,"projects list complete")}catch(n){process.stderr.write(`error: ${n instanceof Error?n.message:String(n)}
10
+ `),a(1,`projects list failed: ${n instanceof Error?n.message:String(n)}`)}}async function I(t,e){let r=x(t,"project");if("error"in r){process.stderr.write(`error: ${r.error}
11
+ `),a(2,`projects create: ${r.error}`);return}let n=await p(e);if(n)try{let i=await new m(n.tmsBaseUrl,n.auth.username,n.auth.access_key).createProject(r.name,e.description),s={id:i.id,name:i.name};g(e)?_(s):(process.stdout.write(`Created project "${s.name}" (${s.id}).
12
+ `),process.stdout.write(`Bind it to your active profile with: kane-cli config project ${s.id}
13
+ `)),a(0,"projects create complete")}catch(o){process.stderr.write(`error: ${o instanceof Error?o.message:String(o)}
14
+ `),a(1,`projects create failed: ${o instanceof Error?o.message:String(o)}`)}}async function F(t){let e=T(t.limit,t.offset,"full-fetch");if("error"in e){process.stderr.write(`error: ${e.error}
15
+ `),a(2,`folders: ${e.error}`);return}let r=await p(t);if(r)try{let o=await new m(r.tmsBaseUrl,r.auth.username,r.auth.access_key).listFolders(t.project),i=C(o,t.search),{slice:s,hasMore:c}=j(i,e),l=s.map(M);g(t)?v(l,{limit:e.limit,offset:e.offset,has_more:c}):b(l,{limit:e.limit,offset:e.offset,total:i.length,hasMore:c}),a(0,"folders list complete")}catch(n){process.stderr.write(`error: ${n instanceof Error?n.message:String(n)}
16
+ `),a(1,`folders list failed: ${n instanceof Error?n.message:String(n)}`)}}async function L(t,e){let r=x(t,"folder");if("error"in r){process.stderr.write(`error: ${r.error}
17
+ `),a(2,`folders create: ${r.error}`);return}let n=await p(e);if(n)try{let i=await new m(n.tmsBaseUrl,n.auth.username,n.auth.access_key).createFolder(e.project,r.name,e.description),s={id:i.id,name:i.name};g(e)?_(s):(process.stdout.write(`Created folder "${s.name}" (${s.id}).
18
+ `),process.stdout.write(`Bind it to your active profile with: kane-cli config folder ${s.id}
19
+ `)),a(0,"folders create complete")}catch(o){process.stderr.write(`error: ${o instanceof Error?o.message:String(o)}
20
+ `),a(1,`folders create failed: ${o instanceof Error?o.message:String(o)}`)}}async function p(t){let e=new h,r=t.profile??e.getActiveProfile()??"default",n=t.env??e.getDefaultEnv(),o=y(n),i=await B(r,n,t);if(!i.ok){let{message:s,exitCode:c}=E(r,n,i);return process.stderr.write(s),a(c,`${i.reason} for "${r}" [${n}]`),null}return{profile:r,envName:n,tmsBaseUrl:o.tmsBaseUrl,auth:i.creds}}function q(t){t.command("projects").description("List or create TMS projects (TTY = friendly output; non-TTY / --agent = NDJSON). After `create`, bind the new id to the active profile with `kane-cli config project <id>`.").argument("<action>","'list' or 'create'").argument("[name]","Project name (required for 'create')").option("--search <term>","Server-side name search (case-insensitive substring; list only)").option("--limit <n>",`Max items to return (1-${u}, default ${$}; list only)`).option("--offset <n>","Skip N items from the start (default 0; list only)").option("--description <text>","Project description (create only; default empty)").option("--profile <name>","Profile name (default: active)").option("--env <name>","Environment (prod or stage)").option("--username <user>","Basic auth username (skip stored creds)").option("--access-key <key>","Basic auth access key").option("--agent","Force NDJSON output (auto-on when stdin is not a TTY)").action(async(e,r,n)=>{if(e==="list")return A(n);if(e==="create")return I(r,n);process.stderr.write(`error: unknown action "${e}" (try: list, create)
21
+ `),a(2,`projects: unknown action "${e}"`)}),t.command("folders").description("List or create TMS folders (TTY = friendly output; non-TTY / --agent = NDJSON). After `create`, bind the new id to the active profile with `kane-cli config folder <id>`.").argument("<action>","'list' or 'create'").argument("[name]","Folder name (required for 'create')").requiredOption("--project <id>","TMS project id (required for both list and create)").option("--search <term>","Client-side name substring filter (case-insensitive; list only)").option("--limit <n>",`Max items to return (1-${u}, default ${$}; list only)`).option("--offset <n>","Skip N items from the start (default 0; list only)").option("--description <text>","Folder description (create only; default empty)").option("--profile <name>","Profile name (default: active)").option("--env <name>","Environment (prod or stage)").option("--username <user>","Basic auth username (skip stored creds)").option("--access-key <key>","Basic auth access key").option("--agent","Force NDJSON output (auto-on when stdin is not a TTY)").action(async(e,r,n)=>{if(e==="list")return F(n);if(e==="create")return L(r,n);process.stderr.write(`error: unknown action "${e}" (try: list, create)
22
+ `),a(2,`folders: unknown action "${e}"`)})}export{T as a,C as b,j as c,v as d,b as e,B as f,E as g,x as h,q as i};
@@ -0,0 +1,17 @@
1
+ import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
+ import{b as m}from"./chunk-L5LI2JF4.js";import{c as h}from"./chunk-IBDWHXNE.js";import{randomUUID as N}from"crypto";import{mkdirSync as F,writeFileSync as f,appendFileSync as A,existsSync as v}from"fs";import{join as a}from"path";import{writeFileSync as w,mkdirSync as x,existsSync as I}from"fs";import{join as p,relative as j}from"path";function _(n){let t=Object.keys(n.frontmatter).length>0?m(n.frontmatter).trimEnd():"",s=["---"];return t&&s.push(t),s.push("---",""),s.push(`# ${n.heading}`,""),n.steps.forEach((i,r)=>{s.push(`## Step ${r+1}`,i,"")}),s.join(`
3
+ `)}function k(n,e){let t={},s={},i=e;for(let[r,l]of Object.entries(n)){if(r.startsWith("global.")||r.startsWith("secrets.user.")||r.startsWith("environment.")){let o=r.startsWith("secrets.user.");t[r]={value:l.value,secret:o,syntax:`{{${r}}}`,type:o?"secret":r.startsWith("environment.")?"environment":"global"},s[r]=r;continue}if(l.secret){let o=`secrets.user.${r}`;t[o]={value:l.value,secret:!0,syntax:`{{secrets.user.${r}}}`,type:"secret"},s[r]=o,i=i.replaceAll(`{{${r}}}`,`{{secrets.user.${r}}}`)}else{let o=`global.${r}`;t[o]={value:l.value,secret:!1,syntax:`{{global.${r}}}`,type:"global"},s[r]=o,i=i.replaceAll(`{{${r}}}`,`{{global.${r}}}`)}}return{variables:t,objective:i,keyMap:s}}var y=/\{\{\s*(?:global|secrets\.user|environment)\.([^{}]+?)\s*\}\}/g;function c(n){return typeof n!="string"||!n.includes("{{")?n:n.replace(y,"{{$1}}")}function d(n){if(typeof n=="string")return c(n);if(Array.isArray(n))return n.map(e=>d(e));if(n&&typeof n=="object"){let e={};for(let[t,s]of Object.entries(n))e[t]=d(s);return e}return n}var L=new Set(["username","access_key","oauth","profile","project_id","folder_id"]),$=new Set(["model","env"]),g=class{constructor(e){this.opts=e}objectives=[];flushed=!1;lastWrittenPath=null;lastCollisionSuffixed=!1;appendObjective(e){this.objectives.push(e)}flush(){if(this.flushed||(this.flushed=!0,this.objectives.length===0))return;let e=this.opts.getName();if(!e)return;let t=p(this.opts.cwd,".testmuai","tests");try{x(t,{recursive:!0})}catch(u){process.stderr.write(`
4
+ \u26A0 Failed to create ${j(this.opts.cwd,t)}/
5
+ ${u.message}
6
+ Your test recording was NOT saved.
7
+
8
+ `);return}let s=p(t,`${e}_test.md`),i=2,r=!1;for(;I(s);)s=p(t,`${e}-${i}_test.md`),i++,r=!0;let l=d(E(this.opts.getResolvedGlobal())),o=_({frontmatter:l,heading:`Session: ${e}`,steps:this.objectives.map(c)});try{w(s,o,"utf8")}catch(u){process.stderr.write(`
9
+ \u26A0 Failed to save your test recording.
10
+ ${u.message}
11
+ Path: ${s}
12
+
13
+ `);return}this.lastWrittenPath=s,this.lastCollisionSuffixed=r}};function E(n){let e={};for(let[t,s]of Object.entries(n))L.has(t)||$.has(t)||(e[t]=s);return e}var D=a(h,"sessions"),b=class{sessionId;sessionDir;runs=[];_flows=[];_nextIndex=0;_started=!1;_testId=null;_testcaseId=null;_projectId=null;_orgId=null;_uploadStatus="pending";_uploadAttempts=0;_uploadError=null;_firstObjective=null;_firstUrl=null;_auteurVariables={};_screenshotSas=null;_model="";_environment="";_profile=null;_plan=null;_startedAt="";_remoteLogger=null;_earlyLogBuffer=[];_recorder=null;_resolvedGlobal={};_sessionName=null;_recordingEnabled=!0;_stepRunRecords=[];constructor(e){this.sessionId=N();let t=e?.baseDir?a(e.baseDir,"sessions"):D;this.sessionDir=a(t,this.sessionId)}setResolvedGlobal(e){this._resolvedGlobal={...this._resolvedGlobal,...e}}setSessionName(e){this._sessionName=e}get sessionName(){return this._sessionName}setRecordingEnabled(e){this._recordingEnabled=e}get recorder(){return this._recorder}flushRecorder(){try{this._recorder?.flush()}catch(e){process.stderr.write(`[recorder] flush failed: ${e.message}
14
+ `)}}start(e){if(!this._started){this._started=!0,this._model=e.model,this._environment=e.environment,this._profile=e.profile,this._startedAt=new Date().toISOString();try{F(this.sessionDir,{recursive:!0}),this._recorder=new g({cwd:process.cwd(),getResolvedGlobal:()=>this._resolvedGlobal,getName:()=>this._sessionName});let t={session_id:this.sessionId,started_at:this._startedAt,model:e.model,environment:e.environment,profile:e.profile,plan:this._plan,objectives:[],runs:[],status:"in_progress"};f(a(this.sessionDir,"session.json"),JSON.stringify(t,null,2)+`
15
+ `)}catch{}this._log(`SESSION START session_id=${this.sessionId}`),this._log(`CONFIG model=${e.model} env=${e.environment} profile=${e.profile}`),this._earlyLogBuffer.push({level:"info",event:"SESSION_START",message:"Session started",context:{session_id:this.sessionId}},{level:"info",event:"CONFIG",message:"Session config",context:{model:e.model,environment:e.environment,profile:e.profile}})}}setPlan(e){this._plan=e;let t={level:"info",event:"SESSION_INFO",message:"Session info",context:{session_id:this.sessionId,plan:e??null}};this._remoteLogger?this._remoteLogger.log(t.level,t.event,t.message,t.context):this._earlyLogBuffer.push(t)}get plan(){return this._plan}setRemoteLogger(e){this._remoteLogger=e;for(let t of this._earlyLogBuffer)e.log(t.level,t.event,t.message,t.context);this._earlyLogBuffer=[]}get hasRemoteLogger(){return this._remoteLogger!==null}setAuteurVariables(e){Object.assign(this._auteurVariables,e)}get auteurVariables(){return this._auteurVariables}setScreenshotSas(e){this._screenshotSas=e}get screenshotSas(){return this._screenshotSas}get screenshotBaseUrl(){return this._screenshotSas?`${this._screenshotSas.base_url}/${this._screenshotSas.container}`:""}get startedAt(){return this._startedAt||new Date().toISOString()}log(e,t,s,i){if(t===void 0){this._log(e);let o=e.indexOf(" "),u=o>0?e.slice(0,o):e,R=o>0?e.slice(o+1):"",S=/fail|error/i.test(e)?"error":"info";this._remoteLogger?.log(S,u,R||e);return}let r=e,l=s;this._log(`${t} ${l}`),this._remoteLogger?.log(r,t,l,i)}logStep(e,t,s){this._log(`${e} ${t}`);let i=this._nextIndex>0?this._nextIndex-1:0;this._remoteLogger?.logStep(i,e,t,s)}logCommand(e){this._log(`COMMAND ${e}`)}logRunStart(e,t,s){this._log(`RUN ${e} START objective="${t.slice(0,100)}" url=${s}`),this._remoteLogger?.setRunIndex(e),this._remoteLogger?.log("info","RUN_START",`Run ${e} started`,{run_index:e,objective:t,url:s})}logRunEnd(e,t,s,i){let r=(s??0).toFixed(1),l=(i??"").slice(0,100);this._log(`RUN ${e} END status=${t} duration=${r}s summary="${l}"`),this._remoteLogger?.log("info","RUN_END",`Run ${e} ended`,{run_index:e,status:t,duration:s??0,summary:i??""}),t!=="failed"&&t!=="error"&&this._remoteLogger?.discardSteps(e)}escalateRun(e){this._remoteLogger?.escalate(e)}logChromeLaunch(e,t){this._log(`CHROME LAUNCH port=${e} endpoint=${t}`),this._remoteLogger?.log("info","CHROME_LAUNCH","Chrome launched",{port:e,cdp_endpoint:t})}async finish(e="complete"){this._log(`SESSION END status=${e} total_runs=${this.runs.length}`),this._remoteLogger?.log("info","SESSION_END","Session ended",{status:e,total_runs:this.runs.length}),await this._remoteLogger?.shutdown();let t={session_id:this.sessionId,started_at:this._startedAt,ended_at:new Date().toISOString(),model:this._model,environment:this._environment,profile:this._profile,plan:this._plan,status:e,total_runs:this.runs.length,test_id:this._testId,testcase_id:this._testcaseId,commit_id:this.sessionId,project_id:this._projectId,upload_status:this._uploadStatus,upload_attempts:this._uploadAttempts,last_upload_attempt:this._uploadAttempts>0?new Date().toISOString():null,upload_error:this._uploadError,runs:this.runs.map(s=>({index:s.index,objective:s.objective,status:s.status,summary:s.summary,run_dir:s.run_dir}))};v(this.sessionDir)&&f(a(this.sessionDir,"session.json"),JSON.stringify(t,null,2)+`
16
+ `),this.flushRecorder(),this._recorder=null}nextRunIndex(){return this._nextIndex}addRunResult(e,t){this.runs.push(e),this._nextIndex+=t??1,this._recordingEnabled&&this._recorder?.appendObjective(e.objective)}getContext(){return{prior_runs:this.runs.map(e=>({index:e.index,objective:e.objective,summary:e.summary,status:e.status,memory:e.context.memory,variables:e.context.variables,pointer:e.context.pointer}))}}addFlow(e){let t={...e,index:this._flows.length+1};return this._flows.push(t),t}getFlows(){return[...this._flows]}getFlow(e){return this._flows.find(t=>t.index===e)}clearFlows(){this._flows=[]}recordStepRun(e){this._stepRunRecords.push(e)}getStepRunRecords(){return[...this._stepRunRecords]}getRunsAsStepRecords(){return this.runs.map((e,t)=>({testmdStepIndex:t+1,runIndex:e.index,totalRunDirs:e.run_dirs?.length??1}))}snapshot(){return{runsLen:this.runs.length,nextRunIndex:this._nextIndex,stepRunRecordsLen:this._stepRunRecords.length}}rollback(e){this.runs.length=e.runsLen,this._nextIndex=e.nextRunIndex,this._stepRunRecords.length=e.stepRunRecordsLen}setTestId(e){this._testId=e}get testId(){return this._testId}setTestcaseId(e){this._testcaseId=e}get testcaseId(){return this._testcaseId}setProjectId(e){this._projectId=e}setOrgId(e){this._orgId=e}get orgId(){return this._orgId}setFirstRun(e,t){this._firstObjective||(this._firstObjective=e,this._firstUrl=t)}get firstObjective(){return this._firstObjective}get firstUrl(){return this._firstUrl}getRunDirs(){let e=[];for(let t of this.runs)t.run_dirs&&t.run_dirs.length>0?e.push(...t.run_dirs):t.run_dir&&e.push(t.run_dir);return e}getRunObjectives(){let e=[];for(let t of this.runs)t.flow_objectives&&t.flow_objectives.length>0?e.push(...t.flow_objectives):e.push(t.objective);return e}getRunMetadata(){let e=[];for(let t of this.runs)if(t.perFlowMetadata&&t.perFlowMetadata.length>0)e.push(...t.perFlowMetadata);else{let s={resultCode:t.resultCode,reasonCode:t.reasonCode,errorMessage:t.status==="failed"?t.summary??null:null,summary:t.summary,oneLiner:t.oneLiner},i=t.run_dirs?.length??1;for(let r=0;r<i;r++)e.push(s)}return e}setUploadStatus(e,t){this._uploadStatus=e,this._uploadAttempts+=1,this._uploadError=t??null}_log(e){if(!(!this._started||!v(this.sessionDir)))try{let t=new Date().toISOString().slice(0,19).replace("T"," "),s=a(this.sessionDir,"tui.log");A(s,`[${t}] ${e}
17
+ `)}catch{}}};export{_ as a,k as b,b as c};
@@ -0,0 +1,2 @@
1
+ import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
+ import{a as l}from"./chunk-HCBYKLMW.js";import{a as i,d as a}from"./chunk-C44QQJR4.js";import{a as b}from"./chunk-6YGTRKDT.js";import{e as c}from"./chunk-UR6MHSHU.js";var e=c(b(),1);var t=c(l(),1),d=(0,e.createContext)(null);function f({children:o}){let[n,p]=(0,e.useState)([]),s=(0,e.useRef)(0),u=(0,e.useMemo)(()=>({append:r=>p(S=>[...S,{id:`sb-${++s.current}`,content:r}])}),[]);return(0,t.jsxs)(d.Provider,{value:u,children:[n.length>0&&(0,t.jsx)(a,{items:n,children:r=>(0,t.jsx)(i,{children:r.content},r.id)}),o]})}function v(){let o=(0,e.useContext)(d);if(!o)throw new Error("useScrollback must be used within a ScrollbackProvider. Wrap this Ink render() root in <ScrollbackProvider>. Never render <Static> directly \u2014 push via append().");return o}export{f as a,v as b};
@@ -0,0 +1,6 @@
1
+ import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
+ import{b as l,d,e as m,f as g,g as S,k as y}from"./chunk-AH4AXJML.js";import{a as u}from"./chunk-YSSBAIJI.js";import{g as p,h as f}from"./chunk-LOIRZFV3.js";import{existsSync as s,mkdirSync as h,readFileSync as C,renameSync as w,writeFileSync as R}from"fs";import{join as x}from"path";function G(e){y(l(e));let r=l(e);if(!s(r))return;let n=x(r,"meta.json"),o=m(e);if(s(n)&&!s(o))try{h(d(e),{recursive:!0}),w(n,o)}catch(t){process.stderr.write(`warn: meta.json migration failed: ${t.message}
3
+ `)}let a=S(e);if(s(a)){let t="python";try{let i=new u().load();i.code_export?.language&&(t=i.code_export.language)}catch{}let c=g(e,"playwright",t);if(!s(c))try{w(a,c)}catch(i){process.stderr.write(`warn: generated-code migration failed: ${i.message}
4
+ `)}}if(s(o))try{let t=JSON.parse(C(o,"utf8"));"md5sum"in t&&(delete t.md5sum,R(o,JSON.stringify(t,null,2)+`
5
+ `,"utf8"))}catch(t){process.stderr.write(`warn: meta.json md5sum strip failed: ${t.message}
6
+ `)}}async function O(e){if(!e.isInteractive)return{recovered:!1};if(E(e.creds))return{recovered:!1};let{SingleShotApp:r}=await import("./SingleShotApp-V2UTGNZO.js"),{ScrollbackProvider:n}=await import("./scrollback-6GINSTL2.js"),{render:o}=await import("./build-JIKYOZUH.js"),a=await import("./react-QWOAB3TB.js"),t={current:null},c={current:!1},{waitUntilExit:i,unmount:v}=o(a.default.createElement(n,null,a.default.createElement(r,{resultRef:t,mode:"login",loginCompleteRef:c})),{exitOnCtrlC:!1});f(()=>v()),await i();try{process.stdin.setRawMode?.(!1)}catch{}return process.stdout.write("\x1B[?25h"),c.current?{recovered:!0}:(p(0,"Startup gate cancelled"),{recovered:!1})}function E(e){let r=e.getActiveProfile(),n=e.getDefaultEnv();if(!r||!!!(e.loadBasicAuth(r,n)||e.loadCredentials(r,n)))return!1;let a=e.loadProfileConfig(r,n)??{};return!!a.project_id&&!!a.folder_id}export{G as a,O as b};
@@ -1,2 +1,2 @@
1
1
  import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{a as x}from"./chunk-HCBYKLMW.js";import{t as m}from"./chunk-3Z4EHIOW.js";import{a as u,b as a,j as g}from"./chunk-C44QQJR4.js";import{a as b}from"./chunk-6YGTRKDT.js";import{e as f}from"./chunk-UR6MHSHU.js";var T=f(b(),1);function k(i,n){if(!n)return i;let l=i.trim()||n;return`\x1B]8;;${n}\x07${l}\x1B]8;;\x07`}var r=f(x(),1);function $({shareableLink:i,testCaseLink:n,codeExportDir:l,recordedTestPath:s,outputDir:o,autoExit:p=!0}){let{exit:c}=g();(0,T.useEffect)(()=>{if(!p)return;let t=setTimeout(()=>c(),100);return()=>clearTimeout(t)},[c,p]);let e=[];return s&&e.push({label:"Test",url:s,linkUrl:`file://${s}`}),o&&e.push({label:"Output",url:o,linkUrl:`file://${o}`}),i&&e.push({label:"ShareLink",url:i}),n&&e.push({label:"TestCase",url:n}),l&&!o&&e.push({label:"CodeExport",url:l,linkUrl:`file://${l}`}),e.length===0?(0,r.jsx)(r.Fragment,{}):(0,r.jsx)(u,{flexDirection:"column",marginTop:1,marginLeft:1,children:e.map(t=>(0,r.jsxs)(u,{flexDirection:"column",marginBottom:1,children:[(0,r.jsxs)(a,{color:m.orange,children:[t.label,":"]}),(0,r.jsx)(a,{color:m.dim,children:k(t.url,t.linkUrl??t.url)})]},t.label))})}export{$ as a};
2
+ import{t as m}from"./chunk-IBDWHXNE.js";import{a as x}from"./chunk-HCBYKLMW.js";import{a as u,b as a,j as g}from"./chunk-C44QQJR4.js";import{a as b}from"./chunk-6YGTRKDT.js";import{e as f}from"./chunk-UR6MHSHU.js";var T=f(b(),1);function k(i,n){if(!n)return i;let l=i.trim()||n;return`\x1B]8;;${n}\x07${l}\x1B]8;;\x07`}var r=f(x(),1);function $({shareableLink:i,testCaseLink:n,codeExportDir:l,recordedTestPath:s,outputDir:o,autoExit:p=!0}){let{exit:c}=g();(0,T.useEffect)(()=>{if(!p)return;let t=setTimeout(()=>c(),100);return()=>clearTimeout(t)},[c,p]);let e=[];return s&&e.push({label:"Test",url:s,linkUrl:`file://${s}`}),o&&e.push({label:"Output",url:o,linkUrl:`file://${o}`}),i&&e.push({label:"ShareLink",url:i}),n&&e.push({label:"TestCase",url:n}),l&&!o&&e.push({label:"CodeExport",url:l,linkUrl:`file://${l}`}),e.length===0?(0,r.jsx)(r.Fragment,{}):(0,r.jsx)(u,{flexDirection:"column",marginTop:1,marginLeft:1,children:e.map(t=>(0,r.jsxs)(u,{flexDirection:"column",marginBottom:1,children:[(0,r.jsxs)(a,{color:m.orange,children:[t.label,":"]}),(0,r.jsx)(a,{color:m.dim,children:k(t.url,t.linkUrl??t.url)})]},t.label))})}export{$ as a};
@@ -1,5 +1,5 @@
1
1
  import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{a as Oc,b as Ic}from"./chunk-MDBXYXSC.js";import{a as Ac}from"./chunk-WAOCHXJ5.js";import{a as Rc}from"./chunk-7CLUJYMW.js";import{a as Tc}from"./chunk-NLCCBXXV.js";import{a as Xt}from"./chunk-RZ4F3BHX.js";import{a as P,b as QE,c as g,d as XE,e as JE,f as ev}from"./chunk-UR6MHSHU.js";var qc=g((XB,Fc)=>{"use strict";var fv=typeof process=="object"&&process&&process.platform==="win32";Fc.exports=fv?{sep:"\\"}:{sep:"/"}});var zc=g((JB,Wc)=>{"use strict";Wc.exports=Bc;function Bc(t,e,r){t instanceof RegExp&&(t=jc(t,r)),e instanceof RegExp&&(e=jc(e,r));var i=Uc(t,e,r);return i&&{start:i[0],end:i[1],pre:r.slice(0,i[0]),body:r.slice(i[0]+t.length,i[1]),post:r.slice(i[1]+e.length)}}function jc(t,e){var r=e.match(t);return r?r[0]:null}Bc.range=Uc;function Uc(t,e,r){var i,n,s,o,a,l=r.indexOf(t),u=r.indexOf(e,l+1),f=l;if(l>=0&&u>0){if(t===e)return[l,u];for(i=[],s=r.length;f>=0&&!a;)f==l?(i.push(f),l=r.indexOf(t,f+1)):i.length==1?a=[i.pop(),u]:(n=i.pop(),n<s&&(s=n,o=u),u=r.indexOf(e,f+1)),f=l<u&&l>=0?l:u;i.length&&(a=[s,o])}return a}});var oa=g((e3,Zc)=>{"use strict";var Gc=zc();Zc.exports=dv;var $c="\0SLASH"+Math.random()+"\0",Hc="\0OPEN"+Math.random()+"\0",sa="\0CLOSE"+Math.random()+"\0",Vc="\0COMMA"+Math.random()+"\0",Yc="\0PERIOD"+Math.random()+"\0";function na(t){return parseInt(t,10)==t?parseInt(t,10):t.charCodeAt(0)}function cv(t){return t.split("\\\\").join($c).split("\\{").join(Hc).split("\\}").join(sa).split("\\,").join(Vc).split("\\.").join(Yc)}function hv(t){return t.split($c).join("\\").split(Hc).join("{").split(sa).join("}").split(Vc).join(",").split(Yc).join(".")}function Kc(t){if(!t)return[""];var e=[],r=Gc("{","}",t);if(!r)return t.split(",");var i=r.pre,n=r.body,s=r.post,o=i.split(",");o[o.length-1]+="{"+n+"}";var a=Kc(s);return s.length&&(o[o.length-1]+=a.shift(),o.push.apply(o,a)),e.push.apply(e,o),e}function dv(t){return t?(t.substr(0,2)==="{}"&&(t="\\{\\}"+t.substr(2)),_i(cv(t),!0).map(hv)):[]}function pv(t){return"{"+t+"}"}function gv(t){return/^-?0\d/.test(t)}function _v(t,e){return t<=e}function yv(t,e){return t>=e}function _i(t,e){var r=[],i=Gc("{","}",t);if(!i)return[t];var n=i.pre,s=i.post.length?_i(i.post,!1):[""];if(/\$$/.test(i.pre))for(var o=0;o<s.length;o++){var a=n+"{"+i.body+"}"+s[o];r.push(a)}else{var l=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(i.body),u=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(i.body),f=l||u,c=i.body.indexOf(",")>=0;if(!f&&!c)return i.post.match(/,(?!,).*\}/)?(t=i.pre+"{"+i.body+sa+i.post,_i(t)):[t];var h;if(f)h=i.body.split(/\.\./);else if(h=Kc(i.body),h.length===1&&(h=_i(h[0],!1).map(pv),h.length===1))return s.map(function(R){return i.pre+h[0]+R});var d;if(f){var m=na(h[0]),p=na(h[1]),S=Math.max(h[0].length,h[1].length),y=h.length==3?Math.max(Math.abs(na(h[2])),1):1,b=_v,v=p<m;v&&(y*=-1,b=yv);var E=h.some(gv);d=[];for(var T=m;b(T,p);T+=y){var D;if(u)D=String.fromCharCode(T),D==="\\"&&(D="");else if(D=String(T),E){var x=S-D.length;if(x>0){var O=new Array(x+1).join("0");T<0?D="-"+O+D.slice(1):D=O+D}}d.push(D)}}else{d=[];for(var w=0;w<h.length;w++)d.push.apply(d,_i(h[w],!1))}for(var w=0;w<d.length;w++)for(var o=0;o<s.length;o++){var a=n+d[w]+s[o];(!e||f||a)&&r.push(a)}}return r}});var rh=g((r3,ca)=>{"use strict";var Ne=ca.exports=(t,e,r={})=>(Fn(e),!r.nocomment&&e.charAt(0)==="#"?!1:new Er(e,r).match(t));ca.exports=Ne;var ua=qc();Ne.sep=ua.sep;var Ae=Symbol("globstar **");Ne.GLOBSTAR=Ae;var mv=oa(),Qc={"!":{open:"(?:(?!(?:",close:"))[^/]*?)"},"?":{open:"(?:",close:")?"},"+":{open:"(?:",close:")+"},"*":{open:"(?:",close:")*"},"@":{open:"(?:",close:")"}},fa="[^/]",aa=fa+"*?",bv="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",wv="(?:(?!(?:\\/|^)\\.).)*?",eh=t=>t.split("").reduce((e,r)=>(e[r]=!0,e),{}),Xc=eh("().*{}+?[]^$\\!"),Sv=eh("[.("),Jc=/\/+/;Ne.filter=(t,e={})=>(r,i,n)=>Ne(r,t,e);var Rt=(t,e={})=>{let r={};return Object.keys(t).forEach(i=>r[i]=t[i]),Object.keys(e).forEach(i=>r[i]=e[i]),r};Ne.defaults=t=>{if(!t||typeof t!="object"||!Object.keys(t).length)return Ne;let e=Ne,r=(i,n,s)=>e(i,n,Rt(t,s));return r.Minimatch=class extends e.Minimatch{constructor(n,s){super(n,Rt(t,s))}},r.Minimatch.defaults=i=>e.defaults(Rt(t,i)).Minimatch,r.filter=(i,n)=>e.filter(i,Rt(t,n)),r.defaults=i=>e.defaults(Rt(t,i)),r.makeRe=(i,n)=>e.makeRe(i,Rt(t,n)),r.braceExpand=(i,n)=>e.braceExpand(i,Rt(t,n)),r.match=(i,n,s)=>e.match(i,n,Rt(t,s)),r};Ne.braceExpand=(t,e)=>th(t,e);var th=(t,e={})=>(Fn(t),e.nobrace||!/\{(?:(?!\{).)*\}/.test(t)?[t]:mv(t)),Ev=1024*64,Fn=t=>{if(typeof t!="string")throw new TypeError("invalid pattern");if(t.length>Ev)throw new TypeError("pattern is too long")},la=Symbol("subparse");Ne.makeRe=(t,e)=>new Er(t,e||{}).makeRe();Ne.match=(t,e,r={})=>{let i=new Er(e,r);return t=t.filter(n=>i.match(n)),i.options.nonull&&!t.length&&t.push(e),t};var vv=t=>t.replace(/\\(.)/g,"$1"),xv=t=>t.replace(/\\([^-\]])/g,"$1"),Tv=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),Rv=t=>t.replace(/[[\]\\]/g,"\\$&"),Er=class{constructor(e,r){Fn(e),r||(r={}),this.options=r,this.maxGlobstarRecursion=r.maxGlobstarRecursion!==void 0?r.maxGlobstarRecursion:200,this.set=[],this.pattern=e,this.windowsPathsNoEscape=!!r.windowsPathsNoEscape||r.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.regexp=null,this.negate=!1,this.comment=!1,this.empty=!1,this.partial=!!r.partial,this.make()}debug(){}make(){let e=this.pattern,r=this.options;if(!r.nocomment&&e.charAt(0)==="#"){this.comment=!0;return}if(!e){this.empty=!0;return}this.parseNegate();let i=this.globSet=this.braceExpand();r.debug&&(this.debug=(...n)=>console.error(...n)),this.debug(this.pattern,i),i=this.globParts=i.map(n=>n.split(Jc)),this.debug(this.pattern,i),i=i.map((n,s,o)=>n.map(this.parse,this)),this.debug(this.pattern,i),i=i.filter(n=>n.indexOf(!1)===-1),this.debug(this.pattern,i),this.set=i}parseNegate(){if(this.options.nonegate)return;let e=this.pattern,r=!1,i=0;for(let n=0;n<e.length&&e.charAt(n)==="!";n++)r=!r,i++;i&&(this.pattern=e.slice(i)),this.negate=r}matchOne(e,r,i){return r.indexOf(Ae)!==-1?this._matchGlobstar(e,r,i,0,0):this._matchOne(e,r,i,0,0)}_matchGlobstar(e,r,i,n,s){let o=-1;for(let b=s;b<r.length;b++)if(r[b]===Ae){o=b;break}let a=-1;for(let b=r.length-1;b>=0;b--)if(r[b]===Ae){a=b;break}let l=r.slice(s,o),u=i?r.slice(o+1):r.slice(o+1,a),f=i?[]:r.slice(a+1);if(l.length){let b=e.slice(n,n+l.length);if(!this._matchOne(b,l,i,0,0))return!1;n+=l.length}let c=0;if(f.length){if(f.length+n>e.length)return!1;let b=e.length-f.length;if(this._matchOne(e,f,i,b,0))c=f.length;else{if(e[e.length-1]!==""||n+f.length===e.length||!this._matchOne(e,f,i,b-1,0))return!1;c=f.length+1}}if(!u.length){let b=!!c;for(let v=n;v<e.length-c;v++){let E=String(e[v]);if(b=!0,E==="."||E===".."||!this.options.dot&&E.charAt(0)===".")return!1}return i||b}let h=[[[],0]],d=h[0],m=0,p=[0];for(let b of u)b===Ae?(p.push(m),d=[[],0],h.push(d)):(d[0].push(b),m++);let S=h.length-1,y=e.length-c;for(let b of h)b[1]=y-(p[S--]+b[0].length);return!!this._matchGlobStarBodySections(e,h,n,0,i,0,!!c)}_matchGlobStarBodySections(e,r,i,n,s,o,a){let l=r[n];if(!l){for(let c=i;c<e.length;c++){a=!0;let h=e[c];if(h==="."||h===".."||!this.options.dot&&h.charAt(0)===".")return!1}return a}let[u,f]=l;for(;i<=f;){if(this._matchOne(e.slice(0,i+u.length),u,s,i,0)&&o<this.maxGlobstarRecursion){let d=this._matchGlobStarBodySections(e,r,i+u.length,n+1,s,o+1,a);if(d!==!1)return d}let h=e[i];if(h==="."||h===".."||!this.options.dot&&h.charAt(0)===".")return!1;i++}return s||null}_matchOne(e,r,i,n,s){let o,a,l,u;for(o=n,a=s,l=e.length,u=r.length;o<l&&a<u;o++,a++){this.debug("matchOne loop");let f=r[a],c=e[o];if(this.debug(r,f,c),f===!1||f===Ae)return!1;let h;if(typeof f=="string"?(h=c===f,this.debug("string match",f,c,h)):(h=c.match(f),this.debug("pattern match",f,c,h)),!h)return!1}if(o===l&&a===u)return!0;if(o===l)return i;if(a===u)return o===l-1&&e[o]==="";throw new Error("wtf?")}braceExpand(){return th(this.pattern,this.options)}parse(e,r){Fn(e);let i=this.options;if(e==="**")if(i.noglobstar)e="*";else return Ae;if(e==="")return"";let n="",s=!1,o=!1,a=[],l=[],u,f=!1,c=-1,h=-1,d,m,p,S=e.charAt(0)===".",y=i.dot||S,b=()=>S?"":y?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)",v=x=>x.charAt(0)==="."?"":i.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)",E=()=>{if(u){switch(u){case"*":n+=aa,s=!0;break;case"?":n+=fa,s=!0;break;default:n+="\\"+u;break}this.debug("clearStateChar %j %j",u,n),u=!1}};for(let x=0,O;x<e.length&&(O=e.charAt(x));x++){if(this.debug("%s %s %s %j",e,x,n,O),o){if(O==="/")return!1;Xc[O]&&(n+="\\"),n+=O,o=!1;continue}switch(O){case"/":return!1;case"\\":if(f&&e.charAt(x+1)==="-"){n+=O;continue}E(),o=!0;continue;case"?":case"*":case"+":case"@":case"!":if(this.debug("%s %s %s %j <-- stateChar",e,x,n,O),f){this.debug(" in class"),O==="!"&&x===h+1&&(O="^"),n+=O;continue}if(O==="*"&&u==="*")continue;this.debug("call clearStateChar %j",u),E(),u=O,i.noext&&E();continue;case"(":{if(f){n+="(";continue}if(!u){n+="\\(";continue}let w={type:u,start:x-1,reStart:n.length,open:Qc[u].open,close:Qc[u].close};this.debug(this.pattern," ",w),a.push(w),n+=w.open,w.start===0&&w.type!=="!"&&(S=!0,n+=v(e.slice(x+1))),this.debug("plType %j %j",u,n),u=!1;continue}case")":{let w=a[a.length-1];if(f||!w){n+="\\)";continue}a.pop(),E(),s=!0,m=w,n+=m.close,m.type==="!"&&l.push(Object.assign(m,{reEnd:n.length}));continue}case"|":{let w=a[a.length-1];if(f||!w){n+="\\|";continue}E(),n+="|",w.start===0&&w.type!=="!"&&(S=!0,n+=v(e.slice(x+1)));continue}case"[":if(E(),f){n+="\\"+O;continue}f=!0,h=x,c=n.length,n+=O;continue;case"]":if(x===h+1||!f){n+="\\"+O;continue}d=e.substring(h+1,x);try{RegExp("["+Rv(xv(d))+"]"),n+=O}catch{n=n.substring(0,c)+"(?:$.)"}s=!0,f=!1;continue;default:E(),Xc[O]&&!(O==="^"&&f)&&(n+="\\"),n+=O;break}}for(f&&(d=e.slice(h+1),p=this.parse(d,la),n=n.substring(0,c)+"\\["+p[0],s=s||p[1]),m=a.pop();m;m=a.pop()){let x;x=n.slice(m.reStart+m.open.length),this.debug("setting tail",n,m),x=x.replace(/((?:\\{2}){0,64})(\\?)\|/g,(w,R,A)=>(A||(A="\\"),R+R+A+"|")),this.debug(`tail=%j
2
+ import{a as Oc,b as Ic}from"./chunk-MDBXYXSC.js";import{a as Ac}from"./chunk-WAOCHXJ5.js";import{a as Rc}from"./chunk-LPUQ4HWQ.js";import{a as Tc}from"./chunk-NLCCBXXV.js";import{a as Xt}from"./chunk-RZ4F3BHX.js";import{a as P,b as QE,c as g,d as XE,e as JE,f as ev}from"./chunk-UR6MHSHU.js";var qc=g((XB,Fc)=>{"use strict";var fv=typeof process=="object"&&process&&process.platform==="win32";Fc.exports=fv?{sep:"\\"}:{sep:"/"}});var zc=g((JB,Wc)=>{"use strict";Wc.exports=Bc;function Bc(t,e,r){t instanceof RegExp&&(t=jc(t,r)),e instanceof RegExp&&(e=jc(e,r));var i=Uc(t,e,r);return i&&{start:i[0],end:i[1],pre:r.slice(0,i[0]),body:r.slice(i[0]+t.length,i[1]),post:r.slice(i[1]+e.length)}}function jc(t,e){var r=e.match(t);return r?r[0]:null}Bc.range=Uc;function Uc(t,e,r){var i,n,s,o,a,l=r.indexOf(t),u=r.indexOf(e,l+1),f=l;if(l>=0&&u>0){if(t===e)return[l,u];for(i=[],s=r.length;f>=0&&!a;)f==l?(i.push(f),l=r.indexOf(t,f+1)):i.length==1?a=[i.pop(),u]:(n=i.pop(),n<s&&(s=n,o=u),u=r.indexOf(e,f+1)),f=l<u&&l>=0?l:u;i.length&&(a=[s,o])}return a}});var oa=g((e3,Zc)=>{"use strict";var Gc=zc();Zc.exports=dv;var $c="\0SLASH"+Math.random()+"\0",Hc="\0OPEN"+Math.random()+"\0",sa="\0CLOSE"+Math.random()+"\0",Vc="\0COMMA"+Math.random()+"\0",Yc="\0PERIOD"+Math.random()+"\0";function na(t){return parseInt(t,10)==t?parseInt(t,10):t.charCodeAt(0)}function cv(t){return t.split("\\\\").join($c).split("\\{").join(Hc).split("\\}").join(sa).split("\\,").join(Vc).split("\\.").join(Yc)}function hv(t){return t.split($c).join("\\").split(Hc).join("{").split(sa).join("}").split(Vc).join(",").split(Yc).join(".")}function Kc(t){if(!t)return[""];var e=[],r=Gc("{","}",t);if(!r)return t.split(",");var i=r.pre,n=r.body,s=r.post,o=i.split(",");o[o.length-1]+="{"+n+"}";var a=Kc(s);return s.length&&(o[o.length-1]+=a.shift(),o.push.apply(o,a)),e.push.apply(e,o),e}function dv(t){return t?(t.substr(0,2)==="{}"&&(t="\\{\\}"+t.substr(2)),_i(cv(t),!0).map(hv)):[]}function pv(t){return"{"+t+"}"}function gv(t){return/^-?0\d/.test(t)}function _v(t,e){return t<=e}function yv(t,e){return t>=e}function _i(t,e){var r=[],i=Gc("{","}",t);if(!i)return[t];var n=i.pre,s=i.post.length?_i(i.post,!1):[""];if(/\$$/.test(i.pre))for(var o=0;o<s.length;o++){var a=n+"{"+i.body+"}"+s[o];r.push(a)}else{var l=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(i.body),u=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(i.body),f=l||u,c=i.body.indexOf(",")>=0;if(!f&&!c)return i.post.match(/,(?!,).*\}/)?(t=i.pre+"{"+i.body+sa+i.post,_i(t)):[t];var h;if(f)h=i.body.split(/\.\./);else if(h=Kc(i.body),h.length===1&&(h=_i(h[0],!1).map(pv),h.length===1))return s.map(function(R){return i.pre+h[0]+R});var d;if(f){var m=na(h[0]),p=na(h[1]),S=Math.max(h[0].length,h[1].length),y=h.length==3?Math.max(Math.abs(na(h[2])),1):1,b=_v,v=p<m;v&&(y*=-1,b=yv);var E=h.some(gv);d=[];for(var T=m;b(T,p);T+=y){var D;if(u)D=String.fromCharCode(T),D==="\\"&&(D="");else if(D=String(T),E){var x=S-D.length;if(x>0){var O=new Array(x+1).join("0");T<0?D="-"+O+D.slice(1):D=O+D}}d.push(D)}}else{d=[];for(var w=0;w<h.length;w++)d.push.apply(d,_i(h[w],!1))}for(var w=0;w<d.length;w++)for(var o=0;o<s.length;o++){var a=n+d[w]+s[o];(!e||f||a)&&r.push(a)}}return r}});var rh=g((r3,ca)=>{"use strict";var Ne=ca.exports=(t,e,r={})=>(Fn(e),!r.nocomment&&e.charAt(0)==="#"?!1:new Er(e,r).match(t));ca.exports=Ne;var ua=qc();Ne.sep=ua.sep;var Ae=Symbol("globstar **");Ne.GLOBSTAR=Ae;var mv=oa(),Qc={"!":{open:"(?:(?!(?:",close:"))[^/]*?)"},"?":{open:"(?:",close:")?"},"+":{open:"(?:",close:")+"},"*":{open:"(?:",close:")*"},"@":{open:"(?:",close:")"}},fa="[^/]",aa=fa+"*?",bv="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",wv="(?:(?!(?:\\/|^)\\.).)*?",eh=t=>t.split("").reduce((e,r)=>(e[r]=!0,e),{}),Xc=eh("().*{}+?[]^$\\!"),Sv=eh("[.("),Jc=/\/+/;Ne.filter=(t,e={})=>(r,i,n)=>Ne(r,t,e);var Rt=(t,e={})=>{let r={};return Object.keys(t).forEach(i=>r[i]=t[i]),Object.keys(e).forEach(i=>r[i]=e[i]),r};Ne.defaults=t=>{if(!t||typeof t!="object"||!Object.keys(t).length)return Ne;let e=Ne,r=(i,n,s)=>e(i,n,Rt(t,s));return r.Minimatch=class extends e.Minimatch{constructor(n,s){super(n,Rt(t,s))}},r.Minimatch.defaults=i=>e.defaults(Rt(t,i)).Minimatch,r.filter=(i,n)=>e.filter(i,Rt(t,n)),r.defaults=i=>e.defaults(Rt(t,i)),r.makeRe=(i,n)=>e.makeRe(i,Rt(t,n)),r.braceExpand=(i,n)=>e.braceExpand(i,Rt(t,n)),r.match=(i,n,s)=>e.match(i,n,Rt(t,s)),r};Ne.braceExpand=(t,e)=>th(t,e);var th=(t,e={})=>(Fn(t),e.nobrace||!/\{(?:(?!\{).)*\}/.test(t)?[t]:mv(t)),Ev=1024*64,Fn=t=>{if(typeof t!="string")throw new TypeError("invalid pattern");if(t.length>Ev)throw new TypeError("pattern is too long")},la=Symbol("subparse");Ne.makeRe=(t,e)=>new Er(t,e||{}).makeRe();Ne.match=(t,e,r={})=>{let i=new Er(e,r);return t=t.filter(n=>i.match(n)),i.options.nonull&&!t.length&&t.push(e),t};var vv=t=>t.replace(/\\(.)/g,"$1"),xv=t=>t.replace(/\\([^-\]])/g,"$1"),Tv=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),Rv=t=>t.replace(/[[\]\\]/g,"\\$&"),Er=class{constructor(e,r){Fn(e),r||(r={}),this.options=r,this.maxGlobstarRecursion=r.maxGlobstarRecursion!==void 0?r.maxGlobstarRecursion:200,this.set=[],this.pattern=e,this.windowsPathsNoEscape=!!r.windowsPathsNoEscape||r.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.regexp=null,this.negate=!1,this.comment=!1,this.empty=!1,this.partial=!!r.partial,this.make()}debug(){}make(){let e=this.pattern,r=this.options;if(!r.nocomment&&e.charAt(0)==="#"){this.comment=!0;return}if(!e){this.empty=!0;return}this.parseNegate();let i=this.globSet=this.braceExpand();r.debug&&(this.debug=(...n)=>console.error(...n)),this.debug(this.pattern,i),i=this.globParts=i.map(n=>n.split(Jc)),this.debug(this.pattern,i),i=i.map((n,s,o)=>n.map(this.parse,this)),this.debug(this.pattern,i),i=i.filter(n=>n.indexOf(!1)===-1),this.debug(this.pattern,i),this.set=i}parseNegate(){if(this.options.nonegate)return;let e=this.pattern,r=!1,i=0;for(let n=0;n<e.length&&e.charAt(n)==="!";n++)r=!r,i++;i&&(this.pattern=e.slice(i)),this.negate=r}matchOne(e,r,i){return r.indexOf(Ae)!==-1?this._matchGlobstar(e,r,i,0,0):this._matchOne(e,r,i,0,0)}_matchGlobstar(e,r,i,n,s){let o=-1;for(let b=s;b<r.length;b++)if(r[b]===Ae){o=b;break}let a=-1;for(let b=r.length-1;b>=0;b--)if(r[b]===Ae){a=b;break}let l=r.slice(s,o),u=i?r.slice(o+1):r.slice(o+1,a),f=i?[]:r.slice(a+1);if(l.length){let b=e.slice(n,n+l.length);if(!this._matchOne(b,l,i,0,0))return!1;n+=l.length}let c=0;if(f.length){if(f.length+n>e.length)return!1;let b=e.length-f.length;if(this._matchOne(e,f,i,b,0))c=f.length;else{if(e[e.length-1]!==""||n+f.length===e.length||!this._matchOne(e,f,i,b-1,0))return!1;c=f.length+1}}if(!u.length){let b=!!c;for(let v=n;v<e.length-c;v++){let E=String(e[v]);if(b=!0,E==="."||E===".."||!this.options.dot&&E.charAt(0)===".")return!1}return i||b}let h=[[[],0]],d=h[0],m=0,p=[0];for(let b of u)b===Ae?(p.push(m),d=[[],0],h.push(d)):(d[0].push(b),m++);let S=h.length-1,y=e.length-c;for(let b of h)b[1]=y-(p[S--]+b[0].length);return!!this._matchGlobStarBodySections(e,h,n,0,i,0,!!c)}_matchGlobStarBodySections(e,r,i,n,s,o,a){let l=r[n];if(!l){for(let c=i;c<e.length;c++){a=!0;let h=e[c];if(h==="."||h===".."||!this.options.dot&&h.charAt(0)===".")return!1}return a}let[u,f]=l;for(;i<=f;){if(this._matchOne(e.slice(0,i+u.length),u,s,i,0)&&o<this.maxGlobstarRecursion){let d=this._matchGlobStarBodySections(e,r,i+u.length,n+1,s,o+1,a);if(d!==!1)return d}let h=e[i];if(h==="."||h===".."||!this.options.dot&&h.charAt(0)===".")return!1;i++}return s||null}_matchOne(e,r,i,n,s){let o,a,l,u;for(o=n,a=s,l=e.length,u=r.length;o<l&&a<u;o++,a++){this.debug("matchOne loop");let f=r[a],c=e[o];if(this.debug(r,f,c),f===!1||f===Ae)return!1;let h;if(typeof f=="string"?(h=c===f,this.debug("string match",f,c,h)):(h=c.match(f),this.debug("pattern match",f,c,h)),!h)return!1}if(o===l&&a===u)return!0;if(o===l)return i;if(a===u)return o===l-1&&e[o]==="";throw new Error("wtf?")}braceExpand(){return th(this.pattern,this.options)}parse(e,r){Fn(e);let i=this.options;if(e==="**")if(i.noglobstar)e="*";else return Ae;if(e==="")return"";let n="",s=!1,o=!1,a=[],l=[],u,f=!1,c=-1,h=-1,d,m,p,S=e.charAt(0)===".",y=i.dot||S,b=()=>S?"":y?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)",v=x=>x.charAt(0)==="."?"":i.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)",E=()=>{if(u){switch(u){case"*":n+=aa,s=!0;break;case"?":n+=fa,s=!0;break;default:n+="\\"+u;break}this.debug("clearStateChar %j %j",u,n),u=!1}};for(let x=0,O;x<e.length&&(O=e.charAt(x));x++){if(this.debug("%s %s %s %j",e,x,n,O),o){if(O==="/")return!1;Xc[O]&&(n+="\\"),n+=O,o=!1;continue}switch(O){case"/":return!1;case"\\":if(f&&e.charAt(x+1)==="-"){n+=O;continue}E(),o=!0;continue;case"?":case"*":case"+":case"@":case"!":if(this.debug("%s %s %s %j <-- stateChar",e,x,n,O),f){this.debug(" in class"),O==="!"&&x===h+1&&(O="^"),n+=O;continue}if(O==="*"&&u==="*")continue;this.debug("call clearStateChar %j",u),E(),u=O,i.noext&&E();continue;case"(":{if(f){n+="(";continue}if(!u){n+="\\(";continue}let w={type:u,start:x-1,reStart:n.length,open:Qc[u].open,close:Qc[u].close};this.debug(this.pattern," ",w),a.push(w),n+=w.open,w.start===0&&w.type!=="!"&&(S=!0,n+=v(e.slice(x+1))),this.debug("plType %j %j",u,n),u=!1;continue}case")":{let w=a[a.length-1];if(f||!w){n+="\\)";continue}a.pop(),E(),s=!0,m=w,n+=m.close,m.type==="!"&&l.push(Object.assign(m,{reEnd:n.length}));continue}case"|":{let w=a[a.length-1];if(f||!w){n+="\\|";continue}E(),n+="|",w.start===0&&w.type!=="!"&&(S=!0,n+=v(e.slice(x+1)));continue}case"[":if(E(),f){n+="\\"+O;continue}f=!0,h=x,c=n.length,n+=O;continue;case"]":if(x===h+1||!f){n+="\\"+O;continue}d=e.substring(h+1,x);try{RegExp("["+Rv(xv(d))+"]"),n+=O}catch{n=n.substring(0,c)+"(?:$.)"}s=!0,f=!1;continue;default:E(),Xc[O]&&!(O==="^"&&f)&&(n+="\\"),n+=O;break}}for(f&&(d=e.slice(h+1),p=this.parse(d,la),n=n.substring(0,c)+"\\["+p[0],s=s||p[1]),m=a.pop();m;m=a.pop()){let x;x=n.slice(m.reStart+m.open.length),this.debug("setting tail",n,m),x=x.replace(/((?:\\{2}){0,64})(\\?)\|/g,(w,R,A)=>(A||(A="\\"),R+R+A+"|")),this.debug(`tail=%j
3
3
  %s`,x,x,m,n);let O=m.type==="*"?aa:m.type==="?"?fa:"\\"+m.type;s=!0,n=n.slice(0,m.reStart)+O+"\\("+x}E(),o&&(n+="\\\\");let T=Sv[n.charAt(0)];for(let x=l.length-1;x>-1;x--){let O=l[x],w=n.slice(0,O.reStart),R=n.slice(O.reStart,O.reEnd-8),A=n.slice(O.reEnd),N=n.slice(O.reEnd-8,O.reEnd)+A,z=w.split(")").length,ue=w.split("(").length-z,Z=A;for(let V=0;V<ue;V++)Z=Z.replace(/\)[+*?]?/,"");A=Z;let te=A===""&&r!==la?"(?:$|\\/)":"";n=w+R+A+te+N}if(n!==""&&s&&(n="(?=.)"+n),T&&(n=b()+n),r===la)return[n,s];if(i.nocase&&!s&&(s=e.toUpperCase()!==e.toLowerCase()),!s)return vv(e);let D=i.nocase?"i":"";try{return Object.assign(new RegExp("^"+n+"$",D),{_glob:e,_src:n})}catch{return new RegExp("$.")}}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let e=this.set;if(!e.length)return this.regexp=!1,this.regexp;let r=this.options,i=r.noglobstar?aa:r.dot?bv:wv,n=r.nocase?"i":"",s=e.map(o=>(o=o.map(a=>typeof a=="string"?Tv(a):a===Ae?Ae:a._src).reduce((a,l)=>(a[a.length-1]===Ae&&l===Ae||a.push(l),a),[]),o.forEach((a,l)=>{a!==Ae||o[l-1]===Ae||(l===0?o.length>1?o[l+1]="(?:\\/|"+i+"\\/)?"+o[l+1]:o[l]=i:l===o.length-1?o[l-1]+="(?:\\/|"+i+")?":(o[l-1]+="(?:\\/|\\/"+i+"\\/)"+o[l+1],o[l+1]=Ae))}),o.filter(a=>a!==Ae).join("/"))).join("|");s="^(?:"+s+")$",this.negate&&(s="^(?!"+s+").*$");try{this.regexp=new RegExp(s,n)}catch{this.regexp=!1}return this.regexp}match(e,r=this.partial){if(this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return e==="";if(e==="/"&&r)return!0;let i=this.options;ua.sep!=="/"&&(e=e.split(ua.sep).join("/")),e=e.split(Jc),this.debug(this.pattern,"split",e);let n=this.set;this.debug(this.pattern,"set",n);let s;for(let o=e.length-1;o>=0&&(s=e[o],!s);o--);for(let o=0;o<n.length;o++){let a=n[o],l=e;if(i.matchBase&&a.length===1&&(l=[s]),this.matchOne(l,a,r))return i.flipNegate?!0:!this.negate}return i.flipNegate?!1:this.negate}static defaults(e){return Ne.defaults(e).Minimatch}};Ne.Minimatch=Er});var ah=g((i3,oh)=>{"use strict";oh.exports=sh;var da=P("fs"),{EventEmitter:Av}=P("events"),{Minimatch:ha}=rh(),{resolve:Ov}=P("path");function Iv(t,e){return new Promise((r,i)=>{da.readdir(t,{withFileTypes:!0},(n,s)=>{if(n)switch(n.code){case"ENOTDIR":e?i(n):r([]);break;case"ENOTSUP":case"ENOENT":case"ENAMETOOLONG":case"UNKNOWN":r([]);break;default:i(n);break}else r(s)})})}function ih(t,e){return new Promise((r,i)=>{(e?da.stat:da.lstat)(t,(s,o)=>{s?s.code==="ENOENT"?r(e?ih(t,!1):null):r(null):r(o)})})}async function*nh(t,e,r,i,n,s){let o=await Iv(e+t,s);for(let a of o){let l=a.name;l===void 0&&(l=a,i=!0);let u=t+"/"+l,f=u.slice(1),c=e+"/"+f,h=null;(i||r)&&(h=await ih(c,r)),!h&&a.name!==void 0&&(h=a),h===null&&(h={isDirectory:()=>!1}),h.isDirectory()?n(f)||(yield{relative:f,absolute:c,stats:h},yield*nh(u,e,r,i,n,!1)):yield{relative:f,absolute:c,stats:h}}}async function*Dv(t,e,r,i){yield*nh("",t,e,r,i,!0)}function Pv(t){return{pattern:t.pattern,dot:!!t.dot,noglobstar:!!t.noglobstar,matchBase:!!t.matchBase,nocase:!!t.nocase,ignore:t.ignore,skip:t.skip,follow:!!t.follow,stat:!!t.stat,nodir:!!t.nodir,mark:!!t.mark,silent:!!t.silent,absolute:!!t.absolute}}var qn=class extends Av{constructor(e,r,i){if(super(),typeof r=="function"&&(i=r,r=null),this.options=Pv(r||{}),this.matchers=[],this.options.pattern){let n=Array.isArray(this.options.pattern)?this.options.pattern:[this.options.pattern];this.matchers=n.map(s=>new ha(s,{dot:this.options.dot,noglobstar:this.options.noglobstar,matchBase:this.options.matchBase,nocase:this.options.nocase}))}if(this.ignoreMatchers=[],this.options.ignore){let n=Array.isArray(this.options.ignore)?this.options.ignore:[this.options.ignore];this.ignoreMatchers=n.map(s=>new ha(s,{dot:!0}))}if(this.skipMatchers=[],this.options.skip){let n=Array.isArray(this.options.skip)?this.options.skip:[this.options.skip];this.skipMatchers=n.map(s=>new ha(s,{dot:!0}))}this.iterator=Dv(Ov(e||"."),this.options.follow,this.options.stat,this._shouldSkipDirectory.bind(this)),this.paused=!1,this.inactive=!1,this.aborted=!1,i&&(this._matches=[],this.on("match",n=>this._matches.push(this.options.absolute?n.absolute:n.relative)),this.on("error",n=>i(n)),this.on("end",()=>i(null,this._matches))),setTimeout(()=>this._next(),0)}_shouldSkipDirectory(e){return this.skipMatchers.some(r=>r.match(e))}_fileMatches(e,r){let i=e+(r?"/":"");return(this.matchers.length===0||this.matchers.some(n=>n.match(i)))&&!this.ignoreMatchers.some(n=>n.match(i))&&(!this.options.nodir||!r)}_next(){!this.paused&&!this.aborted?this.iterator.next().then(e=>{if(e.done)this.emit("end");else{let r=e.value.stats.isDirectory();if(this._fileMatches(e.value.relative,r)){let i=e.value.relative,n=e.value.absolute;this.options.mark&&r&&(i+="/",n+="/"),this.options.stat?this.emit("match",{relative:i,absolute:n,stat:e.value.stats}):this.emit("match",{relative:i,absolute:n})}this._next(this.iterator)}}).catch(e=>{this.abort(),this.emit("error",e),!e.code&&!this.options.silent&&console.error(e)}):this.inactive=!0}abort(){this.aborted=!0}pause(){this.paused=!0}resume(){this.paused=!1,this.inactive&&(this.inactive=!1,this._next())}};function sh(t,e,r){return new qn(t,e,r)}sh.ReaddirGlob=qn});var sd={};XE(sd,{all:()=>Ea,allLimit:()=>va,allSeries:()=>xa,any:()=>Pa,anyLimit:()=>La,anySeries:()=>Na,apply:()=>dh,applyEach:()=>bh,applyEachSeries:()=>wh,asyncify:()=>Bn,auto:()=>Ma,autoInject:()=>Sh,cargo:()=>Eh,cargoQueue:()=>vh,compose:()=>xh,concat:()=>_a,concatLimit:()=>bi,concatSeries:()=>ya,constant:()=>Th,default:()=>Mx,detect:()=>ma,detectLimit:()=>ba,detectSeries:()=>wa,dir:()=>Ah,doDuring:()=>Un,doUntil:()=>Oh,doWhilst:()=>Un,during:()=>Hn,each:()=>Sa,eachLimit:()=>Wn,eachOf:()=>qe,eachOfLimit:()=>mi,eachOfSeries:()=>Xe,eachSeries:()=>zn,ensureAsync:()=>ja,every:()=>Ea,everyLimit:()=>va,everySeries:()=>xa,filter:()=>Ta,filterLimit:()=>Ra,filterSeries:()=>Aa,find:()=>ma,findLimit:()=>ba,findSeries:()=>wa,flatMap:()=>_a,flatMapLimit:()=>bi,flatMapSeries:()=>ya,foldl:()=>vr,foldr:()=>Ia,forEach:()=>Sa,forEachLimit:()=>Wn,forEachOf:()=>qe,forEachOfLimit:()=>mi,forEachOfSeries:()=>Xe,forEachSeries:()=>zn,forever:()=>Dh,groupBy:()=>Ph,groupByLimit:()=>Qn,groupBySeries:()=>Lh,inject:()=>vr,log:()=>Nh,map:()=>Kn,mapLimit:()=>Ei,mapSeries:()=>ka,mapValues:()=>Ch,mapValuesLimit:()=>Xn,mapValuesSeries:()=>kh,memoize:()=>Mh,nextTick:()=>Fh,parallel:()=>qh,parallelLimit:()=>jh,priorityQueue:()=>Bh,queue:()=>Ua,race:()=>Uh,reduce:()=>vr,reduceRight:()=>Ia,reflect:()=>Gn,reflectAll:()=>Wh,reject:()=>zh,rejectLimit:()=>Gh,rejectSeries:()=>$h,retry:()=>$n,retryable:()=>Yh,select:()=>Ta,selectLimit:()=>Ra,selectSeries:()=>Aa,seq:()=>qa,series:()=>Kh,setImmediate:()=>At,some:()=>Pa,someLimit:()=>La,someSeries:()=>Na,sortBy:()=>Zh,timeout:()=>Qh,times:()=>Xh,timesLimit:()=>Jn,timesSeries:()=>Jh,transform:()=>ed,tryEach:()=>td,unmemoize:()=>rd,until:()=>id,waterfall:()=>nd,whilst:()=>Hn,wrapSync:()=>Bn});function dh(t,...e){return(...r)=>t(...e,...r)}function wi(t){return function(...e){var r=e.pop();return t.call(this,e,r)}}function _h(t){setTimeout(t,0)}function yh(t){return(e,...r)=>t(()=>e(...r))}function Bn(t){return Si(t)?function(...e){let r=e.pop(),i=t.apply(this,e);return lh(i,r)}:wi(function(e,r){var i;try{i=t.apply(this,e)}catch(n){return r(n)}if(i&&typeof i.then=="function")return lh(i,r);r(null,i)})}function lh(t,e){return t.then(r=>{uh(e,null,r)},r=>{uh(e,r&&(r instanceof Error||r.message)?r:new Error(r))})}function uh(t,e,r){try{t(e,r)}catch(i){At(n=>{throw n},i)}}function Si(t){return t[Symbol.toStringTag]==="AsyncFunction"}function Nv(t){return t[Symbol.toStringTag]==="AsyncGenerator"}function Cv(t){return typeof t[Symbol.asyncIterator]=="function"}function F(t){if(typeof t!="function")throw new Error("expected a function");return Si(t)?Bn(t):t}function M(t,e){if(e||(e=t.length),!e)throw new Error("arity is undefined");function r(...i){return typeof i[e-1]=="function"?t.apply(this,i):new Promise((n,s)=>{i[e-1]=(o,...a)=>{if(o)return s(o);n(a.length>1?a:a[0])},t.apply(this,i)})}return r}function mh(t){return function(r,...i){return M(function(s){var o=this;return t(r,(a,l)=>{F(a).apply(o,i.concat(l))},s)})}}function Ca(t,e,r,i){e=e||[];var n=[],s=0,o=F(r);return t(e,(a,l,u)=>{var f=s++;o(a,(c,h)=>{n[f]=h,u(c)})},a=>{i(a,n)})}function Vn(t){return t&&typeof t.length=="number"&&t.length>=0&&t.length%1===0}function Ot(t){function e(...r){if(t!==null){var i=t;t=null,i.apply(this,r)}}return Object.assign(e,t),e}function kv(t){return t[Symbol.iterator]&&t[Symbol.iterator]()}function Mv(t){var e=-1,r=t.length;return function(){return++e<r?{value:t[e],key:e}:null}}function Fv(t){var e=-1;return function(){var i=t.next();return i.done?null:(e++,{value:i.value,key:e})}}function qv(t){var e=t?Object.keys(t):[],r=-1,i=e.length;return function n(){var s=e[++r];return s==="__proto__"?n():r<i?{value:t[s],key:s}:null}}function jv(t){if(Vn(t))return Mv(t);var e=kv(t);return e?Fv(e):qv(t)}function It(t){return function(...e){if(t===null)throw new Error("Callback was already called.");var r=t;t=null,r.apply(this,e)}}function fh(t,e,r,i){let n=!1,s=!1,o=!1,a=0,l=0;function u(){a>=e||o||n||(o=!0,t.next().then(({value:h,done:d})=>{if(!(s||n)){if(o=!1,d){n=!0,a<=0&&i(null);return}a++,r(h,l,f),l++,u()}}).catch(c))}function f(h,d){if(a-=1,!s){if(h)return c(h);if(h===!1){n=!0,s=!0;return}if(d===Yn||n&&a<=0)return n=!0,i(null);u()}}function c(h){s||(o=!1,n=!0,i(h))}u()}function Bv(t,e,r,i){return $e(e)(t,F(r),i)}function Uv(t,e,r){r=Ot(r);var i=0,n=0,{length:s}=t,o=!1;s===0&&r(null);function a(l,u){l===!1&&(o=!0),o!==!0&&(l?r(l):(++n===s||u===Yn)&&r(null))}for(;i<s;i++)e(t[i],i,It(a))}function Wv(t,e,r){return mi(t,1/0,e,r)}function zv(t,e,r){var i=Vn(t)?Uv:Wv;return i(t,F(e),r)}function Gv(t,e,r){return Ca(qe,t,e,r)}function $v(t,e,r){return mi(t,1,e,r)}function Hv(t,e,r){return Ca(Xe,t,e,r)}function xr(){let t,e;function r(i,...n){if(i)return e(i);t(n.length>1?n:n[0])}return r[Tr]=new Promise((i,n)=>{t=i,e=n}),r}function Ma(t,e,r){typeof e!="number"&&(r=e,e=null),r=Ot(r||xr());var i=Object.keys(t).length;if(!i)return r(null);e||(e=i);var n={},s=0,o=!1,a=!1,l=Object.create(null),u=[],f=[],c={};Object.keys(t).forEach(v=>{var E=t[v];if(!Array.isArray(E)){h(v,[E]),f.push(v);return}var T=E.slice(0,E.length-1),D=T.length;if(D===0){h(v,E),f.push(v);return}c[v]=D,T.forEach(x=>{if(!t[x])throw new Error("async.auto task `"+v+"` has a non-existent dependency `"+x+"` in "+T.join(", "));m(x,()=>{D--,D===0&&h(v,E)})})}),y(),d();function h(v,E){u.push(()=>S(v,E))}function d(){if(!o){if(u.length===0&&s===0)return r(null,n);for(;u.length&&s<e;){var v=u.shift();v()}}}function m(v,E){var T=l[v];T||(T=l[v]=[]),T.push(E)}function p(v){var E=l[v]||[];E.forEach(T=>T()),d()}function S(v,E){if(!a){var T=It((x,...O)=>{if(s--,x===!1){o=!0;return}if(O.length<2&&([O]=O),x){var w={};if(Object.keys(n).forEach(R=>{w[R]=n[R]}),w[v]=O,a=!0,l=Object.create(null),o)return;r(x,w)}else n[v]=O,p(v)});s++;var D=F(E[E.length-1]);E.length>1?D(n,T):D(T)}}function y(){for(var v,E=0;f.length;)v=f.pop(),E++,b(v).forEach(T=>{--c[T]===0&&f.push(T)});if(E!==i)throw new Error("async.auto cannot execute tasks due to a recursive dependency")}function b(v){var E=[];return Object.keys(t).forEach(T=>{let D=t[T];Array.isArray(D)&&D.indexOf(v)>=0&&E.push(T)}),E}return r[Tr]}function Qv(t){let e="",r=0,i=t.indexOf("*/");for(;r<t.length;)if(t[r]==="/"&&t[r+1]==="/"){let n=t.indexOf(`
4
4
  `,r);r=n===-1?t.length:n}else if(i!==-1&&t[r]==="/"&&t[r+1]==="*"){let n=t.indexOf("*/",r);n!==-1?(r=n+2,i=t.indexOf("*/",r)):(e+=t[r],r++)}else e+=t[r],r++;return e}function Xv(t){let e=Qv(t.toString()),r=e.match(Vv);if(r||(r=e.match(Yv)),!r)throw new Error(`could not parse args in autoInject
5
5
  Source:
@@ -1,2 +1,2 @@
1
1
  import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{a as m}from"./chunk-AT2Y5UNP.js";import{a as p}from"./chunk-HCBYKLMW.js";import{t}from"./chunk-3Z4EHIOW.js";import{a,b as r,i as u}from"./chunk-C44QQJR4.js";import{a as b}from"./chunk-6YGTRKDT.js";import{e as n}from"./chunk-UR6MHSHU.js";var c=n(b(),1);var e=n(p(),1);function R({onSubmit:l}){let[o,f]=(0,c.useState)(0),s=(0,c.useRef)(!1);return u((x,i)=>{s.current||(i.leftArrow||i.rightArrow?f(d=>d===0?1:0):i.return?(s.current=!0,l(o===0?"positive":"negative")):i.escape&&(s.current=!0,l(null)))}),(0,e.jsxs)(a,{flexDirection:"column",marginTop:1,children:[(0,e.jsxs)(a,{children:[(0,e.jsx)(r,{color:t.secondary,children:"Rate this session: "}),(0,e.jsx)(r,{color:o===0?t.orange:t.dim,children:o===0?"[ \u{1F44D} ]":" \u{1F44D} "}),(0,e.jsx)(r,{children:" "}),(0,e.jsx)(r,{color:o===1?t.orange:t.dim,children:o===1?"[ \u{1F44E} ]":" \u{1F44E} "})]}),(0,e.jsx)(m,{bindings:[{keys:"\u2190/\u2192",label:"select"},{keys:"\u21B5",label:"submit"}],escBackLabel:"skip"})]})}export{R as a};
2
+ import{a as m}from"./chunk-JGXJDTMO.js";import{t}from"./chunk-IBDWHXNE.js";import{a as p}from"./chunk-HCBYKLMW.js";import{a,b as r,i as u}from"./chunk-C44QQJR4.js";import{a as b}from"./chunk-6YGTRKDT.js";import{e as n}from"./chunk-UR6MHSHU.js";var c=n(b(),1);var e=n(p(),1);function R({onSubmit:l}){let[o,f]=(0,c.useState)(0),s=(0,c.useRef)(!1);return u((x,i)=>{s.current||(i.leftArrow||i.rightArrow?f(d=>d===0?1:0):i.return?(s.current=!0,l(o===0?"positive":"negative")):i.escape&&(s.current=!0,l(null)))}),(0,e.jsxs)(a,{flexDirection:"column",marginTop:1,children:[(0,e.jsxs)(a,{children:[(0,e.jsx)(r,{color:t.secondary,children:"Rate this session: "}),(0,e.jsx)(r,{color:o===0?t.orange:t.dim,children:o===0?"[ \u{1F44D} ]":" \u{1F44D} "}),(0,e.jsx)(r,{children:" "}),(0,e.jsx)(r,{color:o===1?t.orange:t.dim,children:o===1?"[ \u{1F44E} ]":" \u{1F44E} "})]}),(0,e.jsx)(m,{bindings:[{keys:"\u2190/\u2192",label:"select"},{keys:"\u21B5",label:"submit"}],escBackLabel:"skip"})]})}export{R as a};
@@ -0,0 +1,2 @@
1
+ import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
+ import{a}from"./chunk-WAOCHXJ5.js";import{a as c}from"./chunk-NLCCBXXV.js";import{a as o}from"./chunk-RZ4F3BHX.js";var u=class{constructor(e,r,t,s){this.controllerBaseUrl=e;this.getOAuthToken=r;this.directBasicAuth=t;this.log=s}_cached=null;_revoked=!1;_lastError=null;revoke(){this._revoked=!0,this._cached=null}prime(e){this._revoked||(this._cached=e)}get revoked(){return this._revoked}get cached(){return this._cached}get lastError(){return this._lastError}async resolve(e=!1){if(this._cached&&!e)return this._cached;try{let r;if(this.directBasicAuth)r=new a(this.controllerBaseUrl,{username:this.directBasicAuth.username,accessKey:this.directBasicAuth.access_key});else{let s=await this.getOAuthToken();if(!s)return null;r=new a(this.controllerBaseUrl,s)}let t=await r.getTmsCredentials();return this.directBasicAuth&&!t.access_key&&(t.access_key=this.directBasicAuth.access_key),this._cached=t,this._lastError=null,this.log?.("info","AUTH_RESOLVE_OK","Auth resolved",{username:t.username,org_id:t.org_id,user_id:t.user_id}),t}catch(r){return this._lastError=r instanceof Error?r:new Error(String(r)),this.log?.("warn","AUTH_RESOLVE_FAILED","Auth resolve failed",{error:this._lastError.message}),null}}async fetch(e,r={}){if(this._revoked)throw new Error("Resolver has been revoked \u2014 identity changed");let t=await this.resolve();if(!t)throw new Error("Not authenticated \u2014 no credentials resolved");let s=i=>({...r,headers:{...r.headers,Authorization:c(i.username,i.access_key)}}),l=await o(e,s(t));if(l.status===401){if(this._revoked)throw new Error("Resolver has been revoked \u2014 identity changed");this.log?.("warn","AUTH_RESOLVE_401","Got 401, re-resolving",{url:e});let i=await this.resolve(!0);if(!i)throw new Error("Re-authentication failed after 401");return o(e,s(i))}return l}};function f(n){if(!n)return"network";let e=/failed:\s*(\d{3})\b/.exec(n.message)?.[1];return e==="401"||e==="403"?"auth":e?"server":"network"}export{u as a,f as b};
@@ -1,2 +1,2 @@
1
1
  import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{b as f}from"./chunk-VS2BXLH4.js";import{a as x}from"./chunk-HCBYKLMW.js";import{t}from"./chunk-3Z4EHIOW.js";import{a as r,b as n}from"./chunk-C44QQJR4.js";import{a as B}from"./chunk-6YGTRKDT.js";import{e as p}from"./chunk-UR6MHSHU.js";var c=p(B(),1);var e=p(x(),1);function v(){return[{name:"convert",label:"Converting session data",status:"pending"},{name:"zip",label:"Compressing artifacts",status:"pending"},{name:"presign",label:"Requesting upload URLs",status:"pending"},{name:"upload",label:"Uploading to KaneAI",status:"pending"},{name:"atomic_replace",label:"Replacing local output",status:"pending"},{name:"commit_lock",label:"Committing to TMS",status:"pending"},{name:"finalize",label:"Finalizing test case",status:"pending"},{name:"code_export",label:"Downloading test code",status:"pending"}]}function U(s,o,d,a){return s.map(l=>l.name===o?{...l,status:d,detail:a}:l)}function R(s){let o=s/1e3;if(o<60)return`${o.toFixed(1)}s`;let d=Math.floor(o/60),a=Math.round(o%60);return`${d}m ${a}s`}function D(s){let[o,d]=(0,c.useState)(0),a=c.default.useRef(Date.now());return(0,c.useEffect)(()=>{if(!s)return;a.current=Date.now();let l=setInterval(()=>{d(Date.now()-a.current)},100);return()=>clearInterval(l)},[s]),o}function h({steps:s,status:o,testUrl:d,error:a}){let l=D(o==="uploading");return o==="uploading"?(0,e.jsxs)(r,{flexDirection:"column",paddingX:1,paddingY:1,children:[(0,e.jsxs)(r,{children:[(0,e.jsx)(n,{color:t.orange,children:"\u2601 "}),(0,e.jsx)(n,{color:t.orange,bold:!0,children:"Saving to KaneAI"}),(0,e.jsxs)(n,{color:t.dim,children:[" ",R(l)]})]}),(0,e.jsx)(r,{flexDirection:"column",marginTop:1,children:s.filter(i=>i.status!=="skipped").map((i,S,T)=>{let b=S===T.length-1?"\u2514\u2500":"\u251C\u2500",u=i.status==="done",m=i.status==="running",g=i.status==="failed";return(0,e.jsxs)(r,{children:[(0,e.jsxs)(n,{color:t.dim,children:[" ",b," "]}),(0,e.jsx)(r,{width:3,children:m?(0,e.jsx)(f,{}):u?(0,e.jsx)(n,{color:t.green,children:"\u2713"}):g?(0,e.jsx)(n,{color:t.red,children:"\u2717"}):(0,e.jsx)(n,{color:t.muted,children:"\u25CB"})}),(0,e.jsx)(n,{color:u?t.dim:m?void 0:g?t.red:t.muted,children:i.label}),i.detail&&(0,e.jsxs)(n,{color:t.dim,children:[" ",i.detail]})]},i.name)})}),(0,e.jsx)(r,{marginTop:1,children:(0,e.jsx)(n,{color:t.muted,children:" press Ctrl+C twice to force exit"})})]}):o==="success"?(0,e.jsx)(e.Fragment,{}):(0,e.jsxs)(r,{flexDirection:"column",paddingX:1,paddingY:1,children:[(0,e.jsxs)(r,{children:[(0,e.jsx)(n,{color:t.red,children:"\u2601 "}),(0,e.jsx)(n,{color:t.red,bold:!0,children:"Save failed"})]}),a&&(0,e.jsxs)(r,{marginTop:0,children:[(0,e.jsx)(n,{color:t.dim,children:" "}),(0,e.jsx)(n,{color:t.dim,children:a})]})]})}export{v as a,U as b,h as c};
2
+ import{b as f}from"./chunk-7NDFOI6Z.js";import{t}from"./chunk-IBDWHXNE.js";import{a as x}from"./chunk-HCBYKLMW.js";import{a as r,b as n}from"./chunk-C44QQJR4.js";import{a as B}from"./chunk-6YGTRKDT.js";import{e as p}from"./chunk-UR6MHSHU.js";var c=p(B(),1);var e=p(x(),1);function v(){return[{name:"convert",label:"Converting session data",status:"pending"},{name:"zip",label:"Compressing artifacts",status:"pending"},{name:"presign",label:"Requesting upload URLs",status:"pending"},{name:"upload",label:"Uploading to KaneAI",status:"pending"},{name:"atomic_replace",label:"Replacing local output",status:"pending"},{name:"commit_lock",label:"Committing to TMS",status:"pending"},{name:"finalize",label:"Finalizing test case",status:"pending"},{name:"code_export",label:"Downloading test code",status:"pending"}]}function U(s,o,d,a){return s.map(l=>l.name===o?{...l,status:d,detail:a}:l)}function R(s){let o=s/1e3;if(o<60)return`${o.toFixed(1)}s`;let d=Math.floor(o/60),a=Math.round(o%60);return`${d}m ${a}s`}function D(s){let[o,d]=(0,c.useState)(0),a=c.default.useRef(Date.now());return(0,c.useEffect)(()=>{if(!s)return;a.current=Date.now();let l=setInterval(()=>{d(Date.now()-a.current)},100);return()=>clearInterval(l)},[s]),o}function h({steps:s,status:o,testUrl:d,error:a}){let l=D(o==="uploading");return o==="uploading"?(0,e.jsxs)(r,{flexDirection:"column",paddingX:1,paddingY:1,children:[(0,e.jsxs)(r,{children:[(0,e.jsx)(n,{color:t.orange,children:"\u2601 "}),(0,e.jsx)(n,{color:t.orange,bold:!0,children:"Saving to KaneAI"}),(0,e.jsxs)(n,{color:t.dim,children:[" ",R(l)]})]}),(0,e.jsx)(r,{flexDirection:"column",marginTop:1,children:s.filter(i=>i.status!=="skipped").map((i,S,T)=>{let b=S===T.length-1?"\u2514\u2500":"\u251C\u2500",u=i.status==="done",m=i.status==="running",g=i.status==="failed";return(0,e.jsxs)(r,{children:[(0,e.jsxs)(n,{color:t.dim,children:[" ",b," "]}),(0,e.jsx)(r,{width:3,children:m?(0,e.jsx)(f,{}):u?(0,e.jsx)(n,{color:t.green,children:"\u2713"}):g?(0,e.jsx)(n,{color:t.red,children:"\u2717"}):(0,e.jsx)(n,{color:t.muted,children:"\u25CB"})}),(0,e.jsx)(n,{color:u?t.dim:m?void 0:g?t.red:t.muted,children:i.label}),i.detail&&(0,e.jsxs)(n,{color:t.dim,children:[" ",i.detail]})]},i.name)})}),(0,e.jsx)(r,{marginTop:1,children:(0,e.jsx)(n,{color:t.muted,children:" press Ctrl+C twice to force exit"})})]}):o==="success"?(0,e.jsx)(e.Fragment,{}):(0,e.jsxs)(r,{flexDirection:"column",paddingX:1,paddingY:1,children:[(0,e.jsxs)(r,{children:[(0,e.jsx)(n,{color:t.red,children:"\u2601 "}),(0,e.jsx)(n,{color:t.red,bold:!0,children:"Save failed"})]}),a&&(0,e.jsxs)(r,{marginTop:0,children:[(0,e.jsx)(n,{color:t.dim,children:" "}),(0,e.jsx)(n,{color:t.dim,children:a})]})]})}export{v as a,U as b,h as c};
@@ -1,5 +1,5 @@
1
1
  import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{a as v}from"./chunk-J37YPPCD.js";import{spawn as x,execSync as b}from"child_process";import{existsSync as g}from"fs";import{resolve as e,dirname as N}from"path";import{fileURLToPath as h}from"url";import{createInterface as R}from"readline";async function*_(i){let n=R({input:i,crlfDelay:1/0});for await(let l of n){let r=l.trim();if(r)try{let d=JSON.parse(r);d&&typeof d.type=="string"&&(yield d)}catch{}}}function E(i){return i==="action"?{set:{V16_AGENT_ENABLE_ALL_BLOCKERS:"true",V16_AGENT_SKIP_CP_FINAL:"true"},unset:[]}:{set:{},unset:["V16_AGENT_ENABLE_ALL_BLOCKERS","V16_AGENT_SKIP_CP_FINAL"]}}var c=N(h(import.meta.url));function A(){for(let i of["python3","python"])try{return b(`${i} --version`,{stdio:"ignore"}),i}catch{}return null}function C(){let n=process.platform==="win32"?"v16-runner.exe":"v16-runner",l={"darwin-arm64":["@testmuai/kane-cli-darwin-arm64","@lambdatestincprivate/kane-cli-darwin-arm64"],"darwin-x64":["@testmuai/kane-cli-darwin-x64","@lambdatestincprivate/kane-cli-darwin-x64"],"linux-x64":["@testmuai/kane-cli-linux-x64","@lambdatestincprivate/kane-cli-linux-x64"],"win32-x64":["@testmuai/kane-cli-win-x64","@lambdatestincprivate/kane-cli-win-x64"]},r=`${process.platform}-${process.arch}`,d=l[r];if(d)for(let t of d){let a=[e(c,"..","node_modules",t,"bin",n),e(c,"..","..","node_modules",t,"bin",n),e(c,"..","..","..","node_modules",t,"bin",n),e(c,"..","..","..","..","node_modules",t,"bin",n)];for(let u of a)if(g(u))return{cmd:u,args:[]}}let p=[e(c,"bin",n),e(c,"..","bin",n),e(c,"..","..","..","..","v16-runner","dist",n),e(c,"..","..","..","v16-runner","dist",n),e(process.cwd(),"v16-runner","dist",n),e(process.cwd(),"..","v16-runner","dist",n)];for(let t of p)if(g(t))return{cmd:t,args:[]};let s=[e(c,"..","..","..","..","v16-runner"),e(c,"..","..","..","v16-runner"),e(process.cwd(),"v16-runner"),e(process.cwd(),"..","v16-runner")];for(let t of s)if(g(e(t,"main.py"))){for(let u of[e(t,".venv","bin","python"),e(t,"..","browser-agent",".venv","bin","python")])if(g(u))return{cmd:u,args:["main.py"],cwd:t};let a=A();if(a)return{cmd:a,args:["main.py"],cwd:t}}return null}function V(i,n){let l=C();if(!l)throw new Error("v16-runner not found. Build the binary with `cd v16-runner && python build.py` or ensure Python is available.");let r={...process.env};n?.environment&&(r.TESTMUAI_ENV=n.environment),r.TESTMUAI_SOURCE="kane-cli",process.platform==="win32"&&(r.PYTHONIOENCODING="utf-8");let d=v(n?.environment);r.V16_SERVER_API_HOST=d.v16ServerHost,r.ATMS_URL=d.tmsBaseUrl.replace(/\/api\/?$/,""),i.username&&i.access_key&&(r.LT_USERNAME=i.username,r.LT_ACCESS_KEY=i.access_key),i.session_id&&(r.TESTMUAI_SESSION_ID=i.session_id);let p=E(n?.mode??"testing");Object.assign(r,p.set);for(let o of p.unset)delete r[o];let s=x(l.cmd,l.args,{stdio:["pipe","pipe","pipe"],env:r,cwd:l.cwd});s.stdin.on("error",()=>{}),s.stdin.write(JSON.stringify(i)+`
2
+ import{a as v}from"./chunk-LAR7I5SR.js";import{spawn as x,execSync as b}from"child_process";import{existsSync as g}from"fs";import{resolve as e,dirname as N}from"path";import{fileURLToPath as h}from"url";import{createInterface as R}from"readline";async function*_(i){let n=R({input:i,crlfDelay:1/0});for await(let l of n){let r=l.trim();if(r)try{let d=JSON.parse(r);d&&typeof d.type=="string"&&(yield d)}catch{}}}function E(i){return i==="action"?{set:{V16_AGENT_ENABLE_ALL_BLOCKERS:"true",V16_AGENT_SKIP_CP_FINAL:"true"},unset:[]}:{set:{},unset:["V16_AGENT_ENABLE_ALL_BLOCKERS","V16_AGENT_SKIP_CP_FINAL"]}}var c=N(h(import.meta.url));function A(){for(let i of["python3","python"])try{return b(`${i} --version`,{stdio:"ignore"}),i}catch{}return null}function C(){let n=process.platform==="win32"?"v16-runner.exe":"v16-runner",l={"darwin-arm64":["@testmuai/kane-cli-darwin-arm64","@lambdatestincprivate/kane-cli-darwin-arm64"],"darwin-x64":["@testmuai/kane-cli-darwin-x64","@lambdatestincprivate/kane-cli-darwin-x64"],"linux-x64":["@testmuai/kane-cli-linux-x64","@lambdatestincprivate/kane-cli-linux-x64"],"win32-x64":["@testmuai/kane-cli-win-x64","@lambdatestincprivate/kane-cli-win-x64"]},r=`${process.platform}-${process.arch}`,d=l[r];if(d)for(let t of d){let a=[e(c,"..","node_modules",t,"bin",n),e(c,"..","..","node_modules",t,"bin",n),e(c,"..","..","..","node_modules",t,"bin",n),e(c,"..","..","..","..","node_modules",t,"bin",n)];for(let u of a)if(g(u))return{cmd:u,args:[]}}let p=[e(c,"bin",n),e(c,"..","bin",n),e(c,"..","..","..","..","v16-runner","dist",n),e(c,"..","..","..","v16-runner","dist",n),e(process.cwd(),"v16-runner","dist",n),e(process.cwd(),"..","v16-runner","dist",n)];for(let t of p)if(g(t))return{cmd:t,args:[]};let s=[e(c,"..","..","..","..","v16-runner"),e(c,"..","..","..","v16-runner"),e(process.cwd(),"v16-runner"),e(process.cwd(),"..","v16-runner")];for(let t of s)if(g(e(t,"main.py"))){for(let u of[e(t,".venv","bin","python"),e(t,"..","browser-agent",".venv","bin","python")])if(g(u))return{cmd:u,args:["main.py"],cwd:t};let a=A();if(a)return{cmd:a,args:["main.py"],cwd:t}}return null}function V(i,n){let l=C();if(!l)throw new Error("v16-runner not found. Build the binary with `cd v16-runner && python build.py` or ensure Python is available.");let r={...process.env};n?.environment&&(r.TESTMUAI_ENV=n.environment),r.TESTMUAI_SOURCE="kane-cli",process.platform==="win32"&&(r.PYTHONIOENCODING="utf-8");let d=v(n?.environment);r.V16_SERVER_API_HOST=d.v16ServerHost,r.ATMS_URL=d.tmsBaseUrl.replace(/\/api\/?$/,""),i.username&&i.access_key&&(r.LT_USERNAME=i.username,r.LT_ACCESS_KEY=i.access_key),i.session_id&&(r.TESTMUAI_SESSION_ID=i.session_id);let p=E(n?.mode??"testing");Object.assign(r,p.set);for(let o of p.unset)delete r[o];let s=x(l.cmd,l.args,{stdio:["pipe","pipe","pipe"],env:r,cwd:l.cwd});s.stdin.on("error",()=>{}),s.stdin.write(JSON.stringify(i)+`
3
3
  `);let t=1e5,a="";s.stderr.on("data",o=>{a+=o.toString(),a.length>t&&(a=a.slice(-t))}),s.on("error",o=>{n?.log?.("error","RUNNER_SPAWN_ERROR","Runner spawn error",{error:o.message})});let u=null,f=null,S=new Promise(o=>{s.on("close",(m,y)=>{u=m,f=y?String(y):null,n?.log?.("info","RUNNER_EXIT","Runner exited",{code:m,signal:f??"none"}),o({code:m,signal:f})})}),w=_(s.stdout);return{child:s,events:w,sendUserResponse(o){let m=JSON.stringify({type:"user_response",answer:o});try{s.stdin.write(m+`
4
4
  `)}catch{}},sendCancel(o){let m=JSON.stringify({type:"cancel",reason:o});try{s.stdin.write(m+`
5
5
  `)}catch{}},cancel(){s.kill("SIGTERM")},get stderr(){return a},get exitCode(){return u},get exitSignal(){return f},exited:S}}export{C as a,V as b};
@@ -1,2 +1,2 @@
1
1
  import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{a as m}from"./chunk-HCBYKLMW.js";import{t as e}from"./chunk-3Z4EHIOW.js";import{a as r,b as i}from"./chunk-C44QQJR4.js";import{e as d}from"./chunk-UR6MHSHU.js";var o=d(m(),1),s={default:e.muted,error:e.red,success:e.green,info:e.orange,warning:e.orange};function T({title:t,titleColor:a,borderColor:l,variant:n="default",children:c,width:u,paddingX:g=2,paddingY:x=0,marginBottom:f=0}){let p=l??s[n],B=a??(n==="default"?e.orange:s[n]);return(0,o.jsxs)(r,{flexDirection:"column",marginBottom:f,children:[t&&(0,o.jsx)(r,{marginBottom:0,children:(0,o.jsxs)(i,{color:B,bold:!0,children:[" ",t]})}),(0,o.jsx)(r,{borderStyle:"round",borderColor:p,flexDirection:"column",paddingX:g,paddingY:x,width:u,children:c})]})}function h({label:t,value:a,labelColor:l=e.dim,valueColor:n,labelWidth:c=14}){return(0,o.jsxs)(r,{children:[(0,o.jsx)(r,{width:c,children:(0,o.jsx)(i,{color:l,children:t})}),(0,o.jsx)(i,{color:n,children:a})]})}function C({label:t}){return(0,o.jsx)(r,{marginTop:1,marginBottom:0,children:(0,o.jsx)(i,{bold:!0,children:t})})}export{T as a,h as b,C as c};
2
+ import{t as e}from"./chunk-IBDWHXNE.js";import{a as m}from"./chunk-HCBYKLMW.js";import{a as r,b as i}from"./chunk-C44QQJR4.js";import{e as d}from"./chunk-UR6MHSHU.js";var o=d(m(),1),s={default:e.muted,error:e.red,success:e.green,info:e.orange,warning:e.orange};function T({title:t,titleColor:a,borderColor:l,variant:n="default",children:c,width:u,paddingX:g=2,paddingY:x=0,marginBottom:f=0}){let p=l??s[n],B=a??(n==="default"?e.orange:s[n]);return(0,o.jsxs)(r,{flexDirection:"column",marginBottom:f,children:[t&&(0,o.jsx)(r,{marginBottom:0,children:(0,o.jsxs)(i,{color:B,bold:!0,children:[" ",t]})}),(0,o.jsx)(r,{borderStyle:"round",borderColor:p,flexDirection:"column",paddingX:g,paddingY:x,width:u,children:c})]})}function h({label:t,value:a,labelColor:l=e.dim,valueColor:n,labelWidth:c=14}){return(0,o.jsxs)(r,{children:[(0,o.jsx)(r,{width:c,children:(0,o.jsx)(i,{color:l,children:t})}),(0,o.jsx)(i,{color:n,children:a})]})}function C({label:t}){return(0,o.jsx)(r,{marginTop:1,marginBottom:0,children:(0,o.jsx)(i,{bold:!0,children:t})})}export{T as a,h as b,C as c};
@@ -1,2 +1,2 @@
1
1
  import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{homedir as s}from"os";import{join as t}from"path";var c="0.4.0",l="kane-cli",e=t(s(),".testmuai","kaneai"),m=t(e,"profiles"),i=t(e,"tui-config.json"),d="https://registry.npmjs.org/@testmuai/kane-cli",h="https://api.github.com/repos/LambdaTest/kane-cli/releases",g="https://dd-proxy.lambdatest.com/intake/kane-cli",U="https://kaneai-playground.lambdatest.io",b=9222,_=9230,u=t(e,"chrome-profiles"),r="127.0.0.1",x=18392,A=18400,o="/callback";function R(a){return`http://${r}:${a}${o}`}var L="KANE CLI",B="*",C={prod:{authBaseUrl:"https://auth.lambdatest.com",consentUrl:"https://accounts.lambdatest.com",controllerBaseUrl:"https://kaneai-api.lambdatest.com/v16-controller/v1",tmsBaseUrl:"https://test-manager-api.lambdatest.com/api",testGeneratorBaseUrl:"https://test-manager-api.lambdatest.com",secretsBaseUrl:"https://api-hyperexecute.lambdatest.com",testManagerUiUrl:"https://test-manager.lambdatest.com",shareApiBaseUrl:"https://api.lambdatest.com",v16ServerHost:"https://kaneai-api.lambdatest.com/v16-server"},stage:{authBaseUrl:"https://stage-auth.lambdatestinternal.com",consentUrl:"https://stage-accounts.lambdatestinternal.com",controllerBaseUrl:"https://auteur-stage-automind.lambdatestinternal.com/v16-controller/v1",tmsBaseUrl:"https://stage-test-manager-api.lambdatestinternal.com/api",testGeneratorBaseUrl:"https://stage-test-manager-api.lambdatestinternal.com",secretsBaseUrl:"https://api-stage-hyperexecute.lambdatestinternal.com",testManagerUiUrl:"https://stage-test-manager.lambdatestinternal.com",shareApiBaseUrl:"https://stage-api.lambdatestinternal.com",v16ServerHost:"https://auteur-stage-automind.lambdatestinternal.com/v16-server"}},E={orange:"#ff9500",generateAccent:"#0d9488",purple:"#b388ff",secondary:"#888888",dim:"#666666",muted:"#444444",green:"#4ade80",red:"#ef4444"};export{c as a,l as b,e as c,i as d,d as e,h as f,g,U as h,b as i,_ as j,u as k,r as l,x as m,A as n,o,R as p,L as q,B as r,C as s,E as t};
2
+ import{homedir as s}from"os";import{join as t}from"path";var c="0.4.1",l="kane-cli",e=t(s(),".testmuai","kaneai"),m=t(e,"profiles"),i=t(e,"tui-config.json"),d="https://registry.npmjs.org/@testmuai/kane-cli",h="https://api.github.com/repos/LambdaTest/kane-cli/releases",g="https://dd-proxy.lambdatest.com/intake/kane-cli",U="https://kaneai-playground.lambdatest.io",b=9222,_=9230,u=t(e,"chrome-profiles"),r="127.0.0.1",x=18392,A=18400,o="/callback";function R(a){return`http://${r}:${a}${o}`}var L="KANE CLI",B="*",C={prod:{authBaseUrl:"https://auth.lambdatest.com",consentUrl:"https://accounts.lambdatest.com",controllerBaseUrl:"https://kaneai-api.lambdatest.com/v16-controller/v1",tmsBaseUrl:"https://test-manager-api.lambdatest.com/api",testGeneratorBaseUrl:"https://test-manager-api.lambdatest.com",secretsBaseUrl:"https://api-hyperexecute.lambdatest.com",testManagerUiUrl:"https://test-manager.lambdatest.com",shareApiBaseUrl:"https://api.lambdatest.com",v16ServerHost:"https://kaneai-api.lambdatest.com/v16-server"},stage:{authBaseUrl:"https://stage-auth.lambdatestinternal.com",consentUrl:"https://stage-accounts.lambdatestinternal.com",controllerBaseUrl:"https://auteur-stage-automind.lambdatestinternal.com/v16-controller/v1",tmsBaseUrl:"https://stage-test-manager-api.lambdatestinternal.com/api",testGeneratorBaseUrl:"https://stage-test-manager-api.lambdatestinternal.com",secretsBaseUrl:"https://api-stage-hyperexecute.lambdatestinternal.com",testManagerUiUrl:"https://stage-test-manager.lambdatestinternal.com",shareApiBaseUrl:"https://stage-api.lambdatestinternal.com",v16ServerHost:"https://auteur-stage-automind.lambdatestinternal.com/v16-server"}},E={orange:"#ff9500",generateAccent:"#0d9488",purple:"#b388ff",secondary:"#888888",dim:"#666666",muted:"#444444",green:"#4ade80",red:"#ef4444"};export{c as a,l as b,e as c,i as d,d as e,h as f,g,U as h,b as i,_ as j,u as k,r as l,x as m,A as n,o,R as p,L as q,B as r,C as s,E as t};