@agenticwork/openagentic 1.0.3 → 1.0.4
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 +15 -14
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
var Wo=Object.create;var mr=Object.defineProperty;var zo=Object.getOwnPropertyDescriptor;var Go=Object.getOwnPropertyNames;var $o=Object.getPrototypeOf,Ko=Object.prototype.hasOwnProperty;var pr=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Uo=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Go(t))!Ko.call(e,i)&&i!==r&&mr(e,i,{get:()=>t[i],enumerable:!(o=zo(t,i))||o.enumerable});return e};var jo=(e,t,r)=>(r=e!=null?Wo($o(e)):{},Uo(t||!e||!e.__esModule?mr(r,"default",{value:e,enumerable:!0}):r,e));var Ar=pr((ga,xn)=>{xn.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 kr=pr((ha,Ir)=>{"use strict";var mt=Object.assign({},Ar()),Tr=Object.keys(mt);Object.defineProperty(mt,"random",{get(){let e=Math.floor(Math.random()*Tr.length),t=Tr[e];return mt[t]}});Ir.exports=mt});import{useState as cr}from"react";import{realpathSync as li}from"fs";import{fileURLToPath as ci}from"url";import ui from"open";import{render as di,Box as Lo,Text as ur,useInput as mi}from"ink";import{Text as ge,Box as Ce}from"ink";import{Text as ke}from"ink";import{jsx as Oe}from"react/jsx-runtime";function Yo(e,t,r){let o=[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"#"+o.map((n,f)=>Math.round(n+(i[f]-n)*Math.max(0,Math.min(1,r)))).map(n=>n.toString(16).padStart(2,"0")).join("")}function Dt(e,t){if(e.length===1)return e[0];let r=Math.max(0,Math.min(1,t))*(e.length-1),o=Math.min(e.length-2,Math.floor(r));return Yo(e[o],e[o+1],r-o)}var Bt=({text:e,stops:t,bold:r,dim:o})=>{let i=[...e],s=Math.max(1,i.length-1);return Oe(ke,{children:i.map((n,f)=>Oe(ke,{color:Dt(t,f/s),bold:r,dimColor:o,children:n},f))})},He=({width:e,stops:t,char:r="\u2500"})=>{let o=Math.max(1,e-1);return Oe(ke,{children:Array.from({length:e},(i,s)=>Oe(ke,{color:Dt(t,s/o),children:r},s))})},lt=({value:e,total:t,width:r,stops:o,track:i="#2C3A31"})=>{let s=Math.max(0,Math.min(r,Math.round(e/Math.max(1,t)*r))),n=Math.max(1,r-1);return Oe(ke,{children:Array.from({length:r},(f,l)=>l<s?Oe(ke,{color:Dt(o,l/n),children:"\u2501"},l):Oe(ke,{color:i,children:"\u2500"},l))})};import{Text as qe,Box as wt}from"ink";import{Text as Jo}from"ink";import{jsx as Xo}from"react/jsx-runtime";var Mt="\x1B",fr=`${Mt}\\`;function qo(e,t){return`${Mt}]8;;${e}${fr}${t}${Mt}]8;;${fr}`}var fe=({url:e,text:t})=>Xo(Jo,{color:a.signal,underline:!0,children:qo(e,t)});var Zo="https://www.openagentics.io/docs/";function We(e){return{url:Zo,label:"docs"}}import{jsx as ne,jsxs as Xe}from"react/jsx-runtime";var Qo=["#2C3A31","#3A4A3E","#2C3A31"],en=()=>Math.max(44,Math.min((process.stdout.columns||80)-6,88)),ze=({k:e,gloss:t,last:r})=>Xe(qe,{children:[ne(qe,{color:a.muted,children:e}),Xe(qe,{color:a.faint,children:[" ",t]}),r?null:ne(qe,{color:a.faint,children:" \xB7 "})]}),gr=({title:e})=>{let t=We(e);return Xe(wt,{flexDirection:"column",marginTop:1,children:[ne(He,{width:en(),stops:Qo}),Xe(wt,{children:[ne(ze,{k:"\u2191\u2193",gloss:"move"}),ne(ze,{k:"\u21B5",gloss:"select"}),ne(ze,{k:"?",gloss:"help"}),ne(ze,{k:"d",gloss:"docs"}),ne(ze,{k:"esc",gloss:"back"}),ne(ze,{k:"^C",gloss:"quit",last:!0})]}),Xe(wt,{marginTop:0,children:[ne(qe,{color:a.faint,children:"\u{1F4D6} "}),ne(fe,{url:t.url,text:`${t.label} \u2192`})]})]})};import{jsx as Y,jsxs as he}from"react/jsx-runtime";var a={accent:"#88CCA0",accentDeep:"#5FA877",ink:"#F3F1EC",muted:"#7E927E",faint:"#56654F",ok:"#88CCA0",warn:"#D9AE52",err:"#E0663A",signal:"#DB8240",teal:"#9FD8C4",espresso:"#1F0D04",burntOrange:"#B83A0E"},Nt=["#6FB3A8","#9FD8C4","#88CCA0","#D9AE52","#DB8240"],tn=["#F3F1EC","#88CCA0","#5FA877"],hr=()=>Math.max(44,Math.min((process.stdout.columns||80)-6,88)),Lt=()=>{let e=hr();return he(Ce,{flexDirection:"column",paddingY:1,children:[he(Ce,{width:e,justifyContent:"space-between",children:[he(Ce,{children:[Y(Bt,{text:"\u2325",stops:tn,bold:!0}),he(ge,{color:a.signal,bold:!0,children:[" ","\xB7"," "]}),Y(Bt,{text:"openagentic",stops:Nt,bold:!0})]}),Y(ge,{color:a.faint,children:"self-hosted \xB7 docker / k8s \xB7 v1.0"})]}),Y(He,{width:e,stops:Nt}),Y(ge,{color:a.muted,children:"the open agentic platform for IT operations"})]})},rn=({step:e,total:t,title:r})=>he(Ce,{flexDirection:"column",marginBottom:1,children:[he(Ce,{children:[Y(ge,{color:a.accent,bold:!0,children:String(e).padStart(2,"0")}),he(ge,{color:a.faint,children:[" / ",String(t).padStart(2,"0")]}),Y(ge,{color:a.faint,children:" "}),Y(ge,{color:a.ink,bold:!0,children:r})]}),Y(Ce,{marginTop:0,children:Y(lt,{value:e,total:t,width:Math.min(36,hr()),stops:Nt})})]}),v=({children:e})=>Y(ge,{color:a.muted,children:e}),A=({step:e,total:t,title:r,children:o})=>he(Ce,{flexDirection:"column",paddingX:2,children:[Y(Lt,{}),Y(rn,{step:e,total:t,title:r}),o,Y(gr,{title:r})]});import{Text as Re,Box as _e}from"ink";import{jsx as ee,jsxs as ct}from"react/jsx-runtime";var on=[{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 nn(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 _r=({title:e})=>{let t=We(e);return ee(_e,{flexDirection:"column",paddingX:2,paddingY:1,children:ct(_e,{flexDirection:"column",borderStyle:"round",borderColor:a.signal,paddingX:2,paddingY:1,children:[ee(Re,{color:a.signal,bold:!0,children:"\u2325 keys & help"}),ee(_e,{marginTop:1,flexDirection:"column",children:on.map(r=>ct(_e,{children:[ee(_e,{width:8,children:ee(Re,{color:a.accent,bold:!0,children:r.key})}),ee(Re,{color:a.ink,children:r.gloss})]},r.key))}),ct(_e,{marginTop:1,flexDirection:"column",children:[ee(Re,{color:a.muted,children:"this step"}),ee(Re,{color:a.ink,children:nn(e)})]}),ct(_e,{marginTop:1,children:[ee(Re,{color:a.faint,children:"\u{1F4D6} "}),ee(fe,{url:t.url,text:`${t.label} \u2192`})]}),ee(_e,{marginTop:1,children:ee(Re,{color:a.faint,children:"press ? or esc to close"})})]})})};import sn from"react";import{Box as Ft,Text as Pe}from"ink";import{jsx as be,jsxs as br}from"react/jsx-runtime";var ut=class extends sn.Component{constructor(t){super(t),this.state={error:null}}static getDerivedStateFromError(t){return{error:t}}componentDidCatch(){}render(){let{error:t}=this.state;return t?br(Ft,{flexDirection:"column",paddingX:1,paddingY:1,children:[be(Pe,{color:a.err,bold:!0,children:"\u2717 The setup wizard hit an unexpected error"}),be(Ft,{marginTop:1,children:be(Pe,{color:a.ink,children:t.message||String(t)})}),br(Ft,{flexDirection:"column",marginTop:1,children:[be(Pe,{color:a.muted,children:"Retry the wizard, or fall back to a non-interactive install:"}),be(Pe,{color:a.faint,children:" Quick (Ollama): ./install.sh --quick"}),be(Pe,{color:a.faint,children:" From a .env: ./install.sh --env ./my.env"}),be(Pe,{color:a.faint,children:" Help: https://openagentics.io/docs/troubleshooting"}),be(Pe,{color:a.faint,children:" Issues: https://github.com/agentic-work/openagentic/issues"})]})]}):this.props.children}};import{Text as bn}from"ink";import Vt from"react";import{Box as an,Text as yr}from"ink";import ln from"figures";function cn({isSelected:e=!1}){return Vt.createElement(an,{marginRight:1},e?Vt.createElement(yr,{color:"blue"},ln.pointer):Vt.createElement(yr,null," "))}var Ht=cn;import*as Sr from"react";import{Text as un}from"ink";function dn({isSelected:e=!1,label:t}){return Sr.createElement(un,{color:e?"blue":void 0},t)}var Wt=dn;import{isDeepStrictEqual as mn}from"node:util";import dt,{useState as xr,useEffect as pn,useRef as fn,useCallback as gn}from"react";function De(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 o=(t%r+r)%r;return o===0?[...e]:[...e.slice(-o),...e.slice(0,-o)]}import{Box as vr,useInput as hn}from"ink";function _n({items:e=[],isFocused:t=!0,initialIndex:r=0,indicatorComponent:o=Ht,itemComponent:i=Wt,limit:s,onSelect:n,onHighlight:f}){let l=typeof s=="number"&&e.length>s,u=l?Math.min(s,e.length):e.length,d=u-1,[c,h]=xr(r>d?d-r:0),[g,m]=xr(r?r>d?d:r:0),y=fn(e);pn(()=>{mn(y.current.map(S=>S.value),e.map(S=>S.value))||(h(0),m(0)),y.current=e},[e]),hn(gn((S,C)=>{if(S==="k"||C.upArrow){let p=(l?u:e.length)-1,x=g===0,_=l?g:p,R=x?c+1:c,D=x?_:g-1;h(R),m(D);let N=l?De(e,R).slice(0,u):e;typeof f=="function"&&f(N[D])}if(S==="j"||C.downArrow){let p=g===(l?u:e.length)-1,x=l?g:0,_=p?c-1:c,R=p?x:g+1;h(_),m(R);let D=l?De(e,_).slice(0,u):e;typeof f=="function"&&f(D[R])}if(/^[1-9]$/.test(S)){let p=Number.parseInt(S,10)-1,x=l?De(e,c).slice(0,u):e;if(p>=0&&p<x.length){let _=x[p];_&&n?.(_)}}if(C.return){let p=l?De(e,c).slice(0,u):e;typeof n=="function"&&n(p[g])}},[l,u,c,g,e,n,f]),{isActive:t});let b=l?De(e,c).slice(0,u):e;return dt.createElement(vr,{flexDirection:"column"},b.map((S,C)=>{let p=C===g;return dt.createElement(vr,{key:S.key??S.value},dt.createElement(o,{isSelected:p}),dt.createElement(i,{...S,isSelected:p}))}))}var H=_n;import{jsx as zt,jsxs as Sn}from"react/jsx-runtime";var Er=({onPick:e})=>Sn(A,{step:1,total:9,title:"Where do you want to run openagentic?",children:[zt(H,{items:[{label:"Docker (local / single machine)",value:"docker"},{label:"Helm (production / kubernetes)",value:"helm"}],onSelect:r=>e(r.value),indicatorComponent:yn}),zt(v,{children:"Both paths land at http://localhost:8080 with the same UI."})]}),yn=({isSelected:e})=>zt(bn,{color:a.accent,children:e?"\u276F ":" "});import{useEffect as Zn,useState as Qn}from"react";import{Box as J,Text as j,useInput as es}from"ink";var Or=jo(kr(),1);import vn,{useState as En,useEffect as An}from"react";import{Text as Tn}from"ink";function In({type:e="dots"}){let[t,r]=En(0),o=Or.default[e];return An(()=>{let i=setInterval(()=>{r(s=>s===o.frames.length-1?0:s+1)},o.interval);return()=>{clearInterval(i)}},[o]),vn.createElement(Tn,null,o.frames[t])}var pt=In;import zn,{useState as Gn,useEffect as $n}from"react";import{Text as Kn,useInput as Un}from"ink";var Cr=(e=0)=>t=>`\x1B[${t+e}m`,Rr=(e=0)=>t=>`\x1B[${38+e};5;${t}m`,Pr=(e=0)=>(t,r,o)=>`\x1B[${38+e};2;${t};${r};${o}m`,B={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]}},Sa=Object.keys(B.modifier),kn=Object.keys(B.color),On=Object.keys(B.bgColor),xa=[...kn,...On];function Cn(){let e=new Map;for(let[t,r]of Object.entries(B)){for(let[o,i]of Object.entries(r))B[o]={open:`\x1B[${i[0]}m`,close:`\x1B[${i[1]}m`},r[o]=B[o],e.set(i[0],i[1]);Object.defineProperty(B,t,{value:r,enumerable:!1})}return Object.defineProperty(B,"codes",{value:e,enumerable:!1}),B.color.close="\x1B[39m",B.bgColor.close="\x1B[49m",B.color.ansi=Cr(),B.color.ansi256=Rr(),B.color.ansi16m=Pr(),B.bgColor.ansi=Cr(10),B.bgColor.ansi256=Rr(10),B.bgColor.ansi16m=Pr(10),Object.defineProperties(B,{rgbToAnsi256:{value(t,r,o){return t===r&&r===o?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(o/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[o]=r;o.length===3&&(o=[...o].map(s=>s+s).join(""));let i=Number.parseInt(o,16);return[i>>16&255,i>>8&255,i&255]},enumerable:!1},hexToAnsi256:{value:t=>B.rgbToAnsi256(...B.hexToRgb(t)),enumerable:!1},ansi256ToAnsi:{value(t){if(t<8)return 30+t;if(t<16)return 90+(t-8);let r,o,i;if(t>=232)r=((t-232)*10+8)/255,o=r,i=r;else{t-=16;let f=t%36;r=Math.floor(t/36)/5,o=Math.floor(f/6)/5,i=f%6/5}let s=Math.max(r,o,i)*2;if(s===0)return 30;let n=30+(Math.round(i)<<2|Math.round(o)<<1|Math.round(r));return s===2&&(n+=60),n},enumerable:!1},rgbToAnsi:{value:(t,r,o)=>B.ansi256ToAnsi(B.rgbToAnsi256(t,r,o)),enumerable:!1},hexToAnsi:{value:t=>B.ansi256ToAnsi(B.hexToAnsi256(t)),enumerable:!1}}),B}var Rn=Cn(),se=Rn;import Gt from"node:process";import Pn from"node:os";import Dr from"node:tty";function te(e,t=globalThis.Deno?globalThis.Deno.args:Gt.argv){let r=e.startsWith("-")?"":e.length===1?"-":"--",o=t.indexOf(r+e),i=t.indexOf("--");return o!==-1&&(i===-1||o<i)}var{env:M}=Gt,ft;te("no-color")||te("no-colors")||te("color=false")||te("color=never")?ft=0:(te("color")||te("colors")||te("color=true")||te("color=always"))&&(ft=1);function Dn(){if("FORCE_COLOR"in M)return M.FORCE_COLOR==="true"?1:M.FORCE_COLOR==="false"?0:M.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(M.FORCE_COLOR,10),3)}function Bn(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function Mn(e,{streamIsTTY:t,sniffFlags:r=!0}={}){let o=Dn();o!==void 0&&(ft=o);let i=r?ft:o;if(i===0)return 0;if(r){if(te("color=16m")||te("color=full")||te("color=truecolor"))return 3;if(te("color=256"))return 2}if("TF_BUILD"in M&&"AGENT_NAME"in M)return 1;if(e&&!t&&i===void 0)return 0;let s=i||0;if(M.TERM==="dumb")return s;if(Gt.platform==="win32"){let n=Pn.release().split(".");return Number(n[0])>=10&&Number(n[2])>=10586?Number(n[2])>=14931?3:2:1}if("CI"in M)return["GITHUB_ACTIONS","GITEA_ACTIONS","CIRCLECI"].some(n=>n in M)?3:["TRAVIS","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some(n=>n in M)||M.CI_NAME==="codeship"?1:s;if("TEAMCITY_VERSION"in M)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(M.TEAMCITY_VERSION)?1:0;if(M.COLORTERM==="truecolor"||M.TERM==="xterm-kitty"||M.TERM==="xterm-ghostty"||M.TERM==="wezterm")return 3;if("TERM_PROGRAM"in M){let n=Number.parseInt((M.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(M.TERM_PROGRAM){case"iTerm.app":return n>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(M.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(M.TERM)||"COLORTERM"in M?1:s}function Br(e,t={}){let r=Mn(e,{streamIsTTY:e&&e.isTTY,...t});return Bn(r)}var wn={stdout:Br({isTTY:Dr.isatty(1)}),stderr:Br({isTTY:Dr.isatty(2)})},Mr=wn;function wr(e,t,r){let o=e.indexOf(t);if(o===-1)return e;let i=t.length,s=0,n="";do n+=e.slice(s,o)+t+r,s=o+i,o=e.indexOf(t,s);while(o!==-1);return n+=e.slice(s),n}function Nr(e,t,r,o){let i=0,s="";do{let n=e[o-1]==="\r";s+=e.slice(i,n?o-1:o)+t+(n?`\r
|
|
2
|
+
var Uo=Object.create;var fr=Object.defineProperty;var jo=Object.getOwnPropertyDescriptor;var Yo=Object.getOwnPropertyNames;var Jo=Object.getPrototypeOf,qo=Object.prototype.hasOwnProperty;var gr=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Xo=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of Yo(t))!qo.call(e,n)&&n!==r&&fr(e,n,{get:()=>t[n],enumerable:!(o=jo(t,n))||o.enumerable});return e};var Zo=(e,t,r)=>(r=e!=null?Uo(Jo(e)):{},Xo(t||!e||!e.__esModule?fr(r,"default",{value:e,enumerable:!0}):r,e));var kr=gr((va,kn)=>{kn.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 Pr=gr((Ea,Or)=>{"use strict";var pt=Object.assign({},kr()),Ir=Object.keys(pt);Object.defineProperty(pt,"random",{get(){let e=Math.floor(Math.random()*Ir.length),t=Ir[e];return pt[t]}});Or.exports=pt});import{useState as dr}from"react";import{realpathSync as gi}from"fs";import{fileURLToPath as hi}from"url";import _i from"open";import{render as bi,Box as zo,Text as mr,useInput as yi}from"ink";import{Text as he,Box as Pe}from"ink";import{Text as Ie}from"ink";import{jsx as Oe}from"react/jsx-runtime";function Qo(e,t,r){let o=[Number.parseInt(e.slice(1,3),16),Number.parseInt(e.slice(3,5),16),Number.parseInt(e.slice(5,7),16)],n=[Number.parseInt(t.slice(1,3),16),Number.parseInt(t.slice(3,5),16),Number.parseInt(t.slice(5,7),16)];return"#"+o.map((i,_)=>Math.round(i+(n[_]-i)*Math.max(0,Math.min(1,r)))).map(i=>i.toString(16).padStart(2,"0")).join("")}function Dt(e,t){if(e.length===1)return e[0];let r=Math.max(0,Math.min(1,t))*(e.length-1),o=Math.min(e.length-2,Math.floor(r));return Qo(e[o],e[o+1],r-o)}var Bt=({text:e,stops:t,bold:r,dim:o})=>{let n=[...e],s=Math.max(1,n.length-1);return Oe(Ie,{children:n.map((i,_)=>Oe(Ie,{color:Dt(t,_/s),bold:r,dimColor:o,children:i},_))})},$e=({width:e,stops:t,char:r="\u2500"})=>{let o=Math.max(1,e-1);return Oe(Ie,{children:Array.from({length:e},(n,s)=>Oe(Ie,{color:Dt(t,s/o),children:r},s))})},ct=({value:e,total:t,width:r,stops:o,track:n="#2C3A31"})=>{let s=Math.max(0,Math.min(r,Math.round(e/Math.max(1,t)*r))),i=Math.max(1,r-1);return Oe(Ie,{children:Array.from({length:r},(_,l)=>l<s?Oe(Ie,{color:Dt(o,l/i),children:"\u2501"},l):Oe(Ie,{color:n,children:"\u2500"},l))})};import{Text as Xe,Box as Lt}from"ink";import{Text as en}from"ink";import{jsx as rn}from"react/jsx-runtime";var Nt="\x1B",hr=`${Nt}\\`;function tn(e,t){return`${Nt}]8;;${e}${hr}${t}${Nt}]8;;${hr}`}var ge=({url:e,text:t})=>rn(en,{color:a.signal,underline:!0,children:tn(e,t)});var on="https://www.openagentics.io/docs/";function Ve(e){return{url:on,label:"docs"}}import{jsx as ne,jsxs as Ze}from"react/jsx-runtime";var nn=["#2C3A31","#3A4A3E","#2C3A31"],sn=()=>Math.max(44,Math.min((process.stdout.columns||80)-6,88)),ze=({k:e,gloss:t,last:r})=>Ze(Xe,{children:[ne(Xe,{color:a.muted,children:e}),Ze(Xe,{color:a.faint,children:[" ",t]}),r?null:ne(Xe,{color:a.faint,children:" \xB7 "})]}),_r=({title:e})=>{let t=Ve(e);return Ze(Lt,{flexDirection:"column",marginTop:1,children:[ne($e,{width:sn(),stops:nn}),Ze(Lt,{children:[ne(ze,{k:"\u2191\u2193",gloss:"move"}),ne(ze,{k:"\u21B5",gloss:"select"}),ne(ze,{k:"?",gloss:"help"}),ne(ze,{k:"d",gloss:"docs"}),ne(ze,{k:"esc",gloss:"back"}),ne(ze,{k:"^C",gloss:"quit",last:!0})]}),Ze(Lt,{marginTop:0,children:[ne(Xe,{color:a.faint,children:"\u{1F4D6} "}),ne(ge,{url:t.url,text:`${t.label} \u2192`})]})]})};import{jsx as Y,jsxs as _e}from"react/jsx-runtime";var a={accent:"#88CCA0",accentDeep:"#5FA877",ink:"#F3F1EC",muted:"#7E927E",faint:"#56654F",ok:"#88CCA0",warn:"#D9AE52",err:"#E0663A",signal:"#DB8240",teal:"#9FD8C4",espresso:"#1F0D04",burntOrange:"#B83A0E"},Ft=["#6FB3A8","#9FD8C4","#88CCA0","#D9AE52","#DB8240"],an=["#F3F1EC","#88CCA0","#5FA877"],br=()=>Math.max(44,Math.min((process.stdout.columns||80)-6,88)),Ht=()=>{let e=br();return _e(Pe,{flexDirection:"column",paddingY:1,children:[_e(Pe,{width:e,justifyContent:"space-between",children:[_e(Pe,{children:[Y(Bt,{text:"\u2325",stops:an,bold:!0}),_e(he,{color:a.signal,bold:!0,children:[" ","\xB7"," "]}),Y(Bt,{text:"openagentic",stops:Ft,bold:!0})]}),Y(he,{color:a.faint,children:"self-hosted \xB7 docker / k8s \xB7 v1.0"})]}),Y($e,{width:e,stops:Ft}),Y(he,{color:a.muted,children:"the open agentic platform for IT operations"})]})},ln=({step:e,total:t,title:r})=>_e(Pe,{flexDirection:"column",marginBottom:1,children:[_e(Pe,{children:[Y(he,{color:a.accent,bold:!0,children:String(e).padStart(2,"0")}),_e(he,{color:a.faint,children:[" / ",String(t).padStart(2,"0")]}),Y(he,{color:a.faint,children:" "}),Y(he,{color:a.ink,bold:!0,children:r})]}),Y(Pe,{marginTop:0,children:Y(ct,{value:e,total:t,width:Math.min(36,br()),stops:Ft})})]}),E=({children:e})=>Y(he,{color:a.muted,children:e}),T=({step:e,total:t,title:r,children:o})=>_e(Pe,{flexDirection:"column",paddingX:2,children:[Y(Ht,{}),Y(ln,{step:e,total:t,title:r}),o,Y(_r,{title:r})]});import{Text as Ce,Box as be}from"ink";import{jsx as ee,jsxs as ut}from"react/jsx-runtime";var cn=[{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 un(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 yr=({title:e})=>{let t=Ve(e);return ee(be,{flexDirection:"column",paddingX:2,paddingY:1,children:ut(be,{flexDirection:"column",borderStyle:"round",borderColor:a.signal,paddingX:2,paddingY:1,children:[ee(Ce,{color:a.signal,bold:!0,children:"\u2325 keys & help"}),ee(be,{marginTop:1,flexDirection:"column",children:cn.map(r=>ut(be,{children:[ee(be,{width:8,children:ee(Ce,{color:a.accent,bold:!0,children:r.key})}),ee(Ce,{color:a.ink,children:r.gloss})]},r.key))}),ut(be,{marginTop:1,flexDirection:"column",children:[ee(Ce,{color:a.muted,children:"this step"}),ee(Ce,{color:a.ink,children:un(e)})]}),ut(be,{marginTop:1,children:[ee(Ce,{color:a.faint,children:"\u{1F4D6} "}),ee(ge,{url:t.url,text:`${t.label} \u2192`})]}),ee(be,{marginTop:1,children:ee(Ce,{color:a.faint,children:"press ? or esc to close"})})]})})};import dn from"react";import{Box as $t,Text as Re}from"ink";import{jsx as ye,jsxs as Sr}from"react/jsx-runtime";var dt=class extends dn.Component{constructor(t){super(t),this.state={error:null}}static getDerivedStateFromError(t){return{error:t}}componentDidCatch(){}render(){let{error:t}=this.state;return t?Sr($t,{flexDirection:"column",paddingX:1,paddingY:1,children:[ye(Re,{color:a.err,bold:!0,children:"\u2717 The setup wizard hit an unexpected error"}),ye($t,{marginTop:1,children:ye(Re,{color:a.ink,children:t.message||String(t)})}),Sr($t,{flexDirection:"column",marginTop:1,children:[ye(Re,{color:a.muted,children:"Retry the wizard, or fall back to a non-interactive install:"}),ye(Re,{color:a.faint,children:" Quick (Ollama): ./install.sh --quick"}),ye(Re,{color:a.faint,children:" From a .env: ./install.sh --env ./my.env"}),ye(Re,{color:a.faint,children:" Help: https://openagentics.io/docs/troubleshooting"}),ye(Re,{color:a.faint,children:" Issues: https://github.com/agentic-work/openagentic/issues"})]})]}):this.props.children}};import{Text as En}from"ink";import Vt from"react";import{Box as mn,Text as xr}from"ink";import pn from"figures";function fn({isSelected:e=!1}){return Vt.createElement(mn,{marginRight:1},e?Vt.createElement(xr,{color:"blue"},pn.pointer):Vt.createElement(xr,null," "))}var zt=fn;import*as vr from"react";import{Text as gn}from"ink";function hn({isSelected:e=!1,label:t}){return vr.createElement(gn,{color:e?"blue":void 0},t)}var Wt=hn;import{isDeepStrictEqual as _n}from"node:util";import mt,{useState as Er,useEffect as bn,useRef as yn,useCallback as Sn}from"react";function we(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 o=(t%r+r)%r;return o===0?[...e]:[...e.slice(-o),...e.slice(0,-o)]}import{Box as Ar,useInput as xn}from"ink";function vn({items:e=[],isFocused:t=!0,initialIndex:r=0,indicatorComponent:o=zt,itemComponent:n=Wt,limit:s,onSelect:i,onHighlight:_}){let l=typeof s=="number"&&e.length>s,u=l?Math.min(s,e.length):e.length,p=u-1,[d,b]=Er(r>p?p-r:0),[c,h]=Er(r?r>p?p:r:0),x=yn(e);bn(()=>{_n(x.current.map(g=>g.value),e.map(g=>g.value))||(b(0),h(0)),x.current=e},[e]),xn(Sn((g,S)=>{if(g==="k"||S.upArrow){let m=(l?u:e.length)-1,v=c===0,y=l?c:m,C=v?d+1:d,w=v?y:c-1;b(C),h(w);let N=l?we(e,C).slice(0,u):e;typeof _=="function"&&_(N[w])}if(g==="j"||S.downArrow){let m=c===(l?u:e.length)-1,v=l?c:0,y=m?d-1:d,C=m?v:c+1;b(y),h(C);let w=l?we(e,y).slice(0,u):e;typeof _=="function"&&_(w[C])}if(/^[1-9]$/.test(g)){let m=Number.parseInt(g,10)-1,v=l?we(e,d).slice(0,u):e;if(m>=0&&m<v.length){let y=v[m];y&&i?.(y)}}if(S.return){let m=l?we(e,d).slice(0,u):e;typeof i=="function"&&i(m[c])}},[l,u,d,c,e,i,_]),{isActive:t});let f=l?we(e,d).slice(0,u):e;return mt.createElement(Ar,{flexDirection:"column"},f.map((g,S)=>{let m=S===c;return mt.createElement(Ar,{key:g.key??g.value},mt.createElement(o,{isSelected:m}),mt.createElement(n,{...g,isSelected:m}))}))}var $=vn;import{jsx as Gt,jsxs as Tn}from"react/jsx-runtime";var Tr=({onPick:e})=>Tn(T,{step:1,total:9,title:"Where do you want to run openagentic?",children:[Gt($,{items:[{label:"Docker (local / single machine)",value:"docker"},{label:"Helm (production / kubernetes)",value:"helm"}],onSelect:r=>e(r.value),indicatorComponent:An}),Gt(E,{children:"Both paths land at http://localhost:8080 with the same UI."})]}),An=({isSelected:e})=>Gt(En,{color:a.accent,children:e?"\u276F ":" "});import{useEffect as os,useState as ns}from"react";import{Box as J,Text as j,useInput as ss}from"ink";var Cr=Zo(Pr(),1);import In,{useState as On,useEffect as Pn}from"react";import{Text as Cn}from"ink";function Rn({type:e="dots"}){let[t,r]=On(0),o=Cr.default[e];return Pn(()=>{let n=setInterval(()=>{r(s=>s===o.frames.length-1?0:s+1)},o.interval);return()=>{clearInterval(n)}},[o]),In.createElement(Cn,null,o.frames[t])}var ft=Rn;import jn,{useState as Yn,useEffect as Jn}from"react";import{Text as qn,useInput as Xn}from"ink";var Rr=(e=0)=>t=>`\x1B[${t+e}m`,wr=(e=0)=>t=>`\x1B[${38+e};5;${t}m`,Mr=(e=0)=>(t,r,o)=>`\x1B[${38+e};2;${t};${r};${o}m`,M={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]}},Ia=Object.keys(M.modifier),wn=Object.keys(M.color),Mn=Object.keys(M.bgColor),Oa=[...wn,...Mn];function Dn(){let e=new Map;for(let[t,r]of Object.entries(M)){for(let[o,n]of Object.entries(r))M[o]={open:`\x1B[${n[0]}m`,close:`\x1B[${n[1]}m`},r[o]=M[o],e.set(n[0],n[1]);Object.defineProperty(M,t,{value:r,enumerable:!1})}return Object.defineProperty(M,"codes",{value:e,enumerable:!1}),M.color.close="\x1B[39m",M.bgColor.close="\x1B[49m",M.color.ansi=Rr(),M.color.ansi256=wr(),M.color.ansi16m=Mr(),M.bgColor.ansi=Rr(10),M.bgColor.ansi256=wr(10),M.bgColor.ansi16m=Mr(10),Object.defineProperties(M,{rgbToAnsi256:{value(t,r,o){return t===r&&r===o?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(o/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[o]=r;o.length===3&&(o=[...o].map(s=>s+s).join(""));let n=Number.parseInt(o,16);return[n>>16&255,n>>8&255,n&255]},enumerable:!1},hexToAnsi256:{value:t=>M.rgbToAnsi256(...M.hexToRgb(t)),enumerable:!1},ansi256ToAnsi:{value(t){if(t<8)return 30+t;if(t<16)return 90+(t-8);let r,o,n;if(t>=232)r=((t-232)*10+8)/255,o=r,n=r;else{t-=16;let _=t%36;r=Math.floor(t/36)/5,o=Math.floor(_/6)/5,n=_%6/5}let s=Math.max(r,o,n)*2;if(s===0)return 30;let i=30+(Math.round(n)<<2|Math.round(o)<<1|Math.round(r));return s===2&&(i+=60),i},enumerable:!1},rgbToAnsi:{value:(t,r,o)=>M.ansi256ToAnsi(M.rgbToAnsi256(t,r,o)),enumerable:!1},hexToAnsi:{value:t=>M.ansi256ToAnsi(M.hexToAnsi256(t)),enumerable:!1}}),M}var Bn=Dn(),se=Bn;import Kt from"node:process";import Nn from"node:os";import Dr from"node:tty";function te(e,t=globalThis.Deno?globalThis.Deno.args:Kt.argv){let r=e.startsWith("-")?"":e.length===1?"-":"--",o=t.indexOf(r+e),n=t.indexOf("--");return o!==-1&&(n===-1||o<n)}var{env:D}=Kt,gt;te("no-color")||te("no-colors")||te("color=false")||te("color=never")?gt=0:(te("color")||te("colors")||te("color=true")||te("color=always"))&&(gt=1);function Ln(){if("FORCE_COLOR"in D)return D.FORCE_COLOR==="true"?1:D.FORCE_COLOR==="false"?0:D.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(D.FORCE_COLOR,10),3)}function Fn(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function Hn(e,{streamIsTTY:t,sniffFlags:r=!0}={}){let o=Ln();o!==void 0&&(gt=o);let n=r?gt:o;if(n===0)return 0;if(r){if(te("color=16m")||te("color=full")||te("color=truecolor"))return 3;if(te("color=256"))return 2}if("TF_BUILD"in D&&"AGENT_NAME"in D)return 1;if(e&&!t&&n===void 0)return 0;let s=n||0;if(D.TERM==="dumb")return s;if(Kt.platform==="win32"){let i=Nn.release().split(".");return Number(i[0])>=10&&Number(i[2])>=10586?Number(i[2])>=14931?3:2:1}if("CI"in D)return["GITHUB_ACTIONS","GITEA_ACTIONS","CIRCLECI"].some(i=>i in D)?3:["TRAVIS","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some(i=>i in D)||D.CI_NAME==="codeship"?1:s;if("TEAMCITY_VERSION"in D)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(D.TEAMCITY_VERSION)?1:0;if(D.COLORTERM==="truecolor"||D.TERM==="xterm-kitty"||D.TERM==="xterm-ghostty"||D.TERM==="wezterm")return 3;if("TERM_PROGRAM"in D){let i=Number.parseInt((D.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(D.TERM_PROGRAM){case"iTerm.app":return i>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(D.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(D.TERM)||"COLORTERM"in D?1:s}function Br(e,t={}){let r=Hn(e,{streamIsTTY:e&&e.isTTY,...t});return Fn(r)}var $n={stdout:Br({isTTY:Dr.isatty(1)}),stderr:Br({isTTY:Dr.isatty(2)})},Nr=$n;function Lr(e,t,r){let o=e.indexOf(t);if(o===-1)return e;let n=t.length,s=0,i="";do i+=e.slice(s,o)+t+r,s=o+n,o=e.indexOf(t,s);while(o!==-1);return i+=e.slice(s),i}function Fr(e,t,r,o){let n=0,s="";do{let i=e[o-1]==="\r";s+=e.slice(n,i?o-1:o)+t+(i?`\r
|
|
3
3
|
`:`
|
|
4
|
-
`)+r,
|
|
5
|
-
`,
|
|
6
|
-
`);return s!==-1&&(t=
|
|
7
|
-
`).filter(Boolean).length);let l=await Be("kubectl",["get","namespace","openagentic","-o","name"],t);r.namespaceExists=l.ok&&l.stdout.trim().length>0;let u=await Be("helm",["list","-n","openagentic","-o","json"],t);if(u.ok)try{let d=JSON.parse(u.stdout);if(Array.isArray(d)&&d.length>0){let c=d.find(h=>h.name==="openagentic")??d[0];c&&(r.existingRelease={name:c.name,revision:Number(c.revision)||0,status:c.status||"unknown"})}}catch{}return r}import{jsx as P,jsxs as re}from"react/jsx-runtime";var Ur=({onContinue:e,onBackToDocker:t})=>{let r=Gr(),[o,i]=Qn(r?{stage:"probing",kubeconfigPath:r}:{stage:"picking-kubeconfig",input:"",error:null});if(Zn(()=>{if(o.stage!=="probing")return;let u=!1;return Kr(o.kubeconfigPath).then(d=>{u||i({stage:"ready",probe:d})}),()=>{u=!0}},[o.stage==="probing"?o.kubeconfigPath:null]),es((u,d)=>{o.stage==="picking-kubeconfig"&&d.escape&&t()}),o.stage==="picking-kubeconfig")return re(A,{step:2,total:10,title:"Checking your cluster",children:[re(J,{flexDirection:"column",marginBottom:1,children:[re(j,{children:["No kubeconfig found at ",P(j,{color:a.accent,children:"$KUBECONFIG"})," or ",P(j,{color:a.accent,children:"~/.kube/config"}),"."]}),re(j,{children:["Paste a path to your kubeconfig, or press ",P(j,{color:a.accent,children:"Esc"})," to go back to Docker."]})]}),re(J,{children:[P(j,{children:"kubeconfig: "}),P(V,{value:o.input,onChange:u=>i({...o,input:u,error:null}),onSubmit:u=>{let d=$r(u);if(!d.ok){i({...o,error:d.reason});return}i({stage:"probing",kubeconfigPath:d.path})}})]}),o.error&&P(J,{marginTop:1,children:P(j,{color:a.err,children:o.error})})]});if(o.stage==="probing")return P(A,{step:2,total:10,title:"Checking your cluster",children:re(J,{children:[P(j,{color:a.accent,children:P(pt,{type:"dots"})}),re(j,{children:[" probing cluster via ",o.kubeconfigPath,"\u2026"]})]})});let{probe:s}=o,n=[{label:"kubeconfig",value:s.kubeconfigPath},{label:"kubectl",value:s.kubectlVersion??"not found on PATH",colour:s.kubectlVersion?void 0:a.err},{label:"helm",value:s.helmVersion??"not found on PATH",colour:s.helmVersion?void 0:a.err},{label:"context",value:s.context??"no current context set",colour:s.context?void 0:a.err},{label:"cluster",value:s.reachable?`${s.serverVersion??"unknown"} (${s.nodeCount??"?"} nodes)`:"unreachable",colour:s.reachable?void 0:a.err},{label:"namespace",value:s.namespaceExists?"openagentic \u2014 exists":"openagentic \u2014 does not exist",colour:s.namespaceExists?a.warn:void 0},{label:"existing release",value:s.existingRelease?`${s.existingRelease.name} rev ${s.existingRelease.revision} (${s.existingRelease.status})`:"none",colour:s.existingRelease?a.warn:void 0}],f=s.kubectlVersion?s.helmVersion?s.context?s.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(f)return re(A,{step:2,total:10,title:"Checking your cluster",children:[P(J,{flexDirection:"column",children:n.map(u=>re(J,{children:[P(J,{width:18,children:P(j,{color:a.muted,children:u.label})}),P(j,{color:u.colour,children:u.value})]},u.label))}),P(J,{marginTop:1,children:P(j,{color:a.err,children:f})}),P(J,{marginTop:1,children:P(H,{items:[{label:"Back to Docker deploy",value:"docker"},{label:"Quit",value:"quit"}],onSelect:u=>{u.value==="docker"?t():process.exit(0)}})})]});let l=s.existingRelease?`Existing release 'openagentic' (rev ${s.existingRelease.revision}). Continuing will run helm upgrade.`:s.namespaceExists?"Namespace 'openagentic' exists but no Helm release. Continuing will adopt it.":null;return re(A,{step:2,total:10,title:"Checking your cluster",children:[P(J,{flexDirection:"column",children:n.map(u=>re(J,{children:[P(J,{width:18,children:P(j,{color:a.muted,children:u.label})}),P(j,{color:u.colour,children:u.value})]},u.label))}),l&&P(J,{marginTop:1,children:re(j,{color:a.warn,children:["\u26A0 ",l]})}),P(J,{marginTop:1,children:P(H,{items:[{label:s.existingRelease?"Upgrade existing release":"Continue",value:"continue"},{label:"Back to Docker deploy",value:"docker"}],onSelect:u=>{u.value==="continue"?e(s.kubeconfigPath):t()}})})]})};import{useState as jt}from"react";import{Box as ht,Text as Ke}from"ink";import{jsx as ce,jsxs as et}from"react/jsx-runtime";var jr=({initial:e,step:t,total:r,onDone:o})=>{let[i,s]=jt(e.email),[n,f]=jt(e.password),[l,u]=jt("email");return ce(A,{step:t,total:r,title:"Create your admin account",children:et(ht,{flexDirection:"column",children:[et(ht,{children:[et(Ke,{color:l==="email"?a.accent:a.muted,children:[l==="email"?"\u276F ":" ","email :"]}),ce(Ke,{children:" "}),l==="email"?ce(V,{value:i,onChange:s,onSubmit:()=>u("password")}):ce(Ke,{children:i})]}),et(ht,{children:[et(Ke,{color:l==="password"?a.accent:a.muted,children:[l==="password"?"\u276F ":" ","password :"]}),ce(Ke,{children:" "}),l==="password"?ce(V,{value:n,onChange:f,mask:"\u2022",onSubmit:()=>{n.length>=8&&i.includes("@")&&o({...e,email:i,password:n})}}):ce(Ke,{children:"\u2022".repeat(Math.min(n.length,12))})]}),ce(ht,{marginTop:1,children:ce(v,{children:"Minimum 8 characters. You can change this later from the admin panel."})})]})})};import{Box as Yt,Text as Jt}from"ink";import{jsx as ue,jsxs as Jr}from"react/jsx-runtime";var Yr=[{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."}],qr=({step:e,total:t,onPick:r})=>ue(A,{step:e,total:t,title:"Which LLM provider should the platform use?",children:Jr(Yt,{flexDirection:"column",children:[ue(v,{children:"Pick the provider that powers chat completions and embeddings. Nothing is pre-selected."}),ue(v,{children:"The platform never starts or assumes a provider \u2014 only the one you choose here is configured."}),ue(v,{children:"Cloud-management creds (Azure / AWS / GCP) are a separate step further down."}),ue(Yt,{marginTop:1,children:ue(H,{items:Yr.map(o=>({label:o.label,value:o.value})),onSelect:o=>{let i=o.value;i!=="none"&&r(i)},indicatorComponent:({isSelected:o})=>ue(Jt,{color:a.accent,children:o?"\u276F ":" "})})}),ue(Yt,{marginTop:1,flexDirection:"column",children:Yr.filter(o=>o.value!=="none").map(o=>Jr(Jt,{color:a.muted,children:[" ",ue(Jt,{bold:!0,children:o.label.split(" \u2014 ")[0]})," \u2014 ",o.hint]},o.value))})]})});import{useState as ts}from"react";import{Box as _t,Text as Xr}from"ink";import{jsx as Se,jsxs as Zr}from"react/jsx-runtime";var Qr=({initial:e,step:t,total:r,onDone:o})=>{let[i,s]=ts(e.host);return Se(A,{step:t,total:r,title:"Where is your Ollama?",children:Zr(_t,{flexDirection:"column",children:[Zr(_t,{children:[Se(Xr,{color:a.accent,children:"\u276F "}),Se(Xr,{children:"host: "}),Se(V,{value:i,onChange:s,onSubmit:()=>o({...e,host:i})})]}),Se(_t,{marginTop:1,children:Se(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."})}),Se(_t,{children:Se(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 Me}from"react";import{Box as de,Text as xe}from"ink";import rs from"node:fs";import os from"node:os";import ns from"node:path";import{jsx as L,jsxs as ve}from"react/jsx-runtime";var ss=os.homedir(),eo=e=>{try{return rs.existsSync(ns.join(ss,e))}catch{return!1}},is=()=>eo(".aws/credentials")||eo(".aws/config"),qt="us-east-1",Xt="amazon.nova-pro-v1:0",to=({initial:e,step:t,total:r,onDone:o})=>{let i=is(),s=e.bedrock,n=s?.authMode?s.authMode:i?"awslogin":"keys",[f,l]=Me("mode"),[u,d]=Me(n),[c,h]=Me(s?.region||""),[g,m]=Me(s?.accessKeyId||""),[y,b]=Me(s?.secretAccessKey||""),[S,C]=Me(s?.model||""),[p,x]=Me(0),_=I=>{let E=c.trim()||qt,k=S.trim()||Xt,X={authMode:I,region:E,model:k};I==="keys"&&(X.accessKeyId=g.trim(),X.secretAccessKey=y),o({bedrock:X})};if(f==="mode"){let I=[];return i&&I.push({label:"Use my current AWS login (~/.aws \u2014 mounted read-only)",value:"awslogin"}),I.push({label:"Enter IAM access key + secret",value:"keys"}),L(A,{step:t,total:r,title:"AWS Bedrock \u2014 models via your AWS account",children:ve(de,{flexDirection:"column",children:[L(v,{children:"Pick how the platform authenticates to your AWS account for Bedrock."}),i?L(v,{children:"Detected AWS credentials in ~/.aws \u2014 your current login is the easy path."}):L(v,{children:"No ~/.aws found on this machine \u2014 paste an IAM access key + secret."}),L(de,{marginTop:1,children:L(H,{items:I.map(E=>({label:E.label,value:E.value})),initialIndex:Math.max(0,I.findIndex(E=>E.value===u)),onSelect:E=>{let k=E.value;d(k),x(0),l(k==="awslogin"?"awslogin":"keys")},indicatorComponent:({isSelected:E})=>L(xe,{color:a.accent,children:E?"\u276F ":" "})})})]})})}if(f==="awslogin"){let I=[{key:"region",label:"AWS region ",value:c,set:h,placeholder:qt},{key:"model",label:"Bedrock chat model ",value:S,set:C,placeholder:Xt}],E=()=>{p+1<I.length?x(p+1):_("awslogin")};return L(A,{step:t,total:r,title:"AWS Bedrock \u2014 current AWS login",children:ve(de,{flexDirection:"column",children:[I.map((k,X)=>ve(de,{children:[ve(xe,{color:X===p?a.accent:a.muted,children:[X===p?"\u276F ":" ",k.label,":"]}),L(xe,{children:" "}),X===p?L(V,{value:k.value,placeholder:k.placeholder,onChange:k.set,onSubmit:E}):L(xe,{color:k.value?void 0:a.muted,children:k.value||k.placeholder})]},k.key)),L(de,{marginTop:1,children:L(v,{children:"Your host ~/.aws is mounted read-only into the api; the default credential chain resolves it."})})]})})}let R=[{key:"region",label:"AWS region ",value:c,set:h,mask:!1,placeholder:qt},{key:"accessKeyId",label:"AWS access key id ",value:g,set:m,mask:!1,placeholder:"AKIA\u2026"},{key:"secretAccessKey",label:"AWS secret access key ",value:y,set:b,mask:!0,placeholder:""},{key:"model",label:"Bedrock chat model ",value:S,set:C,mask:!1,placeholder:Xt}],D=R[p],N=(D.key==="accessKeyId"||D.key==="secretAccessKey")&&!D.value.trim(),F=()=>{N||(p+1<R.length?x(p+1):_("keys"))};return L(A,{step:t,total:r,title:"AWS Bedrock \u2014 IAM access key",children:ve(de,{flexDirection:"column",children:[R.map((I,E)=>ve(de,{children:[ve(xe,{color:E===p?a.accent:a.muted,children:[E===p?"\u276F ":" ",I.label,":"]}),L(xe,{children:" "}),E===p?L(V,{value:I.value,placeholder:I.mask?void 0:I.placeholder,onChange:I.set,onSubmit:F,mask:I.mask?"\u2022":void 0}):L(xe,{color:I.value?void 0:a.muted,children:I.value?I.mask?"\u2022".repeat(Math.min(I.value.length,20)):I.value:I.mask?"":I.placeholder})]},I.key)),L(de,{marginTop:1,children:L(v,{children:"Inline IAM keys are written to .env as AWS_ACCESS_KEY_ID / AWS_SECRET_ACCESS_KEY."})}),N&&L(de,{children:ve(xe,{color:a.accent,children:["\u25CF required \u2014 paste your IAM ",D.key==="secretAccessKey"?"secret":"access key"," to continue"]})})]})})};import{useState as we}from"react";import{Box as Ue,Text as tt}from"ink";import no from"node:fs";import as from"node:os";import Zt from"node:path";import{jsx as q,jsxs as rt}from"react/jsx-runtime";var so=as.homedir(),ls=e=>{try{return no.existsSync(Zt.join(so,e))}catch{return!1}},cs=()=>ls(".config/gcloud"),us=()=>{let e=Zt.join(so,".config","gcloud","keys");try{let t=no.readdirSync(e).find(r=>r.endsWith(".json"));if(t)return Zt.join(e,t)}catch{}return""},ro="us-central1",oo="gemini-1.5-pro",io=({initial:e,step:t,total:r,onDone:o})=>{let i=cs(),s=e.vertex,n=us(),f=s?.authMode?s.authMode:i?"adc":"sajson",[l,u]=we("mode"),[d,c]=we(f),[h,g]=we(s?.projectId||""),[m,y]=we(s?.location||""),[b,S]=we(s?.model||""),[C,p]=we(s?.saKeyPath||""),[x,_]=we(0),R=E=>{let k={authMode:E,projectId:h.trim(),location:m.trim()||ro,model:b.trim()||oo};E==="sajson"&&(k.saKeyPath=C.trim()||n),o({vertex:k})};if(l==="mode"){let E=[];return i&&E.push({label:"Use my current gcloud login (ADC \u2014 ~/.config/gcloud, mounted read-only)",value:"adc"}),E.push({label:"Provide a service-account JSON key",value:"sajson"}),q(A,{step:t,total:r,title:"Google Vertex AI \u2014 Gemini via your GCP project",children:rt(Ue,{flexDirection:"column",children:[q(v,{children:"Pick how the platform authenticates to your GCP project for Vertex AI."}),i?q(v,{children:"Detected ~/.config/gcloud \u2014 your current gcloud login (ADC) is the easy path."}):q(v,{children:"No ~/.config/gcloud found \u2014 provide a service-account JSON key path."}),q(Ue,{marginTop:1,children:q(H,{items:E.map(k=>({label:k.label,value:k.value})),initialIndex:Math.max(0,E.findIndex(k=>k.value===d)),onSelect:k=>{let X=k.value;c(X),_(0),u(X==="adc"?"adc":"sajson")},indicatorComponent:({isSelected:k})=>q(tt,{color:a.accent,children:k?"\u276F ":" "})})})]})})}let D=[{key:"projectId",label:"GCP project id ",value:h,set:g,placeholder:"my-gcp-project",required:!0},{key:"location",label:"Location ",value:m,set:y,placeholder:ro},{key:"model",label:"Gemini chat model ",value:b,set:S,placeholder:oo}];l==="sajson"&&D.push({key:"saKeyPath",label:"Service-account key ",value:C,set:p,placeholder:n||"~/.config/gcloud/keys/sa.json",required:!0});let N=D[x],F=!!N.required&&!N.value.trim()&&!(N.key==="saKeyPath"&&n),I=()=>{F||(x+1<D.length?_(x+1):R(l==="adc"?"adc":"sajson"))};return q(A,{step:t,total:r,title:l==="adc"?"Google Vertex AI \u2014 current gcloud login":"Google Vertex AI \u2014 service account",children:rt(Ue,{flexDirection:"column",children:[D.map((E,k)=>rt(Ue,{children:[rt(tt,{color:k===x?a.accent:a.muted,children:[k===x?"\u276F ":" ",E.label,":"]}),q(tt,{children:" "}),k===x?q(V,{value:E.value,placeholder:E.placeholder,onChange:E.set,onSubmit:I}):q(tt,{color:E.value?void 0:a.muted,children:E.value||E.placeholder||""})]},E.key)),q(Ue,{marginTop:1,children:q(v,{children:l==="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."})}),F&&q(Ue,{children:rt(tt,{color:a.accent,children:["\u25CF required \u2014 enter the ",N.key==="projectId"?"GCP project id":"service-account key path"," to continue"]})})]})})};import{useState as ae}from"react";import{Box as W,Text as Z}from"ink";import ds from"node:fs";import ms from"node:os";import ps from"node:path";import{jsx as T,jsxs as Q}from"react/jsx-runtime";var fs=ms.homedir(),gs=e=>{try{return ds.existsSync(ps.join(fs,e))}catch{return!1}},hs=()=>gs(".azure"),Qt="2024-10-21",ao=({initial:e,step:t,total:r,onDone:o})=>{let i=hs(),s=e.azureFoundry,n=s?.authMode?s.authMode:i?"azlogin":"apikey",[f,l]=ae("endpoint"),[u,d]=ae(n),[c,h]=ae(s?.endpointUrl||""),[g,m]=ae(s?.apiKey||""),[y,b]=ae(s?.tenantId||""),[S,C]=ae(s?.clientId||""),[p,x]=ae(s?.clientSecret||""),[_,R]=ae(s?.apiVersion||""),[D,N]=ae(s?.deploymentName||""),[F,I]=ae(0),E=()=>{let w={authMode:u,endpointUrl:c.trim(),apiVersion:_.trim()||Qt,deploymentName:D.trim()};u==="apikey"?w.apiKey=g:u==="entra"&&(w.tenantId=y.trim(),w.clientId=S.trim(),w.clientSecret=p),o({azureFoundry:w})};if(f==="endpoint")return T(A,{step:t,total:r,title:"Azure AI Foundry \u2014 models via your Azure endpoint",children:Q(W,{flexDirection:"column",children:[Q(W,{children:[T(Z,{color:a.accent,children:"\u276F Endpoint URL: "}),T(V,{value:c,placeholder:"https://my-foundry.cognitiveservices.azure.com",onChange:h,onSubmit:()=>{c.trim()&&(d(n),l("mode"))}})]}),T(W,{marginTop:1,children:T(v,{children:"Your Azure AI Foundry endpoint URL (required)."})}),!c.trim()&&T(W,{children:T(Z,{color:a.accent,children:"\u25CF required \u2014 enter the endpoint URL to continue"})})]})});if(f==="mode"){let w=[{label:"API key",value:"apikey"},{label:"Microsoft Entra app (tenant + client + secret)",value:"entra"}];return i&&w.push({label:"Use my current az login (~/.azure \u2014 mounted read-only)",value:"azlogin"}),T(A,{step:t,total:r,title:"Azure AI Foundry \u2014 authentication",children:Q(W,{flexDirection:"column",children:[T(v,{children:"Pick how the platform authenticates to your Azure AI Foundry endpoint."}),i&&T(v,{children:"Detected ~/.azure \u2014 your current az login is available."}),T(W,{marginTop:1,children:T(H,{items:w.map(K=>({label:K.label,value:K.value})),initialIndex:Math.max(0,w.findIndex(K=>K.value===u)),onSelect:K=>{let Ve=K.value;d(Ve),I(0),l(Ve==="apikey"?"apikey":Ve==="entra"?"entra":"common")},indicatorComponent:({isSelected:K})=>T(Z,{color:a.accent,children:K?"\u276F ":" "})})})]})})}if(f==="apikey")return T(A,{step:t,total:r,title:"Azure AI Foundry \u2014 API key",children:Q(W,{flexDirection:"column",children:[Q(W,{children:[T(Z,{color:a.accent,children:"\u276F API key: "}),T(V,{value:g,mask:"\u2022",onChange:m,onSubmit:()=>{g.trim()&&(I(0),l("common"))}})]}),T(W,{marginTop:1,children:T(v,{children:"Written to .env as AIF_API_KEY."})}),!g.trim()&&T(W,{children:T(Z,{color:a.accent,children:"\u25CF required \u2014 paste your API key to continue"})})]})});if(f==="entra"){let w=[{key:"tenantId",label:"Tenant id ",value:y,set:b,mask:!1},{key:"clientId",label:"Client id ",value:S,set:C,mask:!1},{key:"clientSecret",label:"Client secret ",value:p,set:x,mask:!0}],K=w[F],Ve=!K.value.trim(),Ho=()=>{Ve||(F+1<w.length?I(F+1):(I(0),l("common")))};return T(A,{step:t,total:r,title:"Azure AI Foundry \u2014 Microsoft Entra app",children:Q(W,{flexDirection:"column",children:[w.map((le,Pt)=>Q(W,{children:[Q(Z,{color:Pt===F?a.accent:a.muted,children:[Pt===F?"\u276F ":" ",le.label,":"]}),T(Z,{children:" "}),Pt===F?T(V,{value:le.value,onChange:le.set,onSubmit:Ho,mask:le.mask?"\u2022":void 0}):T(Z,{children:le.value?le.mask?"\u2022".repeat(Math.min(le.value.length,20)):le.value:""})]},le.key)),T(W,{marginTop:1,children:T(v,{children:"Written to .env as AIF_TENANT_ID / AIF_CLIENT_ID / AIF_CLIENT_SECRET."})}),Ve&&T(W,{children:Q(Z,{color:a.accent,children:["\u25CF required \u2014 enter the ",K.key==="clientSecret"?"client secret":K.key==="clientId"?"client id":"tenant id"," to continue"]})})]})})}let k=[{key:"apiVersion",label:"API version ",value:_,set:R,placeholder:Qt,required:!1},{key:"deploymentName",label:"Deployment / model ",value:D,set:N,placeholder:"gpt-4o",required:!0}],X=k[F],dr=!!X.required&&!X.value.trim(),Vo=()=>{dr||(F+1<k.length?I(F+1):E())};return T(A,{step:t,total:r,title:"Azure AI Foundry \u2014 deployment",children:Q(W,{flexDirection:"column",children:[k.map((w,K)=>Q(W,{children:[Q(Z,{color:K===F?a.accent:a.muted,children:[K===F?"\u276F ":" ",w.label,":"]}),T(Z,{children:" "}),K===F?T(V,{value:w.value,placeholder:w.placeholder,onChange:w.set,onSubmit:Vo}):T(Z,{color:w.value?void 0:a.muted,children:w.value||w.placeholder||""})]},w.key)),T(W,{marginTop:1,children:Q(v,{children:["API version defaults to ",Qt,". The deployment / model name is the chat model."]})}),dr&&T(W,{children:T(Z,{color:a.accent,children:"\u25CF required \u2014 enter the deployment / model name to continue"})})]})})};import{useState as co}from"react";import{Box as yt,Text as St,useInput as xs}from"ink";import _s from"node:fs";import bs from"node:os";import ys from"node:path";var Ss=bs.homedir(),Ne=e=>{try{return _s.existsSync(ys.join(Ss,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:()=>Ne(".aws/credentials")||Ne(".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:()=>Ne(".azure/azureProfile.json")||Ne(".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:()=>Ne(".config/gcloud/application_default_credentials.json")||Ne(".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:()=>Ne(".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 bt(e){return ie.filter(t=>e.includes(t.id)&&t.needsAuth&&!t.bundledBackend)}function lo(){return ie.filter(e=>e.defaultOn).map(e=>e.id)}import{jsx as je,jsxs as xt}from"react/jsx-runtime";var uo=({initial:e,step:t,total:r,onDone:o})=>{let[i,s]=co(new Set(e)),[n,f]=co(0);return xs((l,u)=>{if(u.upArrow){f(d=>Math.max(0,d-1));return}if(u.downArrow){f(d=>Math.min(ie.length-1,d+1));return}if(l===" "){let d=ie[n].id,c=new Set(i);c.has(d)?c.delete(d):c.add(d),s(c);return}if(u.return){o(Array.from(i));return}if(l==="a"){s(new Set(ie.map(d=>d.id)));return}if(l==="n"){s(new Set);return}}),je(A,{step:t,total:r,title:"Which MCPs do you want enabled?",children:xt(yt,{flexDirection:"column",children:[ie.map((l,u)=>{let d=i.has(l.id),c=u===n,h=d?"[x]":"[ ]",g=c?a.accent:"white",m=a.muted;return xt(yt,{children:[je(St,{color:c?a.accent:a.muted,children:c?"\u276F ":" "}),je(St,{color:d?a.ok:a.muted,children:h}),je(yt,{width:20,children:xt(St,{color:g,children:[" ",l.label]})}),xt(St,{color:m,children:[" ",l.blurb]})]},l.id)}),je(yt,{marginTop:1,children:je(v,{children:"Space toggles \xB7 a = all \xB7 n = none \xB7 Enter to continue"})})]})})};import{useState as nt,useEffect as mo}from"react";import{Box as ot,Text as Ye}from"ink";import vs from"node:fs";import Es from"node:os";import po from"node:path";import{jsx as oe,jsxs as vt}from"react/jsx-runtime";var As=po.join(Es.homedir(),".openagentic","cloud-secrets"),fo=({enabledIds:e,initialAuth:t,step:r,total:o,onDone:i})=>{let s=bt(e).filter(g=>!g.bundledBackend),[n,f]=nt(0),[l,u]=nt({...t}),d=s.length===0;if(mo(()=>{d&&i(l)},[d]),d)return null;let c=s[n],h=g=>{let m={...l,...g};u(m),n+1<s.length?f(n+1):i(m)};return oe(A,{step:r,total:o,title:`${c.label}: credentials (${n+1} of ${s.length})`,children:oe(Ts,{mcp:c,auth:l,onDone:h},c.id)})},Ts=({mcp:e,auth:t,onDone:r})=>{let o=e.envFile?po.join(As,e.envFile):void 0,i=!!o&&vs.existsSync(o),s=e.authType==="fields"&&(e.hostCreds?.detect()??!1),[n,f]=nt(e.authType==="env-file"||s?"choose-source":"fields"),[l,u]=nt(0),[d,c]=nt(e.envVars?Object.fromEntries(e.envVars.map(m=>[m.env,t[m.env]??""])):{}),h=e.envVars?.[l],g=n==="fields"&&!h;if(mo(()=>{g&&r(d)},[g]),n==="choose-source"){let y=[...e.hostCreds?.detect()??!1?[{label:`${e.hostCreds.description} (detected \u2014 recommended)`,value:"host-creds"}]:[],...e.authType==="env-file"?i?[{label:`Use ${o} (detected)`,value:"use-file"}]:[{label:`Create empty ${o} 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 vt(ot,{flexDirection:"column",children:[oe(Ye,{color:a.muted,children:e.blurb}),oe(ot,{marginTop:1,children:oe(H,{items:y,onSelect:b=>{b.value==="host-creds"||b.value==="use-file"||b.value==="stub"?r({}):b.value==="skip"?r({[`__skip_${e.id}`]:"1"}):f("fields")},indicatorComponent:({isSelected:b})=>oe(Ye,{color:a.accent,children:b?"\u276F ":" "})})})]})}return h?vt(ot,{flexDirection:"column",children:[oe(Ye,{color:a.muted,children:e.blurb}),e.envVars.map((m,y)=>vt(ot,{children:[vt(Ye,{color:y===l?a.accent:a.muted,children:[y===l?"\u276F ":" ",m.label.padEnd(32)]}),oe(Ye,{children:": "}),y===l?oe(V,{value:d[m.env]??"",onChange:b=>c({...d,[m.env]:b}),mask:m.mask?"\u2022":void 0,onSubmit:()=>{l+1<e.envVars.length?u(l+1):r(d)}}):oe(Ye,{children:m.mask&&d[m.env]?"\u2022".repeat(Math.min(d[m.env].length,16)):d[m.env]||""})]},m.env)),oe(ot,{marginTop:1,children:oe(v,{children:"Enter to advance \xB7 leave blank to skip an optional field"})})]}):null};import{Box as Je,Text as Et}from"ink";import{jsx as me,jsxs as At}from"react/jsx-runtime";var Is=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"}},ks=e=>e?`${e.authMode==="awslogin"?"current AWS login (~/.aws)":"inline IAM keys"}, region ${e.region}`:"none \u2014 chat will fail until set",Os=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}`},Cs=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}`},go=({config:e,step:t,total:r,onLaunch:o,onCancel:i})=>{let n=bt(e.mcps).filter(u=>u.authType==="fields"&&u.envVars?!u.envVars.some(d=>e.mcpAuth[d.env]):!1),f=e.mcps.length===0?"none selected":`${e.mcps.length} enabled (${e.mcps.slice(0,4).join(", ")}${e.mcps.length>4?"\u2026":""})`,l=(u,d,c)=>At(Je,{children:[me(Je,{width:18,children:me(Et,{color:a.muted,children:u})}),me(Et,{color:c,children:d})]},u);return At(A,{step:t,total:r,title:"Review & launch",children:[At(Je,{flexDirection:"column",children:[l("deploy target",e.target),e.target==="helm"&&e.kubeconfigPath&&l("kubeconfig",e.kubeconfigPath),l("admin email",e.admin.email),l("LLM strategy",Is(e.llmStrategy)),e.llmStrategy==="ollama"&&l("ollama host",e.ollama.host),e.llmStrategy==="ollama"&&l("embedding model",e.ollama.embedModel),e.llmStrategy==="bedrock"&&l("AWS Bedrock",ks(e.providers.bedrock)),e.llmStrategy==="bedrock"&&l("chat model",e.providers.bedrock?.model||"amazon.nova-pro-v1:0"),e.llmStrategy==="vertex"&&l("Vertex AI",Os(e.providers.vertex),e.providers.vertex?.projectId?void 0:a.err),e.llmStrategy==="vertex"&&l("chat model",e.providers.vertex?.model||"gemini-1.5-pro"),e.llmStrategy==="aif"&&l("Azure AI Foundry",Cs(e.providers.azureFoundry),e.providers.azureFoundry?.endpointUrl?void 0:a.err),e.llmStrategy==="aif"&&l("deployment / model",e.providers.azureFoundry?.deploymentName||"(unset)",e.providers.azureFoundry?.deploymentName?void 0:a.err),l("MCPs",f),l("UI port",String(e.uiPort)),n.length>0&&me(Je,{marginTop:1,children:At(Et,{color:a.err,children:["\u26A0 missing creds: ",n.map(u=>u.label).join(", ")]})})]}),me(Je,{marginTop:1,children:me(H,{items:[{label:`Launch ${e.target}`,value:"go"},{label:"Cancel",value:"no"}],onSelect:u=>u.value==="go"?o():i(),indicatorComponent:({isSelected:u})=>me(Et,{color:a.accent,children:u?"\u276F ":" "})})}),me(Je,{marginTop:1,children:me(v,{children:"Nothing has been written to disk yet. Launch will write .env and bring the stack up."})})]})};import{useEffect as Mo,useState as ar}from"react";import ei from"node:crypto";import{Box as z,Text as G,useInput as ti}from"ink";import ri from"open";import st from"node:fs";import Ds from"node:crypto";import{fileURLToPath as Rs}from"node:url";import Le from"node:path";var Ps=Le.dirname(Rs(import.meta.url)),Ee=process.env.OPENAGENTIC_HOME?Le.resolve(process.env.OPENAGENTIC_HOME):Le.resolve(Ps,"..","..","..",".."),Tt=Le.join(Ee,".env"),er=Le.join(Ee,".env.example"),Oc=Le.join(Ee,"docker-compose.yml"),ho=Le.join(Ee,"helm","openagentic");var tr="REPLACE_ME_AT_INSTALL_TIME",_o=(e=24)=>Ds.randomBytes(e).toString("base64url");function rr(){return st.existsSync(Tt)?Ms(st.readFileSync(Tt,"utf8")):{}}var Bs=["POSTGRES_PASSWORD","JWT_SECRET","SIGNING_SECRET","INTERNAL_API_KEY","FRONTEND_SECRET","INTERNAL_SERVICE_SECRET"];function bo(e){let t=st.existsSync(er)?st.readFileSync(er,"utf8"):"",r=rr();e={...e};for(let n of Bs)n in e||(e[n]=r[n]&&r[n]!==tr?r[n]:_o(32));let o=t.split(`
|
|
8
|
-
`).map(
|
|
9
|
-
`).flatMap(
|
|
10
|
-
`),"utf8")}function
|
|
11
|
-
`)){let o=/^\s*([A-Z0-9_]+)\s*=\s*(.*?)\s*$/.exec(r);if(!o)continue;let
|
|
12
|
-
`).map(r=>r.trim()).filter(Boolean)}catch{return[]}}var
|
|
13
|
-
`);
|
|
14
|
-
${
|
|
15
|
-
${y}`)}let l=await Qs(r),u=Date.now()+10*6e4,d="";for(;Date.now()<u;){let m=await Io(r),y=m.filter(ir).length;l=Math.max(l,m.length);let b=Xs(m),S=b?Zs(b):`all ${y} pods ready`;if(t.onStartProgress?.({done:y,total:Math.max(l,1),current:S}),t.onStart?.(S),b?.reason==="CrashLoopBackOff"&&b.app!==d&&(d=b.app,t.onStart?.(`${b.app} is CrashLoopBackOff (${b.restarts} restarts) \u2014 still waiting`)),m.length>=l&&l>0&&b===void 0||m.length>=l&&l>0&&m.every(C=>C.phase!=="Pending"))break;await nr(2e3)}t.onStartDone?.(),t.onHealth?.(`waiting for ${Te} readiness probe`);let c=Date.now()+10*6e4,h=!1;for(;Date.now()<c;){let m=(await Io(r)).filter(y=>y.app===Te);if(m.length>0){let y=m[0];if(ir(y)){h=!0;break}let b=y.reason?`${Te} ${y.ready}/${y.total} \xB7 ${y.reason}`:`${Te} ${y.ready}/${y.total} \u2192 waiting for readiness probe`;if(t.onHealth?.(b),y.reason==="CrashLoopBackOff"&&y.restarts>=4)throw it(n),new Error(`api is CrashLoopBackOff (${y.restarts} restarts) and is not becoming ready. Investigate: kubectl logs deploy/${Te} -n ${Ie}`)}else t.onHealth?.(`${Te} pod not scheduled yet`);await nr(3e3)}if(!h)throw it(n),new Error(`${Te} did not become ready within 10 minutes. Investigate: kubectl get pods -n ${Ie} ; kubectl logs deploy/${Te} -n ${Ie}`);if(t.onHealthDone?.(),it(n),i.ingress.enabled&&i.ingress.host)return`${i.ingress.tlsSecret?"https":"http"}://${i.ingress.host}/auth/magic?token=${o}`;let g=e.uiPort||8080;try{Fe("kubectl",["port-forward","svc/ui",`${g}:80`,"-n",Ie],{env:r,detached:!0,stdio:"ignore"}).unref(),await nr(1500)}catch{}return`http://localhost:${g}/auth/magic?token=${o}`}function it(e){try{ko.rmSync(e,{force:!0})}catch{}}import{jsx as O,jsxs as U}from"react/jsx-runtime";var at=process.env.WIZARD_DRY_RUN==="1",wo=["#6FB3A8","#9FD8C4","#88CCA0","#D9AE52","#DB8240"],Co="nomic-embed-text",lr=768,Ro="gpt-oss:20b",Ct="6",oi="text-embedding-005",Po=768,ni="/var/secrets/gcp/key.json",No=({config:e,step:t,total:r,onDone:o})=>{let[i,s]=ar(()=>(at?["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(h=>({label:h,state:"pending"}))),[n,f]=ar(null),[l,u]=ar(null),d=(c,h)=>s(g=>g.map((m,y)=>y===c?{...m,...h}:m));return Mo(()=>{let c=!1;return(async()=>{try{d(0,{state:"running"});let h=ei.randomBytes(24).toString("base64url");if(bo(ai(e,h)),d(0,{state:"ok"}),at){d(1,{state:"ok",detail:"skipped"}),d(2,{state:"ok",detail:"skipped"}),d(3,{state:"ok",detail:"skipped"}),d(4,{state:"ok",detail:"skipped"}),setTimeout(o,50);return}let m=await(e.target==="docker"?So:Oo)(e,{onBuild:b=>!c&&d(1,{state:"running",detail:b}),onBuildDone:()=>!c&&d(1,{state:"ok"}),onStart:b=>!c&&d(2,{state:"running",detail:b}),onStartProgress:b=>!c&&f(b),onStartDone:()=>!c&&d(2,{state:"ok"}),onHealth:b=>!c&&d(3,{state:"running",detail:b}),onHealthDone:()=>!c&&d(3,{state:"ok"})});if(c)return;let y=`http://localhost:${e.uiPort||8080}/auth/magic?token=${h}`;d(4,{state:"running",detail:y});try{await ri(y)}catch{}d(4,{state:"ok",detail:y}),u({chatUrl:m,magicUrl:y,adminEmail:e.admin.email||"admin@openagentic.local",password:e.admin.password||void 0})}catch(h){if(c)return;let g=h instanceof Error?h.message:String(h);s(m=>m.map(y=>y.state==="running"?{...y,state:"fail",detail:g}:y))}})(),()=>{c=!0}},[e]),l?O(ii,{result:l,step:t,total:r,onDone:o}):U(A,{step:t,total:r,title:at?"Bringing up openagentic (dry-run)":"Bringing up openagentic",children:[O(z,{flexDirection:"column",children:i.map((c,h)=>{let g=!at&&h===2&&c.state==="running"&&n&&n.total>0;return U(z,{flexDirection:"column",children:[U(z,{children:[c.state==="running"?O(G,{color:a.accent,children:O(pt,{type:"dots"})}):O(G,{color:Bo(c.state).color,children:Bo(c.state).char}),O(G,{children:" "}),O(G,{children:c.label}),g?U(G,{color:a.muted,children:[" ",n.done,"/",n.total,n.current?` \xB7 ${n.current}`:""]}):c.detail?U(G,{color:a.muted,children:[" ",c.detail.slice(0,80)]}):null]}),g?O(z,{marginLeft:2,children:O(lt,{value:n.done,total:n.total,width:36,stops:wo})}):null]},h)})}),O(z,{marginTop:1,children:O(v,{children:at?"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."})})]})},Do="https://www.openagentics.io/docs/",si=["Which pods are crashlooping and why?","Summarize the error logs from the last hour.","What's driving this month's cloud cost spike?"],ii=({result:e,step:t,total:r,onDone:o})=>{ti(()=>o()),Mo(()=>{let n=setTimeout(o,3e4);return()=>clearTimeout(n)},[o]);let i=Math.max(44,Math.min((process.stdout.columns||80)-6,88)),s=e.password?`password ${e.password}`:"password see ~/.openagentic/admin-credentials.txt";return U(A,{step:t,total:r,title:"openagentic is up",children:[U(z,{flexDirection:"column",children:[U(z,{children:[O(G,{color:a.ok,bold:!0,children:"\u2713 openagentic is up"}),O(G,{color:a.muted,children:" \u2014 the stack is healthy and ready."})]}),O(z,{marginTop:1,children:O(He,{width:i,stops:wo})}),U(z,{marginTop:1,flexDirection:"column",children:[U(z,{children:[O(G,{color:a.accent,bold:!0,children:"Chat UI "}),O(fe,{url:e.chatUrl,text:e.chatUrl})]}),U(z,{children:[O(G,{color:a.accent,bold:!0,children:"Sign in "}),O(fe,{url:e.magicUrl,text:"one-shot auto-login link (opens you in, signed in)"})]})]}),U(z,{marginTop:1,flexDirection:"column",children:[O(G,{color:a.faint,children:"admin login"}),O(z,{marginLeft:2,children:U(G,{color:a.ink,children:["email ",e.adminEmail]})}),O(z,{marginLeft:2,children:O(G,{color:a.ink,children:s})})]}),U(z,{marginTop:1,flexDirection:"column",children:[O(G,{color:a.faint,children:"try asking the agent"}),si.map((n,f)=>U(z,{marginLeft:2,children:[O(G,{color:a.signal,children:"\u203A "}),O(G,{color:a.muted,children:n})]},f))]}),U(z,{marginTop:1,children:[O(G,{color:a.faint,children:"docs "}),O(fe,{url:Do,text:Do})]})]}),O(z,{marginTop:1,children:O(v,{children:"Press any key to finish."})})]})};function Bo(e){switch(e){case"ok":return{char:"\u2713",color:a.ok};case"fail":return{char:"\u2717",color:a.err};case"running":return{char:"\u25E6",color:a.accent};default:return{char:"\xB7",color:a.muted}}}function ai(e,t){let r=e.llmStrategy==="ollama",o=e.llmStrategy==="bedrock",i=e.llmStrategy==="vertex",s=e.llmStrategy==="aif",n={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&&(n.MAGIC_BOOT_TOKEN=t),r?(n.OLLAMA_HOST=e.ollama.host,n.OLLAMA_EMBED_MODEL=e.ollama.embedModel,n.OLLAMA_ENABLED="true",n.EMBEDDING_PROVIDER="ollama",n.OLLAMA_CHAT_MODEL=Ro,n.BOOTSTRAP_PROVIDER_NAME="ollama-local",n.BOOTSTRAP_PROVIDER_DISPLAY_NAME="Ollama (local)",n.BOOTSTRAP_PROVIDER_TYPE="ollama",n.BOOTSTRAP_PROVIDER_CONFIG=JSON.stringify({endpoint:e.ollama.host}),n.BOOTSTRAP_PROVIDER_DEFAULTS=JSON.stringify({chat:Ro,embedding:e.ollama.embedModel,embeddingDimension:lr}),n.SEEDER_VERSION=Ct):n.OLLAMA_ENABLED="false";let f=e.providers.bedrock;if(o&&f){let c=(f.region||"us-east-1").trim()||"us-east-1",h=(f.model||"").trim()||"amazon.nova-pro-v1:0";n.AWS_REGION=c,f.authMode==="keys"&&f.accessKeyId&&f.secretAccessKey&&(n.AWS_ACCESS_KEY_ID=f.accessKeyId,n.AWS_SECRET_ACCESS_KEY=f.secretAccessKey),n.BOOTSTRAP_PROVIDER_NAME="aws-bedrock",n.BOOTSTRAP_PROVIDER_DISPLAY_NAME="AWS Bedrock",n.BOOTSTRAP_PROVIDER_TYPE="aws-bedrock",n.BOOTSTRAP_PROVIDER_CONFIG=JSON.stringify({region:c}),n.BOOTSTRAP_PROVIDER_DEFAULTS=JSON.stringify({chat:h,embedding:Co,embeddingDimension:lr}),n.SEEDER_VERSION=Ct}let l=e.providers.vertex;if(i&&l){let c=(l.projectId||"").trim(),h=(l.location||"us-central1").trim()||"us-central1",g=(l.model||"").trim()||"gemini-1.5-pro",m=oi;n.GOOGLE_CLOUD_PROJECT=c,n.GOOGLE_CLOUD_LOCATION=h,n.VERTEX_PROJECT=c,n.VERTEX_LOCATION=h,n.VERTEX_CHAT_MODEL=g,n.EMBEDDING_PROVIDER="vertex-ai",n.GCP_PROJECT_ID=c,n.GCP_LOCATION=h,n.GCP_EMBEDDING_MODEL=m,n.EMBEDDING_DIMENSIONS=String(Po),n.SKIP_TOOL_SEMANTIC_CACHE="false",l.authMode==="sajson"&&l.saKeyPath&&(n.GCP_SA_KEY_FILE=l.saKeyPath.startsWith("~")?(process.env.HOME||"")+l.saKeyPath.slice(1):l.saKeyPath,n.GOOGLE_APPLICATION_CREDENTIALS=ni),n.VERTEX_AI_API_KEY="",n.GEMINI_API_KEY="",n.BOOTSTRAP_PROVIDER_NAME="google-vertex",n.BOOTSTRAP_PROVIDER_DISPLAY_NAME="Google Vertex AI",n.BOOTSTRAP_PROVIDER_TYPE="vertex-ai",n.BOOTSTRAP_PROVIDER_CONFIG=JSON.stringify({projectId:c,location:h}),n.BOOTSTRAP_PROVIDER_DEFAULTS=JSON.stringify({chat:g,embedding:m,embeddingDimension:Po}),n.SEEDER_VERSION=Ct}let u=e.providers.azureFoundry;if(s&&u){let c=(u.endpointUrl||"").trim(),h=(u.apiVersion||"").trim()||"2024-10-21",g=(u.deploymentName||"").trim();n.AIF_ENDPOINT_URL=c,n.AIF_API_VERSION=h,n.AIF_MODEL=g,u.authMode==="apikey"&&u.apiKey?n.AIF_API_KEY=u.apiKey:u.authMode==="entra"&&(u.tenantId&&(n.AIF_TENANT_ID=u.tenantId),u.clientId&&(n.AIF_CLIENT_ID=u.clientId),u.clientSecret&&(n.AIF_CLIENT_SECRET=u.clientSecret)),n.BOOTSTRAP_PROVIDER_NAME="azure-ai-foundry",n.BOOTSTRAP_PROVIDER_DISPLAY_NAME="Azure AI Foundry",n.BOOTSTRAP_PROVIDER_TYPE="azure-ai-foundry";let m={endpointUrl:c,apiVersion:h,deploymentName:g};u.authMode==="entra"&&(u.tenantId&&(m.tenantId=u.tenantId),u.clientId&&(m.clientId=u.clientId)),n.BOOTSTRAP_PROVIDER_CONFIG=JSON.stringify(m),n.BOOTSTRAP_PROVIDER_DEFAULTS=JSON.stringify({chat:g,embedding:Co,embeddingDimension:lr}),n.SEEDER_VERSION=Ct}let d=new Set(e.mcps);for(let c of ie)n[c.disabledEnv]=d.has(c.id)?"false":"true";(d.has("prometheus")||d.has("loki"))&&(n.PROMETHEUS_URL="http://prometheus:9090",n.LOKI_URL="http://loki:3100",n.OTEL_EXPORTER_OTLP_ENDPOINT="http://otel-collector:4317");for(let[c,h]of Object.entries(e.mcpAuth))c.startsWith("__skip_")||h&&(n[c]=h);return n}var pe={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 $,jsxs as Rt}from"react/jsx-runtime";var pi=()=>{let e=rr(),[t,r]=cr(()=>({...pe,admin:{...pe.admin,email:e.ADMIN_USER_EMAIL||pe.admin.email,name:e.LOCAL_ADMIN_USERNAME||pe.admin.name},ollama:{...pe.ollama,host:e.OLLAMA_HOST||pe.ollama.host,embedModel:e.OLLAMA_EMBED_MODEL||pe.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(_=>_.trim()).filter(Boolean):lo(),mcpAuth:{},uiPort:e.UI_HOST_PORT?Number(e.UI_HOST_PORT):pe.uiPort})),[o,i]=cr("target"),s=t.llmStrategy,n=_=>r(R=>({...R,llmStrategy:_})),f=t.target==="helm"?1:0,l=s==="ollama"?1:0,u=s==="bedrock"?1:0,d=s==="vertex"?1:0,c=s==="aif"?1:0,h=1+f+1+1+l+u+d+c+1+1+1+1,g=1,m={target:g++,helmPreflight:t.target==="helm"?g++:0,admin:g++,llmStrategy:g++,ollama:l?g++:0,providers:u?g++:0,vertex:d?g++:0,aif:c?g++:0,mcps:g++,mcpAuth:g++,review:g++,launch:g++},y=_=>_==="ollama"?"ollama":_==="bedrock"?"providers":_==="vertex"?"vertex":_==="aif"?"aif":"mcps",[b,S]=cr(!1),C={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"},p=new Set(["target","llm-strategy","mcps","review"]),x=C[o];return mi((_,R)=>{if(b){(_==="?"||R.escape)&&S(!1);return}if(p.has(o)){if(_==="?"){S(!0);return}if(_==="d"){ui(We(x).url).catch(()=>{});return}}}),b?$(_r,{title:x,onClose:()=>S(!1)}):o==="target"?$(Er,{onPick:_=>{r({...t,target:_}),i(_==="helm"?"helm-preflight":"admin")}}):o==="helm-preflight"?$(Ur,{onContinue:_=>{r({...t,kubeconfigPath:_}),i("admin")},onBackToDocker:()=>{r({...t,target:"docker",kubeconfigPath:void 0}),i("admin")}}):o==="admin"?$(jr,{initial:t.admin,step:m.admin,total:h,onDone:_=>{r({...t,admin:_}),i("llm-strategy")}}):o==="llm-strategy"?$(qr,{step:m.llmStrategy,total:h,onPick:_=>{n(_),i(y(_))}}):o==="ollama"?$(Qr,{initial:t.ollama,step:m.ollama,total:h,onDone:_=>{r({...t,ollama:_}),i("mcps")}}):o==="providers"?$(to,{initial:t.providers,step:m.providers,total:h,onDone:_=>{r({...t,providers:_}),i("mcps")}}):o==="vertex"?$(io,{initial:t.providers,step:m.vertex,total:h,onDone:_=>{r({...t,providers:_}),i("mcps")}}):o==="aif"?$(ao,{initial:t.providers,step:m.aif,total:h,onDone:_=>{r({...t,providers:_}),i("mcps")}}):o==="mcps"?$(uo,{initial:t.mcps,step:m.mcps,total:h,onDone:_=>{r({...t,mcps:_}),i("mcp-auth")}}):o==="mcp-auth"?$(fo,{enabledIds:t.mcps,initialAuth:t.mcpAuth,step:m.mcpAuth,total:h,onDone:_=>{let R=Object.keys(_).filter(N=>N.startsWith("__skip_")).map(N=>N.slice(7)),D={};for(let[N,F]of Object.entries(_))N.startsWith("__skip_")||(D[N]=F);r({...t,mcps:t.mcps.filter(N=>!R.includes(N)),mcpAuth:D}),i("review")}}):o==="review"?$(go,{config:t,step:m.review,total:h,onLaunch:()=>i("launch"),onCancel:()=>process.exit(0)}):o==="launch"?$(No,{config:t,step:m.launch,total:h,onDone:()=>i("done")}):Rt(Lo,{flexDirection:"column",children:[$(Lt,{}),Rt(Lo,{marginLeft:2,flexDirection:"column",children:[$(ur,{color:a.ok,bold:!0,children:"openagentic is running"}),Rt(ur,{color:a.muted,children:["open http://localhost:",t.uiPort," in your browser"]}),Rt(ur,{color:a.muted,children:["sign in with ",t.admin.email]})]})]})},Fo=!1;try{Fo=!!process.argv[1]&&li(process.argv[1])===ci(import.meta.url)}catch{}if(Fo){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(`
|
|
4
|
+
`)+r,n=o+1,o=e.indexOf(`
|
|
5
|
+
`,n)}while(o!==-1);return s+=e.slice(n),s}var{stdout:Hr,stderr:$r}=Nr,Ut=Symbol("GENERATOR"),We=Symbol("STYLER"),Qe=Symbol("IS_EMPTY"),Vr=["ansi","ansi","ansi256","ansi16m"],Ge=Object.create(null),Vn=(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=Hr?Hr.level:0;e.level=t.level===void 0?r:t.level};var zn=e=>{let t=(...r)=>r.join(" ");return Vn(t,e),Object.setPrototypeOf(t,et.prototype),t};function et(e){return zn(e)}Object.setPrototypeOf(et.prototype,Function.prototype);for(let[e,t]of Object.entries(se))Ge[e]={get(){let r=ht(this,Yt(t.open,t.close,this[We]),this[Qe]);return Object.defineProperty(this,e,{value:r}),r}};Ge.visible={get(){let e=ht(this,this[We],!0);return Object.defineProperty(this,"visible",{value:e}),e}};var jt=(e,t,r,...o)=>e==="rgb"?t==="ansi16m"?se[r].ansi16m(...o):t==="ansi256"?se[r].ansi256(se.rgbToAnsi256(...o)):se[r].ansi(se.rgbToAnsi(...o)):e==="hex"?jt("rgb",t,r,...se.hexToRgb(...o)):se[r][e](...o),Wn=["rgb","hex","ansi256"];for(let e of Wn){Ge[e]={get(){let{level:r}=this;return function(...o){let n=Yt(jt(e,Vr[r],"color",...o),se.color.close,this[We]);return ht(this,n,this[Qe])}}};let t="bg"+e[0].toUpperCase()+e.slice(1);Ge[t]={get(){let{level:r}=this;return function(...o){let n=Yt(jt(e,Vr[r],"bgColor",...o),se.bgColor.close,this[We]);return ht(this,n,this[Qe])}}}}var Gn=Object.defineProperties(()=>{},{...Ge,level:{enumerable:!0,get(){return this[Ut].level},set(e){this[Ut].level=e}}}),Yt=(e,t,r)=>{let o,n;return r===void 0?(o=e,n=t):(o=r.openAll+e,n=t+r.closeAll),{open:e,close:t,openAll:o,closeAll:n,parent:r}},ht=(e,t,r)=>{let o=(...n)=>Kn(o,n.length===1?""+n[0]:n.join(" "));return Object.setPrototypeOf(o,Gn),o[Ut]=e,o[We]=t,o[Qe]=r,o},Kn=(e,t)=>{if(e.level<=0||!t)return e[Qe]?"":t;let r=e[We];if(r===void 0)return t;let{openAll:o,closeAll:n}=r;if(t.includes("\x1B"))for(;r!==void 0;)t=Lr(t,r.close,r.open),r=r.parent;let s=t.indexOf(`
|
|
6
|
+
`);return s!==-1&&(t=Fr(t,n,o,s)),o+t+n};Object.defineProperties(et.prototype,Ge);var Un=et(),Fa=et({level:$r?$r.level:0});var Se=Un;function Zn({value:e,placeholder:t="",focus:r=!0,mask:o,highlightPastedText:n=!1,showCursor:s=!0,onChange:i,onSubmit:_}){let[l,u]=Yn({cursorOffset:(e||"").length,cursorWidth:0}),{cursorOffset:p,cursorWidth:d}=l;Jn(()=>{u(f=>{if(!r||!s)return f;let g=e||"";return f.cursorOffset>g.length-1?{cursorOffset:g.length,cursorWidth:0}:f})},[e,r,s]);let b=n?d:0,c=o?o.repeat(e.length):e,h=c,x=t?Se.grey(t):void 0;if(s&&r){x=t.length>0?Se.inverse(t[0])+Se.grey(t.slice(1)):Se.inverse(" "),h=c.length>0?"":Se.inverse(" ");let f=0;for(let g of c)h+=f>=p-b&&f<=p?Se.inverse(g):g,f++;c.length>0&&p===c.length&&(h+=Se.inverse(" "))}return Xn((f,g)=>{if(g.upArrow||g.downArrow||g.ctrl&&f==="c"||g.tab||g.shift&&g.tab)return;if(g.return){_&&_(e);return}let S=p,m=e,v=0;g.leftArrow?s&&S--:g.rightArrow?s&&S++:g.backspace||g.delete?p>0&&(m=e.slice(0,p-1)+e.slice(p,e.length),S--):(m=e.slice(0,p)+f+e.slice(p,e.length),S+=f.length,f.length>1&&(v=f.length)),p<0&&(S=0),p>e.length&&(S=e.length),u({cursorOffset:S,cursorWidth:v}),m!==e&&i(m)},{isActive:r}),jn.createElement(qn,null,t?c.length>0?h:x:h)}var H=Zn;import{execa as Qn}from"execa";import{existsSync as zr,statSync as es}from"node:fs";import{homedir as Wr}from"node:os";import{join as Gr}from"node:path";var ts=8e3;function rs(e){return e.startsWith("~/")||e==="~"?Gr(Wr(),e.slice(1)):e}function Kr(){let e=process.env.KUBECONFIG?.trim();if(e)return e;let t=Gr(Wr(),".kube","config");return zr(t)?t:null}function Ur(e){let t=rs(e.trim());if(!t)return{ok:!1,reason:"path is empty"};if(!zr(t))return{ok:!1,reason:`not found: ${t}`};try{if(!es(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 Me(e,t,r){try{let o=await Qn(e,t,{timeout:ts,env:r,reject:!1});return{ok:o.exitCode===0,stdout:o.stdout||"",stderr:o.stderr||""}}catch(o){return{ok:!1,stdout:"",stderr:String(o)}}}async function jr(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},o=await Me("kubectl",["version","--client=true","--output=json"],t);if(o.ok)try{let p=JSON.parse(o.stdout);r.kubectlVersion=p?.clientVersion?.gitVersion||null}catch{r.kubectlVersion=null}let n=await Me("helm",["version","--template={{.Version}}"],t);if(n.ok&&(r.helmVersion=n.stdout.trim()),!r.kubectlVersion||!r.helmVersion)return r;let s=await Me("kubectl",["config","current-context"],t);if(s.ok&&(r.context=s.stdout.trim()),!r.context)return r;let i=await Me("kubectl",["version","--output=json"],t);if(i.ok)try{let p=JSON.parse(i.stdout);r.serverVersion=p?.serverVersion?.gitVersion||null,r.reachable=!!r.serverVersion}catch{r.reachable=!1}if(!r.reachable)return r;let _=await Me("kubectl",["get","nodes","-o","name"],t);_.ok&&(r.nodeCount=_.stdout.split(`
|
|
7
|
+
`).filter(Boolean).length);let l=await Me("kubectl",["get","namespace","openagentic","-o","name"],t);r.namespaceExists=l.ok&&l.stdout.trim().length>0;let u=await Me("helm",["list","-n","openagentic","-o","json"],t);if(u.ok)try{let p=JSON.parse(u.stdout);if(Array.isArray(p)&&p.length>0){let d=p.find(b=>b.name==="openagentic")??p[0];d&&(r.existingRelease={name:d.name,revision:Number(d.revision)||0,status:d.status||"unknown"})}}catch{}return r}import{jsx as R,jsxs as re}from"react/jsx-runtime";var Yr=({onContinue:e,onBackToDocker:t})=>{let r=Kr(),[o,n]=ns(r?{stage:"probing",kubeconfigPath:r}:{stage:"picking-kubeconfig",input:"",error:null});if(os(()=>{if(o.stage!=="probing")return;let u=!1;return jr(o.kubeconfigPath).then(p=>{u||n({stage:"ready",probe:p})}),()=>{u=!0}},[o.stage==="probing"?o.kubeconfigPath:null]),ss((u,p)=>{o.stage==="picking-kubeconfig"&&p.escape&&t()}),o.stage==="picking-kubeconfig")return re(T,{step:2,total:10,title:"Checking your cluster",children:[re(J,{flexDirection:"column",marginBottom:1,children:[re(j,{children:["No kubeconfig found at ",R(j,{color:a.accent,children:"$KUBECONFIG"})," or ",R(j,{color:a.accent,children:"~/.kube/config"}),"."]}),re(j,{children:["Paste a path to your kubeconfig, or press ",R(j,{color:a.accent,children:"Esc"})," to go back to Docker."]})]}),re(J,{children:[R(j,{children:"kubeconfig: "}),R(H,{value:o.input,onChange:u=>n({...o,input:u,error:null}),onSubmit:u=>{let p=Ur(u);if(!p.ok){n({...o,error:p.reason});return}n({stage:"probing",kubeconfigPath:p.path})}})]}),o.error&&R(J,{marginTop:1,children:R(j,{color:a.err,children:o.error})})]});if(o.stage==="probing")return R(T,{step:2,total:10,title:"Checking your cluster",children:re(J,{children:[R(j,{color:a.accent,children:R(ft,{type:"dots"})}),re(j,{children:[" probing cluster via ",o.kubeconfigPath,"\u2026"]})]})});let{probe:s}=o,i=[{label:"kubeconfig",value:s.kubeconfigPath},{label:"kubectl",value:s.kubectlVersion??"not found on PATH",colour:s.kubectlVersion?void 0:a.err},{label:"helm",value:s.helmVersion??"not found on PATH",colour:s.helmVersion?void 0:a.err},{label:"context",value:s.context??"no current context set",colour:s.context?void 0:a.err},{label:"cluster",value:s.reachable?`${s.serverVersion??"unknown"} (${s.nodeCount??"?"} nodes)`:"unreachable",colour:s.reachable?void 0:a.err},{label:"namespace",value:s.namespaceExists?"openagentic \u2014 exists":"openagentic \u2014 does not exist",colour:s.namespaceExists?a.warn:void 0},{label:"existing release",value:s.existingRelease?`${s.existingRelease.name} rev ${s.existingRelease.revision} (${s.existingRelease.status})`:"none",colour:s.existingRelease?a.warn:void 0}],_=s.kubectlVersion?s.helmVersion?s.context?s.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(_)return re(T,{step:2,total:10,title:"Checking your cluster",children:[R(J,{flexDirection:"column",children:i.map(u=>re(J,{children:[R(J,{width:18,children:R(j,{color:a.muted,children:u.label})}),R(j,{color:u.colour,children:u.value})]},u.label))}),R(J,{marginTop:1,children:R(j,{color:a.err,children:_})}),R(J,{marginTop:1,children:R($,{items:[{label:"Back to Docker deploy",value:"docker"},{label:"Quit",value:"quit"}],onSelect:u=>{u.value==="docker"?t():process.exit(0)}})})]});let l=s.existingRelease?`Existing release 'openagentic' (rev ${s.existingRelease.revision}). Continuing will run helm upgrade.`:s.namespaceExists?"Namespace 'openagentic' exists but no Helm release. Continuing will adopt it.":null;return re(T,{step:2,total:10,title:"Checking your cluster",children:[R(J,{flexDirection:"column",children:i.map(u=>re(J,{children:[R(J,{width:18,children:R(j,{color:a.muted,children:u.label})}),R(j,{color:u.colour,children:u.value})]},u.label))}),l&&R(J,{marginTop:1,children:re(j,{color:a.warn,children:["\u26A0 ",l]})}),R(J,{marginTop:1,children:R($,{items:[{label:s.existingRelease?"Upgrade existing release":"Continue",value:"continue"},{label:"Back to Docker deploy",value:"docker"}],onSelect:u=>{u.value==="continue"?e(s.kubeconfigPath):t()}})})]})};import{useState as Jt}from"react";import{Box as _t,Text as Ke}from"ink";import{jsx as ue,jsxs as tt}from"react/jsx-runtime";var Jr=({initial:e,step:t,total:r,onDone:o})=>{let[n,s]=Jt(e.email),[i,_]=Jt(e.password),[l,u]=Jt("email");return ue(T,{step:t,total:r,title:"Create your admin account",children:tt(_t,{flexDirection:"column",children:[tt(_t,{children:[tt(Ke,{color:l==="email"?a.accent:a.muted,children:[l==="email"?"\u276F ":" ","email :"]}),ue(Ke,{children:" "}),l==="email"?ue(H,{value:n,onChange:s,onSubmit:()=>u("password")}):ue(Ke,{children:n})]}),tt(_t,{children:[tt(Ke,{color:l==="password"?a.accent:a.muted,children:[l==="password"?"\u276F ":" ","password :"]}),ue(Ke,{children:" "}),l==="password"?ue(H,{value:i,onChange:_,mask:"\u2022",onSubmit:()=>{i.length>=8&&n.includes("@")&&o({...e,email:n,password:i})}}):ue(Ke,{children:"\u2022".repeat(Math.min(i.length,12))})]}),ue(_t,{marginTop:1,children:ue(E,{children:"Minimum 8 characters. You can change this later from the admin panel."})})]})})};import{Box as qt,Text as Xt}from"ink";import{jsx as de,jsxs as Xr}from"react/jsx-runtime";var qr=[{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."}],Zr=({step:e,total:t,onPick:r})=>de(T,{step:e,total:t,title:"Which LLM provider should the platform use?",children:Xr(qt,{flexDirection:"column",children:[de(E,{children:"Pick the provider that powers chat completions and embeddings. Nothing is pre-selected."}),de(E,{children:"The platform never starts or assumes a provider \u2014 only the one you choose here is configured."}),de(E,{children:"Cloud-management creds (Azure / AWS / GCP) are a separate step further down."}),de(qt,{marginTop:1,children:de($,{items:qr.map(o=>({label:o.label,value:o.value})),onSelect:o=>{let n=o.value;n!=="none"&&r(n)},indicatorComponent:({isSelected:o})=>de(Xt,{color:a.accent,children:o?"\u276F ":" "})})}),de(qt,{marginTop:1,flexDirection:"column",children:qr.filter(o=>o.value!=="none").map(o=>Xr(Xt,{color:a.muted,children:[" ",de(Xt,{bold:!0,children:o.label.split(" \u2014 ")[0]})," \u2014 ",o.hint]},o.value))})]})});import{useState as is}from"react";import{Box as bt,Text as Qr}from"ink";import{jsx as xe,jsxs as eo}from"react/jsx-runtime";var to=({initial:e,step:t,total:r,onDone:o})=>{let[n,s]=is(e.host);return xe(T,{step:t,total:r,title:"Where is your Ollama?",children:eo(bt,{flexDirection:"column",children:[eo(bt,{children:[xe(Qr,{color:a.accent,children:"\u276F "}),xe(Qr,{children:"host: "}),xe(H,{value:n,onChange:s,onSubmit:()=>o({...e,host:n})})]}),xe(bt,{marginTop:1,children:xe(E,{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."})}),xe(bt,{children:xe(E,{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 De}from"react";import{Box as me,Text as ve}from"ink";import as from"node:fs";import ls from"node:os";import cs from"node:path";import{jsx as L,jsxs as Ee}from"react/jsx-runtime";var us=ls.homedir(),ro=e=>{try{return as.existsSync(cs.join(us,e))}catch{return!1}},ds=()=>ro(".aws/credentials")||ro(".aws/config"),Zt="us-east-1",Qt="amazon.nova-pro-v1:0",oo=({initial:e,step:t,total:r,onDone:o})=>{let n=ds(),s=e.bedrock,i=s?.authMode?s.authMode:n?"awslogin":"keys",[_,l]=De("mode"),[u,p]=De(i),[d,b]=De(s?.region||""),[c,h]=De(s?.accessKeyId||""),[x,f]=De(s?.secretAccessKey||""),[g,S]=De(s?.model||""),[m,v]=De(0),y=I=>{let A=d.trim()||Zt,O=g.trim()||Qt,X={authMode:I,region:A,model:O};I==="keys"&&(X.accessKeyId=c.trim(),X.secretAccessKey=x),o({bedrock:X})};if(_==="mode"){let I=[];return n&&I.push({label:"Use my current AWS login (~/.aws \u2014 mounted read-only)",value:"awslogin"}),I.push({label:"Enter IAM access key + secret",value:"keys"}),L(T,{step:t,total:r,title:"AWS Bedrock \u2014 models via your AWS account",children:Ee(me,{flexDirection:"column",children:[L(E,{children:"Pick how the platform authenticates to your AWS account for Bedrock."}),n?L(E,{children:"Detected AWS credentials in ~/.aws \u2014 your current login is the easy path."}):L(E,{children:"No ~/.aws found on this machine \u2014 paste an IAM access key + secret."}),L(me,{marginTop:1,children:L($,{items:I.map(A=>({label:A.label,value:A.value})),initialIndex:Math.max(0,I.findIndex(A=>A.value===u)),onSelect:A=>{let O=A.value;p(O),v(0),l(O==="awslogin"?"awslogin":"keys")},indicatorComponent:({isSelected:A})=>L(ve,{color:a.accent,children:A?"\u276F ":" "})})})]})})}if(_==="awslogin"){let I=[{key:"region",label:"AWS region ",value:d,set:b,placeholder:Zt},{key:"model",label:"Bedrock chat model ",value:g,set:S,placeholder:Qt}],A=()=>{m+1<I.length?v(m+1):y("awslogin")};return L(T,{step:t,total:r,title:"AWS Bedrock \u2014 current AWS login",children:Ee(me,{flexDirection:"column",children:[I.map((O,X)=>Ee(me,{children:[Ee(ve,{color:X===m?a.accent:a.muted,children:[X===m?"\u276F ":" ",O.label,":"]}),L(ve,{children:" "}),X===m?L(H,{value:O.value,placeholder:O.placeholder,onChange:O.set,onSubmit:A}):L(ve,{color:O.value?void 0:a.muted,children:O.value||O.placeholder})]},O.key)),L(me,{marginTop:1,children:L(E,{children:"Your host ~/.aws is mounted read-only into the api; the default credential chain resolves it."})})]})})}let C=[{key:"region",label:"AWS region ",value:d,set:b,mask:!1,placeholder:Zt},{key:"accessKeyId",label:"AWS access key id ",value:c,set:h,mask:!1,placeholder:"AKIA\u2026"},{key:"secretAccessKey",label:"AWS secret access key ",value:x,set:f,mask:!0,placeholder:""},{key:"model",label:"Bedrock chat model ",value:g,set:S,mask:!1,placeholder:Qt}],w=C[m],N=(w.key==="accessKeyId"||w.key==="secretAccessKey")&&!w.value.trim(),F=()=>{N||(m+1<C.length?v(m+1):y("keys"))};return L(T,{step:t,total:r,title:"AWS Bedrock \u2014 IAM access key",children:Ee(me,{flexDirection:"column",children:[C.map((I,A)=>Ee(me,{children:[Ee(ve,{color:A===m?a.accent:a.muted,children:[A===m?"\u276F ":" ",I.label,":"]}),L(ve,{children:" "}),A===m?L(H,{value:I.value,placeholder:I.mask?void 0:I.placeholder,onChange:I.set,onSubmit:F,mask:I.mask?"\u2022":void 0}):L(ve,{color:I.value?void 0:a.muted,children:I.value?I.mask?"\u2022".repeat(Math.min(I.value.length,20)):I.value:I.mask?"":I.placeholder})]},I.key)),L(me,{marginTop:1,children:L(E,{children:"Inline IAM keys are written to .env as AWS_ACCESS_KEY_ID / AWS_SECRET_ACCESS_KEY."})}),N&&L(me,{children:Ee(ve,{color:a.accent,children:["\u25CF required \u2014 paste your IAM ",w.key==="secretAccessKey"?"secret":"access key"," to continue"]})})]})})};import{useState as Be}from"react";import{Box as Ue,Text as rt}from"ink";import io from"node:fs";import ms from"node:os";import er from"node:path";import{jsx as q,jsxs as ot}from"react/jsx-runtime";var ao=ms.homedir(),ps=e=>{try{return io.existsSync(er.join(ao,e))}catch{return!1}},fs=()=>ps(".config/gcloud"),gs=()=>{let e=er.join(ao,".config","gcloud","keys");try{let t=io.readdirSync(e).find(r=>r.endsWith(".json"));if(t)return er.join(e,t)}catch{}return""},no="us-central1",so="gemini-1.5-pro",lo=({initial:e,step:t,total:r,onDone:o})=>{let n=fs(),s=e.vertex,i=gs(),_=s?.authMode?s.authMode:n?"adc":"sajson",[l,u]=Be("mode"),[p,d]=Be(_),[b,c]=Be(s?.projectId||""),[h,x]=Be(s?.location||""),[f,g]=Be(s?.model||""),[S,m]=Be(s?.saKeyPath||""),[v,y]=Be(0),C=A=>{let O={authMode:A,projectId:b.trim(),location:h.trim()||no,model:f.trim()||so};A==="sajson"&&(O.saKeyPath=S.trim()||i),o({vertex:O})};if(l==="mode"){let A=[];return n&&A.push({label:"Use my current gcloud login (ADC \u2014 ~/.config/gcloud, mounted read-only)",value:"adc"}),A.push({label:"Provide a service-account JSON key",value:"sajson"}),q(T,{step:t,total:r,title:"Google Vertex AI \u2014 Gemini via your GCP project",children:ot(Ue,{flexDirection:"column",children:[q(E,{children:"Pick how the platform authenticates to your GCP project for Vertex AI."}),n?q(E,{children:"Detected ~/.config/gcloud \u2014 your current gcloud login (ADC) is the easy path."}):q(E,{children:"No ~/.config/gcloud found \u2014 provide a service-account JSON key path."}),q(Ue,{marginTop:1,children:q($,{items:A.map(O=>({label:O.label,value:O.value})),initialIndex:Math.max(0,A.findIndex(O=>O.value===p)),onSelect:O=>{let X=O.value;d(X),y(0),u(X==="adc"?"adc":"sajson")},indicatorComponent:({isSelected:O})=>q(rt,{color:a.accent,children:O?"\u276F ":" "})})})]})})}let w=[{key:"projectId",label:"GCP project id ",value:b,set:c,placeholder:"my-gcp-project",required:!0},{key:"location",label:"Location ",value:h,set:x,placeholder:no},{key:"model",label:"Gemini chat model ",value:f,set:g,placeholder:so}];l==="sajson"&&w.push({key:"saKeyPath",label:"Service-account key ",value:S,set:m,placeholder:i||"~/.config/gcloud/keys/sa.json",required:!0});let N=w[v],F=!!N.required&&!N.value.trim()&&!(N.key==="saKeyPath"&&i),I=()=>{F||(v+1<w.length?y(v+1):C(l==="adc"?"adc":"sajson"))};return q(T,{step:t,total:r,title:l==="adc"?"Google Vertex AI \u2014 current gcloud login":"Google Vertex AI \u2014 service account",children:ot(Ue,{flexDirection:"column",children:[w.map((A,O)=>ot(Ue,{children:[ot(rt,{color:O===v?a.accent:a.muted,children:[O===v?"\u276F ":" ",A.label,":"]}),q(rt,{children:" "}),O===v?q(H,{value:A.value,placeholder:A.placeholder,onChange:A.set,onSubmit:I}):q(rt,{color:A.value?void 0:a.muted,children:A.value||A.placeholder||""})]},A.key)),q(Ue,{marginTop:1,children:q(E,{children:l==="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."})}),F&&q(Ue,{children:ot(rt,{color:a.accent,children:["\u25CF required \u2014 enter the ",N.key==="projectId"?"GCP project id":"service-account key path"," to continue"]})})]})})};import{useState as ae}from"react";import{Box as V,Text as Z}from"ink";import hs from"node:fs";import _s from"node:os";import bs from"node:path";import{jsx as k,jsxs as Q}from"react/jsx-runtime";var ys=_s.homedir(),Ss=e=>{try{return hs.existsSync(bs.join(ys,e))}catch{return!1}},xs=()=>Ss(".azure"),tr="2024-10-21",co=({initial:e,step:t,total:r,onDone:o})=>{let n=xs(),s=e.azureFoundry,i=s?.authMode?s.authMode:n?"azlogin":"apikey",[_,l]=ae("endpoint"),[u,p]=ae(i),[d,b]=ae(s?.endpointUrl||""),[c,h]=ae(s?.apiKey||""),[x,f]=ae(s?.tenantId||""),[g,S]=ae(s?.clientId||""),[m,v]=ae(s?.clientSecret||""),[y,C]=ae(s?.apiVersion||""),[w,N]=ae(s?.deploymentName||""),[F,I]=ae(0),A=()=>{let B={authMode:u,endpointUrl:d.trim(),apiVersion:y.trim()||tr,deploymentName:w.trim()};u==="apikey"?B.apiKey=c:u==="entra"&&(B.tenantId=x.trim(),B.clientId=g.trim(),B.clientSecret=m),o({azureFoundry:B})};if(_==="endpoint")return k(T,{step:t,total:r,title:"Azure AI Foundry \u2014 models via your Azure endpoint",children:Q(V,{flexDirection:"column",children:[Q(V,{children:[k(Z,{color:a.accent,children:"\u276F Endpoint URL: "}),k(H,{value:d,placeholder:"https://my-foundry.cognitiveservices.azure.com",onChange:b,onSubmit:()=>{d.trim()&&(p(i),l("mode"))}})]}),k(V,{marginTop:1,children:k(E,{children:"Your Azure AI Foundry endpoint URL (required)."})}),!d.trim()&&k(V,{children:k(Z,{color:a.accent,children:"\u25CF required \u2014 enter the endpoint URL to continue"})})]})});if(_==="mode"){let B=[{label:"API key",value:"apikey"},{label:"Microsoft Entra app (tenant + client + secret)",value:"entra"}];return n&&B.push({label:"Use my current az login (~/.azure \u2014 mounted read-only)",value:"azlogin"}),k(T,{step:t,total:r,title:"Azure AI Foundry \u2014 authentication",children:Q(V,{flexDirection:"column",children:[k(E,{children:"Pick how the platform authenticates to your Azure AI Foundry endpoint."}),n&&k(E,{children:"Detected ~/.azure \u2014 your current az login is available."}),k(V,{marginTop:1,children:k($,{items:B.map(K=>({label:K.label,value:K.value})),initialIndex:Math.max(0,B.findIndex(K=>K.value===u)),onSelect:K=>{let He=K.value;p(He),I(0),l(He==="apikey"?"apikey":He==="entra"?"entra":"common")},indicatorComponent:({isSelected:K})=>k(Z,{color:a.accent,children:K?"\u276F ":" "})})})]})})}if(_==="apikey")return k(T,{step:t,total:r,title:"Azure AI Foundry \u2014 API key",children:Q(V,{flexDirection:"column",children:[Q(V,{children:[k(Z,{color:a.accent,children:"\u276F API key: "}),k(H,{value:c,mask:"\u2022",onChange:h,onSubmit:()=>{c.trim()&&(I(0),l("common"))}})]}),k(V,{marginTop:1,children:k(E,{children:"Written to .env as AIF_API_KEY."})}),!c.trim()&&k(V,{children:k(Z,{color:a.accent,children:"\u25CF required \u2014 paste your API key to continue"})})]})});if(_==="entra"){let B=[{key:"tenantId",label:"Tenant id ",value:x,set:f,mask:!1},{key:"clientId",label:"Client id ",value:g,set:S,mask:!1},{key:"clientSecret",label:"Client secret ",value:m,set:v,mask:!0}],K=B[F],He=!K.value.trim(),Ko=()=>{He||(F+1<B.length?I(F+1):(I(0),l("common")))};return k(T,{step:t,total:r,title:"Azure AI Foundry \u2014 Microsoft Entra app",children:Q(V,{flexDirection:"column",children:[B.map((ce,Mt)=>Q(V,{children:[Q(Z,{color:Mt===F?a.accent:a.muted,children:[Mt===F?"\u276F ":" ",ce.label,":"]}),k(Z,{children:" "}),Mt===F?k(H,{value:ce.value,onChange:ce.set,onSubmit:Ko,mask:ce.mask?"\u2022":void 0}):k(Z,{children:ce.value?ce.mask?"\u2022".repeat(Math.min(ce.value.length,20)):ce.value:""})]},ce.key)),k(V,{marginTop:1,children:k(E,{children:"Written to .env as AIF_TENANT_ID / AIF_CLIENT_ID / AIF_CLIENT_SECRET."})}),He&&k(V,{children:Q(Z,{color:a.accent,children:["\u25CF required \u2014 enter the ",K.key==="clientSecret"?"client secret":K.key==="clientId"?"client id":"tenant id"," to continue"]})})]})})}let O=[{key:"apiVersion",label:"API version ",value:y,set:C,placeholder:tr,required:!1},{key:"deploymentName",label:"Deployment / model ",value:w,set:N,placeholder:"gpt-4o",required:!0}],X=O[F],pr=!!X.required&&!X.value.trim(),Go=()=>{pr||(F+1<O.length?I(F+1):A())};return k(T,{step:t,total:r,title:"Azure AI Foundry \u2014 deployment",children:Q(V,{flexDirection:"column",children:[O.map((B,K)=>Q(V,{children:[Q(Z,{color:K===F?a.accent:a.muted,children:[K===F?"\u276F ":" ",B.label,":"]}),k(Z,{children:" "}),K===F?k(H,{value:B.value,placeholder:B.placeholder,onChange:B.set,onSubmit:Go}):k(Z,{color:B.value?void 0:a.muted,children:B.value||B.placeholder||""})]},B.key)),k(V,{marginTop:1,children:Q(E,{children:["API version defaults to ",tr,". The deployment / model name is the chat model."]})}),pr&&k(V,{children:k(Z,{color:a.accent,children:"\u25CF required \u2014 enter the deployment / model name to continue"})})]})})};import{useState as mo}from"react";import{Box as St,Text as xt,useInput as ks}from"ink";import vs from"node:fs";import Es from"node:os";import As from"node:path";var Ts=Es.homedir(),Ne=e=>{try{return vs.existsSync(As.join(Ts,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:()=>Ne(".aws/credentials")||Ne(".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:()=>Ne(".azure/azureProfile.json")||Ne(".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:()=>Ne(".config/gcloud/application_default_credentials.json")||Ne(".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:()=>Ne(".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 yt(e){return ie.filter(t=>e.includes(t.id)&&t.needsAuth&&!t.bundledBackend)}function uo(){return ie.filter(e=>e.defaultOn).map(e=>e.id)}import{jsx as je,jsxs as vt}from"react/jsx-runtime";var po=({initial:e,step:t,total:r,onDone:o})=>{let[n,s]=mo(new Set(e)),[i,_]=mo(0);return ks((l,u)=>{if(u.upArrow){_(p=>Math.max(0,p-1));return}if(u.downArrow){_(p=>Math.min(ie.length-1,p+1));return}if(l===" "){let p=ie[i].id,d=new Set(n);d.has(p)?d.delete(p):d.add(p),s(d);return}if(u.return){o(Array.from(n));return}if(l==="a"){s(new Set(ie.map(p=>p.id)));return}if(l==="n"){s(new Set);return}}),je(T,{step:t,total:r,title:"Which MCPs do you want enabled?",children:vt(St,{flexDirection:"column",children:[ie.map((l,u)=>{let p=n.has(l.id),d=u===i,b=p?"[x]":"[ ]",c=d?a.accent:"white",h=a.muted;return vt(St,{children:[je(xt,{color:d?a.accent:a.muted,children:d?"\u276F ":" "}),je(xt,{color:p?a.ok:a.muted,children:b}),je(St,{width:20,children:vt(xt,{color:c,children:[" ",l.label]})}),vt(xt,{color:h,children:[" ",l.blurb]})]},l.id)}),je(St,{marginTop:1,children:je(E,{children:"Space toggles \xB7 a = all \xB7 n = none \xB7 Enter to continue"})})]})})};import{useState as st,useEffect as fo}from"react";import{Box as nt,Text as Ye}from"ink";import Is from"node:fs";import Os from"node:os";import go from"node:path";import{jsx as oe,jsxs as Et}from"react/jsx-runtime";var Ps=go.join(Os.homedir(),".openagentic","cloud-secrets"),ho=({enabledIds:e,initialAuth:t,step:r,total:o,onDone:n})=>{let s=yt(e).filter(c=>!c.bundledBackend),[i,_]=st(0),[l,u]=st({...t}),p=s.length===0;if(fo(()=>{p&&n(l)},[p]),p)return null;let d=s[i],b=c=>{let h={...l,...c};u(h),i+1<s.length?_(i+1):n(h)};return oe(T,{step:r,total:o,title:`${d.label}: credentials (${i+1} of ${s.length})`,children:oe(Cs,{mcp:d,auth:l,onDone:b},d.id)})},Cs=({mcp:e,auth:t,onDone:r})=>{let o=e.envFile?go.join(Ps,e.envFile):void 0,n=!!o&&Is.existsSync(o),s=e.authType==="fields"&&(e.hostCreds?.detect()??!1),[i,_]=st(e.authType==="env-file"||s?"choose-source":"fields"),[l,u]=st(0),[p,d]=st(e.envVars?Object.fromEntries(e.envVars.map(h=>[h.env,t[h.env]??""])):{}),b=e.envVars?.[l],c=i==="fields"&&!b;if(fo(()=>{c&&r(p)},[c]),i==="choose-source"){let x=[...e.hostCreds?.detect()??!1?[{label:`${e.hostCreds.description} (detected \u2014 recommended)`,value:"host-creds"}]:[],...e.authType==="env-file"?n?[{label:`Use ${o} (detected)`,value:"use-file"}]:[{label:`Create empty ${o} 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(nt,{flexDirection:"column",children:[oe(Ye,{color:a.muted,children:e.blurb}),oe(nt,{marginTop:1,children:oe($,{items:x,onSelect:f=>{f.value==="host-creds"||f.value==="use-file"||f.value==="stub"?r({}):f.value==="skip"?r({[`__skip_${e.id}`]:"1"}):_("fields")},indicatorComponent:({isSelected:f})=>oe(Ye,{color:a.accent,children:f?"\u276F ":" "})})})]})}return b?Et(nt,{flexDirection:"column",children:[oe(Ye,{color:a.muted,children:e.blurb}),e.envVars.map((h,x)=>Et(nt,{children:[Et(Ye,{color:x===l?a.accent:a.muted,children:[x===l?"\u276F ":" ",h.label.padEnd(32)]}),oe(Ye,{children:": "}),x===l?oe(H,{value:p[h.env]??"",onChange:f=>d({...p,[h.env]:f}),mask:h.mask?"\u2022":void 0,onSubmit:()=>{l+1<e.envVars.length?u(l+1):r(p)}}):oe(Ye,{children:h.mask&&p[h.env]?"\u2022".repeat(Math.min(p[h.env].length,16)):p[h.env]||""})]},h.env)),oe(nt,{marginTop:1,children:oe(E,{children:"Enter to advance \xB7 leave blank to skip an optional field"})})]}):null};import{Box as Je,Text as At}from"ink";import{jsx as pe,jsxs as Tt}from"react/jsx-runtime";var Rs=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"}},ws=e=>e?`${e.authMode==="awslogin"?"current AWS login (~/.aws)":"inline IAM keys"}, region ${e.region}`:"none \u2014 chat will fail until set",Ms=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}`},Ds=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}`},_o=({config:e,step:t,total:r,onLaunch:o,onCancel:n})=>{let i=yt(e.mcps).filter(u=>u.authType==="fields"&&u.envVars?!u.envVars.some(p=>e.mcpAuth[p.env]):!1),_=e.mcps.length===0?"none selected":`${e.mcps.length} enabled (${e.mcps.slice(0,4).join(", ")}${e.mcps.length>4?"\u2026":""})`,l=(u,p,d)=>Tt(Je,{children:[pe(Je,{width:18,children:pe(At,{color:a.muted,children:u})}),pe(At,{color:d,children:p})]},u);return Tt(T,{step:t,total:r,title:"Review & launch",children:[Tt(Je,{flexDirection:"column",children:[l("deploy target",e.target),e.target==="helm"&&e.kubeconfigPath&&l("kubeconfig",e.kubeconfigPath),l("admin email",e.admin.email),l("LLM strategy",Rs(e.llmStrategy)),e.llmStrategy==="ollama"&&l("ollama host",e.ollama.host),e.llmStrategy==="ollama"&&l("embedding model",e.ollama.embedModel),e.llmStrategy==="bedrock"&&l("AWS Bedrock",ws(e.providers.bedrock)),e.llmStrategy==="bedrock"&&l("chat model",e.providers.bedrock?.model||"amazon.nova-pro-v1:0"),e.llmStrategy==="vertex"&&l("Vertex AI",Ms(e.providers.vertex),e.providers.vertex?.projectId?void 0:a.err),e.llmStrategy==="vertex"&&l("chat model",e.providers.vertex?.model||"gemini-1.5-pro"),e.llmStrategy==="aif"&&l("Azure AI Foundry",Ds(e.providers.azureFoundry),e.providers.azureFoundry?.endpointUrl?void 0:a.err),e.llmStrategy==="aif"&&l("deployment / model",e.providers.azureFoundry?.deploymentName||"(unset)",e.providers.azureFoundry?.deploymentName?void 0:a.err),l("MCPs",_),l("UI port",String(e.uiPort)),i.length>0&&pe(Je,{marginTop:1,children:Tt(At,{color:a.err,children:["\u26A0 missing creds: ",i.map(u=>u.label).join(", ")]})})]}),pe(Je,{marginTop:1,children:pe($,{items:[{label:`Launch ${e.target}`,value:"go"},{label:"Cancel",value:"no"}],onSelect:u=>u.value==="go"?o():n(),indicatorComponent:({isSelected:u})=>pe(At,{color:a.accent,children:u?"\u276F ":" "})})}),pe(Je,{marginTop:1,children:pe(E,{children:"Nothing has been written to disk yet. Launch will write .env and bring the stack up."})})]})};import{useEffect as Ho,useState as Ct}from"react";import ai from"node:crypto";import{Box as z,Text as W,useInput as li}from"ink";import ci from"open";import it from"node:fs";import Ls from"node:crypto";import{fileURLToPath as Bs}from"node:url";import Le from"node:path";var Ns=Le.dirname(Bs(import.meta.url)),Ae=process.env.OPENAGENTIC_HOME?Le.resolve(process.env.OPENAGENTIC_HOME):Le.resolve(Ns,"..","..","..",".."),kt=Le.join(Ae,".env"),rr=Le.join(Ae,".env.example"),Bc=Le.join(Ae,"docker-compose.yml"),bo=Le.join(Ae,"helm","openagentic");var or="REPLACE_ME_AT_INSTALL_TIME",yo=(e=24)=>Ls.randomBytes(e).toString("base64url");function nr(){return it.existsSync(kt)?Hs(it.readFileSync(kt,"utf8")):{}}var Fs=["POSTGRES_PASSWORD","JWT_SECRET","SIGNING_SECRET","INTERNAL_API_KEY","FRONTEND_SECRET","INTERNAL_SERVICE_SECRET"];function So(e){let t=it.existsSync(rr)?it.readFileSync(rr,"utf8"):"",r=nr();e={...e};for(let i of Fs)i in e||(e[i]=r[i]&&r[i]!==or?r[i]:yo(32));let o=t.split(`
|
|
8
|
+
`).map(i=>{let _=/^(\s*)([A-Z0-9_]+)\s*=(.*)$/.exec(i);if(_){let l=_[2],u=_[3];if(l in e)return`${_[1]}${l}=${e[l]}`;if(u.trim()===or)return`${_[1]}${l}=${r[l]&&r[l]!==or?r[l]:yo()}`}return i}),n=new Set(t.split(`
|
|
9
|
+
`).flatMap(i=>{let _=/^\s*([A-Z0-9_]+)\s*=/.exec(i);return _?[_[1]]:[]})),s=Object.entries(e).filter(([i])=>!n.has(i));if(s.length>0){o.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[i,_]of s)o.push(`${i}=${_}`)}it.writeFileSync(kt,o.join(`
|
|
10
|
+
`),"utf8")}function Hs(e){let t={};for(let r of e.split(`
|
|
11
|
+
`)){let o=/^\s*([A-Z0-9_]+)\s*=\s*(.*?)\s*$/.exec(r);if(!o)continue;let n=o[2];(n.startsWith('"')&&n.endsWith('"')||n.startsWith("'")&&n.endsWith("'"))&&(n=n.slice(1,-1)),t[o[1]]=n}return t}import{execa as sr}from"execa";function $s(e){if(!e)return!1;try{return new URL(e).hostname==="ollama"}catch{return/(^|\/\/)ollama(:|\/|$)/.test(e)}}async function Vs(e){try{let{stdout:t}=await sr("docker",["compose",...e,"config","--services"],{cwd:Ae});return t.split(`
|
|
12
|
+
`).map(r=>r.trim()).filter(Boolean)}catch{return[]}}var Eo=new Set(["Pulled","Created","Started","Running","Healthy"]);function zs(e,t){let r=e.replace(/\s+/g," ").trim();if(!r)return;let o=/(?:Container\s+)?[A-Za-z0-9._-]*?-([A-Za-z0-9_]+)-\d+\s+(Pulling|Pulled|Creating|Created|Starting|Started|Running|Waiting|Healthy)\b/.exec(r);if(o)return t.set(o[1],o[2]),`${o[1]} ${o[2]}`;if(o=/^Pulling\s+([A-Za-z0-9_.-]+)\b/.exec(r),o){let n=o[1];return Eo.has(t.get(n)||"")||t.set(n,"Pulling"),`${n} Pulling`}if(o=/^([A-Za-z0-9_.-]+)\s+Pulled\b/.exec(r),o)return t.set(o[1],"Pulled"),`${o[1]} Pulled`}var Ao=new Set(["pulled","local"]);function at(e,t){switch(t){case"downloading":return`${e}: downloading`;case"pulled":return`${e}: pulled`;case"local":return`${e}: already local`}}function Ws(e,t){let r=e.replace(/\s+/g," ").trim();if(!r)return;let o=(s,i)=>{let _=t.get(s);return _&&Ao.has(_)?at(s,_):(t.set(s,i),at(s,i))},n=/^([A-Za-z0-9_.-]+)\s+(?:Already exists|Skipped\b.*already being pulled)/i.exec(r);if(n||(n=/Image is up to date for\s+\S*?\/([A-Za-z0-9_.-]+?)(?::[A-Za-z0-9_.-]+)?\s*$/i.exec(r),n))return t.set(n[1],"local"),at(n[1],"local");if(n=/^([A-Za-z0-9_.-]+)\s+(?:Pulled|Pull complete)\b/i.exec(r),n)return t.set(n[1],"pulled"),at(n[1],"pulled");if(n=/^Pulling\s+([A-Za-z0-9_.-]+)\b/i.exec(r),n)return o(n[1],"downloading")}function xo(e,t){let r=[e,`openagentic_${e}`];for(let[o,n]of Object.entries(t))if((Array.isArray(n)?n.length:0)>0&&r.includes(o))return!0;return!1}var vo=new Set(["web","admin","prometheus","loki"]);async function Gs(e,t,r){let o=t.admin.email||"admin@openagentic.local",n=t.admin.password;if(n)try{let s=await fetch(`${e}/api/auth/local/login`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:o,password:n})});if(!s.ok){r.onHealth?.(`admin login returned ${s.status} \u2014 MCP check will use public health only`);return}return(await s.json()).token}catch{return}}async function ir(e,t,r,o){let n=Date.now()+18e4,s=9e3,i=t.mcps.filter(c=>vo.has(c)),_=t.mcps.filter(c=>!vo.has(c)),l=!1,u=!1,p="",d="";for(r.onHealth?.("verifying model responds\u2026");Date.now()<n&&!l;){try{let x=(await(await fetch(`${e}/api/health/comprehensive`)).json().catch(()=>null))?.checks?.chat_model;if(x?.healthy){let f=x.details?.model?`${x.details.model}`:"configured model",g=x.details?.response_time!=null?` (${x.details.response_time}ms)`:"";r.onHealth?.(`\u2713 model responds: ${f}${g}`),l=!0;break}p=x?.details?.error||"model health check not yet healthy",r.onHealth?.(`waiting for model\u2026 (${p})`)}catch(c){p=c instanceof Error?c.message:String(c),r.onHealth?.(`waiting for model\u2026 (${p})`)}Date.now()<n&&await new Promise(c=>setTimeout(c,s))}if(!l)throw new Error(`chosen model did not respond within 3 minutes \u2014 last error: ${p}. Check: ${o.ollama}`);if(t.mcps.length===0){r.onHealth?.("no MCPs selected \u2014 skipping MCP verification");return}r.onHealth?.("verifying MCPs serve tools\u2026");let b=await Gs(e,t,r);for(;Date.now()<n&&!u;){try{let c=await fetch(`${e}/api/admin/mcp-tools/status`,{headers:b?{Authorization:`Bearer ${b}`}:{}});if(c.ok){let h=await c.json().catch(()=>null),x=h?.byServer??{},f=h?.totalTools??0,g=h?.servers??Object.keys(x).length,S=i.filter(m=>!xo(m,x));if(f>0&&S.length===0){let m=_.filter(v=>!xo(v,x));r.onHealth?.(`\u2713 ${g} MCPs \xB7 ${f} tools`),m.length>0&&r.onHealth?.(`note: ${m.join(", ")} not serving tools yet (needs credentials \u2014 configure later or check ${o.mcpProxy})`),u=!0;break}d=S.length?`missing: ${S.join(", ")}`:"no tools served yet",r.onHealth?.(`waiting for MCPs\u2026 (${d})`)}else d=`mcp-tools/status returned ${c.status}`,r.onHealth?.(`waiting for MCPs\u2026 (${d})`)}catch(c){d=c instanceof Error?c.message:String(c),r.onHealth?.(`waiting for MCPs\u2026 (${d})`)}Date.now()<n&&await new Promise(c=>setTimeout(c,s))}if(!u){let c=i.length?`required MCP(s) [${i.join(", ")}]`:"MCPs";throw new Error(`${c} are not serving tools within 3 minutes \u2014 last error: ${d}. Check: ${o.mcpProxy}`)}}async function To(e,t){let r=e.llmStrategy==="ollama"&&$s(e.ollama?.host),o=e.mcps.includes("prometheus")||e.mcps.includes("loki"),n=[...r?["--profile","ollama"]:[],...o?["--profile","monitoring"]:[]],s=n.length?`docker compose ${n.join(" ")}`:"docker compose",i=await Vs(n),_=i.length;t.onBuild?.(`${s} pull \u2014 fetching prebuilt :latest images from ghcr.io/agentic-work`);let l=new Map,u=f=>{let g=0;for(let m of l.values())Ao.has(m)&&g++;let S=Math.max(_,l.size);t.onBuildProgress?.({done:g,total:S,current:f})},p=sr("docker",["compose",...n,"pull"],{cwd:Ae,all:!0,buffer:!1});if(p.all){let f="";p.all.on("data",g=>{f+=g.toString();let S=f.split(`
|
|
13
|
+
`);f=S.pop()??"";for(let m of S){let v=Ws(m,l);v!==void 0&&u(v)}})}await p;for(let f of i)l.has(f)||l.set(f,"local");u(),t.onBuildDone?.(),t.onStart?.(`${s} up -d`);let d=new Map,b=f=>{let g=0;for(let m of d.values())Eo.has(m)&&g++;let S=Math.max(_,d.size);t.onStartProgress?.({done:g,total:S,current:f})},c=sr("docker",["compose",...n,"up","-d"],{cwd:Ae,all:!0,buffer:!1});if(c.all){let f="";c.all.on("data",g=>{f+=g.toString();let S=f.split(`
|
|
14
|
+
`);f=S.pop()??"";for(let m of S){let v=zs(m,d);v!==void 0&&b(v)}})}await c;for(let f of i)d.has(f)||d.set(f,"Started");b(),t.onStartDone?.();let h=`http://localhost:${e.uiPort}`;t.onHealth?.(`waiting for ${h}/api/health`);let x=Date.now();for(;Date.now()-x<10*6e4;){try{if((await fetch(`${h}/api/health`)).ok)return await ir(h,e,t,{ollama:"docker compose logs ollama (or 'docker logs openagentic-ollama-1')",mcpProxy:"docker compose logs mcp-proxy (or 'docker logs openagentic-mcp-proxy-1')"}),t.onHealthDone?.(),h}catch(f){if(f instanceof Error&&/did not respond|not serving tools/.test(f.message))throw f}await new Promise(f=>setTimeout(f,3e3))}throw new Error("API did not become healthy within 10 minutes. Run 'docker compose logs api' to investigate.")}import{execa as Fe}from"execa";import Zs from"node:crypto";import wo from"node:fs";import Qs from"node:os";import ei from"node:path";import Ks from"node:crypto";import It from"node:fs";import Pt from"node:path";import Us from"node:os";var ko="nomic-embed-text",js=768,Ys="gpt-oss:20b",Ot=6,Io="text-embedding-005",Oo=768,Js="/var/secrets/gcp/key.json",Te=(e=32)=>Ks.randomBytes(e).toString("hex");function qs(){let e=process.env.OPENAGENTIC_HOME?Pt.resolve(process.env.OPENAGENTIC_HOME,".."):Pt.join(Us.homedir(),".openagentic");return Pt.join(e,"helm-secrets.json")}function Xs(){let e=qs();try{if(It.existsSync(e)){let r=JSON.parse(It.readFileSync(e,"utf8"));if(r.jwtSecret&&r.postgresPassword)return{postgresPassword:r.postgresPassword,jwtSecret:r.jwtSecret,signingSecret:r.signingSecret||Te(),internalApiKey:r.internalApiKey||Te(),frontendSecret:r.frontendSecret||Te(16)}}}catch{}let t={postgresPassword:Te(16),jwtSecret:Te(),signingSecret:Te(),internalApiKey:Te(),frontendSecret:Te(16)};try{It.mkdirSync(Pt.dirname(e),{recursive:!0}),It.writeFileSync(e,JSON.stringify(t,null,2),{mode:384})}catch{}return t}function Po(e,t){let r=[],o=Xs(),n=[],s=(m,v)=>{v!=null&&v!==""&&n.push({name:m,value:v})},i=e.llmStrategy==="ollama",_=e.llmStrategy==="bedrock",l=e.llmStrategy==="vertex",u=e.llmStrategy==="aif",p={postgresPassword:o.postgresPassword,jwtSecret:o.jwtSecret,signingSecret:o.signingSecret,internalApiKey:o.internalApiKey,frontendSecret:o.frontendSecret,adminEmail:e.admin.email||"admin@openagentic.local",adminPassword:e.admin.password},d={enabled:!1,embedModel:e.ollama.embedModel||ko,chatModel:"",chatHost:"",gpu:!1},b={enabled:!1,name:"aws-bedrock",displayName:"AWS Bedrock",type:"aws-bedrock",chatModel:"amazon.nova-pro-v1:0",seederVersion:Ot},c=!1;if(i){d.enabled=!0,d.chatModel=Ys;let m=e.ollama.host||"";m&&!/(^|\/\/)ollama(:|\/|$)/.test(m)&&(d.chatHost=m)}else if(_&&e.providers.bedrock){let m=e.providers.bedrock,v=(m.region||"us-east-1").trim()||"us-east-1",y=(m.model||"").trim()||"amazon.nova-pro-v1:0";d.enabled=!0,d.chatModel="",d.chatHost="",b={enabled:!0,name:"aws-bedrock",displayName:"AWS Bedrock",type:"aws-bedrock",chatModel:y,seederVersion:Ot},p.awsRegion=v,m.authMode==="keys"&&m.accessKeyId&&m.secretAccessKey?(p.awsAccessKeyId=m.accessKeyId,p.awsSecretAccessKey=m.secretAccessKey):r.push("AWS Bedrock auth is 'awslogin' (host ~/.aws): k8s has no host mount, so the api pod must get AWS creds another way \u2014 supply IAM keys, or attach an IRSA/pod-identity role to the api ServiceAccount. No AWS keys were written to the release.")}else if(l&&e.providers.vertex){let m=e.providers.vertex,v=(m.projectId||"").trim(),y=(m.location||"us-central1").trim()||"us-central1",C=(m.model||"").trim()||"gemini-1.5-pro";d.enabled=!1,c=!0,s("GOOGLE_CLOUD_PROJECT",v),s("GOOGLE_CLOUD_LOCATION",y),s("VERTEX_PROJECT",v),s("VERTEX_LOCATION",y),s("VERTEX_CHAT_MODEL",C),s("EMBEDDING_PROVIDER","vertex-ai"),s("GCP_PROJECT_ID",v),s("GCP_LOCATION",y),s("GCP_EMBEDDING_MODEL",Io),s("EMBEDDING_DIMENSIONS",String(Oo)),s("SKIP_TOOL_SEMANTIC_CACHE","false"),s("BOOTSTRAP_PROVIDER_NAME","google-vertex"),s("BOOTSTRAP_PROVIDER_DISPLAY_NAME","Google Vertex AI"),s("BOOTSTRAP_PROVIDER_TYPE","vertex-ai"),s("BOOTSTRAP_PROVIDER_CONFIG",JSON.stringify({projectId:v,location:y})),s("BOOTSTRAP_PROVIDER_DEFAULTS",JSON.stringify({chat:C,embedding:Io,embeddingDimension:Oo})),s("SEEDER_VERSION",String(Ot)),m.authMode==="sajson"&&m.saKeyPath?r.push(`Google Vertex AI auth is 'sajson' (host SA key ${m.saKeyPath}): the chart does not mount a host file into the api pod. Provide ADC via GKE Workload Identity, or add the key as a Secret mounted at ${Js} and set GOOGLE_APPLICATION_CREDENTIALS. Chat/embeddings will fail to authenticate until then.`):m.authMode==="adc"&&r.push("Google Vertex AI auth is 'adc' (host gcloud login): k8s has no host ~/.config/gcloud mount. The api pod needs ADC via GKE Workload Identity (or a mounted SA key) to reach Vertex.")}else if(u&&e.providers.azureFoundry){let m=e.providers.azureFoundry,v=(m.endpointUrl||"").trim(),y=(m.apiVersion||"").trim()||"2024-10-21",C=(m.deploymentName||"").trim();d.enabled=!0,d.chatModel="",d.chatHost="",s("AIF_ENDPOINT_URL",v),s("AIF_API_VERSION",y),s("AIF_MODEL",C),m.authMode==="apikey"&&m.apiKey?s("AIF_API_KEY",m.apiKey):m.authMode==="entra"?(s("AIF_TENANT_ID",m.tenantId),s("AIF_CLIENT_ID",m.clientId),s("AIF_CLIENT_SECRET",m.clientSecret)):m.authMode==="azlogin"&&r.push("Azure AI Foundry auth is 'azlogin' (host ~/.azure): k8s has no host mount. The api pod needs Azure creds via Workload Identity or an Entra app (tenant/client/secret). No Azure credential was written to the release.");let w={endpointUrl:v,apiVersion:y,deploymentName:C};m.authMode==="entra"&&(m.tenantId&&(w.tenantId=m.tenantId),m.clientId&&(w.clientId=m.clientId)),s("BOOTSTRAP_PROVIDER_NAME","azure-ai-foundry"),s("BOOTSTRAP_PROVIDER_DISPLAY_NAME","Azure AI Foundry"),s("BOOTSTRAP_PROVIDER_TYPE","azure-ai-foundry"),s("BOOTSTRAP_PROVIDER_CONFIG",JSON.stringify(w)),s("BOOTSTRAP_PROVIDER_DEFAULTS",JSON.stringify({chat:C,embedding:ko,embeddingDimension:js})),s("SEEDER_VERSION",String(Ot))}else d.enabled=!0,d.chatModel="",d.chatHost="";let h=new Set(e.mcps),x={enabled:e.mcps.join(","),kubernetes:{enabled:h.has("kubernetes")},prometheus:{enabled:h.has("prometheus"),url:"http://prometheus:9090"},loki:{enabled:h.has("loki"),url:"http://loki:3100"}},f=ie.filter(m=>h.has(m.id)&&m.needsAuth&&!m.bundledBackend&&m.id!=="kubernetes").map(m=>m.id);f.length&&r.push(`MCPs [${f.join(", ")}] were selected but the chart's mcp-proxy hardcodes them disabled (no credential plumbing in the Helm path). They will not spawn. The in-cluster kubernetes/prometheus/loki MCPs need no creds and ARE wired.`);let g=Object.keys(e.mcpAuth).filter(m=>!m.startsWith("__skip_")&&e.mcpAuth[m]);return g.length&&r.push(`Inline MCP credentials (${g.join(", ")}) are not mapped \u2014 the Helm chart has no per-MCP credential Secret for these. Add them to the release via your own values overlay if needed.`),s("MAGIC_BOOT_TOKEN",t),{values:{image:{registry:"ghcr.io/agentic-work",tag:"latest",pullPolicy:"IfNotPresent"},secrets:p,ollama:d,bootstrapProvider:b,milvus:{enabled:c},mcps:x,prometheus:{enabled:!0},loki:{enabled:h.has("loki")},ingress:{enabled:!1,className:"nginx",host:"openagentic.local",tlsSecret:""},extraEnv:n},secrets:o,warnings:r}}var le="openagentic",Co="openagentic",ke="api";function ti(e){let t={...process.env};return e.kubeconfigPath&&(t.KUBECONFIG=e.kubeconfigPath),t}async function ri(e){for(let[t,r]of[["helm","Install Helm: https://helm.sh/docs/intro/install/"],["kubectl","Install kubectl: https://kubernetes.io/docs/tasks/tools/"]])try{await Fe(t,["version","--client"],{env:e,reject:!0,timeout:1e4})}catch{try{await Fe(t,["version"],{env:e,reject:!0,timeout:1e4})}catch{throw new Error(`${t} is not installed or not on PATH. ${r}`)}}}var lr={CrashLoopBackOff:100,Error:95,ImagePullBackOff:90,ErrImagePull:90,CreateContainerConfigError:85,RunContainerError:80,Pulling:40,ContainerCreating:30,PodInitializing:20,Pending:10};function oi(e){let t;try{t=JSON.parse(e)}catch{return[]}let r=[];for(let o of t.items??[]){let n=o.metadata?.labels?.app||o.metadata?.labels?.["app.kubernetes.io/name"]||o.metadata?.name||"pod",s=o.status?.containerStatuses??[],i=s.length||1,_=0,l=0,u,p=-1;for(let d of s){d.ready&&_++,l+=d.restartCount??0;let b=d.state?.waiting?.reason??d.state?.terminated?.reason;if(b&&!d.ready){let c=lr[b]??50;c>p&&(p=c,u=b)}}r.push({app:n,phase:o.status?.phase??"Unknown",ready:_,total:i,reason:u,restarts:l})}return r}var cr=e=>e.total>0&&e.ready===e.total;function ni(e){let t=e.filter(r=>!cr(r));if(t.length!==0)return t.sort((r,o)=>{let n=r.reason?lr[r.reason]??50:0;return(o.reason?lr[o.reason]??50:0)-n}),t[0]}function si(e){return e.reason==="CrashLoopBackOff"||e.reason==="Error"?`${e.app}: ${e.reason} (${e.restarts} restarts)`:e.reason?`${e.app}: ${e.reason}`:`${e.app} ${e.ready}/${e.total} ${e.phase}`}async function ii(e){try{let{stdout:t}=await Fe("kubectl",["get","deploy,statefulset,daemonset","-n",le,"-o","json"],{env:e,timeout:15e3}),r=JSON.parse(t),o=0;for(let n of r.items??[])n.kind==="DaemonSet"?o+=n.status?.desiredNumberScheduled??1:o+=n.spec?.replicas??1;return o}catch{return 0}}async function Ro(e){try{let{stdout:t}=await Fe("kubectl",["get","pods","-n",le,"-o","json"],{env:e,timeout:15e3});return oi(t)}catch{return[]}}var ar=e=>new Promise(t=>setTimeout(t,e));async function Mo(e,t){let r=ti(e);await ri(r),t.onBuild?.("Rendering chart with your configuration\u2026");let o=Zs.randomBytes(24).toString("base64url"),{values:n,warnings:s}=Po(e,o),i=ei.join(Qs.tmpdir(),`openagentic-helm-values-${process.pid}.json`);wo.writeFileSync(i,JSON.stringify(n,null,2),{mode:384});let _=[Co,bo,"-n",le,"-f",i];try{await Fe("helm",["template",..._],{env:r,timeout:12e4})}catch(f){let g=f.stderr||f.message;throw qe(i),new Error(`Chart failed to render with your configuration:
|
|
15
|
+
${g}`)}s.length&&t.onBuild?.(`rendered with ${s.length} note(s): ${s[0]}`),t.onBuildDone?.(),t.onStart?.(`helm upgrade --install ${Co} (namespace ${le})`);try{await Fe("helm",["upgrade","--install",..._,"--create-namespace"],{env:r,timeout:3e5})}catch(f){let g=f.stderr||f.message;throw qe(i),new Error(`helm upgrade --install failed:
|
|
16
|
+
${g}`)}let l=await ii(r),u=Date.now()+10*6e4,p="";for(;Date.now()<u;){let f=await Ro(r),g=f.filter(cr).length;l=Math.max(l,f.length);let S=ni(f),m=S?si(S):`all ${g} pods ready`;if(t.onStartProgress?.({done:g,total:Math.max(l,1),current:m}),t.onStart?.(m),S?.reason==="CrashLoopBackOff"&&S.app!==p&&(p=S.app,t.onStart?.(`${S.app} is CrashLoopBackOff (${S.restarts} restarts) \u2014 still waiting`)),f.length>=l&&l>0&&S===void 0||f.length>=l&&l>0&&f.every(v=>v.phase!=="Pending"))break;await ar(2e3)}t.onStartDone?.(),t.onHealth?.(`waiting for ${ke} readiness probe`);let d=Date.now()+10*6e4,b=!1;for(;Date.now()<d;){let f=(await Ro(r)).filter(g=>g.app===ke);if(f.length>0){let g=f[0];if(cr(g)){b=!0;break}let S=g.reason?`${ke} ${g.ready}/${g.total} \xB7 ${g.reason}`:`${ke} ${g.ready}/${g.total} \u2192 waiting for readiness probe`;if(t.onHealth?.(S),g.reason==="CrashLoopBackOff"&&g.restarts>=4)throw qe(i),new Error(`api is CrashLoopBackOff (${g.restarts} restarts) and is not becoming ready. Investigate: kubectl logs deploy/${ke} -n ${le}`)}else t.onHealth?.(`${ke} pod not scheduled yet`);await ar(3e3)}if(!b)throw qe(i),new Error(`${ke} did not become ready within 10 minutes. Investigate: kubectl get pods -n ${le} ; kubectl logs deploy/${ke} -n ${le}`);let c,h,x=e.uiPort||8080;if(n.ingress.enabled&&n.ingress.host)c=`${n.ingress.tlsSecret?"https":"http"}://${n.ingress.host}`,h=`${c}/auth/magic?token=${o}`;else{try{Fe("kubectl",["port-forward","svc/ui",`${x}:80`,"-n",le],{env:r,detached:!0,stdio:"ignore"}).unref(),await ar(1500)}catch{}c=`http://localhost:${x}`,h=`${c}/auth/magic?token=${o}`}try{await ir(c,e,t,{ollama:`kubectl logs -n ${le} deploy/ollama (model-serving pod)`,mcpProxy:`kubectl logs -n ${le} deploy/mcp-proxy`})}catch(f){throw qe(i),f}return t.onHealthDone?.(),qe(i),h}function qe(e){try{wo.rmSync(e,{force:!0})}catch{}}import{jsx as P,jsxs as U}from"react/jsx-runtime";var lt=process.env.WIZARD_DRY_RUN==="1",$o=["#6FB3A8","#9FD8C4","#88CCA0","#D9AE52","#DB8240"],Do="nomic-embed-text",ur=768,Bo="gpt-oss:20b",Rt="6",ui="text-embedding-005",No=768,di="/var/secrets/gcp/key.json",Vo=({config:e,step:t,total:r,onDone:o})=>{let[n,s]=Ct(()=>(lt?["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"?"Pull images":"Render chart",e.target==="docker"?"Start containers":"Apply release","Wait for health","Open browser"]).map(h=>({label:h,state:"pending"}))),[i,_]=Ct(null),[l,u]=Ct(null),[p,d]=Ct(null),b=(c,h)=>s(x=>x.map((f,g)=>g===c?{...f,...h}:f));return Ho(()=>{let c=!1;return(async()=>{try{b(0,{state:"running"});let h=ai.randomBytes(24).toString("base64url");if(So(fi(e,h)),b(0,{state:"ok"}),lt){b(1,{state:"ok",detail:"skipped"}),b(2,{state:"ok",detail:"skipped"}),b(3,{state:"ok",detail:"skipped"}),b(4,{state:"ok",detail:"skipped"}),setTimeout(o,50);return}let f=await(e.target==="docker"?To:Mo)(e,{onBuild:S=>!c&&b(1,{state:"running",detail:S}),onBuildProgress:S=>!c&&_(S),onBuildDone:()=>!c&&b(1,{state:"ok"}),onStart:S=>!c&&b(2,{state:"running",detail:S}),onStartProgress:S=>!c&&u(S),onStartDone:()=>!c&&b(2,{state:"ok"}),onHealth:S=>!c&&b(3,{state:"running",detail:S}),onHealthDone:()=>!c&&b(3,{state:"ok"})});if(c)return;let g=`http://localhost:${e.uiPort||8080}/auth/magic?token=${h}`;b(4,{state:"running",detail:g});try{await ci(g)}catch{}b(4,{state:"ok",detail:g}),d({chatUrl:f,magicUrl:g,adminEmail:e.admin.email||"admin@openagentic.local",password:e.admin.password||void 0})}catch(h){if(c)return;let x=h instanceof Error?h.message:String(h);s(f=>f.map(g=>g.state==="running"?{...g,state:"fail",detail:x}:g))}})(),()=>{c=!0}},[e]),p?P(pi,{result:p,step:t,total:r,onDone:o}):U(T,{step:t,total:r,title:lt?"Bringing up openagentic (dry-run)":"Bringing up openagentic",children:[P(z,{flexDirection:"column",children:n.map((c,h)=>{let x=e.target==="docker"&&h===1?i:h===2?l:null,f=!lt&&c.state==="running"&&!!x&&x.total>0;return U(z,{flexDirection:"column",children:[U(z,{children:[c.state==="running"?P(W,{color:a.accent,children:P(ft,{type:"dots"})}):P(W,{color:Fo(c.state).color,children:Fo(c.state).char}),P(W,{children:" "}),P(W,{children:c.label}),f?U(W,{color:a.muted,children:[" ",x.done,"/",x.total,x.current?` \xB7 ${x.current}`:""]}):c.detail?U(W,{color:a.muted,children:[" ",c.detail.slice(0,80)]}):null]}),f?P(z,{marginLeft:2,children:P(ct,{value:x.done,total:x.total,width:36,stops:$o})}):null]},h)})}),P(z,{marginTop:1,children:P(E,{children:lt?"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."})})]})},Lo="https://www.openagentics.io/docs/",mi=["Which pods are crashlooping and why?","Summarize the error logs from the last hour.","What's driving this month's cloud cost spike?"],pi=({result:e,step:t,total:r,onDone:o})=>{li(()=>o()),Ho(()=>{let i=setTimeout(o,3e4);return()=>clearTimeout(i)},[o]);let n=Math.max(44,Math.min((process.stdout.columns||80)-6,88)),s=e.password?`password ${e.password}`:"password see ~/.openagentic/admin-credentials.txt";return U(T,{step:t,total:r,title:"openagentic is up",children:[U(z,{flexDirection:"column",children:[U(z,{children:[P(W,{color:a.ok,bold:!0,children:"\u2713 openagentic is up"}),P(W,{color:a.muted,children:" \u2014 the stack is healthy and ready."})]}),P(z,{marginTop:1,children:P($e,{width:n,stops:$o})}),U(z,{marginTop:1,flexDirection:"column",children:[U(z,{children:[P(W,{color:a.accent,bold:!0,children:"Chat UI "}),P(ge,{url:e.chatUrl,text:e.chatUrl})]}),U(z,{children:[P(W,{color:a.accent,bold:!0,children:"Sign in "}),P(ge,{url:e.magicUrl,text:"one-shot auto-login link (opens you in, signed in)"})]})]}),U(z,{marginTop:1,flexDirection:"column",children:[P(W,{color:a.faint,children:"admin login"}),P(z,{marginLeft:2,children:U(W,{color:a.ink,children:["email ",e.adminEmail]})}),P(z,{marginLeft:2,children:P(W,{color:a.ink,children:s})})]}),U(z,{marginTop:1,flexDirection:"column",children:[P(W,{color:a.faint,children:"try asking the agent"}),mi.map((i,_)=>U(z,{marginLeft:2,children:[P(W,{color:a.signal,children:"\u203A "}),P(W,{color:a.muted,children:i})]},_))]}),U(z,{marginTop:1,children:[P(W,{color:a.faint,children:"docs "}),P(ge,{url:Lo,text:Lo})]})]}),P(z,{marginTop:1,children:P(E,{children:"Press any key to finish."})})]})};function Fo(e){switch(e){case"ok":return{char:"\u2713",color:a.ok};case"fail":return{char:"\u2717",color:a.err};case"running":return{char:"\u25E6",color:a.accent};default:return{char:"\xB7",color:a.muted}}}function fi(e,t){let r=e.llmStrategy==="ollama",o=e.llmStrategy==="bedrock",n=e.llmStrategy==="vertex",s=e.llmStrategy==="aif",i={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&&(i.MAGIC_BOOT_TOKEN=t),r?(i.OLLAMA_HOST=e.ollama.host,i.OLLAMA_EMBED_MODEL=e.ollama.embedModel,i.OLLAMA_ENABLED="true",i.EMBEDDING_PROVIDER="ollama",i.OLLAMA_CHAT_MODEL=Bo,i.BOOTSTRAP_PROVIDER_NAME="ollama-local",i.BOOTSTRAP_PROVIDER_DISPLAY_NAME="Ollama (local)",i.BOOTSTRAP_PROVIDER_TYPE="ollama",i.BOOTSTRAP_PROVIDER_CONFIG=JSON.stringify({endpoint:e.ollama.host}),i.BOOTSTRAP_PROVIDER_DEFAULTS=JSON.stringify({chat:Bo,embedding:e.ollama.embedModel,embeddingDimension:ur}),i.SEEDER_VERSION=Rt):i.OLLAMA_ENABLED="false";let _=e.providers.bedrock;if(o&&_){let d=(_.region||"us-east-1").trim()||"us-east-1",b=(_.model||"").trim()||"amazon.nova-pro-v1:0";i.AWS_REGION=d,_.authMode==="keys"&&_.accessKeyId&&_.secretAccessKey&&(i.AWS_ACCESS_KEY_ID=_.accessKeyId,i.AWS_SECRET_ACCESS_KEY=_.secretAccessKey),i.BOOTSTRAP_PROVIDER_NAME="aws-bedrock",i.BOOTSTRAP_PROVIDER_DISPLAY_NAME="AWS Bedrock",i.BOOTSTRAP_PROVIDER_TYPE="aws-bedrock",i.BOOTSTRAP_PROVIDER_CONFIG=JSON.stringify({region:d}),i.BOOTSTRAP_PROVIDER_DEFAULTS=JSON.stringify({chat:b,embedding:Do,embeddingDimension:ur}),i.SEEDER_VERSION=Rt}let l=e.providers.vertex;if(n&&l){let d=(l.projectId||"").trim(),b=(l.location||"us-central1").trim()||"us-central1",c=(l.model||"").trim()||"gemini-1.5-pro",h=ui;i.GOOGLE_CLOUD_PROJECT=d,i.GOOGLE_CLOUD_LOCATION=b,i.VERTEX_PROJECT=d,i.VERTEX_LOCATION=b,i.VERTEX_CHAT_MODEL=c,i.EMBEDDING_PROVIDER="vertex-ai",i.GCP_PROJECT_ID=d,i.GCP_LOCATION=b,i.GCP_EMBEDDING_MODEL=h,i.EMBEDDING_DIMENSIONS=String(No),i.SKIP_TOOL_SEMANTIC_CACHE="false",l.authMode==="sajson"&&l.saKeyPath&&(i.GCP_SA_KEY_FILE=l.saKeyPath.startsWith("~")?(process.env.HOME||"")+l.saKeyPath.slice(1):l.saKeyPath,i.GOOGLE_APPLICATION_CREDENTIALS=di),i.VERTEX_AI_API_KEY="",i.GEMINI_API_KEY="",i.BOOTSTRAP_PROVIDER_NAME="google-vertex",i.BOOTSTRAP_PROVIDER_DISPLAY_NAME="Google Vertex AI",i.BOOTSTRAP_PROVIDER_TYPE="vertex-ai",i.BOOTSTRAP_PROVIDER_CONFIG=JSON.stringify({projectId:d,location:b}),i.BOOTSTRAP_PROVIDER_DEFAULTS=JSON.stringify({chat:c,embedding:h,embeddingDimension:No}),i.SEEDER_VERSION=Rt}let u=e.providers.azureFoundry;if(s&&u){let d=(u.endpointUrl||"").trim(),b=(u.apiVersion||"").trim()||"2024-10-21",c=(u.deploymentName||"").trim();i.AIF_ENDPOINT_URL=d,i.AIF_API_VERSION=b,i.AIF_MODEL=c,u.authMode==="apikey"&&u.apiKey?i.AIF_API_KEY=u.apiKey:u.authMode==="entra"&&(u.tenantId&&(i.AIF_TENANT_ID=u.tenantId),u.clientId&&(i.AIF_CLIENT_ID=u.clientId),u.clientSecret&&(i.AIF_CLIENT_SECRET=u.clientSecret)),i.BOOTSTRAP_PROVIDER_NAME="azure-ai-foundry",i.BOOTSTRAP_PROVIDER_DISPLAY_NAME="Azure AI Foundry",i.BOOTSTRAP_PROVIDER_TYPE="azure-ai-foundry";let h={endpointUrl:d,apiVersion:b,deploymentName:c};u.authMode==="entra"&&(u.tenantId&&(h.tenantId=u.tenantId),u.clientId&&(h.clientId=u.clientId)),i.BOOTSTRAP_PROVIDER_CONFIG=JSON.stringify(h),i.BOOTSTRAP_PROVIDER_DEFAULTS=JSON.stringify({chat:c,embedding:Do,embeddingDimension:ur}),i.SEEDER_VERSION=Rt}let p=new Set(e.mcps);for(let d of ie)i[d.disabledEnv]=p.has(d.id)?"false":"true";(p.has("prometheus")||p.has("loki"))&&(i.PROMETHEUS_URL="http://prometheus:9090",i.LOKI_URL="http://loki:3100",i.OTEL_EXPORTER_OTLP_ENDPOINT="http://otel-collector:4317");for(let[d,b]of Object.entries(e.mcpAuth))d.startsWith("__skip_")||b&&(i[d]=b);return i}var fe={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 G,jsxs as wt}from"react/jsx-runtime";var Si=()=>{let e=nr(),[t,r]=dr(()=>({...fe,admin:{...fe.admin,email:e.ADMIN_USER_EMAIL||fe.admin.email,name:e.LOCAL_ADMIN_USERNAME||fe.admin.name},ollama:{...fe.ollama,host:e.OLLAMA_HOST||fe.ollama.host,embedModel:e.OLLAMA_EMBED_MODEL||fe.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(y=>y.trim()).filter(Boolean):uo(),mcpAuth:{},uiPort:e.UI_HOST_PORT?Number(e.UI_HOST_PORT):fe.uiPort})),[o,n]=dr("target"),s=t.llmStrategy,i=y=>r(C=>({...C,llmStrategy:y})),_=t.target==="helm"?1:0,l=s==="ollama"?1:0,u=s==="bedrock"?1:0,p=s==="vertex"?1:0,d=s==="aif"?1:0,b=1+_+1+1+l+u+p+d+1+1+1+1,c=1,h={target:c++,helmPreflight:t.target==="helm"?c++:0,admin:c++,llmStrategy:c++,ollama:l?c++:0,providers:u?c++:0,vertex:p?c++:0,aif:d?c++:0,mcps:c++,mcpAuth:c++,review:c++,launch:c++},x=y=>y==="ollama"?"ollama":y==="bedrock"?"providers":y==="vertex"?"vertex":y==="aif"?"aif":"mcps",[f,g]=dr(!1),S={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"},m=new Set(["target","llm-strategy","mcps","review"]),v=S[o];return yi((y,C)=>{if(f){(y==="?"||C.escape)&&g(!1);return}if(m.has(o)){if(y==="?"){g(!0);return}if(y==="d"){_i(Ve(v).url).catch(()=>{});return}}}),f?G(yr,{title:v,onClose:()=>g(!1)}):o==="target"?G(Tr,{onPick:y=>{r({...t,target:y}),n(y==="helm"?"helm-preflight":"admin")}}):o==="helm-preflight"?G(Yr,{onContinue:y=>{r({...t,kubeconfigPath:y}),n("admin")},onBackToDocker:()=>{r({...t,target:"docker",kubeconfigPath:void 0}),n("admin")}}):o==="admin"?G(Jr,{initial:t.admin,step:h.admin,total:b,onDone:y=>{r({...t,admin:y}),n("llm-strategy")}}):o==="llm-strategy"?G(Zr,{step:h.llmStrategy,total:b,onPick:y=>{i(y),n(x(y))}}):o==="ollama"?G(to,{initial:t.ollama,step:h.ollama,total:b,onDone:y=>{r({...t,ollama:y}),n("mcps")}}):o==="providers"?G(oo,{initial:t.providers,step:h.providers,total:b,onDone:y=>{r({...t,providers:y}),n("mcps")}}):o==="vertex"?G(lo,{initial:t.providers,step:h.vertex,total:b,onDone:y=>{r({...t,providers:y}),n("mcps")}}):o==="aif"?G(co,{initial:t.providers,step:h.aif,total:b,onDone:y=>{r({...t,providers:y}),n("mcps")}}):o==="mcps"?G(po,{initial:t.mcps,step:h.mcps,total:b,onDone:y=>{r({...t,mcps:y}),n("mcp-auth")}}):o==="mcp-auth"?G(ho,{enabledIds:t.mcps,initialAuth:t.mcpAuth,step:h.mcpAuth,total:b,onDone:y=>{let C=Object.keys(y).filter(N=>N.startsWith("__skip_")).map(N=>N.slice(7)),w={};for(let[N,F]of Object.entries(y))N.startsWith("__skip_")||(w[N]=F);r({...t,mcps:t.mcps.filter(N=>!C.includes(N)),mcpAuth:w}),n("review")}}):o==="review"?G(_o,{config:t,step:h.review,total:b,onLaunch:()=>n("launch"),onCancel:()=>process.exit(0)}):o==="launch"?G(Vo,{config:t,step:h.launch,total:b,onDone:()=>n("done")}):wt(zo,{flexDirection:"column",children:[G(Ht,{}),wt(zo,{marginLeft:2,flexDirection:"column",children:[G(mr,{color:a.ok,bold:!0,children:"openagentic is running"}),wt(mr,{color:a.muted,children:["open http://localhost:",t.uiPort," in your browser"]}),wt(mr,{color:a.muted,children:["sign in with ",t.admin.email]})]})]})},Wo=!1;try{Wo=!!process.argv[1]&&gi(process.argv[1])===hi(import.meta.url)}catch{}if(Wo){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(`
|
|
16
17
|
\u2717 The setup wizard hit an unexpected error.
|
|
17
18
|
${r}
|
|
18
19
|
|
|
@@ -20,4 +21,4 @@ ${y}`)}let l=await Qs(r),u=Date.now()+10*6e4,d="";for(;Date.now()<u;){let m=awai
|
|
|
20
21
|
Help: https://openagentics.io/docs/troubleshooting
|
|
21
22
|
Issues: https://github.com/agentic-work/openagentic/issues
|
|
22
23
|
|
|
23
|
-
`),process.exit(1)};process.on("uncaughtException",e),process.on("unhandledRejection",e),
|
|
24
|
+
`),process.exit(1)};process.on("uncaughtException",e),process.on("unhandledRejection",e),bi(G(dt,{children:G(Si,{})}))}export{Si as App};
|