@netnodeag/kraftwerk 0.45.0 → 0.45.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/editor-DITzQiO1.js","assets/dist-H3rerbMg.js","assets/dist-CIjxdHNW.js","assets/dist-CGccQQRD.js","assets/dist-DgaFP-8o.js","assets/dist-CPlSMtdY.js","assets/editor-B1Jq9YIq.css"])))=>i.map(i=>d[i]);
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/editor-pqKf5qTC.js","assets/dist-H3rerbMg.js","assets/dist-7LJE9NHT.js","assets/dist-DpiosTVE.js","assets/dist-DO2Y-ond.js","assets/dist-CPlSMtdY.js","assets/editor-B1Jq9YIq.css"])))=>i.map(i=>d[i]);
2
2
  var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),s=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},c=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},l=(n,r,o)=>(o=n==null?{}:e(i(n)),c(r||!n||!n.__esModule||!a.call(n,`default`)?t(o,`default`,{value:n,enumerable:!0}):o,n));(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var u=o((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 ee=/\/+/g;function te(e,t){return typeof e==`object`&&e&&e.key!=null?k(``+e.key):t.toString(36)}function A(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 ne(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,ne(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+te(e,0):a,S(o)?(i=``,c!=null&&(i=c.replace(ee,`$&/`)+`/`),ne(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(ee,`$&/`)+`/`)+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+te(a,u),c+=ne(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+te(a,u++),c+=ne(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return ne(A(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 j(e,t,n){if(e==null)return e;var r=[],i=0;return ne(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function re(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 M=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)},N={map:j,forEach:function(e,t,n){j(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return j(e,function(){t++}),t},toArray:function(e){return j(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=N,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:re}},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,M)}catch(e){M(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.8`})),d=o(((e,t)=>{t.exports=u()})),f=o((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 k=new MessageChannel,ee=k.port2;k.port1.onmessage=D,O=function(){ee.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}}}})),p=o(((e,t)=>{t.exports=f()})),m=o((e=>{var t=d();function n(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 r(){}var i={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},a=Symbol.for(`react.portal`);function o(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}var s=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(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=i,e.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(n(299));return o(e,t,null,r)},e.flushSync=function(e){var t=s.T,n=i.p;try{if(s.T=null,i.p=2,e)return e()}finally{s.T=t,i.p=n,i.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,i.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&i.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin),a=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?i.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:a,fetchPriority:o}):n===`script`&&i.d.X(e,{crossOrigin:r,integrity:a,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=c(t.as,t.crossOrigin);i.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??i.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=c(n,t.crossOrigin);i.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=c(t.as,t.crossOrigin);i.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 i.d.m(e)}},e.requestFormReset=function(e){i.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return s.H.useFormState(e,t,n)},e.useFormStatus=function(){return s.H.useHostTransitionStatus()},e.version=`19.2.8`})),h=o(((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=m()})),g=o((e=>{var t=p(),n=d(),r=h();function i(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 a(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function o(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 s(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 c(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 l(e){if(o(e)!==e)throw Error(i(188))}function u(e){var t=e.alternate;if(!t){if(t=o(e),t===null)throw Error(i(188));return t===e?e:null}for(var n=e,r=t;;){var a=n.return;if(a===null)break;var s=a.alternate;if(s===null){if(r=a.return,r!==null){n=r;continue}break}if(a.child===s.child){for(s=a.child;s;){if(s===n)return l(a),e;if(s===r)return l(a),t;s=s.sibling}throw Error(i(188))}if(n.return!==r.return)n=a,r=s;else{for(var c=!1,u=a.child;u;){if(u===n){c=!0,n=a,r=s;break}if(u===r){c=!0,r=a,n=s;break}u=u.sibling}if(!c){for(u=s.child;u;){if(u===n){c=!0,n=s,r=a;break}if(u===r){c=!0,r=s,n=a;break}u=u.sibling}if(!c)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(n.tag!==3)throw Error(i(188));return n.stateNode.current===n?e:t}function f(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=f(e),t!==null)return t;e=e.sibling}return null}var m=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`),k=Symbol.for(`react.activity`),ee=Symbol.for(`react.memo_cache_sentinel`),te=Symbol.iterator;function A(e){return typeof e!=`object`||!e?null:(e=te&&e[te]||e[`@@iterator`],typeof e==`function`?e:null)}var ne=Symbol.for(`react.client.reference`);function j(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===ne?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 k: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?j(e.type)||`Memo`:t;case O:t=e._payload,e=e._init;try{return j(e(t))}catch{}}return null}var re=Array.isArray,M=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,N=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ie={pending:!1,data:null,method:null,action:null},P=[],ae=-1;function oe(e){return{current:e}}function F(e){0>ae||(e.current=P[ae],P[ae]=null,ae--)}function I(e,t){ae++,P[ae]=e.current,e.current=t}var se=oe(null),ce=oe(null),le=oe(null),ue=oe(null);function de(e,t){switch(I(le,t),I(ce,e),I(se,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}}F(se),I(se,e)}function L(){F(se),F(ce),F(le)}function fe(e){e.memoizedState!==null&&I(ue,e);var t=se.current,n=Hd(t,e.type);t!==n&&(I(ce,e),I(se,n))}function R(e){ce.current===e&&(F(se),F(ce)),ue.current===e&&(F(ue),Qf._currentValue=ie)}var pe,me;function he(e){if(pe===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);pe=t&&t[1]||``,me=-1<e.stack.indexOf(`
3
3
  at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
4
4
  `+pe+e+me}var ge=!1;function _e(e,t){if(!e||ge)return``;ge=!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(`
@@ -216,4 +216,4 @@ Instructions this agent follows when the skill applies or is invoked with /<name
216
216
  `).map((e,t)=>(0,S.jsxs)(`span`,{className:Qa(e),children:[e||` `,`
217
217
  `]},t)),r&&(0,S.jsxs)(`span`,{className:`d-meta`,children:[`… diff truncated, see the rest in a terminal`,`
218
218
  `]})]}):(0,S.jsx)(`div`,{className:`git-diff`,children:`no textual diff (binary or empty)`})}function eo(){let[e,t]=(0,v.useState)(null),[n,r]=(0,v.useState)(new Set),[i,a]=(0,v.useState)(new Set),[o,s]=(0,v.useState)(``),[c,l]=(0,v.useState)(``),[u,d]=(0,v.useState)(``),[f,p]=(0,v.useState)(``),m=(0,v.useCallback)(async()=>{try{let e=await fetch(`/api/git`,{cache:`no-store`});e.ok&&t(await e.json())}catch{}},[]);(0,v.useEffect)(()=>{let e=!0,t,n=async()=>{await m(),e&&(t=setTimeout(n,6e3))};return n(),()=>{e=!1,clearTimeout(t)}},[m]),(0,v.useEffect)(()=>{if(!e?.files)return;let t=new Set(e.files.filter(e=>e.syncable).map(e=>e.path));r(e=>{let n=new Set([...e].filter(e=>t.has(e)));return n.size===e.size?e:n})},[e]);let h=async(e,t)=>{l(e),d(``),p(``);try{let n=await ye(`/api/git/${e}`,t);n.ok?p(e===`push`?`pushed`:e===`pull`?`pulled`:`fetched`):d(n.error||`${e} failed`)}catch(t){d(t.message||`${e} failed`)}finally{l(``)}m()},g=async()=>{l(`commit`),d(``),p(``);try{let e=await ye(`/api/git/commit`,{paths:[...n],message:o});e.ok?(p(`committed ${n.size} file${n.size===1?``:`s`}`),r(new Set),s(``)):d(e.error||`commit failed`)}catch(e){d(e.message||`commit failed`)}finally{l(``)}m()};if(!e)return(0,S.jsx)(`div`,{className:`settings-screen`,children:(0,S.jsx)(`div`,{className:`ws-empty`,children:`loading…`})});if(!e.enabled)return(0,S.jsxs)(`div`,{className:`settings-screen`,children:[(0,S.jsx)(`div`,{className:`settings-head`,children:(0,S.jsxs)(`h1`,{children:[(0,S.jsx)(C,{name:`cloud_sync`,className:`ms-lg`}),` Git sync`]})}),(0,S.jsx)(`section`,{className:`panel`,children:(0,S.jsxs)(`div`,{className:`ws-empty`,children:[`Git sync is off. Turn it on in `,(0,S.jsx)(`a`,{href:`#/settings`,children:`settings`}),`, or add a `,(0,S.jsx)(`code`,{children:`git:`}),` block to kraftwerk.yml.`]})})]});let _=(e.files??[]).filter(e=>e.syncable),y=(e.files??[]).filter(e=>!e.syncable),b=(e,t)=>r(n=>{let r=new Set(n);return t?r.add(e):r.delete(e),r});return(0,S.jsxs)(`div`,{className:`settings-screen ws-screen`,children:[(0,S.jsxs)(`div`,{className:`settings-head`,children:[(0,S.jsxs)(`h1`,{children:[(0,S.jsx)(C,{name:`cloud_sync`,className:`ms-lg`}),` Git sync`]}),(0,S.jsx)(`span`,{className:`spacer`}),f&&(0,S.jsxs)(`span`,{className:`settings-saved`,children:[(0,S.jsx)(C,{name:`check`,className:`ms-sm`}),` `,f]}),u&&(0,S.jsx)(`span`,{className:`settings-err`,children:u})]}),(0,S.jsxs)(`section`,{className:`panel`,children:[(0,S.jsxs)(`div`,{className:`panel-head`,children:[(0,S.jsx)(`span`,{className:`microlabel`,children:`branch`}),(0,S.jsx)(`span`,{className:`spacer`}),e.lastFetch&&(0,S.jsxs)(`span`,{className:`settings-note`,title:e.lastFetch,children:[`fetched `,Te(e.lastFetch)]}),e.lastError&&(0,S.jsxs)(`span`,{className:`settings-err git-sync-err`,title:e.lastError,children:[(0,S.jsx)(C,{name:`cloud_off`,className:`ms-sm`}),` `,e.lastError.split(`
219
- `)[0]]})]}),e.error?(0,S.jsxs)(`div`,{className:`ws-empty ws-load-error`,children:[(0,S.jsx)(C,{name:`error`,className:`ms-sm`}),` `,e.error]}):(0,S.jsxs)(`div`,{className:`git-head`,children:[(0,S.jsxs)(`div`,{className:`git-branch`,children:[(0,S.jsx)(C,{name:`account_tree`,className:`ms-sm`}),(0,S.jsx)(`strong`,{children:e.branch}),e.upstream?(0,S.jsxs)(`span`,{className:`settings-note`,children:[`tracking `,e.upstream]}):(0,S.jsx)(`span`,{className:`settings-note`,children:`no upstream yet, push sets one`})]}),(0,S.jsxs)(`div`,{className:`git-counts`,children:[e.diverged&&(0,S.jsx)(`span`,{className:`git-diverged`,children:`diverged, resolve in a terminal`}),!!e.behind&&(0,S.jsxs)(`span`,{className:`git-behind`,children:[e.behind,` behind`]}),!!e.ahead&&(0,S.jsxs)(`span`,{className:`git-ahead`,children:[e.ahead,` ahead`]}),!e.ahead&&!e.behind&&(0,S.jsx)(`span`,{className:`settings-note`,children:`up to date`})]}),(0,S.jsxs)(`div`,{className:`ws-actions`,children:[(0,S.jsxs)(`button`,{className:`ws-btn`,disabled:!!c,onClick:()=>void h(`fetch`),children:[(0,S.jsx)(C,{name:c===`fetch`?`progress_activity`:`refresh`,className:`ms-sm`}),` fetch`]}),(0,S.jsxs)(`button`,{className:`ws-btn`,disabled:!!c||!e.behind||e.diverged,title:e.diverged?`Diverged. Resolve in a terminal.`:`Fast-forward to the remote`,onClick:()=>void h(`pull`),children:[(0,S.jsx)(C,{name:c===`pull`?`progress_activity`:`download`,className:`ms-sm`}),` pull`]}),(0,S.jsxs)(`button`,{className:`ws-btn primary`,disabled:!!c||!e.ahead&&!!e.upstream,title:e.upstream?`Push to the upstream`:`Push and set the upstream`,onClick:()=>void h(`push`),children:[(0,S.jsx)(C,{name:c===`push`?`progress_activity`:`upload`,className:`ms-sm`}),` push`]})]})]})]}),(0,S.jsxs)(`section`,{className:`panel`,children:[(0,S.jsxs)(`div`,{className:`panel-head`,children:[(0,S.jsx)(`span`,{className:`microlabel`,children:`changes`}),(0,S.jsx)(`span`,{className:`spacer`}),(0,S.jsx)(`span`,{className:`settings-note`,children:_.length===0?`workspace clean`:`${n.size} of ${_.length} selected`})]}),_.length===0&&y.length===0&&(0,S.jsx)(`div`,{className:`ws-empty`,children:`Nothing changed under the workspace paths.`}),_.map(e=>(0,S.jsxs)(`div`,{className:`git-row`,children:[(0,S.jsx)(`label`,{className:`git-pick`,children:(0,S.jsx)(`input`,{type:`checkbox`,checked:n.has(e.path),onChange:t=>b(e.path,t.target.checked)})}),(0,S.jsxs)(`button`,{className:`git-file`,onClick:()=>a(t=>{let n=new Set(t);return n.has(e.path)?n.delete(e.path):n.add(e.path),n}),children:[(0,S.jsx)(C,{name:i.has(e.path)?`expand_more`:`chevron_right`,className:`ms-sm`}),(0,S.jsx)(`span`,{className:`git-status s-${e.status}`,children:e.status}),(0,S.jsx)(`span`,{className:`git-path`,children:e.path})]}),i.has(e.path)&&(0,S.jsx)($a,{file:e.path})]},e.path)),_.length>0&&(0,S.jsxs)(`div`,{className:`git-commit`,children:[(0,S.jsx)(`input`,{className:`git-message`,placeholder:`Commit message`,value:o,onChange:e=>s(e.target.value),onKeyDown:e=>{e.key===`Enter`&&!c&&o.trim()&&n.size>0&&g()}}),(0,S.jsx)(`button`,{className:`ws-btn`,disabled:n.size===_.length,onClick:()=>r(new Set(_.map(e=>e.path))),children:`select all`}),(0,S.jsxs)(`button`,{className:`ws-btn primary`,disabled:!!c||n.size===0||!o.trim(),onClick:()=>void g(),children:[(0,S.jsx)(C,{name:c===`commit`?`progress_activity`:`check`,className:`ms-sm`}),`commit `,n.size||``]})]}),y.length>0&&(0,S.jsxs)(`details`,{className:`git-blocked`,children:[(0,S.jsxs)(`summary`,{children:[y.length,e.blockedHidden?`+`:``,` change`,y.length===1&&!e.blockedHidden?``:`s`,` outside the workspace paths`]}),y.map(e=>(0,S.jsxs)(`div`,{className:`git-row blocked`,children:[(0,S.jsx)(`span`,{className:`git-status s-blocked`,children:e.status}),(0,S.jsx)(`span`,{className:`git-path`,children:e.path}),(0,S.jsx)(`span`,{className:`settings-note`,children:e.reason})]},e.path)),!!e.blockedHidden&&(0,S.jsx)(`div`,{className:`git-row blocked`,children:(0,S.jsxs)(`span`,{className:`settings-note`,children:[`and `,e.blockedHidden,` more, not listed`]})})]})]}),(0,S.jsxs)(`p`,{className:`settings-note`,children:[`Synced paths: `,(e.scope??[]).map((e,t)=>(0,S.jsxs)(`span`,{children:[t>0&&`, `,(0,S.jsx)(`code`,{children:e})]},e)),`. Run artifacts and files like `,(0,S.jsx)(`code`,{children:`.env`}),` are never staged.`,` `,e.interval?`Fetches every ${Xa(e.interval)}${e.autosync===`pull`?` and fast-forwards when the working tree is clean`:``}. `:`Background fetching is off. `,`Commit and push are always manual.`]})]})}var to=e=>e.replace(/^https?:\/\//,``).replace(/^git@([^:]+):/,`$1/`).replace(/\.git$/,``),no=e=>e.error?{label:`unreadable`,cls:`missing`}:e.dirty?{label:`${e.dirty} changed`,cls:`died`}:e.ahead?{label:`${e.ahead} to push`,cls:`running`}:e.behind?{label:`${e.behind} behind`,cls:`stopped`}:{label:`clean`,cls:`running`},ro=e=>!!(e.error||e.dirty||e.ahead===void 0||e.ahead);function io(){let[e,t]=(0,v.useState)(null),[n,r]=(0,v.useState)(``),[i,a]=(0,v.useState)({}),[o,s]=(0,v.useState)({}),[c,l]=(0,v.useState)(null),[u,d]=(0,v.useState)(``),[f,p]=(0,v.useState)(``),[m,h]=(0,v.useState)(``),[g,_]=(0,v.useState)(!1),[y,b]=(0,v.useState)(``),x=P(),w=(0,v.useCallback)(async()=>{try{let e=await fetch(`/api/repos`,{cache:`no-store`});if(!e.ok)throw Error(`HTTP ${e.status}`);t(await e.json()),r(``)}catch(e){r(e.message||`could not load repositories`)}},[]);(0,v.useEffect)(()=>{let e=!0,t,n=async()=>{await w(),e&&(t=setTimeout(n,15e3))};return n(),()=>{e=!1,clearTimeout(t)}},[w]);let T=async(e,t,n=!1)=>{a(n=>({...n,[e]:t})),s(t=>({...t,[e]:``})),l(null);try{let r=t===`update`?await fetch(`/api/repos/${encodeURIComponent(e)}/update`,{method:`POST`}):await fetch(`/api/repos/${encodeURIComponent(e)}${n?`?force=1`:``}`,{method:`DELETE`}),i=await r.json();if(!r.ok||!i.ok)throw Error(i.error||`failed`);i.error&&s(t=>({...t,[e]:i.error}))}catch(t){s(n=>({...n,[e]:t.message}))}finally{a(t=>{let n={...t};return delete n[e],n}),w()}},E=async e=>{if(e.preventDefault(),u.trim()&&!g){_(!0),b(``);try{let e=await fetch(`/api/repos`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({url:u.trim(),name:f.trim()||void 0,branch:m.trim()||void 0})}),t=await e.json();if(!e.ok)throw Error(t.error||`clone failed`);d(``),p(``),h(``),await w()}catch(e){b(e.message)}finally{_(!1)}}},D=[...e?.repos??[]].sort((e,t)=>(t.updatedAt??``).localeCompare(e.updatedAt??``));return(0,S.jsxs)(`div`,{className:`settings-screen ws-screen repos-screen`,children:[(0,S.jsxs)(`div`,{className:`settings-head`,children:[(0,S.jsxs)(`h1`,{children:[(0,S.jsx)(C,{name:`source`,className:`ms-lg`}),` Repositories`]}),(0,S.jsx)(`span`,{className:`spacer`}),e?.enabled&&(0,S.jsxs)(`span`,{className:`settings-note`,children:[D.length,` cloned`]}),n&&(0,S.jsx)(`span`,{className:`settings-err`,children:n})]}),e&&!e.enabled&&(0,S.jsx)(`section`,{className:`panel`,children:(0,S.jsx)(`div`,{className:`ws-empty`,children:e.error&&!/are off/.test(e.error)?(0,S.jsx)(`span`,{className:`settings-err`,children:e.error}):(0,S.jsxs)(S.Fragment,{children:[`Repositories are off. Turn them on in `,(0,S.jsx)(`a`,{href:`#/settings`,children:`settings`}),` or add a `,(0,S.jsx)(`code`,{children:`repos:`}),` block to kraftwerk.yml.`]})})}),e?.enabled&&(0,S.jsxs)(`section`,{className:`panel`,children:[(0,S.jsxs)(`div`,{className:`panel-head`,children:[(0,S.jsx)(`span`,{className:`microlabel`,children:`add a repository`}),(0,S.jsx)(`span`,{className:`spacer`}),(0,S.jsxs)(`span`,{className:`settings-note`,children:[`clones into `,(0,S.jsx)(`code`,{title:e.root,children:e.root})]})]}),(0,S.jsxs)(`form`,{className:`agent-form`,onSubmit:e=>void E(e),children:[(0,S.jsxs)(`div`,{className:`agent-form-row`,children:[(0,S.jsxs)(`label`,{className:`agent-field`,style:{flex:2},children:[`url`,(0,S.jsx)(`input`,{value:u,placeholder:`https://github.com/org/repo.git, git@host:org/repo.git or github:org/repo`,onChange:e=>d(e.target.value),autoFocus:!0})]}),(0,S.jsxs)(`label`,{className:`agent-field`,style:{flex:1},children:[`name`,(0,S.jsx)(`input`,{value:f,placeholder:`from the url`,onChange:e=>p(e.target.value)})]}),(0,S.jsxs)(`label`,{className:`agent-field`,style:{width:140},children:[`branch`,(0,S.jsx)(`input`,{value:m,placeholder:`default`,onChange:e=>h(e.target.value)})]}),(0,S.jsxs)(`button`,{className:`ws-btn primary`,type:`submit`,disabled:g||!u.trim(),children:[(0,S.jsx)(C,{name:g?`progress_activity`:`download`,className:`ms-sm`}),g?`cloning…`:`clone`]})]}),y&&(0,S.jsx)(`div`,{className:`settings-err`,children:y}),(0,S.jsxs)(`div`,{className:`settings-note`,children:[`Uses your own git credentials and never prompts: a private remote must already work from a terminal. Agents see every clone here and can add more with `,(0,S.jsx)(`code`,{children:`kraftwerk repos add`}),`.`]})]})]}),e?.enabled&&(0,S.jsxs)(`section`,{className:`panel`,children:[(0,S.jsx)(`div`,{className:`panel-head`,children:(0,S.jsx)(`span`,{className:`microlabel`,children:`cloned repositories · newest change first`})}),D.length===0&&(0,S.jsx)(`div`,{className:`ws-empty`,children:`Nothing cloned yet.`}),D.map(e=>{let t=i[e.slug],n=no(e);return(0,S.jsxs)(`div`,{className:`ws-row repo-row state-${n.cls}`,"data-repo":e.slug,children:[(0,S.jsx)(`span`,{className:`switcher-icon ws-icon`,children:(0,S.jsx)(C,{name:`folder_data`})}),(0,S.jsxs)(`div`,{className:`ws-main`,children:[(0,S.jsxs)(`div`,{className:`ws-title`,children:[(0,S.jsx)(`span`,{className:`ws-name`,children:e.slug}),e.branch&&(0,S.jsx)(`span`,{className:`repo-branch`,children:e.branch}),(0,S.jsx)(`span`,{className:`ws-state ws-state-${n.cls}`,children:n.label}),e.updatedAt&&(0,S.jsxs)(`span`,{className:`vibeable-when`,title:e.updatedAt,children:[`changed `,Te(e.updatedAt)]})]}),e.url&&(0,S.jsx)(`div`,{className:`ws-root`,title:e.url,children:to(e.url)}),x&&(0,S.jsx)(`div`,{className:`ws-root ws-dim`,title:e.path,children:e.path}),(0,S.jsxs)(`div`,{className:`ws-meta`,children:[e.head&&(0,S.jsxs)(`span`,{title:e.committedAt,children:[(0,S.jsx)(`code`,{children:e.head}),` `,e.subject,e.committedAt?` · ${Te(e.committedAt)}`:``]}),!!e.behind&&!!e.dirty&&(0,S.jsxs)(`span`,{children:[`behind by `,e.behind]}),e.error&&(0,S.jsx)(`span`,{className:`settings-err`,children:e.error})]}),o[e.slug]&&(0,S.jsx)(`div`,{className:`settings-err`,children:o[e.slug]})]}),(0,S.jsxs)(`div`,{className:`ws-actions`,children:[(0,S.jsxs)(`button`,{className:`ws-btn`,disabled:!!t,onClick:()=>void T(e.slug,`update`),title:`git fetch, then fast-forward when clean`,children:[(0,S.jsx)(C,{name:t===`update`?`progress_activity`:`sync`,className:`ms-sm`}),t===`update`?`updating…`:`update`]}),c!==e.slug&&(0,S.jsxs)(`button`,{className:`ws-btn`,disabled:!!t,onClick:()=>l(e.slug),title:`Delete the clone`,children:[(0,S.jsx)(C,{name:`delete`,className:`ms-sm`}),` remove`]}),c===e.slug&&(0,S.jsxs)(S.Fragment,{children:[(0,S.jsxs)(`button`,{className:`ws-btn danger`,onClick:()=>void T(e.slug,`remove`,ro(e)),children:[(0,S.jsx)(C,{name:`delete`,className:`ms-sm`}),e.dirty||e.ahead?`delete with local changes`:ro(e)?`delete anyway`:`confirm remove`]}),(0,S.jsx)(`button`,{className:`ws-btn`,onClick:()=>l(null),children:`cancel`})]})]})]},e.slug)})]})]})}var ao=40,oo=/Mac|iPhone|iPad/.test(navigator.platform),so=null,G=e=>(e?.workspaces??[]).flatMap(e=>[...e.agents.map(t=>({kind:`agent`,agent:t,ws:e,key:`${e.url}|agent|${t.slug}`})),...(e.channels??[]).map(t=>({kind:`channel`,channel:t,ws:e,key:`${e.url}|channel|${t.slug}`}))]),K=e=>e.kind===`agent`?e.agent.name:e.channel.name,co=e=>e.kind===`agent`?e.agent.description:e.channel.purpose,lo=e=>e.kind===`agent`?`/agents/${encodeURIComponent(e.agent.slug)}`:`/channels/${encodeURIComponent(e.channel.slug)}`;function uo(e,t){let n=t.toLowerCase().split(/\s+/).filter(Boolean);if(n.length===0)return e;let r=[],i=new Map;for(let t of e){i.has(t.ws)||i.set(t.ws,i.size);let e=K(t).toLowerCase(),a=[e,...t.kind===`agent`?[t.agent.slug,t.agent.description??``,t.agent.group??``,`agent`]:[t.channel.slug,t.channel.purpose??``,`channel`],t.ws.name].join(` `).toLowerCase();if(!n.every(e=>a.includes(e)))continue;let o=e.startsWith(n[0])?0:e.includes(n[0])?1:2;r.push({hit:t,score:o,ws:i.get(t.ws)})}return r.sort((e,t)=>e.ws-t.ws||e.score-t.score).map(e=>e.hit)}function fo(e){let t=[];for(let n of e){let e=t.find(e=>e.ws===n.ws);e?e.hits.push(n):t.push({ws:n.ws,hits:[n]})}return t}async function po(e){let t=lo(e);if(e.ws.current)return A(t);let n=e.ws.live||!e.ws.root?e.ws.url:await ne(e.ws.root);window.location.assign(`${n.replace(/\/+$/,``)}/#${t}`)}function mo(){let[e,t]=(0,v.useState)(!1);return(0,v.useEffect)(()=>{let e=e=>{(e.metaKey||e.ctrlKey)&&!e.altKey&&!e.shiftKey&&e.key.toLowerCase()===`k`&&(e.preventDefault(),t(e=>!e))};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[]),(0,S.jsxs)(S.Fragment,{children:[(0,S.jsxs)(`button`,{type:`button`,className:`search-btn`,onClick:()=>t(!0),title:`jump to an agent or channel`,"aria-label":`search`,children:[(0,S.jsx)(C,{name:`search`}),(0,S.jsx)(`kbd`,{className:`kbd`,children:oo?`⌘K`:`Ctrl K`})]}),e&&(0,S.jsx)(ho,{onClose:()=>t(!1)})]})}function ho({onClose:e}){let[t,n]=(0,v.useState)(so),[r,i]=(0,v.useState)(so===null),[a,o]=(0,v.useState)(!1),[s,c]=(0,v.useState)(``),[l,u]=(0,v.useState)(0),[d,f]=(0,v.useState)(null),[p,m]=(0,v.useState)(``),h=(0,v.useRef)(null);(0,v.useEffect)(()=>{let e=!0;return fetch(`/api/search/agents`,{cache:`no-store`}).then(e=>e.ok?e.json():Promise.reject(Error(String(e.status)))).then(t=>{so=t,e&&n(t)}).catch(()=>e&&o(!0)).finally(()=>e&&i(!1)),()=>{e=!1}},[]);let g=(0,v.useMemo)(()=>G(t),[t]),_=(0,v.useMemo)(()=>uo(g,s).slice(0,ao),[g,s]),y=(0,v.useMemo)(()=>fo(_),[_]),b=Math.min(l,Math.max(_.length-1,0));(0,v.useEffect)(()=>{h.current?.querySelector(`[aria-selected="true"]`)?.scrollIntoView({block:`nearest`})},[b,_]);let x=t=>{if(!d){if(t.ws.current||t.ws.live){e(),po(t);return}f(t.key),m(``),po(t).catch(e=>{f(null),m(`${t.ws.name}: ${e.message}`)})}},w=t=>{if(t.key===`ArrowDown`)t.preventDefault(),u(_.length?(b+1)%_.length:0);else if(t.key===`ArrowUp`)t.preventDefault(),u(_.length?(b-1+_.length)%_.length:0);else if(t.key===`Enter`){t.preventDefault();let e=_[b];e&&x(e)}else t.key===`Escape`&&(t.preventDefault(),e())},T;if(_.length>0){let e=-1;T=(0,S.jsx)(`ul`,{className:`palette-list`,role:`listbox`,"aria-label":`agents and channels`,ref:h,children:y.map(t=>(0,S.jsxs)(v.Fragment,{children:[(0,S.jsxs)(`li`,{className:`palette-group`,role:`presentation`,title:t.ws.current?`this workspace`:t.ws.url,children:[t.ws.icon&&(0,S.jsx)(`span`,{"aria-hidden":!0,children:t.ws.icon}),(0,S.jsx)(`span`,{className:`palette-group-name`,children:t.ws.name}),t.ws.current?(0,S.jsx)(`span`,{className:`palette-group-note`,children:`this workspace`}):t.ws.live?(0,S.jsx)(C,{name:`open_in_new`,className:`ms-sm`}):(0,S.jsx)(`span`,{className:`palette-chip`,children:`stopped`})]}),t.hits.map(t=>{let n=++e;return(0,S.jsxs)(`li`,{role:`option`,"aria-selected":n===b,className:`palette-item${n===b?` active`:``}`,onMouseMove:()=>n!==b&&u(n),onClick:()=>x(t),children:[(0,S.jsx)(`span`,{className:`palette-emoji`,"aria-hidden":!0,children:t.kind===`agent`?t.agent.emoji:(0,S.jsx)(C,{name:`forum`})}),(0,S.jsxs)(`span`,{className:`palette-text`,children:[(0,S.jsx)(`span`,{className:`palette-name`,children:K(t)}),co(t)&&(0,S.jsx)(`span`,{className:`palette-sub`,children:co(t)})]}),d===t.key?(0,S.jsx)(C,{name:`progress_activity`,className:`ms-sm`}):t.kind===`channel`&&(0,S.jsx)(`span`,{className:`palette-chip`,children:`channel`})]},t.key)})]},t.ws.url||t.ws.name))})}else T=a?(0,S.jsx)(`div`,{className:`palette-empty`,children:`could not load the agents and channels`}):r?(0,S.jsx)(`div`,{className:`palette-empty`,children:`looking for agents and channels…`}):g.length===0?(0,S.jsxs)(`div`,{className:`palette-empty`,children:[`no agents yet — `,(0,S.jsx)(`a`,{href:`#/agents/new`,onClick:e,children:`create one`})]}):(0,S.jsxs)(`div`,{className:`palette-empty`,children:[`no agent or channel matches “`,s,`”`]});return(0,S.jsx)(`div`,{className:`palette-backdrop`,onMouseDown:e,children:(0,S.jsxs)(`div`,{className:`palette`,role:`dialog`,"aria-label":`jump to an agent or channel`,onMouseDown:e=>e.stopPropagation(),onKeyDown:w,children:[(0,S.jsxs)(`div`,{className:`palette-input`,children:[(0,S.jsx)(C,{name:`search`}),(0,S.jsx)(`input`,{autoFocus:!0,value:s,onChange:e=>{c(e.target.value),u(0)},placeholder:`jump to an agent or channel…`,"aria-label":`search`,autoComplete:`off`,spellCheck:!1}),r&&t&&(0,S.jsx)(C,{name:`progress_activity`,className:`ms-sm`}),(0,S.jsx)(`kbd`,{className:`kbd`,children:`esc`})]}),T,(0,S.jsxs)(`div`,{className:`palette-foot`,children:[(0,S.jsxs)(`span`,{children:[(0,S.jsx)(`kbd`,{className:`kbd`,children:`↑`}),(0,S.jsx)(`kbd`,{className:`kbd`,children:`↓`}),` move`]}),(0,S.jsxs)(`span`,{children:[(0,S.jsx)(`kbd`,{className:`kbd`,children:`↵`}),` open`]}),d&&(0,S.jsxs)(`span`,{className:`palette-note`,children:[(0,S.jsx)(C,{name:`progress_activity`,className:`ms-sm`}),` starting the workspace…`]}),p&&(0,S.jsxs)(`span`,{className:`palette-warn`,title:p,children:[(0,S.jsx)(C,{name:`warning`,className:`ms-sm`}),` `,p]})]})]})})}var go=`modulepreload`,_o=function(e){return`/`+e},vo={},yo=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?import.meta.resolve(e):new URL(e,import.meta.url).href}r=o(t.map(t=>{if(t=_o(t,n),t=s(t),t in vo)return;vo[t]=!0;let r=t.endsWith(`.css`);for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}let i=document.createElement(`link`);if(i.rel=r?`stylesheet`:go,r||(i.as=`script`),i.crossOrigin=``,i.href=t,a&&i.setAttribute(`nonce`,a),document.head.appendChild(i),r)return new Promise((e,n)=>{i.addEventListener(`load`,e),i.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},bo=(0,v.lazy)(()=>yo(()=>import(`./editor-DITzQiO1.js`).then(e=>({default:e.EditorScreen})),__vite__mapDeps([0,1,2,3,4,5,6])));function xo(){let[e,t=``]=w().split(`?`),n=e.split(`/`).filter(Boolean),r=new URLSearchParams(t).get(`workflow`)??void 0,[i,a]=(0,v.useState)(``),[o,s]=(0,v.useState)(``),[c,l]=(0,v.useState)(``),[u,d]=(0,v.useState)(!0),[f,p]=(0,v.useState)(``),[m,h]=(0,v.useState)(``),[g,_]=(0,v.useState)(!1),[y,b]=(0,v.useState)(!1),[x,T]=(0,v.useState)(!1),[E,D]=(0,v.useState)([]);(0,v.useEffect)(()=>{let e=!0,t,n=async()=>{try{let t=await fetch(`/api/meta`,{cache:`no-store`}).then(e=>e.json());if(!e)return;a(t.projectName??``),s(t.projectIcon??``),l(t.projectColor??``),d(t.projectNamed!==!1),p(t.projectRootLabel??``),h(t.projectRoot??``),_(!!t.git),b(!!t.repos),T(!!t.vibeables),F({git:!!t.git,repos:!!t.repos,vibeables:!!t.vibeables}),D(Array.isArray(t.switcher)?t.switcher:[])}catch{}e&&(t=setTimeout(n,3e4))};n();let r=()=>{clearTimeout(t),n()};return window.addEventListener(`kw-meta-refresh`,r),()=>{e=!1,clearTimeout(t),window.removeEventListener(`kw-meta-refresh`,r)}},[]),(0,v.useEffect)(()=>{if(ee(i?`${i} — kraftwerk`:`kraftwerk inspector`),!o)return;let e=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><text y="0.9em" font-size="85">${o}</text></svg>`,t=document.querySelector(`link[rel="icon"]`);t||(t=document.createElement(`link`),t.rel=`icon`,document.head.appendChild(t)),t.href=`data:image/svg+xml,${encodeURIComponent(e)}`},[i,o]);let O;if(O=n[0]===`runs`&&n[1]?(0,S.jsx)(bi,{id:n[1],workflow:r}):n[0]===`runs`?(0,S.jsx)(ko,{}):n[0]===`workflows`&&n[1]?(0,S.jsx)(Wi,{slug:decodeURIComponent(n[1])}):n[0]===`workflows`?(0,S.jsx)(Hi,{}):n[0]===`chats`?(0,S.jsx)(ka,{seg:n}):n[0]===`skills`?(0,S.jsx)(wa,{name:n[1]?decodeURIComponent(n[1]):void 0}):n[0]===`settings`?(0,S.jsx)(qa,{}):n[0]===`workspaces`?(0,S.jsx)(Ya,{}):n[0]===`git`?(0,S.jsx)(eo,{}):n[0]===`repos`?(0,S.jsx)(io,{}):n[0]===`vibeables`?(0,S.jsx)(Wr,{slug:n[1]?decodeURIComponent(n[1]):void 0}):n[0]===`agents`||n[0]===`team`?(0,S.jsx)(ka,{seg:n.slice(1)}):n[0]===`channels`?(0,S.jsx)(Gr,{seg:n.slice(1)}):n[0]===`knowledge`?(0,S.jsx)(da,{bundle:n[1]?decodeURIComponent(n[1]):void 0,conceptId:n.length>2?n.slice(2).map(decodeURIComponent).join(`/`):void 0}):(0,S.jsx)($i,{}),n[0]===`edit`&&n[1]&&n.length>2)return(0,S.jsx)(v.Suspense,{fallback:(0,S.jsx)(`div`,{className:`empty`,children:`loading editor…`}),children:(0,S.jsx)(bo,{bundle:decodeURIComponent(n[1]),conceptId:n.slice(2).map(decodeURIComponent).join(`/`)},n.slice(1).join(`/`))});let k=(...e)=>e.includes(n[0]??``)?`active`:``;return(0,v.useEffect)(()=>{let e=document.documentElement,t=m||i,n=t?ge(ce(c,t)):null;if(!n){delete e.dataset.wsAccent;return}for(let[t,r]of Object.entries(n))e.style.setProperty(t,r);e.dataset.wsAccent=``},[c,m,i]),(0,S.jsxs)(S.Fragment,{children:[(0,S.jsxs)(`header`,{className:`topbar`,style:{"--ws-c":ce(c,m||i)},children:[(0,S.jsxs)(`span`,{className:`wordmark`,children:[(0,S.jsx)(`a`,{href:`#/`,className:`home-link`,title:`Dashboard`,children:i?(0,S.jsx)(ve,{className:`home-tile`,icon:o,name:i,color:c,seed:m||i}):(0,S.jsx)(C,{name:`home`})}),i&&(0,S.jsx)(Oo,{name:i,icon:o,color:c,named:u,root:f,seed:m||i,entries:E})]}),(0,S.jsxs)(`nav`,{children:[(0,S.jsxs)(`a`,{href:`#/channels`,className:k(`channels`),children:[(0,S.jsx)(C,{name:`forum`}),` channels`]}),(0,S.jsxs)(`a`,{href:`#/agents`,className:k(`agents`,`team`,`chats`),children:[(0,S.jsx)(C,{name:`groups`}),` agents`]}),(0,S.jsxs)(`a`,{href:`#/workflows`,className:k(`workflows`,`runs`),children:[(0,S.jsx)(C,{name:`account_tree`}),` workflows`]}),(0,S.jsxs)(`a`,{href:`#/knowledge`,className:k(`knowledge`),children:[(0,S.jsx)(C,{name:`menu_book`}),` knowledge`]}),(0,S.jsxs)(`a`,{href:`#/skills`,className:k(`skills`)+` nav-expert`,children:[(0,S.jsx)(C,{name:`extension`}),` skills`]}),y&&(0,S.jsxs)(`a`,{href:`#/repos`,className:k(`repos`)+` nav-expert`,children:[(0,S.jsx)(C,{name:`source`}),` repositories`]}),x&&(0,S.jsxs)(`a`,{href:`#/vibeables`,className:k(`vibeables`),children:[(0,S.jsx)(C,{name:`web`}),` vibeables`]}),g&&(0,S.jsx)(So,{active:n[0]===`git`})]}),(0,S.jsx)(`span`,{className:`spacer`}),(0,S.jsx)(mo,{}),(0,S.jsx)(Po,{}),(0,S.jsx)(Ao,{}),(0,S.jsx)(jo,{}),(0,S.jsx)(Fo,{})]}),(0,S.jsx)(`main`,{className:`shell`,children:O})]})}function So({active:e}){let t=z(`/api/git`,!1,15e3),n=t?.files?.filter(e=>e.syncable).length??0;return(0,S.jsxs)(`a`,{href:`#/git`,className:e?`nav-expert active`:`nav-expert`,children:[(0,S.jsx)(C,{name:`cloud_sync`}),` git`,!!t?.behind&&(0,S.jsxs)(`span`,{className:`git-badge behind`,children:[t.behind,`↓`]}),!!t?.ahead&&(0,S.jsxs)(`span`,{className:`git-badge ahead`,children:[t.ahead,`↑`]}),!t?.ahead&&!t?.behind&&!!n&&(0,S.jsx)(`span`,{className:`git-badge dirty`,children:n})]})}function Co(e){try{let t=new URL(e);return t.hostname===`localhost`||t.hostname===`127.0.0.1`?`:${t.port||(t.protocol===`https:`?443:80)}`:t.host}catch{return e.replace(/^https?:\/\//,``)}}function wo({label:e}){return e?(0,S.jsx)(`span`,{className:`switcher-root`,title:e,children:(0,S.jsx)(`span`,{dir:`ltr`,children:e})}):null}function To({name:e,named:t}){let n=t===!1;return(0,S.jsx)(`span`,{className:`switcher-name${n?` unnamed`:``}`,title:n?`${e} — folder name; set name: in kraftwerk.yml`:e,children:e})}function Eo({entry:e,ambiguous:t}){let[n,r]=(0,v.useState)(`idle`),[i,a]=(0,v.useState)(``),o=e.exists===!1,s=async()=>{r(`starting`),a(``);try{window.location.assign(await ne(e.root))}catch(e){r(`error`),a(e.message)}};return(0,S.jsxs)(`span`,{className:`switcher-item stopped ${o?`missing`:``}`,role:`menuitem`,style:{"--ws-c":ce(e.color,e.root??e.url)},children:[(0,S.jsx)(ve,{icon:e.icon,name:e.name,color:e.color,seed:e.root??e.url,ambiguous:t}),(0,S.jsxs)(`span`,{className:`switcher-text`,children:[(0,S.jsx)(To,{name:e.name,named:e.named}),n===`error`?(0,S.jsx)(`span`,{className:`switcher-sub switcher-err`,title:i,children:i}):o?(0,S.jsx)(`span`,{className:`switcher-sub`,children:`folder missing`}):(0,S.jsx)(wo,{label:e.rootLabel})]}),(0,S.jsxs)(`span`,{className:`switcher-side`,children:[(0,S.jsx)(`span`,{className:`switcher-port`,children:Co(e.url)}),(0,S.jsxs)(`button`,{className:`switcher-start`,disabled:o||n===`starting`,title:o?`The project folder no longer exists`:`Start the UI for this project`,onClick:e=>{e.stopPropagation(),s()},children:[n===`starting`?(0,S.jsx)(C,{name:`progress_activity`}):(0,S.jsx)(C,{name:`play_arrow`}),n===`starting`?`starting`:`start`]})]})]})}function Do({entry:e,ambiguous:t}){let n=e.root??e.url;return(0,S.jsxs)(`a`,{className:`switcher-item${e.live?` live`:``}`,role:`menuitem`,href:e.url,style:{"--ws-c":ce(e.color,n)},children:[(0,S.jsx)(ve,{icon:e.icon,name:e.name,color:e.color,seed:n,ambiguous:t}),(0,S.jsxs)(`span`,{className:`switcher-text`,children:[(0,S.jsx)(To,{name:e.name,named:e.named}),(0,S.jsx)(wo,{label:e.rootLabel??(e.root?void 0:e.url.replace(/^https?:\/\//,``))})]}),(0,S.jsx)(`span`,{className:`switcher-side`,children:(0,S.jsxs)(`span`,{className:`switcher-port`,children:[e.live&&(0,S.jsx)(`span`,{className:`live-dot`,title:`running`}),Co(e.url)]})})]})}function Oo({name:e,icon:t,color:n,named:r,root:i,seed:a,entries:o}){let[s,c]=(0,v.useState)(!1),l=P();if((0,v.useEffect)(()=>{if(!s)return;let e=e=>{e.target.closest(`.switcher-wrap`)||c(!1)};return window.addEventListener(`mousedown`,e),()=>window.removeEventListener(`mousedown`,e)},[s]),o.length===0)return(0,S.jsx)(`span`,{className:`env-name`,title:i||`Project (kraftwerk.yml: name)`,children:e});let u=new Map;for(let e of[t,...o.map(e=>e.icon)])e&&u.set(e,(u.get(e)??0)+1);let d=e=>!!e&&(u.get(e)??0)>1,f=[{key:`running`,label:`running`,items:o.filter(e=>e.live===!0)},{key:`stopped`,label:`stopped`,items:o.filter(e=>e.live===!1)},{key:`linked`,label:`linked`,items:o.filter(e=>e.live===void 0)}].filter(e=>e.items.length>0),p=a||e;return(0,S.jsxs)(`span`,{className:`switcher-wrap`,children:[(0,S.jsxs)(`button`,{className:`env-name env-switch`,title:i?`${i} — switch workspace`:`Switch workspace`,"aria-haspopup":`menu`,"aria-expanded":s,onClick:()=>c(e=>!e),children:[e,(0,S.jsx)(C,{name:`expand_more`})]}),s&&(0,S.jsxs)(`div`,{className:`switcher-pop`,role:`menu`,children:[(0,S.jsx)(`div`,{className:`switcher-head`,children:`Workspaces`}),(0,S.jsxs)(`span`,{className:`switcher-item current`,"aria-current":`true`,style:{"--ws-c":ce(n,p)},children:[(0,S.jsx)(ve,{icon:t,name:e,color:n,seed:p,ambiguous:d(t)}),(0,S.jsxs)(`span`,{className:`switcher-text`,children:[(0,S.jsx)(To,{name:e,named:r}),i?(0,S.jsx)(wo,{label:i}):(0,S.jsx)(`span`,{className:`switcher-sub`,children:`this workspace`})]}),(0,S.jsx)(`span`,{className:`switcher-side`,children:(0,S.jsx)(C,{name:`check`,className:`switcher-check`})})]}),f.map(e=>(0,S.jsxs)(`div`,{className:`switcher-group switcher-group-${e.key}`,role:`group`,"aria-label":e.label,children:[(0,S.jsx)(`div`,{className:`switcher-group-head`,children:e.label}),e.items.map(e=>e.live===!1&&e.root?(0,S.jsx)(Eo,{entry:e,ambiguous:d(e.icon)},e.root):(0,S.jsx)(Do,{entry:e,ambiguous:d(e.icon)},e.root??e.url))]},e.key)),l&&(0,S.jsxs)(`a`,{className:`switcher-foot`,href:`#/workspaces`,role:`menuitem`,onClick:()=>c(!1),children:[(0,S.jsx)(C,{name:`hub`}),` manage workspaces`]})]})]})}function ko(){let[e,t]=(0,v.useState)(null);return(0,v.useEffect)(()=>{let e=!0;return fetch(`/api/runs`).then(e=>e.json()).then(n=>{e&&(n.runs.length>0?A(`/runs/${n.runs[0].id}`,{replace:!0}):t({outputDir:n.outputDir}))}).catch(()=>{}),()=>{e=!1}},[]),e?(0,S.jsxs)(`div`,{className:`empty`,children:[`No runs found in `,(0,S.jsx)(`code`,{children:e.outputDir}),`. Start one from the`,` `,(0,S.jsx)(`a`,{href:`#/workflows`,children:`workflows`}),` list or with `,(0,S.jsx)(`code`,{children:`kraftwerk run <workflow> [request]`}),`.`]}):(0,S.jsx)(`div`,{className:`empty`,children:`loading…`})}function Ao(){let[e,t]=(0,v.useState)(null),[n,r]=(0,v.useState)(!1);(0,v.useEffect)(()=>{let e=!0,n,r=async()=>{try{let n=await fetch(`/api/meta`,{cache:`no-store`}).then(e=>e.json());e&&t(n)}catch{}e&&(n=setTimeout(r,3e4))};return r(),()=>{e=!1,clearTimeout(n)}},[]);let i=e?.restartable&&e.diskVersion&&e.diskVersion!==e.version?e.diskVersion:null;async function a(){if(i){r(!0),await fetch(`/api/restart`,{method:`POST`}).catch(()=>{});for(let e=0;e<60;e++){await new Promise(e=>setTimeout(e,500));try{if((await fetch(`/api/meta`,{cache:`no-store`}).then(e=>e.json())).version===i)break}catch{}}location.reload()}}return!i&&!n?null:(0,S.jsx)(`button`,{className:`relaunch-note`,disabled:n,title:`v${i} is installed on disk, the server still runs v${e?.version}. Click to relaunch with the new version.`,onClick:()=>void a(),children:n?`relaunching…`:(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(C,{name:`restart_alt`,className:`ms-sm`}),` v`,i,` ready — relaunch`]})})}function jo(){let e=P();return(0,S.jsxs)(`button`,{className:`expert-toggle ${e?`on`:``}`,title:e?`Expert mode on — full detail`:`Expert mode off — simplified view`,"aria-pressed":e,onClick:()=>ie(!e),children:[(0,S.jsx)(`span`,{className:`expert-track`,children:(0,S.jsx)(`span`,{className:`expert-knob`})}),`expert`]})}var Mo={approval:`gavel`,routine_done:`schedule`,routine_failed:`schedule`,run_done:`account_tree`,run_failed:`account_tree`},No=`kw.notif.toast.dismissed`;function Po(){let[e,t]=(0,v.useState)(!1),n=z(`/api/notifications`,!1,5e3),[r,i]=(0,v.useState)(()=>typeof Notification>`u`?`unsupported`:Notification.permission),[a,o]=(0,v.useState)(()=>{try{return localStorage.getItem(No)===`1`}catch{return!1}}),s=(0,v.useRef)(null),[c,l]=(0,v.useState)(null),[u,d]=(0,v.useState)(null);(0,v.useEffect)(()=>l(null),[n]);let f=c??n,p=f?.items??[],m=f?.unread??0;(0,v.useEffect)(()=>k(m),[m]),(0,v.useEffect)(()=>{if(n){if(!s.current){s.current=new Set(p.map(e=>e.id));return}for(let e of p)if(!s.current.has(e.id)&&(s.current.add(e.id),!(e.readAt||r!==`granted`)&&(document.hidden||location.hash!==`#${e.href}`)))try{let t=new Notification(e.title,{body:e.body,tag:e.id});t.onclick=()=>{window.focus(),g(e),t.close()}}catch{}}},[n]),(0,v.useEffect)(()=>{if(!e)return;let n=e=>{e.target.closest(`.notif-wrap`)||t(!1)};return window.addEventListener(`mousedown`,n),()=>window.removeEventListener(`mousedown`,n)},[e]);async function h(e,t){try{let n=await fetch(e,{method:e.endsWith(`/notifications`)?`DELETE`:`POST`,headers:{"content-type":`application/json`},body:t===void 0?void 0:JSON.stringify(t)});if(!n.ok)return;let r=await n.json();l(`items`in r?r:{items:[],unread:0})}catch{}}function g(e){t(!1),e.readAt||h(`/api/notifications/read`,{ids:[e.id]}),A(e.href)}async function _(e){d(e.id);try{let n=await(await fetch(`/api/notifications/${encodeURIComponent(e.id)}/diagnose`,{method:`POST`})).json();n.href?(t(!1),A(n.href)):n.error&&alert(n.error)}catch{}d(null)}async function y(){typeof Notification>`u`||i(await Notification.requestPermission())}function b(){o(!0);try{localStorage.setItem(No,`1`)}catch{}}let x=r==="default"&&!a;return(0,S.jsxs)(`span`,{className:`notif-wrap`,children:[(0,S.jsxs)(`button`,{className:`info-btn notif-btn ${m?`has-unread`:``}`,title:m?`${m} item${m===1?``:`s`} need your attention`:`Notifications`,"aria-label":`Notifications`,onClick:()=>t(e=>!e),children:[(0,S.jsx)(C,{name:m?`notifications_active`:`notifications`}),m>0&&(0,S.jsx)(`span`,{className:`notif-badge`,children:m>99?`99+`:m})]}),e&&(0,S.jsxs)(`div`,{className:`info-pop notif-pop`,role:`menu`,children:[(0,S.jsxs)(`div`,{className:`notif-head`,children:[(0,S.jsx)(`span`,{className:`microlabel`,children:`notifications`}),(0,S.jsx)(`span`,{className:`spacer`}),m>0&&(0,S.jsx)(`button`,{className:`open-raw`,onClick:()=>void h(`/api/notifications/read`),children:`mark all read`}),p.length>0&&(0,S.jsx)(`button`,{className:`open-raw`,onClick:()=>void h(`/api/notifications`),children:`clear`})]}),x&&(0,S.jsxs)(`div`,{className:`notif-hint`,children:[(0,S.jsx)(`span`,{children:`Get a system notification when something needs you, even with this tab in the background.`}),(0,S.jsxs)(`span`,{className:`notif-hint-actions`,children:[(0,S.jsx)(`button`,{className:`ws-btn primary`,onClick:()=>void y(),children:`enable`}),(0,S.jsx)(`button`,{className:`ws-btn`,onClick:b,children:`not now`})]})]}),r===`denied`&&(0,S.jsx)(`div`,{className:`notif-hint muted`,children:`Browser notifications are blocked for this site — allow them in the address bar to get system alerts.`}),p.length===0?(0,S.jsx)(`div`,{className:`notif-empty`,children:`nothing needs you right now`}):(0,S.jsx)(`div`,{className:`notif-list`,children:p.slice(0,50).map(e=>(0,S.jsxs)(`div`,{className:`notif-row ${e.readAt?``:`unread`} ${e.kind}`,role:`button`,tabIndex:0,onClick:()=>g(e),onKeyDown:t=>{t.key===`Enter`&&g(e)},children:[(0,S.jsx)(`span`,{className:`notif-ico`,children:(0,S.jsx)(C,{name:Mo[e.kind]})}),(0,S.jsxs)(`span`,{className:`notif-body`,children:[(0,S.jsx)(`span`,{className:`notif-title`,children:e.title}),e.body&&(0,S.jsx)(`span`,{className:`notif-sub`,children:e.body}),e.diagnose&&(0,S.jsx)(`span`,{className:`notif-actions`,children:(0,S.jsxs)(`button`,{className:`ws-btn notif-diagnose`,disabled:u===e.id,title:`Open a chat that finds the cause and proposes the fix`,onClick:t=>{t.stopPropagation(),_(e)},children:[(0,S.jsx)(C,{name:u===e.id?`progress_activity`:`troubleshoot`,className:`ms-sm`}),u===e.id?`starting…`:`diagnose`]})})]}),(0,S.jsx)(`span`,{className:`notif-when num`,children:Te(e.at)})]},e.id))})]})]})}function Fo(){let[e,t]=(0,v.useState)(!1),[n,r]=(0,v.useState)(null),[i,a]=(0,v.useState)(null),[o,s]=(0,v.useState)(``);(0,v.useEffect)(()=>{if(!e)return;fetch(`/api/runs`).then(e=>e.json()).then(r).catch(()=>{}),fetch(`/api/workflows`).then(e=>e.json()).then(a).catch(()=>{}),fetch(`/api/meta`).then(e=>e.json()).then(e=>s(e.version)).catch(()=>{});let n=e=>{e.target.closest(`.info-wrap`)||t(!1)};return window.addEventListener(`mousedown`,n),()=>window.removeEventListener(`mousedown`,n)},[e]);let c=n?.runs[0];return(0,S.jsxs)(`span`,{className:`info-wrap`,children:[(0,S.jsx)(`button`,{className:`info-btn`,title:`Project info`,"aria-label":`Project info`,onClick:()=>t(e=>!e),children:(0,S.jsx)(C,{name:`info`})}),e&&(0,S.jsxs)(`div`,{className:`info-pop`,children:[(0,S.jsxs)(`div`,{className:`info-row`,children:[(0,S.jsx)(`span`,{className:`microlabel`,children:`Workflows`}),(0,S.jsx)(`span`,{className:`info-v`,children:i?`${i.workflows.length} discovered`:`…`}),(0,S.jsx)(`code`,{className:`info-path`,title:i?.root,children:i?.root??``})]}),(0,S.jsxs)(`div`,{className:`info-row`,children:[(0,S.jsx)(`span`,{className:`microlabel`,children:`Runs`}),(0,S.jsxs)(`span`,{className:`info-v`,children:[n?`${n.runs.length} total`:`…`,c?` · latest ${c.status}`:``]}),(0,S.jsx)(`code`,{className:`info-path`,title:n?.outputDir,children:n?.outputDir??``})]}),(0,S.jsxs)(`div`,{className:`info-row info-actions`,children:[(0,S.jsx)(`span`,{className:`microlabel`,children:`Workspace`}),(0,S.jsxs)(`a`,{className:`update-btn`,href:`#/settings`,onClick:()=>t(!1),children:[(0,S.jsx)(C,{name:`settings`,className:`ms-sm`}),` settings`]})]}),(0,S.jsxs)(`div`,{className:`info-row info-actions`,children:[(0,S.jsx)(`span`,{className:`microlabel`,children:`Theme`}),(0,S.jsx)(Ro,{})]}),(0,S.jsxs)(`div`,{className:`info-row info-actions`,children:[(0,S.jsx)(`span`,{className:`microlabel`,children:`Version`}),(0,S.jsx)(`span`,{className:`info-v mono`,children:o?`kraftwerk ${o}`:`…`}),(0,S.jsx)(Lo,{})]})]})]})}function Io(e,t){let n=e.split(`.`).map(Number),r=t.split(`.`).map(Number);for(let e=0;e<3;e++)if((n[e]??0)!==(r[e]??0))return(n[e]??0)<(r[e]??0);return!1}function Lo(){let[e,t]=(0,v.useState)(`idle`),[n,r]=(0,v.useState)(null);async function i(){t(`busy`);try{let e=await fetch(`/api/update-check`,{cache:`no-store`}),n=await e.json();if(!e.ok||!n.latest)throw Error();r(n),t(`done`)}catch{t(`err`)}}return e===`done`&&n?Io(n.current,n.latest)?(0,S.jsxs)(`span`,{className:`update-result newer`,children:[`v`,n.latest,` available — `,(0,S.jsxs)(`code`,{children:[`npm i -g `,n.name,`@latest`]})]}):(0,S.jsxs)(`span`,{className:`update-result`,children:[(0,S.jsx)(C,{name:`check`,className:`ms-sm`}),` up to date`]}):(0,S.jsx)(`button`,{className:`update-btn`,disabled:e===`busy`,onClick:()=>void i(),children:e===`busy`?`checking…`:e===`err`?`npm unreachable — retry`:(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(C,{name:`sync`,className:`ms-sm`}),` check for updates`]})})}function Ro(){return(0,S.jsx)(`button`,{className:`theme-btn`,onClick:()=>{let e=document.documentElement,t=e.dataset.theme===`light`?`dark`:`light`;e.dataset.theme=t;try{localStorage.setItem(`kw-theme`,t)}catch{}},children:`day / night`})}(0,y.createRoot)(document.getElementById(`root`)).render((0,S.jsx)(v.StrictMode,{children:(0,S.jsx)(xo,{})}));export{x as a,o as c,te as i,s as l,C as n,h as o,A as r,d as s,yo as t,l as u};
219
+ `)[0]]})]}),e.error?(0,S.jsxs)(`div`,{className:`ws-empty ws-load-error`,children:[(0,S.jsx)(C,{name:`error`,className:`ms-sm`}),` `,e.error]}):(0,S.jsxs)(`div`,{className:`git-head`,children:[(0,S.jsxs)(`div`,{className:`git-branch`,children:[(0,S.jsx)(C,{name:`account_tree`,className:`ms-sm`}),(0,S.jsx)(`strong`,{children:e.branch}),e.upstream?(0,S.jsxs)(`span`,{className:`settings-note`,children:[`tracking `,e.upstream]}):(0,S.jsx)(`span`,{className:`settings-note`,children:`no upstream yet, push sets one`})]}),(0,S.jsxs)(`div`,{className:`git-counts`,children:[e.diverged&&(0,S.jsx)(`span`,{className:`git-diverged`,children:`diverged, resolve in a terminal`}),!!e.behind&&(0,S.jsxs)(`span`,{className:`git-behind`,children:[e.behind,` behind`]}),!!e.ahead&&(0,S.jsxs)(`span`,{className:`git-ahead`,children:[e.ahead,` ahead`]}),!e.ahead&&!e.behind&&(0,S.jsx)(`span`,{className:`settings-note`,children:`up to date`})]}),(0,S.jsxs)(`div`,{className:`ws-actions`,children:[(0,S.jsxs)(`button`,{className:`ws-btn`,disabled:!!c,onClick:()=>void h(`fetch`),children:[(0,S.jsx)(C,{name:c===`fetch`?`progress_activity`:`refresh`,className:`ms-sm`}),` fetch`]}),(0,S.jsxs)(`button`,{className:`ws-btn`,disabled:!!c||!e.behind||e.diverged,title:e.diverged?`Diverged. Resolve in a terminal.`:`Fast-forward to the remote`,onClick:()=>void h(`pull`),children:[(0,S.jsx)(C,{name:c===`pull`?`progress_activity`:`download`,className:`ms-sm`}),` pull`]}),(0,S.jsxs)(`button`,{className:`ws-btn primary`,disabled:!!c||!e.ahead&&!!e.upstream,title:e.upstream?`Push to the upstream`:`Push and set the upstream`,onClick:()=>void h(`push`),children:[(0,S.jsx)(C,{name:c===`push`?`progress_activity`:`upload`,className:`ms-sm`}),` push`]})]})]})]}),(0,S.jsxs)(`section`,{className:`panel`,children:[(0,S.jsxs)(`div`,{className:`panel-head`,children:[(0,S.jsx)(`span`,{className:`microlabel`,children:`changes`}),(0,S.jsx)(`span`,{className:`spacer`}),(0,S.jsx)(`span`,{className:`settings-note`,children:_.length===0?`workspace clean`:`${n.size} of ${_.length} selected`})]}),_.length===0&&y.length===0&&(0,S.jsx)(`div`,{className:`ws-empty`,children:`Nothing changed under the workspace paths.`}),_.map(e=>(0,S.jsxs)(`div`,{className:`git-row`,children:[(0,S.jsx)(`label`,{className:`git-pick`,children:(0,S.jsx)(`input`,{type:`checkbox`,checked:n.has(e.path),onChange:t=>b(e.path,t.target.checked)})}),(0,S.jsxs)(`button`,{className:`git-file`,onClick:()=>a(t=>{let n=new Set(t);return n.has(e.path)?n.delete(e.path):n.add(e.path),n}),children:[(0,S.jsx)(C,{name:i.has(e.path)?`expand_more`:`chevron_right`,className:`ms-sm`}),(0,S.jsx)(`span`,{className:`git-status s-${e.status}`,children:e.status}),(0,S.jsx)(`span`,{className:`git-path`,children:e.path})]}),i.has(e.path)&&(0,S.jsx)($a,{file:e.path})]},e.path)),_.length>0&&(0,S.jsxs)(`div`,{className:`git-commit`,children:[(0,S.jsx)(`input`,{className:`git-message`,placeholder:`Commit message`,value:o,onChange:e=>s(e.target.value),onKeyDown:e=>{e.key===`Enter`&&!c&&o.trim()&&n.size>0&&g()}}),(0,S.jsx)(`button`,{className:`ws-btn`,disabled:n.size===_.length,onClick:()=>r(new Set(_.map(e=>e.path))),children:`select all`}),(0,S.jsxs)(`button`,{className:`ws-btn primary`,disabled:!!c||n.size===0||!o.trim(),onClick:()=>void g(),children:[(0,S.jsx)(C,{name:c===`commit`?`progress_activity`:`check`,className:`ms-sm`}),`commit `,n.size||``]})]}),y.length>0&&(0,S.jsxs)(`details`,{className:`git-blocked`,children:[(0,S.jsxs)(`summary`,{children:[y.length,e.blockedHidden?`+`:``,` change`,y.length===1&&!e.blockedHidden?``:`s`,` outside the workspace paths`]}),y.map(e=>(0,S.jsxs)(`div`,{className:`git-row blocked`,children:[(0,S.jsx)(`span`,{className:`git-status s-blocked`,children:e.status}),(0,S.jsx)(`span`,{className:`git-path`,children:e.path}),(0,S.jsx)(`span`,{className:`settings-note`,children:e.reason})]},e.path)),!!e.blockedHidden&&(0,S.jsx)(`div`,{className:`git-row blocked`,children:(0,S.jsxs)(`span`,{className:`settings-note`,children:[`and `,e.blockedHidden,` more, not listed`]})})]})]}),(0,S.jsxs)(`p`,{className:`settings-note`,children:[`Synced paths: `,(e.scope??[]).map((e,t)=>(0,S.jsxs)(`span`,{children:[t>0&&`, `,(0,S.jsx)(`code`,{children:e})]},e)),`. Run artifacts and files like `,(0,S.jsx)(`code`,{children:`.env`}),` are never staged.`,` `,e.interval?`Fetches every ${Xa(e.interval)}${e.autosync===`pull`?` and fast-forwards when the working tree is clean`:``}. `:`Background fetching is off. `,`Commit and push are always manual.`]})]})}var to=e=>e.replace(/^https?:\/\//,``).replace(/^git@([^:]+):/,`$1/`).replace(/\.git$/,``),no=e=>e.error?{label:`unreadable`,cls:`missing`}:e.dirty?{label:`${e.dirty} changed`,cls:`died`}:e.ahead?{label:`${e.ahead} to push`,cls:`running`}:e.behind?{label:`${e.behind} behind`,cls:`stopped`}:{label:`clean`,cls:`running`},ro=e=>!!(e.error||e.dirty||e.ahead===void 0||e.ahead);function io(){let[e,t]=(0,v.useState)(null),[n,r]=(0,v.useState)(``),[i,a]=(0,v.useState)({}),[o,s]=(0,v.useState)({}),[c,l]=(0,v.useState)(null),[u,d]=(0,v.useState)(``),[f,p]=(0,v.useState)(``),[m,h]=(0,v.useState)(``),[g,_]=(0,v.useState)(!1),[y,b]=(0,v.useState)(``),x=P(),w=(0,v.useCallback)(async()=>{try{let e=await fetch(`/api/repos`,{cache:`no-store`});if(!e.ok)throw Error(`HTTP ${e.status}`);t(await e.json()),r(``)}catch(e){r(e.message||`could not load repositories`)}},[]);(0,v.useEffect)(()=>{let e=!0,t,n=async()=>{await w(),e&&(t=setTimeout(n,15e3))};return n(),()=>{e=!1,clearTimeout(t)}},[w]);let T=async(e,t,n=!1)=>{a(n=>({...n,[e]:t})),s(t=>({...t,[e]:``})),l(null);try{let r=t===`update`?await fetch(`/api/repos/${encodeURIComponent(e)}/update`,{method:`POST`}):await fetch(`/api/repos/${encodeURIComponent(e)}${n?`?force=1`:``}`,{method:`DELETE`}),i=await r.json();if(!r.ok||!i.ok)throw Error(i.error||`failed`);i.error&&s(t=>({...t,[e]:i.error}))}catch(t){s(n=>({...n,[e]:t.message}))}finally{a(t=>{let n={...t};return delete n[e],n}),w()}},E=async e=>{if(e.preventDefault(),u.trim()&&!g){_(!0),b(``);try{let e=await fetch(`/api/repos`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({url:u.trim(),name:f.trim()||void 0,branch:m.trim()||void 0})}),t=await e.json();if(!e.ok)throw Error(t.error||`clone failed`);d(``),p(``),h(``),await w()}catch(e){b(e.message)}finally{_(!1)}}},D=[...e?.repos??[]].sort((e,t)=>(t.updatedAt??``).localeCompare(e.updatedAt??``));return(0,S.jsxs)(`div`,{className:`settings-screen ws-screen repos-screen`,children:[(0,S.jsxs)(`div`,{className:`settings-head`,children:[(0,S.jsxs)(`h1`,{children:[(0,S.jsx)(C,{name:`source`,className:`ms-lg`}),` Repositories`]}),(0,S.jsx)(`span`,{className:`spacer`}),e?.enabled&&(0,S.jsxs)(`span`,{className:`settings-note`,children:[D.length,` cloned`]}),n&&(0,S.jsx)(`span`,{className:`settings-err`,children:n})]}),e&&!e.enabled&&(0,S.jsx)(`section`,{className:`panel`,children:(0,S.jsx)(`div`,{className:`ws-empty`,children:e.error&&!/are off/.test(e.error)?(0,S.jsx)(`span`,{className:`settings-err`,children:e.error}):(0,S.jsxs)(S.Fragment,{children:[`Repositories are off. Turn them on in `,(0,S.jsx)(`a`,{href:`#/settings`,children:`settings`}),` or add a `,(0,S.jsx)(`code`,{children:`repos:`}),` block to kraftwerk.yml.`]})})}),e?.enabled&&(0,S.jsxs)(`section`,{className:`panel`,children:[(0,S.jsxs)(`div`,{className:`panel-head`,children:[(0,S.jsx)(`span`,{className:`microlabel`,children:`add a repository`}),(0,S.jsx)(`span`,{className:`spacer`}),(0,S.jsxs)(`span`,{className:`settings-note`,children:[`clones into `,(0,S.jsx)(`code`,{title:e.root,children:e.root})]})]}),(0,S.jsxs)(`form`,{className:`agent-form`,onSubmit:e=>void E(e),children:[(0,S.jsxs)(`div`,{className:`agent-form-row`,children:[(0,S.jsxs)(`label`,{className:`agent-field`,style:{flex:2},children:[`url`,(0,S.jsx)(`input`,{value:u,placeholder:`https://github.com/org/repo.git, git@host:org/repo.git or github:org/repo`,onChange:e=>d(e.target.value),autoFocus:!0})]}),(0,S.jsxs)(`label`,{className:`agent-field`,style:{flex:1},children:[`name`,(0,S.jsx)(`input`,{value:f,placeholder:`from the url`,onChange:e=>p(e.target.value)})]}),(0,S.jsxs)(`label`,{className:`agent-field`,style:{width:140},children:[`branch`,(0,S.jsx)(`input`,{value:m,placeholder:`default`,onChange:e=>h(e.target.value)})]}),(0,S.jsxs)(`button`,{className:`ws-btn primary`,type:`submit`,disabled:g||!u.trim(),children:[(0,S.jsx)(C,{name:g?`progress_activity`:`download`,className:`ms-sm`}),g?`cloning…`:`clone`]})]}),y&&(0,S.jsx)(`div`,{className:`settings-err`,children:y}),(0,S.jsxs)(`div`,{className:`settings-note`,children:[`Uses your own git credentials and never prompts: a private remote must already work from a terminal. Agents see every clone here and can add more with `,(0,S.jsx)(`code`,{children:`kraftwerk repos add`}),`.`]})]})]}),e?.enabled&&(0,S.jsxs)(`section`,{className:`panel`,children:[(0,S.jsx)(`div`,{className:`panel-head`,children:(0,S.jsx)(`span`,{className:`microlabel`,children:`cloned repositories · newest change first`})}),D.length===0&&(0,S.jsx)(`div`,{className:`ws-empty`,children:`Nothing cloned yet.`}),D.map(e=>{let t=i[e.slug],n=no(e);return(0,S.jsxs)(`div`,{className:`ws-row repo-row state-${n.cls}`,"data-repo":e.slug,children:[(0,S.jsx)(`span`,{className:`switcher-icon ws-icon`,children:(0,S.jsx)(C,{name:`folder_data`})}),(0,S.jsxs)(`div`,{className:`ws-main`,children:[(0,S.jsxs)(`div`,{className:`ws-title`,children:[(0,S.jsx)(`span`,{className:`ws-name`,children:e.slug}),e.branch&&(0,S.jsx)(`span`,{className:`repo-branch`,children:e.branch}),(0,S.jsx)(`span`,{className:`ws-state ws-state-${n.cls}`,children:n.label}),e.updatedAt&&(0,S.jsxs)(`span`,{className:`vibeable-when`,title:e.updatedAt,children:[`changed `,Te(e.updatedAt)]})]}),e.url&&(0,S.jsx)(`div`,{className:`ws-root`,title:e.url,children:to(e.url)}),x&&(0,S.jsx)(`div`,{className:`ws-root ws-dim`,title:e.path,children:e.path}),(0,S.jsxs)(`div`,{className:`ws-meta`,children:[e.head&&(0,S.jsxs)(`span`,{title:e.committedAt,children:[(0,S.jsx)(`code`,{children:e.head}),` `,e.subject,e.committedAt?` · ${Te(e.committedAt)}`:``]}),!!e.behind&&!!e.dirty&&(0,S.jsxs)(`span`,{children:[`behind by `,e.behind]}),e.error&&(0,S.jsx)(`span`,{className:`settings-err`,children:e.error})]}),o[e.slug]&&(0,S.jsx)(`div`,{className:`settings-err`,children:o[e.slug]})]}),(0,S.jsxs)(`div`,{className:`ws-actions`,children:[(0,S.jsxs)(`button`,{className:`ws-btn`,disabled:!!t,onClick:()=>void T(e.slug,`update`),title:`git fetch, then fast-forward when clean`,children:[(0,S.jsx)(C,{name:t===`update`?`progress_activity`:`sync`,className:`ms-sm`}),t===`update`?`updating…`:`update`]}),c!==e.slug&&(0,S.jsxs)(`button`,{className:`ws-btn`,disabled:!!t,onClick:()=>l(e.slug),title:`Delete the clone`,children:[(0,S.jsx)(C,{name:`delete`,className:`ms-sm`}),` remove`]}),c===e.slug&&(0,S.jsxs)(S.Fragment,{children:[(0,S.jsxs)(`button`,{className:`ws-btn danger`,onClick:()=>void T(e.slug,`remove`,ro(e)),children:[(0,S.jsx)(C,{name:`delete`,className:`ms-sm`}),e.dirty||e.ahead?`delete with local changes`:ro(e)?`delete anyway`:`confirm remove`]}),(0,S.jsx)(`button`,{className:`ws-btn`,onClick:()=>l(null),children:`cancel`})]})]})]},e.slug)})]})]})}var ao=40,oo=/Mac|iPhone|iPad/.test(navigator.platform),so=null,G=e=>(e?.workspaces??[]).flatMap(e=>[...e.agents.map(t=>({kind:`agent`,agent:t,ws:e,key:`${e.url}|agent|${t.slug}`})),...(e.channels??[]).map(t=>({kind:`channel`,channel:t,ws:e,key:`${e.url}|channel|${t.slug}`}))]),K=e=>e.kind===`agent`?e.agent.name:e.channel.name,co=e=>e.kind===`agent`?e.agent.description:e.channel.purpose,lo=e=>e.kind===`agent`?`/agents/${encodeURIComponent(e.agent.slug)}`:`/channels/${encodeURIComponent(e.channel.slug)}`;function uo(e,t){let n=t.toLowerCase().split(/\s+/).filter(Boolean);if(n.length===0)return e;let r=[],i=new Map;for(let t of e){i.has(t.ws)||i.set(t.ws,i.size);let e=K(t).toLowerCase(),a=[e,...t.kind===`agent`?[t.agent.slug,t.agent.description??``,t.agent.group??``,`agent`]:[t.channel.slug,t.channel.purpose??``,`channel`],t.ws.name].join(` `).toLowerCase();if(!n.every(e=>a.includes(e)))continue;let o=e.startsWith(n[0])?0:e.includes(n[0])?1:2;r.push({hit:t,score:o,ws:i.get(t.ws)})}return r.sort((e,t)=>e.ws-t.ws||e.score-t.score).map(e=>e.hit)}function fo(e){let t=[];for(let n of e){let e=t.find(e=>e.ws===n.ws);e?e.hits.push(n):t.push({ws:n.ws,hits:[n]})}return t}async function po(e){let t=lo(e);if(e.ws.current)return A(t);let n=e.ws.live||!e.ws.root?e.ws.url:await ne(e.ws.root);window.location.assign(`${n.replace(/\/+$/,``)}/#${t}`)}function mo(){let[e,t]=(0,v.useState)(!1);return(0,v.useEffect)(()=>{let e=e=>{(e.metaKey||e.ctrlKey)&&!e.altKey&&!e.shiftKey&&e.key.toLowerCase()===`k`&&(e.preventDefault(),t(e=>!e))};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[]),(0,S.jsxs)(S.Fragment,{children:[(0,S.jsxs)(`button`,{type:`button`,className:`search-btn`,onClick:()=>t(!0),title:`jump to an agent or channel`,"aria-label":`search`,children:[(0,S.jsx)(C,{name:`search`}),(0,S.jsx)(`kbd`,{className:`kbd`,children:oo?`⌘K`:`Ctrl K`})]}),e&&(0,S.jsx)(ho,{onClose:()=>t(!1)})]})}function ho({onClose:e}){let[t,n]=(0,v.useState)(so),[r,i]=(0,v.useState)(so===null),[a,o]=(0,v.useState)(!1),[s,c]=(0,v.useState)(``),[l,u]=(0,v.useState)(0),[d,f]=(0,v.useState)(null),[p,m]=(0,v.useState)(``),h=(0,v.useRef)(null);(0,v.useEffect)(()=>{let e=!0;return fetch(`/api/search/agents`,{cache:`no-store`}).then(e=>e.ok?e.json():Promise.reject(Error(String(e.status)))).then(t=>{so=t,e&&n(t)}).catch(()=>e&&o(!0)).finally(()=>e&&i(!1)),()=>{e=!1}},[]);let g=(0,v.useMemo)(()=>G(t),[t]),_=(0,v.useMemo)(()=>uo(g,s).slice(0,ao),[g,s]),y=(0,v.useMemo)(()=>fo(_),[_]),b=Math.min(l,Math.max(_.length-1,0));(0,v.useEffect)(()=>{h.current?.querySelector(`[aria-selected="true"]`)?.scrollIntoView({block:`nearest`})},[b,_]);let x=t=>{if(!d){if(t.ws.current||t.ws.live){e(),po(t);return}f(t.key),m(``),po(t).catch(e=>{f(null),m(`${t.ws.name}: ${e.message}`)})}},w=t=>{if(t.key===`ArrowDown`)t.preventDefault(),u(_.length?(b+1)%_.length:0);else if(t.key===`ArrowUp`)t.preventDefault(),u(_.length?(b-1+_.length)%_.length:0);else if(t.key===`Enter`){t.preventDefault();let e=_[b];e&&x(e)}else t.key===`Escape`&&(t.preventDefault(),e())},T;if(_.length>0){let e=-1;T=(0,S.jsx)(`ul`,{className:`palette-list`,role:`listbox`,"aria-label":`agents and channels`,ref:h,children:y.map(t=>(0,S.jsxs)(v.Fragment,{children:[(0,S.jsxs)(`li`,{className:`palette-group`,role:`presentation`,title:t.ws.current?`this workspace`:t.ws.url,children:[t.ws.icon&&(0,S.jsx)(`span`,{"aria-hidden":!0,children:t.ws.icon}),(0,S.jsx)(`span`,{className:`palette-group-name`,children:t.ws.name}),t.ws.current?(0,S.jsx)(`span`,{className:`palette-group-note`,children:`this workspace`}):t.ws.live?(0,S.jsx)(C,{name:`open_in_new`,className:`ms-sm`}):(0,S.jsx)(`span`,{className:`palette-chip`,children:`stopped`})]}),t.hits.map(t=>{let n=++e;return(0,S.jsxs)(`li`,{role:`option`,"aria-selected":n===b,className:`palette-item${n===b?` active`:``}`,onMouseMove:()=>n!==b&&u(n),onClick:()=>x(t),children:[(0,S.jsx)(`span`,{className:`palette-emoji`,"aria-hidden":!0,children:t.kind===`agent`?t.agent.emoji:(0,S.jsx)(C,{name:`forum`})}),(0,S.jsxs)(`span`,{className:`palette-text`,children:[(0,S.jsx)(`span`,{className:`palette-name`,children:K(t)}),co(t)&&(0,S.jsx)(`span`,{className:`palette-sub`,children:co(t)})]}),d===t.key?(0,S.jsx)(C,{name:`progress_activity`,className:`ms-sm`}):t.kind===`channel`&&(0,S.jsx)(`span`,{className:`palette-chip`,children:`channel`})]},t.key)})]},t.ws.url||t.ws.name))})}else T=a?(0,S.jsx)(`div`,{className:`palette-empty`,children:`could not load the agents and channels`}):r?(0,S.jsx)(`div`,{className:`palette-empty`,children:`looking for agents and channels…`}):g.length===0?(0,S.jsxs)(`div`,{className:`palette-empty`,children:[`no agents yet — `,(0,S.jsx)(`a`,{href:`#/agents/new`,onClick:e,children:`create one`})]}):(0,S.jsxs)(`div`,{className:`palette-empty`,children:[`no agent or channel matches “`,s,`”`]});return(0,S.jsx)(`div`,{className:`palette-backdrop`,onMouseDown:e,children:(0,S.jsxs)(`div`,{className:`palette`,role:`dialog`,"aria-label":`jump to an agent or channel`,onMouseDown:e=>e.stopPropagation(),onKeyDown:w,children:[(0,S.jsxs)(`div`,{className:`palette-input`,children:[(0,S.jsx)(C,{name:`search`}),(0,S.jsx)(`input`,{autoFocus:!0,value:s,onChange:e=>{c(e.target.value),u(0)},placeholder:`jump to an agent or channel…`,"aria-label":`search`,autoComplete:`off`,spellCheck:!1}),r&&t&&(0,S.jsx)(C,{name:`progress_activity`,className:`ms-sm`}),(0,S.jsx)(`kbd`,{className:`kbd`,children:`esc`})]}),T,(0,S.jsxs)(`div`,{className:`palette-foot`,children:[(0,S.jsxs)(`span`,{children:[(0,S.jsx)(`kbd`,{className:`kbd`,children:`↑`}),(0,S.jsx)(`kbd`,{className:`kbd`,children:`↓`}),` move`]}),(0,S.jsxs)(`span`,{children:[(0,S.jsx)(`kbd`,{className:`kbd`,children:`↵`}),` open`]}),d&&(0,S.jsxs)(`span`,{className:`palette-note`,children:[(0,S.jsx)(C,{name:`progress_activity`,className:`ms-sm`}),` starting the workspace…`]}),p&&(0,S.jsxs)(`span`,{className:`palette-warn`,title:p,children:[(0,S.jsx)(C,{name:`warning`,className:`ms-sm`}),` `,p]})]})]})})}var go=`modulepreload`,_o=function(e){return`/`+e},vo={},yo=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?import.meta.resolve(e):new URL(e,import.meta.url).href}r=o(t.map(t=>{if(t=_o(t,n),t=s(t),t in vo)return;vo[t]=!0;let r=t.endsWith(`.css`);for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}let i=document.createElement(`link`);if(i.rel=r?`stylesheet`:go,r||(i.as=`script`),i.crossOrigin=``,i.href=t,a&&i.setAttribute(`nonce`,a),document.head.appendChild(i),r)return new Promise((e,n)=>{i.addEventListener(`load`,e),i.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},bo=(0,v.lazy)(()=>yo(()=>import(`./editor-pqKf5qTC.js`).then(e=>({default:e.EditorScreen})),__vite__mapDeps([0,1,2,3,4,5,6])));function xo(){let[e,t=``]=w().split(`?`),n=e.split(`/`).filter(Boolean),r=new URLSearchParams(t).get(`workflow`)??void 0,[i,a]=(0,v.useState)(``),[o,s]=(0,v.useState)(``),[c,l]=(0,v.useState)(``),[u,d]=(0,v.useState)(!0),[f,p]=(0,v.useState)(``),[m,h]=(0,v.useState)(``),[g,_]=(0,v.useState)(!1),[y,b]=(0,v.useState)(!1),[x,T]=(0,v.useState)(!1),[E,D]=(0,v.useState)([]);(0,v.useEffect)(()=>{let e=!0,t,n=async()=>{try{let t=await fetch(`/api/meta`,{cache:`no-store`}).then(e=>e.json());if(!e)return;a(t.projectName??``),s(t.projectIcon??``),l(t.projectColor??``),d(t.projectNamed!==!1),p(t.projectRootLabel??``),h(t.projectRoot??``),_(!!t.git),b(!!t.repos),T(!!t.vibeables),F({git:!!t.git,repos:!!t.repos,vibeables:!!t.vibeables}),D(Array.isArray(t.switcher)?t.switcher:[])}catch{}e&&(t=setTimeout(n,3e4))};n();let r=()=>{clearTimeout(t),n()};return window.addEventListener(`kw-meta-refresh`,r),()=>{e=!1,clearTimeout(t),window.removeEventListener(`kw-meta-refresh`,r)}},[]),(0,v.useEffect)(()=>{if(ee(i?`${i} — kraftwerk`:`kraftwerk inspector`),!o)return;let e=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><text y="0.9em" font-size="85">${o}</text></svg>`,t=document.querySelector(`link[rel="icon"]`);t||(t=document.createElement(`link`),t.rel=`icon`,document.head.appendChild(t)),t.href=`data:image/svg+xml,${encodeURIComponent(e)}`},[i,o]);let O;if(O=n[0]===`runs`&&n[1]?(0,S.jsx)(bi,{id:n[1],workflow:r}):n[0]===`runs`?(0,S.jsx)(ko,{}):n[0]===`workflows`&&n[1]?(0,S.jsx)(Wi,{slug:decodeURIComponent(n[1])}):n[0]===`workflows`?(0,S.jsx)(Hi,{}):n[0]===`chats`?(0,S.jsx)(ka,{seg:n}):n[0]===`skills`?(0,S.jsx)(wa,{name:n[1]?decodeURIComponent(n[1]):void 0}):n[0]===`settings`?(0,S.jsx)(qa,{}):n[0]===`workspaces`?(0,S.jsx)(Ya,{}):n[0]===`git`?(0,S.jsx)(eo,{}):n[0]===`repos`?(0,S.jsx)(io,{}):n[0]===`vibeables`?(0,S.jsx)(Wr,{slug:n[1]?decodeURIComponent(n[1]):void 0}):n[0]===`agents`||n[0]===`team`?(0,S.jsx)(ka,{seg:n.slice(1)}):n[0]===`channels`?(0,S.jsx)(Gr,{seg:n.slice(1)}):n[0]===`knowledge`?(0,S.jsx)(da,{bundle:n[1]?decodeURIComponent(n[1]):void 0,conceptId:n.length>2?n.slice(2).map(decodeURIComponent).join(`/`):void 0}):(0,S.jsx)($i,{}),n[0]===`edit`&&n[1]&&n.length>2)return(0,S.jsx)(v.Suspense,{fallback:(0,S.jsx)(`div`,{className:`empty`,children:`loading editor…`}),children:(0,S.jsx)(bo,{bundle:decodeURIComponent(n[1]),conceptId:n.slice(2).map(decodeURIComponent).join(`/`)},n.slice(1).join(`/`))});let k=(...e)=>e.includes(n[0]??``)?`active`:``;return(0,v.useEffect)(()=>{let e=document.documentElement,t=m||i,n=t?ge(ce(c,t)):null;if(!n){delete e.dataset.wsAccent;return}for(let[t,r]of Object.entries(n))e.style.setProperty(t,r);e.dataset.wsAccent=``},[c,m,i]),(0,S.jsxs)(S.Fragment,{children:[(0,S.jsxs)(`header`,{className:`topbar`,style:{"--ws-c":ce(c,m||i)},children:[(0,S.jsxs)(`span`,{className:`wordmark`,children:[(0,S.jsx)(`a`,{href:`#/`,className:`home-link`,title:`Dashboard`,children:i?(0,S.jsx)(ve,{className:`home-tile`,icon:o,name:i,color:c,seed:m||i}):(0,S.jsx)(C,{name:`home`})}),i&&(0,S.jsx)(Oo,{name:i,icon:o,color:c,named:u,root:f,seed:m||i,entries:E})]}),(0,S.jsxs)(`nav`,{children:[(0,S.jsxs)(`a`,{href:`#/channels`,className:k(`channels`),children:[(0,S.jsx)(C,{name:`forum`}),` channels`]}),(0,S.jsxs)(`a`,{href:`#/agents`,className:k(`agents`,`team`,`chats`),children:[(0,S.jsx)(C,{name:`groups`}),` agents`]}),(0,S.jsxs)(`a`,{href:`#/workflows`,className:k(`workflows`,`runs`),children:[(0,S.jsx)(C,{name:`account_tree`}),` workflows`]}),(0,S.jsxs)(`a`,{href:`#/knowledge`,className:k(`knowledge`),children:[(0,S.jsx)(C,{name:`menu_book`}),` knowledge`]}),(0,S.jsxs)(`a`,{href:`#/skills`,className:k(`skills`)+` nav-expert`,children:[(0,S.jsx)(C,{name:`extension`}),` skills`]}),y&&(0,S.jsxs)(`a`,{href:`#/repos`,className:k(`repos`)+` nav-expert`,children:[(0,S.jsx)(C,{name:`source`}),` repositories`]}),x&&(0,S.jsxs)(`a`,{href:`#/vibeables`,className:k(`vibeables`),children:[(0,S.jsx)(C,{name:`web`}),` vibeables`]}),g&&(0,S.jsx)(So,{active:n[0]===`git`})]}),(0,S.jsx)(`span`,{className:`spacer`}),(0,S.jsx)(mo,{}),(0,S.jsx)(Po,{}),(0,S.jsx)(Ao,{}),(0,S.jsx)(jo,{}),(0,S.jsx)(Fo,{})]}),(0,S.jsx)(`main`,{className:`shell`,children:O})]})}function So({active:e}){let t=z(`/api/git`,!1,15e3),n=t?.files?.filter(e=>e.syncable).length??0;return(0,S.jsxs)(`a`,{href:`#/git`,className:e?`nav-expert active`:`nav-expert`,children:[(0,S.jsx)(C,{name:`cloud_sync`}),` git`,!!t?.behind&&(0,S.jsxs)(`span`,{className:`git-badge behind`,children:[t.behind,`↓`]}),!!t?.ahead&&(0,S.jsxs)(`span`,{className:`git-badge ahead`,children:[t.ahead,`↑`]}),!t?.ahead&&!t?.behind&&!!n&&(0,S.jsx)(`span`,{className:`git-badge dirty`,children:n})]})}function Co(e){try{let t=new URL(e);return t.hostname===`localhost`||t.hostname===`127.0.0.1`?`:${t.port||(t.protocol===`https:`?443:80)}`:t.host}catch{return e.replace(/^https?:\/\//,``)}}function wo({label:e}){return e?(0,S.jsx)(`span`,{className:`switcher-root`,title:e,children:(0,S.jsx)(`span`,{dir:`ltr`,children:e})}):null}function To({name:e,named:t}){let n=t===!1;return(0,S.jsx)(`span`,{className:`switcher-name${n?` unnamed`:``}`,title:n?`${e} — folder name; set name: in kraftwerk.yml`:e,children:e})}function Eo({entry:e,ambiguous:t}){let[n,r]=(0,v.useState)(`idle`),[i,a]=(0,v.useState)(``),o=e.exists===!1,s=async()=>{r(`starting`),a(``);try{window.location.assign(await ne(e.root))}catch(e){r(`error`),a(e.message)}};return(0,S.jsxs)(`span`,{className:`switcher-item stopped ${o?`missing`:``}`,role:`menuitem`,style:{"--ws-c":ce(e.color,e.root??e.url)},children:[(0,S.jsx)(ve,{icon:e.icon,name:e.name,color:e.color,seed:e.root??e.url,ambiguous:t}),(0,S.jsxs)(`span`,{className:`switcher-text`,children:[(0,S.jsx)(To,{name:e.name,named:e.named}),n===`error`?(0,S.jsx)(`span`,{className:`switcher-sub switcher-err`,title:i,children:i}):o?(0,S.jsx)(`span`,{className:`switcher-sub`,children:`folder missing`}):(0,S.jsx)(wo,{label:e.rootLabel})]}),(0,S.jsxs)(`span`,{className:`switcher-side`,children:[(0,S.jsx)(`span`,{className:`switcher-port`,children:Co(e.url)}),(0,S.jsxs)(`button`,{className:`switcher-start`,disabled:o||n===`starting`,title:o?`The project folder no longer exists`:`Start the UI for this project`,onClick:e=>{e.stopPropagation(),s()},children:[n===`starting`?(0,S.jsx)(C,{name:`progress_activity`}):(0,S.jsx)(C,{name:`play_arrow`}),n===`starting`?`starting`:`start`]})]})]})}function Do({entry:e,ambiguous:t}){let n=e.root??e.url;return(0,S.jsxs)(`a`,{className:`switcher-item${e.live?` live`:``}`,role:`menuitem`,href:e.url,style:{"--ws-c":ce(e.color,n)},children:[(0,S.jsx)(ve,{icon:e.icon,name:e.name,color:e.color,seed:n,ambiguous:t}),(0,S.jsxs)(`span`,{className:`switcher-text`,children:[(0,S.jsx)(To,{name:e.name,named:e.named}),(0,S.jsx)(wo,{label:e.rootLabel??(e.root?void 0:e.url.replace(/^https?:\/\//,``))})]}),(0,S.jsx)(`span`,{className:`switcher-side`,children:(0,S.jsxs)(`span`,{className:`switcher-port`,children:[e.live&&(0,S.jsx)(`span`,{className:`live-dot`,title:`running`}),Co(e.url)]})})]})}function Oo({name:e,icon:t,color:n,named:r,root:i,seed:a,entries:o}){let[s,c]=(0,v.useState)(!1),l=P();if((0,v.useEffect)(()=>{if(!s)return;let e=e=>{e.target.closest(`.switcher-wrap`)||c(!1)};return window.addEventListener(`mousedown`,e),()=>window.removeEventListener(`mousedown`,e)},[s]),o.length===0)return(0,S.jsx)(`span`,{className:`env-name`,title:i||`Project (kraftwerk.yml: name)`,children:e});let u=new Map;for(let e of[t,...o.map(e=>e.icon)])e&&u.set(e,(u.get(e)??0)+1);let d=e=>!!e&&(u.get(e)??0)>1,f=[{key:`running`,label:`running`,items:o.filter(e=>e.live===!0)},{key:`stopped`,label:`stopped`,items:o.filter(e=>e.live===!1)},{key:`linked`,label:`linked`,items:o.filter(e=>e.live===void 0)}].filter(e=>e.items.length>0),p=a||e;return(0,S.jsxs)(`span`,{className:`switcher-wrap`,children:[(0,S.jsxs)(`button`,{className:`env-name env-switch`,title:i?`${i} — switch workspace`:`Switch workspace`,"aria-haspopup":`menu`,"aria-expanded":s,onClick:()=>c(e=>!e),children:[e,(0,S.jsx)(C,{name:`expand_more`})]}),s&&(0,S.jsxs)(`div`,{className:`switcher-pop`,role:`menu`,children:[(0,S.jsx)(`div`,{className:`switcher-head`,children:`Workspaces`}),(0,S.jsxs)(`span`,{className:`switcher-item current`,"aria-current":`true`,style:{"--ws-c":ce(n,p)},children:[(0,S.jsx)(ve,{icon:t,name:e,color:n,seed:p,ambiguous:d(t)}),(0,S.jsxs)(`span`,{className:`switcher-text`,children:[(0,S.jsx)(To,{name:e,named:r}),i?(0,S.jsx)(wo,{label:i}):(0,S.jsx)(`span`,{className:`switcher-sub`,children:`this workspace`})]}),(0,S.jsx)(`span`,{className:`switcher-side`,children:(0,S.jsx)(C,{name:`check`,className:`switcher-check`})})]}),f.map(e=>(0,S.jsxs)(`div`,{className:`switcher-group switcher-group-${e.key}`,role:`group`,"aria-label":e.label,children:[(0,S.jsx)(`div`,{className:`switcher-group-head`,children:e.label}),e.items.map(e=>e.live===!1&&e.root?(0,S.jsx)(Eo,{entry:e,ambiguous:d(e.icon)},e.root):(0,S.jsx)(Do,{entry:e,ambiguous:d(e.icon)},e.root??e.url))]},e.key)),l&&(0,S.jsxs)(`a`,{className:`switcher-foot`,href:`#/workspaces`,role:`menuitem`,onClick:()=>c(!1),children:[(0,S.jsx)(C,{name:`hub`}),` manage workspaces`]})]})]})}function ko(){let[e,t]=(0,v.useState)(null);return(0,v.useEffect)(()=>{let e=!0;return fetch(`/api/runs`).then(e=>e.json()).then(n=>{e&&(n.runs.length>0?A(`/runs/${n.runs[0].id}`,{replace:!0}):t({outputDir:n.outputDir}))}).catch(()=>{}),()=>{e=!1}},[]),e?(0,S.jsxs)(`div`,{className:`empty`,children:[`No runs found in `,(0,S.jsx)(`code`,{children:e.outputDir}),`. Start one from the`,` `,(0,S.jsx)(`a`,{href:`#/workflows`,children:`workflows`}),` list or with `,(0,S.jsx)(`code`,{children:`kraftwerk run <workflow> [request]`}),`.`]}):(0,S.jsx)(`div`,{className:`empty`,children:`loading…`})}function Ao(){let[e,t]=(0,v.useState)(null),[n,r]=(0,v.useState)(!1);(0,v.useEffect)(()=>{let e=!0,n,r=async()=>{try{let n=await fetch(`/api/meta`,{cache:`no-store`}).then(e=>e.json());e&&t(n)}catch{}e&&(n=setTimeout(r,3e4))};return r(),()=>{e=!1,clearTimeout(n)}},[]);let i=e?.restartable&&e.diskVersion&&e.diskVersion!==e.version?e.diskVersion:null;async function a(){if(i){r(!0),await fetch(`/api/restart`,{method:`POST`}).catch(()=>{});for(let e=0;e<60;e++){await new Promise(e=>setTimeout(e,500));try{if((await fetch(`/api/meta`,{cache:`no-store`}).then(e=>e.json())).version===i)break}catch{}}location.reload()}}return!i&&!n?null:(0,S.jsx)(`button`,{className:`relaunch-note`,disabled:n,title:`v${i} is installed on disk, the server still runs v${e?.version}. Click to relaunch with the new version.`,onClick:()=>void a(),children:n?`relaunching…`:(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(C,{name:`restart_alt`,className:`ms-sm`}),` v`,i,` ready — relaunch`]})})}function jo(){let e=P();return(0,S.jsxs)(`button`,{className:`expert-toggle ${e?`on`:``}`,title:e?`Expert mode on — full detail`:`Expert mode off — simplified view`,"aria-pressed":e,onClick:()=>ie(!e),children:[(0,S.jsx)(`span`,{className:`expert-track`,children:(0,S.jsx)(`span`,{className:`expert-knob`})}),`expert`]})}var Mo={approval:`gavel`,routine_done:`schedule`,routine_failed:`schedule`,run_done:`account_tree`,run_failed:`account_tree`},No=`kw.notif.toast.dismissed`;function Po(){let[e,t]=(0,v.useState)(!1),n=z(`/api/notifications`,!1,5e3),[r,i]=(0,v.useState)(()=>typeof Notification>`u`?`unsupported`:Notification.permission),[a,o]=(0,v.useState)(()=>{try{return localStorage.getItem(No)===`1`}catch{return!1}}),s=(0,v.useRef)(null),[c,l]=(0,v.useState)(null),[u,d]=(0,v.useState)(null);(0,v.useEffect)(()=>l(null),[n]);let f=c??n,p=f?.items??[],m=f?.unread??0;(0,v.useEffect)(()=>k(m),[m]),(0,v.useEffect)(()=>{if(n){if(!s.current){s.current=new Set(p.map(e=>e.id));return}for(let e of p)if(!s.current.has(e.id)&&(s.current.add(e.id),!(e.readAt||r!==`granted`)&&(document.hidden||location.hash!==`#${e.href}`)))try{let t=new Notification(e.title,{body:e.body,tag:e.id});t.onclick=()=>{window.focus(),g(e),t.close()}}catch{}}},[n]),(0,v.useEffect)(()=>{if(!e)return;let n=e=>{e.target.closest(`.notif-wrap`)||t(!1)};return window.addEventListener(`mousedown`,n),()=>window.removeEventListener(`mousedown`,n)},[e]);async function h(e,t){try{let n=await fetch(e,{method:e.endsWith(`/notifications`)?`DELETE`:`POST`,headers:{"content-type":`application/json`},body:t===void 0?void 0:JSON.stringify(t)});if(!n.ok)return;let r=await n.json();l(`items`in r?r:{items:[],unread:0})}catch{}}function g(e){t(!1),e.readAt||h(`/api/notifications/read`,{ids:[e.id]}),A(e.href)}async function _(e){d(e.id);try{let n=await(await fetch(`/api/notifications/${encodeURIComponent(e.id)}/diagnose`,{method:`POST`})).json();n.href?(t(!1),A(n.href)):n.error&&alert(n.error)}catch{}d(null)}async function y(){typeof Notification>`u`||i(await Notification.requestPermission())}function b(){o(!0);try{localStorage.setItem(No,`1`)}catch{}}let x=r==="default"&&!a;return(0,S.jsxs)(`span`,{className:`notif-wrap`,children:[(0,S.jsxs)(`button`,{className:`info-btn notif-btn ${m?`has-unread`:``}`,title:m?`${m} item${m===1?``:`s`} need your attention`:`Notifications`,"aria-label":`Notifications`,onClick:()=>t(e=>!e),children:[(0,S.jsx)(C,{name:m?`notifications_active`:`notifications`}),m>0&&(0,S.jsx)(`span`,{className:`notif-badge`,children:m>99?`99+`:m})]}),e&&(0,S.jsxs)(`div`,{className:`info-pop notif-pop`,role:`menu`,children:[(0,S.jsxs)(`div`,{className:`notif-head`,children:[(0,S.jsx)(`span`,{className:`microlabel`,children:`notifications`}),(0,S.jsx)(`span`,{className:`spacer`}),m>0&&(0,S.jsx)(`button`,{className:`open-raw`,onClick:()=>void h(`/api/notifications/read`),children:`mark all read`}),p.length>0&&(0,S.jsx)(`button`,{className:`open-raw`,onClick:()=>void h(`/api/notifications`),children:`clear`})]}),x&&(0,S.jsxs)(`div`,{className:`notif-hint`,children:[(0,S.jsx)(`span`,{children:`Get a system notification when something needs you, even with this tab in the background.`}),(0,S.jsxs)(`span`,{className:`notif-hint-actions`,children:[(0,S.jsx)(`button`,{className:`ws-btn primary`,onClick:()=>void y(),children:`enable`}),(0,S.jsx)(`button`,{className:`ws-btn`,onClick:b,children:`not now`})]})]}),r===`denied`&&(0,S.jsx)(`div`,{className:`notif-hint muted`,children:`Browser notifications are blocked for this site — allow them in the address bar to get system alerts.`}),p.length===0?(0,S.jsx)(`div`,{className:`notif-empty`,children:`nothing needs you right now`}):(0,S.jsx)(`div`,{className:`notif-list`,children:p.slice(0,50).map(e=>(0,S.jsxs)(`div`,{className:`notif-row ${e.readAt?``:`unread`} ${e.kind}`,role:`button`,tabIndex:0,onClick:()=>g(e),onKeyDown:t=>{t.key===`Enter`&&g(e)},children:[(0,S.jsx)(`span`,{className:`notif-ico`,children:(0,S.jsx)(C,{name:Mo[e.kind]})}),(0,S.jsxs)(`span`,{className:`notif-body`,children:[(0,S.jsx)(`span`,{className:`notif-title`,children:e.title}),e.body&&(0,S.jsx)(`span`,{className:`notif-sub`,children:e.body}),e.diagnose&&(0,S.jsx)(`span`,{className:`notif-actions`,children:(0,S.jsxs)(`button`,{className:`ws-btn notif-diagnose`,disabled:u===e.id,title:`Open a chat that finds the cause and proposes the fix`,onClick:t=>{t.stopPropagation(),_(e)},children:[(0,S.jsx)(C,{name:u===e.id?`progress_activity`:`troubleshoot`,className:`ms-sm`}),u===e.id?`starting…`:`diagnose`]})})]}),(0,S.jsx)(`span`,{className:`notif-when num`,children:Te(e.at)})]},e.id))})]})]})}function Fo(){let[e,t]=(0,v.useState)(!1),[n,r]=(0,v.useState)(null),[i,a]=(0,v.useState)(null),[o,s]=(0,v.useState)(``);(0,v.useEffect)(()=>{if(!e)return;fetch(`/api/runs`).then(e=>e.json()).then(r).catch(()=>{}),fetch(`/api/workflows`).then(e=>e.json()).then(a).catch(()=>{}),fetch(`/api/meta`).then(e=>e.json()).then(e=>s(e.version)).catch(()=>{});let n=e=>{e.target.closest(`.info-wrap`)||t(!1)};return window.addEventListener(`mousedown`,n),()=>window.removeEventListener(`mousedown`,n)},[e]);let c=n?.runs[0];return(0,S.jsxs)(`span`,{className:`info-wrap`,children:[(0,S.jsx)(`button`,{className:`info-btn`,title:`Project info`,"aria-label":`Project info`,onClick:()=>t(e=>!e),children:(0,S.jsx)(C,{name:`info`})}),e&&(0,S.jsxs)(`div`,{className:`info-pop`,children:[(0,S.jsxs)(`div`,{className:`info-row`,children:[(0,S.jsx)(`span`,{className:`microlabel`,children:`Workflows`}),(0,S.jsx)(`span`,{className:`info-v`,children:i?`${i.workflows.length} discovered`:`…`}),(0,S.jsx)(`code`,{className:`info-path`,title:i?.root,children:i?.root??``})]}),(0,S.jsxs)(`div`,{className:`info-row`,children:[(0,S.jsx)(`span`,{className:`microlabel`,children:`Runs`}),(0,S.jsxs)(`span`,{className:`info-v`,children:[n?`${n.runs.length} total`:`…`,c?` · latest ${c.status}`:``]}),(0,S.jsx)(`code`,{className:`info-path`,title:n?.outputDir,children:n?.outputDir??``})]}),(0,S.jsxs)(`div`,{className:`info-row info-actions`,children:[(0,S.jsx)(`span`,{className:`microlabel`,children:`Workspace`}),(0,S.jsxs)(`a`,{className:`update-btn`,href:`#/settings`,onClick:()=>t(!1),children:[(0,S.jsx)(C,{name:`settings`,className:`ms-sm`}),` settings`]})]}),(0,S.jsxs)(`div`,{className:`info-row info-actions`,children:[(0,S.jsx)(`span`,{className:`microlabel`,children:`Theme`}),(0,S.jsx)(Ro,{})]}),(0,S.jsxs)(`div`,{className:`info-row info-actions`,children:[(0,S.jsx)(`span`,{className:`microlabel`,children:`Version`}),(0,S.jsx)(`span`,{className:`info-v mono`,children:o?`kraftwerk ${o}`:`…`}),(0,S.jsx)(Lo,{})]})]})]})}function Io(e,t){let n=e.split(`.`).map(Number),r=t.split(`.`).map(Number);for(let e=0;e<3;e++)if((n[e]??0)!==(r[e]??0))return(n[e]??0)<(r[e]??0);return!1}function Lo(){let[e,t]=(0,v.useState)(`idle`),[n,r]=(0,v.useState)(null);async function i(){t(`busy`);try{let e=await fetch(`/api/update-check`,{cache:`no-store`}),n=await e.json();if(!e.ok||!n.latest)throw Error();r(n),t(`done`)}catch{t(`err`)}}return e===`done`&&n?Io(n.current,n.latest)?(0,S.jsxs)(`span`,{className:`update-result newer`,children:[`v`,n.latest,` available — `,(0,S.jsxs)(`code`,{children:[`npm i -g `,n.name,`@latest`]})]}):(0,S.jsxs)(`span`,{className:`update-result`,children:[(0,S.jsx)(C,{name:`check`,className:`ms-sm`}),` up to date`]}):(0,S.jsx)(`button`,{className:`update-btn`,disabled:e===`busy`,onClick:()=>void i(),children:e===`busy`?`checking…`:e===`err`?`npm unreachable — retry`:(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(C,{name:`sync`,className:`ms-sm`}),` check for updates`]})})}function Ro(){return(0,S.jsx)(`button`,{className:`theme-btn`,onClick:()=>{let e=document.documentElement,t=e.dataset.theme===`light`?`dark`:`light`;e.dataset.theme=t;try{localStorage.setItem(`kw-theme`,t)}catch{}},children:`day / night`})}(0,y.createRoot)(document.getElementById(`root`)).render((0,S.jsx)(v.StrictMode,{children:(0,S.jsx)(xo,{})}));export{x as a,o as c,te as i,s as l,C as n,h as o,A as r,d as s,yo as t,l as u};
@@ -0,0 +1 @@
1
+ @font-face{font-family:Roboto;font-style:normal;font-display:swap;font-weight:400;src:url(/assets/roboto-latin-400-normal-BqEyEoaF.woff2)format("woff2"),url(/assets/roboto-latin-400-normal-D27F5sTu.woff)format("woff")}@font-face{font-family:Roboto;font-style:normal;font-display:swap;font-weight:500;src:url(/assets/roboto-latin-500-normal-7RbcRiD8.woff2)format("woff2"),url(/assets/roboto-latin-500-normal-fsTFPL3E.woff)format("woff")}@font-face{font-family:Roboto;font-style:normal;font-display:swap;font-weight:600;src:url(/assets/roboto-latin-600-normal-CzqH9ZEY.woff2)format("woff2"),url(/assets/roboto-latin-600-normal-X4S5XP0J.woff)format("woff")}@font-face{font-family:Roboto;font-style:normal;font-display:swap;font-weight:700;src:url(/assets/roboto-latin-700-normal-BZpUvMxY.woff2)format("woff2"),url(/assets/roboto-latin-700-normal-YuyVweIx.woff)format("woff")}@font-face{font-family:Roboto Mono;font-style:normal;font-display:swap;font-weight:400;src:url(/assets/roboto-mono-latin-400-normal-GekRknry.woff2)format("woff2"),url(/assets/roboto-mono-latin-400-normal-DBZPkcnn.woff)format("woff")}@font-face{font-family:Roboto Mono;font-style:normal;font-display:swap;font-weight:500;src:url(/assets/roboto-mono-latin-500-normal-pxIOXZmA.woff2)format("woff2"),url(/assets/roboto-mono-latin-500-normal-D6j6AMzd.woff)format("woff")}@font-face{font-family:Roboto Mono;font-style:normal;font-display:swap;font-weight:700;src:url(/assets/roboto-mono-latin-700-normal-foxDnrFi.woff2)format("woff2"),url(/assets/roboto-mono-latin-700-normal-CHYrj1DZ.woff)format("woff")}@font-face{font-family:Material Symbols Rounded;font-style:normal;font-weight:400;font-display:block;src:url(/assets/material-symbols-rounded-DzDTtRam.woff2)format("woff2")}.material-symbols-rounded{letter-spacing:normal;text-transform:none;white-space:nowrap;word-wrap:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:optimizelegibility;font-feature-settings:"liga";direction:ltr;font-family:Material Symbols Rounded;font-size:24px;font-style:normal;font-weight:400;line-height:1;display:inline-block}:root{--font-sans:"Roboto";--font-mono:"Roboto Mono";--topbar-h:53px;--primary:#a8c7fa;--on-primary:#062e6f;--primary-container:#0842a0;--on-primary-container:#d3e3fd;--secondary:#c2c7cf;--on-secondary:#2c3137;--secondary-container:#004a77;--on-secondary-container:#c2e7ff;--tertiary:#b8c2a2;--tertiary-container:#38402b;--on-tertiary-container:#d8e0c4;--error:#ffb4ab;--on-error:#690005;--error-container:#93000a;--on-error-container:#ffdad6;--success:#6dd58c;--success-container:#0f5223;--on-success-container:#c4eed0;--surface:#131314;--on-surface:#e3e3e3;--on-surface-variant:#c4c7c5;--surface-container-lowest:#0e0e0e;--surface-container-low:#1b1b1b;--surface-container:#1e1f20;--surface-container-high:#282a2c;--surface-container-highest:#333537;--outline:#8e918f;--outline-variant:#444746;--inverse-surface:#e3e3e3;--inverse-on-surface:#303030;--card:var(--surface-container);--card-head:var(--surface-container-high);--card-border:transparent;--card-shadow:none;--topbar-ground:var(--surface-container);--elev-1:0 1px 2px #0000004d, 0 1px 3px 1px #00000026;--elev-2:0 1px 2px #0000004d, 0 2px 6px 2px #00000026;--elev-3:0 1px 3px #0000004d, 0 4px 8px 3px #00000026;--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark}:root[data-theme=light]{--primary:#0b57d0;--on-primary:#fff;--primary-container:#d3e3fd;--on-primary-container:#041e49;--secondary:#575e71;--on-secondary:#fff;--secondary-container:#c2e7ff;--on-secondary-container:#001d35;--tertiary:#66705a;--tertiary-container:#dde2cf;--on-tertiary-container:#232818;--error:#b3261e;--on-error:#fff;--error-container:#f9dedc;--on-error-container:#410e0b;--success:#146c2e;--success-container:#c4eed0;--on-success-container:#072711;--surface:#fff;--on-surface:#1f1f1f;--on-surface-variant:#444746;--surface-container-lowest:#fff;--surface-container-low:#f8fafd;--surface-container:#f0f4f9;--surface-container-high:#e9eef6;--surface-container-highest:#dde3ea;--outline:#747775;--outline-variant:#c4c7c5;--inverse-surface:#303030;--inverse-on-surface:#f2f2f2;--card:var(--surface-container-low);--card-head:var(--surface-container);--card-border:transparent;--card-shadow:none;--topbar-ground:#fff;--elev-1:0 1px 2px #3c40434d, 0 1px 3px 1px #3c404326;--elev-2:0 1px 2px #3c40434d, 0 2px 6px 2px #3c404326;--elev-3:0 1px 3px #3c40434d, 0 4px 8px 3px #3c404326;--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light}:root[data-ws-accent]{--primary:var(--wsp-d-primary);--on-primary:var(--wsp-d-on-primary);--primary-container:var(--wsp-d-primary-container);--on-primary-container:var(--wsp-d-on-primary-container);--secondary-container:var(--wsp-d-secondary-container);--on-secondary-container:var(--wsp-d-on-secondary-container)}:root[data-ws-accent][data-theme=light]{--primary:var(--wsp-l-primary);--on-primary:var(--wsp-l-on-primary);--primary-container:var(--wsp-l-primary-container);--on-primary-container:var(--wsp-l-on-primary-container);--secondary-container:var(--wsp-l-secondary-container);--on-secondary-container:var(--wsp-l-on-secondary-container)}*{box-sizing:border-box;margin:0;padding:0}html{height:100%}body{background:var(--surface);min-height:100%;color:var(--on-surface);font-family:var(--font-sans), system-ui, sans-serif;letter-spacing:.01em;-webkit-font-smoothing:antialiased;font-size:14px;line-height:1.5}a{color:inherit;text-decoration:none}button{font:inherit;color:inherit;cursor:pointer;background:0 0;border:0}:focus-visible{outline:2px solid var(--primary);outline-offset:2px}code,pre,.mono{font-family:var(--font-mono), monospace}.ms{font-variation-settings:"FILL" 0, "wght" 400, "GRAD" 0, "opsz" 20;vertical-align:-4px;-webkit-user-select:none;user-select:none;flex:none;font-size:18px;line-height:1}.ms.ms-fill{font-variation-settings:"FILL" 1, "wght" 400, "GRAD" 0, "opsz" 20}.ms.ms-sm{vertical-align:-3px;font-size:15px}.ms.ms-lg{vertical-align:-5px;font-size:22px}.topbar{z-index:10;height:var(--topbar-h);background:color-mix(in srgb, var(--surface-container) 92%, transparent);-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px);border-bottom:1px solid var(--outline-variant);align-items:center;gap:14px;padding:0 20px;display:flex;position:sticky;top:0}.wordmark{flex:none;align-items:center;gap:10px;display:flex}.topbar{background:color-mix(in srgb, var(--ws-c,transparent) 9%, color-mix(in srgb, var(--topbar-ground) 94%, transparent));box-shadow:inset 0 -2px 0 color-mix(in srgb, var(--ws-c,transparent) 70%, transparent)}.home-link{border-radius:50%;place-items:center;width:32px;height:32px;font-size:15px;line-height:1;transition:box-shadow .12s;display:grid}.home-link:hover{box-shadow:0 0 0 4px color-mix(in srgb, var(--ws-c,var(--on-surface)) 16%, transparent)}.home-tile.ws-tile{width:32px;height:32px;font-size:18px}.home-tile.ws-tile-mono{font-size:13px}.wordmark small{color:var(--on-surface-variant);font-size:12px}.wordmark .env-name{vertical-align:middle;letter-spacing:-.01em;color:var(--on-surface);white-space:nowrap;text-overflow:ellipsis;border-radius:12px;max-width:220px;padding:4px 8px;font-size:16px;font-weight:600;display:inline-block;overflow:hidden}.switcher-wrap{display:inline-flex;position:relative}.env-switch{align-items:center;gap:5px;transition:background .12s,color .12s;display:inline-flex}.env-switch:hover{background:color-mix(in srgb, var(--on-surface) 8%, transparent)}.env-switch svg{opacity:.55;flex:none}.switcher-pop{z-index:20;background:var(--surface-container);min-width:360px;max-width:min(480px,92vw);box-shadow:var(--elev-2);overscroll-behavior:contain;border-radius:4px;max-height:calc(100dvh - 120px);padding:8px 0;position:absolute;top:calc(100% + 8px);left:0;overflow-y:auto}.switcher-head,.switcher-group-head{box-sizing:border-box;letter-spacing:.1px;min-height:36px;color:var(--on-surface-variant);text-transform:none;align-items:center;padding:8px 16px;font-size:14px;font-weight:500;line-height:20px;display:flex}.switcher-group{border-top:1px solid var(--outline-variant);margin-top:8px;padding-top:4px}.switcher-item{box-sizing:border-box;min-height:72px;color:var(--on-surface);align-items:center;gap:16px;padding:12px 16px;transition:background .12s;display:flex;position:relative}a.switcher-item:after,.switcher-item.stopped:after{content:"";pointer-events:none;background:var(--on-surface);opacity:0;transition:opacity .12s;position:absolute;inset:0}a.switcher-item:hover:after{opacity:.08}a.switcher-item:active:after{opacity:.12}.switcher-item.current{cursor:default;background:var(--secondary-container);color:var(--on-secondary-container)}.switcher-item.current .switcher-sub,.switcher-item.current .switcher-root{color:var(--on-secondary-container);opacity:.8}.ws-tile{background:color-mix(in srgb, var(--ws-c,var(--on-surface)) 22%, var(--surface-container-highest));border-radius:50%;flex:none;place-items:center;width:40px;height:40px;font-size:22px;line-height:1;display:grid;position:relative}.ws-tile-mono{font-family:var(--font-sans), sans-serif;letter-spacing:.15px;color:var(--ws-c,var(--on-surface));font-size:16px;font-weight:500;line-height:24px}.ws-tile-badge{min-width:18px;height:18px;font-family:var(--font-sans), sans-serif;letter-spacing:.4px;background:var(--ws-c,var(--on-surface));color:#fff;box-shadow:0 0 0 2px var(--surface-container);border-radius:999px;place-items:center;padding:0 4px;font-size:10px;font-weight:500;line-height:1;display:grid;position:absolute;bottom:-3px;right:-3px}.switcher-item.current .ws-tile-badge{box-shadow:0 0 0 2px var(--secondary-container)}.switcher-text{flex-direction:column;flex:1;min-width:0;display:flex}.switcher-name{letter-spacing:.5px;white-space:nowrap;text-overflow:ellipsis;font-size:16px;font-weight:400;line-height:24px;overflow:hidden}.switcher-name.unnamed,.ws-name.unnamed{color:var(--on-surface-variant);font-style:italic}.switcher-sub,.switcher-root{letter-spacing:.25px;color:var(--on-surface-variant);white-space:nowrap;text-overflow:ellipsis;font-size:14px;line-height:20px;overflow:hidden}.switcher-root{text-align:left;direction:rtl}.switcher-root>span{unicode-bidi:isolate}.switcher-side{flex:none;align-items:center;gap:12px;margin-left:auto;display:inline-flex}.switcher-port{letter-spacing:.5px;color:var(--on-surface-variant);white-space:nowrap;align-items:center;font-size:11px;font-weight:500;line-height:16px;display:inline-flex}.switcher-check{color:var(--on-secondary-container);font-size:24px}.live-dot{background:var(--success);border-radius:50%;width:8px;height:8px;margin-right:6px;display:inline-block}.switcher-item.stopped{cursor:default}.switcher-item.stopped:after{display:none}.switcher-item.stopped .ws-tile{opacity:.6;filter:grayscale(.5)}.switcher-item.stopped .switcher-name{color:var(--on-surface-variant)}.switcher-item.missing .switcher-name{text-decoration:line-through}.switcher-err{color:var(--error)}.switcher-start{z-index:1;height:40px;font-family:var(--font-sans), sans-serif;letter-spacing:.1px;color:var(--primary);cursor:pointer;background:0 0;border:0;border-radius:999px;flex:none;align-items:center;gap:4px;padding:0 16px 0 12px;font-size:14px;font-weight:500;line-height:20px;transition:background .12s;display:inline-flex;position:relative}.switcher-start:hover:not(:disabled){background:color-mix(in srgb, var(--primary) 8%, transparent)}.switcher-start:active:not(:disabled){background:color-mix(in srgb, var(--primary) 12%, transparent)}.switcher-start:disabled{opacity:.38;cursor:default}.switcher-start .ms{font-size:18px}.switcher-icon{background:var(--secondary-container);border-radius:11px;flex:none;place-items:center;width:36px;height:36px;font-size:18px;line-height:1;display:grid}.ms.ms-spin{animation:1s linear infinite kw-spin}@keyframes kw-spin{to{transform:rotate(360deg)}}.switcher-foot{box-sizing:border-box;border-top:1px solid var(--outline-variant);letter-spacing:.5px;min-height:56px;color:var(--on-surface);align-items:center;gap:16px;margin-top:8px;padding:0 16px;font-size:16px;line-height:24px;transition:background .12s;display:flex}.switcher-foot:hover{background:color-mix(in srgb, var(--on-surface) 8%, transparent)}.switcher-foot .ms{color:var(--on-surface-variant);font-size:24px}.ws-screen{max-width:960px}.ws-empty{color:var(--on-surface-variant);padding:18px;font-size:13px}.ws-row{grid-template-columns:40px minmax(0,1fr) auto;align-items:start;gap:14px;padding:14px 18px;display:grid}.ws-row+.ws-row{border-top:1px solid color-mix(in srgb, var(--outline-variant) 55%, transparent)}.ws-row.state-died{background:color-mix(in srgb, var(--warning,#c98a1b) 6%, transparent)}.ws-row.state-missing .ws-icon{opacity:.45;filter:grayscale(.8)}.ws-row.state-stopped .ws-icon{opacity:.65;filter:grayscale(.5)}.ws-row.state-died .ws-icon{opacity:.8}.ws-icon{width:40px;height:40px}.ws-main{flex-direction:column;gap:3px;min-width:0;display:flex}.ws-title{flex-wrap:wrap;align-items:center;gap:10px;display:flex}.ws-name{color:var(--on-surface);font-size:15px;font-weight:600}a.ws-name:hover{text-decoration:underline}.ws-state{letter-spacing:.4px;text-transform:uppercase;color:var(--on-surface-variant);align-items:center;font-size:11px;font-weight:600;display:inline-flex}.ws-state-running{color:var(--success)}.ws-state-died{color:var(--warning,#c98a1b)}.ws-state-missing,.ws-state-orphaned{color:var(--error)}.ws-row.state-orphaned .ws-icon{opacity:.45;filter:grayscale(.8)}.ws-note{color:var(--on-surface-variant);font-size:12px}.ws-load-error{color:var(--error);align-items:center;gap:8px;display:flex}.ws-root{font-family:var(--mono,ui-monospace, SFMono-Regular, Menlo, monospace);color:var(--on-surface-variant);overflow-wrap:anywhere;font-size:12px}.ws-dim{opacity:.7;font-family:var(--font-sans), sans-serif}.ws-meta{color:var(--on-surface-variant);flex-wrap:wrap;gap:4px 14px;font-size:12px;display:flex}.ws-actions{flex-wrap:wrap;justify-content:flex-end;align-items:center;gap:8px;display:flex}.ws-btn{font:500 12.5px/1 var(--font-sans), sans-serif;white-space:nowrap;border:1px solid var(--outline-variant);color:var(--on-surface);cursor:pointer;background:0 0;border-radius:999px;align-items:center;gap:4px;padding:7px 14px 7px 10px;transition:background .12s,border-color .12s;display:inline-flex}.ws-btn:hover:not(:disabled){background:color-mix(in srgb, var(--on-surface) 8%, transparent)}.ws-btn:disabled{opacity:.45;cursor:default}.ws-btn.muted{opacity:.45;cursor:not-allowed}.ws-btn.muted:hover{background:0 0}.fork-note{color:var(--on-surface-variant);font-size:11px}.ws-btn.primary{color:var(--on-primary);background:var(--primary);border-color:var(--primary)}.ws-btn.primary:hover:not(:disabled){filter:brightness(1.06);background:var(--primary)}.ws-btn.danger{color:var(--error)}.ws-btn.danger:hover:not(:disabled){background:color-mix(in srgb, var(--error) 10%, transparent);border-color:var(--error)}.ws-btn .ms{vertical-align:0}.settings-screen{flex-direction:column;gap:16px;max-width:860px;margin:0 auto;display:flex}.settings-head{align-items:center;gap:12px;display:flex}.settings-head h1{letter-spacing:-.01em;align-items:center;gap:10px;margin:0;font-size:22px;font-weight:600;display:inline-flex}.settings-head .spacer{flex:1}.settings-saved{color:var(--success);align-items:center;gap:4px;font-size:12.5px;display:inline-flex}.settings-saved .ms{vertical-align:0}.settings-err{color:var(--error);font-size:12.5px}.settings-check{cursor:pointer;align-items:center;gap:8px;font-size:13px;display:flex}.settings-check input{accent-color:var(--primary);width:15px;height:15px}.settings-note{color:var(--on-surface-variant);font-size:12px}.settings-note code{font-size:11px}.settings-row-x{opacity:1;align-self:flex-end;margin-bottom:6px}.settings-file{color:var(--on-surface-variant);text-overflow:ellipsis;white-space:nowrap;max-width:60%;font-size:11px;overflow:hidden}.settings-kv-list{flex-direction:column;padding:6px 0 10px;display:flex}.settings-kv{grid-template-columns:110px 1fr;align-items:baseline;gap:1px 14px;padding:8px 18px;display:grid}.settings-kv+.settings-kv{border-top:1px solid color-mix(in srgb, var(--outline-variant) 55%, transparent)}.settings-kv code{overflow-wrap:break-word;word-break:break-all;font-size:12px}.settings-kv-hint{color:var(--on-surface-variant);grid-column:2;font-size:11px}.switcher-hint{letter-spacing:.4px;text-transform:uppercase;color:var(--on-surface-variant);border:1px solid var(--outline-variant);border-radius:999px;flex:none;margin-left:auto;padding:2px 8px;font-size:10.5px;font-weight:600}.topbar .spacer{flex:0 0 8px}.topbar nav{scrollbar-width:none;flex:auto;justify-content:safe center;gap:2px;min-width:0;display:flex;overflow-x:auto}.topbar nav::-webkit-scrollbar{display:none}.topbar nav a{letter-spacing:.01em;text-transform:capitalize;color:var(--on-surface-variant);border-radius:999px;flex:none;align-items:center;gap:6px;padding:7px 14px;font-size:13.5px;font-weight:500;transition:background .12s,color .12s;display:inline-flex}.topbar nav a .ms{font-size:18px}.topbar nav a:hover{color:var(--on-surface);background:color-mix(in srgb, var(--on-surface) 8%, transparent)}@media (width<=1520px){.topbar{gap:10px;padding:0 14px}.topbar nav a{gap:5px;padding:7px 9px;font-size:13px}.topbar nav a .ms{font-size:17px}.wordmark .env-name{max-width:250px;font-size:15px}}.topbar nav a.active{color:var(--on-secondary-container);background:var(--secondary-container);font-weight:600}.topbar nav a.active .ms{font-variation-settings:"FILL" 1, "wght" 400, "GRAD" 0, "opsz" 20}.topbar nav .nav-apart{margin-left:28px;position:relative}.topbar nav .nav-apart:before{content:"";background:var(--outline-variant);width:1px;height:18px;position:absolute;top:50%;left:-16px;transform:translateY(-50%)}.info-wrap{display:inline-flex;position:relative}.info-btn{width:32px;height:32px;color:var(--on-surface-variant);border-radius:50%;place-items:center;transition:background .12s,color .12s;display:grid}.info-btn:hover{background:color-mix(in srgb, var(--on-surface) 8%, transparent);color:var(--on-surface)}.info-pop{z-index:20;background:var(--surface-container-high);min-width:340px;max-width:min(480px,90vw);box-shadow:var(--elev-2);border-radius:12px;padding:8px 0;position:absolute;top:calc(100% + 8px);right:0}.info-row{flex-direction:column;gap:2px;padding:8px 16px;display:flex}.notif-wrap{display:inline-flex;position:relative}.notif-btn{position:relative}.notif-btn.has-unread{color:var(--on-surface)}.notif-badge{box-sizing:border-box;background:var(--error);min-width:16px;height:16px;color:var(--on-error,#fff);font-family:var(--font-mono), monospace;text-align:center;pointer-events:none;border-radius:8px;padding:0 4px;font-size:10px;font-weight:600;line-height:16px;position:absolute;top:2px;right:0}.notif-pop{min-width:380px;max-width:min(520px,92vw);padding:0;overflow:hidden}.notif-head{align-items:center;gap:12px;padding:10px 16px 6px;display:flex}.notif-hint{background:var(--secondary-container);color:var(--on-secondary-container);border-radius:12px;flex-direction:column;gap:10px;margin:4px 12px 8px;padding:12px 14px;font-size:13px;line-height:18px;display:flex}.notif-hint.muted{color:var(--on-surface-variant);background:0 0;margin:0;padding:4px 16px 8px}.notif-hint-actions{gap:8px;display:flex}.notif-empty{color:var(--on-surface-variant);padding:18px 16px 20px;font-size:13px}.notif-list{overscroll-behavior:contain;flex-direction:column;max-height:min(60dvh,520px);display:flex;overflow-y:auto}.notif-row{text-align:left;color:inherit;border:0;border-top:1px solid color-mix(in srgb, var(--outline-variant) 55%, transparent);cursor:pointer;font:inherit;background:0 0;align-items:flex-start;gap:12px;padding:10px 16px;display:flex}.notif-row:hover{background:color-mix(in srgb, var(--on-surface) 6%, transparent)}.notif-row.unread{background:color-mix(in srgb, var(--primary) 7%, transparent)}.notif-row.unread:hover{background:color-mix(in srgb, var(--primary) 12%, transparent)}.notif-ico{background:var(--surface-container-highest);width:28px;height:28px;color:var(--on-surface-variant);border-radius:50%;flex:none;place-items:center;margin-top:1px;display:grid}.notif-ico .ms{font-size:17px}.notif-row.approval .notif-ico{background:var(--error-container);color:var(--on-error-container)}.notif-row.routine_failed .notif-ico,.notif-row.run_failed .notif-ico{color:var(--error)}.notif-row.routine_done .notif-ico,.notif-row.run_done .notif-ico{color:var(--success)}.notif-body{flex-direction:column;flex:1;gap:2px;min-width:0;display:flex}.notif-title{font-size:13.5px;font-weight:500;line-height:18px}.notif-row.unread .notif-title{font-weight:600}.notif-sub{color:var(--on-surface-variant);-webkit-line-clamp:2;-webkit-box-orient:vertical;font-size:12.5px;line-height:17px;display:-webkit-box;overflow:hidden}.notif-when{color:var(--on-surface-variant);flex:none;margin-top:2px;font-size:11px}.notif-actions{gap:8px;margin-top:6px;display:flex}.notif-diagnose{align-items:center;gap:6px;padding:3px 10px;font-size:12px;display:inline-flex}.info-row+.info-row{border-top:1px solid color-mix(in srgb, var(--outline-variant) 55%, transparent)}.info-v{color:var(--on-surface);font-size:13px}.info-path{color:var(--on-surface-variant);overflow-wrap:break-word;word-break:break-all;font-size:11px}.info-actions{flex-flow:wrap;justify-content:space-between;align-items:center}.info-actions .theme-btn{flex:none}.theme-btn,.update-btn{border:1px solid var(--outline);color:var(--on-surface-variant);border-radius:999px;padding:6px 14px;font-size:12.5px;font-weight:500;transition:background .12s,color .12s}.theme-btn:hover,.update-btn:hover:not(:disabled){background:color-mix(in srgb, var(--primary) 10%, transparent);color:var(--on-surface)}.update-btn{flex:none;align-items:center;gap:6px;text-decoration:none;display:inline-flex}.update-btn:disabled{opacity:.6;cursor:default}.update-btn .ms{vertical-align:0}.update-result{color:var(--on-surface-variant);align-items:center;gap:5px;font-size:12px;display:inline-flex}.update-result .ms{vertical-align:0;color:var(--success)}.update-result.newer{color:var(--primary);flex-basis:100%;font-weight:500}.update-result.newer code{font-size:11px}.relaunch-note{font:inherit;cursor:pointer;color:var(--primary);border:1px solid var(--primary);background:color-mix(in srgb, var(--primary) 10%, transparent);border-radius:999px;margin-right:10px;padding:4px 12px;font-size:12px}.relaunch-note:hover{background:color-mix(in srgb, var(--primary) 18%, transparent)}.relaunch-note:disabled{opacity:.7;cursor:default}.expert-toggle{font-family:var(--font-mono), monospace;letter-spacing:.5px;color:var(--on-surface-variant);border-radius:999px;align-items:center;gap:7px;margin-right:2px;padding:4px 8px;font-size:11px;transition:color .12s;display:inline-flex}.expert-toggle:hover{color:var(--on-surface)}.expert-track{background:color-mix(in srgb, var(--on-surface) 14%, transparent);border-radius:999px;width:26px;height:15px;transition:background .14s;position:relative}.expert-knob{background:var(--surface);border-radius:50%;width:11px;height:11px;transition:left .14s,background .14s;position:absolute;top:2px;left:2px}.expert-toggle.on{color:var(--on-surface)}.expert-toggle.on .expert-track{background:var(--primary)}.expert-toggle.on .expert-knob{background:var(--on-primary,var(--surface));left:13px}html[data-expert=off] .topbar nav .nav-expert,html[data-expert=off] .chat-thread .detail-head .chip.agent,html[data-expert=off] .chat-thread .detail-head .rid{display:none}.shell{max-width:1240px;margin:0 auto;padding:32px 24px 96px}.microlabel{letter-spacing:.08em;text-transform:uppercase;color:var(--on-surface-variant);font-size:11.5px;font-weight:600}.num{font-variant-numeric:tabular-nums}.lamp{border-radius:50%;flex:none;width:9px;height:9px;position:relative}.lamp.ok{background:var(--success)}.lamp.failed,.lamp.blocked{background:var(--error)}.lamp.aborted{background:var(--outline-variant)}.lamp.pending{border:1.5px solid var(--outline);background:0 0}.lamp.running{background:var(--primary);animation:1.4s ease-in-out infinite lamp-pulse}@keyframes lamp-pulse{0%,to{box-shadow:0 0 0 0 color-mix(in srgb, var(--primary) 45%, transparent);opacity:1}50%{box-shadow:0 0 0 5px color-mix(in srgb, var(--primary) 18%, transparent);opacity:.8}}.status-word{letter-spacing:.02em;text-transform:capitalize;background:var(--surface-container-highest);color:var(--on-surface-variant);border-radius:999px;align-items:center;padding:2px 10px;font-size:12px;font-weight:600;line-height:16px;display:inline-flex}.status-word.ok{background:var(--success-container);color:var(--on-success-container)}.status-word.failed,.status-word.blocked{background:var(--error-container);color:var(--on-error-container)}.status-word.running{background:var(--primary-container);color:var(--on-primary-container)}.page-head{align-items:center;gap:16px;margin:4px 2px 24px;display:flex}.page-head .spacer{flex:1}.page-head h1{letter-spacing:-.01em;font-size:28px;font-weight:500;line-height:36px}.page-head .count{color:var(--on-surface-variant);font-size:14px}.run-list{gap:10px;display:grid}.run-card{background:var(--card);border:1px solid var(--card-border);box-shadow:var(--card-shadow);border-radius:12px;grid-template-columns:12px 200px 1fr auto;align-items:center;gap:8px 16px;padding:14px 20px;transition:box-shadow .15s,background .15s;display:grid}.run-card:hover{background:color-mix(in srgb, var(--on-surface) 5%, var(--surface-container-low));box-shadow:var(--elev-2)}.run-card .rid{font-family:var(--font-mono), monospace;color:var(--on-surface-variant);font-size:12.5px}.run-card .wf{font-size:14px;font-weight:500}.run-card .req{color:var(--on-surface-variant);text-overflow:ellipsis;white-space:nowrap;max-width:52ch;font-size:12.5px;overflow:hidden}.run-card .meta{font-family:var(--font-mono), monospace;color:var(--on-surface-variant);align-items:center;gap:18px;font-size:12px;display:flex}.progress-track{background:var(--surface-container-highest);border-radius:999px;width:90px;height:4px;overflow:hidden}.progress-track i{background:var(--primary);border-radius:999px;height:100%;display:block}.run-card.is-ok .progress-track i{background:var(--success)}.run-card.is-failed .progress-track i{background:var(--error)}.empty{border:1px dashed var(--outline-variant);text-align:center;color:var(--on-surface-variant);border-radius:16px;padding:48px;font-size:14px}.empty.empty-action{border:0;padding:64px 0}.crumbs{color:var(--on-surface-variant);align-items:center;gap:8px;margin-bottom:14px;font-size:12.5px;display:flex}.crumbs a:hover{color:var(--primary)}.crumbs .sep{color:var(--outline-variant)}.detail-head{flex-wrap:wrap;align-items:center;gap:10px 16px;margin-bottom:6px;display:flex}.detail-head h1{letter-spacing:-.01em;font-size:24px;font-weight:500;line-height:32px}.detail-head .rid{font-family:var(--font-mono), monospace;color:var(--on-surface-variant);font-size:12px}.detail-req{color:var(--on-surface-variant);max-width:90ch;margin-bottom:20px;font-size:14px}.statgrid{flex-wrap:wrap;gap:26px;margin-bottom:22px;display:flex}.stat .microlabel{margin-bottom:1px}.stat .v{font-family:var(--font-mono), monospace;font-size:15px;font-weight:500}.columns{grid-template-columns:minmax(430px,5fr) minmax(360px,4fr);align-items:start;gap:18px;display:grid}@media (width<=1020px){.columns{grid-template-columns:1fr}}.panel{background:var(--card);border:1px solid var(--card-border);box-shadow:var(--card-shadow);border-radius:16px;overflow:hidden}.panel-head{border-bottom:1px solid var(--outline-variant);background:var(--card-head);align-items:center;gap:10px;padding:14px 20px;display:flex}.panel-head .microlabel{color:var(--on-surface);font-size:11.5px}.panel-head .spacer{flex:1}.phases{padding:6px 0}.phase-row{padding:10px 18px 10px 42px;position:relative}.phase-row+.phase-row{border-top:1px solid color-mix(in srgb, var(--outline-variant) 55%, transparent)}.phase-row .lamp{position:absolute;top:16px;left:19px}.phase-row:before{content:"";background:var(--outline-variant);width:1px;position:absolute;top:0;bottom:0;left:23px}.phase-row:first-child:before{top:16px}.phase-row:last-child:before{height:16px;bottom:auto}.phase-row .lamp{z-index:1}.phase-top{flex-wrap:wrap;align-items:baseline;gap:10px;display:flex}.phase-name{font-size:14px;font-weight:500}.chip{font-family:var(--font-mono), monospace;border:1px solid var(--outline-variant);color:var(--on-surface-variant);border-radius:8px;padding:2px 10px;font-size:11px}.chip.agent{background:var(--secondary-container);color:var(--on-secondary-container);border-color:#0000}.phase-top .right{font-family:var(--font-mono), monospace;color:var(--on-surface-variant);gap:14px;margin-left:auto;font-size:11.5px;display:flex}.phase-sub{color:var(--on-surface-variant);max-width:72ch;margin-top:3px;font-size:12.5px}.phase-activity{font-family:var(--font-mono), monospace;color:var(--primary);margin-top:3px;font-size:11.5px}.phase-activity:before{content:"▸ "}.gate-line{flex-wrap:wrap;gap:6px;margin-top:5px;display:flex}.gate{font-family:var(--font-mono), monospace;background:var(--success-container);color:var(--on-success-container);border-radius:8px;align-items:center;gap:5px;padding:2px 10px;font-size:11px;display:inline-flex}.gate.failed{background:var(--error-container);color:var(--on-error-container)}.gate-fail-msg{color:var(--error);margin-top:4px;font-size:12px}.file-list{max-height:300px;overflow:auto}.file-row{text-align:left;width:100%;font-family:var(--font-mono), monospace;border-bottom:1px solid color-mix(in srgb, var(--outline-variant) 55%, transparent);color:var(--on-surface-variant);align-items:center;gap:10px;padding:8px 18px;font-size:12.5px;transition:background .1s;display:flex}.file-row:last-child{border-bottom:0}.file-row:hover{background:color-mix(in srgb, var(--on-surface) 6%, transparent);color:var(--on-surface)}.file-row.active{background:var(--secondary-container);color:var(--on-secondary-container)}.file-row .fname{text-overflow:ellipsis;white-space:nowrap;flex:1;overflow:hidden}.file-row .fsize{color:var(--on-surface-variant);font-size:11px}.viewer{border-top:1px solid var(--outline-variant)}.viewer-body pre{white-space:pre-wrap;word-break:break-word;max-height:560px;color:var(--on-surface-variant);padding:14px 18px;font-size:12px;line-height:1.55;overflow:auto}.viewer-body iframe{background:#fff;border:0;width:100%;height:620px;display:block}.viewer-body img{max-width:100%;padding:14px 18px;display:block}.viewer-note{color:var(--on-surface-variant);border-bottom:1px solid color-mix(in srgb, var(--outline-variant) 55%, transparent);padding:6px 18px;font-size:11px}.open-raw{color:var(--primary);border:1px solid var(--outline);border-radius:999px;padding:3px 12px;font-size:12px;font-weight:500;transition:background .12s}.open-raw:hover{background:color-mix(in srgb, var(--primary) 10%, transparent)}.live-note{color:var(--on-surface-variant);align-items:center;gap:7px;font-size:11px;display:inline-flex}.wf-search{background:var(--surface-container-high);border:1px solid #0000;border-radius:999px;align-items:center;gap:8px;min-width:260px;padding:8px 16px;transition:border-color .12s,background .12s;display:inline-flex}.wf-search:focus-within{border-color:var(--primary);background:var(--surface-container-highest)}.wf-search .ms{color:var(--on-surface-variant);font-size:18px}.wf-search input{min-width:0;font:14px/1.4 var(--font-sans), sans-serif;color:var(--on-surface);background:0 0;border:0;outline:none;flex:1}.wf-search input::-webkit-search-cancel-button{cursor:pointer}.wf-error{margin:-8px 2px 14px}.wf-list{background:var(--card);border:1px solid var(--card-border);box-shadow:var(--card-shadow);border-radius:16px;overflow:hidden}.wf-row{border-bottom:1px solid color-mix(in srgb, var(--outline-variant) 70%, transparent);grid-template-columns:9px minmax(0,1fr) auto auto;align-items:center;gap:20px;padding:16px 24px;transition:background .12s;display:grid}.wf-row:last-child{border-bottom:0}.wf-row:hover{background:color-mix(in srgb, var(--on-surface) 4%, transparent)}.wf-row-main{min-width:0}.wf-row-top{flex-wrap:wrap;align-items:baseline;gap:10px;display:flex}.wf-name{letter-spacing:-.005em;font-size:16px;font-weight:600}.wf-row .wf-name:hover{color:var(--primary)}.wf-desc{color:var(--on-surface-variant);font-size:14px}.wf-row .wf-desc{text-overflow:ellipsis;white-space:nowrap;margin:3px 0 0;overflow:hidden}.wf-desc.wrap{white-space:pre-wrap}.wf-meta{font-family:var(--font-mono), monospace;color:var(--on-surface-variant);gap:8px;font-size:12px;display:flex}.wf-runs{white-space:nowrap;font-family:var(--font-mono), monospace;color:var(--on-surface-variant);border-radius:999px;align-items:center;gap:8px;padding:6px 12px;font-size:12px;transition:background .12s,color .12s;display:inline-flex}.wf-runs:hover{background:color-mix(in srgb, var(--on-surface) 8%, transparent);color:var(--on-surface)}.wf-runs.none{color:var(--on-surface-variant);opacity:.8}.wf-runs .wf-last{gap:5px;display:inline-flex}.wf-runs .status-word{text-transform:none;padding:1px 8px;font-size:11px;line-height:15px}.wf-run{align-items:center;gap:4px;padding:9px 18px;font-size:13.5px;display:inline-flex}.wf-nomatch{border-bottom:0;padding:14px 22px}.m3-dialog{background:var(--surface-container-high);width:min(560px,100%);max-height:calc(100dvh - 48px);box-shadow:var(--elev-2);border-radius:28px;flex-direction:column;gap:16px;padding:24px;display:flex;overflow-y:auto}.m3-headline{font:400 24px/32px var(--font-sans), sans-serif;letter-spacing:0;margin:0}.m3-supporting{font:14px/20px var(--font-sans), sans-serif;letter-spacing:.25px;color:var(--on-surface-variant);margin:0}.m3-facts{margin-top:6px;font-size:12px;display:block}.m3-facts a{color:var(--primary);text-underline-offset:3px;text-decoration:underline}.m3-field{display:block;position:relative}.m3-field input{box-sizing:border-box;width:100%;height:56px;font:16px/24px var(--font-mono), monospace;color:var(--on-surface);background:var(--surface-container-highest);border:0;border-bottom:1px solid var(--on-surface-variant);border-radius:4px 4px 0 0;outline:none;padding:24px 16px 8px;transition:border-color .12s,box-shadow .12s}.m3-field input:focus{border-bottom-color:var(--primary);box-shadow:inset 0 -1px 0 var(--primary)}.m3-field-label{pointer-events:none;font:16px/24px var(--font-sans), sans-serif;color:var(--on-surface-variant);transition:top .12s,font-size .12s,color .12s;position:absolute;top:16px;left:16px}.m3-field input:focus~.m3-field-label,.m3-field input:not(:placeholder-shown)~.m3-field-label{font-size:12px;line-height:16px;top:8px}.m3-field input:focus~.m3-field-label{color:var(--primary)}.m3-field-support{font:12px/16px var(--font-sans), sans-serif;color:var(--on-surface-variant);padding:4px 16px 0;display:block}.m3-switches{flex-direction:column;margin:0 -8px;display:flex}.m3-switch-row{text-align:left;cursor:pointer;background:0 0;border-radius:12px;align-items:center;gap:16px;width:100%;padding:10px 8px;transition:background .12s;display:flex}.m3-switch-row:hover{background:color-mix(in srgb, var(--on-surface) 6%, transparent)}.m3-switch-text{flex-direction:column;flex:1;gap:2px;min-width:0;display:flex}.m3-switch-label{font:14px/20px var(--font-sans), sans-serif;letter-spacing:.1px;color:var(--on-surface)}.m3-switch-hint{font:12px/16px var(--font-sans), sans-serif;color:var(--on-surface-variant)}.m3-switch{background:var(--surface-container-highest);border:2px solid var(--outline);box-sizing:border-box;border-radius:999px;flex:none;width:52px;height:32px;transition:background .14s,border-color .14s;position:relative}.m3-switch-knob{background:var(--outline);border-radius:50%;width:16px;height:16px;transition:left .14s,width .14s,height .14s,background .14s;position:absolute;top:50%;left:6px;transform:translateY(-50%)}.m3-switch.on{background:var(--primary);border-color:var(--primary)}.m3-switch.on .m3-switch-knob{background:var(--on-primary);width:24px;height:24px;left:22px}.m3-error{font:14px/20px var(--font-sans), sans-serif;color:var(--error)}.m3-actions{justify-content:flex-end;gap:8px;margin-top:8px;display:flex}.m3-text-btn,.m3-filled-btn{font:500 14px/20px var(--font-sans), sans-serif;letter-spacing:.1px;border-radius:999px;height:40px;padding:0 24px;transition:background .12s,box-shadow .12s}.m3-text-btn{color:var(--primary);background:0 0;padding:0 12px}.m3-text-btn:hover{background:color-mix(in srgb, var(--primary) 8%, transparent)}.m3-filled-btn{color:var(--on-primary);background:var(--primary)}.m3-filled-btn:hover{box-shadow:var(--elev-1)}.m3-filled-btn:disabled{opacity:.38;cursor:not-allowed;box-shadow:none}.run-norequest{color:var(--on-surface-variant);flex:1;align-self:center;font-size:13px}@media (width<=900px){.page-head .wf-search{width:100%;min-width:0}.wf-row{grid-template-columns:9px minmax(0,1fr);gap:10px 14px}.wf-runs,.wf-run{grid-column:2;justify-self:start}}.wf-workspace{color:var(--on-surface-variant);white-space:pre-wrap;font-size:11.5px}.aid-0{--aid:var(--primary)}.aid-1{--aid:#4fb8a8}.aid-2{--aid:#a78bfa}.aid-3{--aid:#e5793b}.agent-grid{grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:0;display:grid}.agent-card{border-right:1px solid color-mix(in srgb, var(--outline-variant) 55%, transparent);border-bottom:1px solid color-mix(in srgb, var(--outline-variant) 55%, transparent);padding:14px 18px}.agent-head{flex-wrap:wrap;align-items:center;gap:8px;display:flex}.agent-head b{font-size:14px;font-weight:500}.agent-head .spacer{flex:1}.agent-id{color:var(--on-surface-variant);font-size:11px}.agent-dot{background:var(--aid);border-radius:50%;width:10px;height:10px}.agent-tools{flex-wrap:wrap;gap:5px;margin-top:8px;display:flex}.tool-chip{font-family:var(--font-mono), monospace;border:1px solid var(--outline-variant);color:var(--on-surface-variant);border-radius:8px;padding:1px 8px;font-size:11px}.agent-persona{color:var(--on-surface-variant);white-space:pre-wrap;margin-top:8px;font-size:12px;line-height:1.55}.pipeline{padding:8px 0}.step-node{gap:14px;padding:12px 18px;display:flex;position:relative}.step-node+.step-node{border-top:1px solid color-mix(in srgb, var(--outline-variant) 55%, transparent)}.step-node:before{content:"";background:var(--outline-variant);width:1px;position:absolute;top:0;bottom:0;left:31px}.step-node:first-child:before{top:18px}.step-node:last-child:before{height:18px;bottom:auto}.step-index{z-index:1;width:26px;height:26px;font-family:var(--font-mono), monospace;background:color-mix(in srgb, var(--aid) 18%, var(--surface-container-low));border:1px solid color-mix(in srgb, var(--aid) 55%, var(--outline-variant));color:var(--aid);border-radius:50%;flex:none;place-items:center;margin-top:1px;font-size:11.5px;font-weight:700;display:grid;position:relative}.step-index.is-script{--aid:var(--on-surface-variant)}.step-body{flex:1;min-width:0}.agent-chip{border-color:color-mix(in srgb, var(--aid) 50%, var(--outline-variant));color:var(--aid);background:0 0}.step-source{margin-top:6px}.step-source summary{cursor:pointer;color:var(--on-surface-variant);-webkit-user-select:none;user-select:none;font-size:12px;font-weight:500}.step-source summary:hover{color:var(--primary)}.step-source pre{background:var(--surface-container-high);white-space:pre-wrap;word-break:break-word;color:var(--on-surface-variant);border:0;border-radius:12px;max-height:360px;margin-top:6px;padding:10px 12px;font-size:11.5px;line-height:1.55;overflow:auto}.gate.neutral{background:var(--surface-container-high);color:var(--on-surface-variant);border:0}::-webkit-scrollbar{width:10px;height:10px}::-webkit-scrollbar-thumb{background:var(--outline-variant);background-clip:content-box;border:2px solid #0000;border-radius:999px}::-webkit-scrollbar-track{background:0 0}.run-form{gap:10px;display:flex}.run-form input[type=text]{font:13px/1.4 var(--font-mono), monospace;color:var(--on-surface);background:var(--surface-container-high);border:1px solid #0000;border-radius:999px;outline:none;flex:1;padding:10px 18px;transition:border-color .12s,background .12s}.run-form input[type=text]:focus{border-color:var(--primary);background:var(--surface-container-highest)}.run-btn{font:500 14px/1 var(--font-sans), sans-serif;white-space:nowrap;letter-spacing:.01em;color:var(--on-primary);background:var(--primary);border-radius:999px;padding:11px 24px;transition:box-shadow .12s,background .12s}.run-btn:hover{box-shadow:var(--elev-1);background:color-mix(in srgb, var(--on-primary) 8%, var(--primary))}.run-btn:disabled{opacity:.38;cursor:not-allowed;filter:none;box-shadow:none}.run-btn.tonal{color:var(--on-secondary-container);background:var(--secondary-container)}.run-opts{flex-wrap:wrap;gap:6px 22px;margin-top:12px;display:flex}.run-opts label{color:var(--on-surface-variant);cursor:pointer;align-items:center;gap:8px;font-size:13px;display:inline-flex}.run-opts input[type=checkbox]{accent-color:var(--primary);width:15px;height:15px}.run-opts .opt-hint{color:var(--on-surface-variant)}.sandbox-chip{border:1px solid var(--outline-variant);color:var(--on-surface-variant)}.stop-btn{font:500 13px/1 var(--font-sans), sans-serif;color:var(--error);border:1px solid var(--outline);background:0 0;border-radius:999px;padding:8px 18px;transition:background .12s,border-color .12s}.stop-btn:hover{background:color-mix(in srgb, var(--error) 10%, transparent);border-color:var(--error)}.stop-btn:disabled{opacity:.38;cursor:default}.run-action-error{color:var(--error);font-size:12px}.shell:has(.runs-screen){max-width:none;padding:0}.runs-screen{grid-template-columns:300px minmax(0,1fr);align-items:start;display:grid}.runs-side{top:var(--topbar-h);height:calc(100vh - var(--topbar-h));border-right:1px solid var(--outline-variant);background:var(--surface-container-low);flex-direction:column;display:flex;position:sticky}.side-head{border-bottom:1px solid var(--outline-variant);background:var(--card-head);align-items:center;gap:10px;padding:14px 16px;display:flex}.side-head .spacer{flex:1}.side-back{width:26px;height:26px;color:var(--on-surface-variant);border-radius:50%;justify-content:center;align-items:center;margin-left:-6px;transition:background .12s,color .12s;display:inline-flex}.side-back:hover{background:color-mix(in srgb, var(--on-surface) 8%, transparent);color:var(--on-surface)}.side-filter{background:var(--surface-container-high);color:var(--on-surface-variant);border:1px solid #0000;border-radius:999px;align-items:center;gap:8px;margin:8px 8px 2px;padding:6px 12px;transition:border-color .12s,background .12s;display:flex}.side-filter:focus-within{border-color:var(--primary);background:var(--surface-container-highest)}.side-filter input{min-width:0;font:13.5px/1.4 var(--font-sans), sans-serif;color:var(--on-surface);background:0 0;border:0;outline:none;flex:1}.side-list{flex:1;padding:6px;overflow-y:auto}.side-row.side-general{border-bottom:1px solid color-mix(in srgb, var(--outline-variant) 55%, transparent);border-radius:12px 12px 0 0;margin-bottom:6px;padding-bottom:10px}.side-row{border-radius:12px;align-items:flex-start;gap:10px;margin-bottom:2px;padding:10px 12px;transition:background .1s;display:flex}.side-row .lamp{margin-top:4px}.side-row:hover{background:color-mix(in srgb, var(--on-surface) 6%, transparent)}.side-row.active{background:var(--secondary-container)}.side-row.active .side-wf{color:var(--on-secondary-container)}.side-row-body{flex:1;min-width:0}.side-row-top{align-items:baseline;gap:8px;display:flex}.side-wf{text-overflow:ellipsis;white-space:nowrap;flex:1;font-size:13.5px;font-weight:500;overflow:hidden}.side-when{font-family:var(--font-mono), monospace;color:var(--on-surface-variant);font-size:11px}.side-row-sub{align-items:baseline;gap:8px;margin-top:1px;display:flex}.side-row-sub .side-when{opacity:.8;font-size:10px}.side-req{color:var(--on-surface-variant);text-overflow:ellipsis;white-space:nowrap;flex:1;font-size:11.5px;overflow:hidden}.side-row.active .side-req{color:var(--on-secondary-container)}.side-meta{font-family:var(--font-mono), monospace;color:var(--on-surface-variant);font-size:10.5px}.runs-main{min-width:0;padding:18px 22px 40px}.runs-main:has(>.chat-main){padding:0}.runs-main .detail-head .spacer{flex:1}.tabs{border:1px solid var(--outline-variant);background:0 0;border-radius:999px;gap:0;padding:0;display:flex;overflow:hidden}.tabs button{letter-spacing:.01em;text-transform:capitalize;color:var(--on-surface-variant);border-radius:0;padding:8px 20px;font-size:13.5px;font-weight:500;transition:background .12s,color .12s}.tabs button+button{border-left:1px solid var(--outline-variant)}.tabs button:hover{background:color-mix(in srgb, var(--on-surface) 6%, transparent);color:var(--on-surface)}.tabs button.active{background:var(--secondary-container);color:var(--on-secondary-container);box-shadow:none;font-weight:600}.run-tab{max-width:1080px}.art-layout{grid-template-columns:280px minmax(0,1fr);gap:14px;height:calc(100vh - 172px);min-height:420px;display:grid}.art-files{flex-direction:column;min-height:0;display:flex}.art-files .file-list{flex:1;max-height:none}.art-viewer{flex-direction:column;min-height:0;display:flex}.art-viewer .viewer{border-top:0;flex-direction:column;flex:1;min-height:0;display:flex}.art-viewer .viewer-body{flex:1;min-height:0}.art-viewer .viewer-body iframe{height:100%}.art-viewer .viewer-body pre{box-sizing:border-box;height:100%;max-height:none}.art-viewer .viewer-body img{object-fit:contain;max-height:100%}.art-viewer .empty{flex:1;place-items:center;display:grid}.md-toolbar{align-items:center;gap:12px;display:flex}.md-toolbar .tabs button{text-transform:none;padding:3px 12px;font-size:11px}.md-body{box-sizing:border-box;height:100%;color:var(--on-surface);padding:16px 22px;font-size:13.5px;line-height:1.6;overflow:auto}.md-body>:first-child{margin-top:0}.md-body h1,.md-body h2,.md-body h3,.md-body h4{margin:1.4em 0 .5em;font-weight:600;line-height:1.25}.md-body h1{font-size:20px}.md-body h2{border-bottom:1px solid var(--outline-variant);padding-bottom:4px;font-size:16px}.md-body h3{font-size:14px}.md-body p,.md-body ul,.md-body ol{margin:.6em 0}.md-body ul,.md-body ol{padding-left:1.6em}.md-body li+li{margin-top:.2em}.md-body a{color:var(--primary)}.md-body code{font-family:var(--font-mono), monospace;background:color-mix(in srgb, var(--on-surface) 8%, transparent);border-radius:4px;padding:1px 5px;font-size:12px}.md-body pre{background:color-mix(in srgb, var(--on-surface) 6%, transparent);border:1px solid var(--outline-variant);border-radius:8px;margin:.8em 0;padding:10px 14px;overflow-x:auto}.md-body pre code{background:0 0;padding:0}.md-body blockquote{border-left:3px solid var(--outline);color:var(--on-surface-variant);margin:.8em 0;padding:2px 14px}.md-body table{border-collapse:collapse;margin:.8em 0;font-size:12.5px}.md-body th,.md-body td{border:1px solid var(--outline-variant);text-align:left;padding:5px 10px}.md-body th{background:color-mix(in srgb, var(--on-surface) 5%, transparent)}.md-body hr{border:0;border-top:1px solid var(--outline-variant);margin:1.2em 0}.md-body img{max-width:100%}@media (width<=940px){.runs-screen{grid-template-columns:1fr}.runs-side{display:none}.art-layout{grid-template-columns:1fr;height:auto}.art-files .file-list{max-height:240px}.art-viewer .viewer-body iframe{height:560px}}.chat-main{height:calc(100vh - var(--topbar-h));flex-direction:column;padding:16px 20px;display:flex}.chat-thread{flex-direction:column;flex:1;width:100%;max-width:980px;min-height:0;margin:0 auto;display:flex}.chat-thread .detail-head{flex:none}.chat-thread .detail-head .rid{text-overflow:ellipsis;white-space:nowrap;max-width:34ch;overflow:hidden}.chat-scroll{flex-direction:column;flex:1;gap:10px;min-height:0;padding:14px 2px 20px;display:flex;overflow-y:auto}.chat-scroll .empty{border:0;margin:auto}.msg{white-space:pre-wrap;word-break:break-word;max-width:76ch;font-size:14px;line-height:1.6}.msg.user{background:var(--primary-container);color:var(--on-primary-container);border:0;border-radius:16px 16px 4px;align-self:flex-end;padding:10px 16px}.msg.agent{background:var(--surface-container);border:0;border-radius:16px 16px 16px 4px;align-self:flex-start;padding:10px 16px}.msg.agent.chat-md{white-space:normal;height:auto;padding:10px 16px;font-size:14px;overflow:visible}.msg.agent.chat-md img{border-radius:12px;margin:4px 0;display:block}.msg.agent.chat-md pre{max-width:100%}.msg.error{color:var(--error);align-self:flex-start;font-size:12.5px}.msg.thought{align-self:flex-start;max-width:76ch}.msg.thought summary{cursor:pointer;color:var(--on-surface-variant);-webkit-user-select:none;user-select:none;font-size:12px;font-weight:500}.msg.thought div{border-left:2px solid var(--outline-variant);color:var(--on-surface-variant);white-space:pre-wrap;word-break:break-word;margin-top:5px;padding:8px 12px;font-size:12px}.tool-card{font-family:var(--font-mono), monospace;color:var(--on-surface-variant);background:0 0;border:0;align-self:flex-start;align-items:flex-start;gap:8px;max-width:90ch;padding:0 2px;font-size:11px;display:inline-flex}.tool-card+.tool-card{margin-top:-6px}.tool-card .lamp{width:7px;height:7px;margin-top:4px}.tool-card .chip.tool-kind{text-transform:uppercase;letter-spacing:.5px;background:0 0;border:0;flex-shrink:0;min-width:64px;padding:0;font-size:10px}.tool-card .tool-title{white-space:pre-wrap;word-break:break-word;min-width:0;line-height:1.5;overflow:visible}.subagent-card{max-width:90ch;font-family:var(--font-mono), monospace;color:var(--on-surface-variant);align-self:stretch;font-size:11px}.subagent-card summary{cursor:pointer;-webkit-user-select:none;user-select:none;align-items:flex-start;gap:8px;padding:0 2px;list-style:none;display:inline-flex}.subagent-card summary::-webkit-details-marker{display:none}.subagent-card summary .lamp{width:7px;height:7px;margin-top:4px}.subagent-card summary .chip.tool-kind{text-transform:uppercase;letter-spacing:.5px;background:0 0;border:0;flex-shrink:0;min-width:64px;padding:0;font-size:10px}.subagent-card summary .tool-title{white-space:pre-wrap;word-break:break-word;line-height:1.5}.subagent-card .subagent-state{opacity:.7}.subagent-body{border-left:2px solid var(--outline-variant);flex-direction:column;gap:10px;margin:6px 0 4px 3px;padding:6px 0 6px 14px;display:flex}.subagent-body .msg.agent{font-size:12.5px}.subagent-empty{color:var(--on-surface-variant);opacity:.7}.tool-card.compaction .chip.tool-kind,.task-card .chip.tool-kind{color:var(--tertiary)}:root[data-theme=light] .tool-card.compaction .chip.tool-kind,:root[data-theme=light] .task-card .chip.tool-kind{color:var(--on-tertiary-container)}.failure-card{max-width:76ch;box-shadow:var(--elev-1);background:var(--error-container);color:var(--on-error-container);border-radius:16px;align-self:flex-start;padding:12px 16px}.failure-card.warning{background:var(--tertiary-container);color:var(--on-tertiary-container)}.failure-card.settled{opacity:.7;box-shadow:none}.failure-card .failure-title{align-items:center;gap:6px;font-size:13.5px;display:flex}.failure-card .failure-title .microlabel{margin-right:4px;font-weight:700}.failure-card .failure-details{white-space:pre-wrap;word-break:break-word;margin-top:6px;font-size:12px}.failure-card .failure-actions{flex-wrap:wrap;gap:8px;margin-top:10px;display:flex}.plan-card{background:var(--surface-container);max-width:76ch;color:var(--on-surface-variant);border-radius:12px;align-self:flex-start;padding:10px 14px;font-size:12.5px}.plan-card.removed{opacity:.55}.plan-card .plan-head{align-items:baseline;gap:8px;margin-bottom:4px;display:flex}.plan-card .plan-count{font-family:var(--font-mono), monospace;font-size:11px}.plan-card ul{flex-direction:column;gap:3px;margin:0;padding:0;list-style:none;display:flex}.plan-card li{align-items:flex-start;gap:6px;line-height:1.45;display:flex}.plan-card li .ms-sm{flex-shrink:0;margin-top:2px}.plan-card li.plan-completed{opacity:.6;text-decoration:line-through}.plan-card li.plan-in_progress{color:var(--on-surface);font-weight:600}.plan-card li.plan-in_progress .ms-sm{color:var(--primary)}.files-card .tool-title{white-space:pre-wrap}.task-card .task-stop{font:inherit;text-transform:uppercase;letter-spacing:.5px;border:1px solid var(--outline-variant);color:inherit;cursor:pointer;background:0 0;border-radius:8px;margin-left:8px;padding:1px 6px;font-size:10px}.task-card .task-stop:hover{border-color:var(--error);color:var(--error)}.question-card .question-fields{flex-direction:column;gap:10px;margin-top:10px;display:flex}.question-field{flex-direction:column;gap:6px;font-size:13px;display:flex}.question-field.custom{margin-top:-4px}.question-field .question-label span{opacity:.85}.question-options{flex-wrap:wrap;gap:6px;display:flex}.question-field input[type=text],.question-field input[type=number]{font:inherit;border:1px solid var(--outline-variant);background:var(--surface-container-highest);color:var(--on-surface);border-radius:8px;max-width:60ch;padding:6px 10px}.chip.auth.none{color:var(--error)}.chip.usage{font-family:var(--font-mono), monospace}.config-select{font:inherit;border:1px solid var(--outline-variant);background:var(--surface-container-highest);color:var(--on-surface-variant);border-radius:999px;max-width:22ch;padding:2px 6px;font-size:11px}.chip.config-bool{cursor:pointer;align-items:center;gap:4px;display:inline-flex}.msg.user.steered{border-left:3px solid var(--tertiary)}.msg.user .steer-label{opacity:.7;margin-bottom:2px;font-size:10px;display:block}.composer-problem{color:var(--error);flex:0 0 100%;padding:0 4px 4px;font-size:12px}.composer{flex-wrap:wrap}.session-list{flex-direction:column;padding:0 8px 12px;display:flex}.session-row{text-align:left;font:inherit;border:0;border-top:1px solid var(--outline-variant);color:var(--on-surface);cursor:pointer;background:0 0;align-items:baseline;gap:12px;padding:8px;font-size:13px;display:flex}.session-row:hover{background:var(--surface-container-high)}.session-row .session-title{text-overflow:ellipsis;white-space:nowrap;flex:1;min-width:0;overflow:hidden}.session-row .session-when{color:var(--on-surface-variant);flex-shrink:0;font-size:11px}.composer-files{flex-wrap:wrap;flex:0 0 100%;gap:6px;padding:0 4px 6px;display:flex}.composer-files .file-chip{background:var(--surface-container-highest);color:var(--on-surface-variant);border:1px solid var(--outline-variant);border-radius:999px;align-items:center;gap:6px;padding:2px 8px;font-size:11px;display:inline-flex}.composer-files .file-chip img{border-radius:4px;height:28px}.composer-files .file-chip button{color:inherit;cursor:pointer;background:0 0;border:0;padding:0;display:inline-flex}.composer.dragging textarea{border-color:var(--primary);border-style:dashed}.msg.user .attachments{flex-wrap:wrap;gap:8px;margin-top:8px;display:flex}.msg.user .attachments img{border-radius:8px;max-width:100%;max-height:240px;display:block}.msg.user .attachments a.file-link{color:inherit;font-size:12px;text-decoration:underline}.perm-card{background:var(--tertiary-container);color:var(--on-tertiary-container);max-width:76ch;box-shadow:var(--elev-1);border:0;border-radius:16px;align-self:flex-start;padding:12px 16px}.perm-card .perm-title{font-size:13.5px}.perm-card .perm-title .microlabel{color:var(--tertiary);margin-right:8px;font-weight:700}:root[data-theme=light] .perm-card .perm-title .microlabel{color:var(--on-tertiary-container)}.perm-actions{flex-wrap:wrap;gap:8px;margin-top:10px;display:flex}.perm-btn{font:500 13px/1 var(--font-sans), sans-serif;border:1px solid var(--outline);border-radius:999px;padding:8px 18px;transition:background .12s,filter .12s}.perm-btn.allow{color:var(--on-primary);background:var(--primary);border-color:#0000}.perm-btn.allow:hover{filter:brightness(1.06);box-shadow:var(--elev-1)}.perm-btn.deny{color:inherit}.perm-btn.deny:hover{border-color:var(--error);color:var(--error)}.perm-resolved{color:var(--on-surface-variant);font-size:12px;font-family:var(--font-mono), monospace;margin-top:6px}.chat-working{color:var(--on-surface-variant);align-items:center;gap:8px;font-size:12px;display:flex}.composer{border-top:1px solid var(--outline-variant);flex:none;align-items:flex-end;gap:10px;padding:12px 0 4px;display:flex;position:relative}.skill-menu{background:var(--surface-container-high);border:1px solid var(--outline-variant);box-shadow:var(--elev-1);z-index:5;border-radius:14px;flex-direction:column;margin-bottom:6px;display:flex;position:absolute;bottom:100%;left:0;right:0;overflow:hidden}.skill-menu button{text-align:left;background:0 0;border:0;align-items:baseline;gap:6px;padding:9px 14px;font-size:13px;display:flex}.skill-menu button b{font-weight:500;font-family:var(--font-mono), monospace;font-size:12.5px}.skill-menu button span{color:var(--on-surface-variant);text-overflow:ellipsis;white-space:nowrap;min-width:0;font-size:12px;overflow:hidden}.skill-menu button .skill-src{text-transform:uppercase;letter-spacing:.04em;flex:none;margin-left:auto;font-size:10.5px}.skill-menu button:hover,.skill-menu button.active{background:color-mix(in srgb, var(--on-surface) 7%, transparent)}.composer textarea{resize:none;font:14px/1.5 var(--font-sans), sans-serif;color:var(--on-surface);background:var(--surface-container-high);border:1px solid #0000;border-radius:24px;outline:none;flex:1;padding:12px 18px;transition:border-color .12s,background .12s}.composer textarea:focus{border-color:var(--primary);background:var(--surface-container-highest)}.new-chat{width:100%;max-width:640px;margin:0 auto}.new-chat-panel{overflow:visible}.agent-pick{grid-template-columns:repeat(3,1fr);gap:10px;padding:14px 16px;display:grid}.agent-pick-btn{text-align:left;border:1px solid var(--outline-variant);background:0 0;border-radius:12px;flex-direction:column;gap:3px;padding:12px 14px;transition:background .12s,border-color .12s;display:flex}.agent-pick-btn b{font-size:13.5px;font-weight:500}.agent-pick-btn span{color:var(--on-surface-variant);font-size:11.5px}.agent-pick-btn:hover{background:color-mix(in srgb, var(--on-surface) 5%, transparent)}.agent-pick-btn.active{background:var(--secondary-container);color:var(--on-secondary-container);border-color:#0000}.agent-pick-btn.active span{color:var(--on-secondary-container)}@media (width<=940px){.chat-main{height:auto;min-height:calc(100vh - var(--topbar-h))}.agent-pick{grid-template-columns:1fr}}.know-intro{color:var(--on-surface-variant);padding:12px 18px;font-size:13px;line-height:1.6}.know-intro code{font-size:11.5px}.know-newbundle{gap:10px;padding:14px 18px;display:flex}.know-newbundle input{font:13px/1.4 var(--font-mono), monospace;color:var(--on-surface);background:var(--surface-container-high);border:1px solid #0000;border-radius:999px;outline:none;flex:1;padding:10px 18px;transition:border-color .12s,background .12s}.know-newbundle input:focus{border-color:var(--primary);background:var(--surface-container-highest)}.know-table{border-collapse:collapse;width:100%;font-size:13px}.know-table td{border-bottom:1px solid color-mix(in srgb, var(--outline-variant) 55%, transparent);vertical-align:baseline;padding:9px 18px}.know-table tr:last-child td{border-bottom:none}.know-table a{color:var(--on-surface);text-decoration:none}.know-table a:hover b{color:var(--primary)}.know-id{font-family:var(--font-mono), monospace;color:var(--on-surface-variant);margin-left:8px;font-size:11px}.know-type{color:var(--on-surface-variant);white-space:nowrap;font-size:11.5px}.know-flags{text-align:right;white-space:nowrap}.chip.trust.unverified{color:var(--on-surface-variant)}.chip.trust.machine-confirmed{background:var(--secondary-container);color:var(--on-secondary-container);border-color:#0000}.chip.trust.human-reviewed{color:var(--on-success-container);background:var(--success-container);border-color:#0000}.chip.stale,.chip.deprecated{color:var(--on-error-container);background:var(--error-container);border-color:#0000}.chip.attention{color:var(--on-error-container);background:var(--error-container);border-color:#0000;text-decoration:none}.chip.attention:hover{filter:brightness(.96)}.chip.draft{border-color:color-mix(in srgb, var(--primary) 45%, var(--outline-variant));color:var(--primary)}.dash{box-sizing:border-box;width:100%;max-width:1180px;margin:0 auto;padding:24px 28px 40px}.dash-actions{align-self:center;gap:10px;display:flex}.wf-pick-wrap{position:relative}.wf-pick-pop{z-index:30;background:var(--surface-container);border:1px solid var(--outline-variant);min-width:280px;max-height:340px;box-shadow:var(--elev-2,0 8px 24px #0000002e);border-radius:12px;flex-direction:column;padding:6px;display:flex;position:absolute;top:calc(100% + 6px);right:0;overflow-y:auto}.wf-pick-item{color:inherit;border-radius:8px;flex-direction:column;gap:2px;padding:8px 10px;text-decoration:none;display:flex}.wf-pick-item:hover{background:color-mix(in srgb, var(--on-surface) 6%, transparent)}.wf-pick-name{font-size:13px;font-weight:500}.wf-pick-desc{color:var(--on-surface-variant);font-size:11.5px}.wf-pick-empty{color:var(--on-surface-variant);padding:8px 10px;font-size:12px}.dash-agents{grid-template-columns:repeat(6,1fr);gap:14px;margin-bottom:18px;display:grid}@media (width<=1100px){.dash-agents{grid-template-columns:repeat(4,1fr)}}@media (width<=800px){.dash-agents{grid-template-columns:repeat(3,1fr)}}@media (width<=560px){.dash-agents{grid-template-columns:repeat(2,1fr)}}.dash-agents-empty{margin-bottom:18px}.dash-agent{background:var(--card);border:1px solid var(--card-border);box-shadow:var(--card-shadow);cursor:pointer;border-radius:16px;flex-direction:column;transition:box-shadow .15s,border-color .15s,transform .15s;display:flex;overflow:hidden}.dash-agent:hover{border-color:var(--outline);box-shadow:var(--elev-2);transform:translateY(-1px)}.lamp.idle{border:1.5px solid var(--outline-variant);background:0 0}.dash-agent-id{text-align:center;color:inherit;flex-direction:column;flex:1;align-items:center;gap:6px;padding:20px 16px 12px;text-decoration:none;display:flex}.dash-agent-id:hover .dash-agent-name{color:var(--primary)}.dash-agent-name{letter-spacing:-.005em;font-size:16px;font-weight:600}.dash-agent-desc{color:var(--on-surface-variant);-webkit-line-clamp:2;-webkit-box-orient:vertical;font-size:12.5px;line-height:1.45;display:-webkit-box;overflow:hidden}.dash-agent-foot{border-top:1px solid color-mix(in srgb, var(--outline-variant) 55%, transparent);justify-content:space-between;align-items:center;gap:10px;padding:10px 14px;display:flex}.dash-agent-state{color:var(--on-surface-variant);font-size:11px}.dash-agent-state a{color:var(--primary);text-decoration:none}.dash-chat-btn{color:var(--primary);border:1px solid var(--outline-variant);background:0 0;padding:5px 14px;font-size:12.5px;font-weight:600}.dash-chat-btn:hover{background:color-mix(in srgb, var(--primary) 10%, transparent);box-shadow:none;filter:none}.dash-feed{margin:0}.agent-avatar{background:var(--secondary-container);border-radius:50%;flex:none;place-items:center;width:38px;height:38px;font-size:19px;line-height:1;display:grid;position:relative}.agent-avatar .lamp{border:2px solid var(--surface-container-low);width:10px;height:10px;position:absolute;bottom:-1px;right:-1px}.agent-avatar .lamp.idle{background:var(--outline-variant)}.agent-avatar.sm{width:30px;height:30px;font-size:15px}.agent-avatar.lg{width:56px;height:56px;font-size:28px}.agent-avatar.lg .lamp{width:12px;height:12px;bottom:1px;right:1px}.dash-alert{text-align:left;cursor:pointer;border:1px solid color-mix(in srgb, var(--error) 40%, transparent);background:var(--error-container);width:100%;color:var(--on-error-container);border-radius:12px;align-items:center;gap:8px;margin:0 0 14px;padding:9px 14px;font-size:12.5px;display:flex}.dash-alert:hover{filter:brightness(1.04)}.dash-feed-filter{gap:6px;display:flex}.feed-chip{border:1px solid var(--outline-variant);color:var(--on-surface-variant);cursor:pointer;background:0 0;border-radius:8px;padding:2px 10px;font-size:11px}.feed-chip:hover{color:var(--on-surface)}.feed-chip.on{background:var(--primary-container);color:var(--on-primary-container);border-color:#0000}.feed-chip.on.failed{background:var(--error-container);color:var(--on-error-container)}.feed-day{border-top:1px solid color-mix(in srgb, var(--outline-variant) 55%, transparent);padding:12px 18px 3px}.feed-group:first-child .feed-day{border-top:none;padding-top:6px}.feed-group+.feed-group .m3-row{border-top:1px solid color-mix(in srgb, var(--outline-variant) 55%, transparent)}.feed-group .feed-day+.m3-row{border-top:none}.dash-mini{color:var(--on-surface-variant);flex-wrap:wrap;gap:18px;font-size:12px;display:flex}.dash-mini a{color:inherit;text-decoration:none}.dash-mini a:hover{color:var(--primary);text-decoration:underline}.dash-mini b{color:var(--on-surface);font-weight:600}.dash-mini a:hover b{color:var(--primary)}.chip.dash-kind{flex:none}.chip.status{font-family:var(--font-sans), sans-serif;border-color:#0000;flex:none;font-weight:500}.chip.status.ok{background:var(--success-container);color:var(--on-success-container)}.chip.status.failed{background:var(--error-container);color:var(--on-error-container)}.chip.status.running{background:var(--primary-container);color:var(--on-primary-container)}.chip.status.aborted{background:var(--surface-container-high);color:var(--on-surface-variant)}.chip.dash-kind.run{background:var(--primary-container);color:var(--on-primary-container);border-color:#0000}.chip.dash-kind.session{background:var(--tertiary-container);color:var(--on-tertiary-container);border-color:#0000}.chip.dash-kind.knowledge{background:var(--success-container);color:var(--on-success-container);border-color:#0000}html[data-expert=off] .dash-mini,html[data-expert=off] .chip.dash-kind{display:none}.lamp.dim{background:var(--outline-variant)}.chip.skill-src{flex:none}.chip.skill-src.workspace{background:var(--success-container);color:var(--on-success-container);border-color:#0000}.chip.skill-src.project,.chip.skill-src.user{color:var(--on-surface-variant)}.chip.skill-src.agent{background:var(--secondary-container);color:var(--on-secondary-container);border-color:#0000}.skills-local-head{border-top:1px solid var(--outline-variant);margin-top:10px}.skill-desc{margin:-6px 2px 14px}.skill-path{word-break:break-all}.know-sub{align-items:center;gap:8px;margin:-8px 2px 14px;display:flex}.know-sub .rid{font-family:var(--font-mono), monospace;color:var(--on-surface-variant);font-size:12px}.know-meta{flex-direction:column;gap:8px;padding:12px 18px;font-size:13px;display:flex}.know-meta>div{align-items:baseline;gap:14px;display:flex}.know-meta .microlabel{flex:none;width:90px}.know-verify-entry{margin-right:14px;display:inline-block}.know-folder-row td{border-bottom:none;padding:10px 18px 4px}.know-folder{font-family:var(--font-mono), monospace;color:var(--on-surface-variant);letter-spacing:.04em;font-size:11px}.know-indent{padding-left:32px!important}.side-group{border-radius:12px}.side-group+.side-group{margin-top:12px}.side-group.drop-over{outline:1.5px dashed var(--primary);outline-offset:-1.5px;background:color-mix(in srgb, var(--primary) 7%, transparent)}.side-group-head{align-items:center;gap:6px;padding:6px 10px 2px;display:flex}.side-group-count{color:var(--on-surface-variant);font-size:10px}.side-group-x{font:inherit;color:var(--on-surface-variant);cursor:pointer;opacity:0;background:0 0;border:none;padding:0 4px;font-size:11px}.side-group:hover .side-group-x{opacity:1}.side-group-x:hover{color:var(--on-surface)}.side-group-empty{color:var(--on-surface-variant);padding:6px 10px 8px;font-size:11px}.side-row.dragging{opacity:.4}.side-group-add{font:inherit;color:var(--on-surface-variant);border:1px dashed var(--outline-variant);cursor:pointer;text-align:left;background:0 0;border-radius:8px;margin:12px 10px 4px;padding:4px 10px;font-size:11px;display:block}.side-group-add:hover{color:var(--primary);border-color:var(--outline)}.side-archived{border-top:1px solid color-mix(in srgb, var(--outline-variant) 55%, transparent);margin-top:10px;padding-top:4px}.side-archived-toggle{width:100%;font:inherit;color:var(--on-surface-variant);cursor:pointer;text-align:left;background:0 0;border:none;align-items:center;gap:6px;padding:6px 10px 2px;display:flex}.side-archived-toggle:hover .microlabel{color:var(--on-surface)}.side-archived-toggle .ms{vertical-align:0}.side-row.archived-row{opacity:.55}.side-row.archived-row:hover,.side-row.archived-row.active{opacity:1}.chip.archived-chip{color:var(--on-surface-variant);border-style:dashed;align-items:center;gap:4px;display:inline-flex}.chip.archived-chip .ms{vertical-align:0}.side-group-new{padding:10px 10px 4px}.side-group-new input{box-sizing:border-box;width:100%}.side-group-rename{min-width:0;font:inherit;flex:1;font-size:11px}.agents-screen{grid-template-columns:240px minmax(0,1fr)}.agents-screen.has-sessions{grid-template-columns:240px 260px minmax(0,1fr)}.agents-screen.has-sessions.has-knowledge{grid-template-columns:240px 260px minmax(0, 1fr) var(--kside-w,460px)}.knowledge-side{border-left:1px solid var(--outline-variant);border-right:0;position:sticky}.kside-resizer{cursor:col-resize;z-index:4;width:7px;position:absolute;top:0;bottom:0;left:-3px}.kside-resizer:hover{background:color-mix(in srgb, var(--primary) 25%, transparent)}.kside-headline{flex-direction:column;gap:1px;min-width:0;display:flex}.kside-hint{color:var(--on-surface-variant);white-space:nowrap;text-overflow:ellipsis;font-size:10.5px;overflow:hidden}.kside-bundle{padding:6px 8px 10px}.kside-bundle+.kside-bundle{border-top:1px solid var(--outline-variant)}.kside-bundle-head{align-items:center;gap:2px;padding:2px 0;display:flex}.kside-bundle-toggle{text-align:left;border-radius:12px;flex:1;align-items:center;gap:7px;min-width:0;padding:6px 8px;display:flex}.kside-bundle-toggle:hover{background:color-mix(in srgb, var(--on-surface) 5%, transparent)}.kside-bundle-name{color:var(--on-surface);text-overflow:ellipsis;white-space:nowrap;font-size:12px;font-weight:600;overflow:hidden}.kside-count{color:var(--on-surface-variant);background:var(--surface-container-highest);border-radius:999px;flex:none;padding:0 7px;font-size:10.5px;line-height:17px}.kside-open{width:26px;height:26px;color:var(--on-surface-variant);border-radius:50%;flex:none;place-items:center;font-size:13px;display:grid}.kside-open:hover{background:color-mix(in srgb, var(--on-surface) 8%, transparent);color:var(--on-surface)}.kside-chev{width:15px;color:var(--on-surface-variant);flex:none;line-height:1;transition:transform .14s;display:inline-block}.kside-chev .ms{vertical-align:0;font-size:15px;display:block}.kside-chev.open{transform:rotate(90deg)}.kside-row{text-align:left;width:100%;color:var(--on-surface-variant);border-radius:12px;align-items:center;gap:7px;padding:6px 8px 6px 18px;font-size:12px;display:flex}.kside-row:hover{background:color-mix(in srgb, var(--on-surface) 5%, transparent);color:var(--on-surface)}.kside-concept.open>.kside-row{background:var(--secondary-container);color:var(--on-secondary-container);font-weight:500}.kside-concept.open>.kside-row .kside-chev{color:inherit}.kside-title{text-overflow:ellipsis;white-space:nowrap;flex:1;overflow:hidden}.kside-stale{text-transform:uppercase;letter-spacing:.05em;color:var(--error,#b3261e);cursor:help;border:1px solid;border-radius:999px;flex:none;padding:0 6px;font-size:9px}.kside-card{background:var(--surface-container-high);border:1px solid color-mix(in srgb, var(--outline-variant) 70%, transparent);border-radius:12px;margin:4px 0 10px 18px;overflow:hidden}.kside-card>.viewer-note{padding:12px 14px}.kside-card-bar{border-bottom:1px solid color-mix(in srgb, var(--outline-variant) 55%, transparent);background:color-mix(in srgb, var(--surface-container-highest) 65%, transparent);align-items:center;gap:10px;padding:7px 12px;display:flex}.kside-type{text-transform:uppercase;letter-spacing:.06em;color:var(--on-surface-variant);border:1px solid var(--outline-variant);border-radius:999px;padding:1px 7px;font-size:9px}.kside-updated{color:var(--on-surface-variant);font-size:10.5px}.kside-md.md-body{height:auto;padding:12px 14px 14px;font-size:12px;overflow:visible}.concept-md{height:auto;overflow:visible}.kside-actions{justify-content:flex-end;gap:8px;margin:2px 0 0;display:flex}.kside-edit{padding:10px 12px}.kside-edit .concept-edit{box-sizing:border-box;width:100%}.kside-edit .kside-actions{margin-top:8px}.kside-reopen{z-index:5;color:var(--on-surface-variant);background:var(--surface-container-high);border:1px solid var(--outline-variant);border-radius:999px;padding:4px 12px;font-size:11px;position:fixed;top:60px;right:14px}.kside-reopen:hover{color:var(--on-surface);background:var(--surface-container-highest,var(--surface-container-high))}@media (width<=1099px){.knowledge-side,.kside-reopen{display:none}.agents-screen.has-sessions.has-knowledge{grid-template-columns:240px 260px minmax(0,1fr)}}.agent-view{flex-direction:column;gap:16px;display:flex}.agent-view .detail-head{margin-bottom:0}.m3-list{flex-direction:column;padding:4px 0;display:flex}.m3-row{text-align:left;color:inherit;align-items:center;gap:14px;padding:12px 18px;display:flex}.m3-row+.m3-row,.m3-expand+.m3-row{border-top:1px solid color-mix(in srgb, var(--outline-variant) 55%, transparent)}button.m3-toggle{width:100%;font:inherit;cursor:pointer;background:0 0;border:0}button.m3-toggle:hover{background:color-mix(in srgb, var(--on-surface) 4%, transparent)}.m3-ico{width:32px;height:32px;color:var(--on-secondary-container);background:var(--secondary-container);border-radius:50%;flex:none;place-items:center;font-size:14px;display:grid}.m3-ico .ms{vertical-align:0;font-size:17px}.m3-body{flex-direction:column;flex:1;gap:3px;min-width:0;display:flex}.m3-head{align-items:center;gap:8px;font-size:13.5px;font-weight:500;display:flex}.m3-sub{color:var(--on-surface-variant);font-size:12px;line-height:1.5}.m3-sub code{font-size:11px}.m3-sub a{color:inherit}.m3-ellipsis{white-space:nowrap;text-overflow:ellipsis;display:block;overflow:hidden}.m3-chev{color:var(--on-surface-variant);flex:none;transition:transform .14s;display:inline-flex}.m3-chev .ms{vertical-align:0}.m3-chev.open{transform:rotate(180deg)}.m3-expand{padding:2px 18px 16px 64px}.m3-expand pre{white-space:pre-wrap;font:12.5px/1.65 var(--font-mono), monospace;margin:0}.m3-chips{flex-wrap:wrap;gap:6px;margin-top:3px;display:flex}.m3-chips .chip{text-decoration:none}.m3-switch{cursor:pointer;flex:none;width:44px;height:24px;display:inline-block;position:relative}.m3-switch input{opacity:0;cursor:pointer;margin:0;position:absolute;inset:0}.m3-switch-track{pointer-events:none;background:var(--surface-container-highest);border:2px solid var(--outline-variant);border-radius:999px;transition:background .14s,border-color .14s;position:absolute;inset:0}.m3-switch-track:after{content:"";background:var(--on-surface-variant);border-radius:50%;width:16px;height:16px;transition:transform .14s,background .14s;position:absolute;top:2px;left:2px}.m3-switch input:checked+.m3-switch-track{background:var(--primary);border-color:var(--primary)}.m3-switch input:checked+.m3-switch-track:after{background:var(--on-primary);transform:translate(20px)}a.m3-row{text-decoration:none}a.m3-row:hover{background:color-mix(in srgb, var(--on-surface) 4%, transparent)}a.m3-row:hover .m3-head{color:var(--primary)}.m3-subhead{font-family:var(--font-mono), monospace;letter-spacing:.05em;color:var(--on-surface-variant);padding:14px 18px 4px;font-size:11px}.m3-row+.m3-subhead{border-top:1px solid color-mix(in srgb, var(--outline-variant) 55%, transparent);margin-top:4px}.know-log{padding:2px 0 10px}.page-head .tabs{align-self:center;margin-left:4px}.tabs a{letter-spacing:.01em;text-transform:capitalize;color:var(--on-surface-variant);padding:7px 18px;font-size:13.5px;font-weight:500;text-decoration:none;transition:background .12s,color .12s}.tabs a+a{border-left:1px solid var(--outline-variant)}.tabs a:hover{background:color-mix(in srgb, var(--on-surface) 6%, transparent);color:var(--on-surface)}.tabs a.active{background:var(--secondary-container);color:var(--on-secondary-container);font-weight:600}.wiki{grid-template-columns:240px minmax(0,1fr);align-items:start;gap:20px;display:grid}.wiki-side{top:calc(var(--topbar-h) + 18px);max-height:calc(100vh - var(--topbar-h) - 36px);border-right:1px solid color-mix(in srgb, var(--outline-variant) 70%, transparent);flex-direction:column;gap:1px;padding:6px 10px 6px 0;display:flex;position:sticky;overflow-y:auto}.wiki-folder{font-family:var(--font-mono), monospace;letter-spacing:.04em;color:var(--on-surface-variant);padding:12px 10px 4px;font-size:10.5px}.wiki-folder:first-child{padding-top:4px}.wiki-page{color:var(--on-surface);border-radius:12px;align-items:center;gap:8px;padding:7px 10px;font-size:13px;line-height:1.3;text-decoration:none;transition:background .1s;display:flex}.wiki-page .ms-sm{color:var(--on-surface-variant);flex:none}.wiki-page:hover{background:color-mix(in srgb, var(--on-surface) 6%, transparent)}.wiki-page.active{background:var(--secondary-container);color:var(--on-secondary-container);font-weight:500}.wiki-page.active .ms-sm{color:var(--on-secondary-container)}.wiki-page-title{-webkit-line-clamp:2;-webkit-box-orient:vertical;flex:1;min-width:0;display:-webkit-box;overflow:hidden}.wiki-page{align-items:flex-start}.wiki-page .ms-sm{margin-top:1px}.wiki-dot{background:var(--error);border-radius:50%;flex:none;width:6px;height:6px}.wiki-main{min-width:0}.concept-md a{color:var(--primary);text-decoration:underline;-webkit-text-decoration-color:color-mix(in srgb, var(--primary) 40%, transparent);text-decoration-color:color-mix(in srgb, var(--primary) 40%, transparent);text-underline-offset:2px}.concept-md a:hover{-webkit-text-decoration-color:var(--primary);text-decoration-color:var(--primary)}.wiki-main .agent-view>.detail-head{margin-top:0}@media (width<=1100px){.wiki{grid-template-columns:1fr}.wiki-side{border-right:0;flex-flow:wrap;gap:4px;max-height:none;padding-right:0;position:static}.wiki-folder{width:100%}}.know-log-row{align-items:baseline;gap:10px;padding:4px 18px;display:flex}.know-log-text{color:var(--on-surface-variant);overflow-wrap:break-word;min-width:0;font-size:12.5px;line-height:1.55}.know-log-text a{color:var(--primary)}.chip.log-kind{flex:none}.chip.log-verification{background:var(--success-container);color:var(--on-success-container);border-color:#0000}.chip.log-creation,.chip.log-initialization{background:var(--secondary-container);color:var(--on-secondary-container);border-color:#0000}.detail-cols{grid-template-columns:minmax(0,1fr) 320px;align-items:start;gap:16px;display:grid}@media (width<=1020px){.detail-cols{grid-template-columns:1fr}}.detail-rail{flex-direction:column;gap:16px;min-width:0;display:flex}.rail-list{padding:4px 0}.rail-kv{flex-direction:column;gap:3px;padding:10px 18px;display:flex}.rail-kv+.rail-kv{border-top:1px solid color-mix(in srgb, var(--outline-variant) 55%, transparent)}.rail-kv .v{color:var(--on-surface);overflow-wrap:break-word;flex-wrap:wrap;align-items:center;gap:8px;font-size:12.5px;display:flex}.rail-kv .v.dim{color:var(--on-surface-variant)}.rail-kv a{color:var(--primary)}.concept-edit{resize:vertical;background:var(--surface-container-lowest);width:100%;color:var(--on-surface);font:12.5px/1.65 var(--font-mono), monospace;border:0;border-bottom:1px solid color-mix(in srgb, var(--outline-variant) 55%, transparent);outline:none;padding:14px 18px;display:block}.side-row .row-x{opacity:0;color:var(--on-surface-variant);cursor:pointer;background:0 0;border:0;border-radius:8px;flex:none;align-self:center;padding:4px 6px;font-size:11px;line-height:1;transition:opacity .1s,background .1s,color .1s}.side-row:hover .row-x,.side-row .row-x:focus-visible{opacity:1}.side-row .row-x:hover{background:color-mix(in srgb, var(--error) 18%, transparent);color:var(--error)}.agent-wf-list{flex-wrap:wrap;gap:8px;padding:12px 18px;display:flex}.agent-wf-list .chip{text-decoration:none}.agent-form{flex-direction:column;gap:14px;max-width:680px;padding:18px;display:flex}.agent-form-row{align-items:flex-end;gap:10px;display:flex}.agent-field{flex-direction:column;gap:5px;display:flex}.agent-field,.agent-field-label{color:var(--on-surface-variant);letter-spacing:.045em;text-transform:capitalize;font-size:11px;font-weight:500}.agent-field input,.agent-field select,.agent-field textarea{font:13px/1.5 var(--font-mono), monospace;color:var(--on-surface);background:var(--surface-container-high);text-transform:none;letter-spacing:normal;border:1px solid #0000;border-radius:12px;outline:none;padding:9px 14px;transition:border-color .12s,background .12s}.agent-field textarea{resize:vertical;font-family:var(--font-mono), monospace}.agent-field input:focus,.agent-field select:focus,.agent-field textarea:focus{border-color:var(--primary);background:var(--surface-container-highest)}.emoji-pick{flex-wrap:wrap;gap:6px;display:flex}.emoji-pick button{border:1px solid var(--outline-variant);cursor:pointer;background:0 0;border-radius:12px;padding:6px 10px;font-size:16px;transition:background .12s,border-color .12s}.emoji-pick button:hover{background:color-mix(in srgb, var(--on-surface) 6%, transparent)}.emoji-pick button.active{background:var(--secondary-container);border-color:#0000}.wf-checks{flex-direction:column;gap:7px;padding:4px 0;display:flex}.wf-checks label{color:var(--on-surface-variant);text-transform:none;letter-spacing:normal;cursor:pointer;align-items:baseline;gap:8px;font-size:13px;display:flex}.wf-checks input[type=checkbox]{accent-color:var(--primary)}.wf-checks b{font-family:var(--font-mono), monospace;font-size:12px}.wf-checks .opt-hint{color:var(--on-surface-variant);font-size:11.5px}@media (width<=900px){.agents-screen,.agents-screen.has-sessions,.agents-screen.has-sessions.has-knowledge{grid-template-columns:1fr}.agent-form-row{flex-direction:column;align-items:stretch}}.editor-screen{background:var(--surface);z-index:50;flex-direction:column;display:flex;position:fixed;inset:0}.editor-bar{border-bottom:1px solid var(--outline-variant);background:var(--surface-container-low);align-items:center;gap:14px;padding:10px 20px;font-size:13px;display:flex}.editor-bar .spacer{flex:1}.editor-crumb{color:var(--on-surface-variant);font-family:var(--font-mono), monospace;align-items:center;gap:6px;font-size:11.5px;display:inline-flex}.editor-title{text-overflow:ellipsis;white-space:nowrap;font-size:14px;font-weight:500;overflow:hidden}.editor-status{color:var(--on-surface-variant);font-size:11.5px}.editor-status.saving{color:var(--primary)}.editor-status.error{color:var(--error)}.editor-close{font:inherit;border:1px solid var(--outline);color:var(--on-surface);cursor:pointer;background:0 0;border-radius:999px;align-items:center;gap:4px;padding:6px 14px 6px 10px;font-size:13px;font-weight:500;display:inline-flex}.editor-close:hover{background:color-mix(in srgb, var(--on-surface) 6%, transparent)}.editor-doc{flex:1;overflow-y:auto}.editor-mdx,.editor-mdx.dark-theme{--basePageBg:var(--surface);--baseBg:var(--surface);--baseBgSubtle:var(--surface-container-low);--baseBgHover:var(--surface-container);--baseBgActive:var(--surface-container-high);--baseBorder:var(--outline-variant);--baseBorderHover:var(--outline);--baseText:var(--on-surface-variant);--baseTextContrast:var(--on-surface);--accentText:var(--primary);--accentTextContrast:var(--on-primary-container);--accentBg:var(--primary-container);--accentBgSubtle:var(--secondary-container);--accentBorder:var(--primary);color:var(--on-surface);background:var(--surface)}.editor-mdx.dark-theme .cm-editor{background:var(--surface-container-low);color:var(--on-surface)}.editor-mdx.dark-theme .cm-gutters{background:var(--surface-container);color:var(--on-surface-variant);border-color:var(--outline-variant)}.editor-mdx.dark-theme .cm-activeLine,.editor-mdx.dark-theme .cm-activeLineGutter{background:color-mix(in srgb, var(--on-surface) 6%, transparent)}.editor-mdx.dark-theme .cm-cursor{border-left-color:var(--on-surface)}.editor-mdx.dark-theme ._codeMirrorWrapper_uazmk_391,.editor-mdx.dark-theme [class*=codeMirrorWrapper]{background:var(--surface-container-low);border-color:var(--outline-variant)}.editor-mdx [role=toolbar],.editor-mdx .mdxeditor-toolbar{z-index:2;border-bottom:1px solid var(--outline-variant);background:var(--surface-container-low);border-radius:0;padding:4px 16px;position:sticky;top:0}.editor-mdx .mdxeditor-root-contenteditable{max-width:820px;margin:0 auto;padding:32px 40px 160px}.editor-content{font-family:var(--font-sans), sans-serif;color:var(--on-surface);min-height:60vh;font-size:15px;line-height:1.65}.editor-content:focus{outline:none}.editor-content h1{margin:0 0 .4em;font-size:26px}.editor-content h2{margin:1.4em 0 .4em;font-size:20px}.editor-content h3{margin:1.2em 0 .3em;font-size:16px}.editor-content p{margin:0 0 .75em}.editor-content ul,.editor-content ol{margin:0 0 .75em;padding-left:1.4em}.editor-content table{border-collapse:collapse;margin:.6em 0}.editor-content th,.editor-content td{border:1px solid var(--outline-variant);padding:5px 10px}.editor-plain{width:min(820px,100%);min-height:70vh;font:13px/1.6 var(--font-mono), monospace;color:var(--on-surface);background:var(--surface);border:1px solid var(--outline-variant);resize:vertical;border-radius:12px;margin:16px auto;padding:24px 40px;display:block}.editor-doc .viewer-note{max-width:820px;margin:12px auto 0}.git-badge{background:color-mix(in srgb, var(--on-surface) 12%, transparent);border-radius:999px;margin-left:5px;padding:1px 6px;font-size:10.5px;font-weight:600}.git-badge.behind{color:var(--primary)}.git-badge.ahead{color:var(--success)}.git-head{flex-wrap:wrap;align-items:center;gap:16px;padding:14px 18px;display:flex}.git-branch{align-items:center;gap:8px;font-size:14px;display:flex}.git-branch strong{font-family:var(--mono,ui-monospace, SFMono-Regular, Menlo, monospace)}.git-counts{align-items:center;gap:10px;font-size:12.5px;display:flex}.git-ahead{color:var(--success);font-weight:600}.git-behind{color:var(--primary);font-weight:600}.git-diverged{color:var(--error);font-weight:600}.git-sync-err{text-overflow:ellipsis;white-space:nowrap;max-width:46ch;overflow:hidden}.git-head .ws-actions{margin-left:auto}.git-row{flex-wrap:wrap;align-items:center;gap:10px;padding:8px 18px;display:flex}.git-row+.git-row{border-top:1px solid color-mix(in srgb, var(--outline-variant) 45%, transparent)}.git-pick{align-items:center;display:flex}.git-file{cursor:pointer;min-width:0;color:var(--on-surface);font:inherit;text-align:left;background:0 0;border:0;flex:1;align-items:center;gap:8px;padding:2px 0;display:flex}.git-file:hover .git-path{text-decoration:underline}.git-status{text-transform:uppercase;letter-spacing:.4px;border:1px solid var(--outline-variant);color:var(--on-surface-variant);border-radius:999px;flex:none;padding:2px 8px;font-size:10.5px;font-weight:600}.git-status.s-modified{color:var(--primary)}.git-status.s-added,.git-status.s-untracked{color:var(--success)}.git-status.s-deleted,.git-status.s-conflicted{color:var(--error)}.git-path{font-family:var(--mono,ui-monospace, SFMono-Regular, Menlo, monospace);text-overflow:ellipsis;white-space:nowrap;font-size:12.5px;overflow:hidden}.git-row.blocked{opacity:.6}.git-diff{background:var(--surface-container);font-family:var(--mono,ui-monospace, SFMono-Regular, Menlo, monospace);white-space:pre;border-radius:12px;flex-basis:100%;max-height:420px;margin:6px 0 2px;padding:10px 12px;font-size:11.5px;line-height:1.5;overflow:auto}.git-diff-error{color:var(--error)}.git-diff .d-add{color:var(--success)}.git-diff .d-del{color:var(--error)}.git-diff .d-hunk{color:var(--primary)}.git-diff .d-meta{color:var(--on-surface-variant);opacity:.8}.git-commit{border-top:1px solid var(--outline-variant);background:var(--surface-container);flex-wrap:wrap;align-items:center;gap:10px;padding:12px 18px;display:flex}.git-message{min-width:220px;font:inherit;border:1px solid var(--outline-variant);background:var(--surface);color:var(--on-surface);border-radius:12px;flex:1;padding:9px 12px;font-size:13px}.git-blocked{border-top:1px solid var(--outline-variant);padding:10px 18px}.git-blocked summary{color:var(--on-surface-variant);cursor:pointer;font-size:12.5px}.git-blocked .git-row{padding-left:0;padding-right:0}.kbd{font-family:var(--font-mono), monospace;border:1px solid var(--outline-variant);color:var(--on-surface-variant);border-radius:5px;padding:3px 5px;font-size:10.5px;line-height:1}.search-btn{color:var(--on-surface-variant);border-radius:12px;align-items:center;gap:6px;padding:4px 8px 4px 6px;transition:background .12s,color .12s;display:inline-flex}.search-btn:hover{background:color-mix(in srgb, var(--on-surface) 8%, transparent);color:var(--on-surface)}.palette-backdrop{z-index:50;background:#00000059;justify-content:center;align-items:flex-start;padding:12vh 16px 16px;display:flex;position:fixed;inset:0}.palette{background:var(--surface-container-high);width:min(620px,100%);max-height:min(70dvh,560px);box-shadow:var(--elev-3);border-radius:16px;flex-direction:column;display:flex;overflow:hidden}.palette-input{border-bottom:1px solid var(--outline-variant);color:var(--on-surface-variant);align-items:center;gap:10px;padding:12px 16px;display:flex}.palette-input input{min-width:0;font:inherit;color:var(--on-surface);background:0 0;border:0;outline:none;flex:1;font-size:16px}.palette-list{overscroll-behavior:contain;padding:6px;list-style:none;overflow-y:auto}.palette-item{cursor:pointer;border-radius:12px;align-items:center;gap:10px;padding:8px 10px;display:flex}.palette-item.active{background:color-mix(in srgb, var(--on-surface) 8%, transparent)}.palette-emoji{text-align:center;flex:none;width:24px;font-size:18px;line-height:1}.palette-text{flex-direction:column;flex:1;min-width:0;display:flex}.palette-name{white-space:nowrap;text-overflow:ellipsis;font-size:13.5px;font-weight:500;overflow:hidden}.palette-sub{color:var(--on-surface-variant);white-space:nowrap;text-overflow:ellipsis;font-size:12px;overflow:hidden}.palette-emoji .ms{color:var(--on-surface-variant);font-size:18px}.palette-group{letter-spacing:.4px;text-transform:uppercase;color:var(--on-surface-variant);align-items:center;gap:6px;padding:12px 10px 4px;font-size:11px;font-weight:600;display:flex}.palette-group:first-child{padding-top:6px}.palette-group-name{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.palette-group-note{letter-spacing:0;text-transform:none;font-weight:400}.palette-empty{text-align:center;color:var(--on-surface-variant);padding:28px 16px;font-size:13px}.palette-empty a{text-decoration:underline}.palette-foot{border-top:1px solid var(--outline-variant);color:var(--on-surface-variant);align-items:center;gap:14px;padding:8px 14px;font-size:11px;display:flex}.palette-foot span{align-items:center;gap:4px;display:inline-flex}.palette-note{margin-left:auto}.palette-warn{color:var(--error);white-space:nowrap;text-overflow:ellipsis;max-width:60%;margin-left:auto;overflow:hidden}.palette-chip{letter-spacing:.4px;text-transform:uppercase;border:1px solid var(--outline-variant);border-radius:999px;padding:1px 6px;font-size:10px;font-weight:600}@media (width<=1100px){.search-btn .kbd{display:none}}.repos-screen .ws-icon .ms{color:var(--on-surface-variant);font-size:22px}.repo-branch{font-family:var(--mono,ui-monospace, SFMono-Regular, Menlo, monospace);color:var(--on-surface-variant);border:1px solid color-mix(in srgb, var(--outline-variant) 70%, transparent);border-radius:999px;padding:1px 7px;font-size:12px}.repo-row .ws-meta code{font-size:11.5px}.repos-screen .agent-form{max-width:none}.repos-screen .agent-form-row .ws-btn{white-space:nowrap;height:36px}.settings-color-row{align-items:center;gap:6px;display:flex}.settings-color-row input[type=color]{border:1px solid var(--outline-variant);cursor:pointer;background:0 0;border-radius:8px;width:30px;height:30px;padding:2px}.settings-color-row input[type=text],.settings-color-row input:not([type]){flex:1;min-width:0}.chat-split{flex:1;gap:16px;min-height:0;display:flex}.chat-split.open .chat-thread{flex:0 44%;min-width:340px;max-width:none;margin:0}.vibeable-open{margin-left:auto}.vibeable-pane{background:var(--surface-container-low);min-width:0;min-height:0;box-shadow:var(--elev-1);border-radius:16px;flex-direction:column;flex:56%;display:flex;overflow:hidden}.vibeable-bar{border-bottom:1px solid var(--outline-variant);flex:none;align-items:center;gap:8px;min-height:44px;padding:6px 8px 6px 14px;display:flex}.vibeable-bar-icon{color:var(--on-surface-variant)}.vibeable-name{text-overflow:ellipsis;white-space:nowrap;font-size:14px;font-weight:500;overflow:hidden}.vibeable-mode{letter-spacing:.02em;background:var(--surface-container-highest);color:var(--on-surface-variant);white-space:nowrap;border-radius:999px;align-items:center;gap:6px;padding:2px 10px;font-size:11px;font-weight:500;display:inline-flex}.vibeable-mode.failed{color:var(--on-error-container);background:var(--error-container)}.vibeable-flash{color:var(--primary);white-space:nowrap;align-items:center;gap:4px;font-size:11px;animation:2.5s forwards vibeable-fade;display:inline-flex}@keyframes vibeable-fade{0%,60%{opacity:1}to{opacity:0}}.vibeable-bar .icon-btn.active{background:var(--secondary-container);color:var(--on-secondary-container)}.vibeable-play{color:var(--primary)}.vibeable-frame{background:#fff;border:0;flex:1;width:100%;min-height:0;display:block}.vibeable-err{color:var(--on-error-container);background:var(--error-container);flex:none;align-items:center;gap:10px;padding:6px 8px 6px 14px;font-size:12.5px;display:flex}.vibeable-err span{flex:1}.vibeable-err-x{width:28px;height:28px;color:inherit;cursor:pointer;background:0 0;border:0;border-radius:50%;place-items:center;display:grid}.vibeable-err-x:hover{background:color-mix(in srgb, var(--on-error-container) 12%, transparent)}.vibeable-note{color:var(--on-surface-variant);border-bottom:1px solid var(--outline-variant);flex:none;padding:6px 14px;font-size:12px}.vibeable-note code{font-size:11px}.vibeable-log{border-top:1px solid var(--outline-variant);max-height:180px;font-family:var(--font-mono), monospace;white-space:pre-wrap;word-break:break-word;color:var(--on-surface-variant);background:var(--surface-container);flex:none;margin:0;padding:8px 14px;font-size:11.5px;line-height:1.5;overflow:auto}.vibeable-pane .empty{border:0;margin:auto}.vibeable-overlay{z-index:60;background:color-mix(in srgb, var(--scrim,#000) 32%, transparent);justify-content:center;align-items:flex-start;padding-top:12vh;display:flex;position:fixed;inset:0}.vibeable-picker{background:var(--surface-container);width:min(560px,100vw - 32px);max-height:76vh;color:var(--on-surface);box-shadow:var(--elev-3);border-radius:28px;flex-direction:column;padding:20px 24px 22px;display:flex}.vibeable-picker-head{align-items:center;gap:12px;display:flex}.vibeable-picker-head h2{margin:0;font-size:20px;font-weight:400}.vibeable-picker-hint{color:var(--on-surface-variant);margin:8px 0 14px;font-size:13px}.vibeable-picker-off{padding:12px 0;font-size:13.5px}.vibeable-new{gap:10px;margin-bottom:12px;display:flex}.vibeable-new input{border:1px solid var(--outline);background:var(--surface-container-highest);height:40px;color:var(--on-surface);border-radius:12px;flex:1;padding:0 14px;font-size:14px}.vibeable-new input:focus{border-color:var(--primary);outline:0}.vibeable-picker-list{border-top:1px solid var(--outline-variant);flex-direction:column;min-height:0;padding-top:6px;display:flex;overflow-y:auto}.vibeable-picker-empty{color:var(--on-surface-variant);padding:16px 4px;font-size:13px}.vibeable-repo{text-align:left;width:100%;color:inherit;cursor:pointer;font:inherit;background:0 0;border:0;border-radius:12px;align-items:center;gap:14px;padding:10px 8px;display:flex}.vibeable-repo:hover:not(:disabled){background:color-mix(in srgb, var(--on-surface) 8%, transparent)}.vibeable-repo:disabled{opacity:.6;cursor:default}.vibeable-repo-icon{background:var(--secondary-container);width:40px;height:40px;color:var(--on-secondary-container);border-radius:50%;flex:none;place-items:center;display:grid}.vibeable-repo-main{flex-direction:column;flex:1;gap:2px;min-width:0;display:flex}.vibeable-repo-name{font-size:15px}.vibeable-repo-sub{color:var(--on-surface-variant);text-overflow:ellipsis;white-space:nowrap;font-size:12px;overflow:hidden}.vibeable-repo-go{color:var(--on-surface-variant)}.vibeable-picker-err{margin-top:10px}@media (width<=1100px){.chat-split.open{flex-direction:column}.chat-split.open .chat-thread{flex:none;min-width:0;min-height:50vh}.vibeable-pane{flex:none;min-height:460px}}.vibeables-agent{color:var(--on-surface-variant);align-items:center;gap:8px;font-size:12px;display:inline-flex}.vibeables-agent select{border:1px solid var(--outline-variant);background:var(--surface-container-highest);height:28px;color:var(--on-surface);border-radius:8px;padding:0 8px;font-size:12.5px}.vibeable-when{color:var(--on-surface-variant);font-size:12px}.vibeable-row .ws-icon.vibeable-repo-icon{width:40px;height:40px}.ws-actions a.ws-btn{text-decoration:none}.vibeable-pane-off{flex:none;align-self:flex-start;min-width:320px;max-width:420px}.vibeables-screen{grid-template-columns:280px minmax(0,1fr)}.vibe-main{gap:12px}.vibe-main .detail-head{flex:none;margin-bottom:0}.vibe-main .vibeable-pane{flex:auto}.vibe-main .vibeables-agent select{font:inherit;font-size:13px}.empty-action form,form.empty-action{flex-direction:column;align-items:center;gap:12px;display:flex}form.empty-action .settings-note{max-width:52ch}.channels-screen{grid-template-columns:280px minmax(0,1fr)}.channel-head .channel-name{color:var(--on-surface-variant);font-size:15px}.channel-head .spacer{flex:1}.channel-members{flex-wrap:wrap;flex:none;align-items:center;gap:8px 10px;padding:0 0 12px;display:flex}.channel-purpose{width:100%;color:var(--on-surface-variant);font-size:13px;line-height:18px}.member-chip{background:var(--surface-container);color:inherit;border-radius:999px;align-items:center;gap:8px;padding:3px 10px 3px 3px;font-size:13px;text-decoration:none;transition:background .12s;display:inline-flex}.member-chip:hover{background:var(--surface-container-high)}.member-chip{align-items:center;gap:4px;padding-right:6px}.member-chip.focused{outline:2px solid var(--primary)}.member-chip .member-open{font:inherit;color:inherit;cursor:pointer;text-align:left;background:0 0;border:0;align-items:center;gap:8px;min-width:0;padding:0;display:inline-flex}.member-chip .member-text{flex-direction:column;gap:1px;min-width:0;display:flex}.member-chip .member-line{align-items:center;gap:6px;display:inline-flex}.member-chip .member-activity{color:var(--on-surface-variant);text-overflow:ellipsis;white-space:nowrap;max-width:44ch;font-size:11px;overflow:hidden}.member-chip .member-activity .microlabel{margin-right:4px}.member-chip .member-stop,.member-chip .member-info{color:var(--on-surface-variant);cursor:pointer;background:0 0;border:0;border-radius:8px;align-items:center;padding:2px;display:inline-flex}.member-chip .member-stop:hover{color:var(--error)}.member-chip .member-info:hover{color:var(--on-surface)}.focus-bar{border-bottom:1px solid var(--outline-variant);align-items:center;gap:10px;padding:6px 0;font-size:12.5px;display:flex}.focus-bar .focus-title{color:var(--on-surface-variant)}.member-chip.working{background:color-mix(in srgb, var(--primary) 12%, var(--surface-container))}.member-chip .member-handle{color:var(--on-surface-variant);font-family:var(--font-mono), monospace;font-size:11.5px}.member-chip .chip{padding:0 7px;font-size:10px}.turn{display:contents}.byline{color:var(--on-surface-variant);align-items:center;gap:8px;margin:10px 0 -2px;font-size:12.5px;text-decoration:none;display:inline-flex}.byline.human{align-self:flex-end}.byline.agent{align-self:flex-start}.byline-avatar{background:var(--secondary-container);width:22px;height:22px;color:var(--on-secondary-container);border-radius:50%;place-items:center;font-size:12px;font-weight:600;display:grid}.byline.human .byline-avatar{background:var(--primary-container);color:var(--on-primary-container)}.byline-name{color:var(--on-surface);font-weight:600}.byline-handle{font-family:var(--font-mono), monospace;font-size:11px}.channel-thread .composer{flex-wrap:wrap}.composer-me{color:var(--on-surface-variant);flex:0 0 100%;align-items:center;gap:6px;padding:0 4px 2px;font-size:12px;display:flex}.composer-me .me-name{font:inherit;color:var(--on-surface);cursor:pointer;background:0 0;border:0;align-items:center;gap:4px;padding:0;font-weight:600;display:inline-flex}.composer-me input{font:inherit;border:1px solid var(--outline-variant);background:var(--surface-container-highest);color:inherit;border-radius:8px;padding:2px 8px}.coworker-btn{align-items:center;gap:6px;display:inline-flex}.dialog-backdrop{z-index:40;background:color-mix(in srgb, var(--on-surface) 32%, transparent);place-items:center;padding:24px;display:grid;position:fixed;inset:0}.dialog{background:var(--surface-container-high);width:min(560px,100%);max-height:calc(100dvh - 48px);box-shadow:var(--elev-2);border-radius:16px;overflow-y:auto}.dialog .agent-form{padding-top:4px}
@@ -15,8 +15,8 @@
15
15
  } catch (e) {}
16
16
  })();
17
17
  </script>
18
- <script type="module" crossorigin src="/assets/index-CiJ79dQy.js"></script>
19
- <link rel="stylesheet" crossorigin href="/assets/index-CS1G-A97.css">
18
+ <script type="module" crossorigin src="/assets/index-7qpkt5Ol.js"></script>
19
+ <link rel="stylesheet" crossorigin href="/assets/index-unbHjxkQ.css">
20
20
  </head>
21
21
  <body>
22
22
  <div id="root"></div>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@netnodeag/kraftwerk",
3
- "version": "0.45.0",
3
+ "version": "0.45.1",
4
4
  "description": "Open-source agentic workspace for teams — where people and AI agents get work done together: agents (Claude Code, Codex, Pi), skills, shared knowledge, repeatable workflows, and deterministic verification",
5
5
  "keywords": [
6
6
  "agents",
@@ -1 +0,0 @@
1
- import{a as e}from"./editor-DITzQiO1.js";export{e as markdown};