@aiiware/aii 0.10.5 → 0.10.6
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/bin/aii +6 -6
- package/package.json +1 -1
package/bin/aii
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
/**
|
|
3
|
-
* @aiiware/aii v0.10.
|
|
3
|
+
* @aiiware/aii v0.10.6
|
|
4
4
|
*
|
|
5
5
|
* AI-powered CLI assistant for terminal productivity
|
|
6
6
|
*
|
|
@@ -186,7 +186,7 @@ ${a.comment}`:a.comment}this.doc.range[2]=a.offset;break}default:this.errors.pus
|
|
|
186
186
|
`)+`\r
|
|
187
187
|
\r
|
|
188
188
|
`+a)}function Ol(e,t,a,n,r,i){if(e.listenerCount("wsClientError")){let s=new Error(r);Error.captureStackTrace(s,Ol),e.emit("wsClientError",s,a,t)}else Ef(a,n,r,i)}});function yT(e){Sf={...Sf,...e}}function xf(e){return Sf.emojis?e+" ":""}function Il(e,t){return Sf.colors?t(e):e}function Se(e,...t){Sf.debug&&console.debug(Il(`[DEBUG] ${e}`,_.gray),...t)}function Ige(e,...t){console.log(e,...t)}function Rge(e,...t){console.warn(Il(`${xf("\u26A0\uFE0F")}${e}`,_.yellow),...t)}function Nge(e,...t){console.error(Il(`${xf("\u274C")}${e}`,_.red),...t)}function Mge(e,...t){console.log(Il(`${xf("\u2705")}${e}`,_.green),...t)}function bT(e){let t=[];return t.push(Il(`${xf("\u274C")}${e.message}`,_.red)),e.suggestions&&e.suggestions.length>0&&(t.push(""),t.push(Il(`${xf("\u{1F4A1}")}Solutions:`,_.yellow)),e.suggestions.forEach((a,n)=>{t.push(Il(` ${n+1}. ${a}`,_.gray))})),t.join(`
|
|
189
|
-
`)}var Oge,Sf,we,Fn=tt(()=>{"use strict";va();Oge={debug:!1,colors:!0,emojis:!0},Sf={...Oge};we={debug:Se,info:Ige,warn:Rge,error:Nge,success:Mge,formatError:bT,configure:yT}});var J9={};vr(J9,{MCPConfigManager:()=>Cn,MCP_CATALOG:()=>Rl});import*as mi from"fs";import*as ay from"path";import*as vT from"os";var Rl,Cn,Nl=tt(()=>{"use strict";Rl={github:{name:"GitHub",description:"GitHub API integration for repos, issues, PRs, and more",command:"npx",args:["-y","@modelcontextprotocol/server-github"],env:{GITHUB_PERSONAL_ACCESS_TOKEN:"${GITHUB_TOKEN}"},category:"development"},filesystem:{name:"Filesystem",description:"Read/write files on the local filesystem",command:"npx",args:["-y","@modelcontextprotocol/server-filesystem",vT.homedir()],category:"system"},"brave-search":{name:"Brave Search",description:"Web search using Brave Search API",command:"npx",args:["-y","@brave/brave-search-mcp-server"],env:{BRAVE_API_KEY:"${BRAVE_API_KEY}"},category:"search"},sqlite:{name:"SQLite",description:"Query SQLite databases",command:"uvx",args:["mcp-server-sqlite","--db-path","./database.db"],category:"database"},postgres:{name:"PostgreSQL",description:"Query PostgreSQL databases",command:"npx",args:["-y","@anthropic/mcp-server-postgres"],env:{DATABASE_URL:"${DATABASE_URL}"},category:"database"},"chrome-devtools":{name:"Chrome DevTools",description:"Control Chrome browser via DevTools protocol",command:"npx",args:["chrome-devtools-mcp@latest"],category:"browser"},memory:{name:"Memory",description:"Persistent memory storage for conversation context",command:"npx",args:["-y","@modelcontextprotocol/server-memory"],category:"utility"},puppeteer:{name:"Puppeteer",description:"Browser automation with Puppeteer",command:"npx",args:["-y","@anthropic/mcp-server-puppeteer"],category:"browser"}},Cn=class{configPath;constructor(t){this.configPath=t||ay.join(vT.homedir(),".aii","mcp_servers.json"),this.ensureConfigDir()}ensureConfigDir(){let t=ay.dirname(this.configPath);mi.existsSync(t)||mi.mkdirSync(t,{recursive:!0})}loadConfig(){if(!mi.existsSync(this.configPath))return{mcpServers:{}};try{let t=mi.readFileSync(this.configPath,"utf-8"),a=JSON.parse(t);return typeof a=="object"&&a!==null?a:{mcpServers:{}}}catch{return{mcpServers:{}}}}saveConfig(t){try{return this.ensureConfigDir(),mi.writeFileSync(this.configPath,JSON.stringify(t,null,2),"utf-8"),!0}catch{return!1}}backupConfig(){if(!mi.existsSync(this.configPath))return!0;try{let t=this.configPath+".backup";return mi.copyFileSync(this.configPath,t),!0}catch{return!1}}getConfigPath(){return this.configPath}}});var rp={};vr(rp,{ClientMCPExecutor:()=>ET});import{Client as Lge}from"@modelcontextprotocol/sdk/client/index.js";import{StdioClientTransport as Pge}from"@modelcontextprotocol/sdk/client/stdio.js";var ET,ip=tt(()=>{"use strict";Nl();Fn();ET=class{connections=new Map;toolToServer=new Map;initialized=!1;configManager;constructor(){this.configManager=new Cn}async initialize(){if(this.initialized)return!0;try{let a=this.configManager.loadConfig().mcpServers||{};Se(`Initializing MCP executor with ${Object.keys(a).length} servers`);for(let[n,r]of Object.entries(a)){if(r.enabled===!1){Se(`Skipping disabled server: ${n}`);continue}try{await this.connectToServer(n,r)}catch(i){Se(`Failed to connect to ${n}: ${i}`)}}return this.initialized=!0,Se(`MCP executor initialized with ${this.connections.size} connections`),!0}catch(t){return Se(`Failed to initialize MCP executor: ${t}`),!1}}async connectToServer(t,a){let n=a.command,r=Array.isArray(a.args)?a.args:[a.args||""],i={...process.env};if(a.env)for(let[u,p]of Object.entries(a.env)){let d=String(p).replace(/\$\{(\w+)\}/g,(f,m)=>process.env[m]||"");i[u]=d}Se(`Connecting to MCP server: ${t}`),Se(` command: ${n}`),Se(` args: ${JSON.stringify(r)}`);let s=new Pge({command:n,args:r,env:i,stderr:"pipe"}),o=new Lge({name:"aii-cli",version:"0.1.0"},{capabilities:{}});await o.connect(s);let l=(await o.listTools()).tools.map(u=>({name:u.name,description:u.description||"",inputSchema:u.inputSchema,serverName:t}));this.connections.set(t,{client:o,transport:s,tools:l});for(let u of l)this.toolToServer.set(u.name,t);Se(`Connected to ${t}: discovered ${l.length} tools`)}async handleQueryTools(t){let a=t.request_id||"unknown";Se(`Handling mcp_query_tools request: ${a}`),this.initialized||await this.initialize();try{let n=[];for(let i of this.connections.values())n.push(...i.tools);let r=n.map(i=>({name:i.name,description:i.description,input_schema:i.inputSchema,server_name:i.serverName}));return Se(`Found ${r.length} MCP tools across all servers`),{type:"mcp_query_tools_response",request_id:a,success:!0,tools:r}}catch(n){return Se(`Error querying MCP tools: ${n}`),{type:"mcp_query_tools_response",request_id:a,success:!1,error:String(n),tools:[]}}}async handleToolExecution(t){let a=t.request_id||"unknown",n=t.tool_name,r=t.arguments||{};if(Se(`Handling mcp_tool_request: ${a} - Tool: ${n}`),!n)return{type:"mcp_tool_response",request_id:a,success:!1,error:"Missing tool_name in request"};this.initialized||await this.initialize();try{let i=this.toolToServer.get(n);if(!i)return{type:"mcp_tool_response",request_id:a,success:!1,error:`Tool '${n}' not found in any connected MCP server`};let s=this.connections.get(i);if(!s)return{type:"mcp_tool_response",request_id:a,success:!1,error:`Server '${i}' not connected`};let o=await Promise.race([s.client.callTool({name:n,arguments:r}),new Promise((l,u)=>setTimeout(()=>u(new Error(`Tool '${n}' timed out after 30 seconds`)),3e4))]),c=this.makeContentSerializable(o.content);return Se(`Tool '${n}' executed successfully (server: ${i})`),{type:"mcp_tool_response",request_id:a,success:!o.isError,content:c,server_name:i,error:o.isError?"Tool returned error":void 0}}catch(i){return Se(`Error executing MCP tool '${n}': ${i}`),{type:"mcp_tool_response",request_id:a,success:!1,error:String(i)}}}makeContentSerializable(t){if(t==null)return null;if(Array.isArray(t))return t.map(a=>this.makeContentSerializable(a));if(typeof t=="object"){let a=t;if(a.type==="text"&&typeof a.text=="string")return{type:"text",text:a.text};if(a.type==="image")return{type:"image",data:a.data,mimeType:a.mimeType};let n={};for(let[r,i]of Object.entries(a))n[r]=this.makeContentSerializable(i);return n}return t}async shutdown(){Se("Shutting down MCP executor");for(let[t,a]of this.connections)try{await a.client.close(),Se(`Closed connection to ${t}`)}catch(n){Se(`Error closing ${t}: ${n}`)}this.connections.clear(),this.toolToServer.clear(),this.initialized=!1}isInitialized(){return this.initialized}getConnectionCount(){return this.connections.size}}});var iF=y((WKe,Wge)=>{Wge.exports={dots:{interval:80,frames:["\u280B","\u2819","\u2839","\u2838","\u283C","\u2834","\u2826","\u2827","\u2807","\u280F"]},dots2:{interval:80,frames:["\u28FE","\u28FD","\u28FB","\u28BF","\u287F","\u28DF","\u28EF","\u28F7"]},dots3:{interval:80,frames:["\u280B","\u2819","\u281A","\u281E","\u2816","\u2826","\u2834","\u2832","\u2833","\u2813"]},dots4:{interval:80,frames:["\u2804","\u2806","\u2807","\u280B","\u2819","\u2838","\u2830","\u2820","\u2830","\u2838","\u2819","\u280B","\u2807","\u2806"]},dots5:{interval:80,frames:["\u280B","\u2819","\u281A","\u2812","\u2802","\u2802","\u2812","\u2832","\u2834","\u2826","\u2816","\u2812","\u2810","\u2810","\u2812","\u2813","\u280B"]},dots6:{interval:80,frames:["\u2801","\u2809","\u2819","\u281A","\u2812","\u2802","\u2802","\u2812","\u2832","\u2834","\u2824","\u2804","\u2804","\u2824","\u2834","\u2832","\u2812","\u2802","\u2802","\u2812","\u281A","\u2819","\u2809","\u2801"]},dots7:{interval:80,frames:["\u2808","\u2809","\u280B","\u2813","\u2812","\u2810","\u2810","\u2812","\u2816","\u2826","\u2824","\u2820","\u2820","\u2824","\u2826","\u2816","\u2812","\u2810","\u2810","\u2812","\u2813","\u280B","\u2809","\u2808"]},dots8:{interval:80,frames:["\u2801","\u2801","\u2809","\u2819","\u281A","\u2812","\u2802","\u2802","\u2812","\u2832","\u2834","\u2824","\u2804","\u2804","\u2824","\u2820","\u2820","\u2824","\u2826","\u2816","\u2812","\u2810","\u2810","\u2812","\u2813","\u280B","\u2809","\u2808","\u2808"]},dots9:{interval:80,frames:["\u28B9","\u28BA","\u28BC","\u28F8","\u28C7","\u2867","\u2857","\u284F"]},dots10:{interval:80,frames:["\u2884","\u2882","\u2881","\u2841","\u2848","\u2850","\u2860"]},dots11:{interval:100,frames:["\u2801","\u2802","\u2804","\u2840","\u2880","\u2820","\u2810","\u2808"]},dots12:{interval:80,frames:["\u2880\u2800","\u2840\u2800","\u2804\u2800","\u2882\u2800","\u2842\u2800","\u2805\u2800","\u2883\u2800","\u2843\u2800","\u280D\u2800","\u288B\u2800","\u284B\u2800","\u280D\u2801","\u288B\u2801","\u284B\u2801","\u280D\u2809","\u280B\u2809","\u280B\u2809","\u2809\u2819","\u2809\u2819","\u2809\u2829","\u2808\u2899","\u2808\u2859","\u2888\u2829","\u2840\u2899","\u2804\u2859","\u2882\u2829","\u2842\u2898","\u2805\u2858","\u2883\u2828","\u2843\u2890","\u280D\u2850","\u288B\u2820","\u284B\u2880","\u280D\u2841","\u288B\u2801","\u284B\u2801","\u280D\u2809","\u280B\u2809","\u280B\u2809","\u2809\u2819","\u2809\u2819","\u2809\u2829","\u2808\u2899","\u2808\u2859","\u2808\u2829","\u2800\u2899","\u2800\u2859","\u2800\u2829","\u2800\u2898","\u2800\u2858","\u2800\u2828","\u2800\u2890","\u2800\u2850","\u2800\u2820","\u2800\u2880","\u2800\u2840"]},dots13:{interval:80,frames:["\u28FC","\u28F9","\u28BB","\u283F","\u285F","\u28CF","\u28E7","\u28F6"]},dots8Bit:{interval:80,frames:["\u2800","\u2801","\u2802","\u2803","\u2804","\u2805","\u2806","\u2807","\u2840","\u2841","\u2842","\u2843","\u2844","\u2845","\u2846","\u2847","\u2808","\u2809","\u280A","\u280B","\u280C","\u280D","\u280E","\u280F","\u2848","\u2849","\u284A","\u284B","\u284C","\u284D","\u284E","\u284F","\u2810","\u2811","\u2812","\u2813","\u2814","\u2815","\u2816","\u2817","\u2850","\u2851","\u2852","\u2853","\u2854","\u2855","\u2856","\u2857","\u2818","\u2819","\u281A","\u281B","\u281C","\u281D","\u281E","\u281F","\u2858","\u2859","\u285A","\u285B","\u285C","\u285D","\u285E","\u285F","\u2820","\u2821","\u2822","\u2823","\u2824","\u2825","\u2826","\u2827","\u2860","\u2861","\u2862","\u2863","\u2864","\u2865","\u2866","\u2867","\u2828","\u2829","\u282A","\u282B","\u282C","\u282D","\u282E","\u282F","\u2868","\u2869","\u286A","\u286B","\u286C","\u286D","\u286E","\u286F","\u2830","\u2831","\u2832","\u2833","\u2834","\u2835","\u2836","\u2837","\u2870","\u2871","\u2872","\u2873","\u2874","\u2875","\u2876","\u2877","\u2838","\u2839","\u283A","\u283B","\u283C","\u283D","\u283E","\u283F","\u2878","\u2879","\u287A","\u287B","\u287C","\u287D","\u287E","\u287F","\u2880","\u2881","\u2882","\u2883","\u2884","\u2885","\u2886","\u2887","\u28C0","\u28C1","\u28C2","\u28C3","\u28C4","\u28C5","\u28C6","\u28C7","\u2888","\u2889","\u288A","\u288B","\u288C","\u288D","\u288E","\u288F","\u28C8","\u28C9","\u28CA","\u28CB","\u28CC","\u28CD","\u28CE","\u28CF","\u2890","\u2891","\u2892","\u2893","\u2894","\u2895","\u2896","\u2897","\u28D0","\u28D1","\u28D2","\u28D3","\u28D4","\u28D5","\u28D6","\u28D7","\u2898","\u2899","\u289A","\u289B","\u289C","\u289D","\u289E","\u289F","\u28D8","\u28D9","\u28DA","\u28DB","\u28DC","\u28DD","\u28DE","\u28DF","\u28A0","\u28A1","\u28A2","\u28A3","\u28A4","\u28A5","\u28A6","\u28A7","\u28E0","\u28E1","\u28E2","\u28E3","\u28E4","\u28E5","\u28E6","\u28E7","\u28A8","\u28A9","\u28AA","\u28AB","\u28AC","\u28AD","\u28AE","\u28AF","\u28E8","\u28E9","\u28EA","\u28EB","\u28EC","\u28ED","\u28EE","\u28EF","\u28B0","\u28B1","\u28B2","\u28B3","\u28B4","\u28B5","\u28B6","\u28B7","\u28F0","\u28F1","\u28F2","\u28F3","\u28F4","\u28F5","\u28F6","\u28F7","\u28B8","\u28B9","\u28BA","\u28BB","\u28BC","\u28BD","\u28BE","\u28BF","\u28F8","\u28F9","\u28FA","\u28FB","\u28FC","\u28FD","\u28FE","\u28FF"]},sand:{interval:80,frames:["\u2801","\u2802","\u2804","\u2840","\u2848","\u2850","\u2860","\u28C0","\u28C1","\u28C2","\u28C4","\u28CC","\u28D4","\u28E4","\u28E5","\u28E6","\u28EE","\u28F6","\u28F7","\u28FF","\u287F","\u283F","\u289F","\u281F","\u285B","\u281B","\u282B","\u288B","\u280B","\u280D","\u2849","\u2809","\u2811","\u2821","\u2881"]},line:{interval:130,frames:["-","\\","|","/"]},line2:{interval:100,frames:["\u2802","-","\u2013","\u2014","\u2013","-"]},pipe:{interval:100,frames:["\u2524","\u2518","\u2534","\u2514","\u251C","\u250C","\u252C","\u2510"]},simpleDots:{interval:400,frames:[". ",".. ","..."," "]},simpleDotsScrolling:{interval:200,frames:[". ",".. ","..."," .."," ."," "]},star:{interval:70,frames:["\u2736","\u2738","\u2739","\u273A","\u2739","\u2737"]},star2:{interval:80,frames:["+","x","*"]},flip:{interval:70,frames:["_","_","_","-","`","`","'","\xB4","-","_","_","_"]},hamburger:{interval:100,frames:["\u2631","\u2632","\u2634"]},growVertical:{interval:120,frames:["\u2581","\u2583","\u2584","\u2585","\u2586","\u2587","\u2586","\u2585","\u2584","\u2583"]},growHorizontal:{interval:120,frames:["\u258F","\u258E","\u258D","\u258C","\u258B","\u258A","\u2589","\u258A","\u258B","\u258C","\u258D","\u258E"]},balloon:{interval:140,frames:[" ",".","o","O","@","*"," "]},balloon2:{interval:120,frames:[".","o","O","\xB0","O","o","."]},noise:{interval:100,frames:["\u2593","\u2592","\u2591"]},bounce:{interval:120,frames:["\u2801","\u2802","\u2804","\u2802"]},boxBounce:{interval:120,frames:["\u2596","\u2598","\u259D","\u2597"]},boxBounce2:{interval:100,frames:["\u258C","\u2580","\u2590","\u2584"]},triangle:{interval:50,frames:["\u25E2","\u25E3","\u25E4","\u25E5"]},binary:{interval:80,frames:["010010","001100","100101","111010","111101","010111","101011","111000","110011","110101"]},arc:{interval:100,frames:["\u25DC","\u25E0","\u25DD","\u25DE","\u25E1","\u25DF"]},circle:{interval:120,frames:["\u25E1","\u2299","\u25E0"]},squareCorners:{interval:180,frames:["\u25F0","\u25F3","\u25F2","\u25F1"]},circleQuarters:{interval:120,frames:["\u25F4","\u25F7","\u25F6","\u25F5"]},circleHalves:{interval:50,frames:["\u25D0","\u25D3","\u25D1","\u25D2"]},squish:{interval:100,frames:["\u256B","\u256A"]},toggle:{interval:250,frames:["\u22B6","\u22B7"]},toggle2:{interval:80,frames:["\u25AB","\u25AA"]},toggle3:{interval:120,frames:["\u25A1","\u25A0"]},toggle4:{interval:100,frames:["\u25A0","\u25A1","\u25AA","\u25AB"]},toggle5:{interval:100,frames:["\u25AE","\u25AF"]},toggle6:{interval:300,frames:["\u101D","\u1040"]},toggle7:{interval:80,frames:["\u29BE","\u29BF"]},toggle8:{interval:100,frames:["\u25CD","\u25CC"]},toggle9:{interval:100,frames:["\u25C9","\u25CE"]},toggle10:{interval:100,frames:["\u3282","\u3280","\u3281"]},toggle11:{interval:50,frames:["\u29C7","\u29C6"]},toggle12:{interval:120,frames:["\u2617","\u2616"]},toggle13:{interval:80,frames:["=","*","-"]},arrow:{interval:100,frames:["\u2190","\u2196","\u2191","\u2197","\u2192","\u2198","\u2193","\u2199"]},arrow2:{interval:80,frames:["\u2B06\uFE0F ","\u2197\uFE0F ","\u27A1\uFE0F ","\u2198\uFE0F ","\u2B07\uFE0F ","\u2199\uFE0F ","\u2B05\uFE0F ","\u2196\uFE0F "]},arrow3:{interval:120,frames:["\u25B9\u25B9\u25B9\u25B9\u25B9","\u25B8\u25B9\u25B9\u25B9\u25B9","\u25B9\u25B8\u25B9\u25B9\u25B9","\u25B9\u25B9\u25B8\u25B9\u25B9","\u25B9\u25B9\u25B9\u25B8\u25B9","\u25B9\u25B9\u25B9\u25B9\u25B8"]},bouncingBar:{interval:80,frames:["[ ]","[= ]","[== ]","[=== ]","[====]","[ ===]","[ ==]","[ =]","[ ]","[ =]","[ ==]","[ ===]","[====]","[=== ]","[== ]","[= ]"]},bouncingBall:{interval:80,frames:["( \u25CF )","( \u25CF )","( \u25CF )","( \u25CF )","( \u25CF)","( \u25CF )","( \u25CF )","( \u25CF )","( \u25CF )","(\u25CF )"]},smiley:{interval:200,frames:["\u{1F604} ","\u{1F61D} "]},monkey:{interval:300,frames:["\u{1F648} ","\u{1F648} ","\u{1F649} ","\u{1F64A} "]},hearts:{interval:100,frames:["\u{1F49B} ","\u{1F499} ","\u{1F49C} ","\u{1F49A} ","\u2764\uFE0F "]},clock:{interval:100,frames:["\u{1F55B} ","\u{1F550} ","\u{1F551} ","\u{1F552} ","\u{1F553} ","\u{1F554} ","\u{1F555} ","\u{1F556} ","\u{1F557} ","\u{1F558} ","\u{1F559} ","\u{1F55A} "]},earth:{interval:180,frames:["\u{1F30D} ","\u{1F30E} ","\u{1F30F} "]},material:{interval:17,frames:["\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588","\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581"]},moon:{interval:80,frames:["\u{1F311} ","\u{1F312} ","\u{1F313} ","\u{1F314} ","\u{1F315} ","\u{1F316} ","\u{1F317} ","\u{1F318} "]},runner:{interval:140,frames:["\u{1F6B6} ","\u{1F3C3} "]},pong:{interval:80,frames:["\u2590\u2802 \u258C","\u2590\u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802\u258C","\u2590 \u2820\u258C","\u2590 \u2840\u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590\u2820 \u258C"]},shark:{interval:120,frames:["\u2590|\\____________\u258C","\u2590_|\\___________\u258C","\u2590__|\\__________\u258C","\u2590___|\\_________\u258C","\u2590____|\\________\u258C","\u2590_____|\\_______\u258C","\u2590______|\\______\u258C","\u2590_______|\\_____\u258C","\u2590________|\\____\u258C","\u2590_________|\\___\u258C","\u2590__________|\\__\u258C","\u2590___________|\\_\u258C","\u2590____________|\\\u258C","\u2590____________/|\u258C","\u2590___________/|_\u258C","\u2590__________/|__\u258C","\u2590_________/|___\u258C","\u2590________/|____\u258C","\u2590_______/|_____\u258C","\u2590______/|______\u258C","\u2590_____/|_______\u258C","\u2590____/|________\u258C","\u2590___/|_________\u258C","\u2590__/|__________\u258C","\u2590_/|___________\u258C","\u2590/|____________\u258C"]},dqpb:{interval:100,frames:["d","q","p","b"]},weather:{interval:100,frames:["\u2600\uFE0F ","\u2600\uFE0F ","\u2600\uFE0F ","\u{1F324} ","\u26C5\uFE0F ","\u{1F325} ","\u2601\uFE0F ","\u{1F327} ","\u{1F328} ","\u{1F327} ","\u{1F328} ","\u{1F327} ","\u{1F328} ","\u26C8 ","\u{1F328} ","\u{1F327} ","\u{1F328} ","\u2601\uFE0F ","\u{1F325} ","\u26C5\uFE0F ","\u{1F324} ","\u2600\uFE0F ","\u2600\uFE0F "]},christmas:{interval:400,frames:["\u{1F332}","\u{1F384}"]},grenade:{interval:80,frames:["\u060C ","\u2032 "," \xB4 "," \u203E "," \u2E0C"," \u2E0A"," |"," \u204E"," \u2055"," \u0DF4 "," \u2053"," "," "," "]},point:{interval:125,frames:["\u2219\u2219\u2219","\u25CF\u2219\u2219","\u2219\u25CF\u2219","\u2219\u2219\u25CF","\u2219\u2219\u2219"]},layer:{interval:150,frames:["-","=","\u2261"]},betaWave:{interval:80,frames:["\u03C1\u03B2\u03B2\u03B2\u03B2\u03B2\u03B2","\u03B2\u03C1\u03B2\u03B2\u03B2\u03B2\u03B2","\u03B2\u03B2\u03C1\u03B2\u03B2\u03B2\u03B2","\u03B2\u03B2\u03B2\u03C1\u03B2\u03B2\u03B2","\u03B2\u03B2\u03B2\u03B2\u03C1\u03B2\u03B2","\u03B2\u03B2\u03B2\u03B2\u03B2\u03C1\u03B2","\u03B2\u03B2\u03B2\u03B2\u03B2\u03B2\u03C1"]},fingerDance:{interval:160,frames:["\u{1F918} ","\u{1F91F} ","\u{1F596} ","\u270B ","\u{1F91A} ","\u{1F446} "]},fistBump:{interval:80,frames:["\u{1F91C}\u3000\u3000\u3000\u3000\u{1F91B} ","\u{1F91C}\u3000\u3000\u3000\u3000\u{1F91B} ","\u{1F91C}\u3000\u3000\u3000\u3000\u{1F91B} ","\u3000\u{1F91C}\u3000\u3000\u{1F91B}\u3000 ","\u3000\u3000\u{1F91C}\u{1F91B}\u3000\u3000 ","\u3000\u{1F91C}\u2728\u{1F91B}\u3000\u3000 ","\u{1F91C}\u3000\u2728\u3000\u{1F91B}\u3000 "]},soccerHeader:{interval:80,frames:[" \u{1F9D1}\u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F\u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} "]},mindblown:{interval:160,frames:["\u{1F610} ","\u{1F610} ","\u{1F62E} ","\u{1F62E} ","\u{1F626} ","\u{1F626} ","\u{1F627} ","\u{1F627} ","\u{1F92F} ","\u{1F4A5} ","\u2728 ","\u3000 ","\u3000 ","\u3000 "]},speaker:{interval:160,frames:["\u{1F508} ","\u{1F509} ","\u{1F50A} ","\u{1F509} "]},orangePulse:{interval:100,frames:["\u{1F538} ","\u{1F536} ","\u{1F7E0} ","\u{1F7E0} ","\u{1F536} "]},bluePulse:{interval:100,frames:["\u{1F539} ","\u{1F537} ","\u{1F535} ","\u{1F535} ","\u{1F537} "]},orangeBluePulse:{interval:100,frames:["\u{1F538} ","\u{1F536} ","\u{1F7E0} ","\u{1F7E0} ","\u{1F536} ","\u{1F539} ","\u{1F537} ","\u{1F535} ","\u{1F535} ","\u{1F537} "]},timeTravel:{interval:100,frames:["\u{1F55B} ","\u{1F55A} ","\u{1F559} ","\u{1F558} ","\u{1F557} ","\u{1F556} ","\u{1F555} ","\u{1F554} ","\u{1F553} ","\u{1F552} ","\u{1F551} ","\u{1F550} "]},aesthetic:{interval:80,frames:["\u25B0\u25B1\u25B1\u25B1\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B1\u25B1\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B1\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B0\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B0\u25B0\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B0\u25B0\u25B0","\u25B0\u25B1\u25B1\u25B1\u25B1\u25B1\u25B1"]},dwarfFortress:{interval:80,frames:[" \u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2593\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2593\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2592\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2592\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2591\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2591\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A \u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A \u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A \u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\xA3\xA3\xA3 "," \u263A \u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\xA3\xA3\xA3 "," \u263A \u2588\xA3\xA3\xA3 "," \u263A\u2588\xA3\xA3\xA3 "," \u263A\u2588\xA3\xA3\xA3 "," \u263A\u2593\xA3\xA3\xA3 "," \u263A\u2593\xA3\xA3\xA3 "," \u263A\u2592\xA3\xA3\xA3 "," \u263A\u2592\xA3\xA3\xA3 "," \u263A\u2591\xA3\xA3\xA3 "," \u263A\u2591\xA3\xA3\xA3 "," \u263A \xA3\xA3\xA3 "," \u263A\xA3\xA3\xA3 "," \u263A\xA3\xA3\xA3 "," \u263A\u2593\xA3\xA3 "," \u263A\u2593\xA3\xA3 "," \u263A\u2592\xA3\xA3 "," \u263A\u2592\xA3\xA3 "," \u263A\u2591\xA3\xA3 "," \u263A\u2591\xA3\xA3 "," \u263A \xA3\xA3 "," \u263A\xA3\xA3 "," \u263A\xA3\xA3 "," \u263A\u2593\xA3 "," \u263A\u2593\xA3 "," \u263A\u2592\xA3 "," \u263A\u2592\xA3 "," \u263A\u2591\xA3 "," \u263A\u2591\xA3 "," \u263A \xA3 "," \u263A\xA3 "," \u263A\xA3 "," \u263A\u2593 "," \u263A\u2593 "," \u263A\u2592 "," \u263A\u2592 "," \u263A\u2591 "," \u263A\u2591 "," \u263A "," \u263A &"," \u263A \u263C&"," \u263A \u263C &"," \u263A\u263C &"," \u263A\u263C & "," \u203C & "," \u263A & "," \u203C & "," \u263A & "," \u203C & "," \u263A & ","\u203C & "," & "," & "," & \u2591 "," & \u2592 "," & \u2593 "," & \xA3 "," & \u2591\xA3 "," & \u2592\xA3 "," & \u2593\xA3 "," & \xA3\xA3 "," & \u2591\xA3\xA3 "," & \u2592\xA3\xA3 ","& \u2593\xA3\xA3 ","& \xA3\xA3\xA3 "," \u2591\xA3\xA3\xA3 "," \u2592\xA3\xA3\xA3 "," \u2593\xA3\xA3\xA3 "," \u2588\xA3\xA3\xA3 "," \u2591\u2588\xA3\xA3\xA3 "," \u2592\u2588\xA3\xA3\xA3 "," \u2593\u2588\xA3\xA3\xA3 "," \u2588\u2588\xA3\xA3\xA3 "," \u2591\u2588\u2588\xA3\xA3\xA3 "," \u2592\u2588\u2588\xA3\xA3\xA3 "," \u2593\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\xA3\xA3\xA3 "," \u2591\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2592\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2593\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2591\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2592\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2593\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2591\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2592\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2593\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "]}}});var OT=y((VKe,oF)=>{"use strict";var cy=Object.assign({},iF()),sF=Object.keys(cy);Object.defineProperty(cy,"random",{get(){let e=Math.floor(Math.random()*sF.length),t=sF[e];return cy[t]}});oF.exports=cy});function Ll({onlyFirst:e=!1}={}){let r="(?:\\u001B\\][\\s\\S]*?(?:\\u0007|\\u001B\\u005C|\\u009C))|[\\u001B\\u009B][[\\]()#;?]*(?:\\d{1,4}(?:[;:]\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]";return new RegExp(r,e?void 0:"g")}var ly=tt(()=>{});var mF=y((uWe,dF)=>{dF.exports=()=>/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E-\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED8\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])))?))?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3C-\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE8A\uDE8E-\uDEC2\uDEC6\uDEC8\uDECD-\uDEDC\uDEDF-\uDEEA\uDEEF]|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g});function ut(e,...t){process.env.AII_INK_DEBUG==="1"&&console.error(`[INK-DEBUG] ${e}`,...t)}var py=tt(()=>{"use strict"});import{resolve as s_e}from"path";function o_e(){let e=process.env.TERM??"",t=process.env.TERM_PROGRAM??"",a=process.env.COLORTERM??"",n=process.env.WT_SESSION??"",r=process.env.VSCODE_INJECTION??process.env.TERM_PROGRAM==="vscode";return t==="iTerm.app"||t==="Hyper"||t==="vscode"||t==="WezTerm"||t==="Alacritty"||n||r||e.includes("xterm-256color")||e.includes("screen-256color")||e.includes("tmux")||e==="xterm-kitty"||a==="truecolor"?!0:!(e==="dumb"||!process.stdout.isTTY)}function wf(){return qT===null&&(qT=o_e()),qT}function c_e(){return process.platform==="darwin"?"Cmd":"Ctrl"}function _F(){return gF||!wf()?"":(gF=!0,` (${c_e()}+Click to open)`)}function l_e(e,t){return wf()?`\x1B]8;;${t}\x07${e}\x1B]8;;\x07`:e}function yF(e,t){let a=process.env.HOME??process.env.USERPROFILE??"",n=e;a&&e.startsWith(a)&&(n="~"+e.slice(a.length));let r=t?`${n}:${t}`:n;if(!wf())return _.cyan.underline(r);let i=_.cyan(r),o=`file://${s_e(e)}`;return t!==void 0&&t>0&&(o+=`#L${t}`),l_e(i,o)}var qT,gF,bF=tt(()=>{"use strict";va();qT=null,gF=!1});function vF(e){return e.startsWith("/")||e.startsWith("~/")||e.startsWith("./")||e.startsWith("../")||/^[a-zA-Z]:\\/.test(e)||/\.(ts|tsx|js|jsx|json|md|py|go|rs|java|c|cpp|h|hpp|css|scss|html|xml|yaml|yml|toml|sh|bash|zsh)$/.test(e)||/^src\//.test(e)||/^lib\//.test(e)||/^test[s]?\//.test(e)}function SF(e,t,a=!0,n,r=console.log){let i=a?Fa.success("\u25CF"):Fa.error("\u25CF"),s=60,o=t.length>s?t.slice(0,s-3)+"...":t;if(vF(t)){let l=t.match(/:(\d+)$/),u=l?parseInt(l[1],10):void 0,p=l?t.replace(/:(\d+)$/,""):t;o=u_e(p,u)}r(`${i} ${_.bold(e)}(${o})`);let c=vF(t)?Fa.dim(_F()):"";if(n){let l=a?Fa.dim:Fa.error;r(l(`\u2514 ${n}`)+c)}else{let l=a?"(No content)":"(Error)",u=a?Fa.dim:Fa.error;r(u(`\u2514 ${l}`)+c)}}function u_e(e,t){if(wf())return yF(e,t);let a=process.env.HOME??process.env.USERPROFILE??"",n=e;return a&&e.startsWith(a)&&(n="~"+e.slice(a.length)),t&&(n+=`:${t}`),Fa.filePath(n)}function p_e(){return process.stdout.columns||80}function d_e(e){if(e<60)return`${e}s`;let t=Math.floor(e/60),a=e%60;return a>0?`${t}m ${a}s`:`${t}m`}function EF(e){return e>=1e3?`${(e/1e3).toFixed(1)}K`:e.toString()}function xF(e){let t=p_e(),a=Math.min(t-2,76),n=a-4,r=(d,f)=>{let m=d.replace(/\x1b\[[0-9;]*m/g,"").length;return d+" ".repeat(Math.max(0,f-m))},i=d=>Fa.border("\u2502")+" "+r(d,n)+" "+Fa.border("\u2502"),s=(d,f,m,h)=>{let g=Math.floor(n/2),v=Fa.dim(d.padEnd(15))+f,S=Fa.dim(m.padEnd(15))+h;return i(r(v,g)+S)},o=d_e(e.durationSeconds),c=EF(e.tokensIn),l=EF(e.tokensOut),u=`$${e.totalCost.toFixed(4)}`,p=`${e.provider}/${e.model.replace("claude-","").replace("-latest","")}`;console.log(""),console.log(Fa.border("\u250C"+"\u2500".repeat(a-2)+"\u2510")),console.log(i(_.cyan.bold("Agent powering down. Goodbye!"))),console.log(Fa.border("\u251C"+"\u2500".repeat(a-2)+"\u2524")),console.log(i(_.cyan.bold("Session Summary"))),console.log(i(Fa.dim("\u2500".repeat(15)))),console.log(s("Duration",o,"Tool Calls",e.toolCalls.toString())),console.log(s("Turns",e.turns.toString(),"Files Modified",e.filesModified.toString())),console.log(i("")),console.log(i(_.cyan.bold("Token Usage"))),console.log(i(Fa.dim("\u2500".repeat(11)))),console.log(s("Input",c,"Output",l)),console.log(i(Fa.dim("Cost".padEnd(15))+u)),console.log(i("")),console.log(i(Fa.dim("Model: ")+Fa.model(p))),console.log(Fa.border("\u2514"+"\u2500".repeat(a-2)+"\u2518")),console.log("")}var dy,Fa,Cf=tt(()=>{"use strict";va();bF();dy="0.10.5",Fa={logo:_.cyan.bold,prompt:_.cyan.bold,model:_.cyan,success:_.green,warning:_.yellow,error:_.red,thinking:_.dim.cyan,filePath:_.blue,code:_.white,muted:_.gray,dim:_.dim,safe:_.green,risky:_.yellow,destructive:_.red,border:_.cyan,bannerBorder:_.cyan}});var TF={};vr(TF,{getUIStore:()=>Af,useUIStore:()=>Eo});import{create as m_e}from"zustand";var kF,Eo,Af,GT=tt(()=>{"use strict";kF={mode:"welcome",agentMode:"normal",status:"",isThinking:!1,isStreaming:!1,currentIteration:0,iterationStartTime:Date.now(),iterationTokens:0,contextPercent:0,contextLevel:"normal",contextTokens:0,contextLimit:2e5,sessionCost:0,provider:"",model:"",projectPath:process.cwd(),branch:void 0,toolsCount:0,mcpServersCount:0,contextFilesCount:0,skillsCount:0,sessionStartTime:Date.now(),agentExecMs:0,agentTurnStartTime:null,renderEpoch:0,loopMode:!1},Eo=m_e(e=>({...kF,setMode:t=>e({mode:t}),setAgentMode:t=>e({agentMode:t}),setStatus:t=>e({status:t}),setThinking:t=>e({isThinking:t}),setStreaming:t=>e(a=>{if(t&&!a.agentTurnStartTime)return{isStreaming:t,agentTurnStartTime:Date.now()};if(!t&&a.agentTurnStartTime){let n=Date.now()-a.agentTurnStartTime;return{isStreaming:t,agentExecMs:a.agentExecMs+n,agentTurnStartTime:null}}return{isStreaming:t}}),incrementIteration:()=>e(t=>({currentIteration:t.currentIteration+1,iterationStartTime:Date.now(),iterationTokens:0})),addIterationTokens:t=>e(a=>({iterationTokens:a.iterationTokens+t})),setIterationTokens:t=>e({iterationTokens:t}),updateContext:(t,a)=>{let n=a>0?Math.round(t/a*100):0,r=n>=90?"critical":n>=70?"warning":"normal";e({contextTokens:t,contextLimit:a,contextPercent:n,contextLevel:r})},updateSession:t=>e(t),updateResources:t=>e(t),setLoopMode:t=>e({loopMode:t}),incrementRenderEpoch:()=>e(t=>({renderEpoch:t.renderEpoch+1})),reset:()=>e(kF)})),Af=Eo.getState});function KT(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}function IF(e){Fl=e}function ua(e,t=""){let a=typeof e=="string"?e:e.source,n={replace:(r,i)=>{let s=typeof i=="string"?i:i.source;return s=s.replace(Er.caret,"$1"),a=a.replace(r,s),n},getRegex:()=>new RegExp(a,t)};return n}function bs(e,t){if(t){if(Er.escapeTest.test(e))return e.replace(Er.escapeReplace,CF)}else if(Er.escapeTestNoEncode.test(e))return e.replace(Er.escapeReplaceNoEncode,CF);return e}function AF(e){try{e=encodeURI(e).replace(Er.percentDecode,"%")}catch{return null}return e}function DF(e,t){let a=e.replace(Er.findPipe,(i,s,o)=>{let c=!1,l=s;for(;--l>=0&&o[l]==="\\";)c=!c;return c?"|":" |"}),n=a.split(Er.splitPipe),r=0;if(n[0].trim()||n.shift(),n.length>0&&!n.at(-1)?.trim()&&n.pop(),t)if(n.length>t)n.splice(t);else for(;n.length<t;)n.push("");for(;r<n.length;r++)n[r]=n[r].trim().replace(Er.slashPipe,"|");return n}function Of(e,t,a){let n=e.length;if(n===0)return"";let r=0;for(;r<n;){let i=e.charAt(n-r-1);if(i===t&&!a)r++;else if(i!==t&&a)r++;else break}return e.slice(0,n-r)}function K_e(e,t){if(e.indexOf(t[1])===-1)return-1;let a=0;for(let n=0;n<e.length;n++)if(e[n]==="\\")n++;else if(e[n]===t[0])a++;else if(e[n]===t[1]&&(a--,a<0))return n;return a>0?-2:-1}function OF(e,t,a,n,r){let i=t.href,s=t.title||null,o=e[1].replace(r.other.outputLinkReplace,"$1");n.state.inLink=!0;let c={type:e[0].charAt(0)==="!"?"image":"link",raw:a,href:i,title:s,text:o,tokens:n.inlineTokens(o)};return n.state.inLink=!1,c}function W_e(e,t,a){let n=e.match(a.other.indentCodeCompensation);if(n===null)return t;let r=n[1];return t.split(`
|
|
189
|
+
`)}var Oge,Sf,we,Fn=tt(()=>{"use strict";va();Oge={debug:!1,colors:!0,emojis:!0},Sf={...Oge};we={debug:Se,info:Ige,warn:Rge,error:Nge,success:Mge,formatError:bT,configure:yT}});var J9={};vr(J9,{MCPConfigManager:()=>Cn,MCP_CATALOG:()=>Rl});import*as mi from"fs";import*as ay from"path";import*as vT from"os";var Rl,Cn,Nl=tt(()=>{"use strict";Rl={github:{name:"GitHub",description:"GitHub API integration for repos, issues, PRs, and more",command:"npx",args:["-y","@modelcontextprotocol/server-github"],env:{GITHUB_PERSONAL_ACCESS_TOKEN:"${GITHUB_TOKEN}"},category:"development"},filesystem:{name:"Filesystem",description:"Read/write files on the local filesystem",command:"npx",args:["-y","@modelcontextprotocol/server-filesystem",vT.homedir()],category:"system"},"brave-search":{name:"Brave Search",description:"Web search using Brave Search API",command:"npx",args:["-y","@brave/brave-search-mcp-server"],env:{BRAVE_API_KEY:"${BRAVE_API_KEY}"},category:"search"},sqlite:{name:"SQLite",description:"Query SQLite databases",command:"uvx",args:["mcp-server-sqlite","--db-path","./database.db"],category:"database"},postgres:{name:"PostgreSQL",description:"Query PostgreSQL databases",command:"npx",args:["-y","@anthropic/mcp-server-postgres"],env:{DATABASE_URL:"${DATABASE_URL}"},category:"database"},"chrome-devtools":{name:"Chrome DevTools",description:"Control Chrome browser via DevTools protocol",command:"npx",args:["chrome-devtools-mcp@latest"],category:"browser"},memory:{name:"Memory",description:"Persistent memory storage for conversation context",command:"npx",args:["-y","@modelcontextprotocol/server-memory"],category:"utility"},puppeteer:{name:"Puppeteer",description:"Browser automation with Puppeteer",command:"npx",args:["-y","@anthropic/mcp-server-puppeteer"],category:"browser"}},Cn=class{configPath;constructor(t){this.configPath=t||ay.join(vT.homedir(),".aii","mcp_servers.json"),this.ensureConfigDir()}ensureConfigDir(){let t=ay.dirname(this.configPath);mi.existsSync(t)||mi.mkdirSync(t,{recursive:!0})}loadConfig(){if(!mi.existsSync(this.configPath))return{mcpServers:{}};try{let t=mi.readFileSync(this.configPath,"utf-8"),a=JSON.parse(t);return typeof a=="object"&&a!==null?a:{mcpServers:{}}}catch{return{mcpServers:{}}}}saveConfig(t){try{return this.ensureConfigDir(),mi.writeFileSync(this.configPath,JSON.stringify(t,null,2),"utf-8"),!0}catch{return!1}}backupConfig(){if(!mi.existsSync(this.configPath))return!0;try{let t=this.configPath+".backup";return mi.copyFileSync(this.configPath,t),!0}catch{return!1}}getConfigPath(){return this.configPath}}});var rp={};vr(rp,{ClientMCPExecutor:()=>ET});import{Client as Lge}from"@modelcontextprotocol/sdk/client/index.js";import{StdioClientTransport as Pge}from"@modelcontextprotocol/sdk/client/stdio.js";var ET,ip=tt(()=>{"use strict";Nl();Fn();ET=class{connections=new Map;toolToServer=new Map;initialized=!1;configManager;constructor(){this.configManager=new Cn}async initialize(){if(this.initialized)return!0;try{let a=this.configManager.loadConfig().mcpServers||{};Se(`Initializing MCP executor with ${Object.keys(a).length} servers`);for(let[n,r]of Object.entries(a)){if(r.enabled===!1){Se(`Skipping disabled server: ${n}`);continue}try{await this.connectToServer(n,r)}catch(i){Se(`Failed to connect to ${n}: ${i}`)}}return this.initialized=!0,Se(`MCP executor initialized with ${this.connections.size} connections`),!0}catch(t){return Se(`Failed to initialize MCP executor: ${t}`),!1}}async connectToServer(t,a){let n=a.command,r=Array.isArray(a.args)?a.args:[a.args||""],i={...process.env};if(a.env)for(let[u,p]of Object.entries(a.env)){let d=String(p).replace(/\$\{(\w+)\}/g,(f,m)=>process.env[m]||"");i[u]=d}Se(`Connecting to MCP server: ${t}`),Se(` command: ${n}`),Se(` args: ${JSON.stringify(r)}`);let s=new Pge({command:n,args:r,env:i,stderr:"pipe"}),o=new Lge({name:"aii-cli",version:"0.1.0"},{capabilities:{}});await o.connect(s);let l=(await o.listTools()).tools.map(u=>({name:u.name,description:u.description||"",inputSchema:u.inputSchema,serverName:t}));this.connections.set(t,{client:o,transport:s,tools:l});for(let u of l)this.toolToServer.set(u.name,t);Se(`Connected to ${t}: discovered ${l.length} tools`)}async handleQueryTools(t){let a=t.request_id||"unknown";Se(`Handling mcp_query_tools request: ${a}`),this.initialized||await this.initialize();try{let n=[];for(let i of this.connections.values())n.push(...i.tools);let r=n.map(i=>({name:i.name,description:i.description,input_schema:i.inputSchema,server_name:i.serverName}));return Se(`Found ${r.length} MCP tools across all servers`),{type:"mcp_query_tools_response",request_id:a,success:!0,tools:r}}catch(n){return Se(`Error querying MCP tools: ${n}`),{type:"mcp_query_tools_response",request_id:a,success:!1,error:String(n),tools:[]}}}async handleToolExecution(t){let a=t.request_id||"unknown",n=t.tool_name,r=t.arguments||{};if(Se(`Handling mcp_tool_request: ${a} - Tool: ${n}`),!n)return{type:"mcp_tool_response",request_id:a,success:!1,error:"Missing tool_name in request"};this.initialized||await this.initialize();try{let i=this.toolToServer.get(n);if(!i)return{type:"mcp_tool_response",request_id:a,success:!1,error:`Tool '${n}' not found in any connected MCP server`};let s=this.connections.get(i);if(!s)return{type:"mcp_tool_response",request_id:a,success:!1,error:`Server '${i}' not connected`};let o=await Promise.race([s.client.callTool({name:n,arguments:r}),new Promise((l,u)=>setTimeout(()=>u(new Error(`Tool '${n}' timed out after 30 seconds`)),3e4))]),c=this.makeContentSerializable(o.content);return Se(`Tool '${n}' executed successfully (server: ${i})`),{type:"mcp_tool_response",request_id:a,success:!o.isError,content:c,server_name:i,error:o.isError?"Tool returned error":void 0}}catch(i){return Se(`Error executing MCP tool '${n}': ${i}`),{type:"mcp_tool_response",request_id:a,success:!1,error:String(i)}}}makeContentSerializable(t){if(t==null)return null;if(Array.isArray(t))return t.map(a=>this.makeContentSerializable(a));if(typeof t=="object"){let a=t;if(a.type==="text"&&typeof a.text=="string")return{type:"text",text:a.text};if(a.type==="image")return{type:"image",data:a.data,mimeType:a.mimeType};let n={};for(let[r,i]of Object.entries(a))n[r]=this.makeContentSerializable(i);return n}return t}async shutdown(){Se("Shutting down MCP executor");for(let[t,a]of this.connections)try{await a.client.close(),Se(`Closed connection to ${t}`)}catch(n){Se(`Error closing ${t}: ${n}`)}this.connections.clear(),this.toolToServer.clear(),this.initialized=!1}isInitialized(){return this.initialized}getConnectionCount(){return this.connections.size}}});var iF=y((WKe,Wge)=>{Wge.exports={dots:{interval:80,frames:["\u280B","\u2819","\u2839","\u2838","\u283C","\u2834","\u2826","\u2827","\u2807","\u280F"]},dots2:{interval:80,frames:["\u28FE","\u28FD","\u28FB","\u28BF","\u287F","\u28DF","\u28EF","\u28F7"]},dots3:{interval:80,frames:["\u280B","\u2819","\u281A","\u281E","\u2816","\u2826","\u2834","\u2832","\u2833","\u2813"]},dots4:{interval:80,frames:["\u2804","\u2806","\u2807","\u280B","\u2819","\u2838","\u2830","\u2820","\u2830","\u2838","\u2819","\u280B","\u2807","\u2806"]},dots5:{interval:80,frames:["\u280B","\u2819","\u281A","\u2812","\u2802","\u2802","\u2812","\u2832","\u2834","\u2826","\u2816","\u2812","\u2810","\u2810","\u2812","\u2813","\u280B"]},dots6:{interval:80,frames:["\u2801","\u2809","\u2819","\u281A","\u2812","\u2802","\u2802","\u2812","\u2832","\u2834","\u2824","\u2804","\u2804","\u2824","\u2834","\u2832","\u2812","\u2802","\u2802","\u2812","\u281A","\u2819","\u2809","\u2801"]},dots7:{interval:80,frames:["\u2808","\u2809","\u280B","\u2813","\u2812","\u2810","\u2810","\u2812","\u2816","\u2826","\u2824","\u2820","\u2820","\u2824","\u2826","\u2816","\u2812","\u2810","\u2810","\u2812","\u2813","\u280B","\u2809","\u2808"]},dots8:{interval:80,frames:["\u2801","\u2801","\u2809","\u2819","\u281A","\u2812","\u2802","\u2802","\u2812","\u2832","\u2834","\u2824","\u2804","\u2804","\u2824","\u2820","\u2820","\u2824","\u2826","\u2816","\u2812","\u2810","\u2810","\u2812","\u2813","\u280B","\u2809","\u2808","\u2808"]},dots9:{interval:80,frames:["\u28B9","\u28BA","\u28BC","\u28F8","\u28C7","\u2867","\u2857","\u284F"]},dots10:{interval:80,frames:["\u2884","\u2882","\u2881","\u2841","\u2848","\u2850","\u2860"]},dots11:{interval:100,frames:["\u2801","\u2802","\u2804","\u2840","\u2880","\u2820","\u2810","\u2808"]},dots12:{interval:80,frames:["\u2880\u2800","\u2840\u2800","\u2804\u2800","\u2882\u2800","\u2842\u2800","\u2805\u2800","\u2883\u2800","\u2843\u2800","\u280D\u2800","\u288B\u2800","\u284B\u2800","\u280D\u2801","\u288B\u2801","\u284B\u2801","\u280D\u2809","\u280B\u2809","\u280B\u2809","\u2809\u2819","\u2809\u2819","\u2809\u2829","\u2808\u2899","\u2808\u2859","\u2888\u2829","\u2840\u2899","\u2804\u2859","\u2882\u2829","\u2842\u2898","\u2805\u2858","\u2883\u2828","\u2843\u2890","\u280D\u2850","\u288B\u2820","\u284B\u2880","\u280D\u2841","\u288B\u2801","\u284B\u2801","\u280D\u2809","\u280B\u2809","\u280B\u2809","\u2809\u2819","\u2809\u2819","\u2809\u2829","\u2808\u2899","\u2808\u2859","\u2808\u2829","\u2800\u2899","\u2800\u2859","\u2800\u2829","\u2800\u2898","\u2800\u2858","\u2800\u2828","\u2800\u2890","\u2800\u2850","\u2800\u2820","\u2800\u2880","\u2800\u2840"]},dots13:{interval:80,frames:["\u28FC","\u28F9","\u28BB","\u283F","\u285F","\u28CF","\u28E7","\u28F6"]},dots8Bit:{interval:80,frames:["\u2800","\u2801","\u2802","\u2803","\u2804","\u2805","\u2806","\u2807","\u2840","\u2841","\u2842","\u2843","\u2844","\u2845","\u2846","\u2847","\u2808","\u2809","\u280A","\u280B","\u280C","\u280D","\u280E","\u280F","\u2848","\u2849","\u284A","\u284B","\u284C","\u284D","\u284E","\u284F","\u2810","\u2811","\u2812","\u2813","\u2814","\u2815","\u2816","\u2817","\u2850","\u2851","\u2852","\u2853","\u2854","\u2855","\u2856","\u2857","\u2818","\u2819","\u281A","\u281B","\u281C","\u281D","\u281E","\u281F","\u2858","\u2859","\u285A","\u285B","\u285C","\u285D","\u285E","\u285F","\u2820","\u2821","\u2822","\u2823","\u2824","\u2825","\u2826","\u2827","\u2860","\u2861","\u2862","\u2863","\u2864","\u2865","\u2866","\u2867","\u2828","\u2829","\u282A","\u282B","\u282C","\u282D","\u282E","\u282F","\u2868","\u2869","\u286A","\u286B","\u286C","\u286D","\u286E","\u286F","\u2830","\u2831","\u2832","\u2833","\u2834","\u2835","\u2836","\u2837","\u2870","\u2871","\u2872","\u2873","\u2874","\u2875","\u2876","\u2877","\u2838","\u2839","\u283A","\u283B","\u283C","\u283D","\u283E","\u283F","\u2878","\u2879","\u287A","\u287B","\u287C","\u287D","\u287E","\u287F","\u2880","\u2881","\u2882","\u2883","\u2884","\u2885","\u2886","\u2887","\u28C0","\u28C1","\u28C2","\u28C3","\u28C4","\u28C5","\u28C6","\u28C7","\u2888","\u2889","\u288A","\u288B","\u288C","\u288D","\u288E","\u288F","\u28C8","\u28C9","\u28CA","\u28CB","\u28CC","\u28CD","\u28CE","\u28CF","\u2890","\u2891","\u2892","\u2893","\u2894","\u2895","\u2896","\u2897","\u28D0","\u28D1","\u28D2","\u28D3","\u28D4","\u28D5","\u28D6","\u28D7","\u2898","\u2899","\u289A","\u289B","\u289C","\u289D","\u289E","\u289F","\u28D8","\u28D9","\u28DA","\u28DB","\u28DC","\u28DD","\u28DE","\u28DF","\u28A0","\u28A1","\u28A2","\u28A3","\u28A4","\u28A5","\u28A6","\u28A7","\u28E0","\u28E1","\u28E2","\u28E3","\u28E4","\u28E5","\u28E6","\u28E7","\u28A8","\u28A9","\u28AA","\u28AB","\u28AC","\u28AD","\u28AE","\u28AF","\u28E8","\u28E9","\u28EA","\u28EB","\u28EC","\u28ED","\u28EE","\u28EF","\u28B0","\u28B1","\u28B2","\u28B3","\u28B4","\u28B5","\u28B6","\u28B7","\u28F0","\u28F1","\u28F2","\u28F3","\u28F4","\u28F5","\u28F6","\u28F7","\u28B8","\u28B9","\u28BA","\u28BB","\u28BC","\u28BD","\u28BE","\u28BF","\u28F8","\u28F9","\u28FA","\u28FB","\u28FC","\u28FD","\u28FE","\u28FF"]},sand:{interval:80,frames:["\u2801","\u2802","\u2804","\u2840","\u2848","\u2850","\u2860","\u28C0","\u28C1","\u28C2","\u28C4","\u28CC","\u28D4","\u28E4","\u28E5","\u28E6","\u28EE","\u28F6","\u28F7","\u28FF","\u287F","\u283F","\u289F","\u281F","\u285B","\u281B","\u282B","\u288B","\u280B","\u280D","\u2849","\u2809","\u2811","\u2821","\u2881"]},line:{interval:130,frames:["-","\\","|","/"]},line2:{interval:100,frames:["\u2802","-","\u2013","\u2014","\u2013","-"]},pipe:{interval:100,frames:["\u2524","\u2518","\u2534","\u2514","\u251C","\u250C","\u252C","\u2510"]},simpleDots:{interval:400,frames:[". ",".. ","..."," "]},simpleDotsScrolling:{interval:200,frames:[". ",".. ","..."," .."," ."," "]},star:{interval:70,frames:["\u2736","\u2738","\u2739","\u273A","\u2739","\u2737"]},star2:{interval:80,frames:["+","x","*"]},flip:{interval:70,frames:["_","_","_","-","`","`","'","\xB4","-","_","_","_"]},hamburger:{interval:100,frames:["\u2631","\u2632","\u2634"]},growVertical:{interval:120,frames:["\u2581","\u2583","\u2584","\u2585","\u2586","\u2587","\u2586","\u2585","\u2584","\u2583"]},growHorizontal:{interval:120,frames:["\u258F","\u258E","\u258D","\u258C","\u258B","\u258A","\u2589","\u258A","\u258B","\u258C","\u258D","\u258E"]},balloon:{interval:140,frames:[" ",".","o","O","@","*"," "]},balloon2:{interval:120,frames:[".","o","O","\xB0","O","o","."]},noise:{interval:100,frames:["\u2593","\u2592","\u2591"]},bounce:{interval:120,frames:["\u2801","\u2802","\u2804","\u2802"]},boxBounce:{interval:120,frames:["\u2596","\u2598","\u259D","\u2597"]},boxBounce2:{interval:100,frames:["\u258C","\u2580","\u2590","\u2584"]},triangle:{interval:50,frames:["\u25E2","\u25E3","\u25E4","\u25E5"]},binary:{interval:80,frames:["010010","001100","100101","111010","111101","010111","101011","111000","110011","110101"]},arc:{interval:100,frames:["\u25DC","\u25E0","\u25DD","\u25DE","\u25E1","\u25DF"]},circle:{interval:120,frames:["\u25E1","\u2299","\u25E0"]},squareCorners:{interval:180,frames:["\u25F0","\u25F3","\u25F2","\u25F1"]},circleQuarters:{interval:120,frames:["\u25F4","\u25F7","\u25F6","\u25F5"]},circleHalves:{interval:50,frames:["\u25D0","\u25D3","\u25D1","\u25D2"]},squish:{interval:100,frames:["\u256B","\u256A"]},toggle:{interval:250,frames:["\u22B6","\u22B7"]},toggle2:{interval:80,frames:["\u25AB","\u25AA"]},toggle3:{interval:120,frames:["\u25A1","\u25A0"]},toggle4:{interval:100,frames:["\u25A0","\u25A1","\u25AA","\u25AB"]},toggle5:{interval:100,frames:["\u25AE","\u25AF"]},toggle6:{interval:300,frames:["\u101D","\u1040"]},toggle7:{interval:80,frames:["\u29BE","\u29BF"]},toggle8:{interval:100,frames:["\u25CD","\u25CC"]},toggle9:{interval:100,frames:["\u25C9","\u25CE"]},toggle10:{interval:100,frames:["\u3282","\u3280","\u3281"]},toggle11:{interval:50,frames:["\u29C7","\u29C6"]},toggle12:{interval:120,frames:["\u2617","\u2616"]},toggle13:{interval:80,frames:["=","*","-"]},arrow:{interval:100,frames:["\u2190","\u2196","\u2191","\u2197","\u2192","\u2198","\u2193","\u2199"]},arrow2:{interval:80,frames:["\u2B06\uFE0F ","\u2197\uFE0F ","\u27A1\uFE0F ","\u2198\uFE0F ","\u2B07\uFE0F ","\u2199\uFE0F ","\u2B05\uFE0F ","\u2196\uFE0F "]},arrow3:{interval:120,frames:["\u25B9\u25B9\u25B9\u25B9\u25B9","\u25B8\u25B9\u25B9\u25B9\u25B9","\u25B9\u25B8\u25B9\u25B9\u25B9","\u25B9\u25B9\u25B8\u25B9\u25B9","\u25B9\u25B9\u25B9\u25B8\u25B9","\u25B9\u25B9\u25B9\u25B9\u25B8"]},bouncingBar:{interval:80,frames:["[ ]","[= ]","[== ]","[=== ]","[====]","[ ===]","[ ==]","[ =]","[ ]","[ =]","[ ==]","[ ===]","[====]","[=== ]","[== ]","[= ]"]},bouncingBall:{interval:80,frames:["( \u25CF )","( \u25CF )","( \u25CF )","( \u25CF )","( \u25CF)","( \u25CF )","( \u25CF )","( \u25CF )","( \u25CF )","(\u25CF )"]},smiley:{interval:200,frames:["\u{1F604} ","\u{1F61D} "]},monkey:{interval:300,frames:["\u{1F648} ","\u{1F648} ","\u{1F649} ","\u{1F64A} "]},hearts:{interval:100,frames:["\u{1F49B} ","\u{1F499} ","\u{1F49C} ","\u{1F49A} ","\u2764\uFE0F "]},clock:{interval:100,frames:["\u{1F55B} ","\u{1F550} ","\u{1F551} ","\u{1F552} ","\u{1F553} ","\u{1F554} ","\u{1F555} ","\u{1F556} ","\u{1F557} ","\u{1F558} ","\u{1F559} ","\u{1F55A} "]},earth:{interval:180,frames:["\u{1F30D} ","\u{1F30E} ","\u{1F30F} "]},material:{interval:17,frames:["\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588","\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581"]},moon:{interval:80,frames:["\u{1F311} ","\u{1F312} ","\u{1F313} ","\u{1F314} ","\u{1F315} ","\u{1F316} ","\u{1F317} ","\u{1F318} "]},runner:{interval:140,frames:["\u{1F6B6} ","\u{1F3C3} "]},pong:{interval:80,frames:["\u2590\u2802 \u258C","\u2590\u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802\u258C","\u2590 \u2820\u258C","\u2590 \u2840\u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590\u2820 \u258C"]},shark:{interval:120,frames:["\u2590|\\____________\u258C","\u2590_|\\___________\u258C","\u2590__|\\__________\u258C","\u2590___|\\_________\u258C","\u2590____|\\________\u258C","\u2590_____|\\_______\u258C","\u2590______|\\______\u258C","\u2590_______|\\_____\u258C","\u2590________|\\____\u258C","\u2590_________|\\___\u258C","\u2590__________|\\__\u258C","\u2590___________|\\_\u258C","\u2590____________|\\\u258C","\u2590____________/|\u258C","\u2590___________/|_\u258C","\u2590__________/|__\u258C","\u2590_________/|___\u258C","\u2590________/|____\u258C","\u2590_______/|_____\u258C","\u2590______/|______\u258C","\u2590_____/|_______\u258C","\u2590____/|________\u258C","\u2590___/|_________\u258C","\u2590__/|__________\u258C","\u2590_/|___________\u258C","\u2590/|____________\u258C"]},dqpb:{interval:100,frames:["d","q","p","b"]},weather:{interval:100,frames:["\u2600\uFE0F ","\u2600\uFE0F ","\u2600\uFE0F ","\u{1F324} ","\u26C5\uFE0F ","\u{1F325} ","\u2601\uFE0F ","\u{1F327} ","\u{1F328} ","\u{1F327} ","\u{1F328} ","\u{1F327} ","\u{1F328} ","\u26C8 ","\u{1F328} ","\u{1F327} ","\u{1F328} ","\u2601\uFE0F ","\u{1F325} ","\u26C5\uFE0F ","\u{1F324} ","\u2600\uFE0F ","\u2600\uFE0F "]},christmas:{interval:400,frames:["\u{1F332}","\u{1F384}"]},grenade:{interval:80,frames:["\u060C ","\u2032 "," \xB4 "," \u203E "," \u2E0C"," \u2E0A"," |"," \u204E"," \u2055"," \u0DF4 "," \u2053"," "," "," "]},point:{interval:125,frames:["\u2219\u2219\u2219","\u25CF\u2219\u2219","\u2219\u25CF\u2219","\u2219\u2219\u25CF","\u2219\u2219\u2219"]},layer:{interval:150,frames:["-","=","\u2261"]},betaWave:{interval:80,frames:["\u03C1\u03B2\u03B2\u03B2\u03B2\u03B2\u03B2","\u03B2\u03C1\u03B2\u03B2\u03B2\u03B2\u03B2","\u03B2\u03B2\u03C1\u03B2\u03B2\u03B2\u03B2","\u03B2\u03B2\u03B2\u03C1\u03B2\u03B2\u03B2","\u03B2\u03B2\u03B2\u03B2\u03C1\u03B2\u03B2","\u03B2\u03B2\u03B2\u03B2\u03B2\u03C1\u03B2","\u03B2\u03B2\u03B2\u03B2\u03B2\u03B2\u03C1"]},fingerDance:{interval:160,frames:["\u{1F918} ","\u{1F91F} ","\u{1F596} ","\u270B ","\u{1F91A} ","\u{1F446} "]},fistBump:{interval:80,frames:["\u{1F91C}\u3000\u3000\u3000\u3000\u{1F91B} ","\u{1F91C}\u3000\u3000\u3000\u3000\u{1F91B} ","\u{1F91C}\u3000\u3000\u3000\u3000\u{1F91B} ","\u3000\u{1F91C}\u3000\u3000\u{1F91B}\u3000 ","\u3000\u3000\u{1F91C}\u{1F91B}\u3000\u3000 ","\u3000\u{1F91C}\u2728\u{1F91B}\u3000\u3000 ","\u{1F91C}\u3000\u2728\u3000\u{1F91B}\u3000 "]},soccerHeader:{interval:80,frames:[" \u{1F9D1}\u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F\u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} "]},mindblown:{interval:160,frames:["\u{1F610} ","\u{1F610} ","\u{1F62E} ","\u{1F62E} ","\u{1F626} ","\u{1F626} ","\u{1F627} ","\u{1F627} ","\u{1F92F} ","\u{1F4A5} ","\u2728 ","\u3000 ","\u3000 ","\u3000 "]},speaker:{interval:160,frames:["\u{1F508} ","\u{1F509} ","\u{1F50A} ","\u{1F509} "]},orangePulse:{interval:100,frames:["\u{1F538} ","\u{1F536} ","\u{1F7E0} ","\u{1F7E0} ","\u{1F536} "]},bluePulse:{interval:100,frames:["\u{1F539} ","\u{1F537} ","\u{1F535} ","\u{1F535} ","\u{1F537} "]},orangeBluePulse:{interval:100,frames:["\u{1F538} ","\u{1F536} ","\u{1F7E0} ","\u{1F7E0} ","\u{1F536} ","\u{1F539} ","\u{1F537} ","\u{1F535} ","\u{1F535} ","\u{1F537} "]},timeTravel:{interval:100,frames:["\u{1F55B} ","\u{1F55A} ","\u{1F559} ","\u{1F558} ","\u{1F557} ","\u{1F556} ","\u{1F555} ","\u{1F554} ","\u{1F553} ","\u{1F552} ","\u{1F551} ","\u{1F550} "]},aesthetic:{interval:80,frames:["\u25B0\u25B1\u25B1\u25B1\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B1\u25B1\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B1\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B0\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B0\u25B0\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B0\u25B0\u25B0","\u25B0\u25B1\u25B1\u25B1\u25B1\u25B1\u25B1"]},dwarfFortress:{interval:80,frames:[" \u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2593\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2593\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2592\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2592\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2591\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2591\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A \u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A \u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A \u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\xA3\xA3\xA3 "," \u263A \u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\xA3\xA3\xA3 "," \u263A \u2588\xA3\xA3\xA3 "," \u263A\u2588\xA3\xA3\xA3 "," \u263A\u2588\xA3\xA3\xA3 "," \u263A\u2593\xA3\xA3\xA3 "," \u263A\u2593\xA3\xA3\xA3 "," \u263A\u2592\xA3\xA3\xA3 "," \u263A\u2592\xA3\xA3\xA3 "," \u263A\u2591\xA3\xA3\xA3 "," \u263A\u2591\xA3\xA3\xA3 "," \u263A \xA3\xA3\xA3 "," \u263A\xA3\xA3\xA3 "," \u263A\xA3\xA3\xA3 "," \u263A\u2593\xA3\xA3 "," \u263A\u2593\xA3\xA3 "," \u263A\u2592\xA3\xA3 "," \u263A\u2592\xA3\xA3 "," \u263A\u2591\xA3\xA3 "," \u263A\u2591\xA3\xA3 "," \u263A \xA3\xA3 "," \u263A\xA3\xA3 "," \u263A\xA3\xA3 "," \u263A\u2593\xA3 "," \u263A\u2593\xA3 "," \u263A\u2592\xA3 "," \u263A\u2592\xA3 "," \u263A\u2591\xA3 "," \u263A\u2591\xA3 "," \u263A \xA3 "," \u263A\xA3 "," \u263A\xA3 "," \u263A\u2593 "," \u263A\u2593 "," \u263A\u2592 "," \u263A\u2592 "," \u263A\u2591 "," \u263A\u2591 "," \u263A "," \u263A &"," \u263A \u263C&"," \u263A \u263C &"," \u263A\u263C &"," \u263A\u263C & "," \u203C & "," \u263A & "," \u203C & "," \u263A & "," \u203C & "," \u263A & ","\u203C & "," & "," & "," & \u2591 "," & \u2592 "," & \u2593 "," & \xA3 "," & \u2591\xA3 "," & \u2592\xA3 "," & \u2593\xA3 "," & \xA3\xA3 "," & \u2591\xA3\xA3 "," & \u2592\xA3\xA3 ","& \u2593\xA3\xA3 ","& \xA3\xA3\xA3 "," \u2591\xA3\xA3\xA3 "," \u2592\xA3\xA3\xA3 "," \u2593\xA3\xA3\xA3 "," \u2588\xA3\xA3\xA3 "," \u2591\u2588\xA3\xA3\xA3 "," \u2592\u2588\xA3\xA3\xA3 "," \u2593\u2588\xA3\xA3\xA3 "," \u2588\u2588\xA3\xA3\xA3 "," \u2591\u2588\u2588\xA3\xA3\xA3 "," \u2592\u2588\u2588\xA3\xA3\xA3 "," \u2593\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\xA3\xA3\xA3 "," \u2591\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2592\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2593\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2591\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2592\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2593\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2591\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2592\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2593\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "]}}});var OT=y((VKe,oF)=>{"use strict";var cy=Object.assign({},iF()),sF=Object.keys(cy);Object.defineProperty(cy,"random",{get(){let e=Math.floor(Math.random()*sF.length),t=sF[e];return cy[t]}});oF.exports=cy});function Ll({onlyFirst:e=!1}={}){let r="(?:\\u001B\\][\\s\\S]*?(?:\\u0007|\\u001B\\u005C|\\u009C))|[\\u001B\\u009B][[\\]()#;?]*(?:\\d{1,4}(?:[;:]\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]";return new RegExp(r,e?void 0:"g")}var ly=tt(()=>{});var mF=y((uWe,dF)=>{dF.exports=()=>/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E-\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED8\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])))?))?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3C-\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE8A\uDE8E-\uDEC2\uDEC6\uDEC8\uDECD-\uDEDC\uDEDF-\uDEEA\uDEEF]|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g});function ut(e,...t){process.env.AII_INK_DEBUG==="1"&&console.error(`[INK-DEBUG] ${e}`,...t)}var py=tt(()=>{"use strict"});import{resolve as s_e}from"path";function o_e(){let e=process.env.TERM??"",t=process.env.TERM_PROGRAM??"",a=process.env.COLORTERM??"",n=process.env.WT_SESSION??"",r=process.env.VSCODE_INJECTION??process.env.TERM_PROGRAM==="vscode";return t==="iTerm.app"||t==="Hyper"||t==="vscode"||t==="WezTerm"||t==="Alacritty"||n||r||e.includes("xterm-256color")||e.includes("screen-256color")||e.includes("tmux")||e==="xterm-kitty"||a==="truecolor"?!0:!(e==="dumb"||!process.stdout.isTTY)}function wf(){return qT===null&&(qT=o_e()),qT}function c_e(){return process.platform==="darwin"?"Cmd":"Ctrl"}function _F(){return gF||!wf()?"":(gF=!0,` (${c_e()}+Click to open)`)}function l_e(e,t){return wf()?`\x1B]8;;${t}\x07${e}\x1B]8;;\x07`:e}function yF(e,t){let a=process.env.HOME??process.env.USERPROFILE??"",n=e;a&&e.startsWith(a)&&(n="~"+e.slice(a.length));let r=t?`${n}:${t}`:n;if(!wf())return _.cyan.underline(r);let i=_.cyan(r),o=`file://${s_e(e)}`;return t!==void 0&&t>0&&(o+=`#L${t}`),l_e(i,o)}var qT,gF,bF=tt(()=>{"use strict";va();qT=null,gF=!1});function vF(e){return e.startsWith("/")||e.startsWith("~/")||e.startsWith("./")||e.startsWith("../")||/^[a-zA-Z]:\\/.test(e)||/\.(ts|tsx|js|jsx|json|md|py|go|rs|java|c|cpp|h|hpp|css|scss|html|xml|yaml|yml|toml|sh|bash|zsh)$/.test(e)||/^src\//.test(e)||/^lib\//.test(e)||/^test[s]?\//.test(e)}function SF(e,t,a=!0,n,r=console.log){let i=a?Fa.success("\u25CF"):Fa.error("\u25CF"),s=60,o=t.length>s?t.slice(0,s-3)+"...":t;if(vF(t)){let l=t.match(/:(\d+)$/),u=l?parseInt(l[1],10):void 0,p=l?t.replace(/:(\d+)$/,""):t;o=u_e(p,u)}r(`${i} ${_.bold(e)}(${o})`);let c=vF(t)?Fa.dim(_F()):"";if(n){let l=a?Fa.dim:Fa.error;r(l(`\u2514 ${n}`)+c)}else{let l=a?"(No content)":"(Error)",u=a?Fa.dim:Fa.error;r(u(`\u2514 ${l}`)+c)}}function u_e(e,t){if(wf())return yF(e,t);let a=process.env.HOME??process.env.USERPROFILE??"",n=e;return a&&e.startsWith(a)&&(n="~"+e.slice(a.length)),t&&(n+=`:${t}`),Fa.filePath(n)}function p_e(){return process.stdout.columns||80}function d_e(e){if(e<60)return`${e}s`;let t=Math.floor(e/60),a=e%60;return a>0?`${t}m ${a}s`:`${t}m`}function EF(e){return e>=1e3?`${(e/1e3).toFixed(1)}K`:e.toString()}function xF(e){let t=p_e(),a=Math.min(t-2,76),n=a-4,r=(d,f)=>{let m=d.replace(/\x1b\[[0-9;]*m/g,"").length;return d+" ".repeat(Math.max(0,f-m))},i=d=>Fa.border("\u2502")+" "+r(d,n)+" "+Fa.border("\u2502"),s=(d,f,m,h)=>{let g=Math.floor(n/2),v=Fa.dim(d.padEnd(15))+f,S=Fa.dim(m.padEnd(15))+h;return i(r(v,g)+S)},o=d_e(e.durationSeconds),c=EF(e.tokensIn),l=EF(e.tokensOut),u=`$${e.totalCost.toFixed(4)}`,p=`${e.provider}/${e.model.replace("claude-","").replace("-latest","")}`;console.log(""),console.log(Fa.border("\u250C"+"\u2500".repeat(a-2)+"\u2510")),console.log(i(_.cyan.bold("Agent powering down. Goodbye!"))),console.log(Fa.border("\u251C"+"\u2500".repeat(a-2)+"\u2524")),console.log(i(_.cyan.bold("Session Summary"))),console.log(i(Fa.dim("\u2500".repeat(15)))),console.log(s("Duration",o,"Tool Calls",e.toolCalls.toString())),console.log(s("Turns",e.turns.toString(),"Files Modified",e.filesModified.toString())),console.log(i("")),console.log(i(_.cyan.bold("Token Usage"))),console.log(i(Fa.dim("\u2500".repeat(11)))),console.log(s("Input",c,"Output",l)),console.log(i(Fa.dim("Cost".padEnd(15))+u)),console.log(i("")),console.log(i(Fa.dim("Model: ")+Fa.model(p))),console.log(Fa.border("\u2514"+"\u2500".repeat(a-2)+"\u2518")),console.log("")}var dy,Fa,Cf=tt(()=>{"use strict";va();bF();dy="0.10.6",Fa={logo:_.cyan.bold,prompt:_.cyan.bold,model:_.cyan,success:_.green,warning:_.yellow,error:_.red,thinking:_.dim.cyan,filePath:_.blue,code:_.white,muted:_.gray,dim:_.dim,safe:_.green,risky:_.yellow,destructive:_.red,border:_.cyan,bannerBorder:_.cyan}});var TF={};vr(TF,{getUIStore:()=>Af,useUIStore:()=>Eo});import{create as m_e}from"zustand";var kF,Eo,Af,GT=tt(()=>{"use strict";kF={mode:"welcome",agentMode:"normal",status:"",isThinking:!1,isStreaming:!1,currentIteration:0,iterationStartTime:Date.now(),iterationTokens:0,contextPercent:0,contextLevel:"normal",contextTokens:0,contextLimit:2e5,sessionCost:0,provider:"",model:"",projectPath:process.cwd(),branch:void 0,toolsCount:0,mcpServersCount:0,contextFilesCount:0,skillsCount:0,sessionStartTime:Date.now(),agentExecMs:0,agentTurnStartTime:null,renderEpoch:0,loopMode:!1},Eo=m_e(e=>({...kF,setMode:t=>e({mode:t}),setAgentMode:t=>e({agentMode:t}),setStatus:t=>e({status:t}),setThinking:t=>e({isThinking:t}),setStreaming:t=>e(a=>{if(t&&!a.agentTurnStartTime)return{isStreaming:t,agentTurnStartTime:Date.now()};if(!t&&a.agentTurnStartTime){let n=Date.now()-a.agentTurnStartTime;return{isStreaming:t,agentExecMs:a.agentExecMs+n,agentTurnStartTime:null}}return{isStreaming:t}}),incrementIteration:()=>e(t=>({currentIteration:t.currentIteration+1,iterationStartTime:Date.now(),iterationTokens:0})),addIterationTokens:t=>e(a=>({iterationTokens:a.iterationTokens+t})),setIterationTokens:t=>e({iterationTokens:t}),updateContext:(t,a)=>{let n=a>0?Math.round(t/a*100):0,r=n>=90?"critical":n>=70?"warning":"normal";e({contextTokens:t,contextLimit:a,contextPercent:n,contextLevel:r})},updateSession:t=>e(t),updateResources:t=>e(t),setLoopMode:t=>e({loopMode:t}),incrementRenderEpoch:()=>e(t=>({renderEpoch:t.renderEpoch+1})),reset:()=>e(kF)})),Af=Eo.getState});function KT(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}function IF(e){Fl=e}function ua(e,t=""){let a=typeof e=="string"?e:e.source,n={replace:(r,i)=>{let s=typeof i=="string"?i:i.source;return s=s.replace(Er.caret,"$1"),a=a.replace(r,s),n},getRegex:()=>new RegExp(a,t)};return n}function bs(e,t){if(t){if(Er.escapeTest.test(e))return e.replace(Er.escapeReplace,CF)}else if(Er.escapeTestNoEncode.test(e))return e.replace(Er.escapeReplaceNoEncode,CF);return e}function AF(e){try{e=encodeURI(e).replace(Er.percentDecode,"%")}catch{return null}return e}function DF(e,t){let a=e.replace(Er.findPipe,(i,s,o)=>{let c=!1,l=s;for(;--l>=0&&o[l]==="\\";)c=!c;return c?"|":" |"}),n=a.split(Er.splitPipe),r=0;if(n[0].trim()||n.shift(),n.length>0&&!n.at(-1)?.trim()&&n.pop(),t)if(n.length>t)n.splice(t);else for(;n.length<t;)n.push("");for(;r<n.length;r++)n[r]=n[r].trim().replace(Er.slashPipe,"|");return n}function Of(e,t,a){let n=e.length;if(n===0)return"";let r=0;for(;r<n;){let i=e.charAt(n-r-1);if(i===t&&!a)r++;else if(i!==t&&a)r++;else break}return e.slice(0,n-r)}function K_e(e,t){if(e.indexOf(t[1])===-1)return-1;let a=0;for(let n=0;n<e.length;n++)if(e[n]==="\\")n++;else if(e[n]===t[0])a++;else if(e[n]===t[1]&&(a--,a<0))return n;return a>0?-2:-1}function OF(e,t,a,n,r){let i=t.href,s=t.title||null,o=e[1].replace(r.other.outputLinkReplace,"$1");n.state.inLink=!0;let c={type:e[0].charAt(0)==="!"?"image":"link",raw:a,href:i,title:s,text:o,tokens:n.inlineTokens(o)};return n.state.inLink=!1,c}function W_e(e,t,a){let n=e.match(a.other.indentCodeCompensation);if(n===null)return t;let r=n[1];return t.split(`
|
|
190
190
|
`).map(i=>{let s=i.match(a.other.beginningSpace);if(s===null)return i;let[o]=s;return o.length>=r.length?i.slice(r.length):i}).join(`
|
|
191
191
|
`)}function Ea(e,t){return Pl.parse(e,t)}var Fl,If,Er,f_e,h_e,g_e,Rf,__e,WT,RF,NF,y_e,VT,b_e,QT,v_e,E_e,yy,XT,S_e,MF,x_e,JT,wF,k_e,T_e,w_e,C_e,LF,A_e,by,ZT,PF,D_e,FF,O_e,I_e,R_e,BF,N_e,M_e,jF,L_e,P_e,F_e,B_e,j_e,U_e,z_e,hy,q_e,UF,zF,G_e,ew,$_e,$T,H_e,my,Df,Y_e,CF,gy,So,_y,tw,xo,fy,aw,Pl,jWe,UWe,zWe,qWe,GWe,$We,HWe,qF=tt(()=>{Fl=KT();If={exec:()=>null};Er={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i")},f_e=/^(?:[ \t]*(?:\n|$))+/,h_e=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,g_e=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Rf=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,__e=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,WT=/(?:[*+-]|\d{1,9}[.)])/,RF=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,NF=ua(RF).replace(/bull/g,WT).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),y_e=ua(RF).replace(/bull/g,WT).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),VT=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,b_e=/^[^\n]+/,QT=/(?!\s*\])(?:\\.|[^\[\]\\])+/,v_e=ua(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",QT).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),E_e=ua(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,WT).getRegex(),yy="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",XT=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,S_e=ua("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",XT).replace("tag",yy).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),MF=ua(VT).replace("hr",Rf).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",yy).getRegex(),x_e=ua(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",MF).getRegex(),JT={blockquote:x_e,code:h_e,def:v_e,fences:g_e,heading:__e,hr:Rf,html:S_e,lheading:NF,list:E_e,newline:f_e,paragraph:MF,table:If,text:b_e},wF=ua("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Rf).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",yy).getRegex(),k_e={...JT,lheading:y_e,table:wF,paragraph:ua(VT).replace("hr",Rf).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",wF).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",yy).getRegex()},T_e={...JT,html:ua(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",XT).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:If,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:ua(VT).replace("hr",Rf).replace("heading",` *#{1,6} *[^
|
|
192
192
|
]`).replace("lheading",NF).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},w_e=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,C_e=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,LF=/^( {2,}|\\)\n(?!\s*$)/,A_e=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,by=/[\p{P}\p{S}]/u,ZT=/[\s\p{P}\p{S}]/u,PF=/[^\s\p{P}\p{S}]/u,D_e=ua(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,ZT).getRegex(),FF=/(?!~)[\p{P}\p{S}]/u,O_e=/(?!~)[\s\p{P}\p{S}]/u,I_e=/(?:[^\s\p{P}\p{S}]|~)/u,R_e=/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,BF=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,N_e=ua(BF,"u").replace(/punct/g,by).getRegex(),M_e=ua(BF,"u").replace(/punct/g,FF).getRegex(),jF="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",L_e=ua(jF,"gu").replace(/notPunctSpace/g,PF).replace(/punctSpace/g,ZT).replace(/punct/g,by).getRegex(),P_e=ua(jF,"gu").replace(/notPunctSpace/g,I_e).replace(/punctSpace/g,O_e).replace(/punct/g,FF).getRegex(),F_e=ua("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,PF).replace(/punctSpace/g,ZT).replace(/punct/g,by).getRegex(),B_e=ua(/\\(punct)/,"gu").replace(/punct/g,by).getRegex(),j_e=ua(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),U_e=ua(XT).replace("(?:-->|$)","-->").getRegex(),z_e=ua("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",U_e).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),hy=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,q_e=ua(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",hy).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),UF=ua(/^!?\[(label)\]\[(ref)\]/).replace("label",hy).replace("ref",QT).getRegex(),zF=ua(/^!?\[(ref)\](?:\[\])?/).replace("ref",QT).getRegex(),G_e=ua("reflink|nolink(?!\\()","g").replace("reflink",UF).replace("nolink",zF).getRegex(),ew={_backpedal:If,anyPunctuation:B_e,autolink:j_e,blockSkip:R_e,br:LF,code:C_e,del:If,emStrongLDelim:N_e,emStrongRDelimAst:L_e,emStrongRDelimUnd:F_e,escape:w_e,link:q_e,nolink:zF,punctuation:D_e,reflink:UF,reflinkSearch:G_e,tag:z_e,text:A_e,url:If},$_e={...ew,link:ua(/^!?\[(label)\]\((.*?)\)/).replace("label",hy).getRegex(),reflink:ua(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",hy).getRegex()},$T={...ew,emStrongRDelimAst:P_e,emStrongLDelim:M_e,url:ua(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},H_e={...$T,br:ua(LF).replace("{2,}","*").getRegex(),text:ua($T.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},my={normal:JT,gfm:k_e,pedantic:T_e},Df={normal:ew,gfm:$T,breaks:H_e,pedantic:$_e},Y_e={"&":"&","<":"<",">":">",'"':""","'":"'"},CF=e=>Y_e[e];gy=class{options;rules;lexer;constructor(e){this.options=e||Fl}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let a=t[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?a:Of(a,`
|
|
@@ -701,7 +701,7 @@ caused by: `+na.fullStack(t):e.stack};na.errorFromList=function(e){return xn.arr
|
|
|
701
701
|
${e}
|
|
702
702
|
</context>
|
|
703
703
|
|
|
704
|
-
${t}`:t}var pue="0.10.5";function due(){let e=new zM;return e.name("aii").description("AI-powered CLI assistant").version(pue,"-V, --version","Show version number").helpOption(!1).enablePositionalOptions().argument("[query...]","Natural language query").option("--clean","Clean output mode (just the result)").option("--standard","Standard output mode (result + metrics)").option("--thinking","Thinking mode (full reasoning)").option("-v, --verbose","Verbose output (alias for --thinking)").option("-d, --debug","Debug output").option("--model <model>","Override LLM model").option("--provider <provider>","Override LLM provider (e.g., ollama, anthropic, openai)").option("--host <host>","API server host:port").option("-y, --yes","Auto-confirm shell commands").option("--offline","Offline mode (no web/MCP)").option("-i, --interactive","Interactive chat mode").option("-c, --continue-chat <id>","Continue chat session").option("-n, --new-chat","Force new chat session").option("--auto","Auto mode - auto-approve all actions").option("-q, --quiet","Quiet mode - minimal output").option("--no-colors","Disable colored output").option("--no-emojis","Disable emoji icons").option("--no-animations","Disable animations").option("--no-streaming","Disable streaming").option("--show-tokens","Show token usage").option("--show-cost","Show cost estimates").option("-h, --help","Show help"),e.command("config").description("Configuration management").argument("[action]","Action: init, show, validate, set").argument("[key]","Config key (for set)").argument("[value]","Config value (for set)").action(()=>{}),e.command("mcp").description("MCP server management").argument("[action]","Action: list, add, remove, status, etc.").argument("[rest...]","Server name and arguments").passThroughOptions().action(()=>{}),e.command("prompt").description("Prompt library").argument("[action]","Action: list, show, use, create").argument("[rest...]","Prompt name and arguments").allowUnknownOption().action(()=>{}),e.command("stats").description("Usage statistics").argument("[type]","Type: models, cost").action(()=>{}),e.command("history").description("Chat history").argument("[action]","Action: list, search, export, delete").argument("[query]","Search query or ID").action(()=>{}),e.command("doctor").description("System health check").action(()=>{}),e.command("chat").description("Interactive chat mode").action(()=>{}),e.command("agent").description("Interactive agent mode with tool execution").argument("[query...]","Optional query (non-interactive if provided)").action(()=>{}),e.command("loop").description("Autonomous agent loop (Ralph Wiggum pattern)").argument("[args...]","Loop arguments (prompt, --max, --verify, --budget, etc.)").allowUnknownOption().action(()=>{}),e.command("telegram").description("Telegram bot channel (chat with Aii from Telegram)").argument("[action]","Action: start, pair, status, unpair").argument("[args...]","Additional arguments").allowUnknownOption().action(()=>{}),e.command("run").description("Run domain-specific operations").argument("<operation>","Operation (e.g., git commit)").argument("[args...]","Additional arguments").allowUnknownOption().action(()=>{}),e.command("help").description("display help for command").argument("[command]","Command to show help for").action(()=>{}),e.command("version").description("Show version number").action(()=>{}),e}async function GM(e){let t=due();t.exitOverride(),t.configureOutput({writeErr:()=>{}});let a="query",n,r=[];try{t.parse(e),r=t.args;let l=t.args[0];l&&["config","mcp","prompt","stats","history","doctor","chat","run","help","version","agent","loop","telegram"].includes(l)&&(a=l,n=t.args[1],r=t.args.slice(2))}catch(l){l instanceof UM&&(l.code==="commander.version"||l.code==="commander.helpDisplayed")&&process.exit(0),r=e.slice(2)}let i=t.opts(),s={clean:i.clean??!1,standard:i.standard??!1,thinking:i.thinking??!1,verbose:i.verbose??!1,debug:i.debug??!1,model:i.model,provider:i.provider,host:i.host,yes:i.yes??!1,offline:i.offline??!1,interactive:i.interactive??!1,continueChat:i.continueChat,newChat:i.newChat??!1,auto:i.auto??!1,quiet:i.quiet??!1,noColors:!i.colors,noEmojis:!i.emojis,noAnimations:!i.animations,noStreaming:!i.streaming,showTokens:i.showTokens??!1,showCost:i.showCost??!1,help:i.help??!1,version:i.version??!1},o;ox()&&(o=await qM()),(a==="chat"||s.interactive)&&(a="agent"),a==="query"&&!r.length&&!o&&(a="agent");let c;if(a==="query"&&r.length>0)c=r.join(" ");else if(a==="agent"){let l=[];n&&l.push(n),r.length>0&&l.push(...r),l.length>0&&(c=l.join(" "))}return{command:a,subcommand:n,args:r,flags:s,stdinContent:o,query:c}}var ea;(function(e){e[e.LOCAL=1]="LOCAL",e[e.SERVER=2]="SERVER"})(ea||(ea={}));var cx={translate:"clean",shell:"clean",shell_generate:"clean",mcp:"standard",explain:"standard",code_generate:"standard",code_review:"standard",summarize:"standard",research:"standard",_default:"standard"};function Fu(e,t,a,n){return e.clean?"clean":e.thinking||e.verbose?"thinking":e.standard?"standard":t&&a?.[t]?a[t]:t&&cx[t]?cx[t]:n||cx._default}var $M={config:ea.LOCAL,help:ea.LOCAL,version:ea.LOCAL,doctor:ea.LOCAL,mcp:ea.LOCAL,prompt:ea.LOCAL,stats:ea.LOCAL,history:ea.LOCAL,query:ea.SERVER,chat:ea.SERVER,run:ea.SERVER,agent:ea.SERVER,loop:ea.SERVER,telegram:ea.SERVER};function lx(e){let t=$M[e.command]??ea.SERVER;switch(e.command){case"config":return mue(e);case"mcp":return fue(e);case"prompt":return hue(e);case"stats":return gue(e);case"history":return _ue(e);case"doctor":return{tier:ea.LOCAL,handler:"doctor",params:{}};case"chat":return{tier:ea.SERVER,handler:"chat",params:{continueChat:e.flags.continueChat}};case"run":return bue(e);case"agent":return{tier:ea.SERVER,handler:"agent",params:{interactive:!e.query}};case"loop":return{tier:ea.SERVER,handler:"loop",params:{}};case"telegram":return{tier:ea.SERVER,handler:"telegram",params:{action:e.subcommand??e.args[0]??"start"}};case"help":return{tier:ea.LOCAL,handler:"help",params:{command:e.subcommand}};case"version":return{tier:ea.LOCAL,handler:"version",params:{}};case"query":default:return{tier:t,handler:"query",params:{query:e.query,stdinContent:e.stdinContent}}}}function mue(e){let t=e.subcommand??e.args[0]??"show";return{tier:ea.LOCAL,handler:`config:${t}`,params:{key:e.args[0],value:e.args[1]}}}function fue(e){let t=e.subcommand??e.args[0]??"list";return{tier:ea.LOCAL,handler:`mcp:${t}`,params:{name:e.args[0],args:e.args.slice(1)}}}function hue(e){let t=e.subcommand??e.args[0]??"list";return{tier:ea.LOCAL,handler:`prompt:${t}`,params:{name:e.args[0],args:e.args.slice(1)}}}function gue(e){let t=e.subcommand??e.args[0];return{tier:ea.LOCAL,handler:t?`stats:${t}`:"stats",params:{}}}function _ue(e){let t=e.subcommand??e.args[0]??"list";return{tier:ea.LOCAL,handler:`history:${t}`,params:{query:e.args[0],id:e.args[0]}}}var yue=new Set(["--model","--provider","--host","--continue-chat","-c"]);function bue(e){let t=[];e.subcommand&&t.push(e.subcommand);let a=[];for(let r=0;r<e.args.length;r++){let i=e.args[r];if(yue.has(i)){r++;continue}i.startsWith("-")||a.push(i)}t.push(...a);let n=t.join(" ");return{tier:ea.SERVER,handler:"run",params:{operation:n}}}var Tl=dn(B1(),1);import*as Kn from"fs";import*as U1 from"path";import*as R5 from"os";var $k={llm:{provider:"anthropic",model:"claude-sonnet-4-20250514",temperature:.7,max_tokens:4e3},api:{url:"http://localhost:26169"},streaming:{enabled:!0,buffer_size:10},output_modes:{default:"standard"}},j1={configDir:".aii",configFile:"config.yaml",secretsFile:"secrets.yaml",mcpFile:"mcp.json"};var vc=class e extends Error{code;suggestions;constructor(t,a,n=[]){super(t),this.name="AiiError",this.code=a,this.suggestions=n,Object.setPrototypeOf(this,e.prototype)}},cf=class e extends vc{constructor(t,a){super(`Cannot connect to Aii Server at ${t}:${a}`,"CONNECTION_ERROR",[`Check if Aii Server is running: curl ${t}:${a}/api/status`,"Start the Aii Server (separate process)","Verify host in config: aii config show",`Try a different host: aii "hello" --host ${t}:${a}`]),this.name="ConnectionError",Object.setPrototypeOf(this,e.prototype)}},sr=class e extends vc{constructor(t,a){super(`Configuration error: ${t}`,"CONFIG_ERROR",a??["Run 'aii config init' to complete setup"]),this.name="ConfigError",Object.setPrototypeOf(this,e.prototype)}},lf=class e extends vc{constructor(t,a){super(`Operation timed out: ${t} (${a}ms)`,"TIMEOUT_ERROR",["Try again","Check network connectivity","The server might be overloaded"]),this.name="TimeoutError",Object.setPrototypeOf(this,e.prototype)}},uf=class e extends vc{constructor(t){super(t,"WEBSOCKET_ERROR",["Check if Aii Server is running","Verify the server URL in config","Check network connectivity"]),this.name="WebSocketError",Object.setPrototypeOf(this,e.prototype)}},pf=class e extends vc{constructor(t,a){super(a,t,["Check server logs for more details","Try again with a different query"]),this.name="ServerError",Object.setPrototypeOf(this,e.prototype)}},fn=class e extends vc{constructor(t="Missing or invalid API key"){super(`Authentication error: ${t}`,"AUTH_ERROR",["Run 'aii config init' to set up your API key","Check that your API key is valid","Verify the API key in ~/.aii/secrets.yaml"]),this.name="AuthError",Object.setPrototypeOf(this,e.prototype)}};var Yk=class{configDir;configPath;secretsPath;config=null;secrets=null;constructor(t){this.configDir=t??U1.join(R5.homedir(),j1.configDir),this.configPath=U1.join(this.configDir,j1.configFile),this.secretsPath=U1.join(this.configDir,j1.secretsFile)}getConfigDir(){return this.configDir}configExists(){return Kn.existsSync(this.configPath)}async load(){if(this.config)return this.config;let t={...$k};if(Kn.existsSync(this.configPath))try{let a=Kn.readFileSync(this.configPath,"utf-8"),n=Tl.parse(a);t=this.mergeConfig($k,n)}catch{throw new sr(`Failed to parse config file: ${this.configPath}`,["Check if the YAML syntax is valid","Try running: aii config init"])}return await this.loadSecrets(),t=this.applyEnvOverrides(t),this.config=t,t}async loadSecrets(){if(this.secrets)return this.secrets;let t={};if(Kn.existsSync(this.secretsPath))try{let a=Kn.readFileSync(this.secretsPath,"utf-8");t=Tl.parse(a)}catch{}return this.secrets=t,t}mergeConfig(t,a){let n={...t};return a.llm&&(n.llm={...t.llm,...a.llm}),a.api&&(n.api={...t.api,...a.api},n.api.url&&!n.api.url.startsWith("http://")&&!n.api.url.startsWith("https://")&&(n.api.url=`http://${n.api.url}`)),a.streaming&&(n.streaming={...t.streaming,...a.streaming}),a.output_modes&&(n.output_modes={...t.output_modes,...a.output_modes}),a.mcp&&(n.mcp=a.mcp),a.web_search&&(n.web_search=a.web_search),n}applyEnvOverrides(t){let a={...t};return process.env.AII_LLM_PROVIDER&&(a.llm.provider=process.env.AII_LLM_PROVIDER),process.env.AII_MODEL&&(a.llm.model=process.env.AII_MODEL),process.env.AII_API_URL&&(a.api.url=process.env.AII_API_URL),a}getServerApiKey(){let t=this.config?.api.keys;return t&&t.length>0?t[0]:this.config?.api.key?this.config.api.key:process.env.AII_API_KEY}getApiKey(t){let a=t??this.config?.llm.provider??"anthropic";if(a==="ollama")return"ollama";if(this.secrets){let s=this.secrets[`${a}_api_key`];if(s)return s;let o=this.secrets.api_keys?.[a];if(o)return o}let n={anthropic:"ANTHROPIC_API_KEY",openai:"OPENAI_API_KEY",gemini:"GEMINI_API_KEY",deepseek:"DEEPSEEK_API_KEY",moonshot:"MOONSHOT_API_KEY",zai:"ZAI_API_KEY",ollama:"OLLAMA_HOST",openrouter:"OPENROUTER_API_KEY"},r=process.env[n[a]];if(r)return r;let i=process.env[`AII_${n[a]}`];if(i)return i}get(t){if(!this.config)return;let a=t.split("."),n=this.config;for(let r of a){if(n==null)return;n=n[r]}return n}async set(t,a){this.config||await this.load();let n=a;t==="api.url"&&typeof a=="string"&&!a.startsWith("http://")&&!a.startsWith("https://")&&(n=`http://${a}`);let r=t.split("."),i=this.config;for(let s=0;s<r.length-1;s++){let o=r[s];i[o]===void 0&&(i[o]={}),i=i[o]}i[r[r.length-1]]=n,await this.save()}async save(){if(!this.config)throw new sr("No config loaded to save");Kn.existsSync(this.configDir)||Kn.mkdirSync(this.configDir,{recursive:!0,mode:448});let t=Tl.stringify(this.config);Kn.writeFileSync(this.configPath,t,{encoding:"utf-8",mode:384})}loadSecretsSync(){if(this.secrets)return;let t={};if(Kn.existsSync(this.secretsPath))try{let a=Kn.readFileSync(this.secretsPath,"utf-8");t=Tl.parse(a)}catch{}this.secrets=t}getSecret(t){this.secrets||this.loadSecretsSync();let a=this.secrets?.[t];return typeof a=="string"?a:void 0}async setSecret(t,a){Kn.existsSync(this.configDir)||Kn.mkdirSync(this.configDir,{recursive:!0,mode:448}),this.secrets||await this.loadSecrets(),this.secrets=this.secrets||{},this.secrets[t]=a;let n=Tl.stringify(this.secrets);Kn.writeFileSync(this.secretsPath,n,{encoding:"utf-8",mode:384})}getConfig(){if(!this.config)throw new sr("Config not loaded. Call load() first.");return this.config}validate(){let t=[];return this.config?(this.config.llm.provider||t.push("Missing LLM provider"),this.config.llm.model||t.push("Missing LLM model"),this.getApiKey()||t.push(`Missing API key for provider: ${this.config.llm.provider}`),this.config.api.url||t.push("Missing API URL"),{valid:t.length===0,issues:t}):(t.push("Configuration not loaded"),{valid:!1,issues:t})}},Hk=null;function $r(){return Hk||(Hk=new Yk),Hk}va();import{createInterface as cDe}from"readline";import{spawn as lDe}from"child_process";var wge=dn(z9(),1),Cge=dn(oT(),1),Age=dn(uT(),1),X9=dn(ey(),1),Dge=dn(Q9(),1);var vo=X9.default;Fn();var Fge={timeout:12e4,retries:3,retryDelay:1e3},fi=class{options;ws=null;activityTimeout=null;mcpExecutor=null;constructor(t){this.options={...Fge,...t}}async initializeMCP(){if(!this.mcpExecutor){let{ClientMCPExecutor:t}=await Promise.resolve().then(()=>(ip(),rp));this.mcpExecutor=new t,await this.mcpExecutor.initialize(),Se(`MCP executor initialized with ${this.mcpExecutor.getConnectionCount()} connections`)}}async executeRequest(t,a){let n=null;for(let r=0;r<this.options.retries;r++)try{return await this.executeWithRetry(t,a)}catch(i){if(n=i instanceof Error?i:new Error(String(i)),Se(`Attempt ${r+1} failed: ${n.message}`),n instanceof pf||n.message.includes("Authentication"))throw n;if(r<this.options.retries-1){let s=this.options.retryDelay*Math.pow(2,r);Se(`Retrying in ${s}ms...`),await this.sleep(s)}}throw n??new uf("Max retries exceeded")}async executeWithRetry(t,a){return new Promise((n,r)=>{let i=this.buildWebSocketUrl();Se(`Connecting to ${i}`);try{this.ws=new vo(i)}catch{let c=new URL(this.options.url);r(new cf(c.hostname||"localhost",c.port||"26169"));return}let s=!1,o=null;this.resetActivityTimeout(()=>{s||(this.cleanup(),r(new lf("WebSocket activity",this.options.timeout)))}),this.ws.on("open",()=>{Se("WebSocket connected, sending request"),this.ws?.send(JSON.stringify(t))}),this.ws.on("message",c=>{this.resetActivityTimeout(()=>{s||(this.cleanup(),r(new lf("WebSocket activity",this.options.timeout)))});try{let l=JSON.parse(c.toString());this.handleMessage(l,a,u=>{s=!0,o=u,this.cleanup(),n(u)},u=>{s=!0,this.cleanup(),r(u)})}catch(l){let u=c?String(c):"<undefined>";Se(`Failed to parse message: ${u}`),s||(s=!0,this.cleanup(),r(new Error(`Failed to parse server message: ${l.message}`)))}}),this.ws.on("error",c=>{if(Se(`WebSocket error: ${c.message}`),!s){s=!0,this.cleanup();let l=new URL(this.options.url);r(new cf(l.hostname||"localhost",l.port||"26169"))}}),this.ws.on("close",(c,l)=>{Se(`WebSocket closed: ${c} ${l.toString()}`),s||(s=!0,this.cleanup(),o?n(o):r(new uf(`Connection closed unexpectedly: ${c}`)))})})}handleMessage(t,a,n,r){switch(t.type){case"token":{let i=t;a?.onToken?.(i.data);break}case"complete":{let i=t,s=i.metadata||{},o=this.convertServerMetadata(i),c={result:i.result,metadata:o,clientSideExecution:s.client_side_execution===!0,userRequest:s.user_request};a?.onComplete?.(c),n(c);break}case"error":{let i=t,s=new pf(i.code,i.message);a?.onError?.(s),r(s);break}case"mcp_query_tools":{Se("Received mcp_query_tools request"),this.handleMCPQueryTools(t);break}case"mcp_tool_request":{Se("Received mcp_tool_request"),this.handleMCPToolRequest(t);break}default:Se(`Unknown message type: ${t.type}`)}}convertServerMetadata(t){let a=t.metadata||{},n,r;a.tokens?(n=a.tokens.input,r=a.tokens.output):(n=a.input_tokens,r=a.output_tokens);let i=a.cost??a.cost_usd,s=a.execution_time??a.total_time;return{function_name:t.function_name,tokens_in:n,tokens_out:r,cost:typeof i=="number"?i:void 0,model:typeof a.model=="string"?a.model:void 0,execution_time:typeof s=="number"?s:void 0}}buildWebSocketUrl(){let t=new URL(this.options.url);return`${t.protocol==="https:"?"wss:":"ws:"}//${t.host}/ws/execute`}async handleMCPQueryTools(t){try{if(!this.mcpExecutor){let{ClientMCPExecutor:n}=await Promise.resolve().then(()=>(ip(),rp));this.mcpExecutor=new n,await this.mcpExecutor.initialize()}let a=await this.mcpExecutor.handleQueryTools(t);this.ws?.send(JSON.stringify(a))}catch(a){let n=a instanceof Error?a.message:String(a),r=a instanceof Error?a.stack:void 0;Se(`Error handling mcp_query_tools: ${n}${r?`
|
|
704
|
+
${t}`:t}var pue="0.10.6";function due(){let e=new zM;return e.name("aii").description("AI-powered CLI assistant").version(pue,"-V, --version","Show version number").helpOption(!1).enablePositionalOptions().argument("[query...]","Natural language query").option("--clean","Clean output mode (just the result)").option("--standard","Standard output mode (result + metrics)").option("--thinking","Thinking mode (full reasoning)").option("-v, --verbose","Verbose output (alias for --thinking)").option("-d, --debug","Debug output").option("--model <model>","Override LLM model").option("--provider <provider>","Override LLM provider (e.g., ollama, anthropic, openai)").option("--host <host>","API server host:port").option("-y, --yes","Auto-confirm shell commands").option("--offline","Offline mode (no web/MCP)").option("-i, --interactive","Interactive chat mode").option("-c, --continue-chat <id>","Continue chat session").option("-n, --new-chat","Force new chat session").option("--auto","Auto mode - auto-approve all actions").option("-q, --quiet","Quiet mode - minimal output").option("--no-colors","Disable colored output").option("--no-emojis","Disable emoji icons").option("--no-animations","Disable animations").option("--no-streaming","Disable streaming").option("--show-tokens","Show token usage").option("--show-cost","Show cost estimates").option("-h, --help","Show help"),e.command("config").description("Configuration management").argument("[action]","Action: init, show, validate, set").argument("[key]","Config key (for set)").argument("[value]","Config value (for set)").action(()=>{}),e.command("mcp").description("MCP server management").argument("[action]","Action: list, add, remove, status, etc.").argument("[rest...]","Server name and arguments").passThroughOptions().action(()=>{}),e.command("prompt").description("Prompt library").argument("[action]","Action: list, show, use, create").argument("[rest...]","Prompt name and arguments").allowUnknownOption().action(()=>{}),e.command("stats").description("Usage statistics").argument("[type]","Type: models, cost").action(()=>{}),e.command("history").description("Chat history").argument("[action]","Action: list, search, export, delete").argument("[query]","Search query or ID").action(()=>{}),e.command("doctor").description("System health check").action(()=>{}),e.command("chat").description("Interactive chat mode").action(()=>{}),e.command("agent").description("Interactive agent mode with tool execution").argument("[query...]","Optional query (non-interactive if provided)").action(()=>{}),e.command("loop").description("Autonomous agent loop (Ralph Wiggum pattern)").argument("[args...]","Loop arguments (prompt, --max, --verify, --budget, etc.)").allowUnknownOption().action(()=>{}),e.command("telegram").description("Telegram bot channel (chat with Aii from Telegram)").argument("[action]","Action: start, pair, status, unpair").argument("[args...]","Additional arguments").allowUnknownOption().action(()=>{}),e.command("run").description("Run domain-specific operations").argument("<operation>","Operation (e.g., git commit)").argument("[args...]","Additional arguments").allowUnknownOption().action(()=>{}),e.command("help").description("display help for command").argument("[command]","Command to show help for").action(()=>{}),e.command("version").description("Show version number").action(()=>{}),e}async function GM(e){let t=due();t.exitOverride(),t.configureOutput({writeErr:()=>{}});let a="query",n,r=[];try{t.parse(e),r=t.args;let l=t.args[0];l&&["config","mcp","prompt","stats","history","doctor","chat","run","help","version","agent","loop","telegram"].includes(l)&&(a=l,n=t.args[1],r=t.args.slice(2))}catch(l){l instanceof UM&&(l.code==="commander.version"||l.code==="commander.helpDisplayed")&&process.exit(0),r=e.slice(2)}let i=t.opts(),s={clean:i.clean??!1,standard:i.standard??!1,thinking:i.thinking??!1,verbose:i.verbose??!1,debug:i.debug??!1,model:i.model,provider:i.provider,host:i.host,yes:i.yes??!1,offline:i.offline??!1,interactive:i.interactive??!1,continueChat:i.continueChat,newChat:i.newChat??!1,auto:i.auto??!1,quiet:i.quiet??!1,noColors:!i.colors,noEmojis:!i.emojis,noAnimations:!i.animations,noStreaming:!i.streaming,showTokens:i.showTokens??!1,showCost:i.showCost??!1,help:i.help??!1,version:i.version??!1},o;ox()&&(o=await qM()),(a==="chat"||s.interactive)&&(a="agent"),a==="query"&&!r.length&&!o&&(a="agent");let c;if(a==="query"&&r.length>0)c=r.join(" ");else if(a==="agent"){let l=[];n&&l.push(n),r.length>0&&l.push(...r),l.length>0&&(c=l.join(" "))}return{command:a,subcommand:n,args:r,flags:s,stdinContent:o,query:c}}var ea;(function(e){e[e.LOCAL=1]="LOCAL",e[e.SERVER=2]="SERVER"})(ea||(ea={}));var cx={translate:"clean",shell:"clean",shell_generate:"clean",mcp:"standard",explain:"standard",code_generate:"standard",code_review:"standard",summarize:"standard",research:"standard",_default:"standard"};function Fu(e,t,a,n){return e.clean?"clean":e.thinking||e.verbose?"thinking":e.standard?"standard":t&&a?.[t]?a[t]:t&&cx[t]?cx[t]:n||cx._default}var $M={config:ea.LOCAL,help:ea.LOCAL,version:ea.LOCAL,doctor:ea.LOCAL,mcp:ea.LOCAL,prompt:ea.LOCAL,stats:ea.LOCAL,history:ea.LOCAL,query:ea.SERVER,chat:ea.SERVER,run:ea.SERVER,agent:ea.SERVER,loop:ea.SERVER,telegram:ea.SERVER};function lx(e){let t=$M[e.command]??ea.SERVER;switch(e.command){case"config":return mue(e);case"mcp":return fue(e);case"prompt":return hue(e);case"stats":return gue(e);case"history":return _ue(e);case"doctor":return{tier:ea.LOCAL,handler:"doctor",params:{}};case"chat":return{tier:ea.SERVER,handler:"chat",params:{continueChat:e.flags.continueChat}};case"run":return bue(e);case"agent":return{tier:ea.SERVER,handler:"agent",params:{interactive:!e.query}};case"loop":return{tier:ea.SERVER,handler:"loop",params:{}};case"telegram":return{tier:ea.SERVER,handler:"telegram",params:{action:e.subcommand??e.args[0]??"start"}};case"help":return{tier:ea.LOCAL,handler:"help",params:{command:e.subcommand}};case"version":return{tier:ea.LOCAL,handler:"version",params:{}};case"query":default:return{tier:t,handler:"query",params:{query:e.query,stdinContent:e.stdinContent}}}}function mue(e){let t=e.subcommand??e.args[0]??"show";return{tier:ea.LOCAL,handler:`config:${t}`,params:{key:e.args[0],value:e.args[1]}}}function fue(e){let t=e.subcommand??e.args[0]??"list";return{tier:ea.LOCAL,handler:`mcp:${t}`,params:{name:e.args[0],args:e.args.slice(1)}}}function hue(e){let t=e.subcommand??e.args[0]??"list";return{tier:ea.LOCAL,handler:`prompt:${t}`,params:{name:e.args[0],args:e.args.slice(1)}}}function gue(e){let t=e.subcommand??e.args[0];return{tier:ea.LOCAL,handler:t?`stats:${t}`:"stats",params:{}}}function _ue(e){let t=e.subcommand??e.args[0]??"list";return{tier:ea.LOCAL,handler:`history:${t}`,params:{query:e.args[0],id:e.args[0]}}}var yue=new Set(["--model","--provider","--host","--continue-chat","-c"]);function bue(e){let t=[];e.subcommand&&t.push(e.subcommand);let a=[];for(let r=0;r<e.args.length;r++){let i=e.args[r];if(yue.has(i)){r++;continue}i.startsWith("-")||a.push(i)}t.push(...a);let n=t.join(" ");return{tier:ea.SERVER,handler:"run",params:{operation:n}}}var Tl=dn(B1(),1);import*as Kn from"fs";import*as U1 from"path";import*as R5 from"os";var $k={llm:{provider:"anthropic",model:"claude-sonnet-4-20250514",temperature:.7,max_tokens:4e3},api:{url:"http://localhost:26169"},streaming:{enabled:!0,buffer_size:10},output_modes:{default:"standard"}},j1={configDir:".aii",configFile:"config.yaml",secretsFile:"secrets.yaml",mcpFile:"mcp.json"};var vc=class e extends Error{code;suggestions;constructor(t,a,n=[]){super(t),this.name="AiiError",this.code=a,this.suggestions=n,Object.setPrototypeOf(this,e.prototype)}},cf=class e extends vc{constructor(t,a){super(`Cannot connect to Aii Server at ${t}:${a}`,"CONNECTION_ERROR",[`Check if Aii Server is running: curl ${t}:${a}/api/status`,"Start the Aii Server (separate process)","Verify host in config: aii config show",`Try a different host: aii "hello" --host ${t}:${a}`]),this.name="ConnectionError",Object.setPrototypeOf(this,e.prototype)}},sr=class e extends vc{constructor(t,a){super(`Configuration error: ${t}`,"CONFIG_ERROR",a??["Run 'aii config init' to complete setup"]),this.name="ConfigError",Object.setPrototypeOf(this,e.prototype)}},lf=class e extends vc{constructor(t,a){super(`Operation timed out: ${t} (${a}ms)`,"TIMEOUT_ERROR",["Try again","Check network connectivity","The server might be overloaded"]),this.name="TimeoutError",Object.setPrototypeOf(this,e.prototype)}},uf=class e extends vc{constructor(t){super(t,"WEBSOCKET_ERROR",["Check if Aii Server is running","Verify the server URL in config","Check network connectivity"]),this.name="WebSocketError",Object.setPrototypeOf(this,e.prototype)}},pf=class e extends vc{constructor(t,a){super(a,t,["Check server logs for more details","Try again with a different query"]),this.name="ServerError",Object.setPrototypeOf(this,e.prototype)}},fn=class e extends vc{constructor(t="Missing or invalid API key"){super(`Authentication error: ${t}`,"AUTH_ERROR",["Run 'aii config init' to set up your API key","Check that your API key is valid","Verify the API key in ~/.aii/secrets.yaml"]),this.name="AuthError",Object.setPrototypeOf(this,e.prototype)}};var Yk=class{configDir;configPath;secretsPath;config=null;secrets=null;constructor(t){this.configDir=t??U1.join(R5.homedir(),j1.configDir),this.configPath=U1.join(this.configDir,j1.configFile),this.secretsPath=U1.join(this.configDir,j1.secretsFile)}getConfigDir(){return this.configDir}configExists(){return Kn.existsSync(this.configPath)}async load(){if(this.config)return this.config;let t={...$k};if(Kn.existsSync(this.configPath))try{let a=Kn.readFileSync(this.configPath,"utf-8"),n=Tl.parse(a);t=this.mergeConfig($k,n)}catch{throw new sr(`Failed to parse config file: ${this.configPath}`,["Check if the YAML syntax is valid","Try running: aii config init"])}return await this.loadSecrets(),t=this.applyEnvOverrides(t),this.config=t,t}async loadSecrets(){if(this.secrets)return this.secrets;let t={};if(Kn.existsSync(this.secretsPath))try{let a=Kn.readFileSync(this.secretsPath,"utf-8");t=Tl.parse(a)}catch{}return this.secrets=t,t}mergeConfig(t,a){let n={...t};return a.llm&&(n.llm={...t.llm,...a.llm}),a.api&&(n.api={...t.api,...a.api},n.api.url&&!n.api.url.startsWith("http://")&&!n.api.url.startsWith("https://")&&(n.api.url=`http://${n.api.url}`)),a.streaming&&(n.streaming={...t.streaming,...a.streaming}),a.output_modes&&(n.output_modes={...t.output_modes,...a.output_modes}),a.mcp&&(n.mcp=a.mcp),a.web_search&&(n.web_search=a.web_search),n}applyEnvOverrides(t){let a={...t};return process.env.AII_LLM_PROVIDER&&(a.llm.provider=process.env.AII_LLM_PROVIDER),process.env.AII_MODEL&&(a.llm.model=process.env.AII_MODEL),process.env.AII_API_URL&&(a.api.url=process.env.AII_API_URL),a}getServerApiKey(){let t=this.config?.api.keys;return t&&t.length>0?t[0]:this.config?.api.key?this.config.api.key:process.env.AII_API_KEY}getApiKey(t){let a=t??this.config?.llm.provider??"anthropic";if(a==="ollama")return"ollama";if(this.secrets){let s=this.secrets[`${a}_api_key`];if(s)return s;let o=this.secrets.api_keys?.[a];if(o)return o}let n={anthropic:"ANTHROPIC_API_KEY",openai:"OPENAI_API_KEY",gemini:"GEMINI_API_KEY",deepseek:"DEEPSEEK_API_KEY",moonshot:"MOONSHOT_API_KEY",zai:"ZAI_API_KEY",ollama:"OLLAMA_HOST",openrouter:"OPENROUTER_API_KEY"},r=process.env[n[a]];if(r)return r;let i=process.env[`AII_${n[a]}`];if(i)return i}get(t){if(!this.config)return;let a=t.split("."),n=this.config;for(let r of a){if(n==null)return;n=n[r]}return n}async set(t,a){this.config||await this.load();let n=a;t==="api.url"&&typeof a=="string"&&!a.startsWith("http://")&&!a.startsWith("https://")&&(n=`http://${a}`);let r=t.split("."),i=this.config;for(let s=0;s<r.length-1;s++){let o=r[s];i[o]===void 0&&(i[o]={}),i=i[o]}i[r[r.length-1]]=n,await this.save()}async save(){if(!this.config)throw new sr("No config loaded to save");Kn.existsSync(this.configDir)||Kn.mkdirSync(this.configDir,{recursive:!0,mode:448});let t=Tl.stringify(this.config);Kn.writeFileSync(this.configPath,t,{encoding:"utf-8",mode:384})}loadSecretsSync(){if(this.secrets)return;let t={};if(Kn.existsSync(this.secretsPath))try{let a=Kn.readFileSync(this.secretsPath,"utf-8");t=Tl.parse(a)}catch{}this.secrets=t}getSecret(t){this.secrets||this.loadSecretsSync();let a=this.secrets?.[t];return typeof a=="string"?a:void 0}async setSecret(t,a){Kn.existsSync(this.configDir)||Kn.mkdirSync(this.configDir,{recursive:!0,mode:448}),this.secrets||await this.loadSecrets(),this.secrets=this.secrets||{},this.secrets[t]=a;let n=Tl.stringify(this.secrets);Kn.writeFileSync(this.secretsPath,n,{encoding:"utf-8",mode:384})}getConfig(){if(!this.config)throw new sr("Config not loaded. Call load() first.");return this.config}validate(){let t=[];return this.config?(this.config.llm.provider||t.push("Missing LLM provider"),this.config.llm.model||t.push("Missing LLM model"),this.getApiKey()||t.push(`Missing API key for provider: ${this.config.llm.provider}`),this.config.api.url||t.push("Missing API URL"),{valid:t.length===0,issues:t}):(t.push("Configuration not loaded"),{valid:!1,issues:t})}},Hk=null;function $r(){return Hk||(Hk=new Yk),Hk}va();import{createInterface as cDe}from"readline";import{spawn as lDe}from"child_process";var wge=dn(z9(),1),Cge=dn(oT(),1),Age=dn(uT(),1),X9=dn(ey(),1),Dge=dn(Q9(),1);var vo=X9.default;Fn();var Fge={timeout:12e4,retries:3,retryDelay:1e3},fi=class{options;ws=null;activityTimeout=null;mcpExecutor=null;constructor(t){this.options={...Fge,...t}}async initializeMCP(){if(!this.mcpExecutor){let{ClientMCPExecutor:t}=await Promise.resolve().then(()=>(ip(),rp));this.mcpExecutor=new t,await this.mcpExecutor.initialize(),Se(`MCP executor initialized with ${this.mcpExecutor.getConnectionCount()} connections`)}}async executeRequest(t,a){let n=null;for(let r=0;r<this.options.retries;r++)try{return await this.executeWithRetry(t,a)}catch(i){if(n=i instanceof Error?i:new Error(String(i)),Se(`Attempt ${r+1} failed: ${n.message}`),n instanceof pf||n.message.includes("Authentication"))throw n;if(r<this.options.retries-1){let s=this.options.retryDelay*Math.pow(2,r);Se(`Retrying in ${s}ms...`),await this.sleep(s)}}throw n??new uf("Max retries exceeded")}async executeWithRetry(t,a){return new Promise((n,r)=>{let i=this.buildWebSocketUrl();Se(`Connecting to ${i}`);try{this.ws=new vo(i)}catch{let c=new URL(this.options.url);r(new cf(c.hostname||"localhost",c.port||"26169"));return}let s=!1,o=null;this.resetActivityTimeout(()=>{s||(this.cleanup(),r(new lf("WebSocket activity",this.options.timeout)))}),this.ws.on("open",()=>{Se("WebSocket connected, sending request"),this.ws?.send(JSON.stringify(t))}),this.ws.on("message",c=>{this.resetActivityTimeout(()=>{s||(this.cleanup(),r(new lf("WebSocket activity",this.options.timeout)))});try{let l=JSON.parse(c.toString());this.handleMessage(l,a,u=>{s=!0,o=u,this.cleanup(),n(u)},u=>{s=!0,this.cleanup(),r(u)})}catch(l){let u=c?String(c):"<undefined>";Se(`Failed to parse message: ${u}`),s||(s=!0,this.cleanup(),r(new Error(`Failed to parse server message: ${l.message}`)))}}),this.ws.on("error",c=>{if(Se(`WebSocket error: ${c.message}`),!s){s=!0,this.cleanup();let l=new URL(this.options.url);r(new cf(l.hostname||"localhost",l.port||"26169"))}}),this.ws.on("close",(c,l)=>{Se(`WebSocket closed: ${c} ${l.toString()}`),s||(s=!0,this.cleanup(),o?n(o):r(new uf(`Connection closed unexpectedly: ${c}`)))})})}handleMessage(t,a,n,r){switch(t.type){case"token":{let i=t;a?.onToken?.(i.data);break}case"complete":{let i=t,s=i.metadata||{},o=this.convertServerMetadata(i),c={result:i.result,metadata:o,clientSideExecution:s.client_side_execution===!0,userRequest:s.user_request};a?.onComplete?.(c),n(c);break}case"error":{let i=t,s=new pf(i.code,i.message);a?.onError?.(s),r(s);break}case"mcp_query_tools":{Se("Received mcp_query_tools request"),this.handleMCPQueryTools(t);break}case"mcp_tool_request":{Se("Received mcp_tool_request"),this.handleMCPToolRequest(t);break}default:Se(`Unknown message type: ${t.type}`)}}convertServerMetadata(t){let a=t.metadata||{},n,r;a.tokens?(n=a.tokens.input,r=a.tokens.output):(n=a.input_tokens,r=a.output_tokens);let i=a.cost??a.cost_usd,s=a.execution_time??a.total_time;return{function_name:t.function_name,tokens_in:n,tokens_out:r,cost:typeof i=="number"?i:void 0,model:typeof a.model=="string"?a.model:void 0,execution_time:typeof s=="number"?s:void 0}}buildWebSocketUrl(){let t=new URL(this.options.url);return`${t.protocol==="https:"?"wss:":"ws:"}//${t.host}/ws/execute`}async handleMCPQueryTools(t){try{if(!this.mcpExecutor){let{ClientMCPExecutor:n}=await Promise.resolve().then(()=>(ip(),rp));this.mcpExecutor=new n,await this.mcpExecutor.initialize()}let a=await this.mcpExecutor.handleQueryTools(t);this.ws?.send(JSON.stringify(a))}catch(a){let n=a instanceof Error?a.message:String(a),r=a instanceof Error?a.stack:void 0;Se(`Error handling mcp_query_tools: ${n}${r?`
|
|
705
705
|
${r}`:""}`),this.ws?.send(JSON.stringify({type:"mcp_query_tools_response",request_id:t.request_id||"unknown",success:!1,error:n,tools:[]}))}}async handleMCPToolRequest(t){try{if(!this.mcpExecutor){let{ClientMCPExecutor:n}=await Promise.resolve().then(()=>(ip(),rp));this.mcpExecutor=new n,await this.mcpExecutor.initialize()}let a=await this.mcpExecutor.handleToolExecution(t);this.ws?.send(JSON.stringify(a))}catch(a){Se(`Error handling mcp_tool_request: ${a}`),this.ws?.send(JSON.stringify({type:"mcp_tool_response",request_id:t.request_id||"unknown",success:!1,error:String(a)}))}}resetActivityTimeout(t){this.activityTimeout&&clearTimeout(this.activityTimeout),this.activityTimeout=setTimeout(t,this.options.timeout)}cleanup(){if(this.activityTimeout&&(clearTimeout(this.activityTimeout),this.activityTimeout=null),this.ws){try{this.ws.close()}catch(t){Se(`WebSocket close error: ${t instanceof Error?t.message:String(t)}`)}this.ws=null}}async shutdownMCP(){this.mcpExecutor&&(await this.mcpExecutor.shutdown(),this.mcpExecutor=null)}disconnect(){this.cleanup()}sleep(t){return new Promise(a=>setTimeout(a,t))}};va();import uy from"node:process";import rF from"node:process";import sy from"node:process";var Bge=(e,t,a,n)=>{if(a==="length"||a==="prototype"||a==="arguments"||a==="caller")return;let r=Object.getOwnPropertyDescriptor(e,a),i=Object.getOwnPropertyDescriptor(t,a);!jge(r,i)&&n||Object.defineProperty(e,a,i)},jge=function(e,t){return e===void 0||e.configurable||e.writable===t.writable&&e.enumerable===t.enumerable&&e.configurable===t.configurable&&(e.writable||e.value===t.value)},Uge=(e,t)=>{let a=Object.getPrototypeOf(t);a!==Object.getPrototypeOf(e)&&Object.setPrototypeOf(e,a)},zge=(e,t)=>`/* Wrapped ${e}*/
|
|
706
706
|
${t}`,qge=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),Gge=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name"),$ge=(e,t,a)=>{let n=a===""?"":`with ${a.trim()}() `,r=zge.bind(null,n,t.toString());Object.defineProperty(r,"name",Gge);let{writable:i,enumerable:s,configurable:o}=qge;Object.defineProperty(e,"toString",{value:r,writable:i,enumerable:s,configurable:o})};function ST(e,t,{ignoreNonConfigurable:a=!1}={}){let{name:n}=e;for(let r of Reflect.ownKeys(t))Bge(e,t,r,a);return Uge(e,t),$ge(e,t,n),e}var ny=new WeakMap,Z9=(e,t={})=>{if(typeof e!="function")throw new TypeError("Expected a function");let a,n=0,r=e.displayName||e.name||"<anonymous>",i=function(...s){if(ny.set(i,++n),n===1)a=e.apply(this,s),e=void 0;else if(t.throw===!0)throw new Error(`Function \`${r}\` can only be called once`);return a};return ST(i,e),ny.set(i,n),i};Z9.callCount=e=>{if(!ny.has(e))throw new Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);return ny.get(e)};var eF=Z9;var Ml=[];Ml.push("SIGHUP","SIGINT","SIGTERM");process.platform!=="win32"&&Ml.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");process.platform==="linux"&&Ml.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");var ry=e=>!!e&&typeof e=="object"&&typeof e.removeListener=="function"&&typeof e.emit=="function"&&typeof e.reallyExit=="function"&&typeof e.listeners=="function"&&typeof e.kill=="function"&&typeof e.pid=="number"&&typeof e.on=="function",xT=Symbol.for("signal-exit emitter"),kT=globalThis,Hge=Object.defineProperty.bind(Object),TT=class{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(kT[xT])return kT[xT];Hge(kT,xT,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(t,a){this.listeners[t].push(a)}removeListener(t,a){let n=this.listeners[t],r=n.indexOf(a);r!==-1&&(r===0&&n.length===1?n.length=0:n.splice(r,1))}emit(t,a,n){if(this.emitted[t])return!1;this.emitted[t]=!0;let r=!1;for(let i of this.listeners[t])r=i(a,n)===!0||r;return t==="exit"&&(r=this.emit("afterExit",a,n)||r),r}},iy=class{},Yge=e=>({onExit(t,a){return e.onExit(t,a)},load(){return e.load()},unload(){return e.unload()}}),wT=class extends iy{onExit(){return()=>{}}load(){}unload(){}},CT=class extends iy{#s=AT.platform==="win32"?"SIGINT":"SIGHUP";#a=new TT;#e;#r;#d;#t={};#i=!1;constructor(t){super(),this.#e=t,this.#t={};for(let a of Ml)this.#t[a]=()=>{let n=this.#e.listeners(a),{count:r}=this.#a,i=t;if(typeof i.__signal_exit_emitter__=="object"&&typeof i.__signal_exit_emitter__.count=="number"&&(r+=i.__signal_exit_emitter__.count),n.length===r){this.unload();let s=this.#a.emit("exit",null,a),o=a==="SIGHUP"?this.#s:a;s||t.kill(t.pid,o)}};this.#d=t.reallyExit,this.#r=t.emit}onExit(t,a){if(!ry(this.#e))return()=>{};this.#i===!1&&this.load();let n=a?.alwaysLast?"afterExit":"exit";return this.#a.on(n,t),()=>{this.#a.removeListener(n,t),this.#a.listeners.exit.length===0&&this.#a.listeners.afterExit.length===0&&this.unload()}}load(){if(!this.#i){this.#i=!0,this.#a.count+=1;for(let t of Ml)try{let a=this.#t[t];a&&this.#e.on(t,a)}catch{}this.#e.emit=(t,...a)=>this.#m(t,...a),this.#e.reallyExit=t=>this.#n(t)}}unload(){this.#i&&(this.#i=!1,Ml.forEach(t=>{let a=this.#t[t];if(!a)throw new Error("Listener not defined for signal: "+t);try{this.#e.removeListener(t,a)}catch{}}),this.#e.emit=this.#r,this.#e.reallyExit=this.#d,this.#a.count-=1)}#n(t){return ry(this.#e)?(this.#e.exitCode=t||0,this.#a.emit("exit",this.#e.exitCode,null),this.#d.call(this.#e,this.#e.exitCode)):0}#m(t,...a){let n=this.#r;if(t==="exit"&&ry(this.#e)){typeof a[0]=="number"&&(this.#e.exitCode=a[0]);let r=n.call(this.#e,t,...a);return this.#a.emit("exit",this.#e.exitCode,null),r}else return n.call(this.#e,t,...a)}},AT=globalThis.process,{onExit:tF,load:BKe,unload:jKe}=Yge(ry(AT)?new CT(AT):new wT);var aF=sy.stderr.isTTY?sy.stderr:sy.stdout.isTTY?sy.stdout:void 0,Kge=aF?eF(()=>{tF(()=>{aF.write("\x1B[?25h")},{alwaysLast:!0})}):()=>{},nF=Kge;var oy=!1,sp={};sp.show=(e=rF.stderr)=>{e.isTTY&&(oy=!1,e.write("\x1B[?25h"))};sp.hide=(e=rF.stderr)=>{e.isTTY&&(nF(),oy=!0,e.write("\x1B[?25l"))};sp.toggle=(e,t)=>{e!==void 0&&(oy=e),oy?sp.show(t):sp.hide(t)};var DT=sp;var Tf=dn(OT(),1);va();import Ui from"node:process";function IT(){return Ui.platform!=="win32"?Ui.env.TERM!=="linux":!!Ui.env.CI||!!Ui.env.WT_SESSION||!!Ui.env.TERMINUS_SUBLIME||Ui.env.ConEmuTask==="{cmd::Cmder}"||Ui.env.TERM_PROGRAM==="Terminus-Sublime"||Ui.env.TERM_PROGRAM==="vscode"||Ui.env.TERM==="xterm-256color"||Ui.env.TERM==="alacritty"||Ui.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var Vge={info:_.blue("\u2139"),success:_.green("\u2714"),warning:_.yellow("\u26A0"),error:_.red("\u2716")},Qge={info:_.blue("i"),success:_.green("\u221A"),warning:_.yellow("\u203C"),error:_.red("\xD7")},Xge=IT()?Vge:Qge,kf=Xge;ly();var Jge=Ll();function RT(e){if(typeof e!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof e}\``);return e.replace(Jge,"")}ly();var Zge=Ll();function NT(e){if(typeof e!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof e}\``);return e.replace(Zge,"")}function cF(e){return e===161||e===164||e===167||e===168||e===170||e===173||e===174||e>=176&&e<=180||e>=182&&e<=186||e>=188&&e<=191||e===198||e===208||e===215||e===216||e>=222&&e<=225||e===230||e>=232&&e<=234||e===236||e===237||e===240||e===242||e===243||e>=247&&e<=250||e===252||e===254||e===257||e===273||e===275||e===283||e===294||e===295||e===299||e>=305&&e<=307||e===312||e>=319&&e<=322||e===324||e>=328&&e<=331||e===333||e===338||e===339||e===358||e===359||e===363||e===462||e===464||e===466||e===468||e===470||e===472||e===474||e===476||e===593||e===609||e===708||e===711||e>=713&&e<=715||e===717||e===720||e>=728&&e<=731||e===733||e===735||e>=768&&e<=879||e>=913&&e<=929||e>=931&&e<=937||e>=945&&e<=961||e>=963&&e<=969||e===1025||e>=1040&&e<=1103||e===1105||e===8208||e>=8211&&e<=8214||e===8216||e===8217||e===8220||e===8221||e>=8224&&e<=8226||e>=8228&&e<=8231||e===8240||e===8242||e===8243||e===8245||e===8251||e===8254||e===8308||e===8319||e>=8321&&e<=8324||e===8364||e===8451||e===8453||e===8457||e===8467||e===8470||e===8481||e===8482||e===8486||e===8491||e===8531||e===8532||e>=8539&&e<=8542||e>=8544&&e<=8555||e>=8560&&e<=8569||e===8585||e>=8592&&e<=8601||e===8632||e===8633||e===8658||e===8660||e===8679||e===8704||e===8706||e===8707||e===8711||e===8712||e===8715||e===8719||e===8721||e===8725||e===8730||e>=8733&&e<=8736||e===8739||e===8741||e>=8743&&e<=8748||e===8750||e>=8756&&e<=8759||e===8764||e===8765||e===8776||e===8780||e===8786||e===8800||e===8801||e>=8804&&e<=8807||e===8810||e===8811||e===8814||e===8815||e===8834||e===8835||e===8838||e===8839||e===8853||e===8857||e===8869||e===8895||e===8978||e>=9312&&e<=9449||e>=9451&&e<=9547||e>=9552&&e<=9587||e>=9600&&e<=9615||e>=9618&&e<=9621||e===9632||e===9633||e>=9635&&e<=9641||e===9650||e===9651||e===9654||e===9655||e===9660||e===9661||e===9664||e===9665||e>=9670&&e<=9672||e===9675||e>=9678&&e<=9681||e>=9698&&e<=9701||e===9711||e===9733||e===9734||e===9737||e===9742||e===9743||e===9756||e===9758||e===9792||e===9794||e===9824||e===9825||e>=9827&&e<=9829||e>=9831&&e<=9834||e===9836||e===9837||e===9839||e===9886||e===9887||e===9919||e>=9926&&e<=9933||e>=9935&&e<=9939||e>=9941&&e<=9953||e===9955||e===9960||e===9961||e>=9963&&e<=9969||e===9972||e>=9974&&e<=9977||e===9979||e===9980||e===9982||e===9983||e===10045||e>=10102&&e<=10111||e>=11094&&e<=11097||e>=12872&&e<=12879||e>=57344&&e<=63743||e>=65024&&e<=65039||e===65533||e>=127232&&e<=127242||e>=127248&&e<=127277||e>=127280&&e<=127337||e>=127344&&e<=127373||e===127375||e===127376||e>=127387&&e<=127404||e>=917760&&e<=917999||e>=983040&&e<=1048573||e>=1048576&&e<=1114109}function lF(e){return e===12288||e>=65281&&e<=65376||e>=65504&&e<=65510}function uF(e){return e>=4352&&e<=4447||e===8986||e===8987||e===9001||e===9002||e>=9193&&e<=9196||e===9200||e===9203||e===9725||e===9726||e===9748||e===9749||e>=9776&&e<=9783||e>=9800&&e<=9811||e===9855||e>=9866&&e<=9871||e===9875||e===9889||e===9898||e===9899||e===9917||e===9918||e===9924||e===9925||e===9934||e===9940||e===9962||e===9970||e===9971||e===9973||e===9978||e===9981||e===9989||e===9994||e===9995||e===10024||e===10060||e===10062||e>=10067&&e<=10069||e===10071||e>=10133&&e<=10135||e===10160||e===10175||e===11035||e===11036||e===11088||e===11093||e>=11904&&e<=11929||e>=11931&&e<=12019||e>=12032&&e<=12245||e>=12272&&e<=12287||e>=12289&&e<=12350||e>=12353&&e<=12438||e>=12441&&e<=12543||e>=12549&&e<=12591||e>=12593&&e<=12686||e>=12688&&e<=12773||e>=12783&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=42124||e>=42128&&e<=42182||e>=43360&&e<=43388||e>=44032&&e<=55203||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=94176&&e<=94180||e>=94192&&e<=94198||e>=94208&&e<=101589||e>=101631&&e<=101662||e>=101760&&e<=101874||e>=110576&&e<=110579||e>=110581&&e<=110587||e===110589||e===110590||e>=110592&&e<=110882||e===110898||e>=110928&&e<=110930||e===110933||e>=110948&&e<=110951||e>=110960&&e<=111355||e>=119552&&e<=119638||e>=119648&&e<=119670||e===126980||e===127183||e===127374||e>=127377&&e<=127386||e>=127488&&e<=127490||e>=127504&&e<=127547||e>=127552&&e<=127560||e===127568||e===127569||e>=127584&&e<=127589||e>=127744&&e<=127776||e>=127789&&e<=127797||e>=127799&&e<=127868||e>=127870&&e<=127891||e>=127904&&e<=127946||e>=127951&&e<=127955||e>=127968&&e<=127984||e===127988||e>=127992&&e<=128062||e===128064||e>=128066&&e<=128252||e>=128255&&e<=128317||e>=128331&&e<=128334||e>=128336&&e<=128359||e===128378||e===128405||e===128406||e===128420||e>=128507&&e<=128591||e>=128640&&e<=128709||e===128716||e>=128720&&e<=128722||e>=128725&&e<=128728||e>=128732&&e<=128735||e===128747||e===128748||e>=128756&&e<=128764||e>=128992&&e<=129003||e===129008||e>=129292&&e<=129338||e>=129340&&e<=129349||e>=129351&&e<=129535||e>=129648&&e<=129660||e>=129664&&e<=129674||e>=129678&&e<=129734||e===129736||e>=129741&&e<=129756||e>=129759&&e<=129770||e>=129775&&e<=129784||e>=131072&&e<=196605||e>=196608&&e<=262141}function e_e(e){if(!Number.isSafeInteger(e))throw new TypeError(`Expected a code point, got \`${typeof e}\`.`)}function pF(e,{ambiguousAsWide:t=!1}={}){return e_e(e),lF(e)||uF(e)||t&&cF(e)?2:1}var fF=dn(mF(),1),t_e=new Intl.Segmenter,a_e=new RegExp("^\\p{Default_Ignorable_Code_Point}$","u");function MT(e,t={}){if(typeof e!="string"||e.length===0)return 0;let{ambiguousIsNarrow:a=!0,countAnsiEscapeCodes:n=!1}=t;if(n||(e=NT(e)),e.length===0)return 0;let r=0,i={ambiguousAsWide:!a};for(let{segment:s}of t_e.segment(e)){let o=s.codePointAt(0);if(!(o<=31||o>=127&&o<=159)&&!(o>=8203&&o<=8207||o===65279)&&!(o>=768&&o<=879||o>=6832&&o<=6911||o>=7616&&o<=7679||o>=8400&&o<=8447||o>=65056&&o<=65071)&&!(o>=55296&&o<=57343)&&!(o>=65024&&o<=65039)&&!a_e.test(s)){if((0,fF.default)().test(s)){r+=2;continue}r+=pF(o,i)}}return r}function LT({stream:e=process.stdout}={}){return!!(e&&e.isTTY&&process.env.TERM!=="dumb"&&!("CI"in process.env))}import hF from"node:process";function PT(){let{env:e}=hF,{TERM:t,TERM_PROGRAM:a}=e;return hF.platform!=="win32"?t!=="linux":!!e.WT_SESSION||!!e.TERMINUS_SUBLIME||e.ConEmuTask==="{cmd::Cmder}"||a==="Terminus-Sublime"||a==="vscode"||t==="xterm-256color"||t==="alacritty"||t==="rxvt-unicode"||t==="rxvt-unicode-256color"||e.TERMINAL_EMULATOR==="JetBrains-JediTerm"}import _s from"node:process";var n_e=3,FT=class{#s=0;start(){this.#s++,this.#s===1&&this.#a()}stop(){if(this.#s<=0)throw new Error("`stop` called more times than `start`");this.#s--,this.#s===0&&this.#e()}#a(){_s.platform==="win32"||!_s.stdin.isTTY||(_s.stdin.setRawMode(!0),_s.stdin.on("data",this.#r),_s.stdin.resume())}#e(){_s.stdin.isTTY&&(_s.stdin.off("data",this.#r),_s.stdin.pause(),_s.stdin.setRawMode(!1))}#r(t){t[0]===n_e&&_s.emit("SIGINT")}},r_e=new FT,BT=r_e;var i_e=dn(OT(),1),jT=class{#s=0;#a=!1;#e=0;#r=-1;#d=0;#t;#i;#n;#m;#h;#l;#u;#p;#g;#o;#c;color;constructor(t){typeof t=="string"&&(t={text:t}),this.#t={color:"cyan",stream:uy.stderr,discardStdin:!0,hideCursor:!0,...t},this.color=this.#t.color,this.spinner=this.#t.spinner,this.#h=this.#t.interval,this.#n=this.#t.stream,this.#l=typeof this.#t.isEnabled=="boolean"?this.#t.isEnabled:LT({stream:this.#n}),this.#u=typeof this.#t.isSilent=="boolean"?this.#t.isSilent:!1,this.text=this.#t.text,this.prefixText=this.#t.prefixText,this.suffixText=this.#t.suffixText,this.indent=this.#t.indent,uy.env.NODE_ENV==="test"&&(this._stream=this.#n,this._isEnabled=this.#l,Object.defineProperty(this,"_linesToClear",{get(){return this.#s},set(a){this.#s=a}}),Object.defineProperty(this,"_frameIndex",{get(){return this.#r}}),Object.defineProperty(this,"_lineCount",{get(){return this.#e}}))}get indent(){return this.#p}set indent(t=0){if(!(t>=0&&Number.isInteger(t)))throw new Error("The `indent` option must be an integer from 0 and up");this.#p=t,this.#f()}get interval(){return this.#h??this.#i.interval??100}get spinner(){return this.#i}set spinner(t){if(this.#r=-1,this.#h=void 0,typeof t=="object"){if(t.frames===void 0)throw new Error("The given spinner must have a `frames` property");this.#i=t}else if(!PT())this.#i=Tf.default.line;else if(t===void 0)this.#i=Tf.default.dots;else if(t!=="default"&&Tf.default[t])this.#i=Tf.default[t];else throw new Error(`There is no built-in spinner named '${t}'. See https://github.com/sindresorhus/cli-spinners/blob/main/spinners.json for a full list.`)}get text(){return this.#g}set text(t=""){this.#g=t,this.#f()}get prefixText(){return this.#o}set prefixText(t=""){this.#o=t,this.#f()}get suffixText(){return this.#c}set suffixText(t=""){this.#c=t,this.#f()}get isSpinning(){return this.#m!==void 0}#_(t=this.#o,a=" "){return typeof t=="string"&&t!==""?t+a:typeof t=="function"?t()+a:""}#y(t=this.#c,a=" "){return typeof t=="string"&&t!==""?a+t:typeof t=="function"?a+t():""}#f(){let t=this.#n.columns??80,a=this.#_(this.#o,"-"),n=this.#y(this.#c,"-"),r=" ".repeat(this.#p)+a+"--"+this.#g+"--"+n;this.#e=0;for(let i of RT(r).split(`
|
|
707
707
|
`))this.#e+=Math.max(1,Math.ceil(MT(i,{countAnsiEscapeCodes:!0})/t))}get isEnabled(){return this.#l&&!this.#u}set isEnabled(t){if(typeof t!="boolean")throw new TypeError("The `isEnabled` option must be a boolean");this.#l=t}get isSilent(){return this.#u}set isSilent(t){if(typeof t!="boolean")throw new TypeError("The `isSilent` option must be a boolean");this.#u=t}frame(){let t=Date.now();(this.#r===-1||t-this.#d>=this.interval)&&(this.#r=++this.#r%this.#i.frames.length,this.#d=t);let{frames:a}=this.#i,n=a[this.#r];this.color&&(n=_[this.color](n));let r=typeof this.#o=="string"&&this.#o!==""?this.#o+" ":"",i=typeof this.text=="string"?" "+this.text:"",s=typeof this.#c=="string"&&this.#c!==""?" "+this.#c:"";return r+n+i+s}clear(){if(!this.#l||!this.#n.isTTY)return this;this.#n.cursorTo(0);for(let t=0;t<this.#s;t++)t>0&&this.#n.moveCursor(0,-1),this.#n.clearLine(1);return(this.#p||this.lastIndent!==this.#p)&&this.#n.cursorTo(this.#p),this.lastIndent=this.#p,this.#s=0,this}render(){return this.#u?this:(this.clear(),this.#n.write(this.frame()),this.#s=this.#e,this)}start(t){return t&&(this.text=t),this.#u?this:this.#l?this.isSpinning?this:(this.#t.hideCursor&&DT.hide(this.#n),this.#t.discardStdin&&uy.stdin.isTTY&&(this.#a=!0,BT.start()),this.render(),this.#m=setInterval(this.render.bind(this),this.interval),this):(this.text&&this.#n.write(`- ${this.text}
|
|
@@ -711,7 +711,7 @@ ${t}`,qge=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),Gge=Obj
|
|
|
711
711
|
`)}formatExecutionSummary(t){let a=[];if(t.function_name&&a.push(`${this.emoji("\u{1F527} ")}${t.function_name}`),t.model&&a.push(`${this.emoji("\u{1F916} ")}${t.model}`),t.tokens_in!==void 0||t.tokens_out!==void 0){let r=t.tokens_in??0,i=t.tokens_out??0;a.push(`${this.emoji("\u{1F522} ")}${r}\u2197 ${i}\u2198`)}if(t.cost!==void 0&&a.push(`${this.emoji("\u{1F4B0} ")}$${t.cost.toFixed(6)}`),t.execution_time!==void 0&&a.push(`${this.emoji("\u26A1 ")}${t.execution_time.toFixed(1)}s`),a.length===0)return"";let n=a.join(" \u2022 ");return this.color(n,_.dim)}formatError(t){let a=[];return a.push(this.color(`${this.emoji("\u274C ")}${t.message}`,_.red)),t.suggestions&&t.suggestions.length>0&&(a.push(""),a.push(this.color(`${this.emoji("\u{1F4A1} ")}Solutions:`,_.yellow)),t.suggestions.forEach((n,r)=>{a.push(this.color(` ${r+1}. ${n}`,_.gray))})),a.join(`
|
|
712
712
|
`)}formatConfig(t){let a=[];a.push(this.color(`${this.emoji("\u{1F4CB} ")}Current AII Configuration:`,_.cyan)),a.push(`- Config file: ${t.configFile}`),a.push(`- Storage path: ${t.storagePath}`),t.apiUrl&&a.push(`- Aii Server: ${t.apiUrl}`);let n=t.hasApiKey?this.color("\u2713",_.green):this.color("\u2717",_.red);if(a.push(`- LLM provider: ${t.provider} (${t.model}) - ${n}`),t.webSearch){let r=t.webSearch.enabled?this.color("\u2713",_.green):this.color("\u2717",_.red);a.push(`- Web search: ${t.webSearch.provider??"none"} - ${r}`)}return t.issues&&t.issues.length>0&&a.push(`- Configuration issues: ${t.issues.length}`),a.join(`
|
|
713
713
|
`)}formatHealthCheck(t){let a=[];a.push(this.color(`${this.emoji("\u{1F3E5} ")}AII Health Check`,_.cyan)),a.push("");for(let i of t){let s,o;switch(i.status){case"ok":s="\u2713",o=_.green;break;case"warn":s="\u26A0",o=_.yellow;break;case"error":s="\u2717",o=_.red;break}let c=this.color(s,o),l=this.color(i.message,o);a.push(` ${c} ${i.name.padEnd(20)} ${l}`)}let n=t.some(i=>i.status==="error"),r=t.some(i=>i.status==="warn");return a.push(""),n?a.push(this.color(`${this.emoji("\u274C ")}Some checks failed!`,_.red)):r?a.push(this.color(`${this.emoji("\u26A0\uFE0F ")}All checks passed with warnings`,_.yellow)):a.push(this.color(`${this.emoji("\u2705 ")}All checks passed!`,_.green)),a.join(`
|
|
714
|
-
`)}};function Pr(e={}){return new AA(e)}var WAe={openrouter:"openrouter",ollama:"ollama",anthropic:"anthropic",openai:"openai",gemini:"gemini",deepseek:"deepseek",moonshot:"moonshot",zai:"zai"},VAe=[{provider:"openrouter",patterns:[/^openrouter\//]},{provider:"ollama",patterns:[/^ollama\//]},{provider:"anthropic",patterns:[/^anthropic\//,/^claude-/,/^claude$/i]},{provider:"openai",patterns:[/^openai\//,/^gpt-/,/^o1-/,/^o3-/,/^chatgpt-/,/^text-davinci/]},{provider:"gemini",patterns:[/^gemini\//,/^gemini-/,/^gemini$/i]},{provider:"deepseek",patterns:[/^deepseek\//,/^deepseek-/,/^deepseek$/i]},{provider:"moonshot",patterns:[/^moonshot\//,/^kimi-/,/^moonshot-/,/^moonshot$/i]},{provider:"zai",patterns:[/^zai\//,/^glm-/,/^glm$/i,/^chatglm/i]}];function DA(e){if(!e)return;let t=e.toLowerCase();for(let{provider:a,patterns:n}of VAe)for(let r of n)if(r.test(t))return a}function gn(e){if(!e)return e;let t=e.indexOf("/");if(t===-1)return e;let a=e.substring(0,t).toLowerCase();return a!=="ollama"&&a in WAe?e.substring(t+1):e}function zn(e,t,a){if(a)return a;if(e){let n=DA(e);if(n)return n}return t}va();import*as ZY from"readline";import*as Wr from"fs";import*as ev from"path";import*as WY from"os";var Zb=ev.join(WY.homedir(),".aii","conversations"),OA=ev.join(Zb,"current.json");function tv(){Wr.existsSync(Zb)||Wr.mkdirSync(Zb,{recursive:!0})}function QAe(){return`conv_${Date.now()}_${Math.random().toString(36).substring(2,9)}`}function XAe(e){let a=e.trim().replace(/\s+/g," ");return a.length>50&&(a=a.substring(0,50).trim()+"..."),a}function VY(e){return ev.join(Zb,`${e}.json`)}function QY(){tv();try{if(Wr.existsSync(OA)){let e=Wr.readFileSync(OA,"utf-8"),t=JSON.parse(e),a=VY(t.id);if(Wr.existsSync(a)){let n=Wr.readFileSync(a,"utf-8");return JSON.parse(n)}}}catch{}return XY()}function XY(){tv();let e={id:QAe(),title:"New Conversation",messages:[],createdAt:Date.now(),updatedAt:Date.now()};return yh(e),JAe(e.id),e}function yh(e){if(tv(),e.title==="New Conversation"&&e.messages.length>0){let a=e.messages.find(n=>n.role==="user");a&&(e.title=XAe(a.content))}e.updatedAt=Date.now();let t=VY(e.id);Wr.writeFileSync(t,JSON.stringify(e,null,2),"utf-8")}function JAe(e){tv(),Wr.writeFileSync(OA,JSON.stringify({id:e}),"utf-8")}function JY(){return XY()}var ZAe="0.10.
|
|
714
|
+
`)}};function Pr(e={}){return new AA(e)}var WAe={openrouter:"openrouter",ollama:"ollama",anthropic:"anthropic",openai:"openai",gemini:"gemini",deepseek:"deepseek",moonshot:"moonshot",zai:"zai"},VAe=[{provider:"openrouter",patterns:[/^openrouter\//]},{provider:"ollama",patterns:[/^ollama\//]},{provider:"anthropic",patterns:[/^anthropic\//,/^claude-/,/^claude$/i]},{provider:"openai",patterns:[/^openai\//,/^gpt-/,/^o1-/,/^o3-/,/^chatgpt-/,/^text-davinci/]},{provider:"gemini",patterns:[/^gemini\//,/^gemini-/,/^gemini$/i]},{provider:"deepseek",patterns:[/^deepseek\//,/^deepseek-/,/^deepseek$/i]},{provider:"moonshot",patterns:[/^moonshot\//,/^kimi-/,/^moonshot-/,/^moonshot$/i]},{provider:"zai",patterns:[/^zai\//,/^glm-/,/^glm$/i,/^chatglm/i]}];function DA(e){if(!e)return;let t=e.toLowerCase();for(let{provider:a,patterns:n}of VAe)for(let r of n)if(r.test(t))return a}function gn(e){if(!e)return e;let t=e.indexOf("/");if(t===-1)return e;let a=e.substring(0,t).toLowerCase();return a!=="ollama"&&a in WAe?e.substring(t+1):e}function zn(e,t,a){if(a)return a;if(e){let n=DA(e);if(n)return n}return t}va();import*as ZY from"readline";import*as Wr from"fs";import*as ev from"path";import*as WY from"os";var Zb=ev.join(WY.homedir(),".aii","conversations"),OA=ev.join(Zb,"current.json");function tv(){Wr.existsSync(Zb)||Wr.mkdirSync(Zb,{recursive:!0})}function QAe(){return`conv_${Date.now()}_${Math.random().toString(36).substring(2,9)}`}function XAe(e){let a=e.trim().replace(/\s+/g," ");return a.length>50&&(a=a.substring(0,50).trim()+"..."),a}function VY(e){return ev.join(Zb,`${e}.json`)}function QY(){tv();try{if(Wr.existsSync(OA)){let e=Wr.readFileSync(OA,"utf-8"),t=JSON.parse(e),a=VY(t.id);if(Wr.existsSync(a)){let n=Wr.readFileSync(a,"utf-8");return JSON.parse(n)}}}catch{}return XY()}function XY(){tv();let e={id:QAe(),title:"New Conversation",messages:[],createdAt:Date.now(),updatedAt:Date.now()};return yh(e),JAe(e.id),e}function yh(e){if(tv(),e.title==="New Conversation"&&e.messages.length>0){let a=e.messages.find(n=>n.role==="user");a&&(e.title=XAe(a.content))}e.updatedAt=Date.now();let t=VY(e.id);Wr.writeFileSync(t,JSON.stringify(e,null,2),"utf-8")}function JAe(e){tv(),Wr.writeFileSync(OA,JSON.stringify({id:e}),"utf-8")}function JY(){return XY()}var ZAe="0.10.6",IA=class{configManager;parsed;running=!1;conversation;stats;formatter;constructor(t,a){this.parsed=t,this.configManager=a,this.conversation=QY(),this.stats={startTime:Date.now(),totalRequests:0,cumulativeTokens:0,cumulativeCost:0},this.formatter=Pr({colors:!t.flags.noColors,emojis:!t.flags.noEmojis})}async start(){for(this.running=!0,this.displayWelcome();this.running;)try{let t=await this.getUserInput();if(!t.trim()||await this.handleSpecialCommands(t))continue;this.conversation.messages.push({role:"user",content:t,timestamp:Date.now()}),yh(this.conversation),await this.processWithContext(t)}catch(t){if(t instanceof Error&&t.message==="EXIT")break;if(t instanceof Error&&t.message==="INTERRUPTED"){console.log(`
|
|
715
715
|
\u26A0\uFE0F Interrupted. Type /exit to quit or continue chatting.`);continue}console.error(_.red(`
|
|
716
716
|
\u274C Error: ${t instanceof Error?t.message:String(t)}`)),this.conversation.messages.length>0&&this.conversation.messages[this.conversation.messages.length-1].role==="user"&&(this.conversation.messages.pop(),yh(this.conversation))}}displayWelcome(){console.log("\u{1F916} Entering interactive mode."),console.log(""),console.log("Controls:"),console.log(" \u2022 Enter - Send message"),console.log(" \u2022 End with \\ - Multi-line mode"),console.log(" \u2022 /exit - Quit chat"),console.log(" \u2022 /help - Show all commands"),console.log("")}getUserInput(){return new Promise((t,a)=>{let n=ZY.createInterface({input:process.stdin,output:process.stdout}),r=[],i=!1,s=()=>{i=!0,n.close()},o=c=>{n.question(c,l=>{if(r.length===0&&l.trim().startsWith("/")){s(),t(l.trim());return}l.endsWith("\\")?(r.push(l.slice(0,-1)),o(" ")):(r.push(l),s(),t(r.join(`
|
|
717
717
|
`).trim()))})};n.on("SIGINT",()=>{s(),a(new Error("INTERRUPTED"))}),n.on("close",()=>{i||a(new Error("EXIT"))}),o("> ")})}async handleSpecialCommands(t){let a=t.trim().toLowerCase();if(a.startsWith("/"))a=a.slice(1);else return!1;switch(a){case"exit":case"quit":return await this.handleExit(),!0;case"help":return this.displayHelp(),!0;case"clear":case"new":return this.clearConversation(),!0;case"history":return this.displayConversationHistory(),!0;case"stats":return this.displayStats(),!0;case"version":return this.displayVersion(),!0;default:return console.log(_.yellow(`Unknown command: /${a}. Type /help for available commands.`)),console.log(""),!0}}async processWithContext(t){let a=await this.configManager.load(),n=this.configManager.validate();if(!n.valid)throw new sr(n.issues.join(", "));let i=this.configManager.getServerApiKey()||"aii_sk_7WyvfQ0PRzufJ1G66Qn8Sm4gW9Tealpo6vOWDDUeiv4",s=gn(this.parsed.flags.model??a.llm.model),o=zn(this.parsed.flags.model,a.llm.provider,this.parsed.flags.provider),c=this.configManager.getApiKey(o);if(!c)throw new fn(`Missing API key for provider: ${o}`);this.stats.totalRequests++;let l=ys(!this.parsed.flags.noAnimations);l.start("");let u=Ds({spinner:l,enabled:!this.parsed.flags.noStreaming}),p=this.conversation.messages.slice(-21,-1).map(v=>({role:v.role,content:v.content})),d={api_key:i,system_prompt:null,user_prompt:t,user_message:t,output_mode:"CLEAN",streaming:!this.parsed.flags.noStreaming,model:s,llm_provider:o,llm_api_key:c,provider_api_key:c,client_type:"cli",offline:this.parsed.flags.offline,conversation_history:p.length>0?p:void 0},f=this.parsed.flags.host?`http://${this.parsed.flags.host}`:a.api.url,m=new fi({url:f}),h="",g=!1;try{let v=await m.executeRequest(d,{onToken:w=>{h+=w,g=!0,u.onToken(w)}});u.flush();let S=v.result||h;!g&&S&&console.log(S),console.log(""),v.metadata&&this.displayExecutionSummary(v.metadata),S&&(this.conversation.messages.push({role:"assistant",content:S,timestamp:Date.now()}),yh(this.conversation))}catch(v){throw l.stop(!0),v}finally{m.disconnect()}}displayExecutionSummary(t){let a=t.cost||0,n=t.tokens_in||0,r=t.tokens_out||0,i=n+r;this.stats.cumulativeTokens+=i,this.stats.cumulativeCost+=a,console.log(this.formatter.formatExecutionSummary({model:t.model,tokens_in:n,tokens_out:r,cost:a,execution_time:t.execution_time})),console.log("")}clearConversation(){this.conversation=JY(),console.clear(),this.displayWelcome()}displayConversationHistory(){if(this.conversation.messages.length===0){console.log(`
|
|
@@ -836,7 +836,7 @@ ${a.yellow("EXAMPLES:")}
|
|
|
836
836
|
${a.yellow("CONFIG FILE:")}
|
|
837
837
|
~/.aii/config.yaml Main configuration
|
|
838
838
|
~/.aii/secrets.yaml API keys (secure storage)
|
|
839
|
-
`)}import*as Sh from"fs";async function tK(e,t){let a=Pr({colors:!e.flags.noColors,emojis:!e.flags.noEmojis}),n=[];t.configExists()?n.push({name:"Configuration file",status:"ok",message:"Found"}):n.push({name:"Configuration file",status:"warn",message:"Not found (using defaults)"});let r=await t.load(),i=t.getApiKey();if(i){let d=LDe(i);n.push({name:"LLM Model",status:"ok",message:`${r.llm.model}@${r.llm.provider} (${d})`})}else n.push({name:"LLM Model",status:"error",message:`Not configured for ${r.llm.provider}`});let s=await MDe(r.api.url);n.push({name:"AII Server",status:s.ok?"ok":"error",message:s.message});let o=`${t.getConfigDir()}/mcp_servers.json`;if(Sh.existsSync(o))try{let d=Sh.readFileSync(o,"utf-8"),f=JSON.parse(d),m=Object.keys(f.mcpServers??{}).length;m>0?n.push({name:"MCP Servers",status:"ok",message:`${m} configured`}):n.push({name:"MCP Servers",status:"warn",message:"Not configured"})}catch{n.push({name:"MCP Servers",status:"warn",message:"Invalid config"})}else n.push({name:"MCP Servers",status:"warn",message:"Not configured"});let c=t.getConfigDir();Sh.existsSync(c)?n.push({name:"Storage Directory",status:"ok",message:c}):n.push({name:"Storage Directory",status:"warn",message:"Not created"});let l=process.version;parseInt(l.slice(1).split(".")[0],10)>=18?n.push({name:"Node.js Version",status:"ok",message:l}):n.push({name:"Node.js Version",status:"error",message:`${l} (requires >= 18)`}),console.log(a.formatHealthCheck(n)),n.some(d=>d.status==="error")&&process.exit(1)}async function MDe(e){try{let t=new AbortController,a=setTimeout(()=>t.abort(),3e3),n=await fetch(`${e}/api/status`,{signal:t.signal});if(clearTimeout(a),n.ok){let r=new URL(e);return{ok:!0,message:`Running at ${r.hostname}:${r.port||26169}`}}else return{ok:!1,message:`Not responding (${n.status})`}}catch(t){return t instanceof Error&&t.name==="AbortError"?{ok:!1,message:"Connection timeout"}:{ok:!1,message:"Not running"}}}function LDe(e){return e.length<=10?"***":e.slice(0,6)+"..."+e.slice(-4)}va();var aK="0.10.
|
|
839
|
+
`)}import*as Sh from"fs";async function tK(e,t){let a=Pr({colors:!e.flags.noColors,emojis:!e.flags.noEmojis}),n=[];t.configExists()?n.push({name:"Configuration file",status:"ok",message:"Found"}):n.push({name:"Configuration file",status:"warn",message:"Not found (using defaults)"});let r=await t.load(),i=t.getApiKey();if(i){let d=LDe(i);n.push({name:"LLM Model",status:"ok",message:`${r.llm.model}@${r.llm.provider} (${d})`})}else n.push({name:"LLM Model",status:"error",message:`Not configured for ${r.llm.provider}`});let s=await MDe(r.api.url);n.push({name:"AII Server",status:s.ok?"ok":"error",message:s.message});let o=`${t.getConfigDir()}/mcp_servers.json`;if(Sh.existsSync(o))try{let d=Sh.readFileSync(o,"utf-8"),f=JSON.parse(d),m=Object.keys(f.mcpServers??{}).length;m>0?n.push({name:"MCP Servers",status:"ok",message:`${m} configured`}):n.push({name:"MCP Servers",status:"warn",message:"Not configured"})}catch{n.push({name:"MCP Servers",status:"warn",message:"Invalid config"})}else n.push({name:"MCP Servers",status:"warn",message:"Not configured"});let c=t.getConfigDir();Sh.existsSync(c)?n.push({name:"Storage Directory",status:"ok",message:c}):n.push({name:"Storage Directory",status:"warn",message:"Not created"});let l=process.version;parseInt(l.slice(1).split(".")[0],10)>=18?n.push({name:"Node.js Version",status:"ok",message:l}):n.push({name:"Node.js Version",status:"error",message:`${l} (requires >= 18)`}),console.log(a.formatHealthCheck(n)),n.some(d=>d.status==="error")&&process.exit(1)}async function MDe(e){try{let t=new AbortController,a=setTimeout(()=>t.abort(),3e3),n=await fetch(`${e}/api/status`,{signal:t.signal});if(clearTimeout(a),n.ok){let r=new URL(e);return{ok:!0,message:`Running at ${r.hostname}:${r.port||26169}`}}else return{ok:!1,message:`Not responding (${n.status})`}}catch(t){return t instanceof Error&&t.name==="AbortError"?{ok:!1,message:"Connection timeout"}:{ok:!1,message:"Not running"}}}function LDe(e){return e.length<=10?"***":e.slice(0,6)+"..."+e.slice(-4)}va();var aK="0.10.6";function UA(e){let a=!e.flags.noColors?_:{cyan:n=>n,yellow:n=>n,gray:n=>n,green:n=>n};console.log(`
|
|
840
840
|
${a.cyan("AII")} - AI-powered CLI assistant v${aK}
|
|
841
841
|
|
|
842
842
|
${a.yellow("USAGE:")}
|
|
@@ -1941,7 +1941,7 @@ Prompt validation coming soon.
|
|
|
1941
1941
|
\u274C Missing prompt name`),console.error(` Usage: aii prompt use <name> [--vars]
|
|
1942
1942
|
`),process.exit(1)),await F$e(e,a,n,l);break;case"validate":a||(console.error(`
|
|
1943
1943
|
\u274C Missing file path`),console.error(` Usage: aii prompt validate <file>
|
|
1944
|
-
`),process.exit(1)),await B$e(e,a);break;case"help":case"--help":case"-h":default:M$e(!e.flags.noColors);break}}import{execSync as hl,spawn as j$e}from"child_process";import{existsSync as U$e,mkdirSync as z$e}from"fs";import{homedir as q$e}from"os";import{join as G$e}from"path";var $$e="aiiware/aii-server:latest",H$e="aii-server",ni=26169,gl="v0.4.
|
|
1944
|
+
`),process.exit(1)),await B$e(e,a);break;case"help":case"--help":case"-h":default:M$e(!e.flags.noColors);break}}import{execSync as hl,spawn as j$e}from"child_process";import{existsSync as U$e,mkdirSync as z$e}from"fs";import{homedir as q$e}from"os";import{join as G$e}from"path";var $$e="aiiware/aii-server:latest",H$e="aii-server",ni=26169,gl="v0.4.11",Nu="https://aiiware.short.gy/server.sh",$S=class e{port;host;containerName;image;configDir;constructor(t=ni){this.port=t,this.host="127.0.0.1",this.containerName=H$e,this.image=$$e,this.configDir=G$e(q$e(),".aii")}isDockerAvailable(){try{return hl("docker info",{stdio:"pipe",timeout:5e3}),!0}catch{return!1}}isContainerExists(){try{return hl(`docker container inspect ${this.containerName}`,{stdio:"pipe",timeout:5e3}),!0}catch{return!1}}isContainerRunning(){try{return hl(`docker container inspect -f "{{.State.Running}}" ${this.containerName}`,{stdio:"pipe",timeout:5e3,encoding:"utf-8"}).trim()==="true"}catch{return!1}}async isServerHealthy(){try{let t=new AbortController,a=setTimeout(()=>t.abort(),2e3),n=await fetch(`http://${this.host}:${this.port}/health`,{signal:t.signal});return clearTimeout(a),n.ok}catch{return!1}}async getServerVersion(){try{let t=new AbortController,a=setTimeout(()=>t.abort(),2e3),n=await fetch(`http://${this.host}:${this.port}/v0/status`,{signal:t.signal});return clearTimeout(a),n.ok&&(await n.json()).version||null}catch{return null}}static isVersionBelow(t,a){try{let n=t?.replace(/^v/,"")||"0.0.0",r=a?.replace(/^v/,"")||"0.0.0",i=n.split(".").map(Number),s=r.split(".").map(Number),o=Math.max(i.length,s.length);for(;i.length<o;)i.push(0);for(;s.length<o;)s.push(0);for(let c=0;c<o;c++){if(i[c]<s[c])return!0;if(i[c]>s[c])return!1}return!1}catch{return!1}}async checkServerAtPort(t){try{let a=new AbortController,n=setTimeout(()=>a.abort(),2e3),r=await fetch(`http://${this.host}:${t}/health`,{signal:a.signal});if(clearTimeout(n),!r.ok)return{isCompatible:!1,version:null};let i=new AbortController,s=setTimeout(()=>i.abort(),2e3),o=await fetch(`http://${this.host}:${t}/v0/status`,{signal:i.signal});if(clearTimeout(s),o.ok){let l=(await o.json()).version||null;return l?{isCompatible:!e.isVersionBelow(l,gl),version:l}:{isCompatible:!0,version:null}}return{isCompatible:!0,version:null}}catch{return{isCompatible:!1,version:null}}}getContainerHostPort(){try{let t=hl(`docker inspect --format='{{(index (index .NetworkSettings.Ports "26169/tcp") 0).HostPort}}' ${this.containerName}`,{stdio:"pipe",timeout:5e3,encoding:"utf-8"}),a=parseInt(t.trim(),10);return isNaN(a)?null:a}catch{return null}}async scanForServer(t=ni,a=10){for(let n=0;n<a;n++){let r=t+n,{isCompatible:i}=await this.checkServerAtPort(r);if(i)return r}return null}startContainer(){try{return hl(`docker start ${this.containerName}`,{stdio:"pipe",timeout:3e4}),!0}catch{return!1}}stopContainer(){try{return hl(`docker stop ${this.containerName}`,{stdio:"pipe",timeout:3e4}),!0}catch{return!1}}getContainerLogs(t=50){try{return hl(`docker logs --tail ${t} ${this.containerName}`,{stdio:"pipe",timeout:1e4,encoding:"utf-8"})}catch{return""}}async waitForHealthy(t=3e4){let a=Date.now(),n=!1,r=()=>{n=!0,process.exit(130)};process.on("SIGINT",r);try{for(;Date.now()-a<t&&!n;){if(await this.isServerHealthy())return!0;await new Promise(i=>setTimeout(i,500))}return!1}finally{process.removeListener("SIGINT",r)}}async runInstallScript(t=!0){return new Promise(a=>{t&&console.log(` Running: curl -fsSL ${Nu} | bash
|
|
1945
1945
|
`);let n=j$e("bash",["-c",`curl -fsSL ${Nu} | bash`],{stdio:t?["pipe","inherit","inherit"]:"pipe",detached:!1}),r=()=>{try{n.kill("SIGINT")}catch{}console.log(`
|
|
1946
1946
|
|
|
1947
1947
|
Cancelled.`),process.exit(130)},i=process.listeners("SIGINT");process.removeAllListeners("SIGINT"),process.on("SIGINT",r),n.on("close",s=>{process.removeListener("SIGINT",r),i.forEach(o=>process.on("SIGINT",o)),a(s===0)}),n.on("error",()=>{process.removeListener("SIGINT",r),i.forEach(s=>process.on("SIGINT",s)),a(!1)})})}async upgradeServer(t=!0){t&&console.log(`
|