@humain/humain-code 0.4.9 → 0.4.11
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.
- package/CHANGELOG.md +35 -0
- package/dist/bundle/agent-monitor.js +1 -1
- package/dist/bundle/chunks/bedrock-converse-stream.js +39 -45
- package/dist/bundle/chunks/{chunk-KRMTBTWU.js → chunk-77EWF2NW.js} +1 -1
- package/dist/bundle/chunks/{chunk-RBKDBF5G.js → chunk-AS2Y2MO6.js} +36 -36
- package/dist/bundle/chunks/{chunk-P4YMUUSK.js → chunk-DX3OMELJ.js} +741 -733
- package/dist/bundle/chunks/{chunk-W2QRCQBX.js → chunk-FF26YENK.js} +3 -4
- package/dist/bundle/chunks/{chunk-UZ5FVVCP.js → chunk-HMWAH7ZY.js} +1 -1
- package/dist/bundle/chunks/{chunk-F7UMX5BV.js → chunk-HSDTSUZE.js} +13 -2
- package/dist/bundle/chunks/chunk-I2ZWZAIV.js +751 -0
- package/dist/bundle/chunks/{chunk-GUUAEK6G.js → chunk-LCOHFEZZ.js} +1 -1
- package/dist/bundle/chunks/{chunk-6FVNSW6B.js → chunk-PIX6AAU6.js} +3354 -3939
- package/dist/bundle/chunks/{chunk-Z5LYSSTY.js → chunk-QSPDLT2R.js} +2 -2
- package/dist/bundle/chunks/{chunk-UBQSONVR.js → chunk-R5VIAWGA.js} +103 -145
- package/dist/bundle/chunks/{chunk-4LAKI5IL.js → chunk-SZRZXVVZ.js} +9 -9
- package/dist/bundle/chunks/{chunk-EMYNPLY5.js → chunk-V5ZF7Q7L.js} +1 -1
- package/dist/bundle/chunks/{chunk-LQ4S7CRR.js → chunk-VYIIPF57.js} +1 -1
- package/dist/bundle/chunks/chunk-WBJN6PEI.js +43 -0
- package/dist/bundle/chunks/{chunk-SWRU4BOC.js → chunk-XGO43DKL.js} +1 -1
- package/dist/bundle/chunks/chunk-XKSDVBMN.js +28 -0
- package/dist/bundle/chunks/{chunk-PMISFIBM.js → chunk-XMHLSV3I.js} +1 -1
- package/dist/bundle/chunks/{chunk-3E4SMILM.js → chunk-YJBE3IGR.js} +14 -14
- package/dist/bundle/chunks/{cli-ZKT34WPW.js → cli-5ACW3WND.js} +2 -2
- package/dist/bundle/chunks/{compat-HEUVP6UJ.js → compat-KXKKCXPQ.js} +1 -1
- package/dist/bundle/chunks/{dist-NU2EIVT6.js → dist-7DVXM77G.js} +742 -615
- package/dist/bundle/chunks/dist-cjs-RL2OCAP2.js +179 -0
- package/dist/bundle/chunks/{easter-egg-3d-5KKDWEIA.js → easter-egg-3d-3L3IKAT6.js} +1 -1
- package/dist/bundle/chunks/{esm-NCUV2DF7.js → esm-763X2IA7.js} +1 -1
- package/dist/bundle/chunks/event-streams-R5OECII4.js +2 -0
- package/dist/bundle/chunks/{execute-OSBDNQU5.js → execute-4X6G65NZ.js} +1 -1
- package/dist/bundle/chunks/{extract-PYRMDATF.js → extract-DLZ425VI.js} +4 -4
- package/dist/bundle/chunks/github-copilot.js +32 -31
- package/dist/bundle/chunks/{google-generative-ai-H2F5Y5H2.js → google-generative-ai-JD2FVOIX.js} +1 -1
- package/dist/bundle/chunks/{google-vertex-LFWD2AOO.js → google-vertex-PFBMDCBW.js} +1 -1
- package/dist/bundle/chunks/{host-6ZA6LK4C.js → host-4J7H7KDS.js} +1 -1
- package/dist/bundle/chunks/{node-XGNY74WT.js → node-W47VUEGE.js} +1 -1
- package/dist/bundle/chunks/{runtime-JFLZUNYP.js → runtime-SI76JZNE.js} +1 -1
- package/dist/bundle/chunks/virtual-modules-E3FQAR5T.js +5 -0
- package/dist/bundle/cli-runtime.js +3 -3
- package/dist/bundle/flow/package.json +1 -1
- package/dist/bundle/index.js +17 -17
- package/dist/bundle/rpc-entry.js +3 -2
- package/dist/core/account-reporting.d.ts +109 -0
- package/dist/core/account-reporting.d.ts.map +1 -0
- package/dist/core/account-reporting.js +328 -0
- package/dist/core/account-reporting.js.map +1 -0
- package/dist/core/agent-session.d.ts +22 -2
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +131 -0
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/anthropic-account-reporting.d.ts +76 -0
- package/dist/core/anthropic-account-reporting.d.ts.map +1 -0
- package/dist/core/anthropic-account-reporting.js +380 -0
- package/dist/core/anthropic-account-reporting.js.map +1 -0
- package/dist/core/bedrock-account-reporting.d.ts +82 -0
- package/dist/core/bedrock-account-reporting.d.ts.map +1 -0
- package/dist/core/bedrock-account-reporting.js +402 -0
- package/dist/core/bedrock-account-reporting.js.map +1 -0
- package/dist/core/model-runtime.d.ts +17 -0
- package/dist/core/model-runtime.d.ts.map +1 -1
- package/dist/core/model-runtime.js +64 -10
- package/dist/core/model-runtime.js.map +1 -1
- package/dist/core/oauth-account-pool.d.ts +4 -0
- package/dist/core/oauth-account-pool.d.ts.map +1 -1
- package/dist/core/oauth-account-pool.js +10 -3
- package/dist/core/oauth-account-pool.js.map +1 -1
- package/dist/humain/flow-accounts-host.d.ts +120 -0
- package/dist/humain/flow-accounts-host.d.ts.map +1 -0
- package/dist/humain/flow-accounts-host.js +346 -0
- package/dist/humain/flow-accounts-host.js.map +1 -0
- package/dist/humain/flow-command.d.ts +28 -0
- package/dist/humain/flow-command.d.ts.map +1 -0
- package/dist/humain/flow-command.js +226 -0
- package/dist/humain/flow-command.js.map +1 -0
- package/dist/humain/flow-loader.d.ts +4 -2
- package/dist/humain/flow-loader.d.ts.map +1 -1
- package/dist/humain/flow-loader.js +120 -91
- package/dist/humain/flow-loader.js.map +1 -1
- package/dist/humain/node-account-failure.d.ts +18 -0
- package/dist/humain/node-account-failure.d.ts.map +1 -0
- package/dist/humain/node-account-failure.js +73 -0
- package/dist/humain/node-account-failure.js.map +1 -0
- package/dist/humain/node-account-fallback.d.ts +85 -0
- package/dist/humain/node-account-fallback.d.ts.map +1 -0
- package/dist/humain/node-account-fallback.js +175 -0
- package/dist/humain/node-account-fallback.js.map +1 -0
- package/dist/humain/node-http.d.ts.map +1 -1
- package/dist/humain/node-http.js +11 -0
- package/dist/humain/node-http.js.map +1 -1
- package/dist/humain/node-provider.d.ts +4 -0
- package/dist/humain/node-provider.d.ts.map +1 -1
- package/dist/humain/node-provider.js +11 -0
- package/dist/humain/node-provider.js.map +1 -1
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/modes/interactive/components/login-dialog.d.ts +2 -0
- package/dist/modes/interactive/components/login-dialog.d.ts.map +1 -1
- package/dist/modes/interactive/components/login-dialog.js +5 -0
- package/dist/modes/interactive/components/login-dialog.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts +26 -0
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +242 -19
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/docs/flow-profiles.md +57 -5
- package/docs/flow.md +119 -37
- package/docs/providers.md +37 -0
- package/npm-shrinkwrap.json +48 -6
- package/package.json +3 -2
- package/dist/bundle/chunks/chunk-JOKJ3CEL.js +0 -27
- package/dist/bundle/chunks/event-streams-CGCQQL5M.js +0 -2
- package/dist/bundle/chunks/virtual-modules-NPWQ6NBS.js +0 -5
|
@@ -83,10 +83,9 @@ hasChildren(node)&&existsOne(test,node.children))}function findAll(test,nodes){l
|
|
|
83
83
|
{"node_modules/domutils/dist/querying.js"(){init_dist4()}});function getAttribCheck(attrib,value){return typeof value=="function"?element=>isTag2(element)&&value(element.attribs[attrib]):element=>isTag2(element)&&element.attribs[attrib]===value}function combineFuncs(a,b){return element=>a(element)||b(element)}function compileTest(options){let funcs=Object.keys(options).map(key=>{let value=options[key];return Object.hasOwn(Checks,key)?Checks[key](value):getAttribCheck(key,value)});return funcs.length===0?null:funcs.reduce(combineFuncs)}function testElement(options,node){
|
|
84
84
|
let test=compileTest(options);return test?test(node):!0}function getElements(options,nodes,recurse,limit=Number.POSITIVE_INFINITY){let test=compileTest(options);return test?filter(test,nodes,recurse,limit):[]}function getElementById(id,nodes,recurse=!0){return Array.isArray(nodes)||(nodes=[nodes]),findOne(getAttribCheck("id",id),nodes,recurse)}function getElementsByTagName(tagName,nodes,recurse=!0,limit=Number.POSITIVE_INFINITY){return filter(Checks.tag_name(tagName),nodes,recurse,limit)}function getElementsByClassName(className,nodes,recurse=!0,limit=Number.
|
|
85
85
|
POSITIVE_INFINITY){return filter(getAttribCheck("class",className),nodes,recurse,limit)}function getElementsByTagType(type,nodes,recurse=!0,limit=Number.POSITIVE_INFINITY){return filter(Checks.tag_type(type),nodes,recurse,limit)}var Checks,init_legacy=__esm({"node_modules/domutils/dist/legacy.js"(){init_dist4();init_querying();Checks={tag_name(name){return typeof name=="function"?element=>isTag2(element)&&name(element.name):name==="*"?isTag2:element=>isTag2(element)&&element.name===name},tag_type(type){
|
|
86
|
-
return typeof type=="function"?element=>type(element.type):element=>element.type===type},tag_contains(data){return typeof data=="function"?element=>isText(element)&&data(element.data):element=>isText(element)&&element.data===data}}}});function
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
entities/dist/escape.js"(){XML_BITSET_VALUE=1342177476,xmlEncodeRegex=/["&'<>\u0080-\uFFFF]/g;attributeEscapeRegex=/["&\u{A0}]/gu;textEscapeRegex=/[&<>\u{A0}]/gu}});var EntityLevel,EncodingMode,init_dist5=__esm({"node_modules/entities/dist/index.js"(){init_escape();(function(EntityLevel2){EntityLevel2[EntityLevel2.XML=0]="XML",EntityLevel2[EntityLevel2.HTML=1]="HTML"})(EntityLevel||(EntityLevel={}));(function(EncodingMode2){EncodingMode2[EncodingMode2.UTF8=0]="UTF8",EncodingMode2[EncodingMode2.ASCII=1]="ASCII",EncodingMode2[EncodingMode2.Extensive=2]="Extensive",EncodingMode2[EncodingMode2.Attribute=3]="Attribute",EncodingMode2[EncodingMode2.Text=4]="Text"})(
|
|
86
|
+
return typeof type=="function"?element=>type(element.type):element=>element.type===type},tag_contains(data){return typeof data=="function"?element=>isText(element)&&data(element.data):element=>isText(element)&&element.data===data}}}});function encodeXML(input){let out,last=0,{length}=input;for(let index=0;index<length;index++){let char=input.charCodeAt(index);if(char<128&&((XML_BITSET_VALUE>>>char&1)===0||char>=64||char<32))continue;if(out===void 0?out=input.substring(0,index):last!==index&&(out+=input.substring(last,index)),char<64){out+=xmlCodeMap.get(char),last=index+1;continue}let cp=getCodePoint(input,index);out+=`&#x${cp.toString(16)};`,cp!==char&&index++,last=index+1}return out===void 0?input:(last<length&&(out+=input.
|
|
87
|
+
substr(last)),out)}function getEscaper(regex,map){return function(data){let match,lastIndex=0,result="";for(;match=regex.exec(data);)lastIndex!==match.index&&(result+=data.substring(lastIndex,match.index)),result+=map.get(match[0].charCodeAt(0)),lastIndex=match.index+1;return result+data.substring(lastIndex)}}var xmlCodeMap,getCodePoint,XML_BITSET_VALUE,escapeAttribute,escapeText,init_escape=__esm({"node_modules/entities/dist/escape.js"(){xmlCodeMap=new Map([[34,"""],[38,"&"],[39,"&apos\
|
|
88
|
+
;"],[60,"<"],[62,">"]]),getCodePoint=typeof String.prototype.codePointAt=="function"?(input,index)=>input.codePointAt(index):(c,index)=>(c.charCodeAt(index)&64512)===55296?(c.charCodeAt(index)-55296)*1024+c.charCodeAt(index+1)-56320+65536:c.charCodeAt(index),XML_BITSET_VALUE=1342177476;escapeAttribute=getEscaper(/["&\u00A0]/g,new Map([[34,"""],[38,"&"],[160," "]])),escapeText=getEscaper(/[&<>\u00A0]/g,new Map([[38,"&"],[60,"<"],[62,">"],[160," "]]))}});var EntityLevel,EncodingMode,init_dist5=__esm({"node_modules/entities/dist/index.js"(){init_escape();(function(EntityLevel2){EntityLevel2[EntityLevel2.XML=0]="XML",EntityLevel2[EntityLevel2.HTML=1]="HTML"})(EntityLevel||(EntityLevel={}));(function(EncodingMode2){EncodingMode2[EncodingMode2.UTF8=0]="UTF8",EncodingMode2[EncodingMode2.ASCII=1]="ASCII",EncodingMode2[EncodingMode2.Extensive=2]="Extensive",EncodingMode2[EncodingMode2.Attribute=3]="Attribute",EncodingMode2[EncodingMode2.Text=4]="Text"})(
|
|
90
89
|
EncodingMode||(EncodingMode={}))}});var elementNames,attributeNames,init_foreign_names=__esm({"node_modules/dom-serializer/dist/foreign-names.js"(){elementNames=new Map("altGlyph altGlyphDef altGlyphItem animateColor animateMotion animateTransform clipPath feBlend feColorMatrix feComponentTransfer feComposite feConvolveMatrix feDiffuseLighting feDisplacementMap feDistantLight feDropShadow feFlood feFuncA feFuncB feFuncG feFuncR feGaussianBlur feImage feMerge feMergeNode feMorphology feOffset fePointLight feSpecularLighting feSpotL\
|
|
91
90
|
ight feTile feTurbulence foreignObject glyphRef linearGradient radialGradient textPath".split(" ").map(name=>[name.toLowerCase(),name])),attributeNames=new Map("definitionURL attributeName attributeType baseFrequency baseProfile calcMode clipPathUnits diffuseConstant edgeMode filterUnits glyphRef gradientTransform gradientUnits kernelMatrix kernelUnitLength keyPoints keySplines keyTimes lengthAdjust limitingConeAngle markerHeight markerUnits markerWidth maskContentUnits maskUnits numOctaves path\
|
|
92
91
|
Length patternContentUnits patternTransform patternUnits pointsAtX pointsAtY pointsAtZ preserveAlpha preserveAspectRatio primitiveUnits refX refY repeatCount repeatDur requiredExtensions requiredFeatures specularConstant specularExponent spreadMethod startOffset stdDeviation stitchTiles surfaceScale systemLanguage tableValues targetX targetY textLength viewBox viewTarget xChannelSelector yChannelSelector zoomAndPan".split(" ").map(name=>[name.toLowerCase(),name]))}});function render(node,options={}){let nodes="length"in node?node:[node],xmlMode=options.xmlMode??!1,output="";for(let index=0;index<nodes.length;index++)output+=renderNode(nodes[index],options,xmlMode);return output}function renderChildren(children,options,xmlMode){let output="";for(let index=0;index<children.length;index++)output+=renderNode(children[index],options,xmlMode);return output}function renderNode(node,options,xmlMode){switch(node.type){case Root:return renderChildren(node.children,options,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createRequire as __piCreateRequire } from "node:module"; const require = __piCreateRequire(import.meta.url);
|
|
2
|
-
import{getAgentDir}from"./chunk-
|
|
2
|
+
import{getAgentDir}from"./chunk-YJBE3IGR.js";import{AsyncLocalStorage}from"node:async_hooks";import{spawn}from"node:child_process";import{existsSync,readFileSync}from"node:fs";import{mkdtemp,readFile,rm,writeFile}from"node:fs/promises";import{isIP}from"node:net";import{hostname,tmpdir}from"node:os";import{join}from"node:path";function getWebSearchConfigDir(){return getAgentDir()}function getWebSearchConfigPath(){return join(getWebSearchConfigDir(),"web-search.json")}function isLoopbackHostname(hostnameValue){let normalized=hostnameValue.replace(/^\[|\]$/g,"").replace(/\.$/,"").toLowerCase();return normalized==="localhost"||normalized==="::1"||isIP(normalized)===4&&normalized.split(".",1)[0]==="127"}function resolveApiBaseUrl(options){let fromEnvironment=options.environmentValue!==void 0,value=fromEnvironment?options.
|
|
3
3
|
environmentValue:options.configuredValue;if(value===void 0)return options.defaultValue;let source=fromEnvironment?options.environmentKey:`${options.configKey} in ${getWebSearchConfigPath()}`;if(typeof value!="string"||value.trim().length===0)throw new Error(`${source} must be an absolute HTTP(S) URL`);let url;try{url=new URL(value.trim())}catch{throw new Error(`${source} must be an absolute HTTP(S) URL`)}if(url.protocol!=="https:"&&(url.protocol!=="http:"||!isLoopbackHostname(url.hostname)))throw new Error(
|
|
4
4
|
`${source} must be an absolute HTTPS URL`);if(url.username||url.password)throw new Error(`${source} must not include credentials`);if(url.search||url.hash)throw new Error(`${source} must not include query parameters or fragments`);return url.search="",url.hash="",url.pathname=url.pathname.replace(/\/+$/,""),url.toString().replace(/\/+$/,"")}var API_REDIRECT_STATUSES=new Set([301,302,303,307,308]),API_REQUEST_BODY_HEADERS=["Content-Encoding","Content-Language","Content-Location","Content-Type"],MAX_API_REDIRECTS=5;
|
|
5
5
|
async function fetchWithCredentialRedirects(url,init,credentialHeaders){let current=new URL(url),requestInit=init;for(let redirects=0;;redirects++){let response=await fetch(current,{...requestInit,redirect:"manual"});if(!API_REDIRECT_STATUSES.has(response.status))return response;let location=response.headers.get("location");if(!location)return response;if(redirects===MAX_API_REDIRECTS)throw new Error(`Too many API redirects from ${url}`);let next=new URL(location,current);if(next.protocol!=="htt\
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createRequire as __piCreateRequire } from "node:module"; const require = __piCreateRequire(import.meta.url);
|
|
2
|
-
import{VisualLinePreview,formatSize,formatToolCallWithArgs,getShellConfig,getTextOutput,replaceTabs,truncateMiddle,writeOutputFile}from"./chunk-
|
|
2
|
+
import{VisualLinePreview,formatSize,formatToolCallWithArgs,getShellConfig,getTextOutput,replaceTabs,truncateMiddle,writeOutputFile}from"./chunk-XMHLSV3I.js";import{Container,Spacer,Text,keyHint}from"./chunk-VYIIPF57.js";import{getAgentDir,getFileRevision,normalizePath,require_isexe,stripBom}from"./chunk-YJBE3IGR.js";import{__commonJS,__require,__toESM}from"./chunk-JXWJOIH4.js";var require_polyfills=__commonJS({"node_modules/graceful-fs/polyfills.js"(exports,module){var constants=__require("constants"),origCwd=process.cwd,cwd=null,platform=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){return cwd||(cwd=origCwd.call(process)),cwd};try{process.cwd()}catch{}typeof process.chdir=="function"&&(chdir=process.chdir,process.chdir=function(d){cwd=null,chdir.call(process,d)},Object.setPrototypeOf&&Object.setPrototypeOf(process.chdir,chdir));var chdir;module.
|
|
3
3
|
exports=patch;function patch(fs){constants.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)&&patchLchmod(fs),fs.lutimes||patchLutimes(fs),fs.chown=chownFix(fs.chown),fs.fchown=chownFix(fs.fchown),fs.lchown=chownFix(fs.lchown),fs.chmod=chmodFix(fs.chmod),fs.fchmod=chmodFix(fs.fchmod),fs.lchmod=chmodFix(fs.lchmod),fs.chownSync=chownFixSync(fs.chownSync),fs.fchownSync=chownFixSync(fs.fchownSync),fs.lchownSync=chownFixSync(fs.lchownSync),fs.chmodSync=chmodFixSync(fs.chmodSync),
|
|
4
4
|
fs.fchmodSync=chmodFixSync(fs.fchmodSync),fs.lchmodSync=chmodFixSync(fs.lchmodSync),fs.stat=statFix(fs.stat),fs.fstat=statFix(fs.fstat),fs.lstat=statFix(fs.lstat),fs.statSync=statFixSync(fs.statSync),fs.fstatSync=statFixSync(fs.fstatSync),fs.lstatSync=statFixSync(fs.lstatSync),fs.chmod&&!fs.lchmod&&(fs.lchmod=function(path,mode,cb){cb&&process.nextTick(cb)},fs.lchmodSync=function(){}),fs.chown&&!fs.lchown&&(fs.lchown=function(path,uid,gid,cb){cb&&process.nextTick(cb)},fs.lchownSync=function(){}),
|
|
5
5
|
platform==="win32"&&(fs.rename=typeof fs.rename!="function"?fs.rename:(function(fs$rename){function rename(from,to,cb){var start=Date.now(),backoff=0;fs$rename(from,to,function CB(er){if(er&&(er.code==="EACCES"||er.code==="EPERM"||er.code==="EBUSY")&&Date.now()-start<6e4){setTimeout(function(){fs.stat(to,function(stater,st){stater&&stater.code==="ENOENT"?fs$rename(from,to,CB):cb(er)})},backoff),backoff<100&&(backoff+=10);return}cb&&cb(er)})}return Object.setPrototypeOf&&Object.setPrototypeOf(rename,
|
|
@@ -56,7 +56,18 @@ options={stale:1e4,realpath:!0,fs,...options},options.stale=Math.max(options.sta
|
|
|
56
56
|
lock=lock;module.exports.unlock=unlock;module.exports.check=check;module.exports.getLocks=getLocks}});var require_adapter=__commonJS({"node_modules/proper-lockfile/lib/adapter.js"(exports,module){"use strict";var fs=require_graceful_fs();function createSyncFs(fs2){let methods=["mkdir","realpath","stat","rmdir","utimes"],newFs={...fs2};return methods.forEach(method=>{newFs[method]=(...args)=>{let callback=args.pop(),ret;try{ret=fs2[`${method}Sync`](...args)}catch(err){return callback(err)}callback(null,ret)}}),newFs}function toPromise(method){return(...args)=>new Promise((resolve2,reject)=>{args.
|
|
57
57
|
push((err,result)=>{err?reject(err):resolve2(result)}),method(...args)})}function toSync(method){return(...args)=>{let err,result;if(args.push((_err,_result)=>{err=_err,result=_result}),method(...args),err)throw err;return result}}function toSyncOptions(options){if(options={...options},options.fs=createSyncFs(options.fs||fs),typeof options.retries=="number"&&options.retries>0||options.retries&&typeof options.retries.retries=="number"&&options.retries.retries>0)throw Object.assign(new Error("Cann\
|
|
58
58
|
ot use retries with the sync api"),{code:"ESYNC"});return options}module.exports={toPromise,toSync,toSyncOptions}}});var require_proper_lockfile=__commonJS({"node_modules/proper-lockfile/index.js"(exports,module){"use strict";var lockfile2=require_lockfile(),{toPromise,toSync,toSyncOptions}=require_adapter();async function lock(file,options){let release=await toPromise(lockfile2.lock)(file,options);return toPromise(release)}function lockSync(file,options){let release=toSync(lockfile2.lock)(file,toSyncOptions(options));return toSync(release)}function unlock(file,options){return toPromise(lockfile2.unlock)(file,
|
|
59
|
-
options)}function unlockSync(file,options){return toSync(lockfile2.unlock)(file,toSyncOptions(options))}function check(file,options){return toPromise(lockfile2.check)(file,options)}function checkSync(file,options){return toSync(lockfile2.check)(file,toSyncOptions(options))}module.exports=lock;module.exports.lock=lock;module.exports.unlock=unlock;module.exports.lockSync=lockSync;module.exports.unlockSync=unlockSync;module.exports.check=check;module.exports.checkSync=checkSync}});
|
|
59
|
+
options)}function unlockSync(file,options){return toSync(lockfile2.unlock)(file,toSyncOptions(options))}function check(file,options){return toPromise(lockfile2.check)(file,options)}function checkSync(file,options){return toSync(lockfile2.check)(file,toSyncOptions(options))}module.exports=lock;module.exports.lock=lock;module.exports.unlock=unlock;module.exports.lockSync=lockSync;module.exports.unlockSync=unlockSync;module.exports.check=check;module.exports.checkSync=checkSync}});var require_which=__commonJS({"packages/mcp/node_modules/which/which.js"(exports,module){var isWindows=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",path=__require("path"),COLON=isWindows?";":":",isexe=require_isexe(),getNotFoundError=cmd=>Object.assign(new Error(`not found: ${cmd}`),{code:"ENOENT"}),getPathInfo=(cmd,opt)=>{let colon=opt.colon||COLON,pathEnv=cmd.match(/\//)||isWindows&&cmd.match(/\\/)?[""]:[...isWindows?[process.cwd()]:[],...(opt.path||process.
|
|
60
|
+
env.PATH||"").split(colon)],pathExtExe=isWindows?opt.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",pathExt=isWindows?pathExtExe.split(colon):[""];return isWindows&&cmd.indexOf(".")!==-1&&pathExt[0]!==""&&pathExt.unshift(""),{pathEnv,pathExt,pathExtExe}},which=(cmd,opt,cb)=>{typeof opt=="function"&&(cb=opt,opt={}),opt||(opt={});let{pathEnv,pathExt,pathExtExe}=getPathInfo(cmd,opt),found=[],step=i=>new Promise((resolve2,reject)=>{if(i===pathEnv.length)return opt.all&&found.length?resolve2(
|
|
61
|
+
found):reject(getNotFoundError(cmd));let ppRaw=pathEnv[i],pathPart=/^".*"$/.test(ppRaw)?ppRaw.slice(1,-1):ppRaw,pCmd=path.join(pathPart,cmd),p=!pathPart&&/^\.[\\\/]/.test(cmd)?cmd.slice(0,2)+pCmd:pCmd;resolve2(subStep(p,i,0))}),subStep=(p,i,ii)=>new Promise((resolve2,reject)=>{if(ii===pathExt.length)return resolve2(step(i+1));let ext=pathExt[ii];isexe(p+ext,{pathExt:pathExtExe},(er,is)=>{if(!er&&is)if(opt.all)found.push(p+ext);else return resolve2(p+ext);return resolve2(subStep(p,i,ii+1))})});return cb?
|
|
62
|
+
step(0).then(res=>cb(null,res),cb):step(0)},whichSync=(cmd,opt)=>{opt=opt||{};let{pathEnv,pathExt,pathExtExe}=getPathInfo(cmd,opt),found=[];for(let i=0;i<pathEnv.length;i++){let ppRaw=pathEnv[i],pathPart=/^".*"$/.test(ppRaw)?ppRaw.slice(1,-1):ppRaw,pCmd=path.join(pathPart,cmd),p=!pathPart&&/^\.[\\\/]/.test(cmd)?cmd.slice(0,2)+pCmd:pCmd;for(let j=0;j<pathExt.length;j++){let cur=p+pathExt[j];try{if(isexe.sync(cur,{pathExt:pathExtExe}))if(opt.all)found.push(cur);else return cur}catch{}}}if(opt.all&&
|
|
63
|
+
found.length)return found;if(opt.nothrow)return null;throw getNotFoundError(cmd)};module.exports=which;which.sync=whichSync}});var require_path_key=__commonJS({"packages/mcp/node_modules/path-key/index.js"(exports,module){"use strict";var pathKey=(options={})=>{let environment=options.env||process.env;return(options.platform||process.platform)!=="win32"?"PATH":Object.keys(environment).reverse().find(key=>key.toUpperCase()==="PATH")||"Path"};module.exports=pathKey;module.exports.default=pathKey}});var require_resolveCommand=__commonJS({"packages/mcp/node_modules/cross-spawn/lib/util/resolveCommand.js"(exports,module){"use strict";var path=__require("path"),which=require_which(),getPathKey=require_path_key();function resolveCommandAttempt(parsed,withoutPathExt){let env=parsed.options.env||process.env,cwd=process.cwd(),hasCustomCwd=parsed.options.cwd!=null,shouldSwitchCwd=hasCustomCwd&&process.chdir!==void 0&&!process.chdir.disabled;if(shouldSwitchCwd)try{process.chdir(parsed.options.cwd)}catch{}
|
|
64
|
+
let resolved;try{resolved=which.sync(parsed.command,{path:env[getPathKey({env})],pathExt:withoutPathExt?path.delimiter:void 0})}catch{}finally{shouldSwitchCwd&&process.chdir(cwd)}return resolved&&(resolved=path.resolve(hasCustomCwd?parsed.options.cwd:"",resolved)),resolved}function resolveCommand2(parsed){return resolveCommandAttempt(parsed)||resolveCommandAttempt(parsed,!0)}module.exports=resolveCommand2}});var require_escape=__commonJS({"packages/mcp/node_modules/cross-spawn/lib/util/escape.js"(exports,module){"use strict";var metaCharsRegExp=/([()\][%!^"`<>&|;, *?])/g;function escapeCommand(arg){return arg=arg.replace(metaCharsRegExp,"^$1"),arg}function escapeArgument(arg,doubleEscapeMetaChars){return arg=`${arg}`,arg=arg.replace(/(?=(\\+?)?)\1"/g,'$1$1\\"'),arg=arg.replace(/(?=(\\+?)?)\1$/,"$1$1"),arg=`"${arg}"`,arg=arg.replace(metaCharsRegExp,"^$1"),doubleEscapeMetaChars&&(arg=arg.replace(metaCharsRegExp,
|
|
65
|
+
"^$1")),arg}module.exports.command=escapeCommand;module.exports.argument=escapeArgument}});var require_shebang_regex=__commonJS({"packages/mcp/node_modules/shebang-regex/index.js"(exports,module){"use strict";module.exports=/^#!(.*)/}});var require_shebang_command=__commonJS({"packages/mcp/node_modules/shebang-command/index.js"(exports,module){"use strict";var shebangRegex=require_shebang_regex();module.exports=(string="")=>{let match=string.match(shebangRegex);if(!match)return null;let[path,argument]=match[0].replace(/#! ?/,"").split(" "),binary=path.split("/").pop();return binary==="env"?argument:argument?`${binary} ${argument}`:binary}}});var require_readShebang=__commonJS({"packages/mcp/node_modules/cross-spawn/lib/util/readShebang.js"(exports,module){"use strict";var fs=__require("fs"),shebangCommand=require_shebang_command();function readShebang2(command){let buffer=Buffer.alloc(150),fd;try{fd=fs.openSync(command,"r"),fs.readSync(fd,buffer,0,150,0),fs.closeSync(fd)}catch{}return shebangCommand(buffer.toString())}module.exports=readShebang2}});var require_parse=__commonJS({"packages/mcp/node_modules/cross-spawn/lib/parse.js"(exports,module){"use strict";var path=__require("path"),resolveCommand2=require_resolveCommand(),escape=require_escape(),readShebang2=require_readShebang(),isWin=process.platform==="win32",isExecutableRegExp=/\.(?:com|exe)$/i,isCmdShimRegExp=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function detectShebang(parsed){parsed.file=resolveCommand2(parsed);let shebang=parsed.file&&readShebang2(parsed.file);return shebang?
|
|
66
|
+
(parsed.args.unshift(parsed.file),parsed.command=shebang,resolveCommand2(parsed)):parsed.file}function parseNonShell(parsed){if(!isWin)return parsed;let commandFile=detectShebang(parsed),needsShell=!isExecutableRegExp.test(commandFile);if(parsed.options.forceShell||needsShell){let needsDoubleEscapeMetaChars=isCmdShimRegExp.test(commandFile);parsed.command=path.normalize(parsed.command),parsed.command=escape.command(parsed.command),parsed.args=parsed.args.map(arg=>escape.argument(arg,needsDoubleEscapeMetaChars));
|
|
67
|
+
let shellCommand=[parsed.command].concat(parsed.args).join(" ");parsed.args=["/d","/s","/c",`"${shellCommand}"`],parsed.command=process.env.comspec||"cmd.exe",parsed.options.windowsVerbatimArguments=!0}return parsed}function parse(command,args,options){args&&!Array.isArray(args)&&(options=args,args=null),args=args?args.slice(0):[],options=Object.assign({},options);let parsed={command,args,options,file:void 0,original:{command,args}};return options.shell?parsed:parseNonShell(parsed)}module.exports=
|
|
68
|
+
parse}});var require_enoent=__commonJS({"packages/mcp/node_modules/cross-spawn/lib/enoent.js"(exports,module){"use strict";var isWin=process.platform==="win32";function notFoundError(original,syscall){return Object.assign(new Error(`${syscall} ${original.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${syscall} ${original.command}`,path:original.command,spawnargs:original.args})}function hookChildProcess(cp,parsed){if(!isWin)return;let originalEmit=cp.emit;cp.emit=function(name,arg1){if(name===
|
|
69
|
+
"exit"){let err=verifyENOENT(arg1,parsed);if(err)return originalEmit.call(cp,"error",err)}return originalEmit.apply(cp,arguments)}}function verifyENOENT(status,parsed){return isWin&&status===1&&!parsed.file?notFoundError(parsed.original,"spawn"):null}function verifyENOENTSync(status,parsed){return isWin&&status===1&&!parsed.file?notFoundError(parsed.original,"spawnSync"):null}module.exports={hookChildProcess,verifyENOENT,verifyENOENTSync,notFoundError}}});var require_cross_spawn=__commonJS({"packages/mcp/node_modules/cross-spawn/index.js"(exports,module){"use strict";var cp=__require("child_process"),parse=require_parse(),enoent=require_enoent();function spawn2(command,args,options){let parsed=parse(command,args,options),spawned=cp.spawn(parsed.command,parsed.args,parsed.options);return enoent.hookChildProcess(spawned,parsed),spawned}function spawnSync2(command,args,options){let parsed=parse(command,args,options),result=cp.spawnSync(parsed.command,
|
|
70
|
+
parsed.args,parsed.options);return result.error=result.error||enoent.verifyENOENTSync(result.status,parsed),result}module.exports=spawn2;module.exports.spawn=spawn2;module.exports.sync=spawnSync2;module.exports._parse=parse;module.exports._enoent=enoent}});import{execSync,spawnSync}from"child_process";var commandResultCache=new Map,ENV_VAR_NAME_RE=/^[A-Za-z_][A-Za-z0-9_]*$/,ENV_VAR_NAME_PREFIX_RE=/^[A-Za-z_][A-Za-z0-9_]*/;function appendLiteral(parts,value){if(!value)return;let previousPart=parts[parts.length-1];if(previousPart?.type==="literal"){previousPart.value+=value;return}parts.push({type:"literal",value})}function parseConfigValueTemplate(config){let parts=[],index=0;for(;index<config.length;){let dollarIndex=config.indexOf("$",index);if(dollarIndex<0){appendLiteral(parts,config.slice(
|
|
60
71
|
index));break}appendLiteral(parts,config.slice(index,dollarIndex));let nextChar=config[dollarIndex+1];if(nextChar==="$"||nextChar==="!"){appendLiteral(parts,nextChar),index=dollarIndex+2;continue}if(nextChar==="{"){let endIndex=config.indexOf("}",dollarIndex+2);if(endIndex<0){appendLiteral(parts,"$"),index=dollarIndex+1;continue}let name=config.slice(dollarIndex+2,endIndex);ENV_VAR_NAME_RE.test(name)?parts.push({type:"env",name}):appendLiteral(parts,config.slice(dollarIndex,endIndex+1)),index=endIndex+
|
|
61
72
|
1;continue}let match=config.slice(dollarIndex+1).match(ENV_VAR_NAME_PREFIX_RE);if(match){parts.push({type:"env",name:match[0]}),index=dollarIndex+1+match[0].length;continue}appendLiteral(parts,"$"),index=dollarIndex+1}return parts}function parseConfigValueReference(config){return config.startsWith("!")?{type:"command",config}:{type:"template",parts:parseConfigValueTemplate(config)}}function resolveEnvConfigValue(name,env){return env?.[name]||process.env[name]||void 0}function getTemplateEnvVarNames(parts){
|
|
62
73
|
let names=[];for(let part of parts)part.type!=="env"||names.includes(part.name)||names.push(part.name);return names}function resolveTemplate(parts,env){let resolved="";for(let part of parts){if(part.type==="literal"){resolved+=part.value;continue}let envValue=resolveEnvConfigValue(part.name,env);if(envValue===void 0)return;resolved+=envValue}return resolved}function getConfigValueEnvVarNames(config){let reference=parseConfigValueReference(config);return reference.type==="template"?getTemplateEnvVarNames(reference.parts):[]}function getMissingConfigValueEnvVarNames(config,env){return getConfigValueEnvVarNames(config).filter(name=>resolveEnvConfigValue(name,env)===void 0)}function isCommandConfigValue(config){return parseConfigValueReference(config).type==="command"}function isConfigValueConfigured(config,env){return getMissingConfigValueEnvVarNames(
|