failproofai 0.0.12 → 0.0.13-beta.0

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 (107) hide show
  1. package/.next/standalone/.cursor/hooks.json +6 -6
  2. package/.next/standalone/.next/BUILD_ID +1 -1
  3. package/.next/standalone/.next/build-manifest.json +3 -3
  4. package/.next/standalone/.next/prerender-manifest.json +3 -3
  5. package/.next/standalone/.next/required-server-files.json +1 -1
  6. package/.next/standalone/.next/server/app/_global-error/page/server-reference-manifest.json +1 -1
  7. package/.next/standalone/.next/server/app/_global-error/page.js.nft.json +1 -1
  8. package/.next/standalone/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
  9. package/.next/standalone/.next/server/app/_global-error.html +1 -1
  10. package/.next/standalone/.next/server/app/_global-error.rsc +7 -7
  11. package/.next/standalone/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +2 -2
  12. package/.next/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +7 -7
  13. package/.next/standalone/.next/server/app/_global-error.segments/_head.segment.rsc +3 -3
  14. package/.next/standalone/.next/server/app/_global-error.segments/_index.segment.rsc +3 -3
  15. package/.next/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  16. package/.next/standalone/.next/server/app/_not-found/page/server-reference-manifest.json +1 -1
  17. package/.next/standalone/.next/server/app/_not-found/page.js.nft.json +1 -1
  18. package/.next/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  19. package/.next/standalone/.next/server/app/_not-found.html +1 -1
  20. package/.next/standalone/.next/server/app/_not-found.rsc +14 -14
  21. package/.next/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +14 -14
  22. package/.next/standalone/.next/server/app/_not-found.segments/_head.segment.rsc +4 -4
  23. package/.next/standalone/.next/server/app/_not-found.segments/_index.segment.rsc +9 -9
  24. package/.next/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +2 -2
  25. package/.next/standalone/.next/server/app/_not-found.segments/_not-found.segment.rsc +3 -3
  26. package/.next/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
  27. package/.next/standalone/.next/server/app/api/audit/invite/route.js.nft.json +1 -1
  28. package/.next/standalone/.next/server/app/api/audit/run/route.js.nft.json +1 -1
  29. package/.next/standalone/.next/server/app/api/auth/login-request/route.js.nft.json +1 -1
  30. package/.next/standalone/.next/server/app/api/auth/login-verify/route.js.nft.json +1 -1
  31. package/.next/standalone/.next/server/app/api/auth/logout/route.js.nft.json +1 -1
  32. package/.next/standalone/.next/server/app/api/auth/reminder/route.js.nft.json +1 -1
  33. package/.next/standalone/.next/server/app/api/auth/status/route.js.nft.json +1 -1
  34. package/.next/standalone/.next/server/app/api/download/[project]/[session]/route.js.nft.json +1 -1
  35. package/.next/standalone/.next/server/app/audit/page/server-reference-manifest.json +2 -2
  36. package/.next/standalone/.next/server/app/audit/page.js.nft.json +1 -1
  37. package/.next/standalone/.next/server/app/audit/page_client-reference-manifest.js +1 -1
  38. package/.next/standalone/.next/server/app/index.html +1 -1
  39. package/.next/standalone/.next/server/app/index.rsc +14 -14
  40. package/.next/standalone/.next/server/app/index.segments/__PAGE__.segment.rsc +2 -2
  41. package/.next/standalone/.next/server/app/index.segments/_full.segment.rsc +14 -14
  42. package/.next/standalone/.next/server/app/index.segments/_head.segment.rsc +4 -4
  43. package/.next/standalone/.next/server/app/index.segments/_index.segment.rsc +9 -9
  44. package/.next/standalone/.next/server/app/index.segments/_tree.segment.rsc +1 -1
  45. package/.next/standalone/.next/server/app/page/server-reference-manifest.json +1 -1
  46. package/.next/standalone/.next/server/app/page.js.nft.json +1 -1
  47. package/.next/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
  48. package/.next/standalone/.next/server/app/policies/page/server-reference-manifest.json +8 -8
  49. package/.next/standalone/.next/server/app/policies/page.js.nft.json +1 -1
  50. package/.next/standalone/.next/server/app/policies/page_client-reference-manifest.js +1 -1
  51. package/.next/standalone/.next/server/app/project/[name]/page/server-reference-manifest.json +1 -1
  52. package/.next/standalone/.next/server/app/project/[name]/page.js.nft.json +1 -1
  53. package/.next/standalone/.next/server/app/project/[name]/page_client-reference-manifest.js +1 -1
  54. package/.next/standalone/.next/server/app/project/[name]/session/[sessionId]/page/react-loadable-manifest.json +2 -2
  55. package/.next/standalone/.next/server/app/project/[name]/session/[sessionId]/page/server-reference-manifest.json +2 -2
  56. package/.next/standalone/.next/server/app/project/[name]/session/[sessionId]/page.js.nft.json +1 -1
  57. package/.next/standalone/.next/server/app/project/[name]/session/[sessionId]/page_client-reference-manifest.js +1 -1
  58. package/.next/standalone/.next/server/app/projects/page/server-reference-manifest.json +1 -1
  59. package/.next/standalone/.next/server/app/projects/page.js.nft.json +1 -1
  60. package/.next/standalone/.next/server/app/projects/page_client-reference-manifest.js +1 -1
  61. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0dwpg-h._.js +1 -1
  62. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0lnenda._.js +1 -1
  63. package/.next/standalone/.next/server/chunks/[root-of-the-server]__13i_sva._.js +1 -1
  64. package/.next/standalone/.next/server/chunks/[root-of-the-server]__1_mqemn._.js +1 -1
  65. package/.next/standalone/.next/server/chunks/package_json_[json]_cjs_1nxcc4v._.js +1 -1
  66. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0808sha._.js +2 -2
  67. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0vh88nr._.js → [root-of-the-server]__0bbpv2d._.js} +2 -2
  68. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0e4-6d8._.js +2 -2
  69. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0ehe24g._.js +2 -2
  70. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0g253ve._.js +2 -2
  71. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0vxf0_g._.js +2 -2
  72. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0ntd0fz._.js → [root-of-the-server]__1-m1rhq._.js} +2 -2
  73. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__12mcauo._.js +2 -2
  74. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1mt35_w._.js +2 -2
  75. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1pcxxwg._.js +2 -2
  76. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1uvfwgr._.js +2 -2
  77. package/.next/standalone/.next/server/chunks/ssr/app_audit__components_audit-dashboard_tsx_0p9ud47._.js +1 -1
  78. package/.next/standalone/.next/server/chunks/ssr/app_global-error_tsx_1kp6l3x._.js +1 -1
  79. package/.next/standalone/.next/server/chunks/ssr/app_policies_hooks-client_tsx_19dqvpc._.js +1 -1
  80. package/.next/standalone/.next/server/chunks/ssr/{node_modules_html-to-image_es_index_0bppeyf.js → node_modules_html-to-image_es_index_1u91ynr.js} +1 -1
  81. package/.next/standalone/.next/server/middleware-build-manifest.js +3 -3
  82. package/.next/standalone/.next/server/pages/404.html +1 -1
  83. package/.next/standalone/.next/server/pages/500.html +1 -1
  84. package/.next/standalone/.next/server/server-reference-manifest.js +1 -1
  85. package/.next/standalone/.next/server/server-reference-manifest.json +10 -10
  86. package/.next/standalone/.next/static/chunks/{3-veva26100-4.js → 03zg3ms7uaoq3.js} +1 -1
  87. package/.next/standalone/.next/static/chunks/{3jk5y-qgnnti_.js → 0azkpcy8eb1gr.js} +1 -1
  88. package/.next/standalone/.next/static/chunks/{3pb3m-89k7ts2.js → 0byua6ng1f_ka.js} +1 -1
  89. package/.next/standalone/.next/static/chunks/{0ys-mwok1j9kp.js → 1h569gia53ant.js} +1 -1
  90. package/.next/standalone/.next/static/chunks/{09l7dfsd4xapi.js → 1zxtyef-iqede.js} +1 -1
  91. package/.next/standalone/.next/static/chunks/{2ey-m4-p9z7e0.js → 2ks4pzu5b-l_q.js} +2 -2
  92. package/.next/standalone/.next/static/chunks/{00_ypuitb29l0.js → 39rn602wszcbd.js} +1 -1
  93. package/.next/standalone/.next/static/chunks/{0qw65r3wfs089.js → 3jka0hvhqouyv.js} +1 -1
  94. package/.next/standalone/.next/static/chunks/{36yb_gsfgfga4.js → 41mhnhfkmglpp.js} +1 -1
  95. package/.next/standalone/docker-hook-sync/Dockerfile +75 -0
  96. package/.next/standalone/docker-hook-sync/entrypoint.sh +109 -0
  97. package/.next/standalone/package.json +1 -1
  98. package/.next/standalone/server.js +1 -1
  99. package/dist/cli.mjs +22 -8
  100. package/package.json +1 -1
  101. package/scripts/sync-agent-cli-harnesses-prompt.md +222 -0
  102. package/src/hooks/integrations.ts +12 -5
  103. package/src/hooks/types.ts +40 -0
  104. package/scripts/sync-hook-events-prompt.md +0 -179
  105. /package/.next/standalone/.next/static/{PdZTBvCBXzDRLe-duL9yC → W6ELw5VwHTFy2amS2px6e}/_buildManifest.js +0 -0
  106. /package/.next/standalone/.next/static/{PdZTBvCBXzDRLe-duL9yC → W6ELw5VwHTFy2amS2px6e}/_clientMiddlewareManifest.js +0 -0
  107. /package/.next/standalone/.next/static/{PdZTBvCBXzDRLe-duL9yC → W6ELw5VwHTFy2amS2px6e}/_ssgManifest.js +0 -0
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "failproofai",
3
- "version": "0.0.12",
3
+ "version": "0.0.13-beta.0",
4
4
  "description": "The easiest way to manage policies that keep your AI agents reliable, on-task, and running autonomously — for Claude Code & the Agents SDK",
5
5
  "bin": {
6
6
  "failproofai": "./dist/cli.mjs"
@@ -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":"0.0.12"},"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"],"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","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":{},"experimental":{"appNewScrollHandler":false,"useSkewCookie":false,"cssChunking":true,"multiZoneDraftMode":false,"appNavFailHandling":false,"prerenderEarlyExit":true,"serverMinification":true,"linkNoTouchStart":false,"caseSensitiveRoutes":false,"cachedNavigations":false,"partialFallbacks":false,"dynamicOnHover":false,"varyParams":false,"prefetchInlining":false,"preloadEntriesOnStart":true,"clientRouterFilter":true,"clientRouterFilterRedirects":false,"fetchCacheKeyPrefix":"","proxyPrefetch":"flexible","optimisticClientCache":true,"manualClientBasePath":false,"cpus":3,"memoryBasedWorkersCount":false,"imgOptConcurrency":null,"imgOptTimeoutInSeconds":7,"imgOptMaxInputPixels":268402689,"imgOptSequentialRead":null,"imgOptSkipMetadata":null,"isrFlushToDisk":true,"workerThreads":false,"optimizeCss":false,"nextScriptWorkers":false,"scrollRestoration":false,"externalDir":false,"disableOptimizedLoading":false,"gzipSize":true,"craCompat":false,"esmExternals":true,"fullySpecified":false,"swcTraceProfiling":false,"forceSwcTransforms":false,"largePageDataBytes":128000,"typedEnv":false,"parallelServerCompiles":false,"parallelServerBuildTraces":false,"ppr":false,"authInterrupts":false,"webpackMemoryOptimizations":false,"optimizeServerReact":true,"strictRouteTypes":false,"viewTransition":false,"removeUncaughtErrorAndRejectionListeners":false,"validateRSCRequestHeaders":false,"staleTimes":{"dynamic":0,"static":300},"reactDebugChannel":true,"serverComponentsHmrCache":true,"staticGenerationMaxConcurrency":8,"staticGenerationMinPagesPerWorker":25,"transitionIndicator":false,"gestureTransition":false,"inlineCss":false,"useCache":false,"globalNotFound":false,"browserDebugInfoInTerminal":"warn","lockDistDir":true,"proxyClientMaxBodySize":10485760,"hideLogsAfterAbort":false,"mcpServer":true,"turbopackFileSystemCacheForDev":true,"turbopackFileSystemCacheForBuild":false,"turbopackInferModuleSideEffects":true,"turbopackPluginRuntimeStrategy":"childProcesses","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"],"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"},"distDirRoot":".next"}
12
+ const nextConfig = {"env":{"NEXT_PUBLIC_APP_VERSION":"0.0.13-beta.0"},"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"],"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","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":{},"experimental":{"appNewScrollHandler":false,"useSkewCookie":false,"cssChunking":true,"multiZoneDraftMode":false,"appNavFailHandling":false,"prerenderEarlyExit":true,"serverMinification":true,"linkNoTouchStart":false,"caseSensitiveRoutes":false,"cachedNavigations":false,"partialFallbacks":false,"dynamicOnHover":false,"varyParams":false,"prefetchInlining":false,"preloadEntriesOnStart":true,"clientRouterFilter":true,"clientRouterFilterRedirects":false,"fetchCacheKeyPrefix":"","proxyPrefetch":"flexible","optimisticClientCache":true,"manualClientBasePath":false,"cpus":3,"memoryBasedWorkersCount":false,"imgOptConcurrency":null,"imgOptTimeoutInSeconds":7,"imgOptMaxInputPixels":268402689,"imgOptSequentialRead":null,"imgOptSkipMetadata":null,"isrFlushToDisk":true,"workerThreads":false,"optimizeCss":false,"nextScriptWorkers":false,"scrollRestoration":false,"externalDir":false,"disableOptimizedLoading":false,"gzipSize":true,"craCompat":false,"esmExternals":true,"fullySpecified":false,"swcTraceProfiling":false,"forceSwcTransforms":false,"largePageDataBytes":128000,"typedEnv":false,"parallelServerCompiles":false,"parallelServerBuildTraces":false,"ppr":false,"authInterrupts":false,"webpackMemoryOptimizations":false,"optimizeServerReact":true,"strictRouteTypes":false,"viewTransition":false,"removeUncaughtErrorAndRejectionListeners":false,"validateRSCRequestHeaders":false,"staleTimes":{"dynamic":0,"static":300},"reactDebugChannel":true,"serverComponentsHmrCache":true,"staticGenerationMaxConcurrency":8,"staticGenerationMinPagesPerWorker":25,"transitionIndicator":false,"gestureTransition":false,"inlineCss":false,"useCache":false,"globalNotFound":false,"browserDebugInfoInTerminal":"warn","lockDistDir":true,"proxyClientMaxBodySize":10485760,"hideLogsAfterAbort":false,"mcpServer":true,"turbopackFileSystemCacheForDev":true,"turbopackFileSystemCacheForBuild":false,"turbopackInferModuleSideEffects":true,"turbopackPluginRuntimeStrategy":"childProcesses","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"],"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"},"distDirRoot":".next"}
13
13
 
14
14
  process.env.__NEXT_PRIVATE_STANDALONE_CONFIG = JSON.stringify(nextConfig)
15
15
 
package/dist/cli.mjs CHANGED
@@ -16,7 +16,7 @@ var __export = (target, all) => {
16
16
  var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
17
17
 
18
18
  // package.json
19
- var version2 = "0.0.12";
19
+ var version2 = "0.0.13-beta.0";
20
20
  var init_package = () => {};
21
21
 
22
22
  // src/posthog-key.ts
@@ -151,7 +151,11 @@ var init_types = __esm(() => {
151
151
  "permission_request",
152
152
  "post_tool_use",
153
153
  "user_prompt_submit",
154
- "stop"
154
+ "stop",
155
+ "subagent_start",
156
+ "pre_compact",
157
+ "post_compact",
158
+ "subagent_stop"
155
159
  ];
156
160
  CODEX_EVENT_MAP = {
157
161
  session_start: "SessionStart",
@@ -159,7 +163,11 @@ var init_types = __esm(() => {
159
163
  permission_request: "PermissionRequest",
160
164
  post_tool_use: "PostToolUse",
161
165
  user_prompt_submit: "UserPromptSubmit",
162
- stop: "Stop"
166
+ stop: "Stop",
167
+ subagent_start: "SubagentStart",
168
+ pre_compact: "PreCompact",
169
+ post_compact: "PostCompact",
170
+ subagent_stop: "SubagentStop"
163
171
  };
164
172
  CODEX_TOOL_MAP = {
165
173
  apply_patch: "Edit",
@@ -173,7 +181,12 @@ var init_types = __esm(() => {
173
181
  "PreToolUse",
174
182
  "PostToolUse",
175
183
  "Stop",
176
- "SubagentStop"
184
+ "SubagentStop",
185
+ "PostToolUseFailure",
186
+ "ErrorOccurred",
187
+ "PreCompact",
188
+ "PermissionRequest",
189
+ "Notification"
177
190
  ];
178
191
  COPILOT_TOOL_MAP = {
179
192
  bash: "Bash",
@@ -358,7 +371,8 @@ var init_types = __esm(() => {
358
371
  "Elicitation",
359
372
  "ElicitationResult",
360
373
  "UserPromptExpansion",
361
- "PostToolBatch"
374
+ "PostToolBatch",
375
+ "Setup"
362
376
  ];
363
377
  });
364
378
 
@@ -6740,7 +6754,7 @@ var init_integrations = __esm(() => {
6740
6754
  return {
6741
6755
  type: "command",
6742
6756
  command,
6743
- timeout: 60000,
6757
+ timeout: 60,
6744
6758
  [FAILPROOFAI_HOOK_MARKER]: true
6745
6759
  };
6746
6760
  },
@@ -7081,7 +7095,7 @@ var init_integrations = __esm(() => {
7081
7095
  return {
7082
7096
  type: "command",
7083
7097
  command,
7084
- timeout: 60000,
7098
+ timeout: 60,
7085
7099
  [FAILPROOFAI_HOOK_MARKER]: true
7086
7100
  };
7087
7101
  },
@@ -11845,7 +11859,7 @@ import { realpathSync as realpathSync4 } from "fs";
11845
11859
  import { dirname as dirname9, resolve as resolve17 } from "path";
11846
11860
  import { fileURLToPath as fileURLToPath4 } from "url";
11847
11861
  // package.json
11848
- var version = "0.0.12";
11862
+ var version = "0.0.13-beta.0";
11849
11863
 
11850
11864
  // bin/failproofai.mjs
11851
11865
  if (!process.env.FAILPROOFAI_PACKAGE_ROOT) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "failproofai",
3
- "version": "0.0.12",
3
+ "version": "0.0.13-beta.0",
4
4
  "description": "The easiest way to manage policies that keep your AI agents reliable, on-task, and running autonomously — for Claude Code & the Agents SDK",
5
5
  "bin": {
6
6
  "failproofai": "./dist/cli.mjs"
@@ -0,0 +1,222 @@
1
+ ultracode
2
+
3
+ You are an automated **ultracode** (multi-agent) run inside a fresh clone of the
4
+ failproofai repository. Your job is to keep failproofai in sync with the upstream
5
+ documentation for **every** agent CLI we integrate with, then open exactly one
6
+ pull request with the fix — or, if a sync PR is already open, comment on it instead.
7
+
8
+ ## Run contract (read first)
9
+
10
+ - You are running **headless and autonomously**. No human is watching; nobody can
11
+ answer a question mid-run. For reversible actions that follow from this task,
12
+ proceed without asking. Do **not** end your turn with a plan or a question —
13
+ finish the work.
14
+ - The entrypoint has **already cut a fresh branch** named `auto/sync-cli-harnesses-<UTC>`.
15
+ Do all your work here; do **not** switch branches or work on `main`.
16
+ - failproofai's own Stop hooks are active in this checkout. If you make commits, you
17
+ will not be allowed to stop until you have **committed**, **pushed**, and **opened a
18
+ PR** for them. If you make **no** commits (nothing to sync, or you only commented on
19
+ an already-open sync PR), a clean working tree stops fine — so on those paths, do
20
+ **not** edit any files.
21
+ - Use ultracode / multi-agent orchestration: in Phase 1, fan out **one subagent per
22
+ CLI** so the seven harnesses are checked in parallel.
23
+
24
+ failproofai integrates with **seven** agent CLIs. Each has its own hook surface,
25
+ tracked in `src/hooks/types.ts` and written to disk by `src/hooks/integrations.ts`:
26
+
27
+ | CLI | Event array (`src/hooks/types.ts`) | Event map | Settings file written (`src/hooks/integrations.ts`) |
28
+ |----------------|------------------------------------|-----------|------------------------------------------------------|
29
+ | Claude Code | `HOOK_EVENT_TYPES` (canonical) | — (canonical) | `.claude/settings.json` |
30
+ | OpenAI Codex | `CODEX_HOOK_EVENT_TYPES` | `CODEX_EVENT_MAP` | `.codex/hooks.json` |
31
+ | GitHub Copilot | `COPILOT_HOOK_EVENT_TYPES` | — (already Pascal) | `.github/hooks/failproofai.json` |
32
+ | Cursor Agent | `CURSOR_HOOK_EVENT_TYPES` | `CURSOR_EVENT_MAP` | `.cursor/hooks.json` |
33
+ | OpenCode | `OPENCODE_HOOK_EVENT_TYPES` | `OPENCODE_EVENT_MAP` | `.opencode/opencode.json` + `.opencode/plugins/failproofai.mjs` |
34
+ | Pi | `PI_HOOK_EVENT_TYPES` | `PI_EVENT_MAP` | `.pi/settings.json` |
35
+ | Gemini CLI | `GEMINI_HOOK_EVENT_TYPES` | `GEMINI_EVENT_MAP` | `.gemini/settings.json` |
36
+
37
+ ## What "drift" means — three scopes
38
+
39
+ For each verified CLI, compare the upstream docs to this repo across three scopes:
40
+
41
+ 1. **Scope 1 — hook event names.** Events documented upstream but missing from (or
42
+ removed from) the CLI's `*HOOK_EVENT_TYPES` array in `src/hooks/types.ts`.
43
+ 2. **Scope 2 — tool / payload schema.** Changes to the CLI's tool names or payload
44
+ field shapes, tracked in the `*_TOOL_MAP` / `*_TOOL_INPUT_MAP` tables in
45
+ `src/hooks/types.ts` and in the per-CLI response-shape branches of
46
+ `src/hooks/policy-evaluator.ts`.
47
+ 3. **Scope 3 — settings-file shape.** Changes to the structure of the config file
48
+ failproofai writes for the CLI: the hard-coded literals in
49
+ `src/hooks/integrations.ts` (matcher-wrapper vs flat-array vs packages-array vs
50
+ plugin registration; field names like `command` vs `bash`/`powershell`;
51
+ `timeout` vs `timeoutSec` and its **unit** seconds-vs-ms; presence of `version`
52
+ / `$schema` / `matcher`; the settings-file path) **and** the committed dogfood
53
+ fixture on disk. The canonical worked example is git history / PR #482, which
54
+ dropped an invalid top-level `version` field and fixed a `60000`ms→`60`s timeout
55
+ unit in `.codex/hooks.json` by editing the writer, the fixture, and the tests
56
+ together.
57
+
58
+ ## Reading rules
59
+
60
+ - This run relaxed two policies (`require-ci-green-before-stop`,
61
+ `block-read-outside-cwd`) so you can read and edit the settings fixtures. Even so,
62
+ when you only need to **inspect** a committed fixture, prefer
63
+ `git show HEAD:<path>` (e.g. `git show HEAD:.codex/hooks.json`) — it is never
64
+ blocked and is the reliable way to read `.claude/settings.json`, `.codex/hooks.json`,
65
+ `.cursor/hooks.json`, `.github/hooks/failproofai.json`, `.gemini/settings.json`,
66
+ `.pi/settings.json`, and `.opencode/*`.
67
+ - Do **NOT** run `failproofai policies --install` (or any `failproofai` subcommand)
68
+ to regenerate a fixture — it is blocked. Edit fixtures by hand.
69
+
70
+ ## Phase 1 — Fan out one subagent per CLI
71
+
72
+ Spawn one subagent per CLI (seven, in parallel). Each subagent, for its CLI:
73
+
74
+ 1. `WebFetch` the docs URL(s) below and extract the authoritative lists: the hook
75
+ **event names**, the **tool names / payload field names**, and the
76
+ **settings-file schema** (top-level keys, per-entry shape, command field name,
77
+ timeout field name **and unit**, and whether `matcher` / `version` / `$schema`
78
+ are present). **Use upstream casing exactly** — Codex snake_case, Cursor
79
+ camelCase, OpenCode dot.namespaced, Pi snake_case, Claude/Copilot/Gemini
80
+ PascalCase. Do **not** normalize.
81
+ 2. Compare against this repo: the CLI's `*HOOK_EVENT_TYPES` array + paired
82
+ `*EVENT_MAP` (scope 1); its `*_TOOL_MAP` / `*_TOOL_INPUT_MAP` and its branch in
83
+ `src/hooks/policy-evaluator.ts` (scope 2); its literals in
84
+ `src/hooks/integrations.ts` + its dogfood fixture read via `git show` (scope 3).
85
+ 3. Return a structured report: `{ cli, status: up-to-date | drift | unverified,
86
+ scope1: {added, removed}, scope2: {...}, scope3: {...}, sources: [...] }`.
87
+
88
+ If a docs URL 404s, redirects to a stub, or has no parseable list, mark that CLI
89
+ `unverified` and skip its diff. **Do not invent events, tools, or fields. Do not
90
+ guess from prior knowledge.** Pi is the most likely `unverified` candidate (its
91
+ surface is documented in the package source, not a clean enumeration).
92
+
93
+ | CLI | Docs URL(s) |
94
+ |-----------|-------------|
95
+ | Claude | https://code.claude.com/docs/en/hooks (reference) · https://code.claude.com/docs/en/hooks-guide (summary) |
96
+ | Codex | https://developers.openai.com/codex/hooks |
97
+ | Copilot | https://docs.github.com/en/copilot/how-tos/copilot-cli/customize-copilot/use-hooks · https://docs.github.com/en/copilot/reference/copilot-cli-reference/cli-hooks-reference (tool names) |
98
+ | Cursor | https://cursor.com/docs/hooks |
99
+ | OpenCode | https://opencode.ai/docs/plugins/ |
100
+ | Pi | https://www.npmjs.com/package/@mariozechner/pi-coding-agent |
101
+ | Gemini | https://geminicli.com/docs/hooks/ · https://geminicli.com/docs/reference/tools/ (tool names) |
102
+
103
+ ## Phase 2 — Decide what to do (do this BEFORE editing any files)
104
+
105
+ Merge the subagent reports into one list of detected drift. Then, **before you edit a
106
+ single file**, decide which path you are on — editing first would leave uncommitted
107
+ changes that block a clean stop on the comment / no-op paths below.
108
+
109
+ 1. **No drift in any verified CLI** → do nothing: make no edits, open no PR, post no
110
+ comment. Stop. (`unverified` alone is not drift — the docs may just be unreachable
111
+ today.)
112
+
113
+ 2. **Drift exists — first check for an already-open sync PR:**
114
+ `gh pr list --base main --state open --search "[auto] sync agent CLI harnesses" --json number,url,headRefName`.
115
+
116
+ - **If an open sync PR already exists, do NOT open a second PR and do NOT edit any
117
+ files.** Read what it already covers (`gh pr diff <number>` plus its body) and
118
+ compare against your detected drift. If that PR already covers everything you
119
+ found, stop — nothing to add. If you found drift the PR is **missing**, post ONE
120
+ comment listing exactly what's missing, then stop —
121
+ `gh pr comment <number> --body "..."`, e.g.:
122
+
123
+ > This open sync PR is missing newly-detected drift:
124
+ > - **Cursor**: upstream added event `afterEdit` — append to `CURSOR_HOOK_EVENT_TYPES` (+ a `CURSOR_EVENT_MAP` entry).
125
+ > - **Gemini**: the `run_shell_command` tool was renamed to `shell` — the `GEMINI_TOOL_MAP` key is stale.
126
+ >
127
+ > (hook-sync bot — please fold these into this PR rather than opening a second sync PR.)
128
+
129
+ Never push commits to another PR's branch; only comment, and leave the working
130
+ tree clean so this run stops cleanly.
131
+
132
+ - **If no open sync PR exists → go to Phase 3** to apply the fixes and open one.
133
+
134
+ ## Phase 3 — Apply the fixes and open one PR
135
+
136
+ Only reached when there is real drift **and** no open sync PR. Edit only what drift
137
+ requires.
138
+
139
+ ### Scope 1 (event names)
140
+ - **Append** new events just before `] as const`, preserving upstream casing.
141
+ - **Delete** removed events; if the CLI has an `*EVENT_MAP`, also delete the same
142
+ key from that map (the `Record` is exhaustive — a stale key fails `tsc`).
143
+ - For **map-bearing CLIs** (Codex, Cursor, OpenCode, Pi, Gemini), do **NOT** invent
144
+ the canonical mapping for a newly-added event — leave it out of the `*EVENT_MAP`
145
+ so `tsc` fails intentionally, and add a reviewer-checklist item to the PR body
146
+ (see below). For **Claude and Copilot** (no map), the build stays green.
147
+ - **Fix hardcoded test counts** when the relevant array changed:
148
+ - If `HOOK_EVENT_TYPES` (Claude) changed: in `__tests__/hooks/manager.test.ts`,
149
+ update the `installs hooks for all <N> event types` description AND both
150
+ `expect(Object.keys(written.hooks)).toHaveLength(<N>)` assertions.
151
+ - If `GEMINI_HOOK_EVENT_TYPES` changed: in `__tests__/hooks/integrations.test.ts`,
152
+ update the `expect(gemini.eventTypes).toHaveLength(<N>)` assertion AND the
153
+ matching description string.
154
+ - Locate these by searching for the current count number.
155
+
156
+ ### Scope 2 / Scope 3 (tool schema / settings-file shape)
157
+ - Apply a fix **only when it is unambiguous and needs no human judgement** — e.g.
158
+ an invalid field to remove, a wrong timeout unit, or a renamed tool id (the PR
159
+ #482 class). When you do, move the whole quartet together, exactly like #482:
160
+ the writer in `src/hooks/integrations.ts` (+ a shared helper if it dedupes
161
+ logic), the committed dogfood fixture, the unit test in
162
+ `__tests__/hooks/integrations.test.ts`, and the e2e test in
163
+ `__tests__/e2e/hooks/<cli>-integration.e2e.test.ts` — plus a `types.ts` comment
164
+ if it documents the old shape.
165
+ - If the correct fix needs judgement (which canonical event/tool a new item maps
166
+ to; an ambiguous schema change), **leave the code untouched** and record it as a
167
+ reviewer-checklist item instead. Bias toward reporting over auto-editing core
168
+ integration code.
169
+ - Do **NOT** add `*EVENT_MAP`, `*_TOOL_MAP`, or `*_TOOL_INPUT_MAP` entries for
170
+ newly-added items — the canonical mapping is a human decision.
171
+
172
+ ### CHANGELOG (required)
173
+ Add a single-line entry to `CHANGELOG.md` under `## <version> — <YYYY-MM-DD>` where
174
+ `<version>` is the `version` field in `package.json` (read it) and `<YYYY-MM-DD>` is
175
+ today's UTC date. If that heading does not exist yet, create it above the previous
176
+ version's section. There is no `## Unreleased` section. Use the `### Features` (or
177
+ `### Fixes` for a shape correction) subsection.
178
+
179
+ ### Commit, push, open the PR
180
+ 1. Stage only the files you intentionally edited (never `git add -A`):
181
+ `src/hooks/types.ts`, `src/hooks/integrations.ts`, `src/hooks/policy-evaluator.ts`,
182
+ the touched `__tests__/...` files, the touched dogfood fixtures, and
183
+ `CHANGELOG.md` — whichever actually changed.
184
+ 2. Commit (e.g. `feat: sync agent CLI harnesses with upstream docs`), then
185
+ `git push -u origin "$(git branch --show-current)"`.
186
+ 3. `gh pr create --base main --title "[auto] sync agent CLI harnesses with upstream docs" --body "<body>"`.
187
+
188
+ The PR **body** must contain, in order:
189
+
190
+ 1. **Summary table** — one row per CLI: `| CLI | scope-1 | scope-2 | scope-3 | status |`
191
+ where status is `up to date`, `drift`, or `unverified`.
192
+ 2. **Per-CLI sections** — for each CLI with drift, list the added/removed events,
193
+ tool/schema changes, and settings-shape changes.
194
+ 3. **Reviewer checklist** — one unchecked box per item that needs a human decision:
195
+ - For each newly-added event on a map-bearing CLI:
196
+ `- [ ] Add \`<event>: "???"\` to \`<MAP_NAME>\` in \`src/hooks/types.ts\` (canonical Claude \`HookEventType\` chosen by reviewer)`
197
+ - For each scope-2/scope-3 change you deferred as judgement-heavy.
198
+ 4. **Sources** — the docs URL(s) consulted per CLI.
199
+ 5. **Unverified notes** — one line per `unverified` CLI explaining why.
200
+ 6. **Final note (verbatim):**
201
+ > **CI is expected to fail on this PR if a map-bearing CLI gained new events — a
202
+ > reviewer must add the missing `*EVENT_MAP` entries (replacing `"???"`) before
203
+ > merging. For drift in Claude or Copilot only (no event map), CI should pass on
204
+ > this commit alone. CI must pass and this PR must be reviewed before merging.**
205
+
206
+ ## Constraints
207
+
208
+ - **Only edit** these paths, and only where drift requires it: `src/hooks/types.ts`,
209
+ `src/hooks/integrations.ts`, `src/hooks/policy-evaluator.ts`,
210
+ `__tests__/hooks/manager.test.ts`, `__tests__/hooks/integrations.test.ts`,
211
+ `__tests__/e2e/hooks/<cli>-integration.e2e.test.ts`, the seven dogfood fixtures
212
+ (`.claude/settings.json`, `.codex/hooks.json`, `.cursor/hooks.json`,
213
+ `.github/hooks/failproofai.json`, `.opencode/opencode.json`,
214
+ `.opencode/plugins/failproofai.mjs`, `.pi/settings.json`, `.gemini/settings.json`),
215
+ and `CHANGELOG.md`.
216
+ - Do **NOT** edit `.failproofai/policies-config.json` (the entrypoint manages it),
217
+ `src/hooks/handler.ts`, `src/hooks/manager.ts`, or any other source file.
218
+ - Do **NOT** add entries to any `*EVENT_MAP`, `*_TOOL_MAP`, or `*_TOOL_INPUT_MAP`
219
+ for newly-added items. Removing a key when its array entry is removed IS allowed
220
+ (and required to keep the build green).
221
+ - Do **NOT** invent events, tools, or fields. If WebFetch fails or the docs don't
222
+ expose a clean list, mark the CLI `unverified` and move on.
@@ -154,7 +154,10 @@ export const claudeCode: Integration = {
154
154
  return {
155
155
  type: "command",
156
156
  command,
157
- timeout: 60_000,
157
+ // Claude reads `timeout` in SECONDS per https://code.claude.com/docs/en/hooks
158
+ // ("Seconds before canceling. Defaults: 600 for command ...; 60 for agent"),
159
+ // NOT milliseconds. 60 = 60s; the old 60000 meant ~16.7h. (#482-class unit fix)
160
+ timeout: 60,
158
161
  [FAILPROOFAI_HOOK_MARKER]: true,
159
162
  };
160
163
  },
@@ -285,8 +288,10 @@ export const codex: Integration = {
285
288
  : `"${binaryPath}" --hook ${eventType} --cli codex`;
286
289
  return {
287
290
  type: "command",
288
- // Codex reads `timeout` in SECONDS (its `timeout_sec` field, default 600)
289
- // NOT milliseconds like Claude/Cursor/Gemini. 60 = 60s, not 60000ms (~16.7h).
291
+ // Codex reads `timeout` in SECONDS (the field is literally `timeout`,
292
+ // default 600 per https://developers.openai.com/codex/hooks) same unit as
293
+ // Claude/Cursor/Copilot, and unlike Gemini, whose `timeout` is in
294
+ // milliseconds (default 60000). 60 = 60s, not 60000ms (~16.7h).
290
295
  command,
291
296
  timeout: 60,
292
297
  [FAILPROOFAI_HOOK_MARKER]: true,
@@ -591,11 +596,13 @@ export const cursor: Integration = {
591
596
  scope === "project"
592
597
  ? `npx -y failproofai --hook ${eventType} --cli cursor`
593
598
  : `"${binaryPath}" --hook ${eventType} --cli cursor`;
594
- // `timeout` is documented as ms in Cursor's schema (matches Claude).
599
+ // `timeout` is documented in SECONDS in Cursor's schema per
600
+ // https://cursor.com/docs/hooks ("Execution timeout in seconds"; doc examples
601
+ // use 30 and 10), NOT milliseconds. 60 = 60s; the old 60000 meant ~16.7h.
595
602
  return {
596
603
  type: "command",
597
604
  command,
598
- timeout: 60_000,
605
+ timeout: 60,
599
606
  [FAILPROOFAI_HOOK_MARKER]: true,
600
607
  };
601
608
  },
@@ -18,6 +18,18 @@ export const CODEX_HOOK_EVENT_TYPES = [
18
18
  "post_tool_use",
19
19
  "user_prompt_submit",
20
20
  "stop",
21
+ // Newly documented upstream (https://developers.openai.com/codex/hooks) —
22
+ // snake_case forms of the documented SubagentStart / PreCompact / PostCompact /
23
+ // SubagentStop events. Each has an exact 1:1 canonical HookEventType (already
24
+ // present in HOOK_EVENT_TYPES), so their CODEX_EVENT_MAP entries below are
25
+ // filled in directly. The map is an exhaustive `Record<CodexHookEventType,
26
+ // HookEventType>`, so tsc guarantees every event here keeps a mapping — a
27
+ // partial sync (event added, mapping missing) fails the build instead of
28
+ // silently writing an `undefined` event key into users' .codex/hooks.json.
29
+ "subagent_start",
30
+ "pre_compact",
31
+ "post_compact",
32
+ "subagent_stop",
21
33
  ] as const;
22
34
  export type CodexHookEventType = (typeof CODEX_HOOK_EVENT_TYPES)[number];
23
35
 
@@ -28,6 +40,10 @@ export const CODEX_EVENT_MAP: Record<CodexHookEventType, HookEventType> = {
28
40
  post_tool_use: "PostToolUse",
29
41
  user_prompt_submit: "UserPromptSubmit",
30
42
  stop: "Stop",
43
+ subagent_start: "SubagentStart",
44
+ pre_compact: "PreCompact",
45
+ post_compact: "PostCompact",
46
+ subagent_stop: "SubagentStop",
31
47
  };
32
48
 
33
49
  /**
@@ -92,6 +108,18 @@ export const COPILOT_HOOK_EVENT_TYPES = [
92
108
  "PostToolUse",
93
109
  "Stop",
94
110
  "SubagentStop",
111
+ // Newly documented upstream (cli-hooks-reference), each with an explicit
112
+ // PascalCase "VS Code compatible" variant shown in the docs. No COPILOT_EVENT_MAP
113
+ // exists (Copilot names are already Pascal), so appending keeps the build green.
114
+ // NOTE: `subagentStart` is also newly documented but appears camelCase-ONLY (no
115
+ // PascalCase variant listed), so it is deferred to the reviewer checklist rather
116
+ // than guessing a casing. `notification`, by contrast, DOES have a documented
117
+ // `Notification` PascalCase variant, so it is appended below.
118
+ "PostToolUseFailure",
119
+ "ErrorOccurred",
120
+ "PreCompact",
121
+ "PermissionRequest",
122
+ "Notification",
95
123
  ] as const;
96
124
  export type CopilotHookEventType = (typeof COPILOT_HOOK_EVENT_TYPES)[number];
97
125
 
@@ -556,6 +584,18 @@ export const HOOK_EVENT_TYPES = [
556
584
  "ElicitationResult",
557
585
  "UserPromptExpansion",
558
586
  "PostToolBatch",
587
+ // Newly documented upstream (https://code.claude.com/docs/en/hooks lifecycle
588
+ // table). `Setup` fires only on `--init`/`--maintenance` (low-frequency), so it
589
+ // is appended and installed like any other event.
590
+ //
591
+ // `MessageDisplay` is intentionally NOT appended. The docs mark it observe-only
592
+ // (it cannot block or modify anything) and note it fires on *every* assistant
593
+ // message display with no matcher support. Since `writeHookEntries` installs a
594
+ // hook for every entry in this array, appending it would spawn a failproofai
595
+ // subprocess on every message render for zero enforcement value. Deferred to the
596
+ // PR reviewer checklist; add it here only if a future observe-only use case
597
+ // (e.g. redaction/telemetry) justifies the per-message cost.
598
+ "Setup",
559
599
  ] as const;
560
600
 
561
601
  export type HookEventType = (typeof HOOK_EVENT_TYPES)[number];