failproofai 1.0.12-beta.1 → 1.0.12-beta.2

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.
Files changed (168) hide show
  1. package/.next/standalone/.next/BUILD_ID +1 -1
  2. package/.next/standalone/.next/build-manifest.json +3 -3
  3. package/.next/standalone/.next/prerender-manifest.json +3 -3
  4. package/.next/standalone/.next/required-server-files.json +1 -1
  5. package/.next/standalone/.next/server/app/_global-error/page/server-reference-manifest.json +1 -1
  6. package/.next/standalone/.next/server/app/_global-error/page.js.nft.json +1 -1
  7. package/.next/standalone/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
  8. package/.next/standalone/.next/server/app/_global-error.html +1 -1
  9. package/.next/standalone/.next/server/app/_global-error.rsc +2 -2
  10. package/.next/standalone/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +2 -2
  11. package/.next/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +2 -2
  12. package/.next/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  13. package/.next/standalone/.next/server/app/_not-found/page/server-reference-manifest.json +1 -1
  14. package/.next/standalone/.next/server/app/_not-found/page.js.nft.json +1 -1
  15. package/.next/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  16. package/.next/standalone/.next/server/app/_not-found.html +1 -1
  17. package/.next/standalone/.next/server/app/_not-found.rsc +3 -3
  18. package/.next/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +3 -3
  19. package/.next/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +2 -2
  20. package/.next/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
  21. package/.next/standalone/.next/server/app/api/audit/invite/route.js.nft.json +1 -1
  22. package/.next/standalone/.next/server/app/api/audit/run/route.js.nft.json +1 -1
  23. package/.next/standalone/.next/server/app/api/audit/status/route.js.nft.json +1 -1
  24. package/.next/standalone/.next/server/app/api/auth/login-request/route.js.nft.json +1 -1
  25. package/.next/standalone/.next/server/app/api/auth/login-verify/route.js.nft.json +1 -1
  26. package/.next/standalone/.next/server/app/api/auth/logout/route.js.nft.json +1 -1
  27. package/.next/standalone/.next/server/app/api/auth/status/route.js.nft.json +1 -1
  28. package/.next/standalone/.next/server/app/api/download/[project]/[session]/route.js.nft.json +1 -1
  29. package/.next/standalone/.next/server/app/audit/page/server-reference-manifest.json +2 -2
  30. package/.next/standalone/.next/server/app/audit/page.js.nft.json +1 -1
  31. package/.next/standalone/.next/server/app/audit/page_client-reference-manifest.js +1 -1
  32. package/.next/standalone/.next/server/app/index.html +1 -1
  33. package/.next/standalone/.next/server/app/index.rsc +3 -3
  34. package/.next/standalone/.next/server/app/index.segments/__PAGE__.segment.rsc +2 -2
  35. package/.next/standalone/.next/server/app/index.segments/_full.segment.rsc +3 -3
  36. package/.next/standalone/.next/server/app/index.segments/_tree.segment.rsc +1 -1
  37. package/.next/standalone/.next/server/app/page/server-reference-manifest.json +1 -1
  38. package/.next/standalone/.next/server/app/page.js.nft.json +1 -1
  39. package/.next/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
  40. package/.next/standalone/.next/server/app/policies/page/server-reference-manifest.json +14 -14
  41. package/.next/standalone/.next/server/app/policies/page.js +2 -2
  42. package/.next/standalone/.next/server/app/policies/page.js.nft.json +1 -1
  43. package/.next/standalone/.next/server/app/policies/page_client-reference-manifest.js +1 -1
  44. package/.next/standalone/.next/server/app/project/[name]/page/server-reference-manifest.json +1 -1
  45. package/.next/standalone/.next/server/app/project/[name]/page.js.nft.json +1 -1
  46. package/.next/standalone/.next/server/app/project/[name]/page_client-reference-manifest.js +1 -1
  47. package/.next/standalone/.next/server/app/project/[name]/session/[sessionId]/page/react-loadable-manifest.json +2 -2
  48. package/.next/standalone/.next/server/app/project/[name]/session/[sessionId]/page/server-reference-manifest.json +2 -2
  49. package/.next/standalone/.next/server/app/project/[name]/session/[sessionId]/page.js.nft.json +1 -1
  50. package/.next/standalone/.next/server/app/project/[name]/session/[sessionId]/page_client-reference-manifest.js +1 -1
  51. package/.next/standalone/.next/server/app/projects/page/server-reference-manifest.json +1 -1
  52. package/.next/standalone/.next/server/app/projects/page.js.nft.json +1 -1
  53. package/.next/standalone/.next/server/app/projects/page_client-reference-manifest.js +1 -1
  54. package/.next/standalone/.next/server/app/settings/page/server-reference-manifest.json +8 -8
  55. package/.next/standalone/.next/server/app/settings/page.js.nft.json +1 -1
  56. package/.next/standalone/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  57. package/.next/standalone/.next/server/chunks/_0tovk6q0miud6._.js +1 -1
  58. package/.next/standalone/.next/server/chunks/_0trp3ycqv17cl._.js +1 -1
  59. package/.next/standalone/.next/server/chunks/_1ek68lnh2daur._.js +2 -2
  60. package/.next/standalone/.next/server/chunks/package_json_[json]_cjs_1nxcc4vkpxxu7._.js +1 -1
  61. package/.next/standalone/.next/server/chunks/src_hooks_0_em82s16zfym._.js +1 -1
  62. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__00l2u6j86cb8y._.js +3 -0
  63. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__08ch3staq3ejw._.js +1 -1
  64. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0bigvy9xmv2ka._.js +1 -1
  65. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0h86bl2qf0k_o._.js +1 -1
  66. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0pia5h3p8re4c._.js +1 -1
  67. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0pwj2h2efe5f-._.js +1 -1
  68. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1-ey9fgesfbc0._.js +1 -1
  69. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__15usvs-ms-0hf._.js +1 -1
  70. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__16gb3_92zvk5x._.js +1 -1
  71. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1avi2kypusyb_._.js +1 -1
  72. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1r7drlqli-ado._.js +1 -1
  73. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0b78b0j8iyv6l._.js → [root-of-the-server]__1vofkb2oq7p7e._.js} +1 -1
  74. package/.next/standalone/.next/server/chunks/ssr/_0bseae9u7g98r._.js +1 -1
  75. package/.next/standalone/.next/server/chunks/ssr/_0eoura3_9gjb-._.js +1 -1
  76. package/.next/standalone/.next/server/chunks/ssr/_0mouhaflye1ro._.js +1 -1
  77. package/.next/standalone/.next/server/chunks/ssr/{_1a3tubds7s7ow._.js → _0ouu886szh6yj._.js} +4 -4
  78. package/.next/standalone/.next/server/chunks/ssr/_0pedwblqdoh58._.js +1 -1
  79. package/.next/standalone/.next/server/chunks/ssr/_1djqs9i27e4kg._.js +1 -1
  80. package/.next/standalone/.next/server/chunks/ssr/_1fw0_nzkae5ao._.js +3 -0
  81. package/.next/standalone/.next/server/chunks/ssr/_20hn4gn87nsjc._.js +1 -1
  82. package/.next/standalone/.next/server/chunks/ssr/_next-internal_server_app_policies_page_actions_1sp2-yo5_vm5f.js +2 -2
  83. package/.next/standalone/.next/server/chunks/ssr/app_actions_get-scheduled-audit_ts_0ei9snixb5fd-._.js +1 -1
  84. package/.next/standalone/.next/server/chunks/ssr/app_audit__components_audit-dashboard_tsx_0p9ud47q0xq5w._.js +1 -1
  85. package/.next/standalone/.next/server/chunks/ssr/app_components_project-list_tsx_1ke6anr0vt64h._.js +1 -1
  86. package/.next/standalone/.next/server/chunks/ssr/app_global-error_tsx_1kp6l3x33jqb6._.js +1 -1
  87. package/.next/standalone/.next/server/chunks/ssr/app_policies_hooks-client_tsx_19dqvpcz0uxur._.js +2 -2
  88. package/.next/standalone/.next/server/chunks/ssr/app_settings_02tf1h47jmhhd._.js +1 -1
  89. package/.next/standalone/.next/server/chunks/ssr/{node_modules_html-to-image_es_index_1i8oid1gc7s1f.js → node_modules_html-to-image_es_index_1fv03uigni8s5.js} +1 -1
  90. package/.next/standalone/.next/server/chunks/ssr/node_modules_next_dist_0janj0i6dqko7._.js +1 -1
  91. package/.next/standalone/.next/server/chunks/ssr/package_json_[json]_cjs_013tntikdft59._.js +1 -1
  92. package/.next/standalone/.next/server/chunks/ssr/src_hooks_0agdmptetetdt._.js +1 -1
  93. package/.next/standalone/.next/server/chunks/ssr/src_hooks_0mdwgjisv4fub._.js +1 -1
  94. package/.next/standalone/.next/server/chunks/ssr/src_hooks_fp-config_ts_04t589gp4p60j._.js +1 -1
  95. package/.next/standalone/.next/server/chunks/ssr/src_hooks_pack-cli_ts_0t7me658zqmh_._.js +1 -1
  96. package/.next/standalone/.next/server/middleware-build-manifest.js +3 -3
  97. package/.next/standalone/.next/server/pages/404.html +1 -1
  98. package/.next/standalone/.next/server/pages/500.html +1 -1
  99. package/.next/standalone/.next/server/preview-props.json +3 -3
  100. package/.next/standalone/.next/server/server-reference-manifest.js +1 -1
  101. package/.next/standalone/.next/server/server-reference-manifest.json +23 -23
  102. package/.next/standalone/.next/static/chunks/{2-tf6_7u623kd.js → 0ay__-d2h1xb5.js} +1 -1
  103. package/.next/standalone/.next/static/chunks/{18433qz-8njv3.js → 0tbm3vjm62h-2.js} +1 -1
  104. package/.next/standalone/.next/static/chunks/{1b32-afqacaen.js → 1c_jf6g5wnslk.js} +1 -1
  105. package/.next/standalone/.next/static/chunks/{0_zfad4co-t2z.js → 1my3-5p47t7r-.js} +1 -1
  106. package/.next/standalone/.next/static/chunks/{0jutamwqz8pg5.js → 20py8k1gd_i1m.js} +1 -1
  107. package/.next/standalone/.next/static/chunks/21hckpmsc4g70.js +6 -0
  108. package/.next/standalone/.next/static/chunks/2hmex93ppj1ke.js +1 -0
  109. package/.next/standalone/.next/static/chunks/{42e8zab314654.js → 2o6d37j425uci.js} +1 -1
  110. package/.next/standalone/.next/static/chunks/40oworn_-x12p.js +1 -0
  111. package/.next/standalone/.next/static/chunks/{24w3x2da9sk49.js → 42xptz88mtq3x.js} +1 -1
  112. package/.next/standalone/app/actions/update-jev-config.ts +5 -3
  113. package/.next/standalone/app/settings/jev-panel.tsx +1 -1
  114. package/.next/standalone/fp-cloud-cli/CHANGELOG.md +9 -18
  115. package/.next/standalone/fp-cloud-cli/README.md +7 -9
  116. package/.next/standalone/fp-cloud-cli/fp_cli/client.py +1 -27
  117. package/.next/standalone/fp-cloud-cli/fp_cli/commands/fleet_cmds.py +12 -216
  118. package/.next/standalone/fp-cloud-cli/fp_cli/enforcement.py +7 -53
  119. package/.next/standalone/fp-cloud-cli/fp_cli/output.py +2 -71
  120. package/.next/standalone/fp-cloud-cli/skill/SKILL.md +1 -1
  121. package/.next/standalone/fp-cloud-cli/skill/references/commands.md +6 -7
  122. package/.next/standalone/fp-cloud-cli/tests/test_cloud_jev.py +32 -197
  123. package/.next/standalone/hermes-plugin/__init__.py +11 -0
  124. package/.next/standalone/hermes-plugin/plugin.yaml +1 -1
  125. package/.next/standalone/package.json +11 -10
  126. package/.next/standalone/sdk/python/uv.lock +31 -8
  127. package/.next/standalone/server.js +1 -1
  128. package/dist/cli.mjs +1686 -612
  129. package/dist/worker.mjs +354 -49
  130. package/hermes-plugin/__init__.py +11 -0
  131. package/hermes-plugin/plugin.yaml +1 -1
  132. package/package.json +11 -10
  133. package/src/audit/open-browser.ts +24 -7
  134. package/src/hooks/agent-roster.ts +9 -1
  135. package/src/hooks/agent-skill.ts +203 -0
  136. package/src/hooks/cloud-connection.ts +27 -51
  137. package/src/hooks/cloud-introspect.ts +5 -2
  138. package/src/hooks/cloud-login.ts +248 -0
  139. package/src/hooks/cloud-managed-policies.ts +54 -4
  140. package/src/hooks/codex-system-hooks.ts +10 -4
  141. package/src/hooks/config-status.ts +9 -3
  142. package/src/hooks/configure-wizard.ts +356 -32
  143. package/src/hooks/delivery-health.ts +47 -2
  144. package/src/hooks/effective-reviewers.ts +14 -0
  145. package/src/hooks/fp-config.ts +19 -0
  146. package/src/hooks/handler.ts +21 -2
  147. package/src/hooks/hook-activity-store.ts +7 -1
  148. package/src/hooks/integrations.ts +18 -3
  149. package/src/hooks/jev-activity.ts +117 -1
  150. package/src/hooks/jev-cli.ts +7 -9
  151. package/src/hooks/manager.ts +80 -46
  152. package/src/hooks/policy-evaluator.ts +17 -0
  153. package/src/hooks/policy-reviewability.ts +4 -2
  154. package/src/hooks/semantic/cloud-jev.ts +219 -28
  155. package/src/hooks/semantic/combine.ts +26 -1
  156. package/src/hooks/semantic/jev-client.ts +1 -1
  157. package/src/hooks/semantic/jev-config.ts +6 -27
  158. package/src/hooks/semantic/jev-review.ts +90 -2
  159. package/src/hooks/tui.ts +280 -0
  160. package/src/hooks/uninstall-cli.ts +12 -1
  161. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0588st-tpiuia._.js +0 -3
  162. package/.next/standalone/.next/server/chunks/ssr/_128ebxr83nk6g._.js +0 -3
  163. package/.next/standalone/.next/static/chunks/114hbolvrv94e.js +0 -1
  164. package/.next/standalone/.next/static/chunks/1p-hsi58i-6h0.js +0 -6
  165. package/.next/standalone/.next/static/chunks/3-pku9qwv1yfu.js +0 -1
  166. /package/.next/standalone/.next/static/{xq8UgF5yFxty1VWxY2hyn → LHCtFxVG0mdvd4lsXAOFC}/_buildManifest.js +0 -0
  167. /package/.next/standalone/.next/static/{xq8UgF5yFxty1VWxY2hyn → LHCtFxVG0mdvd4lsXAOFC}/_clientMiddlewareManifest.js +0 -0
  168. /package/.next/standalone/.next/static/{xq8UgF5yFxty1VWxY2hyn → LHCtFxVG0mdvd4lsXAOFC}/_ssgManifest.js +0 -0
@@ -1,4 +1,4 @@
1
- (()=>{"use strict";module.exports=[16560,38441,e=>{let t=["claude","codex","copilot","cursor","opencode","pi","hermes","openclaw","factory","devin","antigravity","goose"],r=["SessionStart","SessionEnd","UserPromptSubmit","PreToolUse","PermissionRequest","PermissionDenied","PostToolUse","PostToolUseFailure","Notification","SubagentStart","SubagentStop","TaskCreated","TaskCompleted","Stop","StopFailure","TeammateIdle","InstructionsLoaded","ConfigChange","CwdChanged","FileChanged","WorktreeCreate","WorktreeRemove","PreCompact","PostCompact","Elicitation","ElicitationResult","UserPromptExpansion","PostToolBatch","Setup"].filter(e=>"WorktreeCreate"!==e);e.s(["X",0,["PreToolUse","PostToolUse","PreInvocation","Stop"],"m",0,["user","project"],"H",0,{Bash:{CommandLine:"command",Cwd:"cwd"},Write:{TargetFile:"file_path",CodeContent:"content"},Edit:{TargetFile:"file_path"},Read:{TargetFile:"file_path",AbsolutePath:"file_path",File:"file_path"}},"I",0,{run_command:"Bash",write_to_file:"Write",read_file:"Read",view_file:"Read",edit_file:"Edit",replace_file_content:"Edit",list_dir:"LS",find_by_name:"Glob",grep_search:"Grep",read_url_content:"WebFetch",search_web:"WebSearch"},"J",0,r,"p",0,{session_start:"SessionStart",pre_tool_use:"PreToolUse",permission_request:"PermissionRequest",post_tool_use:"PostToolUse",user_prompt_submit:"UserPromptSubmit",stop:"Stop",subagent_start:"SubagentStart",pre_compact:"PreCompact",post_compact:"PostCompact",subagent_stop:"SubagentStop"},"W",0,["session_start","pre_tool_use","permission_request","post_tool_use","user_prompt_submit","stop","subagent_start","pre_compact","post_compact","subagent_stop"],"L",0,["user","project"],"j",0,{apply_patch:"Edit",write_stdin:"Bash"},"d",0,["SessionStart","SessionEnd","UserPromptSubmit","PreToolUse","PostToolUse","Stop","SubagentStop","PostToolUseFailure","ErrorOccurred","PreCompact","PermissionRequest","Notification"],"w",0,["user","project"],"U",0,{Read:{path:"file_path"},Write:{path:"file_path",file_text:"content"},Edit:{path:"file_path",old_str:"old_string",new_str:"new_string"}},"s",0,{bash:"Bash",powershell:"Bash",list_bash:"Bash",read_bash:"Bash",stop_bash:"Bash",write_bash:"Bash",list_powershell:"Bash",read_powershell:"Bash",stop_powershell:"Bash",write_powershell:"Bash",read:"Read",view:"Read",show_file:"Read",write:"Write",create:"Write",edit:"Edit",apply_patch:"Edit",str_replace_editor:"Edit",glob:"Glob",grep:"Grep",rg:"Grep",ls:"LS",web_fetch:"WebFetch"},"t",0,["sessionStart","sessionEnd","beforeSubmitPrompt","preToolUse","postToolUse","stop","subagentStop"],"Y",0,["user","project"],"D",0,{Shell:"Bash"},"E",0,["SessionStart","UserPromptSubmit","PreToolUse","PostToolUse","PermissionRequest","Stop","SessionEnd"],"c",0,["user","project"],"u",0,{exec:"Bash"},"n",0,["SessionStart","UserPromptSubmit","PreToolUse","PostToolUse","Notification","Stop","SubagentStop","PreCompact","SessionEnd"],"B",0,["user","project"],"r",0,{Execute:"Bash",Read:"Read",Edit:"Edit",Create:"Write",Grep:"Grep",Glob:"Glob",LS:"LS",FetchUrl:"WebFetch",WebSearch:"WebSearch",TodoWrite:"TodoWrite",Task:"Task"},"Z",0,"__failproofai_hook__","i",0,["SessionStart","UserPromptSubmit","PreToolUse","PostToolUse","SessionEnd"],"x",0,["user","project"],"M",0,{Read:{path:"file_path",source:"file_path"},Write:{path:"file_path"},Edit:{path:"file_path"},LS:{path:"file_path"}},"K",0,{shell:"Bash",write:"Write",edit:"Edit",view:"Read",read_image:"Read",glob:"Glob",grep:"Grep",tree:"LS",delegate:"Task",todo__todo_write:"TodoWrite"},"y",0,["pre_tool_call","post_tool_call","on_session_start","on_session_end","subagent_stop"],"N",0,["user"],"z",0,{Read:{path:"file_path"},Write:{path:"file_path"},Edit:{path:"file_path"}},"C",0,{terminal:"Bash",bash:"Bash",read_file:"Read",write_file:"Write",patch:"Edit",web_search:"WebSearch",web_extract:"WebFetch",search_files:"Grep",todo:"TodoWrite",todo_list:"TodoWrite",process_manage:"process",cronjob_manage:"cronjob"},"F",0,["user","project","local"],"_",0,t,"P",0,["before_tool_call","after_tool_call","before_agent_run","before_agent_finalize","session_start","session_end","subagent_ended","before_compaction"],"G",0,["user"],"v",0,{Read:{path:"file_path"},Write:{path:"file_path"},Edit:{path:"file_path"}},"e",0,{exec:"Bash",read:"Read",write:"Write",edit:"Edit",grep:"Grep",glob:"Glob",web_search:"WebSearch",web_fetch:"WebFetch"},"f",0,["tool.execute.before","tool.execute.after","session.created","session.deleted","session.idle","message.updated","permission.ask"],"O",0,["user","project"],"k",0,{Read:{filePath:"file_path"},Write:{filePath:"file_path"},Edit:{filePath:"file_path",oldString:"old_string",newString:"new_string",replaceAll:"replace_all"}},"A",0,{bash:"Bash",read:"Read",write:"Write",edit:"Edit",apply_patch:"Edit",glob:"Glob",grep:"Grep",list:"LS",webfetch:"WebFetch",websearch:"WebSearch",todowrite:"TodoWrite",todoread:"TodoRead"},"Q",0,["session_start","session_shutdown","input","tool_call","user_bash","tool_result","agent_end"],"R",0,["user","project"],"V",0,{Read:{path:"file_path"},Write:{path:"file_path"},Edit:{path:"file_path"}},"S",0,{bash:"Bash",read:"Read",write:"Write",edit:"Edit",glob:"Glob",grep:"Grep"}],38441);let i=/^agt_[0-9a-f]{16,32}$/,o=new Set(t);e.s(["i",0,function(e,t){return void 0===e||!!(!(!t||"object"!=typeof t||Array.isArray(t))&&Object.keys(t).every(e=>"integration"===e||"instanceId"===e)&&"string"==typeof t.integration&&o.has(t.integration)&&"string"==typeof t.instanceId&&i.test(t.instanceId))&&e.some(e=>e.integration===t.integration&&(void 0===e.instanceId||e.instanceId===t.instanceId))},"P",0,function(e,t){if(null==e)return;if(t<3||!Array.isArray(e)||e.length<1||e.length>32)throw Error("invalid agentTargets in cloud-managed active manifest");let r=new Set;return e.map(e=>{if(!e||"object"!=typeof e||Array.isArray(e)||Object.keys(e).some(e=>"integration"!==e&&"instanceId"!==e)||"string"!=typeof e.integration||!o.has(e.integration)||void 0!==e.instanceId&&("string"!=typeof e.instanceId||!i.test(e.instanceId)))throw Error("invalid agentTargets in cloud-managed active manifest");let t=`${e.integration}\0${e.instanceId??""}`;if(r.has(t))throw Error("duplicate agentTargets in cloud-managed active manifest");return r.add(t),{integration:e.integration,...void 0!==e.instanceId?{instanceId:e.instanceId}:{}}})}],16560)},16774,99891,98901,52306,e=>{let t;var r=e.i(66680),i=e.i(2157),o=e.i(50227),a=e.i(24214),n=e.i(79857),s=e.i(16560);e.i(97348);let l=new Set(["destructive-deletion","production-infra-change","git-history-rewrite","push-to-protected-branch","commit-on-protected-branch","secret-exposure","credential-exfiltration","remote-code-execution","privilege-escalation","database-destruction","read-outside-workspace","agent-config-tampering","system-modification","env-secrets-dump","external-destructive-action","external-data-egress"]),c=new Set,d=e=>"string"==typeof e&&e.length>0;function f(e){let t={};("hard"===e.authority||"reviewable"===e.authority)&&(t.authority=e.authority);let r=e.reviewedBy;return Array.isArray(r)&&r.length>0&&r.every(d)&&(t.reviewedBy=[...r]),t}e.s(["_",0,c,"g",0,l,"i",0,f,"d",0,function(e,t=c,r){let i=e?.authority==="reviewable";if(!e||"hard"==(!0!==e.alwaysOn&&"reviewable"===e.authority&&Array.isArray(e.reviewedBy)&&e.reviewedBy.filter(e=>"string"==typeof e&&e.length>0).length>0?"reviewable":"hard")){var o;return i?{authority:"hard",downgraded:!0===(o=e).alwaysOn?"it is alwaysOn, and the self-protection guard is never reviewable":Array.isArray(o.reviewedBy)&&0!==o.reviewedBy.length?"reviewedBy is not a list of semantic policy names":"reviewedBy does not name any semantic policy"}:{authority:"hard"}}let a=e.reviewedBy;if(!a.every(d))return{authority:"hard",downgraded:"reviewedBy is not a list of semantic policy names"};let n=a.filter(e=>!t.has(e));return 0!==t.size||n.some(e=>r?.has(e))?n.length>0?{authority:"hard",downgraded:`reviewedBy names ${n.map(e=>(function(e,t,r){let i=JSON.stringify(e),o=r?.get(e);if(o)return`${i}, which packs ${o.join(" and ")} declare differently, so it is asked for neither`;if(t===l)return`${i}, which is not a semantic policy in this build`;let a=[...t].sort(),n=a.length>6?`${a.slice(0,6).join(", ")} and ${a.length-6} more`:a.join(", ");return`${i}, which is not among the Jev checks it is judged against (${n})`})(e,t,r)).join("; ")}`}:{authority:"reviewable",reviewedBy:[...new Set(a)]}:{authority:"hard"}}],99891);let p=[1,2,3],h=null;function u(){if(function(){try{let e=JSON.parse((0,i.readFileSync)((0,n.y)(),"utf8"));if(!e||"object"!=typeof e||Array.isArray(e))return!1;let t=e.mode;return!!t&&"object"==typeof t&&!Array.isArray(t)&&"oss"===t.kind}catch{return!1}}()){h=null;return}let e=(0,o.resolve)(process.env.FAILPROOFAI_CLOUD_POLICY_DIR??(0,n.I)(),"active.json"),t=function(e){try{let t=(0,i.statSync)(e,{bigint:!0});return`${t.dev}:${t.ino}:${t.mode}:${t.size}:${t.mtimeNs}:${t.ctimeNs}`}catch(t){let e=t.code;if("ENOENT"===e||"ENOTDIR"===e)return null;throw t}}(e);if(null===t){h=null;return}if(h&&h.path===e&&h.version===t)return h.value;let r=JSON.parse((0,i.readFileSync)(e,"utf8"));return h={path:e,version:t,value:r},r}let m=/^cloud:[^/]+\/./,y=/^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[A-Za-z-][0-9A-Za-z-]*)(?:\.(?:0|[1-9]\d*|\d*[A-Za-z-][0-9A-Za-z-]*))*))?(?:\+([0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*))?$/,g=/^(?:0|[1-9]\d*)$/;function b(e){if("string"!=typeof e)return null;let t=y.exec(e);return t?{major:Number(t[1]),minor:Number(t[2]),patch:Number(t[3]),prerelease:void 0===t[4]?[]:t[4].split(".").map(e=>g.test(e)?Number(e):e)}:null}let w=(e,t)=>e<t?-1:+(e>t),_=["always","protected_branch","in_git_repo","has_paths","paths_outside_project","system_or_root_paths"];function v(e){return"string"==typeof e&&_.includes(e)}e.s(["B",0,_,"M",0,v],98901);let $=[1],S=/^[a-f0-9]{64}$/,E=/^[A-Za-z0-9._-]{1,64}\/[A-Za-z0-9._-]{1,64}$/,A=/^[A-Za-z0-9][A-Za-z0-9._+-]{0,63}$/,O=/^[0-9a-f]{7,40}$/,P=/^[A-Za-z0-9._-]{1,128}$/,j=/^[a-z][a-z0-9_]{0,31}$/,k=new Set(["exempt","user_asked"]),T=new Set(["shell","write","read","network","other"]),I=new Set(["string","number","boolean","string[]","pattern[]"]);function R(e,t,r,i){if("string"!=typeof r||0===r.length)throw Error(`${e} is missing ${t}`);if(r.length>i)throw Error(`${e} has a ${t} of ${r.length} characters, over the ${i}-character cap`);return r}function F(e,t,r){let i;if(!t||"object"!=typeof t||Array.isArray(t))throw Error(`${e} is not an object`);if(null!==r)i=r;else{if("string"!=typeof t.id||!j.test(t.id))throw Error(`${e} has an unsafe id ${JSON.stringify(t.id)}`);if(k.has(t.id))throw Error(`${e} uses the reserved probe id ${JSON.stringify(t.id)}`);i=t.id}let o=R(e,"instructions",t.instructions,600);if(void 0===t.criteria)return{id:i,instructions:o};if(!t.criteria||"object"!=typeof t.criteria||Array.isArray(t.criteria))throw Error(`${e} has criteria that is not an object`);let a=t.criteria;return{id:i,instructions:o,criteria:{true:R(e,"criteria.true",a.true,300),false:R(e,"criteria.false",a.false,300)}}}function W(){let e,t=process.env.FAILPROOFAI_PACK_DIR?(0,o.resolve)(process.env.FAILPROOFAI_PACK_DIR,"installed.json"):(0,n.v)();if(!(0,i.existsSync)(t))return{packs:[],errors:[]};try{e=JSON.parse((0,i.readFileSync)(t,"utf8"))}catch(e){return{packs:[],errors:[{id:null,reason:`unreadable pack manifest: ${C(e)}`}]}}if(!e||"object"!=typeof e)return{packs:[],errors:[{id:null,reason:"pack manifest is not an object"}]};let s=e;if(!$.includes(s.schemaVersion))return{packs:[],errors:[{id:null,reason:`unsupported pack manifest schema ${String(s.schemaVersion)} (supported: ${$.join(", ")})`}]};if(!Array.isArray(s.packs))return{packs:[],errors:[{id:null,reason:"pack manifest packs is not an array"}]};let l=process.env.FAILPROOFAI_PACK_DIR??(0,n.n)(),c=[],d=[],p=[],h=new Set;for(let e of s.packs){let t=e&&"object"==typeof e&&"string"==typeof e.id?e.id:null,n=[];try{let t=function(e,t,n){if(!t||"object"!=typeof t)throw Error("pack entry is not an object");let s=function(e){if("string"!=typeof e.id||!E.test(e.id))throw Error(`unsafe pack id ${JSON.stringify(e.id)}`);if("string"!=typeof e.version||!A.test(e.version))throw Error(`invalid version for pack ${e.id}`);if(void 0!==e.effect&&"enforce"!==e.effect&&"observe"!==e.effect)throw Error(`unknown effect ${JSON.stringify(e.effect)} for pack ${e.id}`);let t="string"==typeof e.commit&&O.test(e.commit.trim().toLowerCase())?e.commit.trim().toLowerCase():void 0;return{id:e.id,version:e.version,effect:e.effect??"enforce",...t?{commit:t}:{}}}(t);if("string"!=typeof t.source||0===t.source.length)throw Error(`pack ${t.id} has no source`);if("string"!=typeof t.sha256||!S.test(t.sha256))throw Error(`invalid SHA-256 for pack ${t.id}`);let l=s.effect,c=function(e,t,r=a.version){if(void 0===t)return{kind:"satisfied"};let i=function(e,t){let r=b(e),i=b(t);return r&&i?w(r.major,i.major)||w(r.minor,i.minor)||w(r.patch,i.patch)||function(e,t){if(0===e.length&&0===t.length)return 0;if(0===e.length)return 1;if(0===t.length)return -1;for(let r=0;r<Math.min(e.length,t.length);r++){let i=e[r],o=t[r];if(i===o)continue;let a="number"==typeof i,n="number"==typeof o;if(a!==n)return a?-1:1;if(a&&n)return w(i,o);return i<o?-1:1}return w(e.length,t.length)}(r.prerelease,i.prerelease):null}(r,t);return null===i?{kind:"unreadable",reason:`pack ${e} declares minCliVersion ${JSON.stringify(t)}, which is not a version this CLI can compare against its own (${r}) — the requirement was ignored`}:i<0?{kind:"too-old",reason:`pack ${e} needs failproofai ${String(t)} or newer and this is ${r} — run \`npm i -g "failproofai@>=${String(t)}" && failproofai update\``}:{kind:"satisfied",declared:t}}(s.id,t.minCliVersion);if("too-old"===c.kind)throw Error(c.reason);"unreadable"===c.kind&&n.push(c.reason);let d=function(e,t){if(!t||(0,o.isAbsolute)(t))throw Error(`unsafe managed policy path ${JSON.stringify(t)}`);let r=(0,o.resolve)(e,t),a=(0,o.relative)(e,r);if(a.startsWith("..")||(0,o.isAbsolute)(a))throw Error(`managed policy path escapes its root: ${JSON.stringify(t)}`);let n=(0,i.realpathSync)(e),s=(0,i.realpathSync)(r),l=(0,o.relative)(n,s);if(l.startsWith("..")||(0,o.isAbsolute)(l))throw Error(`managed policy symlink escapes its root: ${JSON.stringify(t)}`);return s}(e,t.entry),p=(0,r.createHash)("sha256").update((0,i.readFileSync)(d)).digest("hex");if(p!==t.sha256)throw Error(`pack ${t.id} failed integrity verification: expected ${t.sha256}, got ${p}`);if(!Array.isArray(t.policies))throw Error(`pack ${t.id} policies is not an array`);let h=t.policies.map((e,r)=>(function(e,t,r,i){let o=`${e} policy #${r}`;if(!t||"object"!=typeof t)throw Error(`${o} is not an object`);let a=t.name;if("string"!=typeof a||!P.test(a))throw Error(`${o} has an unsafe name ${JSON.stringify(a)}`);if("alwaysOn"in t)throw Error(`${o} declares alwaysOn, which packs may not set`);if("string"!=typeof t.description||0===t.description.length)throw Error(`${o} is missing a description`);if("string"!=typeof t.category||0===t.category.length)throw Error(`${o} is missing a category`);if("boolean"!=typeof t.defaultEnabled)throw Error(`${o} is missing defaultEnabled`);if(!t.match||"object"!=typeof t.match)throw Error(`${o} is missing a match`);let n=t.match;for(let e of["events","toolNames"]){let t=n[e];if(void 0!==t&&(!Array.isArray(t)||t.some(e=>"string"!=typeof e||0===e.length)))throw Error(`${o} has a match.${e} that is not a list of names`)}let s=f(t),l=["authority","reviewedBy"].filter(e=>e in t&&!(e in s));if("params"in t){let e=function(e){if(!e||"object"!=typeof e||Array.isArray(e))return"params is not an object";for(let[t,r]of Object.entries(e)){if(0===t.length)return"params has an empty parameter name";if(!r||"object"!=typeof r||Array.isArray(r))return`params.${t} is not an object`;if("string"!=typeof r.type||!I.has(r.type))return`params.${t} has type ${JSON.stringify(r.type)}, which is not one of ${[...I].join(", ")}`;if("string"!=typeof r.description||0===r.description.length)return`params.${t} is missing a description`;if(!("default"in r))return`params.${t} is missing a default`}}(t.params);e&&(i?.push(`${o} declares a params schema that was dropped: ${e}`),l.push("params"))}return l.length>0?Object.fromEntries(Object.entries(t).filter(([e])=>!l.includes(e))):t})(t.id,e,r,n)),u=new Set;for(let e of h){if(u.has(e.name))throw Error(`pack ${t.id} declares ${e.name} twice`);u.add(e.name)}let m=null;if(void 0!==t.enabled){if(!Array.isArray(t.enabled)||t.enabled.some(e=>"string"!=typeof e))throw Error(`pack ${t.id} enabled is not an array of names`);m=t.enabled.filter(e=>u.has(e))}let y=null;if(void 0!==t.clis){if(!Array.isArray(t.clis)||t.clis.some(e=>"string"!=typeof e))throw Error(`pack ${t.id} clis is not an array of agent names`);y=t.clis}return{clis:y,id:s.id,version:s.version,source:t.source,path:d,sha256:t.sha256,effect:l,policies:h,semantic:function(e,t,r){if(void 0===t)return[];if(!Array.isArray(t))return r.push(`pack ${e} semantic is not an array, so none of it was loaded`),[];let i=[],o=new Set;for(let[a,n]of t.entries()){if(i.length>=24){r.push(`pack ${e} declares more than 24 semantic policies; the ${t.length-24} past that cap were dropped`);break}try{let t=function(e,t,r){let i=`${e} semantic policy #${r}`;if(!t||"object"!=typeof t||Array.isArray(t))throw Error(`${i} is not an object`);let o=t.name;if("string"!=typeof o||!P.test(o))throw Error(`${i} has an unsafe name ${JSON.stringify(o)}`);if("alwaysOn"in t)throw Error(`${i} declares alwaysOn, which packs may not set`);let a=R(`${e} semantic policy ${o}`,"title",t.title,120),n=`${e} semantic policy ${o}`;if(!Array.isArray(t.appliesTo)||0===t.appliesTo.length)throw Error(`${n} has no appliesTo tool classes`);let s=t.appliesTo.find(e=>"string"!=typeof e||!T.has(e));if(void 0!==s)throw Error(`${n} applies to ${JSON.stringify(s)}, which is not a tool class (${[...T].join(", ")})`);if("deny"!==t.mode&&"instruct"!==t.mode)throw Error(`${n} has mode ${JSON.stringify(t.mode)}, which must be "deny" or "instruct"`);if("boolean"!=typeof t.userCanOverride)throw Error(`${n} is missing userCanOverride, which has no default`);if(!Array.isArray(t.probes)||0===t.probes.length)throw Error(`${n} declares no probes`);if(t.probes.length>6)throw Error(`${n} declares ${t.probes.length} probes, over the cap of 6`);let l=t.probes.map((e,t)=>F(`${n} probe #${t}`,e,null)),c=new Set;for(let e of l){if(c.has(e.id))throw Error(`${n} declares probe ${e.id} twice`);c.add(e.id)}let d=void 0===t.exempt?void 0:F(`${n} exempt`,t.exempt,"exempt");if(void 0!==t.precondition&&!v(t.precondition))throw Error(`${n} names precondition ${JSON.stringify(t.precondition)}, which this build does not have (${_.join(", ")})`);let f=R(n,"guidance",t.guidance,600);return{name:o,title:a,appliesTo:t.appliesTo,mode:t.mode,userCanOverride:t.userCanOverride,probes:l,...d?{exempt:d}:{},...void 0!==t.precondition?{precondition:t.precondition}:{},guidance:f}}(e,n,a);if(o.has(t.name))throw Error(`pack ${e} declares semantic policy ${t.name} twice`);o.add(t.name),i.push(t)}catch(e){r.push(C(e))}}return i}(s.id,t.semantic,n),..."satisfied"===c.kind&&c.declared?{minCliVersion:c.declared}:{},enabled:m}}(l,e,n);if(h.has(t.id))throw Error(`duplicate pack id ${t.id}`);h.add(t.id),c.push(t),p.push(...n)}catch(i){let r=e&&("observe"===e.effect||"enforce"===e.effect)?e.effect:"enforce";d.push({id:t,reason:C(i),effect:r,...Array.isArray(e?.policies)?{declared:function(e){let t=[];for(let r of e)r&&"object"==typeof r&&"string"==typeof r.name&&r.match&&"object"==typeof r.match&&t.push(r);return t}(e.policies)}:{},...Array.isArray(e?.policies)&&0===e.policies.length?{semanticOnly:!0}:{},...Array.isArray(e?.clis)&&e.clis.every(e=>"string"==typeof e)?{clis:e.clis}:{}})}}return{packs:c,errors:d,...p.length>0?{warnings:p}:{}}}function C(e){return e instanceof Error?e.message:String(e)}e.s(["f",0,W],52306);let B=null,N=null;function L(e){let t=new Map,r=new Map;for(let i of e)for(let e of i.semantic??[]){if(U(i,e.name))continue;let o=function e(t){if(Array.isArray(t))return`[${t.map(e).join(",")}]`;if(null!==t&&"object"==typeof t){let r=Object.entries(t).filter(([,e])=>void 0!==e).sort(([e],[t])=>e<t?-1:+(e>t));return`{${r.map(([t,r])=>`${JSON.stringify(t)}:${e(r)}`).join(",")}}`}return JSON.stringify(t)??"null"}(e),a=t.get(e.name);if(void 0===a){t.set(e.name,{form:o,ids:[i.id]});continue}a.ids.push(i.id),a.form!==o&&r.set(e.name,a.ids)}return r}function U(e,t){return l.has(t)&&!/^github:FailproofAI\//i.test(e.source??"")}e.s(["j",0,function(){if(B)return B;let e=c;try{var r,i,o;let a,n,s=(r=W().packs,i=t,r.filter(e=>"observe"!==e.effect&&!(i&&Array.isArray(e.clis)&&e.clis.length>0&&!e.clis.includes(i))));o=s,a=L(o),n=o.flatMap(e=>(e.semantic??[]).filter(t=>!U(e,t.name)).map(e=>e.name)).filter(e=>!a.has(e)),e=0===n.length?c:new Set(n),L(s)}catch{}try{let t=function(e,t){let r=[];for(let i of e){let e=function(e,t){return"reviewable"!==e.authority?e.authority?{authority:e.authority}:{}:"observe"===e.effect||"observe"!==t&&"enforce"!==t?{authority:"hard"}:{authority:"reviewable",reviewedBy:(e.reviewedBy??[]).map(t=>{var r;return m.test(t)?t:(r=e.id,`cloud:${r}/${t}`)})}}(i,t);"reviewable"===e.authority&&r.push(...e.reviewedBy??[])}return r}(function(e=null){try{let t=u();if(void 0===t)return[];let r=function(e){if(!e||"object"!=typeof e)throw Error("active manifest is not an object");if(!p.includes(e.schemaVersion))throw Error(`unsupported active manifest schema ${String(e.schemaVersion)} (supported: ${p.join(", ")})`);let t=e.deployment??e.generation;if(!Number.isSafeInteger(t)||(t??-1)<0)throw Error("active manifest deployment is invalid");if(!Array.isArray(e.policies))throw Error("active manifest policies is not an array");let r=e.policies.map(e=>({...e,version:e.version??e.revision}));return{schemaVersion:e.schemaVersion,deployment:t,policies:r}}(t);return r.policies.flatMap(t=>{if("string"!=typeof t.id)return[];let i=(0,s.P)(t.agentTargets,r.schemaVersion);return(0,s.i)(i,e)?[{id:t.id,effect:"observe"===t.effect?"observe":"enforce",...i?{agentTargets:i}:{},...f(t)}]:[]})}catch{return[]}}(N),function(){try{var e;return e=function(){let e=u();if(void 0===e)return null;if(!e||"object"!=typeof e||Array.isArray(e))throw Error("active manifest is not an object");if(!p.includes(e.schemaVersion))throw Error(`unsupported active manifest schema ${String(e.schemaVersion)}`);return e}()?.jevMode,"off"===e||"observe"===e||"enforce"===e?e:null}catch{return null}}());t.length>0&&(e=new Set([...e,...t]))}catch{}return B=e,e},"Z",0,function(e,r=null){B=null,t=e,N=r}],16774)},97348,e=>{var t=e.i(2157),r=e.i(50227),i=e.i(79857);let o={info:0,warn:1,error:2},a=(0,i.A)(),n=!1,s="warn",l=!1,c=a;function d(e){return!function(){if(n)return;n=!0;let e=(process.env.FAILPROOFAI_LOG_LEVEL??"").toLowerCase();("info"===e||"warn"===e||"error"===e)&&(s=e);let t=(process.env.FAILPROOFAI_HOOK_LOG_FILE??"").trim();t&&(l=!0,"1"!==t&&"true"!==t&&(c=t))}(),o[e]>=o[s]}function f(e,t){process.stderr.write(`[failproofai:hook] ${e} ${t}
1
+ (()=>{"use strict";module.exports=[16560,38441,e=>{let t=["claude","codex","copilot","cursor","opencode","pi","hermes","openclaw","factory","devin","antigravity","goose"],r=["SessionStart","SessionEnd","UserPromptSubmit","PreToolUse","PermissionRequest","PermissionDenied","PostToolUse","PostToolUseFailure","Notification","SubagentStart","SubagentStop","TaskCreated","TaskCompleted","Stop","StopFailure","TeammateIdle","InstructionsLoaded","ConfigChange","CwdChanged","FileChanged","WorktreeCreate","WorktreeRemove","PreCompact","PostCompact","Elicitation","ElicitationResult","UserPromptExpansion","PostToolBatch","Setup"].filter(e=>"WorktreeCreate"!==e);e.s(["X",0,["PreToolUse","PostToolUse","PreInvocation","Stop"],"m",0,["user","project"],"H",0,{Bash:{CommandLine:"command",Cwd:"cwd"},Write:{TargetFile:"file_path",CodeContent:"content"},Edit:{TargetFile:"file_path"},Read:{TargetFile:"file_path",AbsolutePath:"file_path",File:"file_path"}},"I",0,{run_command:"Bash",write_to_file:"Write",read_file:"Read",view_file:"Read",edit_file:"Edit",replace_file_content:"Edit",list_dir:"LS",find_by_name:"Glob",grep_search:"Grep",read_url_content:"WebFetch",search_web:"WebSearch"},"J",0,r,"p",0,{session_start:"SessionStart",pre_tool_use:"PreToolUse",permission_request:"PermissionRequest",post_tool_use:"PostToolUse",user_prompt_submit:"UserPromptSubmit",stop:"Stop",subagent_start:"SubagentStart",pre_compact:"PreCompact",post_compact:"PostCompact",subagent_stop:"SubagentStop"},"W",0,["session_start","pre_tool_use","permission_request","post_tool_use","user_prompt_submit","stop","subagent_start","pre_compact","post_compact","subagent_stop"],"L",0,["user","project"],"j",0,{apply_patch:"Edit",write_stdin:"Bash"},"d",0,["SessionStart","SessionEnd","UserPromptSubmit","PreToolUse","PostToolUse","Stop","SubagentStop","PostToolUseFailure","ErrorOccurred","PreCompact","PermissionRequest","Notification"],"w",0,["user","project"],"U",0,{Read:{path:"file_path"},Write:{path:"file_path",file_text:"content"},Edit:{path:"file_path",old_str:"old_string",new_str:"new_string"}},"s",0,{bash:"Bash",powershell:"Bash",list_bash:"Bash",read_bash:"Bash",stop_bash:"Bash",write_bash:"Bash",list_powershell:"Bash",read_powershell:"Bash",stop_powershell:"Bash",write_powershell:"Bash",read:"Read",view:"Read",show_file:"Read",write:"Write",create:"Write",edit:"Edit",apply_patch:"Edit",str_replace_editor:"Edit",glob:"Glob",grep:"Grep",rg:"Grep",ls:"LS",web_fetch:"WebFetch"},"t",0,["sessionStart","sessionEnd","beforeSubmitPrompt","preToolUse","postToolUse","stop","subagentStop"],"Y",0,["user","project"],"D",0,{Shell:"Bash"},"E",0,["SessionStart","UserPromptSubmit","PreToolUse","PostToolUse","PermissionRequest","Stop","SessionEnd"],"c",0,["user","project"],"u",0,{exec:"Bash"},"n",0,["SessionStart","UserPromptSubmit","PreToolUse","PostToolUse","Notification","Stop","SubagentStop","PreCompact","SessionEnd"],"B",0,["user","project"],"r",0,{Execute:"Bash",Read:"Read",Edit:"Edit",Create:"Write",Grep:"Grep",Glob:"Glob",LS:"LS",FetchUrl:"WebFetch",WebSearch:"WebSearch",TodoWrite:"TodoWrite",Task:"Task"},"Z",0,"__failproofai_hook__","i",0,["SessionStart","UserPromptSubmit","PreToolUse","PostToolUse","SessionEnd"],"x",0,["user","project"],"M",0,{Read:{path:"file_path",source:"file_path"},Write:{path:"file_path"},Edit:{path:"file_path"},LS:{path:"file_path"}},"K",0,{shell:"Bash",write:"Write",edit:"Edit",view:"Read",read_image:"Read",glob:"Glob",grep:"Grep",tree:"LS",delegate:"Task",todo__todo_write:"TodoWrite"},"y",0,["pre_tool_call","post_tool_call","on_session_start","on_session_end","subagent_stop"],"N",0,["user"],"z",0,{Read:{path:"file_path"},Write:{path:"file_path"},Edit:{path:"file_path"}},"C",0,{terminal:"Bash",bash:"Bash",read_file:"Read",write_file:"Write",patch:"Edit",web_search:"WebSearch",web_extract:"WebFetch",search_files:"Grep",todo:"TodoWrite",todo_list:"TodoWrite",process_manage:"process",cronjob_manage:"cronjob"},"F",0,["user","project","local"],"_",0,t,"P",0,["before_tool_call","after_tool_call","before_agent_run","before_agent_finalize","session_start","session_end","subagent_ended","before_compaction"],"G",0,["user"],"v",0,{Read:{path:"file_path"},Write:{path:"file_path"},Edit:{path:"file_path"}},"e",0,{exec:"Bash",read:"Read",write:"Write",edit:"Edit",grep:"Grep",glob:"Glob",web_search:"WebSearch",web_fetch:"WebFetch"},"f",0,["tool.execute.before","tool.execute.after","session.created","session.deleted","session.idle","message.updated","permission.ask"],"O",0,["user","project"],"k",0,{Read:{filePath:"file_path"},Write:{filePath:"file_path"},Edit:{filePath:"file_path",oldString:"old_string",newString:"new_string",replaceAll:"replace_all"}},"A",0,{bash:"Bash",read:"Read",write:"Write",edit:"Edit",apply_patch:"Edit",glob:"Glob",grep:"Grep",list:"LS",webfetch:"WebFetch",websearch:"WebSearch",todowrite:"TodoWrite",todoread:"TodoRead"},"Q",0,["session_start","session_shutdown","input","tool_call","user_bash","tool_result","agent_end"],"R",0,["user","project"],"V",0,{Read:{path:"file_path"},Write:{path:"file_path"},Edit:{path:"file_path"}},"S",0,{bash:"Bash",read:"Read",write:"Write",edit:"Edit",glob:"Glob",grep:"Grep"}],38441);let i=/^agt_[0-9a-f]{16,32}$/,o=new Set(t);e.s(["i",0,function(e,t){return void 0===e||!!(!(!t||"object"!=typeof t||Array.isArray(t))&&Object.keys(t).every(e=>"integration"===e||"instanceId"===e)&&"string"==typeof t.integration&&o.has(t.integration)&&"string"==typeof t.instanceId&&i.test(t.instanceId))&&e.some(e=>e.integration===t.integration&&(void 0===e.instanceId||e.instanceId===t.instanceId))},"P",0,function(e,t){if(null==e)return;if(t<3||!Array.isArray(e)||e.length<1||e.length>32)throw Error("invalid agentTargets in cloud-managed active manifest");let r=new Set;return e.map(e=>{if(!e||"object"!=typeof e||Array.isArray(e)||Object.keys(e).some(e=>"integration"!==e&&"instanceId"!==e)||"string"!=typeof e.integration||!o.has(e.integration)||void 0!==e.instanceId&&("string"!=typeof e.instanceId||!i.test(e.instanceId)))throw Error("invalid agentTargets in cloud-managed active manifest");let t=`${e.integration}\0${e.instanceId??""}`;if(r.has(t))throw Error("duplicate agentTargets in cloud-managed active manifest");return r.add(t),{integration:e.integration,...void 0!==e.instanceId?{instanceId:e.instanceId}:{}}})}],16560)},16774,99891,98901,52306,e=>{let t;var r=e.i(66680),i=e.i(2157),o=e.i(50227),a=e.i(24214),n=e.i(79857),s=e.i(16560);e.i(97348);let l=new Set(["destructive-deletion","production-infra-change","git-history-rewrite","push-to-protected-branch","commit-on-protected-branch","secret-exposure","credential-exfiltration","remote-code-execution","privilege-escalation","database-destruction","read-outside-workspace","agent-config-tampering","system-modification","env-secrets-dump","external-destructive-action","external-data-egress"]),c=new Set,d=e=>"string"==typeof e&&e.length>0;function f(e){let t={};("hard"===e.authority||"reviewable"===e.authority)&&(t.authority=e.authority);let r=e.reviewedBy;return Array.isArray(r)&&r.length>0&&r.every(d)&&(t.reviewedBy=[...r]),t}e.s(["_",0,c,"g",0,l,"i",0,f,"d",0,function(e,t=c,r){let i=e?.authority==="reviewable";if(!e||"hard"==(!0!==e.alwaysOn&&"reviewable"===e.authority&&Array.isArray(e.reviewedBy)&&e.reviewedBy.filter(e=>"string"==typeof e&&e.length>0).length>0?"reviewable":"hard")){var o;return i?{authority:"hard",downgraded:!0===(o=e).alwaysOn?"it is alwaysOn, and the self-protection guard is never reviewable":Array.isArray(o.reviewedBy)&&0!==o.reviewedBy.length?"reviewedBy is not a list of semantic policy names":"reviewedBy does not name any semantic policy"}:{authority:"hard"}}let a=e.reviewedBy;if(!a.every(d))return{authority:"hard",downgraded:"reviewedBy is not a list of semantic policy names"};let n=a.filter(e=>!t.has(e));return 0!==t.size||n.some(e=>r?.has(e))?n.length>0?{authority:"hard",downgraded:`reviewedBy names ${n.map(e=>(function(e,t,r){let i=JSON.stringify(e),o=r?.get(e);if(o)return`${i}, which packs ${o.join(" and ")} declare differently, so it is asked for neither`;if(t===l)return`${i}, which is not a semantic policy in this build`;let a=[...t].sort(),n=a.length>6?`${a.slice(0,6).join(", ")} and ${a.length-6} more`:a.join(", ");return`${i}, which is not among the Jev checks it is judged against (${n})`})(e,t,r)).join("; ")}`}:{authority:"reviewable",reviewedBy:[...new Set(a)]}:{authority:"hard"}}],99891);let p=[1,2,3],h=null;function u(){if(function(){try{let e=JSON.parse((0,i.readFileSync)((0,n.y)(),"utf8"));if(!e||"object"!=typeof e||Array.isArray(e))return!1;let t=e.mode;return!!t&&"object"==typeof t&&!Array.isArray(t)&&"oss"===t.kind}catch{return!1}}()){h=null;return}let e=(0,o.resolve)(process.env.FAILPROOFAI_CLOUD_POLICY_DIR??(0,n.I)(),"active.json"),t=function(e){try{let t=(0,i.statSync)(e,{bigint:!0});return`${t.dev}:${t.ino}:${t.mode}:${t.size}:${t.mtimeNs}:${t.ctimeNs}`}catch(t){let e=t.code;if("ENOENT"===e||"ENOTDIR"===e)return null;throw t}}(e);if(null===t){h=null;return}if(h&&h.path===e&&h.version===t)return h.value;let r=JSON.parse((0,i.readFileSync)(e,"utf8"));return h={path:e,version:t,value:r},r}let m=/^cloud:[^/]+\/./,y=/^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[A-Za-z-][0-9A-Za-z-]*)(?:\.(?:0|[1-9]\d*|\d*[A-Za-z-][0-9A-Za-z-]*))*))?(?:\+([0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*))?$/,g=/^(?:0|[1-9]\d*)$/;function b(e){if("string"!=typeof e)return null;let t=y.exec(e);return t?{major:Number(t[1]),minor:Number(t[2]),patch:Number(t[3]),prerelease:void 0===t[4]?[]:t[4].split(".").map(e=>g.test(e)?Number(e):e)}:null}let w=(e,t)=>e<t?-1:+(e>t),_=["always","protected_branch","in_git_repo","has_paths","paths_outside_project","system_or_root_paths"];function v(e){return"string"==typeof e&&_.includes(e)}e.s(["B",0,_,"M",0,v],98901);let $=[1],S=/^[a-f0-9]{64}$/,E=/^[A-Za-z0-9._-]{1,64}\/[A-Za-z0-9._-]{1,64}$/,A=/^[A-Za-z0-9][A-Za-z0-9._+-]{0,63}$/,O=/^[0-9a-f]{7,40}$/,P=/^[A-Za-z0-9._-]{1,128}$/,j=/^[a-z][a-z0-9_]{0,31}$/,k=new Set(["exempt","user_asked"]),T=new Set(["shell","write","read","network","other"]),I=new Set(["string","number","boolean","string[]","pattern[]"]);function R(e,t,r,i){if("string"!=typeof r||0===r.length)throw Error(`${e} is missing ${t}`);if(r.length>i)throw Error(`${e} has a ${t} of ${r.length} characters, over the ${i}-character cap`);return r}function F(e,t,r){let i;if(!t||"object"!=typeof t||Array.isArray(t))throw Error(`${e} is not an object`);if(null!==r)i=r;else{if("string"!=typeof t.id||!j.test(t.id))throw Error(`${e} has an unsafe id ${JSON.stringify(t.id)}`);if(k.has(t.id))throw Error(`${e} uses the reserved probe id ${JSON.stringify(t.id)}`);i=t.id}let o=R(e,"instructions",t.instructions,600);if(void 0===t.criteria)return{id:i,instructions:o};if(!t.criteria||"object"!=typeof t.criteria||Array.isArray(t.criteria))throw Error(`${e} has criteria that is not an object`);let a=t.criteria;return{id:i,instructions:o,criteria:{true:R(e,"criteria.true",a.true,300),false:R(e,"criteria.false",a.false,300)}}}function W(){let e,t=process.env.FAILPROOFAI_PACK_DIR?(0,o.resolve)(process.env.FAILPROOFAI_PACK_DIR,"installed.json"):(0,n.v)();if(!(0,i.existsSync)(t))return{packs:[],errors:[]};try{e=JSON.parse((0,i.readFileSync)(t,"utf8"))}catch(e){return{packs:[],errors:[{id:null,reason:`unreadable pack manifest: ${C(e)}`}]}}if(!e||"object"!=typeof e)return{packs:[],errors:[{id:null,reason:"pack manifest is not an object"}]};let s=e;if(!$.includes(s.schemaVersion))return{packs:[],errors:[{id:null,reason:`unsupported pack manifest schema ${String(s.schemaVersion)} (supported: ${$.join(", ")})`}]};if(!Array.isArray(s.packs))return{packs:[],errors:[{id:null,reason:"pack manifest packs is not an array"}]};let l=process.env.FAILPROOFAI_PACK_DIR??(0,n.n)(),c=[],d=[],p=[],h=new Set;for(let e of s.packs){let t=e&&"object"==typeof e&&"string"==typeof e.id?e.id:null,n=[];try{let t=function(e,t,n){if(!t||"object"!=typeof t)throw Error("pack entry is not an object");let s=function(e){if("string"!=typeof e.id||!E.test(e.id))throw Error(`unsafe pack id ${JSON.stringify(e.id)}`);if("string"!=typeof e.version||!A.test(e.version))throw Error(`invalid version for pack ${e.id}`);if(void 0!==e.effect&&"enforce"!==e.effect&&"observe"!==e.effect)throw Error(`unknown effect ${JSON.stringify(e.effect)} for pack ${e.id}`);let t="string"==typeof e.commit&&O.test(e.commit.trim().toLowerCase())?e.commit.trim().toLowerCase():void 0;return{id:e.id,version:e.version,effect:e.effect??"enforce",...t?{commit:t}:{}}}(t);if("string"!=typeof t.source||0===t.source.length)throw Error(`pack ${t.id} has no source`);if("string"!=typeof t.sha256||!S.test(t.sha256))throw Error(`invalid SHA-256 for pack ${t.id}`);let l=s.effect,c=function(e,t,r=a.version){if(void 0===t)return{kind:"satisfied"};let i=function(e,t){let r=b(e),i=b(t);return r&&i?w(r.major,i.major)||w(r.minor,i.minor)||w(r.patch,i.patch)||function(e,t){if(0===e.length&&0===t.length)return 0;if(0===e.length)return 1;if(0===t.length)return -1;for(let r=0;r<Math.min(e.length,t.length);r++){let i=e[r],o=t[r];if(i===o)continue;let a="number"==typeof i,n="number"==typeof o;if(a!==n)return a?-1:1;if(a&&n)return w(i,o);return i<o?-1:1}return w(e.length,t.length)}(r.prerelease,i.prerelease):null}(r,t);return null===i?{kind:"unreadable",reason:`pack ${e} declares minCliVersion ${JSON.stringify(t)}, which is not a version this CLI can compare against its own (${r}) — the requirement was ignored`}:i<0?{kind:"too-old",reason:`pack ${e} needs failproofai ${String(t)} or newer and this is ${r} — run \`npm i -g "failproofai@>=${String(t)}" && failproofai update\``}:{kind:"satisfied",declared:t}}(s.id,t.minCliVersion);if("too-old"===c.kind)throw Error(c.reason);"unreadable"===c.kind&&n.push(c.reason);let d=function(e,t){if(!t||(0,o.isAbsolute)(t))throw Error(`unsafe managed policy path ${JSON.stringify(t)}`);let r=(0,o.resolve)(e,t),a=(0,o.relative)(e,r);if(a.startsWith("..")||(0,o.isAbsolute)(a))throw Error(`managed policy path escapes its root: ${JSON.stringify(t)}`);let n=(0,i.realpathSync)(e),s=(0,i.realpathSync)(r),l=(0,o.relative)(n,s);if(l.startsWith("..")||(0,o.isAbsolute)(l))throw Error(`managed policy symlink escapes its root: ${JSON.stringify(t)}`);return s}(e,t.entry),p=(0,r.createHash)("sha256").update((0,i.readFileSync)(d)).digest("hex");if(p!==t.sha256)throw Error(`pack ${t.id} failed integrity verification: expected ${t.sha256}, got ${p}`);if(!Array.isArray(t.policies))throw Error(`pack ${t.id} policies is not an array`);let h=t.policies.map((e,r)=>(function(e,t,r,i){let o=`${e} policy #${r}`;if(!t||"object"!=typeof t)throw Error(`${o} is not an object`);let a=t.name;if("string"!=typeof a||!P.test(a))throw Error(`${o} has an unsafe name ${JSON.stringify(a)}`);if("alwaysOn"in t)throw Error(`${o} declares alwaysOn, which packs may not set`);if("string"!=typeof t.description||0===t.description.length)throw Error(`${o} is missing a description`);if("string"!=typeof t.category||0===t.category.length)throw Error(`${o} is missing a category`);if("boolean"!=typeof t.defaultEnabled)throw Error(`${o} is missing defaultEnabled`);if(!t.match||"object"!=typeof t.match)throw Error(`${o} is missing a match`);let n=t.match;for(let e of["events","toolNames"]){let t=n[e];if(void 0!==t&&(!Array.isArray(t)||t.some(e=>"string"!=typeof e||0===e.length)))throw Error(`${o} has a match.${e} that is not a list of names`)}let s=f(t),l=["authority","reviewedBy"].filter(e=>e in t&&!(e in s));if("params"in t){let e=function(e){if(!e||"object"!=typeof e||Array.isArray(e))return"params is not an object";for(let[t,r]of Object.entries(e)){if(0===t.length)return"params has an empty parameter name";if(!r||"object"!=typeof r||Array.isArray(r))return`params.${t} is not an object`;if("string"!=typeof r.type||!I.has(r.type))return`params.${t} has type ${JSON.stringify(r.type)}, which is not one of ${[...I].join(", ")}`;if("string"!=typeof r.description||0===r.description.length)return`params.${t} is missing a description`;if(!("default"in r))return`params.${t} is missing a default`}}(t.params);e&&(i?.push(`${o} declares a params schema that was dropped: ${e}`),l.push("params"))}return l.length>0?Object.fromEntries(Object.entries(t).filter(([e])=>!l.includes(e))):t})(t.id,e,r,n)),u=new Set;for(let e of h){if(u.has(e.name))throw Error(`pack ${t.id} declares ${e.name} twice`);u.add(e.name)}let m=null;if(void 0!==t.enabled){if(!Array.isArray(t.enabled)||t.enabled.some(e=>"string"!=typeof e))throw Error(`pack ${t.id} enabled is not an array of names`);m=t.enabled.filter(e=>u.has(e))}let y=null;if(void 0!==t.clis){if(!Array.isArray(t.clis)||t.clis.some(e=>"string"!=typeof e))throw Error(`pack ${t.id} clis is not an array of agent names`);y=t.clis}return{clis:y,id:s.id,version:s.version,source:t.source,path:d,sha256:t.sha256,effect:l,policies:h,semantic:function(e,t,r){if(void 0===t)return[];if(!Array.isArray(t))return r.push(`pack ${e} semantic is not an array, so none of it was loaded`),[];let i=[],o=new Set;for(let[a,n]of t.entries()){if(i.length>=24){r.push(`pack ${e} declares more than 24 semantic policies; the ${t.length-24} past that cap were dropped`);break}try{let t=function(e,t,r){let i=`${e} semantic policy #${r}`;if(!t||"object"!=typeof t||Array.isArray(t))throw Error(`${i} is not an object`);let o=t.name;if("string"!=typeof o||!P.test(o))throw Error(`${i} has an unsafe name ${JSON.stringify(o)}`);if("alwaysOn"in t)throw Error(`${i} declares alwaysOn, which packs may not set`);let a=R(`${e} semantic policy ${o}`,"title",t.title,120),n=`${e} semantic policy ${o}`;if(!Array.isArray(t.appliesTo)||0===t.appliesTo.length)throw Error(`${n} has no appliesTo tool classes`);let s=t.appliesTo.find(e=>"string"!=typeof e||!T.has(e));if(void 0!==s)throw Error(`${n} applies to ${JSON.stringify(s)}, which is not a tool class (${[...T].join(", ")})`);if("deny"!==t.mode&&"instruct"!==t.mode)throw Error(`${n} has mode ${JSON.stringify(t.mode)}, which must be "deny" or "instruct"`);if("boolean"!=typeof t.userCanOverride)throw Error(`${n} is missing userCanOverride, which has no default`);if(!Array.isArray(t.probes)||0===t.probes.length)throw Error(`${n} declares no probes`);if(t.probes.length>6)throw Error(`${n} declares ${t.probes.length} probes, over the cap of 6`);let l=t.probes.map((e,t)=>F(`${n} probe #${t}`,e,null)),c=new Set;for(let e of l){if(c.has(e.id))throw Error(`${n} declares probe ${e.id} twice`);c.add(e.id)}let d=void 0===t.exempt?void 0:F(`${n} exempt`,t.exempt,"exempt");if(void 0!==t.precondition&&!v(t.precondition))throw Error(`${n} names precondition ${JSON.stringify(t.precondition)}, which this build does not have (${_.join(", ")})`);let f=R(n,"guidance",t.guidance,600);return{name:o,title:a,appliesTo:t.appliesTo,mode:t.mode,userCanOverride:t.userCanOverride,probes:l,...d?{exempt:d}:{},...void 0!==t.precondition?{precondition:t.precondition}:{},guidance:f}}(e,n,a);if(o.has(t.name))throw Error(`pack ${e} declares semantic policy ${t.name} twice`);o.add(t.name),i.push(t)}catch(e){r.push(C(e))}}return i}(s.id,t.semantic,n),..."satisfied"===c.kind&&c.declared?{minCliVersion:c.declared}:{},enabled:m}}(l,e,n);if(h.has(t.id))throw Error(`duplicate pack id ${t.id}`);h.add(t.id),c.push(t),p.push(...n)}catch(i){let r=e&&("observe"===e.effect||"enforce"===e.effect)?e.effect:"enforce";d.push({id:t,reason:C(i),effect:r,...Array.isArray(e?.policies)?{declared:function(e){let t=[];for(let r of e)r&&"object"==typeof r&&"string"==typeof r.name&&r.match&&"object"==typeof r.match&&t.push(r);return t}(e.policies)}:{},...Array.isArray(e?.policies)&&0===e.policies.length?{semanticOnly:!0}:{},...Array.isArray(e?.clis)&&e.clis.every(e=>"string"==typeof e)?{clis:e.clis}:{}})}}return{packs:c,errors:d,...p.length>0?{warnings:p}:{}}}function C(e){return e instanceof Error?e.message:String(e)}e.s(["f",0,W],52306);let B=null,N=null;function L(e){let t=new Map,r=new Map;for(let i of e)for(let e of i.semantic??[]){if(U(i,e.name))continue;let o=function e(t){if(Array.isArray(t))return`[${t.map(e).join(",")}]`;if(null!==t&&"object"==typeof t){let r=Object.entries(t).filter(([,e])=>void 0!==e).sort(([e],[t])=>e<t?-1:+(e>t));return`{${r.map(([t,r])=>`${JSON.stringify(t)}:${e(r)}`).join(",")}}`}return JSON.stringify(t)??"null"}(e),a=t.get(e.name);if(void 0===a){t.set(e.name,{form:o,ids:[i.id]});continue}a.ids.push(i.id),a.form!==o&&r.set(e.name,a.ids)}return r}function U(e,t){return l.has(t)&&!/^github:FailproofAI\//i.test(e.source??"")}e.s(["j",0,function(){if(B)return B;let e=c;try{var r,i,o;let a,n,s=(r=W().packs,i=t,r.filter(e=>"observe"!==e.effect&&!(i&&Array.isArray(e.clis)&&e.clis.length>0&&!e.clis.includes(i))));(o=s,a=L(o),n=o.flatMap(e=>(e.semantic??[]).filter(t=>!U(e,t.name)).map(e=>e.name)).filter(e=>!a.has(e)),e=0===n.length?c:new Set(n)).size,L(s)}catch{}try{let t=function(e,t){let r=[];for(let i of e){let e=function(e,t){return"reviewable"!==e.authority?e.authority?{authority:e.authority}:{}:"observe"===e.effect||"observe"!==t&&"enforce"!==t?{authority:"hard"}:{authority:"reviewable",reviewedBy:(e.reviewedBy??[]).map(t=>{var r;return m.test(t)?t:(r=e.id,`cloud:${r}/${t}`)})}}(i,t);"reviewable"===e.authority&&r.push(...e.reviewedBy??[])}return r}(function(e=null){try{let t=u();if(void 0===t)return[];let r=function(e){if(!e||"object"!=typeof e)throw Error("active manifest is not an object");if(!p.includes(e.schemaVersion))throw Error(`unsupported active manifest schema ${String(e.schemaVersion)} (supported: ${p.join(", ")})`);let t=e.deployment??e.generation;if(!Number.isSafeInteger(t)||(t??-1)<0)throw Error("active manifest deployment is invalid");if(!Array.isArray(e.policies))throw Error("active manifest policies is not an array");let r=e.policies.map(e=>({...e,version:e.version??e.revision}));return{schemaVersion:e.schemaVersion,deployment:t,policies:r}}(t);return r.policies.flatMap(t=>{if("string"!=typeof t.id)return[];let i=(0,s.P)(t.agentTargets,r.schemaVersion);return(0,s.i)(i,e)?[{id:t.id,effect:"observe"===t.effect?"observe":"enforce",...i?{agentTargets:i}:{},...f(t)}]:[]})}catch{return[]}}(N),function(){try{var e;return e=function(){let e=u();if(void 0===e)return null;if(!e||"object"!=typeof e||Array.isArray(e))throw Error("active manifest is not an object");if(!p.includes(e.schemaVersion))throw Error(`unsupported active manifest schema ${String(e.schemaVersion)}`);return e}()?.jevMode,"off"===e||"observe"===e||"enforce"===e?e:null}catch{return null}}());t.length>0&&(e=new Set([...e,...t]))}catch{}return B=e,e},"Z",0,function(e,r=null){B=null,t=e,N=r}],16774)},97348,e=>{var t=e.i(2157),r=e.i(50227),i=e.i(79857);let o={info:0,warn:1,error:2},a=(0,i.A)(),n=!1,s="warn",l=!1,c=a;function d(e){return!function(){if(n)return;n=!0;let e=(process.env.FAILPROOFAI_LOG_LEVEL??"").toLowerCase();("info"===e||"warn"===e||"error"===e)&&(s=e);let t=(process.env.FAILPROOFAI_HOOK_LOG_FILE??"").trim();t&&(l=!0,"1"!==t&&"true"!==t&&(c=t))}(),o[e]>=o[s]}function f(e,t){process.stderr.write(`[failproofai:hook] ${e} ${t}
2
2
  `)}function p(e,i){if(l)try{(0,t.existsSync)(c)||(0,t.mkdirSync)(c,{recursive:!0});let o=(0,r.join)(c,"hooks.log");try{if((0,t.statSync)(o).size>=524288){let e=`hooks-${Date.now()}.log`;(0,t.renameSync)(o,(0,r.join)(c,e))}}catch{}let a=new Date().toISOString(),n=`[${a}] ${e} ${i}
3
3
  `;(0,t.appendFileSync)(o,n,"utf-8")}catch{}}e.s(["F",0,function(e){d("error")&&(f("ERROR",e),p("ERROR",e))},"Q",0,function(e){d("info")&&(f("INFO",e),p("INFO",e))},"g",0,function(e){d("warn")&&(f("WARN",e),p("WARN",e))}])},73136,49335,e=>{var t=e.i(2157),r=e.i(50227),i=e.i(60526),o=e.i(97348),a=e.i(79857);function n(e){if(!(0,t.existsSync)(e))return{};try{let r=(0,t.readFileSync)(e,"utf8");return JSON.parse(r)}catch(t){return(0,o.g)(`failed to parse config at ${e}: ${t instanceof Error?t.message:String(t)}`),{}}}e.s(["f",0,function(e){let o=function(e){let o=(0,i.homedir)(),a=(0,r.resolve)(e);for(;a!==o;){let e=(0,r.resolve)(a,".failproofai");try{if((0,t.statSync)(e).isDirectory())return a}catch{}let i=(0,r.dirname)(a);if(i===a)break;a=i}return(0,r.resolve)(e)}(e??process.cwd()),s=(0,r.resolve)(o,".failproofai","policies-config.json"),l=(0,r.resolve)(o,".failproofai","policies-config.local.json"),c=(0,a.O)(),d=n(s),f=n(l),p=n(c),h=new Set([...d.enabledPolicies??[],...f.enabledPolicies??[],...p.enabledPolicies??[]]),u={};for(let e of[d,f,p])if(e.policyParams)for(let[t,r]of Object.entries(e.policyParams))t in u||(u[t]=r);let m=[d,f,p].map(e=>void 0!==e.customPoliciesPaths?e.customPoliciesPaths:void 0!==e.customPoliciesPath?[e.customPoliciesPath]:void 0).find(e=>void 0!==e),y=new Set([...d.disabledCustomPolicies??[],...f.disabledCustomPolicies??[],...p.disabledCustomPolicies??[]]),g=d.customPoliciesEnabled??f.customPoliciesEnabled??p.customPoliciesEnabled,b=d.llm??f.llm??p.llm;return{enabledPolicies:[...h],...Object.keys(u).length>0?{policyParams:u}:{},...void 0!==m?{customPoliciesPaths:m}:{},...y.size?{disabledCustomPolicies:[...y]}:{},...void 0!==g?{customPoliciesEnabled:g}:{},...void 0!==b?{llm:b}:{}}}],73136);var s=e.i(24214),l=e.i(28067),c=e.i(17694);let d=l._,f=new Set;async function p(e,t,r){let i=JSON.stringify({api_key:process.env.FAILPROOFAI_POSTHOG_KEY??d,event:t,distinct_id:e,properties:{...r,$lib:"failproofai-hooks",failproofai_version:s.version,product:l.W}});try{await fetch(process.env.FAILPROOFAI_POSTHOG_HOST?`${process.env.FAILPROOFAI_POSTHOG_HOST}/capture/`:"https://us.i.posthog.com/capture/",{method:"POST",headers:{"Content-Type":"application/json"},body:i,signal:AbortSignal.timeout(5e3)})}catch{}}async function h(e,t,r){if(!(0,c.f)())return;let i=p(e,t,r);f.add(i),i.finally(()=>f.delete(i)),await i}e.s(["f",0,h],49335)}]})();
4
4
 
@@ -0,0 +1,3 @@
1
+ module.exports=[[19121,a=>{var b=a.i(5050);let c=(0,b.createServerReference)("00728227e41042729b3182aad2fe4c5d77f021b514",b.callServer,void 0,b.findSourceMapURL,"getTelemetryConfig");a.s(["f",0,c])},3171,a=>{var b=a.i(87924),c=a.i(72131),d=a.i(19121),e=a.i(66036);a.s(["default",0,function({error:a,reset:f}){return(0,c.useEffect)(()=>{(0,d.f)().then(b=>{(0,e.$)(b),(0,e.L)("client_error",{error_message:a.message,error_name:a.name,error_digest:a.digest,boundary:"global"})}).catch(()=>{})},[a]),(0,b.jsx)("html",{children:(0,b.jsx)("body",{children:(0,b.jsx)("main",{style:{minHeight:"100vh",display:"flex",alignItems:"center",justifyContent:"center",background:"#031035",color:"#f8fafc",fontFamily:"system-ui, sans-serif"},children:(0,b.jsxs)("div",{style:{textAlign:"center",padding:"2rem",border:"1px solid rgba(239,68,68,0.4)",borderRadius:"0.5rem",maxWidth:"500px"},children:[(0,b.jsx)("h2",{style:{color:"#ef4444",marginBottom:"0.5rem",fontSize:"1.25rem"},children:"Something went wrong"}),(0,b.jsx)("p",{style:{color:"#94a3b8",marginBottom:"1.5rem"},children:a.message||"An unexpected error occurred."}),(0,b.jsx)("button",{onClick:f,style:{padding:"0.5rem 1.25rem",background:"#3b82f6",color:"white",border:"none",borderRadius:"0.375rem",cursor:"pointer",fontSize:"0.875rem"},children:"Try again"})]})})})})}])},66036,a=>{a.s(["L",0,function(a,b){},"$",0,function(a){}])},5050,(a,b,c)=>{Object.defineProperty(c,"__esModule",{value:!0});var d={callServer:function(){return f.callServer},createServerReference:function(){return h.createServerReference},findSourceMapURL:function(){return g.findSourceMapURL}};for(var e in d)Object.defineProperty(c,e,{enumerable:!0,get:d[e]});let f=a.r(20611),g=a.r(1722),h=a.r(38783)},42602,(a,b,c)=>{b.exports=a.r(18622)},9270,(a,b,c)=>{b.exports=a.r(42602).vendored.contexts.AppRouterContext},36313,(a,b,c)=>{b.exports=a.r(42602).vendored.contexts.HooksClientContext},18341,(a,b,c)=>{b.exports=a.r(42602).vendored.contexts.ServerInsertedHtml},35112,(a,b,c)=>{b.exports=a.r(42602).vendored["react-ssr"].ReactDOM},87924,(a,b,c)=>{b.exports=a.r(42602).vendored["react-ssr"].ReactJsxRuntime},38783,(a,b,c)=>{b.exports=a.r(42602).vendored["react-ssr"].ReactServerDOMTurbopackClient},72131,(a,b,c)=>{b.exports=a.r(42602).vendored["react-ssr"].React}],18622,(a,b,c)=>{b.exports=a.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},20635,(a,b,c)=>{b.exports=a.x("next/dist/server/app-render/action-async-storage.external.js",()=>require("next/dist/server/app-render/action-async-storage.external.js"))},24725,(a,b,c)=>{b.exports=a.x("next/dist/server/app-render/after-task-async-storage.external.js",()=>require("next/dist/server/app-render/after-task-async-storage.external.js"))},43285,(a,b,c)=>{b.exports=a.x("next/dist/server/app-render/dynamic-access-async-storage.external.js",()=>require("next/dist/server/app-render/dynamic-access-async-storage.external.js"))},56704,(a,b,c)=>{b.exports=a.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},32319,(a,b,c)=>{b.exports=a.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},59043,(a,b,c)=>{b.exports=a.x("next/dist/server/runtime-reacts.external.js",()=>require("next/dist/server/runtime-reacts.external.js"))}];
2
+
3
+ //# sourceMappingURL=%5Broot-of-the-server%5D__00l2u6j86cb8y._.js.map
@@ -1,3 +1,3 @@
1
- module.exports=[[26035,a=>{var b=a.i(36359);a.S([b,"00de9ed6392ff068792d68e272f943ca9a05f589fa,f"],26035)},36359,a=>{var b=a.i(37936),c=a.i(69839);a.i(93328);var d=a.i(31920),e=a.i(12072);async function f(){let a=(0,d.f)();return{enabled:a,distinctId:a?(0,c._)():"",apiKey:process.env.FAILPROOFAI_POSTHOG_KEY??"phc_Ac1Ww1GqKc0z1SyrRWbmatEeQdlOQIsDEEdP8l8JRgX",host:process.env.FAILPROOFAI_POSTHOG_HOST??"https://us.i.posthog.com",version:e.version}}(0,a.i(13095).ensureServerEntryExports)([f]),(0,b.registerServerReference)(f,"00de9ed6392ff068792d68e272f943ca9a05f589fa",null),a.s(["f",0,f])},8674,a=>{var b=a.i(2157),c=a.i(50227),d=a.i(66680);a.s(["f",0,function(a,e,f={}){let g=f.mode??384,h=f.dirMode??448,i=(0,c.dirname)(a);(0,b.existsSync)(i)||(0,b.mkdirSync)(i,{recursive:!0,mode:h});let j=`${a}.${process.pid}.${(0,d.randomBytes)(6).toString("hex")}.tmp`;try{(0,b.writeFileSync)(j,JSON.stringify(e,null,2),{mode:g});try{(63&(0,b.statSync)(j).mode)!=0&&(0,b.chmodSync)(j,g)}catch{}(0,b.renameSync)(j,a);try{(63&(0,b.statSync)(a).mode)!=0&&(0,b.chmodSync)(a,g)}catch{}}catch(a){try{(0,b.rmSync)(j,{force:!0})}catch{}throw a}}])}],74533,(a,b,c)=>{b.exports=a.x("node:child_process",()=>require("node:child_process"))},66680,(a,b,c)=>{b.exports=a.x("node:crypto",()=>require("node:crypto"))},2157,(a,b,c)=>{b.exports=a.x("node:fs",()=>require("node:fs"))},60526,(a,b,c)=>{b.exports=a.x("node:os",()=>require("node:os"))},50227,(a,b,c)=>{b.exports=a.x("node:path",()=>require("node:path"))},2726,a=>{a.v(b=>Promise.all(["server/chunks/ssr/[externals]__12qr51qgrrt6o._.js","server/chunks/ssr/node_modules_posthog-node_dist_entrypoints_index_node_mjs_11bnuznb72p7z._.js"].map(b=>a.l(b))).then(()=>b(74493)))}];
1
+ module.exports=[[26035,a=>{var b=a.i(36359);a.S([b,"00728227e41042729b3182aad2fe4c5d77f021b514,f"],26035)},36359,a=>{var b=a.i(37936),c=a.i(69839);a.i(93328);var d=a.i(31920),e=a.i(12072);async function f(){let a=(0,d.f)();return{enabled:a,distinctId:a?(0,c._)():"",apiKey:process.env.FAILPROOFAI_POSTHOG_KEY??"phc_Ac1Ww1GqKc0z1SyrRWbmatEeQdlOQIsDEEdP8l8JRgX",host:process.env.FAILPROOFAI_POSTHOG_HOST??"https://us.i.posthog.com",version:e.version}}(0,a.i(13095).ensureServerEntryExports)([f]),(0,b.registerServerReference)(f,"00728227e41042729b3182aad2fe4c5d77f021b514",null),a.s(["f",0,f])},8674,a=>{var b=a.i(2157),c=a.i(50227),d=a.i(66680);a.s(["f",0,function(a,e,f={}){let g=f.mode??384,h=f.dirMode??448,i=(0,c.dirname)(a);(0,b.existsSync)(i)||(0,b.mkdirSync)(i,{recursive:!0,mode:h});let j=`${a}.${process.pid}.${(0,d.randomBytes)(6).toString("hex")}.tmp`;try{(0,b.writeFileSync)(j,JSON.stringify(e,null,2),{mode:g});try{(63&(0,b.statSync)(j).mode)!=0&&(0,b.chmodSync)(j,g)}catch{}(0,b.renameSync)(j,a);try{(63&(0,b.statSync)(a).mode)!=0&&(0,b.chmodSync)(a,g)}catch{}}catch(a){try{(0,b.rmSync)(j,{force:!0})}catch{}throw a}}])}],74533,(a,b,c)=>{b.exports=a.x("node:child_process",()=>require("node:child_process"))},66680,(a,b,c)=>{b.exports=a.x("node:crypto",()=>require("node:crypto"))},2157,(a,b,c)=>{b.exports=a.x("node:fs",()=>require("node:fs"))},60526,(a,b,c)=>{b.exports=a.x("node:os",()=>require("node:os"))},50227,(a,b,c)=>{b.exports=a.x("node:path",()=>require("node:path"))},2726,a=>{a.v(b=>Promise.all(["server/chunks/ssr/[externals]__12qr51qgrrt6o._.js","server/chunks/ssr/node_modules_posthog-node_dist_entrypoints_index_node_mjs_11bnuznb72p7z._.js"].map(b=>a.l(b))).then(()=>b(74493)))}];
2
2
 
3
3
  //# sourceMappingURL=%5Broot-of-the-server%5D__08ch3staq3ejw._.js.map
@@ -1,3 +1,3 @@
1
- module.exports=[[99558,a=>{var b=a.i(36359),c=a.i(37936),d=a.i(15501);async function e(){let a=(0,d.x)();if(!a){let a=(0,d.t)();return{status:"empty",expired:null!==a,expiredAt:a?.cachedAt??null}}return{status:"cached",cachedAt:a.cachedAt,params:a.params,result:a.result}}(0,a.i(13095).ensureServerEntryExports)([e]),(0,c.registerServerReference)(e,"002221848076906f86c47312eaef10191a5ff7094d",null),a.s(["002221848076906f86c47312eaef10191a5ff7094d",0,e,"00de9ed6392ff068792d68e272f943ca9a05f589fa",()=>b.f],99558)},36359,a=>{var b=a.i(37936),c=a.i(69839);a.i(93328);var d=a.i(31920),e=a.i(12072);async function f(){let a=(0,d.f)();return{enabled:a,distinctId:a?(0,c._)():"",apiKey:process.env.FAILPROOFAI_POSTHOG_KEY??"phc_Ac1Ww1GqKc0z1SyrRWbmatEeQdlOQIsDEEdP8l8JRgX",host:process.env.FAILPROOFAI_POSTHOG_HOST??"https://us.i.posthog.com",version:e.version}}(0,a.i(13095).ensureServerEntryExports)([f]),(0,b.registerServerReference)(f,"00de9ed6392ff068792d68e272f943ca9a05f589fa",null),a.s(["f",0,f])},8674,a=>{var b=a.i(2157),c=a.i(50227),d=a.i(66680);a.s(["f",0,function(a,e,f={}){let g=f.mode??384,h=f.dirMode??448,i=(0,c.dirname)(a);(0,b.existsSync)(i)||(0,b.mkdirSync)(i,{recursive:!0,mode:h});let j=`${a}.${process.pid}.${(0,d.randomBytes)(6).toString("hex")}.tmp`;try{(0,b.writeFileSync)(j,JSON.stringify(e,null,2),{mode:g});try{(63&(0,b.statSync)(j).mode)!=0&&(0,b.chmodSync)(j,g)}catch{}(0,b.renameSync)(j,a);try{(63&(0,b.statSync)(a).mode)!=0&&(0,b.chmodSync)(a,g)}catch{}}catch(a){try{(0,b.rmSync)(j,{force:!0})}catch{}throw a}}])}],74533,(a,b,c)=>{b.exports=a.x("node:child_process",()=>require("node:child_process"))},66680,(a,b,c)=>{b.exports=a.x("node:crypto",()=>require("node:crypto"))},2157,(a,b,c)=>{b.exports=a.x("node:fs",()=>require("node:fs"))},60526,(a,b,c)=>{b.exports=a.x("node:os",()=>require("node:os"))},50227,(a,b,c)=>{b.exports=a.x("node:path",()=>require("node:path"))}];
1
+ module.exports=[[99558,a=>{var b=a.i(36359),c=a.i(37936),d=a.i(15501);async function e(){let a=(0,d.x)();if(!a){let a=(0,d.t)();return{status:"empty",expired:null!==a,expiredAt:a?.cachedAt??null}}return{status:"cached",cachedAt:a.cachedAt,params:a.params,result:a.result}}(0,a.i(13095).ensureServerEntryExports)([e]),(0,c.registerServerReference)(e,"00ce15c6622e109e55d385395d75e5eaa1ecee2cb9",null),a.s(["00728227e41042729b3182aad2fe4c5d77f021b514",()=>b.f,"00ce15c6622e109e55d385395d75e5eaa1ecee2cb9",0,e],99558)},36359,a=>{var b=a.i(37936),c=a.i(69839);a.i(93328);var d=a.i(31920),e=a.i(12072);async function f(){let a=(0,d.f)();return{enabled:a,distinctId:a?(0,c._)():"",apiKey:process.env.FAILPROOFAI_POSTHOG_KEY??"phc_Ac1Ww1GqKc0z1SyrRWbmatEeQdlOQIsDEEdP8l8JRgX",host:process.env.FAILPROOFAI_POSTHOG_HOST??"https://us.i.posthog.com",version:e.version}}(0,a.i(13095).ensureServerEntryExports)([f]),(0,b.registerServerReference)(f,"00728227e41042729b3182aad2fe4c5d77f021b514",null),a.s(["f",0,f])},8674,a=>{var b=a.i(2157),c=a.i(50227),d=a.i(66680);a.s(["f",0,function(a,e,f={}){let g=f.mode??384,h=f.dirMode??448,i=(0,c.dirname)(a);(0,b.existsSync)(i)||(0,b.mkdirSync)(i,{recursive:!0,mode:h});let j=`${a}.${process.pid}.${(0,d.randomBytes)(6).toString("hex")}.tmp`;try{(0,b.writeFileSync)(j,JSON.stringify(e,null,2),{mode:g});try{(63&(0,b.statSync)(j).mode)!=0&&(0,b.chmodSync)(j,g)}catch{}(0,b.renameSync)(j,a);try{(63&(0,b.statSync)(a).mode)!=0&&(0,b.chmodSync)(a,g)}catch{}}catch(a){try{(0,b.rmSync)(j,{force:!0})}catch{}throw a}}])}],74533,(a,b,c)=>{b.exports=a.x("node:child_process",()=>require("node:child_process"))},66680,(a,b,c)=>{b.exports=a.x("node:crypto",()=>require("node:crypto"))},2157,(a,b,c)=>{b.exports=a.x("node:fs",()=>require("node:fs"))},60526,(a,b,c)=>{b.exports=a.x("node:os",()=>require("node:os"))},50227,(a,b,c)=>{b.exports=a.x("node:path",()=>require("node:path"))}];
2
2
 
3
3
  //# sourceMappingURL=%5Broot-of-the-server%5D__0bigvy9xmv2ka._.js.map
@@ -1,3 +1,3 @@
1
- module.exports=[[7292,a=>{var b=a.i(37936),c=a.i(1144);async function d(a){return(0,c.b)(a)}async function e(a,b){return(0,c.c)(a,b)}(0,a.i(13095).ensureServerEntryExports)([d,e]),(0,b.registerServerReference)(d,"40620aef35573c0f70760dade2911af54d7bb6bdcd",null),(0,b.registerServerReference)(e,"601da5259db8771c5daa055322e9f6abf5b570520a",null),a.s(["x",0,d,"m",0,e])},36359,a=>{var b=a.i(37936),c=a.i(69839);a.i(93328);var d=a.i(31920),e=a.i(12072);async function f(){let a=(0,d.f)();return{enabled:a,distinctId:a?(0,c._)():"",apiKey:process.env.FAILPROOFAI_POSTHOG_KEY??"phc_Ac1Ww1GqKc0z1SyrRWbmatEeQdlOQIsDEEdP8l8JRgX",host:process.env.FAILPROOFAI_POSTHOG_HOST??"https://us.i.posthog.com",version:e.version}}(0,a.i(13095).ensureServerEntryExports)([f]),(0,b.registerServerReference)(f,"00de9ed6392ff068792d68e272f943ca9a05f589fa",null),a.s(["f",0,f])},8674,a=>{var b=a.i(2157),c=a.i(50227),d=a.i(66680);a.s(["f",0,function(a,e,f={}){let g=f.mode??384,h=f.dirMode??448,i=(0,c.dirname)(a);(0,b.existsSync)(i)||(0,b.mkdirSync)(i,{recursive:!0,mode:h});let j=`${a}.${process.pid}.${(0,d.randomBytes)(6).toString("hex")}.tmp`;try{(0,b.writeFileSync)(j,JSON.stringify(e,null,2),{mode:g});try{(63&(0,b.statSync)(j).mode)!=0&&(0,b.chmodSync)(j,g)}catch{}(0,b.renameSync)(j,a);try{(63&(0,b.statSync)(a).mode)!=0&&(0,b.chmodSync)(a,g)}catch{}}catch(a){try{(0,b.rmSync)(j,{force:!0})}catch{}throw a}}])}],74533,(a,b,c)=>{b.exports=a.x("node:child_process",()=>require("node:child_process"))}];
1
+ module.exports=[[7292,a=>{var b=a.i(37936),c=a.i(1144);async function d(a){return(0,c.b)(a)}async function e(a,b){return(0,c.c)(a,b)}(0,a.i(13095).ensureServerEntryExports)([d,e]),(0,b.registerServerReference)(d,"40597059608d8cfd1326f2f52b5dbf2675d9ae353e",null),(0,b.registerServerReference)(e,"6052b34d2e59825e93c0f9f6841554b4a903623a89",null),a.s(["x",0,d,"m",0,e])},36359,a=>{var b=a.i(37936),c=a.i(69839);a.i(93328);var d=a.i(31920),e=a.i(12072);async function f(){let a=(0,d.f)();return{enabled:a,distinctId:a?(0,c._)():"",apiKey:process.env.FAILPROOFAI_POSTHOG_KEY??"phc_Ac1Ww1GqKc0z1SyrRWbmatEeQdlOQIsDEEdP8l8JRgX",host:process.env.FAILPROOFAI_POSTHOG_HOST??"https://us.i.posthog.com",version:e.version}}(0,a.i(13095).ensureServerEntryExports)([f]),(0,b.registerServerReference)(f,"00728227e41042729b3182aad2fe4c5d77f021b514",null),a.s(["f",0,f])},8674,a=>{var b=a.i(2157),c=a.i(50227),d=a.i(66680);a.s(["f",0,function(a,e,f={}){let g=f.mode??384,h=f.dirMode??448,i=(0,c.dirname)(a);(0,b.existsSync)(i)||(0,b.mkdirSync)(i,{recursive:!0,mode:h});let j=`${a}.${process.pid}.${(0,d.randomBytes)(6).toString("hex")}.tmp`;try{(0,b.writeFileSync)(j,JSON.stringify(e,null,2),{mode:g});try{(63&(0,b.statSync)(j).mode)!=0&&(0,b.chmodSync)(j,g)}catch{}(0,b.renameSync)(j,a);try{(63&(0,b.statSync)(a).mode)!=0&&(0,b.chmodSync)(a,g)}catch{}}catch(a){try{(0,b.rmSync)(j,{force:!0})}catch{}throw a}}])}],74533,(a,b,c)=>{b.exports=a.x("node:child_process",()=>require("node:child_process"))}];
2
2
 
3
3
  //# sourceMappingURL=%5Broot-of-the-server%5D__0h86bl2qf0k_o._.js.map
@@ -1,3 +1,3 @@
1
- module.exports=[[7292,a=>{var b=a.i(37936),c=a.i(1144);async function d(a){return(0,c.b)(a)}async function e(a,b){return(0,c.c)(a,b)}(0,a.i(13095).ensureServerEntryExports)([d,e]),(0,b.registerServerReference)(d,"40620aef35573c0f70760dade2911af54d7bb6bdcd",null),(0,b.registerServerReference)(e,"601da5259db8771c5daa055322e9f6abf5b570520a",null),a.s(["x",0,d,"m",0,e])},36359,a=>{var b=a.i(37936),c=a.i(69839);a.i(93328);var d=a.i(31920),e=a.i(12072);async function f(){let a=(0,d.f)();return{enabled:a,distinctId:a?(0,c._)():"",apiKey:process.env.FAILPROOFAI_POSTHOG_KEY??"phc_Ac1Ww1GqKc0z1SyrRWbmatEeQdlOQIsDEEdP8l8JRgX",host:process.env.FAILPROOFAI_POSTHOG_HOST??"https://us.i.posthog.com",version:e.version}}(0,a.i(13095).ensureServerEntryExports)([f]),(0,b.registerServerReference)(f,"00de9ed6392ff068792d68e272f943ca9a05f589fa",null),a.s(["f",0,f])},8674,a=>{var b=a.i(2157),c=a.i(50227),d=a.i(66680);a.s(["f",0,function(a,e,f={}){let g=f.mode??384,h=f.dirMode??448,i=(0,c.dirname)(a);(0,b.existsSync)(i)||(0,b.mkdirSync)(i,{recursive:!0,mode:h});let j=`${a}.${process.pid}.${(0,d.randomBytes)(6).toString("hex")}.tmp`;try{(0,b.writeFileSync)(j,JSON.stringify(e,null,2),{mode:g});try{(63&(0,b.statSync)(j).mode)!=0&&(0,b.chmodSync)(j,g)}catch{}(0,b.renameSync)(j,a);try{(63&(0,b.statSync)(a).mode)!=0&&(0,b.chmodSync)(a,g)}catch{}}catch(a){try{(0,b.rmSync)(j,{force:!0})}catch{}throw a}}])}],74533,(a,b,c)=>{b.exports=a.x("node:child_process",()=>require("node:child_process"))},66680,(a,b,c)=>{b.exports=a.x("node:crypto",()=>require("node:crypto"))},2157,(a,b,c)=>{b.exports=a.x("node:fs",()=>require("node:fs"))},60526,(a,b,c)=>{b.exports=a.x("node:os",()=>require("node:os"))},50227,(a,b,c)=>{b.exports=a.x("node:path",()=>require("node:path"))}];
1
+ module.exports=[[7292,a=>{var b=a.i(37936),c=a.i(1144);async function d(a){return(0,c.b)(a)}async function e(a,b){return(0,c.c)(a,b)}(0,a.i(13095).ensureServerEntryExports)([d,e]),(0,b.registerServerReference)(d,"40597059608d8cfd1326f2f52b5dbf2675d9ae353e",null),(0,b.registerServerReference)(e,"6052b34d2e59825e93c0f9f6841554b4a903623a89",null),a.s(["x",0,d,"m",0,e])},36359,a=>{var b=a.i(37936),c=a.i(69839);a.i(93328);var d=a.i(31920),e=a.i(12072);async function f(){let a=(0,d.f)();return{enabled:a,distinctId:a?(0,c._)():"",apiKey:process.env.FAILPROOFAI_POSTHOG_KEY??"phc_Ac1Ww1GqKc0z1SyrRWbmatEeQdlOQIsDEEdP8l8JRgX",host:process.env.FAILPROOFAI_POSTHOG_HOST??"https://us.i.posthog.com",version:e.version}}(0,a.i(13095).ensureServerEntryExports)([f]),(0,b.registerServerReference)(f,"00728227e41042729b3182aad2fe4c5d77f021b514",null),a.s(["f",0,f])},8674,a=>{var b=a.i(2157),c=a.i(50227),d=a.i(66680);a.s(["f",0,function(a,e,f={}){let g=f.mode??384,h=f.dirMode??448,i=(0,c.dirname)(a);(0,b.existsSync)(i)||(0,b.mkdirSync)(i,{recursive:!0,mode:h});let j=`${a}.${process.pid}.${(0,d.randomBytes)(6).toString("hex")}.tmp`;try{(0,b.writeFileSync)(j,JSON.stringify(e,null,2),{mode:g});try{(63&(0,b.statSync)(j).mode)!=0&&(0,b.chmodSync)(j,g)}catch{}(0,b.renameSync)(j,a);try{(63&(0,b.statSync)(a).mode)!=0&&(0,b.chmodSync)(a,g)}catch{}}catch(a){try{(0,b.rmSync)(j,{force:!0})}catch{}throw a}}])}],74533,(a,b,c)=>{b.exports=a.x("node:child_process",()=>require("node:child_process"))},66680,(a,b,c)=>{b.exports=a.x("node:crypto",()=>require("node:crypto"))},2157,(a,b,c)=>{b.exports=a.x("node:fs",()=>require("node:fs"))},60526,(a,b,c)=>{b.exports=a.x("node:os",()=>require("node:os"))},50227,(a,b,c)=>{b.exports=a.x("node:path",()=>require("node:path"))}];
2
2
 
3
3
  //# sourceMappingURL=%5Broot-of-the-server%5D__0pia5h3p8re4c._.js.map