failproofai 0.0.1-beta.9 → 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (94) 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 +7 -7
  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 +7 -7
  12. package/.next/standalone/.next/server/app/_global-error.segments/_head.segment.rsc +3 -3
  13. package/.next/standalone/.next/server/app/_global-error.segments/_index.segment.rsc +3 -3
  14. package/.next/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  15. package/.next/standalone/.next/server/app/_not-found/page/server-reference-manifest.json +1 -1
  16. package/.next/standalone/.next/server/app/_not-found/page.js.nft.json +1 -1
  17. package/.next/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  18. package/.next/standalone/.next/server/app/_not-found.html +2 -2
  19. package/.next/standalone/.next/server/app/_not-found.rsc +15 -15
  20. package/.next/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +15 -15
  21. package/.next/standalone/.next/server/app/_not-found.segments/_head.segment.rsc +4 -4
  22. package/.next/standalone/.next/server/app/_not-found.segments/_index.segment.rsc +10 -10
  23. package/.next/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +2 -2
  24. package/.next/standalone/.next/server/app/_not-found.segments/_not-found.segment.rsc +3 -3
  25. package/.next/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
  26. package/.next/standalone/.next/server/app/index.html +1 -1
  27. package/.next/standalone/.next/server/app/index.rsc +15 -15
  28. package/.next/standalone/.next/server/app/index.segments/__PAGE__.segment.rsc +2 -2
  29. package/.next/standalone/.next/server/app/index.segments/_full.segment.rsc +15 -15
  30. package/.next/standalone/.next/server/app/index.segments/_head.segment.rsc +4 -4
  31. package/.next/standalone/.next/server/app/index.segments/_index.segment.rsc +10 -10
  32. package/.next/standalone/.next/server/app/index.segments/_tree.segment.rsc +1 -1
  33. package/.next/standalone/.next/server/app/page/server-reference-manifest.json +1 -1
  34. package/.next/standalone/.next/server/app/page.js.nft.json +1 -1
  35. package/.next/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
  36. package/.next/standalone/.next/server/app/policies/page/server-reference-manifest.json +8 -8
  37. package/.next/standalone/.next/server/app/policies/page.js.nft.json +1 -1
  38. package/.next/standalone/.next/server/app/policies/page_client-reference-manifest.js +1 -1
  39. package/.next/standalone/.next/server/app/project/[name]/page/server-reference-manifest.json +1 -1
  40. package/.next/standalone/.next/server/app/project/[name]/page.js.nft.json +1 -1
  41. package/.next/standalone/.next/server/app/project/[name]/page_client-reference-manifest.js +1 -1
  42. package/.next/standalone/.next/server/app/project/[name]/session/[sessionId]/page/react-loadable-manifest.json +2 -2
  43. package/.next/standalone/.next/server/app/project/[name]/session/[sessionId]/page/server-reference-manifest.json +2 -2
  44. package/.next/standalone/.next/server/app/project/[name]/session/[sessionId]/page.js.nft.json +1 -1
  45. package/.next/standalone/.next/server/app/project/[name]/session/[sessionId]/page_client-reference-manifest.js +1 -1
  46. package/.next/standalone/.next/server/app/projects/page/server-reference-manifest.json +1 -1
  47. package/.next/standalone/.next/server/app/projects/page.js.nft.json +1 -1
  48. package/.next/standalone/.next/server/app/projects/page_client-reference-manifest.js +1 -1
  49. package/.next/standalone/.next/server/chunks/[root-of-the-server]__02nt~6d._.js +1 -1
  50. package/.next/standalone/.next/server/chunks/package_json_[json]_cjs_0z7w.hh._.js +1 -1
  51. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__092s1ta._.js +2 -2
  52. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__09icjsf._.js +2 -2
  53. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0g.lg8b._.js +2 -2
  54. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0h..k-e._.js +2 -2
  55. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0su5_t~._.js → [root-of-the-server]__0jvf9jj._.js} +2 -2
  56. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0osi8nq._.js +2 -2
  57. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0w6l33k._.js +2 -2
  58. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0yhzo9v._.js → [root-of-the-server]__0~7bzp~._.js} +2 -2
  59. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__11pa2ra._.js +2 -2
  60. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__12t-wym._.js +2 -2
  61. package/.next/standalone/.next/server/chunks/ssr/_10lm7or._.js +1 -1
  62. package/.next/standalone/.next/server/chunks/ssr/app_global-error_tsx_0xerkr6._.js +1 -1
  63. package/.next/standalone/.next/server/chunks/ssr/app_policies_hooks-client_tsx_0q-m0y-._.js +1 -1
  64. package/.next/standalone/.next/server/middleware-build-manifest.js +3 -3
  65. package/.next/standalone/.next/server/pages/404.html +2 -2
  66. package/.next/standalone/.next/server/pages/500.html +1 -1
  67. package/.next/standalone/.next/server/server-reference-manifest.js +1 -1
  68. package/.next/standalone/.next/server/server-reference-manifest.json +9 -9
  69. package/.next/standalone/.next/static/chunks/{0qjjki0j187__.js → 056c865hodfe7.js} +1 -1
  70. package/.next/standalone/.next/static/chunks/{124wu0bxsexm6.js → 066e8ajzl234v.js} +1 -1
  71. package/.next/standalone/.next/static/chunks/{0frzv~pmu0hsf.js → 0eh2hq9~6bf53.js} +1 -1
  72. package/.next/standalone/.next/static/chunks/{0nygnut7i45jn.js → 0nwr.y4dwla00.js} +1 -1
  73. package/.next/standalone/.next/static/chunks/{14xe0g0rgwk18.js → 0o04-obbhh9.s.js} +1 -1
  74. package/.next/standalone/.next/static/chunks/{0.aencsvb-yev.js → 0wmsi.tszy~9y.js} +1 -1
  75. package/.next/standalone/.next/static/chunks/{12olt9p45z-lq.js → 15lp0u9f5fwae.js} +1 -1
  76. package/.next/standalone/.next/static/chunks/{0pc9pc_pilpi9.js → 17q_c2.bbcoh1.js} +1 -1
  77. package/.next/standalone/AGENTS.md +80 -0
  78. package/.next/standalone/CLAUDE.md +137 -0
  79. package/.next/standalone/bin/failproofai.mjs +12 -1
  80. package/.next/standalone/dist/index.js +80 -0
  81. package/.next/standalone/docs/package-aliases.md +25 -25
  82. package/.next/standalone/examples/policies-notification.js +77 -32
  83. package/.next/standalone/package.json +3 -2
  84. package/.next/standalone/scripts/sync-hook-events-prompt.md +60 -0
  85. package/.next/standalone/server.js +1 -1
  86. package/.next/standalone/src/hooks/types.ts +11 -2
  87. package/bin/failproofai.mjs +12 -1
  88. package/dist/index.js +80 -0
  89. package/package.json +3 -2
  90. package/scripts/sync-hook-events-prompt.md +60 -0
  91. package/src/hooks/types.ts +11 -2
  92. /package/.next/standalone/.next/static/{o1smiVYETTvcMet_AU8oi → odPaRK23IkTvoPxqrn_8P}/_buildManifest.js +0 -0
  93. /package/.next/standalone/.next/static/{o1smiVYETTvcMet_AU8oi → odPaRK23IkTvoPxqrn_8P}/_clientMiddlewareManifest.js +0 -0
  94. /package/.next/standalone/.next/static/{o1smiVYETTvcMet_AU8oi → odPaRK23IkTvoPxqrn_8P}/_ssgManifest.js +0 -0
@@ -0,0 +1,60 @@
1
+ You are an automated agent running in GitHub Actions to keep failproofai's hook
2
+ event types in sync with the official Claude Code documentation.
3
+
4
+ ## Your task
5
+
6
+ 1. Fetch the Claude Code hooks reference pages using WebFetch:
7
+ - https://code.claude.com/docs/en/hooks (full reference — has the complete event table)
8
+ - https://code.claude.com/docs/en/hooks-guide (guide — also has a summary event table)
9
+ Extract the complete list of all hook event type names (e.g. SessionStart,
10
+ PreToolUse, PostToolUse, etc.) from the event lifecycle/trigger table.
11
+ Use both pages; union the results if they differ. Prefer the reference page.
12
+
13
+ 2. Read `src/hooks/types.ts` and extract the current `HOOK_EVENT_TYPES` array
14
+ (the TypeScript `as const` array of strings).
15
+
16
+ 3. Diff the two lists:
17
+ - **added**: event types in the docs but NOT in our array
18
+ - **removed**: event types in our array but NOT in the docs
19
+
20
+ 4. If there are NO differences:
21
+ Write the following JSON to `.sync-hook-events-output.json` in the repo root:
22
+ ```json
23
+ { "changed": false }
24
+ ```
25
+ Then stop.
26
+
27
+ 5. If there are differences:
28
+
29
+ a. Update `HOOK_EVENT_TYPES` in `src/hooks/types.ts`:
30
+ - Add new event types (append after the last existing entry, before `] as const`)
31
+ - Remove stale event types if any
32
+
33
+ b. Update `__tests__/hooks/manager.test.ts` — find the hardcoded event-type
34
+ counts and update them to the new total:
35
+ - The test description string matching `all N event types`
36
+ - The `toHaveLength(N)` assertion(s) that check `Object.keys(written.hooks)`
37
+ Search by the current count number to locate them.
38
+
39
+ c. Write the following JSON to `.sync-hook-events-output.json` in the repo root:
40
+ ```json
41
+ {
42
+ "changed": true,
43
+ "added": ["EventA", "EventB"],
44
+ "removed": ["EventC"],
45
+ "prTitle": "[auto] sync hook event types with Claude Code docs",
46
+ "prBody": "..."
47
+ }
48
+ ```
49
+ The `prBody` must be a Markdown string containing:
50
+ - List of **added** event types (or "none")
51
+ - List of **removed** event types (or "none")
52
+ - Source URLs used
53
+ - A note: "CI must pass and this PR must be reviewed before merging."
54
+
55
+ ## Constraints
56
+
57
+ - **Only edit `src/hooks/types.ts`, `__tests__/hooks/manager.test.ts`, and
58
+ `.sync-hook-events-output.json`**. No other files.
59
+ - Do NOT run any shell commands (no git, no gh, no bun).
60
+ - Do NOT modify `policy-evaluator.ts`, `manager.ts`, or any other source file.
@@ -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":{},"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":1,"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","turbopack":{"root":"/home/runner/work/failproofai/failproofai"},"distDirRoot":".next"}
12
+ const nextConfig = {"env":{},"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","turbopack":{"root":"/home/runner/work/failproofai/failproofai"},"distDirRoot":".next"}
13
13
 
14
14
  process.env.__NEXT_PRIVATE_STANDALONE_CONFIG = JSON.stringify(nextConfig)
15
15
 
@@ -10,19 +10,28 @@ export const HOOK_EVENT_TYPES = [
10
10
  "SessionEnd",
11
11
  "UserPromptSubmit",
12
12
  "PreToolUse",
13
+ "PermissionRequest",
14
+ "PermissionDenied",
13
15
  "PostToolUse",
14
16
  "PostToolUseFailure",
15
- "PermissionRequest",
16
17
  "Notification",
17
18
  "SubagentStart",
18
19
  "SubagentStop",
20
+ "TaskCreated",
21
+ "TaskCompleted",
19
22
  "Stop",
23
+ "StopFailure",
20
24
  "TeammateIdle",
21
- "TaskCompleted",
25
+ "InstructionsLoaded",
22
26
  "ConfigChange",
27
+ "CwdChanged",
28
+ "FileChanged",
23
29
  "WorktreeCreate",
24
30
  "WorktreeRemove",
25
31
  "PreCompact",
32
+ "PostCompact",
33
+ "Elicitation",
34
+ "ElicitationResult",
26
35
  ] as const;
27
36
 
28
37
  export type HookEventType = (typeof HOOK_EVENT_TYPES)[number];
@@ -24,8 +24,19 @@ if (!process.env.FAILPROOFAI_PACKAGE_ROOT) {
24
24
  );
25
25
  }
26
26
 
27
+ if (!process.env.FAILPROOFAI_DIST_PATH) {
28
+ process.env.FAILPROOFAI_DIST_PATH = resolve(
29
+ dirname(realpathSync(fileURLToPath(import.meta.url))),
30
+ "..",
31
+ "dist"
32
+ );
33
+ }
34
+
27
35
  const args = process.argv.slice(2);
28
36
 
37
+ // Normalize 'p' → 'policies' (shorthand alias)
38
+ if (args[0] === "p") args[0] = "policies";
39
+
29
40
  // --help / -h (only when not inside a subcommand that handles its own --help)
30
41
  const SUBCOMMANDS = ["policies"];
31
42
  if ((args.includes("--help") || args.includes("-h")) && !SUBCOMMANDS.includes(args[0])) {
@@ -38,7 +49,7 @@ USAGE
38
49
  COMMANDS
39
50
  (no args) Launch the policy dashboard
40
51
 
41
- policies List all available policies and their status
52
+ policies, p List all available policies and their status
42
53
  policies --install, -i Enable policies in Claude Code settings
43
54
  [names...] Specific policy names to enable
44
55
  --scope user|project|local Config scope to write to (default: user)
package/dist/index.js ADDED
@@ -0,0 +1,80 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropNames = Object.getOwnPropertyNames;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ function __accessProp(key) {
6
+ return this[key];
7
+ }
8
+ var __toCommonJS = (from) => {
9
+ var entry = (__moduleCache ??= new WeakMap).get(from), desc;
10
+ if (entry)
11
+ return entry;
12
+ entry = __defProp({}, "__esModule", { value: true });
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (var key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(entry, key))
16
+ __defProp(entry, key, {
17
+ get: __accessProp.bind(from, key),
18
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
19
+ });
20
+ }
21
+ __moduleCache.set(from, entry);
22
+ return entry;
23
+ };
24
+ var __moduleCache;
25
+ var __returnValue = (v) => v;
26
+ function __exportSetter(name, newValue) {
27
+ this[name] = __returnValue.bind(null, newValue);
28
+ }
29
+ var __export = (target, all) => {
30
+ for (var name in all)
31
+ __defProp(target, name, {
32
+ get: all[name],
33
+ enumerable: true,
34
+ configurable: true,
35
+ set: __exportSetter.bind(all, name)
36
+ });
37
+ };
38
+
39
+ // src/index.ts
40
+ var exports_src = {};
41
+ __export(exports_src, {
42
+ instruct: () => instruct,
43
+ getCustomHooks: () => getCustomHooks,
44
+ deny: () => deny,
45
+ customPolicies: () => customPolicies,
46
+ clearCustomHooks: () => clearCustomHooks,
47
+ allow: () => allow
48
+ });
49
+ module.exports = __toCommonJS(exports_src);
50
+
51
+ // src/hooks/custom-hooks-registry.ts
52
+ var REGISTRY_KEY = "__failproofai_custom_hooks__";
53
+ function getRegistry() {
54
+ const g = globalThis;
55
+ if (!Array.isArray(g[REGISTRY_KEY]))
56
+ g[REGISTRY_KEY] = [];
57
+ return g[REGISTRY_KEY];
58
+ }
59
+ var customPolicies = {
60
+ add(hook) {
61
+ getRegistry().push(hook);
62
+ }
63
+ };
64
+ function getCustomHooks() {
65
+ return getRegistry();
66
+ }
67
+ function clearCustomHooks() {
68
+ const g = globalThis;
69
+ g[REGISTRY_KEY] = [];
70
+ }
71
+ // src/hooks/policy-helpers.ts
72
+ function allow() {
73
+ return { decision: "allow" };
74
+ }
75
+ function deny(reason) {
76
+ return { decision: "deny", reason };
77
+ }
78
+ function instruct(reason) {
79
+ return { decision: "instruct", reason };
80
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "failproofai",
3
- "version": "0.0.1-beta.9",
3
+ "version": "0.0.1",
4
4
  "description": "Open-source hooks, policies, and project visualization for Claude Code & Agents SDK",
5
5
  "bin": {
6
6
  "failproofai": "./bin/failproofai.mjs"
@@ -11,6 +11,7 @@
11
11
  "scripts/",
12
12
  "lib/",
13
13
  ".next/standalone/",
14
+ "dist/",
14
15
  "README.md"
15
16
  ],
16
17
  "engines": {
@@ -20,7 +21,7 @@
20
21
  "scripts": {
21
22
  "predev": "bun link",
22
23
  "dev": "FAILPROOFAI_TELEMETRY_DISABLED=1 bun scripts/dev.ts --port 8020",
23
- "build": "bun --bun next build && node -e \"const {cpSync}=require('fs');cpSync('.next/static','.next/standalone/.next/static',{recursive:true});\"",
24
+ "build": "bun build --target=node --format=cjs --outfile=dist/index.js src/index.ts && bun --bun next build && node -e \"const {cpSync}=require('fs');cpSync('.next/static','.next/standalone/.next/static',{recursive:true});\"",
24
25
  "prestart": "bun link",
25
26
  "start": "FAILPROOFAI_TELEMETRY_DISABLED=1 bun scripts/start.ts",
26
27
  "test": "vitest",
@@ -0,0 +1,60 @@
1
+ You are an automated agent running in GitHub Actions to keep failproofai's hook
2
+ event types in sync with the official Claude Code documentation.
3
+
4
+ ## Your task
5
+
6
+ 1. Fetch the Claude Code hooks reference pages using WebFetch:
7
+ - https://code.claude.com/docs/en/hooks (full reference — has the complete event table)
8
+ - https://code.claude.com/docs/en/hooks-guide (guide — also has a summary event table)
9
+ Extract the complete list of all hook event type names (e.g. SessionStart,
10
+ PreToolUse, PostToolUse, etc.) from the event lifecycle/trigger table.
11
+ Use both pages; union the results if they differ. Prefer the reference page.
12
+
13
+ 2. Read `src/hooks/types.ts` and extract the current `HOOK_EVENT_TYPES` array
14
+ (the TypeScript `as const` array of strings).
15
+
16
+ 3. Diff the two lists:
17
+ - **added**: event types in the docs but NOT in our array
18
+ - **removed**: event types in our array but NOT in the docs
19
+
20
+ 4. If there are NO differences:
21
+ Write the following JSON to `.sync-hook-events-output.json` in the repo root:
22
+ ```json
23
+ { "changed": false }
24
+ ```
25
+ Then stop.
26
+
27
+ 5. If there are differences:
28
+
29
+ a. Update `HOOK_EVENT_TYPES` in `src/hooks/types.ts`:
30
+ - Add new event types (append after the last existing entry, before `] as const`)
31
+ - Remove stale event types if any
32
+
33
+ b. Update `__tests__/hooks/manager.test.ts` — find the hardcoded event-type
34
+ counts and update them to the new total:
35
+ - The test description string matching `all N event types`
36
+ - The `toHaveLength(N)` assertion(s) that check `Object.keys(written.hooks)`
37
+ Search by the current count number to locate them.
38
+
39
+ c. Write the following JSON to `.sync-hook-events-output.json` in the repo root:
40
+ ```json
41
+ {
42
+ "changed": true,
43
+ "added": ["EventA", "EventB"],
44
+ "removed": ["EventC"],
45
+ "prTitle": "[auto] sync hook event types with Claude Code docs",
46
+ "prBody": "..."
47
+ }
48
+ ```
49
+ The `prBody` must be a Markdown string containing:
50
+ - List of **added** event types (or "none")
51
+ - List of **removed** event types (or "none")
52
+ - Source URLs used
53
+ - A note: "CI must pass and this PR must be reviewed before merging."
54
+
55
+ ## Constraints
56
+
57
+ - **Only edit `src/hooks/types.ts`, `__tests__/hooks/manager.test.ts`, and
58
+ `.sync-hook-events-output.json`**. No other files.
59
+ - Do NOT run any shell commands (no git, no gh, no bun).
60
+ - Do NOT modify `policy-evaluator.ts`, `manager.ts`, or any other source file.
@@ -10,19 +10,28 @@ export const HOOK_EVENT_TYPES = [
10
10
  "SessionEnd",
11
11
  "UserPromptSubmit",
12
12
  "PreToolUse",
13
+ "PermissionRequest",
14
+ "PermissionDenied",
13
15
  "PostToolUse",
14
16
  "PostToolUseFailure",
15
- "PermissionRequest",
16
17
  "Notification",
17
18
  "SubagentStart",
18
19
  "SubagentStop",
20
+ "TaskCreated",
21
+ "TaskCompleted",
19
22
  "Stop",
23
+ "StopFailure",
20
24
  "TeammateIdle",
21
- "TaskCompleted",
25
+ "InstructionsLoaded",
22
26
  "ConfigChange",
27
+ "CwdChanged",
28
+ "FileChanged",
23
29
  "WorktreeCreate",
24
30
  "WorktreeRemove",
25
31
  "PreCompact",
32
+ "PostCompact",
33
+ "Elicitation",
34
+ "ElicitationResult",
26
35
  ] as const;
27
36
 
28
37
  export type HookEventType = (typeof HOOK_EVENT_TYPES)[number];