failproofai 1.0.11-beta.2 → 1.0.11-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.next/standalone/.next/BUILD_ID +1 -1
- package/.next/standalone/.next/build-manifest.json +13 -13
- 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/build-manifest.json +2 -2
- package/.next/standalone/.next/server/app/_global-error/page/server-reference-manifest.json +1 -1
- package/.next/standalone/.next/server/app/_global-error/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/_global-error.html +1 -1
- package/.next/standalone/.next/server/app/_global-error.rsc +2 -2
- 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 +2 -2
- package/.next/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_not-found/page/build-manifest.json +2 -2
- package/.next/standalone/.next/server/app/_not-found/page/server-reference-manifest.json +1 -1
- package/.next/standalone/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/_not-found.html +1 -1
- package/.next/standalone/.next/server/app/_not-found.rsc +3 -3
- package/.next/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +3 -3
- 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/_tree.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/api/audit/invite/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/audit/run/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/audit/status/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/auth/login-request/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/auth/login-verify/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/auth/logout/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/auth/status/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/download/[project]/[session]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/audit/page/build-manifest.json +2 -2
- package/.next/standalone/.next/server/app/audit/page/server-reference-manifest.json +2 -2
- package/.next/standalone/.next/server/app/audit/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/audit/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/index.html +1 -1
- package/.next/standalone/.next/server/app/index.rsc +3 -3
- package/.next/standalone/.next/server/app/index.segments/__PAGE__.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/index.segments/_full.segment.rsc +3 -3
- package/.next/standalone/.next/server/app/index.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/page/build-manifest.json +2 -2
- package/.next/standalone/.next/server/app/page/server-reference-manifest.json +1 -1
- package/.next/standalone/.next/server/app/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/policies/page/build-manifest.json +2 -2
- package/.next/standalone/.next/server/app/policies/page/server-reference-manifest.json +14 -14
- package/.next/standalone/.next/server/app/policies/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/policies/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/project/[name]/page/build-manifest.json +2 -2
- package/.next/standalone/.next/server/app/project/[name]/page/server-reference-manifest.json +1 -1
- package/.next/standalone/.next/server/app/project/[name]/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/project/[name]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/project/[name]/session/[sessionId]/page/build-manifest.json +2 -2
- package/.next/standalone/.next/server/app/project/[name]/session/[sessionId]/page/react-loadable-manifest.json +2 -2
- package/.next/standalone/.next/server/app/project/[name]/session/[sessionId]/page/server-reference-manifest.json +2 -2
- package/.next/standalone/.next/server/app/project/[name]/session/[sessionId]/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/project/[name]/session/[sessionId]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/projects/page/build-manifest.json +2 -2
- package/.next/standalone/.next/server/app/projects/page/server-reference-manifest.json +1 -1
- package/.next/standalone/.next/server/app/projects/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/projects/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/settings/page/build-manifest.json +2 -2
- package/.next/standalone/.next/server/app/settings/page/server-reference-manifest.json +8 -8
- package/.next/standalone/.next/server/app/settings/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/settings/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0car70pylmvor._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0jz5xqu-p_lfc._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__1ey11fel2q2qw._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__1qt5u58xrcuk6._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__1ztigqa01tigq._.js +1 -1
- package/.next/standalone/.next/server/chunks/_0tovk6q0miud6._.js +1 -1
- package/.next/standalone/.next/server/chunks/_0trp3ycqv17cl._.js +1 -1
- package/.next/standalone/.next/server/chunks/lib_11qmqmccehybz._.js +1 -1
- package/.next/standalone/.next/server/chunks/lib_1sezqnatvr8j-._.js +1 -1
- package/.next/standalone/.next/server/chunks/lib_antigravity-projects_ts_0hdx6fkrln72c._.js +1 -1
- package/.next/standalone/.next/server/chunks/lib_codex-projects_ts_0di6zenec7h7n._.js +1 -1
- package/.next/standalone/.next/server/chunks/lib_copilot-projects_ts_00-tojoja20ke._.js +1 -1
- package/.next/standalone/.next/server/chunks/lib_cursor-projects_ts_1carno5mv3ix_._.js +1 -1
- package/.next/standalone/.next/server/chunks/lib_factory-projects_ts_1eo_bk-vm4wdz._.js +1 -1
- package/.next/standalone/.next/server/chunks/lib_hermes-projects_ts_0h9ny-woruqft._.js +1 -1
- package/.next/standalone/.next/server/chunks/lib_log-entries_ts_0e1mnh5npsol1._.js +1 -1
- package/.next/standalone/.next/server/chunks/lib_openclaw-projects_ts_0gc-p24z7gzy8._.js +1 -1
- package/.next/standalone/.next/server/chunks/lib_opencode-projects_ts_1r-bu98cz4660._.js +1 -1
- package/.next/standalone/.next/server/chunks/lib_pi-projects_ts_1_cy5lfxd21kv._.js +1 -1
- package/.next/standalone/.next/server/chunks/lib_projects_ts_01v279z8xccq4._.js +1 -1
- package/.next/standalone/.next/server/chunks/package_json_[json]_cjs_1nxcc4vkpxxu7._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__08ch3staq3ejw._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__08t6vt57mg_42._.js → [root-of-the-server]__0b28bm2e-y0rp._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0bigvy9xmv2ka._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0h86bl2qf0k_o._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0pia5h3p8re4c._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1-ey9fgesfbc0._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__15usvs-ms-0hf._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__16gb3_92zvk5x._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1avi2kypusyb_._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1r7drlqli-ado._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_0eoura3_9gjb-._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_0pedwblqdoh58._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{_00qm74p9x8cwt._.js → _16u8ppjzw0upc._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/_1djqs9i27e4kg._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_next-internal_server_app_policies_page_actions_1sp2-yo5_vm5f.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/app_actions_get-scheduled-audit_ts_0ei9snixb5fd-._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/app_audit__components_audit-dashboard_tsx_0p9ud47q0xq5w._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/app_global-error_tsx_1kp6l3x33jqb6._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/app_policies_hooks-client_tsx_19dqvpcz0uxur._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/app_settings_02tf1h47jmhhd._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{node_modules_html-to-image_es_index_15q9vt1a-slcq.js → node_modules_html-to-image_es_index_0_zbgw5i5c7_a.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/node_modules_next_dist_0janj0i6dqko7._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/package_json_[json]_cjs_013tntikdft59._.js +1 -1
- package/.next/standalone/.next/server/middleware-build-manifest.js +13 -13
- package/.next/standalone/.next/server/pages/404.html +1 -1
- package/.next/standalone/.next/server/pages/500.html +1 -1
- package/.next/standalone/.next/server/preview-props.json +3 -3
- package/.next/standalone/.next/server/server-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/server-reference-manifest.json +23 -23
- package/.next/standalone/.next/static/chunks/{0qeojb9uu_8_e.js → 01c3z7b9td1j-.js} +1 -1
- package/.next/standalone/.next/static/chunks/{2l7j1dpmejuqn.js → 08-yz-9n_9j-u.js} +1 -1
- package/.next/standalone/.next/static/chunks/{2cn0x2d6tyiuq.js → 0frxv4_m-m2u5.js} +1 -1
- package/.next/standalone/.next/static/chunks/0ii1av6gw3_74.js +6 -0
- package/.next/standalone/.next/static/chunks/14prk7fu_3vzm.js +1 -0
- package/.next/standalone/.next/static/chunks/{0zw6_ase89dfk.js → 2_2xem_wwddgy.js} +1 -1
- package/.next/standalone/.next/static/chunks/{1v1mi4-0ziecn.js → 2ly73y3n0ddxn.js} +1 -1
- package/.next/standalone/.next/static/chunks/{0dr6b-sp478i9.js → 2q25h0pqaw62i.js} +1 -1
- package/.next/standalone/.next/static/chunks/{276ifklxc2-x4.js → 2sbmeexp-ixmd.js} +1 -1
- package/.next/standalone/.next/static/chunks/3c5k3z60x6vuh.js +1 -0
- package/.next/standalone/.next/static/chunks/{3xhybr6ywsmdf.js → 3yxhw5uqrh1rq.js} +1 -1
- package/.next/standalone/hermes-plugin/plugin.yaml +1 -1
- package/.next/standalone/package.json +9 -9
- package/.next/standalone/server.js +1 -1
- package/dist/cli.mjs +26 -24
- package/dist/worker.mjs +1 -1
- package/hermes-plugin/plugin.yaml +1 -1
- package/package.json +9 -9
- package/src/hooks/cloud-connection.ts +8 -3
- package/src/hooks/config-status.ts +2 -2
- package/src/hooks/configure-wizard.ts +7 -8
- package/src/hooks/otel-cli.ts +10 -2
- package/src/hooks/otel-writers.ts +3 -1
- package/.next/standalone/.next/static/chunks/08fodmjweitv-.js +0 -6
- package/.next/standalone/.next/static/chunks/281u-2vtn53n5.js +0 -1
- package/.next/standalone/.next/static/chunks/3oin924a_3ohe.js +0 -1
- /package/.next/standalone/.next/static/{RrRjb2981tB2X7pKdNBUm → ZxaJShYHqvP19gYm49Rao}/_buildManifest.js +0 -0
- /package/.next/standalone/.next/static/{RrRjb2981tB2X7pKdNBUm → ZxaJShYHqvP19gYm49Rao}/_clientMiddlewareManifest.js +0 -0
- /package/.next/standalone/.next/static/{RrRjb2981tB2X7pKdNBUm → ZxaJShYHqvP19gYm49Rao}/_ssgManifest.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{"use strict";(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,62743,e=>{var t=e.i(95187);let r=(0,t.createServerReference)("00fc311cb0567b75895db8ea4fe5e21267cea9f9b6",t.callServer,void 0,t.findSourceMapURL,"getTelemetryConfig");e.s(["f",0,r])},53348,e=>{var t=e.i(43476),r=e.i(71645),n=e.i(62743),l=e.i(9969);e.s(["default",0,function({error:e,reset:a}){return(0,r.useEffect)(()=>{(0,n.f)().then(t=>{(0,l.$)(t),(0,l.L)("client_error",{error_message:e.message,error_name:e.name,error_digest:e.digest,boundary:"global"})}).catch(()=>{})},[e]),(0,t.jsx)("html",{children:(0,t.jsx)("body",{children:(0,t.jsx)("main",{style:{minHeight:"100vh",display:"flex",alignItems:"center",justifyContent:"center",background:"#031035",color:"#f8fafc",fontFamily:"system-ui, sans-serif"},children:(0,t.jsxs)("div",{style:{textAlign:"center",padding:"2rem",border:"1px solid rgba(239,68,68,0.4)",borderRadius:"0.5rem",maxWidth:"500px"},children:[(0,t.jsx)("h2",{style:{color:"#ef4444",marginBottom:"0.5rem",fontSize:"1.25rem"},children:"Something went wrong"}),(0,t.jsx)("p",{style:{color:"#94a3b8",marginBottom:"1.5rem"},children:e.message||"An unexpected error occurred."}),(0,t.jsx)("button",{onClick:a,style:{padding:"0.5rem 1.25rem",background:"#3b82f6",color:"white",border:"none",borderRadius:"0.375rem",cursor:"pointer",fontSize:"0.875rem"},children:"Try again"})]})})})})}])},9969,e=>{let t=null;e.s(["L",0,function(e,r){if(!t||!t.enabled)return;let n=JSON.stringify({api_key:t.apiKey,event:e,distinct_id:t.distinctId,properties:{...r,$lib:"failproofai-web",failproofai_version:t.version,product:"failproofai-oss",$current_url:window.location.href,$pathname:window.location.pathname}});fetch(t.host.replace(/\/+$/,"")+"/capture/",{method:"POST",headers:{"Content-Type":"application/json"},body:n,keepalive:!0,signal:AbortSignal.timeout(5e3)}).catch(()=>{})},"$",0,function(e){t=e}],9969)},95187,(e,t,r)=>{Object.defineProperty(r,"__esModule",{value:!0});var n={callServer:function(){return a.callServer},createServerReference:function(){return u.createServerReference},findSourceMapURL:function(){return o.findSourceMapURL}};for(var l in n)Object.defineProperty(r,l,{enumerable:!0,get:n[l]});let a=e.r(32120),o=e.r(92245),u=e.r(35326)},28298,(e,t,r)=>{e.i(47167),Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"useRouterBFCache",{enumerable:!0,get:function(){return l}});let n=e.r(71645);function l(e,t,r){let[l,a]=(0,n.useState)(()=>({tree:e,renderTree:t,stateKey:r,next:null}));if(l.tree===e)return l;let o={tree:e,renderTree:t,stateKey:r,next:null},u=1,i=l,d=o;for(;null!==i&&u<1;){if(i.stateKey===r){d.next=i.next;break}{u++;let e={tree:i.tree,renderTree:i.renderTree,stateKey:i.stateKey,next:null};d.next=e,d=e}i=i.next}return a(o),o}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},15783,(e,t,r)=>{Object.defineProperty(r,"__esModule",{value:!0});var n={createClientParams:function(){return a.createRenderParamsFromClient},createClientSearchParams:function(){return o.createRenderSearchParamsFromClient}};for(var l in n)Object.defineProperty(r,l,{enumerable:!0,get:n[l]});let a=e.r(14193),o=e.r(66996);("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},47257,(e,t,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"ClientPageRoot",{enumerable:!0,get:function(){return d}});let n=e.r(43476),l=e.r(8372),a=e.r(71645),o=e.r(33906),u=e.r(61994),i=e.r(15783);function d({Component:e,serverProvidedParams:t}){let r,s;if(null!==t)r=t.searchParams,s=t.params;else{let e=(0,a.use)(l.LayoutRouterContext);s=null!==e?e.parentParams:{},r=(0,o.urlSearchParamsToParsedUrlQuery)((0,a.use)(u.SearchParamsContext))}let c=(0,i.createClientSearchParams)(r),f=(0,i.createClientParams)(s);return(0,n.jsx)(e,{params:f,searchParams:c})}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},92825,(e,t,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"ClientSegmentRoot",{enumerable:!0,get:function(){return u}});let n=e.r(43476),l=e.r(8372),a=e.r(71645),o=e.r(15783);function u({Component:e,slots:t,serverProvidedParams:r}){let i;if(null!==r)i=r.params;else{let e=(0,a.use)(l.LayoutRouterContext);i=null!==e?e.parentParams:{}}let d=(0,o.createClientParams)(i);return(0,n.jsx)(e,{...t,params:d})}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},68017,(e,t,r)=>{e.i(47167),Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"HTTPAccessFallbackBoundary",{enumerable:!0,get:function(){return s}});let n=e.r(90809),l=e.r(43476),a=n._(e.r(71645)),o=e.r(90373),u=e.r(54394),i=e.r(8372);class d extends a.default.Component{constructor(e){super(e),this.state={triggeredStatus:void 0,previousPathname:e.pathname}}componentDidCatch(){}static getDerivedStateFromError(e){if((0,u.isHTTPAccessFallbackError)(e))return{triggeredStatus:(0,u.getAccessFallbackHTTPStatus)(e)};throw e}static getDerivedStateFromProps(e,t){return e.pathname!==t.previousPathname&&t.triggeredStatus?{triggeredStatus:void 0,previousPathname:e.pathname}:{triggeredStatus:t.triggeredStatus,previousPathname:e.pathname}}render(){let{notFound:e,forbidden:t,unauthorized:r,children:n}=this.props,{triggeredStatus:a}=this.state,o={[u.HTTPAccessErrorStatus.NOT_FOUND]:e,[u.HTTPAccessErrorStatus.FORBIDDEN]:t,[u.HTTPAccessErrorStatus.UNAUTHORIZED]:r};if(a){let i=a===u.HTTPAccessErrorStatus.NOT_FOUND&&e,d=a===u.HTTPAccessErrorStatus.FORBIDDEN&&t,s=a===u.HTTPAccessErrorStatus.UNAUTHORIZED&&r;return i||d||s?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("meta",{name:"robots",content:"noindex"}),!1,o[a]]}):n}return n}}function s({notFound:e,forbidden:t,unauthorized:r,children:n}){let u=(0,o.useUntrackedPathname)(),c=(0,a.useContext)(i.MissingSlotContext);return e||t||r?(0,l.jsx)(d,{pathname:u,notFound:e,forbidden:t,unauthorized:r,missingSlots:c,children:n}):(0,l.jsx)(l.Fragment,{children:n})}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},77694,(e,t,r)=>{Object.defineProperty(r,"__esModule",{value:!0});var n={InstantValidationBoundaryContext:function(){return a.InstantValidationBoundaryContext},PlaceValidationBoundaryBelowThisLevel:function(){return a.PlaceValidationBoundaryBelowThisLevel},RenderValidationBoundaryAtThisLevel:function(){return a.RenderValidationBoundaryAtThisLevel},SlotMarker:function(){return a.SlotMarker}};for(var l in n)Object.defineProperty(r,l,{enumerable:!0,get:n[l]});let a=e.r(22976);("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},22976,(e,t,r)=>{Object.defineProperty(r,"__esModule",{value:!0});var n={InstantValidationBoundaryContext:function(){return a},PlaceValidationBoundaryBelowThisLevel:function(){return o},RenderValidationBoundaryAtThisLevel:function(){return u},SlotMarker:function(){return i}};for(var l in n)Object.defineProperty(r,l,{enumerable:!0,get:n[l]});let a=null,o=null,u=null,i=null;("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},39756,(e,t,r)=>{e.i(47167),Object.defineProperty(r,"__esModule",{value:!0});var n={LoadingBoundaryProvider:function(){return x},default:function(){return T}};for(var l in n)Object.defineProperty(r,l,{enumerable:!0,get:n[l]});let a=e.r(90809),o=e.r(43476),u=a._(e.r(71645)),i=e.r(8372),d=e.r(1244),s=e.r(72383),c=e.r(91915),f=e.r(58442),p=e.r(68017);e.r(77694);let m=e.r(27828),y=e.r(28298);e.r(74180);let b=e.r(61994),h=e.r(33906),g=e.r(24988);function v(e,t,r){let n=e.getClientRects();if(0===n.length)return 0;let l=1/0;for(let e=0;e<n.length;e++){let t=n[e];t.top<l&&(l=t.top)}return l>=r()&&l<=t?1:2}function P(e){let t=u.default.useRef(null);return(0,u.useLayoutEffect)(()=>{let{scrollRef:r,renderTree:n}=e,l=r.forceScroll?r.scrollRef:n.data.scrollRef;if(null===l||!l.current)return;let a=null,o=r.hashFragment;if(o){if(null===(a="top"===o?document.body:document.getElementById(o)??document.getElementsByName(o)[0]??null)){l.current=!1,r.onlyHashChange=!1,r.hashFragment=null;return}}else a=t.current;if(null===a)return;let u=!1;(0,c.disableSmoothScrollDuringRouteTransition)(()=>{let e=document.documentElement,t=null,r=null,n=null,i=()=>{var r;let l,a;return null===n&&(r=t,n=!Number.isFinite(a=Number.parseFloat(l=getComputedStyle(e).scrollPaddingTop))||a<0?0:l.endsWith("px")?a:l.endsWith("%")?a/100*r:0),n};(o||(t=e.clientHeight,0!==(r=v(a,t,i))))&&((u=!0,l.current=!1,o)?a.scrollIntoView():1!==r&&(e.scrollTop=0,2===v(a,t,i)&&a.scrollIntoView()))},{dontForceLayout:!0,onlyHashChange:r.onlyHashChange}),u&&(r.onlyHashChange=!1,r.hashFragment=null)},void 0),(0,o.jsx)(u.Fragment,{ref:t,children:e.children})}function j({children:e,renderTree:t}){let r=(0,u.useContext)(i.GlobalLayoutRouterContext);if(!r)throw Error("invariant global layout router not mounted");return(0,o.jsx)(P,{scrollRef:r.scrollRef,renderTree:t,children:e})}function _({tree:e,segmentPath:t,debugNameContext:r,renderTree:n,params:l,url:a,isActive:s}){let c,f=(0,u.useContext)(i.GlobalLayoutRouterContext);if((0,u.useContext)(b.NavigationPromisesContext),!f)throw Error("invariant global layout router not mounted");let p=null!==n.data.prefetchRsc?n.data.prefetchRsc:n.data.rsc,m=(0,u.useDeferredValue)(n.data.rsc,p);if((0,g.isDeferredRsc)(m)){let e=(0,u.use)(m);null===e&&(0,u.use)(d.unresolvedThenable),c=e}else null===m&&(0,u.use)(d.unresolvedThenable),c=m;let y=c;return(0,o.jsx)(i.LayoutRouterContext.Provider,{value:{parentTree:e,parentRenderTree:n,parentSegmentPath:t,parentParams:l,parentLoadingData:null,debugNameContext:r,url:a,isActive:s},children:y})}function x({loading:e,children:t}){let r=(0,u.use)(i.LayoutRouterContext);return null===r?t:(0,o.jsx)(i.LayoutRouterContext.Provider,{value:{parentTree:r.parentTree,parentRenderTree:r.parentRenderTree,parentSegmentPath:r.parentSegmentPath,parentParams:r.parentParams,parentLoadingData:e,debugNameContext:r.debugNameContext,url:r.url,isActive:r.isActive},children:t})}function O({name:e,loading:t,children:r}){if(null!==t){let n=t[0],l=t[1],a=t[2];return(0,o.jsx)(u.Suspense,{name:e,fallback:(0,o.jsxs)(o.Fragment,{children:[l,a,n]}),children:r})}return(0,o.jsx)(o.Fragment,{children:r})}function T({parallelRouterKey:e,error:t,errorStyles:r,errorScripts:n,templateStyles:l,templateScripts:a,template:c,notFound:b,forbidden:g,unauthorized:v,segmentViewBoundaries:P}){let x=(0,u.useContext)(i.LayoutRouterContext);if(!x)throw Error("invariant expected layout router to be mounted");let{parentTree:C,parentRenderTree:S,parentSegmentPath:R,parentParams:M,parentLoadingData:F,url:B,isActive:A,debugNameContext:L}=x,w=C[0],E=null===R?[e]:R.concat([w,e]),H=C[1][e],k=S.slots?.get(e);(void 0===H||void 0===k)&&(0,u.use)(d.unresolvedThenable);let D=H[0],N=(0,m.createSegmentKey)(D),I=(0,y.useRouterBFCache)(H,k,N),U=[];do{let e=I.tree,u=I.renderTree,d=I.stateKey,m=e[0],y=M;if(Array.isArray(m)){let e=m[0],t=m[1],r=m[2],n=(0,h.getParamValueFromCacheKey)(t,r);null!==n&&(y={...M,[e]:n})}let P=function(e){if("/"===e)return"/";if("string"==typeof e)if("(__SLOT__)"===e)return;else return e+"/";return e[1]+"/"}(m),x=P??L,T=void 0===P?void 0:L,C=(0,o.jsxs)(j,{renderTree:u,children:[(0,o.jsx)(s.ErrorBoundary,{errorComponent:t,errorStyles:r,errorScripts:n,children:(0,o.jsx)(O,{name:T,loading:F,children:(0,o.jsx)(p.HTTPAccessFallbackBoundary,{notFound:b,forbidden:g,unauthorized:v,children:(0,o.jsxs)(f.RedirectBoundary,{children:[(0,o.jsx)(_,{url:B,tree:e,params:y,renderTree:u,segmentPath:E,debugNameContext:x,isActive:A&&d===N}),null]})})})}),null]}),S=(0,o.jsxs)(i.TemplateContext.Provider,{value:C,children:[l,a,c]},d);U.push(S),I=I.next}while(null!==I)return U}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},37457,(e,t,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return u}});let n=e.r(90809),l=e.r(43476),a=n._(e.r(71645)),o=e.r(8372);function u(){let e=(0,a.useContext)(o.TemplateContext);return(0,l.jsx)(l.Fragment,{children:e})}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},14193,(e,t,r)=>{e.i(47167),Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"createRenderParamsFromClient",{enumerable:!0,get:function(){return n}});let n=e.r(6831).createRenderParamsFromClient;("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},6831,(e,t,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"createRenderParamsFromClient",{enumerable:!0,get:function(){return l}});let n=new WeakMap;function l(e){let t=n.get(e);if(t)return t;let r=Promise.resolve(e);return r.status="fulfilled",r.value=e,n.set(e,r),r}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},66996,(e,t,r)=>{e.i(47167),Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"createRenderSearchParamsFromClient",{enumerable:!0,get:function(){return n}});let n=e.r(93504).createRenderSearchParamsFromClient;("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},93504,(e,t,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"createRenderSearchParamsFromClient",{enumerable:!0,get:function(){return l}});let n=new WeakMap;function l(e){let t=n.get(e);if(t)return t;let r=Promise.resolve(e);return r.status="fulfilled",r.value=e,n.set(e,r),r}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},27201,(e,t,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"IconMark",{enumerable:!0,get:function(){return l}});let n=e.r(43476),l=()=>"u">typeof window?null:(0,n.jsx)("meta",{name:"«nxt-icon»"})},91915,(e,t,r)=>{function n(e,t={}){if(t.onlyHashChange)return void e();let r=document.documentElement;if("smooth"!==r.dataset.scrollBehavior)return void e();let l=r.style.scrollBehavior;r.style.scrollBehavior="auto",t.dontForceLayout||r.getClientRects(),e(),r.style.scrollBehavior=l}e.i(47167),Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"disableSmoothScrollDuringRouteTransition",{enumerable:!0,get:function(){return n}})}])})();
|
|
1
|
+
(()=>{"use strict";(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,68299,e=>{var t=e.i(95187);let r=(0,t.createServerReference)("00054a6f1d1f20361dca7d07e2fe55c190e3d91e4e",t.callServer,void 0,t.findSourceMapURL,"getTelemetryConfig");e.s(["f",0,r])},53348,e=>{var t=e.i(43476),r=e.i(71645),n=e.i(68299),l=e.i(9969);e.s(["default",0,function({error:e,reset:a}){return(0,r.useEffect)(()=>{(0,n.f)().then(t=>{(0,l.$)(t),(0,l.L)("client_error",{error_message:e.message,error_name:e.name,error_digest:e.digest,boundary:"global"})}).catch(()=>{})},[e]),(0,t.jsx)("html",{children:(0,t.jsx)("body",{children:(0,t.jsx)("main",{style:{minHeight:"100vh",display:"flex",alignItems:"center",justifyContent:"center",background:"#031035",color:"#f8fafc",fontFamily:"system-ui, sans-serif"},children:(0,t.jsxs)("div",{style:{textAlign:"center",padding:"2rem",border:"1px solid rgba(239,68,68,0.4)",borderRadius:"0.5rem",maxWidth:"500px"},children:[(0,t.jsx)("h2",{style:{color:"#ef4444",marginBottom:"0.5rem",fontSize:"1.25rem"},children:"Something went wrong"}),(0,t.jsx)("p",{style:{color:"#94a3b8",marginBottom:"1.5rem"},children:e.message||"An unexpected error occurred."}),(0,t.jsx)("button",{onClick:a,style:{padding:"0.5rem 1.25rem",background:"#3b82f6",color:"white",border:"none",borderRadius:"0.375rem",cursor:"pointer",fontSize:"0.875rem"},children:"Try again"})]})})})})}])},9969,e=>{let t=null;e.s(["L",0,function(e,r){if(!t||!t.enabled)return;let n=JSON.stringify({api_key:t.apiKey,event:e,distinct_id:t.distinctId,properties:{...r,$lib:"failproofai-web",failproofai_version:t.version,product:"failproofai-oss",$current_url:window.location.href,$pathname:window.location.pathname}});fetch(t.host.replace(/\/+$/,"")+"/capture/",{method:"POST",headers:{"Content-Type":"application/json"},body:n,keepalive:!0,signal:AbortSignal.timeout(5e3)}).catch(()=>{})},"$",0,function(e){t=e}],9969)},95187,(e,t,r)=>{Object.defineProperty(r,"__esModule",{value:!0});var n={callServer:function(){return a.callServer},createServerReference:function(){return u.createServerReference},findSourceMapURL:function(){return o.findSourceMapURL}};for(var l in n)Object.defineProperty(r,l,{enumerable:!0,get:n[l]});let a=e.r(32120),o=e.r(92245),u=e.r(35326)},28298,(e,t,r)=>{e.i(47167),Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"useRouterBFCache",{enumerable:!0,get:function(){return l}});let n=e.r(71645);function l(e,t,r){let[l,a]=(0,n.useState)(()=>({tree:e,renderTree:t,stateKey:r,next:null}));if(l.tree===e)return l;let o={tree:e,renderTree:t,stateKey:r,next:null},u=1,i=l,d=o;for(;null!==i&&u<1;){if(i.stateKey===r){d.next=i.next;break}{u++;let e={tree:i.tree,renderTree:i.renderTree,stateKey:i.stateKey,next:null};d.next=e,d=e}i=i.next}return a(o),o}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},15783,(e,t,r)=>{Object.defineProperty(r,"__esModule",{value:!0});var n={createClientParams:function(){return a.createRenderParamsFromClient},createClientSearchParams:function(){return o.createRenderSearchParamsFromClient}};for(var l in n)Object.defineProperty(r,l,{enumerable:!0,get:n[l]});let a=e.r(14193),o=e.r(66996);("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},47257,(e,t,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"ClientPageRoot",{enumerable:!0,get:function(){return d}});let n=e.r(43476),l=e.r(8372),a=e.r(71645),o=e.r(33906),u=e.r(61994),i=e.r(15783);function d({Component:e,serverProvidedParams:t}){let r,s;if(null!==t)r=t.searchParams,s=t.params;else{let e=(0,a.use)(l.LayoutRouterContext);s=null!==e?e.parentParams:{},r=(0,o.urlSearchParamsToParsedUrlQuery)((0,a.use)(u.SearchParamsContext))}let c=(0,i.createClientSearchParams)(r),f=(0,i.createClientParams)(s);return(0,n.jsx)(e,{params:f,searchParams:c})}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},92825,(e,t,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"ClientSegmentRoot",{enumerable:!0,get:function(){return u}});let n=e.r(43476),l=e.r(8372),a=e.r(71645),o=e.r(15783);function u({Component:e,slots:t,serverProvidedParams:r}){let i;if(null!==r)i=r.params;else{let e=(0,a.use)(l.LayoutRouterContext);i=null!==e?e.parentParams:{}}let d=(0,o.createClientParams)(i);return(0,n.jsx)(e,{...t,params:d})}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},68017,(e,t,r)=>{e.i(47167),Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"HTTPAccessFallbackBoundary",{enumerable:!0,get:function(){return s}});let n=e.r(90809),l=e.r(43476),a=n._(e.r(71645)),o=e.r(90373),u=e.r(54394),i=e.r(8372);class d extends a.default.Component{constructor(e){super(e),this.state={triggeredStatus:void 0,previousPathname:e.pathname}}componentDidCatch(){}static getDerivedStateFromError(e){if((0,u.isHTTPAccessFallbackError)(e))return{triggeredStatus:(0,u.getAccessFallbackHTTPStatus)(e)};throw e}static getDerivedStateFromProps(e,t){return e.pathname!==t.previousPathname&&t.triggeredStatus?{triggeredStatus:void 0,previousPathname:e.pathname}:{triggeredStatus:t.triggeredStatus,previousPathname:e.pathname}}render(){let{notFound:e,forbidden:t,unauthorized:r,children:n}=this.props,{triggeredStatus:a}=this.state,o={[u.HTTPAccessErrorStatus.NOT_FOUND]:e,[u.HTTPAccessErrorStatus.FORBIDDEN]:t,[u.HTTPAccessErrorStatus.UNAUTHORIZED]:r};if(a){let i=a===u.HTTPAccessErrorStatus.NOT_FOUND&&e,d=a===u.HTTPAccessErrorStatus.FORBIDDEN&&t,s=a===u.HTTPAccessErrorStatus.UNAUTHORIZED&&r;return i||d||s?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("meta",{name:"robots",content:"noindex"}),!1,o[a]]}):n}return n}}function s({notFound:e,forbidden:t,unauthorized:r,children:n}){let u=(0,o.useUntrackedPathname)(),c=(0,a.useContext)(i.MissingSlotContext);return e||t||r?(0,l.jsx)(d,{pathname:u,notFound:e,forbidden:t,unauthorized:r,missingSlots:c,children:n}):(0,l.jsx)(l.Fragment,{children:n})}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},77694,(e,t,r)=>{Object.defineProperty(r,"__esModule",{value:!0});var n={InstantValidationBoundaryContext:function(){return a.InstantValidationBoundaryContext},PlaceValidationBoundaryBelowThisLevel:function(){return a.PlaceValidationBoundaryBelowThisLevel},RenderValidationBoundaryAtThisLevel:function(){return a.RenderValidationBoundaryAtThisLevel},SlotMarker:function(){return a.SlotMarker}};for(var l in n)Object.defineProperty(r,l,{enumerable:!0,get:n[l]});let a=e.r(22976);("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},22976,(e,t,r)=>{Object.defineProperty(r,"__esModule",{value:!0});var n={InstantValidationBoundaryContext:function(){return a},PlaceValidationBoundaryBelowThisLevel:function(){return o},RenderValidationBoundaryAtThisLevel:function(){return u},SlotMarker:function(){return i}};for(var l in n)Object.defineProperty(r,l,{enumerable:!0,get:n[l]});let a=null,o=null,u=null,i=null;("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},39756,(e,t,r)=>{e.i(47167),Object.defineProperty(r,"__esModule",{value:!0});var n={LoadingBoundaryProvider:function(){return x},default:function(){return T}};for(var l in n)Object.defineProperty(r,l,{enumerable:!0,get:n[l]});let a=e.r(90809),o=e.r(43476),u=a._(e.r(71645)),i=e.r(8372),d=e.r(1244),s=e.r(72383),c=e.r(91915),f=e.r(58442),p=e.r(68017);e.r(77694);let m=e.r(27828),y=e.r(28298);e.r(74180);let b=e.r(61994),h=e.r(33906),g=e.r(24988);function v(e,t,r){let n=e.getClientRects();if(0===n.length)return 0;let l=1/0;for(let e=0;e<n.length;e++){let t=n[e];t.top<l&&(l=t.top)}return l>=r()&&l<=t?1:2}function P(e){let t=u.default.useRef(null);return(0,u.useLayoutEffect)(()=>{let{scrollRef:r,renderTree:n}=e,l=r.forceScroll?r.scrollRef:n.data.scrollRef;if(null===l||!l.current)return;let a=null,o=r.hashFragment;if(o){if(null===(a="top"===o?document.body:document.getElementById(o)??document.getElementsByName(o)[0]??null)){l.current=!1,r.onlyHashChange=!1,r.hashFragment=null;return}}else a=t.current;if(null===a)return;let u=!1;(0,c.disableSmoothScrollDuringRouteTransition)(()=>{let e=document.documentElement,t=null,r=null,n=null,i=()=>{var r;let l,a;return null===n&&(r=t,n=!Number.isFinite(a=Number.parseFloat(l=getComputedStyle(e).scrollPaddingTop))||a<0?0:l.endsWith("px")?a:l.endsWith("%")?a/100*r:0),n};(o||(t=e.clientHeight,0!==(r=v(a,t,i))))&&((u=!0,l.current=!1,o)?a.scrollIntoView():1!==r&&(e.scrollTop=0,2===v(a,t,i)&&a.scrollIntoView()))},{dontForceLayout:!0,onlyHashChange:r.onlyHashChange}),u&&(r.onlyHashChange=!1,r.hashFragment=null)},void 0),(0,o.jsx)(u.Fragment,{ref:t,children:e.children})}function j({children:e,renderTree:t}){let r=(0,u.useContext)(i.GlobalLayoutRouterContext);if(!r)throw Error("invariant global layout router not mounted");return(0,o.jsx)(P,{scrollRef:r.scrollRef,renderTree:t,children:e})}function _({tree:e,segmentPath:t,debugNameContext:r,renderTree:n,params:l,url:a,isActive:s}){let c,f=(0,u.useContext)(i.GlobalLayoutRouterContext);if((0,u.useContext)(b.NavigationPromisesContext),!f)throw Error("invariant global layout router not mounted");let p=null!==n.data.prefetchRsc?n.data.prefetchRsc:n.data.rsc,m=(0,u.useDeferredValue)(n.data.rsc,p);if((0,g.isDeferredRsc)(m)){let e=(0,u.use)(m);null===e&&(0,u.use)(d.unresolvedThenable),c=e}else null===m&&(0,u.use)(d.unresolvedThenable),c=m;let y=c;return(0,o.jsx)(i.LayoutRouterContext.Provider,{value:{parentTree:e,parentRenderTree:n,parentSegmentPath:t,parentParams:l,parentLoadingData:null,debugNameContext:r,url:a,isActive:s},children:y})}function x({loading:e,children:t}){let r=(0,u.use)(i.LayoutRouterContext);return null===r?t:(0,o.jsx)(i.LayoutRouterContext.Provider,{value:{parentTree:r.parentTree,parentRenderTree:r.parentRenderTree,parentSegmentPath:r.parentSegmentPath,parentParams:r.parentParams,parentLoadingData:e,debugNameContext:r.debugNameContext,url:r.url,isActive:r.isActive},children:t})}function O({name:e,loading:t,children:r}){if(null!==t){let n=t[0],l=t[1],a=t[2];return(0,o.jsx)(u.Suspense,{name:e,fallback:(0,o.jsxs)(o.Fragment,{children:[l,a,n]}),children:r})}return(0,o.jsx)(o.Fragment,{children:r})}function T({parallelRouterKey:e,error:t,errorStyles:r,errorScripts:n,templateStyles:l,templateScripts:a,template:c,notFound:b,forbidden:g,unauthorized:v,segmentViewBoundaries:P}){let x=(0,u.useContext)(i.LayoutRouterContext);if(!x)throw Error("invariant expected layout router to be mounted");let{parentTree:C,parentRenderTree:S,parentSegmentPath:R,parentParams:M,parentLoadingData:F,url:B,isActive:A,debugNameContext:L}=x,w=C[0],E=null===R?[e]:R.concat([w,e]),H=C[1][e],k=S.slots?.get(e);(void 0===H||void 0===k)&&(0,u.use)(d.unresolvedThenable);let D=H[0],N=(0,m.createSegmentKey)(D),I=(0,y.useRouterBFCache)(H,k,N),U=[];do{let e=I.tree,u=I.renderTree,d=I.stateKey,m=e[0],y=M;if(Array.isArray(m)){let e=m[0],t=m[1],r=m[2],n=(0,h.getParamValueFromCacheKey)(t,r);null!==n&&(y={...M,[e]:n})}let P=function(e){if("/"===e)return"/";if("string"==typeof e)if("(__SLOT__)"===e)return;else return e+"/";return e[1]+"/"}(m),x=P??L,T=void 0===P?void 0:L,C=(0,o.jsxs)(j,{renderTree:u,children:[(0,o.jsx)(s.ErrorBoundary,{errorComponent:t,errorStyles:r,errorScripts:n,children:(0,o.jsx)(O,{name:T,loading:F,children:(0,o.jsx)(p.HTTPAccessFallbackBoundary,{notFound:b,forbidden:g,unauthorized:v,children:(0,o.jsxs)(f.RedirectBoundary,{children:[(0,o.jsx)(_,{url:B,tree:e,params:y,renderTree:u,segmentPath:E,debugNameContext:x,isActive:A&&d===N}),null]})})})}),null]}),S=(0,o.jsxs)(i.TemplateContext.Provider,{value:C,children:[l,a,c]},d);U.push(S),I=I.next}while(null!==I)return U}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},37457,(e,t,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return u}});let n=e.r(90809),l=e.r(43476),a=n._(e.r(71645)),o=e.r(8372);function u(){let e=(0,a.useContext)(o.TemplateContext);return(0,l.jsx)(l.Fragment,{children:e})}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},14193,(e,t,r)=>{e.i(47167),Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"createRenderParamsFromClient",{enumerable:!0,get:function(){return n}});let n=e.r(6831).createRenderParamsFromClient;("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},6831,(e,t,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"createRenderParamsFromClient",{enumerable:!0,get:function(){return l}});let n=new WeakMap;function l(e){let t=n.get(e);if(t)return t;let r=Promise.resolve(e);return r.status="fulfilled",r.value=e,n.set(e,r),r}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},66996,(e,t,r)=>{e.i(47167),Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"createRenderSearchParamsFromClient",{enumerable:!0,get:function(){return n}});let n=e.r(93504).createRenderSearchParamsFromClient;("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},93504,(e,t,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"createRenderSearchParamsFromClient",{enumerable:!0,get:function(){return l}});let n=new WeakMap;function l(e){let t=n.get(e);if(t)return t;let r=Promise.resolve(e);return r.status="fulfilled",r.value=e,n.set(e,r),r}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},27201,(e,t,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"IconMark",{enumerable:!0,get:function(){return l}});let n=e.r(43476),l=()=>"u">typeof window?null:(0,n.jsx)("meta",{name:"«nxt-icon»"})},91915,(e,t,r)=>{function n(e,t={}){if(t.onlyHashChange)return void e();let r=document.documentElement;if("smooth"!==r.dataset.scrollBehavior)return void e();let l=r.style.scrollBehavior;r.style.scrollBehavior="auto",t.dontForceLayout||r.getClientRects(),e(),r.style.scrollBehavior=l}e.i(47167),Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"disableSmoothScrollDuringRouteTransition",{enumerable:!0,get:function(){return n}})}])})();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(()=>{"use strict";(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,35890,e=>{var t=e.i(95187);let a=(0,t.createServerReference)("605fa132a51d6c838e89d90eaea0d1014689c130e4",t.callServer,void 0,t.findSourceMapURL,"searchHookActivityAction");e.s(["f",0,a])},73520,e=>{var t=e.i(43476),a=e.i(24071),r=e.i(67927);e.s(["f",0,function({currentPage:e,totalPages:l,onPageChange:o}){if(l<=1)return null;let n=e=>`px-3 py-2 text-sm rounded-md transition-colors flex items-center gap-1 bg-muted text-muted-foreground ${e?"opacity-50 cursor-not-allowed":"hover:bg-muted/80"}`;return(0,t.jsxs)("div",{className:"flex items-center justify-center gap-2 py-4",children:[(0,t.jsxs)("button",{onClick:()=>o(e-1),disabled:1===e,className:n(1===e),"aria-label":"Previous page",children:[(0,t.jsx)(a.f,{className:"w-4 h-4"}),(0,t.jsx)("span",{className:"hidden sm:inline",children:"Previous"})]}),(0,t.jsx)("div",{className:"flex items-center gap-1",children:(()=>{if(l<=7)return Array.from({length:l},(e,t)=>t+1);let t=[1],a=Math.max(2,e-1),r=Math.min(l-1,e+1);e<=3&&(r=Math.min(5,l-1)),e>=l-2&&(a=Math.max(2,l-4)),a>2&&t.push("ellipsis-start");for(let e=a;e<=r;e++)t.push(e);return r<l-1&&t.push("ellipsis-end"),t.push(l),t})().map(a=>"string"==typeof a?(0,t.jsx)("span",{className:"px-2 text-muted-foreground",children:"..."},a):(0,t.jsx)("button",{onClick:()=>o(a),className:`min-w-[2.5rem] px-3 py-2 text-sm rounded-md transition-colors ${e===a?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground hover:bg-muted/80"}`,"aria-label":`Page ${a}`,"aria-current":e===a?"page":void 0,children:a},a))}),(0,t.jsxs)("button",{onClick:()=>o(e+1),disabled:e===l,className:n(e===l),"aria-label":"Next page",children:[(0,t.jsx)("span",{className:"hidden sm:inline",children:"Next"}),(0,t.jsx)(r.f,{className:"w-4 h-4"})]})]})}])},24578,e=>{let t={claude:{id:"claude",label:"Claude Code",badgeClasses:"bg-orange-500/10 text-orange-400 border-orange-500/20"},codex:{id:"codex",label:"OpenAI Codex",badgeClasses:"bg-purple-500/10 text-purple-400 border-purple-500/20"},copilot:{id:"copilot",label:"GitHub Copilot",badgeClasses:"bg-blue-500/10 text-blue-400 border-blue-500/20"},cursor:{id:"cursor",label:"Cursor Agent",badgeClasses:"bg-emerald-500/10 text-emerald-400 border-emerald-500/20"},opencode:{id:"opencode",label:"OpenCode",badgeClasses:"bg-amber-500/10 text-amber-400 border-amber-500/20"},pi:{id:"pi",label:"Pi",badgeClasses:"bg-pink-500/10 text-pink-400 border-pink-500/20"},hermes:{id:"hermes",label:"Hermes",badgeClasses:"bg-indigo-500/10 text-indigo-400 border-indigo-500/20"},openclaw:{id:"openclaw",label:"OpenClaw",badgeClasses:"bg-teal-500/10 text-teal-400 border-teal-500/20"},factory:{id:"factory",label:"Factory Droid",badgeClasses:"bg-rose-500/10 text-rose-400 border-rose-500/20"},devin:{id:"devin",label:"Devin CLI",badgeClasses:"bg-violet-500/10 text-violet-400 border-violet-500/20"},antigravity:{id:"antigravity",label:"Antigravity CLI",badgeClasses:"bg-cyan-500/10 text-cyan-400 border-cyan-500/20"},goose:{id:"goose",label:"Goose",badgeClasses:"bg-lime-500/10 text-lime-400 border-lime-500/20"}};e.s(["z",0,["claude","codex","copilot","cursor","opencode","pi","hermes","openclaw","factory","devin","antigravity","goose"],"G",0,function(e){return t[e]?.badgeClasses??t.claude.badgeClasses},"A",0,function(e){return t[e]?.label??e},"U",0,function(e){return"string"==typeof e&&Object.prototype.hasOwnProperty.call(t,e)}])},34713,e=>{e.s(["M",0,function(e){if(e<1e3)return`${e}ms`;let t=Math.round(e/100);if(t<600)return`${(t/10).toFixed(1)}s`;let a=Math.round(e/1e3);if(a<3600){let e=Math.floor(a/60);return`${e}m ${a%60}s`}let r=Math.round(e/6e4),l=Math.floor(r/60);return`${l}h ${r%60}m`},"g",0,function(e){let t=Date.now()-e;return t<6e4?`${Math.max(1,Math.floor(t/1e3))}s ago`:t<36e5?`${Math.floor(t/6e4)}m ago`:t<864e5?`${Math.floor(t/36e5)}h ago`:`${Math.floor(t/864e5)}d ago`}])},80060,2711,e=>{var t=e.i(18566),a=e.i(71645);function r(e){let t=e.getFullYear(),a=String(e.getMonth()+1).padStart(2,"0"),r=String(e.getDate()).padStart(2,"0");return`${t}-${a}-${r}`}function l(e){var t;if(!e||(t=e,!/^\d{4}-\d{2}-\d{2}$/.test(t)||isNaN(Date.parse(t))))return null;let[a,r,l]=e.split("-").map(Number);return new Date(a,r-1,l,12,0,0)}e.s(["f",0,function(){let e=(0,t.useSearchParams)(),r=(0,t.useRouter)(),l=(0,t.usePathname)(),o=(0,a.useRef)(null),n=(0,a.useCallback)(t=>e.get(t),[e]),s=(0,a.useCallback)(()=>new URLSearchParams(e.toString()),[e]),i=(0,a.useCallback)(t=>{o.current&&clearTimeout(o.current),o.current=setTimeout(()=>{let a=new URLSearchParams(e.toString());for(let[e,r]of Object.entries(t))void 0===r||""===r?a.delete(e):a.set(e,r);let o=a.toString(),n=o?`${l}?${o}`:l;r.replace(n,{scroll:!1})},150)},[e,l,r]);return(0,a.useEffect)(()=>()=>{o.current&&clearTimeout(o.current)},[]),{get:n,getAll:s,setAll:i}}],80060),e.s(["V",0,function(e){let t={};return e.from&&(t.from=r(e.from)),e.to&&(t.to=r(e.to)),t},"l",0,function(e){if(0!==e.length)return e.map(e=>encodeURIComponent(e)).join(",")},"t",0,function(e){return e<=1?void 0:String(e)},"w",0,function(e){return e?e.split(",").map(e=>decodeURIComponent(e.trim())).filter(e=>e.length>0):[]},"m",0,function(e){if(!e)return 1;let t=parseInt(e,10);return Number.isFinite(t)&&t>=1?t:1},"S",0,function(e){return e&&["all","last-hour","today","last-7-days","last-30-days","custom"].includes(e)?e:"all"},"R",0,function(e,t){return{from:l(e),to:l(t)}},"$",0,function(e){return"all"===e?void 0:e}],2711)},89664,e=>{var t=e.i(56420);let a={name:"check",size:24,node:[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]};a.node;let r=(0,t.f)(a);e.s(["f",0,r],89664)},24071,e=>{var t=e.i(56420);let a={name:"chevron-left",size:24,node:[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]};a.node;let r=(0,t.f)(a);e.s(["f",0,r],24071)},67927,e=>{var t=e.i(56420);let a={name:"chevron-right",size:24,node:[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]};a.node;let r=(0,t.f)(a);e.s(["f",0,r],67927)},8734,e=>{var t=e.i(56420);let a={name:"copy",size:24,node:[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]};a.node;let r=(0,t.f)(a);e.s(["f",0,r],8734)},16306,e=>{var t=e.i(56420);let a={name:"shield-alert",size:24,node:[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]]};a.node;let r=(0,t.f)(a);e.s(["f",0,r],16306)},84026,29407,e=>{var t=e.i(56420);let a={name:"shield-check",size:24,node:[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]};a.node;let r=(0,t.f)(a);e.s(["f",0,r],84026);let l={name:"shield-x",size:24,node:[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m14.5 9.5-5 5",key:"17q4r4"}],["path",{d:"m9.5 9.5 5 5",key:"18nt4w"}]],aliases:["shield-close"]};l.node;let o=(0,t.f)(l);e.s(["f",0,o],29407)},82954,e=>{var t=e.i(56420);let a={name:"shield",size:24,node:[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]]};a.node;let r=(0,t.f)(a);e.s(["f",0,r],82954)},63676,e=>{var t=e.i(56420);let a={name:"x",size:24,node:[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]};a.node;let r=(0,t.f)(a);e.s(["X",0,r],63676)}])})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{"use strict";(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,64237,e=>{var t=e.i(43476),s=e.i(71645),a=e.i(12344),n=e.i(29054);let l=/^[^\s@]+@[^\s@]+\.[^\s@]+$/;function i(e){if((0,n.c)(e))return"request timed out. check your network and try again.";let t=e instanceof Error?e.message:String(e);return`network error: ${t}`}e.s(["f",0,function({open:e,headline:r="where to route the reminder?",subhead:o="we'll send a one-time code to confirm.",onClose:c,onAuthed:d,source:u="unknown"}){let{capture:h}=(0,a.usePostHog)(),[m,f]=(0,s.useState)({kind:"email",error:null}),[v,b]=(0,s.useState)(!1),p=(0,s.useRef)(!1),x=(0,s.useRef)(null),j=(0,s.useRef)(null);(0,s.useEffect)(()=>{e&&(f({kind:"email",error:null}),b(!1),p.current=!1,h("audit_auth_dialog_opened",{source:u}))},[h,e,u]);let w=(0,s.useRef)(!1);(0,s.useEffect)(()=>{if(e){w.current=!0;return}w.current&&!p.current&&h("audit_auth_dialog_dismissed",{source:u,step:m.kind}),w.current=!1},[h,e,u,m.kind]),(0,s.useEffect)(()=>{if(!e)return;let t=setTimeout(()=>{"email"===m.kind?x.current?.focus():"code"===m.kind&&j.current?.focus()},50);return()=>clearTimeout(t)},[e,m.kind]),(0,s.useEffect)(()=>{if(!e)return;let t=e=>{"Escape"!==e.key||v||c()};return window.addEventListener("keydown",t),()=>window.removeEventListener("keydown",t)},[e,v,c]);let g="code"===m.kind&&m.resendIn>0;(0,s.useEffect)(()=>{if(!g)return;let e=setInterval(()=>{f(e=>"code"===e.kind?{...e,resendIn:Math.max(0,e.resendIn-1)}:e)},1e3);return()=>clearInterval(e)},[g]);let y=(0,s.useCallback)(async(e,t={})=>{let{isResend:s=!1}=t,a=e=>{s?f(t=>"code"===t.kind?{...t,error:e}:t):f({kind:"email",error:e})};b(!0);try{let t=await (0,n.q)("/api/auth/login-request",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({email:e})}),s=await t.json().catch(()=>({}));if(!t.ok){let e=s.message??"could not send code.";"rate_limited"===s.code&&void 0!==s.retry_after_secs?e=`too many tries. wait ${s.retry_after_secs}s and try again.`:"upstream_unreachable"===s.code&&(e="api-server unreachable. check your network."),a(e);return}f({kind:"code",email:e,error:null,expiresIn:s.expires_in??600,resendIn:s.resend_available_in??30})}catch(e){a(i(e))}finally{b(!1)}},[]),k=(0,s.useCallback)(async(e,t)=>{b(!0);try{let s=await (0,n.q)("/api/auth/login-verify",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({email:e,code:t})}),a=await s.json().catch(()=>({}));if(!s.ok||!a.authenticated||!a.user){let e=a.message??"invalid code.";"invalid_code"===a.code&&(e="wrong code, or it expired. try again."),f(t=>"code"===t.kind?{...t,error:e}:t);return}p.current=!0,h("audit_auth_dialog_succeeded",{source:u}),f({kind:"done",user:a.user}),d(a.user)}catch(t){let e=i(t);f(t=>"code"===t.kind?{...t,error:e}:t)}finally{b(!1)}},[h,d,u]),N=(0,s.useCallback)(async e=>{if(e.preventDefault(),v||"email"!==m.kind)return;let t=String(new FormData(e.currentTarget).get("email")??"").trim().toLowerCase();l.test(t)?await y(t):f({kind:"email",error:"that doesn't look like an email."})},[v,m,y]),C=(0,s.useCallback)(async e=>{if(e.preventDefault(),v||"code"!==m.kind)return;let t=String(new FormData(e.currentTarget).get("code")??"").trim();t.length<4||t.length>12?f(e=>"code"===e.kind?{...e,error:"code is 4–12 characters."}:e):await k(m.email,t)},[v,m,k]),S=(0,s.useCallback)(async()=>{"code"!==m.kind||m.resendIn>0||v||await y(m.email,{isResend:!0})},[m,v,y]);return e?(0,t.jsx)("div",{className:"auth-dialog-backdrop",role:"dialog","aria-modal":"true","aria-labelledby":"auth-dialog-title",onClick:e=>{v||e.target!==e.currentTarget||c()},children:(0,t.jsxs)("div",{className:"auth-dialog",children:[(0,t.jsx)("button",{type:"button",className:"auth-close",onClick:c,disabled:v,"aria-label":"close",children:"×"}),(0,t.jsx)("h2",{id:"auth-dialog-title",className:"auth-headline",children:r}),"email"===m.kind&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("p",{className:"auth-sub",children:o}),(0,t.jsxs)("form",{onSubmit:N,className:"auth-form",children:[(0,t.jsx)("input",{ref:x,id:"auth-dialog-email",name:"email",type:"email",autoComplete:"email",inputMode:"email",spellCheck:!1,placeholder:"you@yourdomain.com",disabled:v,className:"auth-input",required:!0}),m.error&&(0,t.jsx)("div",{className:"auth-error",children:m.error}),(0,t.jsxs)("div",{className:"auth-actions",children:[(0,t.jsx)("button",{type:"submit",className:"auth-btn primary",disabled:v,children:v?"sending…":"send code"}),(0,t.jsx)("button",{type:"button",className:"auth-btn",onClick:c,disabled:v,children:"cancel"})]})]})]}),"code"===m.kind&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("p",{className:"auth-sub",children:["code sent to ",(0,t.jsx)("span",{className:"auth-email",children:m.email}),". expires in ",Math.ceil(m.expiresIn/60)," min."]}),(0,t.jsxs)("form",{onSubmit:C,className:"auth-form",children:[(0,t.jsx)("input",{ref:j,id:"auth-dialog-code",name:"code",type:"text",inputMode:"numeric",autoComplete:"one-time-code",spellCheck:!1,placeholder:"123456",disabled:v,className:"auth-input auth-input-code",maxLength:12,required:!0}),m.error&&(0,t.jsx)("div",{className:"auth-error",children:m.error}),(0,t.jsxs)("div",{className:"auth-actions",children:[(0,t.jsx)("button",{type:"submit",className:"auth-btn primary",disabled:v,children:v?"verifying…":"verify"}),(0,t.jsx)("button",{type:"button",className:"auth-btn",onClick:S,disabled:v||m.resendIn>0,children:m.resendIn>0?`resend in ${m.resendIn}s`:"resend code"})]}),(0,t.jsx)("button",{type:"button",className:"auth-back",onClick:()=>f({kind:"email",error:null}),disabled:v,children:"← use a different email"})]})]}),"done"===m.kind&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("p",{className:"auth-sub",children:[(0,t.jsx)("span",{className:"auth-ok",children:"✓"})," signed in as"," ",(0,t.jsx)("span",{className:"auth-email",children:m.user.email}),"."]}),(0,t.jsx)("div",{className:"auth-actions",children:(0,t.jsx)("button",{type:"button",className:"auth-btn primary",onClick:c,children:"continue"})})]})]})}):null}])},86616,e=>{var t=e.i(29054);class s extends Error{kind;constructor(e,t){super(t),this.kind=e,this.name="RerunError"}}async function a(e){try{let a=await (0,t.q)("/api/audit/run",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({cli:e.cli.length>0?e.cli:void 0,since:"all"===e.since?void 0:e.since,noCache:!!e.noCache||void 0})});if(!a.ok&&409!==a.status){let e=await a.text().catch(()=>"");throw console.error("audit run failed:",a.status,e),new s("post_failed",`audit run failed (${a.status})`)}}catch(e){if(e instanceof s)throw e;throw console.error("audit run request failed:",e),new s((0,t.c)(e)?"timeout":"network","audit run request failed")}let a=0;for(;;){await new Promise(e=>setTimeout(e,1e3));let e=null;try{let s=await (0,t.q)("/api/audit/status",{cache:"no-store"});s.ok&&(e=await s.json())}catch{}if(null===e){if(++a>=10)throw new s("network","audit status poll lost the server");continue}if(a=0,!e.running){if(e.error)throw new s("post_failed",e.error);return}}}e.s(["t",0,s,"s",0,a])},2917,e=>{var t=e.i(43476),s=e.i(71645),a=e.i(95187);let n=(0,a.createServerReference)("00b9068bdd918cc5310ab3f0bcce31a8ecec2ffc7b",a.callServer,void 0,a.findSourceMapURL,"getJevSettingsAction"),l=(0,a.createServerReference)("0051d5dedc46addb674922392eb6041993908d83be",a.callServer,void 0,a.findSourceMapURL,"removeJevConfigAction"),i=(0,a.createServerReference)("408c98844cce74f7fde0bebfc8e5dac3c35568b128",a.callServer,void 0,a.findSourceMapURL,"saveJevConfigAction"),r=(0,a.createServerReference)("40ae09c3a7b7753f2f50c5802ef0fe36e3281d6c41",a.callServer,void 0,a.findSourceMapURL,"setJevModeAction");var o=e.i(55574);let c=[{value:"typesafe",label:"typesafe"},{value:"openrouter",label:"openrouter"},{value:"vercel",label:"vercel ai gateway"},{value:"cloudflare",label:"cloudflare workers ai"},{value:"custom",label:"custom endpoint"}],d=[{value:"enforce",label:"enforce — jev's verdict counts"},{value:"observe",label:"observe — log only, regex decides"},{value:"off",label:"off — keep this config, don't ask jev"}],u="failproofai";function h(e){return{provider:e.provider&&e.provider!==u?e.provider:"typesafe",baseUrl:e.baseUrl,accountId:e.accountId,mode:e.mode}}function m({id:e,label:s,hint:a,children:n}){return(0,t.jsxs)("div",{className:"set-field",children:[(0,t.jsx)("label",{className:"set-field-label",htmlFor:e,children:s}),n,a?(0,t.jsx)("span",{className:"set-hint",children:a}):null]})}e.s(["default",0,function({initial:e}){var a,f,v;let b,[p,x]=(0,s.useState)(e),[j,w]=(0,s.useState)(e?h(e):{provider:"typesafe",baseUrl:"",accountId:"",mode:"enforce"}),[g,y]=(0,s.useState)(""),[k,N]=(0,s.useState)(!1),[C,S]=(0,s.useState)(null),[M,A]=(0,s.useState)(!1),$=(0,s.useRef)(!0),I=(0,s.useRef)(!1),E=(0,s.useCallback)(async()=>{try{let e=await n();if(!$.current)return;x(e),I.current||w(h(e))}catch{}},[]);(0,s.useEffect)(()=>($.current=!0,E(),()=>{$.current=!1}),[E]),(0,s.useEffect)(()=>{let e=()=>void E();return window.addEventListener("focus",e),document.addEventListener("visibilitychange",e),()=>{window.removeEventListener("focus",e),document.removeEventListener("visibilitychange",e)}},[E]);let R=(0,s.useCallback)((e,t)=>{I.current=!0,w(s=>({...s,[e]:t}))},[]),_=(0,s.useCallback)(async()=>{N(!0),S(null);try{let e=await i({provider:j.provider,baseUrl:j.baseUrl,accountId:j.accountId,mode:j.mode,token:g});if(!e.ok){S(e.problem),A(!0===e.needsToken);return}I.current=!1,A(!1),y(""),x(e.view),w(h(e.view)),(0,o.toast)(e.view.on?"jev is on.":"saved.")}catch{S("could not save that.")}finally{N(!1)}},[j,g]),F=(0,s.useCallback)(async e=>{N(!0),S(null);try{let t=await r(e);if(!t.ok)return void S(t.problem);I.current=!1,x(t.view),w(h(t.view)),(0,o.toast)("off"===e?"jev is off. hooks run the regex policies.":`jev is on, in ${e} mode.`)}catch{S("could not switch that.")}finally{N(!1)}},[]),D=(0,s.useCallback)(async()=>{N(!0),S(null),A(!1);try{let e=await l();if(!e.ok)return void S(e.problem);I.current=!1,y(""),x(e.view),w(h(e.view)),(0,o.toast)("jev is off. hooks run the regex policies.")}catch{S("could not turn that off.")}finally{N(!1)}},[]),L=null!==p&&"absent"!==p.status,U=p?.provider===u,T=p?.token,q=M?"needed for this save — type the token for this endpoint":T?"cloud"===T.source?"from this machine's FailproofAI Cloud connection":"env"===T.source?"configured, read from the environment — leave blank to keep it":"configured — leave blank to keep it":p?.status==="key-missing"?"read from the environment, which is not set in this shell — leave blank to keep it that way":"sent as a bearer token; stored owner-only at 0600";return(0,t.jsxs)("div",{className:"set-cell set-jev",children:[(0,t.jsx)("h2",{className:"set-cell-title",children:"jev · semantic evaluation"}),(0,t.jsx)("div",{className:"set-row set-row-main",children:(0,t.jsxs)("div",{className:"set-row-copy",children:[(0,t.jsx)("span",{className:p?.on?"set-strong":"set-dim",children:null===p?"reading…":p.on?`on. every judged command is also asked of ${(a=p.provider)===u?"FailproofAI Cloud":a??""}.`:"off"===p.status?"off — switched off. hooks run the regex policies exactly as before.":"not-connected"===p.status?"off — this machine is not connected to FailproofAI Cloud. hooks run the regex policies.":"key-lacks-jev"===p.status?"off — no jev key is stored for this machine's FailproofAI Cloud connection. hooks run the regex policies.":"key-missing"===p.status?"off for this dashboard — FAILPROOFAI_JEV_API_KEY is not set in its environment. hooks run the regex policies wherever it is unset, including under the daemon; a session that sets it still consults jev.":"off. hooks run the regex policies exactly as before."}),(0,t.jsx)("span",{className:"set-dim",children:p?.on?"observe"===p.mode?"observe: jev's answers are logged, the regex result is what gets enforced.":"enforce: jev's answers can clear a reviewable deny.":U?"through FailproofAI Cloud, on your org's plan — no endpoint or token of your own.":"a second opinion on the commands the regex policies flag. needs your own endpoint and token."})]})}),p&&(0,t.jsx)("dl",{className:"set-how-list set-jev-cloud",children:(0,t.jsxs)("div",{className:"set-how-row",children:[(0,t.jsx)("dt",{className:"set-how-label",children:"FailproofAI Cloud connection"}),(0,t.jsx)("dd",{className:"set-how-body",children:function(e){if(!e||!e.connected)return e?.jev==="yes"?"a jev key is stored, but no connection is":"not connected";let t=e.org??e.host??"connected",s="yes"===e.jev?"key carries jev":"refused"===e.jev?"jev key refused — credentials.json is not owner-only":"no jev key stored";return`connected to ${t} \xb7 ${s}`}(p.cloud)})]})}),p&&L&&(0,t.jsxs)("dl",{className:"set-how-list",children:[U&&(0,t.jsxs)("div",{className:"set-how-row",children:[(0,t.jsx)("dt",{className:"set-how-label",children:"provider"}),(0,t.jsx)("dd",{className:"set-how-body",children:p.cloud?.host?`FailproofAI Cloud \xb7 ${p.cloud.host}`:"FailproofAI Cloud"})]}),(0,t.jsxs)("div",{className:"set-how-row",children:[(0,t.jsx)("dt",{className:"set-how-label",children:"model"}),(0,t.jsx)("dd",{className:"set-how-body",children:function(e){switch(e.kind){case"id":return e.id;case"withheld":return"set to something that is not a model id — not shown here, in case it is a key";default:return"the provider's default"}}(p.model)})]}),(0,t.jsxs)("div",{className:"set-how-row",children:[(0,t.jsx)("dt",{className:"set-how-label",children:"token"}),(0,t.jsx)("dd",{className:"set-how-body",children:T?"cloud"===T.source?"FailproofAI Cloud connection":"env"===T.source?"from FAILPROOFAI_JEV_API_KEY":"configured":U?p.cloud?.connected?"none stored for this connection":"none — this machine is not connected":"none stored"})]}),p.reviewable&&(0,t.jsxs)("div",{className:"set-how-row",children:[(0,t.jsx)("dt",{className:"set-how-label",children:"reviewable"}),(0,t.jsx)("dd",{className:"set-how-body",children:p.reviewable.summary})]}),p.stats&&p.stats.total>0&&(0,t.jsxs)("div",{className:"set-how-row",children:[(0,t.jsx)("dt",{className:"set-how-label",children:"fallbacks"}),(0,t.jsx)("dd",{className:"set-how-body",children:`${(f=p.stats.fallbackRate,`${Math.round(100*f)}%`)} of ${p.stats.total} calls in the last ${Number.isInteger(b=(v=p.stats.windowMs)/36e5)&&b>=1?b%24==0?`${b/24}d`:`${b}h`:`${Math.max(1,Math.round(v/6e4))}m`} fell back to the regex engine.`})]})]}),p?.problem&&(0,t.jsxs)("p",{className:"set-warn",children:[p.problem,p.fix?` — ${p.fix}`:""]}),p?.reviewable?.problem&&(0,t.jsx)("p",{className:"set-warn",children:p.reviewable.problem}),(0,t.jsx)("div",{className:"set-rule"}),U?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"set-jev-fields",children:(0,t.jsx)(m,{id:"jev-cloud-mode",label:"mode",hint:"the endpoint and key come from this machine's FailproofAI Cloud connection",children:(0,t.jsx)("select",{id:"jev-cloud-mode",className:"set-select",value:p?.mode==="enforce"?"enforce":"observe",disabled:k||p?.mode==="off",onChange:e=>void F("enforce"===e.target.value?"enforce":"observe"),children:d.filter(e=>"off"!==e.value).map(e=>(0,t.jsx)("option",{value:e.value,children:e.label},e.value))})})}),C&&(0,t.jsx)("p",{className:"set-warn",children:C}),(0,t.jsx)("div",{className:"set-actions set-jev-actions",children:(0,t.jsx)("button",{type:"button",className:"btn btn-press",disabled:k,onClick:()=>void F(p?.mode==="off"?"observe":"off"),children:k?"[ switching… ]":p?.mode==="off"?"[ turn jev on ]":"[ turn jev off ]"})})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"set-jev-fields",children:[(0,t.jsx)(m,{id:"jev-provider",label:"provider",children:(0,t.jsx)("select",{id:"jev-provider",className:"set-select",value:j.provider,disabled:k,onChange:e=>R("provider",e.target.value),children:c.map(e=>(0,t.jsx)("option",{value:e.value,children:e.label},e.value))})}),(0,t.jsx)(m,{id:"jev-url",label:"endpoint url",hint:["custom"===j.provider?"required — https, or http to localhost in observe mode":"leave blank for the provider's own api",p?.baseUrlQueryWithheld?"the stored url's query string is not shown here — leave the url as it is to keep it":null].filter(Boolean).join(" · "),children:(0,t.jsx)("input",{id:"jev-url",type:"text",className:"set-text",inputMode:"url",autoComplete:"off",spellCheck:!1,placeholder:"custom"===j.provider?"https://…":"the provider's own api",value:j.baseUrl,disabled:k,onChange:e=>R("baseUrl",e.target.value)})}),"cloudflare"===j.provider&&(0,t.jsx)(m,{id:"jev-account",label:"account id",hint:"32 lowercase hex characters",children:(0,t.jsx)("input",{id:"jev-account",type:"text",className:"set-text",autoComplete:"off",spellCheck:!1,value:j.accountId,disabled:k,onChange:e=>R("accountId",e.target.value)})}),(0,t.jsx)(m,{id:"jev-token",label:"token",hint:q,children:(0,t.jsx)("input",{id:"jev-token",type:"password",className:"set-text",autoComplete:"off",spellCheck:!1,placeholder:T?"•••• kept":"",value:g,disabled:k,"aria-invalid":M||void 0,onChange:e=>{I.current=!0,y(e.target.value)}})}),(0,t.jsx)(m,{id:"jev-mode",label:"mode",children:(0,t.jsx)("select",{id:"jev-mode",className:"set-select",value:j.mode,disabled:k,onChange:e=>R("mode",e.target.value),children:d.map(e=>(0,t.jsx)("option",{value:e.value,children:e.label},e.value))})})]}),C&&(0,t.jsx)("p",{className:"set-warn",children:C}),(0,t.jsxs)("div",{className:"set-actions set-jev-actions",children:[(0,t.jsx)("button",{type:"button",className:"btn btn-press",disabled:k,onClick:()=>void _(),children:k?"[ saving… ]":L?"[ save changes ]":"[ turn jev on ]"}),L&&(0,t.jsx)("button",{type:"button",className:"set-link",disabled:k,onClick:()=>void D(),children:"turn jev off"})]})]})]})}],2917)},93237,e=>{var t=e.i(43476),s=e.i(71645),a=e.i(95187);let n=(0,a.createServerReference)("0019cfad41b12a3bcc274b7fc422b5881b4845ab5d",a.callServer,void 0,a.findSourceMapURL,"getScheduledAuditAction"),l=(0,a.createServerReference)("406b228717c423d45bca01f6253f78a0f88616f6de",a.callServer,void 0,a.findSourceMapURL,"setAutoAuditAction"),i=(0,a.createServerReference)("4019e5108245d22822c9a852833995c9eff68e81ff",a.callServer,void 0,a.findSourceMapURL,"setAuditIntervalAction");var r=e.i(86616),o=e.i(64237),c=e.i(55574),d=e.i(34713);function u(e){return new Date(e).toLocaleString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}function h(e,t){let s=e-t;if(s<=0)return"now";let a=Math.floor(s/864e5),n=Math.floor(s%864e5/36e5);return a>0?n>0?`${a}d ${n}h`:`${a}d`:n>0?`${n}h`:`${Math.max(1,Math.floor(s/6e4))}m`}function m(e){return e.toLocaleString("en-US")}function f({label:e,value:s,sub:a,tone:n}){return(0,t.jsxs)("div",{className:"set-stat",children:[(0,t.jsx)("div",{className:"set-stat-label",children:e}),(0,t.jsx)("div",{className:`set-stat-value${n?` ${n}`:""}`,children:s}),(0,t.jsx)("div",{className:"set-stat-sub",children:a??" "})]})}function v({lastRunAtMs:e,nextDueAtMs:s,now:a}){if(null==e||null==s||s<=e)return null;let n=Math.min(100,Math.max(0,(a-e)/(s-e)*100));return(0,t.jsxs)("div",{className:"tape","aria-hidden":"true",children:[(0,t.jsxs)("div",{className:"tape-rail",children:[(0,t.jsx)("div",{className:"tape-fill",style:{width:`${n}%`}}),(0,t.jsx)("div",{className:"tape-now",style:{left:`${n}%`}})]}),(0,t.jsxs)("div",{className:"tape-ends",children:[(0,t.jsxs)("span",{children:["last scan · ",u(e)]}),(0,t.jsxs)("span",{className:"tape-next",children:["next · ",h(s,a)]})]})]})}function b({enabled:e,onChange:s,disabled:a,label:n}){return(0,t.jsx)("button",{type:"button",role:"switch","aria-checked":e,"aria-label":n,disabled:a,onClick:s,className:"sw","data-on":e?"true":"false",children:(0,t.jsx)("span",{className:"sw-knob"})})}let p=[{label:"reads",body:"every session transcript on disk — your prompts, the files your agents read and wrote, and command output."},{label:"runs",body:"entirely on this machine. the transcripts never leave it."},{label:"sends",body:"counts, redacted examples, and this machine's name — and only when a scan finds something harmful."}];e.s(["default",0,function({initial:e,jevPanel:a}){let[x,j]=(0,s.useState)(e),[w,g]=(0,s.useState)(e?.auto??!1),[y,k]=(0,s.useState)(e?.intervalDays??7),[N,C]=(0,s.useState)(!1),[S,M]=(0,s.useState)(!1),[A,$]=(0,s.useState)(!1),[I,E]=(0,s.useState)(null===e),[R,_]=(0,s.useState)(0),F=(0,s.useRef)(!0),D=(0,s.useRef)(null!==e),L=(0,s.useCallback)(async()=>{try{let e=await n();if(!F.current)return;j(e),D.current=!0,g(e.auto),k(e.intervalDays),_(Date.now()),E(!1)}catch{F.current&&!D.current&&E(!0)}},[]);(0,s.useEffect)(()=>(F.current=!0,L(),()=>{F.current=!1}),[L]),(0,s.useEffect)(()=>{let e=()=>void L();return window.addEventListener("focus",e),document.addEventListener("visibilitychange",e),()=>{window.removeEventListener("focus",e),document.removeEventListener("visibilitychange",e)}},[L]);let U=x?.signedInAs??null,T=x?.daemon==="running",q=x?.daemon==="unsupported-platform",O=x?.schedule??null,P=x?.lastScan??null,J=O?.lastExitCode!=null&&0!==O.lastExitCode&&75!==O.lastExitCode,B=(0,s.useCallback)(async()=>{C(!0);try{let e=await l(!0);if(!e.ok){if(g(!1),"unreachable"===e.reason)return void(0,c.toast)("could not reach the server. check your connection and try again.");await L(),$(!0),(0,c.toast)("that sign-in expired. one more code and it's on.");return}g(e.auto),(0,c.toast)("scheduled audits on."),await L()}catch{g(!1),(0,c.toast)("could not turn that on.")}finally{C(!1)}},[L]),K=(0,s.useCallback)(async()=>{if(w){C(!0);try{let e=await l(!1);e.ok&&g(e.auto),(0,c.toast)("scheduled audits off."),await L()}catch{(0,c.toast)("could not turn that off.")}finally{C(!1)}return}U?await B():$(!0)},[w,B,L,U]),V=(0,s.useCallback)(async e=>{C(!0);try{let t=await i(e);k(t.intervalDays),j(e=>e?{...e,intervalDays:t.intervalDays}:e),(0,c.toast)(`scanning every ${t.intervalDays} day${1===t.intervalDays?"":"s"}.`)}catch{k(x?.intervalDays??7),(0,c.toast)("could not save that.")}finally{C(!1)}},[x?.intervalDays]),Y=(0,s.useCallback)(async()=>{C(!0);try{await fetch("/api/auth/logout",{method:"POST"}),(0,c.toast)("signed out. scans continue; digests pause."),await L()}catch{(0,c.toast)("could not sign out.")}finally{C(!1)}},[L]),H=(0,s.useCallback)(async()=>{if(!S){M(!0);try{await (0,r.s)({cli:[],since:"all",noCache:!1}),(0,c.toast)("scan complete."),await L()}catch(e){(0,c.toast)(e instanceof r.t&&"timeout"===e.kind?"the scan is taking a while — it will finish in the background.":"the scan could not be completed.")}finally{M(!1)}}},[L,S]),Q=(0,s.useCallback)(async e=>{$(!1),await L(),await B()},[B,L]),W=x?T?{value:"running",sub:null!=x.daemonStartedAtMs&&R>0?`up ${function(e){let t=Math.floor(e/864e5);if(t>0)return`${t}d`;let s=Math.floor(e/36e5);return s>0?`${s}h`:`${Math.max(1,Math.floor(e/6e4))}m`}(Math.max(0,R-x.daemonStartedAtMs))}`:"",tone:"ok"}:q?{value:"unavailable",sub:"not on this platform"}:"not-installed"===x.daemon?{value:"not installed",sub:"run failproofai config",tone:"warn"}:"unknown"===x.daemon?{value:"unknown",sub:"could not read it"}:{value:"stopped",sub:"run failproofai config",tone:"warn"}:{value:"…",sub:"reading"},z=w?O?.nextDueAtMs==null?{value:"pending",sub:"after the next scan"}:{value:R>0?h(O.nextDueAtMs,R):"—",sub:u(O.nextDueAtMs)}:{value:"off",sub:"nothing scheduled"},G=P?{value:(0,d.g)(Date.parse(P.finishedAt)),sub:null!=P.sessionsScanned?`${m(P.sessionsScanned)} sessions`:"scanned"}:{value:"none yet",sub:"run one below"},X=P?null==P.findings?{value:"—",sub:"unreadable"}:{value:m(P.findings),sub:"this scan",...P.findings>0?{tone:"warn"}:{}}:{value:"—",sub:"no scan yet"};return(0,t.jsxs)("main",{className:"report",children:[(0,t.jsxs)("section",{className:"section set-sec",children:[(0,t.jsxs)("div",{className:"set-mast",children:[(0,t.jsx)("h1",{className:"set-title",children:"settings"}),(0,t.jsx)("p",{className:"set-lede",children:"keeping watch, so you don't have to."})]}),I?(0,t.jsxs)("div",{className:"set-console",children:[(0,t.jsx)("div",{className:"set-cell",children:(0,t.jsxs)("p",{className:"set-warn",children:["could not read this machine's settings. check that the dashboard can reach ",(0,t.jsx)("code",{children:"~/.failproofai/config.json"}),"."]})}),a]}):(0,t.jsxs)("div",{className:"set-console",children:[(0,t.jsxs)("div",{className:"set-stats",children:[(0,t.jsx)(f,{label:"daemon",...W}),(0,t.jsx)(f,{label:"next scan",...z}),(0,t.jsx)(f,{label:"last scan",...G}),(0,t.jsx)(f,{label:"findings",...X})]}),(0,t.jsxs)("div",{className:"set-cols",children:[(0,t.jsxs)("div",{className:"set-cell set-config",children:[(0,t.jsx)("h2",{className:"set-cell-title",children:"scheduled audit"}),(0,t.jsxs)("div",{className:"set-row set-row-main",children:[(0,t.jsx)(b,{enabled:w,disabled:N||null===x,onChange:()=>void K(),label:w?"turn off scheduled audits":"turn on scheduled audits"}),(0,t.jsxs)("div",{className:"set-row-copy",children:[(0,t.jsx)("span",{className:"set-strong",children:w?"scanning on a schedule.":"scan on a schedule."}),(0,t.jsx)("span",{className:"set-dim",children:w?"you'll get an email only when a scan finds something.":"off. nothing runs and nothing is sent."})]})]}),(0,t.jsxs)("div",{className:"set-row set-row-interval",children:[(0,t.jsx)("span",{className:"set-dim",children:"scan every"}),(0,t.jsx)("input",{type:"number",className:"set-num",min:1,max:90,value:y,disabled:N||null===x,"aria-label":"days between scheduled scans",onChange:e=>k(Number(e.target.value)),onBlur:e=>{let t=Number(e.target.value);Number.isFinite(t)?t!==x?.intervalDays&&V(t):k(x?.intervalDays??7)}}),(0,t.jsx)("span",{className:"set-dim",children:"days"}),(0,t.jsxs)("span",{className:"set-hint",children:[1,"–",90]})]}),(0,t.jsx)("div",{className:"set-rule"}),(0,t.jsx)("div",{className:"set-row set-row-identity",children:U?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"set-dim",children:"reports go to"}),(0,t.jsx)("span",{className:"set-email",children:U.email}),(0,t.jsx)("button",{type:"button",className:"set-link",disabled:N,onClick:()=>void Y(),children:"sign out"})]}):w?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"set-warn",children:"signed out — scans continue, digests are paused."}),(0,t.jsx)("button",{type:"button",className:"set-link",disabled:N,onClick:()=>$(!0),children:"sign in to resume"})]}):(0,t.jsx)("span",{className:"set-dim",children:"turning this on asks for an email, so there is somewhere to send the report."})}),w&&x&&!T&&(0,t.jsx)("p",{className:"set-warn",children:q?"the background service isn't available on this platform, so scheduled scans can't run here. you can still run one now.":"not-installed"===x.daemon?"the background service isn't installed, so nothing will run on the timer. install it with `failproofai config`.":"the background service is stopped, so nothing will run until it starts. repair it with `failproofai config`."}),J&&(0,t.jsxs)("p",{className:"set-warn",children:["the last scheduled scan exited ",O?.lastExitCode,". the next one will still run."]}),(0,t.jsx)("div",{className:"set-actions",children:(0,t.jsx)("button",{type:"button",className:"btn btn-press",disabled:S,onClick:()=>void H(),children:S?"[ scanning… ]":"[ run a scan now ]"})})]}),(0,t.jsxs)("div",{className:"set-cell set-how",children:[(0,t.jsx)("h2",{className:"set-cell-title",children:"how it works"}),(0,t.jsx)("dl",{className:"set-how-list",children:p.map(e=>(0,t.jsxs)("div",{className:"set-how-row",children:[(0,t.jsx)("dt",{className:"set-how-label",children:e.label}),(0,t.jsx)("dd",{className:"set-how-body",children:e.body})]},e.label))})]})]}),a]}),w&&R>0&&(0,t.jsx)(v,{lastRunAtMs:O?.lastRunAtMs??null,nextDueAtMs:O?.nextDueAtMs??null,now:R})]}),(0,t.jsx)(o.f,{open:A,source:"settings_scheduled_audit",headline:"where should the report go?",subhead:"we'll send a one-time code to confirm.",onClose:()=>$(!1),onAuthed:e=>void Q(e)})]})}],93237)},29054,e=>{e.s(["q",0,function(e,t={},s=15e3){let a=AbortSignal.timeout(s),n=t.signal?AbortSignal.any([t.signal,a]):a;return fetch(e,{...t,signal:n})},"c",0,function(e){if(null===e||"object"!=typeof e)return!1;let t=e.name;return"AbortError"===t||"TimeoutError"===t}])},34713,e=>{e.s(["M",0,function(e){if(e<1e3)return`${e}ms`;let t=Math.round(e/100);if(t<600)return`${(t/10).toFixed(1)}s`;let s=Math.round(e/1e3);if(s<3600){let e=Math.floor(s/60);return`${e}m ${s%60}s`}let a=Math.round(e/6e4),n=Math.floor(a/60);return`${n}h ${a%60}m`},"g",0,function(e){let t=Date.now()-e;return t<6e4?`${Math.max(1,Math.floor(t/1e3))}s ago`:t<36e5?`${Math.floor(t/6e4)}m ago`:t<864e5?`${Math.floor(t/36e5)}h ago`:`${Math.floor(t/864e5)}d ago`}])}])})();
|
|
1
|
+
(()=>{"use strict";(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,64237,e=>{var t=e.i(43476),s=e.i(71645),a=e.i(12344),n=e.i(29054);let l=/^[^\s@]+@[^\s@]+\.[^\s@]+$/;function i(e){if((0,n.c)(e))return"request timed out. check your network and try again.";let t=e instanceof Error?e.message:String(e);return`network error: ${t}`}e.s(["f",0,function({open:e,headline:r="where to route the reminder?",subhead:o="we'll send a one-time code to confirm.",onClose:c,onAuthed:d,source:u="unknown"}){let{capture:h}=(0,a.usePostHog)(),[m,f]=(0,s.useState)({kind:"email",error:null}),[v,b]=(0,s.useState)(!1),p=(0,s.useRef)(!1),x=(0,s.useRef)(null),j=(0,s.useRef)(null);(0,s.useEffect)(()=>{e&&(f({kind:"email",error:null}),b(!1),p.current=!1,h("audit_auth_dialog_opened",{source:u}))},[h,e,u]);let w=(0,s.useRef)(!1);(0,s.useEffect)(()=>{if(e){w.current=!0;return}w.current&&!p.current&&h("audit_auth_dialog_dismissed",{source:u,step:m.kind}),w.current=!1},[h,e,u,m.kind]),(0,s.useEffect)(()=>{if(!e)return;let t=setTimeout(()=>{"email"===m.kind?x.current?.focus():"code"===m.kind&&j.current?.focus()},50);return()=>clearTimeout(t)},[e,m.kind]),(0,s.useEffect)(()=>{if(!e)return;let t=e=>{"Escape"!==e.key||v||c()};return window.addEventListener("keydown",t),()=>window.removeEventListener("keydown",t)},[e,v,c]);let g="code"===m.kind&&m.resendIn>0;(0,s.useEffect)(()=>{if(!g)return;let e=setInterval(()=>{f(e=>"code"===e.kind?{...e,resendIn:Math.max(0,e.resendIn-1)}:e)},1e3);return()=>clearInterval(e)},[g]);let y=(0,s.useCallback)(async(e,t={})=>{let{isResend:s=!1}=t,a=e=>{s?f(t=>"code"===t.kind?{...t,error:e}:t):f({kind:"email",error:e})};b(!0);try{let t=await (0,n.q)("/api/auth/login-request",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({email:e})}),s=await t.json().catch(()=>({}));if(!t.ok){let e=s.message??"could not send code.";"rate_limited"===s.code&&void 0!==s.retry_after_secs?e=`too many tries. wait ${s.retry_after_secs}s and try again.`:"upstream_unreachable"===s.code&&(e="api-server unreachable. check your network."),a(e);return}f({kind:"code",email:e,error:null,expiresIn:s.expires_in??600,resendIn:s.resend_available_in??30})}catch(e){a(i(e))}finally{b(!1)}},[]),k=(0,s.useCallback)(async(e,t)=>{b(!0);try{let s=await (0,n.q)("/api/auth/login-verify",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({email:e,code:t})}),a=await s.json().catch(()=>({}));if(!s.ok||!a.authenticated||!a.user){let e=a.message??"invalid code.";"invalid_code"===a.code&&(e="wrong code, or it expired. try again."),f(t=>"code"===t.kind?{...t,error:e}:t);return}p.current=!0,h("audit_auth_dialog_succeeded",{source:u}),f({kind:"done",user:a.user}),d(a.user)}catch(t){let e=i(t);f(t=>"code"===t.kind?{...t,error:e}:t)}finally{b(!1)}},[h,d,u]),N=(0,s.useCallback)(async e=>{if(e.preventDefault(),v||"email"!==m.kind)return;let t=String(new FormData(e.currentTarget).get("email")??"").trim().toLowerCase();l.test(t)?await y(t):f({kind:"email",error:"that doesn't look like an email."})},[v,m,y]),C=(0,s.useCallback)(async e=>{if(e.preventDefault(),v||"code"!==m.kind)return;let t=String(new FormData(e.currentTarget).get("code")??"").trim();t.length<4||t.length>12?f(e=>"code"===e.kind?{...e,error:"code is 4–12 characters."}:e):await k(m.email,t)},[v,m,k]),S=(0,s.useCallback)(async()=>{"code"!==m.kind||m.resendIn>0||v||await y(m.email,{isResend:!0})},[m,v,y]);return e?(0,t.jsx)("div",{className:"auth-dialog-backdrop",role:"dialog","aria-modal":"true","aria-labelledby":"auth-dialog-title",onClick:e=>{v||e.target!==e.currentTarget||c()},children:(0,t.jsxs)("div",{className:"auth-dialog",children:[(0,t.jsx)("button",{type:"button",className:"auth-close",onClick:c,disabled:v,"aria-label":"close",children:"×"}),(0,t.jsx)("h2",{id:"auth-dialog-title",className:"auth-headline",children:r}),"email"===m.kind&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("p",{className:"auth-sub",children:o}),(0,t.jsxs)("form",{onSubmit:N,className:"auth-form",children:[(0,t.jsx)("input",{ref:x,id:"auth-dialog-email",name:"email",type:"email",autoComplete:"email",inputMode:"email",spellCheck:!1,placeholder:"you@yourdomain.com",disabled:v,className:"auth-input",required:!0}),m.error&&(0,t.jsx)("div",{className:"auth-error",children:m.error}),(0,t.jsxs)("div",{className:"auth-actions",children:[(0,t.jsx)("button",{type:"submit",className:"auth-btn primary",disabled:v,children:v?"sending…":"send code"}),(0,t.jsx)("button",{type:"button",className:"auth-btn",onClick:c,disabled:v,children:"cancel"})]})]})]}),"code"===m.kind&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("p",{className:"auth-sub",children:["code sent to ",(0,t.jsx)("span",{className:"auth-email",children:m.email}),". expires in ",Math.ceil(m.expiresIn/60)," min."]}),(0,t.jsxs)("form",{onSubmit:C,className:"auth-form",children:[(0,t.jsx)("input",{ref:j,id:"auth-dialog-code",name:"code",type:"text",inputMode:"numeric",autoComplete:"one-time-code",spellCheck:!1,placeholder:"123456",disabled:v,className:"auth-input auth-input-code",maxLength:12,required:!0}),m.error&&(0,t.jsx)("div",{className:"auth-error",children:m.error}),(0,t.jsxs)("div",{className:"auth-actions",children:[(0,t.jsx)("button",{type:"submit",className:"auth-btn primary",disabled:v,children:v?"verifying…":"verify"}),(0,t.jsx)("button",{type:"button",className:"auth-btn",onClick:S,disabled:v||m.resendIn>0,children:m.resendIn>0?`resend in ${m.resendIn}s`:"resend code"})]}),(0,t.jsx)("button",{type:"button",className:"auth-back",onClick:()=>f({kind:"email",error:null}),disabled:v,children:"← use a different email"})]})]}),"done"===m.kind&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("p",{className:"auth-sub",children:[(0,t.jsx)("span",{className:"auth-ok",children:"✓"})," signed in as"," ",(0,t.jsx)("span",{className:"auth-email",children:m.user.email}),"."]}),(0,t.jsx)("div",{className:"auth-actions",children:(0,t.jsx)("button",{type:"button",className:"auth-btn primary",onClick:c,children:"continue"})})]})]})}):null}])},86616,e=>{var t=e.i(29054);class s extends Error{kind;constructor(e,t){super(t),this.kind=e,this.name="RerunError"}}async function a(e){try{let a=await (0,t.q)("/api/audit/run",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({cli:e.cli.length>0?e.cli:void 0,since:"all"===e.since?void 0:e.since,noCache:!!e.noCache||void 0})});if(!a.ok&&409!==a.status){let e=await a.text().catch(()=>"");throw console.error("audit run failed:",a.status,e),new s("post_failed",`audit run failed (${a.status})`)}}catch(e){if(e instanceof s)throw e;throw console.error("audit run request failed:",e),new s((0,t.c)(e)?"timeout":"network","audit run request failed")}let a=0;for(;;){await new Promise(e=>setTimeout(e,1e3));let e=null;try{let s=await (0,t.q)("/api/audit/status",{cache:"no-store"});s.ok&&(e=await s.json())}catch{}if(null===e){if(++a>=10)throw new s("network","audit status poll lost the server");continue}if(a=0,!e.running){if(e.error)throw new s("post_failed",e.error);return}}}e.s(["t",0,s,"s",0,a])},2917,e=>{var t=e.i(43476),s=e.i(71645),a=e.i(95187);let n=(0,a.createServerReference)("0000248e151c632afe8dd7863239ba9485e5af5d41",a.callServer,void 0,a.findSourceMapURL,"getJevSettingsAction"),l=(0,a.createServerReference)("00c2839310d989d77e9849010bcc012d4a7747bc0e",a.callServer,void 0,a.findSourceMapURL,"removeJevConfigAction"),i=(0,a.createServerReference)("40269b17347c021a76c1940c228d01bc5a01545fe0",a.callServer,void 0,a.findSourceMapURL,"saveJevConfigAction"),r=(0,a.createServerReference)("408edf2c46c8b34182ac89f0bf85cff04838ced676",a.callServer,void 0,a.findSourceMapURL,"setJevModeAction");var o=e.i(55574);let c=[{value:"typesafe",label:"typesafe"},{value:"openrouter",label:"openrouter"},{value:"vercel",label:"vercel ai gateway"},{value:"cloudflare",label:"cloudflare workers ai"},{value:"custom",label:"custom endpoint"}],d=[{value:"enforce",label:"enforce — jev's verdict counts"},{value:"observe",label:"observe — log only, regex decides"},{value:"off",label:"off — keep this config, don't ask jev"}],u="failproofai";function h(e){return{provider:e.provider&&e.provider!==u?e.provider:"typesafe",baseUrl:e.baseUrl,accountId:e.accountId,mode:e.mode}}function m({id:e,label:s,hint:a,children:n}){return(0,t.jsxs)("div",{className:"set-field",children:[(0,t.jsx)("label",{className:"set-field-label",htmlFor:e,children:s}),n,a?(0,t.jsx)("span",{className:"set-hint",children:a}):null]})}e.s(["default",0,function({initial:e}){var a,f,v;let b,[p,x]=(0,s.useState)(e),[j,w]=(0,s.useState)(e?h(e):{provider:"typesafe",baseUrl:"",accountId:"",mode:"enforce"}),[g,y]=(0,s.useState)(""),[k,N]=(0,s.useState)(!1),[C,S]=(0,s.useState)(null),[M,A]=(0,s.useState)(!1),$=(0,s.useRef)(!0),I=(0,s.useRef)(!1),E=(0,s.useCallback)(async()=>{try{let e=await n();if(!$.current)return;x(e),I.current||w(h(e))}catch{}},[]);(0,s.useEffect)(()=>($.current=!0,E(),()=>{$.current=!1}),[E]),(0,s.useEffect)(()=>{let e=()=>void E();return window.addEventListener("focus",e),document.addEventListener("visibilitychange",e),()=>{window.removeEventListener("focus",e),document.removeEventListener("visibilitychange",e)}},[E]);let R=(0,s.useCallback)((e,t)=>{I.current=!0,w(s=>({...s,[e]:t}))},[]),_=(0,s.useCallback)(async()=>{N(!0),S(null);try{let e=await i({provider:j.provider,baseUrl:j.baseUrl,accountId:j.accountId,mode:j.mode,token:g});if(!e.ok){S(e.problem),A(!0===e.needsToken);return}I.current=!1,A(!1),y(""),x(e.view),w(h(e.view)),(0,o.toast)(e.view.on?"jev is on.":"saved.")}catch{S("could not save that.")}finally{N(!1)}},[j,g]),F=(0,s.useCallback)(async e=>{N(!0),S(null);try{let t=await r(e);if(!t.ok)return void S(t.problem);I.current=!1,x(t.view),w(h(t.view)),(0,o.toast)("off"===e?"jev is off. hooks run the regex policies.":`jev is on, in ${e} mode.`)}catch{S("could not switch that.")}finally{N(!1)}},[]),D=(0,s.useCallback)(async()=>{N(!0),S(null),A(!1);try{let e=await l();if(!e.ok)return void S(e.problem);I.current=!1,y(""),x(e.view),w(h(e.view)),(0,o.toast)("jev is off. hooks run the regex policies.")}catch{S("could not turn that off.")}finally{N(!1)}},[]),L=null!==p&&"absent"!==p.status,U=p?.provider===u,T=p?.token,q=M?"needed for this save — type the token for this endpoint":T?"cloud"===T.source?"from this machine's FailproofAI Cloud connection":"env"===T.source?"configured, read from the environment — leave blank to keep it":"configured — leave blank to keep it":p?.status==="key-missing"?"read from the environment, which is not set in this shell — leave blank to keep it that way":"sent as a bearer token; stored owner-only at 0600";return(0,t.jsxs)("div",{className:"set-cell set-jev",children:[(0,t.jsx)("h2",{className:"set-cell-title",children:"jev · semantic evaluation"}),(0,t.jsx)("div",{className:"set-row set-row-main",children:(0,t.jsxs)("div",{className:"set-row-copy",children:[(0,t.jsx)("span",{className:p?.on?"set-strong":"set-dim",children:null===p?"reading…":p.on?`on. every judged command is also asked of ${(a=p.provider)===u?"FailproofAI Cloud":a??""}.`:"off"===p.status?"off — switched off. hooks run the regex policies exactly as before.":"not-connected"===p.status?"off — this machine is not connected to FailproofAI Cloud. hooks run the regex policies.":"key-lacks-jev"===p.status?"off — no jev key is stored for this machine's FailproofAI Cloud connection. hooks run the regex policies.":"key-missing"===p.status?"off for this dashboard — FAILPROOFAI_JEV_API_KEY is not set in its environment. hooks run the regex policies wherever it is unset, including under the daemon; a session that sets it still consults jev.":"off. hooks run the regex policies exactly as before."}),(0,t.jsx)("span",{className:"set-dim",children:p?.on?"observe"===p.mode?"observe: jev's answers are logged, the regex result is what gets enforced.":"enforce: jev's answers can clear a reviewable deny.":U?"through FailproofAI Cloud, on your org's plan — no endpoint or token of your own.":"a second opinion on the commands the regex policies flag. needs your own endpoint and token."})]})}),p&&(0,t.jsx)("dl",{className:"set-how-list set-jev-cloud",children:(0,t.jsxs)("div",{className:"set-how-row",children:[(0,t.jsx)("dt",{className:"set-how-label",children:"FailproofAI Cloud connection"}),(0,t.jsx)("dd",{className:"set-how-body",children:function(e){if(!e||!e.connected)return e?.jev==="yes"?"a jev key is stored, but no connection is":"not connected";let t=e.org??e.host??"connected",s="yes"===e.jev?"key carries jev":"refused"===e.jev?"jev key refused — credentials.json is not owner-only":"no jev key stored";return`connected to ${t} \xb7 ${s}`}(p.cloud)})]})}),p&&L&&(0,t.jsxs)("dl",{className:"set-how-list",children:[U&&(0,t.jsxs)("div",{className:"set-how-row",children:[(0,t.jsx)("dt",{className:"set-how-label",children:"provider"}),(0,t.jsx)("dd",{className:"set-how-body",children:p.cloud?.host?`FailproofAI Cloud \xb7 ${p.cloud.host}`:"FailproofAI Cloud"})]}),(0,t.jsxs)("div",{className:"set-how-row",children:[(0,t.jsx)("dt",{className:"set-how-label",children:"model"}),(0,t.jsx)("dd",{className:"set-how-body",children:function(e){switch(e.kind){case"id":return e.id;case"withheld":return"set to something that is not a model id — not shown here, in case it is a key";default:return"the provider's default"}}(p.model)})]}),(0,t.jsxs)("div",{className:"set-how-row",children:[(0,t.jsx)("dt",{className:"set-how-label",children:"token"}),(0,t.jsx)("dd",{className:"set-how-body",children:T?"cloud"===T.source?"FailproofAI Cloud connection":"env"===T.source?"from FAILPROOFAI_JEV_API_KEY":"configured":U?p.cloud?.connected?"none stored for this connection":"none — this machine is not connected":"none stored"})]}),p.reviewable&&(0,t.jsxs)("div",{className:"set-how-row",children:[(0,t.jsx)("dt",{className:"set-how-label",children:"reviewable"}),(0,t.jsx)("dd",{className:"set-how-body",children:p.reviewable.summary})]}),p.stats&&p.stats.total>0&&(0,t.jsxs)("div",{className:"set-how-row",children:[(0,t.jsx)("dt",{className:"set-how-label",children:"fallbacks"}),(0,t.jsx)("dd",{className:"set-how-body",children:`${(f=p.stats.fallbackRate,`${Math.round(100*f)}%`)} of ${p.stats.total} calls in the last ${Number.isInteger(b=(v=p.stats.windowMs)/36e5)&&b>=1?b%24==0?`${b/24}d`:`${b}h`:`${Math.max(1,Math.round(v/6e4))}m`} fell back to the regex engine.`})]})]}),p?.problem&&(0,t.jsxs)("p",{className:"set-warn",children:[p.problem,p.fix?` — ${p.fix}`:""]}),p?.reviewable?.problem&&(0,t.jsx)("p",{className:"set-warn",children:p.reviewable.problem}),(0,t.jsx)("div",{className:"set-rule"}),U?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"set-jev-fields",children:(0,t.jsx)(m,{id:"jev-cloud-mode",label:"mode",hint:"the endpoint and key come from this machine's FailproofAI Cloud connection",children:(0,t.jsx)("select",{id:"jev-cloud-mode",className:"set-select",value:p?.mode==="enforce"?"enforce":"observe",disabled:k||p?.mode==="off",onChange:e=>void F("enforce"===e.target.value?"enforce":"observe"),children:d.filter(e=>"off"!==e.value).map(e=>(0,t.jsx)("option",{value:e.value,children:e.label},e.value))})})}),C&&(0,t.jsx)("p",{className:"set-warn",children:C}),(0,t.jsx)("div",{className:"set-actions set-jev-actions",children:(0,t.jsx)("button",{type:"button",className:"btn btn-press",disabled:k,onClick:()=>void F(p?.mode==="off"?"observe":"off"),children:k?"[ switching… ]":p?.mode==="off"?"[ turn jev on ]":"[ turn jev off ]"})})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"set-jev-fields",children:[(0,t.jsx)(m,{id:"jev-provider",label:"provider",children:(0,t.jsx)("select",{id:"jev-provider",className:"set-select",value:j.provider,disabled:k,onChange:e=>R("provider",e.target.value),children:c.map(e=>(0,t.jsx)("option",{value:e.value,children:e.label},e.value))})}),(0,t.jsx)(m,{id:"jev-url",label:"endpoint url",hint:["custom"===j.provider?"required — https, or http to localhost in observe mode":"leave blank for the provider's own api",p?.baseUrlQueryWithheld?"the stored url's query string is not shown here — leave the url as it is to keep it":null].filter(Boolean).join(" · "),children:(0,t.jsx)("input",{id:"jev-url",type:"text",className:"set-text",inputMode:"url",autoComplete:"off",spellCheck:!1,placeholder:"custom"===j.provider?"https://…":"the provider's own api",value:j.baseUrl,disabled:k,onChange:e=>R("baseUrl",e.target.value)})}),"cloudflare"===j.provider&&(0,t.jsx)(m,{id:"jev-account",label:"account id",hint:"32 lowercase hex characters",children:(0,t.jsx)("input",{id:"jev-account",type:"text",className:"set-text",autoComplete:"off",spellCheck:!1,value:j.accountId,disabled:k,onChange:e=>R("accountId",e.target.value)})}),(0,t.jsx)(m,{id:"jev-token",label:"token",hint:q,children:(0,t.jsx)("input",{id:"jev-token",type:"password",className:"set-text",autoComplete:"off",spellCheck:!1,placeholder:T?"•••• kept":"",value:g,disabled:k,"aria-invalid":M||void 0,onChange:e=>{I.current=!0,y(e.target.value)}})}),(0,t.jsx)(m,{id:"jev-mode",label:"mode",children:(0,t.jsx)("select",{id:"jev-mode",className:"set-select",value:j.mode,disabled:k,onChange:e=>R("mode",e.target.value),children:d.map(e=>(0,t.jsx)("option",{value:e.value,children:e.label},e.value))})})]}),C&&(0,t.jsx)("p",{className:"set-warn",children:C}),(0,t.jsxs)("div",{className:"set-actions set-jev-actions",children:[(0,t.jsx)("button",{type:"button",className:"btn btn-press",disabled:k,onClick:()=>void _(),children:k?"[ saving… ]":L?"[ save changes ]":"[ turn jev on ]"}),L&&(0,t.jsx)("button",{type:"button",className:"set-link",disabled:k,onClick:()=>void D(),children:"turn jev off"})]})]})]})}],2917)},93237,e=>{var t=e.i(43476),s=e.i(71645),a=e.i(95187);let n=(0,a.createServerReference)("00a805a7b449f10fb44c8fb3043e16aa05668b622e",a.callServer,void 0,a.findSourceMapURL,"getScheduledAuditAction"),l=(0,a.createServerReference)("40f7c7c0cbcd72c3d68d5f6449f0a027c7489c06d7",a.callServer,void 0,a.findSourceMapURL,"setAutoAuditAction"),i=(0,a.createServerReference)("40be028351d3344643cdf5c16d1d5bf9d08bcf61e2",a.callServer,void 0,a.findSourceMapURL,"setAuditIntervalAction");var r=e.i(86616),o=e.i(64237),c=e.i(55574),d=e.i(34713);function u(e){return new Date(e).toLocaleString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}function h(e,t){let s=e-t;if(s<=0)return"now";let a=Math.floor(s/864e5),n=Math.floor(s%864e5/36e5);return a>0?n>0?`${a}d ${n}h`:`${a}d`:n>0?`${n}h`:`${Math.max(1,Math.floor(s/6e4))}m`}function m(e){return e.toLocaleString("en-US")}function f({label:e,value:s,sub:a,tone:n}){return(0,t.jsxs)("div",{className:"set-stat",children:[(0,t.jsx)("div",{className:"set-stat-label",children:e}),(0,t.jsx)("div",{className:`set-stat-value${n?` ${n}`:""}`,children:s}),(0,t.jsx)("div",{className:"set-stat-sub",children:a??" "})]})}function v({lastRunAtMs:e,nextDueAtMs:s,now:a}){if(null==e||null==s||s<=e)return null;let n=Math.min(100,Math.max(0,(a-e)/(s-e)*100));return(0,t.jsxs)("div",{className:"tape","aria-hidden":"true",children:[(0,t.jsxs)("div",{className:"tape-rail",children:[(0,t.jsx)("div",{className:"tape-fill",style:{width:`${n}%`}}),(0,t.jsx)("div",{className:"tape-now",style:{left:`${n}%`}})]}),(0,t.jsxs)("div",{className:"tape-ends",children:[(0,t.jsxs)("span",{children:["last scan · ",u(e)]}),(0,t.jsxs)("span",{className:"tape-next",children:["next · ",h(s,a)]})]})]})}function b({enabled:e,onChange:s,disabled:a,label:n}){return(0,t.jsx)("button",{type:"button",role:"switch","aria-checked":e,"aria-label":n,disabled:a,onClick:s,className:"sw","data-on":e?"true":"false",children:(0,t.jsx)("span",{className:"sw-knob"})})}let p=[{label:"reads",body:"every session transcript on disk — your prompts, the files your agents read and wrote, and command output."},{label:"runs",body:"entirely on this machine. the transcripts never leave it."},{label:"sends",body:"counts, redacted examples, and this machine's name — and only when a scan finds something harmful."}];e.s(["default",0,function({initial:e,jevPanel:a}){let[x,j]=(0,s.useState)(e),[w,g]=(0,s.useState)(e?.auto??!1),[y,k]=(0,s.useState)(e?.intervalDays??7),[N,C]=(0,s.useState)(!1),[S,M]=(0,s.useState)(!1),[A,$]=(0,s.useState)(!1),[I,E]=(0,s.useState)(null===e),[R,_]=(0,s.useState)(0),F=(0,s.useRef)(!0),D=(0,s.useRef)(null!==e),L=(0,s.useCallback)(async()=>{try{let e=await n();if(!F.current)return;j(e),D.current=!0,g(e.auto),k(e.intervalDays),_(Date.now()),E(!1)}catch{F.current&&!D.current&&E(!0)}},[]);(0,s.useEffect)(()=>(F.current=!0,L(),()=>{F.current=!1}),[L]),(0,s.useEffect)(()=>{let e=()=>void L();return window.addEventListener("focus",e),document.addEventListener("visibilitychange",e),()=>{window.removeEventListener("focus",e),document.removeEventListener("visibilitychange",e)}},[L]);let U=x?.signedInAs??null,T=x?.daemon==="running",q=x?.daemon==="unsupported-platform",O=x?.schedule??null,P=x?.lastScan??null,J=O?.lastExitCode!=null&&0!==O.lastExitCode&&75!==O.lastExitCode,B=(0,s.useCallback)(async()=>{C(!0);try{let e=await l(!0);if(!e.ok){if(g(!1),"unreachable"===e.reason)return void(0,c.toast)("could not reach the server. check your connection and try again.");await L(),$(!0),(0,c.toast)("that sign-in expired. one more code and it's on.");return}g(e.auto),(0,c.toast)("scheduled audits on."),await L()}catch{g(!1),(0,c.toast)("could not turn that on.")}finally{C(!1)}},[L]),K=(0,s.useCallback)(async()=>{if(w){C(!0);try{let e=await l(!1);e.ok&&g(e.auto),(0,c.toast)("scheduled audits off."),await L()}catch{(0,c.toast)("could not turn that off.")}finally{C(!1)}return}U?await B():$(!0)},[w,B,L,U]),V=(0,s.useCallback)(async e=>{C(!0);try{let t=await i(e);k(t.intervalDays),j(e=>e?{...e,intervalDays:t.intervalDays}:e),(0,c.toast)(`scanning every ${t.intervalDays} day${1===t.intervalDays?"":"s"}.`)}catch{k(x?.intervalDays??7),(0,c.toast)("could not save that.")}finally{C(!1)}},[x?.intervalDays]),Y=(0,s.useCallback)(async()=>{C(!0);try{await fetch("/api/auth/logout",{method:"POST"}),(0,c.toast)("signed out. scans continue; digests pause."),await L()}catch{(0,c.toast)("could not sign out.")}finally{C(!1)}},[L]),H=(0,s.useCallback)(async()=>{if(!S){M(!0);try{await (0,r.s)({cli:[],since:"all",noCache:!1}),(0,c.toast)("scan complete."),await L()}catch(e){(0,c.toast)(e instanceof r.t&&"timeout"===e.kind?"the scan is taking a while — it will finish in the background.":"the scan could not be completed.")}finally{M(!1)}}},[L,S]),Q=(0,s.useCallback)(async e=>{$(!1),await L(),await B()},[B,L]),W=x?T?{value:"running",sub:null!=x.daemonStartedAtMs&&R>0?`up ${function(e){let t=Math.floor(e/864e5);if(t>0)return`${t}d`;let s=Math.floor(e/36e5);return s>0?`${s}h`:`${Math.max(1,Math.floor(e/6e4))}m`}(Math.max(0,R-x.daemonStartedAtMs))}`:"",tone:"ok"}:q?{value:"unavailable",sub:"not on this platform"}:"not-installed"===x.daemon?{value:"not installed",sub:"run failproofai config",tone:"warn"}:"unknown"===x.daemon?{value:"unknown",sub:"could not read it"}:{value:"stopped",sub:"run failproofai config",tone:"warn"}:{value:"…",sub:"reading"},z=w?O?.nextDueAtMs==null?{value:"pending",sub:"after the next scan"}:{value:R>0?h(O.nextDueAtMs,R):"—",sub:u(O.nextDueAtMs)}:{value:"off",sub:"nothing scheduled"},G=P?{value:(0,d.g)(Date.parse(P.finishedAt)),sub:null!=P.sessionsScanned?`${m(P.sessionsScanned)} sessions`:"scanned"}:{value:"none yet",sub:"run one below"},X=P?null==P.findings?{value:"—",sub:"unreadable"}:{value:m(P.findings),sub:"this scan",...P.findings>0?{tone:"warn"}:{}}:{value:"—",sub:"no scan yet"};return(0,t.jsxs)("main",{className:"report",children:[(0,t.jsxs)("section",{className:"section set-sec",children:[(0,t.jsxs)("div",{className:"set-mast",children:[(0,t.jsx)("h1",{className:"set-title",children:"settings"}),(0,t.jsx)("p",{className:"set-lede",children:"keeping watch, so you don't have to."})]}),I?(0,t.jsxs)("div",{className:"set-console",children:[(0,t.jsx)("div",{className:"set-cell",children:(0,t.jsxs)("p",{className:"set-warn",children:["could not read this machine's settings. check that the dashboard can reach ",(0,t.jsx)("code",{children:"~/.failproofai/config.json"}),"."]})}),a]}):(0,t.jsxs)("div",{className:"set-console",children:[(0,t.jsxs)("div",{className:"set-stats",children:[(0,t.jsx)(f,{label:"daemon",...W}),(0,t.jsx)(f,{label:"next scan",...z}),(0,t.jsx)(f,{label:"last scan",...G}),(0,t.jsx)(f,{label:"findings",...X})]}),(0,t.jsxs)("div",{className:"set-cols",children:[(0,t.jsxs)("div",{className:"set-cell set-config",children:[(0,t.jsx)("h2",{className:"set-cell-title",children:"scheduled audit"}),(0,t.jsxs)("div",{className:"set-row set-row-main",children:[(0,t.jsx)(b,{enabled:w,disabled:N||null===x,onChange:()=>void K(),label:w?"turn off scheduled audits":"turn on scheduled audits"}),(0,t.jsxs)("div",{className:"set-row-copy",children:[(0,t.jsx)("span",{className:"set-strong",children:w?"scanning on a schedule.":"scan on a schedule."}),(0,t.jsx)("span",{className:"set-dim",children:w?"you'll get an email only when a scan finds something.":"off. nothing runs and nothing is sent."})]})]}),(0,t.jsxs)("div",{className:"set-row set-row-interval",children:[(0,t.jsx)("span",{className:"set-dim",children:"scan every"}),(0,t.jsx)("input",{type:"number",className:"set-num",min:1,max:90,value:y,disabled:N||null===x,"aria-label":"days between scheduled scans",onChange:e=>k(Number(e.target.value)),onBlur:e=>{let t=Number(e.target.value);Number.isFinite(t)?t!==x?.intervalDays&&V(t):k(x?.intervalDays??7)}}),(0,t.jsx)("span",{className:"set-dim",children:"days"}),(0,t.jsxs)("span",{className:"set-hint",children:[1,"–",90]})]}),(0,t.jsx)("div",{className:"set-rule"}),(0,t.jsx)("div",{className:"set-row set-row-identity",children:U?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"set-dim",children:"reports go to"}),(0,t.jsx)("span",{className:"set-email",children:U.email}),(0,t.jsx)("button",{type:"button",className:"set-link",disabled:N,onClick:()=>void Y(),children:"sign out"})]}):w?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"set-warn",children:"signed out — scans continue, digests are paused."}),(0,t.jsx)("button",{type:"button",className:"set-link",disabled:N,onClick:()=>$(!0),children:"sign in to resume"})]}):(0,t.jsx)("span",{className:"set-dim",children:"turning this on asks for an email, so there is somewhere to send the report."})}),w&&x&&!T&&(0,t.jsx)("p",{className:"set-warn",children:q?"the background service isn't available on this platform, so scheduled scans can't run here. you can still run one now.":"not-installed"===x.daemon?"the background service isn't installed, so nothing will run on the timer. install it with `failproofai config`.":"the background service is stopped, so nothing will run until it starts. repair it with `failproofai config`."}),J&&(0,t.jsxs)("p",{className:"set-warn",children:["the last scheduled scan exited ",O?.lastExitCode,". the next one will still run."]}),(0,t.jsx)("div",{className:"set-actions",children:(0,t.jsx)("button",{type:"button",className:"btn btn-press",disabled:S,onClick:()=>void H(),children:S?"[ scanning… ]":"[ run a scan now ]"})})]}),(0,t.jsxs)("div",{className:"set-cell set-how",children:[(0,t.jsx)("h2",{className:"set-cell-title",children:"how it works"}),(0,t.jsx)("dl",{className:"set-how-list",children:p.map(e=>(0,t.jsxs)("div",{className:"set-how-row",children:[(0,t.jsx)("dt",{className:"set-how-label",children:e.label}),(0,t.jsx)("dd",{className:"set-how-body",children:e.body})]},e.label))})]})]}),a]}),w&&R>0&&(0,t.jsx)(v,{lastRunAtMs:O?.lastRunAtMs??null,nextDueAtMs:O?.nextDueAtMs??null,now:R})]}),(0,t.jsx)(o.f,{open:A,source:"settings_scheduled_audit",headline:"where should the report go?",subhead:"we'll send a one-time code to confirm.",onClose:()=>$(!1),onAuthed:e=>void Q(e)})]})}],93237)},29054,e=>{e.s(["q",0,function(e,t={},s=15e3){let a=AbortSignal.timeout(s),n=t.signal?AbortSignal.any([t.signal,a]):a;return fetch(e,{...t,signal:n})},"c",0,function(e){if(null===e||"object"!=typeof e)return!1;let t=e.name;return"AbortError"===t||"TimeoutError"===t}])},34713,e=>{e.s(["M",0,function(e){if(e<1e3)return`${e}ms`;let t=Math.round(e/100);if(t<600)return`${(t/10).toFixed(1)}s`;let s=Math.round(e/1e3);if(s<3600){let e=Math.floor(s/60);return`${e}m ${s%60}s`}let a=Math.round(e/6e4),n=Math.floor(a/60);return`${n}h ${a%60}m`},"g",0,function(e){let t=Date.now()-e;return t<6e4?`${Math.max(1,Math.floor(t/1e3))}s ago`:t<36e5?`${Math.floor(t/6e4)}m ago`:t<864e5?`${Math.floor(t/36e5)}h ago`:`${Math.floor(t/864e5)}d ago`}])}])})();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "failproofai",
|
|
3
|
-
"version": "1.0.11-beta.
|
|
3
|
+
"version": "1.0.11-beta.4",
|
|
4
4
|
"description": "Observability and enforcement for AI agent harnesses. 40 built-in policies hooked into 12 of them — Claude Code, Codex, Cursor, Hermes, OpenClaw and more — blocking the tool call before it runs. Local dashboard included, no account needed.",
|
|
5
5
|
"bin": {
|
|
6
6
|
"failproofai": "./dist/cli.mjs",
|
|
@@ -125,15 +125,15 @@
|
|
|
125
125
|
"browserslist": "4.28.8"
|
|
126
126
|
},
|
|
127
127
|
"optionalDependencies": {
|
|
128
|
-
"@failproofai/failproofaid-linux-x64": "1.0.11-beta.
|
|
129
|
-
"@failproofai/failproofaid-linux-arm64": "1.0.11-beta.
|
|
130
|
-
"@failproofai/failproofaid-darwin-x64": "1.0.11-beta.
|
|
131
|
-
"@failproofai/failproofaid-darwin-arm64": "1.0.11-beta.
|
|
128
|
+
"@failproofai/failproofaid-linux-x64": "1.0.11-beta.4",
|
|
129
|
+
"@failproofai/failproofaid-linux-arm64": "1.0.11-beta.4",
|
|
130
|
+
"@failproofai/failproofaid-darwin-x64": "1.0.11-beta.4",
|
|
131
|
+
"@failproofai/failproofaid-darwin-arm64": "1.0.11-beta.4"
|
|
132
132
|
},
|
|
133
133
|
"failproofaidBinaries": {
|
|
134
|
-
"linux-x64": "
|
|
135
|
-
"linux-arm64": "
|
|
136
|
-
"darwin-x64": "
|
|
137
|
-
"darwin-arm64": "
|
|
134
|
+
"linux-x64": "cd8b119c3564df2537c1dffc700931e6a44445acbac3f66d013897513d36ff15",
|
|
135
|
+
"linux-arm64": "1a25a9f0118b727dcdae3154f26907d0733c9bd7bfdf5271bf7d359c7224e93e",
|
|
136
|
+
"darwin-x64": "fc25edbc30ef0505dbf1a3f34064a04b92b4b949f550a48d3bd051b3f5168c5f",
|
|
137
|
+
"darwin-arm64": "c44d4bd89db1532d9307b5d18e5351465d73124e0de5eb367944951393af6b29"
|
|
138
138
|
}
|
|
139
139
|
}
|
|
@@ -9,7 +9,7 @@ const currentPort = parseInt(process.env.PORT, 10) || 3000
|
|
|
9
9
|
const hostname = process.env.HOSTNAME || '0.0.0.0'
|
|
10
10
|
|
|
11
11
|
let keepAliveTimeout = parseInt(process.env.KEEP_ALIVE_TIMEOUT, 10)
|
|
12
|
-
const nextConfig = {"env":{"NEXT_PUBLIC_APP_VERSION":"1.0.11-beta.
|
|
12
|
+
const nextConfig = {"env":{"NEXT_PUBLIC_APP_VERSION":"1.0.11-beta.4"},"typescript":{"ignoreBuildErrors":false},"typedRoutes":false,"distDir":"./.next","cleanDistDir":true,"assetPrefix":"","cacheMaxMemorySize":52428800,"configOrigin":"next.config.ts","useFileSystemPublicRoutes":true,"generateEtags":true,"pageExtensions":["tsx","ts","jsx","js"],"instrumentationClientInject":[],"poweredByHeader":true,"compress":true,"images":{"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":false,"minimumCacheTTL":14400,"formats":["image/webp"],"maximumRedirects":3,"maximumResponseBody":50000000,"dangerouslyAllowLocalIP":false,"dangerouslyAllowSVG":false,"contentSecurityPolicy":"script-src 'none'; frame-src 'none'; sandbox;","contentDispositionType":"attachment","localPatterns":[{"pathname":"**","search":""}],"remotePatterns":[],"qualities":[75],"unoptimized":true,"customCacheHandler":false},"devIndicators":{"position":"bottom-left"},"onDemandEntries":{"maxInactiveAge":60000,"pagesBufferLength":5},"basePath":"","sassOptions":{},"trailingSlash":false,"i18n":null,"productionBrowserSourceMaps":false,"excludeDefaultMomentLocales":true,"reactProductionProfiling":false,"reactStrictMode":null,"reactMaxHeadersLength":6000,"httpAgentOptions":{"keepAlive":true},"logging":{"serverFunctions":true,"browserToTerminal":"warn"},"compiler":{},"expireTime":31536000,"staticPageGenerationTimeout":60,"output":"standalone","modularizeImports":{"@mui/icons-material":{"transform":"@mui/icons-material/{{member}}"},"lodash":{"transform":"lodash/{{member}}"}},"outputFileTracingRoot":"/home/runner/work/failproofai/failproofai","enablePrerenderSourceMaps":true,"cacheComponents":false,"cacheLife":{"default":{"stale":300,"revalidate":900,"expire":4294967294},"seconds":{"stale":30,"revalidate":1,"expire":60},"minutes":{"stale":300,"revalidate":60,"expire":3600},"hours":{"stale":300,"revalidate":3600,"expire":86400},"days":{"stale":300,"revalidate":86400,"expire":604800},"weeks":{"stale":300,"revalidate":604800,"expire":2592000},"max":{"stale":300,"revalidate":2592000,"expire":31536000}},"cacheHandlers":{},"deprecated":{},"experimental":{"agentUpgrade":"security","agentFeedback":false,"coldCacheBadge":false,"collapseAdapterRoutes":true,"devValidationWorker":true,"useSkewCookie":false,"cssChunking":true,"multiZoneDraftMode":false,"appNavFailHandling":false,"parallelRouteMetadata":false,"prerenderEarlyExit":true,"serverMinification":true,"linkNoTouchStart":false,"caseSensitiveRoutes":false,"cachedNavigations":false,"dynamicOnHover":false,"reactBrowserBailout":true,"useOffline":false,"varyParams":true,"optimisticRouting":true,"concurrentRouterQueue":false,"instrumentationClientRouterTransitionEvents":false,"prefetchInlining":{"maxSize":2048,"maxBundleSize":10240},"preloadEntriesOnStart":true,"clientRouterFilter":true,"clientRouterFilterRedirects":false,"fetchCacheKeyPrefix":"","proxyPrefetch":"flexible","optimisticClientCache":true,"manualClientBasePath":false,"cpus":3,"memoryBasedWorkersCount":false,"imgOptConcurrency":null,"imgOptOperationCache":null,"imgOptTimeoutInSeconds":7,"imgOptMaxInputPixels":268402689,"imgOptSequentialRead":null,"imgOptMozjpeg":true,"isrFlushToDisk":true,"workerThreads":false,"optimizeCss":false,"nextScriptWorkers":false,"scrollRestoration":false,"externalDir":false,"devMemoryThresholdRestart":true,"disableOptimizedLoading":false,"gzipSize":true,"craCompat":false,"esmExternals":true,"fullySpecified":false,"swcTraceProfiling":false,"forceSwcTransforms":false,"requestInsights":false,"largePageDataBytes":128000,"typedEnv":false,"parallelServerCompiles":false,"parallelServerBuildTraces":false,"ppr":false,"authInterrupts":false,"webpackMemoryOptimizations":false,"optimizeServerReact":true,"strictRouteTypes":false,"useTypeScriptCli":true,"removeUncaughtErrorAndRejectionListeners":false,"validateRSCRequestHeaders":true,"staleTimes":{"dynamic":0,"static":300},"reactDebugChannel":true,"serverComponentsHmrCache":true,"serverComponentsHmrCancellation":false,"staticGenerationMaxConcurrency":8,"staticGenerationMinPagesPerWorker":25,"transitionIndicator":false,"gestureTransition":false,"inlineCss":false,"useCache":false,"useCacheStaticRootParamTracking":false,"globalNotFound":false,"explicitParallelRouteChildren":true,"strictRouteMatching":true,"browserDebugInfoInTerminal":"warn","lockDistDir":true,"disableResumeDataCacheCompression":false,"proxyClientMaxBodySize":10485760,"hideLogsAfterAbort":false,"mcpServer":true,"exposeRuntimeErrorsToHMR":false,"turbopackFileSystemCacheForDev":true,"turbopackFileSystemCacheForBuild":true,"turbopackStaleOutputMaxAge":604800000,"turbopackInferModuleSideEffects":true,"turbopackPluginRuntimeStrategy":"childProcesses","turbopackSharedRuntime":true,"turbopackMemoryEvictionMode":"auto","optimizePackageImports":["lucide-react","date-fns","lodash-es","ramda","antd","react-bootstrap","ahooks","@ant-design/icons","@headlessui/react","@headlessui-float/react","@heroicons/react/20/solid","@heroicons/react/24/solid","@heroicons/react/24/outline","@visx/visx","@tremor/react","rxjs","@mui/material","@mui/icons-material","recharts","react-use","effect","@effect/schema","@effect/platform","@effect/platform-node","@effect/platform-browser","@effect/platform-bun","@effect/sql","@effect/sql-mssql","@effect/sql-mysql2","@effect/sql-pg","@effect/sql-sqlite-node","@effect/sql-sqlite-bun","@effect/sql-sqlite-wasm","@effect/sql-sqlite-react-native","@effect/rpc","@effect/rpc-http","@effect/typeclass","@effect/experimental","@effect/opentelemetry","@material-ui/core","@material-ui/icons","@tabler/icons-react","mui-core","react-icons/ai","react-icons/bi","react-icons/bs","react-icons/cg","react-icons/ci","react-icons/di","react-icons/fa","react-icons/fa6","react-icons/fc","react-icons/fi","react-icons/gi","react-icons/go","react-icons/gr","react-icons/hi","react-icons/hi2","react-icons/im","react-icons/io","react-icons/io5","react-icons/lia","react-icons/lib","react-icons/lu","react-icons/md","react-icons/pi","react-icons/ri","react-icons/rx","react-icons/si","react-icons/sl","react-icons/tb","react-icons/tfi","react-icons/ti","react-icons/vsc","react-icons/wi"],"useCacheTimeout":54,"instantInsights":{"validationLevel":"warning"},"trustHostHeader":false,"isExperimentalCompile":false},"htmlLimitedBots":"[\\w-]+-Google|Google-[\\w-]+|Chrome-Lighthouse|Slurp|DuckDuckBot|baiduspider|yandex|sogou|bitlybot|tumblr|vkShare|quora link preview|redditbot|ia_archiver|Bingbot|BingPreview|applebot|facebookexternalhit|facebookcatalog|Twitterbot|LinkedInBot|Slackbot|Discordbot|WhatsApp|SkypeUriPreview|Yeti|googleweblight","bundlePagesRouterDependencies":false,"configFileName":"next.config.ts","outputFileTracingExcludes":{"*":["node_modules/@img/**","node_modules/sharp/**"]},"turbopack":{"root":"/home/runner/work/failproofai/failproofai"},"repoRoot":"/home/runner/work/failproofai/failproofai","distDirRoot":".next"}
|
|
13
13
|
|
|
14
14
|
process.env.__NEXT_PRIVATE_STANDALONE_CONFIG = JSON.stringify(nextConfig)
|
|
15
15
|
|
package/dist/cli.mjs
CHANGED
|
@@ -29,7 +29,7 @@ var __esm = (fn, res, err) => () => {
|
|
|
29
29
|
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
30
30
|
|
|
31
31
|
// package.json
|
|
32
|
-
var version2 = "1.0.11-beta.
|
|
32
|
+
var version2 = "1.0.11-beta.4", package_default;
|
|
33
33
|
var init_package = __esm(() => {
|
|
34
34
|
package_default = {
|
|
35
35
|
name: "failproofai",
|
|
@@ -158,16 +158,16 @@ var init_package = __esm(() => {
|
|
|
158
158
|
browserslist: "4.28.8"
|
|
159
159
|
},
|
|
160
160
|
optionalDependencies: {
|
|
161
|
-
"@failproofai/failproofaid-linux-x64": "1.0.11-beta.
|
|
162
|
-
"@failproofai/failproofaid-linux-arm64": "1.0.11-beta.
|
|
163
|
-
"@failproofai/failproofaid-darwin-x64": "1.0.11-beta.
|
|
164
|
-
"@failproofai/failproofaid-darwin-arm64": "1.0.11-beta.
|
|
161
|
+
"@failproofai/failproofaid-linux-x64": "1.0.11-beta.4",
|
|
162
|
+
"@failproofai/failproofaid-linux-arm64": "1.0.11-beta.4",
|
|
163
|
+
"@failproofai/failproofaid-darwin-x64": "1.0.11-beta.4",
|
|
164
|
+
"@failproofai/failproofaid-darwin-arm64": "1.0.11-beta.4"
|
|
165
165
|
},
|
|
166
166
|
failproofaidBinaries: {
|
|
167
|
-
"linux-x64": "
|
|
168
|
-
"linux-arm64": "
|
|
169
|
-
"darwin-x64": "
|
|
170
|
-
"darwin-arm64": "
|
|
167
|
+
"linux-x64": "cd8b119c3564df2537c1dffc700931e6a44445acbac3f66d013897513d36ff15",
|
|
168
|
+
"linux-arm64": "1a25a9f0118b727dcdae3154f26907d0733c9bd7bfdf5271bf7d359c7224e93e",
|
|
169
|
+
"darwin-x64": "fc25edbc30ef0505dbf1a3f34064a04b92b4b949f550a48d3bd051b3f5168c5f",
|
|
170
|
+
"darwin-arm64": "c44d4bd89db1532d9307b5d18e5351465d73124e0de5eb367944951393af6b29"
|
|
171
171
|
}
|
|
172
172
|
};
|
|
173
173
|
});
|
|
@@ -34696,7 +34696,7 @@ async function connectToCloud(input) {
|
|
|
34696
34696
|
prev.jev ? { token: prev.jev.key, url: prev.jev.url } : undefined
|
|
34697
34697
|
].some((slot) => slot && (slot.token !== input.token || !sameOrigin(slot.url)));
|
|
34698
34698
|
const orgSwitch = hadConnection && (prev.org?.id && known?.orgId && prev.org.id !== known.orgId || (!prev.org?.id || !known?.orgId) && keyChanged || previousPolicy && !sameOrigin(previousPolicy.url) || prev.ingest && !sameOrigin(prev.ingest.url));
|
|
34699
|
-
const boundary = orgSwitch
|
|
34699
|
+
const boundary = orgSwitch ? next.connectedAt : prev.org?.since;
|
|
34700
34700
|
if (orgSwitch) {
|
|
34701
34701
|
rmSync14(backfillRequestPath(), { force: true });
|
|
34702
34702
|
const oldOrg = prev.org?.name ?? prev.org?.slug ?? prev.org?.id ?? "the previous org";
|
|
@@ -34727,10 +34727,12 @@ async function connectToCloud(input) {
|
|
|
34727
34727
|
if (prev.jev)
|
|
34728
34728
|
changes.push(`Removed the previous Jev key ${maskToken(prev.jev.key)}: this key's ${PERMISSION_JEV} permission was not verified.`);
|
|
34729
34729
|
}
|
|
34730
|
+
const since = boundary === undefined ? {} : { since: boundary };
|
|
34730
34731
|
if (known) {
|
|
34731
|
-
next.org = { id: known.orgId, slug: known.orgSlug, name: known.orgName, since
|
|
34732
|
+
next.org = { id: known.orgId, slug: known.orgSlug, name: known.orgName, ...since };
|
|
34732
34733
|
} else {
|
|
34733
|
-
|
|
34734
|
+
const { since: _drop, ...kept } = orgSwitch ? {} : prev.org ?? {};
|
|
34735
|
+
next.org = { ...kept, ...since };
|
|
34734
34736
|
}
|
|
34735
34737
|
if (ingestResult.ok && prev.ingest && prev.ingest.key !== input.token) {
|
|
34736
34738
|
recoverCredentialRefusals(Boolean(prev.org?.id && prev.org.id === known?.orgId && sameOrigin(prev.ingest.url)), prev.org?.id);
|
|
@@ -38698,8 +38700,6 @@ ${process.platform} service target.
|
|
|
38698
38700
|
markLauncherSeen();
|
|
38699
38701
|
clearOnboardingAttempt();
|
|
38700
38702
|
const codexTrust = selected.includes("codex") ? codexHookTrust() : undefined;
|
|
38701
|
-
if (codexTrust?.kind === "system")
|
|
38702
|
-
done.push(kit.ok(`Codex hooks are in its system config (${codexTrust.path}), which Codex runs without asking`));
|
|
38703
38703
|
write(doneLines(kit, {
|
|
38704
38704
|
elapsedMs: Date.now() - started,
|
|
38705
38705
|
done,
|
|
@@ -38833,8 +38833,8 @@ function doneLines(kit, state) {
|
|
|
38833
38833
|
} else {
|
|
38834
38834
|
const { count, custom } = enforcingPolicyCount(state.cwd);
|
|
38835
38835
|
const nowhere = codexSkips && agents === 0;
|
|
38836
|
-
if (
|
|
38837
|
-
lines.push(kit.ok(
|
|
38836
|
+
if (count > 0 && !nowhere) {
|
|
38837
|
+
lines.push(kit.ok(custom ? `${count} ${count === 1 ? "policy" : "policies"} and your custom policies are enforcing on ${on}.` : `${count} ${count === 1 ? "policy is" : "policies are"} enforcing on ${on}.`));
|
|
38838
38838
|
}
|
|
38839
38839
|
const failed = failClosedPacks();
|
|
38840
38840
|
if (failed.length > 0) {
|
|
@@ -41698,7 +41698,7 @@ function agentOtelWrites(agent, endpoint, key, local, content, config = {}) {
|
|
|
41698
41698
|
OTEL_METRICS_EXPORTER: "otlp",
|
|
41699
41699
|
OTEL_EXPORTER_OTLP_ENDPOINT: endpoint,
|
|
41700
41700
|
OTEL_EXPORTER_OTLP_PROTOCOL: "http/protobuf",
|
|
41701
|
-
...!local ? { OTEL_EXPORTER_OTLP_HEADERS: `Authorization=Bearer
|
|
41701
|
+
...!local ? { OTEL_EXPORTER_OTLP_HEADERS: `Authorization=Bearer ${key}` } : {},
|
|
41702
41702
|
OTEL_LOG_USER_PROMPTS: content ? "1" : "0",
|
|
41703
41703
|
OTEL_LOG_TOOL_DETAILS: content ? "1" : "0",
|
|
41704
41704
|
OTEL_LOG_TOOL_CONTENT: content ? "1" : "0"
|
|
@@ -41996,9 +41996,6 @@ async function enableAgent(agent, yes, localFlag, content, options) {
|
|
|
41996
41996
|
lines.push(`${AGENT_LABELS[agent]} settings cannot carry an auth header; using the local relay automatically.`);
|
|
41997
41997
|
if (local)
|
|
41998
41998
|
lines.push("The daemon picks this up within seconds — no restart. Use `failproofai otel status` to check the relay.");
|
|
41999
|
-
const result = await introspectKey(origin, key, options.fetchImpl, 3000);
|
|
42000
|
-
if (result.kind === "ok" && result.identity.otelIngest === false)
|
|
42001
|
-
lines.push(OTEL_ORG_OFF);
|
|
42002
41999
|
await options.onEvent?.("otel_enabled", { agent, local, content });
|
|
42003
42000
|
return { lines, exitCode: 0, events: [{ name: "otel_enabled", agent, local, content }] };
|
|
42004
42001
|
}
|
|
@@ -42099,6 +42096,13 @@ async function runOtelCommand(args, options = {}) {
|
|
|
42099
42096
|
if (rest.slice(1).some((x) => !flags.has(x)))
|
|
42100
42097
|
throw new Error("Unexpected positional argument.");
|
|
42101
42098
|
const agents = target === "all" ? [...OTEL_AGENTS] : [target];
|
|
42099
|
+
if (verb === "enable") {
|
|
42100
|
+
const { origin, key } = credential();
|
|
42101
|
+
const org = await introspectKey(origin, key, options.fetchImpl, 3000);
|
|
42102
|
+
if (org.kind === "ok" && org.identity.otelIngest === false) {
|
|
42103
|
+
return { lines: [OTEL_ORG_OFF, "Nothing changed: transcript upload keeps running."], exitCode: 1 };
|
|
42104
|
+
}
|
|
42105
|
+
}
|
|
42102
42106
|
const result = { lines: [], exitCode: 0, events: [] };
|
|
42103
42107
|
for (const agent of agents) {
|
|
42104
42108
|
if (verb === "enable") {
|
|
@@ -49833,10 +49837,8 @@ function renderStatusScreen(facts, opts = {}) {
|
|
|
49833
49837
|
};
|
|
49834
49838
|
const codexValue = () => {
|
|
49835
49839
|
const codex = facts.codex;
|
|
49836
|
-
if (!codex || codex.kind === "none")
|
|
49840
|
+
if (!codex || codex.kind === "none" || codex.kind === "system")
|
|
49837
49841
|
return null;
|
|
49838
|
-
if (codex.kind === "system")
|
|
49839
|
-
return `${kit.on} Enforcing (system config)`;
|
|
49840
49842
|
if (codex.kind === "trusted")
|
|
49841
49843
|
return `${kit.on} Enforcing (hooks trusted)`;
|
|
49842
49844
|
if (codex.kind === "ungated")
|
|
@@ -50200,7 +50202,7 @@ import { realpathSync as realpathSync9 } from "fs";
|
|
|
50200
50202
|
import { dirname as dirname32, resolve as resolve43 } from "path";
|
|
50201
50203
|
import { fileURLToPath as fileURLToPath4 } from "url";
|
|
50202
50204
|
// package.json
|
|
50203
|
-
var version = "1.0.11-beta.
|
|
50205
|
+
var version = "1.0.11-beta.4";
|
|
50204
50206
|
|
|
50205
50207
|
// bin/failproofai.mjs
|
|
50206
50208
|
if (!process.env.FAILPROOFAI_PACKAGE_ROOT) {
|
package/dist/worker.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "failproofai",
|
|
3
|
-
"version": "1.0.11-beta.
|
|
3
|
+
"version": "1.0.11-beta.4",
|
|
4
4
|
"description": "Observability and enforcement for AI agent harnesses. 40 built-in policies hooked into 12 of them — Claude Code, Codex, Cursor, Hermes, OpenClaw and more — blocking the tool call before it runs. Local dashboard included, no account needed.",
|
|
5
5
|
"bin": {
|
|
6
6
|
"failproofai": "./dist/cli.mjs",
|
|
@@ -125,15 +125,15 @@
|
|
|
125
125
|
"browserslist": "4.28.8"
|
|
126
126
|
},
|
|
127
127
|
"optionalDependencies": {
|
|
128
|
-
"@failproofai/failproofaid-linux-x64": "1.0.11-beta.
|
|
129
|
-
"@failproofai/failproofaid-linux-arm64": "1.0.11-beta.
|
|
130
|
-
"@failproofai/failproofaid-darwin-x64": "1.0.11-beta.
|
|
131
|
-
"@failproofai/failproofaid-darwin-arm64": "1.0.11-beta.
|
|
128
|
+
"@failproofai/failproofaid-linux-x64": "1.0.11-beta.4",
|
|
129
|
+
"@failproofai/failproofaid-linux-arm64": "1.0.11-beta.4",
|
|
130
|
+
"@failproofai/failproofaid-darwin-x64": "1.0.11-beta.4",
|
|
131
|
+
"@failproofai/failproofaid-darwin-arm64": "1.0.11-beta.4"
|
|
132
132
|
},
|
|
133
133
|
"failproofaidBinaries": {
|
|
134
|
-
"linux-x64": "
|
|
135
|
-
"linux-arm64": "
|
|
136
|
-
"darwin-x64": "
|
|
137
|
-
"darwin-arm64": "
|
|
134
|
+
"linux-x64": "cd8b119c3564df2537c1dffc700931e6a44445acbac3f66d013897513d36ff15",
|
|
135
|
+
"linux-arm64": "1a25a9f0118b727dcdae3154f26907d0733c9bd7bfdf5271bf7d359c7224e93e",
|
|
136
|
+
"darwin-x64": "fc25edbc30ef0505dbf1a3f34064a04b92b4b949f550a48d3bd051b3f5168c5f",
|
|
137
|
+
"darwin-arm64": "c44d4bd89db1532d9307b5d18e5351465d73124e0de5eb367944951393af6b29"
|
|
138
138
|
}
|
|
139
139
|
}
|
|
@@ -322,7 +322,10 @@ export async function connectToCloud(input: ConnectInput): Promise<ConnectOutcom
|
|
|
322
322
|
(previousPolicy && !sameOrigin(previousPolicy.url)) ||
|
|
323
323
|
(prev.ingest && !sameOrigin(prev.ingest.url))
|
|
324
324
|
);
|
|
325
|
-
|
|
325
|
+
// Only a switch draws a line. A first connect, or a machine upgrading from a
|
|
326
|
+
// version that kept no boundary, has nothing to keep apart: it backfills its
|
|
327
|
+
// window and sends what is queued, as before.
|
|
328
|
+
const boundary = orgSwitch ? next.connectedAt : prev.org?.since;
|
|
326
329
|
if (orgSwitch) {
|
|
327
330
|
rmSync(backfillRequestPath(), { force: true });
|
|
328
331
|
const oldOrg = prev.org?.name ?? prev.org?.slug ?? prev.org?.id ?? "the previous org";
|
|
@@ -358,10 +361,12 @@ export async function connectToCloud(input: ConnectInput): Promise<ConnectOutcom
|
|
|
358
361
|
delete next.jev;
|
|
359
362
|
if (prev.jev) changes.push(`Removed the previous Jev key ${maskToken(prev.jev.key)}: this key's ${PERMISSION_JEV} permission was not verified.`);
|
|
360
363
|
}
|
|
364
|
+
const since = boundary === undefined ? {} : { since: boundary };
|
|
361
365
|
if (known) {
|
|
362
|
-
next.org = { id: known.orgId, slug: known.orgSlug, name: known.orgName, since
|
|
366
|
+
next.org = { id: known.orgId, slug: known.orgSlug, name: known.orgName, ...since };
|
|
363
367
|
} else {
|
|
364
|
-
|
|
368
|
+
const { since: _drop, ...kept } = orgSwitch ? {} : (prev.org ?? {});
|
|
369
|
+
next.org = { ...kept, ...since };
|
|
365
370
|
}
|
|
366
371
|
if (ingestResult.ok && prev.ingest && prev.ingest.key !== input.token) {
|
|
367
372
|
recoverCredentialRefusals(Boolean(prev.org?.id && prev.org.id === known?.orgId && sameOrigin(prev.ingest.url)), prev.org?.id);
|
|
@@ -560,8 +560,8 @@ export function renderStatusScreen(facts: StatusFacts, opts: ScreenKitOpts & { c
|
|
|
560
560
|
// because hooks being written does not make them run.
|
|
561
561
|
const codexValue = (): string | null => {
|
|
562
562
|
const codex = facts.codex;
|
|
563
|
-
|
|
564
|
-
if (codex.kind === "
|
|
563
|
+
// Hooks in Codex's system config always run: nothing to say.
|
|
564
|
+
if (!codex || codex.kind === "none" || codex.kind === "system") return null;
|
|
565
565
|
if (codex.kind === "trusted") return `${kit.on} Enforcing (hooks trusted)`;
|
|
566
566
|
if (codex.kind === "ungated") return `${kit.on} Enforcing`;
|
|
567
567
|
return `${kit.off} Not enforcing: ${codex.untrusted === codex.total ? "hooks not trusted" : `${codex.untrusted} of ${codex.total} hooks not trusted`}`;
|