Lines 1-31javascript
2import { createRequire } from 'module'; const require = createRequire(import.meta.url);
3import{a as zt,b as vn,c as bn,d as yn}from"./chunk-XA7UFTB7.js";import"./chunk-JQXARCVE.js";import{i as En}from"./chunk-6PBX7QI7.js";import"./chunk-3MSXQU2C.js";import"./chunk-IO3PBDKN.js";import{c as De}from"./chunk-42WWGBRK.js";import{a as Cn,d as Pe}from"./chunk-VSJAOEBB.js";import{a as Ye,b as Je,c as Qt,d as Xt,f as en,g as nn,h as on,i as sn,j as dn,k as $e,l as un,m as mn,n as fn,o as pn,p as hn,q as gn,r as Ze,s as et,t as tt,u as wn,v as _n}from"./chunk-QW5G7TX3.js";import"./chunk-C5UNZ6ZY.js";import"./chunk-BH6EP2LD.js";import"./chunk-YK63DTUC.js";import{b as ln}from"./chunk-JO3QZB6 ...
4`).replace(/^/gm," ".repeat(o))}let c=[`Usage: ${n.commandUsage(e)}`,""],m=n.commandDescription(e);m.length>0&&(c=c.concat([n.wrap(m,t,0),""]));let u=n.visibleArguments(e).map(d=>a(n.argumentTerm(d),n.argumentDescription(d)));u.length>0&&(c=c.concat(["Arguments:",r(u),""]));let f=n.visibleOptions(e).map(d=>a(n.optionTerm(d),n.optionDescription(d)));if(f.length>0&&(c=c.concat(["Options:",r(f),""])),this.showGlobalOptions){let d=n.visibleGlobalOptions(e).map(b=>a(n.optionTerm(b),n.optionDescription(b)));d.length>0&&(c=c.concat(["Global Options:",r(d),""]))}let p=n.visibleCommands(e).map(d=>a(n.s ...
5`)}padWidth(e,n){return Math.max(n.longestOptionTermLength(e,n),n.longestGlobalOptionTermLength(e,n),n.longestSubcommandTermLength(e,n),n.longestArgumentTermLength(e,n))}wrap(e,n,i,t=40){let o=" \\f\\t\\v\xA0\u1680\u2000-\u200A\u202F\u205F\u3000\uFEFF",s=new RegExp(`[\\n][${o}]+`);if(e.match(s))
7`),m=" ".repeat(i),f="\\s\u200B",p=new RegExp(`
8|.{1,${a-1}}([${f}]|$)|[^${f}]+?([${f}]|$)`,"g"),d=c.match(p)||[];return r+d.map((b,k)=>b===`
9`?"":(k>0?m:"")+b.trimEnd()).join(`
10`)}};An.Help=rt});var ut=me(dt=>{"use strict";var{InvalidArgumentError:mi}=ke(),lt=class{constructor(e,n){this.flags=e,this.description=n||"",this.required=e.includes("<"),this.optional=
11(Did you mean one of ${i.join(", ")}?)`:i.length===1?`
12(Did you mean ${i[0]}?)`:""}On.suggestSimilar=gi});var Dn=me(Pn=>{"use strict";var wi=be("events").EventEmitter,mt=be("child_process"),ie=be("path"),ft=be("fs"),T=be("process"),{
13- specify the name in Command constructor or using .name()`);return n=n||{},n.isDefault&&(this._defaultCommandName=e._name),(n.noHelp||n.hidden)&&(e._hidden=!0),this._registerCommand(e),e.parent=this,e._checkForBrokenPassThrough(),this}createArgument(e,n){return new _i(e,n)}argument(e,n,i,t){let o=this.createArgument(e,n);return typeof i=="function"?o.default(t).argParser(i):o.default(i),this.addArgument(o),this}arguments(e){return e.trim().split(/ +/).forEach(n=>{this.argument(n)}),this}addArgument(e){let n=this.registeredArguments.slice(-1)[0];if(n&&n.variadic)throw new Error(`only the last ...
HighChild Process
Package source references child process execution.
dist/index.jsView on unpkg · L11 14Expecting one of '${i.join("', '")}'`);return this._lifeCycleHooks[e]?this._lifeCycleHooks[e].push(n):this._lifeCycleHooks[e]=[n],this}exitOverride(e){return e?this._exitCallback=e:this._exitCallback=n=>{if(n.code!=="commander.executeSubCommandAsync")throw n},this}_exit(e,n,i){this._exitCallback&&this._exitCallback(new pt(e,n,i)),T.exit(e)}action(e){let n=i=>{let t=this.registeredArguments.length,o=i.slice(0,t);return this._storeOptionsAsProperties?o[t]=this:o[t]=this.opts(),o.push(this),e.apply(this,o)};return this._actionHandler=n,this}createOption(e,n){return new Tn(e,n)}_callParseArg(e,n,i ...
15- already used by option '${n.flags}'`)}this.options.push(e)}_registerCommand(e){let n=t=>[t.name()].concat(t.aliases()),i=n(e).find(t=>this._findCommand(t));if(i){let t=n(this._findCommand(i)).join("|"),o=n(e).
16 - if '${e._name}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead
17 - if the default executable name is not suitable, use the executableFile option to supply a custom name or path
18 - ${u}`;throw new Error(f)}else if(m.code==="EACCES")throw new Error(`'${s}' not executable`);if(!c)T.exit(1);else{let u=new pt(1,"commander.executeSubCommandAsync","(error)");u.nestedError=m,c(u)}}),this.runningCommand=r}_dispatchSubcommand(e,n,i){let t=this._findCommand(e);t||this.help({error:!0});let o;return o=this._chainOrCallSubCommandHook(o,t,"preSubcommand"),o=this._chainOrCall(o,()=>{if(t._executableHandler)this._executeSubCommand(t,n.concat(i));else return t._parseCommand(n,i)}),o}_dispatchHelpCommand(e){e||this.help();let n=this._findCommand(e);return n&&!n._executableHandler&&n.he ...
19`,this._outputConfiguration.writeErr),typeof this._showHelpAfterError=="string"?this._outputConfiguration.writeErr(`${this._showHelpAfterError}
20`):this._showHelpAfterError&&(this._outputConfiguration.writeErr(`
21`),this.outputHelp({error:!0}));let i=n||{},t=i.exitCode||1,o=i.code||"commander.error";this._exit(t,o,e)}_parseOptionsEnv(){this.options.forEach(e=>{if(e.envVar&&e.envVar in T.env){let n=e.attributeName();(this.getOptionValue(n)
22`),this._exit(0,"commander.version",e)}),this}description(e,n){return e===void 0&&n===void 0?this._description:(this._description=e,n&&(this._argsDescription=n),this)}summary(e){return e===void 0?this._summary:(this._summary=e,this)}alias(e){if(e===void 0)return this._aliases[0];let n=this;if(this.commands.length!==0&&this.commands[this.commands.length-1]._executableHandler&&(n=this.commands[this.commands.length-1]),e===n._name)throw new Error("Command alias can't be the same as its name");let i=this.parent?._findCommand(e);if(i){let t=[i.name()].concat(i.aliases()).join("|");throw new Error(` ...
23Expecting one of '${i.join("', '")}'`);let t=`${e}Help`;return this.on(t,o=>{let s;typeof n=="function"?s=n({error:o.error,command:o.command}):s=n,s&&o.write(`${s}
24`)}),this}_outputHelpIfRequested(e){let n=this._getHelpOption();n&&e.find(t=>n.is(t))&&(this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)"))}};function $n(l){return l.map(e=>{if(!e.startsWith("--inspect"))return e;let n,i="127.0.0.1",t="9229",o;return(o=e.match(/^(--inspect(-brk)?)$/))!==null?n=o[1]:(o=e.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null?(n=o[1],/^\d+$/.test(o[3])?t=o[3]:i=o[3]):(o=e.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null&&(n=o[1],i=o[3],t=o[4]),n&&t!=="0"?`${n}=${i}:${parseInt(t)+1}`:e})}Pn.Command=ht});var Fn=me(G=>{"use strict";var{A ...
25`)}async function Bn(l,e,n){let i=Zt(l,e);Pe().then(u=>{u&&pe({type:"update_available",current:u.current,latest:u.latest,severity:u.severity})}).catch(()=>{}),De().then(u=>{u&&pe({type:"skill_update_available",current:u.current,latest:u.latestCompatible,install_cmd:"kane-cli install skill"})}).
26`),process.exit(2));let{runListTui:n,resolveCurrentOrgId:i}=await import("./testmd-actions-N7VS4FS6.js"),t=await i({});t.ok||process.exit(t.code),process.exit(await n(t.orgId))});Ai(e),Oi(e),Ri(e),Ti(e),Ii(e)}function xi(l,e){return e.concat(l)}function Ai(l){l.command("run <path>").description("Run a test from a *_test.md file").option("--url <url>","Start URL for the first step (overrides frontmatter url: and config default_url)").option("--headless","Run Chrome in headless mode").option("--max-steps <n>","Max agent steps","30").option("--timeout <seconds>","Kill after N seconds").option("-- ...
27`),g(0,"config show complete");return}let{ConfigView:y}=await import("./ConfigView-JPBD47MS.js"),{render:j}=await import("./build-JIKYOZUH.js"),S=await import("./react-QWOAB3TB.js"),{waitUntilExit:O}=j(S.default.createElement(y,{model:r.model,authLabel:A,profile:c,env:m,defaultUrl:r.default_url??Ke,projectId:f,projectName:p,folderId:d,folderName:b,windowSize:
29 Variables are loaded in order (later wins):
30 1. Global: ${oe(ae,"variables")}/*.json
31 2. Local: {cwd}/.testmuai/variables/*.json
Long lines were clipped for display.