adam-agent-server 1.0.0 → 1.1.0
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/App-RIYRYLKD.js +9 -0
- package/dist/adam-tools-YBKSTHVJ.js +1 -0
- package/dist/approval-handler-JYIS2PKQ.js +1 -0
- package/dist/audit-manager-7M2CDMP5.js +1 -0
- package/dist/bree-engine-Y24K4PXN.js +1 -0
- package/dist/channels-WMCY4QC3.js +1 -0
- package/dist/{channels-NAPXRIOX.js → channels-WZOYE4O4.js} +1 -1
- package/dist/chunk-2HN2TSP6.js +5 -0
- package/dist/{chunk-ROSOI75V.js → chunk-3RAFA6QK.js} +1 -1
- package/dist/{chunk-I5RUEOSQ.js → chunk-4TCP2AT7.js} +1 -1
- package/dist/{chunk-42RHY3Q3.js → chunk-6DXNXLYG.js} +1 -1
- package/dist/chunk-6HD6NYIB.js +1 -0
- package/dist/{chunk-GA7GEIXB.js → chunk-6YURWVQG.js} +1 -1
- package/dist/chunk-7IFLU3CY.js +4 -0
- package/dist/{chunk-QMKQBU3R.js → chunk-7LBDLAUQ.js} +1 -1
- package/dist/{chunk-BONI2HUN.js → chunk-AJVN3KPM.js} +1 -1
- package/dist/{chunk-4TBGFHYX.js → chunk-AR2IZMM2.js} +1 -1
- package/dist/chunk-B4WHT7DX.js +8 -0
- package/dist/{chunk-XFTRKHH2.js → chunk-BIIP363C.js} +1 -1
- package/dist/{chunk-KHPXEUSY.js → chunk-CDVIT7L5.js} +1 -1
- package/dist/{chunk-BCELBB5Q.js → chunk-EGS6U3V5.js} +2 -2
- package/dist/{chunk-NFSXJNPD.js → chunk-EJVUUIAV.js} +1 -1
- package/dist/{chunk-X26NKAXY.js → chunk-GMCIKDTC.js} +1 -1
- package/dist/{chunk-2C5U3CNX.js → chunk-GUQAIWCQ.js} +1 -1
- package/dist/chunk-IHP7JV6J.js +1 -0
- package/dist/chunk-JTMFEUDA.js +1 -0
- package/dist/chunk-KLQOILIJ.js +21 -0
- package/dist/{chunk-CREHL4BN.js → chunk-KVSO3KGZ.js} +1 -1
- package/dist/{chunk-YEV5YTS3.js → chunk-MPRAVJUO.js} +1 -1
- package/dist/{chunk-6VPL5CXB.js → chunk-OEKM2W3K.js} +1 -1
- package/dist/{chunk-TEMWI6U5.js → chunk-OFOVSC72.js} +1 -1
- package/dist/chunk-PMHNW5IL.js +49 -0
- package/dist/{chunk-35DBEYMG.js → chunk-Q4YE5BU7.js} +1 -1
- package/dist/{chunk-PT55643Q.js → chunk-QN6BEJF5.js} +1 -1
- package/dist/{chunk-64FIXWFL.js → chunk-SWPXG2CY.js} +1 -1
- package/dist/{chunk-CFTWJZVX.js → chunk-U5NRQNBB.js} +14 -14
- package/dist/{chunk-QC6QVNKP.js → chunk-UW3OJG7U.js} +3 -3
- package/dist/chunk-WVGNP2LQ.js +3 -0
- package/dist/cli.js +4 -4
- package/dist/{config-N2GMLTPU.js → config-EI3SCA4W.js} +1 -1
- package/dist/config-OH6Q2D2Y.js +1 -0
- package/dist/{db-S6HDMJ3B.js → db-4NY7ZOS2.js} +1 -1
- package/dist/{delivery-log-VAI35G5V.js → delivery-log-SC2ULFCK.js} +1 -1
- package/dist/engine-JKSNQQDM.js +1 -0
- package/dist/{evolution-audit-KCFDGNSM.js → evolution-audit-KUBXFUHI.js} +1 -1
- package/dist/index.js +10 -10
- package/dist/{learner-ABYVK33T.js → learner-UYDFNURD.js} +1 -1
- package/dist/{memories-3ZAV55YZ.js → memories-FQCRKMK6.js} +1 -1
- package/dist/{memory-extractor-BHHKD7X7.js → memory-extractor-FUOJ5D77.js} +2 -2
- package/dist/memory-service-ANR67OPY.js +1 -0
- package/dist/outbound-gateway-6FQRWYFF.js +1 -0
- package/dist/role-presets-LRP6P5O2.js +1 -0
- package/dist/{roles-LXRHEVUK.js → roles-3UTFKSHI.js} +1 -1
- package/dist/runtime-B2DP3JNB.js +1 -0
- package/dist/session-manager-VYKNKQ46.js +1 -0
- package/dist/{task-templates-XQNKAA4U.js → task-templates-PSP7GOJJ.js} +1 -1
- package/package.json +2 -1
- package/web/dist/assets/Card-4mOZntHG.js +1 -0
- package/web/dist/assets/ChannelDetail-e6rVX_y8.js +1 -0
- package/web/dist/assets/Channels-DJvZPKer.js +12 -0
- package/web/dist/assets/Chat-hTZdEwyE.js +1 -0
- package/web/dist/assets/Dashboard-B4rL_ePs.js +1 -0
- package/web/dist/assets/{EmptyState-DBFJc4PL.js → EmptyState-BlgMMAr-.js} +1 -1
- package/web/dist/assets/EnvVarEditor-C8kRWejV.js +1 -0
- package/web/dist/assets/Evolution-BGwFCo7X.js +6 -0
- package/web/dist/assets/GoalDetail-BH2ku-0t.js +1 -0
- package/web/dist/assets/Goals-DynDtpMC.js +1 -0
- package/web/dist/assets/Logs-CyJFouE6.js +1 -0
- package/web/dist/assets/Memories-ClcFD7OG.js +1 -0
- package/web/dist/assets/{NotFound-Cidygwnn.js → NotFound-CSjhzSGa.js} +1 -1
- package/web/dist/assets/Plugins-SNOQNNcL.js +1 -0
- package/web/dist/assets/RoleDetail-vlTPiYwY.js +33 -0
- package/web/dist/assets/Roles-CFcuHIvA.js +1 -0
- package/web/dist/assets/Settings-C9Kuz-6D.js +1 -0
- package/web/dist/assets/Strategies-DZWlQCHp.js +1 -0
- package/web/dist/assets/Switch-DOi0EFHj.js +1 -0
- package/web/dist/assets/Table-BxbnOSbq.js +1 -0
- package/web/dist/assets/TaskDetail-DjmmnldI.js +2 -0
- package/web/dist/assets/Work-CvESHC3Y.js +1 -0
- package/web/dist/assets/index-BFmC20R2.js +52 -0
- package/web/dist/assets/index-CaocwyO8.css +2 -0
- package/web/dist/assets/{vendor-icons-ZPvC5PUS.js → vendor-icons-CkI4-NxL.js} +1 -1
- package/web/dist/assets/{vendor-react--nRVf2Ep.js → vendor-react-DLRtONKt.js} +1 -1
- package/web/dist/assets/vendor-state-B_-GdGNJ.js +1 -0
- package/web/dist/index.html +5 -5
- package/dist/App-SCPYTYGQ.js +0 -9
- package/dist/adam-tools-FNJJT7AA.js +0 -1
- package/dist/approval-handler-UDWAC5MF.js +0 -4
- package/dist/audit-manager-SCX53YJT.js +0 -1
- package/dist/bree-engine-2DB2QECM.js +0 -1
- package/dist/channels-PQCV74ZI.js +0 -1
- package/dist/chunk-3TIHZZMK.js +0 -1
- package/dist/chunk-7KCBFM2C.js +0 -52
- package/dist/chunk-FXFHGIY6.js +0 -8
- package/dist/chunk-IZQI6QQ7.js +0 -1
- package/dist/chunk-NQHTOFQP.js +0 -1
- package/dist/chunk-REKCZ3GY.js +0 -1
- package/dist/chunk-U3XVAAXA.js +0 -17
- package/dist/config-L4R273R3.js +0 -1
- package/dist/engine-E67UAI3G.js +0 -1
- package/dist/memory-service-5QHTKIUU.js +0 -1
- package/dist/outbound-gateway-ZFKSN2UT.js +0 -1
- package/dist/role-presets-OTU2M37Y.js +0 -1
- package/dist/runtime-UCOE6LNN.js +0 -1
- package/dist/session-manager-RPXFZKMY.js +0 -1
- package/web/dist/assets/Card-BecEmnPW.js +0 -1
- package/web/dist/assets/ChannelDetail-BajTUEU0.js +0 -1
- package/web/dist/assets/Channels-Bhy6rP_t.js +0 -12
- package/web/dist/assets/Chat-Dvt_Oo7d.js +0 -1
- package/web/dist/assets/Dashboard-DlrAor-C.js +0 -1
- package/web/dist/assets/Evolution-Dlsnnr4G.js +0 -6
- package/web/dist/assets/GoalDetail-BuUxwYdd.js +0 -1
- package/web/dist/assets/Goals-CkPQOev6.js +0 -1
- package/web/dist/assets/Logs-D33PqDAd.js +0 -1
- package/web/dist/assets/Memories-D31dbUM6.js +0 -1
- package/web/dist/assets/Plugins-XlBr07x8.js +0 -1
- package/web/dist/assets/RoleDetail-rZFlgXzh.js +0 -33
- package/web/dist/assets/Roles-d29AC6Kh.js +0 -1
- package/web/dist/assets/Settings-Bjh_RXYf.js +0 -1
- package/web/dist/assets/Strategies-Cf4ghknk.js +0 -1
- package/web/dist/assets/Switch-CxzUYL49.js +0 -1
- package/web/dist/assets/Table-tkJ-cuiE.js +0 -1
- package/web/dist/assets/TaskDetail-jMBJbaRU.js +0 -2
- package/web/dist/assets/Work-CCLTkitf.js +0 -1
- package/web/dist/assets/index-CVubgAlC.css +0 -2
- package/web/dist/assets/index-Ds41VvOC.js +0 -52
- package/web/dist/assets/vendor-state-CH64feAE.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e,t}from"./rolldown-runtime-Dw2cE7zH.js";var n=t((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.iterator;function m(e){return typeof e!=`object`||!e?null:(e=p&&e[p]||e[`@@iterator`],typeof e==`function`?e:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,_={};function v(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function y(){}y.prototype=v.prototype;function b(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}var x=b.prototype=new y;x.constructor=b,g(x,v.prototype),x.isPureReactComponent=!0;var S=Array.isArray;function C(){}var w={H:null,A:null,T:null,S:null},T=Object.prototype.hasOwnProperty;function E(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function D(e,t){return E(e.type,t,e.props)}function O(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function k(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var A=/\/+/g;function j(e,t){return typeof e==`object`&&e&&e.key!=null?k(``+e.key):t.toString(36)}function M(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(C,C):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function N(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,N(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+j(e,0):a,S(o)?(i=``,c!=null&&(i=c.replace(A,`$&/`)+`/`),N(o,r,i,``,function(e){return e})):o!=null&&(O(o)&&(o=D(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(A,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(S(e))for(var u=0;u<e.length;u++)a=e[u],s=l+j(a,u),c+=N(a,r,i,s,o);else if(u=m(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+j(a,u++),c+=N(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return N(M(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function P(e,t,n){if(e==null)return e;var r=[],i=0;return N(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function F(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t)},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var I=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},L={map:P,forEach:function(e,t,n){P(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return P(e,function(){t++}),t},toArray:function(e){return P(e,function(e){return e})||[]},only:function(e){if(!O(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=L,e.Component=v,e.Fragment=r,e.Profiler=a,e.PureComponent=b,e.StrictMode=i,e.Suspense=l,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=w,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return w.H.useMemoCache(e)}},e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=g({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!T.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return E(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)T.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return E(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=O,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:F}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=function(e){var t=w.T,n={};w.T=n;try{var r=e(),i=w.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(C,I)}catch(e){I(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),w.T=t}},e.unstable_useCacheRefresh=function(){return w.H.useCacheRefresh()},e.use=function(e){return w.H.use(e)},e.useActionState=function(e,t,n){return w.H.useActionState(e,t,n)},e.useCallback=function(e,t){return w.H.useCallback(e,t)},e.useContext=function(e){return w.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return w.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return w.H.useEffect(e,t)},e.useEffectEvent=function(e){return w.H.useEffectEvent(e)},e.useId=function(){return w.H.useId()},e.useImperativeHandle=function(e,t,n){return w.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return w.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return w.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return w.H.useMemo(e,t)},e.useOptimistic=function(e,t){return w.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return w.H.useReducer(e,t,n)},e.useRef=function(e){return w.H.useRef(e)},e.useState=function(e){return w.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return w.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return w.H.useTransition()},e.version=`19.2.4`})),r=t(((e,t)=>{t.exports=n()})),i=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),a=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),o=e=>{let t=a(e);return t.charAt(0).toUpperCase()+t.slice(1)},s=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),c=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0},l={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`},u=e(r()),d=(0,u.forwardRef)(({color:e=`currentColor`,size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i=``,children:a,iconNode:o,...d},f)=>(0,u.createElement)(`svg`,{ref:f,...l,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:s(`lucide`,i),...!a&&!c(d)&&{"aria-hidden":`true`},...d},[...o.map(([e,t])=>(0,u.createElement)(e,t)),...Array.isArray(a)?a:[a]])),f=(e,t)=>{let n=(0,u.forwardRef)(({className:n,...r},a)=>(0,u.createElement)(d,{ref:a,iconNode:t,className:s(`lucide-${i(o(e))}`,`lucide-${e}`,n),...r}));return n.displayName=o(e),n},p=f(`activity`,[[`path`,{d:`M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2`,key:`169zse`}]]),m=f(`archive`,[[`rect`,{width:`20`,height:`5`,x:`2`,y:`3`,rx:`1`,key:`1wp1u1`}],[`path`,{d:`M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8`,key:`1s80jp`}],[`path`,{d:`M10 12h4`,key:`a56b0p`}]]),h=f(`arrow-left`,[[`path`,{d:`m12 19-7-7 7-7`,key:`1l729n`}],[`path`,{d:`M19 12H5`,key:`x3x0zl`}]]),g=f(`brain`,[[`path`,{d:`M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z`,key:`l5xja`}],[`path`,{d:`M12 5a3 3 0 1 1 5.997.125 4 4 0 0 1 2.526 5.77 4 4 0 0 1-.556 6.588A4 4 0 1 1 12 18Z`,key:`ep3f8r`}],[`path`,{d:`M15 13a4.5 4.5 0 0 1-3-4 4.5 4.5 0 0 1-3 4`,key:`1p4c4q`}],[`path`,{d:`M17.599 6.5a3 3 0 0 0 .399-1.375`,key:`tmeiqw`}],[`path`,{d:`M6.003 5.125A3 3 0 0 0 6.401 6.5`,key:`105sqy`}],[`path`,{d:`M3.477 10.896a4 4 0 0 1 .585-.396`,key:`ql3yin`}],[`path`,{d:`M19.938 10.5a4 4 0 0 1 .585.396`,key:`1qfode`}],[`path`,{d:`M6 18a4 4 0 0 1-1.967-.516`,key:`2e4loj`}],[`path`,{d:`M19.967 17.484A4 4 0 0 1 18 18`,key:`159ez6`}]]),_=f(`chart-column`,[[`path`,{d:`M3 3v16a2 2 0 0 0 2 2h16`,key:`c24i48`}],[`path`,{d:`M18 17V9`,key:`2bz60n`}],[`path`,{d:`M13 17V5`,key:`1frdt8`}],[`path`,{d:`M8 17v-3`,key:`17ska0`}]]),v=f(`check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),y=f(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),b=f(`chevron-right`,[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]),x=f(`circle-alert`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`12`,x2:`12`,y1:`8`,y2:`12`,key:`1pkeuh`}],[`line`,{x1:`12`,x2:`12.01`,y1:`16`,y2:`16`,key:`4dfq90`}]]),S=f(`circle-check-big`,[[`path`,{d:`M21.801 10A10 10 0 1 1 17 3.335`,key:`yps3ct`}],[`path`,{d:`m9 11 3 3L22 4`,key:`1pflzl`}]]),C=f(`circle-dollar-sign`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M16 8h-6a2 2 0 1 0 0 4h4a2 2 0 1 1 0 4H8`,key:`1h4pet`}],[`path`,{d:`M12 18V6`,key:`zqpxq5`}]]),w=f(`circle-user`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`circle`,{cx:`12`,cy:`10`,r:`3`,key:`ilqhr7`}],[`path`,{d:`M7 20.662V19a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v1.662`,key:`154egf`}]]),T=f(`circle-x`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m15 9-6 6`,key:`1uzhvr`}],[`path`,{d:`m9 9 6 6`,key:`z0biqf`}]]),E=f(`clock`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`polyline`,{points:`12 6 12 12 16 14`,key:`68esgv`}]]),D=f(`cpu`,[[`path`,{d:`M12 20v2`,key:`1lh1kg`}],[`path`,{d:`M12 2v2`,key:`tus03m`}],[`path`,{d:`M17 20v2`,key:`1rnc9c`}],[`path`,{d:`M17 2v2`,key:`11trls`}],[`path`,{d:`M2 12h2`,key:`1t8f8n`}],[`path`,{d:`M2 17h2`,key:`7oei6x`}],[`path`,{d:`M2 7h2`,key:`asdhe0`}],[`path`,{d:`M20 12h2`,key:`1q8mjw`}],[`path`,{d:`M20 17h2`,key:`1fpfkl`}],[`path`,{d:`M20 7h2`,key:`1o8tra`}],[`path`,{d:`M7 20v2`,key:`4gnj0m`}],[`path`,{d:`M7 2v2`,key:`1i4yhu`}],[`rect`,{x:`4`,y:`4`,width:`16`,height:`16`,rx:`2`,key:`1vbyd7`}],[`rect`,{x:`8`,y:`8`,width:`8`,height:`8`,rx:`1`,key:`z9xiuo`}]]),O=f(`dollar-sign`,[[`line`,{x1:`12`,x2:`12`,y1:`2`,y2:`22`,key:`7eqyqh`}],[`path`,{d:`M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6`,key:`1b0p4s`}]]),k=f(`file-code`,[[`path`,{d:`M10 12.5 8 15l2 2.5`,key:`1tg20x`}],[`path`,{d:`m14 12.5 2 2.5-2 2.5`,key:`yinavb`}],[`path`,{d:`M14 2v4a2 2 0 0 0 2 2h4`,key:`tnqrlb`}],[`path`,{d:`M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7z`,key:`1mlx9k`}]]),A=f(`git-branch`,[[`line`,{x1:`6`,x2:`6`,y1:`3`,y2:`15`,key:`17qcm7`}],[`circle`,{cx:`18`,cy:`6`,r:`3`,key:`1h7g24`}],[`circle`,{cx:`6`,cy:`18`,r:`3`,key:`fqmcym`}],[`path`,{d:`M18 9a9 9 0 0 1-9 9`,key:`n2h4wq`}]]),j=f(`globe`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20`,key:`13o1zl`}],[`path`,{d:`M2 12h20`,key:`9i4pu4`}]]),M=f(`hash`,[[`line`,{x1:`4`,x2:`20`,y1:`9`,y2:`9`,key:`4lhtct`}],[`line`,{x1:`4`,x2:`20`,y1:`15`,y2:`15`,key:`vyu0kd`}],[`line`,{x1:`10`,x2:`8`,y1:`3`,y2:`21`,key:`1ggp8o`}],[`line`,{x1:`16`,x2:`14`,y1:`3`,y2:`21`,key:`weycgp`}]]),N=f(`layers`,[[`path`,{d:`M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z`,key:`zw3jo`}],[`path`,{d:`M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12`,key:`1wduqc`}],[`path`,{d:`M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17`,key:`kqbvx6`}]]),P=f(`layout-dashboard`,[[`rect`,{width:`7`,height:`9`,x:`3`,y:`3`,rx:`1`,key:`10lvy0`}],[`rect`,{width:`7`,height:`5`,x:`14`,y:`3`,rx:`1`,key:`16une8`}],[`rect`,{width:`7`,height:`9`,x:`14`,y:`12`,rx:`1`,key:`1hutg5`}],[`rect`,{width:`7`,height:`5`,x:`3`,y:`16`,rx:`1`,key:`ldoo1y`}]]),F=f(`lightbulb`,[[`path`,{d:`M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5`,key:`1gvzjb`}],[`path`,{d:`M9 18h6`,key:`x1upvd`}],[`path`,{d:`M10 22h4`,key:`ceow96`}]]),I=f(`list-todo`,[[`rect`,{x:`3`,y:`5`,width:`6`,height:`6`,rx:`1`,key:`1defrl`}],[`path`,{d:`m3 17 2 2 4-4`,key:`1jhpwq`}],[`path`,{d:`M13 6h8`,key:`15sg57`}],[`path`,{d:`M13 12h8`,key:`h98zly`}],[`path`,{d:`M13 18h8`,key:`oe0vm4`}]]),L=f(`loader-circle`,[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]]),R=f(`lock`,[[`rect`,{width:`18`,height:`11`,x:`3`,y:`11`,rx:`2`,ry:`2`,key:`1w4ew1`}],[`path`,{d:`M7 11V7a5 5 0 0 1 10 0v4`,key:`fwvmzm`}]]),z=f(`menu`,[[`path`,{d:`M4 12h16`,key:`1lakjw`}],[`path`,{d:`M4 18h16`,key:`19g7jn`}],[`path`,{d:`M4 6h16`,key:`1o0s65`}]]),B=f(`message-circle`,[[`path`,{d:`M7.9 20A9 9 0 1 0 4 16.1L2 22Z`,key:`vv11sd`}]]),V=f(`message-square`,[[`path`,{d:`M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z`,key:`1lielz`}]]),H=f(`pause`,[[`rect`,{x:`14`,y:`4`,width:`4`,height:`16`,rx:`1`,key:`zuxfzm`}],[`rect`,{x:`6`,y:`4`,width:`4`,height:`16`,rx:`1`,key:`1okwgv`}]]),U=f(`pencil`,[[`path`,{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`,key:`1a8usu`}],[`path`,{d:`m15 5 4 4`,key:`1mk7zo`}]]),W=f(`play`,[[`polygon`,{points:`6 3 20 12 6 21 6 3`,key:`1oa8hb`}]]),G=f(`plug-zap`,[[`path`,{d:`M6.3 20.3a2.4 2.4 0 0 0 3.4 0L12 18l-6-6-2.3 2.3a2.4 2.4 0 0 0 0 3.4Z`,key:`goz73y`}],[`path`,{d:`m2 22 3-3`,key:`19mgm9`}],[`path`,{d:`M7.5 13.5 10 11`,key:`7xgeeb`}],[`path`,{d:`M10.5 16.5 13 14`,key:`10btkg`}],[`path`,{d:`m18 3-4 4h6l-4 4`,key:`16psg9`}]]),K=f(`plug`,[[`path`,{d:`M12 22v-5`,key:`1ega77`}],[`path`,{d:`M9 8V2`,key:`14iosj`}],[`path`,{d:`M15 8V2`,key:`18g5xt`}],[`path`,{d:`M18 8v5a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V8Z`,key:`osxo6l`}]]),q=f(`plus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]),J=f(`puzzle`,[[`path`,{d:`M15.39 4.39a1 1 0 0 0 1.68-.474 2.5 2.5 0 1 1 3.014 3.015 1 1 0 0 0-.474 1.68l1.683 1.682a2.414 2.414 0 0 1 0 3.414L19.61 15.39a1 1 0 0 1-1.68-.474 2.5 2.5 0 1 0-3.014 3.015 1 1 0 0 1 .474 1.68l-1.683 1.682a2.414 2.414 0 0 1-3.414 0L8.61 19.61a1 1 0 0 0-1.68.474 2.5 2.5 0 1 1-3.014-3.015 1 1 0 0 0 .474-1.68l-1.683-1.682a2.414 2.414 0 0 1 0-3.414L4.39 8.61a1 1 0 0 1 1.68.474 2.5 2.5 0 1 0 3.014-3.015 1 1 0 0 1-.474-1.68l1.683-1.682a2.414 2.414 0 0 1 3.414 0z`,key:`w46dr5`}]]),Y=f(`radio`,[[`path`,{d:`M4.9 19.1C1 15.2 1 8.8 4.9 4.9`,key:`1vaf9d`}],[`path`,{d:`M7.8 16.2c-2.3-2.3-2.3-6.1 0-8.5`,key:`u1ii0m`}],[`circle`,{cx:`12`,cy:`12`,r:`2`,key:`1c9p78`}],[`path`,{d:`M16.2 7.8c2.3 2.3 2.3 6.1 0 8.5`,key:`1j5fej`}],[`path`,{d:`M19.1 4.9C23 8.8 23 15.1 19.1 19`,key:`10b0cb`}]]),X=f(`refresh-cw`,[[`path`,{d:`M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8`,key:`v9h5vc`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}],[`path`,{d:`M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16`,key:`3uifl3`}],[`path`,{d:`M8 16H3v5`,key:`1cv678`}]]),Z=f(`rotate-ccw`,[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}]]),Q=f(`save`,[[`path`,{d:`M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z`,key:`1c8476`}],[`path`,{d:`M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7`,key:`1ydtos`}],[`path`,{d:`M7 3v4a1 1 0 0 0 1 1h7`,key:`t51u73`}]]),$=f(`search`,[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]),ee=f(`send`,[[`path`,{d:`M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z`,key:`1ffxy3`}],[`path`,{d:`m21.854 2.147-10.94 10.939`,key:`12cjpa`}]]),te=f(`settings`,[[`path`,{d:`M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z`,key:`1qme2f`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),ne=f(`target`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`circle`,{cx:`12`,cy:`12`,r:`6`,key:`1vlfrh`}],[`circle`,{cx:`12`,cy:`12`,r:`2`,key:`1c9p78`}]]),re=f(`terminal`,[[`path`,{d:`M12 19h8`,key:`baeox8`}],[`path`,{d:`m4 17 6-6-6-6`,key:`1yngyt`}]]),ie=f(`trash-2`,[[`path`,{d:`M3 6h18`,key:`d0wm0j`}],[`path`,{d:`M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6`,key:`4alrt4`}],[`path`,{d:`M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2`,key:`v07s0e`}],[`line`,{x1:`10`,x2:`10`,y1:`11`,y2:`17`,key:`1uufr5`}],[`line`,{x1:`14`,x2:`14`,y1:`11`,y2:`17`,key:`xtxkd`}]]),ae=f(`user`,[[`path`,{d:`M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2`,key:`975kel`}],[`circle`,{cx:`12`,cy:`7`,r:`4`,key:`17ys0d`}]]),oe=f(`wifi-off`,[[`path`,{d:`M12 20h.01`,key:`zekei9`}],[`path`,{d:`M8.5 16.429a5 5 0 0 1 7 0`,key:`1bycff`}],[`path`,{d:`M5 12.859a10 10 0 0 1 5.17-2.69`,key:`1dl1wf`}],[`path`,{d:`M19 12.859a10 10 0 0 0-2.007-1.523`,key:`4k23kn`}],[`path`,{d:`M2 8.82a15 15 0 0 1 4.177-2.643`,key:`1grhjp`}],[`path`,{d:`M22 8.82a15 15 0 0 0-11.288-3.764`,key:`z3jwby`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}]]),se=f(`wifi`,[[`path`,{d:`M12 20h.01`,key:`zekei9`}],[`path`,{d:`M2 8.82a15 15 0 0 1 20 0`,key:`dnpr2z`}],[`path`,{d:`M5 12.859a10 10 0 0 1 14 0`,key:`1x1e6c`}],[`path`,{d:`M8.5 16.429a5 5 0 0 1 7 0`,key:`1bycff`}]]),ce=f(`x`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]);export{N as A,C as B,B as C,I as D,L as E,O as F,v as G,x as H,D as I,h as J,_ as K,E as L,j as M,A as N,F as O,k as P,T as R,V as S,R as T,b as U,S as V,y as W,p as X,m as Y,r as Z,K as _,ie as a,U as b,te as c,Q as d,Z as f,q as g,J as h,ae as i,M as j,P as k,ee as l,Y as m,se as n,re as o,X as p,g as q,oe as r,ne as s,ce as t,$ as u,G as v,z as w,H as x,W as y,w as z};
|
|
1
|
+
import{r as e,t}from"./rolldown-runtime-Dw2cE7zH.js";var n=t((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.iterator;function m(e){return typeof e!=`object`||!e?null:(e=p&&e[p]||e[`@@iterator`],typeof e==`function`?e:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,_={};function v(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function y(){}y.prototype=v.prototype;function b(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}var x=b.prototype=new y;x.constructor=b,g(x,v.prototype),x.isPureReactComponent=!0;var S=Array.isArray;function C(){}var w={H:null,A:null,T:null,S:null},T=Object.prototype.hasOwnProperty;function E(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function D(e,t){return E(e.type,t,e.props)}function O(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function k(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var A=/\/+/g;function j(e,t){return typeof e==`object`&&e&&e.key!=null?k(``+e.key):t.toString(36)}function M(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(C,C):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function N(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,N(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+j(e,0):a,S(o)?(i=``,c!=null&&(i=c.replace(A,`$&/`)+`/`),N(o,r,i,``,function(e){return e})):o!=null&&(O(o)&&(o=D(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(A,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(S(e))for(var u=0;u<e.length;u++)a=e[u],s=l+j(a,u),c+=N(a,r,i,s,o);else if(u=m(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+j(a,u++),c+=N(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return N(M(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function P(e,t,n){if(e==null)return e;var r=[],i=0;return N(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function F(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t)},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var I=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},L={map:P,forEach:function(e,t,n){P(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return P(e,function(){t++}),t},toArray:function(e){return P(e,function(e){return e})||[]},only:function(e){if(!O(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=L,e.Component=v,e.Fragment=r,e.Profiler=a,e.PureComponent=b,e.StrictMode=i,e.Suspense=l,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=w,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return w.H.useMemoCache(e)}},e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=g({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!T.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return E(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)T.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return E(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=O,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:F}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=function(e){var t=w.T,n={};w.T=n;try{var r=e(),i=w.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(C,I)}catch(e){I(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),w.T=t}},e.unstable_useCacheRefresh=function(){return w.H.useCacheRefresh()},e.use=function(e){return w.H.use(e)},e.useActionState=function(e,t,n){return w.H.useActionState(e,t,n)},e.useCallback=function(e,t){return w.H.useCallback(e,t)},e.useContext=function(e){return w.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return w.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return w.H.useEffect(e,t)},e.useEffectEvent=function(e){return w.H.useEffectEvent(e)},e.useId=function(){return w.H.useId()},e.useImperativeHandle=function(e,t,n){return w.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return w.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return w.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return w.H.useMemo(e,t)},e.useOptimistic=function(e,t){return w.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return w.H.useReducer(e,t,n)},e.useRef=function(e){return w.H.useRef(e)},e.useState=function(e){return w.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return w.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return w.H.useTransition()},e.version=`19.2.4`})),r=t(((e,t)=>{t.exports=n()})),i=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),a=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),o=e=>{let t=a(e);return t.charAt(0).toUpperCase()+t.slice(1)},s=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),c=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0},l={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`},u=e(r()),d=(0,u.forwardRef)(({color:e=`currentColor`,size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i=``,children:a,iconNode:o,...d},f)=>(0,u.createElement)(`svg`,{ref:f,...l,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:s(`lucide`,i),...!a&&!c(d)&&{"aria-hidden":`true`},...d},[...o.map(([e,t])=>(0,u.createElement)(e,t)),...Array.isArray(a)?a:[a]])),f=(e,t)=>{let n=(0,u.forwardRef)(({className:n,...r},a)=>(0,u.createElement)(d,{ref:a,iconNode:t,className:s(`lucide-${i(o(e))}`,`lucide-${e}`,n),...r}));return n.displayName=o(e),n},p=f(`activity`,[[`path`,{d:`M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2`,key:`169zse`}]]),m=f(`archive`,[[`rect`,{width:`20`,height:`5`,x:`2`,y:`3`,rx:`1`,key:`1wp1u1`}],[`path`,{d:`M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8`,key:`1s80jp`}],[`path`,{d:`M10 12h4`,key:`a56b0p`}]]),h=f(`arrow-left`,[[`path`,{d:`m12 19-7-7 7-7`,key:`1l729n`}],[`path`,{d:`M19 12H5`,key:`x3x0zl`}]]),g=f(`brain`,[[`path`,{d:`M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z`,key:`l5xja`}],[`path`,{d:`M12 5a3 3 0 1 1 5.997.125 4 4 0 0 1 2.526 5.77 4 4 0 0 1-.556 6.588A4 4 0 1 1 12 18Z`,key:`ep3f8r`}],[`path`,{d:`M15 13a4.5 4.5 0 0 1-3-4 4.5 4.5 0 0 1-3 4`,key:`1p4c4q`}],[`path`,{d:`M17.599 6.5a3 3 0 0 0 .399-1.375`,key:`tmeiqw`}],[`path`,{d:`M6.003 5.125A3 3 0 0 0 6.401 6.5`,key:`105sqy`}],[`path`,{d:`M3.477 10.896a4 4 0 0 1 .585-.396`,key:`ql3yin`}],[`path`,{d:`M19.938 10.5a4 4 0 0 1 .585.396`,key:`1qfode`}],[`path`,{d:`M6 18a4 4 0 0 1-1.967-.516`,key:`2e4loj`}],[`path`,{d:`M19.967 17.484A4 4 0 0 1 18 18`,key:`159ez6`}]]),_=f(`chart-column`,[[`path`,{d:`M3 3v16a2 2 0 0 0 2 2h16`,key:`c24i48`}],[`path`,{d:`M18 17V9`,key:`2bz60n`}],[`path`,{d:`M13 17V5`,key:`1frdt8`}],[`path`,{d:`M8 17v-3`,key:`17ska0`}]]),v=f(`check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),y=f(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),b=f(`chevron-right`,[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]),x=f(`circle-alert`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`12`,x2:`12`,y1:`8`,y2:`12`,key:`1pkeuh`}],[`line`,{x1:`12`,x2:`12.01`,y1:`16`,y2:`16`,key:`4dfq90`}]]),S=f(`circle-check-big`,[[`path`,{d:`M21.801 10A10 10 0 1 1 17 3.335`,key:`yps3ct`}],[`path`,{d:`m9 11 3 3L22 4`,key:`1pflzl`}]]),C=f(`circle-dollar-sign`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M16 8h-6a2 2 0 1 0 0 4h4a2 2 0 1 1 0 4H8`,key:`1h4pet`}],[`path`,{d:`M12 18V6`,key:`zqpxq5`}]]),w=f(`circle-user`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`circle`,{cx:`12`,cy:`10`,r:`3`,key:`ilqhr7`}],[`path`,{d:`M7 20.662V19a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v1.662`,key:`154egf`}]]),T=f(`circle-x`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m15 9-6 6`,key:`1uzhvr`}],[`path`,{d:`m9 9 6 6`,key:`z0biqf`}]]),E=f(`clock`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`polyline`,{points:`12 6 12 12 16 14`,key:`68esgv`}]]),D=f(`cpu`,[[`path`,{d:`M12 20v2`,key:`1lh1kg`}],[`path`,{d:`M12 2v2`,key:`tus03m`}],[`path`,{d:`M17 20v2`,key:`1rnc9c`}],[`path`,{d:`M17 2v2`,key:`11trls`}],[`path`,{d:`M2 12h2`,key:`1t8f8n`}],[`path`,{d:`M2 17h2`,key:`7oei6x`}],[`path`,{d:`M2 7h2`,key:`asdhe0`}],[`path`,{d:`M20 12h2`,key:`1q8mjw`}],[`path`,{d:`M20 17h2`,key:`1fpfkl`}],[`path`,{d:`M20 7h2`,key:`1o8tra`}],[`path`,{d:`M7 20v2`,key:`4gnj0m`}],[`path`,{d:`M7 2v2`,key:`1i4yhu`}],[`rect`,{x:`4`,y:`4`,width:`16`,height:`16`,rx:`2`,key:`1vbyd7`}],[`rect`,{x:`8`,y:`8`,width:`8`,height:`8`,rx:`1`,key:`z9xiuo`}]]),O=f(`dollar-sign`,[[`line`,{x1:`12`,x2:`12`,y1:`2`,y2:`22`,key:`7eqyqh`}],[`path`,{d:`M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6`,key:`1b0p4s`}]]),k=f(`download`,[[`path`,{d:`M12 15V3`,key:`m9g1x1`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}],[`path`,{d:`m7 10 5 5 5-5`,key:`brsn70`}]]),A=f(`eye-off`,[[`path`,{d:`M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49`,key:`ct8e1f`}],[`path`,{d:`M14.084 14.158a3 3 0 0 1-4.242-4.242`,key:`151rxh`}],[`path`,{d:`M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143`,key:`13bj9a`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}]]),j=f(`eye`,[[`path`,{d:`M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0`,key:`1nclc0`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),M=f(`file-code`,[[`path`,{d:`M10 12.5 8 15l2 2.5`,key:`1tg20x`}],[`path`,{d:`m14 12.5 2 2.5-2 2.5`,key:`yinavb`}],[`path`,{d:`M14 2v4a2 2 0 0 0 2 2h4`,key:`tnqrlb`}],[`path`,{d:`M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7z`,key:`1mlx9k`}]]),N=f(`git-branch`,[[`line`,{x1:`6`,x2:`6`,y1:`3`,y2:`15`,key:`17qcm7`}],[`circle`,{cx:`18`,cy:`6`,r:`3`,key:`1h7g24`}],[`circle`,{cx:`6`,cy:`18`,r:`3`,key:`fqmcym`}],[`path`,{d:`M18 9a9 9 0 0 1-9 9`,key:`n2h4wq`}]]),P=f(`globe`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20`,key:`13o1zl`}],[`path`,{d:`M2 12h20`,key:`9i4pu4`}]]),F=f(`hash`,[[`line`,{x1:`4`,x2:`20`,y1:`9`,y2:`9`,key:`4lhtct`}],[`line`,{x1:`4`,x2:`20`,y1:`15`,y2:`15`,key:`vyu0kd`}],[`line`,{x1:`10`,x2:`8`,y1:`3`,y2:`21`,key:`1ggp8o`}],[`line`,{x1:`16`,x2:`14`,y1:`3`,y2:`21`,key:`weycgp`}]]),I=f(`layers`,[[`path`,{d:`M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z`,key:`zw3jo`}],[`path`,{d:`M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12`,key:`1wduqc`}],[`path`,{d:`M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17`,key:`kqbvx6`}]]),L=f(`layout-dashboard`,[[`rect`,{width:`7`,height:`9`,x:`3`,y:`3`,rx:`1`,key:`10lvy0`}],[`rect`,{width:`7`,height:`5`,x:`14`,y:`3`,rx:`1`,key:`16une8`}],[`rect`,{width:`7`,height:`9`,x:`14`,y:`12`,rx:`1`,key:`1hutg5`}],[`rect`,{width:`7`,height:`5`,x:`3`,y:`16`,rx:`1`,key:`ldoo1y`}]]),ee=f(`lightbulb`,[[`path`,{d:`M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5`,key:`1gvzjb`}],[`path`,{d:`M9 18h6`,key:`x1upvd`}],[`path`,{d:`M10 22h4`,key:`ceow96`}]]),R=f(`list-todo`,[[`rect`,{x:`3`,y:`5`,width:`6`,height:`6`,rx:`1`,key:`1defrl`}],[`path`,{d:`m3 17 2 2 4-4`,key:`1jhpwq`}],[`path`,{d:`M13 6h8`,key:`15sg57`}],[`path`,{d:`M13 12h8`,key:`h98zly`}],[`path`,{d:`M13 18h8`,key:`oe0vm4`}]]),z=f(`loader-circle`,[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]]),B=f(`lock`,[[`rect`,{width:`18`,height:`11`,x:`3`,y:`11`,rx:`2`,ry:`2`,key:`1w4ew1`}],[`path`,{d:`M7 11V7a5 5 0 0 1 10 0v4`,key:`fwvmzm`}]]),V=f(`menu`,[[`path`,{d:`M4 12h16`,key:`1lakjw`}],[`path`,{d:`M4 18h16`,key:`19g7jn`}],[`path`,{d:`M4 6h16`,key:`1o0s65`}]]),H=f(`message-circle`,[[`path`,{d:`M7.9 20A9 9 0 1 0 4 16.1L2 22Z`,key:`vv11sd`}]]),U=f(`message-square`,[[`path`,{d:`M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z`,key:`1lielz`}]]),W=f(`pause`,[[`rect`,{x:`14`,y:`4`,width:`4`,height:`16`,rx:`1`,key:`zuxfzm`}],[`rect`,{x:`6`,y:`4`,width:`4`,height:`16`,rx:`1`,key:`1okwgv`}]]),G=f(`pencil`,[[`path`,{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`,key:`1a8usu`}],[`path`,{d:`m15 5 4 4`,key:`1mk7zo`}]]),K=f(`play`,[[`polygon`,{points:`6 3 20 12 6 21 6 3`,key:`1oa8hb`}]]),q=f(`plug-zap`,[[`path`,{d:`M6.3 20.3a2.4 2.4 0 0 0 3.4 0L12 18l-6-6-2.3 2.3a2.4 2.4 0 0 0 0 3.4Z`,key:`goz73y`}],[`path`,{d:`m2 22 3-3`,key:`19mgm9`}],[`path`,{d:`M7.5 13.5 10 11`,key:`7xgeeb`}],[`path`,{d:`M10.5 16.5 13 14`,key:`10btkg`}],[`path`,{d:`m18 3-4 4h6l-4 4`,key:`16psg9`}]]),J=f(`plug`,[[`path`,{d:`M12 22v-5`,key:`1ega77`}],[`path`,{d:`M9 8V2`,key:`14iosj`}],[`path`,{d:`M15 8V2`,key:`18g5xt`}],[`path`,{d:`M18 8v5a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V8Z`,key:`osxo6l`}]]),Y=f(`plus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]),X=f(`puzzle`,[[`path`,{d:`M15.39 4.39a1 1 0 0 0 1.68-.474 2.5 2.5 0 1 1 3.014 3.015 1 1 0 0 0-.474 1.68l1.683 1.682a2.414 2.414 0 0 1 0 3.414L19.61 15.39a1 1 0 0 1-1.68-.474 2.5 2.5 0 1 0-3.014 3.015 1 1 0 0 1 .474 1.68l-1.683 1.682a2.414 2.414 0 0 1-3.414 0L8.61 19.61a1 1 0 0 0-1.68.474 2.5 2.5 0 1 1-3.014-3.015 1 1 0 0 0 .474-1.68l-1.683-1.682a2.414 2.414 0 0 1 0-3.414L4.39 8.61a1 1 0 0 1 1.68.474 2.5 2.5 0 1 0 3.014-3.015 1 1 0 0 1-.474-1.68l1.683-1.682a2.414 2.414 0 0 1 3.414 0z`,key:`w46dr5`}]]),Z=f(`radio`,[[`path`,{d:`M4.9 19.1C1 15.2 1 8.8 4.9 4.9`,key:`1vaf9d`}],[`path`,{d:`M7.8 16.2c-2.3-2.3-2.3-6.1 0-8.5`,key:`u1ii0m`}],[`circle`,{cx:`12`,cy:`12`,r:`2`,key:`1c9p78`}],[`path`,{d:`M16.2 7.8c2.3 2.3 2.3 6.1 0 8.5`,key:`1j5fej`}],[`path`,{d:`M19.1 4.9C23 8.8 23 15.1 19.1 19`,key:`10b0cb`}]]),Q=f(`refresh-cw`,[[`path`,{d:`M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8`,key:`v9h5vc`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}],[`path`,{d:`M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16`,key:`3uifl3`}],[`path`,{d:`M8 16H3v5`,key:`1cv678`}]]),te=f(`rotate-ccw`,[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}]]),ne=f(`save`,[[`path`,{d:`M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z`,key:`1c8476`}],[`path`,{d:`M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7`,key:`1ydtos`}],[`path`,{d:`M7 3v4a1 1 0 0 0 1 1h7`,key:`t51u73`}]]),re=f(`search`,[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]),ie=f(`send`,[[`path`,{d:`M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z`,key:`1ffxy3`}],[`path`,{d:`m21.854 2.147-10.94 10.939`,key:`12cjpa`}]]),ae=f(`settings`,[[`path`,{d:`M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z`,key:`1qme2f`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),oe=f(`store`,[[`path`,{d:`m2 7 4.41-4.41A2 2 0 0 1 7.83 2h8.34a2 2 0 0 1 1.42.59L22 7`,key:`ztvudi`}],[`path`,{d:`M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8`,key:`1b2hhj`}],[`path`,{d:`M15 22v-4a2 2 0 0 0-2-2h-2a2 2 0 0 0-2 2v4`,key:`2ebpfo`}],[`path`,{d:`M2 7h20`,key:`1fcdvo`}],[`path`,{d:`M22 7v3a2 2 0 0 1-2 2a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 16 12a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 12 12a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 8 12a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 4 12a2 2 0 0 1-2-2V7`,key:`6c3vgh`}]]),se=f(`target`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`circle`,{cx:`12`,cy:`12`,r:`6`,key:`1vlfrh`}],[`circle`,{cx:`12`,cy:`12`,r:`2`,key:`1c9p78`}]]),$=f(`terminal`,[[`path`,{d:`M12 19h8`,key:`baeox8`}],[`path`,{d:`m4 17 6-6-6-6`,key:`1yngyt`}]]),ce=f(`trash-2`,[[`path`,{d:`M3 6h18`,key:`d0wm0j`}],[`path`,{d:`M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6`,key:`4alrt4`}],[`path`,{d:`M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2`,key:`v07s0e`}],[`line`,{x1:`10`,x2:`10`,y1:`11`,y2:`17`,key:`1uufr5`}],[`line`,{x1:`14`,x2:`14`,y1:`11`,y2:`17`,key:`xtxkd`}]]),le=f(`triangle-alert`,[[`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3`,key:`wmoenq`}],[`path`,{d:`M12 9v4`,key:`juzpu7`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]]),ue=f(`user`,[[`path`,{d:`M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2`,key:`975kel`}],[`circle`,{cx:`12`,cy:`7`,r:`4`,key:`17ys0d`}]]),de=f(`wifi-off`,[[`path`,{d:`M12 20h.01`,key:`zekei9`}],[`path`,{d:`M8.5 16.429a5 5 0 0 1 7 0`,key:`1bycff`}],[`path`,{d:`M5 12.859a10 10 0 0 1 5.17-2.69`,key:`1dl1wf`}],[`path`,{d:`M19 12.859a10 10 0 0 0-2.007-1.523`,key:`4k23kn`}],[`path`,{d:`M2 8.82a15 15 0 0 1 4.177-2.643`,key:`1grhjp`}],[`path`,{d:`M22 8.82a15 15 0 0 0-11.288-3.764`,key:`z3jwby`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}]]),fe=f(`wifi`,[[`path`,{d:`M12 20h.01`,key:`zekei9`}],[`path`,{d:`M2 8.82a15 15 0 0 1 20 0`,key:`dnpr2z`}],[`path`,{d:`M5 12.859a10 10 0 0 1 14 0`,key:`1x1e6c`}],[`path`,{d:`M8.5 16.429a5 5 0 0 1 7 0`,key:`1bycff`}]]),pe=f(`x`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]);export{h as $,ee as A,O as B,W as C,B as D,V as E,N as F,C as G,E as H,M as I,b as J,S as K,j as L,I as M,F as N,z as O,P,g as Q,A as R,G as S,H as T,T as U,D as V,w as W,v as X,y as Y,_ as Z,X as _,le as a,q as b,se as c,ie as d,m as et,re as f,Z as g,Q as h,ue as i,L as j,R as k,oe as l,te as m,fe as n,r as nt,ce as o,ne as p,x as q,de as r,$ as s,pe as t,p as tt,ae as u,Y as v,U as w,K as x,J as y,k as z};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as e,t}from"./rolldown-runtime-Dw2cE7zH.js";import{Z as n}from"./vendor-icons-ZPvC5PUS.js";var r=t((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m)if(n(c)!==null)m=!0,S||(S=!0,O());else{var t=n(l);t!==null&&te(x,t.startTime-e)}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-T<w)}function D(){if(g=!1,S){var t=e.unstable_now();T=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(C),C=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&E());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&te(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?O():S=!1}}}var O;if(typeof y==`function`)O=function(){y(D)};else if(typeof MessageChannel<`u`){var ee=new MessageChannel,k=ee.port2;ee.port1.onmessage=D,O=function(){k.postMessage(null)}}else O=function(){_(D,0)};function te(t,n){C=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):w=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,te(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,O()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),i=t(((e,t)=>{t.exports=r()})),a=t((e=>{var t=n();function r(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function i(){}var a={d:{f:i,r:function(){throw Error(r(522))},D:i,C:i,L:i,m:i,X:i,S:i,M:i},p:0,findDOMNode:null},o=Symbol.for(`react.portal`);function s(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}var c=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function l(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,e.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(r(299));return s(e,t,null,n)},e.flushSync=function(e){var t=c.T,n=a.p;try{if(c.T=null,a.p=2,e)return e()}finally{c.T=t,a.p=n,a.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,a.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&a.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=l(n,t.crossOrigin),i=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?a.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:i,fetchPriority:o}):n===`script`&&a.d.X(e,{crossOrigin:r,integrity:i,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`)if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=l(t.as,t.crossOrigin);a.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0})}}else t??a.d.M(e)},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=l(n,t.crossOrigin);a.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`)if(t){var n=l(t.as,t.crossOrigin);a.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0})}else a.d.m(e)},e.requestFormReset=function(e){a.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return c.H.useFormState(e,t,n)},e.useFormStatus=function(){return c.H.useHostTransitionStatus()},e.version=`19.2.4`})),o=t(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=a()})),s=t((e=>{var t=i(),r=n(),a=o();function s(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function c(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function l(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function u(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function d(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function f(e){if(l(e)!==e)throw Error(s(188))}function p(e){var t=e.alternate;if(!t){if(t=l(e),t===null)throw Error(s(188));return t===e?e:null}for(var n=e,r=t;;){var i=n.return;if(i===null)break;var a=i.alternate;if(a===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===a.child){for(a=i.child;a;){if(a===n)return f(i),e;if(a===r)return f(i),t;a=a.sibling}throw Error(s(188))}if(n.return!==r.return)n=i,r=a;else{for(var o=!1,c=i.child;c;){if(c===n){o=!0,n=i,r=a;break}if(c===r){o=!0,r=i,n=a;break}c=c.sibling}if(!o){for(c=a.child;c;){if(c===n){o=!0,n=a,r=i;break}if(c===r){o=!0,r=a,n=i;break}c=c.sibling}if(!o)throw Error(s(189))}}if(n.alternate!==r)throw Error(s(190))}if(n.tag!==3)throw Error(s(188));return n.stateNode.current===n?e:t}function m(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=m(e),t!==null)return t;e=e.sibling}return null}var h=Object.assign,g=Symbol.for(`react.element`),_=Symbol.for(`react.transitional.element`),v=Symbol.for(`react.portal`),y=Symbol.for(`react.fragment`),b=Symbol.for(`react.strict_mode`),x=Symbol.for(`react.profiler`),S=Symbol.for(`react.consumer`),C=Symbol.for(`react.context`),w=Symbol.for(`react.forward_ref`),T=Symbol.for(`react.suspense`),E=Symbol.for(`react.suspense_list`),D=Symbol.for(`react.memo`),O=Symbol.for(`react.lazy`),ee=Symbol.for(`react.activity`),k=Symbol.for(`react.memo_cache_sentinel`),te=Symbol.iterator;function ne(e){return typeof e!=`object`||!e?null:(e=te&&e[te]||e[`@@iterator`],typeof e==`function`?e:null)}var re=Symbol.for(`react.client.reference`);function ie(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===re?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case y:return`Fragment`;case x:return`Profiler`;case b:return`StrictMode`;case T:return`Suspense`;case E:return`SuspenseList`;case ee:return`Activity`}if(typeof e==`object`)switch(e.$$typeof){case v:return`Portal`;case C:return e.displayName||`Context`;case S:return(e._context.displayName||`Context`)+`.Consumer`;case w:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case D:return t=e.displayName||null,t===null?ie(e.type)||`Memo`:t;case O:t=e._payload,e=e._init;try{return ie(e(t))}catch{}}return null}var ae=Array.isArray,A=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,j=a.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,oe={pending:!1,data:null,method:null,action:null},se=[],ce=-1;function le(e){return{current:e}}function M(e){0>ce||(e.current=se[ce],se[ce]=null,ce--)}function N(e,t){ce++,se[ce]=e.current,e.current=t}var ue=le(null),P=le(null),de=le(null),fe=le(null);function pe(e,t){switch(N(de,t),N(P,e),N(ue,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Vd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Vd(t),e=Hd(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}M(ue),N(ue,e)}function me(){M(ue),M(P),M(de)}function he(e){e.memoizedState!==null&&N(fe,e);var t=ue.current,n=Hd(t,e.type);t!==n&&(N(P,e),N(ue,n))}function ge(e){P.current===e&&(M(ue),M(P)),fe.current===e&&(M(fe),Qf._currentValue=oe)}var _e,ve;function ye(e){if(_e===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);_e=t&&t[1]||``,ve=-1<e.stack.indexOf(`
|
|
1
|
+
import{r as e,t}from"./rolldown-runtime-Dw2cE7zH.js";import{nt as n}from"./vendor-icons-CkI4-NxL.js";var r=t((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m)if(n(c)!==null)m=!0,S||(S=!0,O());else{var t=n(l);t!==null&&te(x,t.startTime-e)}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-T<w)}function D(){if(g=!1,S){var t=e.unstable_now();T=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(C),C=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&E());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&te(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?O():S=!1}}}var O;if(typeof y==`function`)O=function(){y(D)};else if(typeof MessageChannel<`u`){var ee=new MessageChannel,k=ee.port2;ee.port1.onmessage=D,O=function(){k.postMessage(null)}}else O=function(){_(D,0)};function te(t,n){C=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):w=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,te(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,O()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),i=t(((e,t)=>{t.exports=r()})),a=t((e=>{var t=n();function r(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function i(){}var a={d:{f:i,r:function(){throw Error(r(522))},D:i,C:i,L:i,m:i,X:i,S:i,M:i},p:0,findDOMNode:null},o=Symbol.for(`react.portal`);function s(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}var c=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function l(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,e.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(r(299));return s(e,t,null,n)},e.flushSync=function(e){var t=c.T,n=a.p;try{if(c.T=null,a.p=2,e)return e()}finally{c.T=t,a.p=n,a.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,a.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&a.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=l(n,t.crossOrigin),i=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?a.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:i,fetchPriority:o}):n===`script`&&a.d.X(e,{crossOrigin:r,integrity:i,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`)if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=l(t.as,t.crossOrigin);a.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0})}}else t??a.d.M(e)},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=l(n,t.crossOrigin);a.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`)if(t){var n=l(t.as,t.crossOrigin);a.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0})}else a.d.m(e)},e.requestFormReset=function(e){a.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return c.H.useFormState(e,t,n)},e.useFormStatus=function(){return c.H.useHostTransitionStatus()},e.version=`19.2.4`})),o=t(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=a()})),s=t((e=>{var t=i(),r=n(),a=o();function s(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function c(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function l(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function u(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function d(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function f(e){if(l(e)!==e)throw Error(s(188))}function p(e){var t=e.alternate;if(!t){if(t=l(e),t===null)throw Error(s(188));return t===e?e:null}for(var n=e,r=t;;){var i=n.return;if(i===null)break;var a=i.alternate;if(a===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===a.child){for(a=i.child;a;){if(a===n)return f(i),e;if(a===r)return f(i),t;a=a.sibling}throw Error(s(188))}if(n.return!==r.return)n=i,r=a;else{for(var o=!1,c=i.child;c;){if(c===n){o=!0,n=i,r=a;break}if(c===r){o=!0,r=i,n=a;break}c=c.sibling}if(!o){for(c=a.child;c;){if(c===n){o=!0,n=a,r=i;break}if(c===r){o=!0,r=a,n=i;break}c=c.sibling}if(!o)throw Error(s(189))}}if(n.alternate!==r)throw Error(s(190))}if(n.tag!==3)throw Error(s(188));return n.stateNode.current===n?e:t}function m(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=m(e),t!==null)return t;e=e.sibling}return null}var h=Object.assign,g=Symbol.for(`react.element`),_=Symbol.for(`react.transitional.element`),v=Symbol.for(`react.portal`),y=Symbol.for(`react.fragment`),b=Symbol.for(`react.strict_mode`),x=Symbol.for(`react.profiler`),S=Symbol.for(`react.consumer`),C=Symbol.for(`react.context`),w=Symbol.for(`react.forward_ref`),T=Symbol.for(`react.suspense`),E=Symbol.for(`react.suspense_list`),D=Symbol.for(`react.memo`),O=Symbol.for(`react.lazy`),ee=Symbol.for(`react.activity`),k=Symbol.for(`react.memo_cache_sentinel`),te=Symbol.iterator;function ne(e){return typeof e!=`object`||!e?null:(e=te&&e[te]||e[`@@iterator`],typeof e==`function`?e:null)}var re=Symbol.for(`react.client.reference`);function ie(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===re?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case y:return`Fragment`;case x:return`Profiler`;case b:return`StrictMode`;case T:return`Suspense`;case E:return`SuspenseList`;case ee:return`Activity`}if(typeof e==`object`)switch(e.$$typeof){case v:return`Portal`;case C:return e.displayName||`Context`;case S:return(e._context.displayName||`Context`)+`.Consumer`;case w:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case D:return t=e.displayName||null,t===null?ie(e.type)||`Memo`:t;case O:t=e._payload,e=e._init;try{return ie(e(t))}catch{}}return null}var ae=Array.isArray,A=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,j=a.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,oe={pending:!1,data:null,method:null,action:null},se=[],ce=-1;function le(e){return{current:e}}function M(e){0>ce||(e.current=se[ce],se[ce]=null,ce--)}function N(e,t){ce++,se[ce]=e.current,e.current=t}var ue=le(null),P=le(null),de=le(null),fe=le(null);function pe(e,t){switch(N(de,t),N(P,e),N(ue,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Vd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Vd(t),e=Hd(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}M(ue),N(ue,e)}function me(){M(ue),M(P),M(de)}function he(e){e.memoizedState!==null&&N(fe,e);var t=ue.current,n=Hd(t,e.type);t!==n&&(N(P,e),N(ue,n))}function ge(e){P.current===e&&(M(ue),M(P)),fe.current===e&&(M(fe),Qf._currentValue=oe)}var _e,ve;function ye(e){if(_e===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);_e=t&&t[1]||``,ve=-1<e.stack.indexOf(`
|
|
2
2
|
at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
|
|
3
3
|
`+_e+e+ve}var be=!1;function xe(e,t){if(!e||be)return``;be=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,`props`,{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}e.call(n.prototype)}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,`name`,{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`
|
|
4
4
|
`),l=s.split(`
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e}from"./rolldown-runtime-Dw2cE7zH.js";import{nt as t}from"./vendor-icons-CkI4-NxL.js";var n=e=>{let t,n=new Set,r=(e,r)=>{let i=typeof e==`function`?e(t):e;if(!Object.is(i,t)){let e=t;t=r??(typeof i!=`object`||!i)?i:Object.assign({},t,i),n.forEach(n=>n(t,e))}},i=()=>t,a={setState:r,getState:i,getInitialState:()=>o,subscribe:e=>(n.add(e),()=>n.delete(e))},o=t=e(r,i,a);return a},r=(e=>e?n(e):n),i=e(t(),1),a=e=>e;function o(e,t=a){let n=i.useSyncExternalStore(e.subscribe,i.useCallback(()=>t(e.getState()),[e,t]),i.useCallback(()=>t(e.getInitialState()),[e,t]));return i.useDebugValue(n),n}var s=e=>{let t=r(e),n=e=>o(t,e);return Object.assign(n,t),n},c=(e=>e?s(e):s);export{c as t};
|
package/web/dist/index.html
CHANGED
|
@@ -5,13 +5,13 @@
|
|
|
5
5
|
<link rel="icon" type="image/svg+xml" href="/ui/favicon.svg" />
|
|
6
6
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
7
7
|
<title>Adam</title>
|
|
8
|
-
<script type="module" crossorigin src="/ui/assets/index-
|
|
8
|
+
<script type="module" crossorigin src="/ui/assets/index-BFmC20R2.js"></script>
|
|
9
9
|
<link rel="modulepreload" crossorigin href="/ui/assets/rolldown-runtime-Dw2cE7zH.js">
|
|
10
|
-
<link rel="modulepreload" crossorigin href="/ui/assets/vendor-icons-
|
|
11
|
-
<link rel="modulepreload" crossorigin href="/ui/assets/vendor-react
|
|
10
|
+
<link rel="modulepreload" crossorigin href="/ui/assets/vendor-icons-CkI4-NxL.js">
|
|
11
|
+
<link rel="modulepreload" crossorigin href="/ui/assets/vendor-react-DLRtONKt.js">
|
|
12
12
|
<link rel="modulepreload" crossorigin href="/ui/assets/dist-HyCSN_hp.js">
|
|
13
|
-
<link rel="modulepreload" crossorigin href="/ui/assets/vendor-state-
|
|
14
|
-
<link rel="stylesheet" crossorigin href="/ui/assets/index-
|
|
13
|
+
<link rel="modulepreload" crossorigin href="/ui/assets/vendor-state-B_-GdGNJ.js">
|
|
14
|
+
<link rel="stylesheet" crossorigin href="/ui/assets/index-CaocwyO8.css">
|
|
15
15
|
</head>
|
|
16
16
|
<body class="bg-slate-950 text-slate-100">
|
|
17
17
|
<div id="root"></div>
|
package/dist/App-SCPYTYGQ.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import{b as h,d as $t,e as bo}from"./chunk-VRP4LTHY.js";import{a as _t,f as ho,h as yo}from"./chunk-WBAPIPST.js";import"./chunk-INNDBLZE.js";import"./chunk-FCV2DPZQ.js";import{Box as Rt,Text as bt,useInput as Jn}from"ink";import{useState as Zn,useEffect as zt,useRef as xo}from"react";import{createContext as br,useContext as Sr,useReducer as Cr}from"react";import{jsx as Br}from"react/jsx-runtime";var vr={connected:!1,serverInfo:null,activeTasks:0,queuedTasks:0,costToday:0,activeTaskId:null,activeTaskSubmitted:!1,pendingApproval:null,pendingPlanApproval:null,planTimeoutNotice:null,serverUnreachable:!1,view:"chat",configVersion:0,session:null,version:null};function wr(e,t){switch(t.type){case"SET_CONNECTED":return{...e,connected:t.connected};case"SET_SERVER_INFO":return{...e,serverInfo:t.info};case"UPDATE_STATS":return{...e,activeTasks:t.activeTasks,queuedTasks:t.queuedTasks,costToday:t.costToday};case"SET_ACTIVE_TASK":return{...e,activeTaskId:t.taskId,activeTaskSubmitted:!1};case"TASK_SUBMITTED":return{...e,activeTaskSubmitted:!0};case"SET_PENDING_APPROVAL":return{...e,pendingApproval:t.approval};case"SET_SERVER_UNREACHABLE":return{...e,serverUnreachable:t.unreachable};case"SET_VIEW":return{...e,view:t.view};case"CONFIG_CHANGED":return{...e,configVersion:e.configVersion+1};case"SET_SESSION":return{...e,session:t.session};case"SET_PENDING_PLAN_APPROVAL":return{...e,pendingPlanApproval:t.approval};case"SET_PLAN_TIMEOUT_NOTICE":return{...e,pendingPlanApproval:null,planTimeoutNotice:t.planId?{planId:t.planId}:null};case"SET_VERSION":return{...e,version:t.version};default:return e}}var So=br(null);function Co({children:e}){let[t,o]=Cr(wr,vr);return Br(So.Provider,{value:{state:t,dispatch:o},children:e})}function ze(){let e=Sr(So);if(!e)throw new Error("useTuiState must be used within TuiProvider");return e}import{useEffect as vo,useRef as wo}from"react";var Er=15e3;function Bo(){let{state:e,dispatch:t}=ze(),o=wo(null),c=wo(null);vo(()=>{c.current=e.session?.id??null},[e.session?.id]),vo(()=>{let u=!0,m=null,l=()=>{o.current&&(clearTimeout(o.current),o.current=null)},i=()=>{l(),o.current=setTimeout(()=>{u&&t({type:"SET_SERVER_UNREACHABLE",unreachable:!0})},Er)};return(()=>{try{m=new $t("/events"),m.on("task_status_change",()=>{}),m.on("approval_request",r=>{if(!u)return;let a=r;t({type:"SET_PENDING_APPROVAL",approval:{taskId:a.taskId,approvalId:a.approvalId,toolName:a.toolName,toolInput:a.toolInput,matchedPattern:a.matchedPattern}})}),m.on("plan_approval_request",r=>{if(!u)return;let a=r;t({type:"SET_PENDING_PLAN_APPROVAL",approval:{taskId:a.taskId,planId:a.planId,roleId:a.roleId,plan:a.plan}})}),m.on("plan_approval_decision",()=>{u&&t({type:"SET_PENDING_PLAN_APPROVAL",approval:null})}),m.on("config_changed",()=>{u&&t({type:"CONFIG_CHANGED"})}),m.on("execution_task_start",r=>{if(!u)return;let a=r,d=c.current;d&&(async()=>{try{let C=await h(`/tasks/${a.taskId}`);u&&C.sourceSessionId===d&&t({type:"SET_ACTIVE_TASK",taskId:a.taskId})}catch{}})()}),m.on("stats_update",r=>{if(!u)return;let a=r;t({type:"UPDATE_STATS",activeTasks:a.activeTasks,queuedTasks:a.queuedTasks,costToday:a.totalCostToday})}),m.connect().then(async()=>{if(u){l(),t({type:"SET_CONNECTED",connected:!0}),t({type:"SET_SERVER_UNREACHABLE",unreachable:!1});try{let r=await h("/version");t({type:"SET_VERSION",version:r.version})}catch{t({type:"SET_VERSION",version:null})}}}).catch(()=>{u&&(t({type:"SET_CONNECTED",connected:!1}),i())})}catch{u&&(t({type:"SET_CONNECTED",connected:!1}),i())}})(),()=>{u=!1,l(),m?.close()}},[t])}import{useEffect as Ir,useRef as kr,useState as Eo,useCallback as Pr}from"react";function Io(e){let[t,o]=Eo([]),[c,u]=Eo(!1),m=kr(null),l=Pr(()=>{o([]),u(!1)},[]);return Ir(()=>{if(!e)return;let i=!0;o([]),u(!0);try{let s=new bo(e);return m.current=s,s.on("reasoning",r=>{if(!i)return;let d=r.content??"";o(C=>{let f=C[C.length-1];if(f?.type==="reasoning"){let y=[...C];return y[y.length-1]={...f,content:f.content+d},y}return[...C,{type:"reasoning",content:d,timestamp:Date.now()}]})}),s.on("tool_call",r=>{if(!i)return;let a=r;o(d=>[...d,{type:"tool_call",content:a.toolName??"unknown tool",timestamp:Date.now(),metadata:{toolName:a.toolName}}])}),s.on("tool_result",r=>{if(!i)return;let a=r;o(d=>[...d,{type:"tool_result",content:a.content??"",timestamp:Date.now()}])}),s.on("error",r=>{if(!i)return;let a=r;o(d=>[...d,{type:"error",content:a.error??"unknown error",timestamp:Date.now()}])}),s.on("complete",r=>{if(!i)return;let a=r;o(d=>[...d,{type:"complete",content:a.result??"",timestamp:Date.now(),metadata:{cost:a.costUsd,turns:a.numTurns,duration:a.totalDurationMs}}]),u(!1)}),s.connect().catch(()=>{i&&(o(r=>[...r,{type:"error",content:"Failed to connect to task stream",timestamp:Date.now()}]),u(!1))}),()=>{i=!1,s.close()}}catch{u(!1)}},[e]),{events:t,isStreaming:c,clearEvents:l}}import{useState as Zt,useEffect as Ar,useCallback as vt}from"react";function eo(e){return{id:e.id,status:e.status,messageCount:e.messageCount,createdAt:e.createdAt,lastActiveAt:e.lastActiveAt,title:e.title}}function ko(){let[e,t]=Zt(null),[o,c]=Zt(!0),[u,m]=Zt(null),l=vt(async()=>{try{let C=(await h("/chat/sessions?status=active")).sessions.find(f=>f.source.type==="tui");return C?eo(C):null}catch{return null}},[]),i=vt(async()=>{try{let d=await h("/chat/sessions",{method:"POST",body:{source:{type:"tui"}}}),C=eo(d.session);return t(C),C}catch{return m("Failed to create session"),null}},[]),s=vt(async d=>{try{let C=await h("/chat/messages",{method:"POST",body:{content:d,source:{type:"tui"}}});return t(f=>f&&{...f,messageCount:f.messageCount+1,lastActiveAt:Date.now()}),C}catch{return null}},[]),r=vt(async()=>{if(!e)return!1;try{return await h(`/chat/sessions/${e.id}/archive`,{method:"POST"}),t(null),!0}catch{return!1}},[e]),a=vt(async()=>{if(e)try{let d=await h(`/chat/sessions/${e.id}`);t(eo(d.session))}catch{t(null)}},[e]);return Ar(()=>{let d=!1;async function C(){c(!0);let f=await l();d||(f?t(f):await i(),d||c(!1))}return C(),()=>{d=!0}},[]),{session:e,loading:o,error:u,sendMessage:s,createNewSession:i,archiveCurrentSession:r,refreshSession:a,setSession:t}}import{useEffect as Po,useRef as Dr,useState as Rr}from"react";function Ao(e){let[t,o]=Rr(null),c=Dr(new Set);return Po(()=>{if(!e)return;let u=!0,m=null;try{m=new $t("/chat/stream"),m.on("chat_message",l=>{if(!u)return;let s=l.message;s&&s.sessionId===e&&s.role==="assistant"&&(c.current.has(s.id)||(c.current.add(s.id),o(s)))}),m.connect().catch(()=>{})}catch{}return()=>{u=!1,m?.close()}},[e]),Po(()=>{c.current.clear(),o(null)},[e]),{latestMessage:t}}import{Box as oo,Text as Be}from"ink";import we from"chalk";var to={connected:we.green,disconnected:we.red,warning:we.yellow,reasoning:we.gray,toolCall:we.blue,toolResult:we.green,error:we.red,dim:we.dim,bold:we.bold,statusUp:we.green("\u25CF"),statusDown:we.red("\u25CF")};import{Fragment as Mr,jsx as ot,jsxs as Ye}from"react/jsx-runtime";function Do(){let{state:e}=ze(),t=e.connected?`${to.statusUp} Server: up`:`${to.statusDown} Disconnected`,o=e.activeTasks>0?`${e.activeTasks} running, ${e.queuedTasks} queued`:"No active tasks",c=e.session,m=(c?Math.floor((Date.now()-c.lastActiveAt)/6e4):1/0)>=25;return Ye(oo,{flexDirection:"column",borderStyle:"round",borderDimColor:!0,children:[Ye(oo,{children:[ot(Be,{bold:!0,children:e.version?`Adam v${e.version}`:"Adam"}),ot(Be,{children:" \u2502 "}),ot(Be,{children:t}),ot(Be,{children:" \u2502 "}),Ye(Be,{children:["Tasks: ",e.activeTasks," active"]}),e.view==="chat"&&c&&Ye(Mr,{children:[ot(Be,{children:" \u2502 "}),Ye(Be,{children:["Session: ",c.messageCount===0?"(new)":`${c.id.slice(0,8)} (${c.messageCount} turns)`]}),m&&ot(Be,{color:"yellow",children:" timeout soon"})]})]}),Ye(oo,{children:[Ye(Be,{children:["Tasks: ",o]}),ot(Be,{children:" \u2502 "}),Ye(Be,{children:["Cost: $",e.costToday.toFixed(2)," today"]})]})]})}import{Box as Ot,Text as Vt,useInput as Lr}from"ink";import{useState as no,useMemo as _r}from"react";import $r from"ink-text-input";var Nr=[{name:"work",description:"Tasks, Automations & Goals"},{name:"config",description:"Configuration"},{name:"evolution",description:"Evolution audit"},{name:"webhooks",description:"Webhook triggers"},{name:"memories",description:"Memory browser"},{name:"strategies",description:"Strategy lab"},{name:"plugins",description:"Plugin management"},{name:"roles",description:"Role management"},{name:"settings",description:"Runtime settings"},{name:"back",description:"Return to chat"},{name:"quit",description:"Exit TUI"}];function ro(e){let t=e.toLowerCase();return Nr.filter(o=>o.name.startsWith(t))}function Ro(e){let t=ro(e.toLowerCase());return t.length===1?t[0]:void 0}import{jsx as qt,jsxs as wt}from"react/jsx-runtime";function Mo({onSubmit:e}){let[t,o]=no(""),[c,u]=no(0),[m,l]=no(!1),i=t.startsWith("/")&&t.length>=1,s=t.slice(1),r=_r(()=>i?ro(s):[],[i,s]),a=f=>{o(f),f.startsWith("/")?(l(!0),u(0)):l(!1)},d=()=>{let f=t.trim();if(f){if(f.startsWith("/")){let y=f.slice(1),n=Ro(y);e(n?`/${n.name}`:f)}else e(f);o(""),l(!1)}},C=f=>{e(`/${f.name}`),o(""),l(!1)};return Lr((f,y)=>{if(!(!m||!i||r.length===0)){if(y.upArrow){u(n=>n<=0?r.length-1:n-1);return}if(y.downArrow){u(n=>n>=r.length-1?0:n+1);return}if(y.tab){let n=r[c];n&&C(n);return}if(y.escape){l(!1),o("");return}}},{isActive:m&&i&&r.length>0}),wt(Ot,{flexDirection:"column",children:[m&&i&&r.length>0&&qt(Ot,{flexDirection:"column",marginBottom:0,paddingX:1,children:r.map((f,y)=>{let n=y===c;return wt(Ot,{children:[qt(Vt,{color:n?"cyan":"gray",bold:n,children:n?"\u25B8 ":" "}),wt(Vt,{color:n?"cyan":"white",bold:n,children:["/",f.name]}),wt(Vt,{dimColor:!0,children:[" \u2014 ",f.description]})]},f.name)})}),wt(Ot,{borderStyle:"round",borderDimColor:!0,children:[qt(Vt,{bold:!0,children:"\u25B8 "}),qt($r,{value:t,onChange:a,onSubmit:d,placeholder:"Type a message or / for commands..."})]})]})}import{Box as lt,Text as ge}from"ink";import{useState as Or}from"react";import{jsx as be,jsxs as Me}from"react/jsx-runtime";function Vr({content:e}){let[t,o]=Or(!1),c=e.split(`
|
|
2
|
-
`);return c.length<=5?be(ge,{color:"green",children:e}):t?be(ge,{color:"green",children:e}):Me(ge,{color:"green",children:[c.slice(0,3).join(`
|
|
3
|
-
`),`
|
|
4
|
-
`,Me(ge,{dimColor:!0,children:["(",c.length," lines) \u25B8 \u5C55\u5F00"]})]})}function qr({event:e}){switch(e.type){case"reasoning":return be(lt,{children:be(ge,{color:"gray",children:e.content})});case"tool_call":return be(lt,{children:Me(ge,{color:"blue",children:["[tool] ",e.metadata?.toolName??e.content]})});case"tool_result":return Me(lt,{flexDirection:"column",children:[be(ge,{color:"blue",dimColor:!0,children:"[result]"}),be(Vr,{content:e.content})]});case"error":return be(lt,{children:Me(ge,{color:"red",children:["[error] ",e.content]})});case"complete":return Me(lt,{flexDirection:"column",marginTop:1,children:[e.content&&be(ge,{children:e.content}),be(ge,{dimColor:!0,children:"\u2500\u2500\u2500 Task complete \u2500\u2500\u2500"}),e.metadata?.cost!==void 0&&Me(ge,{dimColor:!0,children:["Cost: $",e.metadata.cost.toFixed(4)]}),e.metadata?.turns!==void 0&&Me(ge,{dimColor:!0,children:["Turns: ",e.metadata.turns]}),e.metadata?.duration!==void 0&&Me(ge,{dimColor:!0,children:["Duration: ",(e.metadata.duration/1e3).toFixed(1),"s"]})]});default:return null}}function No({events:e,isStreaming:t}){return e.length===0&&!t?null:Me(lt,{flexDirection:"column",children:[t&&e.length===0&&be(ge,{dimColor:!0,children:"Waiting for response..."}),e.map((o,c)=>be(qr,{event:o},c))]})}import{Box as Lo,Text as _o}from"ink";import{jsx as so,jsxs as Fr}from"react/jsx-runtime";function $o({messages:e}){return e.length===0?null:so(Lo,{flexDirection:"column",children:e.map((t,o)=>Fr(Lo,{flexDirection:"column",marginBottom:1,children:[so(_o,{dimColor:!0,bold:!0,children:t.role==="user"?"You:":"Adam:"}),so(_o,{children:t.content})]},o))})}import{Box as Bt,Text as Ne,useInput as Ur}from"ink";import{jsx as Le,jsxs as Et}from"react/jsx-runtime";function Oo({approval:e,onResolved:t}){return Ur(o=>{o==="a"?h(`/tasks/${e.taskId}/approve`,{method:"POST",body:{approvalId:e.approvalId}}).then(()=>t()).catch(()=>t()):o==="r"&&h(`/tasks/${e.taskId}/reject`,{method:"POST",body:{approvalId:e.approvalId,reason:"rejected by user"}}).then(()=>t()).catch(()=>t())}),Et(Bt,{flexDirection:"column",borderStyle:"round",borderColor:"yellow",paddingX:1,children:[Le(Ne,{bold:!0,color:"yellow",children:"\u26A0 APPROVAL REQUIRED"}),Et(Bt,{marginTop:1,children:[Le(Ne,{children:"Tool: "}),Le(Ne,{bold:!0,children:e.toolName})]}),Et(Bt,{children:[Le(Ne,{children:"Input: "}),Le(Ne,{children:JSON.stringify(e.toolInput)})]}),Et(Bt,{children:[Le(Ne,{children:"Pattern: "}),Le(Ne,{dimColor:!0,children:e.matchedPattern})]}),Et(Bt,{marginTop:1,children:[Le(Ne,{color:"green",children:"[a] Approve"}),Le(Ne,{children:" "}),Le(Ne,{color:"red",children:"[r] Reject"})]})]})}import{Box as It,Text as ce,useInput as Wr}from"ink";import{useState as Gr,useEffect as Hr}from"react";import{jsx as qe,jsxs as Ee}from"react/jsx-runtime";var jr=300;function Vo({approval:e,onResolved:t,onTimeout:o}){let[c,u]=Gr(jr);Hr(()=>{let l=setInterval(()=>{u(i=>i<=1?(clearInterval(l),o(),0):i-1)},1e3);return()=>clearInterval(l)},[o]),Wr(l=>{l==="a"?h(`/tasks/${e.taskId}/approve-plan`,{method:"POST",body:{planId:e.planId,decision:"allow",approvalType:"once"}}).then(()=>t()).catch(()=>t()):l==="r"?h(`/tasks/${e.taskId}/approve-plan`,{method:"POST",body:{planId:e.planId,decision:"deny",reason:"rejected by user"}}).then(()=>t()).catch(()=>t()):l==="p"&&h(`/tasks/${e.taskId}/approve-plan`,{method:"POST",body:{planId:e.planId,decision:"allow",approvalType:"permanent"}}).then(()=>t()).catch(()=>t())});let m=e.plan.overallRisk==="high"?"red":e.plan.overallRisk==="medium"?"yellow":"green";return Ee(It,{flexDirection:"column",borderStyle:"round",borderColor:"cyan",paddingX:1,children:[qe(ce,{bold:!0,color:"cyan",children:"EXECUTION PLAN \u2014 APPROVAL REQUIRED"}),Ee(ce,{dimColor:!0,children:["Plan ID: ",e.planId]}),Ee(ce,{dimColor:!0,children:["Time remaining: ",c,"s"]}),Ee(It,{marginTop:1,children:[qe(ce,{children:"Overall Risk: "}),qe(ce,{bold:!0,color:m,children:e.plan.overallRisk.toUpperCase()})]}),Ee(ce,{bold:!0,children:["Steps (",e.plan.steps.length,"):"]}),e.plan.steps.map(l=>{let i=l.riskLevel==="high"?"red":l.riskLevel==="medium"?"yellow":"green";return Ee(It,{paddingLeft:2,children:[Ee(ce,{children:["[",l.index,"] "]}),qe(ce,{children:l.description}),Ee(ce,{dimColor:!0,children:[" (",l.toolsNeeded.join(", "),")"]}),Ee(ce,{color:i,children:[" [",l.riskLevel,"]"]})]},l.index)}),Ee(It,{marginTop:1,children:[qe(ce,{dimColor:!0,children:"Permissions: "}),qe(ce,{children:Object.keys(e.plan.requiredPermissions).join(", ")||"none"})]}),Ee(It,{marginTop:1,children:[qe(ce,{color:"green",children:"[a] Allow once "}),qe(ce,{color:"green",children:"[p] Allow permanent "}),qe(ce,{color:"red",children:"[r] Deny"})]})]})}import{Box as rt,Text as Z,useInput as Xr}from"ink";import{useEffect as zr,useState as Fe,useCallback as Fo}from"react";import{Box as z,Text as N,useInput as Kr}from"ink";import{useState as io,useEffect as Qr}from"react";import{jsx as q,jsxs as W}from"react/jsx-runtime";function qo({taskId:e,onBack:t}){let[o,c]=io(null),[u,m]=io([]),[l,i]=io(null);if(Qr(()=>{h(`/tasks/${e}`).then(r=>c(r)).catch(r=>i(r instanceof Error?r.message:String(r))),h(`/tasks/${e}/plan`).then(r=>m(r.plans)).catch(()=>m([]))},[e]),Kr((r,a)=>{(r==="b"||a.escape)&&t()}),l)return W(z,{flexDirection:"column",children:[W(N,{color:"red",children:["Error: ",l]}),q(N,{dimColor:!0,children:"[b] Back"})]});if(!o)return W(N,{dimColor:!0,children:["Loading task ",e,"..."]});let s=u[0];return W(z,{flexDirection:"column",children:[q(N,{bold:!0,color:"cyan",children:"Task Detail"}),W(z,{marginTop:1,flexDirection:"column",children:[W(z,{children:[q(N,{children:"ID: "}),q(N,{dimColor:!0,children:String(o.id)})]}),W(z,{children:[q(N,{children:"Status: "}),q(N,{bold:!0,children:String(o.status)})]}),W(z,{children:[q(N,{children:"Prompt: "}),q(N,{children:String(o.prompt)})]}),o.result?W(z,{children:[q(N,{children:"Result: "}),q(N,{children:String(o.result).slice(0,200)})]}):null,o.error?W(z,{children:[q(N,{color:"red",children:"Error: "}),q(N,{children:String(o.error)})]}):null,o.deliverTo?.length?W(z,{children:[q(N,{children:"DeliverTo: "}),q(N,{dimColor:!0,children:o.deliverTo.map(r=>r.type==="channel"?`channel ${r.channelId?.slice(0,8)}`:`session ${r.sessionId?.slice(0,8)}`).join(", ")})]}):null,o.reportTo?.length?W(z,{children:[q(N,{children:"ReportTo: "}),q(N,{dimColor:!0,children:o.reportTo.map(r=>r.type==="channel"?`channel ${r.channelId?.slice(0,8)}`:`session ${r.sessionId?.slice(0,8)}`).join(", ")})]}):null]}),s&&W(z,{marginTop:1,flexDirection:"column",children:[q(N,{bold:!0,color:"cyan",children:"Execution Plan"}),W(z,{children:[q(N,{children:"Plan ID: "}),q(N,{dimColor:!0,children:s.id})]}),W(z,{children:[q(N,{children:"Status: "}),q(N,{children:s.status})]}),s.plan.overallRisk&&W(z,{children:[q(N,{children:"Overall Risk: "}),q(N,{bold:!0,color:s.plan.overallRisk==="high"?"red":s.plan.overallRisk==="medium"?"yellow":"green",children:s.plan.overallRisk.toUpperCase()})]}),W(N,{bold:!0,children:["Steps (",s.plan.steps.length,"):"]}),s.plan.steps.map(r=>{let a=r.riskLevel==="high"?"red":r.riskLevel==="medium"?"yellow":"green";return W(z,{paddingLeft:2,children:[W(N,{children:["[",r.index,"] ",r.description]}),W(N,{color:a,children:[" [",r.riskLevel,"]"]})]},r.index)}),s.deviationReport&&W(z,{marginTop:1,flexDirection:"column",children:[q(N,{bold:!0,color:"yellow",children:"Deviation Report"}),W(N,{children:["Planned: ",s.deviationReport.stepsPlanned," | Executed: ",s.deviationReport.stepsExecuted," | Accuracy: ",(s.deviationReport.overallAccuracy*100).toFixed(0),"%"]}),s.deviationReport.deviations.map((r,a)=>W(z,{paddingLeft:2,children:[W(N,{color:"yellow",children:["[",r.deviationType,"] "]}),W(N,{children:["Step ",r.stepIndex,": ",r.actual]})]},a))]}),s.learnedRules&&s.learnedRules.length>0&&W(z,{marginTop:1,flexDirection:"column",children:[q(N,{bold:!0,color:"blue",children:"Learned Rules"}),s.learnedRules.map((r,a)=>q(z,{paddingLeft:2,children:W(N,{children:["* ",r]})},a))]})]}),!s&&u.length===0&&q(z,{marginTop:1,children:q(N,{dimColor:!0,children:"No execution plan for this task."})}),q(z,{marginTop:1,children:q(N,{dimColor:!0,children:"[b] Back"})})]})}import{Fragment as Zr,jsx as de,jsxs as xe}from"react/jsx-runtime";var Yr={pending:"gray",queued:"gray",running:"yellow",paused:"yellow",completed:"green",failed:"red",cancelled:"gray"},Ft=["all","pending","queued","running","completed","failed","cancelled"],ao=15;function Ut({onBack:e}){let[t,o]=Fe([]),[c,u]=Fe(!0),[m,l]=Fe("list"),[i,s]=Fe(0),[r,a]=Fe("all"),[d,C]=Fe(0),[f,y]=Fe(0),[n,g]=Fe(null),[_,A]=Fe([]),K=Fo(async()=>{u(!0);try{let I=new URLSearchParams({limit:"100"});r!=="all"&&I.set("status",r);let w=await h(`/tasks?${I}`);o(w.tasks)}catch{o([])}finally{u(!1)}},[r]);zr(()=>{K()},[K]);let G=Math.max(1,Math.ceil(t.length/ao)),P=t.slice(f*ao,(f+1)*ao),oe=Fo(async()=>{let I=P[i];if(I)try{await h(`/tasks/${I.id}/cancel`,{method:"POST"}),g(`Cancelled: ${I.id.slice(0,8)}`),l("list"),K()}catch(w){g(`Failed: ${w instanceof Error?w.message:String(w)}`),l("list")}},[P,i,K]);return Xr((I,w)=>{if(m==="detail"){(w.escape||w.return||I==="q")&&l("list");return}if(m==="cancelling"){I==="y"?oe():l("list");return}if(m==="filter"){if(w.escape){l("list");return}w.upArrow&&d>0&&C(p=>p-1),w.downArrow&&d<Ft.length-1&&C(p=>p+1),w.return&&(a(Ft[d]),y(0),s(0),l("list"));return}if(w.escape||I==="q"){e();return}if(w.upArrow&&i>0&&s(p=>p-1),w.downArrow&&i<P.length-1&&s(p=>p+1),w.return){let p=P[i];p&&(A([]),l("detail"),h(`/tasks/${p.id}/logs?limit=20`).then(({logs:D})=>A(D)).catch(()=>A([])))}if(I==="x"&&P[i]){let p=P[i];["running","pending","queued","paused"].includes(p.status)?(l("cancelling"),g(null)):g(`Cannot cancel task in status: ${p.status}`)}I==="f"&&(C(Ft.indexOf(r)),l("filter")),I==="r"&&K(),(w.pageDown||I==="n")&&f<G-1&&(y(p=>p+1),s(0)),(w.pageUp||I==="p")&&f>0&&(y(p=>p-1),s(0))}),c?de(Z,{dimColor:!0,children:"Loading tasks..."}):m==="filter"?xe(rt,{flexDirection:"column",children:[de(Z,{bold:!0,children:"Filter by status:"}),Ft.map((I,w)=>de(rt,{children:xe(Z,{color:w===d?"cyan":"white",children:[w===d?"> ":" ",I,I===r?" (current)":""]})},I)),de(Z,{dimColor:!0,children:"Enter: select Esc: cancel"})]}):m==="detail"&&P[i]?de(qo,{taskId:P[i].id,onBack:()=>l("list")}):m==="cancelling"&&P[i]?xe(rt,{flexDirection:"column",children:[xe(Z,{color:"red",children:['Cancel task "',P[i].id.slice(0,8),'"? (y/n)']}),n&&de(Z,{color:"red",children:n})]}):xe(rt,{flexDirection:"column",children:[xe(rt,{children:[xe(Z,{bold:!0,children:["Tasks (",t.length,")"]}),r!=="all"&&xe(Z,{dimColor:!0,children:[" [filter: ",r,"]"]}),xe(Z,{dimColor:!0,children:[" \u2014 Page ",f+1,"/",G]})]}),n&&de(Z,{color:n.startsWith("Failed")||n.startsWith("Cannot")?"red":"green",children:n}),t.length===0?xe(Z,{dimColor:!0,children:["No tasks found",r!=="all"?` with status "${r}"`:"","."]}):xe(Zr,{children:[de(rt,{marginTop:1,children:xe(Z,{bold:!0,children:[" ",Je("ID",10),Je("STATUS",12),Je("PROMPT",40),Je("DURATION",10),"COST"]})}),P.map((I,w)=>{let p=w===i,D=I.totalDurationMs?`${(I.totalDurationMs/1e3).toFixed(0)}s`:"\u2014",$=I.costUsd!==void 0?`$${I.costUsd.toFixed(4)}`:"\u2014",Ve=Yr[I.status]??"white";return xe(rt,{children:[de(Z,{color:p?"cyan":"white",children:p?"> ":" "}),de(Z,{dimColor:!0,children:Je(I.id.slice(0,8),10)}),de(Z,{color:Ve,children:Je(I.status,12)}),de(Z,{children:Je(Jr(I.prompt,38),40)}),de(Z,{dimColor:!0,children:Je(D,10)}),de(Z,{dimColor:!0,children:$})]},I.id)})]}),de(Z,{dimColor:!0,children:"Enter:detail x:cancel f:filter n/p:page r:refresh Esc/q:back"})]})}function Je(e,t){return e?e.length>=t?e:e+" ".repeat(t-e.length):" ".repeat(t)}function Jr(e,t){return e.length<=t?e:e.slice(0,t-3)+"..."}yo();import{Box as kt,Text as Ie,useInput as en}from"ink";import{useEffect as tn,useState as Uo}from"react";import{readFileSync as on,existsSync as rn}from"fs";import{parse as nn}from"yaml";import{Fragment as sn,jsx as ke,jsxs as Ze}from"react/jsx-runtime";function Go({onBack:e}){let[t,o]=Uo(null),[c,u]=Uo(null);return en((m,l)=>{(l.escape||m==="q")&&e()}),tn(()=>{try{let m=ho;if(!rn(m)){u(`Config file not found: ${m}`);return}let l=on(m,"utf-8");o(nn(l))}catch(m){u(m.message)}},[]),c?Ze(kt,{flexDirection:"column",children:[ke(Ie,{color:"red",children:c}),ke(Ie,{dimColor:!0,children:"Press Esc to go back"})]}):t?Ze(kt,{flexDirection:"column",children:[ke(Ie,{bold:!0,children:"Configuration (Esc to go back)"}),ke(kt,{marginTop:1,flexDirection:"column",children:ke(Ho,{obj:t,indent:0})})]}):ke(Ie,{dimColor:!0,children:"Loading config..."})}function Ho({obj:e,indent:t}){let o=" ".repeat(t);return ke(sn,{children:Object.entries(e).map(([c,u])=>u&&typeof u=="object"&&!Array.isArray(u)?Ze(kt,{flexDirection:"column",children:[Ze(Ie,{children:[o,ke(Ie,{color:"cyan",children:c}),":"]}),ke(Ho,{obj:u,indent:t+1})]},c):Array.isArray(u)?Ze(kt,{flexDirection:"column",children:[Ze(Ie,{children:[o,ke(Ie,{color:"cyan",children:c}),":"]}),u.map((m,l)=>Ze(Ie,{children:[o," - ",Wo(c,String(m))]},l))]},c):Ze(Ie,{children:[o,ke(Ie,{color:"cyan",children:c}),": ",Wo(c,String(u))]},c))})}function Wo(e,t){return e.toLowerCase().includes("key")||e.toLowerCase().includes("token")?!t||t.length<8?"****":t.slice(0,4)+"****":t}import{Box as Wt,Text as Pe,useInput as an}from"ink";import{useEffect as ln,useState as lo}from"react";import{jsx as Pt,jsxs as _e}from"react/jsx-runtime";function jo({onBack:e}){let[t,o]=lo([]),[c,u]=lo(!0),[m,l]=lo(null);return an((i,s)=>{(s.escape||i==="q")&&e()}),ln(()=>{h("/evolution-audit?limit=20").then(i=>{o(i),u(!1)}).catch(i=>{l(i.message),u(!1)})},[]),c?Pt(Pe,{dimColor:!0,children:"Loading evolution log..."}):m?_e(Wt,{flexDirection:"column",children:[Pt(Pe,{color:"red",children:m}),Pt(Pe,{dimColor:!0,children:"Press Esc to go back"})]}):t.length===0?_e(Wt,{flexDirection:"column",children:[Pt(Pe,{dimColor:!0,children:"No evolution records yet"}),Pt(Pe,{dimColor:!0,children:"Press Esc to go back"})]}):_e(Wt,{flexDirection:"column",children:[_e(Pe,{bold:!0,children:["Evolution Audit Log (",t.length," records) \u2014 Esc to go back"]}),t.map(i=>_e(Wt,{flexDirection:"column",marginTop:1,children:[_e(Pe,{bold:!0,children:["[",new Date(i.timestamp).toLocaleString(),"]"]}),i.triggerTaskId&&_e(Pe,{dimColor:!0,children:[" Task: ",i.triggerTaskId.slice(0,8)]}),i.diff.split(`
|
|
5
|
-
`).map((s,r)=>s.startsWith("+")?_e(Pe,{color:"green",children:[" ",s]},r):s.startsWith("-")?_e(Pe,{color:"red",children:[" ",s]},r):_e(Pe,{dimColor:!0,children:[" ",s]},r))]},i.id))]})}import{Box as Ue,Text as Y,useInput as cn}from"ink";import dn from"ink-text-input";import{useEffect as un,useState as ct}from"react";import{jsx as fe,jsxs as re}from"react/jsx-runtime";var mn={pending:"gray",planning:"cyan",executing:"yellow",evaluating:"blue",replanning:"magenta",completed:"green",failed:"red",paused:"gray"};function gn(e,t=20){let o=Math.round(e*t),c=t-o;return"\u2588".repeat(o)+"\u2591".repeat(c)}function fn(e){let t=Math.max(0,Math.floor((e-Date.now())/864e5));return t===0?"< 1d":`${t}d`}function Gt({onBack:e}){let[t,o]=ct([]),[c,u]=ct(null),[m,l]=ct("list"),[i,s]=ct(""),[r,a]=ct(!1),[d,C]=ct(null);cn((n,g)=>{if(m==="create"){g.escape&&(l("list"),s(""),C(null));return}(g.escape||n==="q")&&e(),n==="c"&&(l("create"),C(null)),n==="r"&&f()});let f=()=>{h("/goals?limit=20").then(({goals:n})=>o(n)).catch(n=>u(n.message))};un(()=>{f()},[]);let y=async n=>{if(n.trim()){a(!0),C(null);try{let g=await h("/goals",{method:"POST",body:{input:n.trim()}});C(`Goal created: ${g.goal.name}`),s(""),l("list"),f()}catch(g){C(`Failed: ${g instanceof Error?g.message:String(g)}`)}finally{a(!1)}}};return c?re(Ue,{flexDirection:"column",children:[re(Y,{color:"red",children:["Failed to load goals: ",c]}),fe(Y,{dimColor:!0,children:"Press Esc or q to return"})]}):m==="create"?re(Ue,{flexDirection:"column",children:[fe(Y,{bold:!0,children:"Create Goal"}),fe(Y,{dimColor:!0,children:"Describe your SMART goal in natural language:"}),re(Ue,{marginTop:1,children:[fe(Y,{color:"cyan",children:"> "}),fe(dn,{value:i,onChange:s,onSubmit:y})]}),r&&fe(Y,{color:"yellow",children:"Creating goal..."}),d&&fe(Y,{color:d.startsWith("Failed")?"red":"green",children:d}),fe(Y,{dimColor:!0,children:"Press Esc to cancel"})]}):re(Ue,{flexDirection:"column",children:[re(Y,{bold:!0,children:["Goal Dashboard (",t.length,")"]}),t.length===0?fe(Y,{dimColor:!0,children:"No goals found. Press c to create one."}):fe(Ue,{marginTop:1,flexDirection:"column",children:t.map(n=>{let g=n.targetValue>0?n.currentValue/n.targetValue:0,_=mn[n.status]??"white";return re(Ue,{marginBottom:1,flexDirection:"column",children:[re(Ue,{children:[fe(Y,{bold:!0,color:_,children:n.name}),re(Y,{dimColor:!0,children:[" (",n.role,")"]}),fe(Y,{dimColor:!0,children:" \u2014 "}),fe(Y,{color:_,children:n.status})]}),re(Ue,{children:[re(Y,{dimColor:!0,children:[" ",gn(g)," "]}),re(Y,{color:g>=1?"green":"white",children:[Math.round(g*100),"%"]}),re(Y,{dimColor:!0,children:[" (",n.currentValue,"/",n.targetValue," ",n.metricType,")"]})]}),re(Ue,{children:[re(Y,{dimColor:!0,children:[" \u23F0 ",fn(n.deadline)," left"]}),re(Y,{dimColor:!0,children:[" | \u{1F4B0} $",n.budgetUsd]}),re(Y,{dimColor:!0,children:[" | ID: ",n.id.slice(0,8)]})]})]},n.id)})}),fe(Y,{dimColor:!0,children:"c:create r:refresh Esc/q:back"})]})}import{Box as dt,Text as Se,useInput as pn}from"ink";import{useEffect as xn,useState as Ko}from"react";import{jsx as Ge,jsxs as We}from"react/jsx-runtime";function Tn(e,t,o=15){let c=e/(e+t),u=Math.round(c*o);return"\u2593".repeat(u)+"\u2591".repeat(o-u)}function Qo({onBack:e}){let[t,o]=Ko([]),[c,u]=Ko(null);if(pn((l,i)=>{(i.escape||l==="q")&&e()}),xn(()=>{h("/strategies?limit=50").then(l=>o(l.strategies??[])).catch(l=>u(l.message))},[]),c)return We(dt,{flexDirection:"column",children:[We(Se,{color:"red",children:["Failed to load strategies: ",c]}),Ge(Se,{dimColor:!0,children:"Press Esc or q to return"})]});if(t.length===0)return We(dt,{flexDirection:"column",children:[Ge(Se,{dimColor:!0,children:"No strategies yet. Strategies are created when goals are executed."}),Ge(Se,{dimColor:!0,children:"Press Esc or q to return"})]});let m=new Map;for(let l of t){let i=`${l.role}/${l.taskType}`,s=m.get(i)??[];s.push(l),m.set(i,s)}return We(dt,{flexDirection:"column",children:[Ge(Se,{bold:!0,children:"Strategy Lab"}),Ge(Se,{dimColor:!0,children:"Thompson Sampling populations \u2014 higher bar = higher selection probability"}),Ge(dt,{marginTop:1,flexDirection:"column",children:Array.from(m.entries()).map(([l,i])=>We(dt,{marginBottom:1,flexDirection:"column",children:[Ge(Se,{bold:!0,color:"cyan",children:l}),i.sort((s,r)=>{let a=s.alpha/(s.alpha+s.beta);return r.alpha/(r.alpha+r.beta)-a}).map(s=>{let r=s.alpha/(s.alpha+s.beta);return We(dt,{children:[Ge(Se,{dimColor:!0,children:" "}),We(Se,{children:[Tn(s.alpha,s.beta)," "]}),We(Se,{color:r>.6?"green":r>.4?"yellow":"red",children:[(r*100).toFixed(0),"%"]}),We(Se,{dimColor:!0,children:[" ",s.name," (\u03B1=",s.alpha.toFixed(1)," \u03B2=",s.beta.toFixed(1)," trials=",s.totalTrials,")"]})]},s.id)})]},l))}),Ge(Se,{dimColor:!0,children:"Press Esc or q to return"})]})}import{Box as Te,Text as Q,useInput as Cn}from"ink";import co from"ink-text-input";import{useEffect as vn,useState as He,useCallback as ut}from"react";import{CronExpressionParser as wn}from"cron-parser";import{useState as hn,useEffect as yn,useCallback as Xo,useRef as bn}from"react";var Sn=3e3;function et(){let[e,t]=hn(null),o=bn(null),c=Xo(()=>{o.current&&(clearTimeout(o.current),o.current=null),t(null)},[]),u=Xo((m,l)=>{o.current&&(clearTimeout(o.current),o.current=null),t({text:m,type:l}),l==="success"&&(o.current=setTimeout(()=>{t(null),o.current=null},Sn))},[]);return yn(()=>()=>{o.current&&clearTimeout(o.current)},[]),{message:e,setMessage:u,clearMessage:c}}import{jsx as X,jsxs as ae}from"react/jsx-runtime";var uo=["manual","cron","event"],Ht={name:"",triggerType:"manual",cron:"",stepPrompt:""};function Bn(e){try{return wn.parse(e).next().toDate().toLocaleString()}catch{return"invalid"}}function Kt({onBack:e}){let[t,o]=He([]),[c,u]=He(!0),[m,l]=He(0),[i,s]=He("list"),[r,a]=He({...Ht}),[d,C]=He("name"),[f,y]=He(null),{message:n,setMessage:g,clearMessage:_}=et(),[A,K]=He(!1),[G,P]=He(!1),oe=ut(()=>{u(!0),h("/task-templates").then(({templates:v})=>{o(v),u(!1)}).catch(()=>u(!1))},[]);vn(()=>{oe()},[oe]);let I=i==="create"||i==="edit",w=ut(async()=>{let v=t[m];if(!(!v||A)){K(!0),g(`Triggering ${v.name}...`,"loading");try{let B=await h(`/task-templates/${v.id}/run`,{method:"POST"});g(`Triggered: ${v.name} (${B.executionId})`,"success")}catch(B){g(`Trigger failed: ${B instanceof Error?B.message:String(B)}`,"error")}finally{K(!1)}}},[t,m,A,g]),p=ut(async()=>{let v=t[m];if(!v||G)return;if(v.trigger?.type!=="cron"&&v.trigger?.type!=="event"){g("Toggle not applicable for manual triggers","error");return}let B=!v.enabled;P(!0),g(`${v.name} \u2192 ${B?"enabling":"disabling"}...`,"loading");try{await h(`/task-templates/${v.id}`,{method:"PATCH",body:{enabled:B}}),o(O=>O.map(se=>se.id===v.id?{...se,enabled:B}:se)),g(`${v.name} ${B?"enabled":"disabled"}`,"success")}catch(O){g(`Toggle failed: ${O instanceof Error?O.message:String(O)}`,"error")}finally{P(!1)}},[t,m,G,g]),D=ut(async()=>{let v=t[m];if(v)try{await h(`/task-templates/${v.id}`,{method:"DELETE"}),g(`Deleted: ${v.name}`,"success"),oe(),l(B=>Math.max(0,Math.min(B,t.length-2)))}catch(B){g(`Delete failed: ${B instanceof Error?B.message:String(B)}`,"error")}},[t,m,oe]),$=ut(()=>{let v=t[m];v&&(y(v.id),a({name:v.name,triggerType:v.trigger?.type??"manual",cron:v.trigger?.cron??"",stepPrompt:v.steps?.[0]?.prompt??""}),C("name"),s("edit"))},[t,m]),Ve=ut(async()=>{let v={name:r.name,trigger:{type:r.triggerType,...r.triggerType==="cron"?{cron:r.cron}:{}},steps:[{id:"step-1",prompt:r.stepPrompt}],enabled:!0};try{i==="create"?(await h("/task-templates",{method:"POST",body:v}),g(`Created: ${r.name}`,"success")):i==="edit"&&f&&(await h(`/task-templates/${f}`,{method:"PATCH",body:v}),g(`Updated: ${r.name}`,"success"))}catch(B){g(`Save failed: ${B instanceof Error?B.message:String(B)}`,"error")}s("list"),a({...Ht}),y(null),oe()},[r,i,f,oe]);return Cn((v,B)=>{if(I){if(B.escape){s("list"),a({...Ht}),y(null);return}if(B.return){let O=["name","triggerType","cron","stepPrompt"],se=O.indexOf(d);if(se<O.length-1){let Xe=se+1;if(O[Xe]==="cron"&&r.triggerType!=="cron"&&Xe++,Xe<O.length){C(O[Xe]);return}}Ve();return}if(B.tab&&d==="triggerType"){a(O=>{let se=uo.indexOf(O.triggerType);return{...O,triggerType:uo[(se+1)%uo.length]}});return}return}if(B.escape||v==="q"){e();return}if(B.upArrow){l(O=>Math.max(0,O-1));return}if(B.downArrow){l(O=>Math.min(t.length-1,O+1));return}if(v==="t"){w();return}if(v==="d"){D();return}if(v==="e"){$();return}if(v==="c"){a({...Ht}),C("name"),s("create");return}if(v==="s"||v===" "){p();return}v==="r"&&(oe(),_())}),c?X(Q,{dimColor:!0,children:"Loading templates..."}):I?ae(Te,{flexDirection:"column",children:[ae(Q,{bold:!0,children:[i==="create"?"Create Template":"Edit Template"," (Esc to cancel)"]}),ae(Te,{marginTop:1,flexDirection:"column",children:[ae(Te,{children:[ae(Q,{bold:d==="name",color:d==="name"?"cyan":void 0,children:["Name:"," "]}),d==="name"?X(co,{value:r.name,onChange:v=>a(B=>({...B,name:v})),placeholder:"template name"}):X(Q,{children:r.name||"(empty)"})]}),ae(Te,{children:[ae(Q,{bold:d==="triggerType",color:d==="triggerType"?"cyan":void 0,children:["Trigger:"," "]}),X(Q,{children:r.triggerType}),d==="triggerType"&&X(Q,{dimColor:!0,children:" (Tab to cycle, Enter to continue)"})]}),r.triggerType==="cron"&&ae(Te,{children:[ae(Q,{bold:d==="cron",color:d==="cron"?"cyan":void 0,children:["Cron:"," "]}),d==="cron"?X(co,{value:r.cron,onChange:v=>a(B=>({...B,cron:v})),placeholder:"*/5 * * * *"}):X(Q,{children:r.cron||"(empty)"})]}),ae(Te,{children:[ae(Q,{bold:d==="stepPrompt",color:d==="stepPrompt"?"cyan":void 0,children:["Step Prompt:"," "]}),d==="stepPrompt"?X(co,{value:r.stepPrompt,onChange:v=>a(B=>({...B,stepPrompt:v})),placeholder:"What should this template do?"}):X(Q,{children:r.stepPrompt||"(empty)"})]})]}),X(Te,{marginTop:1,children:X(Q,{dimColor:!0,children:"Enter: next field / submit | Esc: cancel"})})]}):ae(Te,{flexDirection:"column",children:[ae(Q,{bold:!0,children:["Automations (",t.length,") (Esc to go back)"]}),n&&X(Te,{marginTop:1,children:ae(Q,{color:n.type==="success"?"green":n.type==="error"?"red":"gray",children:[n.type==="success"?"\u2713 ":n.type==="error"?"\u2717 ":"\u2192 ",n.text]})}),t.length===0?X(Te,{marginTop:1,children:X(Q,{dimColor:!0,children:"No templates found. Press c to create one."})}):X(Te,{marginTop:1,flexDirection:"column",children:t.map((v,B)=>{let O=B===m,se=v.trigger?.type==="cron"&&v.trigger?.cron?Bn(v.trigger.cron):"";return ae(Te,{children:[X(Q,{color:O?"cyan":void 0,bold:O,children:O?"> ":" "}),X(Q,{color:O?"cyan":void 0,bold:O,children:jt(v.name,24)}),X(Q,{dimColor:!0,children:jt(v.trigger?.type,10)}),v.trigger?.type!=="cron"&&v.trigger?.type!=="event"?X(Q,{dimColor:!0,children:jt("\u2014",6)}):X(Q,{color:v.enabled?"green":"gray",children:jt(v.enabled?"on":"off",6)}),se&&ae(Q,{dimColor:!0,children:["next: ",se]})]},v.id)})}),X(Te,{marginTop:1,children:X(Q,{dimColor:!0,children:"t:trigger s:toggle d:delete e:edit c:create r:refresh"})})]})}function jt(e,t){return e?e.length>=t?e:e+" ".repeat(t-e.length):" ".repeat(t)}import{Box as tt,Text as he,useInput as En}from"ink";import In from"ink-text-input";import{useEffect as kn,useState as mt,useCallback as zo}from"react";import{jsx as ue,jsxs as nt}from"react/jsx-runtime";function Yo({onBack:e}){let[t,o]=mt([]),[c,u]=mt(""),[m,l]=mt(!0),[i,s]=mt(!1),[r,a]=mt(""),[d,C]=mt(null),f=zo(()=>{l(!0),h("/webhooks").then(({webhooks:n,auth:g})=>{o(n),u(g),l(!1)}).catch(()=>l(!1))},[]);kn(()=>{f()},[f]);let y=zo(async n=>{if(n.trim())try{let g=await h(`/webhooks/${encodeURIComponent(n.trim())}`,{method:"POST"});C(`Triggered: ${g.executionId}`)}catch(g){C(`Trigger failed: ${g instanceof Error?g.message:String(g)}`)}},[]);return En((n,g)=>{if(i){if(g.escape){s(!1),a("");return}if(g.return){y(r),s(!1),a("");return}return}if(g.escape||n==="q"){e();return}if(n==="t"){s(!0),a(""),C(null);return}n==="r"&&(f(),C(null))}),m?ue(he,{dimColor:!0,children:"Loading webhooks..."}):nt(tt,{flexDirection:"column",children:[nt(he,{bold:!0,children:["Webhooks (",t.length,") (Esc to go back)"]}),nt(he,{dimColor:!0,children:["Auth: ",c]}),d&&ue(tt,{marginTop:1,children:ue(he,{color:"yellow",children:d})}),i&&nt(tt,{marginTop:1,children:[ue(he,{bold:!0,color:"cyan",children:"Trigger webhook: "}),ue(In,{value:r,onChange:a,placeholder:"webhook name or ID"}),ue(he,{dimColor:!0,children:" (Enter to trigger, Esc to cancel)"})]}),t.length===0?ue(tt,{marginTop:1,children:ue(he,{dimColor:!0,children:"No webhooks available. Create templates with triggers to expose webhooks."})}):nt(tt,{marginTop:1,flexDirection:"column",children:[ue(tt,{children:nt(he,{bold:!0,children:[gt("NAME",24),gt("DESCRIPTION",36),gt("TRIGGER",28),"TAGS"]})}),t.map(n=>nt(tt,{children:[ue(he,{children:gt(n.displayName,24)}),ue(he,{dimColor:!0,children:gt(Pn(n.description??"",34),36)}),ue(he,{dimColor:!0,children:gt(n.trigger,28)}),ue(he,{dimColor:!0,children:n.tags?.join(", ")??""})]},n.name))]}),ue(tt,{marginTop:1,children:ue(he,{dimColor:!0,children:"t:trigger r:refresh"})})]})}function gt(e,t){return e?e.length>=t?e:e+" ".repeat(t-e.length):" ".repeat(t)}function Pn(e,t){return e.length<=t?e:e.slice(0,t-3)+"..."}import{Box as $e,Text as ee,useInput as An}from"ink";import Dn from"ink-text-input";import{useEffect as Jo,useState as je,useCallback as mo}from"react";import{jsx as te,jsxs as Ae}from"react/jsx-runtime";function Rn(e){return e>=4?"red":e===3?"yellow":"gray"}function Mn(e){return e>=4?"HIGH":e===3?"MED ":"LOW "}function Nn(e){return new Date(e).toLocaleDateString()}function er({onBack:e}){let[t,o]=je([]),[c,u]=je(0),[m,l]=je([]),[i,s]=je(!0),[r,a]=je(!1),[d,C]=je(""),[f,y]=je("all"),[n,g]=je(null),[_,A]=je(!1),K=mo(()=>{h("/agents").then(({agents:p})=>{o(p),s(!1)}).catch(()=>s(!1))},[]);Jo(()=>{K()},[K]);let G=t[c],P=mo(()=>{G&&(A(!1),h(`/memories/${G.id}`).then(({memories:p})=>{l(p),g(null)}).catch(p=>g(`Failed: ${p instanceof Error?p.message:String(p)}`)))},[G]);Jo(()=>{G&&P()},[G,P]);let oe=mo(async p=>{if(!(!G||!p.trim()))try{let D=await h("/memories/query",{method:"POST",body:{agentId:G.id,prompt:p.trim()}});l(D.memories),A(!0),g(`Search: ${D.count} results`)}catch(D){g(`Search failed: ${D instanceof Error?D.message:String(D)}`)}},[G]),I=r,w=m.filter(p=>f==="all"?!0:f==="high"?p.importance>3:f==="medium"?p.importance===3:p.importance<3);return An((p,D)=>{if(I){if(D.escape){a(!1),C("");return}if(D.return){oe(d),a(!1),C("");return}return}if(D.escape||p==="q"){e();return}if(p==="a"){u($=>($+1)%Math.max(1,t.length));return}if(D.leftArrow){u($=>($-1+t.length)%Math.max(1,t.length));return}if(D.rightArrow){u($=>($+1)%Math.max(1,t.length));return}if(p==="s"){a(!0),C(""),g(null);return}if(p==="h"){y($=>$==="high"?"all":"high");return}if(p==="m"){y($=>$==="medium"?"all":"medium");return}if(p==="l"){y($=>$==="low"?"all":"low");return}p==="r"&&P()}),i?te(ee,{dimColor:!0,children:"Loading agents..."}):t.length===0?Ae($e,{flexDirection:"column",children:[te(ee,{dimColor:!0,children:"No agents found"}),te(ee,{dimColor:!0,children:"Press Esc to go back"})]}):Ae($e,{flexDirection:"column",children:[te(ee,{bold:!0,children:"Memories (Esc to go back)"}),Ae($e,{marginTop:1,children:[te(ee,{children:"Agent: "}),te(ee,{bold:!0,color:"cyan",children:G?.name??"?"}),Ae(ee,{dimColor:!0,children:[" (",c+1,"/",t.length,") [a/arrows to switch]"]})]}),te($e,{children:Ae(ee,{dimColor:!0,children:["Filter: ",f==="all"?"all":f," | ",_?"search results":"all memories"," (",w.length,")"]})}),n&&te($e,{children:te(ee,{color:"yellow",children:n})}),r&&Ae($e,{marginTop:1,children:[te(ee,{bold:!0,color:"cyan",children:"Search: "}),te(Dn,{value:d,onChange:C,placeholder:"search query..."}),te(ee,{dimColor:!0,children:" (Enter to search, Esc to cancel)"})]}),w.length===0?te($e,{marginTop:1,children:Ae(ee,{dimColor:!0,children:["No memories",f!=="all"?` matching filter '${f}'`:""]})}):te($e,{marginTop:1,flexDirection:"column",children:w.map(p=>Ae($e,{marginBottom:0,children:[Ae(ee,{color:Rn(p.importance),bold:!0,children:[Mn(p.importance)," "]}),te(ee,{dimColor:!0,children:Zo(p.type??"?",12)}),te(ee,{dimColor:!0,children:Zo(`\xD7${p.retrievedCount??0}`,5)}),Ae(ee,{children:[Ln(p.content,55)," "]}),te(ee,{dimColor:!0,children:Nn(p.createdAt)}),p.score!==void 0&&Ae(ee,{dimColor:!0,children:[" (",p.score.toFixed(2),")"]})]},p.id))}),te($e,{marginTop:1,children:te(ee,{dimColor:!0,children:"s:search h:high m:medium l:low a:agent r:refresh"})})]})}function Zo(e,t){return e?e.length>=t?e:e+" ".repeat(t-e.length):" ".repeat(t)}function Ln(e,t){return e.length<=t?e:e.slice(0,t-3)+"..."}import{Box as st,Text as ye,useInput as _n}from"ink";import $n from"ink-text-input";import{useState as Ke,useEffect as tr,useCallback as or}from"react";import{jsx as De,jsxs as Oe}from"react/jsx-runtime";var rr={Anthropic:["anthropic.apiKey","anthropic.baseUrl","anthropic.model","anthropic.defaultOpusModel","anthropic.defaultSonnetModel","anthropic.defaultHaikuModel","anthropic.smallFastModel"],Defaults:["defaults.model","defaults.effort","defaults.maxTurns","defaults.maxBudgetUsd","defaults.timeout","defaults.approvalTimeout"],Server:["server.port","server.host","server.apiKey","server.timezone"],Logging:["logging.level"],Evolution:["roles.evolution.triggerEvery","roles.evolution.reflectionThreshold"],Chat:["chat.sessionTimeoutMinutes","chat.maxSessionTurns","chat.autoTitle","chat.archiveExtractMemory"]},On={"anthropic.apiKey":"API Key","anthropic.baseUrl":"Base URL","anthropic.model":"Model","anthropic.defaultOpusModel":"Default Opus","anthropic.defaultSonnetModel":"Default Sonnet","anthropic.defaultHaikuModel":"Default Haiku","anthropic.smallFastModel":"Small Fast","defaults.model":"Default Model","defaults.effort":"Effort","defaults.maxTurns":"Max Turns","defaults.maxBudgetUsd":"Max Budget (USD)","defaults.timeout":"Timeout (sec)","defaults.approvalTimeout":"Approval Timeout (sec)","server.port":"Port","server.host":"Host","server.apiKey":"API Key","server.timezone":"Timezone","logging.level":"Log Level","roles.evolution.triggerEvery":"Evolution Trigger Every","chat.sessionTimeoutMinutes":"Session Timeout (min)","chat.maxSessionTurns":"Max Session Turns","chat.autoTitle":"Auto Title","chat.archiveExtractMemory":"Archive Extract Memory","roles.evolution.reflectionThreshold":"Reflection Threshold"};function nr({onBack:e}){let{state:t}=ze(),[o,c]=Ke({}),[u,m]=Ke([]),[l,i]=Ke(null),[s,r]=Ke("view"),[a,d]=Ke(0),[C,f]=Ke(""),[y,n]=Ke(null),[g,_]=Ke(!1),[A,K]=Ke([]),G=Object.values(rr).flat(),P=or(()=>{h("/config").then(w=>{c(w.config),m(w.mutable)}).catch(w=>i(w.message)),h("/config/env-diff").then(w=>{K(w.diffs)}).catch(()=>{})},[]);tr(()=>{P()},[P]),tr(()=>{t.configVersion>0&&P()},[t.configVersion,P]);let oe=or(async()=>{let w=G[a];if(w){_(!0),n(null);try{let p=C,D=o[w];if(D&&typeof D.value=="number"&&(p=Number(C),isNaN(p))){n("Invalid number"),_(!1);return}let $=await h("/config",{method:"PATCH",body:{[w]:p}});$.updated.length>0&&(n(`Updated: ${w}`),P()),$.errors.length>0&&n($.errors[0]),r("view")}catch(p){n(`Failed: ${p instanceof Error?p.message:String(p)}`)}finally{_(!1)}}},[G,a,C,o,P]);if(_n((w,p)=>{if(s==="edit"){if(p.escape){r("view");return}return}if(p.escape||w==="q"){e();return}if(p.upArrow&&a>0&&d(D=>D-1),p.downArrow&&a<G.length-1&&d(D=>D+1),p.return||w==="e"){let D=G[a],$=o[D];$&&$.mutable?(f(String($.value??"")),r("edit"),n(null)):$&&!$.mutable&&n("This setting requires a restart to change")}w==="r"&&(P(),n("Refreshed")),w==="s"&&A.length>0&&h("/config/sync-to-env",{method:"POST"}).then(()=>{n("Synced to .env"),K([]),P()}),w==="l"&&A.length>0&&h("/config/load-from-env",{method:"POST"}).then(()=>{n("Loaded from .env"),P()})}),l)return Oe(st,{flexDirection:"column",children:[Oe(ye,{color:"red",children:["Failed to load config: ",l]}),De(ye,{dimColor:!0,children:"Press Esc or q to return"})]});let I=0;return Oe(st,{flexDirection:"column",children:[De(ye,{bold:!0,children:"Settings"}),y&&De(ye,{color:y.startsWith("Failed")||y.startsWith("This setting")?"yellow":"green",children:y}),A&&A.length>0&&Oe(st,{flexDirection:"column",marginBottom:1,children:[Oe(ye,{color:"yellow",children:[".env differs from DB (",A.length," key(s)): ",A.map(w=>w.envKey).join(", ")]}),De(ye,{dimColor:!0,children:"s:sync DB\u2192.env l:load .env\u2192DB"})]}),De(st,{marginTop:1,flexDirection:"column",children:Object.entries(rr).map(([w,p])=>Oe(st,{marginBottom:1,flexDirection:"column",children:[De(ye,{bold:!0,color:"cyan",children:w}),p.map(D=>{let $=o[D],v=I++===a,B=u.includes(D),O=On[D]??D,se=$?String($.value??""):"...";return s==="edit"&&v?Oe(st,{children:[Oe(ye,{color:"cyan",children:["> ",O,": "]}),De($n,{value:C,onChange:f,onSubmit:()=>{oe()}}),g&&De(ye,{color:"yellow",children:" saving..."})]},D):Oe(st,{children:[Oe(ye,{color:v?"cyan":"white",children:[v?"> ":" ",B?" ":"\u{1F512} ",O,": "," "]}),De(ye,{color:B?"white":"gray",children:se}),!B&&De(ye,{dimColor:!0,children:" (restart required)"})]},D)})]},w))}),De(ye,{dimColor:!0,children:"Enter/e:edit r:refresh Esc/q:back"})]})}import{Box as it,Text as me,useInput as Vn}from"ink";import{useEffect as qn,useState as go,useCallback as Fn}from"react";import{jsx as le,jsxs as pt}from"react/jsx-runtime";function sr({onBack:e}){let[t,o]=go([]),[c,u]=go(!0),[m,l]=go(0),{message:i,setMessage:s,clearMessage:r}=et(),a=Fn(()=>{u(!0),h("/plugins").then(({plugins:d})=>{o(d),u(!1)}).catch(()=>u(!1))},[]);return qn(()=>{a()},[a]),Vn((d,C)=>{if(C.escape||d==="q"){e();return}if(C.upArrow){l(f=>Math.max(0,f-1));return}if(C.downArrow){l(f=>Math.min(t.length-1,f+1));return}d==="r"&&(a(),r())}),c?le(me,{dimColor:!0,children:"Loading plugins..."}):pt(it,{flexDirection:"column",children:[pt(me,{bold:!0,children:["Plugins (",t.length,") (Esc to go back)"]}),i&&le(it,{marginTop:1,children:pt(me,{color:i.type==="success"?"green":i.type==="error"?"red":"gray",children:[i.type==="success"?"\u2713 ":i.type==="error"?"\u2717 ":"\u2192 ",i.text]})}),t.length===0?le(it,{marginTop:1,children:le(me,{dimColor:!0,children:"No plugins installed."})}):pt(it,{marginTop:1,flexDirection:"column",children:[pt(it,{children:[le(me,{dimColor:!0,children:" "}),le(me,{dimColor:!0,children:ft("Name",24)}),le(me,{dimColor:!0,children:ft("Scope",8)}),le(me,{dimColor:!0,children:ft("User",6)}),le(me,{dimColor:!0,children:"Path"})]}),t.map((d,C)=>{let f=C===m,y=d.id.split("@")[0];return pt(it,{children:[le(me,{color:f?"cyan":void 0,bold:f,children:f?"> ":" "}),le(me,{color:f?"cyan":void 0,bold:f,children:ft(y,24)}),le(me,{color:f?"cyan":void 0,bold:f,children:ft(d.scope,8)}),le(me,{color:d.globalEnabled?"green":"gray",children:ft(d.globalEnabled?"on":"off",6)}),le(me,{dimColor:!0,children:d.installPath})]},d.id)})]}),le(it,{marginTop:1,children:le(me,{dimColor:!0,children:"r:refresh"})})]})}function ft(e,t){return e?e.length>=t?e:e+" ".repeat(t-e.length):" ".repeat(t)}import{Box as Qt,Text as ir,useInput as Un}from"ink";import{useState as Wn}from"react";import{jsx as xt,jsxs as fo}from"react/jsx-runtime";var Gn=[{key:"1",id:"tasks",label:"Tasks"},{key:"2",id:"automations",label:"Automations"},{key:"3",id:"goals",label:"Goals"}];function ar({onBack:e}){let[t,o]=Wn("tasks");return Un((c,u)=>{if(u.escape||c==="q"){e();return}if(c==="1"){o("tasks");return}if(c==="2"){o("automations");return}if(c==="3"){o("goals");return}}),fo(Qt,{flexDirection:"column",children:[fo(Qt,{gap:1,marginBottom:1,children:[Gn.map(c=>{let u=t===c.id;return xt(Qt,{children:fo(ir,{color:u?"cyan":"gray",bold:u,underline:u,children:["[",c.key,":",c.label,"]"]})},c.id)}),xt(Qt,{flexGrow:1}),xt(ir,{dimColor:!0,children:"Esc: back"})]}),t==="tasks"&&xt(Ut,{onBack:e}),t==="automations"&&xt(Kt,{onBack:e}),t==="goals"&&xt(Gt,{onBack:e})]})}import{Box as j,Text as F,useInput as Hn}from"ink";import{useEffect as jn,useState as At}from"react";import{jsx as R,jsxs as ne}from"react/jsx-runtime";var lr={connected:"green",connecting:"yellow",disconnected:"gray",error:"red"};function cr({onBack:e}){let[t,o]=At([]),[c,u]=At(!0),[m,l]=At(0),[i,s]=At(null),[r,a]=At("");jn(()=>{d()},[]);async function d(){try{let y=await h("/channels");o(y.channels)}catch{}u(!1)}async function C(y){if(t.find(g=>g.id===y)?.platform==="wechat")try{a("Starting WeChat QR login...");let g=await h(`/channels/${y}/wechat/qr-start`,{method:"POST"});if(g.qrcodeUrl){a(`Scan QR: ${g.qrcodeUrl}
|
|
6
|
-
Waiting for scan...`);let _=await h(`/channels/${y}/wechat/qr-wait`,{method:"POST",body:{sessionKey:g.sessionKey,timeoutMs:12e4}});a(_.message)}else a(g.message);d()}catch{a("WeChat connect failed")}else try{await h(`/channels/${y}/connect`,{method:"POST"}),a("Connecting..."),d()}catch{a("Connect failed")}}async function f(y){try{await h(`/channels/${y}/disconnect`,{method:"POST"}),a("Disconnected"),d()}catch{a("Disconnect failed")}}return Hn((y,n)=>{if(i){if(n.escape||y==="q"){s(null);return}if(y==="c"){C(i.id);return}if(y==="d"){f(i.id);return}return}if(n.escape){e();return}if(n.upArrow){l(g=>Math.max(0,g-1));return}if(n.downArrow){l(g=>Math.min(t.length-1,g+1));return}if(n.return&&t[m]){s(t[m]),a("");return}}),c?R(j,{flexDirection:"column",children:R(F,{dimColor:!0,children:"Loading channels..."})}):i?ne(j,{flexDirection:"column",children:[ne(j,{marginBottom:1,children:[ne(F,{bold:!0,children:["Channel: ",i.name]}),R(F,{dimColor:!0,children:" (Esc to go back)"})]}),ne(j,{flexDirection:"column",gap:0,children:[ne(F,{children:["ID: ",i.id]}),ne(F,{children:["Platform: ",i.platform]}),ne(F,{children:["Status: ",R(F,{color:lr[i.status]??"white",children:i.status})]}),ne(F,{children:["Enabled: ",i.enabled?"yes":"no"]}),ne(F,{children:["Messages: ",i.messageCount]}),ne(F,{children:["Config: ",JSON.stringify(i.config)]})]}),R(j,{marginTop:1,children:R(F,{dimColor:!0,children:"[c] Connect [d] Disconnect [Esc] Back"})}),r&&R(F,{color:"yellow",children:r})]}):ne(j,{flexDirection:"column",children:[ne(j,{marginBottom:1,children:[R(F,{bold:!0,children:"Channels"}),ne(F,{dimColor:!0,children:[" (",t.length," total) "]}),R(F,{dimColor:!0,children:"Arrow keys to select, Enter for detail, Esc to return"})]}),t.length===0?R(F,{dimColor:!0,children:"No channels configured. Add channels via API or config."}):ne(j,{flexDirection:"column",children:[ne(j,{children:[R(j,{width:3,children:R(F,{dimColor:!0,children:" "})}),R(j,{width:12,children:R(F,{bold:!0,dimColor:!0,children:"ID"})}),R(j,{width:16,children:R(F,{bold:!0,dimColor:!0,children:"Name"})}),R(j,{width:12,children:R(F,{bold:!0,dimColor:!0,children:"Platform"})}),R(j,{width:14,children:R(F,{bold:!0,dimColor:!0,children:"Status"})}),R(j,{width:10,children:R(F,{bold:!0,dimColor:!0,children:"Enabled"})}),R(j,{width:10,children:R(F,{bold:!0,dimColor:!0,children:"Messages"})})]}),t.map((y,n)=>ne(j,{children:[R(j,{width:3,children:R(F,{children:n===m?">":" "})}),R(j,{width:12,children:R(F,{inverse:n===m,children:y.id.slice(0,8)})}),R(j,{width:16,children:R(F,{children:y.name})}),R(j,{width:12,children:R(F,{children:y.platform})}),R(j,{width:14,children:ne(F,{color:lr[y.status]??"white",children:[y.status==="connected"?"\u25CF":y.status==="error"?"\u2717":"\u25CB"," ",y.status]})}),R(j,{width:10,children:R(F,{color:y.enabled?"green":"gray",children:y.enabled?"yes":"no"})}),R(j,{width:10,children:R(F,{children:y.messageCount})})]},y.id))]})]})}import{Box as yt,Text as Qe,useInput as Qn}from"ink";import{useEffect as Xn,useState as Dt,useCallback as zn}from"react";import{Box as M,Text as S,useInput as Kn}from"ink";import Tt from"ink-text-input";import{useEffect as dr,useState as J,useCallback as ht}from"react";yo();import{Fragment as ur,jsx as b,jsxs as k}from"react/jsx-runtime";function mr({roleId:e,onBack:t}){let[o,c]=J(null),[u,m]=J([]),[l,i]=J(!0),[s,r]=J("view"),[a,d]=J(""),[C,f]=J(0),[y,n]=J(""),[g,_]=J([]),[A,K]=J(0),[G,P]=J(new Set),[oe,I]=J("inline"),[w,p]=J(""),[D,$]=J(""),[Ve,v]=J([]),[B,O]=J(new Set),[se,Xe]=J(0),[Ct,Mt]=J("default"),[Nt,Yt]=J(""),[Lt,Jt]=J(""),[at,To]=J("mode"),{message:V,setMessage:H}=et(),ie=ht(()=>{i(!0),h(`/roles/${e}`).then(({role:T,boundPlugins:E})=>{c(T),m(E??[]),d(T.cagPrompt??""),P(new Set(T.allowedTools??[])),I(T.executionMode??"inline"),p(T.model??""),$(T.maxBudgetUsd!=null?String(T.maxBudgetUsd):""),i(!1)}).catch(()=>i(!1))},[e]);dr(()=>{ie()},[ie]),dr(()=>{I(o?.executionMode??"inline"),p(o?.model??""),$(o?.maxBudgetUsd!=null?String(o?.maxBudgetUsd):""),Mt(o?.permissionMode??"default"),Yt((o?.allowedBashPatterns??[]).join(", ")),Jt((o?.deniedBashPatterns??[]).join(", "))},[o?.id,o?.executionMode,o?.model,o?.maxBudgetUsd,o?.permissionMode,o?.allowedBashPatterns,o?.deniedBashPatterns]);let fr=ht(async()=>{if(o)try{await h(`/roles/${o.id}`,{method:"PATCH",body:{cagPrompt:a}}),H("CAG prompt saved","success"),r("view"),ie()}catch(T){H(`Save failed: ${T instanceof Error?T.message:String(T)}`,"error")}},[o,a,ie,H]),pr=ht(async()=>{if(o)try{await h(`/roles/${o.id}`,{method:"PATCH",body:{additionalDirectories:ve}}),H("Directories saved","success"),r("view"),ie()}catch(T){H(`Save failed: ${T instanceof Error?T.message:String(T)}`,"error")}},[o,ie,H]),xr=ht(async()=>{if(o)try{await h(`/roles/${o.id}`,{method:"PATCH",body:{allowedTools:Array.from(G)}}),H("Tool permissions saved","success"),r("view"),ie()}catch(T){H(`Save failed: ${T instanceof Error?T.message:String(T)}`,"error")}},[o,G,ie,H]),Tr=ht(async()=>{if(!o)return;let T={executionMode:oe};w!==void 0&&(T.model=w);let E=parseFloat(D);isNaN(E)||(T.maxBudgetUsd=E);try{await h(`/roles/${o.id}`,{method:"PATCH",body:T}),H("Execution config saved","success"),r("view"),ie()}catch(x){H(`Save failed: ${x instanceof Error?x.message:String(x)}`,"error")}},[o,oe,w,D,ie,H]),hr=ht(async()=>{if(!o)return;let T={permissionMode:Ct},E=Nt.split(",").map(L=>L.trim()).filter(Boolean),x=Lt.split(",").map(L=>L.trim()).filter(Boolean);T.allowedBashPatterns=E.length>0?E:[],T.deniedBashPatterns=x.length>0?x:[];try{await h(`/roles/${o.id}`,{method:"PATCH",body:T}),H("Permission config saved","success"),r("view"),ie()}catch(L){H(`Save failed: ${L instanceof Error?L.message:String(L)}`,"error")}},[o,Ct,Nt,Lt,ie,H]),ve=o?.additionalDirectories??[];return Kn((T,E)=>{if(E.escape){r("view");return}if(T==="r"){ie();return}switch(s){case"view":{if(T==="c"){r("edit-cag");return}if(T==="d"){r("edit-dirs"),f(0),n("");return}if(T==="t"){r("edit-tools");return}if(T==="x"){r("edit-exec");return}if(T==="h"){h("/channels?enabled=true").then(({channels:x})=>{v(x.map(L=>({name:L.name,id:L.id}))),O(new Set(o?.allowedChannels??[])),Xe(0),r("edit-channels")}).catch(()=>H("Failed to load channels","error"));return}if(T==="p"){Mt(o?.permissionMode??"default"),Yt((o?.allowedBashPatterns??[]).join(", ")),Jt((o?.deniedBashPatterns??[]).join(", ")),To("mode"),r("edit-permissions");return}if(T==="i"){if(!o)return;let x=!o.inheritUserSettings;h(`/roles/${o.id}`,{method:"PATCH",body:{inheritUserSettings:x}}).then(()=>{H(`Inherit user settings: ${x?"ON":"OFF"}`,"success"),ie()}).catch(()=>H("Failed to toggle","error"));return}break}case"edit-cag":{if(E.ctrl&&T==="s"){fr();return}break}case"edit-dirs":{if(T==="s"){pr();return}if(T==="a"){r("edit-dirs-add");return}if(T==="m"&&ve.length>0){let x=ve[C];if(x){c(pe=>pe&&{...pe,additionalDirectories:pe.additionalDirectories?.map((Re,yr)=>yr===C?{...typeof Re=="string"?{path:Re}:Re,mode:Re.mode==="ro"?"rw":"ro"}:Re)});let L=x.mode==="ro"?"rw":"ro";H(`Mode set to ${L.toUpperCase()}`,"success")}return}if(T==="x"&&ve.length>0){c(x=>x&&{...x,additionalDirectories:ve.filter((L,pe)=>pe!==C)}),f(x=>Math.max(0,Math.min(x,ve.length-2)));return}if(E.upArrow){f(x=>Math.max(0,x-1));return}if(E.downArrow){f(x=>Math.min(ve.length-1,x+1));return}break}case"edit-dirs-add":{if(E.escape){r("edit-dirs"),n(""),_([]);return}if(E.return&&g.length>0){let x=g[A];x&&(n(x.endsWith("/")?x:x+"/"),_([]));return}if(E.return){let x=y.trim();x&&x.startsWith("/")?(c(L=>L&&{...L,additionalDirectories:[...L.additionalDirectories??[],{path:x,mode:"rw"}]}),n(""),_([]),r("edit-dirs")):H("Path must be absolute (must start with /)","error");return}if(E.tab){let x=y.trim();if(!x||!x.startsWith("/"))return;h(`/fs/suggest-dirs?prefix=${encodeURIComponent(x)}`).then(({suggestions:L})=>{L.length===1?(n(L[0]+"/"),_([])):L.length>1&&(_(L),K(0))}).catch(()=>{_([])});return}if(E.upArrow&&g.length>0){K(x=>Math.max(0,x-1));return}if(E.downArrow&&g.length>0){K(x=>Math.min(g.length-1,x+1));return}break}case"edit-tools":{if(T==="s"){xr();return}let x=parseInt(T,10)-1;if(!isNaN(x)&&x>=0&&x<_t.length){let L=_t[x];P(pe=>{let Re=new Set(pe);return Re.has(L)?Re.delete(L):Re.add(L),Re});return}break}case"edit-exec":{if(T==="s"){Tr();return}if(E.tab){I(x=>x==="inline"?"isolated":"inline");return}break}case"edit-permissions":{if(T==="s"){hr();return}if(E.tab){To(x=>x==="mode"?"allowed":x==="allowed"?"denied":"mode");return}if(at==="mode"&&(E.upArrow||E.downArrow)){let x=["default","acceptEdits","dontAsk","bypassPermissions"],L=x.indexOf(Ct);E.upArrow&&Mt(x[Math.max(0,L-1)]),E.downArrow&&Mt(x[Math.min(x.length-1,L+1)]);return}break}case"edit-channels":{if(T==="s"){if(!o)return;let x=B.size>0?Array.from(B):[];h(`/roles/${o.id}`,{method:"PATCH",body:{allowedChannels:x}}).then(()=>{H("Channels saved","success"),r("view"),ie()}).catch(()=>H("Save failed","error"));return}if(T==="u"){if(!o)return;h(`/roles/${o.id}`,{method:"PATCH",body:{allowedChannels:null}}).then(()=>{H("Channels: unrestricted","success"),r("view"),ie()}).catch(()=>H("Save failed","error"));return}if(T===" "){let x=Ve[se];x&&O(L=>{let pe=new Set(L);return pe.has(x.name)?pe.delete(x.name):pe.add(x.name),pe});return}if(E.upArrow){Xe(x=>Math.max(0,x-1));return}if(E.downArrow){Xe(x=>Math.min(Ve.length-1,x+1));return}break}}}),l?b(S,{dimColor:!0,children:"Loading role..."}):o?s==="edit-cag"?k(M,{flexDirection:"column",children:[b(S,{bold:!0,children:"CAG Prompt \u2014 Edit (Esc cancel, Ctrl+S save)"}),b(Tt,{value:a,onChange:d,placeholder:"Character And Guidance prompt..."}),V&&b(M,{marginTop:1,children:b(S,{color:V.type==="error"?"red":"green",children:V.text})})]}):s==="edit-dirs-add"?k(M,{flexDirection:"column",children:[b(S,{bold:!0,children:"Add Directory (Enter confirm, Esc cancel, Tab:complete)"}),b(Tt,{value:y,onChange:T=>{n(T),_([])},placeholder:"/absolute/path/to/directory"}),g.length>0&&k(M,{flexDirection:"column",marginTop:1,children:[g.map((T,E)=>k(S,{color:E===A?"cyan":void 0,dimColor:E!==A,children:[E===A?"> ":" ",T,"/"]},T)),b(S,{dimColor:!0,children:"\u2191\u2193 navigate, Enter select, Tab:confirm"})]}),V&&b(M,{marginTop:1,children:b(S,{color:V.type==="error"?"red":"green",children:V.text})})]}):s==="edit-dirs"?k(M,{flexDirection:"column",children:[b(S,{bold:!0,children:"Additional Directories (\u2191\u2193 navigate, a:add m:mode x:remove s:save Esc:cancel)"}),V&&b(M,{children:b(S,{color:V.type==="error"?"red":V.type==="success"?"green":"gray",children:V.text})}),ve.length===0?b(S,{dimColor:!0,children:"No directories. Press a to add one."}):ve.map((T,E)=>{let x=typeof T=="string"?{path:T,mode:"rw"}:T,L=x.mode!=="ro";return k(M,{children:[b(S,{color:E===C?"cyan":void 0,bold:E===C,children:E===C?"> ":" "}),k(S,{color:L?"green":"yellow",children:["[",L?"RW":"RO","]"," "]}),b(S,{color:E===C?"cyan":void 0,children:x.path})]},x.path)})]}):s==="edit-tools"?k(M,{flexDirection:"column",children:[b(S,{bold:!0,children:"Tool Permissions \u2014 toggle with number key (s:save Esc:cancel)"}),V&&b(M,{children:b(S,{color:V.type==="error"?"red":V.type==="success"?"green":"gray",children:V.text})}),_t.map((T,E)=>{let x=G.has(T);return k(M,{children:[k(S,{dimColor:!0,children:[E+1,". "]}),b(S,{color:x?"green":"red",children:x?"[ON] ":"[OFF] "}),b(S,{children:T})]},T)})]}):s==="edit-exec"?k(M,{flexDirection:"column",children:[b(S,{bold:!0,children:"Execution Config (Tab:cycle mode, Enter on field, s:save Esc:cancel)"}),k(M,{children:[b(S,{bold:!0,children:" Mode: "}),b(S,{color:"cyan",children:oe}),b(S,{dimColor:!0,children:" (Tab to toggle)"})]}),k(M,{children:[b(S,{bold:!0,children:" Model: "}),b(Tt,{value:w,onChange:p,placeholder:"sonnet, opus, haiku, or blank"})]}),k(M,{children:[b(S,{bold:!0,children:" Max Budget (USD): "}),b(Tt,{value:D,onChange:$,placeholder:"0 = unlimited"})]}),V&&b(M,{children:b(S,{color:V.type==="error"?"red":V.type==="success"?"green":"gray",children:V.text})})]}):s==="edit-permissions"?k(M,{flexDirection:"column",children:[b(S,{bold:!0,children:"Permission Config (Tab:cycle field, \u2191\u2193:mode, s:save, Esc:cancel)"}),k(M,{children:[b(S,{bold:!0,color:at==="mode"?"cyan":void 0,children:" Mode: "}),["default","acceptEdits","dontAsk","bypassPermissions"].map(E=>k(S,{color:E===Ct?"green":"gray",children:[E===Ct?`[${E}]`:` ${E} `," "]},E))]}),k(M,{children:[b(S,{bold:!0,color:at==="allowed"?"cyan":void 0,children:" Allowed Bash: "}),at==="allowed"?b(Tt,{value:Nt,onChange:Yt,placeholder:"git add *, pnpm test*"}):b(S,{children:Nt||"(none)"})]}),k(M,{children:[b(S,{bold:!0,color:at==="denied"?"cyan":void 0,children:" Denied Bash: "}),at==="denied"?b(Tt,{value:Lt,onChange:Jt,placeholder:"rm -rf *, ssh *"}):b(S,{children:Lt||"(none)"})]}),b(S,{dimColor:!0,children:"Patterns: comma-separated, glob syntax (* = wildcard)"}),V&&b(M,{children:b(S,{color:V.type==="error"?"red":V.type==="success"?"green":"gray",children:V.text})})]}):s==="edit-channels"?k(M,{flexDirection:"column",children:[b(S,{bold:!0,children:"Allowed Channels (Space:toggle, u:unrestricted, s:save, Esc:cancel)"}),Ve.length===0?b(S,{dimColor:!0,children:"No channels available"}):Ve.map((T,E)=>k(M,{children:[k(S,{children:[E===se?">":" "," "]}),k(S,{color:B.has(T.name)?"green":"gray",children:["[",B.has(T.name)?"x":" ","] ",T.name]})]},T.id)),k(S,{dimColor:!0,children:["Selected: ",B.size>0?Array.from(B).join(", "):"none (= block all)"]}),V&&b(M,{children:b(S,{color:V.type==="error"?"red":V.type==="success"?"green":"gray",children:V.text})})]}):k(M,{flexDirection:"column",children:[k(S,{bold:!0,children:["Role: ",o.name]}),k(M,{children:[b(S,{dimColor:!0,children:"ID: "}),b(S,{children:o.id})]}),k(M,{children:[b(S,{dimColor:!0,children:"Status: "}),b(S,{color:o.status==="active"?"green":o.status==="probation"?"yellow":"red",children:o.status})]}),o.performanceScore!=null&&k(M,{children:[b(S,{dimColor:!0,children:"Score: "}),k(S,{children:[(o.performanceScore*100).toFixed(0),"%"]})]}),k(M,{children:[b(S,{dimColor:!0,children:"Created: "}),b(S,{children:new Date(o.createdAt).toLocaleString()})]}),k(M,{children:[b(S,{dimColor:!0,children:"Execution: "}),k(S,{children:[o.executionMode??"inline"," / ",o.model??"inherit"," / ",o.maxBudgetUsd!=null?`$${o.maxBudgetUsd}`:"no limit"]})]}),ve.length>0&&k(ur,{children:[b(S,{bold:!0,children:"Additional Directories:"}),ve.map(T=>k(S,{dimColor:!0,children:[" ",T.path]},T.path))]}),k(M,{children:[b(S,{dimColor:!0,children:"Permission: "}),b(S,{children:o.permissionMode??"default"})]}),(o.allowedBashPatterns?.length??0)>0&&k(M,{children:[b(S,{dimColor:!0,children:" Bash Allow: "}),b(S,{children:o.allowedBashPatterns.join(", ")})]}),(o.deniedBashPatterns?.length??0)>0&&k(M,{children:[b(S,{dimColor:!0,children:" Bash Deny: "}),b(S,{children:o.deniedBashPatterns.join(", ")})]}),k(M,{children:[b(S,{dimColor:!0,children:"Channels: "}),b(S,{children:o.allowedChannels===void 0?"Unrestricted":o.allowedChannels.length===0?"Blocked":o.allowedChannels.join(", ")})]}),k(M,{children:[b(S,{dimColor:!0,children:"Inherit User Settings: "}),b(S,{color:o.inheritUserSettings?"green":"gray",children:o.inheritUserSettings?"Yes":"No"})]}),o.learnedRules.length>0&&k(ur,{children:[b(S,{bold:!0,children:"Learned Rules:"}),o.learnedRules.map(T=>k(S,{dimColor:!0,children:[" - ",T]},T))]}),V&&b(M,{children:b(S,{color:V.type==="error"?"red":V.type==="success"?"green":"gray",children:V.text})}),b(M,{marginTop:1,children:b(S,{dimColor:!0,children:"c:CAG d:dirs t:tools x:exec p:perms h:channels i:inherit r:refresh Esc:back"})})]}):b(S,{dimColor:!0,children:"Role not found."})}import{jsx as Ce,jsxs as Xt}from"react/jsx-runtime";function gr({onBack:e}){let[t,o]=Dt([]),[c,u]=Dt(!0),[m,l]=Dt(0),[i,s]=Dt("list"),[r,a]=Dt(null),{message:d,setMessage:C,clearMessage:f}=et(),y=zn(()=>{u(!0),h("/roles").then(({roles:n})=>{o(n.map(g=>({id:g.id,name:g.name,status:g.status,performanceScore:g.performanceScore,createdAt:g.createdAt}))),u(!1)}).catch(()=>u(!1))},[]);return Xn(()=>{y()},[y]),Qn((n,g)=>{if(g.escape||n==="q"){e();return}if(g.upArrow){l(_=>Math.max(0,_-1));return}if(g.downArrow){l(_=>Math.min(t.length-1,_+1));return}if(n==="r"&&(y(),f()),n===`
|
|
7
|
-
`||n==="o"||n==="e"){t.length>0&&(a(t[m].id),s("detail"));return}}),c?Ce(Qe,{dimColor:!0,children:"Loading roles..."}):i==="detail"&&r?Ce(mr,{roleId:r,onBack:()=>s("list")}):Xt(yt,{flexDirection:"column",children:[Xt(Qe,{bold:!0,children:["Roles (",t.length,") (Esc to go back)"]}),d&&Ce(yt,{marginTop:1,children:Xt(Qe,{color:d.type==="success"?"green":d.type==="error"?"red":"gray",children:[d.type==="success"?"\u2713 ":d.type==="error"?"\u2717 ":"\u2192 ",d.text]})}),t.length===0?Ce(yt,{marginTop:1,children:Ce(Qe,{dimColor:!0,children:"No roles found. Roles define agent behavior and bind plugins."})}):Ce(yt,{marginTop:1,flexDirection:"column",children:t.map((n,g)=>{let _=g===m,A=n.performanceScore!=null?`${(n.performanceScore*100).toFixed(0)}%`:"\u2014";return Xt(yt,{children:[Ce(Qe,{color:_?"cyan":void 0,bold:_,children:_?"> ":" "}),Ce(Qe,{color:_?"cyan":void 0,bold:_,children:po(n.name,24)}),Ce(Qe,{color:Yn(n.status),children:po(n.status,12)}),Ce(Qe,{dimColor:!0,children:po(A,8)})]},n.id)})}),Ce(yt,{marginTop:1,children:Ce(Qe,{dimColor:!0,children:"Enter/O/E:open Esc:back r:refresh"})})]})}function Yn(e){return e==="active"?"green":e==="probation"?"yellow":e==="retired"||e==="dead"?"red":"gray"}function po(e,t){return e?e.length>=t?e:e+" ".repeat(t-e.length):" ".repeat(t)}import{Fragment as rs,jsx as U,jsxs as St}from"react/jsx-runtime";function es(){let{state:e,dispatch:t}=ze(),{session:o,sendMessage:c,createNewSession:u,archiveCurrentSession:m}=ko(),[l,i]=Zn([]);zt(()=>{t({type:"SET_SESSION",session:o})},[o,t]),Bo();let{latestMessage:s}=Ao(o?.id??null),r=xo(null);zt(()=>{s&&s.id!==r.current&&(r.current=s.id,i(A=>[...A,{role:"assistant",content:s.content}]))},[s]);let{events:a,isStreaming:d,clearEvents:C}=Io(e.activeTaskId),f=a[a.length-1],y=f?.type==="complete"&&!d,n=xo(null),g=xo("");zt(()=>{g.current=a.filter(A=>A.type==="reasoning").map(A=>A.content).join("")},[a]),zt(()=>{if(y&&e.activeTaskId!==n.current){n.current=e.activeTaskId;let A=f?.content||g.current;A&&i(K=>[...K,{role:"assistant",content:A}])}},[y,f,e.activeTaskId]);let _=async A=>{let K=A.trim().toLowerCase();if(["quit","exit","/quit","/exit"].includes(K)&&process.exit(0),A.startsWith("/")){let P=A.slice(1),I={work:"work",tasks:"tasks",config:"config",evolution:"evolution",templates:"templates",memories:"memories",goals:"goals",strategies:"strategies",roles:"roles",settings:"settings",channels:"channels",plugins:"plugins",back:"chat"}[P];if(I){t({type:"SET_VIEW",view:I});return}if(P==="new"){if(await m()){let p=await u();i([]),C(),p&&i([{role:"assistant",content:`Session archived. New session started: ${p.id.slice(0,8)}`}])}return}if(P==="session"){let w=o?`Session: ${o.id}
|
|
8
|
-
Turns: ${o.messageCount}
|
|
9
|
-
Last active: ${new Date(o.lastActiveAt).toLocaleString()}`:"No active session";i(p=>[...p,{role:"assistant",content:w}]);return}}if(i(P=>[...P,{role:"user",content:A}]),C(),!await c(A)){i(P=>[...P,{role:"assistant",content:"Failed to send message. Server may be disconnected."}]);return}};return St(Rt,{flexDirection:"column",paddingX:1,children:[U(Do,{}),St(Rt,{flexGrow:1,flexDirection:"column",paddingY:1,children:[e.view==="chat"&&St(rs,{children:[U($o,{messages:l}),U(No,{events:a,isStreaming:d}),!e.connected&&!e.serverUnreachable&&U(Rt,{children:U(bt,{color:"red",children:"Server disconnected. Attempting to reconnect..."})}),e.serverUnreachable&&St(Rt,{flexDirection:"column",children:[U(bt,{color:"red",bold:!0,children:"Server unreachable after 15s."}),U(bt,{dimColor:!0,children:"Check: adam server logs"}),U(bt,{dimColor:!0,children:"Type /quit to exit."})]})]}),e.view==="work"&&U(ar,{onBack:()=>t({type:"SET_VIEW",view:"chat"})}),e.view==="tasks"&&U(Ut,{onBack:()=>t({type:"SET_VIEW",view:"chat"})}),e.view==="config"&&U(Go,{onBack:()=>t({type:"SET_VIEW",view:"chat"})}),e.view==="evolution"&&U(jo,{onBack:()=>t({type:"SET_VIEW",view:"chat"})}),e.view==="goals"&&U(Gt,{onBack:()=>t({type:"SET_VIEW",view:"chat"})}),e.view==="strategies"&&U(Qo,{onBack:()=>t({type:"SET_VIEW",view:"chat"})}),e.view==="templates"&&U(Kt,{onBack:()=>t({type:"SET_VIEW",view:"chat"})}),e.view==="webhooks"&&U(Yo,{onBack:()=>t({type:"SET_VIEW",view:"chat"})}),e.view==="memories"&&U(er,{onBack:()=>t({type:"SET_VIEW",view:"chat"})}),e.view==="plugins"&&U(sr,{onBack:()=>t({type:"SET_VIEW",view:"chat"})}),e.view==="roles"&&U(gr,{onBack:()=>t({type:"SET_VIEW",view:"chat"})}),e.view==="settings"&&U(nr,{onBack:()=>t({type:"SET_VIEW",view:"chat"})}),e.view==="channels"&&U(cr,{onBack:()=>t({type:"SET_VIEW",view:"chat"})})]}),e.pendingPlanApproval?U(Vo,{approval:e.pendingPlanApproval,onResolved:()=>t({type:"SET_PENDING_PLAN_APPROVAL",approval:null}),onTimeout:()=>t({type:"SET_PLAN_TIMEOUT_NOTICE",planId:e.pendingPlanApproval.planId})}):e.pendingApproval?U(Oo,{approval:e.pendingApproval,onResolved:()=>t({type:"SET_PENDING_APPROVAL",approval:null})}):U(Mo,{onSubmit:_}),e.planTimeoutNotice&&U(ts,{planId:e.planTimeoutNotice.planId,onDismiss:()=>t({type:"SET_PLAN_TIMEOUT_NOTICE",planId:null})})]})}function ts({planId:e,onDismiss:t}){return Jn(o=>{o==="d"&&t()}),St(Rt,{borderStyle:"round",borderColor:"yellow",paddingX:1,children:[St(bt,{color:"yellow",children:["Plan ",e," was auto-denied after 300s timeout."]}),U(bt,{dimColor:!0,children:" [d] Dismiss"})]})}function os(){return U(Co,{children:U(es,{})})}export{os as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as a,o as b}from"./chunk-QC6QVNKP.js";import"./chunk-5V36ACKZ.js";import"./chunk-6VPL5CXB.js";import"./chunk-NFSXJNPD.js";import"./chunk-X26NKAXY.js";import"./chunk-GA7GEIXB.js";import"./chunk-KHPXEUSY.js";import"./chunk-ROSOI75V.js";import"./chunk-YEV5YTS3.js";import"./chunk-BONI2HUN.js";import"./chunk-4TBGFHYX.js";import"./chunk-64FIXWFL.js";import"./chunk-U3XVAAXA.js";import"./chunk-L7JP7DUO.js";import"./chunk-2C5U3CNX.js";import"./chunk-2CMR5AG7.js";import"./chunk-I5RUEOSQ.js";import"./chunk-42RHY3Q3.js";import"./chunk-3TIHZZMK.js";import"./chunk-6KLG4APZ.js";import"./chunk-REKCZ3GY.js";import"./chunk-FXFHGIY6.js";import"./chunk-QMKQBU3R.js";import"./chunk-CREHL4BN.js";import"./chunk-WBAPIPST.js";import"./chunk-INNDBLZE.js";import"./chunk-FCV2DPZQ.js";export{b as createAdamTools,a as getToolsFingerprint};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{b as y}from"./chunk-BCELBB5Q.js";import{b as m}from"./chunk-64FIXWFL.js";import"./chunk-TEMWI6U5.js";import"./chunk-L7JP7DUO.js";import"./chunk-CREHL4BN.js";import"./chunk-WBAPIPST.js";import{c as f,h}from"./chunk-INNDBLZE.js";import"./chunk-FCV2DPZQ.js";h();var s=f("channels"),c=new Map,v=3e5,A=new Set(["telegram"]);function I(n){let a=n.trim().toLowerCase().match(/^(yes|y|是|允许|no|n|否|拒绝)\s+(\S+)$/);if(!a)return null;let[,p,d]=a,i=["yes","y","\u662F","\u5141\u8BB8"].includes(p);return{requestId:d,decision:i?"allow":"deny"}}function w(n){let r=m(n);return r?A.has(r.platform):!1}async function C(n,r,a,p,d,i=v){let e=a;c.set(e,{planId:a,taskId:p,channelId:n,chatId:r,requestId:e,timestamp:Date.now(),timeoutMs:i});let l=y(),o=w(n);if(o){let t=`\u{1F510} Plan approval requested
|
|
2
|
-
|
|
3
|
-
${d.slice(0,200)}`;await l.send({channelId:n,chatId:r,content:t,messageType:"approval",replyMarkup:{inlineKeyboard:[[{text:"\u2705 Allow",callbackData:`yes ${e}`},{text:"\u274C Deny",callbackData:`no ${e}`}]]}})}else{let t=["\u{1F510} Plan approval requested",d.slice(0,200),"",`Reply 'yes ${e}' or 'no ${e}'`].join(`
|
|
4
|
-
`);await l.send({channelId:n,chatId:r,content:t,messageType:"approval"})}setTimeout(()=>{let t=c.get(e);if(t&&Date.now()-t.timestamp>=t.timeoutMs){c.delete(e),s.warn({requestId:e,taskId:p},"Approval timed out, auto-denying"),l.send({channelId:t.channelId,chatId:t.chatId,content:`\u23F0 Approval ${e} timed out (5 min). Plan denied.`,messageType:"approval"}).catch(u=>s.error({requestId:e,error:u},"Failed to notify timeout"));let g=process.env.ADAM_PORT??"7100";fetch(`http://localhost:${g}/tasks/${t.taskId}/approve-plan`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({planId:t.planId,decision:"deny"})}).catch(u=>s.error({requestId:e,error:u},"Failed to auto-deny"))}},i+1e3),s.info({channelId:n,chatId:r,planId:a,requestId:e,interactive:o},"Interactive approval sent to channel")}async function $(n,r,a,p){let i=I(p??a);if(!i)return!1;let{requestId:e,decision:l}=i,o=c.get(e);if(!o)return!1;if(o.channelId!==n||o.chatId!==r)return s.debug({requestId:e,expectedChannel:o.channelId,gotChannel:n},"Approval reply from different channel"),!1;c.delete(e),s.info({requestId:e,decision:l},"Channel approval reply received");try{let t=process.env.ADAM_PORT??"7100",g=await fetch(`http://localhost:${t}/tasks/${o.taskId}/approve-plan`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({planId:o.planId,decision:l}),signal:AbortSignal.timeout(1e4)});g.ok||s.error({requestId:e,status:g.status},"Failed to forward approval to API")}catch(t){s.error({requestId:e,error:t},"Error forwarding approval to API")}return!0}function k(){return[...c.keys()]}export{k as getPendingApprovalRequestIds,$ as handleInboundForApproval,I as parseApprovalReply,C as sendApprovalToChannel};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{i as a,j as b,k as c,l as d,m as e}from"./chunk-CFTWJZVX.js";import"./chunk-PT55643Q.js";import"./chunk-6VPL5CXB.js";import"./chunk-NFSXJNPD.js";import"./chunk-X26NKAXY.js";import"./chunk-ROSOI75V.js";import"./chunk-XFTRKHH2.js";import"./chunk-U3XVAAXA.js";import"./chunk-TEMWI6U5.js";import"./chunk-L7JP7DUO.js";import"./chunk-2C5U3CNX.js";import"./chunk-2CMR5AG7.js";import"./chunk-I5RUEOSQ.js";import"./chunk-REKCZ3GY.js";import"./chunk-FXFHGIY6.js";import"./chunk-QMKQBU3R.js";import"./chunk-CREHL4BN.js";import"./chunk-WBAPIPST.js";import"./chunk-INNDBLZE.js";import"./chunk-FCV2DPZQ.js";export{a as evaluateTaskCompletion,e as getSecurityPosture,d as reportViolation,b as startAuditManager,c as stopAuditManager};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a,b,c}from"./chunk-35DBEYMG.js";import"./chunk-KHPXEUSY.js";import"./chunk-ROSOI75V.js";import"./chunk-L7JP7DUO.js";import"./chunk-I5RUEOSQ.js";import"./chunk-42RHY3Q3.js";import"./chunk-3TIHZZMK.js";import"./chunk-6KLG4APZ.js";import"./chunk-REKCZ3GY.js";import"./chunk-FXFHGIY6.js";import"./chunk-QMKQBU3R.js";import"./chunk-CREHL4BN.js";import"./chunk-WBAPIPST.js";import"./chunk-INNDBLZE.js";import"./chunk-FCV2DPZQ.js";export{a as BreeEngine,b as getBreeEngine,c as setBreeEngine};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as a,d as b,e as c}from"./chunk-IZQI6QQ7.js";import"./chunk-4TBGFHYX.js";import"./chunk-64FIXWFL.js";import"./chunk-CREHL4BN.js";import"./chunk-WBAPIPST.js";import"./chunk-INNDBLZE.js";import"./chunk-FCV2DPZQ.js";export{c as channelRoutes,b as getChannelManager,a as setChannelManager};
|
package/dist/chunk-3TIHZZMK.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as i}from"./chunk-6KLG4APZ.js";import{d as a}from"./chunk-REKCZ3GY.js";import{f as c,h as C}from"./chunk-WBAPIPST.js";import{c as l,h as A}from"./chunk-INNDBLZE.js";C();import{readFileSync as R,existsSync as P}from"fs";import{resolve as y}from"path";import{homedir as _}from"os";import{parse as O}from"yaml";A();var w=l("config");function E(e){return e.replace(/\$\{(\w+)}/g,(t,r)=>process.env[r]??"")}function d(e){return e.startsWith("~/")?y(_(),e.slice(2)):e}function f(e){if(typeof e=="string")return E(e);if(Array.isArray(e))return e.map(f);if(e!==null&&typeof e=="object"){let t={};for(let[r,n]of Object.entries(e))t[r]=f(n);return t}return e}function p(e,t){let r={...e};for(let n of Object.keys(t)){let s=t[n],o=e[n];s!==null&&typeof s=="object"&&!Array.isArray(s)&&o!==null&&typeof o=="object"&&!Array.isArray(o)?r[n]=p(o,s):r[n]=s}return r}function g(e){return e.defaults.deniedReadPaths&&(e.defaults.deniedReadPaths=e.defaults.deniedReadPaths.map(d)),e.defaults.sensitivePaths&&!e.defaults.deniedReadPaths&&(w.warn("config.defaults.sensitivePaths is deprecated \u2014 use config.defaults.deniedReadPaths instead. Values have been migrated automatically."),e.defaults.deniedReadPaths=e.defaults.sensitivePaths.map(d)),e}function S(){let e={};for(let t of process.argv.slice(2)){let r=t.match(/^--([a-z-]+)=(.+)$/);r&&(e[r[1]]=r[2])}return e}function h(e){let t=process.env.ADAM_PORT;t&&(e.server.port=parseInt(t,10));let r=process.env.ANTHROPIC_MODEL;r&&(e.defaults.model=r);let n=process.env.ADAM_API_KEY;return n&&(e.server.apiKey=n),e}function m(e){let t=S();return t.port&&(e.server.port=parseInt(t.port,10)),t.host&&(e.server.host=t.host),t.timeout&&(e.defaults.timeout=parseInt(t.timeout,10)),t["api-key"]&&(e.server.apiKey=t["api-key"]),e}function T(e){let t=e??c,r={};if(P(t)){let v=R(t,"utf-8"),u=O(v);u&&(r=f(u))}let n=p(i,r),s=h(n),o=m(s);return g(o)}function k(){let e=JSON.parse(JSON.stringify(i)),t=h(e),r=m(t);return g(r)}function x(){let e={},t={ANTHROPIC_API_KEY:"anthropic.apiKey",ANTHROPIC_BASE_URL:"anthropic.baseUrl",ANTHROPIC_MODEL:"anthropic.model",ANTHROPIC_DEFAULT_OPUS_MODEL:"anthropic.defaultOpusModel",ANTHROPIC_DEFAULT_SONNET_MODEL:"anthropic.defaultSonnetModel",ANTHROPIC_DEFAULT_HAIKU_MODEL:"anthropic.defaultHaikuModel",ANTHROPIC_SMALL_FAST_MODEL:"anthropic.smallFastModel",ADAM_PORT:"server.port",ADAM_API_KEY:"server.apiKey"};for(let[r,n]of Object.entries(t)){let s=process.env[r];if(s&&s.length>0)if(n==="server.port"){let o=parseInt(s,10);isNaN(o)||(e[n]=o)}else e[n]=s}return e}function Y(){try{return a().defaults}catch{return i.defaults}}function B(){try{return a().chat??i.chat}catch{return i.chat}}export{T as a,k as b,x as c,Y as d,B as e};
|
package/dist/chunk-7KCBFM2C.js
DELETED
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import{a as T,b as I}from"./chunk-42RHY3Q3.js";import{b as A,d as L}from"./chunk-CREHL4BN.js";import{g as l,h as b}from"./chunk-WBAPIPST.js";import{c as O,h as D}from"./chunk-INNDBLZE.js";import{readFileSync as v,existsSync as y}from"fs";import{fileURLToPath as k}from"url";import{dirname as F,join as d}from"path";var V=k(import.meta.url),R=F(V),_,h;function E(){let e=d(R,"..","package.json");if(y(e))return e;let r=d(R,"..","..","package.json");return y(r)?r:d(process.cwd(),"package.json")}function J(){if(_===void 0){let e=E();_=JSON.parse(v(e,"utf-8")).version}return _}function q(){if(h===void 0){let e=E();h=JSON.parse(v(e,"utf-8")).name}return h}L();D();import{dirname as w,join as H}from"path";import{fileURLToPath as C}from"url";var M=w(C(import.meta.url)),P=H(M,"..");var $=P,rt=O("cli:register-ai-digest"),p="ai-hourly-digest";function U(){try{if(I(p)){console.log(`[INFO] AI Digest template already exists (${p})`);return}}catch{}let e={id:p,name:"AI Hourly Digest",description:"\u6BCF\u5C0F\u65F6\u641C\u7D22 AI \u524D\u6CBF\u6587\u7AE0\uFF0C\u603B\u7ED3\u540E\u4FDD\u5B58\u5230 Omnifocus",trigger:{type:"cron",cron:"0 * * * *"},enabled:!0,steps:[{id:"search_ai_news",prompt:`\u641C\u7D22\u8FC7\u53BB 24 \u5C0F\u65F6\u5185\u5173\u4E8E AI/\u4EBA\u5DE5\u667A\u80FD\u7684\u6700\u65B0\u524D\u6CBF\u6587\u7AE0\u3002
|
|
2
|
-
|
|
3
|
-
\u641C\u7D22\u6765\u6E90:
|
|
4
|
-
1. Hacker News AI \u677F\u5757 (https://news.ycombinator.com/front?day=1)
|
|
5
|
-
2. ArXiv cs.AI \u6700\u65B0\u8BBA\u6587 (https://arxiv.org/list/cs.AI/recent)
|
|
6
|
-
3. Reddit r/MachineLearning \u70ED\u95E8\u5E16\u5B50
|
|
7
|
-
|
|
8
|
-
\u627E\u51FA\u4E00\u7BC7\u6700\u6709\u4EF7\u503C\u3001\u6700\u6709\u6280\u672F\u6DF1\u5EA6\u7684\u6587\u7AE0\u3002
|
|
9
|
-
|
|
10
|
-
\u8F93\u51FA\u683C\u5F0F:
|
|
11
|
-
- \u6807\u9898\uFF1A[\u6587\u7AE0\u6807\u9898]
|
|
12
|
-
- \u6765\u6E90\uFF1A[\u7F51\u7AD9/\u5E73\u53F0\u540D\u79F0]
|
|
13
|
-
- \u94FE\u63A5\uFF1A[\u5B8C\u6574 URL]
|
|
14
|
-
- \u6838\u5FC3\u4EF7\u503C\uFF1A[1-2 \u53E5\u8BDD\u8BF4\u660E\u4E3A\u4EC0\u4E48\u8FD9\u7BC7\u6587\u7AE0\u503C\u5F97\u770B]`},{id:"summarize_article",dependsOn:["search_ai_news"],prompt:`\u9605\u8BFB\u5E76\u603B\u7ED3\u8FD9\u7BC7\u6587\u7AE0\u3002
|
|
15
|
-
|
|
16
|
-
\u6587\u7AE0\u4FE1\u606F:
|
|
17
|
-
{{search_ai_news.result}}
|
|
18
|
-
|
|
19
|
-
\u8BF7:
|
|
20
|
-
1. \u7528 WebFetch \u83B7\u53D6\u6587\u7AE0\u5B8C\u6574\u5185\u5BB9
|
|
21
|
-
2. \u63D0\u53D6\u6838\u5FC3\u89C2\u70B9\u548C\u6280\u672F\u7EC6\u8282
|
|
22
|
-
3. \u7528\u4E2D\u6587\u5199\u51FA 300-500 \u5B57\u7684\u603B\u7ED3
|
|
23
|
-
|
|
24
|
-
\u603B\u7ED3\u7ED3\u6784:
|
|
25
|
-
## \u6838\u5FC3\u53D1\u73B0
|
|
26
|
-
[\u6587\u7AE0\u6700\u91CD\u8981\u7684\u53D1\u73B0/\u521B\u65B0\u70B9]
|
|
27
|
-
|
|
28
|
-
## \u6280\u672F\u7EC6\u8282
|
|
29
|
-
[\u5173\u952E\u7684\u6280\u672F\u65B9\u6CD5/\u5B9E\u73B0\u7EC6\u8282]
|
|
30
|
-
|
|
31
|
-
## \u5F71\u54CD/\u610F\u4E49
|
|
32
|
-
[\u8FD9\u9879\u5DE5\u4F5C\u7684\u610F\u4E49\u6216\u5BF9\u884C\u4E1A\u7684\u5F71\u54CD]
|
|
33
|
-
|
|
34
|
-
## \u539F\u6587\u94FE\u63A5
|
|
35
|
-
[\u6587\u7AE0 URL]`},{id:"save_to_omnifocus",dependsOn:["summarize_article"],prompt:`\u5C06\u6587\u7AE0\u603B\u7ED3\u4FDD\u5B58\u5230 Omnifocus\u3002
|
|
36
|
-
|
|
37
|
-
\u603B\u7ED3\u5185\u5BB9:
|
|
38
|
-
{{summarize_article.result}}
|
|
39
|
-
|
|
40
|
-
\u63D0\u53D6\u6587\u7AE0\u6807\u9898\u548C\u5B8C\u6574\u603B\u7ED3\uFF0C\u7136\u540E\u6267\u884C\u4EE5\u4E0B\u547D\u4EE4\u6DFB\u52A0\u5230 Omnifocus Inbox\uFF1A
|
|
41
|
-
|
|
42
|
-
osascript ${$}/scripts/add-to-omnifocus.applescript "[\u6587\u7AE0\u6807\u9898] AI \u524D\u6CBF\u901F\u9012" "[\u5B8C\u6574\u603B\u7ED3\u5185\u5BB9]"
|
|
43
|
-
|
|
44
|
-
\u6CE8\u610F\uFF1A
|
|
45
|
-
- \u5C06 [\u6587\u7AE0\u6807\u9898] \u66FF\u6362\u4E3A\u5B9E\u9645\u6807\u9898
|
|
46
|
-
- \u5C06 [\u5B8C\u6574\u603B\u7ED3\u5185\u5BB9] \u66FF\u6362\u4E3A\u5B8C\u6574\u7684\u603B\u7ED3\u6587\u672C\uFF08\u5305\u542B\u6838\u5FC3\u53D1\u73B0\u3001\u6280\u672F\u7EC6\u8282\u3001\u5F71\u54CD/\u610F\u4E49\u548C\u539F\u6587\u94FE\u63A5\uFF09
|
|
47
|
-
- \u603B\u7ED3\u5185\u5BB9\u4F7F\u7528\u6362\u884C\u7B26\u5206\u9694\u5404\u90E8\u5206
|
|
48
|
-
|
|
49
|
-
\u5B8C\u6210\u540E\u8F93\u51FA\uFF1A\u5DF2\u4FDD\u5B58\u5230 Omnifocus\uFF1A[\u4EFB\u52A1\u6807\u9898]`}],config:{timeout:300},tags:["ai","digest","hourly","automation"],createdAt:Date.now()};T(e),console.log(`[INFO] Registered AI Hourly Digest task template (${p})`),console.log("[INFO] Cron schedule: 0 * * * * (every hour at minute 0)")}import.meta.url===`file://${process.argv[1]}`&&(console.log("Initializing database..."),A(),console.log("Registering AI Digest template..."),U(),console.log("Done."),process.exit(0));b();import{readFileSync as x,writeFileSync as j,existsSync as N}from"fs";var u={ANTHROPIC_API_KEY:"anthropic.apiKey",ANTHROPIC_BASE_URL:"anthropic.baseUrl",ANTHROPIC_MODEL:"anthropic.model",ANTHROPIC_DEFAULT_OPUS_MODEL:"anthropic.defaultOpusModel",ANTHROPIC_DEFAULT_SONNET_MODEL:"anthropic.defaultSonnetModel",ANTHROPIC_DEFAULT_HAIKU_MODEL:"anthropic.defaultHaikuModel",ANTHROPIC_SMALL_FAST_MODEL:"anthropic.smallFastModel"},at=Object.fromEntries(Object.entries(u).map(([e,r])=>[r,e]));function W(){if(!N(l))return null;let e=x(l,"utf-8"),r={};for(let s of e.split(`
|
|
50
|
-
`)){let o=s.trim();if(!o||o.startsWith("#"))continue;let c=o.startsWith("export ")?o.slice(7).trim():o,i=c.indexOf("=");if(i===-1)continue;let n=c.slice(0,i).trim();if(!(n in u))continue;let t=c.slice(i+1).trim();(t.startsWith('"')&&t.endsWith('"')||t.startsWith("'")&&t.endsWith("'"))&&(t=t.slice(1,-1)),!(t.includes("$")&&(t=t.replace(/\$\{(\w+)\}|\$(\w+)/g,(m,f,g)=>{let a=f??g;return r[a]??process.env[a]??""}),!t))&&(r[n]=t)}return r}function lt(e){let r=W();if(!r)return[];let s=[];for(let[o,c]of Object.entries(u)){let i=e[c],n=r[o];if(n===void 0)continue;let t=i?String(i):"";t!==n&&s.push({configPath:c,envKey:o,dbValue:t,envValue:n})}return s}function ft(e){if(!N(l))return 0;let s=x(l,"utf-8").split(`
|
|
51
|
-
`),o=0,c=new Set;for(let i=0;i<s.length;i++){let n=s[i].trim();if(!n||n.startsWith("#"))continue;let t=n.startsWith("export ")?n.slice(7).trim():n,m=t.indexOf("=");if(m===-1)continue;let f=t.slice(0,m).trim(),g=u[f];if(!g)continue;let a=e[g];if(a!=null&&String(a).length>0){let S=n.startsWith("export ")?"export ":"";s[i]=`${S}${f}=${String(a)}`,c.add(f),o++}}for(let[i,n]of Object.entries(u)){if(c.has(i))continue;let t=e[n];t&&String(t).length>0&&(s.push(`${i}=${String(t)}`),o++)}return o>0&&j(l,s.join(`
|
|
52
|
-
`)),o}export{P as a,J as b,q as c,at as d,W as e,lt as f,ft as g,U as h};
|
package/dist/chunk-FXFHGIY6.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import{a as u,g as O}from"./chunk-QMKQBU3R.js";import{b as o,d as v}from"./chunk-CREHL4BN.js";import{b as a,h}from"./chunk-WBAPIPST.js";import{c as m,e as R}from"./chunk-FCV2DPZQ.js";import*as _ from"os";import*as g from"path";function d(e){return e.startsWith("~/")||e==="~"?g.join(_.homedir(),e.slice(1)):e}var S=m(()=>{"use strict";h()});var x={};R(x,{createRole:()=>E,deleteRole:()=>J,getRole:()=>N,getRoleByName:()=>b,listRoles:()=>T,updateRole:()=>w,validateAdditionalDirectories:()=>p});import{existsSync as y}from"fs";import{resolve as c}from"path";function p(e,n){for(let s of e){let i=typeof s=="string"?s:s.path;if(!i.startsWith("/")&&!i.startsWith("~/")&&i!=="~")throw new Error(`additionalDirectories must be absolute paths: '${i}' is not absolute`);let r=c(d(i));if(!r.startsWith("/"))throw new Error(`additionalDirectories must be absolute paths: '${i}' is not absolute`);for(let t of a){let l=c(d(t));if(r.startsWith(l))throw new Error(`additionalDirectories cannot include hardcoded denied path: '${i}' matches '${t}'`)}if(n?.length)for(let t of n){let l=c(d(t));if(r.startsWith(l)||l.startsWith(r))throw new Error(`additionalDirectories cannot overlap with deniedReadPaths: '${i}' conflicts with '${t}'`)}if(!y(r))throw new Error(`additionalDirectories path does not exist: '${i}'`)}}function f(e){return{id:e.id,name:e.name,cagPrompt:e.cag_prompt,learnedRules:e.learned_rules?JSON.parse(e.learned_rules):[],memoryStreamId:e.memory_stream_id,status:e.status,performanceScore:e.performance_score??void 0,preferences:e.preferences?JSON.parse(e.preferences):{},createdAt:e.created_at,updatedAt:e.updated_at??void 0,allowedTools:e.allowed_tools?JSON.parse(e.allowed_tools):void 0,disallowedTools:e.disallowed_tools?JSON.parse(e.disallowed_tools):void 0,evaluationCriteria:e.evaluation_criteria?JSON.parse(e.evaluation_criteria):void 0,executionMode:e.execution_mode??void 0,model:e.model??void 0,maxBudgetUsd:e.max_budget_usd??void 0,approvalRequired:e.approval_required?JSON.parse(e.approval_required):void 0,source:e.source??void 0,additionalDirectories:(()=>{if(e.additional_directories!==null)try{let n=JSON.parse(e.additional_directories);return Array.isArray(n)?n.map(s=>typeof s=="string"?{path:s}:s):void 0}catch{return}})(),allowedChannels:e.allowed_channels?JSON.parse(e.allowed_channels):void 0,mcpServers:e.mcp_servers?JSON.parse(e.mcp_servers):void 0,inheritUserSettings:e.inherit_user_settings===1?!0:void 0,permissionMode:e.permission_mode??void 0,allowedBashPatterns:e.allowed_bash_patterns?JSON.parse(e.allowed_bash_patterns):void 0,deniedBashPatterns:e.denied_bash_patterns?JSON.parse(e.denied_bash_patterns):void 0}}function E(e){let n=u("defaults.deniedReadPaths")??[...a];e.additionalDirectories&&p(e.additionalDirectories,n),o().prepare(`
|
|
2
|
-
INSERT INTO roles (id, name, cag_prompt, learned_rules, memory_stream_id, status,
|
|
3
|
-
performance_score, preferences, created_at, updated_at,
|
|
4
|
-
allowed_tools, disallowed_tools, evaluation_criteria, execution_mode, model,
|
|
5
|
-
max_budget_usd, approval_required, source, additional_directories, allowed_channels, mcp_servers, inherit_user_settings,
|
|
6
|
-
permission_mode, allowed_bash_patterns, denied_bash_patterns)
|
|
7
|
-
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
|
|
8
|
-
`).run(e.id,e.name,e.cagPrompt,JSON.stringify(e.learnedRules),e.memoryStreamId,e.status,e.performanceScore??null,e.preferences?JSON.stringify(e.preferences):null,e.createdAt,e.updatedAt??null,e.allowedTools?JSON.stringify(e.allowedTools):null,e.disallowedTools?JSON.stringify(e.disallowedTools):null,e.evaluationCriteria?JSON.stringify(e.evaluationCriteria):null,e.executionMode??null,e.model??null,e.maxBudgetUsd??null,e.approvalRequired?JSON.stringify(e.approvalRequired):null,e.source??null,e.additionalDirectories?JSON.stringify(e.additionalDirectories):null,e.allowedChannels?JSON.stringify(e.allowedChannels):null,e.mcpServers?JSON.stringify(e.mcpServers):null,e.inheritUserSettings?1:0,e.permissionMode??null,e.allowedBashPatterns?JSON.stringify(e.allowedBashPatterns):null,e.deniedBashPatterns?JSON.stringify(e.deniedBashPatterns):null)}function N(e){let s=o().prepare("SELECT * FROM roles WHERE id = ?").get(e);return s?f(s):void 0}function b(e){let s=o().prepare("SELECT * FROM roles WHERE name = ?").get(e);return s?f(s):void 0}function w(e,n){let s=o(),i=[],r=[];if("name"in n&&(i.push("name = ?"),r.push(n.name)),"cagPrompt"in n&&(i.push("cag_prompt = ?"),r.push(n.cagPrompt)),"learnedRules"in n&&(i.push("learned_rules = ?"),r.push(JSON.stringify(n.learnedRules))),"memoryStreamId"in n&&(i.push("memory_stream_id = ?"),r.push(n.memoryStreamId)),"status"in n&&(i.push("status = ?"),r.push(n.status)),"performanceScore"in n&&(i.push("performance_score = ?"),r.push(n.performanceScore??null)),"preferences"in n&&(i.push("preferences = ?"),r.push(n.preferences?JSON.stringify(n.preferences):null)),"updatedAt"in n&&(i.push("updated_at = ?"),r.push(n.updatedAt??null)),"allowedTools"in n&&(i.push("allowed_tools = ?"),r.push(n.allowedTools?JSON.stringify(n.allowedTools):null)),"disallowedTools"in n&&(i.push("disallowed_tools = ?"),r.push(n.disallowedTools?JSON.stringify(n.disallowedTools):null)),"evaluationCriteria"in n&&(i.push("evaluation_criteria = ?"),r.push(n.evaluationCriteria?JSON.stringify(n.evaluationCriteria):null)),"executionMode"in n&&(i.push("execution_mode = ?"),r.push(n.executionMode??null)),"model"in n&&(i.push("model = ?"),r.push(n.model??null)),"maxBudgetUsd"in n&&(i.push("max_budget_usd = ?"),r.push(n.maxBudgetUsd??null)),"approvalRequired"in n&&(i.push("approval_required = ?"),r.push(n.approvalRequired?JSON.stringify(n.approvalRequired):null)),"source"in n&&(i.push("source = ?"),r.push(n.source??null)),"additionalDirectories"in n){let t=u("defaults.deniedReadPaths")??[...a];n.additionalDirectories&&p(n.additionalDirectories,t),i.push("additional_directories = ?"),r.push(n.additionalDirectories?JSON.stringify(n.additionalDirectories):null)}"allowedChannels"in n&&(i.push("allowed_channels = ?"),r.push(n.allowedChannels?JSON.stringify(n.allowedChannels):null)),"mcpServers"in n&&(i.push("mcp_servers = ?"),r.push(n.mcpServers?JSON.stringify(n.mcpServers):null)),"inheritUserSettings"in n&&(i.push("inherit_user_settings = ?"),r.push(n.inheritUserSettings?1:0)),"permissionMode"in n&&(i.push("permission_mode = ?"),r.push(n.permissionMode??null)),"allowedBashPatterns"in n&&(i.push("allowed_bash_patterns = ?"),r.push(n.allowedBashPatterns?JSON.stringify(n.allowedBashPatterns):null)),"deniedBashPatterns"in n&&(i.push("denied_bash_patterns = ?"),r.push(n.deniedBashPatterns?JSON.stringify(n.deniedBashPatterns):null)),i.length!==0&&(r.push(e),s.prepare(`UPDATE roles SET ${i.join(", ")} WHERE id = ?`).run(...r))}function T(e,n=100,s=0){let i=o(),r="SELECT * FROM roles",t=[];return e&&(r+=" WHERE status = ?",t.push(e)),r+=" ORDER BY created_at ASC LIMIT ? OFFSET ?",t.push(n,s),i.prepare(r).all(...t).map(f)}function J(e){o().prepare("DELETE FROM roles WHERE id = ?").run(e)}var D=m(()=>{v();h();S();O()});export{d as a,S as b,p as c,E as d,N as e,b as f,w as g,T as h,J as i,x as j,D as k};
|