failproofai 0.0.9 → 0.0.10-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.next/standalone/.cursor/hooks.json +47 -0
- package/.next/standalone/.gemini/settings.json +147 -0
- package/.next/standalone/.next/BUILD_ID +1 -1
- package/.next/standalone/.next/build-manifest.json +3 -3
- package/.next/standalone/.next/prerender-manifest.json +3 -3
- 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 +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 +2 -2
- package/.next/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +7 -7
- package/.next/standalone/.next/server/app/_global-error.segments/_head.segment.rsc +3 -3
- package/.next/standalone/.next/server/app/_global-error.segments/_index.segment.rsc +3 -3
- 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 +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 +2 -2
- package/.next/standalone/.next/server/app/_not-found.rsc +17 -17
- package/.next/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +17 -17
- package/.next/standalone/.next/server/app/_not-found.segments/_head.segment.rsc +4 -4
- package/.next/standalone/.next/server/app/_not-found.segments/_index.segment.rsc +11 -11
- package/.next/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/_not-found.segments/_not-found.segment.rsc +3 -3
- package/.next/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/api/download/[project]/[session]/route.js +2 -1
- package/.next/standalone/.next/server/app/api/download/[project]/[session]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/index.html +1 -1
- package/.next/standalone/.next/server/app/index.rsc +16 -16
- package/.next/standalone/.next/server/app/index.segments/__PAGE__.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/index.segments/_full.segment.rsc +16 -16
- package/.next/standalone/.next/server/app/index.segments/_head.segment.rsc +4 -4
- package/.next/standalone/.next/server/app/index.segments/_index.segment.rsc +11 -11
- package/.next/standalone/.next/server/app/index.segments/_tree.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/page/server-reference-manifest.json +1 -1
- package/.next/standalone/.next/server/app/page.js +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 +8 -8
- package/.next/standalone/.next/server/app/policies/page.js +1 -1
- 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 +2 -2
- 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 +5 -5
- 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 +2 -2
- 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/chunks/[root-of-the-server]__0.~nmr9._.js +3 -0
- package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0yspgjy._.js → [root-of-the-server]__010i6f5._.js} +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__08px0ym._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0b57.gk._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0dtn9lr._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0kjo7d_._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0vlhtkc._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0wu7fr7._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0yfq1yr._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0z4c5dj._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0zso~62._.js +3 -0
- package/.next/standalone/.next/server/chunks/package_json_[json]_cjs_0z7w.hh._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0-2wr.c._.js +4 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0.~m-w2._.js +4 -0
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__09icjsf._.js → [root-of-the-server]__0709m8.._.js} +3 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0bz245.._.js +4 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0dl0kgt._.js +4 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0gmhxyo._.js +4 -0
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0_b7pgn._.js → [root-of-the-server]__0lkkjl_._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__01g_w_e._.js → [root-of-the-server]__0mb9b9d._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0mup1hi._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0ohb3gc._.js +4 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0qbpe_v._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0s~gy6y._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0t5l7a5._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0ymlddl._.js +152 -6
- package/.next/standalone/.next/server/chunks/ssr/_03d7qyt._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/{_07a1g.3._.js → _0zx~s__._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/_10lm7or._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/app_0cdqd9w._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/app_global-error_tsx_0xerkr6._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/app_policies_hooks-client_tsx_0q-m0y-._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/lib_codex-projects_ts_0eosib~._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/lib_copilot-projects_ts_0r8xkn8._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/lib_cursor-projects_ts_0qt1scg._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/lib_gemini-projects_ts_0sl~yqr._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/lib_opencode-projects_ts_0op9gyp._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/lib_pi-projects_ts_103tsh1._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0ef3uwk.js +1 -1
- package/.next/standalone/.next/server/middleware-build-manifest.js +3 -3
- package/.next/standalone/.next/server/pages/404.html +2 -2
- 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 +9 -9
- package/.next/standalone/.next/static/chunks/{0n-_j_6fo6jex.js → 0-wd3kiz5wrsz.js} +2 -2
- package/.next/standalone/.next/static/chunks/{0756i.7omnnl6.js → 0222q~_4u7p6h.js} +1 -1
- package/.next/standalone/.next/static/chunks/{0t~iusm_fxoao.js → 02y~6tp1j1wkh.js} +1 -1
- package/.next/standalone/.next/static/chunks/{09ose_165ra4d.js → 09qdljea8j.3~.js} +1 -1
- package/.next/standalone/.next/static/chunks/0bi2r.m~yokoo.js +1 -0
- package/.next/standalone/.next/static/chunks/{11kt_9zaooda3.js → 0pt38lwlsaxvs.js} +1 -1
- package/.next/standalone/.next/static/chunks/0q5bmqop--9yk.js +1 -0
- package/.next/standalone/.next/static/chunks/{0u-ys71jc4y68.js → 0vl201wjmz17m.js} +2 -2
- package/.next/standalone/.next/static/chunks/{0pr7k36o_.du1.js → 0vl~p17i-4qt2.js} +1 -1
- package/.next/standalone/.next/static/chunks/0xkzmsj-sniqz.js +1 -0
- package/.next/standalone/.next/static/chunks/12po2vpc-4_c1.css +1 -0
- package/.next/standalone/.opencode/opencode.json +4 -0
- package/.next/standalone/.opencode/plugins/failproofai.mjs +131 -0
- package/.next/standalone/.pi/settings.json +5 -0
- package/.next/standalone/app/components/cli-badge.tsx +7 -11
- package/.next/standalone/app/components/project-list.tsx +32 -4
- package/.next/standalone/app/policies/hooks-client.tsx +31 -15
- package/.next/standalone/app/project/[name]/page.tsx +52 -16
- package/.next/standalone/app/project/[name]/session/[sessionId]/page.tsx +92 -15
- package/.next/standalone/assets/logos/copilot-dark.svg +1 -0
- package/.next/standalone/assets/logos/copilot-light.svg +1 -0
- package/.next/standalone/assets/logos/cursor-dark.svg +1 -0
- package/.next/standalone/assets/logos/cursor-light.svg +1 -0
- package/.next/standalone/assets/logos/gemini-dark.svg +13 -0
- package/.next/standalone/assets/logos/gemini-light.svg +13 -0
- package/.next/standalone/assets/logos/opencode-dark.svg +1 -0
- package/.next/standalone/assets/logos/opencode-light.svg +1 -0
- package/.next/standalone/assets/logos/pi-dark.svg +7 -0
- package/.next/standalone/assets/logos/pi-light.svg +7 -0
- package/.next/standalone/lib/cli-registry.ts +107 -0
- package/.next/standalone/lib/codex-projects.ts +3 -3
- package/.next/standalone/lib/copilot-projects.ts +224 -0
- package/.next/standalone/lib/copilot-sessions.ts +395 -0
- package/.next/standalone/lib/cursor-projects.ts +312 -0
- package/.next/standalone/lib/cursor-sessions.ts +467 -0
- package/.next/standalone/lib/gemini-projects.ts +203 -0
- package/.next/standalone/lib/gemini-sessions.ts +365 -0
- package/.next/standalone/lib/opencode-projects.ts +232 -0
- package/.next/standalone/lib/opencode-sessions.ts +237 -0
- package/.next/standalone/lib/pi-projects.ts +230 -0
- package/.next/standalone/lib/pi-sessions.ts +325 -0
- package/.next/standalone/lib/projects.ts +67 -31
- package/.next/standalone/next.config.ts +5 -4
- package/.next/standalone/package.json +2 -1
- package/.next/standalone/pi-extension/index.ts +373 -0
- package/.next/standalone/pi-extension/package.json +12 -0
- package/.next/standalone/server.js +1 -1
- package/README.md +37 -3
- package/bin/failproofai.mjs +61 -21
- package/dist/cli.mjs +2405 -253
- package/lib/cli-registry.ts +107 -0
- package/lib/codex-projects.ts +3 -3
- package/lib/copilot-projects.ts +224 -0
- package/lib/copilot-sessions.ts +395 -0
- package/lib/cursor-projects.ts +312 -0
- package/lib/cursor-sessions.ts +467 -0
- package/lib/gemini-projects.ts +203 -0
- package/lib/gemini-sessions.ts +365 -0
- package/lib/opencode-projects.ts +232 -0
- package/lib/opencode-sessions.ts +237 -0
- package/lib/pi-projects.ts +230 -0
- package/lib/pi-sessions.ts +325 -0
- package/lib/projects.ts +67 -31
- package/package.json +2 -1
- package/pi-extension/index.ts +373 -0
- package/pi-extension/package.json +12 -0
- package/scripts/install-diagnosis.mjs +190 -0
- package/scripts/launch.ts +32 -0
- package/scripts/postinstall.mjs +25 -0
- package/scripts/translate-docs/mdx-translator.ts +56 -2
- package/scripts/translate-docs/translator.ts +1 -1
- package/src/hooks/builtin-policies.ts +84 -14
- package/src/hooks/handler.ts +67 -5
- package/src/hooks/install-prompt.ts +33 -10
- package/src/hooks/integrations.ts +1007 -6
- package/src/hooks/policy-evaluator.ts +299 -3
- package/src/hooks/resolve-permission-mode.ts +23 -0
- package/src/hooks/types.ts +307 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0g72weg._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0su~k6f._.js +0 -3
- package/.next/standalone/.next/server/chunks/lib_codex-projects_ts_07qqk1g._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__01743wx._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__092s1ta._.js +0 -4
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0g.lg8b._.js +0 -4
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0gs6wz4._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0h..k-e._.js +0 -4
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0it81ys._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0u4a9jq._.js +0 -4
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__11pa2ra._.js +0 -4
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__12.h2mg._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__12t-wym._.js +0 -4
- package/.next/standalone/.next/server/chunks/ssr/_04w00cm._.js +0 -3
- package/.next/standalone/.next/static/chunks/0.rk1iwdt1d7c.css +0 -1
- package/.next/standalone/.next/static/chunks/06x4-d1~o-opr.js +0 -1
- package/.next/standalone/.next/static/chunks/095l4hc7-h.~~.js +0 -1
- package/.next/standalone/.next/static/chunks/0n~s0gafwnp2y.js +0 -1
- /package/.next/standalone/.next/static/{A_Ax17P33facL0OmIwFXj → w0GG7S5UEj1-p5g9hfsh2}/_buildManifest.js +0 -0
- /package/.next/standalone/.next/static/{A_Ax17P33facL0OmIwFXj → w0GG7S5UEj1-p5g9hfsh2}/_clientMiddlewareManifest.js +0 -0
- /package/.next/standalone/.next/static/{A_Ax17P33facL0OmIwFXj → w0GG7S5UEj1-p5g9hfsh2}/_ssgManifest.js +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
module.exports=[10765,a=>{"use strict";var b=a.i(87924),c=a.i(72131),d=a.i(50944),e=a.i(
|
|
1
|
+
module.exports=[10765,a=>{"use strict";var b=a.i(87924),c=a.i(72131),d=a.i(50944),e=a.i(17856),f=a.i(66036);let g=(0,c.createContext)(void 0);a.s(["PostHogProvider",0,function({children:a}){let h=(0,d.usePathname)(),i=(0,c.useRef)(null),j=(0,c.useRef)(!1);(0,c.useEffect)(()=>{let a=!1;return(0,e.getTelemetryConfig)().then(b=>{a||((0,f.setClientTelemetryConfig)(b),j.current=!0,(0,f.captureClientEvent)("$pageview"),i.current=window.location.pathname)}),()=>{a=!0}},[]),(0,c.useEffect)(()=>{j.current&&i.current!==h&&(i.current=h,(0,f.captureClientEvent)("$pageview"))},[h]);let k=c.default.useCallback((a,b)=>{(0,f.captureClientEvent)(a,b)},[]);return(0,b.jsx)(g.Provider,{value:{capture:k},children:a})},"usePostHog",0,function(){let a=(0,c.useContext)(g);if(void 0===a)throw Error("usePostHog must be used within a PostHogProvider");return a}])},45550,a=>{"use strict";var b=a.i(72131),c=a.i(66036);a.s(["GlobalErrorListeners",0,function(){return(0,b.useEffect)(()=>{let a=a=>{(0,c.captureClientEvent)("unhandled_exception",{error_message:a.message,error_name:a.error?.name,error_filename:a.filename,error_lineno:a.lineno,error_colno:a.colno})},b=a=>{let b=a.reason;(0,c.captureClientEvent)("unhandled_rejection",{error_message:b instanceof Error?b.message:String(b),error_name:b instanceof Error?b.name:void 0})};return window.addEventListener("error",a),window.addEventListener("unhandledrejection",b),()=>{window.removeEventListener("error",a),window.removeEventListener("unhandledrejection",b)}},[]),null}])},18200,a=>{"use strict";var b=a.i(87924),c=a.i(72131);let d=(0,c.createContext)(void 0);function e(a){let b=new MutationObserver(a);return b.observe(document.documentElement,{attributes:!0,attributeFilter:["class"]}),()=>b.disconnect()}function f(){return document.documentElement.classList.contains("light")?"light":"dark"}function g(){return"dark"}a.s(["ThemeProvider",0,({children:a})=>{let h=(0,c.useSyncExternalStore)(e,f,g),i=(0,c.useCallback)(a=>{let b=document.documentElement;b.classList.remove("light","dark"),b.classList.add(a);try{localStorage.setItem("theme",a)}catch{}},[]);return(0,b.jsx)(d.Provider,{value:{theme:h,setTheme:i},children:a})},"useTheme",0,()=>{let a=(0,c.useContext)(d);if(void 0===a)throw Error("useTheme must be used within a ThemeProvider");return a}])},4987,(a,b,c)=>{"use strict";function d({widthInt:a,heightInt:b,blurWidth:c,blurHeight:e,blurDataURL:f,objectFit:g}){let h=c?40*c:a,i=e?40*e:b,j=h&&i?`viewBox='0 0 ${h} ${i}'`:"";return`%3Csvg xmlns='http://www.w3.org/2000/svg' ${j}%3E%3Cfilter id='b' color-interpolation-filters='sRGB'%3E%3CfeGaussianBlur stdDeviation='20'/%3E%3CfeColorMatrix values='1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 100 -1' result='s'/%3E%3CfeFlood x='0' y='0' width='100%25' height='100%25'/%3E%3CfeComposite operator='out' in='s'/%3E%3CfeComposite in2='SourceGraphic'/%3E%3CfeGaussianBlur stdDeviation='20'/%3E%3C/filter%3E%3Cimage width='100%25' height='100%25' x='0' y='0' preserveAspectRatio='${j?"none":"contain"===g?"xMidYMid":"cover"===g?"xMidYMid slice":"none"}' style='filter: url(%23b);' href='${f}'/%3E%3C/svg%3E`}Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"getImageBlurSvg",{enumerable:!0,get:function(){return d}})},345,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});var d={VALID_LOADERS:function(){return f},imageConfigDefault:function(){return g}};for(var e in d)Object.defineProperty(c,e,{enumerable:!0,get:d[e]});let f=["default","imgix","cloudinary","akamai","custom"],g={deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[32,48,64,96,128,256,384],path:"/_next/image",loader:"default",loaderFile:"",domains:[],disableStaticImages:!1,minimumCacheTTL:14400,formats:["image/webp"],maximumDiskCacheSize:void 0,maximumRedirects:3,maximumResponseBody:5e7,dangerouslyAllowLocalIP:!1,dangerouslyAllowSVG:!1,contentSecurityPolicy:"script-src 'none'; frame-src 'none'; sandbox;",contentDispositionType:"attachment",localPatterns:void 0,remotePatterns:[],qualities:[75],unoptimized:!1,customCacheHandler:!1}},94915,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"getImgProps",{enumerable:!0,get:function(){return j}}),a.r(92434);let d=a.r(68063),e=a.r(4987),f=a.r(345),g=["-moz-initial","fill","none","scale-down",void 0];function h(a){return void 0!==a.default}function i(a){return void 0===a?a:"number"==typeof a?Number.isFinite(a)?a:NaN:"string"==typeof a&&/^[0-9]+$/.test(a)?parseInt(a,10):NaN}function j({src:a,sizes:b,unoptimized:c=!1,priority:k=!1,preload:l=!1,loading:m,className:n,quality:o,width:p,height:q,fill:r=!1,style:s,overrideSrc:t,onLoad:u,onLoadingComplete:v,placeholder:w="empty",blurDataURL:x,fetchPriority:y,decoding:z="async",layout:A,objectFit:B,objectPosition:C,lazyBoundary:D,lazyRoot:E,...F},G){var H;let I,J,K,{imgConf:L,showAltText:M,blurComplete:N,defaultLoader:O}=G,P=L||f.imageConfigDefault;if("allSizes"in P)I=P;else{let a=[...P.deviceSizes,...P.imageSizes].sort((a,b)=>a-b),b=P.deviceSizes.sort((a,b)=>a-b),c=P.qualities?.sort((a,b)=>a-b);I={...P,allSizes:a,deviceSizes:b,qualities:c}}if(void 0===O)throw Object.defineProperty(Error("images.loaderFile detected but the file is missing default export.\nRead more: https://nextjs.org/docs/messages/invalid-images-config"),"__NEXT_ERROR_CODE",{value:"E163",enumerable:!1,configurable:!0});let Q=F.loader||O;delete F.loader,delete F.srcSet;let R="__next_img_default"in Q;if(R){if("custom"===I.loader)throw Object.defineProperty(Error(`Image with src "${a}" is missing "loader" prop.
|
|
2
2
|
Read more: https://nextjs.org/docs/messages/next-image-missing-loader`),"__NEXT_ERROR_CODE",{value:"E252",enumerable:!1,configurable:!0})}else{let a=Q;Q=b=>{let{config:c,...d}=b;return a(d)}}if(A){"fill"===A&&(r=!0);let a={intrinsic:{maxWidth:"100%",height:"auto"},responsive:{width:"100%",height:"auto"}}[A];a&&(s={...s,...a});let c={responsive:"100vw",fill:"100vw"}[A];c&&!b&&(b=c)}let S="",T=i(p),U=i(q);if((H=a)&&"object"==typeof H&&(h(H)||void 0!==H.src)){let b=h(a)?a.default:a;if(!b.src)throw Object.defineProperty(Error(`An object should only be passed to the image component src parameter if it comes from a static image import. It must include src. Received ${JSON.stringify(b)}`),"__NEXT_ERROR_CODE",{value:"E460",enumerable:!1,configurable:!0});if(!b.height||!b.width)throw Object.defineProperty(Error(`An object should only be passed to the image component src parameter if it comes from a static image import. It must include height and width. Received ${JSON.stringify(b)}`),"__NEXT_ERROR_CODE",{value:"E48",enumerable:!1,configurable:!0});if(J=b.blurWidth,K=b.blurHeight,x=x||b.blurDataURL,S=b.src,!r)if(T||U){if(T&&!U){let a=T/b.width;U=Math.round(b.height*a)}else if(!T&&U){let a=U/b.height;T=Math.round(b.width*a)}}else T=b.width,U=b.height}let V=!k&&!l&&("lazy"===m||void 0===m);(!(a="string"==typeof a?a:S)||a.startsWith("data:")||a.startsWith("blob:"))&&(c=!0,V=!1),I.unoptimized&&(c=!0),R&&!I.dangerouslyAllowSVG&&a.split("?",1)[0].endsWith(".svg")&&(c=!0);let W=i(o),X=Object.assign(r?{position:"absolute",height:"100%",width:"100%",left:0,top:0,right:0,bottom:0,objectFit:B,objectPosition:C}:{},M?{}:{color:"transparent"},s),Y=N||"empty"===w?null:"blur"===w?`url("data:image/svg+xml;charset=utf-8,${(0,e.getImageBlurSvg)({widthInt:T,heightInt:U,blurWidth:J,blurHeight:K,blurDataURL:x||"",objectFit:X.objectFit})}")`:`url("${w}")`,Z=g.includes(X.objectFit)?"fill"===X.objectFit?"100% 100%":"cover":X.objectFit,$=Y?{backgroundSize:Z,backgroundPosition:X.objectPosition||"50% 50%",backgroundRepeat:"no-repeat",backgroundImage:Y}:{},_=function({config:a,src:b,unoptimized:c,width:e,quality:f,sizes:g,loader:h}){if(c){if(b.startsWith("/")&&!b.startsWith("//")){let a=(0,d.getDeploymentId)();if(a){let c=b.indexOf("?");if(-1!==c){let d=new URLSearchParams(b.slice(c+1));d.get("dpl")||(d.append("dpl",a),b=b.slice(0,c)+"?"+d.toString())}else b+=`?dpl=${a}`}}return{src:b,srcSet:void 0,sizes:void 0}}let{widths:i,kind:j}=function({deviceSizes:a,allSizes:b},c,d){if(d){let c=/(^|\s)(1?\d?\d)vw/g,e=[];for(let a;a=c.exec(d);)e.push(parseInt(a[2]));if(e.length){let c=.01*Math.min(...e);return{widths:b.filter(b=>b>=a[0]*c),kind:"w"}}return{widths:b,kind:"w"}}return"number"!=typeof c?{widths:a,kind:"w"}:{widths:[...new Set([c,2*c].map(a=>b.find(b=>b>=a)||b[b.length-1]))],kind:"x"}}(a,e,g),k=i.length-1;return{sizes:g||"w"!==j?g:"100vw",srcSet:i.map((c,d)=>`${h({config:a,src:b,quality:f,width:c})} ${"w"===j?c:d+1}${j}`).join(", "),src:h({config:a,src:b,quality:f,width:i[k]})}}({config:I,src:a,unoptimized:c,width:T,quality:W,sizes:b,loader:Q}),aa=V?"lazy":m;return{props:{...F,loading:aa,fetchPriority:y,width:T,height:U,decoding:z,className:n,style:{...X,...$},sizes:_.sizes,srcSet:_.srcSet,src:t||_.src},meta:{unoptimized:c,preload:l||k,placeholder:w,fill:r}}}},94613,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"default",{enumerable:!0,get:function(){return f}});let d=a.r(72131),e=()=>{};function f(a){let{headManager:b,reduceComponentsToState:c}=a;function f(){if(b&&b.mountedInstances){let a=d.Children.toArray(Array.from(b.mountedInstances).filter(Boolean));b.updateHead(c(a))}}return b?.mountedInstances?.add(a.children),f(),e(()=>(b?.mountedInstances?.add(a.children),()=>{b?.mountedInstances?.delete(a.children)})),e(()=>(b&&(b._pendingUpdate=f),()=>{b&&(b._pendingUpdate=f)})),null}},92966,(a,b,c)=>{"use strict";b.exports=a.r(42602).vendored.contexts.HeadManagerContext},58018,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});var d={default:function(){return p},defaultHead:function(){return l}};for(var e in d)Object.defineProperty(c,e,{enumerable:!0,get:d[e]});let f=a.r(33354),g=a.r(46058),h=a.r(87924),i=g._(a.r(72131)),j=f._(a.r(94613)),k=a.r(92966);function l(){return[(0,h.jsx)("meta",{charSet:"utf-8"},"charset"),(0,h.jsx)("meta",{name:"viewport",content:"width=device-width"},"viewport")]}function m(a,b){return"string"==typeof b||"number"==typeof b?a:b.type===i.default.Fragment?a.concat(i.default.Children.toArray(b.props.children).reduce((a,b)=>"string"==typeof b||"number"==typeof b?a:a.concat(b),[])):a.concat(b)}a.r(92434);let n=["name","httpEquiv","charSet","itemProp"];function o(a){let b,c,d,e;return a.reduce(m,[]).reverse().concat(l().reverse()).filter((b=new Set,c=new Set,d=new Set,e={},a=>{let f=!0,g=!1;if(a.key&&"number"!=typeof a.key&&a.key.indexOf("$")>0){g=!0;let c=a.key.slice(a.key.indexOf("$")+1);b.has(c)?f=!1:b.add(c)}switch(a.type){case"title":case"base":c.has(a.type)?f=!1:c.add(a.type);break;case"meta":for(let b=0,c=n.length;b<c;b++){let c=n[b];if(a.props.hasOwnProperty(c))if("charSet"===c)d.has(c)?f=!1:d.add(c);else{let b=a.props[c],d=e[c]||new Set;("name"!==c||!g)&&d.has(b)?f=!1:(d.add(b),e[c]=d)}}}return f})).reverse().map((a,b)=>{let c=a.key||b;return i.default.cloneElement(a,{key:c})})}let p=function({children:a}){let b=(0,i.useContext)(k.HeadManagerContext);return(0,h.jsx)(j.default,{reduceComponentsToState:o,headManager:b,children:a})};("function"==typeof c.default||"object"==typeof c.default&&null!==c.default)&&void 0===c.default.__esModule&&(Object.defineProperty(c.default,"__esModule",{value:!0}),Object.assign(c.default,c),b.exports=c.default)},4486,(a,b,c)=>{"use strict";b.exports=a.r(42602).vendored.contexts.ImageConfigContext},53773,(a,b,c)=>{"use strict";b.exports=a.r(42602).vendored.contexts.RouterContext},35444,(a,b,c)=>{"use strict";function d(a,b){let c=a||75;return b?.qualities?.length?b.qualities.reduce((a,b)=>Math.abs(b-c)<Math.abs(a-c)?b:a,b.qualities[0]):c}Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"findClosestQuality",{enumerable:!0,get:function(){return d}})},2305,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"default",{enumerable:!0,get:function(){return g}});let d=a.r(35444),e=a.r(68063);function f({config:a,src:b,width:c,quality:g}){let h=(0,e.getDeploymentId)();if(b.startsWith("/")&&!b.startsWith("//")){let a=b.indexOf("?");if(-1!==a){let c=new URLSearchParams(b.slice(a+1)),d=c.get("dpl");if(d){h=d,c.delete("dpl");let e=c.toString();b=b.slice(0,a)+(e?"?"+e:"")}}}if(b.startsWith("/")&&b.includes("?")&&a.localPatterns?.length===1&&"**"===a.localPatterns[0].pathname&&""===a.localPatterns[0].search)throw Object.defineProperty(Error(`Image with src "${b}" is using a query string which is not configured in images.localPatterns.
|
|
3
|
-
Read more: https://nextjs.org/docs/messages/next-image-unconfigured-localpatterns`),"__NEXT_ERROR_CODE",{value:"E871",enumerable:!1,configurable:!0});let i=(0,d.findClosestQuality)(g,a);return`${a.path}?url=${encodeURIComponent(b)}&w=${c}&q=${i}${b.startsWith("/")&&h?`&dpl=${h}`:""}`}f.__next_img_default=!0;let g=f},67161,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"Image",{enumerable:!0,get:function(){return u}});let d=a.r(33354),e=a.r(46058),f=a.r(87924),g=e._(a.r(72131)),h=d._(a.r(35112)),i=d._(a.r(58018)),j=a.r(94915),k=a.r(345),l=a.r(4486);a.r(92434);let m=a.r(53773),n=d._(a.r(2305)),o=a.r(8591),p={deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[32,48,64,96,128,256,384],qualities:[75],path:"/_next/image",loader:"default",dangerouslyAllowSVG:!1,unoptimized:!0};function q(a,b,c,d,e,f,g){let h=a?.src;a&&a["data-loaded-src"]!==h&&(a["data-loaded-src"]=h,("decode"in a?a.decode():Promise.resolve()).catch(()=>{}).then(()=>{if(a.parentElement&&a.isConnected){if("empty"!==b&&e(!0),c?.current){let b=new Event("load");Object.defineProperty(b,"target",{writable:!1,value:a});let d=!1,e=!1;c.current({...b,nativeEvent:b,currentTarget:a,target:a,isDefaultPrevented:()=>d,isPropagationStopped:()=>e,persist:()=>{},preventDefault:()=>{d=!0,b.preventDefault()},stopPropagation:()=>{e=!0,b.stopPropagation()}})}d?.current&&d.current(a)}}))}function r(a){return g.use?{fetchPriority:a}:{fetchpriority:a}}globalThis.__NEXT_IMAGE_IMPORTED=!0;let s=(0,g.forwardRef)(({src:a,srcSet:b,sizes:c,height:d,width:e,decoding:h,className:i,style:j,fetchPriority:k,placeholder:l,loading:m,unoptimized:n,fill:p,onLoadRef:s,onLoadingCompleteRef:t,setBlurComplete:u,setShowAltText:v,sizesInput:w,onLoad:x,onError:y,...z},A)=>{let B=(0,g.useCallback)(a=>{a&&(y&&(a.src=a.src),a.complete&&q(a,l,s,t,u,n,w))},[a,l,s,t,u,y,n,w]),C=(0,o.useMergedRef)(A,B);return(0,f.jsx)("img",{...z,...r(k),loading:m,width:e,height:d,decoding:h,"data-nimg":p?"fill":"1",className:i,style:j,sizes:c,srcSet:b,src:a,ref:C,onLoad:a=>{q(a.currentTarget,l,s,t,u,n,w)},onError:a=>{v(!0),"empty"!==l&&u(!0),y&&y(a)}})});function t({isAppRouter:a,imgAttributes:b}){let c={as:"image",imageSrcSet:b.srcSet,imageSizes:b.sizes,crossOrigin:b.crossOrigin,referrerPolicy:b.referrerPolicy,...r(b.fetchPriority)};return a&&h.default.preload?(h.default.preload(b.src,c),null):(0,f.jsx)(i.default,{children:(0,f.jsx)("link",{rel:"preload",href:b.srcSet?void 0:b.src,...c},"__nimg-"+b.src+b.srcSet+b.sizes)})}let u=(0,g.forwardRef)((a,b)=>{let c=(0,g.useContext)(m.RouterContext),d=(0,g.useContext)(l.ImageConfigContext),e=(0,g.useMemo)(()=>{let a=p||d||k.imageConfigDefault,b=[...a.deviceSizes,...a.imageSizes].sort((a,b)=>a-b),c=a.deviceSizes.sort((a,b)=>a-b),e=a.qualities?.sort((a,b)=>a-b);return{...a,allSizes:b,deviceSizes:c,qualities:e,localPatterns:d?.localPatterns}},[d]),{onLoad:h,onLoadingComplete:i}=a,o=(0,g.useRef)(h);(0,g.useEffect)(()=>{o.current=h},[h]);let q=(0,g.useRef)(i);(0,g.useEffect)(()=>{q.current=i},[i]);let[r,u]=(0,g.useState)(!1),[v,w]=(0,g.useState)(!1),{props:x,meta:y}=(0,j.getImgProps)(a,{defaultLoader:n.default,imgConf:e,blurComplete:r,showAltText:v});return(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(s,{...x,unoptimized:y.unoptimized,placeholder:y.placeholder,fill:y.fill,onLoadRef:o,onLoadingCompleteRef:q,setBlurComplete:u,setShowAltText:w,sizesInput:a.sizes,ref:b}),y.preload?(0,f.jsx)(t,{isAppRouter:!c,imgAttributes:x}):null]})});("function"==typeof c.default||"object"==typeof c.default&&null!==c.default)&&void 0===c.default.__esModule&&(Object.defineProperty(c.default,"__esModule",{value:!0}),Object.assign(c.default,c),b.exports=c.default)},33095,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});var d={default:function(){return k},getImageProps:function(){return j}};for(var e in d)Object.defineProperty(c,e,{enumerable:!0,get:d[e]});let f=a.r(33354),g=a.r(94915),h=a.r(67161),i=f._(a.r(2305));function j(a){let{props:b}=(0,g.getImgProps)(a,{defaultLoader:i.default,imgConf:{deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[32,48,64,96,128,256,384],qualities:[75],path:"/_next/image",loader:"default",dangerouslyAllowSVG:!1,unoptimized:!0}});for(let[a,c]of Object.entries(b))void 0===c&&delete b[a];return{props:b}}let k=h.Image},71133,(a,b,c)=>{b.exports=a.r(33095)},10815,a=>{"use strict";var b=a.i(87924),c=a.i(38246),d=a.i(50944),e=a.i(64831);let f=(0,e.default)("folder-open",[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]);var g=a.i(14258),h=a.i(71133),i=a.i(18200);let j=({width:a=32,height:c=32,className:d=""})=>{let{theme:e}=(0,i.useTheme)();return(0,b.jsx)(h.default,{src:"light"===e?"/exospheresmall-dark.png":"/exospheresmall.png",alt:"Exosphere Logo",width:a,height:c,className:d,priority:!0})},k=(0,e.default)("sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]),l=(0,e.default)("moon",[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]]);var m=a.i(40695);let n=()=>{let{theme:a,setTheme:c}=(0,i.useTheme)();return(0,b.jsxs)(m.Button,{variant:"ghost",size:"icon",onClick:()=>{c("light"===a?"dark":"light")},className:"relative","aria-label":`Switch to ${"light"===a?"dark":"light"} mode`,children:[(0,b.jsx)(k,{className:`h-[1.2rem] w-[1.2rem] transition-all ${"light"===a?"rotate-0 scale-100":"rotate-90 scale-0"}`}),(0,b.jsx)(l,{className:`absolute h-[1.2rem] w-[1.2rem] transition-all ${"dark"===a?"rotate-0 scale-100":"rotate-90 scale-0"}`})]})};var o=a.i(72131);let p=(0,e.default)("git-branch",[["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"}]]),q=(0,e.default)("lightbulb",[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",key:"1gvzjb"}],["path",{d:"M9 18h6",key:"x1upvd"}],["path",{d:"M10 22h4",key:"ceow96"}]]),r=(0,e.default)("bug",[["path",{d:"M12 20v-9",key:"1qisl0"}],["path",{d:"M14 7a4 4 0 0 1 4 4v3a6 6 0 0 1-12 0v-3a4 4 0 0 1 4-4z",key:"uouzyp"}],["path",{d:"M14.12 3.88 16 2",key:"qol33r"}],["path",{d:"M21 21a4 4 0 0 0-3.81-4",key:"1b0z45"}],["path",{d:"M21 5a4 4 0 0 1-3.55 3.97",key:"5cxbf6"}],["path",{d:"M22 13h-4",key:"1jl80f"}],["path",{d:"M3 21a4 4 0 0 1 3.81-4",key:"1fjd4g"}],["path",{d:"M3 5a4 4 0 0 0 3.55 3.97",key:"1d7oge"}],["path",{d:"M6 13H2",key:"82j7cp"}],["path",{d:"m8 2 1.88 1.88",key:"fmnt4t"}],["path",{d:"M9 7.13V6a3 3 0 1 1 6 0v1.13",key:"1vgav8"}]]),s=(0,e.default)("message-square",[["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"}]]);var t=a.i(89027);let u=(0,e.default)("star",[["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"}]]),v=(0,e.default)("book-open",[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]]),w=(0,e.default)("hash",[["line",{x1:"4",x2:"20",y1:"9",y2:"9",key:"4lhtct"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15",key:"vyu0kd"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21",key:"1ggp8o"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21",key:"weycgp"}]]),x="https://github.com/exospherehost/failproofai",y="failproofai@exosphere.host",z=[{label:"Star us on GitHub",icon:u,href:"https://github.com/exospherehost/failproofai"},{label:"Documentation",icon:v,href:"https://befailproof.ai"},{label:"Join our Slack",icon:w,href:"https://join.slack.com/t/failproofai/shared_invite/zt-3v63b7k5e-O3NBHmj8X6n9gZSGDx6ggQ"},{label:"Request a Feature",icon:q,href:`${x}/issues/new?labels=enhancement&title=Feature+Request%3A+`},{label:"Report an Issue",icon:r,href:`${x}/issues/new?labels=bug&title=Bug+Report%3A+`},{label:"Ask a Question",icon:s,href:`${x}/discussions/new?category=q-a`}],A=()=>{let[a,c]=(0,o.useState)(!1),d=(0,o.useCallback)(()=>c(!1),[]),e=(0,o.useCallback)(a=>{"Escape"===a.key&&c(!1)},[]);return(0,b.jsxs)("div",{className:"relative",onKeyDown:e,children:[a&&(0,b.jsx)("div",{className:"fixed inset-0 z-40",onClick:d,"aria-hidden":"true"}),(0,b.jsxs)(m.Button,{type:"button",variant:"ghost",size:"sm",onClick:()=>c(a=>!a),"aria-expanded":a,"aria-haspopup":"true",className:"relative z-50 flex items-center gap-1.5 text-muted-foreground hover:text-foreground",children:[(0,b.jsx)(p,{className:"h-4 w-4"}),(0,b.jsx)("span",{className:"hidden sm:inline text-xs",children:"Reach Us"}),(0,b.jsx)(t.ChevronDown,{className:`h-3 w-3 transition-transform ${a?"rotate-180":""}`})]}),a&&(0,b.jsxs)("div",{className:"absolute right-0 mt-2 w-56 rounded-lg border border-border bg-card shadow-lg z-50",role:"menu",children:[(0,b.jsxs)("div",{className:"px-3 py-2 border-b border-border",children:[(0,b.jsx)("p",{className:"text-xs font-medium text-foreground",children:"Reach Developers"}),(0,b.jsx)("p",{className:"text-[0.65rem] text-muted-foreground mt-0.5",children:"We'd love to hear from you"})]}),(0,b.jsx)("div",{className:"py-1",children:z.map(({label:a,icon:c,href:e})=>(0,b.jsxs)("a",{href:e,target:"_blank",rel:"noopener noreferrer",role:"menuitem",className:"flex items-center gap-2.5 px-3 py-2 text-xs text-muted-foreground hover:text-foreground hover:bg-muted/50 transition-colors",onClick:d,children:[(0,b.jsx)(c,{className:"h-3.5 w-3.5 flex-shrink-0"}),a]},a))}),(0,b.jsx)("div",{className:"px-3 py-2 border-t border-border",children:(0,b.jsxs)("p",{className:"text-[0.65rem] text-muted-foreground",children:["or email"," ",(0,b.jsx)("a",{href:`mailto:${y}`,className:"text-primary hover:text-primary/80 transition-colors",children:y})]})})]})]})},B=(0,e.default)("refresh-cw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);var C=a.i(97895),D=a.i(6236);let E=[{label:"Off",value:0},{label:"5s",value:5},{label:"10s",value:10},{label:"30s",value:30}];function F({className:a}){let c=(0,d.useRouter)(),[e,f]=(0,o.useTransition)(),{intervalSec:g,setIntervalSec:h}=(0,D.useAutoRefresh)(),i=(0,o.useCallback)(()=>{f(()=>c.refresh())},[c]);(0,o.useEffect)(()=>{if(g<=0)return;let a=setInterval(i,1e3*g);return()=>clearInterval(a)},[g,i]);let j=g>0;return(0,b.jsxs)("div",{className:(0,C.cn)("inline-flex items-center rounded-lg border border-border bg-muted/50 p-0.5 gap-0.5",a),children:[(0,b.jsx)("button",{onClick:i,title:"Refresh",className:(0,C.cn)("inline-flex items-center justify-center rounded-md p-1.5 transition-colors",j?"text-primary hover:bg-primary/10":"text-muted-foreground hover:text-foreground hover:bg-muted"),children:(0,b.jsx)(B,{className:(0,C.cn)("w-3.5 h-3.5",e&&"animate-spin")})}),(0,b.jsx)("div",{className:"w-px h-4 bg-border"}),(0,b.jsx)("div",{className:"inline-flex items-center gap-0.5",role:"group","aria-label":"Auto-refresh interval",children:E.map(a=>(0,b.jsx)("button",{onClick:()=>h(a.value),"aria-pressed":g===a.value,className:(0,C.cn)("px-2 py-1 text-[11px] font-medium rounded-md transition-colors",g===a.value?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground hover:bg-muted"),children:a.label},a.value))})]})}let G=[{href:"/policies",label:"Policies",icon:g.Shield},{href:"/projects",label:"Projects",icon:f}];a.s(["Navbar",0,({disabledPages:a=[]})=>{let e=(0,d.usePathname)();return(0,b.jsx)("header",{className:"relative z-50 border-b border-border bg-card/50 backdrop-blur supports-[backdrop-filter]:bg-card/50",children:(0,b.jsx)("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:(0,b.jsxs)("div",{className:"flex items-center justify-between h-16",children:[(0,b.jsxs)("div",{className:"flex items-center gap-3",children:[(0,b.jsxs)("a",{href:"https://github.com/exospherehost/failproofai",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-3 hover:opacity-80 transition-opacity",children:[(0,b.jsx)(j,{width:28,height:28,className:"flex-shrink-0"}),(0,b.jsx)("h1",{className:"text-lg font-semibold text-foreground leading-tight tracking-tight",children:"Failproof AI"})]}),(0,b.jsxs)("span",{className:"text-[0.6rem] font-mono leading-none text-muted-foreground/70 border border-border/60 rounded-md px-1.5 py-0.5 select-none tracking-wide",children:["v","0.0.9"]}),(0,b.jsx)("div",{className:"w-px h-8 bg-border ml-2"}),(0,b.jsx)("nav",{className:"flex items-center h-16",children:G.filter(({href:b})=>{let c=b.slice(1);return!a.includes(c)}).map(({href:a,label:d,icon:f})=>{let g="/projects"===a?"/projects"===e||e.startsWith("/project/"):e.startsWith(a);return(0,b.jsxs)(c.default,{href:a,className:`relative flex items-center gap-1.5 px-3 h-full text-sm transition-colors ${g?"text-foreground font-medium":"text-muted-foreground hover:text-foreground"}`,children:[(0,b.jsx)(f,{className:`w-4 h-4 ${g?"text-primary":""}`}),d,(0,b.jsx)("span",{className:`absolute inset-x-1 bottom-0 h-[2px] rounded-full transition-all ${g?"bg-primary":"bg-transparent group-hover:bg-muted"}`})]},a)})})]}),(0,b.jsxs)("div",{className:"flex items-center gap-1",children:[(0,b.jsx)(F,{}),(0,b.jsx)("div",{className:"w-px h-6 bg-border mx-1"}),(0,b.jsx)(A,{}),(0,b.jsx)(n,{})]})]})})})}],10815)},18952,a=>{"use strict";var b=a.i(87924),c=a.i(72131);let d=[],e=0,f=new Set;function g(){for(let a of f)a()}function h(a){return f.add(a),()=>f.delete(a)}function i(){return d}function j({message:a}){let[d,e]=(0,c.useState)(!1);return(0,c.useEffect)(()=>{requestAnimationFrame(()=>e(!0));let a=setTimeout(()=>e(!1),2e3);return()=>clearTimeout(a)},[]),(0,b.jsx)("div",{className:`bg-card border border-border text-foreground text-sm px-4 py-2 rounded-lg shadow-lg transition-opacity duration-300 ${d?"opacity-100":"opacity-0"}`,children:a})}a.s(["Toaster",0,function(){let a=(0,c.useSyncExternalStore)(h,i,i);return(0,b.jsx)("div",{className:"fixed bottom-4 right-4 z-50 flex flex-col gap-2",children:a.map(a=>(0,b.jsx)(j,{message:a.message},a.id))})},"toast",0,function(a){let b=e++;d=[...d,{id:b,message:a}],g(),setTimeout(()=>{d=d.filter(a=>a.id!==b),g()},2500)}])}];
|
|
3
|
+
Read more: https://nextjs.org/docs/messages/next-image-unconfigured-localpatterns`),"__NEXT_ERROR_CODE",{value:"E871",enumerable:!1,configurable:!0});let i=(0,d.findClosestQuality)(g,a);return`${a.path}?url=${encodeURIComponent(b)}&w=${c}&q=${i}${b.startsWith("/")&&h?`&dpl=${h}`:""}`}f.__next_img_default=!0;let g=f},67161,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"Image",{enumerable:!0,get:function(){return u}});let d=a.r(33354),e=a.r(46058),f=a.r(87924),g=e._(a.r(72131)),h=d._(a.r(35112)),i=d._(a.r(58018)),j=a.r(94915),k=a.r(345),l=a.r(4486);a.r(92434);let m=a.r(53773),n=d._(a.r(2305)),o=a.r(8591),p={deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[32,48,64,96,128,256,384],qualities:[75],path:"/_next/image",loader:"default",dangerouslyAllowSVG:!1,unoptimized:!0};function q(a,b,c,d,e,f,g){let h=a?.src;a&&a["data-loaded-src"]!==h&&(a["data-loaded-src"]=h,("decode"in a?a.decode():Promise.resolve()).catch(()=>{}).then(()=>{if(a.parentElement&&a.isConnected){if("empty"!==b&&e(!0),c?.current){let b=new Event("load");Object.defineProperty(b,"target",{writable:!1,value:a});let d=!1,e=!1;c.current({...b,nativeEvent:b,currentTarget:a,target:a,isDefaultPrevented:()=>d,isPropagationStopped:()=>e,persist:()=>{},preventDefault:()=>{d=!0,b.preventDefault()},stopPropagation:()=>{e=!0,b.stopPropagation()}})}d?.current&&d.current(a)}}))}function r(a){return g.use?{fetchPriority:a}:{fetchpriority:a}}globalThis.__NEXT_IMAGE_IMPORTED=!0;let s=(0,g.forwardRef)(({src:a,srcSet:b,sizes:c,height:d,width:e,decoding:h,className:i,style:j,fetchPriority:k,placeholder:l,loading:m,unoptimized:n,fill:p,onLoadRef:s,onLoadingCompleteRef:t,setBlurComplete:u,setShowAltText:v,sizesInput:w,onLoad:x,onError:y,...z},A)=>{let B=(0,g.useCallback)(a=>{a&&(y&&(a.src=a.src),a.complete&&q(a,l,s,t,u,n,w))},[a,l,s,t,u,y,n,w]),C=(0,o.useMergedRef)(A,B);return(0,f.jsx)("img",{...z,...r(k),loading:m,width:e,height:d,decoding:h,"data-nimg":p?"fill":"1",className:i,style:j,sizes:c,srcSet:b,src:a,ref:C,onLoad:a=>{q(a.currentTarget,l,s,t,u,n,w)},onError:a=>{v(!0),"empty"!==l&&u(!0),y&&y(a)}})});function t({isAppRouter:a,imgAttributes:b}){let c={as:"image",imageSrcSet:b.srcSet,imageSizes:b.sizes,crossOrigin:b.crossOrigin,referrerPolicy:b.referrerPolicy,...r(b.fetchPriority)};return a&&h.default.preload?(h.default.preload(b.src,c),null):(0,f.jsx)(i.default,{children:(0,f.jsx)("link",{rel:"preload",href:b.srcSet?void 0:b.src,...c},"__nimg-"+b.src+b.srcSet+b.sizes)})}let u=(0,g.forwardRef)((a,b)=>{let c=(0,g.useContext)(m.RouterContext),d=(0,g.useContext)(l.ImageConfigContext),e=(0,g.useMemo)(()=>{let a=p||d||k.imageConfigDefault,b=[...a.deviceSizes,...a.imageSizes].sort((a,b)=>a-b),c=a.deviceSizes.sort((a,b)=>a-b),e=a.qualities?.sort((a,b)=>a-b);return{...a,allSizes:b,deviceSizes:c,qualities:e,localPatterns:d?.localPatterns}},[d]),{onLoad:h,onLoadingComplete:i}=a,o=(0,g.useRef)(h);(0,g.useEffect)(()=>{o.current=h},[h]);let q=(0,g.useRef)(i);(0,g.useEffect)(()=>{q.current=i},[i]);let[r,u]=(0,g.useState)(!1),[v,w]=(0,g.useState)(!1),{props:x,meta:y}=(0,j.getImgProps)(a,{defaultLoader:n.default,imgConf:e,blurComplete:r,showAltText:v});return(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(s,{...x,unoptimized:y.unoptimized,placeholder:y.placeholder,fill:y.fill,onLoadRef:o,onLoadingCompleteRef:q,setBlurComplete:u,setShowAltText:w,sizesInput:a.sizes,ref:b}),y.preload?(0,f.jsx)(t,{isAppRouter:!c,imgAttributes:x}):null]})});("function"==typeof c.default||"object"==typeof c.default&&null!==c.default)&&void 0===c.default.__esModule&&(Object.defineProperty(c.default,"__esModule",{value:!0}),Object.assign(c.default,c),b.exports=c.default)},33095,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});var d={default:function(){return k},getImageProps:function(){return j}};for(var e in d)Object.defineProperty(c,e,{enumerable:!0,get:d[e]});let f=a.r(33354),g=a.r(94915),h=a.r(67161),i=f._(a.r(2305));function j(a){let{props:b}=(0,g.getImgProps)(a,{defaultLoader:i.default,imgConf:{deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[32,48,64,96,128,256,384],qualities:[75],path:"/_next/image",loader:"default",dangerouslyAllowSVG:!1,unoptimized:!0}});for(let[a,c]of Object.entries(b))void 0===c&&delete b[a];return{props:b}}let k=h.Image},71133,(a,b,c)=>{b.exports=a.r(33095)},10815,a=>{"use strict";var b=a.i(87924),c=a.i(38246),d=a.i(50944),e=a.i(64831);let f=(0,e.default)("folder-open",[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]);var g=a.i(14258),h=a.i(71133),i=a.i(18200);let j=({width:a=32,height:c=32,className:d=""})=>{let{theme:e}=(0,i.useTheme)();return(0,b.jsx)(h.default,{src:"light"===e?"/exospheresmall-dark.png":"/exospheresmall.png",alt:"Exosphere Logo",width:a,height:c,className:d,priority:!0})},k=(0,e.default)("sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]),l=(0,e.default)("moon",[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]]);var m=a.i(40695);let n=()=>{let{theme:a,setTheme:c}=(0,i.useTheme)();return(0,b.jsxs)(m.Button,{variant:"ghost",size:"icon",onClick:()=>{c("light"===a?"dark":"light")},className:"relative","aria-label":`Switch to ${"light"===a?"dark":"light"} mode`,children:[(0,b.jsx)(k,{className:`h-[1.2rem] w-[1.2rem] transition-all ${"light"===a?"rotate-0 scale-100":"rotate-90 scale-0"}`}),(0,b.jsx)(l,{className:`absolute h-[1.2rem] w-[1.2rem] transition-all ${"dark"===a?"rotate-0 scale-100":"rotate-90 scale-0"}`})]})};var o=a.i(72131);let p=(0,e.default)("git-branch",[["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"}]]),q=(0,e.default)("lightbulb",[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",key:"1gvzjb"}],["path",{d:"M9 18h6",key:"x1upvd"}],["path",{d:"M10 22h4",key:"ceow96"}]]),r=(0,e.default)("bug",[["path",{d:"M12 20v-9",key:"1qisl0"}],["path",{d:"M14 7a4 4 0 0 1 4 4v3a6 6 0 0 1-12 0v-3a4 4 0 0 1 4-4z",key:"uouzyp"}],["path",{d:"M14.12 3.88 16 2",key:"qol33r"}],["path",{d:"M21 21a4 4 0 0 0-3.81-4",key:"1b0z45"}],["path",{d:"M21 5a4 4 0 0 1-3.55 3.97",key:"5cxbf6"}],["path",{d:"M22 13h-4",key:"1jl80f"}],["path",{d:"M3 21a4 4 0 0 1 3.81-4",key:"1fjd4g"}],["path",{d:"M3 5a4 4 0 0 0 3.55 3.97",key:"1d7oge"}],["path",{d:"M6 13H2",key:"82j7cp"}],["path",{d:"m8 2 1.88 1.88",key:"fmnt4t"}],["path",{d:"M9 7.13V6a3 3 0 1 1 6 0v1.13",key:"1vgav8"}]]),s=(0,e.default)("message-square",[["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"}]]);var t=a.i(89027);let u=(0,e.default)("star",[["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"}]]),v=(0,e.default)("book-open",[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]]),w=(0,e.default)("hash",[["line",{x1:"4",x2:"20",y1:"9",y2:"9",key:"4lhtct"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15",key:"vyu0kd"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21",key:"1ggp8o"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21",key:"weycgp"}]]),x="https://github.com/exospherehost/failproofai",y="failproofai@exosphere.host",z=[{label:"Star us on GitHub",icon:u,href:"https://github.com/exospherehost/failproofai"},{label:"Documentation",icon:v,href:"https://befailproof.ai"},{label:"Join our Slack",icon:w,href:"https://join.slack.com/t/failproofai/shared_invite/zt-3v63b7k5e-O3NBHmj8X6n9gZSGDx6ggQ"},{label:"Request a Feature",icon:q,href:`${x}/issues/new?labels=enhancement&title=Feature+Request%3A+`},{label:"Report an Issue",icon:r,href:`${x}/issues/new?labels=bug&title=Bug+Report%3A+`},{label:"Ask a Question",icon:s,href:`${x}/discussions/new?category=q-a`}],A=()=>{let[a,c]=(0,o.useState)(!1),d=(0,o.useCallback)(()=>c(!1),[]),e=(0,o.useCallback)(a=>{"Escape"===a.key&&c(!1)},[]);return(0,b.jsxs)("div",{className:"relative",onKeyDown:e,children:[a&&(0,b.jsx)("div",{className:"fixed inset-0 z-40",onClick:d,"aria-hidden":"true"}),(0,b.jsxs)(m.Button,{type:"button",variant:"ghost",size:"sm",onClick:()=>c(a=>!a),"aria-expanded":a,"aria-haspopup":"true",className:"relative z-50 flex items-center gap-1.5 text-muted-foreground hover:text-foreground",children:[(0,b.jsx)(p,{className:"h-4 w-4"}),(0,b.jsx)("span",{className:"hidden sm:inline text-xs",children:"Reach Us"}),(0,b.jsx)(t.ChevronDown,{className:`h-3 w-3 transition-transform ${a?"rotate-180":""}`})]}),a&&(0,b.jsxs)("div",{className:"absolute right-0 mt-2 w-56 rounded-lg border border-border bg-card shadow-lg z-50",role:"menu",children:[(0,b.jsxs)("div",{className:"px-3 py-2 border-b border-border",children:[(0,b.jsx)("p",{className:"text-xs font-medium text-foreground",children:"Reach Developers"}),(0,b.jsx)("p",{className:"text-[0.65rem] text-muted-foreground mt-0.5",children:"We'd love to hear from you"})]}),(0,b.jsx)("div",{className:"py-1",children:z.map(({label:a,icon:c,href:e})=>(0,b.jsxs)("a",{href:e,target:"_blank",rel:"noopener noreferrer",role:"menuitem",className:"flex items-center gap-2.5 px-3 py-2 text-xs text-muted-foreground hover:text-foreground hover:bg-muted/50 transition-colors",onClick:d,children:[(0,b.jsx)(c,{className:"h-3.5 w-3.5 flex-shrink-0"}),a]},a))}),(0,b.jsx)("div",{className:"px-3 py-2 border-t border-border",children:(0,b.jsxs)("p",{className:"text-[0.65rem] text-muted-foreground",children:["or email"," ",(0,b.jsx)("a",{href:`mailto:${y}`,className:"text-primary hover:text-primary/80 transition-colors",children:y})]})})]})]})},B=(0,e.default)("refresh-cw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);var C=a.i(97895),D=a.i(6236);let E=[{label:"Off",value:0},{label:"5s",value:5},{label:"10s",value:10},{label:"30s",value:30}];function F({className:a}){let c=(0,d.useRouter)(),[e,f]=(0,o.useTransition)(),{intervalSec:g,setIntervalSec:h}=(0,D.useAutoRefresh)(),i=(0,o.useCallback)(()=>{f(()=>c.refresh())},[c]);(0,o.useEffect)(()=>{if(g<=0)return;let a=setInterval(i,1e3*g);return()=>clearInterval(a)},[g,i]);let j=g>0;return(0,b.jsxs)("div",{className:(0,C.cn)("inline-flex items-center rounded-lg border border-border bg-muted/50 p-0.5 gap-0.5",a),children:[(0,b.jsx)("button",{onClick:i,title:"Refresh",className:(0,C.cn)("inline-flex items-center justify-center rounded-md p-1.5 transition-colors",j?"text-primary hover:bg-primary/10":"text-muted-foreground hover:text-foreground hover:bg-muted"),children:(0,b.jsx)(B,{className:(0,C.cn)("w-3.5 h-3.5",e&&"animate-spin")})}),(0,b.jsx)("div",{className:"w-px h-4 bg-border"}),(0,b.jsx)("div",{className:"inline-flex items-center gap-0.5",role:"group","aria-label":"Auto-refresh interval",children:E.map(a=>(0,b.jsx)("button",{onClick:()=>h(a.value),"aria-pressed":g===a.value,className:(0,C.cn)("px-2 py-1 text-[11px] font-medium rounded-md transition-colors",g===a.value?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground hover:bg-muted"),children:a.label},a.value))})]})}let G=[{href:"/policies",label:"Policies",icon:g.Shield},{href:"/projects",label:"Projects",icon:f}];a.s(["Navbar",0,({disabledPages:a=[]})=>{let e=(0,d.usePathname)();return(0,b.jsx)("header",{className:"relative z-50 border-b border-border bg-card/50 backdrop-blur supports-[backdrop-filter]:bg-card/50",children:(0,b.jsx)("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:(0,b.jsxs)("div",{className:"flex items-center justify-between h-16",children:[(0,b.jsxs)("div",{className:"flex items-center gap-3",children:[(0,b.jsxs)("a",{href:"https://github.com/exospherehost/failproofai",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-3 hover:opacity-80 transition-opacity",children:[(0,b.jsx)(j,{width:28,height:28,className:"flex-shrink-0"}),(0,b.jsx)("h1",{className:"text-lg font-semibold text-foreground leading-tight tracking-tight",children:"Failproof AI"})]}),(0,b.jsxs)("span",{className:"text-[0.6rem] font-mono leading-none text-muted-foreground/70 border border-border/60 rounded-md px-1.5 py-0.5 select-none tracking-wide",children:["v","0.0.10-beta.1"]}),(0,b.jsx)("div",{className:"w-px h-8 bg-border ml-2"}),(0,b.jsx)("nav",{className:"flex items-center h-16",children:G.filter(({href:b})=>{let c=b.slice(1);return!a.includes(c)}).map(({href:a,label:d,icon:f})=>{let g="/projects"===a?"/projects"===e||e.startsWith("/project/"):e.startsWith(a);return(0,b.jsxs)(c.default,{href:a,className:`relative flex items-center gap-1.5 px-3 h-full text-sm transition-colors ${g?"text-foreground font-medium":"text-muted-foreground hover:text-foreground"}`,children:[(0,b.jsx)(f,{className:`w-4 h-4 ${g?"text-primary":""}`}),d,(0,b.jsx)("span",{className:`absolute inset-x-1 bottom-0 h-[2px] rounded-full transition-all ${g?"bg-primary":"bg-transparent group-hover:bg-muted"}`})]},a)})})]}),(0,b.jsxs)("div",{className:"flex items-center gap-1",children:[(0,b.jsx)(F,{}),(0,b.jsx)("div",{className:"w-px h-6 bg-border mx-1"}),(0,b.jsx)(A,{}),(0,b.jsx)(n,{})]})]})})})}],10815)},18952,a=>{"use strict";var b=a.i(87924),c=a.i(72131);let d=[],e=0,f=new Set;function g(){for(let a of f)a()}function h(a){return f.add(a),()=>f.delete(a)}function i(){return d}function j({message:a}){let[d,e]=(0,c.useState)(!1);return(0,c.useEffect)(()=>{requestAnimationFrame(()=>e(!0));let a=setTimeout(()=>e(!1),2e3);return()=>clearTimeout(a)},[]),(0,b.jsx)("div",{className:`bg-card border border-border text-foreground text-sm px-4 py-2 rounded-lg shadow-lg transition-opacity duration-300 ${d?"opacity-100":"opacity-0"}`,children:a})}a.s(["Toaster",0,function(){let a=(0,c.useSyncExternalStore)(h,i,i);return(0,b.jsx)("div",{className:"fixed bottom-4 right-4 z-50 flex flex-col gap-2",children:a.map(a=>(0,b.jsx)(j,{message:a.message},a.id))})},"toast",0,function(a){let b=e++;d=[...d,{id:b,message:a}],g(),setTimeout(()=>{d=d.filter(a=>a.id!==b),g()},2500)}])}];
|
|
4
4
|
|
|
5
5
|
//# sourceMappingURL=_10lm7or._.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
module.exports=[14066,a=>{"use strict";a.s(["default",()=>b]);let b=(0,a.i(11857).registerClientReference)(function(){throw Error("Attempted to call the default export of [project]/app/components/lazy-log-viewer.tsx <module evaluation> from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/app/components/lazy-log-viewer.tsx <module evaluation>","default")},19597,a=>{"use strict";a.s(["default",()=>b]);let b=(0,a.i(11857).registerClientReference)(function(){throw Error("Attempted to call the default export of [project]/app/components/lazy-log-viewer.tsx from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/app/components/lazy-log-viewer.tsx","default")},71130,a=>{"use strict";a.i(14066);var b=a.i(19597);a.n(b)},85540,a=>{"use strict";a.s(["CopyButton",()=>b]);let b=(0,a.i(11857).registerClientReference)(function(){throw Error("Attempted to call CopyButton() from the server but CopyButton is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/app/components/copy-button.tsx <module evaluation>","CopyButton")},35770,a=>{"use strict";a.s(["CopyButton",()=>b]);let b=(0,a.i(11857).registerClientReference)(function(){throw Error("Attempted to call CopyButton() from the server but CopyButton is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/app/components/copy-button.tsx","CopyButton")},893,a=>{"use strict";a.i(85540);var b=a.i(35770);a.n(b)},41190,a=>{"use strict";var b=a.i(7997),c=a.i(95936),d=a.i(84930);let e=(0,a.i(92277).default)("download",[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]]);a.i(70396);var f=a.i(73727),g=a.i(24868),h=a.i(14747),i=a.i(90798),j=a.i(69191);async function k(a,b,c,d){let e=`agent-${d}.jsonl`;for(let d of[(0,h.join)(a,b,e),(0,h.join)(a,b,c,e),(0,h.join)(a,b,c,"subagents",e)])if(!(0,h.relative)(a,d).startsWith(".."))try{return await (0,g.access)(d),d}catch(a){if("ENOENT"===a.code)continue;break}return null}var l=a.i(34900),m=a.i(26192),n=a.i(33432);function o(a){if(a<1e3)return`${a}ms`;let b=a/1e3;if(b<60)return`${b.toFixed(1)}s`;let c=Math.floor(b/60);if(c>=60){let a=Math.floor(c/60);return`${a}h ${c%60}m`}let d=(b%60).toFixed(0);return`${c}m ${d}s`}function p(a){let b=(0,n.formatDate)(a),c=a.getMilliseconds().toString().padStart(3,"0");return`${b}.${c}`}function q(a,b,c,d){return{_source:d,uuid:a.uuid||"",parentUuid:a.parentUuid??null,timestamp:b,timestampMs:c.getTime(),timestampFormatted:p(c)}}async function r(a,b){let c=a.split("\n").filter(a=>""!==a.trim()),d=new Map,e=[],f=[],g=new Set,h=!1;for(let a=0;a<c.length;a++){let i;a>0&&a%200==0&&await new Promise(a=>setImmediate(a));let j=c[a];try{i=JSON.parse(j)}catch{continue}let k={...i,_source:b};f.push(k);let l=i.type,m=i.timestamp;if(!m)continue;let n=new Date(m),o=n.getTime();if("user"===l){let a=i.message;if(Array.isArray(a?.content)){let b=a.content;if(b.some(a=>"tool_result"===a.type)){let a=i.toolUseResult,c="string"==typeof a?.agentId?a.agentId:void 0;for(let a of(c&&/^[a-f0-9]+$/.test(c)&&g.add(c),b)){if("tool_result"!==a.type)continue;let b=a.tool_use_id;if(!b)continue;let{text:e,images:f}=function(a){let b=a.content;if("string"==typeof b)return{text:b};if(Array.isArray(b)){let a=b.filter(a=>"text"===a.type).map(a=>a.text),c=b.filter(a=>"image"===a.type).map(a=>{let b=a.source;return{base64:b.data,mediaType:b.media_type}}).filter(a=>a.base64&&a.mediaType);return{text:a.length>0?a.join("\n"):void 0,images:c.length>0?c:void 0}}return{}}(a);d.set(b,{timestamp:m,timestampMs:o,content:e,images:f,agentId:c})}continue}}let c="string"==typeof a?.content?a.content:"";e.push({type:"user",...q(i,m,n,b),message:{role:"user",content:c}});continue}if("assistant"===l){let a=i.message,c=[];if(Array.isArray(a?.content)&&(c=a.content.filter(a=>["text","tool_use","thinking"].includes(a.type)).map(a=>{if("text"===a.type)return{type:"text",text:a.text};if("tool_use"===a.type){let b=a.input;return{type:"tool_use",id:a.id,name:a.name,input:a.input??{},..."Task"===a.name&&b?{subagentType:b.subagent_type,subagentDescription:b.description}:{}}}return{type:"thinking",thinking:a.thinking,signature:a.signature}})),0===c.length)continue;e.push({type:"assistant",...q(i,m,n,b),message:{role:"assistant",content:c,model:a?.model}});continue}if("file-history-snapshot"===l||"progress"===l||"system"===l){e.push({type:l,...q(i,m,n,b),raw:{...i}});continue}if("queue-operation"===l){let a=h?"Session Resumed":"Session Started";h=!0,e.push({type:"queue-operation",...q(i,m,n,b),label:a});continue}}let i=0;for(let a of e)if("assistant"===a.type)for(let b of(++i%200==0&&await new Promise(a=>setImmediate(a)),a.message.content)){if("tool_use"!==b.type)continue;let c=d.get(b.id);if(!c)continue;let e=new Date(c.timestamp),f=Math.max(0,c.timestampMs-a.timestampMs);b.result={timestamp:c.timestamp,timestampFormatted:p(e),content:c.content,images:c.images,durationMs:f,durationFormatted:o(f)},c.agentId&&(b.subagentId=c.agentId)}return e.length>500&&await new Promise(a=>setImmediate(a)),e.sort((a,b)=>a.timestampMs-b.timestampMs),{entries:e,rawLines:f,subagentIds:Array.from(g)}}async function s(a,b){let c=(0,j.resolveProjectPath)(a),d=(0,i.getClaudeProjectsPath)(),e=(0,h.join)(c,`${b}.jsonl`),f=await (0,g.readFile)(e,"utf-8"),{entries:l,rawLines:n,subagentIds:o}=await r(f,"session");if(0===o.length)return{entries:l,rawLines:n,subagentIds:[]};let p=await (0,m.batchAll)(o.map(c=>async()=>{let e=`agent-${c}`,f=await k(d,a,b,c);if(!f)return null;let h=await (0,g.readFile)(f,"utf-8"),{entries:i,rawLines:j}=await r(h,e);return{entries:i,rawLines:j}}),4),q=[...l],s=[...n];for(let a of p)"fulfilled"===a.status&&a.value&&(q.push(...a.value.entries),s.push(...a.value.rawLines));return q.length>500&&await new Promise(a=>setImmediate(a)),q.sort((a,b)=>a.timestampMs-b.timestampMs),{entries:q,rawLines:s,subagentIds:o}}let t=(0,l.runtimeCache)((a,b)=>s(a,b),60,{maxSize:50});var u=a.i(2157),v=a.i(12714),w=a.i(50227),x=a.i(60526);let y=(0,w.join)((0,x.homedir)(),".failproofai","cache","codex-session-paths.json");function z(){try{if(!(0,u.existsSync)(y))return{};return JSON.parse((0,u.readFileSync)(y,"utf-8"))}catch{return{}}}function A(a,b){try{(0,u.mkdirSync)((0,w.dirname)(y),{recursive:!0});let c=z();c[a]=b,(0,u.writeFileSync)(y,JSON.stringify(c),"utf-8")}catch{}}function B(a,b){try{for(let c of(0,u.readdirSync)(a,{withFileTypes:!0}))if(c.isFile()&&c.name.includes(b)&&c.name.endsWith(".jsonl"))return(0,w.join)(a,c.name)}catch{}return null}function C(a,b){return Array.isArray(a)?a.filter(a=>a?.type===b&&"string"==typeof a.text).map(a=>a.text).join("\n"):""}async function D(a,b="session"){let c,d=a.split("\n").filter(a=>""!==a.trim()),e=[],f=[],g=new Map,h=new Map,i=!1;for(let a=0;a<d.length;a++){let j;a>0&&a%200==0&&await new Promise(a=>setImmediate(a));let k=d[a];try{j=JSON.parse(k)}catch{continue}let l={...j,_source:b};f.push(l);let m=j.timestamp;if(!m)continue;let n=new Date(m);if(Number.isNaN(n.getTime()))continue;let r=j.type,s=j.payload??{};if("session_meta"===r){let a=s.cwd;"string"!=typeof a||c||(c=a),e.push({type:"system",...q(l,m,n,b),raw:l});continue}if("response_item"===r){let a=s.type;if("message"===a){let a=s.role,c=s.content;if("user"===a||"developer"===a){let d=C(c,"input_text");if(!d)continue;let f="developer"===a?`[developer] ${d}`:d;e.push({type:"user",...q(l,m,n,b),message:{role:"user",content:f}});continue}if("assistant"===a){let a=C(c,"output_text");if(!a)continue;let d=[{type:"text",text:a}];e.push({type:"assistant",...q(l,m,n,b),message:{role:"assistant",content:d}});continue}e.push({type:"system",...q(l,m,n,b),raw:l});continue}if("function_call"===a){let a=s.call_id,c=s.name??"function_call",d={type:"tool_use",id:a??`${m}-${c}`,name:c,input:function(a){if(!a)return{};try{return JSON.parse(a)}catch{return{}}}(s.arguments)},f={type:"assistant",...q(l,m,n,b),message:{role:"assistant",content:[d]}};e.push(f),a&&(g.set(a,d),h.set(a,n.getTime()));continue}if("function_call_output"===a){let a=s.call_id,c=a?g.get(a):void 0;if(c){let b=h.get(a)??n.getTime(),d=Math.max(0,n.getTime()-b);c.result={timestamp:m,timestampFormatted:p(n),content:"string"==typeof s.output?s.output:JSON.stringify(s.output),durationMs:d,durationFormatted:o(d)};continue}e.push({type:"system",...q(l,m,n,b),raw:l});continue}e.push({type:"system",...q(l,m,n,b),raw:l});continue}if("event_msg"===r){let a=s.type;if("task_started"===a){let a=i?"Session Resumed":"Session Started";i=!0,e.push({type:"queue-operation",...q(l,m,n,b),label:a});continue}if("exec_command_end"===a){let a=s.call_id,c=a?g.get(a):void 0;if(c){let b=s.duration,d=b?(b.secs??0)*1e3+Math.round((b.nanos??0)/1e6):Math.max(0,n.getTime()-(h.get(a)??n.getTime())),e=s.aggregated_output;c.result={timestamp:m,timestampFormatted:p(n),content:"string"==typeof e?e:JSON.stringify(e),durationMs:d,durationFormatted:o(d)};continue}e.push({type:"system",...q(l,m,n,b),raw:l});continue}if("user_message"===a||"agent_message"===a)continue;e.push({type:"system",...q(l,m,n,b),raw:l});continue}e.push({type:"system",...q(l,m,n,b),raw:l})}return e.length>500&&await new Promise(a=>setImmediate(a)),e.sort((a,b)=>a.timestampMs-b.timestampMs),{entries:e,rawLines:f,cwd:c}}async function E(a){let b=function(a){let b=z()[a];if(b&&(0,u.existsSync)(b))return b;let c=(0,w.join)((0,x.homedir)(),".codex","sessions"),d=new Date,e=new Date(d.getTime()-864e5);for(let b of[d,e].map(a=>{let b=String(a.getUTCFullYear()),d=String(a.getUTCMonth()+1).padStart(2,"0"),e=String(a.getUTCDate()).padStart(2,"0");return(0,w.join)(c,b,d,e)})){let c=B(b,a);if(c)return A(a,c),c}try{for(let b of(0,u.readdirSync)(c,{withFileTypes:!0}))if(b.isDirectory()){for(let d of(0,u.readdirSync)((0,w.join)(c,b.name),{withFileTypes:!0}))if(d.isDirectory())for(let e of(0,u.readdirSync)((0,w.join)(c,b.name,d.name),{withFileTypes:!0})){if(!e.isDirectory())continue;let f=B((0,w.join)(c,b.name,d.name,e.name),a);if(f)return A(a,f),f}}}catch{}return null}(a);if(!b)return null;let c=await (0,v.readFile)(b,"utf-8"),{entries:d,rawLines:e,cwd:f}=await D(c,"session");return{entries:d,rawLines:e,cwd:f,filePath:b}}let F=(0,l.runtimeCache)(a=>E(a),60,{maxSize:50});var G=a.i(71130),H=a.i(893);function I({cli:a}){let c="codex"===a,d=c?"OpenAI Codex":"Claude Code";return(0,b.jsx)("span",{className:`inline-flex items-center rounded px-1.5 py-0.5 text-[0.6rem] font-medium border ${c?"bg-purple-500/10 text-purple-400 border-purple-500/20":"bg-orange-500/10 text-orange-400 border-orange-500/20"}`,title:`Agent CLI: ${d}`,children:d})}async function J({params:a}){let g,h,{name:k,sessionId:l}=await a;try{(0,j.resolveProjectPath)(k)}catch{(0,f.notFound)()}let m=(0,i.decodeFolderName)(k),n=-1===(h=l.indexOf("/"))?l:l.slice(0,h);j.UUID_RE.test(n)||(0,f.notFound)();let o=null,p=null,q=null,r="claude";try{let a=await t(k,n);o=a.entries,p=a.rawLines}catch(a){if("ENOENT"===a.code){let a=await F(n);a?(o=a.entries,p=a.rawLines,g=a.cwd,r="codex"):q="Session log file not found."}else q="Failed to read session log."}let s="codex"===r,u=s?`OpenAI Codex${g?` \xb7 ${g}`:""}`:m;return(0,b.jsx)("main",{className:"min-h-screen bg-background",children:(0,b.jsxs)("div",{className:"container mx-auto p-8",children:[(0,b.jsxs)(c.default,{href:s?"/policies?tab=activity":`/project/${encodeURIComponent(k)}`,className:"inline-flex items-center gap-2 text-muted-foreground hover:text-foreground mb-6 transition-colors",children:[(0,b.jsx)(d.ArrowLeft,{className:"w-4 h-4"}),(0,b.jsx)("span",{children:s?"Back to Activity":"Back to Sessions"})]}),(0,b.jsxs)("div",{className:"mb-8",children:[(0,b.jsxs)("div",{className:"flex flex-wrap items-center gap-3 mb-2",children:[(0,b.jsx)("h1",{className:"text-4xl font-bold text-foreground",children:"Session Log"}),(0,b.jsx)(I,{cli:r})]}),(0,b.jsxs)("div",{className:"space-y-1",children:[(0,b.jsxs)("p",{className:"text-muted-foreground",children:[(0,b.jsxs)("span",{className:"font-medium",children:[s?"CLI":"Project",":"]})," ",u]}),(0,b.jsxs)("p",{className:"text-muted-foreground break-words break-all inline-flex items-center gap-1",children:[(0,b.jsx)("span",{className:"font-medium",children:"Session:"})," ",n,(0,b.jsx)(H.CopyButton,{text:n})]}),o&&p&&(0,b.jsxs)("div",{className:"flex items-center gap-4",children:[(0,b.jsxs)("p",{className:"text-muted-foreground",children:[(0,b.jsx)("span",{className:"font-medium",children:p.length})," log lines"]}),!s&&(0,b.jsxs)("a",{href:`/api/download/${encodeURIComponent(k)}/${encodeURIComponent(n)}`,download:!0,className:"inline-flex items-center gap-1.5 px-3 py-1.5 text-sm rounded-md bg-muted text-muted-foreground hover:bg-muted/80 hover:text-foreground transition-colors",children:[(0,b.jsx)(e,{className:"w-4 h-4"}),"Download Logs"]})]})]})]}),q&&(0,b.jsx)("div",{className:"bg-card text-card-foreground rounded-lg border border-destructive/50 p-6 shadow-sm",children:(0,b.jsx)("p",{className:"text-destructive text-center py-8",children:q})}),!q&&o&&(0,b.jsx)(G.default,{entries:o,projectName:s?g??"OpenAI Codex":m,sessionId:n})]})})}a.s(["default",0,J,"dynamic",0,"force-dynamic"],41190)},87330,a=>{a.n(a.i(41190))}];
|
|
1
|
+
module.exports=[14066,a=>{"use strict";a.s(["default",()=>b]);let b=(0,a.i(11857).registerClientReference)(function(){throw Error("Attempted to call the default export of [project]/app/components/lazy-log-viewer.tsx <module evaluation> from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/app/components/lazy-log-viewer.tsx <module evaluation>","default")},19597,a=>{"use strict";a.s(["default",()=>b]);let b=(0,a.i(11857).registerClientReference)(function(){throw Error("Attempted to call the default export of [project]/app/components/lazy-log-viewer.tsx from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/app/components/lazy-log-viewer.tsx","default")},71130,a=>{"use strict";a.i(14066);var b=a.i(19597);a.n(b)},85540,a=>{"use strict";a.s(["CopyButton",()=>b]);let b=(0,a.i(11857).registerClientReference)(function(){throw Error("Attempted to call CopyButton() from the server but CopyButton is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/app/components/copy-button.tsx <module evaluation>","CopyButton")},35770,a=>{"use strict";a.s(["CopyButton",()=>b]);let b=(0,a.i(11857).registerClientReference)(function(){throw Error("Attempted to call CopyButton() from the server but CopyButton is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/app/components/copy-button.tsx","CopyButton")},893,a=>{"use strict";a.i(85540);var b=a.i(35770);a.n(b)},41190,a=>{"use strict";var b=a.i(7997),c=a.i(95936),d=a.i(84930);let e=(0,a.i(92277).default)("download",[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]]);a.i(70396);var f=a.i(73727),g=a.i(24868),h=a.i(14747),i=a.i(90798),j=a.i(69191);async function k(a,b,c,d){let e=`agent-${d}.jsonl`;for(let d of[(0,h.join)(a,b,e),(0,h.join)(a,b,c,e),(0,h.join)(a,b,c,"subagents",e)])if(!(0,h.relative)(a,d).startsWith(".."))try{return await (0,g.access)(d),d}catch(a){if("ENOENT"===a.code)continue;break}return null}var l=a.i(34900),m=a.i(26192),n=a.i(33432);function o(a){if(a<1e3)return`${a}ms`;let b=a/1e3;if(b<60)return`${b.toFixed(1)}s`;let c=Math.floor(b/60);if(c>=60){let a=Math.floor(c/60);return`${a}h ${c%60}m`}let d=(b%60).toFixed(0);return`${c}m ${d}s`}function p(a){let b=(0,n.formatDate)(a),c=a.getMilliseconds().toString().padStart(3,"0");return`${b}.${c}`}function q(a,b,c,d){return{_source:d,uuid:a.uuid||"",parentUuid:a.parentUuid??null,timestamp:b,timestampMs:c.getTime(),timestampFormatted:p(c)}}async function r(a,b){let c=a.split("\n").filter(a=>""!==a.trim()),d=new Map,e=[],f=[],g=new Set,h=!1;for(let a=0;a<c.length;a++){let i;a>0&&a%200==0&&await new Promise(a=>setImmediate(a));let j=c[a];try{i=JSON.parse(j)}catch{continue}let k={...i,_source:b};f.push(k);let l=i.type,m=i.timestamp;if(!m)continue;let n=new Date(m),o=n.getTime();if("user"===l){let a=i.message;if(Array.isArray(a?.content)){let b=a.content;if(b.some(a=>"tool_result"===a.type)){let a=i.toolUseResult,c="string"==typeof a?.agentId?a.agentId:void 0;for(let a of(c&&/^[a-f0-9]+$/.test(c)&&g.add(c),b)){if("tool_result"!==a.type)continue;let b=a.tool_use_id;if(!b)continue;let{text:e,images:f}=function(a){let b=a.content;if("string"==typeof b)return{text:b};if(Array.isArray(b)){let a=b.filter(a=>"text"===a.type).map(a=>a.text),c=b.filter(a=>"image"===a.type).map(a=>{let b=a.source;return{base64:b.data,mediaType:b.media_type}}).filter(a=>a.base64&&a.mediaType);return{text:a.length>0?a.join("\n"):void 0,images:c.length>0?c:void 0}}return{}}(a);d.set(b,{timestamp:m,timestampMs:o,content:e,images:f,agentId:c})}continue}}let c="string"==typeof a?.content?a.content:"";e.push({type:"user",...q(i,m,n,b),message:{role:"user",content:c}});continue}if("assistant"===l){let a=i.message,c=[];if(Array.isArray(a?.content)&&(c=a.content.filter(a=>["text","tool_use","thinking"].includes(a.type)).map(a=>{if("text"===a.type)return{type:"text",text:a.text};if("tool_use"===a.type){let b=a.input;return{type:"tool_use",id:a.id,name:a.name,input:a.input??{},..."Task"===a.name&&b?{subagentType:b.subagent_type,subagentDescription:b.description}:{}}}return{type:"thinking",thinking:a.thinking,signature:a.signature}})),0===c.length)continue;e.push({type:"assistant",...q(i,m,n,b),message:{role:"assistant",content:c,model:a?.model}});continue}if("file-history-snapshot"===l||"progress"===l||"system"===l){e.push({type:l,...q(i,m,n,b),raw:{...i}});continue}if("queue-operation"===l){let a=h?"Session Resumed":"Session Started";h=!0,e.push({type:"queue-operation",...q(i,m,n,b),label:a});continue}}let i=0;for(let a of e)if("assistant"===a.type)for(let b of(++i%200==0&&await new Promise(a=>setImmediate(a)),a.message.content)){if("tool_use"!==b.type)continue;let c=d.get(b.id);if(!c)continue;let e=new Date(c.timestamp),f=Math.max(0,c.timestampMs-a.timestampMs);b.result={timestamp:c.timestamp,timestampFormatted:p(e),content:c.content,images:c.images,durationMs:f,durationFormatted:o(f)},c.agentId&&(b.subagentId=c.agentId)}return e.length>500&&await new Promise(a=>setImmediate(a)),e.sort((a,b)=>a.timestampMs-b.timestampMs),{entries:e,rawLines:f,subagentIds:Array.from(g)}}async function s(a,b){let c=(0,j.resolveProjectPath)(a),d=(0,i.getClaudeProjectsPath)(),e=(0,h.join)(c,`${b}.jsonl`),f=await (0,g.readFile)(e,"utf-8"),{entries:l,rawLines:n,subagentIds:o}=await r(f,"session");if(0===o.length)return{entries:l,rawLines:n,subagentIds:[]};let p=await (0,m.batchAll)(o.map(c=>async()=>{let e=`agent-${c}`,f=await k(d,a,b,c);if(!f)return null;let h=await (0,g.readFile)(f,"utf-8"),{entries:i,rawLines:j}=await r(h,e);return{entries:i,rawLines:j}}),4),q=[...l],s=[...n];for(let a of p)"fulfilled"===a.status&&a.value&&(q.push(...a.value.entries),s.push(...a.value.rawLines));return q.length>500&&await new Promise(a=>setImmediate(a)),q.sort((a,b)=>a.timestampMs-b.timestampMs),{entries:q,rawLines:s,subagentIds:o}}let t=(0,l.runtimeCache)((a,b)=>s(a,b),60,{maxSize:50});var u=a.i(2157),v=a.i(12714),w=a.i(50227),x=a.i(60526);let y=(0,w.join)((0,x.homedir)(),".failproofai","cache","codex-session-paths.json");function z(){try{if(!(0,u.existsSync)(y))return{};return JSON.parse((0,u.readFileSync)(y,"utf-8"))}catch{return{}}}function A(a,b){try{(0,u.mkdirSync)((0,w.dirname)(y),{recursive:!0});let c=z();c[a]=b,(0,u.writeFileSync)(y,JSON.stringify(c),"utf-8")}catch{}}function B(a,b){try{for(let c of(0,u.readdirSync)(a,{withFileTypes:!0}))if(c.isFile()&&c.name.includes(b)&&c.name.endsWith(".jsonl"))return(0,w.join)(a,c.name)}catch{}return null}function C(a,b){return Array.isArray(a)?a.filter(a=>a?.type===b&&"string"==typeof a.text).map(a=>a.text).join("\n"):""}async function D(a,b="session"){let c,d=a.split("\n").filter(a=>""!==a.trim()),e=[],f=[],g=new Map,h=new Map,i=!1;for(let a=0;a<d.length;a++){let j;a>0&&a%200==0&&await new Promise(a=>setImmediate(a));let k=d[a];try{j=JSON.parse(k)}catch{continue}let l={...j,_source:b};f.push(l);let m=j.timestamp;if(!m)continue;let n=new Date(m);if(Number.isNaN(n.getTime()))continue;let r=j.type,s=j.payload??{};if("session_meta"===r){let a=s.cwd;"string"!=typeof a||c||(c=a),e.push({type:"system",...q(l,m,n,b),raw:l});continue}if("response_item"===r){let a=s.type;if("message"===a){let a=s.role,c=s.content;if("user"===a||"developer"===a){let d=C(c,"input_text");if(!d)continue;let f="developer"===a?`[developer] ${d}`:d;e.push({type:"user",...q(l,m,n,b),message:{role:"user",content:f}});continue}if("assistant"===a){let a=C(c,"output_text");if(!a)continue;let d=[{type:"text",text:a}];e.push({type:"assistant",...q(l,m,n,b),message:{role:"assistant",content:d}});continue}e.push({type:"system",...q(l,m,n,b),raw:l});continue}if("function_call"===a){let a=s.call_id,c=s.name??"function_call",d={type:"tool_use",id:a??`${m}-${c}`,name:c,input:function(a){if(!a)return{};try{return JSON.parse(a)}catch{return{}}}(s.arguments)},f={type:"assistant",...q(l,m,n,b),message:{role:"assistant",content:[d]}};e.push(f),a&&(g.set(a,d),h.set(a,n.getTime()));continue}if("function_call_output"===a){let a=s.call_id,c=a?g.get(a):void 0;if(c){let b=h.get(a)??n.getTime(),d=Math.max(0,n.getTime()-b);c.result={timestamp:m,timestampFormatted:p(n),content:"string"==typeof s.output?s.output:JSON.stringify(s.output),durationMs:d,durationFormatted:o(d)};continue}e.push({type:"system",...q(l,m,n,b),raw:l});continue}e.push({type:"system",...q(l,m,n,b),raw:l});continue}if("event_msg"===r){let a=s.type;if("task_started"===a){let a=i?"Session Resumed":"Session Started";i=!0,e.push({type:"queue-operation",...q(l,m,n,b),label:a});continue}if("exec_command_end"===a){let a=s.call_id,c=a?g.get(a):void 0;if(c){let b=s.duration,d=b?(b.secs??0)*1e3+Math.round((b.nanos??0)/1e6):Math.max(0,n.getTime()-(h.get(a)??n.getTime())),e=s.aggregated_output;c.result={timestamp:m,timestampFormatted:p(n),content:"string"==typeof e?e:JSON.stringify(e),durationMs:d,durationFormatted:o(d)};continue}e.push({type:"system",...q(l,m,n,b),raw:l});continue}if("user_message"===a||"agent_message"===a)continue;e.push({type:"system",...q(l,m,n,b),raw:l});continue}e.push({type:"system",...q(l,m,n,b),raw:l})}return e.length>500&&await new Promise(a=>setImmediate(a)),e.sort((a,b)=>a.timestampMs-b.timestampMs),{entries:e,rawLines:f,cwd:c}}async function E(a){let b=function(a){let b=z()[a];if(b&&(0,u.existsSync)(b))return b;let c=(0,w.join)((0,x.homedir)(),".codex","sessions"),d=new Date,e=new Date(d.getTime()-864e5);for(let b of[d,e].map(a=>{let b=String(a.getUTCFullYear()),d=String(a.getUTCMonth()+1).padStart(2,"0"),e=String(a.getUTCDate()).padStart(2,"0");return(0,w.join)(c,b,d,e)})){let c=B(b,a);if(c)return A(a,c),c}try{for(let b of(0,u.readdirSync)(c,{withFileTypes:!0}))if(b.isDirectory()){for(let d of(0,u.readdirSync)((0,w.join)(c,b.name),{withFileTypes:!0}))if(d.isDirectory())for(let e of(0,u.readdirSync)((0,w.join)(c,b.name,d.name),{withFileTypes:!0})){if(!e.isDirectory())continue;let f=B((0,w.join)(c,b.name,d.name,e.name),a);if(f)return A(a,f),f}}}catch{}return null}(a);if(!b)return null;let c=await (0,v.readFile)(b,"utf-8"),{entries:d,rawLines:e,cwd:f}=await D(c,"session");return{entries:d,rawLines:e,cwd:f,filePath:b}}let F=(0,l.runtimeCache)(a=>E(a),60,{maxSize:50});function G(a,b){let c=function(a){if(!a)return null;let b=(0,w.resolve)((0,w.join)(process.env.COPILOT_HOME||(0,w.join)((0,x.homedir)(),".copilot"),"session-state")),c=(0,w.resolve)(b,a);return c!==b&&c.startsWith(`${b}${w.sep}`)?c:null}(a);return c?(0,w.join)(c,b):null}async function H(a,b="session"){let c,d=a.split("\n").filter(a=>""!==a.trim()),e=[],f=[],g=new Map,h=new Map,i=!1;for(let a=0;a<d.length;a++){let j;a>0&&a%200==0&&await new Promise(a=>setImmediate(a));let k=d[a];try{j=JSON.parse(k)}catch{continue}let l={...j,_source:b};f.push(l);let m=j.timestamp;if(!m)continue;let n=new Date(m);if(Number.isNaN(n.getTime()))continue;let r=n.toISOString(),s=j.type,t=j.data??{};if("session.start"===s){let a=t.context,d=a?.cwd;"string"!=typeof d||c||(c=d);let f=i?"Session Resumed":"Session Started";i=!0,e.push({type:"queue-operation",...q(l,r,n,b),label:f});continue}if("user.message"===s){let a=t.content??"";if(!a)continue;e.push({type:"user",...q(l,r,n,b),message:{role:"user",content:a}});continue}if("system.message"===s){e.push({type:"system",...q(l,r,n,b),raw:l});continue}if("assistant.message"===s){let a=t.content??"";if(!a){e.push({type:"system",...q(l,r,n,b),raw:l});continue}let c=[{type:"text",text:a}];e.push({type:"assistant",...q(l,r,n,b),message:{role:"assistant",content:c}});continue}if("tool.execution_start"===s){let a=t.toolCallId,c=t.toolName??"tool",d=t.arguments??{},f={type:"tool_use",id:a??`${n.getTime()}-${c}`,name:c,input:d},i={type:"assistant",...q(l,r,n,b),message:{role:"assistant",content:[f]}};e.push(i),a&&(g.set(a,f),h.set(a,n.getTime()));continue}if("tool.execution_complete"===s){let a=t.toolCallId,c=a?g.get(a):void 0;if(c){let b=h.get(a)??n.getTime(),d=t.result??{},e=t.toolTelemetry??{},f=e.metrics?.commandTimeMs??e.metrics?.durationMs??null,g="number"==typeof f&&f>=0?f:Math.max(0,n.getTime()-b),i=d.detailedContent??d.content??"";c.result={timestamp:r,timestampFormatted:p(n),content:"string"==typeof i?i:JSON.stringify(i),durationMs:g,durationFormatted:o(g)};continue}e.push({type:"system",...q(l,r,n,b),raw:l});continue}e.push({type:"system",...q(l,r,n,b),raw:l})}return e.length>500&&await new Promise(a=>setImmediate(a)),e.sort((a,b)=>a.timestampMs-b.timestampMs),{entries:e,rawLines:f,cwd:c}}async function I(a){let b,c,d=(c=G(a,"events.jsonl"))&&(0,u.existsSync)(c)?c:null;if(!d)return null;try{b=await (0,v.readFile)(d,"utf-8")}catch{return null}let{entries:e,rawLines:f,cwd:g}=await H(b,"session");return{entries:e,rawLines:f,cwd:g??function(a){let b,c=(b=G(a,"workspace.yaml"))&&(0,u.existsSync)(b)?b:null;if(c)try{let a=(0,u.readFileSync)(c,"utf-8"),b=RegExp("^cwd\\s*:\\s*(.+?)\\s*$","m"),d=a.match(b);if(!d)return;return d[1].replace(/^['"]|['"]$/g,"")}catch{return}}(a),filePath:d}}let J=(0,l.runtimeCache)(a=>I(a),60,{maxSize:50}),K=["agent-sessions","conversations","sessions"],L=["events.jsonl","transcript.jsonl","messages.jsonl"],M="agent-transcripts";async function N(a,b="session"){let c,d=a.split("\n").filter(a=>""!==a.trim()),e=[],f=[],g=new Map,h=new Map,i=!1,j=Date.now();for(let a=0;a<d.length;a++){let k;a>0&&a%200==0&&await new Promise(a=>setImmediate(a));let l=d[a];try{k=JSON.parse(l)}catch{continue}let m={...k,_source:b};if(f.push(m),!k.type&&k.role&&k.message?.content){let c=new Date(j+a),d=c.toISOString(),f=k.message.content.filter(a=>a?.type==="text"&&"string"==typeof a.text).map(a=>a.text).join("");if("user"===k.role){let a=/<user_query>\s*([\s\S]*?)\s*<\/user_query>/.exec(f),g=a?a[1]:f;g&&e.push({type:"user",...q(m,d,c,b),message:{role:"user",content:g}});continue}if("assistant"===k.role){let a=f?[{type:"text",text:f}]:[];0===a.length?e.push({type:"system",...q(m,d,c,b),raw:m}):e.push({type:"assistant",...q(m,d,c,b),message:{role:"assistant",content:a}});continue}e.push({type:"system",...q(m,d,c,b),raw:m});continue}let n=k.timestamp;if(!n)continue;let r=new Date(n);if(Number.isNaN(r.getTime()))continue;let s=r.toISOString(),t=k.type,u=k.data??{};if("session.start"===t||"sessionStart"===t||"session_start"===t){let a=u.context??u,d=a.cwd;"string"!=typeof d||c||(c=d),!c&&Array.isArray(a.workspace_roots)&&"string"==typeof a.workspace_roots[0]&&(c=a.workspace_roots[0]);let f=i?"Session Resumed":"Session Started";i=!0,e.push({type:"queue-operation",...q(m,s,r,b),label:f});continue}if("user.message"===t||"userMessage"===t){let a="string"==typeof u.content?u.content:"string"==typeof u.text?u.text:"";if(!a)continue;e.push({type:"user",...q(m,s,r,b),message:{role:"user",content:a}});continue}if("system.message"===t||"systemMessage"===t){e.push({type:"system",...q(m,s,r,b),raw:m});continue}if("assistant.message"===t||"assistantMessage"===t){let a="string"==typeof u.content?u.content:"string"==typeof u.text?u.text:"";if(!a){e.push({type:"system",...q(m,s,r,b),raw:m});continue}let c=[{type:"text",text:a}];e.push({type:"assistant",...q(m,s,r,b),message:{role:"assistant",content:c}});continue}if("tool.execution_start"===t||"tool.executionStart"===t||"preToolUse"===t){let a=u.toolCallId??u.tool_use_id,c=u.toolName??u.tool_name??"tool",d=u.arguments??u.tool_input??{},f={type:"tool_use",id:a??`${r.getTime()}-${c}`,name:c,input:d},i={type:"assistant",...q(m,s,r,b),message:{role:"assistant",content:[f]}};e.push(i),a&&(g.set(a,f),h.set(a,r.getTime()));continue}if("tool.execution_complete"===t||"tool.executionComplete"===t||"postToolUse"===t){let a=u.toolCallId??u.tool_use_id,c=a?g.get(a):void 0;if(c){let b=h.get(a)??r.getTime(),d=u.result??{},e=u.duration,f="number"==typeof e&&e>=0?e:Math.max(0,r.getTime()-b),g=d.detailedContent??d.content??u.tool_output??"";c.result={timestamp:s,timestampFormatted:p(r),content:"string"==typeof g?g:JSON.stringify(g),durationMs:f,durationFormatted:o(f)};continue}e.push({type:"system",...q(m,s,r,b),raw:m});continue}e.push({type:"system",...q(m,s,r,b),raw:m})}return e.length>500&&await new Promise(a=>setImmediate(a)),e.sort((a,b)=>a.timestampMs-b.timestampMs),{entries:e,rawLines:f,cwd:c}}async function O(a){let b,c=function(a){let b=function(a){if(!a)return null;let b=(0,w.resolve)(process.env.CURSOR_HOME||(0,w.join)((0,x.homedir)(),".cursor")),c=(0,w.resolve)(b,"projects"),d=[];try{d=(0,u.readdirSync)(c,{withFileTypes:!0})}catch{}for(let b of d){if(!b.isDirectory())continue;let d=(0,w.resolve)(c,b.name,M,a),e=(0,w.resolve)(c,b.name,M);if(d!==e&&d.startsWith(`${e}${w.sep}`)&&(0,u.existsSync)(d))return d}for(let c of K){let d=(0,w.resolve)(b,c),e=(0,w.resolve)(d,a);if(e!==d&&e.startsWith(`${d}${w.sep}`)&&(0,u.existsSync)(e))return e}return null}(a);if(!b)return null;let c=(0,w.join)(b,`${(0,w.basename)(b)}.jsonl`);if((0,u.existsSync)(c))return c;for(let a of L){let c=(0,w.join)(b,a);if((0,u.existsSync)(c))return c}return null}(a);if(!c)return null;try{b=await (0,v.readFile)(c,"utf-8")}catch{return null}let{entries:d,rawLines:e,cwd:f}=await N(b,"session");return{entries:d,rawLines:e,cwd:f,filePath:c}}let P=(0,l.runtimeCache)(a=>O(a),60,{maxSize:50});var Q=a.i(74533);function R(a){try{let b=(0,Q.execFileSync)("opencode",["db","--format","json",a],{encoding:"utf8",timeout:5e3,stdio:["ignore","pipe","pipe"]});if(!b.trim())return[];let c=JSON.parse(b);if(!Array.isArray(c))return null;return c}catch{return null}}function S(a){return!!a&&"object"==typeof a&&!Array.isArray(a)}function T(a){if("string"!=typeof a||0===a.length)return null;try{let b=JSON.parse(a);return S(b)?b:null}catch{return null}}async function U(a){if(!a||!/^[A-Za-z0-9_-]+$/.test(a))return null;let b=R(`SELECT id, project_id, slug, directory, title, time_created, time_updated FROM session WHERE id = '${a}'`);if(!b||0===b.length)return null;let c=b[0],d=R(`SELECT id, session_id, time_created, time_updated, data FROM message WHERE session_id = '${a}' ORDER BY time_created ASC`),e=R(`SELECT id, message_id, session_id, time_created, time_updated, data FROM part WHERE session_id = '${a}' ORDER BY time_created ASC`);if(!d)return{entries:[],rawLines:[],cwd:c.directory??void 0,filePath:`opencode://${a}`};let f=new Map;for(let a of e??[]){let b=f.get(a.message_id);b||(b=[],f.set(a.message_id,b)),b.push(a)}let g=[],h=[];for(let a of d){let b=f.get(a.id)??[];g.push(function(a,b,c){let d=T(a.data)??{},e="string"==typeof d.role?d.role:"system",f=new Date(a.time_created),g=f.toISOString(),h=q({uuid:a.id,parentUuid:null},g,f,c),i=[],j="";for(let a of b){let b=T(a.data);if(!b)continue;let c="string"==typeof b.type?b.type:"unknown";if("text"===c){let a="string"==typeof b.text?b.text:"string"==typeof b.content?b.content:"";a&&(i.push({type:"text",text:a}),j+=(j?"\n":"")+a);continue}if("tool"===c){let c="string"==typeof b.tool?b.tool:"string"==typeof b.name?b.name:"tool",d=S(b.input)?b.input:S(b.args)?b.args:{};i.push({type:"tool_use",id:a.id,name:c,input:d});continue}i.push({type:"text",text:`[opencode ${c}]`})}if("user"===e)return{...h,type:"user",message:{role:"user",content:j}};if("assistant"===e){let a=S(d.model)?d.model:null,b=a&&"string"==typeof a.modelID?a.modelID:void 0;return{...h,type:"assistant",message:{role:"assistant",content:i,model:b}}}return{...h,type:"system",raw:{id:a.id,role:e,parts:i}}}(a,b,"session"));let c=T(a.data);h.push({id:a.id,session_id:a.session_id,time_created:a.time_created,data:c??a.data})}return{entries:g,rawLines:h,cwd:c.directory??void 0,filePath:`opencode://${a}`}}let V=(0,l.runtimeCache)(a=>U(a),30,{maxSize:50}),W=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i,X=/^[\d-]+T[\d-]+Z_([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})\.jsonl$/i;async function Y(a,b="session"){let c,d=a.split("\n").filter(a=>""!==a.trim()),e=[],f=[],g=!1;for(let a=0;a<d.length;a++){let h;a>0&&a%200==0&&await new Promise(a=>setImmediate(a));let i=d[a];try{h=JSON.parse(i)}catch{continue}let j={...h,_source:b};f.push(j);let k=h.timestamp;if(!k)continue;let l=new Date(k);if(Number.isNaN(l.getTime()))continue;let m=l.toISOString(),n=h.type;if("session"===n){"string"!=typeof h.cwd||c||(c=h.cwd);let a=g?"Session Resumed":"Session Started";g=!0,e.push({type:"queue-operation",...q(j,m,l,b),label:a});continue}if("message"===n&&h.message&&"object"==typeof h.message){let a=h.message.role,c=h.message.content;if("user"===a){let a=function(a){if(!Array.isArray(a))return"";let b=[];for(let c of a)c?.type==="text"&&"string"==typeof c.text&&b.push(c.text);return b.join("\n\n")}(c);if(!a)continue;e.push({type:"user",...q(j,m,l,b),message:{role:"user",content:a}});continue}if("assistant"===a){let a=function(a){if(!Array.isArray(a))return[];let b=[];for(let c of a)c?.type==="text"&&"string"==typeof c.text&&c.text.length>0&&b.push({type:"text",text:c.text}),c?.type==="thinking"&&"string"==typeof c.thinking&&c.thinking.length>0&&b.push({type:"text",text:`[thinking] ${c.thinking}`});return b}(c);if(0===a.length){e.push({type:"system",...q(j,m,l,b),raw:j});continue}e.push({type:"assistant",...q(j,m,l,b),message:{role:"assistant",content:a}});continue}e.push({type:"system",...q(j,m,l,b),raw:j});continue}e.push({type:"system",...q(j,m,l,b),raw:j})}return e.length>500&&await new Promise(a=>setImmediate(a)),e.sort((a,b)=>a.timestampMs-b.timestampMs),{entries:e,rawLines:f,cwd:c}}async function Z(a){let b,c,d=function(a){let b;if(!W.test(a))return null;let c=(0,w.resolve)(process.env.PI_SESSIONS_DIR||(0,w.join)((0,x.homedir)(),".pi","agent","sessions"));try{b=(0,u.readdirSync)(c)}catch{return null}for(let d of b){let b,e=(0,w.resolve)(c,d);if(e.startsWith(`${c}${w.sep}`)){try{b=(0,u.readdirSync)(e)}catch{continue}for(let c of b){let b=X.exec(c);if(!b||b[1].toLowerCase()!==a.toLowerCase())continue;let d=(0,w.resolve)(e,c);if(d.startsWith(`${e}${w.sep}`)&&(0,u.existsSync)(d))return d}}}return null}(a);if(!d)return null;try{b=await (0,v.readFile)(d,"utf-8")}catch{return null}try{c=await Y(b,"session")}catch{return null}return{entries:c.entries,rawLines:c.rawLines,cwd:c.cwd,filePath:d}}let $=(0,l.runtimeCache)(a=>Z(a),60,{maxSize:50}),_=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i,aa=/^session-(.+)-([0-9a-f]{8})\.jsonl$/i;async function ab(a,b="session",c){let d=a.split("\n").filter(a=>""!==a.trim()),e=[],f=[],g=!1;for(let a=0;a<d.length;a++){let c;a>0&&a%200==0&&await new Promise(a=>setImmediate(a));let h=d[a];try{c=JSON.parse(h)}catch{continue}let i={...c,_source:b};if(f.push(i),"string"==typeof c.sessionId&&"string"==typeof c.startTime){let a=new Date(c.startTime);if(!Number.isNaN(a.getTime())){let c=g?"Session Resumed":"Session Started";g=!0,e.push({type:"queue-operation",...q(i,a.toISOString(),a,b),label:c})}continue}if(c.$set)continue;let j=c.timestamp;if(!j)continue;let k=new Date(j);if(Number.isNaN(k.getTime()))continue;let l=k.toISOString(),m=c.type;if("user"===m){let a=function(a){if(!Array.isArray(a))return"";let b=[];for(let c of a)"string"==typeof c?.text&&b.push(c.text);return b.join("\n\n")}(c.content);if(!a)continue;e.push({type:"user",...q(i,l,k,b),message:{role:"user",content:a}});continue}if("assistant"===m||"model"===m){let a=function(a){if(!Array.isArray(a))return[];let b=[];for(let c of a)"string"==typeof c?.text&&c.text.length>0&&b.push({type:"text",text:c.text});return b}(c.content);if(0===a.length){e.push({type:"system",...q(i,l,k,b),raw:i});continue}e.push({type:"assistant",...q(i,l,k,b),message:{role:"assistant",content:a}});continue}e.push({type:"system",...q(i,l,k,b),raw:i})}return e.length>500&&await new Promise(a=>setImmediate(a)),e.sort((a,b)=>a.timestampMs-b.timestampMs),{entries:e,rawLines:f,cwd:c}}async function ac(a){let b,c,d=function(a){let b;if(!_.test(a))return null;let c=(0,w.resolve)(process.env.GEMINI_SESSIONS_DIR||(0,w.join)((0,x.homedir)(),".gemini","tmp")),d=a.slice(0,8).toLowerCase();try{b=(0,u.readdirSync)(c)}catch{return null}for(let e of b){let b,f=(0,w.resolve)(c,e);if(!f.startsWith(`${c}${w.sep}`))continue;let g=(0,w.resolve)(f,"chats");try{b=(0,u.readdirSync)(g)}catch{continue}for(let c of b){let b=aa.exec(c);if(!b||b[2].toLowerCase()!==d)continue;let e=(0,w.resolve)(g,c);if(!e.startsWith(`${g}${w.sep}`)||!(0,u.existsSync)(e))continue;let f=function(a){let b;try{b=(0,u.openSync)(a,"r")}catch{return null}try{let a=Buffer.alloc(4096),c=(0,u.readSync)(b,a,0,a.length,0);if(0===c)return null;let d=a.subarray(0,c).toString("utf-8"),e=d.indexOf("\n");return e>=0?d.slice(0,e):d}catch{return null}finally{try{(0,u.closeSync)(b)}catch{}}}(e);if(f)try{let b=JSON.parse(f);if("string"==typeof b.sessionId&&b.sessionId.toLowerCase()===a.toLowerCase())return e}catch{continue}}}return null}(a);if(!d)return null;try{b=await (0,v.readFile)(d,"utf-8")}catch{return null}let e=function(a){let b=(0,w.resolve)(a,".."),c=(0,w.resolve)(b,".."),d=(0,w.join)(c,".project_root");try{let a=(0,u.readFileSync)(d,"utf-8").trim();return a.length>0?a:void 0}catch{return}}(d);try{c=await ab(b,"session",e)}catch{return null}return{entries:c.entries,rawLines:c.rawLines,cwd:c.cwd,filePath:d}}let ad=(0,l.runtimeCache)(a=>ac(a),60,{maxSize:50});var ae=a.i(71130),af=a.i(893);let ag={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"},gemini:{id:"gemini",label:"Gemini CLI",badgeClasses:"bg-sky-500/10 text-sky-400 border-sky-500/20"}};function ah({cli:a}){var c,d;let e=(c=a,ag[c]?.label??c),f=(d=a,ag[d]?.badgeClasses??ag.claude.badgeClasses);return(0,b.jsx)("span",{className:`inline-flex items-center rounded px-1.5 py-0.5 text-[0.6rem] font-medium border ${f}`,title:`Agent CLI: ${e}`,children:e})}async function ai({params:a}){let g,h,{name:k,sessionId:l}=await a;try{(0,j.resolveProjectPath)(k)}catch{(0,f.notFound)()}let m=(0,i.decodeFolderName)(k),n=-1===(h=l.indexOf("/"))?l:l.slice(0,h);j.UUID_RE.test(n)||/^ses_[A-Za-z0-9]+$/.test(n)||(0,f.notFound)();let o=null,p=null,q=null,r="claude";try{let a=await t(k,n);o=a.entries,p=a.rawLines}catch(a){if("ENOENT"===a.code){let a=await F(n);if(a)o=a.entries,p=a.rawLines,g=a.cwd,r="codex";else{let a=await J(n);if(a)o=a.entries,p=a.rawLines,g=a.cwd,r="copilot";else{let a=await P(n);if(a)o=a.entries,p=a.rawLines,g=a.cwd,r="cursor";else{let a=await V(n);if(a)o=a.entries,p=a.rawLines,g=a.cwd,r="opencode";else{let a=await $(n);if(a)o=a.entries,p=a.rawLines,g=a.cwd,r="pi";else{let a=await ad(n);a?(o=a.entries,p=a.rawLines,g=a.cwd,r="gemini"):q="Session log file not found."}}}}}}else q="Failed to read session log."}let s="claude"!==r,u="codex"===r?`OpenAI Codex${g?` \xb7 ${g}`:""}`:"copilot"===r?`GitHub Copilot${g?` \xb7 ${g}`:""}`:"cursor"===r?`Cursor Agent${g?` \xb7 ${g}`:""}`:"opencode"===r?`OpenCode${g?` \xb7 ${g}`:""}`:"pi"===r?`Pi${g?` \xb7 ${g}`:""}`:"gemini"===r?`Gemini CLI${g?` \xb7 ${g}`:""}`:m;return(0,b.jsx)("main",{className:"min-h-screen bg-background",children:(0,b.jsxs)("div",{className:"container mx-auto p-8",children:[(0,b.jsxs)(c.default,{href:s?"/policies?tab=activity":`/project/${encodeURIComponent(k)}`,className:"inline-flex items-center gap-2 text-muted-foreground hover:text-foreground mb-6 transition-colors",children:[(0,b.jsx)(d.ArrowLeft,{className:"w-4 h-4"}),(0,b.jsx)("span",{children:s?"Back to Activity":"Back to Sessions"})]}),(0,b.jsxs)("div",{className:"mb-8",children:[(0,b.jsxs)("div",{className:"flex flex-wrap items-center gap-3 mb-2",children:[(0,b.jsx)("h1",{className:"text-4xl font-bold text-foreground",children:"Session Log"}),(0,b.jsx)(ah,{cli:r})]}),(0,b.jsxs)("div",{className:"space-y-1",children:[(0,b.jsxs)("p",{className:"text-muted-foreground",children:[(0,b.jsxs)("span",{className:"font-medium",children:[s?"CLI":"Project",":"]})," ",u]}),(0,b.jsxs)("p",{className:"text-muted-foreground break-words break-all inline-flex items-center gap-1",children:[(0,b.jsx)("span",{className:"font-medium",children:"Session:"})," ",n,(0,b.jsx)(af.CopyButton,{text:n})]}),o&&p&&(0,b.jsxs)("div",{className:"flex items-center gap-4",children:[(0,b.jsxs)("p",{className:"text-muted-foreground",children:[(0,b.jsx)("span",{className:"font-medium",children:p.length})," log lines"]}),!s&&(0,b.jsxs)("a",{href:`/api/download/${encodeURIComponent(k)}/${encodeURIComponent(n)}`,download:!0,className:"inline-flex items-center gap-1.5 px-3 py-1.5 text-sm rounded-md bg-muted text-muted-foreground hover:bg-muted/80 hover:text-foreground transition-colors",children:[(0,b.jsx)(e,{className:"w-4 h-4"}),"Download Logs"]})]})]})]}),q&&(0,b.jsx)("div",{className:"bg-card text-card-foreground rounded-lg border border-destructive/50 p-6 shadow-sm",children:(0,b.jsx)("p",{className:"text-destructive text-center py-8",children:q})}),!q&&o&&(0,b.jsx)(ae.default,{entries:o,projectName:s?g??("codex"===r?"OpenAI Codex":"copilot"===r?"GitHub Copilot":"cursor"===r?"Cursor Agent":"opencode"===r?"OpenCode":"pi"===r?"Pi":"Gemini CLI"):m,sessionId:n})]})})}a.s(["default",0,ai,"dynamic",0,"force-dynamic"],41190)},87330,a=>{a.n(a.i(41190))}];
|
|
2
2
|
|
|
3
3
|
//# sourceMappingURL=app_0cdqd9w._.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
module.exports=[3171,a=>{"use strict";var b=a.i(87924),c=a.i(72131),d=a.i(
|
|
1
|
+
module.exports=[3171,a=>{"use strict";var b=a.i(87924),c=a.i(72131),d=a.i(17856),e=a.i(66036);a.s(["default",0,function({error:a,reset:f}){return(0,c.useEffect)(()=>{(0,d.getTelemetryConfig)().then(b=>{(0,e.setClientTelemetryConfig)(b),(0,e.captureClientEvent)("client_error",{error_message:a.message,error_name:a.name,error_digest:a.digest,boundary:"global"})}).catch(()=>{})},[a]),(0,b.jsx)("html",{children:(0,b.jsx)("body",{children:(0,b.jsx)("main",{style:{minHeight:"100vh",display:"flex",alignItems:"center",justifyContent:"center",background:"#031035",color:"#f8fafc",fontFamily:"system-ui, sans-serif"},children:(0,b.jsxs)("div",{style:{textAlign:"center",padding:"2rem",border:"1px solid rgba(239,68,68,0.4)",borderRadius:"0.5rem",maxWidth:"500px"},children:[(0,b.jsx)("h2",{style:{color:"#ef4444",marginBottom:"0.5rem",fontSize:"1.25rem"},children:"Something went wrong"}),(0,b.jsx)("p",{style:{color:"#94a3b8",marginBottom:"1.5rem"},children:a.message||"An unexpected error occurred."}),(0,b.jsx)("button",{onClick:f,style:{padding:"0.5rem 1.25rem",background:"#3b82f6",color:"white",border:"none",borderRadius:"0.375rem",cursor:"pointer",fontSize:"0.875rem"},children:"Try again"})]})})})})}])}];
|
|
2
2
|
|
|
3
3
|
//# sourceMappingURL=app_global-error_tsx_0xerkr6._.js.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
module.exports=[22712,a=>{"use strict";var b=a.i(87924),c=a.i(72131),d=a.i(35112),e=a.i(38246),f=a.i(64831);let g=(0,f.default)("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]),h=(0,f.default)("shield-check",[["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"}]]),i=(0,f.default)("shield-x",[["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"}]]),j=(0,f.default)("shield-alert",[["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"}]]);var k=a.i(14258),l=a.i(89027),m=a.i(85650),n=a.i(52562);let o=(0,f.default)("settings",[["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"}]]),p=(0,f.default)("code",[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]]);var q=a.i(74215),r=a.i(65967),s=a.i(5050);let t=(0,s.createServerReference)("407ff439878868ce72f184be57a03505a52de25f29",s.callServer,void 0,s.findSourceMapURL,"getHookActivityAction"),u=(0,s.createServerReference)("606346c40eef9b4d235c6055456a99a6d810ce9435",s.callServer,void 0,s.findSourceMapURL,"searchHookActivityAction"),v=(0,s.createServerReference)("005f7d27289f33091a3fdc52bd971ebe7f9427ba7c",s.callServer,void 0,s.findSourceMapURL,"getHooksConfigAction"),w=(0,s.createServerReference)("60a6e9e79eb81a0bdfe9bbd23a606e78f92af70bd4",s.callServer,void 0,s.findSourceMapURL,"togglePolicyAction"),x=(0,s.createServerReference)("60836e171c104a7a89106a8e529d12f52bbf7d843c",s.callServer,void 0,s.findSourceMapURL,"installHooksWebAction"),y=(0,s.createServerReference)("6046cbf74c3190253e1615cc0f0225e6b9935b3d09",s.callServer,void 0,s.findSourceMapURL,"removeHooksWebAction"),z=(0,s.createServerReference)("6070a705a7c81c983fa4c6dc9917d60843ddeaa557",s.callServer,void 0,s.findSourceMapURL,"updatePolicyParamsAction");var A=a.i(6236),B=a.i(90619),C=a.i(95947),D=a.i(40695);function E({sessionId:a,transcriptPath:c,integration:d,cwd:f}){if(!a)return(0,b.jsx)("span",{className:"text-muted-foreground",children:"\\u2014"});let g=a?a.slice(0,8):"—";if("codex"===d||c?.includes("/.codex/")){let c,d=f?(c=/^([A-Za-z]):[\\/](.*)$/.exec(f))?c[1]+"--"+c[2].replace(/[\\/]/g,"-"):f.replace(/[\\/]/g,"-"):"codex";return(0,b.jsx)(e.default,{href:`/project/${encodeURIComponent(d)}/session/${encodeURIComponent(a)}`,className:"text-primary hover:underline font-mono",onClick:a=>a.stopPropagation(),children:g})}let h=c?function(a){let b=a.replace(/\\/g,"/").split("/").filter(Boolean);if(b.length<2)return null;let c=b[b.length-2];return!c||c.startsWith(".")?null:c}(c):null;return h?(0,b.jsx)(e.default,{href:`/project/${encodeURIComponent(h)}/session/${encodeURIComponent(a)}`,className:"text-primary hover:underline font-mono",onClick:a=>a.stopPropagation(),children:g}):(0,b.jsx)("span",{className:"text-muted-foreground font-mono",children:g})}function F({decision:a}){return"deny"===a?(0,b.jsxs)("span",{className:"inline-flex items-center gap-1 rounded px-1.5 py-0.5 text-[0.65rem] font-semibold tracking-wide uppercase bg-red-500/10 text-red-400 border border-red-500/20",children:[(0,b.jsx)(i,{className:"h-3 w-3"}),"Deny"]}):"instruct"===a?(0,b.jsxs)("span",{className:"inline-flex items-center gap-1 rounded px-1.5 py-0.5 text-[0.65rem] font-semibold tracking-wide uppercase bg-amber-500/10 text-amber-400 border border-amber-500/20",children:[(0,b.jsx)(j,{className:"h-3 w-3"}),"Instruct"]}):(0,b.jsxs)("span",{className:"inline-flex items-center gap-1 rounded px-1.5 py-0.5 text-[0.65rem] font-semibold tracking-wide uppercase bg-emerald-500/10 text-emerald-400 border border-emerald-500/20",children:[(0,b.jsx)(h,{className:"h-3 w-3"}),"Allow"]})}function G({eventType:a}){return(0,b.jsx)("span",{className:"inline-flex items-center rounded px-1.5 py-0.5 text-[0.6rem] font-medium bg-muted text-muted-foreground border border-border/50",children:a})}function H({integration:a}){if(!a)return null;let c="claude"===a?"Claude Code":"codex"===a?"OpenAI Codex":a,d="codex"===a;return(0,b.jsx)("span",{className:`inline-flex items-center rounded px-1.5 py-0.5 text-[0.6rem] font-medium border ${d?"bg-purple-500/10 text-purple-400 border-purple-500/20":"bg-orange-500/10 text-orange-400 border-orange-500/20"}`,title:`Agent CLI: ${c}`,children:c})}function I({mode:a}){let c="default"===a;return(0,b.jsx)("span",{className:`inline-flex items-center rounded px-1.5 py-0.5 text-[0.6rem] font-medium border ${c?"bg-sky-500/10 text-sky-400 border-sky-500/20":"bg-amber-500/10 text-amber-400 border-amber-500/20"}`,children:a})}function J({ms:a}){return(0,b.jsx)("span",{className:`font-mono text-[0.7rem] ${a>500?"text-red-400":a>100?"text-amber-400":"text-muted-foreground"}`,children:a<1e3?`${a}ms`:`${(a/1e3).toFixed(1)}s`})}function K({text:a}){let[d,e]=(0,c.useState)(!1),f=async b=>{b.stopPropagation();try{await navigator.clipboard.writeText(a),e(!0),setTimeout(()=>e(!1),1500)}catch{let b=document.createElement("textarea");b.value=a,b.style.position="fixed",b.style.opacity="0",document.body.appendChild(b),b.select(),document.execCommand("copy"),document.body.removeChild(b),e(!0),setTimeout(()=>e(!1),1500)}};return(0,b.jsx)("button",{onClick:f,className:"inline-flex items-center justify-center h-5 w-5 rounded hover:bg-muted/50 text-muted-foreground hover:text-foreground transition-colors",title:"Copy",children:d?(0,b.jsx)(n.Check,{className:"h-3 w-3 text-emerald-400"}):(0,b.jsx)(m.Copy,{className:"h-3 w-3"})})}function L({value:a,onChange:c}){return(0,b.jsx)("div",{className:"inline-flex items-center rounded-md border border-border bg-muted/30 p-0.5",children:[{label:"All",value:""},{label:"Allow",value:"allow"},{label:"Instruct",value:"instruct"},{label:"Deny",value:"deny"}].map(d=>(0,b.jsx)("button",{onClick:()=>c(d.value),className:`px-2.5 py-1 text-[0.65rem] font-medium rounded transition-all ${a===d.value?"deny"===d.value?"bg-red-500/15 text-red-400 shadow-sm":"allow"===d.value?"bg-emerald-500/15 text-emerald-400 shadow-sm":"instruct"===d.value?"bg-amber-500/15 text-amber-400 shadow-sm":"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"}`,children:d.label},d.value))})}function M({stats:a}){let c=a.totalEvents>0?(a.denyCount/a.totalEvents*100).toFixed(0):"0";return(0,b.jsxs)("div",{className:"flex items-center gap-6 text-[0.7rem] text-muted-foreground",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("span",{className:"text-foreground font-mono font-semibold",children:a.totalEvents})," total events"]}),(0,b.jsxs)("div",{children:[(0,b.jsxs)("span",{className:`font-mono font-semibold ${a.denyCount>0?"text-red-400":"text-foreground"}`,children:[c,"%"]})," ","deny rate"]}),(0,b.jsxs)("div",{className:"hidden sm:block",children:["top policy:"," ",(0,b.jsx)("span",{className:"font-mono text-foreground",children:a.topPolicy??"—"})]})]})}function N({item:a}){return(0,b.jsx)("tr",{children:(0,b.jsx)("td",{colSpan:10,className:"px-0 py-0",children:(0,b.jsxs)("div",{className:"px-6 py-3 bg-muted/20 border-t border-border/30 space-y-2 text-xs animate-expand",children:[(0,b.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-x-8 gap-y-1.5",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("span",{className:"text-muted-foreground",children:"Session ID: "}),(0,b.jsx)("span",{className:"font-mono text-foreground",children:a.sessionId??"—"}),a.sessionId&&(0,b.jsx)(K,{text:a.sessionId})]}),(0,b.jsxs)("div",{children:[(0,b.jsx)("span",{className:"text-muted-foreground",children:"CWD: "}),(0,b.jsx)("span",{className:"font-mono text-foreground",children:a.cwd??"—"}),a.cwd&&(0,b.jsx)(K,{text:a.cwd})]}),(0,b.jsxs)("div",{children:[(0,b.jsx)("span",{className:"text-muted-foreground",children:"Transcript: "}),(0,b.jsx)("span",{className:"font-mono text-foreground break-all",children:a.transcriptPath??"—"})]})]}),a.policyNames&&a.policyNames.length>1&&(0,b.jsxs)("div",{children:[(0,b.jsx)("span",{className:"text-muted-foreground",children:"Policies: "}),(0,b.jsx)("span",{className:"font-mono text-foreground",children:a.policyNames.join(", ")})]}),a.reason&&(0,b.jsxs)("div",{children:[(0,b.jsx)("span",{className:"text-muted-foreground",children:"Full reason: "}),(0,b.jsx)("span",{className:"text-foreground",children:a.reason})]})]})})})}function O({hooksInstalled:a,onSwitchTab:d}){let{intervalSec:e}=(0,A.useAutoRefresh)(),f=(0,B.useUrlParams)(),g=(0,c.useRef)(!1),[h,i]=(0,c.useState)(()=>(0,C.paramToPage)(f.get("page"))),[j,m]=(0,c.useState)(null),[n,o]=(0,c.useState)(null),[p,q]=(0,c.useState)(()=>{let a=f.get("decision");return"allow"===a||"deny"===a||"instruct"===a?a:""}),[s,v]=(0,c.useState)(()=>f.get("event")??""),[w,x]=(0,c.useState)(()=>f.get("policy")??""),[y,z]=(0,c.useState)(()=>f.get("session")??""),[D,K]=(0,c.useState)(()=>{let a=f.get("cli");return"claude"===a||"codex"===a?a:""}),P=(0,c.useRef)(null),Q=(0,c.useRef)({filterDecision:p,filterEventType:s,filterPolicy:w,filterSessionId:y,filterCli:D});Q.current={filterDecision:p,filterEventType:s,filterPolicy:w,filterSessionId:y,filterCli:D},(0,c.useEffect)(()=>{if(!g.current){g.current=!0;return}f.setAll({decision:p||void 0,event:s||void 0,policy:w||void 0,session:y||void 0,cli:D||void 0,page:(0,C.pageToParam)(h)})},[p,s,w,y,D,h]);let R=""!==p||""!==s||""!==w||""!==y||""!==D,S=(0,c.useCallback)(async a=>{try{let b,{filterDecision:c,filterEventType:d,filterPolicy:e,filterSessionId:f,filterCli:g}=Q.current;b=""!==c||""!==d||""!==e||""!==f||""!==g?await u({decision:c||void 0,eventType:d||void 0,policyName:e||void 0,sessionId:f||void 0,integration:g||void 0},a):await t(a),m(b)}catch{}},[]);(0,c.useEffect)(()=>{S(h);let a=setInterval(()=>S(h),e>0?1e3*e:5e3);return()=>clearInterval(a)},[h,S,e]),(0,c.useEffect)(()=>(P.current&&clearTimeout(P.current),P.current=setTimeout(()=>{i(1),o(null),S(1)},300),()=>{P.current&&clearTimeout(P.current)}),[p,s,w,y,D]);let T=j?.entries??[],U=j?.totalPages??1;return(0,b.jsxs)(b.Fragment,{children:[j?.stats&&j.stats.totalEvents>0&&(0,b.jsx)("div",{className:"mb-4",children:(0,b.jsx)(M,{stats:j.stats})}),(0,b.jsxs)("div",{className:"bg-card border border-border rounded-lg overflow-hidden",children:[(0,b.jsxs)("div",{className:"flex flex-wrap items-center gap-3 px-4 py-2.5 border-b border-border bg-muted/20",children:[(0,b.jsx)(L,{value:p,onChange:q}),(0,b.jsxs)("select",{value:s,onChange:a=>v(a.target.value),className:"h-7 rounded-md border border-border bg-background px-2 text-xs text-foreground focus:outline-none focus:ring-2 focus:ring-primary/40 focus:border-primary/40 transition-shadow",children:[(0,b.jsx)("option",{value:"",children:"All Events"}),(0,b.jsx)("option",{value:"PreToolUse",children:"PreToolUse"}),(0,b.jsx)("option",{value:"PostToolUse",children:"PostToolUse"}),(0,b.jsx)("option",{value:"SessionStart",children:"SessionStart"}),(0,b.jsx)("option",{value:"SessionEnd",children:"SessionEnd"}),(0,b.jsx)("option",{value:"UserPromptSubmit",children:"UserPromptSubmit"}),(0,b.jsx)("option",{value:"PermissionRequest",children:"PermissionRequest"})]}),(0,b.jsxs)("select",{value:D,onChange:a=>K(a.target.value),className:"h-7 rounded-md border border-border bg-background px-2 text-xs text-foreground focus:outline-none focus:ring-2 focus:ring-primary/40 focus:border-primary/40 transition-shadow","aria-label":"Filter by CLI",children:[(0,b.jsx)("option",{value:"",children:"All CLIs"}),(0,b.jsx)("option",{value:"claude",children:"Claude Code"}),(0,b.jsx)("option",{value:"codex",children:"OpenAI Codex"})]}),(0,b.jsx)("div",{className:"relative",children:(0,b.jsx)("input",{type:"text",value:w,onChange:a=>x(a.target.value),placeholder:"Filter by policy\\u2026",className:"h-7 rounded-md border border-border bg-background px-2.5 text-xs text-foreground placeholder:text-muted-foreground w-44 focus:outline-none focus:ring-2 focus:ring-primary/40 focus:border-primary/40 transition-shadow"})}),(0,b.jsx)("div",{className:"relative",children:(0,b.jsx)("input",{type:"text",value:y,onChange:a=>z(a.target.value),placeholder:"Filter by session…",className:"h-7 rounded-md border border-border bg-background px-2.5 text-xs text-foreground placeholder:text-muted-foreground w-44 focus:outline-none focus:ring-2 focus:ring-primary/40 focus:border-primary/40 transition-shadow"})})]}),0===T.length?(0,b.jsxs)("div",{className:"flex flex-col items-center justify-center py-16 px-4 text-center",children:[(0,b.jsx)(k.Shield,{className:"h-12 w-12 text-muted-foreground/30"}),!1===a?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("p",{className:"text-sm text-muted-foreground mt-4 font-medium",children:"Policies are not installed"}),(0,b.jsxs)("p",{className:"text-xs text-muted-foreground mt-1 max-w-sm",children:["Go to the"," ",(0,b.jsx)("button",{className:"underline hover:text-foreground transition-colors",onClick:()=>d?.("policies"),children:"Policies tab"})," ","and click ",(0,b.jsx)("span",{className:"font-mono bg-muted px-1 rounded",children:"Install"})," to enable policy monitoring."]})]}):(0,b.jsx)("p",{className:"text-sm text-muted-foreground mt-4",children:R?"No matching activity.":"Waiting for hook events…"})]}):(0,b.jsx)("div",{className:"overflow-x-auto",children:(0,b.jsxs)("table",{className:"w-full text-xs",children:[(0,b.jsx)("thead",{children:(0,b.jsxs)("tr",{className:"text-left text-muted-foreground border-b border-border bg-muted/30",children:[(0,b.jsx)("th",{className:"px-4 py-2.5 font-medium w-6"}),(0,b.jsx)("th",{className:"px-3 py-2.5 font-medium",children:"Decision"}),(0,b.jsx)("th",{className:"px-3 py-2.5 font-medium",children:"Event"}),(0,b.jsx)("th",{className:"px-3 py-2.5 font-medium",children:"CLI"}),(0,b.jsx)("th",{className:"px-3 py-2.5 font-medium",children:"Tool"}),(0,b.jsx)("th",{className:"px-3 py-2.5 font-medium",children:"Policy"}),(0,b.jsx)("th",{className:"px-3 py-2.5 font-medium",children:"Reason"}),(0,b.jsx)("th",{className:"px-3 py-2.5 font-medium",children:"Duration"}),(0,b.jsx)("th",{className:"px-3 py-2.5 font-medium",children:"Session"}),(0,b.jsx)("th",{className:"px-3 py-2.5 font-medium",children:"Mode"}),(0,b.jsx)("th",{className:"px-3 py-2.5 font-medium text-right",children:"Time"})]})}),(0,b.jsx)("tbody",{className:"divide-y divide-border/30",children:T.map((a,d)=>{var e;let f,g="deny"===a.decision,h=n===d,i="instruct"===a.decision;return(0,b.jsxs)(c.default.Fragment,{children:[(0,b.jsxs)("tr",{onClick:()=>{o(a=>a===d?null:d)},className:`cursor-pointer transition-colors ${g?"bg-red-500/[0.03] hover:bg-red-500/[0.07] border-l-2 border-l-red-500/40":i?"bg-amber-500/[0.03] hover:bg-amber-500/[0.07] border-l-2 border-l-amber-500/40":d%2==0?"hover:bg-muted/30":"bg-muted/[0.04] hover:bg-muted/30"} ${h?"bg-muted/20":""}`,children:[(0,b.jsx)("td",{className:"px-4 py-2",children:(0,b.jsx)(l.ChevronDown,{className:`h-3.5 w-3.5 text-muted-foreground transition-transform duration-150 ${h?"rotate-0":"-rotate-90"}`})}),(0,b.jsx)("td",{className:"px-3 py-2",children:(0,b.jsx)(F,{decision:a.decision})}),(0,b.jsx)("td",{className:"px-3 py-2",children:(0,b.jsx)(G,{eventType:a.eventType})}),(0,b.jsx)("td",{className:"px-3 py-2",children:(0,b.jsx)(H,{integration:a.integration})}),(0,b.jsx)("td",{className:"px-3 py-2 font-mono text-foreground",children:a.toolName??"—"}),(0,b.jsx)("td",{className:"px-3 py-2 font-mono text-foreground",children:a.policyNames&&a.policyNames.length>1?(0,b.jsxs)("span",{title:a.policyNames.join(", "),children:[a.policyNames[0],(0,b.jsxs)("span",{className:"text-muted-foreground text-[0.6rem]",children:[" +",a.policyNames.length-1]})]}):a.policyName??"—"}),(0,b.jsx)("td",{className:"px-3 py-2 text-muted-foreground truncate max-w-[240px]",title:a.reason??"",children:a.reason??"—"}),(0,b.jsx)("td",{className:"px-3 py-2",children:(0,b.jsx)(J,{ms:a.durationMs})}),(0,b.jsx)("td",{className:"px-3 py-2",title:a.sessionId??"",children:(0,b.jsx)(E,{sessionId:a.sessionId,transcriptPath:a.transcriptPath,integration:a.integration,cwd:a.cwd})}),(0,b.jsx)("td",{className:"px-3 py-2",children:a.permissionMode?(0,b.jsx)(I,{mode:a.permissionMode}):"—"}),(0,b.jsx)("td",{className:"px-3 py-2 text-right text-muted-foreground whitespace-nowrap",title:new Date(a.timestamp).toLocaleString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit"}),children:(e=a.timestamp,(f=Date.now()-e)<6e4?`${Math.max(1,Math.floor(f/1e3))}s ago`:f<36e5?`${Math.floor(f/6e4)}m ago`:f<864e5?`${Math.floor(f/36e5)}h ago`:`${Math.floor(f/864e5)}d ago`)})]}),h&&(0,b.jsx)(N,{item:a})]},`${a.timestamp}-${d}`)})})]})}),(0,b.jsx)(r.default,{currentPage:h,totalPages:U,onPageChange:a=>{i(a),o(null)}})]})]})}function P({enabled:a,onChange:c,disabled:d}){return(0,b.jsx)("button",{onClick:c,disabled:d,className:`relative inline-flex h-4 w-7 shrink-0 items-center rounded-full transition-colors disabled:opacity-40 ${a?"bg-emerald-500":"bg-muted-foreground/30"}`,"aria-label":a?"Disable policy":"Enable policy",children:(0,b.jsx)("span",{className:`inline-block h-3 w-3 rounded-full bg-white shadow transition-transform ${a?"translate-x-3.5":"translate-x-0.5"}`})})}function Q({policy:a,onClose:d,onSave:e}){let f=a.params??{},g=a.currentParams??{},[h,i]=(0,c.useState)(()=>{let a={};for(let[b,c]of Object.entries(f)){let d=b in g?g[b]:c.default;a[b]=d}return a});(0,c.useEffect)(()=>{let a=a=>{"Escape"===a.key&&d()};return document.addEventListener("keydown",a),()=>document.removeEventListener("keydown",a)},[d]);let j=(a,b)=>{i(c=>({...c,[a]:b}))};return(0,b.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50",onClick:a=>{a.target===a.currentTarget&&d()},children:(0,b.jsxs)("div",{className:"bg-card border border-border rounded-lg shadow-xl w-full max-w-lg mx-4 max-h-[80vh] flex flex-col",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between px-4 py-3 border-b border-border",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("p",{className:"text-sm font-mono font-semibold text-foreground",children:a.name}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground mt-0.5",children:a.description})]}),(0,b.jsx)("button",{onClick:d,className:"text-muted-foreground hover:text-foreground transition-colors",children:(0,b.jsx)(q.X,{className:"h-4 w-4"})})]}),(0,b.jsx)("div",{className:"overflow-y-auto flex-1 px-4 py-4 space-y-4",children:Object.entries(f).map(([a,c])=>(0,b.jsxs)("div",{children:[(0,b.jsx)("label",{className:"block text-xs font-semibold text-foreground mb-1 font-mono",children:a}),(0,b.jsx)("p",{className:"text-[0.65rem] text-muted-foreground mb-1.5",children:c.description}),((a,c)=>{let d=h[a];if("boolean"===c.type)return(0,b.jsxs)("label",{className:"flex items-center gap-2 cursor-pointer",children:[(0,b.jsx)("input",{type:"checkbox",checked:!!d,onChange:b=>j(a,b.target.checked),className:"rounded border-border"}),(0,b.jsx)("span",{className:"text-xs text-muted-foreground",children:c.description})]});if("number"===c.type)return(0,b.jsx)("input",{type:"number",value:"number"==typeof d?d:"",onChange:b=>j(a,Number(b.target.value)),className:"w-full h-7 rounded border border-border bg-background px-2 text-xs text-foreground focus:outline-none focus:ring-2 focus:ring-primary/40"});if("string[]"===c.type){let c=Array.isArray(d)?d.join("\n"):"";return(0,b.jsx)("textarea",{value:c,onChange:b=>j(a,b.target.value.split("\n").filter(a=>""!==a.trim())),rows:4,placeholder:"One entry per line",className:"w-full rounded border border-border bg-background px-2 py-1.5 text-xs text-foreground font-mono focus:outline-none focus:ring-2 focus:ring-primary/40 resize-y"})}if("pattern[]"===c.type){let c=Array.isArray(d)?d:[];return(0,b.jsxs)("div",{className:"space-y-1.5",children:[c.map((d,e)=>(0,b.jsxs)("div",{className:"flex gap-1.5 items-center",children:[(0,b.jsx)("input",{type:"text",value:d.regex,onChange:b=>{let d=[...c];d[e]={...d[e],regex:b.target.value},j(a,d)},placeholder:"regex",className:"flex-1 h-6 rounded border border-border bg-background px-2 text-xs font-mono focus:outline-none focus:ring-2 focus:ring-primary/40"}),(0,b.jsx)("input",{type:"text",value:d.label,onChange:b=>{let d=[...c];d[e]={...d[e],label:b.target.value},j(a,d)},placeholder:"label",className:"flex-1 h-6 rounded border border-border bg-background px-2 text-xs focus:outline-none focus:ring-2 focus:ring-primary/40"}),(0,b.jsx)("button",{onClick:()=>j(a,c.filter((a,b)=>b!==e)),className:"text-muted-foreground/50 hover:text-destructive transition-colors",children:(0,b.jsx)(q.X,{className:"h-3.5 w-3.5"})})]},e)),(0,b.jsx)("button",{onClick:()=>j(a,[...c,{regex:"",label:""}]),className:"text-xs text-primary hover:underline",children:"+ Add pattern"})]})}return(0,b.jsx)("input",{type:"text",value:"string"==typeof d?d:"",onChange:b=>j(a,b.target.value),className:"w-full h-7 rounded border border-border bg-background px-2 text-xs text-foreground focus:outline-none focus:ring-2 focus:ring-primary/40"})})(a,c)]},a))}),(0,b.jsxs)("div",{className:"flex items-center justify-end gap-2 px-4 py-3 border-t border-border",children:[(0,b.jsx)(D.Button,{variant:"outline",size:"sm",onClick:d,className:"h-7 text-xs",children:"Cancel"}),(0,b.jsx)(D.Button,{size:"sm",onClick:()=>e(h),className:"h-7 text-xs",children:"Save"})]})]})})}function R({message:a,onDismiss:c,onInstall:e,isPending:f}){return(0,d.createPortal)((0,b.jsxs)("div",{className:"fixed top-4 right-4 z-[9999] w-full max-w-sm",style:{animation:"slideInFromRight 0.25s ease-out"},children:[(0,b.jsx)("style",{children:`
|
|
1
|
+
module.exports=[22712,a=>{"use strict";var b=a.i(87924),c=a.i(72131),d=a.i(35112),e=a.i(38246),f=a.i(64831);let g=(0,f.default)("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]),h=(0,f.default)("shield-check",[["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"}]]),i=(0,f.default)("shield-x",[["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"}]]),j=(0,f.default)("shield-alert",[["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"}]]);var k=a.i(14258),l=a.i(89027),m=a.i(85650),n=a.i(52562);let o=(0,f.default)("settings",[["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"}]]),p=(0,f.default)("code",[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]]);var q=a.i(74215),r=a.i(65967),s=a.i(5050);let t=(0,s.createServerReference)("4008ac52854c48856f638e5a29eb5bf76cedf0524c",s.callServer,void 0,s.findSourceMapURL,"getHookActivityAction"),u=(0,s.createServerReference)("608a0174cfc22f41e0bef6803e0741d5774489ab2b",s.callServer,void 0,s.findSourceMapURL,"searchHookActivityAction"),v=(0,s.createServerReference)("00cd56dcb18225479af794c03e1033a339c01d2266",s.callServer,void 0,s.findSourceMapURL,"getHooksConfigAction"),w=(0,s.createServerReference)("60c41e97f38ac4166f2970163c459ec9c7504ca157",s.callServer,void 0,s.findSourceMapURL,"togglePolicyAction"),x=(0,s.createServerReference)("60f4f742978660edc97feef54aeb68c737ccade421",s.callServer,void 0,s.findSourceMapURL,"installHooksWebAction"),y=(0,s.createServerReference)("605e674b52725b591cd015950b2bc93c55138b216b",s.callServer,void 0,s.findSourceMapURL,"removeHooksWebAction"),z=(0,s.createServerReference)("607b285c398ea3ca6b779081709e2f349538b3fd75",s.callServer,void 0,s.findSourceMapURL,"updatePolicyParamsAction");var A=a.i(6236),B=a.i(90619),C=a.i(95947),D=a.i(87256),E=a.i(40695);function F({sessionId:a,transcriptPath:c,integration:d,cwd:f}){if(!a)return(0,b.jsx)("span",{className:"text-muted-foreground",children:"\\u2014"});let g=a?a.slice(0,8):"—",h="codex"===d||(c?.includes("/.codex/")??!1),i="copilot"===d||(c?.includes("/.copilot/session-state/")??!1),j="cursor"===d||(c?.includes("/.cursor/")??!1),k="opencode"===d||(c?.includes("/.local/share/opencode/")??!1)||(c?.includes("/.opencode/")??!1),l="pi"===d||(c?.includes("/.pi/")??!1),m="gemini"===d||(c?.includes("/.gemini/")??!1);if(h||i||j||k||l||m){let c,d=f?(c=/^([A-Za-z]):[\\/](.*)$/.exec(f))?c[1]+"--"+c[2].replace(/[\\/]/g,"-"):f.replace(/[\\/]/g,"-"):h?"codex":i?"copilot":j?"cursor":k?"opencode":l?"pi":"gemini";return(0,b.jsx)(e.default,{href:`/project/${encodeURIComponent(d)}/session/${encodeURIComponent(a)}`,className:"text-primary hover:underline font-mono",onClick:a=>a.stopPropagation(),children:g})}let n=c?function(a){let b=a.replace(/\\/g,"/").split("/").filter(Boolean);if(b.length<2)return null;let c=b[b.length-2];return!c||c.startsWith(".")?null:c}(c):null;return n?(0,b.jsx)(e.default,{href:`/project/${encodeURIComponent(n)}/session/${encodeURIComponent(a)}`,className:"text-primary hover:underline font-mono",onClick:a=>a.stopPropagation(),children:g}):(0,b.jsx)("span",{className:"text-muted-foreground font-mono",children:g})}function G({decision:a}){return"deny"===a?(0,b.jsxs)("span",{className:"inline-flex items-center gap-1 rounded px-1.5 py-0.5 text-[0.65rem] font-semibold tracking-wide uppercase bg-red-500/10 text-red-400 border border-red-500/20",children:[(0,b.jsx)(i,{className:"h-3 w-3"}),"Deny"]}):"instruct"===a?(0,b.jsxs)("span",{className:"inline-flex items-center gap-1 rounded px-1.5 py-0.5 text-[0.65rem] font-semibold tracking-wide uppercase bg-amber-500/10 text-amber-400 border border-amber-500/20",children:[(0,b.jsx)(j,{className:"h-3 w-3"}),"Instruct"]}):(0,b.jsxs)("span",{className:"inline-flex items-center gap-1 rounded px-1.5 py-0.5 text-[0.65rem] font-semibold tracking-wide uppercase bg-emerald-500/10 text-emerald-400 border border-emerald-500/20",children:[(0,b.jsx)(h,{className:"h-3 w-3"}),"Allow"]})}function H({eventType:a}){return(0,b.jsx)("span",{className:"inline-flex items-center rounded px-1.5 py-0.5 text-[0.6rem] font-medium bg-muted text-muted-foreground border border-border/50",children:a})}function I({integration:a}){if(!a)return null;let c=(0,D.getCliLabel)(a),d=(0,D.getCliBadgeClasses)(a);return(0,b.jsx)("span",{className:`inline-flex items-center rounded px-1.5 py-0.5 text-[0.6rem] font-medium border ${d}`,title:`Agent CLI: ${c}`,children:c})}function J({mode:a}){let c="default"===a;return(0,b.jsx)("span",{className:`inline-flex items-center rounded px-1.5 py-0.5 text-[0.6rem] font-medium border ${c?"bg-sky-500/10 text-sky-400 border-sky-500/20":"bg-amber-500/10 text-amber-400 border-amber-500/20"}`,children:a})}function K({ms:a}){return(0,b.jsx)("span",{className:`font-mono text-[0.7rem] ${a>500?"text-red-400":a>100?"text-amber-400":"text-muted-foreground"}`,children:a<1e3?`${a}ms`:`${(a/1e3).toFixed(1)}s`})}function L({text:a}){let[d,e]=(0,c.useState)(!1),f=async b=>{b.stopPropagation();try{await navigator.clipboard.writeText(a),e(!0),setTimeout(()=>e(!1),1500)}catch{let b=document.createElement("textarea");b.value=a,b.style.position="fixed",b.style.opacity="0",document.body.appendChild(b),b.select(),document.execCommand("copy"),document.body.removeChild(b),e(!0),setTimeout(()=>e(!1),1500)}};return(0,b.jsx)("button",{onClick:f,className:"inline-flex items-center justify-center h-5 w-5 rounded hover:bg-muted/50 text-muted-foreground hover:text-foreground transition-colors",title:"Copy",children:d?(0,b.jsx)(n.Check,{className:"h-3 w-3 text-emerald-400"}):(0,b.jsx)(m.Copy,{className:"h-3 w-3"})})}function M({value:a,onChange:c}){return(0,b.jsx)("div",{className:"inline-flex items-center rounded-md border border-border bg-muted/30 p-0.5",children:[{label:"All",value:""},{label:"Allow",value:"allow"},{label:"Instruct",value:"instruct"},{label:"Deny",value:"deny"}].map(d=>(0,b.jsx)("button",{onClick:()=>c(d.value),className:`px-2.5 py-1 text-[0.65rem] font-medium rounded transition-all ${a===d.value?"deny"===d.value?"bg-red-500/15 text-red-400 shadow-sm":"allow"===d.value?"bg-emerald-500/15 text-emerald-400 shadow-sm":"instruct"===d.value?"bg-amber-500/15 text-amber-400 shadow-sm":"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"}`,children:d.label},d.value))})}function N({stats:a}){let c=a.totalEvents>0?(a.denyCount/a.totalEvents*100).toFixed(0):"0";return(0,b.jsxs)("div",{className:"flex items-center gap-6 text-[0.7rem] text-muted-foreground",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("span",{className:"text-foreground font-mono font-semibold",children:a.totalEvents})," total events"]}),(0,b.jsxs)("div",{children:[(0,b.jsxs)("span",{className:`font-mono font-semibold ${a.denyCount>0?"text-red-400":"text-foreground"}`,children:[c,"%"]})," ","deny rate"]}),(0,b.jsxs)("div",{className:"hidden sm:block",children:["top policy:"," ",(0,b.jsx)("span",{className:"font-mono text-foreground",children:a.topPolicy??"—"})]})]})}function O({item:a}){return(0,b.jsx)("tr",{children:(0,b.jsx)("td",{colSpan:10,className:"px-0 py-0",children:(0,b.jsxs)("div",{className:"px-6 py-3 bg-muted/20 border-t border-border/30 space-y-2 text-xs animate-expand",children:[(0,b.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-x-8 gap-y-1.5",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("span",{className:"text-muted-foreground",children:"Session ID: "}),(0,b.jsx)("span",{className:"font-mono text-foreground",children:a.sessionId??"—"}),a.sessionId&&(0,b.jsx)(L,{text:a.sessionId})]}),(0,b.jsxs)("div",{children:[(0,b.jsx)("span",{className:"text-muted-foreground",children:"CWD: "}),(0,b.jsx)("span",{className:"font-mono text-foreground",children:a.cwd??"—"}),a.cwd&&(0,b.jsx)(L,{text:a.cwd})]}),(0,b.jsxs)("div",{children:[(0,b.jsx)("span",{className:"text-muted-foreground",children:"Transcript: "}),(0,b.jsx)("span",{className:"font-mono text-foreground break-all",children:a.transcriptPath??"—"})]})]}),a.policyNames&&a.policyNames.length>1&&(0,b.jsxs)("div",{children:[(0,b.jsx)("span",{className:"text-muted-foreground",children:"Policies: "}),(0,b.jsx)("span",{className:"font-mono text-foreground",children:a.policyNames.join(", ")})]}),a.reason&&(0,b.jsxs)("div",{children:[(0,b.jsx)("span",{className:"text-muted-foreground",children:"Full reason: "}),(0,b.jsx)("span",{className:"text-foreground",children:a.reason})]})]})})})}function P({hooksInstalled:a,onSwitchTab:d}){let{intervalSec:e}=(0,A.useAutoRefresh)(),f=(0,B.useUrlParams)(),g=(0,c.useRef)(!1),[h,i]=(0,c.useState)(()=>(0,C.paramToPage)(f.get("page"))),[j,m]=(0,c.useState)(null),[n,o]=(0,c.useState)(null),[p,q]=(0,c.useState)(()=>{let a=f.get("decision");return"allow"===a||"deny"===a||"instruct"===a?a:""}),[s,v]=(0,c.useState)(()=>f.get("event")??""),[w,x]=(0,c.useState)(()=>f.get("policy")??""),[y,z]=(0,c.useState)(()=>f.get("session")??""),[E,L]=(0,c.useState)(()=>{let a=f.get("cli");return(0,D.isKnownCli)(a)?a:""}),Q=(0,c.useRef)(null),R=(0,c.useRef)({filterDecision:p,filterEventType:s,filterPolicy:w,filterSessionId:y,filterCli:E});R.current={filterDecision:p,filterEventType:s,filterPolicy:w,filterSessionId:y,filterCli:E},(0,c.useEffect)(()=>{if(!g.current){g.current=!0;return}f.setAll({decision:p||void 0,event:s||void 0,policy:w||void 0,session:y||void 0,cli:E||void 0,page:(0,C.pageToParam)(h)})},[p,s,w,y,E,h]);let S=""!==p||""!==s||""!==w||""!==y||""!==E,T=(0,c.useCallback)(async a=>{try{let b,{filterDecision:c,filterEventType:d,filterPolicy:e,filterSessionId:f,filterCli:g}=R.current;b=""!==c||""!==d||""!==e||""!==f||""!==g?await u({decision:c||void 0,eventType:d||void 0,policyName:e||void 0,sessionId:f||void 0,integration:g||void 0},a):await t(a),m(b)}catch{}},[]);(0,c.useEffect)(()=>{T(h);let a=setInterval(()=>T(h),e>0?1e3*e:5e3);return()=>clearInterval(a)},[h,T,e]),(0,c.useEffect)(()=>(Q.current&&clearTimeout(Q.current),Q.current=setTimeout(()=>{i(1),o(null),T(1)},300),()=>{Q.current&&clearTimeout(Q.current)}),[p,s,w,y,E]);let U=j?.entries??[],V=j?.totalPages??1;return(0,b.jsxs)(b.Fragment,{children:[j?.stats&&j.stats.totalEvents>0&&(0,b.jsx)("div",{className:"mb-4",children:(0,b.jsx)(N,{stats:j.stats})}),(0,b.jsxs)("div",{className:"bg-card border border-border rounded-lg overflow-hidden",children:[(0,b.jsxs)("div",{className:"flex flex-wrap items-center gap-3 px-4 py-2.5 border-b border-border bg-muted/20",children:[(0,b.jsx)(M,{value:p,onChange:q}),(0,b.jsxs)("select",{value:s,onChange:a=>v(a.target.value),className:"h-7 rounded-md border border-border bg-background px-2 text-xs text-foreground focus:outline-none focus:ring-2 focus:ring-primary/40 focus:border-primary/40 transition-shadow",children:[(0,b.jsx)("option",{value:"",children:"All Events"}),(0,b.jsx)("option",{value:"PreToolUse",children:"PreToolUse"}),(0,b.jsx)("option",{value:"PostToolUse",children:"PostToolUse"}),(0,b.jsx)("option",{value:"SessionStart",children:"SessionStart"}),(0,b.jsx)("option",{value:"SessionEnd",children:"SessionEnd"}),(0,b.jsx)("option",{value:"UserPromptSubmit",children:"UserPromptSubmit"}),(0,b.jsx)("option",{value:"PermissionRequest",children:"PermissionRequest"})]}),(0,b.jsxs)("select",{value:E,onChange:a=>{let b=a.target.value;L(""===b||(0,D.isKnownCli)(b)?b:"")},className:"h-7 rounded-md border border-border bg-background px-2 text-xs text-foreground focus:outline-none focus:ring-2 focus:ring-primary/40 focus:border-primary/40 transition-shadow","aria-label":"Filter by CLI",children:[(0,b.jsx)("option",{value:"",children:"All CLIs"}),D.KNOWN_CLI_IDS.map(a=>(0,b.jsx)("option",{value:a,children:(0,D.getCliLabel)(a)},a))]}),(0,b.jsx)("div",{className:"relative",children:(0,b.jsx)("input",{type:"text",value:w,onChange:a=>x(a.target.value),placeholder:"Filter by policy\\u2026",className:"h-7 rounded-md border border-border bg-background px-2.5 text-xs text-foreground placeholder:text-muted-foreground w-44 focus:outline-none focus:ring-2 focus:ring-primary/40 focus:border-primary/40 transition-shadow"})}),(0,b.jsx)("div",{className:"relative",children:(0,b.jsx)("input",{type:"text",value:y,onChange:a=>z(a.target.value),placeholder:"Filter by session…",className:"h-7 rounded-md border border-border bg-background px-2.5 text-xs text-foreground placeholder:text-muted-foreground w-44 focus:outline-none focus:ring-2 focus:ring-primary/40 focus:border-primary/40 transition-shadow"})})]}),0===U.length?(0,b.jsxs)("div",{className:"flex flex-col items-center justify-center py-16 px-4 text-center",children:[(0,b.jsx)(k.Shield,{className:"h-12 w-12 text-muted-foreground/30"}),!1===a?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("p",{className:"text-sm text-muted-foreground mt-4 font-medium",children:"Policies are not installed"}),(0,b.jsxs)("p",{className:"text-xs text-muted-foreground mt-1 max-w-sm",children:["Go to the"," ",(0,b.jsx)("button",{className:"underline hover:text-foreground transition-colors",onClick:()=>d?.("policies"),children:"Policies tab"})," ","and click ",(0,b.jsx)("span",{className:"font-mono bg-muted px-1 rounded",children:"Install"})," to enable policy monitoring."]})]}):(0,b.jsx)("p",{className:"text-sm text-muted-foreground mt-4",children:S?"No matching activity.":"Waiting for hook events…"})]}):(0,b.jsx)("div",{className:"overflow-x-auto",children:(0,b.jsxs)("table",{className:"w-full text-xs",children:[(0,b.jsx)("thead",{children:(0,b.jsxs)("tr",{className:"text-left text-muted-foreground border-b border-border bg-muted/30",children:[(0,b.jsx)("th",{className:"px-4 py-2.5 font-medium w-6"}),(0,b.jsx)("th",{className:"px-3 py-2.5 font-medium",children:"Decision"}),(0,b.jsx)("th",{className:"px-3 py-2.5 font-medium",children:"Event"}),(0,b.jsx)("th",{className:"px-3 py-2.5 font-medium",children:"CLI"}),(0,b.jsx)("th",{className:"px-3 py-2.5 font-medium",children:"Tool"}),(0,b.jsx)("th",{className:"px-3 py-2.5 font-medium",children:"Policy"}),(0,b.jsx)("th",{className:"px-3 py-2.5 font-medium",children:"Reason"}),(0,b.jsx)("th",{className:"px-3 py-2.5 font-medium",children:"Duration"}),(0,b.jsx)("th",{className:"px-3 py-2.5 font-medium",children:"Session"}),(0,b.jsx)("th",{className:"px-3 py-2.5 font-medium",children:"Mode"}),(0,b.jsx)("th",{className:"px-3 py-2.5 font-medium text-right",children:"Time"})]})}),(0,b.jsx)("tbody",{className:"divide-y divide-border/30",children:U.map((a,d)=>{var e;let f,g="deny"===a.decision,h=n===d,i="instruct"===a.decision;return(0,b.jsxs)(c.default.Fragment,{children:[(0,b.jsxs)("tr",{onClick:()=>{o(a=>a===d?null:d)},className:`cursor-pointer transition-colors ${g?"bg-red-500/[0.03] hover:bg-red-500/[0.07] border-l-2 border-l-red-500/40":i?"bg-amber-500/[0.03] hover:bg-amber-500/[0.07] border-l-2 border-l-amber-500/40":d%2==0?"hover:bg-muted/30":"bg-muted/[0.04] hover:bg-muted/30"} ${h?"bg-muted/20":""}`,children:[(0,b.jsx)("td",{className:"px-4 py-2",children:(0,b.jsx)(l.ChevronDown,{className:`h-3.5 w-3.5 text-muted-foreground transition-transform duration-150 ${h?"rotate-0":"-rotate-90"}`})}),(0,b.jsx)("td",{className:"px-3 py-2",children:(0,b.jsx)(G,{decision:a.decision})}),(0,b.jsx)("td",{className:"px-3 py-2",children:(0,b.jsx)(H,{eventType:a.eventType})}),(0,b.jsx)("td",{className:"px-3 py-2",children:(0,b.jsx)(I,{integration:a.integration})}),(0,b.jsx)("td",{className:"px-3 py-2 font-mono text-foreground",children:a.toolName??"—"}),(0,b.jsx)("td",{className:"px-3 py-2 font-mono text-foreground",children:a.policyNames&&a.policyNames.length>1?(0,b.jsxs)("span",{title:a.policyNames.join(", "),children:[a.policyNames[0],(0,b.jsxs)("span",{className:"text-muted-foreground text-[0.6rem]",children:[" +",a.policyNames.length-1]})]}):a.policyName??"—"}),(0,b.jsx)("td",{className:"px-3 py-2 text-muted-foreground truncate max-w-[240px]",title:a.reason??"",children:a.reason??"—"}),(0,b.jsx)("td",{className:"px-3 py-2",children:(0,b.jsx)(K,{ms:a.durationMs})}),(0,b.jsx)("td",{className:"px-3 py-2",title:a.sessionId??"",children:(0,b.jsx)(F,{sessionId:a.sessionId,transcriptPath:a.transcriptPath,integration:a.integration,cwd:a.cwd})}),(0,b.jsx)("td",{className:"px-3 py-2",children:a.permissionMode?(0,b.jsx)(J,{mode:a.permissionMode}):"—"}),(0,b.jsx)("td",{className:"px-3 py-2 text-right text-muted-foreground whitespace-nowrap",title:new Date(a.timestamp).toLocaleString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit"}),children:(e=a.timestamp,(f=Date.now()-e)<6e4?`${Math.max(1,Math.floor(f/1e3))}s ago`:f<36e5?`${Math.floor(f/6e4)}m ago`:f<864e5?`${Math.floor(f/36e5)}h ago`:`${Math.floor(f/864e5)}d ago`)})]}),h&&(0,b.jsx)(O,{item:a})]},`${a.timestamp}-${d}`)})})]})}),(0,b.jsx)(r.default,{currentPage:h,totalPages:V,onPageChange:a=>{i(a),o(null)}})]})]})}function Q({enabled:a,onChange:c,disabled:d}){return(0,b.jsx)("button",{onClick:c,disabled:d,className:`relative inline-flex h-4 w-7 shrink-0 items-center rounded-full transition-colors disabled:opacity-40 ${a?"bg-emerald-500":"bg-muted-foreground/30"}`,"aria-label":a?"Disable policy":"Enable policy",children:(0,b.jsx)("span",{className:`inline-block h-3 w-3 rounded-full bg-white shadow transition-transform ${a?"translate-x-3.5":"translate-x-0.5"}`})})}function R({policy:a,onClose:d,onSave:e}){let f=a.params??{},g=a.currentParams??{},[h,i]=(0,c.useState)(()=>{let a={};for(let[b,c]of Object.entries(f)){let d=b in g?g[b]:c.default;a[b]=d}return a});(0,c.useEffect)(()=>{let a=a=>{"Escape"===a.key&&d()};return document.addEventListener("keydown",a),()=>document.removeEventListener("keydown",a)},[d]);let j=(a,b)=>{i(c=>({...c,[a]:b}))};return(0,b.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50",onClick:a=>{a.target===a.currentTarget&&d()},children:(0,b.jsxs)("div",{className:"bg-card border border-border rounded-lg shadow-xl w-full max-w-lg mx-4 max-h-[80vh] flex flex-col",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between px-4 py-3 border-b border-border",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("p",{className:"text-sm font-mono font-semibold text-foreground",children:a.name}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground mt-0.5",children:a.description})]}),(0,b.jsx)("button",{onClick:d,className:"text-muted-foreground hover:text-foreground transition-colors",children:(0,b.jsx)(q.X,{className:"h-4 w-4"})})]}),(0,b.jsx)("div",{className:"overflow-y-auto flex-1 px-4 py-4 space-y-4",children:Object.entries(f).map(([a,c])=>(0,b.jsxs)("div",{children:[(0,b.jsx)("label",{className:"block text-xs font-semibold text-foreground mb-1 font-mono",children:a}),(0,b.jsx)("p",{className:"text-[0.65rem] text-muted-foreground mb-1.5",children:c.description}),((a,c)=>{let d=h[a];if("boolean"===c.type)return(0,b.jsxs)("label",{className:"flex items-center gap-2 cursor-pointer",children:[(0,b.jsx)("input",{type:"checkbox",checked:!!d,onChange:b=>j(a,b.target.checked),className:"rounded border-border"}),(0,b.jsx)("span",{className:"text-xs text-muted-foreground",children:c.description})]});if("number"===c.type)return(0,b.jsx)("input",{type:"number",value:"number"==typeof d?d:"",onChange:b=>j(a,Number(b.target.value)),className:"w-full h-7 rounded border border-border bg-background px-2 text-xs text-foreground focus:outline-none focus:ring-2 focus:ring-primary/40"});if("string[]"===c.type){let c=Array.isArray(d)?d.join("\n"):"";return(0,b.jsx)("textarea",{value:c,onChange:b=>j(a,b.target.value.split("\n").filter(a=>""!==a.trim())),rows:4,placeholder:"One entry per line",className:"w-full rounded border border-border bg-background px-2 py-1.5 text-xs text-foreground font-mono focus:outline-none focus:ring-2 focus:ring-primary/40 resize-y"})}if("pattern[]"===c.type){let c=Array.isArray(d)?d:[];return(0,b.jsxs)("div",{className:"space-y-1.5",children:[c.map((d,e)=>(0,b.jsxs)("div",{className:"flex gap-1.5 items-center",children:[(0,b.jsx)("input",{type:"text",value:d.regex,onChange:b=>{let d=[...c];d[e]={...d[e],regex:b.target.value},j(a,d)},placeholder:"regex",className:"flex-1 h-6 rounded border border-border bg-background px-2 text-xs font-mono focus:outline-none focus:ring-2 focus:ring-primary/40"}),(0,b.jsx)("input",{type:"text",value:d.label,onChange:b=>{let d=[...c];d[e]={...d[e],label:b.target.value},j(a,d)},placeholder:"label",className:"flex-1 h-6 rounded border border-border bg-background px-2 text-xs focus:outline-none focus:ring-2 focus:ring-primary/40"}),(0,b.jsx)("button",{onClick:()=>j(a,c.filter((a,b)=>b!==e)),className:"text-muted-foreground/50 hover:text-destructive transition-colors",children:(0,b.jsx)(q.X,{className:"h-3.5 w-3.5"})})]},e)),(0,b.jsx)("button",{onClick:()=>j(a,[...c,{regex:"",label:""}]),className:"text-xs text-primary hover:underline",children:"+ Add pattern"})]})}return(0,b.jsx)("input",{type:"text",value:"string"==typeof d?d:"",onChange:b=>j(a,b.target.value),className:"w-full h-7 rounded border border-border bg-background px-2 text-xs text-foreground focus:outline-none focus:ring-2 focus:ring-primary/40"})})(a,c)]},a))}),(0,b.jsxs)("div",{className:"flex items-center justify-end gap-2 px-4 py-3 border-t border-border",children:[(0,b.jsx)(E.Button,{variant:"outline",size:"sm",onClick:d,className:"h-7 text-xs",children:"Cancel"}),(0,b.jsx)(E.Button,{size:"sm",onClick:()=>e(h),className:"h-7 text-xs",children:"Save"})]})]})})}function S({message:a,onDismiss:c,onInstall:e,isPending:f}){return(0,d.createPortal)((0,b.jsxs)("div",{className:"fixed top-4 right-4 z-[9999] w-full max-w-sm",style:{animation:"slideInFromRight 0.25s ease-out"},children:[(0,b.jsx)("style",{children:`
|
|
2
2
|
@keyframes slideInFromRight {
|
|
3
3
|
from { transform: translateX(calc(100% + 1rem)); opacity: 0; }
|
|
4
4
|
to { transform: translateX(0); opacity: 1; }
|
|
5
5
|
}
|
|
6
|
-
`}),(0,b.jsxs)("div",{className:"rounded-lg border border-red-500/40 bg-red-950/95 shadow-2xl shadow-red-900/40 overflow-hidden backdrop-blur-sm",children:[(0,b.jsx)("div",{className:"h-0.5 w-full bg-gradient-to-r from-red-600 via-red-400 to-red-600"}),(0,b.jsxs)("div",{className:"p-4",children:[(0,b.jsxs)("div",{className:"flex items-start gap-3",children:[(0,b.jsx)("div",{className:"shrink-0 mt-0.5 flex h-5 w-5 items-center justify-center rounded-full bg-red-500 ring-2 ring-red-500/30",children:(0,b.jsx)(q.X,{className:"h-3 w-3 text-white",strokeWidth:3})}),(0,b.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,b.jsx)("p",{className:"text-[0.65rem] font-bold uppercase tracking-widest text-red-400 mb-0.5",children:"Error"}),(0,b.jsx)("p",{className:"text-sm text-red-100 leading-snug",children:a})]}),(0,b.jsx)("button",{onClick:c,className:"shrink-0 -mt-0.5 -mr-0.5 rounded p-0.5 text-red-400/60 transition-colors hover:bg-red-500/20 hover:text-red-200","aria-label":"Dismiss",children:(0,b.jsx)(q.X,{className:"h-4 w-4"})})]}),(0,b.jsxs)("div",{className:"mt-3 flex gap-2",children:[(0,b.jsx)(D.Button,{size:"sm",onClick:()=>{c(),e()},disabled:f,className:"h-7 flex-1 border-0 bg-red-500 px-3 text-xs font-semibold text-white hover:bg-red-400 disabled:opacity-50",children:"Install hooks"}),(0,b.jsx)(D.Button,{variant:"ghost",size:"sm",onClick:c,className:"h-7 px-3 text-xs text-red-400 hover:bg-red-500/10 hover:text-red-200",children:"Dismiss"})]})]})]})]}),document.body)}function S({onHooksInstallChange:a}){let[d,e]=(0,c.useState)(null),[f,g]=(0,c.useTransition)(),[h,i]=(0,c.useState)(null),[j,l]=(0,c.useState)(null),[m,n]=(0,c.useState)(null),q=(0,c.useCallback)(async()=>{try{let b=await v();e(b),a?.(b.installedScopes.length>0)}catch{}},[a]);(0,c.useEffect)(()=>{q()},[q]);let r=()=>{g(async()=>{try{i(null),await x("user"),await q()}catch(a){i(a instanceof Error?a.message:"Failed to install hooks.")}})};if(!d)return(0,b.jsx)("div",{className:"flex items-center justify-center py-16",children:(0,b.jsx)("span",{className:"text-sm text-muted-foreground",children:"Loading\\u2026"})});let s=d.installedScopes.length>0,t=Array.from(new Set(d.policies.map(a=>a.category)));return(0,b.jsxs)(b.Fragment,{children:[m&&(0,b.jsx)(Q,{policy:m,onClose:()=>n(null),onSave:a=>{if(!m)return;let b=m.name;n(null),g(async()=>{try{i(null),await z(b,a),await q()}catch(a){i(a instanceof Error?a.message:"Failed to save configuration.")}})}}),(0,b.jsxs)("div",{className:"bg-card border border-border rounded-lg overflow-hidden",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between px-4 py-3 border-b border-border bg-muted/10",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,b.jsx)("span",{className:`h-2 w-2 rounded-full shrink-0 ${s?"bg-emerald-500":"bg-muted-foreground/50"}`}),(0,b.jsx)("span",{className:"text-sm text-foreground",children:s?"Policies installed":"Policies not installed"}),s&&(0,b.jsxs)("span",{className:"text-xs text-muted-foreground font-mono hidden sm:inline",children:["· ",d.installedScopes.join(", ")," scope · ",d.settingsPath]})]}),(0,b.jsxs)("div",{className:"flex items-center gap-2 shrink-0",children:[s&&(0,b.jsx)(D.Button,{variant:"outline",size:"sm",onClick:()=>{g(async()=>{try{i(null),await y("user"),await q()}catch(a){i(a instanceof Error?a.message:"Failed to remove hooks.")}})},disabled:f,className:"text-xs h-7 px-3",children:"Remove"}),(0,b.jsx)(D.Button,{variant:s?"outline":"default",size:"sm",onClick:r,disabled:f,className:"text-xs h-7 px-3",children:s?"Reinstall":"Install policies"})]})]}),(0,b.jsxs)("div",{className:"flex items-center gap-2 px-4 py-2 border-b border-border/40 bg-muted/5",children:[(0,b.jsxs)("span",{className:"text-xs text-muted-foreground",children:[(0,b.jsx)("span",{className:"font-semibold text-foreground",children:d.enabledPolicies.length})," / ",d.policies.length+(d.customPolicies?.length??0)," ","policies enabled"]}),s&&(0,b.jsxs)("span",{className:"text-[0.65rem] text-muted-foreground/60",children:["· active in ",d.installedScopes.join(", ")," scope"]})]}),h&&(0,b.jsx)("div",{className:"px-4 py-2 bg-red-500/10 border-b border-red-500/20 text-xs text-red-400",children:h}),j&&(0,b.jsx)(R,{message:j,onDismiss:()=>l(null),onInstall:r,isPending:f}),t.map(a=>{let c=d.policies.filter(b=>b.category===a),h=c.filter(a=>a.enabled).length;return(0,b.jsxs)("div",{children:[(0,b.jsxs)("div",{className:"flex items-center justify-between px-4 py-2.5 bg-muted/20 border-b border-border/50",children:[(0,b.jsx)("span",{className:"text-[0.7rem] font-semibold uppercase tracking-wider text-muted-foreground",children:a}),(0,b.jsxs)("span",{className:"text-[0.7rem] text-muted-foreground",children:[h," / ",c.length," enabled"]})]}),c.map(a=>(0,b.jsxs)("div",{className:"flex items-start gap-3 px-4 py-3 border-b border-border/20 hover:bg-muted/20 transition-colors",children:[(0,b.jsx)("div",{className:"mt-0.5 shrink-0",children:(0,b.jsx)(P,{enabled:a.enabled,onChange:()=>{var b,c;return b=a.name,c=a.enabled,void(!d||(!(d.installedScopes.length>0)?l("Policies are not installed. Install policies to continue."):(l(null),e(a=>a?{...a,policies:a.policies.map(a=>a.name===b?{...a,enabled:!c}:a),enabledPolicies:c?a.enabledPolicies.filter(a=>a!==b):[...a.enabledPolicies,b]}:a),g(async()=>{try{await w(b,!c)}catch{i("Failed to save policy change."),q()}}))))},disabled:f})}),(0,b.jsxs)("div",{className:"flex items-center gap-1.5 min-w-0 w-56 shrink-0 mt-0.5",children:[(0,b.jsx)("span",{className:"text-xs font-mono text-foreground truncate",children:a.name}),a.beta&&(0,b.jsx)("span",{className:"shrink-0 text-[0.6rem] px-1 py-0.5 rounded border bg-violet-500/10 text-violet-400 border-violet-500/20",children:"beta"})]}),(0,b.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,b.jsx)("span",{className:"text-xs text-muted-foreground leading-relaxed",children:a.description}),a.eventScope&&(0,b.jsx)("span",{className:"block text-[0.65rem] text-muted-foreground/40 font-mono mt-0.5 hidden lg:block",children:a.eventScope}),a.params&&Object.keys(a.params).length>0&&(0,b.jsx)("div",{className:"flex flex-wrap gap-1 mt-1.5",children:Object.entries(a.params).map(([c,d])=>{let e=a.currentParams?.[c]??d.default,f=JSON.stringify(e)!==JSON.stringify(d.default);return(0,b.jsxs)("span",{className:`inline-flex items-center gap-1 font-mono text-[0.6rem] px-1.5 py-0.5 rounded border ${f?"bg-primary/10 text-primary/70 border-primary/20":"bg-muted/40 text-muted-foreground/55 border-border/40"}`,children:[(0,b.jsxs)("span",{className:"opacity-70",children:[c,":"]}),(0,b.jsx)("span",{children:function(a,b){if("string[]"===a||"pattern[]"===a){let c=Array.isArray(b)?b:[];return 0===c.length?"none":"pattern[]"===a?`${c.length} pattern${1!==c.length?"s":""}`:1===c.length?String(c[0]).slice(0,24):`${c.length} values`}return"boolean"===a?b?"on":"off":null==b||""===b?"—":String(b).slice(0,32)}(d.type,e)})]},c)})})]}),a.params&&Object.keys(a.params).length>0&&(0,b.jsx)("button",{className:"shrink-0 mt-0.5 text-muted-foreground hover:text-primary transition-colors",onClick:()=>n(a),title:"Edit parameters",children:(0,b.jsx)(o,{className:"h-3.5 w-3.5"})})]},a.name))]},a)}),d.customPoliciesPath&&(0,b.jsxs)("div",{children:[(0,b.jsxs)("div",{className:"flex items-center justify-between px-4 py-2.5 bg-muted/20 border-b border-border/50",children:[(0,b.jsx)("span",{className:"text-[0.7rem] font-semibold uppercase tracking-wider text-muted-foreground",children:"Custom Policies"}),(0,b.jsxs)("span",{className:"text-[0.7rem] text-muted-foreground",children:[d.customPolicies?.length??0," detected"]})]}),(0,b.jsxs)("div",{className:"flex items-center gap-3 px-4 py-3 border-b border-border/20",children:[(0,b.jsx)(p,{className:"h-3.5 w-3.5 text-muted-foreground shrink-0"}),(0,b.jsx)("span",{className:"text-xs font-mono text-muted-foreground truncate",children:d.customPoliciesPath})]}),(0,b.jsxs)("div",{className:"flex items-start gap-2 px-4 py-2.5 border-b border-border/20 bg-muted/10",children:[(0,b.jsx)(k.Shield,{className:"h-3.5 w-3.5 text-muted-foreground/60 shrink-0 mt-0.5"}),(0,b.jsx)("p",{className:"text-[0.7rem] text-muted-foreground/70 leading-relaxed",children:"Custom policies are always active. To add, remove, or reorder them, edit the JS file above."})]}),d.customPolicies?.map(a=>(0,b.jsxs)("div",{className:"flex items-start gap-3 px-4 py-3 border-b border-border/20 hover:bg-muted/20 transition-colors",children:[(0,b.jsx)("div",{className:"h-4 w-7 shrink-0 mt-0.5"}),(0,b.jsx)("div",{className:"flex items-center gap-1.5 min-w-0 w-56 shrink-0 mt-0.5",children:(0,b.jsx)("span",{className:"text-xs font-mono text-foreground truncate",children:a.name})}),(0,b.jsxs)("div",{className:"flex-1 min-w-0",children:[a.description&&(0,b.jsx)("span",{className:"text-xs text-muted-foreground leading-relaxed",children:a.description}),a.eventScope&&(0,b.jsx)("span",{className:"block text-[0.65rem] text-muted-foreground/40 font-mono mt-0.5 hidden lg:block",children:a.eventScope})]})]},a.name))]})]})]})}function T({activeTab:a,onChange:c}){return(0,b.jsx)("div",{className:"inline-flex items-center rounded-md border border-border bg-muted/30 p-0.5 mb-5",children:[{id:"activity",label:"Activity"},{id:"policies",label:"Configure"}].map(d=>(0,b.jsx)("button",{onClick:()=>c(d.id),className:`px-3 py-1.5 text-xs font-medium rounded transition-all ${a===d.id?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"}`,children:d.label},d.id))})}a.s(["default",0,function({initialTab:a="activity"}){let d=(0,B.useUrlParams)(),[f,h]=(0,c.useState)(a),[i,j]=(0,c.useState)(void 0),[k,l]=(0,c.useState)(null);(0,c.useEffect)(()=>{v().then(a=>{j(a.installedScopes.length>0),l({enabled:a.enabledPolicies.length,total:a.policies.length+(a.customPolicies?.length??0)})}).catch(()=>j(void 0))},[]);let m=a=>{h(a),d.setAll({tab:"activity"===a?void 0:a})};return(0,b.jsxs)("div",{className:"min-h-screen bg-background px-4 py-6 sm:px-6 lg:px-10",children:[(0,b.jsxs)("div",{className:"mb-6",children:[(0,b.jsxs)(e.default,{href:"/projects",className:"inline-flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground transition-colors",children:[(0,b.jsx)(g,{className:"h-3.5 w-3.5"}),"Back"]}),(0,b.jsxs)("div",{className:"flex items-center gap-3 mt-3",children:[(0,b.jsx)("h1",{className:"text-2xl font-bold text-foreground tracking-tight",children:"Policies"}),"activity"===f&&(0,b.jsxs)("span",{className:"relative flex h-2.5 w-2.5 mt-0.5",children:[(0,b.jsx)("span",{className:"animate-ping absolute inline-flex h-full w-full rounded-full bg-emerald-400 opacity-75"}),(0,b.jsx)("span",{className:"relative inline-flex rounded-full h-2.5 w-2.5 bg-emerald-500"})]})]}),(0,b.jsx)("p",{className:"text-sm text-muted-foreground mt-1",children:"activity"===f?(0,b.jsxs)(b.Fragment,{children:["Policy evaluations for Claude",k&&(0,b.jsxs)("span",{className:"text-muted-foreground/60",children:[" · ","enabled policies"," ",(0,b.jsxs)("span",{className:"font-mono text-foreground/70",children:[k.enabled,"/",k.total]})]}),(0,b.jsxs)("span",{className:"block text-xs text-muted-foreground/50 mt-0.5",children:["To configure policies,"," ",(0,b.jsx)("button",{className:"underline underline-offset-2 hover:text-foreground transition-colors",onClick:()=>m("policies"),children:"go here"})]})]}):"Configure Policies"})]}),(0,b.jsx)(T,{activeTab:f,onChange:m}),"activity"===f?(0,b.jsx)(O,{hooksInstalled:i,onSwitchTab:m}):(0,b.jsx)(S,{onHooksInstallChange:j})]})}],22712)}];
|
|
6
|
+
`}),(0,b.jsxs)("div",{className:"rounded-lg border border-red-500/40 bg-red-950/95 shadow-2xl shadow-red-900/40 overflow-hidden backdrop-blur-sm",children:[(0,b.jsx)("div",{className:"h-0.5 w-full bg-gradient-to-r from-red-600 via-red-400 to-red-600"}),(0,b.jsxs)("div",{className:"p-4",children:[(0,b.jsxs)("div",{className:"flex items-start gap-3",children:[(0,b.jsx)("div",{className:"shrink-0 mt-0.5 flex h-5 w-5 items-center justify-center rounded-full bg-red-500 ring-2 ring-red-500/30",children:(0,b.jsx)(q.X,{className:"h-3 w-3 text-white",strokeWidth:3})}),(0,b.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,b.jsx)("p",{className:"text-[0.65rem] font-bold uppercase tracking-widest text-red-400 mb-0.5",children:"Error"}),(0,b.jsx)("p",{className:"text-sm text-red-100 leading-snug",children:a})]}),(0,b.jsx)("button",{onClick:c,className:"shrink-0 -mt-0.5 -mr-0.5 rounded p-0.5 text-red-400/60 transition-colors hover:bg-red-500/20 hover:text-red-200","aria-label":"Dismiss",children:(0,b.jsx)(q.X,{className:"h-4 w-4"})})]}),(0,b.jsxs)("div",{className:"mt-3 flex gap-2",children:[(0,b.jsx)(E.Button,{size:"sm",onClick:()=>{c(),e()},disabled:f,className:"h-7 flex-1 border-0 bg-red-500 px-3 text-xs font-semibold text-white hover:bg-red-400 disabled:opacity-50",children:"Install hooks"}),(0,b.jsx)(E.Button,{variant:"ghost",size:"sm",onClick:c,className:"h-7 px-3 text-xs text-red-400 hover:bg-red-500/10 hover:text-red-200",children:"Dismiss"})]})]})]})]}),document.body)}function T({onHooksInstallChange:a}){let[d,e]=(0,c.useState)(null),[f,g]=(0,c.useTransition)(),[h,i]=(0,c.useState)(null),[j,l]=(0,c.useState)(null),[m,n]=(0,c.useState)(null),q=(0,c.useCallback)(async()=>{try{let b=await v();e(b),a?.(b.installedScopes.length>0)}catch{}},[a]);(0,c.useEffect)(()=>{q()},[q]);let r=()=>{g(async()=>{try{i(null),await x("user"),await q()}catch(a){i(a instanceof Error?a.message:"Failed to install hooks.")}})};if(!d)return(0,b.jsx)("div",{className:"flex items-center justify-center py-16",children:(0,b.jsx)("span",{className:"text-sm text-muted-foreground",children:"Loading\\u2026"})});let s=d.installedScopes.length>0,t=Array.from(new Set(d.policies.map(a=>a.category)));return(0,b.jsxs)(b.Fragment,{children:[m&&(0,b.jsx)(R,{policy:m,onClose:()=>n(null),onSave:a=>{if(!m)return;let b=m.name;n(null),g(async()=>{try{i(null),await z(b,a),await q()}catch(a){i(a instanceof Error?a.message:"Failed to save configuration.")}})}}),(0,b.jsxs)("div",{className:"bg-card border border-border rounded-lg overflow-hidden",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between px-4 py-3 border-b border-border bg-muted/10",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,b.jsx)("span",{className:`h-2 w-2 rounded-full shrink-0 ${s?"bg-emerald-500":"bg-muted-foreground/50"}`}),(0,b.jsx)("span",{className:"text-sm text-foreground",children:s?"Policies installed":"Policies not installed"}),s&&(0,b.jsxs)("span",{className:"text-xs text-muted-foreground font-mono hidden sm:inline",children:["· ",d.installedScopes.join(", ")," scope · ",d.settingsPath]})]}),(0,b.jsxs)("div",{className:"flex items-center gap-2 shrink-0",children:[s&&(0,b.jsx)(E.Button,{variant:"outline",size:"sm",onClick:()=>{g(async()=>{try{i(null),await y("user"),await q()}catch(a){i(a instanceof Error?a.message:"Failed to remove hooks.")}})},disabled:f,className:"text-xs h-7 px-3",children:"Remove"}),(0,b.jsx)(E.Button,{variant:s?"outline":"default",size:"sm",onClick:r,disabled:f,className:"text-xs h-7 px-3",children:s?"Reinstall":"Install policies"})]})]}),(0,b.jsxs)("div",{className:"flex items-center gap-2 px-4 py-2 border-b border-border/40 bg-muted/5",children:[(0,b.jsxs)("span",{className:"text-xs text-muted-foreground",children:[(0,b.jsx)("span",{className:"font-semibold text-foreground",children:d.enabledPolicies.length})," / ",d.policies.length+(d.customPolicies?.length??0)," ","policies enabled"]}),s&&(0,b.jsxs)("span",{className:"text-[0.65rem] text-muted-foreground/60",children:["· active in ",d.installedScopes.join(", ")," scope"]})]}),h&&(0,b.jsx)("div",{className:"px-4 py-2 bg-red-500/10 border-b border-red-500/20 text-xs text-red-400",children:h}),j&&(0,b.jsx)(S,{message:j,onDismiss:()=>l(null),onInstall:r,isPending:f}),t.map(a=>{let c=d.policies.filter(b=>b.category===a),h=c.filter(a=>a.enabled).length;return(0,b.jsxs)("div",{children:[(0,b.jsxs)("div",{className:"flex items-center justify-between px-4 py-2.5 bg-muted/20 border-b border-border/50",children:[(0,b.jsx)("span",{className:"text-[0.7rem] font-semibold uppercase tracking-wider text-muted-foreground",children:a}),(0,b.jsxs)("span",{className:"text-[0.7rem] text-muted-foreground",children:[h," / ",c.length," enabled"]})]}),c.map(a=>(0,b.jsxs)("div",{className:"flex items-start gap-3 px-4 py-3 border-b border-border/20 hover:bg-muted/20 transition-colors",children:[(0,b.jsx)("div",{className:"mt-0.5 shrink-0",children:(0,b.jsx)(Q,{enabled:a.enabled,onChange:()=>{var b,c;return b=a.name,c=a.enabled,void(!d||(!(d.installedScopes.length>0)?l("Policies are not installed. Install policies to continue."):(l(null),e(a=>a?{...a,policies:a.policies.map(a=>a.name===b?{...a,enabled:!c}:a),enabledPolicies:c?a.enabledPolicies.filter(a=>a!==b):[...a.enabledPolicies,b]}:a),g(async()=>{try{await w(b,!c)}catch{i("Failed to save policy change."),q()}}))))},disabled:f})}),(0,b.jsxs)("div",{className:"flex items-center gap-1.5 min-w-0 w-56 shrink-0 mt-0.5",children:[(0,b.jsx)("span",{className:"text-xs font-mono text-foreground truncate",children:a.name}),a.beta&&(0,b.jsx)("span",{className:"shrink-0 text-[0.6rem] px-1 py-0.5 rounded border bg-violet-500/10 text-violet-400 border-violet-500/20",children:"beta"})]}),(0,b.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,b.jsx)("span",{className:"text-xs text-muted-foreground leading-relaxed",children:a.description}),a.eventScope&&(0,b.jsx)("span",{className:"block text-[0.65rem] text-muted-foreground/40 font-mono mt-0.5 hidden lg:block",children:a.eventScope}),a.params&&Object.keys(a.params).length>0&&(0,b.jsx)("div",{className:"flex flex-wrap gap-1 mt-1.5",children:Object.entries(a.params).map(([c,d])=>{let e=a.currentParams?.[c]??d.default,f=JSON.stringify(e)!==JSON.stringify(d.default);return(0,b.jsxs)("span",{className:`inline-flex items-center gap-1 font-mono text-[0.6rem] px-1.5 py-0.5 rounded border ${f?"bg-primary/10 text-primary/70 border-primary/20":"bg-muted/40 text-muted-foreground/55 border-border/40"}`,children:[(0,b.jsxs)("span",{className:"opacity-70",children:[c,":"]}),(0,b.jsx)("span",{children:function(a,b){if("string[]"===a||"pattern[]"===a){let c=Array.isArray(b)?b:[];return 0===c.length?"none":"pattern[]"===a?`${c.length} pattern${1!==c.length?"s":""}`:1===c.length?String(c[0]).slice(0,24):`${c.length} values`}return"boolean"===a?b?"on":"off":null==b||""===b?"—":String(b).slice(0,32)}(d.type,e)})]},c)})})]}),a.params&&Object.keys(a.params).length>0&&(0,b.jsx)("button",{className:"shrink-0 mt-0.5 text-muted-foreground hover:text-primary transition-colors",onClick:()=>n(a),title:"Edit parameters",children:(0,b.jsx)(o,{className:"h-3.5 w-3.5"})})]},a.name))]},a)}),d.customPoliciesPath&&(0,b.jsxs)("div",{children:[(0,b.jsxs)("div",{className:"flex items-center justify-between px-4 py-2.5 bg-muted/20 border-b border-border/50",children:[(0,b.jsx)("span",{className:"text-[0.7rem] font-semibold uppercase tracking-wider text-muted-foreground",children:"Custom Policies"}),(0,b.jsxs)("span",{className:"text-[0.7rem] text-muted-foreground",children:[d.customPolicies?.length??0," detected"]})]}),(0,b.jsxs)("div",{className:"flex items-center gap-3 px-4 py-3 border-b border-border/20",children:[(0,b.jsx)(p,{className:"h-3.5 w-3.5 text-muted-foreground shrink-0"}),(0,b.jsx)("span",{className:"text-xs font-mono text-muted-foreground truncate",children:d.customPoliciesPath})]}),(0,b.jsxs)("div",{className:"flex items-start gap-2 px-4 py-2.5 border-b border-border/20 bg-muted/10",children:[(0,b.jsx)(k.Shield,{className:"h-3.5 w-3.5 text-muted-foreground/60 shrink-0 mt-0.5"}),(0,b.jsx)("p",{className:"text-[0.7rem] text-muted-foreground/70 leading-relaxed",children:"Custom policies are always active. To add, remove, or reorder them, edit the JS file above."})]}),d.customPolicies?.map(a=>(0,b.jsxs)("div",{className:"flex items-start gap-3 px-4 py-3 border-b border-border/20 hover:bg-muted/20 transition-colors",children:[(0,b.jsx)("div",{className:"h-4 w-7 shrink-0 mt-0.5"}),(0,b.jsx)("div",{className:"flex items-center gap-1.5 min-w-0 w-56 shrink-0 mt-0.5",children:(0,b.jsx)("span",{className:"text-xs font-mono text-foreground truncate",children:a.name})}),(0,b.jsxs)("div",{className:"flex-1 min-w-0",children:[a.description&&(0,b.jsx)("span",{className:"text-xs text-muted-foreground leading-relaxed",children:a.description}),a.eventScope&&(0,b.jsx)("span",{className:"block text-[0.65rem] text-muted-foreground/40 font-mono mt-0.5 hidden lg:block",children:a.eventScope})]})]},a.name))]})]})]})}function U({activeTab:a,onChange:c}){return(0,b.jsx)("div",{className:"inline-flex items-center rounded-md border border-border bg-muted/30 p-0.5 mb-5",children:[{id:"activity",label:"Activity"},{id:"policies",label:"Configure"}].map(d=>(0,b.jsx)("button",{onClick:()=>c(d.id),className:`px-3 py-1.5 text-xs font-medium rounded transition-all ${a===d.id?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"}`,children:d.label},d.id))})}a.s(["default",0,function({initialTab:a="activity"}){let d=(0,B.useUrlParams)(),[f,h]=(0,c.useState)(a),[i,j]=(0,c.useState)(void 0),[k,l]=(0,c.useState)(null);(0,c.useEffect)(()=>{v().then(a=>{j(a.installedScopes.length>0),l({enabled:a.enabledPolicies.length,total:a.policies.length+(a.customPolicies?.length??0)})}).catch(()=>j(void 0))},[]);let m=a=>{h(a),d.setAll({tab:"activity"===a?void 0:a})};return(0,b.jsxs)("div",{className:"min-h-screen bg-background px-4 py-6 sm:px-6 lg:px-10",children:[(0,b.jsxs)("div",{className:"mb-6",children:[(0,b.jsxs)(e.default,{href:"/projects",className:"inline-flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground transition-colors",children:[(0,b.jsx)(g,{className:"h-3.5 w-3.5"}),"Back"]}),(0,b.jsxs)("div",{className:"flex items-center gap-3 mt-3",children:[(0,b.jsx)("h1",{className:"text-2xl font-bold text-foreground tracking-tight",children:"Policies"}),"activity"===f&&(0,b.jsxs)("span",{className:"relative flex h-2.5 w-2.5 mt-0.5",children:[(0,b.jsx)("span",{className:"animate-ping absolute inline-flex h-full w-full rounded-full bg-emerald-400 opacity-75"}),(0,b.jsx)("span",{className:"relative inline-flex rounded-full h-2.5 w-2.5 bg-emerald-500"})]})]}),(0,b.jsx)("p",{className:"text-sm text-muted-foreground mt-1",children:"activity"===f?(0,b.jsxs)(b.Fragment,{children:["Policy evaluations for Claude",k&&(0,b.jsxs)("span",{className:"text-muted-foreground/60",children:[" · ","enabled policies"," ",(0,b.jsxs)("span",{className:"font-mono text-foreground/70",children:[k.enabled,"/",k.total]})]}),(0,b.jsxs)("span",{className:"block text-xs text-muted-foreground/50 mt-0.5",children:["To configure policies,"," ",(0,b.jsx)("button",{className:"underline underline-offset-2 hover:text-foreground transition-colors",onClick:()=>m("policies"),children:"go here"})]})]}):"Configure Policies"})]}),(0,b.jsx)(U,{activeTab:f,onChange:m}),"activity"===f?(0,b.jsx)(P,{hooksInstalled:i,onSwitchTab:m}):(0,b.jsx)(T,{onHooksInstallChange:j})]})}],22712)}];
|
|
7
7
|
|
|
8
8
|
//# sourceMappingURL=app_policies_hooks-client_tsx_0q-m0y-._.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
module.exports=[1024,a=>{"use strict";var b=a.i(
|
|
1
|
+
module.exports=[1024,a=>{"use strict";var b=a.i(12714),c=a.i(60526),d=a.i(50227),e=a.i(90798),f=a.i(34900),g=a.i(26192),h=a.i(33432),i=a.i(76668);let j=(0,d.join)((0,c.homedir)(),".codex","sessions"),k=/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/i;async function l(a){try{return await (0,b.readdir)(a,{withFileTypes:!0})}catch{return null}}async function m(a){let c=null;try{c=await (0,b.open)(a,"r");let d=Buffer.alloc(262144),{bytesRead:e}=await c.read(d,0,262144,0);if(0===e)return null;let f=d.subarray(0,e),g=f.indexOf(10),h=-1===g?e:g;return f.subarray(0,h).toString("utf-8")}catch{return null}finally{c&&await c.close().catch(()=>{})}}async function n(a){let b=await l(a);return b?b.filter(a=>a.isFile()&&a.name.endsWith(".jsonl")).map(b=>(0,d.join)(a,b.name)):[]}async function o(){let a=await l(j);if(!a)return[];let c=[];for(let b of a){if(!b.isDirectory())continue;let a=await l((0,d.join)(j,b.name));if(a)for(let e of a){if(!e.isDirectory())continue;let a=await l((0,d.join)(j,b.name,e.name));if(a)for(let f of a){if(!f.isDirectory())continue;let a=(0,d.join)(j,b.name,e.name,f.name);c.push(...await n(a))}}}return 0===c.length?[]:(await (0,g.batchAll)(c.map(a=>async()=>{let c,d,e=(d=(a.split("/").pop()??"").match(k))?d[0]:null;if(!e)return null;let f=await m(a);if(!f)return null;let{cwd:g}=function(a){try{let b=JSON.parse(a);if("session_meta"!==b.type)return{};let c=b.payload?.cwd;if("string"!=typeof c||0===c.length)return{};return{cwd:c}}catch{return{}}}(f);if(!g)return null;try{let d=await (0,b.open)(a,"r");try{c=(await d.stat()).mtime}finally{await d.close().catch(()=>{})}}catch{c=new Date(0)}return{filePath:a,fileName:a.split("/").pop()??"",cwd:g,sessionId:e,fileMtime:c}}),16)).filter(a=>"fulfilled"===a.status).map(a=>a.value).filter(a=>null!==a)}let p=(0,f.runtimeCache)(o,30);async function q(){let a;try{a=await p()}catch(a){return(0,i.logWarn)("Failed to scan Codex sessions:",a),[]}let b=new Map;for(let c of a){let a=b.get(c.cwd);(!a||c.fileMtime.getTime()>a.latest.getTime())&&b.set(c.cwd,{latest:c.fileMtime,cwd:c.cwd})}let c=[];for(let{cwd:a,latest:d}of b.values())c.push({name:(0,e.encodeFolderName)(a),path:a,isDirectory:!0,lastModified:d,lastModifiedFormatted:(0,h.formatDate)(d),cli:["codex"]});return c.sort((a,b)=>b.lastModified.getTime()-a.lastModified.getTime()),c}function r(a){let b=a.map(a=>({name:a.fileName.replace(/\.jsonl$/,""),path:a.filePath,lastModified:a.fileMtime,lastModifiedFormatted:(0,h.formatDate)(a.fileMtime),sessionId:a.sessionId,cli:"codex"}));return b.sort((a,b)=>b.lastModified.getTime()-a.lastModified.getTime()),b}async function s(a){let b;try{b=await p()}catch(a){return(0,i.logWarn)("Failed to scan Codex sessions:",a),[]}return r(b.filter(b=>b.cwd===a))}async function t(a){let b;try{b=await p()}catch(a){return(0,i.logWarn)("Failed to scan Codex sessions:",a),{cwd:null,sessions:[]}}let c=b.filter(b=>(0,e.encodeFolderName)(b.cwd)===a);return{cwd:c[0]?.cwd??null,sessions:r(c)}}let u=(0,f.runtimeCache)(q,30),v=(0,f.runtimeCache)(a=>s(a),30,{maxSize:50}),w=(0,f.runtimeCache)(a=>t(a),30,{maxSize:50});a.s(["getCachedCodexProjects",0,u,"getCachedCodexSessionsByEncodedName",0,w,"getCachedCodexSessionsForCwd",0,v,"getCodexProjects",0,q,"getCodexSessionsByEncodedName",0,t,"getCodexSessionsForCwd",0,s])}];
|
|
2
2
|
|
|
3
3
|
//# sourceMappingURL=lib_codex-projects_ts_0eosib~._.js.map
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
module.exports=[88890,a=>{"use strict";var b=a.i(12714),c=a.i(60526),d=a.i(50227),e=a.i(90798),f=a.i(34900),g=a.i(26192),h=a.i(33432),i=a.i(76668);async function j(a){try{return await (0,b.readdir)(a,{withFileTypes:!0})}catch{return null}}async function k(a){try{return(await (0,b.stat)(a)).mtime}catch{return null}}async function l(){let a=(0,d.join)(process.env.COPILOT_HOME||(0,d.join)((0,c.homedir)(),".copilot"),"session-state"),e=await j(a);if(!e)return[];let f=e.filter(a=>a.isDirectory()).map(b=>({sessionId:b.name,workspacePath:(0,d.join)(a,b.name,"workspace.yaml"),eventsPath:(0,d.join)(a,b.name,"events.jsonl")}));return(await (0,g.batchAll)(f.map(a=>async()=>{let c;try{c=await (0,b.readFile)(a.workspacePath,"utf-8")}catch{return null}let d=function(a){let b=a.match(/^cwd\s*:\s*(.+?)\s*$/m);if(b)return b[1].replace(/^['"]|['"]$/g,"")}(c);if(!d)return null;let e=await k(a.eventsPath),f=await k(a.workspacePath),g=null!==e,h=e&&f?new Date(Math.max(e.getTime(),f.getTime())):e??f??new Date(0);return{workspacePath:a.workspacePath,eventsPath:a.eventsPath,sessionId:a.sessionId,cwd:d,fileMtime:h,hasTranscript:g}}),16)).filter(a=>"fulfilled"===a.status).map(a=>a.value).filter(a=>null!==a)}let m=(0,f.runtimeCache)(l,30);async function n(){let a;try{a=await m()}catch(a){return(0,i.logWarn)("Failed to scan Copilot sessions:",a),[]}let b=new Map;for(let c of a){if(!c.hasTranscript)continue;let a=b.get(c.cwd);(!a||c.fileMtime.getTime()>a.latest.getTime())&&b.set(c.cwd,{latest:c.fileMtime,cwd:c.cwd})}let c=[];for(let{cwd:a,latest:d}of b.values())c.push({name:(0,e.encodeFolderName)(a),path:a,isDirectory:!0,lastModified:d,lastModifiedFormatted:(0,h.formatDate)(d),cli:["copilot"]});return c.sort((a,b)=>b.lastModified.getTime()-a.lastModified.getTime()),c}function o(a){let b=a.filter(a=>a.hasTranscript).map(a=>({name:a.sessionId,path:a.eventsPath,lastModified:a.fileMtime,lastModifiedFormatted:(0,h.formatDate)(a.fileMtime),sessionId:a.sessionId,cli:"copilot"}));return b.sort((a,b)=>b.lastModified.getTime()-a.lastModified.getTime()),b}async function p(a){let b;try{b=await m()}catch(a){return(0,i.logWarn)("Failed to scan Copilot sessions:",a),[]}return o(b.filter(b=>b.cwd===a))}async function q(a){let b;try{b=await m()}catch(a){return(0,i.logWarn)("Failed to scan Copilot sessions:",a),{cwd:null,sessions:[]}}let c=b.filter(b=>b.hasTranscript&&(0,e.encodeFolderName)(b.cwd)===a);return{cwd:c[0]?.cwd??null,sessions:o(c)}}let r=(0,f.runtimeCache)(n,30),s=(0,f.runtimeCache)(a=>p(a),30,{maxSize:50}),t=(0,f.runtimeCache)(a=>q(a),30,{maxSize:50});a.s(["getCachedCopilotProjects",0,r,"getCachedCopilotSessionsByEncodedName",0,t,"getCachedCopilotSessionsForCwd",0,s,"getCopilotProjects",0,n,"getCopilotSessionsByEncodedName",0,q,"getCopilotSessionsForCwd",0,p])}];
|
|
2
|
+
|
|
3
|
+
//# sourceMappingURL=lib_copilot-projects_ts_0r8xkn8._.js.map
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
module.exports=[93087,a=>{"use strict";var b=a.i(12714),c=a.i(60526),d=a.i(50227),e=a.i(90798),f=a.i(34900),g=a.i(26192),h=a.i(33432),i=a.i(76668);let j=["agent-sessions","conversations","sessions"],k=["meta.json","session.json","workspace.json","workspace.yaml"],l=["events.jsonl","transcript.jsonl","messages.jsonl"];async function m(a){try{return await (0,b.readdir)(a,{withFileTypes:!0})}catch{return null}}async function n(a){try{return(await (0,b.stat)(a)).mtime}catch{return null}}async function o(a,c){for(let e of c){let c,f=(0,d.join)(a,e);if(await n(f)===null)continue;try{c=await (0,b.readFile)(f,"utf-8")}catch{continue}let g=function(a){try{let b=JSON.parse(a);if("string"==typeof b.cwd&&b.cwd.length>0)return b.cwd}catch{}let b=a.match(/^\s*cwd\s*:\s*(.+?)\s*$/m);if(b){let a=b[1].replace(/^['"]|['"]$/g,"");if(a.length>0)return a}}(c);if(g)return{path:f,cwd:g}}return null}async function p(a,b){for(let c of b){let b=(0,d.join)(a,c);if(await n(b)!==null)return b}return null}async function q(){let a=process.env.CURSOR_HOME||(0,d.join)((0,c.homedir)(),".cursor"),b=[],f=[],h=(0,d.join)(a,"projects"),i=await m(h);if(i)for(let a of i){if(!a.isDirectory())continue;let c=(0,e.decodeFolderName)(a.name),f=c.startsWith("/")||/^[A-Za-z]:\//.test(c)?c:`/${c}`,g=(0,d.join)(h,a.name,"agent-transcripts"),i=await m(g);if(i)for(let a of i)a.isDirectory()&&b.push({sessionId:a.name,dir:(0,d.join)(g,a.name),cwd:f})}for(let b of j){let c=(0,d.join)(a,b),e=await m(c);if(e)for(let a of e)a.isDirectory()&&f.push({sessionId:a.name,dir:(0,d.join)(c,a.name)})}return 0===b.length&&0===f.length?[]:(await (0,g.batchAll)([...b.map(a=>async()=>{let b=(0,d.join)(a.dir,`${a.sessionId}.jsonl`),c=await n(b);return c?{metaPath:a.dir,transcriptPath:b,sessionId:a.sessionId,cwd:a.cwd,fileMtime:c,hasTranscript:!0}:null}),...f.map(a=>async()=>{let b=await o(a.dir,k);if(!b)return null;let c=await p(a.dir,l),d=c?await n(c):null,e=await n(b.path),f=d&&e?new Date(Math.max(d.getTime(),e.getTime())):d??e??new Date(0);return{metaPath:b.path,transcriptPath:c,sessionId:a.sessionId,cwd:b.cwd,fileMtime:f,hasTranscript:null!==c}})],16)).filter(a=>"fulfilled"===a.status).map(a=>a.value).filter(a=>null!==a)}let r=(0,f.runtimeCache)(q,30);async function s(){let a;try{a=await r()}catch(a){return(0,i.logWarn)("Failed to scan Cursor sessions:",a),[]}let b=new Map;for(let c of a){if(!c.hasTranscript)continue;let a=b.get(c.cwd);(!a||c.fileMtime.getTime()>a.latest.getTime())&&b.set(c.cwd,{latest:c.fileMtime,cwd:c.cwd})}let c=[];for(let{cwd:a,latest:d}of b.values())c.push({name:(0,e.encodeFolderName)(a),path:a,isDirectory:!0,lastModified:d,lastModifiedFormatted:(0,h.formatDate)(d),cli:["cursor"]});return c.sort((a,b)=>b.lastModified.getTime()-a.lastModified.getTime()),c}function t(a){let b=a.filter(a=>a.hasTranscript&&a.transcriptPath).map(a=>({name:a.sessionId,path:a.transcriptPath,lastModified:a.fileMtime,lastModifiedFormatted:(0,h.formatDate)(a.fileMtime),sessionId:a.sessionId,cli:"cursor"}));return b.sort((a,b)=>b.lastModified.getTime()-a.lastModified.getTime()),b}async function u(a){let b;try{b=await r()}catch(a){return(0,i.logWarn)("Failed to scan Cursor sessions:",a),[]}return t(b.filter(b=>b.cwd===a))}async function v(a){let b;try{b=await r()}catch(a){return(0,i.logWarn)("Failed to scan Cursor sessions:",a),{cwd:null,sessions:[]}}let c=b.filter(b=>b.hasTranscript&&(0,e.encodeFolderName)(b.cwd)===a);return{cwd:c[0]?.cwd??null,sessions:t(c)}}let w=(0,f.runtimeCache)(s,30),x=(0,f.runtimeCache)(a=>u(a),30,{maxSize:50}),y=(0,f.runtimeCache)(a=>v(a),30,{maxSize:50});a.s(["getCachedCursorProjects",0,w,"getCachedCursorSessionsByEncodedName",0,y,"getCachedCursorSessionsForCwd",0,x,"getCursorProjects",0,s,"getCursorSessionsByEncodedName",0,v,"getCursorSessionsForCwd",0,u])}];
|
|
2
|
+
|
|
3
|
+
//# sourceMappingURL=lib_cursor-projects_ts_0qt1scg._.js.map
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
module.exports=[62074,a=>{"use strict";var b=a.i(12714),c=a.i(60526),d=a.i(50227),e=a.i(34900),f=a.i(26192),g=a.i(33432),h=a.i(90798),i=a.i(76668);let j=/^session-(\d{4}-\d{2}-\d{2}T\d{2}-\d{2})-([0-9a-f]{8})\.jsonl$/i;async function k(a){try{return await (0,b.readdir)(a,{withFileTypes:!0})}catch{return null}}async function l(a){try{return(await (0,b.stat)(a)).mtime}catch{return null}}async function m(a){try{let c=(await (0,b.readFile)((0,d.join)(a,".project_root"),"utf-8")).trim();return c.length>0?c:null}catch{return null}}async function n(){let a=process.env.GEMINI_SESSIONS_DIR||(0,d.join)((0,c.homedir)(),".gemini","tmp"),b=await k(a);if(!b)return[];let e=[];return await (0,f.batchAll)(b.filter(a=>a.isDirectory()).map(b=>async()=>{let c=(0,d.join)(a,b.name),f=await m(c);if(!f)return;let g=(0,d.join)(c,"chats"),h=await k(g);if(h)for(let a of h){if(!a.isFile()||!j.test(a.name))continue;let b=(0,d.join)(g,a.name),c=await l(b);c&&e.push({filePath:b,sessionFilename:a.name,cwd:f,fileMtime:c})}}),16),e}async function o(){let a=await n(),b=new Map;for(let c of a){let a=b.get(c.cwd);(!a||c.fileMtime.getTime()>a.mtime.getTime())&&b.set(c.cwd,{mtime:c.fileMtime})}let c=[...b.entries()].map(([a,{mtime:b}])=>({name:(0,h.encodeFolderName)(a),path:a,isDirectory:!0,lastModified:b,lastModifiedFormatted:(0,g.formatDate)(b),cli:["gemini"]}));return c.sort((a,b)=>b.lastModified.getTime()-a.lastModified.getTime()),c}async function p(a){let b=(await n()).filter(b=>b.cwd===a).map(a=>{let b=a.sessionFilename.match(j);return{name:a.sessionFilename,path:a.filePath,lastModified:a.fileMtime,lastModifiedFormatted:(0,g.formatDate)(a.fileMtime),sessionId:b?b[2]:void 0,cli:"gemini"}});return b.sort((a,b)=>b.lastModified.getTime()-a.lastModified.getTime()),b}async function q(a){let b;try{b=await n()}catch(a){return(0,i.logWarn)("Failed to scan Gemini sessions:",a),{cwd:null,sessions:[]}}let c=b.filter(b=>(0,h.encodeFolderName)(b.cwd)===a),d=Array.from(new Set(c.map(a=>a.cwd)));if(1!==d.length)return{cwd:null,sessions:[]};let e=c.map(a=>{let b=a.sessionFilename.match(j);return{name:a.sessionFilename,path:a.filePath,lastModified:a.fileMtime,lastModifiedFormatted:(0,g.formatDate)(a.fileMtime),sessionId:b?b[2]:void 0,cli:"gemini"}});return e.sort((a,b)=>b.lastModified.getTime()-a.lastModified.getTime()),{cwd:d[0],sessions:e}}let r=(0,e.runtimeCache)(o,30),s=(0,e.runtimeCache)(a=>q(a),30,{maxSize:50});a.s(["getCachedGeminiProjects",0,r,"getCachedGeminiSessionsByEncodedName",0,s,"getGeminiProjects",0,o,"getGeminiSessionsByEncodedName",0,q,"getGeminiSessionsForCwd",0,p])}];
|
|
2
|
+
|
|
3
|
+
//# sourceMappingURL=lib_gemini-projects_ts_0sl~yqr._.js.map
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
module.exports=[64458,a=>{"use strict";var b=a.i(74533),c=a.i(50227),d=a.i(90798),e=a.i(34900),f=a.i(33432),g=a.i(76668);function h(a){try{let c=(0,b.execFileSync)("opencode",["db","--format","json",a],{encoding:"utf8",timeout:5e3,stdio:["ignore","pipe","pipe"]});if(!c.trim())return[];let d=JSON.parse(c);if(!Array.isArray(d))return null;return d}catch{return null}}function i(){return h("SELECT id, project_id, slug, directory, title, time_created, time_updated FROM session ORDER BY time_updated DESC LIMIT 1000")}function j(){return h("SELECT id, worktree, vcs, name, time_created, time_updated FROM project")}async function k(){let a=i(),b=j();if(null===a&&null===b)return[];let d=new Map;for(let a of b??[])d.set(a.id,a);let e=new Map;for(let b of a??[]){if(!b.project_id)continue;let a=e.get(b.project_id);a||(a={rows:[],latest:0},e.set(b.project_id,a)),a.rows.push(b),b.time_updated>a.latest&&(a.latest=b.time_updated)}let g=new Set,h=[];for(let[a,b]of e){g.add(a);let e=d.get(a),i=e?.worktree??b.rows[0]?.directory??null,j=e?.name?.trim()||(i?(0,c.basename)(i):a),k=i??"",l=new Date(Math.max(b.latest,e?.time_updated??0));h.push({name:j,path:k,isDirectory:!0,lastModified:l,lastModifiedFormatted:(0,f.formatDate)(l),cli:["opencode"]})}for(let a of b??[]){if(g.has(a.id))continue;let b=a.worktree??"",d=a.name?.trim()||(b?(0,c.basename)(b):a.id),e=new Date(a.time_updated);h.push({name:d,path:b,isDirectory:!0,lastModified:e,lastModifiedFormatted:(0,f.formatDate)(e),cli:["opencode"]})}return h.sort((a,b)=>b.lastModified.getTime()-a.lastModified.getTime()),h}async function l(a){let b=i();return b?b.filter(b=>b.directory===a).map(a=>{let b=new Date(a.time_updated);return{name:a.title??a.slug??a.id,path:`opencode://${a.id}`,lastModified:b,lastModifiedFormatted:(0,f.formatDate)(b),sessionId:a.id,cli:"opencode"}}):[]}async function m(a){let b,c;try{b=j(),c=i()}catch(a){return(0,g.logWarn)("Failed to read OpenCode DB:",a),{cwd:null,sessions:[]}}if(!b||!c)return{cwd:null,sessions:[]};let e=b.find(b=>b.worktree&&(0,d.encodeFolderName)(b.worktree)===a);if(!e||!e.worktree)return{cwd:null,sessions:[]};let h=c.filter(a=>a.project_id===e.id);return{cwd:e.worktree,sessions:h.map(a=>{let b=new Date(a.time_updated);return{name:a.title??a.slug??a.id,path:`opencode://${a.id}`,lastModified:b,lastModifiedFormatted:(0,f.formatDate)(b),sessionId:a.id,cli:"opencode"}})}}let n=(0,e.runtimeCache)(k,30),o=(0,e.runtimeCache)(a=>l(a),30,{maxSize:50}),p=(0,e.runtimeCache)(a=>m(a),30,{maxSize:50});a.s(["getCachedOpenCodeProjects",0,n,"getCachedOpenCodeSessionsByEncodedName",0,p,"getCachedOpenCodeSessionsForCwd",0,o,"getOpenCodeProjects",0,k,"getOpenCodeSessionsByEncodedName",0,m,"getOpenCodeSessionsForCwd",0,l])}];
|
|
2
|
+
|
|
3
|
+
//# sourceMappingURL=lib_opencode-projects_ts_0op9gyp._.js.map
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
module.exports=[2727,a=>{"use strict";var b=a.i(12714),c=a.i(60526),d=a.i(50227),e=a.i(90798),f=a.i(34900),g=a.i(26192),h=a.i(33432),i=a.i(76668);let j=/^[\d-]+T[\d-]+Z_([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})\.jsonl$/i;async function k(a){try{return await (0,b.readdir)(a,{withFileTypes:!0})}catch{return null}}async function l(a){try{return(await (0,b.stat)(a)).mtime}catch{return null}}async function m(a){let c;try{c=await (0,b.readFile)(a,"utf-8")}catch{return null}let d=c.indexOf("\n")>=0?c.slice(0,c.indexOf("\n")):c;if(!d)return null;try{let a=JSON.parse(d);if("session"!==a.type||"string"!=typeof a.cwd||0===a.cwd.length)return null;return a.cwd}catch{return null}}async function n(){let a=process.env.PI_SESSIONS_DIR||(0,d.join)((0,c.homedir)(),".pi","agent","sessions"),b=await k(a);if(!b)return[];let e=[];for(let c of b){if(!c.isDirectory())continue;let b=(0,d.join)(a,c.name),f=await k(b);if(f)for(let a of f){if(!a.isFile())continue;let c=j.exec(a.name);c&&e.push({sessionId:c[1],filePath:(0,d.join)(b,a.name)})}}return 0===e.length?[]:(await (0,g.batchAll)(e.map(a=>async()=>{let b=await m(a.filePath);if(!b)return null;let c=await l(a.filePath);return c?{filePath:a.filePath,sessionId:a.sessionId,cwd:b,fileMtime:c}:null}),16)).filter(a=>"fulfilled"===a.status).map(a=>a.value).filter(a=>null!==a)}let o=(0,f.runtimeCache)(n,30);async function p(){let a;try{a=await o()}catch(a){return(0,i.logWarn)("Failed to scan Pi sessions:",a),[]}let b=new Map;for(let c of a){let a=b.get(c.cwd);(!a||c.fileMtime.getTime()>a.latest.getTime())&&b.set(c.cwd,{latest:c.fileMtime,cwd:c.cwd})}let c=[];for(let{cwd:a,latest:d}of b.values())c.push({name:(0,e.encodeFolderName)(a),path:a,isDirectory:!0,lastModified:d,lastModifiedFormatted:(0,h.formatDate)(d),cli:["pi"]});return c.sort((a,b)=>b.lastModified.getTime()-a.lastModified.getTime()),c}function q(a){let b=a.map(a=>({name:a.sessionId,path:a.filePath,lastModified:a.fileMtime,lastModifiedFormatted:(0,h.formatDate)(a.fileMtime),sessionId:a.sessionId,cli:"pi"}));return b.sort((a,b)=>b.lastModified.getTime()-a.lastModified.getTime()),b}async function r(a){let b;try{b=await o()}catch(a){return(0,i.logWarn)("Failed to scan Pi sessions:",a),[]}return q(b.filter(b=>b.cwd===a))}async function s(a){let b;try{b=await o()}catch(a){return(0,i.logWarn)("Failed to scan Pi sessions:",a),{cwd:null,sessions:[]}}let c=b.filter(b=>(0,e.encodeFolderName)(b.cwd)===a),d=Array.from(new Set(c.map(a=>a.cwd)));return 1!==d.length?{cwd:null,sessions:[]}:{cwd:d[0],sessions:q(c)}}let t=(0,f.runtimeCache)(p,30),u=(0,f.runtimeCache)(a=>r(a),30,{maxSize:50}),v=(0,f.runtimeCache)(a=>s(a),30,{maxSize:50});a.s(["getCachedPiProjects",0,t,"getCachedPiSessionsByEncodedName",0,v,"getCachedPiSessionsForCwd",0,u,"getPiProjects",0,p,"getPiSessionsByEncodedName",0,s,"getPiSessionsForCwd",0,r])}];
|
|
2
|
+
|
|
3
|
+
//# sourceMappingURL=lib_pi-projects_ts_103tsh1._.js.map
|