failproofai 1.0.10-beta.1 → 1.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.next/standalone/.next/BUILD_ID +1 -1
- package/.next/standalone/.next/build-manifest.json +3 -3
- package/.next/standalone/.next/prerender-manifest.json +4 -4
- package/.next/standalone/.next/required-server-files.json +1 -1
- package/.next/standalone/.next/server/app/_global-error/page/server-reference-manifest.json +1 -1
- package/.next/standalone/.next/server/app/_global-error/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/_global-error.html +1 -1
- package/.next/standalone/.next/server/app/_global-error.rsc +7 -7
- package/.next/standalone/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +6 -6
- package/.next/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +7 -7
- package/.next/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_not-found/page/server-reference-manifest.json +1 -1
- package/.next/standalone/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/_not-found.html +1 -1
- package/.next/standalone/.next/server/app/_not-found.rsc +14 -14
- package/.next/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +14 -14
- package/.next/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +13 -13
- package/.next/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/api/audit/invite/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/audit/run/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/auth/login-request/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/auth/login-verify/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/auth/logout/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/auth/status/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/download/[project]/[session]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/audit/page/server-reference-manifest.json +2 -2
- package/.next/standalone/.next/server/app/audit/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/audit/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/index.html +1 -1
- package/.next/standalone/.next/server/app/index.rsc +14 -14
- package/.next/standalone/.next/server/app/index.segments/__PAGE__.segment.rsc +13 -13
- package/.next/standalone/.next/server/app/index.segments/_full.segment.rsc +14 -14
- package/.next/standalone/.next/server/app/index.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/page/server-reference-manifest.json +1 -1
- package/.next/standalone/.next/server/app/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/policies/page/server-reference-manifest.json +14 -14
- package/.next/standalone/.next/server/app/policies/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/policies/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/project/[name]/page/server-reference-manifest.json +1 -1
- package/.next/standalone/.next/server/app/project/[name]/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/project/[name]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/project/[name]/session/[sessionId]/page/react-loadable-manifest.json +2 -2
- package/.next/standalone/.next/server/app/project/[name]/session/[sessionId]/page/server-reference-manifest.json +2 -2
- package/.next/standalone/.next/server/app/project/[name]/session/[sessionId]/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/project/[name]/session/[sessionId]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/projects/page/server-reference-manifest.json +1 -1
- package/.next/standalone/.next/server/app/projects/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/projects/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/settings/page/server-reference-manifest.json +8 -8
- package/.next/standalone/.next/server/app/settings/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/settings/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0o07qi9._.js +1 -1
- package/.next/standalone/.next/server/chunks/_0tovk6q._.js +1 -1
- package/.next/standalone/.next/server/chunks/_0trp3yc._.js +1 -1
- package/.next/standalone/.next/server/chunks/package_json_[json]_cjs_1nxcc4v._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__04usis8._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__056wjo4._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0n0xg95._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0a2-9ht._.js → [root-of-the-server]__0oqrl71._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0rwtwpm._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__11mayhe._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__15578wp._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1m_svbe._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1pprgri._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1q4p5b8._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/_042cgl1._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_08x1r5t._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_0bqoto4._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{_1n-mym7._.js → _0yq5_3a._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{_0krq5f0._.js → _16pa9ht._.js} +3 -3
- package/.next/standalone/.next/server/chunks/ssr/_1zopuov._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_next-internal_server_app_policies_page_actions_1sp2-yo.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/app_actions_get-scheduled-audit_ts_0ei9sni._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/app_audit__components_audit-dashboard_tsx_0p9ud47._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/app_global-error_tsx_1kp6l3x._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/app_policies_hooks-client_tsx_19dqvpc._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/app_settings_02tf1h4._.js +1 -1
- package/.next/standalone/.next/server/middleware-build-manifest.js +3 -3
- package/.next/standalone/.next/server/pages/404.html +1 -1
- package/.next/standalone/.next/server/pages/500.html +1 -1
- package/.next/standalone/.next/server/server-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/server-reference-manifest.json +23 -23
- package/.next/standalone/.next/static/chunks/{3q8vesnwk_r0i.js → 03h3b-uomi7_d.js} +1 -1
- package/.next/standalone/.next/static/chunks/078dofaxvjgpd.js +1 -0
- package/.next/standalone/.next/static/chunks/1fqukzzowjflt.js +1 -0
- package/.next/standalone/.next/static/chunks/1lyg_puttohbc.js +1 -0
- package/.next/standalone/.next/static/chunks/{3ztf2h_fv6_t9.js → 2hg_bp8z_vm2g.js} +1 -1
- package/.next/standalone/.next/static/chunks/{0s4cko_weh6pi.js → 2j92xul6y24_v.js} +1 -1
- package/.next/standalone/.next/static/chunks/{1-k37ijadiv9h.js → 2kj826h1w9r47.js} +1 -1
- package/.next/standalone/.next/static/chunks/{3vk6jdkxvb7yk.js → 3mjfvng11xnoo.js} +1 -1
- package/.next/standalone/.next/static/chunks/{2cvvec76j9bwq.js → 3nkc2jlgyygda.js} +1 -1
- package/.next/standalone/.next/static/chunks/{3z7mx6me_j7d3.js → 3ob2161ap37ul.js} +1 -1
- package/.next/standalone/.next/static/chunks/{18reoqya39rov.js → 3u1s8dsqiean5.js} +1 -1
- package/.next/standalone/hermes-plugin/README.md +10 -5
- package/.next/standalone/hermes-plugin/__init__.py +77 -26
- package/.next/standalone/hermes-plugin/plugin.yaml +1 -1
- package/.next/standalone/package.json +5 -5
- package/.next/standalone/server.js +1 -1
- package/dist/cli.mjs +6 -6
- package/dist/worker.mjs +1 -1
- package/hermes-plugin/README.md +10 -5
- package/hermes-plugin/__init__.py +77 -26
- package/hermes-plugin/plugin.yaml +1 -1
- package/package.json +5 -5
- package/.next/standalone/.next/static/chunks/0yclxmfppc_8e.js +0 -1
- package/.next/standalone/.next/static/chunks/2o9-3ff26v4yd.js +0 -1
- package/.next/standalone/.next/static/chunks/3tj1zi4xv-bll.js +0 -1
- /package/.next/standalone/.next/static/{OJTzlkhxVSWnwhlF2Q7m3 → ECs8__hcNabYV58WfDh-3}/_buildManifest.js +0 -0
- /package/.next/standalone/.next/static/{OJTzlkhxVSWnwhlF2Q7m3 → ECs8__hcNabYV58WfDh-3}/_clientMiddlewareManifest.js +0 -0
- /package/.next/standalone/.next/static/{OJTzlkhxVSWnwhlF2Q7m3 → ECs8__hcNabYV58WfDh-3}/_ssgManifest.js +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,42175,e=>{"use strict";var t=e.i(95187);let r=(0,t.createServerReference)("002b3cc50212764fbf57f8ead598d92ef778ab1cb4",t.callServer,void 0,t.findSourceMapURL,"getTelemetryConfig");e.s(["getTelemetryConfig",0,r])},53348,e=>{"use strict";var t=e.i(43476),r=e.i(71645),n=e.i(42175),l=e.i(9969);e.s(["default",0,function({error:e,reset:a}){return(0,r.useEffect)(()=>{(0,n.getTelemetryConfig)().then(t=>{(0,l.setClientTelemetryConfig)(t),(0,l.captureClientEvent)("client_error",{error_message:e.message,error_name:e.name,error_digest:e.digest,boundary:"global"})}).catch(()=>{})},[e]),(0,t.jsx)("html",{children:(0,t.jsx)("body",{children:(0,t.jsx)("main",{style:{minHeight:"100vh",display:"flex",alignItems:"center",justifyContent:"center",background:"#031035",color:"#f8fafc",fontFamily:"system-ui, sans-serif"},children:(0,t.jsxs)("div",{style:{textAlign:"center",padding:"2rem",border:"1px solid rgba(239,68,68,0.4)",borderRadius:"0.5rem",maxWidth:"500px"},children:[(0,t.jsx)("h2",{style:{color:"#ef4444",marginBottom:"0.5rem",fontSize:"1.25rem"},children:"Something went wrong"}),(0,t.jsx)("p",{style:{color:"#94a3b8",marginBottom:"1.5rem"},children:e.message||"An unexpected error occurred."}),(0,t.jsx)("button",{onClick:a,style:{padding:"0.5rem 1.25rem",background:"#3b82f6",color:"white",border:"none",borderRadius:"0.375rem",cursor:"pointer",fontSize:"0.875rem"},children:"Try again"})]})})})})}])},9969,e=>{"use strict";let t=null;e.s(["captureClientEvent",0,function(e,r){if(!t||!t.enabled)return;let n=JSON.stringify({api_key:t.apiKey,event:e,distinct_id:t.distinctId,properties:{...r,$lib:"failproofai-web",failproofai_version:t.version,product:"failproofai-oss",$current_url:window.location.href,$pathname:window.location.pathname}});fetch(t.host.replace(/\/+$/,"")+"/capture/",{method:"POST",headers:{"Content-Type":"application/json"},body:n,keepalive:!0,signal:AbortSignal.timeout(5e3)}).catch(()=>{})},"setClientTelemetryConfig",0,function(e){t=e}],9969)},95187,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={callServer:function(){return a.callServer},createServerReference:function(){return u.createServerReference},findSourceMapURL:function(){return o.findSourceMapURL}};for(var l in n)Object.defineProperty(r,l,{enumerable:!0,get:n[l]});let a=e.r(32120),o=e.r(92245),u=e.r(35326)},28298,(e,t,r)=>{"use strict";e.i(47167),Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"useRouterBFCache",{enumerable:!0,get:function(){return l}});let n=e.r(71645);function l(e,t,r){let[l,a]=(0,n.useState)(()=>({tree:e,cacheNode:t,stateKey:r,next:null}));if(l.tree===e)return l;let o={tree:e,cacheNode:t,stateKey:r,next:null},u=1,i=l,s=o;for(;null!==i&&u<1;){if(i.stateKey===r){s.next=i.next;break}{u++;let e={tree:i.tree,cacheNode:i.cacheNode,stateKey:i.stateKey,next:null};s.next=e,s=e}i=i.next}return a(o),o}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},47257,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"ClientPageRoot",{enumerable:!0,get:function(){return s}});let n=e.r(43476),l=e.r(8372),a=e.r(71645),o=e.r(33906),u=e.r(61994),i=e.r(15783);function s({Component:e,serverProvidedParams:t}){let r,d;if(null!==t)r=t.searchParams,d=t.params;else{let e=(0,a.use)(l.LayoutRouterContext);d=null!==e?e.parentParams:{},r=(0,o.urlSearchParamsToParsedUrlQuery)((0,a.use)(u.SearchParamsContext))}let c=(0,i.createClientSearchParams)(r),f=(0,i.createClientParams)(d);return(0,n.jsx)(e,{params:f,searchParams:c})}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},92825,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"ClientSegmentRoot",{enumerable:!0,get:function(){return u}});let n=e.r(43476),l=e.r(8372),a=e.r(71645),o=e.r(15783);function u({Component:e,slots:t,serverProvidedParams:r}){let i;if(null!==r)i=r.params;else{let e=(0,a.use)(l.LayoutRouterContext);i=null!==e?e.parentParams:{}}let s=(0,o.createClientParams)(i);return(0,n.jsx)(e,{...t,params:s})}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},68017,(e,t,r)=>{"use strict";e.i(47167),Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"HTTPAccessFallbackBoundary",{enumerable:!0,get:function(){return d}});let n=e.r(90809),l=e.r(43476),a=n._(e.r(71645)),o=e.r(90373),u=e.r(54394),i=e.r(8372);class s extends a.default.Component{constructor(e){super(e),this.state={triggeredStatus:void 0,previousPathname:e.pathname}}componentDidCatch(){}static getDerivedStateFromError(e){if((0,u.isHTTPAccessFallbackError)(e))return{triggeredStatus:(0,u.getAccessFallbackHTTPStatus)(e)};throw e}static getDerivedStateFromProps(e,t){return e.pathname!==t.previousPathname&&t.triggeredStatus?{triggeredStatus:void 0,previousPathname:e.pathname}:{triggeredStatus:t.triggeredStatus,previousPathname:e.pathname}}render(){let{notFound:e,forbidden:t,unauthorized:r,children:n}=this.props,{triggeredStatus:a}=this.state,o={[u.HTTPAccessErrorStatus.NOT_FOUND]:e,[u.HTTPAccessErrorStatus.FORBIDDEN]:t,[u.HTTPAccessErrorStatus.UNAUTHORIZED]:r};if(a){let i=a===u.HTTPAccessErrorStatus.NOT_FOUND&&e,s=a===u.HTTPAccessErrorStatus.FORBIDDEN&&t,d=a===u.HTTPAccessErrorStatus.UNAUTHORIZED&&r;return i||s||d?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("meta",{name:"robots",content:"noindex"}),!1,o[a]]}):n}return n}}function d({notFound:e,forbidden:t,unauthorized:r,children:n}){let u=(0,o.useUntrackedPathname)(),c=(0,a.useContext)(i.MissingSlotContext);return e||t||r?(0,l.jsx)(s,{pathname:u,notFound:e,forbidden:t,unauthorized:r,missingSlots:c,children:n}):(0,l.jsx)(l.Fragment,{children:n})}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},22976,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={InstantValidationBoundaryContext:function(){return a},PlaceValidationBoundaryBelowThisLevel:function(){return o},RenderValidationBoundaryAtThisLevel:function(){return u},SlotMarker:function(){return i}};for(var l in n)Object.defineProperty(r,l,{enumerable:!0,get:n[l]});let a=null,o=null,u=null,i=null;("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},77694,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={InstantValidationBoundaryContext:function(){return a.InstantValidationBoundaryContext},PlaceValidationBoundaryBelowThisLevel:function(){return a.PlaceValidationBoundaryBelowThisLevel},RenderValidationBoundaryAtThisLevel:function(){return a.RenderValidationBoundaryAtThisLevel},SlotMarker:function(){return a.SlotMarker}};for(var l in n)Object.defineProperty(r,l,{enumerable:!0,get:n[l]});let a=e.r(22976);("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},39756,(e,t,r)=>{"use strict";e.i(47167),Object.defineProperty(r,"__esModule",{value:!0});var n={LoadingBoundaryProvider:function(){return C},default:function(){return S}};for(var l in n)Object.defineProperty(r,l,{enumerable:!0,get:n[l]});let a=e.r(55682),o=e.r(90809),u=e.r(43476),i=o._(e.r(71645)),s=a._(e.r(74080)),d=e.r(8372),c=e.r(1244),f=e.r(72383),p=e.r(91915),m=e.r(58442),y=e.r(68017);e.r(77694);let b=e.r(70725),h=e.r(28298);e.r(74180);let g=e.r(61994),_=e.r(33906),v=e.r(95871);s.default.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function P(e,t,r){let n=e.getClientRects();if(0===n.length)return 0;let l=1/0;for(let e=0;e<n.length;e++){let t=n[e];t.top<l&&(l=t.top)}return l>=r()&&l<=t?1:2}i.default.Component;let j=function(e){let t=i.default.useRef(null);return(0,i.useLayoutEffect)(()=>{let{focusAndScrollRef:r,cacheNode:n}=e,l=r.forceScroll?r.scrollRef:n.scrollRef;if(null===l||!l.current)return;let a=null,o=r.hashFragment;if(o){var u;if(null===(a="top"===(u=o)?document.body:document.getElementById(u)??document.getElementsByName(u)[0]??null)){l.current=!1,r.onlyHashChange=!1,r.hashFragment=null;return}}else a=t.current;if(null===a)return;let i=!1;(0,p.disableSmoothScrollDuringRouteTransition)(()=>{let e=document.documentElement,t=null,r=null,n=null,u=()=>{var r,l;let a,o;return null===n&&(r=e,l=t,n=!Number.isFinite(o=Number.parseFloat(a=getComputedStyle(r).scrollPaddingTop))||o<0?0:a.endsWith("px")?o:a.endsWith("%")?o/100*l:0),n};(o||(t=e.clientHeight,0!==(r=P(a,t,u))))&&((i=!0,l.current=!1,o)?a.scrollIntoView():1!==r&&(e.scrollTop=0,2===P(a,t,u)&&a.scrollIntoView()))},{dontForceLayout:!0,onlyHashChange:r.onlyHashChange}),i&&(r.onlyHashChange=!1,r.hashFragment=null)},void 0),(0,u.jsx)(i.Fragment,{ref:t,children:e.children})};function x({children:e,cacheNode:t}){let r=(0,i.useContext)(d.GlobalLayoutRouterContext);if(!r)throw Object.defineProperty(Error("invariant global layout router not mounted"),"__NEXT_ERROR_CODE",{value:"E473",enumerable:!1,configurable:!0});return(0,u.jsx)(j,{focusAndScrollRef:r.focusAndScrollRef,cacheNode:t,children:e})}function O({tree:e,segmentPath:t,debugNameContext:r,cacheNode:n,params:l,url:a,isActive:o}){let s,f=(0,i.useContext)(d.GlobalLayoutRouterContext);if((0,i.useContext)(g.NavigationPromisesContext),!f)throw Object.defineProperty(Error("invariant global layout router not mounted"),"__NEXT_ERROR_CODE",{value:"E473",enumerable:!1,configurable:!0});let p=null!==n?n:(0,i.use)(c.unresolvedThenable),m=null!==p.prefetchRsc?p.prefetchRsc:p.rsc,y=(0,i.useDeferredValue)(p.rsc,m);if((0,v.isDeferredRsc)(y)){let e=(0,i.use)(y);null===e&&(0,i.use)(c.unresolvedThenable),s=e}else null===y&&(0,i.use)(c.unresolvedThenable),s=y;let b=s;return(0,u.jsx)(d.LayoutRouterContext.Provider,{value:{parentTree:e,parentCacheNode:p,parentSegmentPath:t,parentParams:l,parentLoadingData:null,debugNameContext:r,url:a,isActive:o},children:b})}function C({loading:e,children:t}){let r=(0,i.use)(d.LayoutRouterContext);return null===r?t:(0,u.jsx)(d.LayoutRouterContext.Provider,{value:{parentTree:r.parentTree,parentCacheNode:r.parentCacheNode,parentSegmentPath:r.parentSegmentPath,parentParams:r.parentParams,parentLoadingData:e,debugNameContext:r.debugNameContext,url:r.url,isActive:r.isActive},children:t})}function R({name:e,loading:t,children:r}){if(null!==t){let n=t[0],l=t[1],a=t[2];return(0,u.jsx)(i.Suspense,{name:e,fallback:(0,u.jsxs)(u.Fragment,{children:[l,a,n]}),children:r})}return(0,u.jsx)(u.Fragment,{children:r})}function S({parallelRouterKey:e,error:t,errorStyles:r,errorScripts:n,templateStyles:l,templateScripts:a,template:o,notFound:s,forbidden:p,unauthorized:g,segmentViewBoundaries:v}){let P=(0,i.useContext)(d.LayoutRouterContext);if(!P)throw Object.defineProperty(Error("invariant expected layout router to be mounted"),"__NEXT_ERROR_CODE",{value:"E56",enumerable:!1,configurable:!0});let{parentTree:j,parentCacheNode:C,parentSegmentPath:T,parentParams:M,parentLoadingData:E,url:N,isActive:F,debugNameContext:A}=P,B=j[0],L=null===T?[e]:T.concat([B,e]),D=j[1][e],w=C.slots;(void 0===D||null===w)&&(0,i.use)(c.unresolvedThenable);let H=D[0],k=w[e]??null,U=(0,b.createRouterCacheKey)(H,!0),I=(0,h.useRouterBFCache)(D,k,U),V=[];do{let e=I.tree,i=I.cacheNode,c=I.stateKey,b=e[0],h=M;if(Array.isArray(b)){let e=b[0],t=b[1],r=b[2],n=(0,_.getParamValueFromCacheKey)(t,r);null!==n&&(h={...M,[e]:n})}let v=function(e){if("/"===e)return"/";if("string"==typeof e)if("(__SLOT__)"===e)return;else return e+"/";return e[1]+"/"}(b),P=v??A,j=void 0===v?void 0:A,C=(0,u.jsxs)(x,{cacheNode:i,children:[(0,u.jsx)(f.ErrorBoundary,{errorComponent:t,errorStyles:r,errorScripts:n,children:(0,u.jsx)(R,{name:j,loading:E,children:(0,u.jsx)(y.HTTPAccessFallbackBoundary,{notFound:s,forbidden:p,unauthorized:g,children:(0,u.jsxs)(m.RedirectBoundary,{children:[(0,u.jsx)(O,{url:N,tree:e,params:h,cacheNode:i,segmentPath:L,debugNameContext:P,isActive:F&&c===U}),null]})})})}),null]}),S=(0,u.jsxs)(d.TemplateContext.Provider,{value:C,children:[l,a,o]},c);V.push(S),I=I.next}while(null!==I)return V}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},37457,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return u}});let n=e.r(90809),l=e.r(43476),a=n._(e.r(71645)),o=e.r(8372);function u(){let e=(0,a.useContext)(o.TemplateContext);return(0,l.jsx)(l.Fragment,{children:e})}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},6831,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"createRenderParamsFromClient",{enumerable:!0,get:function(){return l}});let n=new WeakMap;function l(e){let t=n.get(e);if(t)return t;let r=Promise.resolve(e);return n.set(e,r),r}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},14193,(e,t,r)=>{"use strict";e.i(47167),Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"createRenderParamsFromClient",{enumerable:!0,get:function(){return n}});let n=e.r(6831).createRenderParamsFromClient;("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},93504,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"createRenderSearchParamsFromClient",{enumerable:!0,get:function(){return l}});let n=new WeakMap;function l(e){let t=n.get(e);if(t)return t;let r=Promise.resolve(e);return n.set(e,r),r}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},66996,(e,t,r)=>{"use strict";e.i(47167),Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"createRenderSearchParamsFromClient",{enumerable:!0,get:function(){return n}});let n=e.r(93504).createRenderSearchParamsFromClient;("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},15783,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={createClientParams:function(){return a.createRenderParamsFromClient},createClientSearchParams:function(){return o.createRenderSearchParamsFromClient}};for(var l in n)Object.defineProperty(r,l,{enumerable:!0,get:n[l]});let a=e.r(14193),o=e.r(66996);("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},27201,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"IconMark",{enumerable:!0,get:function(){return l}});let n=e.r(43476),l=()=>"u">typeof window?null:(0,n.jsx)("meta",{name:"«nxt-icon»"})},91915,(e,t,r)=>{"use strict";function n(e,t={}){if(t.onlyHashChange)return void e();let r=document.documentElement;if("smooth"!==r.dataset.scrollBehavior)return void e();let l=r.style.scrollBehavior;r.style.scrollBehavior="auto",t.dontForceLayout||r.getClientRects(),e(),r.style.scrollBehavior=l}e.i(47167),Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"disableSmoothScrollDuringRouteTransition",{enumerable:!0,get:function(){return n}})}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,42175,e=>{"use strict";var t=e.i(95187);let r=(0,t.createServerReference)("002b3cc50212764fbf57f8ead598d92ef778ab1cb4",t.callServer,void 0,t.findSourceMapURL,"getTelemetryConfig");e.s(["getTelemetryConfig",0,r])},97917,e=>{"use strict";var t=e.i(71645),r=e.i(9969);let n=/\b[\w-]+-extension:\/\//i;function o(e){return"app"===function({stack:e,filename:t,appOrigin:r}){let o=[t,e].filter(Boolean).join("\n");return o.trim()?n.test(o)?"extension":r&&o.includes(r)?"app":"unknown":"unknown"}(e)}e.s(["GlobalErrorListeners",0,function(){return(0,t.useEffect)(()=>{let e=e=>{o({stack:e.error?.stack,filename:e.filename,appOrigin:window.location.origin})&&(0,r.captureClientEvent)("unhandled_exception",{error_message:e.message,error_name:e.error?.name,error_filename:e.filename,error_lineno:e.lineno,error_colno:e.colno})},t=e=>{let t=e.reason;o({stack:t instanceof Error?t.stack:void 0,appOrigin:window.location.origin})&&(0,r.captureClientEvent)("unhandled_rejection",{error_message:t instanceof Error?t.message:String(t),error_name:t instanceof Error?t.name:void 0})};return window.addEventListener("error",e),window.addEventListener("unhandledrejection",t),()=>{window.removeEventListener("error",e),window.removeEventListener("unhandledrejection",t)}},[]),null}],97917)},55574,e=>{"use strict";var t=e.i(43476),r=e.i(71645);let n=[],o=0,a=new Set;function i(){for(let e of a)e()}function s(e){return a.add(e),()=>a.delete(e)}function l(){return n}function u({message:e}){let[n,o]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{requestAnimationFrame(()=>o(!0));let e=setTimeout(()=>o(!1),2e3);return()=>clearTimeout(e)},[]),(0,t.jsx)("div",{className:`bg-card border border-border text-foreground text-sm px-4 py-2 rounded-lg shadow-lg transition-opacity duration-300 ${n?"opacity-100":"opacity-0"}`,children:e})}e.s(["Toaster",0,function(){let e=(0,r.useSyncExternalStore)(s,l,l);return(0,t.jsx)("div",{className:"fixed bottom-4 right-4 z-50 flex flex-col gap-2",children:e.map(e=>(0,t.jsx)(u,{message:e.message},e.id))})},"toast",0,function(e){let t=o++;n=[...n,{id:t,message:e}],i(),setTimeout(()=>{n=n.filter(e=>e.id!==t),i()},2500)}])},63780,e=>{"use strict";var t=e.i(43476),r=e.i(22016),n=e.i(18566),o=e.i(66794),a=e.i(71645),i=e.i(56420);let s={name:"git-branch",size:24,node:[["path",{d:"M15 6a9 9 0 0 0-9 9V3",key:"1cii5b"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}]]};s.node;let l=(0,i.default)(s);var u=e.i(16327);let c={name:"star",size:24,node:[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]]};c.node;let d=(0,i.default)(c),f={name:"book-open",size:24,node:[["path",{d:"M12 5v16",key:"1f6ucr"}],["path",{d:"M20.001 19A2 2 0 0022 17V5a2 2 0 00-1.999-2L16 3.002A5 5 0 0012 5a5 5 0 00-4-2H4a2 2 0 00-2 2v12a2 2 0 001.999 2H8a5 5 0 014 2 5 5 0 014-2z",key:"1fyvmf"}]]};f.node;let h=(0,i.default)(f),p={name:"message-circle",size:24,node:[["path",{d:"M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719",key:"1sd12s"}]]};p.node;let m=(0,i.default)(p),g={name:"messages-square",size:24,node:[["path",{d:"M16 10a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 14.286V4a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z",key:"1n2ejm"}],["path",{d:"M20 9a2 2 0 0 1 2 2v10.286a.71.71 0 0 1-1.212.502l-2.202-2.202A2 2 0 0 0 17.172 19H10a2 2 0 0 1-2-2v-1",key:"1qfcsi"}]]};g.node;let b=(0,i.default)(g),v={name:"message-square-warning",size:24,node:[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}],["path",{d:"M12 15h.01",key:"q59x07"}],["path",{d:"M12 7v4",key:"xawao1"}]]};v.node;let y=(0,i.default)(v);var x=e.i(67881);let w="failproofai@exosphere.host",j=[{label:"Star us on GitHub",icon:d,href:"https://github.com/failproofai/failproofai",color:"#f5c842",bg:"rgba(245,200,66,0.08)"},{label:"Documentation",icon:h,href:"https://docs.befailproof.ai/introduction",color:"#60a5fa",bg:"rgba(96,165,250,0.08)"},{label:"Join our Discord",icon:m,href:"https://discord.befailproof.ai/",color:"#5865f2",bg:"rgba(88,101,242,0.08)"},{label:"Join r/failproofai",icon:b,href:"https://www.reddit.com/r/failproofai/",color:"#ff4500",bg:"rgba(255,69,0,0.08)"},{label:"Feedback & Issues",icon:y,href:"https://github.com/FailproofAI/failproofai/issues/new/choose",color:"#34d399",bg:"rgba(52,211,153,0.08)"}],k=()=>{let[e,r]=(0,a.useState)(!1),n=(0,a.useCallback)(()=>r(!1),[]),o=(0,a.useCallback)(e=>{"Escape"===e.key&&r(!1)},[]);return(0,t.jsxs)("div",{className:"relative",onKeyDown:o,children:[e&&(0,t.jsx)("div",{className:"fixed inset-0 z-40",onClick:n,"aria-hidden":"true"}),(0,t.jsxs)(x.Button,{type:"button",variant:"ghost",size:"sm",onClick:()=>r(e=>!e),"aria-expanded":e,"aria-haspopup":"true",className:"relative z-50 flex items-center gap-1.5 text-muted-foreground hover:text-foreground",children:[(0,t.jsx)(l,{className:"h-4 w-4"}),(0,t.jsx)("span",{className:"hidden sm:inline text-xs whitespace-nowrap",children:"Reach Us"}),(0,t.jsx)(u.ChevronDown,{className:`h-3 w-3 transition-transform ${e?"rotate-180":""}`})]}),e&&(0,t.jsxs)("div",{className:"absolute right-0 mt-2 w-60 rounded-lg border border-border bg-card shadow-xl z-50",role:"menu",style:{boxShadow:"0 8px 32px rgba(0,0,0,0.45), 0 0 0 1px rgba(255,255,255,0.04)"},children:[(0,t.jsxs)("div",{className:"px-3 py-2.5 border-b border-border",style:{background:"linear-gradient(135deg, rgba(236,72,153,0.12) 0%, rgba(139,92,246,0.08) 100%)"},children:[(0,t.jsx)("p",{className:"text-xs font-semibold",style:{color:"#e879f9",letterSpacing:"0.06em"},children:"Reach Developers"}),(0,t.jsx)("p",{className:"text-[0.65rem] text-muted-foreground mt-0.5",children:"We'd love to hear from you"})]}),(0,t.jsx)("div",{className:"py-1",children:j.map(({label:e,icon:r,href:o,color:a,bg:i})=>(0,t.jsxs)("a",{href:o,target:"_blank",rel:"noopener noreferrer",role:"menuitem",className:"flex items-center gap-2.5 px-3 py-2 text-xs transition-colors",style:{color:"var(--muted-foreground)"},onMouseEnter:e=>{e.currentTarget.style.background=i,e.currentTarget.style.color=a},onMouseLeave:e=>{e.currentTarget.style.background="",e.currentTarget.style.color=""},onClick:n,children:[(0,t.jsx)(r,{className:"h-3.5 w-3.5 flex-shrink-0",style:{color:a}}),e]},e))}),(0,t.jsx)("div",{className:"px-3 py-2 border-t border-border",style:{background:"rgba(0,0,0,0.2)"},children:(0,t.jsxs)("p",{className:"text-[0.65rem] text-muted-foreground",children:["or email"," ",(0,t.jsx)("a",{href:`mailto:${w}`,className:"transition-colors",style:{color:"#e879f9"},onMouseEnter:e=>e.currentTarget.style.opacity="0.75",onMouseLeave:e=>e.currentTarget.style.opacity="1",children:w})]})})]})]})},N={name:"refresh-cw",size:24,node:[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]};N.node;let S=(0,i.default)(N);var C=e.i(47163),E=e.i(85881);let _=[{label:"Off",value:0},{label:"5s",value:5},{label:"10s",value:10},{label:"30s",value:30}];function P({className:e}){let r=(0,n.useRouter)(),[o,i]=(0,a.useTransition)(),{intervalSec:s,setIntervalSec:l}=(0,E.useAutoRefresh)(),u=(0,a.useCallback)(()=>{i(()=>r.refresh())},[r]);(0,a.useEffect)(()=>{if(s<=0)return;let e=setInterval(u,1e3*s);return()=>clearInterval(e)},[s,u]);let c=s>0;return(0,t.jsxs)("div",{className:(0,C.cn)("inline-flex items-center rounded-lg border border-border bg-muted/50 p-0.5 gap-0.5",e),children:[(0,t.jsx)("button",{onClick:u,title:"Refresh",className:(0,C.cn)("inline-flex items-center justify-center rounded-md p-1.5 transition-colors",c?"text-primary hover:bg-primary/10":"text-muted-foreground hover:text-foreground hover:bg-muted"),children:(0,t.jsx)(S,{className:(0,C.cn)("w-3.5 h-3.5",o&&"animate-spin")})}),(0,t.jsx)("div",{className:"w-px h-4 bg-border"}),(0,t.jsx)("div",{className:"inline-flex items-center gap-0.5",role:"group","aria-label":"Auto-refresh interval",children:_.map(e=>(0,t.jsx)("button",{onClick:()=>l(e.value),"aria-pressed":s===e.value,className:(0,C.cn)("px-2 py-1 text-[11px] font-medium rounded-md transition-colors",s===e.value?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground hover:bg-muted"),children:e.label},e.value))})]})}var T=e.i(12344);let R=[{href:"/projects",label:"projects"},{href:"/policies",label:"policies"},{href:"/audit",label:"audit"}];e.s(["Navbar",0,({disabledPages:e=[]})=>{let a=(0,n.usePathname)(),{capture:i}=(0,T.usePostHog)(),s=a.startsWith("/policies")?"policies":a.startsWith("/audit")?"audit":a.startsWith("/settings")?"settings":a.startsWith("/projects")||a.startsWith("/project/")?"projects":"";return(0,t.jsxs)("header",{className:"app-header",children:[(0,t.jsx)("a",{href:"https://github.com/failproofai/failproofai",target:"_blank",rel:"noopener noreferrer",className:"h-brand",style:{flex:"none"},"aria-label":"failproof ai · GitHub",children:(0,t.jsx)("img",{src:"/logo.svg",alt:"failproof_ai",style:{height:18,display:"block",flexShrink:0}})}),(0,t.jsx)("nav",{className:"tabs",style:{border:"none",padding:0,gap:0},children:R.filter(({href:t})=>{let r=t.slice(1);return!e.includes(r)}).map(({href:e,label:n})=>{let o="/projects"===e?"/projects"===a||a.startsWith("/project/"):a.startsWith(e);return(0,t.jsx)(r.default,{href:e,className:`tab${o?" is-active":""}`,"aria-current":o?"page":void 0,onClick:()=>{"/audit"===e&&i("audit_nav_clicked",{from_path:a,is_active_tab:o})},children:n},e)})}),(0,t.jsx)("div",{style:{flex:1}}),(0,t.jsxs)("div",{className:"h-meta",children:[(0,t.jsxs)("span",{className:"h-version",children:["v","1.0.10"]}),s&&(0,t.jsx)("span",{className:"h-brand-sep","aria-hidden":"true",children:"·"}),s&&(0,t.jsx)("span",{className:"h-brand-section",children:s})]}),(0,t.jsxs)("div",{className:"h-actions",children:[(0,t.jsx)(P,{}),(0,t.jsx)("span",{style:{width:1,height:18,background:"var(--line)",margin:"0 6px"}}),!e.includes("settings")&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(r.default,{href:"/settings",className:`h-icon-btn${a.startsWith("/settings")?" is-active":""}`,"aria-label":"settings","aria-current":a.startsWith("/settings")?"page":void 0,title:"settings",children:(0,t.jsx)(o.Settings,{className:"w-3.5 h-3.5",strokeWidth:1.75,"aria-hidden":"true"})}),(0,t.jsx)("span",{style:{width:1,height:18,background:"var(--line)",margin:"0 6px"}})]}),(0,t.jsx)(k,{})]})]})}],63780)},67881,e=>{"use strict";var t=e.i(43476),r=e.i(71645),n=e.i(47163);let o=r.forwardRef(({className:e,variant:r="default",size:o="default",...a},i)=>(0,t.jsx)("button",{className:(0,n.cn)("inline-flex items-center justify-center rounded-md text-sm font-medium transition-[background-color,color,box-shadow,border-color] duration-150 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background disabled:opacity-50 disabled:pointer-events-none",{"bg-primary text-primary-foreground hover:bg-primary/90 hover:shadow-[0_0_0_1px_var(--primary)]":"default"===r,"text-foreground hover:bg-muted":"ghost"===r,"border border-border bg-transparent hover:border-primary/60 hover:bg-card":"outline"===r,"h-10 py-2 px-4":"default"===o,"h-10 w-10":"icon"===o,"h-9 px-3":"sm"===o,"h-11 px-8":"lg"===o},e),ref:i,...a}));o.displayName="Button",e.s(["Button",0,o])},85881,e=>{"use strict";var t=e.i(43476),r=e.i(71645);let n=(0,r.createContext)(void 0);e.s(["AutoRefreshProvider",0,function({children:e}){let[o,a]=(0,r.useState)(0);return(0,t.jsx)(n.Provider,{value:{intervalSec:o,setIntervalSec:a},children:e})},"useAutoRefresh",0,function(){let e=(0,r.useContext)(n);if(!e)throw Error("useAutoRefresh must be used within AutoRefreshProvider");return e}])},12344,e=>{"use strict";var t=e.i(43476),r=e.i(71645),n=e.i(18566),o=e.i(42175),a=e.i(9969);let i=(0,r.createContext)(void 0);e.s(["PostHogProvider",0,function({children:e}){let s=(0,n.usePathname)(),l=(0,r.useRef)(null),u=(0,r.useRef)(!1);(0,r.useEffect)(()=>{let e=!1;return(0,o.getTelemetryConfig)().then(t=>{e||((0,a.setClientTelemetryConfig)(t),u.current=!0,(0,a.captureClientEvent)("$pageview"),l.current=window.location.pathname)}),()=>{e=!0}},[]),(0,r.useEffect)(()=>{u.current&&l.current!==s&&(l.current=s,(0,a.captureClientEvent)("$pageview"))},[s]);let c=r.default.useCallback((e,t)=>{(0,a.captureClientEvent)(e,t)},[]);return(0,t.jsx)(i.Provider,{value:{capture:c},children:e})},"usePostHog",0,function(){let e=(0,r.useContext)(i);if(void 0===e)throw Error("usePostHog must be used within a PostHogProvider");return e}])},9969,e=>{"use strict";let t=null;e.s(["captureClientEvent",0,function(e,r){if(!t||!t.enabled)return;let n=JSON.stringify({api_key:t.apiKey,event:e,distinct_id:t.distinctId,properties:{...r,$lib:"failproofai-web",failproofai_version:t.version,product:"failproofai-oss",$current_url:window.location.href,$pathname:window.location.pathname}});fetch(t.host.replace(/\/+$/,"")+"/capture/",{method:"POST",headers:{"Content-Type":"application/json"},body:n,keepalive:!0,signal:AbortSignal.timeout(5e3)}).catch(()=>{})},"setClientTelemetryConfig",0,function(e){t=e}],9969)},5014,e=>{"use strict";var t=e.i(71645);let r=(...e)=>e.filter((e,t,r)=>!!e&&""!==e.trim()&&r.indexOf(e)===t).join(" ").trim(),n={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"},o=(0,t.createContext)({}),a=(0,t.forwardRef)(({color:e,size:a,width:i,height:s,strokeWidth:l,absoluteStrokeWidth:u,nonScalingStroke:c,className:d="",children:f,iconNode:h=[],icon:p={node:h,aliases:[],size:24},...m},g)=>{let{size:b=24,strokeWidth:v=2,absoluteStrokeWidth:y=!1,nonScalingStroke:x=!1,color:w="currentColor",className:j=""}=(0,t.useContext)(o)??{},k=!!f||(e=>{for(let t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0;return!1})(m),[N,S,C=[]]=function(e,t={}){return function(e,t={}){let o=t.attributeNames??{},a=e=>o[e]??e,i=e.size??e.width??n.width,s=e.size??e.height??n.height,l=e.aliases?.filter(e=>"string"==typeof e&&""!==e.trim()).map(e=>`lucide-${e}`)??[],u=[...e.name?[`lucide-${e.name}`]:[],...l],c=t.className?.split(" ").filter(Boolean)??[],d=!1===t.includeDefaultClasses?r(...c):r("lucide",...u,...c),f=t.absoluteStrokeWidth?Number(t.strokeWidth??n["stroke-width"])*Number(e.size??e.width??n.width)/Number(t.size??t.width??n.width):t.strokeWidth??n["stroke-width"];return["svg",{...Object.entries(n).reduce((e,[t,r])=>(e[a(t)]=r,e),{}),..."color"in t&&t.color&&{[a("stroke")]:t.color},..."size"in t&&null!=t.size&&{[a("width")]:t.size,[a("height")]:t.size},..."width"in t&&null!=t.width&&{[a("width")]:t.width},..."height"in t&&null!=t.height&&{[a("height")]:t.height},[a("stroke-width")]:f,...d&&{[a("class")]:d},[a("viewBox")]:`0 0 ${i} ${s}`,...!1===t.hasA11yProp?{[a("aria-hidden")]:"true"}:{},..."attributes"in t&&t.attributes},e.node.map(e=>{let[r,n,o]=e,i=t.nonScalingStroke?{[a("vector-effect")]:"non-scaling-stroke",...n}:n;return o?[r,i,o]:[r,i]})]}(e,{...t,attributeNames:{...t.attributeNames,class:"className","stroke-width":"strokeWidth","stroke-linecap":"strokeLinecap","stroke-linejoin":"strokeLinejoin","vector-effect":"vectorEffect"}})}(p,{color:e??w,width:i??a??b,height:s??a??b,strokeWidth:l??v,absoluteStrokeWidth:u??y,nonScalingStroke:c??x,className:r(j,d),hasA11yProp:k,attributes:m});return(0,t.createElement)(N,{ref:g,...S},[...C.map(([e,r])=>(0,t.createElement)(e,r)),...Array.isArray(f)?f:[f]])});e.s(["default",0,a],5014)},56420,e=>{"use strict";var t=e.i(71645),r=e.i(5014);e.s(["default",0,function(e,n=[],o=[]){let a,i="string"==typeof e?function(e,t,r=[]){if(null==t)throw Error("[lucide]: iconNode is required when icon name is used");return{name:e?.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),size:24,node:t,...r.length>0?{aliases:r}:{}}}(e,n,o):e,s=(0,t.forwardRef)(({className:e,...n},o)=>(0,t.createElement)(r.default,{ref:o,icon:i,className:e,...n}));return i.name&&(s.displayName=(a=(e=>{let t="",r=!1;for(let n of e){if("-"===n||"_"===n||n<=" "){r=t.length>0;continue}0===t.length?t+=n.toLowerCase():t+=r?n.toUpperCase():n,r=!1}return t})(i.name)).charAt(0).toUpperCase()+a.slice(1)),s}],56420)},16327,e=>{"use strict";var t=e.i(56420);let r={name:"chevron-down",size:24,node:[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]};r.node;let n=(0,t.default)(r);e.s(["ChevronDown",0,n],16327)},66794,e=>{"use strict";var t=e.i(56420);let r={name:"settings",size:24,node:[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]};r.node;let n=(0,t.default)(r);e.s(["Settings",0,n],66794)},95187,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={callServer:function(){return a.callServer},createServerReference:function(){return s.createServerReference},findSourceMapURL:function(){return i.findSourceMapURL}};for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]});let a=e.r(32120),i=e.r(92245),s=e.r(35326)},22016,(e,t,r)=>{"use strict";e.i(47167),Object.defineProperty(r,"__esModule",{value:!0});var n={default:function(){return b},useLinkStatus:function(){return y}};for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]});let a=e.r(90809),i=e.r(43476),s=a._(e.r(71645)),l=e.r(95057),u=e.r(8372),c=e.r(18581),d=e.r(18967),f=e.r(5550),h=e.r(88540),p=e.r(91949),m=e.r(73668),g=e.r(9396);function b(t){var r;let n,o,a,[b,y]=(0,s.useOptimistic)(p.IDLE_LINK_STATUS),x=(0,s.useRef)(null),{href:w,as:j,children:k,prefetch:N=null,passHref:S,replace:C,shallow:E,scroll:_,onClick:P,onMouseEnter:T,onTouchStart:R,legacyBehavior:O=!1,onNavigate:A,transitionTypes:M,ref:L,unstable_dynamicOnHover:z,...$}=t;n=k,O&&("string"==typeof n||"number"==typeof n)&&(n=(0,i.jsx)("a",{children:n}));let U=s.default.useContext(u.AppRouterContext),I=!1!==N,W=!1===N?"none":!0===N?"full":"auto",B="none"!==W?"auto"===W?g.FetchStrategy.PPR:g.FetchStrategy.Full:g.FetchStrategy.PPR,D="string"==typeof(r=j||w)?r:(0,l.formatUrl)(r);if(O){if(n?.$$typeof===Symbol.for("react.lazy"))throw Object.defineProperty(Error("`<Link legacyBehavior>` received a direct child that is either a Server Component, or JSX that was loaded with React.lazy(). This is not supported. Either remove legacyBehavior, or make the direct child a Client Component that renders the Link's `<a>` tag."),"__NEXT_ERROR_CODE",{value:"E863",enumerable:!1,configurable:!0});o=s.default.Children.only(n)}let F=O?o&&"object"==typeof o&&o.ref:L,H,q=s.default.useCallback(e=>(null!==U&&(x.current=(0,p.mountLinkInstance)(e,D,U,B,I,y,H)),()=>{x.current&&((0,p.unmountLinkForCurrentNavigation)(x.current),x.current=null),(0,p.unmountPrefetchableInstance)(e)}),[I,D,U,B,y,H]),K={ref:(0,c.useMergedRef)(q,F),onClick(t){O||"function"!=typeof P||P(t),O&&o.props&&"function"==typeof o.props.onClick&&o.props.onClick(t),!U||t.defaultPrevented||function(t,r,n,o,a,i,l,u="none"){if("u">typeof window){let c,{nodeName:d}=t.currentTarget;if("A"===d.toUpperCase()&&((c=t.currentTarget.getAttribute("target"))&&"_self"!==c||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.nativeEvent&&2===t.nativeEvent.which)||t.currentTarget.hasAttribute("download"))return;if(!(0,m.isLocalURL)(r)){o&&(t.preventDefault(),location.replace(r));return}if(t.preventDefault(),i){let e=!1;if(i({preventDefault:()=>{e=!0}}),e)return}let{dispatchNavigateAction:f}=e.r(99781);s.default.startTransition(()=>{f(r,o?"replace":"push",!1===a?h.ScrollBehavior.NoScroll:h.ScrollBehavior.Default,n.current,l,u)})}}(t,D,x,C,_,A,M,W)},onMouseEnter(e){O||"function"!=typeof T||T(e),O&&o.props&&"function"==typeof o.props.onMouseEnter&&o.props.onMouseEnter(e),U&&I&&(0,p.onNavigationIntent)(e.currentTarget,!0===z)},onTouchStart:function(e){O||"function"!=typeof R||R(e),O&&o.props&&"function"==typeof o.props.onTouchStart&&o.props.onTouchStart(e),U&&I&&(0,p.onNavigationIntent)(e.currentTarget,!0===z)}};return(0,d.isAbsoluteUrl)(D)?K.href=D:O&&!S&&("a"!==o.type||"href"in o.props)||(K.href=(0,f.addBasePath)(D)),a=O?s.default.cloneElement(o,K):(0,i.jsx)("a",{...$,...K,children:n}),(0,i.jsx)(v.Provider,{value:b,children:a})}let v=(0,s.createContext)(p.IDLE_LINK_STATUS),y=()=>(0,s.useContext)(v);("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},18581,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"useMergedRef",{enumerable:!0,get:function(){return o}});let n=e.r(71645);function o(e,t){let r=(0,n.useRef)(null),o=(0,n.useRef)(null);return(0,n.useCallback)(n=>{if(null===n){let e=r.current;e&&(r.current=null,e());let t=o.current;t&&(o.current=null,t())}else e&&(r.current=a(e,n)),t&&(o.current=a(t,n))},[e,t])}function a(e,t){if("function"!=typeof e)return e.current=t,()=>{e.current=null};{let r=e(t);return"function"==typeof r?r:()=>e(null)}}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},18967,(e,t,r)=>{"use strict";e.i(47167),Object.defineProperty(r,"__esModule",{value:!0});var n={DecodeError:function(){return b},MiddlewareNotFoundError:function(){return w},MissingStaticPage:function(){return x},NormalizeError:function(){return v},PageNotFoundError:function(){return y},SP:function(){return m},ST:function(){return g},WEB_VITALS:function(){return a},execOnce:function(){return i},getDisplayName:function(){return d},getLocationOrigin:function(){return u},getURL:function(){return c},isAbsoluteUrl:function(){return l},isResSent:function(){return f},loadGetInitialProps:function(){return p},normalizeRepeatedSlashes:function(){return h},stringifyError:function(){return j}};for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]});let a=["CLS","FCP","FID","INP","LCP","TTFB"];function i(e){let t,r=!1;return(...n)=>(r||(r=!0,t=e(...n)),t)}let s=/^[a-zA-Z][a-zA-Z\d+\-.]*?:/,l=e=>{let t=e.charCodeAt(0);return!!(t>=65&&t<=90||t>=97&&t<=122)&&s.test(e)};function u(){let{protocol:e,hostname:t,port:r}=window.location;return`${e}//${t}${r?":"+r:""}`}function c(){let{href:e}=window.location,t=u();return e.substring(t.length)}function d(e){return"string"==typeof e?e:e.displayName||e.name||"Unknown"}function f(e){return e.finished||e.headersSent}function h(e){let t=e.split("?");return t[0].replace(/\\/g,"/").replace(/\/\/+/g,"/")+(t[1]?`?${t.slice(1).join("?")}`:"")}async function p(e,t){let r=t.res||t.ctx&&t.ctx.res;if(!e.getInitialProps)return t.ctx&&t.Component?{pageProps:await p(t.Component,t.ctx)}:{};let n=await e.getInitialProps(t);if(r&&f(r))return n;if(!n)throw Object.defineProperty(Error(`"${d(e)}.getInitialProps()" should resolve to an object. But found "${n}" instead.`),"__NEXT_ERROR_CODE",{value:"E1025",enumerable:!1,configurable:!0});return n}let m="u">typeof performance,g=m&&["mark","measure","getEntriesByName"].every(e=>"function"==typeof performance[e]);class b extends Error{}class v extends Error{}class y extends Error{constructor(e){super(),this.code="ENOENT",this.name="PageNotFoundError",this.message=`Cannot find module for page: ${e}`}}class x extends Error{constructor(e,t){super(),this.message=`Failed to load static file for page: ${e} ${t}`}}class w extends Error{constructor(){super(),this.code="ENOENT",this.message="Cannot find the middleware module"}}function j(e){return JSON.stringify({message:e.message,stack:e.stack})}},73668,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"isLocalURL",{enumerable:!0,get:function(){return a}});let n=e.r(18967),o=e.r(52817);function a(e){if(!(0,n.isAbsoluteUrl)(e))return!0;try{let t=(0,n.getLocationOrigin)(),r=new URL(e,t);return r.origin===t&&(0,o.hasBasePath)(r.pathname)}catch(e){return!1}}},98183,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={assign:function(){return l},searchParamsToUrlQuery:function(){return a},urlQueryToSearchParams:function(){return s}};for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]});function a(e){let t={};for(let[r,n]of e.entries()){let e=t[r];void 0===e?t[r]=n:Array.isArray(e)?e.push(n):t[r]=[e,n]}return t}function i(e){return"string"==typeof e?e:("number"!=typeof e||isNaN(e))&&"boolean"!=typeof e?"":String(e)}function s(e){let t=new URLSearchParams;for(let[r,n]of Object.entries(e))if(Array.isArray(n))for(let e of n)t.append(r,i(e));else t.set(r,i(n));return t}function l(e,...t){for(let r of t){for(let t of r.keys())e.delete(t);for(let[t,n]of r.entries())e.append(t,n)}return e}},95057,(e,t,r)=>{"use strict";e.i(47167),Object.defineProperty(r,"__esModule",{value:!0});var n={formatUrl:function(){return s},formatWithValidation:function(){return u},urlObjectKeys:function(){return l}};for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]});let a=e.r(90809)._(e.r(98183)),i=/https?|ftp|gopher|file/;function s(e){let{auth:t,hostname:r}=e,n=e.protocol||"",o=e.pathname||"",s=e.hash||"",l=e.query||"",u=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?u=t+e.host:r&&(u=t+(~r.indexOf(":")?`[${r}]`:r),e.port&&(u+=":"+e.port)),l&&"object"==typeof l&&(l=String(a.urlQueryToSearchParams(l)));let c=e.search||l&&`?${l}`||"";return n&&!n.endsWith(":")&&(n+=":"),e.slashes||(!n||i.test(n))&&!1!==u?(u="//"+(u||""),o&&"/"!==o[0]&&(o="/"+o)):u||(u=""),s&&"#"!==s[0]&&(s="#"+s),c&&"?"!==c[0]&&(c="?"+c),o=o.replace(/[?#]/g,encodeURIComponent),c=c.replace("#","%23"),`${n}${u}${o}${c}${s}`}let l=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function u(e){return s(e)}},18566,(e,t,r)=>{t.exports=e.r(76562)}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,43418,e=>{"use strict";var t=e.i(43476),r=e.i(24578);e.s(["CliBadge",0,function({cli:e}){let a=(0,r.getCliLabel)(e),n=(0,r.getCliBadgeClasses)(e);return(0,t.jsx)("span",{className:`inline-flex items-center rounded px-1.5 py-0.5 text-[0.6rem] font-mono font-medium uppercase tracking-wider border ${n}`,title:`Agent CLI: ${a}`,children:a})}])},73520,e=>{"use strict";var t=e.i(43476),r=e.i(24071),a=e.i(67927);e.s(["default",0,function({currentPage:e,totalPages:n,onPageChange:l}){if(n<=1)return null;let o=e=>`px-3 py-2 text-sm rounded-md transition-colors flex items-center gap-1 bg-muted text-muted-foreground ${e?"opacity-50 cursor-not-allowed":"hover:bg-muted/80"}`;return(0,t.jsxs)("div",{className:"flex items-center justify-center gap-2 py-4",children:[(0,t.jsxs)("button",{onClick:()=>l(e-1),disabled:1===e,className:o(1===e),"aria-label":"Previous page",children:[(0,t.jsx)(r.ChevronLeft,{className:"w-4 h-4"}),(0,t.jsx)("span",{className:"hidden sm:inline",children:"Previous"})]}),(0,t.jsx)("div",{className:"flex items-center gap-1",children:(()=>{if(n<=7)return Array.from({length:n},(e,t)=>t+1);let t=[1],r=Math.max(2,e-1),a=Math.min(n-1,e+1);e<=3&&(a=Math.min(5,n-1)),e>=n-2&&(r=Math.max(2,n-4)),r>2&&t.push("ellipsis-start");for(let e=r;e<=a;e++)t.push(e);return a<n-1&&t.push("ellipsis-end"),t.push(n),t})().map(r=>"string"==typeof r?(0,t.jsx)("span",{className:"px-2 text-muted-foreground",children:"..."},r):(0,t.jsx)("button",{onClick:()=>l(r),className:`min-w-[2.5rem] px-3 py-2 text-sm rounded-md transition-colors ${e===r?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground hover:bg-muted/80"}`,"aria-label":`Page ${r}`,"aria-current":e===r?"page":void 0,children:r},r))}),(0,t.jsxs)("button",{onClick:()=>l(e+1),disabled:e===n,className:o(e===n),"aria-label":"Next page",children:[(0,t.jsx)("span",{className:"hidden sm:inline",children:"Next"}),(0,t.jsx)(a.ChevronRight,{className:"w-4 h-4"})]})]})}])},62481,e=>{"use strict";var t=e.i(43476),r=e.i(71645),a=e.i(43418);e.i(61851),e.i(41790);let n=/^[a-z]{2,}:/;function l(e){return!!e&&n.test(e)}var o=e.i(62706),s=e.i(20087),i=e.i(30005),d=e.i(80060),c=e.i(2711),u=e.i(24578);function m(e,t,r){return{key:e,label:t,depth:r,children:new Map,projectCount:0,lastModified:new Date(0),cli:[]}}function f(e,t){for(let r of(t.lastModified.getTime()>e.lastModified.getTime()&&(e.lastModified=t.lastModified,e.lastModifiedFormatted=t.lastModifiedFormatted),"number"==typeof t.sessionCount&&(e.sessionCount=(e.sessionCount??0)+t.sessionCount),e.projectCount+=1,t.cli))e.cli.includes(r)||e.cli.push(r)}function h(e){let t=[...e.children.values()].map(h).sort((e,t)=>t.lastModified.getTime()-e.lastModified.getTime());return{key:e.key,label:e.label,depth:e.depth,children:t,project:e.project,sessionCount:e.sessionCount,projectCount:e.projectCount,lastModified:e.lastModified,lastModifiedFormatted:e.lastModifiedFormatted,cli:e.cli}}var g=e.i(16327),p=e.i(67927),x=e.i(56420);let b={name:"folder",size:24,node:[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]};b.node;let v=(0,x.default)(b);var y=e.i(66595),C=e.i(63676),j=e.i(22016),w=e.i(73520),N=e.i(85898);function k({date:e,formatted:r}){return(0,t.jsx)("span",{children:r||(0,o.formatDate)(e)})}let M="failproofai.projects.collapsed";function T(e){try{window.localStorage.setItem(M,JSON.stringify([...e]))}catch{}}function S({node:e,collapsed:r,interactive:n,onToggle:o}){let s=e.children.length>0,i=e.project,d=r?p.ChevronRight:g.ChevronDown,c={paddingLeft:`${1.25*Math.min(e.depth,4)}rem`};return(0,t.jsxs)("tr",{className:"border-b border-border hover:bg-muted/50 transition-colors",children:[(0,t.jsx)("td",{className:"px-4 py-3",children:(0,t.jsx)("div",{style:c,children:(0,t.jsx)(v,{className:`w-5 h-5 ${s?"text-muted-foreground":"text-primary"}`})})}),(0,t.jsx)("td",{className:"px-4 py-3 max-w-md",children:(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2",style:c,children:[s?n?(0,t.jsxs)("button",{type:"button",onClick:()=>o(e.key),"aria-expanded":!r,"aria-label":`${r?"Expand":"Collapse"} ${e.label}`,className:"flex items-center gap-1 font-semibold text-foreground hover:text-primary transition-colors break-words break-all text-left",children:[(0,t.jsx)(d,{className:"w-4 h-4 shrink-0"}),e.label]}):(0,t.jsxs)("span",{className:"flex items-center gap-1 font-semibold text-foreground break-words break-all",children:[(0,t.jsx)(d,{className:"w-4 h-4 shrink-0"}),e.label]}):i?(0,t.jsx)(j.default,{href:`/project/${encodeURIComponent(i.name)}`,className:"font-semibold text-foreground hover:text-primary transition-colors break-words break-all inline-block max-w-full",children:e.depth>0?e.label:function(e,t){return l(t)?t.replace(/:/g,"/"):/^[A-Za-z]--/.test(e)?e[0]+":/"+e.slice(3).replace(/-/g,"/"):e.replace(/-/g,"/")}(i.name,i.path)}):(0,t.jsx)("span",{className:"font-semibold text-foreground",children:e.label}),e.cli.map(e=>(0,t.jsx)(a.CliBadge,{cli:e},e)),s&&void 0!==e.sessionCount&&(0,t.jsxs)("span",{className:"text-xs text-muted-foreground",children:[e.sessionCount," session",1===e.sessionCount?"":"s"]})]})}),(0,t.jsx)("td",{className:"px-4 py-3 text-sm text-muted-foreground hidden md:table-cell truncate max-w-md",children:i?i.path:""}),(0,t.jsx)("td",{className:"px-4 py-3 text-sm text-muted-foreground",children:(0,t.jsx)(k,{date:e.lastModified,formatted:e.lastModifiedFormatted})})]})}e.s(["default",0,function({folders:e}){let a=(0,d.useUrlParams)(),n=(0,r.useRef)(!1),[o,g]=(0,r.useState)(()=>(0,c.paramToKeywords)(a.get("q"))),[p,x]=(0,r.useState)(""),[b,v]=(0,r.useState)(()=>{let e=a.get("cli");return(0,u.isKnownCli)(e)?e:""}),{filterPreset:j,dateRange:k,currentPage:A,setCurrentPage:P,handlePresetChange:D,handleDateRangeChange:E,clearFilters:R}=(0,i.useFilterState)(o,{filterPreset:(0,c.paramToPreset)(a.get("preset")),dateRange:(0,c.paramsToDateRange)(a.get("from"),a.get("to")),currentPage:(0,c.paramToPage)(a.get("page"))});(0,r.useEffect)(()=>{if(!n.current){n.current=!0;return}a.setAll({preset:(0,c.presetToParam)(j),...(0,c.dateRangeToParams)(k),q:(0,c.keywordsToParam)(o),page:(0,c.pageToParam)(A),cli:b||void 0})},[j,k,o,A,b]);let I=e=>{let t=e.trim();t&&!o.includes(t)&&(g([...o,t]),x(""))},L=()=>{g([]),x("")},_=(0,r.useMemo)(()=>(0,s.rehydrateDates)(e),[e]),O=(0,r.useMemo)(()=>{let e=(0,s.filterByDate)(_,j,k);return o.length>0&&(e=e.filter(e=>{let t=e.name.toLowerCase();return o.every(e=>{let r=e.trim().toLowerCase().replace(/\//g,"-");return 0===r.length||t.includes(r)})})),b&&(e=e.filter(e=>e.cli.includes(b))),e.sort((e,t)=>t.lastModified.getTime()-e.lastModified.getTime())},[_,j,k,o,b]),$=(0,r.useMemo)(()=>(function(e){let t=new Map;for(let a of e){var r;let e,n=l(r=a.path)?r.split(":"):[];if(0===n.length){let e=m(`project:${a.name}`,a.name,0);e.project=a,f(e,a),t.set(e.key,e);continue}let o=t,s="";for(let t=0;t<n.length;t++){let r=n[t];s=0===t?r:`${s}:${r}`;let l=o.get(s);l||(l=m(s,r,t),o.set(s,l)),f(l,a),e=l,o=l.children}e&&!e.project&&(e.project=a)}return[...t.values()].map(h).sort((e,t)=>t.lastModified.getTime()-e.lastModified.getTime())})(O),[O]),F=Math.max(1,Math.ceil($.length/s.ITEMS_PER_PAGE));(0,r.useEffect)(()=>{A>F&&P(F)},[A,F,P]);let U=(A-1)*s.ITEMS_PER_PAGE,z=Math.min(U+s.ITEMS_PER_PAGE,$.length),K=(0,r.useMemo)(()=>$.slice(U,z),[$,U,z]),B=$.slice(0,U).reduce((e,t)=>e+t.projectCount,0),G=K.reduce((e,t)=>e+t.projectCount,0),[H,q]=(0,r.useState)(()=>new Set);(0,r.useEffect)(()=>{q(new Set(function(){try{let e=window.localStorage.getItem(M),t=e?JSON.parse(e):null;return Array.isArray(t)?t.filter(e=>"string"==typeof e):[]}catch{return[]}}()))},[]);let J=e=>{q(t=>{let r=new Set(t);return r.has(e)?r.delete(e):r.add(e),T(r),r})},V=o.length>0,X=(0,r.useMemo)(()=>{var e;let t,r;return e=e=>!V&&H.has(e),t=[],(r=a=>{for(let n of a)t.push(n),n.children.length>0&&!e(n.key)&&r(n.children)})(K),t},[K,H,V]),W=(0,r.useMemo)(()=>{let e,t;return e=[],(t=r=>{for(let a of r)a.children.length>0&&(e.push(a.key),t(a.children))})(K),e},[K]),Y=X.filter(e=>e.children.length>0).map(e=>e.key).some(e=>!H.has(e));return(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)("div",{className:"bg-card border border-border rounded-lg p-4",children:(0,t.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,t.jsx)("span",{className:"text-sm font-medium text-foreground",children:"Filter by:"}),s.FILTER_PRESETS.map(e=>(0,t.jsx)("button",{onClick:()=>D(e.value),className:`px-3 py-1.5 text-sm rounded-md transition-colors ${j===e.value?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground hover:bg-muted/80"}`,children:e.label},e.value)),(0,t.jsx)("span",{className:"ml-2 text-sm font-medium text-foreground",children:"CLI:"}),(0,t.jsxs)("select",{"aria-label":"Filter by CLI",value:b,onChange:e=>{let t=e.target.value;v(""===t||(0,u.isKnownCli)(t)?t:"")},className:"px-2 py-1.5 text-sm bg-input border border-border rounded-md text-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:border-transparent",children:[(0,t.jsx)("option",{value:"",children:"All CLIs"}),u.KNOWN_CLI_IDS.map(e=>(0,t.jsx)("option",{value:e,children:(0,u.getCliLabel)(e)},e))]})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(y.Search,{className:"w-4 h-4 text-muted-foreground"}),(0,t.jsx)("span",{className:"text-sm font-medium text-foreground",children:"Search Keywords:"})]}),(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("input",{type:"text",value:p,onChange:e=>x(e.target.value),onKeyDown:e=>{"Enter"===e.key&&(e.preventDefault(),I(p))},placeholder:"Enter keyword and press Enter",className:"px-3 py-2 text-sm bg-input border border-border rounded-md text-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:border-transparent transition-all hover:border-primary/50 w-[250px]","aria-label":"Add keyword"}),(0,t.jsx)("button",{onClick:()=>I(p),className:"px-3 py-2 text-sm bg-muted text-muted-foreground hover:bg-muted/80 rounded-md transition-colors","aria-label":"Add keyword",children:"Add"})]}),o.length>0&&(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[o.map((e,r)=>(0,t.jsxs)("div",{className:"flex items-center gap-1.5 px-3 py-1.5 bg-muted text-muted-foreground rounded-md text-sm",children:[(0,t.jsx)("span",{children:e}),(0,t.jsx)("button",{onClick:()=>{g(o.filter((e,t)=>t!==r))},className:"hover:text-foreground transition-colors p-0.5 rounded hover:bg-muted/80","aria-label":`Remove keyword ${e}`,children:(0,t.jsx)(C.X,{className:"w-3.5 h-3.5"})})]},r)),(0,t.jsx)("button",{onClick:L,className:"px-2 py-1.5 text-xs bg-muted text-muted-foreground hover:bg-muted/80 rounded-md transition-colors","aria-label":"Clear all keywords",children:"Clear all"})]})]})]}),(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-4",children:[(0,t.jsx)("span",{className:"text-sm font-medium text-foreground",children:"Custom Range:"}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(N.default,{id:"date-from",value:k.from,onChange:e=>E("from",e),"aria-label":"Filter from date"}),(0,t.jsx)("span",{className:"text-muted-foreground",children:"to"}),(0,t.jsx)(N.default,{id:"date-to",value:k.to,onChange:e=>E("to",e),"aria-label":"Filter to date"})]}),("all"!==j||null!==k.from||null!==k.to||o.length>0||""!==b)&&(0,t.jsx)("button",{onClick:()=>{R(),L(),v("")},className:"px-3 py-2 text-sm bg-muted text-muted-foreground hover:bg-muted/80 rounded-md transition-colors",children:"Clear"})]}),(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-1 text-sm text-muted-foreground",children:[W.length>0&&!V&&(0,t.jsx)("button",{type:"button",onClick:()=>{q(e=>{let t=new Set(e);for(let e of W)Y?t.add(e):t.delete(e);return T(t),t})},className:"text-xs text-muted-foreground hover:text-foreground underline underline-offset-2 transition-colors",children:Y?"Collapse all":"Expand all"}),0===O.length?(0,t.jsx)("span",{children:"No projects found"}):(0,t.jsxs)("span",{children:["Showing ",B+1,"-",B+G," of ",O.length," projects",O.length!==_.length&&(0,t.jsxs)("span",{className:"ml-1",children:["(filtered from ",_.length," total)"]}),o.length>0&&(0,t.jsxs)("span",{className:"ml-1",children:["with ",o.length," keyword",1!==o.length?"s":""]})]})]})]})}),(0,t.jsxs)("div",{className:"bg-card border border-border rounded-lg overflow-hidden",children:[(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)("table",{className:"w-full",children:[(0,t.jsx)("thead",{children:(0,t.jsxs)("tr",{className:"border-b border-border bg-muted/50",children:[(0,t.jsx)("th",{scope:"col",className:"px-4 py-3 text-left text-sm font-semibold text-foreground w-12",children:(0,t.jsx)("span",{className:"sr-only",children:"Icon"})}),(0,t.jsx)("th",{scope:"col",className:"px-4 py-3 text-left text-sm font-semibold text-foreground max-w-md",children:"Agent Root"}),(0,t.jsx)("th",{scope:"col",className:"px-4 py-3 text-left text-sm font-semibold text-foreground hidden md:table-cell",children:"Path"}),(0,t.jsx)("th",{scope:"col",className:"px-4 py-3 text-left text-sm font-semibold text-foreground",children:"Last Modified"})]})}),(0,t.jsx)("tbody",{children:0===X.length?(0,t.jsx)("tr",{children:(0,t.jsx)("td",{colSpan:4,className:"px-4 py-8 text-center text-muted-foreground",children:"No projects found matching the selected filter."})}):X.map(e=>(0,t.jsx)(S,{node:e,collapsed:!V&&H.has(e.key),interactive:!V,onToggle:J},e.key))})]})}),O.length>0&&(0,t.jsx)(w.default,{currentPage:A,totalPages:F,onPageChange:P})]})]})}],62481)},24578,e=>{"use strict";let t={claude:{id:"claude",label:"Claude Code",badgeClasses:"bg-orange-500/10 text-orange-400 border-orange-500/20"},codex:{id:"codex",label:"OpenAI Codex",badgeClasses:"bg-purple-500/10 text-purple-400 border-purple-500/20"},copilot:{id:"copilot",label:"GitHub Copilot",badgeClasses:"bg-blue-500/10 text-blue-400 border-blue-500/20"},cursor:{id:"cursor",label:"Cursor Agent",badgeClasses:"bg-emerald-500/10 text-emerald-400 border-emerald-500/20"},opencode:{id:"opencode",label:"OpenCode",badgeClasses:"bg-amber-500/10 text-amber-400 border-amber-500/20"},pi:{id:"pi",label:"Pi",badgeClasses:"bg-pink-500/10 text-pink-400 border-pink-500/20"},hermes:{id:"hermes",label:"Hermes",badgeClasses:"bg-indigo-500/10 text-indigo-400 border-indigo-500/20"},openclaw:{id:"openclaw",label:"OpenClaw",badgeClasses:"bg-teal-500/10 text-teal-400 border-teal-500/20"},factory:{id:"factory",label:"Factory Droid",badgeClasses:"bg-rose-500/10 text-rose-400 border-rose-500/20"},devin:{id:"devin",label:"Devin CLI",badgeClasses:"bg-violet-500/10 text-violet-400 border-violet-500/20"},antigravity:{id:"antigravity",label:"Antigravity CLI",badgeClasses:"bg-cyan-500/10 text-cyan-400 border-cyan-500/20"},goose:{id:"goose",label:"Goose",badgeClasses:"bg-lime-500/10 text-lime-400 border-lime-500/20"}};e.s(["KNOWN_CLI_IDS",0,["claude","codex","copilot","cursor","opencode","pi","hermes","openclaw","factory","devin","antigravity","goose"],"getCliBadgeClasses",0,function(e){return t[e]?.badgeClasses??t.claude.badgeClasses},"getCliLabel",0,function(e){return t[e]?.label??e},"isKnownCli",0,function(e){return"string"==typeof e&&Object.prototype.hasOwnProperty.call(t,e)}])},62706,20087,30005,66595,85898,e=>{"use strict";e.s(["formatDate",0,function(e){return new Intl.DateTimeFormat("en-US",{month:"short",day:"numeric",year:"numeric",hour:"numeric",minute:"2-digit",hour12:!0}).format(e)}],62706),e.s(["FILTER_PRESETS",0,[{value:"all",label:"All"},{value:"last-hour",label:"Last Hour"},{value:"today",label:"Today"},{value:"last-7-days",label:"Last 7 Days"},{value:"last-30-days",label:"Last 30 Days"}],"ITEMS_PER_PAGE",0,25,"filterByDate",0,function(e,t,r){if("all"===t)return e;if("custom"===t){let t,a,n=r.from?((t=new Date(r.from)).setHours(0,0,0,0),t):null,l=r.to?((a=new Date(r.to)).setHours(23,59,59,999),a):null;return e.filter(e=>(!n||!(e.lastModified<n))&&(!l||!(e.lastModified>l)))}let a=function(e){let t=new Date;switch(e){case"last-hour":return new Date(t.getTime()-36e5);case"today":return new Date(t.getFullYear(),t.getMonth(),t.getDate());case"last-7-days":return new Date(t.getTime()-6048e5);case"last-30-days":return new Date(t.getTime()-2592e6);default:return null}}(t);return a?e.filter(e=>e.lastModified>=a):e},"rehydrateDates",0,function(e){return e.map(e=>({...e,lastModified:e.lastModified instanceof Date?e.lastModified:new Date(e.lastModified)}))}],20087);var t=e.i(71645);e.s(["useFilterState",0,function(e=[],r){let[a,n]=(0,t.useState)(r?.filterPreset??"all"),[l,o]=(0,t.useState)(r?.dateRange??{from:null,to:null}),[s,i]=(0,t.useState)(r?.currentPage??1),d=`${a}|${JSON.stringify(l)}|${JSON.stringify(e)}`,[c,u]=(0,t.useState)(d);d!==c&&(u(d),i(1));let m=(0,t.useCallback)(e=>{n(e),"custom"!==e&&o({from:null,to:null})},[]);return{filterPreset:a,dateRange:l,currentPage:s,setCurrentPage:i,handlePresetChange:m,handleDateRangeChange:(0,t.useCallback)((e,t)=>{n("custom"),o(r=>({...r,[e]:t?new Date(t):null}))},[]),clearFilters:(0,t.useCallback)(()=>{n("all"),o({from:null,to:null})},[])}}],30005);var r=e.i(56420);let a={name:"search",size:24,node:[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]};a.node;let n=(0,r.default)(a);e.s(["Search",0,n],66595);var l=e.i(43476);let o={name:"calendar",size:24,node:[["path",{d:"M8 2v3",key:"1ioesn"}],["path",{d:"M16 2v3",key:"otl347"}],["rect",{x:"3",y:"3",width:"18",height:"18",rx:"2",key:"h1oib"}],["path",{d:"M3 9h18",key:"1pudct"}]]};o.node;let s=(0,r.default)(o);e.s(["default",0,function({id:e,value:t,stringValue:r,onChange:a,"aria-label":n}){let o=null!=r?r:t?t.toISOString().split("T")[0]:"";return(0,l.jsxs)("div",{className:"relative group",children:[(0,l.jsx)("input",{type:"date",id:e,value:o,onChange:e=>a(e.target.value),"aria-label":n,className:"date-input px-3 py-2 pr-8 text-sm bg-input border border-border rounded-md text-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:border-transparent transition-all hover:border-primary/50 w-[200px]"}),(0,l.jsx)("label",{htmlFor:e,className:"absolute right-2.5 top-1/2 -translate-y-1/2 cursor-pointer pointer-events-auto z-10 p-1 rounded hover:bg-muted/50 transition-colors",onClick:t=>{t.preventDefault();let r=document.getElementById(e);r&&"function"==typeof r.showPicker?r.showPicker():r?.click()},children:(0,l.jsx)(s,{className:"w-4 h-4 text-primary group-hover:text-primary/80 transition-colors"})})]})}],85898)},80060,2711,e=>{"use strict";var t=e.i(18566),r=e.i(71645);function a(e){let t=e.getFullYear(),r=String(e.getMonth()+1).padStart(2,"0"),a=String(e.getDate()).padStart(2,"0");return`${t}-${r}-${a}`}function n(e){var t;if(!e||(t=e,!/^\d{4}-\d{2}-\d{2}$/.test(t)||isNaN(Date.parse(t))))return null;let[r,a,n]=e.split("-").map(Number);return new Date(r,a-1,n,12,0,0)}e.s(["useUrlParams",0,function(){let e=(0,t.useSearchParams)(),a=(0,t.useRouter)(),n=(0,t.usePathname)(),l=(0,r.useRef)(null),o=(0,r.useCallback)(t=>e.get(t),[e]),s=(0,r.useCallback)(()=>new URLSearchParams(e.toString()),[e]),i=(0,r.useCallback)(t=>{l.current&&clearTimeout(l.current),l.current=setTimeout(()=>{let r=new URLSearchParams(e.toString());for(let[e,a]of Object.entries(t))void 0===a||""===a?r.delete(e):r.set(e,a);let l=r.toString(),o=l?`${n}?${l}`:n;a.replace(o,{scroll:!1})},150)},[e,n,a]);return(0,r.useEffect)(()=>()=>{l.current&&clearTimeout(l.current)},[]),{get:o,getAll:s,setAll:i}}],80060),e.s(["dateRangeToParams",0,function(e){let t={};return e.from&&(t.from=a(e.from)),e.to&&(t.to=a(e.to)),t},"keywordsToParam",0,function(e){if(0!==e.length)return e.map(e=>encodeURIComponent(e)).join(",")},"pageToParam",0,function(e){return e<=1?void 0:String(e)},"paramToKeywords",0,function(e){return e?e.split(",").map(e=>decodeURIComponent(e.trim())).filter(e=>e.length>0):[]},"paramToPage",0,function(e){if(!e)return 1;let t=parseInt(e,10);return Number.isFinite(t)&&t>=1?t:1},"paramToPreset",0,function(e){return e&&["all","last-hour","today","last-7-days","last-30-days","custom"].includes(e)?e:"all"},"paramsToDateRange",0,function(e,t){return{from:n(e),to:n(t)}},"presetToParam",0,function(e){return"all"===e?void 0:e}],2711)},24071,e=>{"use strict";var t=e.i(56420);let r={name:"chevron-left",size:24,node:[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]};r.node;let a=(0,t.default)(r);e.s(["ChevronLeft",0,a],24071)},67927,e=>{"use strict";var t=e.i(56420);let r={name:"chevron-right",size:24,node:[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]};r.node;let a=(0,t.default)(r);e.s(["ChevronRight",0,a],67927)},63676,e=>{"use strict";var t=e.i(56420);let r={name:"x",size:24,node:[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]};r.node;let a=(0,t.default)(r);e.s(["X",0,a],63676)},61851,(e,t,r)=>{var a;"u">typeof __nccwpck_require__&&(__nccwpck_require__.ab="/ROOT/node_modules/next/dist/compiled/os-browserify/"),(a={}).endianness=function(){return"LE"},a.hostname=function(){return"u">typeof location?location.hostname:""},a.loadavg=function(){return[]},a.uptime=function(){return 0},a.freemem=function(){return Number.MAX_VALUE},a.totalmem=function(){return Number.MAX_VALUE},a.cpus=function(){return[]},a.type=function(){return"Browser"},a.release=function(){return"u">typeof navigator?navigator.appVersion:""},a.networkInterfaces=a.getNetworkInterfaces=function(){return{}},a.arch=function(){return"javascript"},a.platform=function(){return"browser"},a.tmpdir=a.tmpDir=function(){return"/tmp"},a.EOL="\n",a.homedir=function(){return"/"},t.exports=a},41790,(e,t,r)=>{!function(){"use strict";var e={431:function(e){function t(e){if("string"!=typeof e)throw TypeError("Path must be a string. Received "+JSON.stringify(e))}function r(e,t){for(var r,a="",n=0,l=-1,o=0,s=0;s<=e.length;++s){if(s<e.length)r=e.charCodeAt(s);else if(47===r)break;else r=47;if(47===r){if(l===s-1||1===o);else if(l!==s-1&&2===o){if(a.length<2||2!==n||46!==a.charCodeAt(a.length-1)||46!==a.charCodeAt(a.length-2)){if(a.length>2){var i=a.lastIndexOf("/");if(i!==a.length-1){-1===i?(a="",n=0):n=(a=a.slice(0,i)).length-1-a.lastIndexOf("/"),l=s,o=0;continue}}else if(2===a.length||1===a.length){a="",n=0,l=s,o=0;continue}}t&&(a.length>0?a+="/..":a="..",n=2)}else a.length>0?a+="/"+e.slice(l+1,s):a=e.slice(l+1,s),n=s-l-1;l=s,o=0}else 46===r&&-1!==o?++o:o=-1}return a}var a={resolve:function(){for(var e,a,n="",l=!1,o=arguments.length-1;o>=-1&&!l;o--)o>=0?a=arguments[o]:(void 0===e&&(e=""),a=e),t(a),0!==a.length&&(n=a+"/"+n,l=47===a.charCodeAt(0));if(n=r(n,!l),l)if(n.length>0)return"/"+n;else return"/";return n.length>0?n:"."},normalize:function(e){if(t(e),0===e.length)return".";var a=47===e.charCodeAt(0),n=47===e.charCodeAt(e.length-1);return(0!==(e=r(e,!a)).length||a||(e="."),e.length>0&&n&&(e+="/"),a)?"/"+e:e},isAbsolute:function(e){return t(e),e.length>0&&47===e.charCodeAt(0)},join:function(){if(0==arguments.length)return".";for(var e,r=0;r<arguments.length;++r){var n=arguments[r];t(n),n.length>0&&(void 0===e?e=n:e+="/"+n)}return void 0===e?".":a.normalize(e)},relative:function(e,r){if(t(e),t(r),e===r||(e=a.resolve(e))===(r=a.resolve(r)))return"";for(var n=1;n<e.length&&47===e.charCodeAt(n);++n);for(var l=e.length,o=l-n,s=1;s<r.length&&47===r.charCodeAt(s);++s);for(var i=r.length-s,d=o<i?o:i,c=-1,u=0;u<=d;++u){if(u===d){if(i>d){if(47===r.charCodeAt(s+u))return r.slice(s+u+1);else if(0===u)return r.slice(s+u)}else o>d&&(47===e.charCodeAt(n+u)?c=u:0===u&&(c=0));break}var m=e.charCodeAt(n+u);if(m!==r.charCodeAt(s+u))break;47===m&&(c=u)}var f="";for(u=n+c+1;u<=l;++u)(u===l||47===e.charCodeAt(u))&&(0===f.length?f+="..":f+="/..");return f.length>0?f+r.slice(s+c):(s+=c,47===r.charCodeAt(s)&&++s,r.slice(s))},_makeLong:function(e){return e},dirname:function(e){if(t(e),0===e.length)return".";for(var r=e.charCodeAt(0),a=47===r,n=-1,l=!0,o=e.length-1;o>=1;--o)if(47===(r=e.charCodeAt(o))){if(!l){n=o;break}}else l=!1;return -1===n?a?"/":".":a&&1===n?"//":e.slice(0,n)},basename:function(e,r){if(void 0!==r&&"string"!=typeof r)throw TypeError('"ext" argument must be a string');t(e);var a,n=0,l=-1,o=!0;if(void 0!==r&&r.length>0&&r.length<=e.length){if(r.length===e.length&&r===e)return"";var s=r.length-1,i=-1;for(a=e.length-1;a>=0;--a){var d=e.charCodeAt(a);if(47===d){if(!o){n=a+1;break}}else -1===i&&(o=!1,i=a+1),s>=0&&(d===r.charCodeAt(s)?-1==--s&&(l=a):(s=-1,l=i))}return n===l?l=i:-1===l&&(l=e.length),e.slice(n,l)}for(a=e.length-1;a>=0;--a)if(47===e.charCodeAt(a)){if(!o){n=a+1;break}}else -1===l&&(o=!1,l=a+1);return -1===l?"":e.slice(n,l)},extname:function(e){t(e);for(var r=-1,a=0,n=-1,l=!0,o=0,s=e.length-1;s>=0;--s){var i=e.charCodeAt(s);if(47===i){if(!l){a=s+1;break}continue}-1===n&&(l=!1,n=s+1),46===i?-1===r?r=s:1!==o&&(o=1):-1!==r&&(o=-1)}return -1===r||-1===n||0===o||1===o&&r===n-1&&r===a+1?"":e.slice(r,n)},format:function(e){var t,r;if(null===e||"object"!=typeof e)throw TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return t=e.dir||e.root,r=e.base||(e.name||"")+(e.ext||""),t?t===e.root?t+r:t+"/"+r:r},parse:function(e){t(e);var r,a={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return a;var n=e.charCodeAt(0),l=47===n;l?(a.root="/",r=1):r=0;for(var o=-1,s=0,i=-1,d=!0,c=e.length-1,u=0;c>=r;--c){if(47===(n=e.charCodeAt(c))){if(!d){s=c+1;break}continue}-1===i&&(d=!1,i=c+1),46===n?-1===o?o=c:1!==u&&(u=1):-1!==o&&(u=-1)}return -1===o||-1===i||0===u||1===u&&o===i-1&&o===s+1?-1!==i&&(0===s&&l?a.base=a.name=e.slice(1,i):a.base=a.name=e.slice(s,i)):(0===s&&l?(a.name=e.slice(1,o),a.base=e.slice(1,i)):(a.name=e.slice(s,o),a.base=e.slice(s,i)),a.ext=e.slice(o,i)),s>0?a.dir=e.slice(0,s-1):l&&(a.dir="/"),a},sep:"/",delimiter:":",win32:null,posix:null};a.posix=a,e.exports=a}},r={};function a(t){var n=r[t];if(void 0!==n)return n.exports;var l=r[t]={exports:{}},o=!0;try{e[t](l,l.exports,a),o=!1}finally{o&&delete r[t]}return l.exports}a.ab="/ROOT/node_modules/next/dist/compiled/path-browserify/",t.exports=a(431)}()}]);
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,43418,e=>{"use strict";var t=e.i(43476),r=e.i(24578);e.s(["CliBadge",0,function({cli:e}){let a=(0,r.getCliLabel)(e),n=(0,r.getCliBadgeClasses)(e);return(0,t.jsx)("span",{className:`inline-flex items-center rounded px-1.5 py-0.5 text-[0.6rem] font-mono font-medium uppercase tracking-wider border ${n}`,title:`Agent CLI: ${a}`,children:a})}])},73520,e=>{"use strict";var t=e.i(43476),r=e.i(24071),a=e.i(67927);e.s(["default",0,function({currentPage:e,totalPages:n,onPageChange:l}){if(n<=1)return null;let o=e=>`px-3 py-2 text-sm rounded-md transition-colors flex items-center gap-1 bg-muted text-muted-foreground ${e?"opacity-50 cursor-not-allowed":"hover:bg-muted/80"}`;return(0,t.jsxs)("div",{className:"flex items-center justify-center gap-2 py-4",children:[(0,t.jsxs)("button",{onClick:()=>l(e-1),disabled:1===e,className:o(1===e),"aria-label":"Previous page",children:[(0,t.jsx)(r.ChevronLeft,{className:"w-4 h-4"}),(0,t.jsx)("span",{className:"hidden sm:inline",children:"Previous"})]}),(0,t.jsx)("div",{className:"flex items-center gap-1",children:(()=>{if(n<=7)return Array.from({length:n},(e,t)=>t+1);let t=[1],r=Math.max(2,e-1),a=Math.min(n-1,e+1);e<=3&&(a=Math.min(5,n-1)),e>=n-2&&(r=Math.max(2,n-4)),r>2&&t.push("ellipsis-start");for(let e=r;e<=a;e++)t.push(e);return a<n-1&&t.push("ellipsis-end"),t.push(n),t})().map(r=>"string"==typeof r?(0,t.jsx)("span",{className:"px-2 text-muted-foreground",children:"..."},r):(0,t.jsx)("button",{onClick:()=>l(r),className:`min-w-[2.5rem] px-3 py-2 text-sm rounded-md transition-colors ${e===r?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground hover:bg-muted/80"}`,"aria-label":`Page ${r}`,"aria-current":e===r?"page":void 0,children:r},r))}),(0,t.jsxs)("button",{onClick:()=>l(e+1),disabled:e===n,className:o(e===n),"aria-label":"Next page",children:[(0,t.jsx)("span",{className:"hidden sm:inline",children:"Next"}),(0,t.jsx)(a.ChevronRight,{className:"w-4 h-4"})]})]})}])},62481,e=>{"use strict";var t=e.i(43476),r=e.i(71645),a=e.i(43418);e.i(45425),e.i(41790);let n=/^[a-z]{2,}:/;function l(e){return!!e&&n.test(e)}var o=e.i(62706),s=e.i(20087),i=e.i(30005),d=e.i(80060),c=e.i(2711),u=e.i(24578);function m(e,t,r){return{key:e,label:t,depth:r,children:new Map,projectCount:0,lastModified:new Date(0),cli:[]}}function f(e,t){for(let r of(t.lastModified.getTime()>e.lastModified.getTime()&&(e.lastModified=t.lastModified,e.lastModifiedFormatted=t.lastModifiedFormatted),"number"==typeof t.sessionCount&&(e.sessionCount=(e.sessionCount??0)+t.sessionCount),e.projectCount+=1,t.cli))e.cli.includes(r)||e.cli.push(r)}function h(e){let t=[...e.children.values()].map(h).sort((e,t)=>t.lastModified.getTime()-e.lastModified.getTime());return{key:e.key,label:e.label,depth:e.depth,children:t,project:e.project,sessionCount:e.sessionCount,projectCount:e.projectCount,lastModified:e.lastModified,lastModifiedFormatted:e.lastModifiedFormatted,cli:e.cli}}var g=e.i(16327),p=e.i(67927),x=e.i(56420);let b={name:"folder",size:24,node:[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]};b.node;let v=(0,x.default)(b);var y=e.i(66595),C=e.i(63676),j=e.i(22016),w=e.i(73520),N=e.i(85898);function k({date:e,formatted:r}){return(0,t.jsx)("span",{children:r||(0,o.formatDate)(e)})}let M="failproofai.projects.collapsed";function T(e){try{window.localStorage.setItem(M,JSON.stringify([...e]))}catch{}}function S({node:e,collapsed:r,interactive:n,onToggle:o}){let s=e.children.length>0,i=e.project,d=r?p.ChevronRight:g.ChevronDown,c={paddingLeft:`${1.25*Math.min(e.depth,4)}rem`};return(0,t.jsxs)("tr",{className:"border-b border-border hover:bg-muted/50 transition-colors",children:[(0,t.jsx)("td",{className:"px-4 py-3",children:(0,t.jsx)("div",{style:c,children:(0,t.jsx)(v,{className:`w-5 h-5 ${s?"text-muted-foreground":"text-primary"}`})})}),(0,t.jsx)("td",{className:"px-4 py-3 max-w-md",children:(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2",style:c,children:[s?n?(0,t.jsxs)("button",{type:"button",onClick:()=>o(e.key),"aria-expanded":!r,"aria-label":`${r?"Expand":"Collapse"} ${e.label}`,className:"flex items-center gap-1 font-semibold text-foreground hover:text-primary transition-colors break-words break-all text-left",children:[(0,t.jsx)(d,{className:"w-4 h-4 shrink-0"}),e.label]}):(0,t.jsxs)("span",{className:"flex items-center gap-1 font-semibold text-foreground break-words break-all",children:[(0,t.jsx)(d,{className:"w-4 h-4 shrink-0"}),e.label]}):i?(0,t.jsx)(j.default,{href:`/project/${encodeURIComponent(i.name)}`,className:"font-semibold text-foreground hover:text-primary transition-colors break-words break-all inline-block max-w-full",children:e.depth>0?e.label:function(e,t){return l(t)?t.replace(/:/g,"/"):/^[A-Za-z]--/.test(e)?e[0]+":/"+e.slice(3).replace(/-/g,"/"):e.replace(/-/g,"/")}(i.name,i.path)}):(0,t.jsx)("span",{className:"font-semibold text-foreground",children:e.label}),e.cli.map(e=>(0,t.jsx)(a.CliBadge,{cli:e},e)),s&&void 0!==e.sessionCount&&(0,t.jsxs)("span",{className:"text-xs text-muted-foreground",children:[e.sessionCount," session",1===e.sessionCount?"":"s"]})]})}),(0,t.jsx)("td",{className:"px-4 py-3 text-sm text-muted-foreground hidden md:table-cell truncate max-w-md",children:i?i.path:""}),(0,t.jsx)("td",{className:"px-4 py-3 text-sm text-muted-foreground",children:(0,t.jsx)(k,{date:e.lastModified,formatted:e.lastModifiedFormatted})})]})}e.s(["default",0,function({folders:e}){let a=(0,d.useUrlParams)(),n=(0,r.useRef)(!1),[o,g]=(0,r.useState)(()=>(0,c.paramToKeywords)(a.get("q"))),[p,x]=(0,r.useState)(""),[b,v]=(0,r.useState)(()=>{let e=a.get("cli");return(0,u.isKnownCli)(e)?e:""}),{filterPreset:j,dateRange:k,currentPage:A,setCurrentPage:P,handlePresetChange:D,handleDateRangeChange:E,clearFilters:R}=(0,i.useFilterState)(o,{filterPreset:(0,c.paramToPreset)(a.get("preset")),dateRange:(0,c.paramsToDateRange)(a.get("from"),a.get("to")),currentPage:(0,c.paramToPage)(a.get("page"))});(0,r.useEffect)(()=>{if(!n.current){n.current=!0;return}a.setAll({preset:(0,c.presetToParam)(j),...(0,c.dateRangeToParams)(k),q:(0,c.keywordsToParam)(o),page:(0,c.pageToParam)(A),cli:b||void 0})},[j,k,o,A,b]);let I=e=>{let t=e.trim();t&&!o.includes(t)&&(g([...o,t]),x(""))},L=()=>{g([]),x("")},_=(0,r.useMemo)(()=>(0,s.rehydrateDates)(e),[e]),O=(0,r.useMemo)(()=>{let e=(0,s.filterByDate)(_,j,k);return o.length>0&&(e=e.filter(e=>{let t=e.name.toLowerCase();return o.every(e=>{let r=e.trim().toLowerCase().replace(/\//g,"-");return 0===r.length||t.includes(r)})})),b&&(e=e.filter(e=>e.cli.includes(b))),e.sort((e,t)=>t.lastModified.getTime()-e.lastModified.getTime())},[_,j,k,o,b]),$=(0,r.useMemo)(()=>(function(e){let t=new Map;for(let a of e){var r;let e,n=l(r=a.path)?r.split(":"):[];if(0===n.length){let e=m(`project:${a.name}`,a.name,0);e.project=a,f(e,a),t.set(e.key,e);continue}let o=t,s="";for(let t=0;t<n.length;t++){let r=n[t];s=0===t?r:`${s}:${r}`;let l=o.get(s);l||(l=m(s,r,t),o.set(s,l)),f(l,a),e=l,o=l.children}e&&!e.project&&(e.project=a)}return[...t.values()].map(h).sort((e,t)=>t.lastModified.getTime()-e.lastModified.getTime())})(O),[O]),F=Math.max(1,Math.ceil($.length/s.ITEMS_PER_PAGE));(0,r.useEffect)(()=>{A>F&&P(F)},[A,F,P]);let U=(A-1)*s.ITEMS_PER_PAGE,z=Math.min(U+s.ITEMS_PER_PAGE,$.length),K=(0,r.useMemo)(()=>$.slice(U,z),[$,U,z]),B=$.slice(0,U).reduce((e,t)=>e+t.projectCount,0),G=K.reduce((e,t)=>e+t.projectCount,0),[H,q]=(0,r.useState)(()=>new Set);(0,r.useEffect)(()=>{q(new Set(function(){try{let e=window.localStorage.getItem(M),t=e?JSON.parse(e):null;return Array.isArray(t)?t.filter(e=>"string"==typeof e):[]}catch{return[]}}()))},[]);let J=e=>{q(t=>{let r=new Set(t);return r.has(e)?r.delete(e):r.add(e),T(r),r})},V=o.length>0,X=(0,r.useMemo)(()=>{var e;let t,r;return e=e=>!V&&H.has(e),t=[],(r=a=>{for(let n of a)t.push(n),n.children.length>0&&!e(n.key)&&r(n.children)})(K),t},[K,H,V]),W=(0,r.useMemo)(()=>{let e,t;return e=[],(t=r=>{for(let a of r)a.children.length>0&&(e.push(a.key),t(a.children))})(K),e},[K]),Y=X.filter(e=>e.children.length>0).map(e=>e.key).some(e=>!H.has(e));return(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)("div",{className:"bg-card border border-border rounded-lg p-4",children:(0,t.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,t.jsx)("span",{className:"text-sm font-medium text-foreground",children:"Filter by:"}),s.FILTER_PRESETS.map(e=>(0,t.jsx)("button",{onClick:()=>D(e.value),className:`px-3 py-1.5 text-sm rounded-md transition-colors ${j===e.value?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground hover:bg-muted/80"}`,children:e.label},e.value)),(0,t.jsx)("span",{className:"ml-2 text-sm font-medium text-foreground",children:"CLI:"}),(0,t.jsxs)("select",{"aria-label":"Filter by CLI",value:b,onChange:e=>{let t=e.target.value;v(""===t||(0,u.isKnownCli)(t)?t:"")},className:"px-2 py-1.5 text-sm bg-input border border-border rounded-md text-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:border-transparent",children:[(0,t.jsx)("option",{value:"",children:"All CLIs"}),u.KNOWN_CLI_IDS.map(e=>(0,t.jsx)("option",{value:e,children:(0,u.getCliLabel)(e)},e))]})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(y.Search,{className:"w-4 h-4 text-muted-foreground"}),(0,t.jsx)("span",{className:"text-sm font-medium text-foreground",children:"Search Keywords:"})]}),(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("input",{type:"text",value:p,onChange:e=>x(e.target.value),onKeyDown:e=>{"Enter"===e.key&&(e.preventDefault(),I(p))},placeholder:"Enter keyword and press Enter",className:"px-3 py-2 text-sm bg-input border border-border rounded-md text-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:border-transparent transition-all hover:border-primary/50 w-[250px]","aria-label":"Add keyword"}),(0,t.jsx)("button",{onClick:()=>I(p),className:"px-3 py-2 text-sm bg-muted text-muted-foreground hover:bg-muted/80 rounded-md transition-colors","aria-label":"Add keyword",children:"Add"})]}),o.length>0&&(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[o.map((e,r)=>(0,t.jsxs)("div",{className:"flex items-center gap-1.5 px-3 py-1.5 bg-muted text-muted-foreground rounded-md text-sm",children:[(0,t.jsx)("span",{children:e}),(0,t.jsx)("button",{onClick:()=>{g(o.filter((e,t)=>t!==r))},className:"hover:text-foreground transition-colors p-0.5 rounded hover:bg-muted/80","aria-label":`Remove keyword ${e}`,children:(0,t.jsx)(C.X,{className:"w-3.5 h-3.5"})})]},r)),(0,t.jsx)("button",{onClick:L,className:"px-2 py-1.5 text-xs bg-muted text-muted-foreground hover:bg-muted/80 rounded-md transition-colors","aria-label":"Clear all keywords",children:"Clear all"})]})]})]}),(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-4",children:[(0,t.jsx)("span",{className:"text-sm font-medium text-foreground",children:"Custom Range:"}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(N.default,{id:"date-from",value:k.from,onChange:e=>E("from",e),"aria-label":"Filter from date"}),(0,t.jsx)("span",{className:"text-muted-foreground",children:"to"}),(0,t.jsx)(N.default,{id:"date-to",value:k.to,onChange:e=>E("to",e),"aria-label":"Filter to date"})]}),("all"!==j||null!==k.from||null!==k.to||o.length>0||""!==b)&&(0,t.jsx)("button",{onClick:()=>{R(),L(),v("")},className:"px-3 py-2 text-sm bg-muted text-muted-foreground hover:bg-muted/80 rounded-md transition-colors",children:"Clear"})]}),(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-1 text-sm text-muted-foreground",children:[W.length>0&&!V&&(0,t.jsx)("button",{type:"button",onClick:()=>{q(e=>{let t=new Set(e);for(let e of W)Y?t.add(e):t.delete(e);return T(t),t})},className:"text-xs text-muted-foreground hover:text-foreground underline underline-offset-2 transition-colors",children:Y?"Collapse all":"Expand all"}),0===O.length?(0,t.jsx)("span",{children:"No projects found"}):(0,t.jsxs)("span",{children:["Showing ",B+1,"-",B+G," of ",O.length," projects",O.length!==_.length&&(0,t.jsxs)("span",{className:"ml-1",children:["(filtered from ",_.length," total)"]}),o.length>0&&(0,t.jsxs)("span",{className:"ml-1",children:["with ",o.length," keyword",1!==o.length?"s":""]})]})]})]})}),(0,t.jsxs)("div",{className:"bg-card border border-border rounded-lg overflow-hidden",children:[(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)("table",{className:"w-full",children:[(0,t.jsx)("thead",{children:(0,t.jsxs)("tr",{className:"border-b border-border bg-muted/50",children:[(0,t.jsx)("th",{scope:"col",className:"px-4 py-3 text-left text-sm font-semibold text-foreground w-12",children:(0,t.jsx)("span",{className:"sr-only",children:"Icon"})}),(0,t.jsx)("th",{scope:"col",className:"px-4 py-3 text-left text-sm font-semibold text-foreground max-w-md",children:"Agent Root"}),(0,t.jsx)("th",{scope:"col",className:"px-4 py-3 text-left text-sm font-semibold text-foreground hidden md:table-cell",children:"Path"}),(0,t.jsx)("th",{scope:"col",className:"px-4 py-3 text-left text-sm font-semibold text-foreground",children:"Last Modified"})]})}),(0,t.jsx)("tbody",{children:0===X.length?(0,t.jsx)("tr",{children:(0,t.jsx)("td",{colSpan:4,className:"px-4 py-8 text-center text-muted-foreground",children:"No projects found matching the selected filter."})}):X.map(e=>(0,t.jsx)(S,{node:e,collapsed:!V&&H.has(e.key),interactive:!V,onToggle:J},e.key))})]})}),O.length>0&&(0,t.jsx)(w.default,{currentPage:A,totalPages:F,onPageChange:P})]})]})}],62481)},24578,e=>{"use strict";let t={claude:{id:"claude",label:"Claude Code",badgeClasses:"bg-orange-500/10 text-orange-400 border-orange-500/20"},codex:{id:"codex",label:"OpenAI Codex",badgeClasses:"bg-purple-500/10 text-purple-400 border-purple-500/20"},copilot:{id:"copilot",label:"GitHub Copilot",badgeClasses:"bg-blue-500/10 text-blue-400 border-blue-500/20"},cursor:{id:"cursor",label:"Cursor Agent",badgeClasses:"bg-emerald-500/10 text-emerald-400 border-emerald-500/20"},opencode:{id:"opencode",label:"OpenCode",badgeClasses:"bg-amber-500/10 text-amber-400 border-amber-500/20"},pi:{id:"pi",label:"Pi",badgeClasses:"bg-pink-500/10 text-pink-400 border-pink-500/20"},hermes:{id:"hermes",label:"Hermes",badgeClasses:"bg-indigo-500/10 text-indigo-400 border-indigo-500/20"},openclaw:{id:"openclaw",label:"OpenClaw",badgeClasses:"bg-teal-500/10 text-teal-400 border-teal-500/20"},factory:{id:"factory",label:"Factory Droid",badgeClasses:"bg-rose-500/10 text-rose-400 border-rose-500/20"},devin:{id:"devin",label:"Devin CLI",badgeClasses:"bg-violet-500/10 text-violet-400 border-violet-500/20"},antigravity:{id:"antigravity",label:"Antigravity CLI",badgeClasses:"bg-cyan-500/10 text-cyan-400 border-cyan-500/20"},goose:{id:"goose",label:"Goose",badgeClasses:"bg-lime-500/10 text-lime-400 border-lime-500/20"}};e.s(["KNOWN_CLI_IDS",0,["claude","codex","copilot","cursor","opencode","pi","hermes","openclaw","factory","devin","antigravity","goose"],"getCliBadgeClasses",0,function(e){return t[e]?.badgeClasses??t.claude.badgeClasses},"getCliLabel",0,function(e){return t[e]?.label??e},"isKnownCli",0,function(e){return"string"==typeof e&&Object.prototype.hasOwnProperty.call(t,e)}])},62706,20087,30005,66595,85898,e=>{"use strict";e.s(["formatDate",0,function(e){return new Intl.DateTimeFormat("en-US",{month:"short",day:"numeric",year:"numeric",hour:"numeric",minute:"2-digit",hour12:!0}).format(e)}],62706),e.s(["FILTER_PRESETS",0,[{value:"all",label:"All"},{value:"last-hour",label:"Last Hour"},{value:"today",label:"Today"},{value:"last-7-days",label:"Last 7 Days"},{value:"last-30-days",label:"Last 30 Days"}],"ITEMS_PER_PAGE",0,25,"filterByDate",0,function(e,t,r){if("all"===t)return e;if("custom"===t){let t,a,n=r.from?((t=new Date(r.from)).setHours(0,0,0,0),t):null,l=r.to?((a=new Date(r.to)).setHours(23,59,59,999),a):null;return e.filter(e=>(!n||!(e.lastModified<n))&&(!l||!(e.lastModified>l)))}let a=function(e){let t=new Date;switch(e){case"last-hour":return new Date(t.getTime()-36e5);case"today":return new Date(t.getFullYear(),t.getMonth(),t.getDate());case"last-7-days":return new Date(t.getTime()-6048e5);case"last-30-days":return new Date(t.getTime()-2592e6);default:return null}}(t);return a?e.filter(e=>e.lastModified>=a):e},"rehydrateDates",0,function(e){return e.map(e=>({...e,lastModified:e.lastModified instanceof Date?e.lastModified:new Date(e.lastModified)}))}],20087);var t=e.i(71645);e.s(["useFilterState",0,function(e=[],r){let[a,n]=(0,t.useState)(r?.filterPreset??"all"),[l,o]=(0,t.useState)(r?.dateRange??{from:null,to:null}),[s,i]=(0,t.useState)(r?.currentPage??1),d=`${a}|${JSON.stringify(l)}|${JSON.stringify(e)}`,[c,u]=(0,t.useState)(d);d!==c&&(u(d),i(1));let m=(0,t.useCallback)(e=>{n(e),"custom"!==e&&o({from:null,to:null})},[]);return{filterPreset:a,dateRange:l,currentPage:s,setCurrentPage:i,handlePresetChange:m,handleDateRangeChange:(0,t.useCallback)((e,t)=>{n("custom"),o(r=>({...r,[e]:t?new Date(t):null}))},[]),clearFilters:(0,t.useCallback)(()=>{n("all"),o({from:null,to:null})},[])}}],30005);var r=e.i(56420);let a={name:"search",size:24,node:[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]};a.node;let n=(0,r.default)(a);e.s(["Search",0,n],66595);var l=e.i(43476);let o={name:"calendar",size:24,node:[["path",{d:"M8 2v3",key:"1ioesn"}],["path",{d:"M16 2v3",key:"otl347"}],["rect",{x:"3",y:"3",width:"18",height:"18",rx:"2",key:"h1oib"}],["path",{d:"M3 9h18",key:"1pudct"}]]};o.node;let s=(0,r.default)(o);e.s(["default",0,function({id:e,value:t,stringValue:r,onChange:a,"aria-label":n}){let o=null!=r?r:t?t.toISOString().split("T")[0]:"";return(0,l.jsxs)("div",{className:"relative group",children:[(0,l.jsx)("input",{type:"date",id:e,value:o,onChange:e=>a(e.target.value),"aria-label":n,className:"date-input px-3 py-2 pr-8 text-sm bg-input border border-border rounded-md text-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:border-transparent transition-all hover:border-primary/50 w-[200px]"}),(0,l.jsx)("label",{htmlFor:e,className:"absolute right-2.5 top-1/2 -translate-y-1/2 cursor-pointer pointer-events-auto z-10 p-1 rounded hover:bg-muted/50 transition-colors",onClick:t=>{t.preventDefault();let r=document.getElementById(e);r&&"function"==typeof r.showPicker?r.showPicker():r?.click()},children:(0,l.jsx)(s,{className:"w-4 h-4 text-primary group-hover:text-primary/80 transition-colors"})})]})}],85898)},80060,2711,e=>{"use strict";var t=e.i(18566),r=e.i(71645);function a(e){let t=e.getFullYear(),r=String(e.getMonth()+1).padStart(2,"0"),a=String(e.getDate()).padStart(2,"0");return`${t}-${r}-${a}`}function n(e){var t;if(!e||(t=e,!/^\d{4}-\d{2}-\d{2}$/.test(t)||isNaN(Date.parse(t))))return null;let[r,a,n]=e.split("-").map(Number);return new Date(r,a-1,n,12,0,0)}e.s(["useUrlParams",0,function(){let e=(0,t.useSearchParams)(),a=(0,t.useRouter)(),n=(0,t.usePathname)(),l=(0,r.useRef)(null),o=(0,r.useCallback)(t=>e.get(t),[e]),s=(0,r.useCallback)(()=>new URLSearchParams(e.toString()),[e]),i=(0,r.useCallback)(t=>{l.current&&clearTimeout(l.current),l.current=setTimeout(()=>{let r=new URLSearchParams(e.toString());for(let[e,a]of Object.entries(t))void 0===a||""===a?r.delete(e):r.set(e,a);let l=r.toString(),o=l?`${n}?${l}`:n;a.replace(o,{scroll:!1})},150)},[e,n,a]);return(0,r.useEffect)(()=>()=>{l.current&&clearTimeout(l.current)},[]),{get:o,getAll:s,setAll:i}}],80060),e.s(["dateRangeToParams",0,function(e){let t={};return e.from&&(t.from=a(e.from)),e.to&&(t.to=a(e.to)),t},"keywordsToParam",0,function(e){if(0!==e.length)return e.map(e=>encodeURIComponent(e)).join(",")},"pageToParam",0,function(e){return e<=1?void 0:String(e)},"paramToKeywords",0,function(e){return e?e.split(",").map(e=>decodeURIComponent(e.trim())).filter(e=>e.length>0):[]},"paramToPage",0,function(e){if(!e)return 1;let t=parseInt(e,10);return Number.isFinite(t)&&t>=1?t:1},"paramToPreset",0,function(e){return e&&["all","last-hour","today","last-7-days","last-30-days","custom"].includes(e)?e:"all"},"paramsToDateRange",0,function(e,t){return{from:n(e),to:n(t)}},"presetToParam",0,function(e){return"all"===e?void 0:e}],2711)},24071,e=>{"use strict";var t=e.i(56420);let r={name:"chevron-left",size:24,node:[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]};r.node;let a=(0,t.default)(r);e.s(["ChevronLeft",0,a],24071)},67927,e=>{"use strict";var t=e.i(56420);let r={name:"chevron-right",size:24,node:[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]};r.node;let a=(0,t.default)(r);e.s(["ChevronRight",0,a],67927)},63676,e=>{"use strict";var t=e.i(56420);let r={name:"x",size:24,node:[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]};r.node;let a=(0,t.default)(r);e.s(["X",0,a],63676)},45425,(e,t,r)=>{var a;"u">typeof __nccwpck_require__&&(__nccwpck_require__.ab="/ROOT/node_modules/next/dist/compiled/os-browserify/"),(a={}).endianness=function(){return"LE"},a.hostname=function(){return"u">typeof location?location.hostname:""},a.loadavg=function(){return[]},a.uptime=function(){return 0},a.freemem=function(){return Number.MAX_VALUE},a.totalmem=function(){return Number.MAX_VALUE},a.cpus=function(){return[]},a.type=function(){return"Browser"},a.release=function(){return"u">typeof navigator?navigator.appVersion:""},a.networkInterfaces=a.getNetworkInterfaces=function(){return{}},a.arch=function(){return"javascript"},a.platform=function(){return"browser"},a.tmpdir=a.tmpDir=function(){return"/tmp"},a.EOL="\n",a.homedir=function(){return"/"},t.exports=a},41790,(e,t,r)=>{!function(){"use strict";var e={431:function(e){function t(e){if("string"!=typeof e)throw TypeError("Path must be a string. Received "+JSON.stringify(e))}function r(e,t){for(var r,a="",n=0,l=-1,o=0,s=0;s<=e.length;++s){if(s<e.length)r=e.charCodeAt(s);else if(47===r)break;else r=47;if(47===r){if(l===s-1||1===o);else if(l!==s-1&&2===o){if(a.length<2||2!==n||46!==a.charCodeAt(a.length-1)||46!==a.charCodeAt(a.length-2)){if(a.length>2){var i=a.lastIndexOf("/");if(i!==a.length-1){-1===i?(a="",n=0):n=(a=a.slice(0,i)).length-1-a.lastIndexOf("/"),l=s,o=0;continue}}else if(2===a.length||1===a.length){a="",n=0,l=s,o=0;continue}}t&&(a.length>0?a+="/..":a="..",n=2)}else a.length>0?a+="/"+e.slice(l+1,s):a=e.slice(l+1,s),n=s-l-1;l=s,o=0}else 46===r&&-1!==o?++o:o=-1}return a}var a={resolve:function(){for(var e,a,n="",l=!1,o=arguments.length-1;o>=-1&&!l;o--)o>=0?a=arguments[o]:(void 0===e&&(e=""),a=e),t(a),0!==a.length&&(n=a+"/"+n,l=47===a.charCodeAt(0));if(n=r(n,!l),l)if(n.length>0)return"/"+n;else return"/";return n.length>0?n:"."},normalize:function(e){if(t(e),0===e.length)return".";var a=47===e.charCodeAt(0),n=47===e.charCodeAt(e.length-1);return(0!==(e=r(e,!a)).length||a||(e="."),e.length>0&&n&&(e+="/"),a)?"/"+e:e},isAbsolute:function(e){return t(e),e.length>0&&47===e.charCodeAt(0)},join:function(){if(0==arguments.length)return".";for(var e,r=0;r<arguments.length;++r){var n=arguments[r];t(n),n.length>0&&(void 0===e?e=n:e+="/"+n)}return void 0===e?".":a.normalize(e)},relative:function(e,r){if(t(e),t(r),e===r||(e=a.resolve(e))===(r=a.resolve(r)))return"";for(var n=1;n<e.length&&47===e.charCodeAt(n);++n);for(var l=e.length,o=l-n,s=1;s<r.length&&47===r.charCodeAt(s);++s);for(var i=r.length-s,d=o<i?o:i,c=-1,u=0;u<=d;++u){if(u===d){if(i>d){if(47===r.charCodeAt(s+u))return r.slice(s+u+1);else if(0===u)return r.slice(s+u)}else o>d&&(47===e.charCodeAt(n+u)?c=u:0===u&&(c=0));break}var m=e.charCodeAt(n+u);if(m!==r.charCodeAt(s+u))break;47===m&&(c=u)}var f="";for(u=n+c+1;u<=l;++u)(u===l||47===e.charCodeAt(u))&&(0===f.length?f+="..":f+="/..");return f.length>0?f+r.slice(s+c):(s+=c,47===r.charCodeAt(s)&&++s,r.slice(s))},_makeLong:function(e){return e},dirname:function(e){if(t(e),0===e.length)return".";for(var r=e.charCodeAt(0),a=47===r,n=-1,l=!0,o=e.length-1;o>=1;--o)if(47===(r=e.charCodeAt(o))){if(!l){n=o;break}}else l=!1;return -1===n?a?"/":".":a&&1===n?"//":e.slice(0,n)},basename:function(e,r){if(void 0!==r&&"string"!=typeof r)throw TypeError('"ext" argument must be a string');t(e);var a,n=0,l=-1,o=!0;if(void 0!==r&&r.length>0&&r.length<=e.length){if(r.length===e.length&&r===e)return"";var s=r.length-1,i=-1;for(a=e.length-1;a>=0;--a){var d=e.charCodeAt(a);if(47===d){if(!o){n=a+1;break}}else -1===i&&(o=!1,i=a+1),s>=0&&(d===r.charCodeAt(s)?-1==--s&&(l=a):(s=-1,l=i))}return n===l?l=i:-1===l&&(l=e.length),e.slice(n,l)}for(a=e.length-1;a>=0;--a)if(47===e.charCodeAt(a)){if(!o){n=a+1;break}}else -1===l&&(o=!1,l=a+1);return -1===l?"":e.slice(n,l)},extname:function(e){t(e);for(var r=-1,a=0,n=-1,l=!0,o=0,s=e.length-1;s>=0;--s){var i=e.charCodeAt(s);if(47===i){if(!l){a=s+1;break}continue}-1===n&&(l=!1,n=s+1),46===i?-1===r?r=s:1!==o&&(o=1):-1!==r&&(o=-1)}return -1===r||-1===n||0===o||1===o&&r===n-1&&r===a+1?"":e.slice(r,n)},format:function(e){var t,r;if(null===e||"object"!=typeof e)throw TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return t=e.dir||e.root,r=e.base||(e.name||"")+(e.ext||""),t?t===e.root?t+r:t+"/"+r:r},parse:function(e){t(e);var r,a={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return a;var n=e.charCodeAt(0),l=47===n;l?(a.root="/",r=1):r=0;for(var o=-1,s=0,i=-1,d=!0,c=e.length-1,u=0;c>=r;--c){if(47===(n=e.charCodeAt(c))){if(!d){s=c+1;break}continue}-1===i&&(d=!1,i=c+1),46===n?-1===o?o=c:1!==u&&(u=1):-1!==o&&(u=-1)}return -1===o||-1===i||0===u||1===u&&o===i-1&&o===s+1?-1!==i&&(0===s&&l?a.base=a.name=e.slice(1,i):a.base=a.name=e.slice(s,i)):(0===s&&l?(a.name=e.slice(1,o),a.base=e.slice(1,i)):(a.name=e.slice(s,o),a.base=e.slice(s,i)),a.ext=e.slice(o,i)),s>0?a.dir=e.slice(0,s-1):l&&(a.dir="/"),a},sep:"/",delimiter:":",win32:null,posix:null};a.posix=a,e.exports=a}},r={};function a(t){var n=r[t];if(void 0!==n)return n.exports;var l=r[t]={exports:{}},o=!0;try{e[t](l,l.exports,a),o=!1}finally{o&&delete r[t]}return l.exports}a.ab="/ROOT/node_modules/next/dist/compiled/path-browserify/",t.exports=a(431)}()}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,23527,e=>{"use strict";var t=e.i(95187);let a=(0,t.createServerReference)("60109a5b051daeeed9cd6c3657f8eccf314888ae28",t.callServer,void 0,t.findSourceMapURL,"searchHookActivityAction");e.s(["searchHookActivityAction",0,a])},73520,e=>{"use strict";var t=e.i(43476),a=e.i(24071),r=e.i(67927);e.s(["default",0,function({currentPage:e,totalPages:l,onPageChange:o}){if(l<=1)return null;let s=e=>`px-3 py-2 text-sm rounded-md transition-colors flex items-center gap-1 bg-muted text-muted-foreground ${e?"opacity-50 cursor-not-allowed":"hover:bg-muted/80"}`;return(0,t.jsxs)("div",{className:"flex items-center justify-center gap-2 py-4",children:[(0,t.jsxs)("button",{onClick:()=>o(e-1),disabled:1===e,className:s(1===e),"aria-label":"Previous page",children:[(0,t.jsx)(a.ChevronLeft,{className:"w-4 h-4"}),(0,t.jsx)("span",{className:"hidden sm:inline",children:"Previous"})]}),(0,t.jsx)("div",{className:"flex items-center gap-1",children:(()=>{if(l<=7)return Array.from({length:l},(e,t)=>t+1);let t=[1],a=Math.max(2,e-1),r=Math.min(l-1,e+1);e<=3&&(r=Math.min(5,l-1)),e>=l-2&&(a=Math.max(2,l-4)),a>2&&t.push("ellipsis-start");for(let e=a;e<=r;e++)t.push(e);return r<l-1&&t.push("ellipsis-end"),t.push(l),t})().map(a=>"string"==typeof a?(0,t.jsx)("span",{className:"px-2 text-muted-foreground",children:"..."},a):(0,t.jsx)("button",{onClick:()=>o(a),className:`min-w-[2.5rem] px-3 py-2 text-sm rounded-md transition-colors ${e===a?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground hover:bg-muted/80"}`,"aria-label":`Page ${a}`,"aria-current":e===a?"page":void 0,children:a},a))}),(0,t.jsxs)("button",{onClick:()=>o(e+1),disabled:e===l,className:s(e===l),"aria-label":"Next page",children:[(0,t.jsx)("span",{className:"hidden sm:inline",children:"Next"}),(0,t.jsx)(r.ChevronRight,{className:"w-4 h-4"})]})]})}])},24578,e=>{"use strict";let t={claude:{id:"claude",label:"Claude Code",badgeClasses:"bg-orange-500/10 text-orange-400 border-orange-500/20"},codex:{id:"codex",label:"OpenAI Codex",badgeClasses:"bg-purple-500/10 text-purple-400 border-purple-500/20"},copilot:{id:"copilot",label:"GitHub Copilot",badgeClasses:"bg-blue-500/10 text-blue-400 border-blue-500/20"},cursor:{id:"cursor",label:"Cursor Agent",badgeClasses:"bg-emerald-500/10 text-emerald-400 border-emerald-500/20"},opencode:{id:"opencode",label:"OpenCode",badgeClasses:"bg-amber-500/10 text-amber-400 border-amber-500/20"},pi:{id:"pi",label:"Pi",badgeClasses:"bg-pink-500/10 text-pink-400 border-pink-500/20"},hermes:{id:"hermes",label:"Hermes",badgeClasses:"bg-indigo-500/10 text-indigo-400 border-indigo-500/20"},openclaw:{id:"openclaw",label:"OpenClaw",badgeClasses:"bg-teal-500/10 text-teal-400 border-teal-500/20"},factory:{id:"factory",label:"Factory Droid",badgeClasses:"bg-rose-500/10 text-rose-400 border-rose-500/20"},devin:{id:"devin",label:"Devin CLI",badgeClasses:"bg-violet-500/10 text-violet-400 border-violet-500/20"},antigravity:{id:"antigravity",label:"Antigravity CLI",badgeClasses:"bg-cyan-500/10 text-cyan-400 border-cyan-500/20"},goose:{id:"goose",label:"Goose",badgeClasses:"bg-lime-500/10 text-lime-400 border-lime-500/20"}};e.s(["KNOWN_CLI_IDS",0,["claude","codex","copilot","cursor","opencode","pi","hermes","openclaw","factory","devin","antigravity","goose"],"getCliBadgeClasses",0,function(e){return t[e]?.badgeClasses??t.claude.badgeClasses},"getCliLabel",0,function(e){return t[e]?.label??e},"isKnownCli",0,function(e){return"string"==typeof e&&Object.prototype.hasOwnProperty.call(t,e)}])},34713,e=>{"use strict";e.s(["formatDuration",0,function(e){if(e<1e3)return`${e}ms`;let t=Math.round(e/100);if(t<600)return`${(t/10).toFixed(1)}s`;let a=Math.round(e/1e3);if(a<3600){let e=Math.floor(a/60);return`${e}m ${a%60}s`}let r=Math.round(e/6e4),l=Math.floor(r/60);return`${l}h ${r%60}m`},"formatRelativeTime",0,function(e){let t=Date.now()-e;return t<6e4?`${Math.max(1,Math.floor(t/1e3))}s ago`:t<36e5?`${Math.floor(t/6e4)}m ago`:t<864e5?`${Math.floor(t/36e5)}h ago`:`${Math.floor(t/864e5)}d ago`}])},80060,2711,e=>{"use strict";var t=e.i(18566),a=e.i(71645);function r(e){let t=e.getFullYear(),a=String(e.getMonth()+1).padStart(2,"0"),r=String(e.getDate()).padStart(2,"0");return`${t}-${a}-${r}`}function l(e){var t;if(!e||(t=e,!/^\d{4}-\d{2}-\d{2}$/.test(t)||isNaN(Date.parse(t))))return null;let[a,r,l]=e.split("-").map(Number);return new Date(a,r-1,l,12,0,0)}e.s(["useUrlParams",0,function(){let e=(0,t.useSearchParams)(),r=(0,t.useRouter)(),l=(0,t.usePathname)(),o=(0,a.useRef)(null),s=(0,a.useCallback)(t=>e.get(t),[e]),i=(0,a.useCallback)(()=>new URLSearchParams(e.toString()),[e]),n=(0,a.useCallback)(t=>{o.current&&clearTimeout(o.current),o.current=setTimeout(()=>{let a=new URLSearchParams(e.toString());for(let[e,r]of Object.entries(t))void 0===r||""===r?a.delete(e):a.set(e,r);let o=a.toString(),s=o?`${l}?${o}`:l;r.replace(s,{scroll:!1})},150)},[e,l,r]);return(0,a.useEffect)(()=>()=>{o.current&&clearTimeout(o.current)},[]),{get:s,getAll:i,setAll:n}}],80060),e.s(["dateRangeToParams",0,function(e){let t={};return e.from&&(t.from=r(e.from)),e.to&&(t.to=r(e.to)),t},"keywordsToParam",0,function(e){if(0!==e.length)return e.map(e=>encodeURIComponent(e)).join(",")},"pageToParam",0,function(e){return e<=1?void 0:String(e)},"paramToKeywords",0,function(e){return e?e.split(",").map(e=>decodeURIComponent(e.trim())).filter(e=>e.length>0):[]},"paramToPage",0,function(e){if(!e)return 1;let t=parseInt(e,10);return Number.isFinite(t)&&t>=1?t:1},"paramToPreset",0,function(e){return e&&["all","last-hour","today","last-7-days","last-30-days","custom"].includes(e)?e:"all"},"paramsToDateRange",0,function(e,t){return{from:l(e),to:l(t)}},"presetToParam",0,function(e){return"all"===e?void 0:e}],2711)},89664,e=>{"use strict";var t=e.i(56420);let a={name:"check",size:24,node:[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]};a.node;let r=(0,t.default)(a);e.s(["Check",0,r],89664)},24071,e=>{"use strict";var t=e.i(56420);let a={name:"chevron-left",size:24,node:[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]};a.node;let r=(0,t.default)(a);e.s(["ChevronLeft",0,r],24071)},67927,e=>{"use strict";var t=e.i(56420);let a={name:"chevron-right",size:24,node:[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]};a.node;let r=(0,t.default)(a);e.s(["ChevronRight",0,r],67927)},8734,e=>{"use strict";var t=e.i(56420);let a={name:"copy",size:24,node:[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]};a.node;let r=(0,t.default)(a);e.s(["Copy",0,r],8734)},16306,e=>{"use strict";var t=e.i(56420);let a={name:"shield-alert",size:24,node:[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]]};a.node;let r=(0,t.default)(a);e.s(["ShieldAlert",0,r],16306)},84026,29407,e=>{"use strict";var t=e.i(56420);let a={name:"shield-check",size:24,node:[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]};a.node;let r=(0,t.default)(a);e.s(["ShieldCheck",0,r],84026);let l={name:"shield-x",size:24,node:[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m14.5 9.5-5 5",key:"17q4r4"}],["path",{d:"m9.5 9.5 5 5",key:"18nt4w"}]],aliases:["shield-close"]};l.node;let o=(0,t.default)(l);e.s(["ShieldX",0,o],29407)},82954,e=>{"use strict";var t=e.i(56420);let a={name:"shield",size:24,node:[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]]};a.node;let r=(0,t.default)(a);e.s(["Shield",0,r],82954)},63676,e=>{"use strict";var t=e.i(56420);let a={name:"x",size:24,node:[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]};a.node;let r=(0,t.default)(a);e.s(["X",0,r],63676)}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,64237,e=>{"use strict";var t=e.i(43476),s=e.i(71645),a=e.i(12344),n=e.i(29054);let i=/^[^\s@]+@[^\s@]+\.[^\s@]+$/;function l(e){if((0,n.isAbortError)(e))return"request timed out. check your network and try again.";let t=e instanceof Error?e.message:String(e);return`network error: ${t}`}e.s(["AuthDialog",0,function({open:e,headline:r="where to route the reminder?",subhead:o="we'll send a one-time code to confirm.",onClose:c,onAuthed:d,source:u="unknown"}){let{capture:h}=(0,a.usePostHog)(),[m,f]=(0,s.useState)({kind:"email",error:null}),[v,b]=(0,s.useState)(!1),p=(0,s.useRef)(!1),x=(0,s.useRef)(null),j=(0,s.useRef)(null);(0,s.useEffect)(()=>{e&&(f({kind:"email",error:null}),b(!1),p.current=!1,h("audit_auth_dialog_opened",{source:u}))},[h,e,u]);let w=(0,s.useRef)(!1);(0,s.useEffect)(()=>{if(e){w.current=!0;return}w.current&&!p.current&&h("audit_auth_dialog_dismissed",{source:u,step:m.kind}),w.current=!1},[h,e,u,m.kind]),(0,s.useEffect)(()=>{if(!e)return;let t=setTimeout(()=>{"email"===m.kind?x.current?.focus():"code"===m.kind&&j.current?.focus()},50);return()=>clearTimeout(t)},[e,m.kind]),(0,s.useEffect)(()=>{if(!e)return;let t=e=>{"Escape"!==e.key||v||c()};return window.addEventListener("keydown",t),()=>window.removeEventListener("keydown",t)},[e,v,c]);let g="code"===m.kind&&m.resendIn>0;(0,s.useEffect)(()=>{if(!g)return;let e=setInterval(()=>{f(e=>"code"===e.kind?{...e,resendIn:Math.max(0,e.resendIn-1)}:e)},1e3);return()=>clearInterval(e)},[g]);let y=(0,s.useCallback)(async(e,t={})=>{let{isResend:s=!1}=t,a=e=>{s?f(t=>"code"===t.kind?{...t,error:e}:t):f({kind:"email",error:e})};b(!0);try{let t=await (0,n.fetchWithTimeout)("/api/auth/login-request",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({email:e})}),s=await t.json().catch(()=>({}));if(!t.ok){let e=s.message??"could not send code.";"rate_limited"===s.code&&void 0!==s.retry_after_secs?e=`too many tries. wait ${s.retry_after_secs}s and try again.`:"upstream_unreachable"===s.code&&(e="api-server unreachable. check your network."),a(e);return}f({kind:"code",email:e,error:null,expiresIn:s.expires_in??600,resendIn:s.resend_available_in??30})}catch(e){a(l(e))}finally{b(!1)}},[]),k=(0,s.useCallback)(async(e,t)=>{b(!0);try{let s=await (0,n.fetchWithTimeout)("/api/auth/login-verify",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({email:e,code:t})}),a=await s.json().catch(()=>({}));if(!s.ok||!a.authenticated||!a.user){let e=a.message??"invalid code.";"invalid_code"===a.code&&(e="wrong code, or it expired. try again."),f(t=>"code"===t.kind?{...t,error:e}:t);return}p.current=!0,h("audit_auth_dialog_succeeded",{source:u}),f({kind:"done",user:a.user}),d(a.user)}catch(t){let e=l(t);f(t=>"code"===t.kind?{...t,error:e}:t)}finally{b(!1)}},[h,d,u]),N=(0,s.useCallback)(async e=>{if(e.preventDefault(),v||"email"!==m.kind)return;let t=String(new FormData(e.currentTarget).get("email")??"").trim().toLowerCase();i.test(t)?await y(t):f({kind:"email",error:"that doesn't look like an email."})},[v,m,y]),C=(0,s.useCallback)(async e=>{if(e.preventDefault(),v||"code"!==m.kind)return;let t=String(new FormData(e.currentTarget).get("code")??"").trim();t.length<4||t.length>12?f(e=>"code"===e.kind?{...e,error:"code is 4–12 characters."}:e):await k(m.email,t)},[v,m,k]),S=(0,s.useCallback)(async()=>{"code"!==m.kind||m.resendIn>0||v||await y(m.email,{isResend:!0})},[m,v,y]);return e?(0,t.jsx)("div",{className:"auth-dialog-backdrop",role:"dialog","aria-modal":"true","aria-labelledby":"auth-dialog-title",onClick:e=>{v||e.target!==e.currentTarget||c()},children:(0,t.jsxs)("div",{className:"auth-dialog",children:[(0,t.jsx)("button",{type:"button",className:"auth-close",onClick:c,disabled:v,"aria-label":"close",children:"×"}),(0,t.jsx)("h2",{id:"auth-dialog-title",className:"auth-headline",children:r}),"email"===m.kind&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("p",{className:"auth-sub",children:o}),(0,t.jsxs)("form",{onSubmit:N,className:"auth-form",children:[(0,t.jsx)("input",{ref:x,id:"auth-dialog-email",name:"email",type:"email",autoComplete:"email",inputMode:"email",spellCheck:!1,placeholder:"you@yourdomain.com",disabled:v,className:"auth-input",required:!0}),m.error&&(0,t.jsx)("div",{className:"auth-error",children:m.error}),(0,t.jsxs)("div",{className:"auth-actions",children:[(0,t.jsx)("button",{type:"submit",className:"auth-btn primary",disabled:v,children:v?"sending…":"send code"}),(0,t.jsx)("button",{type:"button",className:"auth-btn",onClick:c,disabled:v,children:"cancel"})]})]})]}),"code"===m.kind&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("p",{className:"auth-sub",children:["code sent to ",(0,t.jsx)("span",{className:"auth-email",children:m.email}),". expires in ",Math.ceil(m.expiresIn/60)," min."]}),(0,t.jsxs)("form",{onSubmit:C,className:"auth-form",children:[(0,t.jsx)("input",{ref:j,id:"auth-dialog-code",name:"code",type:"text",inputMode:"numeric",autoComplete:"one-time-code",spellCheck:!1,placeholder:"123456",disabled:v,className:"auth-input auth-input-code",maxLength:12,required:!0}),m.error&&(0,t.jsx)("div",{className:"auth-error",children:m.error}),(0,t.jsxs)("div",{className:"auth-actions",children:[(0,t.jsx)("button",{type:"submit",className:"auth-btn primary",disabled:v,children:v?"verifying…":"verify"}),(0,t.jsx)("button",{type:"button",className:"auth-btn",onClick:S,disabled:v||m.resendIn>0,children:m.resendIn>0?`resend in ${m.resendIn}s`:"resend code"})]}),(0,t.jsx)("button",{type:"button",className:"auth-back",onClick:()=>f({kind:"email",error:null}),disabled:v,children:"← use a different email"})]})]}),"done"===m.kind&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("p",{className:"auth-sub",children:[(0,t.jsx)("span",{className:"auth-ok",children:"✓"})," signed in as"," ",(0,t.jsx)("span",{className:"auth-email",children:m.user.email}),"."]}),(0,t.jsx)("div",{className:"auth-actions",children:(0,t.jsx)("button",{type:"button",className:"auth-btn primary",onClick:c,children:"continue"})})]})]})}):null}])},86616,e=>{"use strict";var t=e.i(29054);class s extends Error{kind;constructor(e,t){super(t),this.kind=e,this.name="RerunError"}}async function a(e){try{let a=await (0,t.fetchWithTimeout)("/api/audit/run",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({cli:e.cli.length>0?e.cli:void 0,since:"all"===e.since?void 0:e.since,noCache:!!e.noCache||void 0})});if(!a.ok&&409!==a.status){let e=await a.text().catch(()=>"");throw console.error("audit run failed:",a.status,e),new s("post_failed",`audit run failed (${a.status})`)}}catch(e){if(e instanceof s)throw e;throw console.error("audit run request failed:",e),new s((0,t.isAbortError)(e)?"timeout":"network","audit run request failed")}let a=0;for(;;){await new Promise(e=>setTimeout(e,1e3));let e=null;try{let s=await (0,t.fetchWithTimeout)("/api/audit/status",{cache:"no-store"});s.ok&&(e=await s.json())}catch{}if(null===e){if(++a>=10)throw new s("network","audit status poll lost the server");continue}if(a=0,!e.running){if(e.error)throw new s("post_failed",e.error);return}}}e.s(["RerunError",0,s,"triggerRun",0,a])},2917,e=>{"use strict";var t=e.i(43476),s=e.i(71645),a=e.i(95187);let n=(0,a.createServerReference)("00854ec9e90b56699593285b0ed4967ff5a920a8f9",a.callServer,void 0,a.findSourceMapURL,"getJevSettingsAction"),i=(0,a.createServerReference)("00d2f7e8ab18b31805268064ea3bca623cbe30a982",a.callServer,void 0,a.findSourceMapURL,"removeJevConfigAction"),l=(0,a.createServerReference)("40ab4f061fadc1c208771f481c6aa066694ca5c508",a.callServer,void 0,a.findSourceMapURL,"saveJevConfigAction"),r=(0,a.createServerReference)("4055d4ce76d28e7e3c730848d81f3b85af9328bb26",a.callServer,void 0,a.findSourceMapURL,"setJevModeAction");var o=e.i(55574);let c=[{value:"typesafe",label:"typesafe"},{value:"openrouter",label:"openrouter"},{value:"vercel",label:"vercel ai gateway"},{value:"cloudflare",label:"cloudflare workers ai"},{value:"custom",label:"custom endpoint"}],d=[{value:"enforce",label:"enforce — jev's verdict counts"},{value:"observe",label:"observe — log only, regex decides"},{value:"off",label:"off — keep this config, don't ask jev"}],u="failproofai";function h(e){return{provider:e.provider&&e.provider!==u?e.provider:"typesafe",baseUrl:e.baseUrl,accountId:e.accountId,mode:e.mode}}function m({id:e,label:s,hint:a,children:n}){return(0,t.jsxs)("div",{className:"set-field",children:[(0,t.jsx)("label",{className:"set-field-label",htmlFor:e,children:s}),n,a?(0,t.jsx)("span",{className:"set-hint",children:a}):null]})}e.s(["default",0,function({initial:e}){var a,f,v;let b,[p,x]=(0,s.useState)(e),[j,w]=(0,s.useState)(e?h(e):{provider:"typesafe",baseUrl:"",accountId:"",mode:"enforce"}),[g,y]=(0,s.useState)(""),[k,N]=(0,s.useState)(!1),[C,S]=(0,s.useState)(null),[A,M]=(0,s.useState)(!1),$=(0,s.useRef)(!0),E=(0,s.useRef)(!1),I=(0,s.useCallback)(async()=>{try{let e=await n();if(!$.current)return;x(e),E.current||w(h(e))}catch{}},[]);(0,s.useEffect)(()=>($.current=!0,I(),()=>{$.current=!1}),[I]),(0,s.useEffect)(()=>{let e=()=>void I();return window.addEventListener("focus",e),document.addEventListener("visibilitychange",e),()=>{window.removeEventListener("focus",e),document.removeEventListener("visibilitychange",e)}},[I]);let R=(0,s.useCallback)((e,t)=>{E.current=!0,w(s=>({...s,[e]:t}))},[]),_=(0,s.useCallback)(async()=>{N(!0),S(null);try{let e=await l({provider:j.provider,baseUrl:j.baseUrl,accountId:j.accountId,mode:j.mode,token:g});if(!e.ok){S(e.problem),M(!0===e.needsToken);return}E.current=!1,M(!1),y(""),x(e.view),w(h(e.view)),(0,o.toast)(e.view.on?"jev is on.":"saved.")}catch{S("could not save that.")}finally{N(!1)}},[j,g]),D=(0,s.useCallback)(async e=>{N(!0),S(null);try{let t=await r(e);if(!t.ok)return void S(t.problem);E.current=!1,x(t.view),w(h(t.view)),(0,o.toast)("off"===e?"jev is off. hooks run the regex policies.":`jev is on, in ${e} mode.`)}catch{S("could not switch that.")}finally{N(!1)}},[]),F=(0,s.useCallback)(async()=>{N(!0),S(null),M(!1);try{let e=await i();if(!e.ok)return void S(e.problem);E.current=!1,y(""),x(e.view),w(h(e.view)),(0,o.toast)("jev is off. hooks run the regex policies.")}catch{S("could not turn that off.")}finally{N(!1)}},[]),L=null!==p&&"absent"!==p.status,T=p?.provider===u,U=p?.token,O=A?"needed for this save — type the token for this endpoint":U?"cloud"===U.source?"from this machine's FailproofAI Cloud connection":"env"===U.source?"configured, read from the environment — leave blank to keep it":"configured — leave blank to keep it":p?.status==="key-missing"?"read from the environment, which is not set in this shell — leave blank to keep it that way":"sent as a bearer token; stored owner-only at 0600";return(0,t.jsxs)("div",{className:"set-cell set-jev",children:[(0,t.jsx)("h2",{className:"set-cell-title",children:"jev · semantic evaluation"}),(0,t.jsx)("div",{className:"set-row set-row-main",children:(0,t.jsxs)("div",{className:"set-row-copy",children:[(0,t.jsx)("span",{className:p?.on?"set-strong":"set-dim",children:null===p?"reading…":p.on?`on. every judged command is also asked of ${(a=p.provider)===u?"FailproofAI Cloud":a??""}.`:"off"===p.status?"off — switched off. hooks run the regex policies exactly as before.":"not-connected"===p.status?"off — this machine is not connected to FailproofAI Cloud. hooks run the regex policies.":"key-lacks-jev"===p.status?"off — no jev key is stored for this machine's FailproofAI Cloud connection. hooks run the regex policies.":"key-missing"===p.status?"off for this dashboard — FAILPROOFAI_JEV_API_KEY is not set in its environment. hooks run the regex policies wherever it is unset, including under the daemon; a session that sets it still consults jev.":"off. hooks run the regex policies exactly as before."}),(0,t.jsx)("span",{className:"set-dim",children:p?.on?"observe"===p.mode?"observe: jev's answers are logged, the regex result is what gets enforced.":"enforce: jev's answers can clear a reviewable deny.":T?"through FailproofAI Cloud, on your org's plan — no endpoint or token of your own.":"a second opinion on the commands the regex policies flag. needs your own endpoint and token."})]})}),p&&(0,t.jsx)("dl",{className:"set-how-list set-jev-cloud",children:(0,t.jsxs)("div",{className:"set-how-row",children:[(0,t.jsx)("dt",{className:"set-how-label",children:"FailproofAI Cloud connection"}),(0,t.jsx)("dd",{className:"set-how-body",children:function(e){if(!e||!e.connected)return e?.jev==="yes"?"a jev key is stored, but no connection is":"not connected";let t=e.org??e.host??"connected",s="yes"===e.jev?"key carries jev":"refused"===e.jev?"jev key refused — credentials.json is not owner-only":"no jev key stored";return`connected to ${t} \xb7 ${s}`}(p.cloud)})]})}),p&&L&&(0,t.jsxs)("dl",{className:"set-how-list",children:[T&&(0,t.jsxs)("div",{className:"set-how-row",children:[(0,t.jsx)("dt",{className:"set-how-label",children:"provider"}),(0,t.jsx)("dd",{className:"set-how-body",children:p.cloud?.host?`FailproofAI Cloud \xb7 ${p.cloud.host}`:"FailproofAI Cloud"})]}),(0,t.jsxs)("div",{className:"set-how-row",children:[(0,t.jsx)("dt",{className:"set-how-label",children:"model"}),(0,t.jsx)("dd",{className:"set-how-body",children:function(e){switch(e.kind){case"id":return e.id;case"withheld":return"set to something that is not a model id — not shown here, in case it is a key";default:return"the provider's default"}}(p.model)})]}),(0,t.jsxs)("div",{className:"set-how-row",children:[(0,t.jsx)("dt",{className:"set-how-label",children:"token"}),(0,t.jsx)("dd",{className:"set-how-body",children:U?"cloud"===U.source?"FailproofAI Cloud connection":"env"===U.source?"from FAILPROOFAI_JEV_API_KEY":"configured":T?p.cloud?.connected?"none stored for this connection":"none — this machine is not connected":"none stored"})]}),p.reviewable&&(0,t.jsxs)("div",{className:"set-how-row",children:[(0,t.jsx)("dt",{className:"set-how-label",children:"reviewable"}),(0,t.jsx)("dd",{className:"set-how-body",children:p.reviewable.summary})]}),p.stats&&p.stats.total>0&&(0,t.jsxs)("div",{className:"set-how-row",children:[(0,t.jsx)("dt",{className:"set-how-label",children:"fallbacks"}),(0,t.jsx)("dd",{className:"set-how-body",children:`${(f=p.stats.fallbackRate,`${Math.round(100*f)}%`)} of ${p.stats.total} calls in the last ${Number.isInteger(b=(v=p.stats.windowMs)/36e5)&&b>=1?b%24==0?`${b/24}d`:`${b}h`:`${Math.max(1,Math.round(v/6e4))}m`} fell back to the regex engine.`})]})]}),p?.problem&&(0,t.jsxs)("p",{className:"set-warn",children:[p.problem,p.fix?` — ${p.fix}`:""]}),p?.reviewable?.problem&&(0,t.jsx)("p",{className:"set-warn",children:p.reviewable.problem}),(0,t.jsx)("div",{className:"set-rule"}),T?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"set-jev-fields",children:(0,t.jsx)(m,{id:"jev-cloud-mode",label:"mode",hint:"the endpoint and key come from this machine's FailproofAI Cloud connection",children:(0,t.jsx)("select",{id:"jev-cloud-mode",className:"set-select",value:p?.mode==="enforce"?"enforce":"observe",disabled:k||p?.mode==="off",onChange:e=>void D("enforce"===e.target.value?"enforce":"observe"),children:d.filter(e=>"off"!==e.value).map(e=>(0,t.jsx)("option",{value:e.value,children:e.label},e.value))})})}),C&&(0,t.jsx)("p",{className:"set-warn",children:C}),(0,t.jsx)("div",{className:"set-actions set-jev-actions",children:(0,t.jsx)("button",{type:"button",className:"btn btn-press",disabled:k,onClick:()=>void D(p?.mode==="off"?"observe":"off"),children:k?"[ switching… ]":p?.mode==="off"?"[ turn jev on ]":"[ turn jev off ]"})})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"set-jev-fields",children:[(0,t.jsx)(m,{id:"jev-provider",label:"provider",children:(0,t.jsx)("select",{id:"jev-provider",className:"set-select",value:j.provider,disabled:k,onChange:e=>R("provider",e.target.value),children:c.map(e=>(0,t.jsx)("option",{value:e.value,children:e.label},e.value))})}),(0,t.jsx)(m,{id:"jev-url",label:"endpoint url",hint:["custom"===j.provider?"required — https, or http to localhost in observe mode":"leave blank for the provider's own api",p?.baseUrlQueryWithheld?"the stored url's query string is not shown here — leave the url as it is to keep it":null].filter(Boolean).join(" · "),children:(0,t.jsx)("input",{id:"jev-url",type:"text",className:"set-text",inputMode:"url",autoComplete:"off",spellCheck:!1,placeholder:"custom"===j.provider?"https://…":"the provider's own api",value:j.baseUrl,disabled:k,onChange:e=>R("baseUrl",e.target.value)})}),"cloudflare"===j.provider&&(0,t.jsx)(m,{id:"jev-account",label:"account id",hint:"32 lowercase hex characters",children:(0,t.jsx)("input",{id:"jev-account",type:"text",className:"set-text",autoComplete:"off",spellCheck:!1,value:j.accountId,disabled:k,onChange:e=>R("accountId",e.target.value)})}),(0,t.jsx)(m,{id:"jev-token",label:"token",hint:O,children:(0,t.jsx)("input",{id:"jev-token",type:"password",className:"set-text",autoComplete:"off",spellCheck:!1,placeholder:U?"•••• kept":"",value:g,disabled:k,"aria-invalid":A||void 0,onChange:e=>{E.current=!0,y(e.target.value)}})}),(0,t.jsx)(m,{id:"jev-mode",label:"mode",children:(0,t.jsx)("select",{id:"jev-mode",className:"set-select",value:j.mode,disabled:k,onChange:e=>R("mode",e.target.value),children:d.map(e=>(0,t.jsx)("option",{value:e.value,children:e.label},e.value))})})]}),C&&(0,t.jsx)("p",{className:"set-warn",children:C}),(0,t.jsxs)("div",{className:"set-actions set-jev-actions",children:[(0,t.jsx)("button",{type:"button",className:"btn btn-press",disabled:k,onClick:()=>void _(),children:k?"[ saving… ]":L?"[ save changes ]":"[ turn jev on ]"}),L&&(0,t.jsx)("button",{type:"button",className:"set-link",disabled:k,onClick:()=>void F(),children:"turn jev off"})]})]})]})}],2917)},93237,e=>{"use strict";var t=e.i(43476),s=e.i(71645),a=e.i(95187);let n=(0,a.createServerReference)("007cb04a000f802db12d1e2a647f435278fccef0ea",a.callServer,void 0,a.findSourceMapURL,"getScheduledAuditAction"),i=(0,a.createServerReference)("40a4ae25d47a986e9c1468503e4a906972a1b971bd",a.callServer,void 0,a.findSourceMapURL,"setAutoAuditAction"),l=(0,a.createServerReference)("40c5990e94d058100d3aaba5f3a52aaca6e1ead947",a.callServer,void 0,a.findSourceMapURL,"setAuditIntervalAction");var r=e.i(86616),o=e.i(64237),c=e.i(55574),d=e.i(34713);function u(e){return new Date(e).toLocaleString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}function h(e,t){let s=e-t;if(s<=0)return"now";let a=Math.floor(s/864e5),n=Math.floor(s%864e5/36e5);return a>0?n>0?`${a}d ${n}h`:`${a}d`:n>0?`${n}h`:`${Math.max(1,Math.floor(s/6e4))}m`}function m(e){return e.toLocaleString("en-US")}function f({label:e,value:s,sub:a,tone:n}){return(0,t.jsxs)("div",{className:"set-stat",children:[(0,t.jsx)("div",{className:"set-stat-label",children:e}),(0,t.jsx)("div",{className:`set-stat-value${n?` ${n}`:""}`,children:s}),(0,t.jsx)("div",{className:"set-stat-sub",children:a??" "})]})}function v({lastRunAtMs:e,nextDueAtMs:s,now:a}){if(null==e||null==s||s<=e)return null;let n=Math.min(100,Math.max(0,(a-e)/(s-e)*100));return(0,t.jsxs)("div",{className:"tape","aria-hidden":"true",children:[(0,t.jsxs)("div",{className:"tape-rail",children:[(0,t.jsx)("div",{className:"tape-fill",style:{width:`${n}%`}}),(0,t.jsx)("div",{className:"tape-now",style:{left:`${n}%`}})]}),(0,t.jsxs)("div",{className:"tape-ends",children:[(0,t.jsxs)("span",{children:["last scan · ",u(e)]}),(0,t.jsxs)("span",{className:"tape-next",children:["next · ",h(s,a)]})]})]})}function b({enabled:e,onChange:s,disabled:a,label:n}){return(0,t.jsx)("button",{type:"button",role:"switch","aria-checked":e,"aria-label":n,disabled:a,onClick:s,className:"sw","data-on":e?"true":"false",children:(0,t.jsx)("span",{className:"sw-knob"})})}let p=[{label:"reads",body:"every session transcript on disk — your prompts, the files your agents read and wrote, and command output."},{label:"runs",body:"entirely on this machine. the transcripts never leave it."},{label:"sends",body:"counts, redacted examples, and this machine's name — and only when a scan finds something harmful."}];e.s(["default",0,function({initial:e,jevPanel:a}){let[x,j]=(0,s.useState)(e),[w,g]=(0,s.useState)(e?.auto??!1),[y,k]=(0,s.useState)(e?.intervalDays??7),[N,C]=(0,s.useState)(!1),[S,A]=(0,s.useState)(!1),[M,$]=(0,s.useState)(!1),[E,I]=(0,s.useState)(null===e),[R,_]=(0,s.useState)(0),D=(0,s.useRef)(!0),F=(0,s.useRef)(null!==e),L=(0,s.useCallback)(async()=>{try{let e=await n();if(!D.current)return;j(e),F.current=!0,g(e.auto),k(e.intervalDays),_(Date.now()),I(!1)}catch{D.current&&!F.current&&I(!0)}},[]);(0,s.useEffect)(()=>(D.current=!0,L(),()=>{D.current=!1}),[L]),(0,s.useEffect)(()=>{let e=()=>void L();return window.addEventListener("focus",e),document.addEventListener("visibilitychange",e),()=>{window.removeEventListener("focus",e),document.removeEventListener("visibilitychange",e)}},[L]);let T=x?.signedInAs??null,U=x?.daemon==="running",O=x?.daemon==="unsupported-platform",P=x?.schedule??null,J=x?.lastScan??null,q=P?.lastExitCode!=null&&0!==P.lastExitCode&&75!==P.lastExitCode,W=(0,s.useCallback)(async()=>{C(!0);try{let e=await i(!0);if(!e.ok){if(g(!1),"unreachable"===e.reason)return void(0,c.toast)("could not reach the server. check your connection and try again.");await L(),$(!0),(0,c.toast)("that sign-in expired. one more code and it's on.");return}g(e.auto),(0,c.toast)("scheduled audits on."),await L()}catch{g(!1),(0,c.toast)("could not turn that on.")}finally{C(!1)}},[L]),B=(0,s.useCallback)(async()=>{if(w){C(!0);try{let e=await i(!1);e.ok&&g(e.auto),(0,c.toast)("scheduled audits off."),await L()}catch{(0,c.toast)("could not turn that off.")}finally{C(!1)}return}T?await W():$(!0)},[w,W,L,T]),K=(0,s.useCallback)(async e=>{C(!0);try{let t=await l(e);k(t.intervalDays),j(e=>e?{...e,intervalDays:t.intervalDays}:e),(0,c.toast)(`scanning every ${t.intervalDays} day${1===t.intervalDays?"":"s"}.`)}catch{k(x?.intervalDays??7),(0,c.toast)("could not save that.")}finally{C(!1)}},[x?.intervalDays]),V=(0,s.useCallback)(async()=>{C(!0);try{await fetch("/api/auth/logout",{method:"POST"}),(0,c.toast)("signed out. scans continue; digests pause."),await L()}catch{(0,c.toast)("could not sign out.")}finally{C(!1)}},[L]),Y=(0,s.useCallback)(async()=>{if(!S){A(!0);try{await (0,r.triggerRun)({cli:[],since:"all",noCache:!1}),(0,c.toast)("scan complete."),await L()}catch(e){(0,c.toast)(e instanceof r.RerunError&&"timeout"===e.kind?"the scan is taking a while — it will finish in the background.":"the scan could not be completed.")}finally{A(!1)}}},[L,S]),H=(0,s.useCallback)(async e=>{$(!1),await L(),await W()},[W,L]),Q=x?U?{value:"running",sub:null!=x.daemonStartedAtMs&&R>0?`up ${function(e){let t=Math.floor(e/864e5);if(t>0)return`${t}d`;let s=Math.floor(e/36e5);return s>0?`${s}h`:`${Math.max(1,Math.floor(e/6e4))}m`}(Math.max(0,R-x.daemonStartedAtMs))}`:"",tone:"ok"}:O?{value:"unavailable",sub:"not on this platform"}:"not-installed"===x.daemon?{value:"not installed",sub:"run failproofai config",tone:"warn"}:"unknown"===x.daemon?{value:"unknown",sub:"could not read it"}:{value:"stopped",sub:"run failproofai config",tone:"warn"}:{value:"…",sub:"reading"},z=w?P?.nextDueAtMs==null?{value:"pending",sub:"after the next scan"}:{value:R>0?h(P.nextDueAtMs,R):"—",sub:u(P.nextDueAtMs)}:{value:"off",sub:"nothing scheduled"},G=J?{value:(0,d.formatRelativeTime)(Date.parse(J.finishedAt)),sub:null!=J.sessionsScanned?`${m(J.sessionsScanned)} sessions`:"scanned"}:{value:"none yet",sub:"run one below"},X=J?null==J.findings?{value:"—",sub:"unreadable"}:{value:m(J.findings),sub:"this scan",...J.findings>0?{tone:"warn"}:{}}:{value:"—",sub:"no scan yet"};return(0,t.jsxs)("main",{className:"report",children:[(0,t.jsxs)("section",{className:"section set-sec",children:[(0,t.jsxs)("div",{className:"set-mast",children:[(0,t.jsx)("h1",{className:"set-title",children:"settings"}),(0,t.jsx)("p",{className:"set-lede",children:"keeping watch, so you don't have to."})]}),E?(0,t.jsxs)("div",{className:"set-console",children:[(0,t.jsx)("div",{className:"set-cell",children:(0,t.jsxs)("p",{className:"set-warn",children:["could not read this machine's settings. check that the dashboard can reach ",(0,t.jsx)("code",{children:"~/.failproofai/config.json"}),"."]})}),a]}):(0,t.jsxs)("div",{className:"set-console",children:[(0,t.jsxs)("div",{className:"set-stats",children:[(0,t.jsx)(f,{label:"daemon",...Q}),(0,t.jsx)(f,{label:"next scan",...z}),(0,t.jsx)(f,{label:"last scan",...G}),(0,t.jsx)(f,{label:"findings",...X})]}),(0,t.jsxs)("div",{className:"set-cols",children:[(0,t.jsxs)("div",{className:"set-cell set-config",children:[(0,t.jsx)("h2",{className:"set-cell-title",children:"scheduled audit"}),(0,t.jsxs)("div",{className:"set-row set-row-main",children:[(0,t.jsx)(b,{enabled:w,disabled:N||null===x,onChange:()=>void B(),label:w?"turn off scheduled audits":"turn on scheduled audits"}),(0,t.jsxs)("div",{className:"set-row-copy",children:[(0,t.jsx)("span",{className:"set-strong",children:w?"scanning on a schedule.":"scan on a schedule."}),(0,t.jsx)("span",{className:"set-dim",children:w?"you'll get an email only when a scan finds something.":"off. nothing runs and nothing is sent."})]})]}),(0,t.jsxs)("div",{className:"set-row set-row-interval",children:[(0,t.jsx)("span",{className:"set-dim",children:"scan every"}),(0,t.jsx)("input",{type:"number",className:"set-num",min:1,max:90,value:y,disabled:N||null===x,"aria-label":"days between scheduled scans",onChange:e=>k(Number(e.target.value)),onBlur:e=>{let t=Number(e.target.value);Number.isFinite(t)?t!==x?.intervalDays&&K(t):k(x?.intervalDays??7)}}),(0,t.jsx)("span",{className:"set-dim",children:"days"}),(0,t.jsxs)("span",{className:"set-hint",children:[1,"–",90]})]}),(0,t.jsx)("div",{className:"set-rule"}),(0,t.jsx)("div",{className:"set-row set-row-identity",children:T?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"set-dim",children:"reports go to"}),(0,t.jsx)("span",{className:"set-email",children:T.email}),(0,t.jsx)("button",{type:"button",className:"set-link",disabled:N,onClick:()=>void V(),children:"sign out"})]}):w?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"set-warn",children:"signed out — scans continue, digests are paused."}),(0,t.jsx)("button",{type:"button",className:"set-link",disabled:N,onClick:()=>$(!0),children:"sign in to resume"})]}):(0,t.jsx)("span",{className:"set-dim",children:"turning this on asks for an email, so there is somewhere to send the report."})}),w&&x&&!U&&(0,t.jsx)("p",{className:"set-warn",children:O?"the background service isn't available on this platform, so scheduled scans can't run here. you can still run one now.":"not-installed"===x.daemon?"the background service isn't installed, so nothing will run on the timer. install it with `failproofai config`.":"the background service is stopped, so nothing will run until it starts. repair it with `failproofai config`."}),q&&(0,t.jsxs)("p",{className:"set-warn",children:["the last scheduled scan exited ",P?.lastExitCode,". the next one will still run."]}),(0,t.jsx)("div",{className:"set-actions",children:(0,t.jsx)("button",{type:"button",className:"btn btn-press",disabled:S,onClick:()=>void Y(),children:S?"[ scanning… ]":"[ run a scan now ]"})})]}),(0,t.jsxs)("div",{className:"set-cell set-how",children:[(0,t.jsx)("h2",{className:"set-cell-title",children:"how it works"}),(0,t.jsx)("dl",{className:"set-how-list",children:p.map(e=>(0,t.jsxs)("div",{className:"set-how-row",children:[(0,t.jsx)("dt",{className:"set-how-label",children:e.label}),(0,t.jsx)("dd",{className:"set-how-body",children:e.body})]},e.label))})]})]}),a]}),w&&R>0&&(0,t.jsx)(v,{lastRunAtMs:P?.lastRunAtMs??null,nextDueAtMs:P?.nextDueAtMs??null,now:R})]}),(0,t.jsx)(o.AuthDialog,{open:M,source:"settings_scheduled_audit",headline:"where should the report go?",subhead:"we'll send a one-time code to confirm.",onClose:()=>$(!1),onAuthed:e=>void H(e)})]})}],93237)},29054,e=>{"use strict";e.s(["fetchWithTimeout",0,function(e,t={},s=15e3){let a=AbortSignal.timeout(s),n=t.signal?AbortSignal.any([t.signal,a]):a;return fetch(e,{...t,signal:n})},"isAbortError",0,function(e){if(null===e||"object"!=typeof e)return!1;let t=e.name;return"AbortError"===t||"TimeoutError"===t}])},34713,e=>{"use strict";e.s(["formatDuration",0,function(e){if(e<1e3)return`${e}ms`;let t=Math.round(e/100);if(t<600)return`${(t/10).toFixed(1)}s`;let s=Math.round(e/1e3);if(s<3600){let e=Math.floor(s/60);return`${e}m ${s%60}s`}let a=Math.round(e/6e4),n=Math.floor(a/60);return`${n}h ${a%60}m`},"formatRelativeTime",0,function(e){let t=Date.now()-e;return t<6e4?`${Math.max(1,Math.floor(t/1e3))}s ago`:t<36e5?`${Math.floor(t/6e4)}m ago`:t<864e5?`${Math.floor(t/36e5)}h ago`:`${Math.floor(t/864e5)}d ago`}])}]);
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,64237,e=>{"use strict";var t=e.i(43476),s=e.i(71645),a=e.i(12344),n=e.i(29054);let i=/^[^\s@]+@[^\s@]+\.[^\s@]+$/;function l(e){if((0,n.isAbortError)(e))return"request timed out. check your network and try again.";let t=e instanceof Error?e.message:String(e);return`network error: ${t}`}e.s(["AuthDialog",0,function({open:e,headline:r="where to route the reminder?",subhead:o="we'll send a one-time code to confirm.",onClose:c,onAuthed:d,source:u="unknown"}){let{capture:h}=(0,a.usePostHog)(),[m,f]=(0,s.useState)({kind:"email",error:null}),[v,b]=(0,s.useState)(!1),p=(0,s.useRef)(!1),x=(0,s.useRef)(null),j=(0,s.useRef)(null);(0,s.useEffect)(()=>{e&&(f({kind:"email",error:null}),b(!1),p.current=!1,h("audit_auth_dialog_opened",{source:u}))},[h,e,u]);let w=(0,s.useRef)(!1);(0,s.useEffect)(()=>{if(e){w.current=!0;return}w.current&&!p.current&&h("audit_auth_dialog_dismissed",{source:u,step:m.kind}),w.current=!1},[h,e,u,m.kind]),(0,s.useEffect)(()=>{if(!e)return;let t=setTimeout(()=>{"email"===m.kind?x.current?.focus():"code"===m.kind&&j.current?.focus()},50);return()=>clearTimeout(t)},[e,m.kind]),(0,s.useEffect)(()=>{if(!e)return;let t=e=>{"Escape"!==e.key||v||c()};return window.addEventListener("keydown",t),()=>window.removeEventListener("keydown",t)},[e,v,c]);let g="code"===m.kind&&m.resendIn>0;(0,s.useEffect)(()=>{if(!g)return;let e=setInterval(()=>{f(e=>"code"===e.kind?{...e,resendIn:Math.max(0,e.resendIn-1)}:e)},1e3);return()=>clearInterval(e)},[g]);let y=(0,s.useCallback)(async(e,t={})=>{let{isResend:s=!1}=t,a=e=>{s?f(t=>"code"===t.kind?{...t,error:e}:t):f({kind:"email",error:e})};b(!0);try{let t=await (0,n.fetchWithTimeout)("/api/auth/login-request",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({email:e})}),s=await t.json().catch(()=>({}));if(!t.ok){let e=s.message??"could not send code.";"rate_limited"===s.code&&void 0!==s.retry_after_secs?e=`too many tries. wait ${s.retry_after_secs}s and try again.`:"upstream_unreachable"===s.code&&(e="api-server unreachable. check your network."),a(e);return}f({kind:"code",email:e,error:null,expiresIn:s.expires_in??600,resendIn:s.resend_available_in??30})}catch(e){a(l(e))}finally{b(!1)}},[]),k=(0,s.useCallback)(async(e,t)=>{b(!0);try{let s=await (0,n.fetchWithTimeout)("/api/auth/login-verify",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({email:e,code:t})}),a=await s.json().catch(()=>({}));if(!s.ok||!a.authenticated||!a.user){let e=a.message??"invalid code.";"invalid_code"===a.code&&(e="wrong code, or it expired. try again."),f(t=>"code"===t.kind?{...t,error:e}:t);return}p.current=!0,h("audit_auth_dialog_succeeded",{source:u}),f({kind:"done",user:a.user}),d(a.user)}catch(t){let e=l(t);f(t=>"code"===t.kind?{...t,error:e}:t)}finally{b(!1)}},[h,d,u]),N=(0,s.useCallback)(async e=>{if(e.preventDefault(),v||"email"!==m.kind)return;let t=String(new FormData(e.currentTarget).get("email")??"").trim().toLowerCase();i.test(t)?await y(t):f({kind:"email",error:"that doesn't look like an email."})},[v,m,y]),C=(0,s.useCallback)(async e=>{if(e.preventDefault(),v||"code"!==m.kind)return;let t=String(new FormData(e.currentTarget).get("code")??"").trim();t.length<4||t.length>12?f(e=>"code"===e.kind?{...e,error:"code is 4–12 characters."}:e):await k(m.email,t)},[v,m,k]),S=(0,s.useCallback)(async()=>{"code"!==m.kind||m.resendIn>0||v||await y(m.email,{isResend:!0})},[m,v,y]);return e?(0,t.jsx)("div",{className:"auth-dialog-backdrop",role:"dialog","aria-modal":"true","aria-labelledby":"auth-dialog-title",onClick:e=>{v||e.target!==e.currentTarget||c()},children:(0,t.jsxs)("div",{className:"auth-dialog",children:[(0,t.jsx)("button",{type:"button",className:"auth-close",onClick:c,disabled:v,"aria-label":"close",children:"×"}),(0,t.jsx)("h2",{id:"auth-dialog-title",className:"auth-headline",children:r}),"email"===m.kind&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("p",{className:"auth-sub",children:o}),(0,t.jsxs)("form",{onSubmit:N,className:"auth-form",children:[(0,t.jsx)("input",{ref:x,id:"auth-dialog-email",name:"email",type:"email",autoComplete:"email",inputMode:"email",spellCheck:!1,placeholder:"you@yourdomain.com",disabled:v,className:"auth-input",required:!0}),m.error&&(0,t.jsx)("div",{className:"auth-error",children:m.error}),(0,t.jsxs)("div",{className:"auth-actions",children:[(0,t.jsx)("button",{type:"submit",className:"auth-btn primary",disabled:v,children:v?"sending…":"send code"}),(0,t.jsx)("button",{type:"button",className:"auth-btn",onClick:c,disabled:v,children:"cancel"})]})]})]}),"code"===m.kind&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("p",{className:"auth-sub",children:["code sent to ",(0,t.jsx)("span",{className:"auth-email",children:m.email}),". expires in ",Math.ceil(m.expiresIn/60)," min."]}),(0,t.jsxs)("form",{onSubmit:C,className:"auth-form",children:[(0,t.jsx)("input",{ref:j,id:"auth-dialog-code",name:"code",type:"text",inputMode:"numeric",autoComplete:"one-time-code",spellCheck:!1,placeholder:"123456",disabled:v,className:"auth-input auth-input-code",maxLength:12,required:!0}),m.error&&(0,t.jsx)("div",{className:"auth-error",children:m.error}),(0,t.jsxs)("div",{className:"auth-actions",children:[(0,t.jsx)("button",{type:"submit",className:"auth-btn primary",disabled:v,children:v?"verifying…":"verify"}),(0,t.jsx)("button",{type:"button",className:"auth-btn",onClick:S,disabled:v||m.resendIn>0,children:m.resendIn>0?`resend in ${m.resendIn}s`:"resend code"})]}),(0,t.jsx)("button",{type:"button",className:"auth-back",onClick:()=>f({kind:"email",error:null}),disabled:v,children:"← use a different email"})]})]}),"done"===m.kind&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("p",{className:"auth-sub",children:[(0,t.jsx)("span",{className:"auth-ok",children:"✓"})," signed in as"," ",(0,t.jsx)("span",{className:"auth-email",children:m.user.email}),"."]}),(0,t.jsx)("div",{className:"auth-actions",children:(0,t.jsx)("button",{type:"button",className:"auth-btn primary",onClick:c,children:"continue"})})]})]})}):null}])},86616,e=>{"use strict";var t=e.i(29054);class s extends Error{kind;constructor(e,t){super(t),this.kind=e,this.name="RerunError"}}async function a(e){try{let a=await (0,t.fetchWithTimeout)("/api/audit/run",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({cli:e.cli.length>0?e.cli:void 0,since:"all"===e.since?void 0:e.since,noCache:!!e.noCache||void 0})});if(!a.ok&&409!==a.status){let e=await a.text().catch(()=>"");throw console.error("audit run failed:",a.status,e),new s("post_failed",`audit run failed (${a.status})`)}}catch(e){if(e instanceof s)throw e;throw console.error("audit run request failed:",e),new s((0,t.isAbortError)(e)?"timeout":"network","audit run request failed")}let a=0;for(;;){await new Promise(e=>setTimeout(e,1e3));let e=null;try{let s=await (0,t.fetchWithTimeout)("/api/audit/status",{cache:"no-store"});s.ok&&(e=await s.json())}catch{}if(null===e){if(++a>=10)throw new s("network","audit status poll lost the server");continue}if(a=0,!e.running){if(e.error)throw new s("post_failed",e.error);return}}}e.s(["RerunError",0,s,"triggerRun",0,a])},2917,e=>{"use strict";var t=e.i(43476),s=e.i(71645),a=e.i(95187);let n=(0,a.createServerReference)("00d5f65b37d57994d102a4795b97639ca80427d9b6",a.callServer,void 0,a.findSourceMapURL,"getJevSettingsAction"),i=(0,a.createServerReference)("00ad1de5b7a8b620e935e581a6d40c492ac90de5e0",a.callServer,void 0,a.findSourceMapURL,"removeJevConfigAction"),l=(0,a.createServerReference)("40c3674bfdb44a95095fda0a0268a03bf6f7b246fb",a.callServer,void 0,a.findSourceMapURL,"saveJevConfigAction"),r=(0,a.createServerReference)("40bd7ee875eebd400ed297b4dbb64db1feed4356aa",a.callServer,void 0,a.findSourceMapURL,"setJevModeAction");var o=e.i(55574);let c=[{value:"typesafe",label:"typesafe"},{value:"openrouter",label:"openrouter"},{value:"vercel",label:"vercel ai gateway"},{value:"cloudflare",label:"cloudflare workers ai"},{value:"custom",label:"custom endpoint"}],d=[{value:"enforce",label:"enforce — jev's verdict counts"},{value:"observe",label:"observe — log only, regex decides"},{value:"off",label:"off — keep this config, don't ask jev"}],u="failproofai";function h(e){return{provider:e.provider&&e.provider!==u?e.provider:"typesafe",baseUrl:e.baseUrl,accountId:e.accountId,mode:e.mode}}function m({id:e,label:s,hint:a,children:n}){return(0,t.jsxs)("div",{className:"set-field",children:[(0,t.jsx)("label",{className:"set-field-label",htmlFor:e,children:s}),n,a?(0,t.jsx)("span",{className:"set-hint",children:a}):null]})}e.s(["default",0,function({initial:e}){var a,f,v;let b,[p,x]=(0,s.useState)(e),[j,w]=(0,s.useState)(e?h(e):{provider:"typesafe",baseUrl:"",accountId:"",mode:"enforce"}),[g,y]=(0,s.useState)(""),[k,N]=(0,s.useState)(!1),[C,S]=(0,s.useState)(null),[A,M]=(0,s.useState)(!1),$=(0,s.useRef)(!0),E=(0,s.useRef)(!1),I=(0,s.useCallback)(async()=>{try{let e=await n();if(!$.current)return;x(e),E.current||w(h(e))}catch{}},[]);(0,s.useEffect)(()=>($.current=!0,I(),()=>{$.current=!1}),[I]),(0,s.useEffect)(()=>{let e=()=>void I();return window.addEventListener("focus",e),document.addEventListener("visibilitychange",e),()=>{window.removeEventListener("focus",e),document.removeEventListener("visibilitychange",e)}},[I]);let R=(0,s.useCallback)((e,t)=>{E.current=!0,w(s=>({...s,[e]:t}))},[]),_=(0,s.useCallback)(async()=>{N(!0),S(null);try{let e=await l({provider:j.provider,baseUrl:j.baseUrl,accountId:j.accountId,mode:j.mode,token:g});if(!e.ok){S(e.problem),M(!0===e.needsToken);return}E.current=!1,M(!1),y(""),x(e.view),w(h(e.view)),(0,o.toast)(e.view.on?"jev is on.":"saved.")}catch{S("could not save that.")}finally{N(!1)}},[j,g]),D=(0,s.useCallback)(async e=>{N(!0),S(null);try{let t=await r(e);if(!t.ok)return void S(t.problem);E.current=!1,x(t.view),w(h(t.view)),(0,o.toast)("off"===e?"jev is off. hooks run the regex policies.":`jev is on, in ${e} mode.`)}catch{S("could not switch that.")}finally{N(!1)}},[]),F=(0,s.useCallback)(async()=>{N(!0),S(null),M(!1);try{let e=await i();if(!e.ok)return void S(e.problem);E.current=!1,y(""),x(e.view),w(h(e.view)),(0,o.toast)("jev is off. hooks run the regex policies.")}catch{S("could not turn that off.")}finally{N(!1)}},[]),L=null!==p&&"absent"!==p.status,T=p?.provider===u,U=p?.token,O=A?"needed for this save — type the token for this endpoint":U?"cloud"===U.source?"from this machine's FailproofAI Cloud connection":"env"===U.source?"configured, read from the environment — leave blank to keep it":"configured — leave blank to keep it":p?.status==="key-missing"?"read from the environment, which is not set in this shell — leave blank to keep it that way":"sent as a bearer token; stored owner-only at 0600";return(0,t.jsxs)("div",{className:"set-cell set-jev",children:[(0,t.jsx)("h2",{className:"set-cell-title",children:"jev · semantic evaluation"}),(0,t.jsx)("div",{className:"set-row set-row-main",children:(0,t.jsxs)("div",{className:"set-row-copy",children:[(0,t.jsx)("span",{className:p?.on?"set-strong":"set-dim",children:null===p?"reading…":p.on?`on. every judged command is also asked of ${(a=p.provider)===u?"FailproofAI Cloud":a??""}.`:"off"===p.status?"off — switched off. hooks run the regex policies exactly as before.":"not-connected"===p.status?"off — this machine is not connected to FailproofAI Cloud. hooks run the regex policies.":"key-lacks-jev"===p.status?"off — no jev key is stored for this machine's FailproofAI Cloud connection. hooks run the regex policies.":"key-missing"===p.status?"off for this dashboard — FAILPROOFAI_JEV_API_KEY is not set in its environment. hooks run the regex policies wherever it is unset, including under the daemon; a session that sets it still consults jev.":"off. hooks run the regex policies exactly as before."}),(0,t.jsx)("span",{className:"set-dim",children:p?.on?"observe"===p.mode?"observe: jev's answers are logged, the regex result is what gets enforced.":"enforce: jev's answers can clear a reviewable deny.":T?"through FailproofAI Cloud, on your org's plan — no endpoint or token of your own.":"a second opinion on the commands the regex policies flag. needs your own endpoint and token."})]})}),p&&(0,t.jsx)("dl",{className:"set-how-list set-jev-cloud",children:(0,t.jsxs)("div",{className:"set-how-row",children:[(0,t.jsx)("dt",{className:"set-how-label",children:"FailproofAI Cloud connection"}),(0,t.jsx)("dd",{className:"set-how-body",children:function(e){if(!e||!e.connected)return e?.jev==="yes"?"a jev key is stored, but no connection is":"not connected";let t=e.org??e.host??"connected",s="yes"===e.jev?"key carries jev":"refused"===e.jev?"jev key refused — credentials.json is not owner-only":"no jev key stored";return`connected to ${t} \xb7 ${s}`}(p.cloud)})]})}),p&&L&&(0,t.jsxs)("dl",{className:"set-how-list",children:[T&&(0,t.jsxs)("div",{className:"set-how-row",children:[(0,t.jsx)("dt",{className:"set-how-label",children:"provider"}),(0,t.jsx)("dd",{className:"set-how-body",children:p.cloud?.host?`FailproofAI Cloud \xb7 ${p.cloud.host}`:"FailproofAI Cloud"})]}),(0,t.jsxs)("div",{className:"set-how-row",children:[(0,t.jsx)("dt",{className:"set-how-label",children:"model"}),(0,t.jsx)("dd",{className:"set-how-body",children:function(e){switch(e.kind){case"id":return e.id;case"withheld":return"set to something that is not a model id — not shown here, in case it is a key";default:return"the provider's default"}}(p.model)})]}),(0,t.jsxs)("div",{className:"set-how-row",children:[(0,t.jsx)("dt",{className:"set-how-label",children:"token"}),(0,t.jsx)("dd",{className:"set-how-body",children:U?"cloud"===U.source?"FailproofAI Cloud connection":"env"===U.source?"from FAILPROOFAI_JEV_API_KEY":"configured":T?p.cloud?.connected?"none stored for this connection":"none — this machine is not connected":"none stored"})]}),p.reviewable&&(0,t.jsxs)("div",{className:"set-how-row",children:[(0,t.jsx)("dt",{className:"set-how-label",children:"reviewable"}),(0,t.jsx)("dd",{className:"set-how-body",children:p.reviewable.summary})]}),p.stats&&p.stats.total>0&&(0,t.jsxs)("div",{className:"set-how-row",children:[(0,t.jsx)("dt",{className:"set-how-label",children:"fallbacks"}),(0,t.jsx)("dd",{className:"set-how-body",children:`${(f=p.stats.fallbackRate,`${Math.round(100*f)}%`)} of ${p.stats.total} calls in the last ${Number.isInteger(b=(v=p.stats.windowMs)/36e5)&&b>=1?b%24==0?`${b/24}d`:`${b}h`:`${Math.max(1,Math.round(v/6e4))}m`} fell back to the regex engine.`})]})]}),p?.problem&&(0,t.jsxs)("p",{className:"set-warn",children:[p.problem,p.fix?` — ${p.fix}`:""]}),p?.reviewable?.problem&&(0,t.jsx)("p",{className:"set-warn",children:p.reviewable.problem}),(0,t.jsx)("div",{className:"set-rule"}),T?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"set-jev-fields",children:(0,t.jsx)(m,{id:"jev-cloud-mode",label:"mode",hint:"the endpoint and key come from this machine's FailproofAI Cloud connection",children:(0,t.jsx)("select",{id:"jev-cloud-mode",className:"set-select",value:p?.mode==="enforce"?"enforce":"observe",disabled:k||p?.mode==="off",onChange:e=>void D("enforce"===e.target.value?"enforce":"observe"),children:d.filter(e=>"off"!==e.value).map(e=>(0,t.jsx)("option",{value:e.value,children:e.label},e.value))})})}),C&&(0,t.jsx)("p",{className:"set-warn",children:C}),(0,t.jsx)("div",{className:"set-actions set-jev-actions",children:(0,t.jsx)("button",{type:"button",className:"btn btn-press",disabled:k,onClick:()=>void D(p?.mode==="off"?"observe":"off"),children:k?"[ switching… ]":p?.mode==="off"?"[ turn jev on ]":"[ turn jev off ]"})})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"set-jev-fields",children:[(0,t.jsx)(m,{id:"jev-provider",label:"provider",children:(0,t.jsx)("select",{id:"jev-provider",className:"set-select",value:j.provider,disabled:k,onChange:e=>R("provider",e.target.value),children:c.map(e=>(0,t.jsx)("option",{value:e.value,children:e.label},e.value))})}),(0,t.jsx)(m,{id:"jev-url",label:"endpoint url",hint:["custom"===j.provider?"required — https, or http to localhost in observe mode":"leave blank for the provider's own api",p?.baseUrlQueryWithheld?"the stored url's query string is not shown here — leave the url as it is to keep it":null].filter(Boolean).join(" · "),children:(0,t.jsx)("input",{id:"jev-url",type:"text",className:"set-text",inputMode:"url",autoComplete:"off",spellCheck:!1,placeholder:"custom"===j.provider?"https://…":"the provider's own api",value:j.baseUrl,disabled:k,onChange:e=>R("baseUrl",e.target.value)})}),"cloudflare"===j.provider&&(0,t.jsx)(m,{id:"jev-account",label:"account id",hint:"32 lowercase hex characters",children:(0,t.jsx)("input",{id:"jev-account",type:"text",className:"set-text",autoComplete:"off",spellCheck:!1,value:j.accountId,disabled:k,onChange:e=>R("accountId",e.target.value)})}),(0,t.jsx)(m,{id:"jev-token",label:"token",hint:O,children:(0,t.jsx)("input",{id:"jev-token",type:"password",className:"set-text",autoComplete:"off",spellCheck:!1,placeholder:U?"•••• kept":"",value:g,disabled:k,"aria-invalid":A||void 0,onChange:e=>{E.current=!0,y(e.target.value)}})}),(0,t.jsx)(m,{id:"jev-mode",label:"mode",children:(0,t.jsx)("select",{id:"jev-mode",className:"set-select",value:j.mode,disabled:k,onChange:e=>R("mode",e.target.value),children:d.map(e=>(0,t.jsx)("option",{value:e.value,children:e.label},e.value))})})]}),C&&(0,t.jsx)("p",{className:"set-warn",children:C}),(0,t.jsxs)("div",{className:"set-actions set-jev-actions",children:[(0,t.jsx)("button",{type:"button",className:"btn btn-press",disabled:k,onClick:()=>void _(),children:k?"[ saving… ]":L?"[ save changes ]":"[ turn jev on ]"}),L&&(0,t.jsx)("button",{type:"button",className:"set-link",disabled:k,onClick:()=>void F(),children:"turn jev off"})]})]})]})}],2917)},93237,e=>{"use strict";var t=e.i(43476),s=e.i(71645),a=e.i(95187);let n=(0,a.createServerReference)("00265c36203c0a8354c803cb6be85bd71db9f72fff",a.callServer,void 0,a.findSourceMapURL,"getScheduledAuditAction"),i=(0,a.createServerReference)("40040d53c0382847a4c73f07e40136516306c6ef76",a.callServer,void 0,a.findSourceMapURL,"setAutoAuditAction"),l=(0,a.createServerReference)("40cdeb93745892bcc2de3532a7390760e09ac401a9",a.callServer,void 0,a.findSourceMapURL,"setAuditIntervalAction");var r=e.i(86616),o=e.i(64237),c=e.i(55574),d=e.i(34713);function u(e){return new Date(e).toLocaleString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}function h(e,t){let s=e-t;if(s<=0)return"now";let a=Math.floor(s/864e5),n=Math.floor(s%864e5/36e5);return a>0?n>0?`${a}d ${n}h`:`${a}d`:n>0?`${n}h`:`${Math.max(1,Math.floor(s/6e4))}m`}function m(e){return e.toLocaleString("en-US")}function f({label:e,value:s,sub:a,tone:n}){return(0,t.jsxs)("div",{className:"set-stat",children:[(0,t.jsx)("div",{className:"set-stat-label",children:e}),(0,t.jsx)("div",{className:`set-stat-value${n?` ${n}`:""}`,children:s}),(0,t.jsx)("div",{className:"set-stat-sub",children:a??" "})]})}function v({lastRunAtMs:e,nextDueAtMs:s,now:a}){if(null==e||null==s||s<=e)return null;let n=Math.min(100,Math.max(0,(a-e)/(s-e)*100));return(0,t.jsxs)("div",{className:"tape","aria-hidden":"true",children:[(0,t.jsxs)("div",{className:"tape-rail",children:[(0,t.jsx)("div",{className:"tape-fill",style:{width:`${n}%`}}),(0,t.jsx)("div",{className:"tape-now",style:{left:`${n}%`}})]}),(0,t.jsxs)("div",{className:"tape-ends",children:[(0,t.jsxs)("span",{children:["last scan · ",u(e)]}),(0,t.jsxs)("span",{className:"tape-next",children:["next · ",h(s,a)]})]})]})}function b({enabled:e,onChange:s,disabled:a,label:n}){return(0,t.jsx)("button",{type:"button",role:"switch","aria-checked":e,"aria-label":n,disabled:a,onClick:s,className:"sw","data-on":e?"true":"false",children:(0,t.jsx)("span",{className:"sw-knob"})})}let p=[{label:"reads",body:"every session transcript on disk — your prompts, the files your agents read and wrote, and command output."},{label:"runs",body:"entirely on this machine. the transcripts never leave it."},{label:"sends",body:"counts, redacted examples, and this machine's name — and only when a scan finds something harmful."}];e.s(["default",0,function({initial:e,jevPanel:a}){let[x,j]=(0,s.useState)(e),[w,g]=(0,s.useState)(e?.auto??!1),[y,k]=(0,s.useState)(e?.intervalDays??7),[N,C]=(0,s.useState)(!1),[S,A]=(0,s.useState)(!1),[M,$]=(0,s.useState)(!1),[E,I]=(0,s.useState)(null===e),[R,_]=(0,s.useState)(0),D=(0,s.useRef)(!0),F=(0,s.useRef)(null!==e),L=(0,s.useCallback)(async()=>{try{let e=await n();if(!D.current)return;j(e),F.current=!0,g(e.auto),k(e.intervalDays),_(Date.now()),I(!1)}catch{D.current&&!F.current&&I(!0)}},[]);(0,s.useEffect)(()=>(D.current=!0,L(),()=>{D.current=!1}),[L]),(0,s.useEffect)(()=>{let e=()=>void L();return window.addEventListener("focus",e),document.addEventListener("visibilitychange",e),()=>{window.removeEventListener("focus",e),document.removeEventListener("visibilitychange",e)}},[L]);let T=x?.signedInAs??null,U=x?.daemon==="running",O=x?.daemon==="unsupported-platform",P=x?.schedule??null,J=x?.lastScan??null,q=P?.lastExitCode!=null&&0!==P.lastExitCode&&75!==P.lastExitCode,W=(0,s.useCallback)(async()=>{C(!0);try{let e=await i(!0);if(!e.ok){if(g(!1),"unreachable"===e.reason)return void(0,c.toast)("could not reach the server. check your connection and try again.");await L(),$(!0),(0,c.toast)("that sign-in expired. one more code and it's on.");return}g(e.auto),(0,c.toast)("scheduled audits on."),await L()}catch{g(!1),(0,c.toast)("could not turn that on.")}finally{C(!1)}},[L]),B=(0,s.useCallback)(async()=>{if(w){C(!0);try{let e=await i(!1);e.ok&&g(e.auto),(0,c.toast)("scheduled audits off."),await L()}catch{(0,c.toast)("could not turn that off.")}finally{C(!1)}return}T?await W():$(!0)},[w,W,L,T]),K=(0,s.useCallback)(async e=>{C(!0);try{let t=await l(e);k(t.intervalDays),j(e=>e?{...e,intervalDays:t.intervalDays}:e),(0,c.toast)(`scanning every ${t.intervalDays} day${1===t.intervalDays?"":"s"}.`)}catch{k(x?.intervalDays??7),(0,c.toast)("could not save that.")}finally{C(!1)}},[x?.intervalDays]),V=(0,s.useCallback)(async()=>{C(!0);try{await fetch("/api/auth/logout",{method:"POST"}),(0,c.toast)("signed out. scans continue; digests pause."),await L()}catch{(0,c.toast)("could not sign out.")}finally{C(!1)}},[L]),Y=(0,s.useCallback)(async()=>{if(!S){A(!0);try{await (0,r.triggerRun)({cli:[],since:"all",noCache:!1}),(0,c.toast)("scan complete."),await L()}catch(e){(0,c.toast)(e instanceof r.RerunError&&"timeout"===e.kind?"the scan is taking a while — it will finish in the background.":"the scan could not be completed.")}finally{A(!1)}}},[L,S]),H=(0,s.useCallback)(async e=>{$(!1),await L(),await W()},[W,L]),Q=x?U?{value:"running",sub:null!=x.daemonStartedAtMs&&R>0?`up ${function(e){let t=Math.floor(e/864e5);if(t>0)return`${t}d`;let s=Math.floor(e/36e5);return s>0?`${s}h`:`${Math.max(1,Math.floor(e/6e4))}m`}(Math.max(0,R-x.daemonStartedAtMs))}`:"",tone:"ok"}:O?{value:"unavailable",sub:"not on this platform"}:"not-installed"===x.daemon?{value:"not installed",sub:"run failproofai config",tone:"warn"}:"unknown"===x.daemon?{value:"unknown",sub:"could not read it"}:{value:"stopped",sub:"run failproofai config",tone:"warn"}:{value:"…",sub:"reading"},z=w?P?.nextDueAtMs==null?{value:"pending",sub:"after the next scan"}:{value:R>0?h(P.nextDueAtMs,R):"—",sub:u(P.nextDueAtMs)}:{value:"off",sub:"nothing scheduled"},G=J?{value:(0,d.formatRelativeTime)(Date.parse(J.finishedAt)),sub:null!=J.sessionsScanned?`${m(J.sessionsScanned)} sessions`:"scanned"}:{value:"none yet",sub:"run one below"},X=J?null==J.findings?{value:"—",sub:"unreadable"}:{value:m(J.findings),sub:"this scan",...J.findings>0?{tone:"warn"}:{}}:{value:"—",sub:"no scan yet"};return(0,t.jsxs)("main",{className:"report",children:[(0,t.jsxs)("section",{className:"section set-sec",children:[(0,t.jsxs)("div",{className:"set-mast",children:[(0,t.jsx)("h1",{className:"set-title",children:"settings"}),(0,t.jsx)("p",{className:"set-lede",children:"keeping watch, so you don't have to."})]}),E?(0,t.jsxs)("div",{className:"set-console",children:[(0,t.jsx)("div",{className:"set-cell",children:(0,t.jsxs)("p",{className:"set-warn",children:["could not read this machine's settings. check that the dashboard can reach ",(0,t.jsx)("code",{children:"~/.failproofai/config.json"}),"."]})}),a]}):(0,t.jsxs)("div",{className:"set-console",children:[(0,t.jsxs)("div",{className:"set-stats",children:[(0,t.jsx)(f,{label:"daemon",...Q}),(0,t.jsx)(f,{label:"next scan",...z}),(0,t.jsx)(f,{label:"last scan",...G}),(0,t.jsx)(f,{label:"findings",...X})]}),(0,t.jsxs)("div",{className:"set-cols",children:[(0,t.jsxs)("div",{className:"set-cell set-config",children:[(0,t.jsx)("h2",{className:"set-cell-title",children:"scheduled audit"}),(0,t.jsxs)("div",{className:"set-row set-row-main",children:[(0,t.jsx)(b,{enabled:w,disabled:N||null===x,onChange:()=>void B(),label:w?"turn off scheduled audits":"turn on scheduled audits"}),(0,t.jsxs)("div",{className:"set-row-copy",children:[(0,t.jsx)("span",{className:"set-strong",children:w?"scanning on a schedule.":"scan on a schedule."}),(0,t.jsx)("span",{className:"set-dim",children:w?"you'll get an email only when a scan finds something.":"off. nothing runs and nothing is sent."})]})]}),(0,t.jsxs)("div",{className:"set-row set-row-interval",children:[(0,t.jsx)("span",{className:"set-dim",children:"scan every"}),(0,t.jsx)("input",{type:"number",className:"set-num",min:1,max:90,value:y,disabled:N||null===x,"aria-label":"days between scheduled scans",onChange:e=>k(Number(e.target.value)),onBlur:e=>{let t=Number(e.target.value);Number.isFinite(t)?t!==x?.intervalDays&&K(t):k(x?.intervalDays??7)}}),(0,t.jsx)("span",{className:"set-dim",children:"days"}),(0,t.jsxs)("span",{className:"set-hint",children:[1,"–",90]})]}),(0,t.jsx)("div",{className:"set-rule"}),(0,t.jsx)("div",{className:"set-row set-row-identity",children:T?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"set-dim",children:"reports go to"}),(0,t.jsx)("span",{className:"set-email",children:T.email}),(0,t.jsx)("button",{type:"button",className:"set-link",disabled:N,onClick:()=>void V(),children:"sign out"})]}):w?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"set-warn",children:"signed out — scans continue, digests are paused."}),(0,t.jsx)("button",{type:"button",className:"set-link",disabled:N,onClick:()=>$(!0),children:"sign in to resume"})]}):(0,t.jsx)("span",{className:"set-dim",children:"turning this on asks for an email, so there is somewhere to send the report."})}),w&&x&&!U&&(0,t.jsx)("p",{className:"set-warn",children:O?"the background service isn't available on this platform, so scheduled scans can't run here. you can still run one now.":"not-installed"===x.daemon?"the background service isn't installed, so nothing will run on the timer. install it with `failproofai config`.":"the background service is stopped, so nothing will run until it starts. repair it with `failproofai config`."}),q&&(0,t.jsxs)("p",{className:"set-warn",children:["the last scheduled scan exited ",P?.lastExitCode,". the next one will still run."]}),(0,t.jsx)("div",{className:"set-actions",children:(0,t.jsx)("button",{type:"button",className:"btn btn-press",disabled:S,onClick:()=>void Y(),children:S?"[ scanning… ]":"[ run a scan now ]"})})]}),(0,t.jsxs)("div",{className:"set-cell set-how",children:[(0,t.jsx)("h2",{className:"set-cell-title",children:"how it works"}),(0,t.jsx)("dl",{className:"set-how-list",children:p.map(e=>(0,t.jsxs)("div",{className:"set-how-row",children:[(0,t.jsx)("dt",{className:"set-how-label",children:e.label}),(0,t.jsx)("dd",{className:"set-how-body",children:e.body})]},e.label))})]})]}),a]}),w&&R>0&&(0,t.jsx)(v,{lastRunAtMs:P?.lastRunAtMs??null,nextDueAtMs:P?.nextDueAtMs??null,now:R})]}),(0,t.jsx)(o.AuthDialog,{open:M,source:"settings_scheduled_audit",headline:"where should the report go?",subhead:"we'll send a one-time code to confirm.",onClose:()=>$(!1),onAuthed:e=>void H(e)})]})}],93237)},29054,e=>{"use strict";e.s(["fetchWithTimeout",0,function(e,t={},s=15e3){let a=AbortSignal.timeout(s),n=t.signal?AbortSignal.any([t.signal,a]):a;return fetch(e,{...t,signal:n})},"isAbortError",0,function(e){if(null===e||"object"!=typeof e)return!1;let t=e.name;return"AbortError"===t||"TimeoutError"===t}])},34713,e=>{"use strict";e.s(["formatDuration",0,function(e){if(e<1e3)return`${e}ms`;let t=Math.round(e/100);if(t<600)return`${(t/10).toFixed(1)}s`;let s=Math.round(e/1e3);if(s<3600){let e=Math.floor(s/60);return`${e}m ${s%60}s`}let a=Math.round(e/6e4),n=Math.floor(a/60);return`${n}h ${a%60}m`},"formatRelativeTime",0,function(e){let t=Date.now()-e;return t<6e4?`${Math.max(1,Math.floor(t/1e3))}s ago`:t<36e5?`${Math.floor(t/6e4)}m ago`:t<864e5?`${Math.floor(t/36e5)}h ago`:`${Math.floor(t/864e5)}d ago`}])}]);
|