@agenticwork/openagentic 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +9 -9
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
var eo=Object.create;var Lt=Object.defineProperty;var to=Object.getOwnPropertyDescriptor;var ro=Object.getOwnPropertyNames;var oo=Object.getPrototypeOf,no=Object.prototype.hasOwnProperty;var Nt=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var io=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of ro(t))!no.call(e,i)&&i!==r&&Lt(e,i,{get:()=>t[i],enumerable:!(n=to(t,i))||n.enumerable});return e};var ao=(e,t,r)=>(r=e!=null?eo(oo(e)):{},io(t||!e||!e.__esModule?Lt(r,"default",{value:e,enumerable:!0}):r,e));var $t=Nt((Di,To)=>{To.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 Jt=Nt((Bi,qt)=>{"use strict";var Ge=Object.assign({},$t()),Yt=Object.keys(Ge);Object.defineProperty(Ge,"random",{get(){let e=Math.floor(Math.random()*Yt.length),t=Yt[e];return Ge[t]}});qt.exports=Ge});import{useState as qr}from"react";import{realpathSync as $n}from"fs";import{fileURLToPath as Yn}from"url";import{render as qn,Box as Jr,Text as Dt}from"ink";import{Text as le,Box as _e}from"ink";import{Text as ge}from"ink";import{jsx as he}from"react/jsx-runtime";function so(e,t,r){let n=[Number.parseInt(e.slice(1,3),16),Number.parseInt(e.slice(3,5),16),Number.parseInt(e.slice(5,7),16)],i=[Number.parseInt(t.slice(1,3),16),Number.parseInt(t.slice(3,5),16),Number.parseInt(t.slice(5,7),16)];return"#"+n.map((s,u)=>Math.round(s+(i[u]-s)*Math.max(0,Math.min(1,r)))).map(s=>s.toString(16).padStart(2,"0")).join("")}function ct(e,t){if(e.length===1)return e[0];let r=Math.max(0,Math.min(1,t))*(e.length-1),n=Math.min(e.length-2,Math.floor(r));return so(e[n],e[n+1],r-n)}var wt=({text:e,stops:t,bold:r,dim:n})=>{let i=[...e],o=Math.max(1,i.length-1);return he(ge,{children:i.map((s,u)=>he(ge,{color:ct(t,u/o),bold:r,dimColor:n,children:s},u))})},Ft=({width:e,stops:t,char:r="\u2500"})=>{let n=Math.max(1,e-1);return he(ge,{children:Array.from({length:e},(i,o)=>he(ge,{color:ct(t,o/n),children:r},o))})},Wt=({value:e,total:t,width:r,stops:n,track:i="#2C3A31"})=>{let o=Math.max(0,Math.min(r,Math.round(e/Math.max(1,t)*r))),s=Math.max(1,r-1);return he(ge,{children:Array.from({length:r},(u,a)=>a<o?he(ge,{color:ct(n,a/s),children:"\u2501"},a):he(ge,{color:i,children:"\u2500"},a))})};import{jsx as Y,jsxs as ce}from"react/jsx-runtime";var l={accent:"#88CCA0",accentDeep:"#5FA877",ink:"#E3EBE0",muted:"#8C9C8C",faint:"#5E6E5E",ok:"#88CCA0",warn:"#D9AE52",err:"#E0663A",signal:"#DB8240",teal:"#9FD8C4"},ut=["#6FB3A8","#9FD8C4","#88CCA0","#D9AE52","#DB8240"],Vt=()=>Math.max(44,Math.min((process.stdout.columns||80)-6,88)),dt=()=>{let e=Vt();return ce(_e,{flexDirection:"column",paddingY:1,children:[ce(_e,{width:e,justifyContent:"space-between",children:[ce(_e,{children:[ce(le,{color:l.signal,bold:!0,children:["\u2325"," "]}),Y(wt,{text:"openagentic",stops:ut,bold:!0})]}),Y(le,{color:l.faint,children:"self-hosted \xB7 docker / k8s \xB7 v1.0"})]}),Y(Ft,{width:e,stops:ut}),Y(le,{color:l.muted,children:"the open agentic platform for IT operations"})]})},lo=({step:e,total:t,title:r})=>ce(_e,{flexDirection:"column",marginBottom:1,children:[ce(_e,{children:[Y(le,{color:l.accent,bold:!0,children:String(e).padStart(2,"0")}),ce(le,{color:l.faint,children:[" / ",String(t).padStart(2,"0")]}),Y(le,{color:l.faint,children:" "}),Y(le,{color:l.ink,bold:!0,children:r})]}),Y(_e,{marginTop:0,children:Y(Wt,{value:e,total:t,width:Math.min(36,Vt()),stops:ut})})]}),v=({children:e})=>Y(le,{color:l.muted,children:e}),y=({step:e,total:t,title:r,children:n})=>ce(_e,{flexDirection:"column",paddingX:2,children:[Y(dt,{}),Y(lo,{step:e,total:t,title:r}),n]});import co from"react";import{Box as mt,Text as be}from"ink";import{jsx as ue,jsxs as zt}from"react/jsx-runtime";var Ue=class extends co.Component{constructor(t){super(t),this.state={error:null}}static getDerivedStateFromError(t){return{error:t}}componentDidCatch(){}render(){let{error:t}=this.state;return t?zt(mt,{flexDirection:"column",paddingX:1,paddingY:1,children:[ue(be,{color:l.err,bold:!0,children:"\u2717 The setup wizard hit an unexpected error"}),ue(mt,{marginTop:1,children:ue(be,{color:l.ink,children:t.message||String(t)})}),zt(mt,{flexDirection:"column",marginTop:1,children:[ue(be,{color:l.muted,children:"Retry the wizard, or fall back to a non-interactive install:"}),ue(be,{color:l.faint,children:" Quick (Ollama): ./install.sh --quick"}),ue(be,{color:l.faint,children:" From a .env: ./install.sh --env ./my.env"}),ue(be,{color:l.faint,children:" Help: https://openagentics.io/docs/troubleshooting"}),ue(be,{color:l.faint,children:" Issues: https://github.com/agentic-work/openagentic/issues"})]})]}):this.props.children}};import{Text as Ao}from"ink";import pt from"react";import{Box as uo,Text as Ht}from"ink";import mo from"figures";function po({isSelected:e=!1}){return pt.createElement(uo,{marginRight:1},e?pt.createElement(Ht,{color:"blue"},mo.pointer):pt.createElement(Ht,null," "))}var ft=po;import*as Ut from"react";import{Text as fo}from"ink";function go({isSelected:e=!1,label:t}){return Ut.createElement(fo,{color:e?"blue":void 0},t)}var gt=go;import{isDeepStrictEqual as ho}from"node:util";import Ke,{useState as Kt,useEffect as _o,useRef as bo,useCallback as vo}from"react";function ve(e,t){if(!Array.isArray(e))throw new TypeError(`Expected an array, got \`${typeof e}\`.`);if(!Number.isSafeInteger(t))throw new TypeError(`The \`steps\` parameter must be an integer, got ${t}.`);let{length:r}=e;if(r===0)return[...e];let n=(t%r+r)%r;return n===0?[...e]:[...e.slice(-n),...e.slice(0,-n)]}import{Box as Gt,useInput as xo}from"ink";function yo({items:e=[],isFocused:t=!0,initialIndex:r=0,indicatorComponent:n=ft,itemComponent:i=gt,limit:o,onSelect:s,onHighlight:u}){let a=typeof o=="number"&&e.length>o,d=a?Math.min(o,e.length):e.length,c=d-1,[m,b]=Kt(r>c?c-r:0),[f,g]=Kt(r?r>c?c:r:0),P=bo(e);_o(()=>{ho(P.current.map(_=>_.value),e.map(_=>_.value))||(b(0),g(0)),P.current=e},[e]),xo(vo((_,k)=>{if(_==="k"||k.upArrow){let h=(a?d:e.length)-1,I=f===0,F=a?f:h,K=I?m+1:m,N=I?F:f-1;b(K),g(N);let Z=a?ve(e,K).slice(0,d):e;typeof u=="function"&&u(Z[N])}if(_==="j"||k.downArrow){let h=f===(a?d:e.length)-1,I=a?f:0,F=h?m-1:m,K=h?I:f+1;b(F),g(K);let N=a?ve(e,F).slice(0,d):e;typeof u=="function"&&u(N[K])}if(/^[1-9]$/.test(_)){let h=Number.parseInt(_,10)-1,I=a?ve(e,m).slice(0,d):e;if(h>=0&&h<I.length){let F=I[h];F&&s?.(F)}}if(k.return){let h=a?ve(e,m).slice(0,d):e;typeof s=="function"&&s(h[f])}},[a,d,m,f,e,s,u]),{isActive:t});let p=a?ve(e,m).slice(0,d):e;return Ke.createElement(Gt,{flexDirection:"column"},p.map((_,k)=>{let h=k===f;return Ke.createElement(Gt,{key:_.key??_.value},Ke.createElement(n,{isSelected:h}),Ke.createElement(i,{..._,isSelected:h}))}))}var B=yo;import{jsx as ht,jsxs as Eo}from"react/jsx-runtime";var jt=({onPick:e})=>Eo(y,{step:1,total:9,title:"Where do you want to run openagentic?",children:[ht(B,{items:[{label:"Docker (local / single machine)",value:"docker"},{label:"Helm (production / kubernetes)",value:"helm"}],onSelect:r=>e(r.value),indicatorComponent:So}),ht(v,{children:"Both paths land at http://localhost:8080 with the same UI."})]}),So=({isSelected:e})=>ht(Ao,{color:l.accent,children:e?"\u276F ":" "});import{useEffect as rn,useState as on}from"react";import{Box as z,Text as H,useInput as nn}from"ink";var Xt=ao(Jt(),1);import Io,{useState as ko,useEffect as Co}from"react";import{Text as Oo}from"ink";function Ro({type:e="dots"}){let[t,r]=ko(0),n=Xt.default[e];return Co(()=>{let i=setInterval(()=>{r(o=>o===n.frames.length-1?0:o+1)},n.interval);return()=>{clearInterval(i)}},[n]),Io.createElement(Oo,null,n.frames[t])}var Zt=Ro;import jo,{useState as $o,useEffect as Yo}from"react";import{Text as qo,useInput as Jo}from"ink";var Qt=(e=0)=>t=>`\x1B[${t+e}m`,er=(e=0)=>t=>`\x1B[${38+e};5;${t}m`,tr=(e=0)=>(t,r,n)=>`\x1B[${38+e};2;${t};${r};${n}m`,C={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}},Fi=Object.keys(C.modifier),Po=Object.keys(C.color),Mo=Object.keys(C.bgColor),Wi=[...Po,...Mo];function Do(){let e=new Map;for(let[t,r]of Object.entries(C)){for(let[n,i]of Object.entries(r))C[n]={open:`\x1B[${i[0]}m`,close:`\x1B[${i[1]}m`},r[n]=C[n],e.set(i[0],i[1]);Object.defineProperty(C,t,{value:r,enumerable:!1})}return Object.defineProperty(C,"codes",{value:e,enumerable:!1}),C.color.close="\x1B[39m",C.bgColor.close="\x1B[49m",C.color.ansi=Qt(),C.color.ansi256=er(),C.color.ansi16m=tr(),C.bgColor.ansi=Qt(10),C.bgColor.ansi256=er(10),C.bgColor.ansi16m=tr(10),Object.defineProperties(C,{rgbToAnsi256:{value(t,r,n){return t===r&&r===n?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(r/255*5)+Math.round(n/255*5)},enumerable:!1},hexToRgb:{value(t){let r=/[a-f\d]{6}|[a-f\d]{3}/i.exec(t.toString(16));if(!r)return[0,0,0];let[n]=r;n.length===3&&(n=[...n].map(o=>o+o).join(""));let i=Number.parseInt(n,16);return[i>>16&255,i>>8&255,i&255]},enumerable:!1},hexToAnsi256:{value:t=>C.rgbToAnsi256(...C.hexToRgb(t)),enumerable:!1},ansi256ToAnsi:{value(t){if(t<8)return 30+t;if(t<16)return 90+(t-8);let r,n,i;if(t>=232)r=((t-232)*10+8)/255,n=r,i=r;else{t-=16;let u=t%36;r=Math.floor(t/36)/5,n=Math.floor(u/6)/5,i=u%6/5}let o=Math.max(r,n,i)*2;if(o===0)return 30;let s=30+(Math.round(i)<<2|Math.round(n)<<1|Math.round(r));return o===2&&(s+=60),s},enumerable:!1},rgbToAnsi:{value:(t,r,n)=>C.ansi256ToAnsi(C.rgbToAnsi256(t,r,n)),enumerable:!1},hexToAnsi:{value:t=>C.ansi256ToAnsi(C.hexToAnsi256(t)),enumerable:!1}}),C}var Bo=Do(),Q=Bo;import _t from"node:process";import Lo from"node:os";import rr from"node:tty";function q(e,t=globalThis.Deno?globalThis.Deno.args:_t.argv){let r=e.startsWith("-")?"":e.length===1?"-":"--",n=t.indexOf(r+e),i=t.indexOf("--");return n!==-1&&(i===-1||n<i)}var{env:O}=_t,je;q("no-color")||q("no-colors")||q("color=false")||q("color=never")?je=0:(q("color")||q("colors")||q("color=true")||q("color=always"))&&(je=1);function No(){if("FORCE_COLOR"in O)return O.FORCE_COLOR==="true"?1:O.FORCE_COLOR==="false"?0:O.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(O.FORCE_COLOR,10),3)}function wo(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function Fo(e,{streamIsTTY:t,sniffFlags:r=!0}={}){let n=No();n!==void 0&&(je=n);let i=r?je:n;if(i===0)return 0;if(r){if(q("color=16m")||q("color=full")||q("color=truecolor"))return 3;if(q("color=256"))return 2}if("TF_BUILD"in O&&"AGENT_NAME"in O)return 1;if(e&&!t&&i===void 0)return 0;let o=i||0;if(O.TERM==="dumb")return o;if(_t.platform==="win32"){let s=Lo.release().split(".");return Number(s[0])>=10&&Number(s[2])>=10586?Number(s[2])>=14931?3:2:1}if("CI"in O)return["GITHUB_ACTIONS","GITEA_ACTIONS","CIRCLECI"].some(s=>s in O)?3:["TRAVIS","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some(s=>s in O)||O.CI_NAME==="codeship"?1:o;if("TEAMCITY_VERSION"in O)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(O.TEAMCITY_VERSION)?1:0;if(O.COLORTERM==="truecolor"||O.TERM==="xterm-kitty"||O.TERM==="xterm-ghostty"||O.TERM==="wezterm")return 3;if("TERM_PROGRAM"in O){let s=Number.parseInt((O.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(O.TERM_PROGRAM){case"iTerm.app":return s>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(O.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(O.TERM)||"COLORTERM"in O?1:o}function or(e,t={}){let r=Fo(e,{streamIsTTY:e&&e.isTTY,...t});return wo(r)}var Wo={stdout:or({isTTY:rr.isatty(1)}),stderr:or({isTTY:rr.isatty(2)})},nr=Wo;function ir(e,t,r){let n=e.indexOf(t);if(n===-1)return e;let i=t.length,o=0,s="";do s+=e.slice(o,n)+t+r,o=n+i,n=e.indexOf(t,o);while(n!==-1);return s+=e.slice(o),s}function ar(e,t,r,n){let i=0,o="";do{let s=e[n-1]==="\r";o+=e.slice(i,s?n-1:n)+t+(s?`\r
|
|
2
|
+
var vo=Object.create;var Zt=Object.defineProperty;var xo=Object.getOwnPropertyDescriptor;var yo=Object.getOwnPropertyNames;var So=Object.getPrototypeOf,Ao=Object.prototype.hasOwnProperty;var Qt=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var To=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of yo(t))!Ao.call(e,i)&&i!==r&&Zt(e,i,{get:()=>t[i],enumerable:!(n=xo(t,i))||n.enumerable});return e};var Eo=(e,t,r)=>(r=e!=null?vo(So(e)):{},To(t||!e||!e.__esModule?Zt(r,"default",{value:e,enumerable:!0}):r,e));var mr=Qt((Ia,Qo)=>{Qo.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 gr=Qt((Oa,fr)=>{"use strict";var ot=Object.assign({},mr()),pr=Object.keys(ot);Object.defineProperty(ot,"random",{get(){let e=Math.floor(Math.random()*pr.length),t=pr[e];return ot[t]}});fr.exports=ot});import{useState as qt}from"react";import{realpathSync as yi}from"fs";import{fileURLToPath as Si}from"url";import Ai from"open";import{render as Ti,Box as go,Text as Jt,useInput as Ei}from"ink";import{Text as de,Box as ye}from"ink";import{Text as ve}from"ink";import{jsx as xe}from"react/jsx-runtime";function ko(e,t,r){let n=[Number.parseInt(e.slice(1,3),16),Number.parseInt(e.slice(3,5),16),Number.parseInt(e.slice(5,7),16)],i=[Number.parseInt(t.slice(1,3),16),Number.parseInt(t.slice(3,5),16),Number.parseInt(t.slice(5,7),16)];return"#"+n.map((l,u)=>Math.round(l+(i[u]-l)*Math.max(0,Math.min(1,r)))).map(l=>l.toString(16).padStart(2,"0")).join("")}function yt(e,t){if(e.length===1)return e[0];let r=Math.max(0,Math.min(1,t))*(e.length-1),n=Math.min(e.length-2,Math.floor(r));return ko(e[n],e[n+1],r-n)}var St=({text:e,stops:t,bold:r,dim:n})=>{let i=[...e],o=Math.max(1,i.length-1);return xe(ve,{children:i.map((l,u)=>xe(ve,{color:yt(t,u/o),bold:r,dimColor:n,children:l},u))})},Ze=({width:e,stops:t,char:r="\u2500"})=>{let n=Math.max(1,e-1);return xe(ve,{children:Array.from({length:e},(i,o)=>xe(ve,{color:yt(t,o/n),children:r},o))})},er=({value:e,total:t,width:r,stops:n,track:i="#2C3A31"})=>{let o=Math.max(0,Math.min(r,Math.round(e/Math.max(1,t)*r))),l=Math.max(1,r-1);return xe(ve,{children:Array.from({length:r},(u,a)=>a<o?xe(ve,{color:yt(n,a/l),children:"\u2501"},a):xe(ve,{color:i,children:"\u2500"},a))})};import{Text as He,Box as Tt}from"ink";import{Text as Co}from"ink";import{jsx as Oo}from"react/jsx-runtime";var At="\x1B",tr=`${At}\\`;function Io(e,t){return`${At}]8;;${e}${tr}${t}${At}]8;;${tr}`}var Qe=({url:e,text:t})=>Oo(Co,{color:s.signal,underline:!0,children:Io(e,t)});var W="https://www.openagentics.io/docs",rr={url:W,label:"docs"},Ro={"Where do you want to run openagentic?":{url:`${W}/deploy`,label:"deploy targets"},"Checking your cluster":{url:`${W}/deploy/kubernetes`,label:"kubernetes deploy"},"Create your admin account":{url:`${W}/admin`,label:"admin account"},"Which LLM provider should the platform use?":{url:`${W}/providers`,label:"LLM providers"},"Where is your Ollama?":{url:`${W}/providers/ollama`,label:"Ollama provider"},"Which MCPs do you want enabled?":{url:`${W}/mcps`,label:"MCP servers"},"Review & launch":{url:`${W}/install`,label:"install & launch"}},Po=[{test:/bedrock|aws/i,doc:{url:`${W}/providers/bedrock`,label:"AWS Bedrock"}},{test:/vertex|gcp|gemini/i,doc:{url:`${W}/providers/vertex`,label:"Google Vertex AI"}},{test:/azure ai foundry|entra|azure/i,doc:{url:`${W}/providers/azure-foundry`,label:"Azure AI Foundry"}},{test:/credential/i,doc:{url:`${W}/mcps`,label:"MCP credentials"}},{test:/ollama/i,doc:{url:`${W}/providers/ollama`,label:"Ollama provider"}},{test:/cluster|kube/i,doc:{url:`${W}/deploy/kubernetes`,label:"kubernetes deploy"}},{test:/bringing up|launch/i,doc:{url:`${W}/install`,label:"install & launch"}},{test:/\bmcp/i,doc:{url:`${W}/mcps`,label:"MCP servers"}},{test:/provider|llm/i,doc:{url:`${W}/providers`,label:"LLM providers"}},{test:/admin/i,doc:{url:`${W}/admin`,label:"admin account"}}];function De(e){if(!e)return rr;let t=Ro[e];if(t)return t;for(let{test:r,doc:n}of Po)if(r.test(e))return n;return rr}import{jsx as te,jsxs as Ge}from"react/jsx-runtime";var Do=["#2C3A31","#3A4A3E","#2C3A31"],Bo=()=>Math.max(44,Math.min((process.stdout.columns||80)-6,88)),Be=({k:e,gloss:t,last:r})=>Ge(He,{children:[te(He,{color:s.muted,children:e}),Ge(He,{color:s.faint,children:[" ",t]}),r?null:te(He,{color:s.faint,children:" \xB7 "})]}),or=({title:e})=>{let t=De(e);return Ge(Tt,{flexDirection:"column",marginTop:1,children:[te(Ze,{width:Bo(),stops:Do}),Ge(Tt,{children:[te(Be,{k:"\u2191\u2193",gloss:"move"}),te(Be,{k:"\u21B5",gloss:"select"}),te(Be,{k:"?",gloss:"help"}),te(Be,{k:"d",gloss:"docs"}),te(Be,{k:"esc",gloss:"back"}),te(Be,{k:"^C",gloss:"quit",last:!0})]}),Ge(Tt,{marginTop:0,children:[te(He,{color:s.faint,children:"\u{1F4D6} "}),te(Qe,{url:t.url,text:`${t.label} \u2192`})]})]})};import{jsx as $,jsxs as me}from"react/jsx-runtime";var s={accent:"#88CCA0",accentDeep:"#5FA877",ink:"#F3F1EC",muted:"#7E927E",faint:"#56654F",ok:"#88CCA0",warn:"#D9AE52",err:"#E0663A",signal:"#DB8240",teal:"#9FD8C4",espresso:"#1F0D04",burntOrange:"#B83A0E"},Et=["#6FB3A8","#9FD8C4","#88CCA0","#D9AE52","#DB8240"],Mo=["#F3F1EC","#88CCA0","#5FA877"],nr=()=>Math.max(44,Math.min((process.stdout.columns||80)-6,88)),kt=()=>{let e=nr();return me(ye,{flexDirection:"column",paddingY:1,children:[me(ye,{width:e,justifyContent:"space-between",children:[me(ye,{children:[$(St,{text:"\u2325",stops:Mo,bold:!0}),me(de,{color:s.signal,bold:!0,children:[" ","\xB7"," "]}),$(St,{text:"openagentic",stops:Et,bold:!0})]}),$(de,{color:s.faint,children:"self-hosted \xB7 docker / k8s \xB7 v1.0"})]}),$(Ze,{width:e,stops:Et}),$(de,{color:s.muted,children:"the open agentic platform for IT operations"})]})},Lo=({step:e,total:t,title:r})=>me(ye,{flexDirection:"column",marginBottom:1,children:[me(ye,{children:[$(de,{color:s.accent,bold:!0,children:String(e).padStart(2,"0")}),me(de,{color:s.faint,children:[" / ",String(t).padStart(2,"0")]}),$(de,{color:s.faint,children:" "}),$(de,{color:s.ink,bold:!0,children:r})]}),$(ye,{marginTop:0,children:$(er,{value:e,total:t,width:Math.min(36,nr()),stops:Et})})]}),b=({children:e})=>$(de,{color:s.muted,children:e}),S=({step:e,total:t,title:r,children:n})=>me(ye,{flexDirection:"column",paddingX:2,children:[$(kt,{}),$(Lo,{step:e,total:t,title:r}),n,$(or,{title:r})]});import{Text as Se,Box as pe}from"ink";import{jsx as X,jsxs as et}from"react/jsx-runtime";var wo=[{key:"\u2191 \u2193",gloss:"move the highlight between choices"},{key:"\u21B5",gloss:"select the highlighted choice / submit a field"},{key:"space",gloss:"toggle an item in a multi-select list"},{key:"?",gloss:"open or close this help overlay"},{key:"d",gloss:"open this step\u2019s docs in your browser"},{key:"esc",gloss:"go back / close this overlay"},{key:"^C",gloss:"quit the setup wizard"}];function No(e){let t=e.toLowerCase();return t.includes("where do you want to run")?"Pick how to run openagentic \u2014 local Docker or a Kubernetes cluster.":t.includes("cluster")||t.includes("kube")?"Check your kubeconfig + cluster access before a Helm install.":t.includes("admin account")?"Create the first admin user that you\u2019ll sign in with.":t.includes("which llm provider")?"Choose which LLM backend the platform talks to.":t.includes("ollama")?"Point the platform at your Ollama host for local models.":t.includes("bedrock")||t.includes("aws")?"Use Amazon Bedrock models via your AWS account.":t.includes("vertex")||t.includes("gemini")?"Use Google Gemini models via your GCP project (Vertex AI).":t.includes("foundry")||t.includes("entra")||t.includes("azure")?"Use Azure AI Foundry models via your Azure endpoint.":t.includes("which mcps")?"Select which MCP tool servers to enable for your agents.":t.includes("credential")?"Provide the credentials this MCP needs to connect.":t.includes("review")?"Review your choices, write .env, and launch the stack.":t.includes("bringing up")?"Bringing the openagentic stack online.":"Step through the openagentic setup wizard."}var ir=({title:e})=>{let t=De(e);return X(pe,{flexDirection:"column",paddingX:2,paddingY:1,children:et(pe,{flexDirection:"column",borderStyle:"round",borderColor:s.signal,paddingX:2,paddingY:1,children:[X(Se,{color:s.signal,bold:!0,children:"\u2325 keys & help"}),X(pe,{marginTop:1,flexDirection:"column",children:wo.map(r=>et(pe,{children:[X(pe,{width:8,children:X(Se,{color:s.accent,bold:!0,children:r.key})}),X(Se,{color:s.ink,children:r.gloss})]},r.key))}),et(pe,{marginTop:1,flexDirection:"column",children:[X(Se,{color:s.muted,children:"this step"}),X(Se,{color:s.ink,children:No(e)})]}),et(pe,{marginTop:1,children:[X(Se,{color:s.faint,children:"\u{1F4D6} "}),X(Qe,{url:t.url,text:`${t.label} \u2192`})]}),X(pe,{marginTop:1,children:X(Se,{color:s.faint,children:"press ? or esc to close"})})]})})};import Fo from"react";import{Box as Ct,Text as Ae}from"ink";import{jsx as fe,jsxs as ar}from"react/jsx-runtime";var tt=class extends Fo.Component{constructor(t){super(t),this.state={error:null}}static getDerivedStateFromError(t){return{error:t}}componentDidCatch(){}render(){let{error:t}=this.state;return t?ar(Ct,{flexDirection:"column",paddingX:1,paddingY:1,children:[fe(Ae,{color:s.err,bold:!0,children:"\u2717 The setup wizard hit an unexpected error"}),fe(Ct,{marginTop:1,children:fe(Ae,{color:s.ink,children:t.message||String(t)})}),ar(Ct,{flexDirection:"column",marginTop:1,children:[fe(Ae,{color:s.muted,children:"Retry the wizard, or fall back to a non-interactive install:"}),fe(Ae,{color:s.faint,children:" Quick (Ollama): ./install.sh --quick"}),fe(Ae,{color:s.faint,children:" From a .env: ./install.sh --env ./my.env"}),fe(Ae,{color:s.faint,children:" Help: https://openagentics.io/docs/troubleshooting"}),fe(Ae,{color:s.faint,children:" Issues: https://github.com/agentic-work/openagentic/issues"})]})]}):this.props.children}};import{Text as Jo}from"ink";import It from"react";import{Box as Wo,Text as sr}from"ink";import zo from"figures";function Vo({isSelected:e=!1}){return It.createElement(Wo,{marginRight:1},e?It.createElement(sr,{color:"blue"},zo.pointer):It.createElement(sr,null," "))}var Ot=Vo;import*as lr from"react";import{Text as Ho}from"ink";function Go({isSelected:e=!1,label:t}){return lr.createElement(Ho,{color:e?"blue":void 0},t)}var Rt=Go;import{isDeepStrictEqual as Uo}from"node:util";import rt,{useState as cr,useEffect as Ko,useRef as $o,useCallback as jo}from"react";function Te(e,t){if(!Array.isArray(e))throw new TypeError(`Expected an array, got \`${typeof e}\`.`);if(!Number.isSafeInteger(t))throw new TypeError(`The \`steps\` parameter must be an integer, got ${t}.`);let{length:r}=e;if(r===0)return[...e];let n=(t%r+r)%r;return n===0?[...e]:[...e.slice(-n),...e.slice(0,-n)]}import{Box as ur,useInput as Yo}from"ink";function qo({items:e=[],isFocused:t=!0,initialIndex:r=0,indicatorComponent:n=Ot,itemComponent:i=Rt,limit:o,onSelect:l,onHighlight:u}){let a=typeof o=="number"&&e.length>o,d=a?Math.min(o,e.length):e.length,c=d-1,[m,_]=cr(r>c?c-r:0),[p,g]=cr(r?r>c?c:r:0),D=$o(e);Ko(()=>{Uo(D.current.map(h=>h.value),e.map(h=>h.value))||(_(0),g(0)),D.current=e},[e]),Yo(jo((h,R)=>{if(h==="k"||R.upArrow){let v=(a?d:e.length)-1,C=p===0,f=a?p:v,w=C?m+1:m,B=C?f:p-1;_(w),g(B);let M=a?Te(e,w).slice(0,d):e;typeof u=="function"&&u(M[B])}if(h==="j"||R.downArrow){let v=p===(a?d:e.length)-1,C=a?p:0,f=v?m-1:m,w=v?C:p+1;_(f),g(w);let B=a?Te(e,f).slice(0,d):e;typeof u=="function"&&u(B[w])}if(/^[1-9]$/.test(h)){let v=Number.parseInt(h,10)-1,C=a?Te(e,m).slice(0,d):e;if(v>=0&&v<C.length){let f=C[v];f&&l?.(f)}}if(R.return){let v=a?Te(e,m).slice(0,d):e;typeof l=="function"&&l(v[p])}},[a,d,m,p,e,l,u]),{isActive:t});let y=a?Te(e,m).slice(0,d):e;return rt.createElement(ur,{flexDirection:"column"},y.map((h,R)=>{let v=R===p;return rt.createElement(ur,{key:h.key??h.value},rt.createElement(n,{isSelected:v}),rt.createElement(i,{...h,isSelected:v}))}))}var z=qo;import{jsx as Pt,jsxs as Zo}from"react/jsx-runtime";var dr=({onPick:e})=>Zo(S,{step:1,total:9,title:"Where do you want to run openagentic?",children:[Pt(z,{items:[{label:"Docker (local / single machine)",value:"docker"},{label:"Helm (production / kubernetes)",value:"helm"}],onSelect:r=>e(r.value),indicatorComponent:Xo}),Pt(b,{children:"Both paths land at http://localhost:8080 with the same UI."})]}),Xo=({isSelected:e})=>Pt(Jo,{color:s.accent,children:e?"\u276F ":" "});import{useEffect as Pn,useState as Dn}from"react";import{Box as U,Text as K,useInput as Bn}from"ink";var hr=Eo(gr(),1);import en,{useState as tn,useEffect as rn}from"react";import{Text as on}from"ink";function nn({type:e="dots"}){let[t,r]=tn(0),n=hr.default[e];return rn(()=>{let i=setInterval(()=>{r(o=>o===n.frames.length-1?0:o+1)},n.interval);return()=>{clearInterval(i)}},[n]),en.createElement(on,null,n.frames[t])}var _r=nn;import yn,{useState as Sn,useEffect as An}from"react";import{Text as Tn,useInput as En}from"ink";var br=(e=0)=>t=>`\x1B[${t+e}m`,vr=(e=0)=>t=>`\x1B[${38+e};5;${t}m`,xr=(e=0)=>(t,r,n)=>`\x1B[${38+e};2;${t};${r};${n}m`,I={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}},Ba=Object.keys(I.modifier),an=Object.keys(I.color),sn=Object.keys(I.bgColor),Ma=[...an,...sn];function ln(){let e=new Map;for(let[t,r]of Object.entries(I)){for(let[n,i]of Object.entries(r))I[n]={open:`\x1B[${i[0]}m`,close:`\x1B[${i[1]}m`},r[n]=I[n],e.set(i[0],i[1]);Object.defineProperty(I,t,{value:r,enumerable:!1})}return Object.defineProperty(I,"codes",{value:e,enumerable:!1}),I.color.close="\x1B[39m",I.bgColor.close="\x1B[49m",I.color.ansi=br(),I.color.ansi256=vr(),I.color.ansi16m=xr(),I.bgColor.ansi=br(10),I.bgColor.ansi256=vr(10),I.bgColor.ansi16m=xr(10),Object.defineProperties(I,{rgbToAnsi256:{value(t,r,n){return t===r&&r===n?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(r/255*5)+Math.round(n/255*5)},enumerable:!1},hexToRgb:{value(t){let r=/[a-f\d]{6}|[a-f\d]{3}/i.exec(t.toString(16));if(!r)return[0,0,0];let[n]=r;n.length===3&&(n=[...n].map(o=>o+o).join(""));let i=Number.parseInt(n,16);return[i>>16&255,i>>8&255,i&255]},enumerable:!1},hexToAnsi256:{value:t=>I.rgbToAnsi256(...I.hexToRgb(t)),enumerable:!1},ansi256ToAnsi:{value(t){if(t<8)return 30+t;if(t<16)return 90+(t-8);let r,n,i;if(t>=232)r=((t-232)*10+8)/255,n=r,i=r;else{t-=16;let u=t%36;r=Math.floor(t/36)/5,n=Math.floor(u/6)/5,i=u%6/5}let o=Math.max(r,n,i)*2;if(o===0)return 30;let l=30+(Math.round(i)<<2|Math.round(n)<<1|Math.round(r));return o===2&&(l+=60),l},enumerable:!1},rgbToAnsi:{value:(t,r,n)=>I.ansi256ToAnsi(I.rgbToAnsi256(t,r,n)),enumerable:!1},hexToAnsi:{value:t=>I.ansi256ToAnsi(I.hexToAnsi256(t)),enumerable:!1}}),I}var cn=ln(),re=cn;import Dt from"node:process";import un from"node:os";import yr from"node:tty";function Z(e,t=globalThis.Deno?globalThis.Deno.args:Dt.argv){let r=e.startsWith("-")?"":e.length===1?"-":"--",n=t.indexOf(r+e),i=t.indexOf("--");return n!==-1&&(i===-1||n<i)}var{env:O}=Dt,nt;Z("no-color")||Z("no-colors")||Z("color=false")||Z("color=never")?nt=0:(Z("color")||Z("colors")||Z("color=true")||Z("color=always"))&&(nt=1);function dn(){if("FORCE_COLOR"in O)return O.FORCE_COLOR==="true"?1:O.FORCE_COLOR==="false"?0:O.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(O.FORCE_COLOR,10),3)}function mn(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function pn(e,{streamIsTTY:t,sniffFlags:r=!0}={}){let n=dn();n!==void 0&&(nt=n);let i=r?nt:n;if(i===0)return 0;if(r){if(Z("color=16m")||Z("color=full")||Z("color=truecolor"))return 3;if(Z("color=256"))return 2}if("TF_BUILD"in O&&"AGENT_NAME"in O)return 1;if(e&&!t&&i===void 0)return 0;let o=i||0;if(O.TERM==="dumb")return o;if(Dt.platform==="win32"){let l=un.release().split(".");return Number(l[0])>=10&&Number(l[2])>=10586?Number(l[2])>=14931?3:2:1}if("CI"in O)return["GITHUB_ACTIONS","GITEA_ACTIONS","CIRCLECI"].some(l=>l in O)?3:["TRAVIS","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some(l=>l in O)||O.CI_NAME==="codeship"?1:o;if("TEAMCITY_VERSION"in O)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(O.TEAMCITY_VERSION)?1:0;if(O.COLORTERM==="truecolor"||O.TERM==="xterm-kitty"||O.TERM==="xterm-ghostty"||O.TERM==="wezterm")return 3;if("TERM_PROGRAM"in O){let l=Number.parseInt((O.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(O.TERM_PROGRAM){case"iTerm.app":return l>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(O.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(O.TERM)||"COLORTERM"in O?1:o}function Sr(e,t={}){let r=pn(e,{streamIsTTY:e&&e.isTTY,...t});return mn(r)}var fn={stdout:Sr({isTTY:yr.isatty(1)}),stderr:Sr({isTTY:yr.isatty(2)})},Ar=fn;function Tr(e,t,r){let n=e.indexOf(t);if(n===-1)return e;let i=t.length,o=0,l="";do l+=e.slice(o,n)+t+r,o=n+i,n=e.indexOf(t,o);while(n!==-1);return l+=e.slice(o),l}function Er(e,t,r,n){let i=0,o="";do{let l=e[n-1]==="\r";o+=e.slice(i,l?n-1:n)+t+(l?`\r
|
|
3
3
|
`:`
|
|
4
4
|
`)+r,i=n+1,n=e.indexOf(`
|
|
5
|
-
`,i)}while(n!==-1);return o+=e.slice(i),o}var{stdout:
|
|
6
|
-
`);return o!==-1&&(t=
|
|
7
|
-
`).filter(Boolean).length);let a=await xe("kubectl",["get","namespace","openagentic","-o","name"],t);r.namespaceExists=a.ok&&a.stdout.trim().length>0;let d=await xe("helm",["list","-n","openagentic","-o","json"],t);if(d.ok)try{let c=JSON.parse(d.stdout);if(Array.isArray(c)&&c.length>0){let m=c.find(b=>b.name==="openagentic")??c[0];m&&(r.existingRelease={name:m.name,revision:Number(m.revision)||0,status:m.status||"unknown"})}}catch{}return r}import{jsx as T,jsxs as J}from"react/jsx-runtime";var hr=({onContinue:e,onBackToDocker:t})=>{let r=pr(),[n,i]=on(r?{stage:"probing",kubeconfigPath:r}:{stage:"picking-kubeconfig",input:"",error:null});if(rn(()=>{if(n.stage!=="probing")return;let d=!1;return gr(n.kubeconfigPath).then(c=>{d||i({stage:"ready",probe:c})}),()=>{d=!0}},[n.stage==="probing"?n.kubeconfigPath:null]),nn((d,c)=>{n.stage==="picking-kubeconfig"&&c.escape&&t()}),n.stage==="picking-kubeconfig")return J(y,{step:2,total:10,title:"Checking your cluster",children:[J(z,{flexDirection:"column",marginBottom:1,children:[J(H,{children:["No kubeconfig found at ",T(H,{color:l.accent,children:"$KUBECONFIG"})," or ",T(H,{color:l.accent,children:"~/.kube/config"}),"."]}),J(H,{children:["Paste a path to your kubeconfig, or press ",T(H,{color:l.accent,children:"Esc"})," to go back to Docker."]})]}),J(z,{children:[T(H,{children:"kubeconfig: "}),T(D,{value:n.input,onChange:d=>i({...n,input:d,error:null}),onSubmit:d=>{let c=fr(d);if(!c.ok){i({...n,error:c.reason});return}i({stage:"probing",kubeconfigPath:c.path})}})]}),n.error&&T(z,{marginTop:1,children:T(H,{color:l.err,children:n.error})})]});if(n.stage==="probing")return T(y,{step:2,total:10,title:"Checking your cluster",children:J(z,{children:[T(H,{color:l.accent,children:T(Zt,{type:"dots"})}),J(H,{children:[" probing cluster via ",n.kubeconfigPath,"\u2026"]})]})});let{probe:o}=n,s=[{label:"kubeconfig",value:o.kubeconfigPath},{label:"kubectl",value:o.kubectlVersion??"not found on PATH",colour:o.kubectlVersion?void 0:l.err},{label:"helm",value:o.helmVersion??"not found on PATH",colour:o.helmVersion?void 0:l.err},{label:"context",value:o.context??"no current context set",colour:o.context?void 0:l.err},{label:"cluster",value:o.reachable?`${o.serverVersion??"unknown"} (${o.nodeCount??"?"} nodes)`:"unreachable",colour:o.reachable?void 0:l.err},{label:"namespace",value:o.namespaceExists?"openagentic \u2014 exists":"openagentic \u2014 does not exist",colour:o.namespaceExists?l.warn:void 0},{label:"existing release",value:o.existingRelease?`${o.existingRelease.name} rev ${o.existingRelease.revision} (${o.existingRelease.status})`:"none",colour:o.existingRelease?l.warn:void 0}],u=o.kubectlVersion?o.helmVersion?o.context?o.reachable?null:"cluster is unreachable. Check VPN / kubeconfig / network.":"no current kubectl context is set. Run: kubectl config use-context <name>":"helm is not installed or not on PATH.":"kubectl is not installed or not on PATH.";if(u)return J(y,{step:2,total:10,title:"Checking your cluster",children:[T(z,{flexDirection:"column",children:s.map(d=>J(z,{children:[T(z,{width:18,children:T(H,{color:l.muted,children:d.label})}),T(H,{color:d.colour,children:d.value})]},d.label))}),T(z,{marginTop:1,children:T(H,{color:l.err,children:u})}),T(z,{marginTop:1,children:T(B,{items:[{label:"Back to Docker deploy",value:"docker"},{label:"Quit",value:"quit"}],onSelect:d=>{d.value==="docker"?t():process.exit(0)}})})]});let a=o.existingRelease?`Existing release 'openagentic' (rev ${o.existingRelease.revision}). Continuing will run helm upgrade.`:o.namespaceExists?"Namespace 'openagentic' exists but no Helm release. Continuing will adopt it.":null;return J(y,{step:2,total:10,title:"Checking your cluster",children:[T(z,{flexDirection:"column",children:s.map(d=>J(z,{children:[T(z,{width:18,children:T(H,{color:l.muted,children:d.label})}),T(H,{color:d.colour,children:d.value})]},d.label))}),a&&T(z,{marginTop:1,children:J(H,{color:l.warn,children:["\u26A0 ",a]})}),T(z,{marginTop:1,children:T(B,{items:[{label:o.existingRelease?"Upgrade existing release":"Continue",value:"continue"},{label:"Back to Docker deploy",value:"docker"}],onSelect:d=>{d.value==="continue"?e(o.kubeconfigPath):t()}})}),T(z,{marginTop:1,children:T(v,{children:"Helm backend implementation is still in progress \u2014 the preflight above will run, but the final install step may not complete. See the project docs."})})]})};import{useState as yt}from"react";import{Box as Ye,Text as Ce}from"ink";import{jsx as re,jsxs as we}from"react/jsx-runtime";var _r=({initial:e,step:t,total:r,onDone:n})=>{let[i,o]=yt(e.email),[s,u]=yt(e.password),[a,d]=yt("email");return re(y,{step:t,total:r,title:"Create your admin account",children:we(Ye,{flexDirection:"column",children:[we(Ye,{children:[we(Ce,{color:a==="email"?l.accent:l.muted,children:[a==="email"?"\u276F ":" ","email :"]}),re(Ce,{children:" "}),a==="email"?re(D,{value:i,onChange:o,onSubmit:()=>d("password")}):re(Ce,{children:i})]}),we(Ye,{children:[we(Ce,{color:a==="password"?l.accent:l.muted,children:[a==="password"?"\u276F ":" ","password :"]}),re(Ce,{children:" "}),a==="password"?re(D,{value:s,onChange:u,mask:"\u2022",onSubmit:()=>{s.length>=8&&i.includes("@")&&n({...e,email:i,password:s})}}):re(Ce,{children:"\u2022".repeat(Math.min(s.length,12))})]}),re(Ye,{marginTop:1,children:re(v,{children:"Minimum 8 characters. You can change this later from the admin panel."})})]})})};import{Box as At,Text as St}from"ink";import{jsx as oe,jsxs as vr}from"react/jsx-runtime";var br=[{label:"\u2014 select a provider (use \u2193 to choose) \u2014",value:"none",hint:"Nothing is pre-selected. Pick the provider you want \u2014 the platform never assumes one."},{label:"Ollama \u2014 local models on this machine",value:"ollama",hint:"Zero API costs, fully offline. Requires your own Ollama install (https://ollama.com). Only started when you pick it."},{label:"AWS Bedrock \u2014 models via your AWS account",value:"bedrock",hint:"Use your current AWS login (mounted ~/.aws) or paste IAM keys. You pick the Bedrock chat model."},{label:"Google Vertex AI \u2014 Gemini models via your GCP project",value:"vertex",hint:"Use your current gcloud login (ADC) or a service-account JSON key. You pick the Gemini chat model."},{label:"Azure AI Foundry \u2014 models via your Azure endpoint",value:"aif",hint:"Authenticate with an API key, a Microsoft Entra app, or your current az login. You pick the deployment / model."},{label:"Skip for now \u2014 configure in the admin panel",value:"skip",hint:"Stack will boot, but chat/embedding calls will fail until you wire a provider. Nothing auto-starts."}],xr=({step:e,total:t,onPick:r})=>oe(y,{step:e,total:t,title:"Which LLM provider should the platform use?",children:vr(At,{flexDirection:"column",children:[oe(v,{children:"Pick the provider that powers chat completions and embeddings. Nothing is pre-selected."}),oe(v,{children:"The platform never starts or assumes a provider \u2014 only the one you choose here is configured."}),oe(v,{children:"Cloud-management creds (Azure / AWS / GCP) are a separate step further down."}),oe(At,{marginTop:1,children:oe(B,{items:br.map(n=>({label:n.label,value:n.value})),onSelect:n=>{let i=n.value;i!=="none"&&r(i)},indicatorComponent:({isSelected:n})=>oe(St,{color:l.accent,children:n?"\u276F ":" "})})}),oe(At,{marginTop:1,flexDirection:"column",children:br.filter(n=>n.value!=="none").map(n=>vr(St,{color:l.muted,children:[" ",oe(St,{bold:!0,children:n.label.split(" \u2014 ")[0]})," \u2014 ",n.hint]},n.value))})]})});import{useState as an}from"react";import{Box as qe,Text as yr}from"ink";import{jsx as me,jsxs as Ar}from"react/jsx-runtime";var Sr=({initial:e,step:t,total:r,onDone:n})=>{let[i,o]=an(e.host);return me(y,{step:t,total:r,title:"Where is your Ollama?",children:Ar(qe,{flexDirection:"column",children:[Ar(qe,{children:[me(yr,{color:l.accent,children:"\u276F "}),me(yr,{children:"host: "}),me(D,{value:i,onChange:o,onSubmit:()=>n({...e,host:i})})]}),me(qe,{marginTop:1,children:me(v,{children:"http://ollama:11434 = the bundled container (started by the `ollama` compose profile). Use http://host.docker.internal:11434 to reach an Ollama you already run on your host instead."})}),me(qe,{children:me(v,{children:"You chose Ollama, so the platform will start it and pre-pull the embed model on first boot. No other provider is touched."})})]})})};import{useState as ye}from"react";import{Box as ne,Text as pe}from"ink";import sn from"node:fs";import ln from"node:os";import cn from"node:path";import{jsx as M,jsxs as fe}from"react/jsx-runtime";var un=ln.homedir(),Er=e=>{try{return sn.existsSync(cn.join(un,e))}catch{return!1}},dn=()=>Er(".aws/credentials")||Er(".aws/config"),Et="us-east-1",Tt="amazon.nova-pro-v1:0",Tr=({initial:e,step:t,total:r,onDone:n})=>{let i=dn(),o=e.bedrock,s=o?.authMode?o.authMode:i?"awslogin":"keys",[u,a]=ye("mode"),[d,c]=ye(s),[m,b]=ye(o?.region||""),[f,g]=ye(o?.accessKeyId||""),[P,p]=ye(o?.secretAccessKey||""),[_,k]=ye(o?.model||""),[h,I]=ye(0),F=S=>{let x=m.trim()||Et,E=_.trim()||Tt,G={authMode:S,region:x,model:E};S==="keys"&&(G.accessKeyId=f.trim(),G.secretAccessKey=P),n({bedrock:G})};if(u==="mode"){let S=[];return i&&S.push({label:"Use my current AWS login (~/.aws \u2014 mounted read-only)",value:"awslogin"}),S.push({label:"Enter IAM access key + secret",value:"keys"}),M(y,{step:t,total:r,title:"AWS Bedrock \u2014 models via your AWS account",children:fe(ne,{flexDirection:"column",children:[M(v,{children:"Pick how the platform authenticates to your AWS account for Bedrock."}),i?M(v,{children:"Detected AWS credentials in ~/.aws \u2014 your current login is the easy path."}):M(v,{children:"No ~/.aws found on this machine \u2014 paste an IAM access key + secret."}),M(ne,{marginTop:1,children:M(B,{items:S.map(x=>({label:x.label,value:x.value})),initialIndex:Math.max(0,S.findIndex(x=>x.value===d)),onSelect:x=>{let E=x.value;c(E),I(0),a(E==="awslogin"?"awslogin":"keys")},indicatorComponent:({isSelected:x})=>M(pe,{color:l.accent,children:x?"\u276F ":" "})})})]})})}if(u==="awslogin"){let S=[{key:"region",label:"AWS region ",value:m,set:b,placeholder:Et},{key:"model",label:"Bedrock chat model ",value:_,set:k,placeholder:Tt}],x=()=>{h+1<S.length?I(h+1):F("awslogin")};return M(y,{step:t,total:r,title:"AWS Bedrock \u2014 current AWS login",children:fe(ne,{flexDirection:"column",children:[S.map((E,G)=>fe(ne,{children:[fe(pe,{color:G===h?l.accent:l.muted,children:[G===h?"\u276F ":" ",E.label,":"]}),M(pe,{children:" "}),G===h?M(D,{value:E.value,placeholder:E.placeholder,onChange:E.set,onSubmit:x}):M(pe,{color:E.value?void 0:l.muted,children:E.value||E.placeholder})]},E.key)),M(ne,{marginTop:1,children:M(v,{children:"Your host ~/.aws is mounted read-only into the api; the default credential chain resolves it."})})]})})}let K=[{key:"region",label:"AWS region ",value:m,set:b,mask:!1,placeholder:Et},{key:"accessKeyId",label:"AWS access key id ",value:f,set:g,mask:!1,placeholder:"AKIA\u2026"},{key:"secretAccessKey",label:"AWS secret access key ",value:P,set:p,mask:!0,placeholder:""},{key:"model",label:"Bedrock chat model ",value:_,set:k,mask:!1,placeholder:Tt}],N=K[h],Z=(N.key==="accessKeyId"||N.key==="secretAccessKey")&&!N.value.trim(),w=()=>{Z||(h+1<K.length?I(h+1):F("keys"))};return M(y,{step:t,total:r,title:"AWS Bedrock \u2014 IAM access key",children:fe(ne,{flexDirection:"column",children:[K.map((S,x)=>fe(ne,{children:[fe(pe,{color:x===h?l.accent:l.muted,children:[x===h?"\u276F ":" ",S.label,":"]}),M(pe,{children:" "}),x===h?M(D,{value:S.value,placeholder:S.mask?void 0:S.placeholder,onChange:S.set,onSubmit:w,mask:S.mask?"\u2022":void 0}):M(pe,{color:S.value?void 0:l.muted,children:S.value?S.mask?"\u2022".repeat(Math.min(S.value.length,20)):S.value:S.mask?"":S.placeholder})]},S.key)),M(ne,{marginTop:1,children:M(v,{children:"Inline IAM keys are written to .env as AWS_ACCESS_KEY_ID / AWS_SECRET_ACCESS_KEY."})}),Z&&M(ne,{children:fe(pe,{color:l.accent,children:["\u25CF required \u2014 paste your IAM ",N.key==="secretAccessKey"?"secret":"access key"," to continue"]})})]})})};import{useState as Ae}from"react";import{Box as Oe,Text as Fe}from"ink";import Cr from"node:fs";import mn from"node:os";import It from"node:path";import{jsx as U,jsxs as We}from"react/jsx-runtime";var Or=mn.homedir(),pn=e=>{try{return Cr.existsSync(It.join(Or,e))}catch{return!1}},fn=()=>pn(".config/gcloud"),gn=()=>{let e=It.join(Or,".config","gcloud","keys");try{let t=Cr.readdirSync(e).find(r=>r.endsWith(".json"));if(t)return It.join(e,t)}catch{}return""},Ir="us-central1",kr="gemini-1.5-pro",Rr=({initial:e,step:t,total:r,onDone:n})=>{let i=fn(),o=e.vertex,s=gn(),u=o?.authMode?o.authMode:i?"adc":"sajson",[a,d]=Ae("mode"),[c,m]=Ae(u),[b,f]=Ae(o?.projectId||""),[g,P]=Ae(o?.location||""),[p,_]=Ae(o?.model||""),[k,h]=Ae(o?.saKeyPath||""),[I,F]=Ae(0),K=x=>{let E={authMode:x,projectId:b.trim(),location:g.trim()||Ir,model:p.trim()||kr};x==="sajson"&&(E.saKeyPath=k.trim()||s),n({vertex:E})};if(a==="mode"){let x=[];return i&&x.push({label:"Use my current gcloud login (ADC \u2014 ~/.config/gcloud, mounted read-only)",value:"adc"}),x.push({label:"Provide a service-account JSON key",value:"sajson"}),U(y,{step:t,total:r,title:"Google Vertex AI \u2014 Gemini via your GCP project",children:We(Oe,{flexDirection:"column",children:[U(v,{children:"Pick how the platform authenticates to your GCP project for Vertex AI."}),i?U(v,{children:"Detected ~/.config/gcloud \u2014 your current gcloud login (ADC) is the easy path."}):U(v,{children:"No ~/.config/gcloud found \u2014 provide a service-account JSON key path."}),U(Oe,{marginTop:1,children:U(B,{items:x.map(E=>({label:E.label,value:E.value})),initialIndex:Math.max(0,x.findIndex(E=>E.value===c)),onSelect:E=>{let G=E.value;m(G),F(0),d(G==="adc"?"adc":"sajson")},indicatorComponent:({isSelected:E})=>U(Fe,{color:l.accent,children:E?"\u276F ":" "})})})]})})}let N=[{key:"projectId",label:"GCP project id ",value:b,set:f,placeholder:"my-gcp-project",required:!0},{key:"location",label:"Location ",value:g,set:P,placeholder:Ir},{key:"model",label:"Gemini chat model ",value:p,set:_,placeholder:kr}];a==="sajson"&&N.push({key:"saKeyPath",label:"Service-account key ",value:k,set:h,placeholder:s||"~/.config/gcloud/keys/sa.json",required:!0});let Z=N[I],w=!!Z.required&&!Z.value.trim()&&!(Z.key==="saKeyPath"&&s),S=()=>{w||(I+1<N.length?F(I+1):K(a==="adc"?"adc":"sajson"))};return U(y,{step:t,total:r,title:a==="adc"?"Google Vertex AI \u2014 current gcloud login":"Google Vertex AI \u2014 service account",children:We(Oe,{flexDirection:"column",children:[N.map((x,E)=>We(Oe,{children:[We(Fe,{color:E===I?l.accent:l.muted,children:[E===I?"\u276F ":" ",x.label,":"]}),U(Fe,{children:" "}),E===I?U(D,{value:x.value,placeholder:x.placeholder,onChange:x.set,onSubmit:S}):U(Fe,{color:x.value?void 0:l.muted,children:x.value||x.placeholder||""})]},x.key)),U(Oe,{marginTop:1,children:U(v,{children:a==="adc"?"Your host ~/.config/gcloud is mounted read-only; Vertex calls resolve via ADC.":"The SA key is mounted read-only into the api; GOOGLE_APPLICATION_CREDENTIALS points at it."})}),w&&U(Oe,{children:We(Fe,{color:l.accent,children:["\u25CF required \u2014 enter the ",Z.key==="projectId"?"GCP project id":"service-account key path"," to continue"]})})]})})};import{useState as ee}from"react";import{Box as L,Text as j}from"ink";import hn from"node:fs";import _n from"node:os";import bn from"node:path";import{jsx as A,jsxs as $}from"react/jsx-runtime";var vn=_n.homedir(),xn=e=>{try{return hn.existsSync(bn.join(vn,e))}catch{return!1}},yn=()=>xn(".azure"),kt="2024-10-21",Pr=({initial:e,step:t,total:r,onDone:n})=>{let i=yn(),o=e.azureFoundry,s=o?.authMode?o.authMode:i?"azlogin":"apikey",[u,a]=ee("endpoint"),[d,c]=ee(s),[m,b]=ee(o?.endpointUrl||""),[f,g]=ee(o?.apiKey||""),[P,p]=ee(o?.tenantId||""),[_,k]=ee(o?.clientId||""),[h,I]=ee(o?.clientSecret||""),[F,K]=ee(o?.apiVersion||""),[N,Z]=ee(o?.deploymentName||""),[w,S]=ee(0),x=()=>{let R={authMode:d,endpointUrl:m.trim(),apiVersion:F.trim()||kt,deploymentName:N.trim()};d==="apikey"?R.apiKey=f:d==="entra"&&(R.tenantId=P.trim(),R.clientId=_.trim(),R.clientSecret=h),n({azureFoundry:R})};if(u==="endpoint")return A(y,{step:t,total:r,title:"Azure AI Foundry \u2014 models via your Azure endpoint",children:$(L,{flexDirection:"column",children:[$(L,{children:[A(j,{color:l.accent,children:"\u276F Endpoint URL: "}),A(D,{value:m,placeholder:"https://my-foundry.cognitiveservices.azure.com",onChange:b,onSubmit:()=>{m.trim()&&(c(s),a("mode"))}})]}),A(L,{marginTop:1,children:A(v,{children:"Your Azure AI Foundry endpoint URL (required)."})}),!m.trim()&&A(L,{children:A(j,{color:l.accent,children:"\u25CF required \u2014 enter the endpoint URL to continue"})})]})});if(u==="mode"){let R=[{label:"API key",value:"apikey"},{label:"Microsoft Entra app (tenant + client + secret)",value:"entra"}];return i&&R.push({label:"Use my current az login (~/.azure \u2014 mounted read-only)",value:"azlogin"}),A(y,{step:t,total:r,title:"Azure AI Foundry \u2014 authentication",children:$(L,{flexDirection:"column",children:[A(v,{children:"Pick how the platform authenticates to your Azure AI Foundry endpoint."}),i&&A(v,{children:"Detected ~/.azure \u2014 your current az login is available."}),A(L,{marginTop:1,children:A(B,{items:R.map(W=>({label:W.label,value:W.value})),initialIndex:Math.max(0,R.findIndex(W=>W.value===d)),onSelect:W=>{let Te=W.value;c(Te),S(0),a(Te==="apikey"?"apikey":Te==="entra"?"entra":"common")},indicatorComponent:({isSelected:W})=>A(j,{color:l.accent,children:W?"\u276F ":" "})})})]})})}if(u==="apikey")return A(y,{step:t,total:r,title:"Azure AI Foundry \u2014 API key",children:$(L,{flexDirection:"column",children:[$(L,{children:[A(j,{color:l.accent,children:"\u276F API key: "}),A(D,{value:f,mask:"\u2022",onChange:g,onSubmit:()=>{f.trim()&&(S(0),a("common"))}})]}),A(L,{marginTop:1,children:A(v,{children:"Written to .env as AIF_API_KEY."})}),!f.trim()&&A(L,{children:A(j,{color:l.accent,children:"\u25CF required \u2014 paste your API key to continue"})})]})});if(u==="entra"){let R=[{key:"tenantId",label:"Tenant id ",value:P,set:p,mask:!1},{key:"clientId",label:"Client id ",value:_,set:k,mask:!1},{key:"clientSecret",label:"Client secret ",value:h,set:I,mask:!0}],W=R[w],Te=!W.value.trim(),Qr=()=>{Te||(w+1<R.length?S(w+1):(S(0),a("common")))};return A(y,{step:t,total:r,title:"Azure AI Foundry \u2014 Microsoft Entra app",children:$(L,{flexDirection:"column",children:[R.map((te,lt)=>$(L,{children:[$(j,{color:lt===w?l.accent:l.muted,children:[lt===w?"\u276F ":" ",te.label,":"]}),A(j,{children:" "}),lt===w?A(D,{value:te.value,onChange:te.set,onSubmit:Qr,mask:te.mask?"\u2022":void 0}):A(j,{children:te.value?te.mask?"\u2022".repeat(Math.min(te.value.length,20)):te.value:""})]},te.key)),A(L,{marginTop:1,children:A(v,{children:"Written to .env as AIF_TENANT_ID / AIF_CLIENT_ID / AIF_CLIENT_SECRET."})}),Te&&A(L,{children:$(j,{color:l.accent,children:["\u25CF required \u2014 enter the ",W.key==="clientSecret"?"client secret":W.key==="clientId"?"client id":"tenant id"," to continue"]})})]})})}let E=[{key:"apiVersion",label:"API version ",value:F,set:K,placeholder:kt,required:!1},{key:"deploymentName",label:"Deployment / model ",value:N,set:Z,placeholder:"gpt-4o",required:!0}],G=E[w],Bt=!!G.required&&!G.value.trim(),Zr=()=>{Bt||(w+1<E.length?S(w+1):x())};return A(y,{step:t,total:r,title:"Azure AI Foundry \u2014 deployment",children:$(L,{flexDirection:"column",children:[E.map((R,W)=>$(L,{children:[$(j,{color:W===w?l.accent:l.muted,children:[W===w?"\u276F ":" ",R.label,":"]}),A(j,{children:" "}),W===w?A(D,{value:R.value,placeholder:R.placeholder,onChange:R.set,onSubmit:Zr}):A(j,{color:R.value?void 0:l.muted,children:R.value||R.placeholder||""})]},R.key)),A(L,{marginTop:1,children:$(v,{children:["API version defaults to ",kt,". The deployment / model name is the chat model."]})}),Bt&&A(L,{children:A(j,{color:l.accent,children:"\u25CF required \u2014 enter the deployment / model name to continue"})})]})})};import{useState as Dr}from"react";import{Box as Xe,Text as Ze,useInput as In}from"ink";import An from"node:fs";import Sn from"node:os";import En from"node:path";var Tn=Sn.homedir(),Se=e=>{try{return An.existsSync(En.join(Tn,e))}catch{return!1}},ie=[{id:"web",label:"Web",blurb:"Search + page fetch (DuckDuckGo, no auth).",disabledEnv:"OpenAgentic_WEB_MCP_DISABLED",needsAuth:!1,authType:"none",defaultOn:!0},{id:"admin",label:"Admin",blurb:"Platform admin helpers \u2014 Postgres/Redis/Milvus/health.",disabledEnv:"OpenAgentic_ADMIN_MCP_DISABLED",needsAuth:!1,authType:"none",defaultOn:!0},{id:"aws",label:"AWS",blurb:"EC2 / S3 / IAM / Cost Explorer \u2014 AWS read-only.",disabledEnv:"OpenAgentic_AWS_MCP_DISABLED",needsAuth:!0,authType:"env-file",envFile:"aws.env",envVars:[{env:"AWS_ACCESS_KEY_ID",label:"AWS access key id"},{env:"AWS_SECRET_ACCESS_KEY",label:"AWS secret access key",mask:!0},{env:"AWS_REGION",label:"AWS default region",hint:"e.g. us-east-1"}],hostCreds:{description:"Use my host AWS CLI creds (~/.aws \u2014 mounted read-only)",detect:()=>Se(".aws/credentials")||Se(".aws/config")},defaultOn:!0},{id:"azure",label:"Azure",blurb:"ARM / Graph / Key Vault / Monitor / Cost \u2014 Azure read-only.",disabledEnv:"OpenAgentic_AZURE_MCP_DISABLED",needsAuth:!0,authType:"env-file",envFile:"azure.env",envVars:[{env:"AZURE_TENANT_ID",label:"Azure tenant id"},{env:"AZURE_CLIENT_ID",label:"Azure client id (App Registration)"},{env:"AZURE_CLIENT_SECRET",label:"Azure client secret",mask:!0},{env:"AZURE_SUBSCRIPTION_ID",label:"Default subscription id"}],hostCreds:{description:"Use my host Azure CLI creds (~/.azure \u2014 mounted read-only)",detect:()=>Se(".azure/azureProfile.json")||Se(".azure/TokenCache")},defaultOn:!0},{id:"gcp",label:"GCP",blurb:"Projects / Compute / Storage / Logging / Monitoring.",disabledEnv:"OpenAgentic_GCP_MCP_DISABLED",needsAuth:!0,authType:"env-file",envFile:"gcp.env",envVars:[{env:"GCP_PROJECT_ID",label:"GCP project id"},{env:"GCP_REGION",label:"Default region",hint:"e.g. us-central1"},{env:"GCP_CREDENTIALS_FILE",label:"Service-account JSON path",hint:"inside the mcp-proxy container"}],hostCreds:{description:"Use my host gcloud creds (~/.config/gcloud \u2014 mounted read-only)",detect:()=>Se(".config/gcloud/application_default_credentials.json")||Se(".config/gcloud/credentials.db")},defaultOn:!0},{id:"kubernetes",label:"Kubernetes",blurb:"Pods / deployments / logs (your local kubeconfig).",disabledEnv:"OpenAgentic_KUBERNETES_MCP_DISABLED",needsAuth:!0,authType:"fields",envVars:[{env:"KUBECONFIG",label:"Path to kubeconfig",hint:"~/.kube/config on most machines"}],hostCreds:{description:"Use my host kubeconfig (~/.kube/config \u2014 mounted read-only)",detect:()=>Se(".kube/config")},defaultOn:!0},{id:"github",label:"GitHub",blurb:"Repos / issues / PRs via a PAT.",disabledEnv:"OpenAgentic_GITHUB_MCP_DISABLED",needsAuth:!0,authType:"fields",envVars:[{env:"GITHUB_TOKEN",label:"GitHub personal access token",mask:!0}],defaultOn:!1},{id:"prometheus",label:"Prometheus",blurb:"Metric queries against a Prometheus server.",disabledEnv:"OpenAgentic_PROMETHEUS_MCP_DISABLED",needsAuth:!0,authType:"fields",envVars:[{env:"PROMETHEUS_URL",label:"Prometheus URL",hint:"https://prom.example.com"},{env:"PROMETHEUS_USERNAME",label:"Basic auth user (optional)"},{env:"PROMETHEUS_PASSWORD",label:"Basic auth pass (optional)",mask:!0}],defaultOn:!1},{id:"loki",label:"Loki",blurb:"Log queries against a Loki instance.",disabledEnv:"OpenAgentic_LOKI_MCP_DISABLED",needsAuth:!0,authType:"fields",envVars:[{env:"LOKI_URL",label:"Loki URL",hint:"https://loki.example.com"},{env:"LOKI_USERNAME",label:"Basic auth user (optional)"},{env:"LOKI_PASSWORD",label:"Basic auth pass (optional)",mask:!0}],defaultOn:!1}];function Je(e){return ie.filter(t=>e.includes(t.id)&&t.needsAuth)}function Mr(){return ie.filter(e=>e.defaultOn).map(e=>e.id)}import{jsx as Re,jsxs as Qe}from"react/jsx-runtime";var Br=({initial:e,step:t,total:r,onDone:n})=>{let[i,o]=Dr(new Set(e)),[s,u]=Dr(0);return In((a,d)=>{if(d.upArrow){u(c=>Math.max(0,c-1));return}if(d.downArrow){u(c=>Math.min(ie.length-1,c+1));return}if(a===" "){let c=ie[s].id,m=new Set(i);m.has(c)?m.delete(c):m.add(c),o(m);return}if(d.return){n(Array.from(i));return}if(a==="a"){o(new Set(ie.map(c=>c.id)));return}if(a==="n"){o(new Set);return}}),Re(y,{step:t,total:r,title:"Which MCPs do you want enabled?",children:Qe(Xe,{flexDirection:"column",children:[ie.map((a,d)=>{let c=i.has(a.id),m=d===s,b=c?"[x]":"[ ]",f=m?l.accent:"white",g=l.muted;return Qe(Xe,{children:[Re(Ze,{color:m?l.accent:l.muted,children:m?"\u276F ":" "}),Re(Ze,{color:c?l.ok:l.muted,children:b}),Re(Xe,{width:20,children:Qe(Ze,{color:f,children:[" ",a.label]})}),Qe(Ze,{color:g,children:[" ",a.blurb]})]},a.id)}),Re(Xe,{marginTop:1,children:Re(v,{children:"Space toggles \xB7 a = all \xB7 n = none \xB7 Enter to continue"})})]})})};import{useState as ze,useEffect as Lr}from"react";import{Box as Ve,Text as Pe}from"ink";import kn from"node:fs";import Cn from"node:os";import Nr from"node:path";import{jsx as X,jsxs as et}from"react/jsx-runtime";var On=Nr.join(Cn.homedir(),".openagentic","cloud-secrets"),wr=({enabledIds:e,initialAuth:t,step:r,total:n,onDone:i})=>{let o=Je(e),[s,u]=ze(0),[a,d]=ze({...t}),c=o.length===0;if(Lr(()=>{c&&i(a)},[c]),c)return null;let m=o[s],b=f=>{let g={...a,...f};d(g),s+1<o.length?u(s+1):i(g)};return X(y,{step:r,total:n,title:`${m.label}: credentials (${s+1} of ${o.length})`,children:X(Rn,{mcp:m,auth:a,onDone:b},m.id)})},Rn=({mcp:e,auth:t,onDone:r})=>{let n=e.envFile?Nr.join(On,e.envFile):void 0,i=!!n&&kn.existsSync(n),o=e.authType==="fields"&&(e.hostCreds?.detect()??!1),[s,u]=ze(e.authType==="env-file"||o?"choose-source":"fields"),[a,d]=ze(0),[c,m]=ze(e.envVars?Object.fromEntries(e.envVars.map(g=>[g.env,t[g.env]??""])):{}),b=e.envVars?.[a],f=s==="fields"&&!b;if(Lr(()=>{f&&r(c)},[f]),s==="choose-source"){let P=[...e.hostCreds?.detect()??!1?[{label:`${e.hostCreds.description} (detected \u2014 recommended)`,value:"host-creds"}]:[],...e.authType==="env-file"?i?[{label:`Use ${n} (detected)`,value:"use-file"}]:[{label:`Create empty ${n} stub (fill in later)`,value:"stub"}]:[],{label:e.authType==="env-file"?"Paste credentials inline now":"Enter credentials inline",value:"paste"},{label:"Skip (this MCP will stay disabled)",value:"skip"}];return et(Ve,{flexDirection:"column",children:[X(Pe,{color:l.muted,children:e.blurb}),X(Ve,{marginTop:1,children:X(B,{items:P,onSelect:p=>{p.value==="host-creds"||p.value==="use-file"||p.value==="stub"?r({}):p.value==="skip"?r({[`__skip_${e.id}`]:"1"}):u("fields")},indicatorComponent:({isSelected:p})=>X(Pe,{color:l.accent,children:p?"\u276F ":" "})})})]})}return b?et(Ve,{flexDirection:"column",children:[X(Pe,{color:l.muted,children:e.blurb}),e.envVars.map((g,P)=>et(Ve,{children:[et(Pe,{color:P===a?l.accent:l.muted,children:[P===a?"\u276F ":" ",g.label.padEnd(32)]}),X(Pe,{children:": "}),P===a?X(D,{value:c[g.env]??"",onChange:p=>m({...c,[g.env]:p}),mask:g.mask?"\u2022":void 0,onSubmit:()=>{a+1<e.envVars.length?d(a+1):r(c)}}):X(Pe,{children:g.mask&&c[g.env]?"\u2022".repeat(Math.min(c[g.env].length,16)):c[g.env]||""})]},g.env)),X(Ve,{marginTop:1,children:X(v,{children:"Enter to advance \xB7 leave blank to skip an optional field"})})]}):null};import{Box as Me,Text as tt}from"ink";import{jsx as ae,jsxs as rt}from"react/jsx-runtime";var Pn=e=>{switch(e){case"none":return"none chosen \u2014 chat will fail until you pick a provider";case"ollama":return"Ollama \u2014 local models on this machine";case"bedrock":return"AWS Bedrock \u2014 models via your AWS account";case"vertex":return"Google Vertex AI \u2014 Gemini models via your GCP project";case"aif":return"Azure AI Foundry \u2014 models via your Azure endpoint";case"skip":return"skipped \u2014 configure in admin panel"}},Mn=e=>e?`${e.authMode==="awslogin"?"current AWS login (~/.aws)":"inline IAM keys"}, region ${e.region}`:"none \u2014 chat will fail until set",Dn=e=>{if(!e||!e.projectId)return"none \u2014 chat will fail until set";let t=e.authMode==="sajson"?`SA key ${e.saKeyPath||""}`:"current gcloud login (ADC)";return`${e.projectId} (${e.location}), ${t}`},Bn=e=>{if(!e||!e.endpointUrl)return"none \u2014 chat will fail until set";let t=e.authMode==="apikey"?"API key":e.authMode==="entra"?"Microsoft Entra app":"current az login (~/.azure)";return`${e.endpointUrl}, ${t}`},Fr=({config:e,step:t,total:r,onLaunch:n,onCancel:i})=>{let s=Je(e.mcps).filter(d=>d.authType==="fields"&&d.envVars?!d.envVars.some(c=>e.mcpAuth[c.env]):!1),u=e.mcps.length===0?"none selected":`${e.mcps.length} enabled (${e.mcps.slice(0,4).join(", ")}${e.mcps.length>4?"\u2026":""})`,a=(d,c,m)=>rt(Me,{children:[ae(Me,{width:18,children:ae(tt,{color:l.muted,children:d})}),ae(tt,{color:m,children:c})]},d);return rt(y,{step:t,total:r,title:"Review & launch",children:[rt(Me,{flexDirection:"column",children:[a("deploy target",e.target),e.target==="helm"&&e.kubeconfigPath&&a("kubeconfig",e.kubeconfigPath),a("admin email",e.admin.email),a("LLM strategy",Pn(e.llmStrategy)),e.llmStrategy==="ollama"&&a("ollama host",e.ollama.host),e.llmStrategy==="ollama"&&a("embedding model",e.ollama.embedModel),e.llmStrategy==="bedrock"&&a("AWS Bedrock",Mn(e.providers.bedrock)),e.llmStrategy==="bedrock"&&a("chat model",e.providers.bedrock?.model||"amazon.nova-pro-v1:0"),e.llmStrategy==="vertex"&&a("Vertex AI",Dn(e.providers.vertex),e.providers.vertex?.projectId?void 0:l.err),e.llmStrategy==="vertex"&&a("chat model",e.providers.vertex?.model||"gemini-1.5-pro"),e.llmStrategy==="aif"&&a("Azure AI Foundry",Bn(e.providers.azureFoundry),e.providers.azureFoundry?.endpointUrl?void 0:l.err),e.llmStrategy==="aif"&&a("deployment / model",e.providers.azureFoundry?.deploymentName||"(unset)",e.providers.azureFoundry?.deploymentName?void 0:l.err),a("MCPs",u),a("UI port",String(e.uiPort)),s.length>0&&ae(Me,{marginTop:1,children:rt(tt,{color:l.err,children:["\u26A0 missing creds: ",s.map(d=>d.label).join(", ")]})})]}),ae(Me,{marginTop:1,children:ae(B,{items:[{label:`Launch ${e.target}`,value:"go"},{label:"Cancel",value:"no"}],onSelect:d=>d.value==="go"?n():i(),indicatorComponent:({isSelected:d})=>ae(tt,{color:l.accent,children:d?"\u276F ":" "})})}),ae(Me,{marginTop:1,children:ae(v,{children:"Nothing has been written to disk yet. Launch will write .env and bring the stack up."})})]})};import{useEffect as zn,useState as Hn}from"react";import{Box as Rt,Text as nt}from"ink";import Un from"open";import He from"node:fs";import wn from"node:crypto";import{fileURLToPath as Ln}from"node:url";import De from"node:path";var Nn=De.dirname(Ln(import.meta.url)),Ee=De.resolve(Nn,"..","..","..",".."),ot=De.join(Ee,".env"),Ct=De.join(Ee,".env.example"),js=De.join(Ee,"docker-compose.yml"),$s=De.join(Ee,"helm","openagentic");var Wr="REPLACE_ME_AT_INSTALL_TIME",Fn=(e=24)=>wn.randomBytes(e).toString("base64url");function Ot(){return He.existsSync(ot)?Wn(He.readFileSync(ot,"utf8")):{}}function Vr(e){let t=He.existsSync(Ct)?He.readFileSync(Ct,"utf8"):"",r=Ot(),n=t.split(`
|
|
8
|
-
`).map(
|
|
9
|
-
`).flatMap(
|
|
10
|
-
`),"utf8")}function
|
|
11
|
-
`)){let n=/^\s*([A-Z0-9_]+)\s*=\s*(.*?)\s*$/.exec(r);if(!n)continue;let i=n[2];(i.startsWith('"')&&i.endsWith('"')||i.startsWith("'")&&i.endsWith("'"))&&(i=i.slice(1,-1)),t[n[1]]=i}return t}import{execa as zr}from"execa";function Vn(e){if(!e)return!1;try{return new URL(e).hostname==="ollama"}catch{return/(^|\/\/)ollama(:|\/|$)/.test(e)}}async function Hr(e,t){let r=e.llmStrategy==="ollama"&&Vn(e.ollama?.host),n=r?["--profile","ollama"]:[],i=r?"docker compose --profile ollama":"docker compose";t.onBuild?.(`${i} build (first run may take several minutes)`),await zr("docker",["compose",...n,"build"],{cwd:Ee}),t.onBuildDone?.(),t.onStart?.(`${i} up -d`),await zr("docker",["compose",...n,"up","-d"],{cwd:Ee}),t.onStartDone?.();let o=`http://localhost:${e.uiPort}`;t.onHealth?.(`waiting for ${o}/api/health`);let s=Date.now();for(;Date.now()-s<10*6e4;){try{if((await fetch(`${o}/api/health`)).ok)return t.onHealthDone?.(),o}catch{}await new Promise(u=>setTimeout(u,3e3))}throw new Error("API did not become healthy within 10 minutes. Run 'docker compose logs api' to investigate.")}async function Ur(e,t){throw new Error("Helm deploy is not wired up yet \u2014 the chart at helm/openagentic needs a cleanup pass before the wizard can drive it. Use the Docker path for now.")}import{jsx as Be,jsxs as Mt}from"react/jsx-runtime";var it=process.env.WIZARD_DRY_RUN==="1",Kr="nomic-embed-text",Pt=768,Gr="gpt-oss:20b",at="6",Kn="text-embedding-005",jr=768,Gn="/var/secrets/gcp/key.json",Yr=({config:e,step:t,total:r,onDone:n})=>{let[i,o]=Hn(()=>(it?["Write .env (dry-run)","Skip build (dry-run)","Skip start (dry-run)","Skip health (dry-run)","Skip browser (dry-run)"]:["Write .env",e.target==="docker"?"Build images":"Render chart",e.target==="docker"?"Start containers":"Apply release","Wait for health","Open browser"]).map(a=>({label:a,state:"pending"}))),s=(u,a)=>o(d=>d.map((c,m)=>m===u?{...c,...a}:c));return zn(()=>{let u=!1;return(async()=>{try{if(s(0,{state:"running"}),Vr(jn(e)),s(0,{state:"ok"}),it){s(1,{state:"ok",detail:"skipped"}),s(2,{state:"ok",detail:"skipped"}),s(3,{state:"ok",detail:"skipped"}),s(4,{state:"ok",detail:"skipped"}),setTimeout(n,50);return}let d=await(e.target==="docker"?Hr:Ur)(e,{onBuild:c=>!u&&s(1,{state:"running",detail:c}),onBuildDone:()=>!u&&s(1,{state:"ok"}),onStart:c=>!u&&s(2,{state:"running",detail:c}),onStartDone:()=>!u&&s(2,{state:"ok"}),onHealth:c=>!u&&s(3,{state:"running",detail:c}),onHealthDone:()=>!u&&s(3,{state:"ok"})});if(u)return;s(4,{state:"running",detail:d});try{await Un(d)}catch{}s(4,{state:"ok",detail:d}),setTimeout(n,1200)}catch(a){if(u)return;let d=a instanceof Error?a.message:String(a);o(c=>c.map(m=>m.state==="running"?{...m,state:"fail",detail:d}:m))}})(),()=>{u=!0}},[e]),Mt(y,{step:t,total:r,title:it?"Bringing up openagentic (dry-run)":"Bringing up openagentic",children:[Be(Rt,{flexDirection:"column",children:i.map((u,a)=>Mt(Rt,{children:[Be(nt,{color:$r(u.state).color,children:$r(u.state).char}),Be(nt,{children:" "}),Be(nt,{children:u.label}),u.detail?Mt(nt,{color:l.muted,children:[" ",u.detail.slice(0,80)]}):null]},a))}),Be(Rt,{marginTop:1,children:Be(v,{children:it?"WIZARD_DRY_RUN=1 \u2014 only .env is written; no containers are touched.":"First boot pulls the embedding model and seeds Milvus \u2014 give it a couple minutes."})})]})};function $r(e){switch(e){case"ok":return{char:"\u2713",color:l.ok};case"fail":return{char:"\u2717",color:l.err};case"running":return{char:"\u25E6",color:l.accent};default:return{char:"\xB7",color:l.muted}}}function jn(e){let t=e.llmStrategy==="ollama",r=e.llmStrategy==="bedrock",n=e.llmStrategy==="vertex",i=e.llmStrategy==="aif",o={ADMIN_USER_EMAIL:e.admin.email,ADMIN_SEED_PASSWORD:e.admin.password,LOCAL_ADMIN_USERNAME:e.admin.name,UI_HOST_PORT:String(e.uiPort),MCPS_ENABLED:e.mcps.join(",")};t?(o.OLLAMA_HOST=e.ollama.host,o.OLLAMA_EMBED_MODEL=e.ollama.embedModel,o.OLLAMA_ENABLED="true",o.EMBEDDING_PROVIDER="ollama",o.OLLAMA_CHAT_MODEL=Gr,o.BOOTSTRAP_PROVIDER_NAME="ollama-local",o.BOOTSTRAP_PROVIDER_DISPLAY_NAME="Ollama (local)",o.BOOTSTRAP_PROVIDER_TYPE="ollama",o.BOOTSTRAP_PROVIDER_CONFIG=JSON.stringify({endpoint:e.ollama.host}),o.BOOTSTRAP_PROVIDER_DEFAULTS=JSON.stringify({chat:Gr,embedding:e.ollama.embedModel,embeddingDimension:Pt}),o.SEEDER_VERSION=at):o.OLLAMA_ENABLED="false";let s=e.providers.bedrock;if(r&&s){let c=(s.region||"us-east-1").trim()||"us-east-1",m=(s.model||"").trim()||"amazon.nova-pro-v1:0";o.AWS_REGION=c,s.authMode==="keys"&&s.accessKeyId&&s.secretAccessKey&&(o.AWS_ACCESS_KEY_ID=s.accessKeyId,o.AWS_SECRET_ACCESS_KEY=s.secretAccessKey),o.BOOTSTRAP_PROVIDER_NAME="aws-bedrock",o.BOOTSTRAP_PROVIDER_DISPLAY_NAME="AWS Bedrock",o.BOOTSTRAP_PROVIDER_TYPE="aws-bedrock",o.BOOTSTRAP_PROVIDER_CONFIG=JSON.stringify({region:c}),o.BOOTSTRAP_PROVIDER_DEFAULTS=JSON.stringify({chat:m,embedding:Kr,embeddingDimension:Pt}),o.SEEDER_VERSION=at}let u=e.providers.vertex;if(n&&u){let c=(u.projectId||"").trim(),m=(u.location||"us-central1").trim()||"us-central1",b=(u.model||"").trim()||"gemini-1.5-pro",f=Kn;o.GOOGLE_CLOUD_PROJECT=c,o.GOOGLE_CLOUD_LOCATION=m,o.VERTEX_PROJECT=c,o.VERTEX_LOCATION=m,o.VERTEX_CHAT_MODEL=b,o.EMBEDDING_PROVIDER="vertex-ai",o.GCP_PROJECT_ID=c,o.GCP_LOCATION=m,o.GCP_EMBEDDING_MODEL=f,o.EMBEDDING_DIMENSIONS=String(jr),o.SKIP_TOOL_SEMANTIC_CACHE="false",u.authMode==="sajson"&&u.saKeyPath&&(o.GCP_SA_KEY_FILE=u.saKeyPath.startsWith("~")?(process.env.HOME||"")+u.saKeyPath.slice(1):u.saKeyPath,o.GOOGLE_APPLICATION_CREDENTIALS=Gn),o.VERTEX_AI_API_KEY="",o.GEMINI_API_KEY="",o.BOOTSTRAP_PROVIDER_NAME="google-vertex",o.BOOTSTRAP_PROVIDER_DISPLAY_NAME="Google Vertex AI",o.BOOTSTRAP_PROVIDER_TYPE="vertex-ai",o.BOOTSTRAP_PROVIDER_CONFIG=JSON.stringify({projectId:c,location:m}),o.BOOTSTRAP_PROVIDER_DEFAULTS=JSON.stringify({chat:b,embedding:f,embeddingDimension:jr}),o.SEEDER_VERSION=at}let a=e.providers.azureFoundry;if(i&&a){let c=(a.endpointUrl||"").trim(),m=(a.apiVersion||"").trim()||"2024-10-21",b=(a.deploymentName||"").trim();o.AIF_ENDPOINT_URL=c,o.AIF_API_VERSION=m,o.AIF_MODEL=b,a.authMode==="apikey"&&a.apiKey?o.AIF_API_KEY=a.apiKey:a.authMode==="entra"&&(a.tenantId&&(o.AIF_TENANT_ID=a.tenantId),a.clientId&&(o.AIF_CLIENT_ID=a.clientId),a.clientSecret&&(o.AIF_CLIENT_SECRET=a.clientSecret)),o.BOOTSTRAP_PROVIDER_NAME="azure-ai-foundry",o.BOOTSTRAP_PROVIDER_DISPLAY_NAME="Azure AI Foundry",o.BOOTSTRAP_PROVIDER_TYPE="azure-ai-foundry";let f={endpointUrl:c,apiVersion:m,deploymentName:b};a.authMode==="entra"&&(a.tenantId&&(f.tenantId=a.tenantId),a.clientId&&(f.clientId=a.clientId)),o.BOOTSTRAP_PROVIDER_CONFIG=JSON.stringify(f),o.BOOTSTRAP_PROVIDER_DEFAULTS=JSON.stringify({chat:b,embedding:Kr,embeddingDimension:Pt}),o.SEEDER_VERSION=at}let d=new Set(e.mcps);for(let c of ie)o[c.disabledEnv]=d.has(c.id)?"false":"true";for(let[c,m]of Object.entries(e.mcpAuth))c.startsWith("__skip_")||m&&(o[c]=m);return o}var se={target:"docker",llmStrategy:"none",admin:{email:"admin@openagentic.local",password:"",name:"Admin"},ollama:{host:"http://ollama:11434",embedModel:"nomic-embed-text"},providers:{},mcps:[],mcpAuth:{},uiPort:8080};import{jsx as V,jsxs as st}from"react/jsx-runtime";var Jn=()=>{let e=Ot(),[t,r]=qr(()=>({...se,admin:{...se.admin,email:e.ADMIN_USER_EMAIL||se.admin.email,name:e.LOCAL_ADMIN_USERNAME||se.admin.name},ollama:{...se.ollama,host:e.OLLAMA_HOST||se.ollama.host,embedModel:e.OLLAMA_EMBED_MODEL||se.ollama.embedModel},providers:e.AWS_REGION||e.AWS_ACCESS_KEY_ID?{bedrock:{authMode:e.AWS_ACCESS_KEY_ID?"keys":"awslogin",region:e.AWS_REGION||"us-east-1",accessKeyId:e.AWS_ACCESS_KEY_ID||void 0,secretAccessKey:e.AWS_SECRET_ACCESS_KEY||void 0,model:e.BEDROCK_CHAT_MODEL||"amazon.nova-pro-v1:0"}}:e.AIF_ENDPOINT_URL?{azureFoundry:{authMode:e.AIF_API_KEY?"apikey":e.AIF_TENANT_ID&&e.AIF_CLIENT_ID&&e.AIF_CLIENT_SECRET?"entra":"azlogin",endpointUrl:e.AIF_ENDPOINT_URL||"",apiKey:e.AIF_API_KEY||void 0,tenantId:e.AIF_TENANT_ID||void 0,clientId:e.AIF_CLIENT_ID||void 0,clientSecret:e.AIF_CLIENT_SECRET||void 0,apiVersion:e.AIF_API_VERSION||"2024-10-21",deploymentName:e.AIF_MODEL||""}}:e.VERTEX_PROJECT||e.GOOGLE_CLOUD_PROJECT?{vertex:{authMode:e.GCP_SA_KEY_FILE?"sajson":"adc",projectId:e.VERTEX_PROJECT||e.GOOGLE_CLOUD_PROJECT||"",location:e.VERTEX_LOCATION||e.GOOGLE_CLOUD_LOCATION||"us-central1",model:e.VERTEX_CHAT_MODEL||"gemini-1.5-pro",saKeyPath:e.GCP_SA_KEY_FILE||void 0}}:{},mcps:e.MCPS_ENABLED?e.MCPS_ENABLED.split(",").map(p=>p.trim()).filter(Boolean):Mr(),mcpAuth:{},uiPort:e.UI_HOST_PORT?Number(e.UI_HOST_PORT):se.uiPort})),[n,i]=qr("target"),o=t.llmStrategy,s=p=>r(_=>({..._,llmStrategy:p})),u=t.target==="helm"?1:0,a=o==="ollama"?1:0,d=o==="bedrock"?1:0,c=o==="vertex"?1:0,m=o==="aif"?1:0,b=1+u+1+1+a+d+c+m+1+1+1+1,f=1,g={target:f++,helmPreflight:t.target==="helm"?f++:0,admin:f++,llmStrategy:f++,ollama:a?f++:0,providers:d?f++:0,vertex:c?f++:0,aif:m?f++:0,mcps:f++,mcpAuth:f++,review:f++,launch:f++},P=p=>p==="ollama"?"ollama":p==="bedrock"?"providers":p==="vertex"?"vertex":p==="aif"?"aif":"mcps";return n==="target"?V(jt,{onPick:p=>{r({...t,target:p}),i(p==="helm"?"helm-preflight":"admin")}}):n==="helm-preflight"?V(hr,{onContinue:p=>{r({...t,kubeconfigPath:p}),i("admin")},onBackToDocker:()=>{r({...t,target:"docker",kubeconfigPath:void 0}),i("admin")}}):n==="admin"?V(_r,{initial:t.admin,step:g.admin,total:b,onDone:p=>{r({...t,admin:p}),i("llm-strategy")}}):n==="llm-strategy"?V(xr,{step:g.llmStrategy,total:b,onPick:p=>{s(p),i(P(p))}}):n==="ollama"?V(Sr,{initial:t.ollama,step:g.ollama,total:b,onDone:p=>{r({...t,ollama:p}),i("mcps")}}):n==="providers"?V(Tr,{initial:t.providers,step:g.providers,total:b,onDone:p=>{r({...t,providers:p}),i("mcps")}}):n==="vertex"?V(Rr,{initial:t.providers,step:g.vertex,total:b,onDone:p=>{r({...t,providers:p}),i("mcps")}}):n==="aif"?V(Pr,{initial:t.providers,step:g.aif,total:b,onDone:p=>{r({...t,providers:p}),i("mcps")}}):n==="mcps"?V(Br,{initial:t.mcps,step:g.mcps,total:b,onDone:p=>{r({...t,mcps:p}),i("mcp-auth")}}):n==="mcp-auth"?V(wr,{enabledIds:t.mcps,initialAuth:t.mcpAuth,step:g.mcpAuth,total:b,onDone:p=>{let _=Object.keys(p).filter(h=>h.startsWith("__skip_")).map(h=>h.slice(7)),k={};for(let[h,I]of Object.entries(p))h.startsWith("__skip_")||(k[h]=I);r({...t,mcps:t.mcps.filter(h=>!_.includes(h)),mcpAuth:k}),i("review")}}):n==="review"?V(Fr,{config:t,step:g.review,total:b,onLaunch:()=>i("launch"),onCancel:()=>process.exit(0)}):n==="launch"?V(Yr,{config:t,step:g.launch,total:b,onDone:()=>i("done")}):st(Jr,{flexDirection:"column",children:[V(dt,{}),st(Jr,{marginLeft:2,flexDirection:"column",children:[V(Dt,{color:l.ok,bold:!0,children:"openagentic is running"}),st(Dt,{color:l.muted,children:["open http://localhost:",t.uiPort," in your browser"]}),st(Dt,{color:l.muted,children:["sign in with ",t.admin.email]})]})]})},Xr=!1;try{Xr=!!process.argv[1]&&$n(process.argv[1])===Yn(import.meta.url)}catch{}if(Xr){process.stdout.isTTY&&process.stdout.write("\x1B[2J\x1B[3J\x1B[H");let e=t=>{let r=t instanceof Error?t.stack||t.message:String(t);process.stderr.write(`
|
|
5
|
+
`,i)}while(n!==-1);return o+=e.slice(i),o}var{stdout:kr,stderr:Cr}=Ar,Bt=Symbol("GENERATOR"),Me=Symbol("STYLER"),Ue=Symbol("IS_EMPTY"),Ir=["ansi","ansi","ansi256","ansi16m"],Le=Object.create(null),gn=(e,t={})=>{if(t.level&&!(Number.isInteger(t.level)&&t.level>=0&&t.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");let r=kr?kr.level:0;e.level=t.level===void 0?r:t.level};var hn=e=>{let t=(...r)=>r.join(" ");return gn(t,e),Object.setPrototypeOf(t,Ke.prototype),t};function Ke(e){return hn(e)}Object.setPrototypeOf(Ke.prototype,Function.prototype);for(let[e,t]of Object.entries(re))Le[e]={get(){let r=it(this,Lt(t.open,t.close,this[Me]),this[Ue]);return Object.defineProperty(this,e,{value:r}),r}};Le.visible={get(){let e=it(this,this[Me],!0);return Object.defineProperty(this,"visible",{value:e}),e}};var Mt=(e,t,r,...n)=>e==="rgb"?t==="ansi16m"?re[r].ansi16m(...n):t==="ansi256"?re[r].ansi256(re.rgbToAnsi256(...n)):re[r].ansi(re.rgbToAnsi(...n)):e==="hex"?Mt("rgb",t,r,...re.hexToRgb(...n)):re[r][e](...n),_n=["rgb","hex","ansi256"];for(let e of _n){Le[e]={get(){let{level:r}=this;return function(...n){let i=Lt(Mt(e,Ir[r],"color",...n),re.color.close,this[Me]);return it(this,i,this[Ue])}}};let t="bg"+e[0].toUpperCase()+e.slice(1);Le[t]={get(){let{level:r}=this;return function(...n){let i=Lt(Mt(e,Ir[r],"bgColor",...n),re.bgColor.close,this[Me]);return it(this,i,this[Ue])}}}}var bn=Object.defineProperties(()=>{},{...Le,level:{enumerable:!0,get(){return this[Bt].level},set(e){this[Bt].level=e}}}),Lt=(e,t,r)=>{let n,i;return r===void 0?(n=e,i=t):(n=r.openAll+e,i=t+r.closeAll),{open:e,close:t,openAll:n,closeAll:i,parent:r}},it=(e,t,r)=>{let n=(...i)=>vn(n,i.length===1?""+i[0]:i.join(" "));return Object.setPrototypeOf(n,bn),n[Bt]=e,n[Me]=t,n[Ue]=r,n},vn=(e,t)=>{if(e.level<=0||!t)return e[Ue]?"":t;let r=e[Me];if(r===void 0)return t;let{openAll:n,closeAll:i}=r;if(t.includes("\x1B"))for(;r!==void 0;)t=Tr(t,r.close,r.open),r=r.parent;let o=t.indexOf(`
|
|
6
|
+
`);return o!==-1&&(t=Er(t,i,n,o)),n+t+i};Object.defineProperties(Ke.prototype,Le);var xn=Ke(),Ua=Ke({level:Cr?Cr.level:0});var ge=xn;function kn({value:e,placeholder:t="",focus:r=!0,mask:n,highlightPastedText:i=!1,showCursor:o=!0,onChange:l,onSubmit:u}){let[a,d]=Sn({cursorOffset:(e||"").length,cursorWidth:0}),{cursorOffset:c,cursorWidth:m}=a;An(()=>{d(y=>{if(!r||!o)return y;let h=e||"";return y.cursorOffset>h.length-1?{cursorOffset:h.length,cursorWidth:0}:y})},[e,r,o]);let _=i?m:0,p=n?n.repeat(e.length):e,g=p,D=t?ge.grey(t):void 0;if(o&&r){D=t.length>0?ge.inverse(t[0])+ge.grey(t.slice(1)):ge.inverse(" "),g=p.length>0?"":ge.inverse(" ");let y=0;for(let h of p)g+=y>=c-_&&y<=c?ge.inverse(h):h,y++;p.length>0&&c===p.length&&(g+=ge.inverse(" "))}return En((y,h)=>{if(h.upArrow||h.downArrow||h.ctrl&&y==="c"||h.tab||h.shift&&h.tab)return;if(h.return){u&&u(e);return}let R=c,v=e,C=0;h.leftArrow?o&&R--:h.rightArrow?o&&R++:h.backspace||h.delete?c>0&&(v=e.slice(0,c-1)+e.slice(c,e.length),R--):(v=e.slice(0,c)+y+e.slice(c,e.length),R+=y.length,y.length>1&&(C=y.length)),c<0&&(R=0),c>e.length&&(R=e.length),d({cursorOffset:R,cursorWidth:C}),v!==e&&l(v)},{isActive:r}),yn.createElement(Tn,null,t?p.length>0?g:D:g)}var F=kn;import{execa as Cn}from"execa";import{existsSync as Or,statSync as In}from"node:fs";import{homedir as Rr}from"node:os";import{join as Pr}from"node:path";var On=8e3;function Rn(e){return e.startsWith("~/")||e==="~"?Pr(Rr(),e.slice(1)):e}function Dr(){let e=process.env.KUBECONFIG?.trim();if(e)return e;let t=Pr(Rr(),".kube","config");return Or(t)?t:null}function Br(e){let t=Rn(e.trim());if(!t)return{ok:!1,reason:"path is empty"};if(!Or(t))return{ok:!1,reason:`not found: ${t}`};try{if(!In(t).isFile())return{ok:!1,reason:`${t} is not a regular file`}}catch{return{ok:!1,reason:`cannot read ${t}`}}return{ok:!0,path:t}}async function Ee(e,t,r){try{let n=await Cn(e,t,{timeout:On,env:r,reject:!1});return{ok:n.exitCode===0,stdout:n.stdout||"",stderr:n.stderr||""}}catch(n){return{ok:!1,stdout:"",stderr:String(n)}}}async function Mr(e){let t={...process.env,KUBECONFIG:e},r={kubeconfigPath:e,kubectlVersion:null,helmVersion:null,context:null,reachable:!1,serverVersion:null,nodeCount:null,namespaceExists:!1,existingRelease:null},n=await Ee("kubectl",["version","--client=true","--output=json"],t);if(n.ok)try{let c=JSON.parse(n.stdout);r.kubectlVersion=c?.clientVersion?.gitVersion||null}catch{r.kubectlVersion=null}let i=await Ee("helm",["version","--template={{.Version}}"],t);if(i.ok&&(r.helmVersion=i.stdout.trim()),!r.kubectlVersion||!r.helmVersion)return r;let o=await Ee("kubectl",["config","current-context"],t);if(o.ok&&(r.context=o.stdout.trim()),!r.context)return r;let l=await Ee("kubectl",["version","--output=json"],t);if(l.ok)try{let c=JSON.parse(l.stdout);r.serverVersion=c?.serverVersion?.gitVersion||null,r.reachable=!!r.serverVersion}catch{r.reachable=!1}if(!r.reachable)return r;let u=await Ee("kubectl",["get","nodes","-o","name"],t);u.ok&&(r.nodeCount=u.stdout.split(`
|
|
7
|
+
`).filter(Boolean).length);let a=await Ee("kubectl",["get","namespace","openagentic","-o","name"],t);r.namespaceExists=a.ok&&a.stdout.trim().length>0;let d=await Ee("helm",["list","-n","openagentic","-o","json"],t);if(d.ok)try{let c=JSON.parse(d.stdout);if(Array.isArray(c)&&c.length>0){let m=c.find(_=>_.name==="openagentic")??c[0];m&&(r.existingRelease={name:m.name,revision:Number(m.revision)||0,status:m.status||"unknown"})}}catch{}return r}import{jsx as k,jsxs as Q}from"react/jsx-runtime";var Lr=({onContinue:e,onBackToDocker:t})=>{let r=Dr(),[n,i]=Dn(r?{stage:"probing",kubeconfigPath:r}:{stage:"picking-kubeconfig",input:"",error:null});if(Pn(()=>{if(n.stage!=="probing")return;let d=!1;return Mr(n.kubeconfigPath).then(c=>{d||i({stage:"ready",probe:c})}),()=>{d=!0}},[n.stage==="probing"?n.kubeconfigPath:null]),Bn((d,c)=>{n.stage==="picking-kubeconfig"&&c.escape&&t()}),n.stage==="picking-kubeconfig")return Q(S,{step:2,total:10,title:"Checking your cluster",children:[Q(U,{flexDirection:"column",marginBottom:1,children:[Q(K,{children:["No kubeconfig found at ",k(K,{color:s.accent,children:"$KUBECONFIG"})," or ",k(K,{color:s.accent,children:"~/.kube/config"}),"."]}),Q(K,{children:["Paste a path to your kubeconfig, or press ",k(K,{color:s.accent,children:"Esc"})," to go back to Docker."]})]}),Q(U,{children:[k(K,{children:"kubeconfig: "}),k(F,{value:n.input,onChange:d=>i({...n,input:d,error:null}),onSubmit:d=>{let c=Br(d);if(!c.ok){i({...n,error:c.reason});return}i({stage:"probing",kubeconfigPath:c.path})}})]}),n.error&&k(U,{marginTop:1,children:k(K,{color:s.err,children:n.error})})]});if(n.stage==="probing")return k(S,{step:2,total:10,title:"Checking your cluster",children:Q(U,{children:[k(K,{color:s.accent,children:k(_r,{type:"dots"})}),Q(K,{children:[" probing cluster via ",n.kubeconfigPath,"\u2026"]})]})});let{probe:o}=n,l=[{label:"kubeconfig",value:o.kubeconfigPath},{label:"kubectl",value:o.kubectlVersion??"not found on PATH",colour:o.kubectlVersion?void 0:s.err},{label:"helm",value:o.helmVersion??"not found on PATH",colour:o.helmVersion?void 0:s.err},{label:"context",value:o.context??"no current context set",colour:o.context?void 0:s.err},{label:"cluster",value:o.reachable?`${o.serverVersion??"unknown"} (${o.nodeCount??"?"} nodes)`:"unreachable",colour:o.reachable?void 0:s.err},{label:"namespace",value:o.namespaceExists?"openagentic \u2014 exists":"openagentic \u2014 does not exist",colour:o.namespaceExists?s.warn:void 0},{label:"existing release",value:o.existingRelease?`${o.existingRelease.name} rev ${o.existingRelease.revision} (${o.existingRelease.status})`:"none",colour:o.existingRelease?s.warn:void 0}],u=o.kubectlVersion?o.helmVersion?o.context?o.reachable?null:"cluster is unreachable. Check VPN / kubeconfig / network.":"no current kubectl context is set. Run: kubectl config use-context <name>":"helm is not installed or not on PATH.":"kubectl is not installed or not on PATH.";if(u)return Q(S,{step:2,total:10,title:"Checking your cluster",children:[k(U,{flexDirection:"column",children:l.map(d=>Q(U,{children:[k(U,{width:18,children:k(K,{color:s.muted,children:d.label})}),k(K,{color:d.colour,children:d.value})]},d.label))}),k(U,{marginTop:1,children:k(K,{color:s.err,children:u})}),k(U,{marginTop:1,children:k(z,{items:[{label:"Back to Docker deploy",value:"docker"},{label:"Quit",value:"quit"}],onSelect:d=>{d.value==="docker"?t():process.exit(0)}})})]});let a=o.existingRelease?`Existing release 'openagentic' (rev ${o.existingRelease.revision}). Continuing will run helm upgrade.`:o.namespaceExists?"Namespace 'openagentic' exists but no Helm release. Continuing will adopt it.":null;return Q(S,{step:2,total:10,title:"Checking your cluster",children:[k(U,{flexDirection:"column",children:l.map(d=>Q(U,{children:[k(U,{width:18,children:k(K,{color:s.muted,children:d.label})}),k(K,{color:d.colour,children:d.value})]},d.label))}),a&&k(U,{marginTop:1,children:Q(K,{color:s.warn,children:["\u26A0 ",a]})}),k(U,{marginTop:1,children:k(z,{items:[{label:o.existingRelease?"Upgrade existing release":"Continue",value:"continue"},{label:"Back to Docker deploy",value:"docker"}],onSelect:d=>{d.value==="continue"?e(o.kubeconfigPath):t()}})}),k(U,{marginTop:1,children:k(b,{children:"Helm backend implementation is still in progress \u2014 the preflight above will run, but the final install step may not complete. See the project docs."})})]})};import{useState as wt}from"react";import{Box as at,Text as we}from"ink";import{jsx as ie,jsxs as $e}from"react/jsx-runtime";var wr=({initial:e,step:t,total:r,onDone:n})=>{let[i,o]=wt(e.email),[l,u]=wt(e.password),[a,d]=wt("email");return ie(S,{step:t,total:r,title:"Create your admin account",children:$e(at,{flexDirection:"column",children:[$e(at,{children:[$e(we,{color:a==="email"?s.accent:s.muted,children:[a==="email"?"\u276F ":" ","email :"]}),ie(we,{children:" "}),a==="email"?ie(F,{value:i,onChange:o,onSubmit:()=>d("password")}):ie(we,{children:i})]}),$e(at,{children:[$e(we,{color:a==="password"?s.accent:s.muted,children:[a==="password"?"\u276F ":" ","password :"]}),ie(we,{children:" "}),a==="password"?ie(F,{value:l,onChange:u,mask:"\u2022",onSubmit:()=>{l.length>=8&&i.includes("@")&&n({...e,email:i,password:l})}}):ie(we,{children:"\u2022".repeat(Math.min(l.length,12))})]}),ie(at,{marginTop:1,children:ie(b,{children:"Minimum 8 characters. You can change this later from the admin panel."})})]})})};import{Box as Nt,Text as Ft}from"ink";import{jsx as ae,jsxs as Fr}from"react/jsx-runtime";var Nr=[{label:"\u2014 select a provider (use \u2193 to choose) \u2014",value:"none",hint:"Nothing is pre-selected. Pick the provider you want \u2014 the platform never assumes one."},{label:"Ollama \u2014 local models on this machine",value:"ollama",hint:"Zero API costs, fully offline. Requires your own Ollama install (https://ollama.com). Only started when you pick it."},{label:"AWS Bedrock \u2014 models via your AWS account",value:"bedrock",hint:"Use your current AWS login (mounted ~/.aws) or paste IAM keys. You pick the Bedrock chat model."},{label:"Google Vertex AI \u2014 Gemini models via your GCP project",value:"vertex",hint:"Use your current gcloud login (ADC) or a service-account JSON key. You pick the Gemini chat model."},{label:"Azure AI Foundry \u2014 models via your Azure endpoint",value:"aif",hint:"Authenticate with an API key, a Microsoft Entra app, or your current az login. You pick the deployment / model."},{label:"Skip for now \u2014 configure in the admin panel",value:"skip",hint:"Stack will boot, but chat/embedding calls will fail until you wire a provider. Nothing auto-starts."}],Wr=({step:e,total:t,onPick:r})=>ae(S,{step:e,total:t,title:"Which LLM provider should the platform use?",children:Fr(Nt,{flexDirection:"column",children:[ae(b,{children:"Pick the provider that powers chat completions and embeddings. Nothing is pre-selected."}),ae(b,{children:"The platform never starts or assumes a provider \u2014 only the one you choose here is configured."}),ae(b,{children:"Cloud-management creds (Azure / AWS / GCP) are a separate step further down."}),ae(Nt,{marginTop:1,children:ae(z,{items:Nr.map(n=>({label:n.label,value:n.value})),onSelect:n=>{let i=n.value;i!=="none"&&r(i)},indicatorComponent:({isSelected:n})=>ae(Ft,{color:s.accent,children:n?"\u276F ":" "})})}),ae(Nt,{marginTop:1,flexDirection:"column",children:Nr.filter(n=>n.value!=="none").map(n=>Fr(Ft,{color:s.muted,children:[" ",ae(Ft,{bold:!0,children:n.label.split(" \u2014 ")[0]})," \u2014 ",n.hint]},n.value))})]})});import{useState as Mn}from"react";import{Box as st,Text as zr}from"ink";import{jsx as he,jsxs as Vr}from"react/jsx-runtime";var Hr=({initial:e,step:t,total:r,onDone:n})=>{let[i,o]=Mn(e.host);return he(S,{step:t,total:r,title:"Where is your Ollama?",children:Vr(st,{flexDirection:"column",children:[Vr(st,{children:[he(zr,{color:s.accent,children:"\u276F "}),he(zr,{children:"host: "}),he(F,{value:i,onChange:o,onSubmit:()=>n({...e,host:i})})]}),he(st,{marginTop:1,children:he(b,{children:"http://ollama:11434 = the bundled container (started by the `ollama` compose profile). Use http://host.docker.internal:11434 to reach an Ollama you already run on your host instead."})}),he(st,{children:he(b,{children:"You chose Ollama, so the platform will start it and pre-pull the embed model on first boot. No other provider is touched."})})]})})};import{useState as ke}from"react";import{Box as se,Text as _e}from"ink";import Ln from"node:fs";import wn from"node:os";import Nn from"node:path";import{jsx as L,jsxs as be}from"react/jsx-runtime";var Fn=wn.homedir(),Gr=e=>{try{return Ln.existsSync(Nn.join(Fn,e))}catch{return!1}},Wn=()=>Gr(".aws/credentials")||Gr(".aws/config"),Wt="us-east-1",zt="amazon.nova-pro-v1:0",Ur=({initial:e,step:t,total:r,onDone:n})=>{let i=Wn(),o=e.bedrock,l=o?.authMode?o.authMode:i?"awslogin":"keys",[u,a]=ke("mode"),[d,c]=ke(l),[m,_]=ke(o?.region||""),[p,g]=ke(o?.accessKeyId||""),[D,y]=ke(o?.secretAccessKey||""),[h,R]=ke(o?.model||""),[v,C]=ke(0),f=T=>{let x=m.trim()||Wt,E=h.trim()||zt,Y={authMode:T,region:x,model:E};T==="keys"&&(Y.accessKeyId=p.trim(),Y.secretAccessKey=D),n({bedrock:Y})};if(u==="mode"){let T=[];return i&&T.push({label:"Use my current AWS login (~/.aws \u2014 mounted read-only)",value:"awslogin"}),T.push({label:"Enter IAM access key + secret",value:"keys"}),L(S,{step:t,total:r,title:"AWS Bedrock \u2014 models via your AWS account",children:be(se,{flexDirection:"column",children:[L(b,{children:"Pick how the platform authenticates to your AWS account for Bedrock."}),i?L(b,{children:"Detected AWS credentials in ~/.aws \u2014 your current login is the easy path."}):L(b,{children:"No ~/.aws found on this machine \u2014 paste an IAM access key + secret."}),L(se,{marginTop:1,children:L(z,{items:T.map(x=>({label:x.label,value:x.value})),initialIndex:Math.max(0,T.findIndex(x=>x.value===d)),onSelect:x=>{let E=x.value;c(E),C(0),a(E==="awslogin"?"awslogin":"keys")},indicatorComponent:({isSelected:x})=>L(_e,{color:s.accent,children:x?"\u276F ":" "})})})]})})}if(u==="awslogin"){let T=[{key:"region",label:"AWS region ",value:m,set:_,placeholder:Wt},{key:"model",label:"Bedrock chat model ",value:h,set:R,placeholder:zt}],x=()=>{v+1<T.length?C(v+1):f("awslogin")};return L(S,{step:t,total:r,title:"AWS Bedrock \u2014 current AWS login",children:be(se,{flexDirection:"column",children:[T.map((E,Y)=>be(se,{children:[be(_e,{color:Y===v?s.accent:s.muted,children:[Y===v?"\u276F ":" ",E.label,":"]}),L(_e,{children:" "}),Y===v?L(F,{value:E.value,placeholder:E.placeholder,onChange:E.set,onSubmit:x}):L(_e,{color:E.value?void 0:s.muted,children:E.value||E.placeholder})]},E.key)),L(se,{marginTop:1,children:L(b,{children:"Your host ~/.aws is mounted read-only into the api; the default credential chain resolves it."})})]})})}let w=[{key:"region",label:"AWS region ",value:m,set:_,mask:!1,placeholder:Wt},{key:"accessKeyId",label:"AWS access key id ",value:p,set:g,mask:!1,placeholder:"AKIA\u2026"},{key:"secretAccessKey",label:"AWS secret access key ",value:D,set:y,mask:!0,placeholder:""},{key:"model",label:"Bedrock chat model ",value:h,set:R,mask:!1,placeholder:zt}],B=w[v],M=(B.key==="accessKeyId"||B.key==="secretAccessKey")&&!B.value.trim(),N=()=>{M||(v+1<w.length?C(v+1):f("keys"))};return L(S,{step:t,total:r,title:"AWS Bedrock \u2014 IAM access key",children:be(se,{flexDirection:"column",children:[w.map((T,x)=>be(se,{children:[be(_e,{color:x===v?s.accent:s.muted,children:[x===v?"\u276F ":" ",T.label,":"]}),L(_e,{children:" "}),x===v?L(F,{value:T.value,placeholder:T.mask?void 0:T.placeholder,onChange:T.set,onSubmit:N,mask:T.mask?"\u2022":void 0}):L(_e,{color:T.value?void 0:s.muted,children:T.value?T.mask?"\u2022".repeat(Math.min(T.value.length,20)):T.value:T.mask?"":T.placeholder})]},T.key)),L(se,{marginTop:1,children:L(b,{children:"Inline IAM keys are written to .env as AWS_ACCESS_KEY_ID / AWS_SECRET_ACCESS_KEY."})}),M&&L(se,{children:be(_e,{color:s.accent,children:["\u25CF required \u2014 paste your IAM ",B.key==="secretAccessKey"?"secret":"access key"," to continue"]})})]})})};import{useState as Ce}from"react";import{Box as Ne,Text as je}from"ink";import jr from"node:fs";import zn from"node:os";import Vt from"node:path";import{jsx as j,jsxs as Ye}from"react/jsx-runtime";var Yr=zn.homedir(),Vn=e=>{try{return jr.existsSync(Vt.join(Yr,e))}catch{return!1}},Hn=()=>Vn(".config/gcloud"),Gn=()=>{let e=Vt.join(Yr,".config","gcloud","keys");try{let t=jr.readdirSync(e).find(r=>r.endsWith(".json"));if(t)return Vt.join(e,t)}catch{}return""},Kr="us-central1",$r="gemini-1.5-pro",qr=({initial:e,step:t,total:r,onDone:n})=>{let i=Hn(),o=e.vertex,l=Gn(),u=o?.authMode?o.authMode:i?"adc":"sajson",[a,d]=Ce("mode"),[c,m]=Ce(u),[_,p]=Ce(o?.projectId||""),[g,D]=Ce(o?.location||""),[y,h]=Ce(o?.model||""),[R,v]=Ce(o?.saKeyPath||""),[C,f]=Ce(0),w=x=>{let E={authMode:x,projectId:_.trim(),location:g.trim()||Kr,model:y.trim()||$r};x==="sajson"&&(E.saKeyPath=R.trim()||l),n({vertex:E})};if(a==="mode"){let x=[];return i&&x.push({label:"Use my current gcloud login (ADC \u2014 ~/.config/gcloud, mounted read-only)",value:"adc"}),x.push({label:"Provide a service-account JSON key",value:"sajson"}),j(S,{step:t,total:r,title:"Google Vertex AI \u2014 Gemini via your GCP project",children:Ye(Ne,{flexDirection:"column",children:[j(b,{children:"Pick how the platform authenticates to your GCP project for Vertex AI."}),i?j(b,{children:"Detected ~/.config/gcloud \u2014 your current gcloud login (ADC) is the easy path."}):j(b,{children:"No ~/.config/gcloud found \u2014 provide a service-account JSON key path."}),j(Ne,{marginTop:1,children:j(z,{items:x.map(E=>({label:E.label,value:E.value})),initialIndex:Math.max(0,x.findIndex(E=>E.value===c)),onSelect:E=>{let Y=E.value;m(Y),f(0),d(Y==="adc"?"adc":"sajson")},indicatorComponent:({isSelected:E})=>j(je,{color:s.accent,children:E?"\u276F ":" "})})})]})})}let B=[{key:"projectId",label:"GCP project id ",value:_,set:p,placeholder:"my-gcp-project",required:!0},{key:"location",label:"Location ",value:g,set:D,placeholder:Kr},{key:"model",label:"Gemini chat model ",value:y,set:h,placeholder:$r}];a==="sajson"&&B.push({key:"saKeyPath",label:"Service-account key ",value:R,set:v,placeholder:l||"~/.config/gcloud/keys/sa.json",required:!0});let M=B[C],N=!!M.required&&!M.value.trim()&&!(M.key==="saKeyPath"&&l),T=()=>{N||(C+1<B.length?f(C+1):w(a==="adc"?"adc":"sajson"))};return j(S,{step:t,total:r,title:a==="adc"?"Google Vertex AI \u2014 current gcloud login":"Google Vertex AI \u2014 service account",children:Ye(Ne,{flexDirection:"column",children:[B.map((x,E)=>Ye(Ne,{children:[Ye(je,{color:E===C?s.accent:s.muted,children:[E===C?"\u276F ":" ",x.label,":"]}),j(je,{children:" "}),E===C?j(F,{value:x.value,placeholder:x.placeholder,onChange:x.set,onSubmit:T}):j(je,{color:x.value?void 0:s.muted,children:x.value||x.placeholder||""})]},x.key)),j(Ne,{marginTop:1,children:j(b,{children:a==="adc"?"Your host ~/.config/gcloud is mounted read-only; Vertex calls resolve via ADC.":"The SA key is mounted read-only into the api; GOOGLE_APPLICATION_CREDENTIALS points at it."})}),N&&j(Ne,{children:Ye(je,{color:s.accent,children:["\u25CF required \u2014 enter the ",M.key==="projectId"?"GCP project id":"service-account key path"," to continue"]})})]})})};import{useState as oe}from"react";import{Box as V,Text as q}from"ink";import Un from"node:fs";import Kn from"node:os";import $n from"node:path";import{jsx as A,jsxs as J}from"react/jsx-runtime";var jn=Kn.homedir(),Yn=e=>{try{return Un.existsSync($n.join(jn,e))}catch{return!1}},qn=()=>Yn(".azure"),Ht="2024-10-21",Jr=({initial:e,step:t,total:r,onDone:n})=>{let i=qn(),o=e.azureFoundry,l=o?.authMode?o.authMode:i?"azlogin":"apikey",[u,a]=oe("endpoint"),[d,c]=oe(l),[m,_]=oe(o?.endpointUrl||""),[p,g]=oe(o?.apiKey||""),[D,y]=oe(o?.tenantId||""),[h,R]=oe(o?.clientId||""),[v,C]=oe(o?.clientSecret||""),[f,w]=oe(o?.apiVersion||""),[B,M]=oe(o?.deploymentName||""),[N,T]=oe(0),x=()=>{let P={authMode:d,endpointUrl:m.trim(),apiVersion:f.trim()||Ht,deploymentName:B.trim()};d==="apikey"?P.apiKey=p:d==="entra"&&(P.tenantId=D.trim(),P.clientId=h.trim(),P.clientSecret=v),n({azureFoundry:P})};if(u==="endpoint")return A(S,{step:t,total:r,title:"Azure AI Foundry \u2014 models via your Azure endpoint",children:J(V,{flexDirection:"column",children:[J(V,{children:[A(q,{color:s.accent,children:"\u276F Endpoint URL: "}),A(F,{value:m,placeholder:"https://my-foundry.cognitiveservices.azure.com",onChange:_,onSubmit:()=>{m.trim()&&(c(l),a("mode"))}})]}),A(V,{marginTop:1,children:A(b,{children:"Your Azure AI Foundry endpoint URL (required)."})}),!m.trim()&&A(V,{children:A(q,{color:s.accent,children:"\u25CF required \u2014 enter the endpoint URL to continue"})})]})});if(u==="mode"){let P=[{label:"API key",value:"apikey"},{label:"Microsoft Entra app (tenant + client + secret)",value:"entra"}];return i&&P.push({label:"Use my current az login (~/.azure \u2014 mounted read-only)",value:"azlogin"}),A(S,{step:t,total:r,title:"Azure AI Foundry \u2014 authentication",children:J(V,{flexDirection:"column",children:[A(b,{children:"Pick how the platform authenticates to your Azure AI Foundry endpoint."}),i&&A(b,{children:"Detected ~/.azure \u2014 your current az login is available."}),A(V,{marginTop:1,children:A(z,{items:P.map(G=>({label:G.label,value:G.value})),initialIndex:Math.max(0,P.findIndex(G=>G.value===d)),onSelect:G=>{let Pe=G.value;c(Pe),T(0),a(Pe==="apikey"?"apikey":Pe==="entra"?"entra":"common")},indicatorComponent:({isSelected:G})=>A(q,{color:s.accent,children:G?"\u276F ":" "})})})]})})}if(u==="apikey")return A(S,{step:t,total:r,title:"Azure AI Foundry \u2014 API key",children:J(V,{flexDirection:"column",children:[J(V,{children:[A(q,{color:s.accent,children:"\u276F API key: "}),A(F,{value:p,mask:"\u2022",onChange:g,onSubmit:()=>{p.trim()&&(T(0),a("common"))}})]}),A(V,{marginTop:1,children:A(b,{children:"Written to .env as AIF_API_KEY."})}),!p.trim()&&A(V,{children:A(q,{color:s.accent,children:"\u25CF required \u2014 paste your API key to continue"})})]})});if(u==="entra"){let P=[{key:"tenantId",label:"Tenant id ",value:D,set:y,mask:!1},{key:"clientId",label:"Client id ",value:h,set:R,mask:!1},{key:"clientSecret",label:"Client secret ",value:v,set:C,mask:!0}],G=P[N],Pe=!G.value.trim(),bo=()=>{Pe||(N+1<P.length?T(N+1):(T(0),a("common")))};return A(S,{step:t,total:r,title:"Azure AI Foundry \u2014 Microsoft Entra app",children:J(V,{flexDirection:"column",children:[P.map((ne,xt)=>J(V,{children:[J(q,{color:xt===N?s.accent:s.muted,children:[xt===N?"\u276F ":" ",ne.label,":"]}),A(q,{children:" "}),xt===N?A(F,{value:ne.value,onChange:ne.set,onSubmit:bo,mask:ne.mask?"\u2022":void 0}):A(q,{children:ne.value?ne.mask?"\u2022".repeat(Math.min(ne.value.length,20)):ne.value:""})]},ne.key)),A(V,{marginTop:1,children:A(b,{children:"Written to .env as AIF_TENANT_ID / AIF_CLIENT_ID / AIF_CLIENT_SECRET."})}),Pe&&A(V,{children:J(q,{color:s.accent,children:["\u25CF required \u2014 enter the ",G.key==="clientSecret"?"client secret":G.key==="clientId"?"client id":"tenant id"," to continue"]})})]})})}let E=[{key:"apiVersion",label:"API version ",value:f,set:w,placeholder:Ht,required:!1},{key:"deploymentName",label:"Deployment / model ",value:B,set:M,placeholder:"gpt-4o",required:!0}],Y=E[N],Xt=!!Y.required&&!Y.value.trim(),_o=()=>{Xt||(N+1<E.length?T(N+1):x())};return A(S,{step:t,total:r,title:"Azure AI Foundry \u2014 deployment",children:J(V,{flexDirection:"column",children:[E.map((P,G)=>J(V,{children:[J(q,{color:G===N?s.accent:s.muted,children:[G===N?"\u276F ":" ",P.label,":"]}),A(q,{children:" "}),G===N?A(F,{value:P.value,placeholder:P.placeholder,onChange:P.set,onSubmit:_o}):A(q,{color:P.value?void 0:s.muted,children:P.value||P.placeholder||""})]},P.key)),A(V,{marginTop:1,children:J(b,{children:["API version defaults to ",Ht,". The deployment / model name is the chat model."]})}),Xt&&A(V,{children:A(q,{color:s.accent,children:"\u25CF required \u2014 enter the deployment / model name to continue"})})]})})};import{useState as Zr}from"react";import{Box as ct,Text as ut,useInput as ei}from"ink";import Jn from"node:fs";import Xn from"node:os";import Zn from"node:path";var Qn=Xn.homedir(),Ie=e=>{try{return Jn.existsSync(Zn.join(Qn,e))}catch{return!1}},le=[{id:"web",label:"Web",blurb:"Search + page fetch (DuckDuckGo, no auth).",disabledEnv:"OpenAgentic_WEB_MCP_DISABLED",needsAuth:!1,authType:"none",defaultOn:!0},{id:"admin",label:"Admin",blurb:"Platform admin helpers \u2014 Postgres/Redis/Milvus/health.",disabledEnv:"OpenAgentic_ADMIN_MCP_DISABLED",needsAuth:!1,authType:"none",defaultOn:!0},{id:"aws",label:"AWS",blurb:"EC2 / S3 / IAM / Cost Explorer \u2014 AWS read-only.",disabledEnv:"OpenAgentic_AWS_MCP_DISABLED",needsAuth:!0,authType:"env-file",envFile:"aws.env",envVars:[{env:"AWS_ACCESS_KEY_ID",label:"AWS access key id"},{env:"AWS_SECRET_ACCESS_KEY",label:"AWS secret access key",mask:!0},{env:"AWS_REGION",label:"AWS default region",hint:"e.g. us-east-1"}],hostCreds:{description:"Use my host AWS CLI creds (~/.aws \u2014 mounted read-only)",detect:()=>Ie(".aws/credentials")||Ie(".aws/config")},defaultOn:!0},{id:"azure",label:"Azure",blurb:"ARM / Graph / Key Vault / Monitor / Cost \u2014 Azure read-only.",disabledEnv:"OpenAgentic_AZURE_MCP_DISABLED",needsAuth:!0,authType:"env-file",envFile:"azure.env",envVars:[{env:"AZURE_TENANT_ID",label:"Azure tenant id"},{env:"AZURE_CLIENT_ID",label:"Azure client id (App Registration)"},{env:"AZURE_CLIENT_SECRET",label:"Azure client secret",mask:!0},{env:"AZURE_SUBSCRIPTION_ID",label:"Default subscription id"}],hostCreds:{description:"Use my host Azure CLI creds (~/.azure \u2014 mounted read-only)",detect:()=>Ie(".azure/azureProfile.json")||Ie(".azure/TokenCache")},defaultOn:!0},{id:"gcp",label:"GCP",blurb:"Projects / Compute / Storage / Logging / Monitoring.",disabledEnv:"OpenAgentic_GCP_MCP_DISABLED",needsAuth:!0,authType:"env-file",envFile:"gcp.env",envVars:[{env:"GCP_PROJECT_ID",label:"GCP project id"},{env:"GCP_REGION",label:"Default region",hint:"e.g. us-central1"},{env:"GCP_CREDENTIALS_FILE",label:"Service-account JSON path",hint:"inside the mcp-proxy container"}],hostCreds:{description:"Use my host gcloud creds (~/.config/gcloud \u2014 mounted read-only)",detect:()=>Ie(".config/gcloud/application_default_credentials.json")||Ie(".config/gcloud/credentials.db")},defaultOn:!0},{id:"kubernetes",label:"Kubernetes",blurb:"Pods / deployments / logs (your local kubeconfig).",disabledEnv:"OpenAgentic_KUBERNETES_MCP_DISABLED",needsAuth:!0,authType:"fields",envVars:[{env:"KUBECONFIG",label:"Path to kubeconfig",hint:"~/.kube/config on most machines"}],hostCreds:{description:"Use my host kubeconfig (~/.kube/config \u2014 mounted read-only)",detect:()=>Ie(".kube/config")},defaultOn:!0},{id:"github",label:"GitHub",blurb:"Repos / issues / PRs via a PAT.",disabledEnv:"OpenAgentic_GITHUB_MCP_DISABLED",needsAuth:!0,authType:"fields",envVars:[{env:"GITHUB_TOKEN",label:"GitHub personal access token",mask:!0}],defaultOn:!1},{id:"prometheus",label:"Prometheus",blurb:"Metric queries \u2014 installs an in-stack Prometheus (no URL needed).",disabledEnv:"OpenAgentic_PROMETHEUS_MCP_DISABLED",needsAuth:!1,authType:"none",bundledBackend:!0,defaultOn:!1},{id:"loki",label:"Loki",blurb:"Log queries \u2014 installs an in-stack Loki + Promtail (no URL needed).",disabledEnv:"OpenAgentic_LOKI_MCP_DISABLED",needsAuth:!1,authType:"none",bundledBackend:!0,defaultOn:!1}];function lt(e){return le.filter(t=>e.includes(t.id)&&t.needsAuth&&!t.bundledBackend)}function Xr(){return le.filter(e=>e.defaultOn).map(e=>e.id)}import{jsx as Fe,jsxs as dt}from"react/jsx-runtime";var Qr=({initial:e,step:t,total:r,onDone:n})=>{let[i,o]=Zr(new Set(e)),[l,u]=Zr(0);return ei((a,d)=>{if(d.upArrow){u(c=>Math.max(0,c-1));return}if(d.downArrow){u(c=>Math.min(le.length-1,c+1));return}if(a===" "){let c=le[l].id,m=new Set(i);m.has(c)?m.delete(c):m.add(c),o(m);return}if(d.return){n(Array.from(i));return}if(a==="a"){o(new Set(le.map(c=>c.id)));return}if(a==="n"){o(new Set);return}}),Fe(S,{step:t,total:r,title:"Which MCPs do you want enabled?",children:dt(ct,{flexDirection:"column",children:[le.map((a,d)=>{let c=i.has(a.id),m=d===l,_=c?"[x]":"[ ]",p=m?s.accent:"white",g=s.muted;return dt(ct,{children:[Fe(ut,{color:m?s.accent:s.muted,children:m?"\u276F ":" "}),Fe(ut,{color:c?s.ok:s.muted,children:_}),Fe(ct,{width:20,children:dt(ut,{color:p,children:[" ",a.label]})}),dt(ut,{color:g,children:[" ",a.blurb]})]},a.id)}),Fe(ct,{marginTop:1,children:Fe(b,{children:"Space toggles \xB7 a = all \xB7 n = none \xB7 Enter to continue"})})]})})};import{useState as Je,useEffect as eo}from"react";import{Box as qe,Text as We}from"ink";import ti from"node:fs";import ri from"node:os";import to from"node:path";import{jsx as ee,jsxs as mt}from"react/jsx-runtime";var oi=to.join(ri.homedir(),".openagentic","cloud-secrets"),ro=({enabledIds:e,initialAuth:t,step:r,total:n,onDone:i})=>{let o=lt(e).filter(p=>!p.bundledBackend),[l,u]=Je(0),[a,d]=Je({...t}),c=o.length===0;if(eo(()=>{c&&i(a)},[c]),c)return null;let m=o[l],_=p=>{let g={...a,...p};d(g),l+1<o.length?u(l+1):i(g)};return ee(S,{step:r,total:n,title:`${m.label}: credentials (${l+1} of ${o.length})`,children:ee(ni,{mcp:m,auth:a,onDone:_},m.id)})},ni=({mcp:e,auth:t,onDone:r})=>{let n=e.envFile?to.join(oi,e.envFile):void 0,i=!!n&&ti.existsSync(n),o=e.authType==="fields"&&(e.hostCreds?.detect()??!1),[l,u]=Je(e.authType==="env-file"||o?"choose-source":"fields"),[a,d]=Je(0),[c,m]=Je(e.envVars?Object.fromEntries(e.envVars.map(g=>[g.env,t[g.env]??""])):{}),_=e.envVars?.[a],p=l==="fields"&&!_;if(eo(()=>{p&&r(c)},[p]),l==="choose-source"){let D=[...e.hostCreds?.detect()??!1?[{label:`${e.hostCreds.description} (detected \u2014 recommended)`,value:"host-creds"}]:[],...e.authType==="env-file"?i?[{label:`Use ${n} (detected)`,value:"use-file"}]:[{label:`Create empty ${n} stub (fill in later)`,value:"stub"}]:[],{label:e.authType==="env-file"?"Paste credentials inline now":"Enter credentials inline",value:"paste"},{label:"Skip (this MCP will stay disabled)",value:"skip"}];return mt(qe,{flexDirection:"column",children:[ee(We,{color:s.muted,children:e.blurb}),ee(qe,{marginTop:1,children:ee(z,{items:D,onSelect:y=>{y.value==="host-creds"||y.value==="use-file"||y.value==="stub"?r({}):y.value==="skip"?r({[`__skip_${e.id}`]:"1"}):u("fields")},indicatorComponent:({isSelected:y})=>ee(We,{color:s.accent,children:y?"\u276F ":" "})})})]})}return _?mt(qe,{flexDirection:"column",children:[ee(We,{color:s.muted,children:e.blurb}),e.envVars.map((g,D)=>mt(qe,{children:[mt(We,{color:D===a?s.accent:s.muted,children:[D===a?"\u276F ":" ",g.label.padEnd(32)]}),ee(We,{children:": "}),D===a?ee(F,{value:c[g.env]??"",onChange:y=>m({...c,[g.env]:y}),mask:g.mask?"\u2022":void 0,onSubmit:()=>{a+1<e.envVars.length?d(a+1):r(c)}}):ee(We,{children:g.mask&&c[g.env]?"\u2022".repeat(Math.min(c[g.env].length,16)):c[g.env]||""})]},g.env)),ee(qe,{marginTop:1,children:ee(b,{children:"Enter to advance \xB7 leave blank to skip an optional field"})})]}):null};import{Box as ze,Text as pt}from"ink";import{jsx as ce,jsxs as ft}from"react/jsx-runtime";var ii=e=>{switch(e){case"none":return"none chosen \u2014 chat will fail until you pick a provider";case"ollama":return"Ollama \u2014 local models on this machine";case"bedrock":return"AWS Bedrock \u2014 models via your AWS account";case"vertex":return"Google Vertex AI \u2014 Gemini models via your GCP project";case"aif":return"Azure AI Foundry \u2014 models via your Azure endpoint";case"skip":return"skipped \u2014 configure in admin panel"}},ai=e=>e?`${e.authMode==="awslogin"?"current AWS login (~/.aws)":"inline IAM keys"}, region ${e.region}`:"none \u2014 chat will fail until set",si=e=>{if(!e||!e.projectId)return"none \u2014 chat will fail until set";let t=e.authMode==="sajson"?`SA key ${e.saKeyPath||""}`:"current gcloud login (ADC)";return`${e.projectId} (${e.location}), ${t}`},li=e=>{if(!e||!e.endpointUrl)return"none \u2014 chat will fail until set";let t=e.authMode==="apikey"?"API key":e.authMode==="entra"?"Microsoft Entra app":"current az login (~/.azure)";return`${e.endpointUrl}, ${t}`},oo=({config:e,step:t,total:r,onLaunch:n,onCancel:i})=>{let l=lt(e.mcps).filter(d=>d.authType==="fields"&&d.envVars?!d.envVars.some(c=>e.mcpAuth[c.env]):!1),u=e.mcps.length===0?"none selected":`${e.mcps.length} enabled (${e.mcps.slice(0,4).join(", ")}${e.mcps.length>4?"\u2026":""})`,a=(d,c,m)=>ft(ze,{children:[ce(ze,{width:18,children:ce(pt,{color:s.muted,children:d})}),ce(pt,{color:m,children:c})]},d);return ft(S,{step:t,total:r,title:"Review & launch",children:[ft(ze,{flexDirection:"column",children:[a("deploy target",e.target),e.target==="helm"&&e.kubeconfigPath&&a("kubeconfig",e.kubeconfigPath),a("admin email",e.admin.email),a("LLM strategy",ii(e.llmStrategy)),e.llmStrategy==="ollama"&&a("ollama host",e.ollama.host),e.llmStrategy==="ollama"&&a("embedding model",e.ollama.embedModel),e.llmStrategy==="bedrock"&&a("AWS Bedrock",ai(e.providers.bedrock)),e.llmStrategy==="bedrock"&&a("chat model",e.providers.bedrock?.model||"amazon.nova-pro-v1:0"),e.llmStrategy==="vertex"&&a("Vertex AI",si(e.providers.vertex),e.providers.vertex?.projectId?void 0:s.err),e.llmStrategy==="vertex"&&a("chat model",e.providers.vertex?.model||"gemini-1.5-pro"),e.llmStrategy==="aif"&&a("Azure AI Foundry",li(e.providers.azureFoundry),e.providers.azureFoundry?.endpointUrl?void 0:s.err),e.llmStrategy==="aif"&&a("deployment / model",e.providers.azureFoundry?.deploymentName||"(unset)",e.providers.azureFoundry?.deploymentName?void 0:s.err),a("MCPs",u),a("UI port",String(e.uiPort)),l.length>0&&ce(ze,{marginTop:1,children:ft(pt,{color:s.err,children:["\u26A0 missing creds: ",l.map(d=>d.label).join(", ")]})})]}),ce(ze,{marginTop:1,children:ce(z,{items:[{label:`Launch ${e.target}`,value:"go"},{label:"Cancel",value:"no"}],onSelect:d=>d.value==="go"?n():i(),indicatorComponent:({isSelected:d})=>ce(pt,{color:s.accent,children:d?"\u276F ":" "})})}),ce(ze,{marginTop:1,children:ce(b,{children:"Nothing has been written to disk yet. Launch will write .env and bring the stack up."})})]})};import{useEffect as gi,useState as hi}from"react";import{Box as $t,Text as ht}from"ink";import _i from"open";import Xe from"node:fs";import di from"node:crypto";import{fileURLToPath as ci}from"node:url";import Oe from"node:path";var ui=Oe.dirname(ci(import.meta.url)),Re=process.env.OPENAGENTIC_HOME?Oe.resolve(process.env.OPENAGENTIC_HOME):Oe.resolve(ui,"..","..","..",".."),gt=Oe.join(Re,".env"),Gt=Oe.join(Re,".env.example"),Vl=Oe.join(Re,"docker-compose.yml"),Hl=Oe.join(Re,"helm","openagentic");var Ut="REPLACE_ME_AT_INSTALL_TIME",no=(e=24)=>di.randomBytes(e).toString("base64url");function Kt(){return Xe.existsSync(gt)?pi(Xe.readFileSync(gt,"utf8")):{}}var mi=["POSTGRES_PASSWORD","JWT_SECRET","SIGNING_SECRET","INTERNAL_API_KEY","FRONTEND_SECRET","INTERNAL_SERVICE_SECRET"];function io(e){let t=Xe.existsSync(Gt)?Xe.readFileSync(Gt,"utf8"):"",r=Kt();e={...e};for(let l of mi)l in e||(e[l]=r[l]&&r[l]!==Ut?r[l]:no(32));let n=t.split(`
|
|
8
|
+
`).map(l=>{let u=/^(\s*)([A-Z0-9_]+)\s*=(.*)$/.exec(l);if(u){let a=u[2],d=u[3];if(a in e)return`${u[1]}${a}=${e[a]}`;if(d.trim()===Ut)return`${u[1]}${a}=${r[a]&&r[a]!==Ut?r[a]:no()}`}return l}),i=new Set(t.split(`
|
|
9
|
+
`).flatMap(l=>{let u=/^\s*([A-Z0-9_]+)\s*=/.exec(l);return u?[u[1]]:[]})),o=Object.entries(e).filter(([l])=>!i.has(l));if(o.length>0){n.push("","# \u2500\u2500\u2500 Added by setup wizard \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500");for(let[l,u]of o)n.push(`${l}=${u}`)}Xe.writeFileSync(gt,n.join(`
|
|
10
|
+
`),"utf8")}function pi(e){let t={};for(let r of e.split(`
|
|
11
|
+
`)){let n=/^\s*([A-Z0-9_]+)\s*=\s*(.*?)\s*$/.exec(r);if(!n)continue;let i=n[2];(i.startsWith('"')&&i.endsWith('"')||i.startsWith("'")&&i.endsWith("'"))&&(i=i.slice(1,-1)),t[n[1]]=i}return t}import{execa as ao}from"execa";function fi(e){if(!e)return!1;try{return new URL(e).hostname==="ollama"}catch{return/(^|\/\/)ollama(:|\/|$)/.test(e)}}async function so(e,t){let r=e.llmStrategy==="ollama"&&fi(e.ollama?.host),n=e.mcps.includes("prometheus")||e.mcps.includes("loki"),i=[...r?["--profile","ollama"]:[],...n?["--profile","monitoring"]:[]],o=i.length?`docker compose ${i.join(" ")}`:"docker compose";t.onBuild?.(`${o} build (first run may take several minutes)`),await ao("docker",["compose",...i,"build"],{cwd:Re}),t.onBuildDone?.(),t.onStart?.(`${o} up -d`),await ao("docker",["compose",...i,"up","-d"],{cwd:Re}),t.onStartDone?.();let l=`http://localhost:${e.uiPort}`;t.onHealth?.(`waiting for ${l}/api/health`);let u=Date.now();for(;Date.now()-u<10*6e4;){try{if((await fetch(`${l}/api/health`)).ok)return t.onHealthDone?.(),l}catch{}await new Promise(a=>setTimeout(a,3e3))}throw new Error("API did not become healthy within 10 minutes. Run 'docker compose logs api' to investigate.")}async function lo(e,t){throw new Error("Helm deploy is not wired up yet \u2014 the chart at helm/openagentic needs a cleanup pass before the wizard can drive it. Use the Docker path for now.")}import{jsx as Ve,jsxs as Yt}from"react/jsx-runtime";var _t=process.env.WIZARD_DRY_RUN==="1",co="nomic-embed-text",jt=768,uo="gpt-oss:20b",bt="6",bi="text-embedding-005",mo=768,vi="/var/secrets/gcp/key.json",fo=({config:e,step:t,total:r,onDone:n})=>{let[i,o]=hi(()=>(_t?["Write .env (dry-run)","Skip build (dry-run)","Skip start (dry-run)","Skip health (dry-run)","Skip browser (dry-run)"]:["Write .env",e.target==="docker"?"Build images":"Render chart",e.target==="docker"?"Start containers":"Apply release","Wait for health","Open browser"]).map(a=>({label:a,state:"pending"}))),l=(u,a)=>o(d=>d.map((c,m)=>m===u?{...c,...a}:c));return gi(()=>{let u=!1;return(async()=>{try{if(l(0,{state:"running"}),io(xi(e)),l(0,{state:"ok"}),_t){l(1,{state:"ok",detail:"skipped"}),l(2,{state:"ok",detail:"skipped"}),l(3,{state:"ok",detail:"skipped"}),l(4,{state:"ok",detail:"skipped"}),setTimeout(n,50);return}let d=await(e.target==="docker"?so:lo)(e,{onBuild:c=>!u&&l(1,{state:"running",detail:c}),onBuildDone:()=>!u&&l(1,{state:"ok"}),onStart:c=>!u&&l(2,{state:"running",detail:c}),onStartDone:()=>!u&&l(2,{state:"ok"}),onHealth:c=>!u&&l(3,{state:"running",detail:c}),onHealthDone:()=>!u&&l(3,{state:"ok"})});if(u)return;l(4,{state:"running",detail:d});try{await _i(d)}catch{}l(4,{state:"ok",detail:d}),setTimeout(n,1200)}catch(a){if(u)return;let d=a instanceof Error?a.message:String(a);o(c=>c.map(m=>m.state==="running"?{...m,state:"fail",detail:d}:m))}})(),()=>{u=!0}},[e]),Yt(S,{step:t,total:r,title:_t?"Bringing up openagentic (dry-run)":"Bringing up openagentic",children:[Ve($t,{flexDirection:"column",children:i.map((u,a)=>Yt($t,{children:[Ve(ht,{color:po(u.state).color,children:po(u.state).char}),Ve(ht,{children:" "}),Ve(ht,{children:u.label}),u.detail?Yt(ht,{color:s.muted,children:[" ",u.detail.slice(0,80)]}):null]},a))}),Ve($t,{marginTop:1,children:Ve(b,{children:_t?"WIZARD_DRY_RUN=1 \u2014 only .env is written; no containers are touched.":"First boot pulls the embedding model and seeds Milvus \u2014 give it a couple minutes."})})]})};function po(e){switch(e){case"ok":return{char:"\u2713",color:s.ok};case"fail":return{char:"\u2717",color:s.err};case"running":return{char:"\u25E6",color:s.accent};default:return{char:"\xB7",color:s.muted}}}function xi(e){let t=e.llmStrategy==="ollama",r=e.llmStrategy==="bedrock",n=e.llmStrategy==="vertex",i=e.llmStrategy==="aif",o={ADMIN_USER_EMAIL:e.admin.email,ADMIN_SEED_PASSWORD:e.admin.password,LOCAL_ADMIN_USERNAME:e.admin.name,UI_HOST_PORT:String(e.uiPort),MCPS_ENABLED:e.mcps.join(",")};t?(o.OLLAMA_HOST=e.ollama.host,o.OLLAMA_EMBED_MODEL=e.ollama.embedModel,o.OLLAMA_ENABLED="true",o.EMBEDDING_PROVIDER="ollama",o.OLLAMA_CHAT_MODEL=uo,o.BOOTSTRAP_PROVIDER_NAME="ollama-local",o.BOOTSTRAP_PROVIDER_DISPLAY_NAME="Ollama (local)",o.BOOTSTRAP_PROVIDER_TYPE="ollama",o.BOOTSTRAP_PROVIDER_CONFIG=JSON.stringify({endpoint:e.ollama.host}),o.BOOTSTRAP_PROVIDER_DEFAULTS=JSON.stringify({chat:uo,embedding:e.ollama.embedModel,embeddingDimension:jt}),o.SEEDER_VERSION=bt):o.OLLAMA_ENABLED="false";let l=e.providers.bedrock;if(r&&l){let c=(l.region||"us-east-1").trim()||"us-east-1",m=(l.model||"").trim()||"amazon.nova-pro-v1:0";o.AWS_REGION=c,l.authMode==="keys"&&l.accessKeyId&&l.secretAccessKey&&(o.AWS_ACCESS_KEY_ID=l.accessKeyId,o.AWS_SECRET_ACCESS_KEY=l.secretAccessKey),o.BOOTSTRAP_PROVIDER_NAME="aws-bedrock",o.BOOTSTRAP_PROVIDER_DISPLAY_NAME="AWS Bedrock",o.BOOTSTRAP_PROVIDER_TYPE="aws-bedrock",o.BOOTSTRAP_PROVIDER_CONFIG=JSON.stringify({region:c}),o.BOOTSTRAP_PROVIDER_DEFAULTS=JSON.stringify({chat:m,embedding:co,embeddingDimension:jt}),o.SEEDER_VERSION=bt}let u=e.providers.vertex;if(n&&u){let c=(u.projectId||"").trim(),m=(u.location||"us-central1").trim()||"us-central1",_=(u.model||"").trim()||"gemini-1.5-pro",p=bi;o.GOOGLE_CLOUD_PROJECT=c,o.GOOGLE_CLOUD_LOCATION=m,o.VERTEX_PROJECT=c,o.VERTEX_LOCATION=m,o.VERTEX_CHAT_MODEL=_,o.EMBEDDING_PROVIDER="vertex-ai",o.GCP_PROJECT_ID=c,o.GCP_LOCATION=m,o.GCP_EMBEDDING_MODEL=p,o.EMBEDDING_DIMENSIONS=String(mo),o.SKIP_TOOL_SEMANTIC_CACHE="false",u.authMode==="sajson"&&u.saKeyPath&&(o.GCP_SA_KEY_FILE=u.saKeyPath.startsWith("~")?(process.env.HOME||"")+u.saKeyPath.slice(1):u.saKeyPath,o.GOOGLE_APPLICATION_CREDENTIALS=vi),o.VERTEX_AI_API_KEY="",o.GEMINI_API_KEY="",o.BOOTSTRAP_PROVIDER_NAME="google-vertex",o.BOOTSTRAP_PROVIDER_DISPLAY_NAME="Google Vertex AI",o.BOOTSTRAP_PROVIDER_TYPE="vertex-ai",o.BOOTSTRAP_PROVIDER_CONFIG=JSON.stringify({projectId:c,location:m}),o.BOOTSTRAP_PROVIDER_DEFAULTS=JSON.stringify({chat:_,embedding:p,embeddingDimension:mo}),o.SEEDER_VERSION=bt}let a=e.providers.azureFoundry;if(i&&a){let c=(a.endpointUrl||"").trim(),m=(a.apiVersion||"").trim()||"2024-10-21",_=(a.deploymentName||"").trim();o.AIF_ENDPOINT_URL=c,o.AIF_API_VERSION=m,o.AIF_MODEL=_,a.authMode==="apikey"&&a.apiKey?o.AIF_API_KEY=a.apiKey:a.authMode==="entra"&&(a.tenantId&&(o.AIF_TENANT_ID=a.tenantId),a.clientId&&(o.AIF_CLIENT_ID=a.clientId),a.clientSecret&&(o.AIF_CLIENT_SECRET=a.clientSecret)),o.BOOTSTRAP_PROVIDER_NAME="azure-ai-foundry",o.BOOTSTRAP_PROVIDER_DISPLAY_NAME="Azure AI Foundry",o.BOOTSTRAP_PROVIDER_TYPE="azure-ai-foundry";let p={endpointUrl:c,apiVersion:m,deploymentName:_};a.authMode==="entra"&&(a.tenantId&&(p.tenantId=a.tenantId),a.clientId&&(p.clientId=a.clientId)),o.BOOTSTRAP_PROVIDER_CONFIG=JSON.stringify(p),o.BOOTSTRAP_PROVIDER_DEFAULTS=JSON.stringify({chat:_,embedding:co,embeddingDimension:jt}),o.SEEDER_VERSION=bt}let d=new Set(e.mcps);for(let c of le)o[c.disabledEnv]=d.has(c.id)?"false":"true";(d.has("prometheus")||d.has("loki"))&&(o.PROMETHEUS_URL="http://prometheus:9090",o.LOKI_URL="http://loki:3100",o.OTEL_EXPORTER_OTLP_ENDPOINT="http://otel-collector:4317");for(let[c,m]of Object.entries(e.mcpAuth))c.startsWith("__skip_")||m&&(o[c]=m);return o}var ue={target:"docker",llmStrategy:"none",admin:{email:"admin@openagentic.local",password:"",name:"Admin"},ollama:{host:"http://ollama:11434",embedModel:"nomic-embed-text"},providers:{},mcps:[],mcpAuth:{},uiPort:8080};import{jsx as H,jsxs as vt}from"react/jsx-runtime";var ki=()=>{let e=Kt(),[t,r]=qt(()=>({...ue,admin:{...ue.admin,email:e.ADMIN_USER_EMAIL||ue.admin.email,name:e.LOCAL_ADMIN_USERNAME||ue.admin.name},ollama:{...ue.ollama,host:e.OLLAMA_HOST||ue.ollama.host,embedModel:e.OLLAMA_EMBED_MODEL||ue.ollama.embedModel},providers:e.AWS_REGION||e.AWS_ACCESS_KEY_ID?{bedrock:{authMode:e.AWS_ACCESS_KEY_ID?"keys":"awslogin",region:e.AWS_REGION||"us-east-1",accessKeyId:e.AWS_ACCESS_KEY_ID||void 0,secretAccessKey:e.AWS_SECRET_ACCESS_KEY||void 0,model:e.BEDROCK_CHAT_MODEL||"amazon.nova-pro-v1:0"}}:e.AIF_ENDPOINT_URL?{azureFoundry:{authMode:e.AIF_API_KEY?"apikey":e.AIF_TENANT_ID&&e.AIF_CLIENT_ID&&e.AIF_CLIENT_SECRET?"entra":"azlogin",endpointUrl:e.AIF_ENDPOINT_URL||"",apiKey:e.AIF_API_KEY||void 0,tenantId:e.AIF_TENANT_ID||void 0,clientId:e.AIF_CLIENT_ID||void 0,clientSecret:e.AIF_CLIENT_SECRET||void 0,apiVersion:e.AIF_API_VERSION||"2024-10-21",deploymentName:e.AIF_MODEL||""}}:e.VERTEX_PROJECT||e.GOOGLE_CLOUD_PROJECT?{vertex:{authMode:e.GCP_SA_KEY_FILE?"sajson":"adc",projectId:e.VERTEX_PROJECT||e.GOOGLE_CLOUD_PROJECT||"",location:e.VERTEX_LOCATION||e.GOOGLE_CLOUD_LOCATION||"us-central1",model:e.VERTEX_CHAT_MODEL||"gemini-1.5-pro",saKeyPath:e.GCP_SA_KEY_FILE||void 0}}:{},mcps:e.MCPS_ENABLED?e.MCPS_ENABLED.split(",").map(f=>f.trim()).filter(Boolean):Xr(),mcpAuth:{},uiPort:e.UI_HOST_PORT?Number(e.UI_HOST_PORT):ue.uiPort})),[n,i]=qt("target"),o=t.llmStrategy,l=f=>r(w=>({...w,llmStrategy:f})),u=t.target==="helm"?1:0,a=o==="ollama"?1:0,d=o==="bedrock"?1:0,c=o==="vertex"?1:0,m=o==="aif"?1:0,_=1+u+1+1+a+d+c+m+1+1+1+1,p=1,g={target:p++,helmPreflight:t.target==="helm"?p++:0,admin:p++,llmStrategy:p++,ollama:a?p++:0,providers:d?p++:0,vertex:c?p++:0,aif:m?p++:0,mcps:p++,mcpAuth:p++,review:p++,launch:p++},D=f=>f==="ollama"?"ollama":f==="bedrock"?"providers":f==="vertex"?"vertex":f==="aif"?"aif":"mcps",[y,h]=qt(!1),R={target:"Where do you want to run openagentic?","helm-preflight":"Checking your cluster",admin:"Create your admin account","llm-strategy":"Which LLM provider should the platform use?",ollama:"Where is your Ollama?",providers:"AWS Bedrock \u2014 models via your AWS account",vertex:"Google Vertex AI \u2014 Gemini via your GCP project",aif:"Azure AI Foundry \u2014 models via your Azure endpoint",mcps:"Which MCPs do you want enabled?","mcp-auth":"MCP credentials",review:"Review & launch",launch:"Bringing up openagentic",done:"Review & launch"},v=new Set(["target","llm-strategy","mcps","review"]),C=R[n];return Ei((f,w)=>{if(y){(f==="?"||w.escape)&&h(!1);return}if(v.has(n)){if(f==="?"){h(!0);return}if(f==="d"){Ai(De(C).url).catch(()=>{});return}}}),y?H(ir,{title:C,onClose:()=>h(!1)}):n==="target"?H(dr,{onPick:f=>{r({...t,target:f}),i(f==="helm"?"helm-preflight":"admin")}}):n==="helm-preflight"?H(Lr,{onContinue:f=>{r({...t,kubeconfigPath:f}),i("admin")},onBackToDocker:()=>{r({...t,target:"docker",kubeconfigPath:void 0}),i("admin")}}):n==="admin"?H(wr,{initial:t.admin,step:g.admin,total:_,onDone:f=>{r({...t,admin:f}),i("llm-strategy")}}):n==="llm-strategy"?H(Wr,{step:g.llmStrategy,total:_,onPick:f=>{l(f),i(D(f))}}):n==="ollama"?H(Hr,{initial:t.ollama,step:g.ollama,total:_,onDone:f=>{r({...t,ollama:f}),i("mcps")}}):n==="providers"?H(Ur,{initial:t.providers,step:g.providers,total:_,onDone:f=>{r({...t,providers:f}),i("mcps")}}):n==="vertex"?H(qr,{initial:t.providers,step:g.vertex,total:_,onDone:f=>{r({...t,providers:f}),i("mcps")}}):n==="aif"?H(Jr,{initial:t.providers,step:g.aif,total:_,onDone:f=>{r({...t,providers:f}),i("mcps")}}):n==="mcps"?H(Qr,{initial:t.mcps,step:g.mcps,total:_,onDone:f=>{r({...t,mcps:f}),i("mcp-auth")}}):n==="mcp-auth"?H(ro,{enabledIds:t.mcps,initialAuth:t.mcpAuth,step:g.mcpAuth,total:_,onDone:f=>{let w=Object.keys(f).filter(M=>M.startsWith("__skip_")).map(M=>M.slice(7)),B={};for(let[M,N]of Object.entries(f))M.startsWith("__skip_")||(B[M]=N);r({...t,mcps:t.mcps.filter(M=>!w.includes(M)),mcpAuth:B}),i("review")}}):n==="review"?H(oo,{config:t,step:g.review,total:_,onLaunch:()=>i("launch"),onCancel:()=>process.exit(0)}):n==="launch"?H(fo,{config:t,step:g.launch,total:_,onDone:()=>i("done")}):vt(go,{flexDirection:"column",children:[H(kt,{}),vt(go,{marginLeft:2,flexDirection:"column",children:[H(Jt,{color:s.ok,bold:!0,children:"openagentic is running"}),vt(Jt,{color:s.muted,children:["open http://localhost:",t.uiPort," in your browser"]}),vt(Jt,{color:s.muted,children:["sign in with ",t.admin.email]})]})]})},ho=!1;try{ho=!!process.argv[1]&&yi(process.argv[1])===Si(import.meta.url)}catch{}if(ho){process.stdout.isTTY&&process.stdout.write("\x1B[2J\x1B[3J\x1B[H");let e=t=>{let r=t instanceof Error?t.stack||t.message:String(t);process.stderr.write(`
|
|
12
12
|
\u2717 The setup wizard hit an unexpected error.
|
|
13
13
|
${r}
|
|
14
14
|
|
|
@@ -16,4 +16,4 @@ var eo=Object.create;var Lt=Object.defineProperty;var to=Object.getOwnPropertyDe
|
|
|
16
16
|
Help: https://openagentics.io/docs/troubleshooting
|
|
17
17
|
Issues: https://github.com/agentic-work/openagentic/issues
|
|
18
18
|
|
|
19
|
-
`),process.exit(1)};process.on("uncaughtException",e),process.on("unhandledRejection",e),
|
|
19
|
+
`),process.exit(1)};process.on("uncaughtException",e),process.on("unhandledRejection",e),Ti(H(tt,{children:H(ki,{})}))}export{ki as App};
|