@testmuai/kane-cli 0.2.0 → 0.2.2

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 (37) hide show
  1. package/dist/{ChromeProfilePicker-NRHBZJRY.js → ChromeProfilePicker-XLIHAR2Y.js} +1 -1
  2. package/dist/{CliFeedbackPrompt-LJOQDOID.js → CliFeedbackPrompt-UWLFODG7.js} +1 -1
  3. package/dist/{CliUploadProgress-3EV5HGWF.js → CliUploadProgress-UOBTPQO2.js} +1 -1
  4. package/dist/{ConfigView-4E5NPHQS.js → ConfigView-LORCKADT.js} +1 -1
  5. package/dist/FolderPicker-UOLFYHBS.js +2 -0
  6. package/dist/HelpView-QSQBGS3R.js +2 -0
  7. package/dist/{LinksBox-RXFRUHYG.js → LinksBox-HCED4U3Y.js} +1 -1
  8. package/dist/{LoginWizard-UVDCZSNN.js → LoginWizard-EYX4VLRU.js} +1 -1
  9. package/dist/{ProfilesView-7OYXY4HR.js → ProfilesView-T56LINS3.js} +1 -1
  10. package/dist/ProjectPicker-FHY3WO2I.js +2 -0
  11. package/dist/{WhoamiView-4R3DWFF4.js → WhoamiView-2LCDJ7LM.js} +1 -1
  12. package/dist/{changelog-YMXB4VNK.js → changelog-G5K7UY44.js} +1 -1
  13. package/dist/{chunk-LOYQCD64.js → chunk-2BDMMEKZ.js} +1 -1
  14. package/dist/{chunk-D7CQOCME.js → chunk-2SAJWTZL.js} +1 -1
  15. package/dist/{chunk-FVB76465.js → chunk-2WZN5PNJ.js} +1 -1
  16. package/dist/{chunk-KPCYAR4I.js → chunk-733KSBIW.js} +1 -1
  17. package/dist/{chunk-NYYKIIZC.js → chunk-7L6XR6ON.js} +1 -1
  18. package/dist/{chunk-VDHECXMC.js → chunk-ES665H5Q.js} +1 -1
  19. package/dist/{chunk-O2HIAIOC.js → chunk-GNMGQOGV.js} +1 -1
  20. package/dist/{chunk-VYU7IKV4.js → chunk-GRQIIIKB.js} +1 -1
  21. package/dist/chunk-I7YWZ3D2.js +2 -0
  22. package/dist/{chunk-QGHQ4STK.js → chunk-LN4R7PDY.js} +1 -1
  23. package/dist/{chunk-YQY5GLZG.js → chunk-P5KW7XFK.js} +1 -1
  24. package/dist/{chunk-F7XC3ZB3.js → chunk-SKKMAOD4.js} +1 -1
  25. package/dist/{chunk-2WSX2LHX.js → chunk-TJQXEAEK.js} +1 -1
  26. package/dist/{chunk-3MOK7FWE.js → chunk-ZU6PFD6P.js} +1 -1
  27. package/dist/index.js +24 -24
  28. package/dist/pipeline-7NY333ZT.js +2 -0
  29. package/dist/{tms-client-YS6LCK2T.js → tms-client-QWVBCUUT.js} +1 -1
  30. package/dist/{updater-OI5K5W6B.js → updater-SIJ34O2X.js} +1 -1
  31. package/dist/{version-check-NO7GXGGB.js → version-check-GHGJIUN6.js} +1 -1
  32. package/package.json +4 -4
  33. package/dist/FolderPicker-ZK7QVPGI.js +0 -2
  34. package/dist/HelpView-MPSTK26I.js +0 -2
  35. package/dist/ProjectPicker-OKLJAOZL.js +0 -2
  36. package/dist/chunk-XQBQB3VZ.js +0 -2
  37. package/dist/pipeline-AYK5AZRB.js +0 -2
@@ -0,0 +1,2 @@
1
+ import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
+ import{a}from"./chunk-GNMGQOGV.js";import"./chunk-3CJ6IY5O.js";import"./chunk-I7YWZ3D2.js";import"./chunk-UR6MHSHU.js";export{a as UploadPipeline};
@@ -1,2 +1,2 @@
1
1
  import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{a}from"./chunk-XQBQB3VZ.js";import"./chunk-UR6MHSHU.js";export{a as TmsClient};
2
+ import{a}from"./chunk-I7YWZ3D2.js";import"./chunk-UR6MHSHU.js";export{a as TmsClient};
@@ -1,2 +1,2 @@
1
1
  import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{c as a}from"./chunk-YQY5GLZG.js";import{a as s}from"./chunk-KPCYAR4I.js";import"./chunk-UR6MHSHU.js";import{execFile as l}from"child_process";async function p(i){let t=await a();if(!t)return{success:!0,fromVersion:s,toVersion:s};let o=`@testmuai/kane-cli@${t.latest}`;return new Promise(n=>{let r=l("npm",["install","-g",o],{timeout:12e4,env:{...process.env}});r.stdout?.on("data",e=>i?.(e)),r.stderr?.on("data",e=>i?.(e)),r.on("close",e=>{n(e===0?{success:!0,fromVersion:s,toVersion:t.latest}:{success:!1,fromVersion:s,toVersion:t.latest,error:`npm install exited with code ${e}. Try manually: npm install -g ${o}`})}),r.on("error",e=>{n({success:!1,fromVersion:s,toVersion:t.latest,error:`Failed to run npm: ${e.message}. Try manually: npm install -g ${o}`})})})}export{p as runSelfUpdate};
2
+ import{c as a}from"./chunk-P5KW7XFK.js";import{a as s}from"./chunk-733KSBIW.js";import"./chunk-UR6MHSHU.js";import{execFile as l}from"child_process";async function p(i){let t=await a();if(!t)return{success:!0,fromVersion:s,toVersion:s};let o=`@testmuai/kane-cli@${t.latest}`;return new Promise(n=>{let r=l("npm",["install","-g",o],{timeout:12e4,env:{...process.env}});r.stdout?.on("data",e=>i?.(e)),r.stderr?.on("data",e=>i?.(e)),r.on("close",e=>{n(e===0?{success:!0,fromVersion:s,toVersion:t.latest}:{success:!1,fromVersion:s,toVersion:t.latest,error:`npm install exited with code ${e}. Try manually: npm install -g ${o}`})}),r.on("error",e=>{n({success:!1,fromVersion:s,toVersion:t.latest,error:`Failed to run npm: ${e.message}. Try manually: npm install -g ${o}`})})})}export{p as runSelfUpdate};
@@ -1,2 +1,2 @@
1
1
  import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{a,b,c}from"./chunk-YQY5GLZG.js";import"./chunk-KPCYAR4I.js";import"./chunk-UR6MHSHU.js";export{c as checkForUpdate,a as compareVersions,b as getSeverity};
2
+ import{a,b,c}from"./chunk-P5KW7XFK.js";import"./chunk-733KSBIW.js";import"./chunk-UR6MHSHU.js";export{c as checkForUpdate,a as compareVersions,b as getSeverity};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@testmuai/kane-cli",
3
- "version": "0.2.0",
3
+ "version": "0.2.2",
4
4
  "description": "KaneAI Terminal UI — browser automation testing agent",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -23,9 +23,9 @@
23
23
  "sharp": "^0.34.5"
24
24
  },
25
25
  "optionalDependencies": {
26
- "@testmuai/kane-cli-darwin-arm64": "0.2.0",
27
- "@testmuai/kane-cli-linux-x64": "0.2.0",
28
- "@testmuai/kane-cli-win-x64": "0.2.0"
26
+ "@testmuai/kane-cli-darwin-arm64": "0.2.2",
27
+ "@testmuai/kane-cli-linux-x64": "0.2.2",
28
+ "@testmuai/kane-cli-win-x64": "0.2.2"
29
29
  },
30
30
  "publishConfig": {
31
31
  "registry": "https://registry.npmjs.org",
@@ -1,2 +0,0 @@
1
- import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{a,b}from"./chunk-F7XC3ZB3.js";import"./chunk-NYYKIIZC.js";import"./chunk-XQBQB3VZ.js";import"./chunk-HCBYKLMW.js";import"./chunk-KPCYAR4I.js";import"./chunk-Q7JVDEOV.js";import"./chunk-6YGTRKDT.js";import"./chunk-UR6MHSHU.js";export{b as FolderPicker,a as formatFolderLine};
@@ -1,2 +0,0 @@
1
- import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{a as f}from"./chunk-HCBYKLMW.js";import{a as h,b as a,r as t}from"./chunk-KPCYAR4I.js";import{a as n,b as o,j as p,k as x}from"./chunk-Q7JVDEOV.js";import{a as T}from"./chunk-6YGTRKDT.js";import{e as u}from"./chunk-UR6MHSHU.js";var b=u(T(),1);var e=u(f(),1),w="https://docs.lambdatest.com/kanecli",B="https://docs.lambdatest.com/support";function L(){let{exit:c}=p(),{stdout:l}=x(),s=l?.columns??80;return(0,b.useEffect)(()=>{let d=setTimeout(()=>c(),50);return()=>clearTimeout(d)},[c]),(0,e.jsxs)(n,{flexDirection:"column",children:[(0,e.jsxs)(n,{paddingX:1,paddingTop:1,flexDirection:"column",children:[(0,e.jsx)(o,{color:t.purple,bold:!0,children:a}),(0,e.jsxs)(n,{children:[(0,e.jsx)(o,{color:t.dimmed,children:"Browser automation powered by AI "}),(0,e.jsxs)(o,{color:t.muted,children:[" v",h]})]})]}),(0,e.jsx)(o,{children:" "}),(0,e.jsx)(m,{title:"USAGE",children:(0,e.jsxs)(o,{color:t.cyan,children:[" $ ",a," ","<command>"," [flags]"]})}),(0,e.jsxs)(m,{title:"COMMANDS",children:[(0,e.jsx)(i,{cmd:"run",args:"<objective>",desc:"Run a browser automation task",highlight:!0}),(0,e.jsx)(i,{cmd:"setup",desc:"First-time auth & configuration"}),(0,e.jsx)(i,{cmd:"login",desc:"OAuth PKCE login (opens browser)"}),(0,e.jsx)(i,{cmd:"logout",desc:"Revoke tokens + delete profile"}),(0,e.jsx)(i,{cmd:"whoami",desc:"Show authenticated identity"}),(0,e.jsx)(i,{cmd:"config",args:"show|set-\u2026|reset",desc:"Manage configuration"}),(0,e.jsx)(i,{cmd:"profiles",args:"list|switch|delete",desc:"Manage auth profiles"})]}),(0,e.jsxs)(m,{title:"RUN FLAGS",children:[(0,e.jsx)(r,{long:"--url",arg:"<url>",desc:"Target URL"}),(0,e.jsx)(r,{long:"--max-steps",arg:"<n>",desc:"Max agent steps (default: 30)"}),(0,e.jsx)(r,{long:"--timeout",arg:"<sec>",desc:"Kill run after N seconds"}),(0,e.jsx)(r,{long:"--headless",desc:"No visible browser window"}),(0,e.jsx)(r,{long:"--variables",arg:"<json>",desc:"Inline variables as JSON"}),(0,e.jsx)(r,{long:"--variables-file",arg:"<path>",desc:"Load variables from file"}),(0,e.jsx)(r,{long:"--ws-endpoint",arg:"<url>",desc:"Remote browser (LambdaTest)"}),(0,e.jsx)(r,{long:"--cdp-endpoint",arg:"<url>",desc:"Connect to existing Chrome CDP"}),(0,e.jsx)(r,{long:"--cft",desc:"Use Playwright Chromium instead of managed Chrome"}),(0,e.jsx)(r,{long:"--global-context",arg:"<file>",desc:"Override global context markdown"}),(0,e.jsx)(r,{long:"--local-context",arg:"<file>",desc:"Override local context markdown"}),(0,e.jsx)(r,{long:"--username",arg:"<user>",desc:"Basic auth (skip OAuth)"}),(0,e.jsx)(r,{long:"--access-key",arg:"<key>",desc:"Basic auth access key"}),(0,e.jsx)(r,{long:"--env",arg:"<name>",desc:"Environment (prod or stage)"}),(0,e.jsx)(r,{long:"--agent",desc:"NDJSON output (no UI)",highlight:!0})]}),(0,e.jsxs)(m,{title:"EXAMPLES",children:[(0,e.jsx)(g,{label:"Search",cmd:`${a} run "Search for laptop" --url https://amazon.in`}),(0,e.jsx)(g,{label:"Headless",cmd:`${a} run "Verify login" --url https://app.example.com --headless`}),(0,e.jsx)(g,{label:"Variables",cmd:`${a} run "Login as {{user}}" --url https://app.com --variables '{"user":{"value":"alice"}}'`}),(0,e.jsx)(g,{label:"Agent",cmd:`${a} run "Add to cart" --url https://shop.com --agent | jq .status`})]}),(0,e.jsxs)(n,{flexDirection:"column",marginTop:0,paddingX:1,children:[(0,e.jsx)(o,{color:t.muted,children:"\u2500".repeat(Math.min(s-2,70))}),(0,e.jsxs)(n,{gap:3,children:[(0,e.jsxs)(n,{children:[(0,e.jsx)(o,{color:t.dimmed,children:"Docs "}),(0,e.jsx)(o,{color:t.cyan,underline:!0,children:w})]}),(0,e.jsxs)(n,{children:[(0,e.jsx)(o,{color:t.dimmed,children:"Bugs "}),(0,e.jsx)(o,{color:t.cyan,underline:!0,children:B})]})]})]}),(0,e.jsx)(o,{children:" "})]})}function m({title:c,children:l}){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.dimmed,children:c})}),l]})}function i({cmd:c,args:l,desc:s,highlight:d}){return(0,e.jsxs)(n,{marginLeft:2,children:[(0,e.jsx)(n,{width:12,children:(0,e.jsx)(o,{color:d?t.purple:t.green,bold:!0,children:c})}),(0,e.jsx)(n,{width:28,children:l?(0,e.jsx)(o,{color:t.dimmed,children:l}):null}),(0,e.jsx)(o,{color:t.dimmed,children:s})]})}function r({long:c,arg:l,desc:s,highlight:d}){return(0,e.jsxs)(n,{marginLeft:2,children:[(0,e.jsxs)(n,{width:26,children:[(0,e.jsx)(o,{color:d?t.purple:t.cyan,children:c}),l&&(0,e.jsxs)(o,{color:t.dimmed,children:[" ",l]})]}),(0,e.jsx)(o,{color:t.dimmed,children:s})]})}function g({label:c,cmd:l}){return(0,e.jsxs)(n,{marginLeft:2,flexDirection:"column",children:[(0,e.jsxs)(o,{color:t.dimmed,children:["# ",c]}),(0,e.jsxs)(o,{color:t.cyan,children:["$ ",l]})]})}export{L as HelpView};
@@ -1,2 +0,0 @@
1
- import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{a,b}from"./chunk-D7CQOCME.js";import"./chunk-NYYKIIZC.js";import"./chunk-XQBQB3VZ.js";import"./chunk-HCBYKLMW.js";import"./chunk-KPCYAR4I.js";import"./chunk-Q7JVDEOV.js";import"./chunk-6YGTRKDT.js";import"./chunk-UR6MHSHU.js";export{b as ProjectPicker,a as formatProjectLine};
@@ -1,2 +0,0 @@
1
- import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- var d=class{constructor(e,t,a){this.baseUrl=e;this.authHeader=`Basic ${Buffer.from(`${t}:${a}`).toString("base64")}`}authHeader;headers(){return{Authorization:this.authHeader,"Content-Type":"application/json",Accept:"application/json"}}async listProjects(e=1,t=50,a){let i=`${this.baseUrl}/v1/projects?page=${e}&per_page=${t}&sort=created_at`,s=await fetch(i,{method:"GET",headers:this.headers()});if(!s.ok)throw new Error(`List projects failed: ${s.status} ${await s.text()}`);let o=await s.json();if(a&&o.data?.length>0){let r=o.data[0];a(`PROJECT response sample project_id=${r.project_id} name=${r.name}`)}return o.data}async getDefaultFolder(e){let t=await fetch(`${this.baseUrl}/v1/projects/${e}/folder/default`,{method:"GET",headers:this.headers()});if(!t.ok)throw new Error(`Get default folder failed: ${t.status} ${await t.text()}`);return(await t.json()).id}async listFolders(e){let t=await fetch(`${this.baseUrl}/v1/folder/entity/${e}`,{method:"GET",headers:this.headers()});if(!t.ok)throw new Error(`List folders failed: ${t.status} ${await t.text()}`);return(await t.json()).data??[]}async createAtmTest(e,t){let a=t?`Bearer ${t}`:this.authHeader,i=await fetch(`${this.baseUrl}/atm/v1/test`,{method:"POST",headers:{Authorization:a,"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify(e)});if(!i.ok)throw new Error(`Create ATM test failed: ${i.status} ${await i.text()}`);let s=await i.json();if(!s.test_id)throw new Error("Create ATM test returned no test_id");return s.test_id}async endTest(e,t,a){let i=a?`Bearer ${a}`:this.authHeader,s=new URLSearchParams({commit_id:t.commit_id,time_taken:String(t.time_taken),steps_count:String(t.steps_count),commit_message:t.commit_message}),o={};t.objectives&&t.objectives.length>0&&(o.objectives=t.objectives);let r=await fetch(`${this.baseUrl}/atm/v1/test/${e}?${s.toString()}`,{method:"DELETE",headers:{Authorization:i,"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify(o)});if(!r.ok)throw new Error(`End test failed: ${r.status} ${await r.text()}`);let n=await r.json();return{testcase_id:n.data?.testcase_id??"",test_id:n.data?.test_id??e,project_id:n.data?.project_id??""}}async submitFeedback(e,t){let a=t?`Bearer ${t}`:this.authHeader,i={instruction_id:e.instruction_id,test_id:e.test_id,feedback_type:e.feedback_type,mode:e.mode??"human"};e.details&&(i.details=e.details);let s=await fetch(`${this.baseUrl}/atm/v1/generative-feedback`,{method:"POST",headers:{Authorization:a,"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify(i)});if(!s.ok)throw new Error(`Submit feedback failed: ${s.status} ${await s.text()}`);return await s.json()}};export{d as a};
@@ -1,2 +0,0 @@
1
- import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{a}from"./chunk-O2HIAIOC.js";import"./chunk-3CJ6IY5O.js";import"./chunk-XQBQB3VZ.js";import"./chunk-UR6MHSHU.js";export{a as UploadPipeline};