failproofai 0.0.6-beta.3 → 0.0.6-beta.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.next/standalone/.next/BUILD_ID +1 -1
- package/.next/standalone/.next/build-manifest.json +3 -3
- package/.next/standalone/.next/prerender-manifest.json +3 -3
- package/.next/standalone/.next/required-server-files.json +7 -1
- package/.next/standalone/.next/server/app/_global-error/page/server-reference-manifest.json +1 -1
- package/.next/standalone/.next/server/app/_global-error/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/_global-error.html +1 -1
- package/.next/standalone/.next/server/app/_global-error.rsc +7 -7
- package/.next/standalone/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +7 -7
- package/.next/standalone/.next/server/app/_global-error.segments/_head.segment.rsc +3 -3
- package/.next/standalone/.next/server/app/_global-error.segments/_index.segment.rsc +3 -3
- package/.next/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_not-found/page/server-reference-manifest.json +1 -1
- package/.next/standalone/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/_not-found.html +2 -2
- package/.next/standalone/.next/server/app/_not-found.rsc +17 -17
- package/.next/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +17 -17
- package/.next/standalone/.next/server/app/_not-found.segments/_head.segment.rsc +4 -4
- package/.next/standalone/.next/server/app/_not-found.segments/_index.segment.rsc +11 -11
- package/.next/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/_not-found.segments/_not-found.segment.rsc +3 -3
- package/.next/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/index.html +1 -1
- package/.next/standalone/.next/server/app/index.rsc +16 -16
- package/.next/standalone/.next/server/app/index.segments/__PAGE__.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/index.segments/_full.segment.rsc +16 -16
- package/.next/standalone/.next/server/app/index.segments/_head.segment.rsc +4 -4
- package/.next/standalone/.next/server/app/index.segments/_index.segment.rsc +11 -11
- package/.next/standalone/.next/server/app/index.segments/_tree.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/page/server-reference-manifest.json +1 -1
- package/.next/standalone/.next/server/app/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/policies/page/server-reference-manifest.json +8 -8
- package/.next/standalone/.next/server/app/policies/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/policies/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/project/[name]/page/server-reference-manifest.json +1 -1
- package/.next/standalone/.next/server/app/project/[name]/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/project/[name]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/project/[name]/session/[sessionId]/page/react-loadable-manifest.json +2 -2
- package/.next/standalone/.next/server/app/project/[name]/session/[sessionId]/page/server-reference-manifest.json +2 -2
- package/.next/standalone/.next/server/app/project/[name]/session/[sessionId]/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/project/[name]/session/[sessionId]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/projects/page/server-reference-manifest.json +1 -1
- package/.next/standalone/.next/server/app/projects/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/projects/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0g72weg._.js +1 -1
- package/.next/standalone/.next/server/chunks/package_json_[json]_cjs_0z7w.hh._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__092s1ta._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__09icjsf._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0g.lg8b._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0h..k-e._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0okos0k._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__096k.db._.js → [root-of-the-server]__0u49i20._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0w6l33k._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0kyh86x._.js → [root-of-the-server]__0xezw2w._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__11pa2ra._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__12t-wym._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/_10lm7or._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/app_global-error_tsx_0xerkr6._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/app_policies_hooks-client_tsx_0q-m0y-._.js +1 -1
- package/.next/standalone/.next/server/middleware-build-manifest.js +3 -3
- package/.next/standalone/.next/server/pages/404.html +2 -2
- package/.next/standalone/.next/server/pages/500.html +1 -1
- package/.next/standalone/.next/server/server-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/server-reference-manifest.json +9 -9
- package/.next/standalone/.next/static/chunks/03xexm0jftw.x.js +6 -0
- package/.next/standalone/.next/static/chunks/{0-dm_9a6nsc2l.js → 0_-7qmtiagi-~.js} +1 -1
- package/.next/standalone/.next/static/chunks/{0l-mu4okl-cj1.js → 0af6vx3nh6v77.js} +1 -1
- package/.next/standalone/.next/static/chunks/{051m32nx~n5yr.js → 0hrob6m-1.n1d.js} +1 -1
- package/.next/standalone/.next/static/chunks/0mir9jdxn35~s.css +1 -0
- package/.next/standalone/.next/static/chunks/{156zca6aewyr-.js → 0ms9sfkvw5h5i.js} +1 -1
- package/.next/standalone/.next/static/chunks/{01pmw1-asbek~.js → 0on5naeqa0w.x.js} +2 -2
- package/.next/standalone/.next/static/chunks/{0mazj-p-~2kc6.js → 0q~7ymasjp~n7.js} +1 -1
- package/.next/standalone/.next/static/chunks/{0a-yctdwn368y.js → 11vga8q3t~527.js} +1 -1
- package/.next/standalone/next.config.ts +6 -0
- package/.next/standalone/package.json +2 -2
- package/.next/standalone/server.js +1 -1
- package/dist/cli.mjs +90 -2
- package/package.json +2 -2
- package/scripts/prune-standalone.mjs +128 -0
- package/src/hooks/builtin-policies.ts +117 -0
- package/.next/standalone/.claude/settings.json +0 -316
- package/.next/standalone/.failproofai/policies/review-policies.mjs +0 -113
- package/.next/standalone/.failproofai/policies/workflow-policies.mjs +0 -63
- package/.next/standalone/.failproofai/policies-config.json +0 -39
- package/.next/standalone/.next/static/chunks/0gu_a.a80ritd.css +0 -1
- package/.next/standalone/.next/static/chunks/0qakntsrpc~1j.js +0 -6
- package/.next/standalone/AGENTS.md +0 -80
- package/.next/standalone/CHANGELOG.md +0 -158
- package/.next/standalone/CLAUDE.md +0 -165
- package/.next/standalone/CONTRIBUTING.md +0 -76
- package/.next/standalone/Dockerfile.docs +0 -12
- package/.next/standalone/LICENSE +0 -42
- package/.next/standalone/README.md +0 -301
- package/.next/standalone/bin/failproofai.mjs +0 -439
- package/.next/standalone/bun.lock +0 -1119
- package/.next/standalone/components.json +0 -23
- package/.next/standalone/dist/cli.mjs +0 -4696
- package/.next/standalone/dist/index.js +0 -80
- package/.next/standalone/docs/ar/architecture.mdx +0 -334
- package/.next/standalone/docs/ar/built-in-policies.mdx +0 -574
- package/.next/standalone/docs/ar/cli/dashboard.mdx +0 -28
- package/.next/standalone/docs/ar/cli/environment-variables.mdx +0 -34
- package/.next/standalone/docs/ar/cli/hook.mdx +0 -31
- package/.next/standalone/docs/ar/cli/install-policies.mdx +0 -48
- package/.next/standalone/docs/ar/cli/list-policies.mdx +0 -31
- package/.next/standalone/docs/ar/cli/remove-policies.mdx +0 -43
- package/.next/standalone/docs/ar/cli/version.mdx +0 -13
- package/.next/standalone/docs/ar/configuration.mdx +0 -223
- package/.next/standalone/docs/ar/custom-policies.mdx +0 -354
- package/.next/standalone/docs/ar/dashboard.mdx +0 -142
- package/.next/standalone/docs/ar/examples.mdx +0 -307
- package/.next/standalone/docs/ar/for-agents.mdx +0 -39
- package/.next/standalone/docs/ar/getting-started.mdx +0 -187
- package/.next/standalone/docs/ar/introduction.mdx +0 -58
- package/.next/standalone/docs/ar/package-aliases.mdx +0 -82
- package/.next/standalone/docs/ar/testing.mdx +0 -261
- package/.next/standalone/docs/architecture.mdx +0 -332
- package/.next/standalone/docs/built-in-policies.mdx +0 -574
- package/.next/standalone/docs/cli/dashboard.mdx +0 -28
- package/.next/standalone/docs/cli/environment-variables.mdx +0 -34
- package/.next/standalone/docs/cli/hook.mdx +0 -30
- package/.next/standalone/docs/cli/install-policies.mdx +0 -47
- package/.next/standalone/docs/cli/list-policies.mdx +0 -31
- package/.next/standalone/docs/cli/remove-policies.mdx +0 -43
- package/.next/standalone/docs/cli/version.mdx +0 -12
- package/.next/standalone/docs/configuration.mdx +0 -222
- package/.next/standalone/docs/custom-policies.mdx +0 -353
- package/.next/standalone/docs/dashboard.mdx +0 -142
- package/.next/standalone/docs/de/architecture.mdx +0 -332
- package/.next/standalone/docs/de/built-in-policies.mdx +0 -574
- package/.next/standalone/docs/de/cli/dashboard.mdx +0 -28
- package/.next/standalone/docs/de/cli/environment-variables.mdx +0 -34
- package/.next/standalone/docs/de/cli/hook.mdx +0 -30
- package/.next/standalone/docs/de/cli/install-policies.mdx +0 -47
- package/.next/standalone/docs/de/cli/list-policies.mdx +0 -31
- package/.next/standalone/docs/de/cli/remove-policies.mdx +0 -43
- package/.next/standalone/docs/de/cli/version.mdx +0 -12
- package/.next/standalone/docs/de/configuration.mdx +0 -222
- package/.next/standalone/docs/de/custom-policies.mdx +0 -353
- package/.next/standalone/docs/de/dashboard.mdx +0 -142
- package/.next/standalone/docs/de/examples.mdx +0 -307
- package/.next/standalone/docs/de/for-agents.mdx +0 -38
- package/.next/standalone/docs/de/getting-started.mdx +0 -186
- package/.next/standalone/docs/de/introduction.mdx +0 -57
- package/.next/standalone/docs/de/package-aliases.mdx +0 -82
- package/.next/standalone/docs/de/testing.mdx +0 -260
- package/.next/standalone/docs/docs.json +0 -1002
- package/.next/standalone/docs/es/architecture.mdx +0 -332
- package/.next/standalone/docs/es/built-in-policies.mdx +0 -574
- package/.next/standalone/docs/es/cli/dashboard.mdx +0 -28
- package/.next/standalone/docs/es/cli/environment-variables.mdx +0 -34
- package/.next/standalone/docs/es/cli/hook.mdx +0 -30
- package/.next/standalone/docs/es/cli/install-policies.mdx +0 -47
- package/.next/standalone/docs/es/cli/list-policies.mdx +0 -31
- package/.next/standalone/docs/es/cli/remove-policies.mdx +0 -43
- package/.next/standalone/docs/es/cli/version.mdx +0 -12
- package/.next/standalone/docs/es/configuration.mdx +0 -222
- package/.next/standalone/docs/es/custom-policies.mdx +0 -353
- package/.next/standalone/docs/es/dashboard.mdx +0 -142
- package/.next/standalone/docs/es/examples.mdx +0 -307
- package/.next/standalone/docs/es/for-agents.mdx +0 -38
- package/.next/standalone/docs/es/getting-started.mdx +0 -186
- package/.next/standalone/docs/es/introduction.mdx +0 -57
- package/.next/standalone/docs/es/package-aliases.mdx +0 -82
- package/.next/standalone/docs/es/testing.mdx +0 -260
- package/.next/standalone/docs/examples.mdx +0 -307
- package/.next/standalone/docs/favicon.ico +0 -0
- package/.next/standalone/docs/for-agents.mdx +0 -38
- package/.next/standalone/docs/fr/architecture.mdx +0 -332
- package/.next/standalone/docs/fr/built-in-policies.mdx +0 -574
- package/.next/standalone/docs/fr/cli/dashboard.mdx +0 -28
- package/.next/standalone/docs/fr/cli/environment-variables.mdx +0 -34
- package/.next/standalone/docs/fr/cli/hook.mdx +0 -30
- package/.next/standalone/docs/fr/cli/install-policies.mdx +0 -47
- package/.next/standalone/docs/fr/cli/list-policies.mdx +0 -31
- package/.next/standalone/docs/fr/cli/remove-policies.mdx +0 -43
- package/.next/standalone/docs/fr/cli/version.mdx +0 -12
- package/.next/standalone/docs/fr/configuration.mdx +0 -222
- package/.next/standalone/docs/fr/custom-policies.mdx +0 -353
- package/.next/standalone/docs/fr/dashboard.mdx +0 -142
- package/.next/standalone/docs/fr/examples.mdx +0 -307
- package/.next/standalone/docs/fr/for-agents.mdx +0 -38
- package/.next/standalone/docs/fr/getting-started.mdx +0 -186
- package/.next/standalone/docs/fr/introduction.mdx +0 -57
- package/.next/standalone/docs/fr/package-aliases.mdx +0 -82
- package/.next/standalone/docs/fr/testing.mdx +0 -260
- package/.next/standalone/docs/getting-started.mdx +0 -186
- package/.next/standalone/docs/he/architecture.mdx +0 -333
- package/.next/standalone/docs/he/built-in-policies.mdx +0 -575
- package/.next/standalone/docs/he/cli/dashboard.mdx +0 -28
- package/.next/standalone/docs/he/cli/environment-variables.mdx +0 -34
- package/.next/standalone/docs/he/cli/hook.mdx +0 -30
- package/.next/standalone/docs/he/cli/install-policies.mdx +0 -47
- package/.next/standalone/docs/he/cli/list-policies.mdx +0 -32
- package/.next/standalone/docs/he/cli/remove-policies.mdx +0 -43
- package/.next/standalone/docs/he/cli/version.mdx +0 -12
- package/.next/standalone/docs/he/configuration.mdx +0 -223
- package/.next/standalone/docs/he/custom-policies.mdx +0 -353
- package/.next/standalone/docs/he/dashboard.mdx +0 -142
- package/.next/standalone/docs/he/examples.mdx +0 -307
- package/.next/standalone/docs/he/for-agents.mdx +0 -38
- package/.next/standalone/docs/he/getting-started.mdx +0 -186
- package/.next/standalone/docs/he/introduction.mdx +0 -57
- package/.next/standalone/docs/he/package-aliases.mdx +0 -82
- package/.next/standalone/docs/he/testing.mdx +0 -260
- package/.next/standalone/docs/hi/architecture.mdx +0 -334
- package/.next/standalone/docs/hi/built-in-policies.mdx +0 -572
- package/.next/standalone/docs/hi/cli/dashboard.mdx +0 -28
- package/.next/standalone/docs/hi/cli/environment-variables.mdx +0 -34
- package/.next/standalone/docs/hi/cli/hook.mdx +0 -30
- package/.next/standalone/docs/hi/cli/install-policies.mdx +0 -47
- package/.next/standalone/docs/hi/cli/list-policies.mdx +0 -31
- package/.next/standalone/docs/hi/cli/remove-policies.mdx +0 -43
- package/.next/standalone/docs/hi/cli/version.mdx +0 -12
- package/.next/standalone/docs/hi/configuration.mdx +0 -222
- package/.next/standalone/docs/hi/custom-policies.mdx +0 -354
- package/.next/standalone/docs/hi/dashboard.mdx +0 -142
- package/.next/standalone/docs/hi/examples.mdx +0 -309
- package/.next/standalone/docs/hi/for-agents.mdx +0 -38
- package/.next/standalone/docs/hi/getting-started.mdx +0 -187
- package/.next/standalone/docs/hi/introduction.mdx +0 -57
- package/.next/standalone/docs/hi/package-aliases.mdx +0 -82
- package/.next/standalone/docs/hi/testing.mdx +0 -260
- package/.next/standalone/docs/i18n/README.ar.md +0 -312
- package/.next/standalone/docs/i18n/README.de.md +0 -307
- package/.next/standalone/docs/i18n/README.es.md +0 -307
- package/.next/standalone/docs/i18n/README.fr.md +0 -307
- package/.next/standalone/docs/i18n/README.he.md +0 -312
- package/.next/standalone/docs/i18n/README.hi.md +0 -307
- package/.next/standalone/docs/i18n/README.it.md +0 -307
- package/.next/standalone/docs/i18n/README.ja.md +0 -307
- package/.next/standalone/docs/i18n/README.ko.md +0 -307
- package/.next/standalone/docs/i18n/README.pt-br.md +0 -307
- package/.next/standalone/docs/i18n/README.ru.md +0 -308
- package/.next/standalone/docs/i18n/README.tr.md +0 -307
- package/.next/standalone/docs/i18n/README.vi.md +0 -307
- package/.next/standalone/docs/i18n/README.zh.md +0 -307
- package/.next/standalone/docs/introduction.mdx +0 -57
- package/.next/standalone/docs/it/architecture.mdx +0 -334
- package/.next/standalone/docs/it/built-in-policies.mdx +0 -574
- package/.next/standalone/docs/it/cli/dashboard.mdx +0 -28
- package/.next/standalone/docs/it/cli/environment-variables.mdx +0 -34
- package/.next/standalone/docs/it/cli/hook.mdx +0 -30
- package/.next/standalone/docs/it/cli/install-policies.mdx +0 -47
- package/.next/standalone/docs/it/cli/list-policies.mdx +0 -31
- package/.next/standalone/docs/it/cli/remove-policies.mdx +0 -43
- package/.next/standalone/docs/it/cli/version.mdx +0 -12
- package/.next/standalone/docs/it/configuration.mdx +0 -222
- package/.next/standalone/docs/it/custom-policies.mdx +0 -353
- package/.next/standalone/docs/it/dashboard.mdx +0 -142
- package/.next/standalone/docs/it/examples.mdx +0 -307
- package/.next/standalone/docs/it/for-agents.mdx +0 -38
- package/.next/standalone/docs/it/getting-started.mdx +0 -186
- package/.next/standalone/docs/it/introduction.mdx +0 -57
- package/.next/standalone/docs/it/package-aliases.mdx +0 -82
- package/.next/standalone/docs/it/testing.mdx +0 -260
- package/.next/standalone/docs/ja/architecture.mdx +0 -332
- package/.next/standalone/docs/ja/built-in-policies.mdx +0 -572
- package/.next/standalone/docs/ja/cli/dashboard.mdx +0 -28
- package/.next/standalone/docs/ja/cli/environment-variables.mdx +0 -34
- package/.next/standalone/docs/ja/cli/hook.mdx +0 -30
- package/.next/standalone/docs/ja/cli/install-policies.mdx +0 -47
- package/.next/standalone/docs/ja/cli/list-policies.mdx +0 -31
- package/.next/standalone/docs/ja/cli/remove-policies.mdx +0 -43
- package/.next/standalone/docs/ja/cli/version.mdx +0 -12
- package/.next/standalone/docs/ja/configuration.mdx +0 -222
- package/.next/standalone/docs/ja/custom-policies.mdx +0 -353
- package/.next/standalone/docs/ja/dashboard.mdx +0 -142
- package/.next/standalone/docs/ja/examples.mdx +0 -307
- package/.next/standalone/docs/ja/for-agents.mdx +0 -38
- package/.next/standalone/docs/ja/getting-started.mdx +0 -186
- package/.next/standalone/docs/ja/introduction.mdx +0 -57
- package/.next/standalone/docs/ja/package-aliases.mdx +0 -82
- package/.next/standalone/docs/ja/testing.mdx +0 -260
- package/.next/standalone/docs/ko/architecture.mdx +0 -332
- package/.next/standalone/docs/ko/built-in-policies.mdx +0 -572
- package/.next/standalone/docs/ko/cli/dashboard.mdx +0 -28
- package/.next/standalone/docs/ko/cli/environment-variables.mdx +0 -34
- package/.next/standalone/docs/ko/cli/hook.mdx +0 -30
- package/.next/standalone/docs/ko/cli/install-policies.mdx +0 -47
- package/.next/standalone/docs/ko/cli/list-policies.mdx +0 -31
- package/.next/standalone/docs/ko/cli/remove-policies.mdx +0 -43
- package/.next/standalone/docs/ko/cli/version.mdx +0 -12
- package/.next/standalone/docs/ko/configuration.mdx +0 -222
- package/.next/standalone/docs/ko/custom-policies.mdx +0 -353
- package/.next/standalone/docs/ko/dashboard.mdx +0 -142
- package/.next/standalone/docs/ko/examples.mdx +0 -307
- package/.next/standalone/docs/ko/for-agents.mdx +0 -38
- package/.next/standalone/docs/ko/getting-started.mdx +0 -186
- package/.next/standalone/docs/ko/introduction.mdx +0 -57
- package/.next/standalone/docs/ko/package-aliases.mdx +0 -82
- package/.next/standalone/docs/ko/testing.mdx +0 -260
- package/.next/standalone/docs/logo/dark.svg +0 -21
- package/.next/standalone/docs/logo/exosphere-dark.png +0 -0
- package/.next/standalone/docs/logo/exosphere-light.png +0 -0
- package/.next/standalone/docs/logo/light.svg +0 -21
- package/.next/standalone/docs/package-aliases.mdx +0 -82
- package/.next/standalone/docs/pt-br/architecture.mdx +0 -332
- package/.next/standalone/docs/pt-br/built-in-policies.mdx +0 -574
- package/.next/standalone/docs/pt-br/cli/dashboard.mdx +0 -28
- package/.next/standalone/docs/pt-br/cli/environment-variables.mdx +0 -34
- package/.next/standalone/docs/pt-br/cli/hook.mdx +0 -30
- package/.next/standalone/docs/pt-br/cli/install-policies.mdx +0 -47
- package/.next/standalone/docs/pt-br/cli/list-policies.mdx +0 -31
- package/.next/standalone/docs/pt-br/cli/remove-policies.mdx +0 -43
- package/.next/standalone/docs/pt-br/cli/version.mdx +0 -12
- package/.next/standalone/docs/pt-br/configuration.mdx +0 -222
- package/.next/standalone/docs/pt-br/custom-policies.mdx +0 -353
- package/.next/standalone/docs/pt-br/dashboard.mdx +0 -142
- package/.next/standalone/docs/pt-br/examples.mdx +0 -307
- package/.next/standalone/docs/pt-br/for-agents.mdx +0 -38
- package/.next/standalone/docs/pt-br/getting-started.mdx +0 -186
- package/.next/standalone/docs/pt-br/introduction.mdx +0 -57
- package/.next/standalone/docs/pt-br/package-aliases.mdx +0 -82
- package/.next/standalone/docs/pt-br/testing.mdx +0 -260
- package/.next/standalone/docs/ru/architecture.mdx +0 -333
- package/.next/standalone/docs/ru/built-in-policies.mdx +0 -574
- package/.next/standalone/docs/ru/cli/dashboard.mdx +0 -28
- package/.next/standalone/docs/ru/cli/environment-variables.mdx +0 -34
- package/.next/standalone/docs/ru/cli/hook.mdx +0 -30
- package/.next/standalone/docs/ru/cli/install-policies.mdx +0 -48
- package/.next/standalone/docs/ru/cli/list-policies.mdx +0 -32
- package/.next/standalone/docs/ru/cli/remove-policies.mdx +0 -43
- package/.next/standalone/docs/ru/cli/version.mdx +0 -12
- package/.next/standalone/docs/ru/configuration.mdx +0 -222
- package/.next/standalone/docs/ru/custom-policies.mdx +0 -354
- package/.next/standalone/docs/ru/dashboard.mdx +0 -142
- package/.next/standalone/docs/ru/examples.mdx +0 -309
- package/.next/standalone/docs/ru/for-agents.mdx +0 -38
- package/.next/standalone/docs/ru/getting-started.mdx +0 -186
- package/.next/standalone/docs/ru/introduction.mdx +0 -57
- package/.next/standalone/docs/ru/package-aliases.mdx +0 -82
- package/.next/standalone/docs/ru/testing.mdx +0 -260
- package/.next/standalone/docs/testing.mdx +0 -260
- package/.next/standalone/docs/tr/architecture.mdx +0 -333
- package/.next/standalone/docs/tr/built-in-policies.mdx +0 -574
- package/.next/standalone/docs/tr/cli/dashboard.mdx +0 -28
- package/.next/standalone/docs/tr/cli/environment-variables.mdx +0 -34
- package/.next/standalone/docs/tr/cli/hook.mdx +0 -30
- package/.next/standalone/docs/tr/cli/install-policies.mdx +0 -47
- package/.next/standalone/docs/tr/cli/list-policies.mdx +0 -31
- package/.next/standalone/docs/tr/cli/remove-policies.mdx +0 -44
- package/.next/standalone/docs/tr/cli/version.mdx +0 -12
- package/.next/standalone/docs/tr/configuration.mdx +0 -222
- package/.next/standalone/docs/tr/custom-policies.mdx +0 -353
- package/.next/standalone/docs/tr/dashboard.mdx +0 -142
- package/.next/standalone/docs/tr/examples.mdx +0 -308
- package/.next/standalone/docs/tr/for-agents.mdx +0 -38
- package/.next/standalone/docs/tr/getting-started.mdx +0 -186
- package/.next/standalone/docs/tr/introduction.mdx +0 -57
- package/.next/standalone/docs/tr/package-aliases.mdx +0 -82
- package/.next/standalone/docs/tr/testing.mdx +0 -260
- package/.next/standalone/docs/vi/architecture.mdx +0 -334
- package/.next/standalone/docs/vi/built-in-policies.mdx +0 -572
- package/.next/standalone/docs/vi/cli/dashboard.mdx +0 -28
- package/.next/standalone/docs/vi/cli/environment-variables.mdx +0 -34
- package/.next/standalone/docs/vi/cli/hook.mdx +0 -30
- package/.next/standalone/docs/vi/cli/install-policies.mdx +0 -47
- package/.next/standalone/docs/vi/cli/list-policies.mdx +0 -31
- package/.next/standalone/docs/vi/cli/remove-policies.mdx +0 -43
- package/.next/standalone/docs/vi/cli/version.mdx +0 -13
- package/.next/standalone/docs/vi/configuration.mdx +0 -222
- package/.next/standalone/docs/vi/custom-policies.mdx +0 -353
- package/.next/standalone/docs/vi/dashboard.mdx +0 -142
- package/.next/standalone/docs/vi/examples.mdx +0 -308
- package/.next/standalone/docs/vi/for-agents.mdx +0 -38
- package/.next/standalone/docs/vi/getting-started.mdx +0 -186
- package/.next/standalone/docs/vi/introduction.mdx +0 -57
- package/.next/standalone/docs/vi/package-aliases.mdx +0 -82
- package/.next/standalone/docs/vi/testing.mdx +0 -260
- package/.next/standalone/docs/zh/architecture.mdx +0 -332
- package/.next/standalone/docs/zh/built-in-policies.mdx +0 -570
- package/.next/standalone/docs/zh/cli/dashboard.mdx +0 -28
- package/.next/standalone/docs/zh/cli/environment-variables.mdx +0 -34
- package/.next/standalone/docs/zh/cli/hook.mdx +0 -30
- package/.next/standalone/docs/zh/cli/install-policies.mdx +0 -47
- package/.next/standalone/docs/zh/cli/list-policies.mdx +0 -31
- package/.next/standalone/docs/zh/cli/remove-policies.mdx +0 -43
- package/.next/standalone/docs/zh/cli/version.mdx +0 -12
- package/.next/standalone/docs/zh/configuration.mdx +0 -222
- package/.next/standalone/docs/zh/custom-policies.mdx +0 -353
- package/.next/standalone/docs/zh/dashboard.mdx +0 -142
- package/.next/standalone/docs/zh/examples.mdx +0 -307
- package/.next/standalone/docs/zh/for-agents.mdx +0 -38
- package/.next/standalone/docs/zh/getting-started.mdx +0 -186
- package/.next/standalone/docs/zh/introduction.mdx +0 -57
- package/.next/standalone/docs/zh/package-aliases.mdx +0 -82
- package/.next/standalone/docs/zh/testing.mdx +0 -260
- package/.next/standalone/eslint.config.mjs +0 -15
- package/.next/standalone/examples/convention-policies/security-policies.mjs +0 -40
- package/.next/standalone/examples/convention-policies/workflow-policies.mjs +0 -41
- package/.next/standalone/examples/policies-advanced/index.js +0 -103
- package/.next/standalone/examples/policies-advanced/utils.js +0 -35
- package/.next/standalone/examples/policies-basic.js +0 -77
- package/.next/standalone/examples/policies-notification.js +0 -104
- package/.next/standalone/node_modules/@img/colour/color.cjs +0 -1594
- package/.next/standalone/node_modules/@img/colour/index.cjs +0 -1
- package/.next/standalone/node_modules/@img/colour/package.json +0 -45
- package/.next/standalone/node_modules/@img/sharp-libvips-linux-x64/README.md +0 -46
- package/.next/standalone/node_modules/@img/sharp-libvips-linux-x64/lib/glib-2.0/include/glibconfig.h +0 -221
- package/.next/standalone/node_modules/@img/sharp-libvips-linux-x64/lib/index.js +0 -1
- package/.next/standalone/node_modules/@img/sharp-libvips-linux-x64/lib/libvips-cpp.so.8.17.3 +0 -0
- package/.next/standalone/node_modules/@img/sharp-libvips-linux-x64/package.json +0 -42
- package/.next/standalone/node_modules/@img/sharp-libvips-linux-x64/versions.json +0 -30
- package/.next/standalone/node_modules/@img/sharp-libvips-linuxmusl-x64/README.md +0 -46
- package/.next/standalone/node_modules/@img/sharp-libvips-linuxmusl-x64/lib/glib-2.0/include/glibconfig.h +0 -221
- package/.next/standalone/node_modules/@img/sharp-libvips-linuxmusl-x64/lib/index.js +0 -1
- package/.next/standalone/node_modules/@img/sharp-libvips-linuxmusl-x64/lib/libvips-cpp.so.8.17.3 +0 -0
- package/.next/standalone/node_modules/@img/sharp-libvips-linuxmusl-x64/package.json +0 -42
- package/.next/standalone/node_modules/@img/sharp-libvips-linuxmusl-x64/versions.json +0 -30
- package/.next/standalone/node_modules/@img/sharp-linux-x64/lib/sharp-linux-x64.node +0 -0
- package/.next/standalone/node_modules/@img/sharp-linux-x64/package.json +0 -46
- package/.next/standalone/node_modules/@img/sharp-linuxmusl-x64/lib/sharp-linuxmusl-x64.node +0 -0
- package/.next/standalone/node_modules/@img/sharp-linuxmusl-x64/package.json +0 -46
- package/.next/standalone/node_modules/detect-libc/lib/detect-libc.js +0 -313
- package/.next/standalone/node_modules/detect-libc/lib/elf.js +0 -39
- package/.next/standalone/node_modules/detect-libc/lib/filesystem.js +0 -51
- package/.next/standalone/node_modules/detect-libc/lib/process.js +0 -24
- package/.next/standalone/node_modules/detect-libc/package.json +0 -44
- package/.next/standalone/node_modules/sharp/lib/channel.js +0 -177
- package/.next/standalone/node_modules/sharp/lib/colour.js +0 -195
- package/.next/standalone/node_modules/sharp/lib/composite.js +0 -212
- package/.next/standalone/node_modules/sharp/lib/constructor.js +0 -499
- package/.next/standalone/node_modules/sharp/lib/index.js +0 -16
- package/.next/standalone/node_modules/sharp/lib/input.js +0 -809
- package/.next/standalone/node_modules/sharp/lib/is.js +0 -143
- package/.next/standalone/node_modules/sharp/lib/libvips.js +0 -207
- package/.next/standalone/node_modules/sharp/lib/operation.js +0 -1016
- package/.next/standalone/node_modules/sharp/lib/output.js +0 -1666
- package/.next/standalone/node_modules/sharp/lib/resize.js +0 -595
- package/.next/standalone/node_modules/sharp/lib/sharp.js +0 -121
- package/.next/standalone/node_modules/sharp/lib/utility.js +0 -291
- package/.next/standalone/node_modules/sharp/node_modules/semver/classes/comparator.js +0 -143
- package/.next/standalone/node_modules/sharp/node_modules/semver/classes/range.js +0 -557
- package/.next/standalone/node_modules/sharp/node_modules/semver/classes/semver.js +0 -333
- package/.next/standalone/node_modules/sharp/node_modules/semver/functions/cmp.js +0 -54
- package/.next/standalone/node_modules/sharp/node_modules/semver/functions/coerce.js +0 -62
- package/.next/standalone/node_modules/sharp/node_modules/semver/functions/compare.js +0 -7
- package/.next/standalone/node_modules/sharp/node_modules/semver/functions/eq.js +0 -5
- package/.next/standalone/node_modules/sharp/node_modules/semver/functions/gt.js +0 -5
- package/.next/standalone/node_modules/sharp/node_modules/semver/functions/gte.js +0 -5
- package/.next/standalone/node_modules/sharp/node_modules/semver/functions/lt.js +0 -5
- package/.next/standalone/node_modules/sharp/node_modules/semver/functions/lte.js +0 -5
- package/.next/standalone/node_modules/sharp/node_modules/semver/functions/neq.js +0 -5
- package/.next/standalone/node_modules/sharp/node_modules/semver/functions/parse.js +0 -18
- package/.next/standalone/node_modules/sharp/node_modules/semver/functions/satisfies.js +0 -12
- package/.next/standalone/node_modules/sharp/node_modules/semver/internal/constants.js +0 -37
- package/.next/standalone/node_modules/sharp/node_modules/semver/internal/debug.js +0 -11
- package/.next/standalone/node_modules/sharp/node_modules/semver/internal/identifiers.js +0 -29
- package/.next/standalone/node_modules/sharp/node_modules/semver/internal/lrucache.js +0 -42
- package/.next/standalone/node_modules/sharp/node_modules/semver/internal/parse-options.js +0 -17
- package/.next/standalone/node_modules/sharp/node_modules/semver/internal/re.js +0 -223
- package/.next/standalone/node_modules/sharp/node_modules/semver/package.json +0 -78
- package/.next/standalone/node_modules/sharp/package.json +0 -202
- package/.next/standalone/scripts/alias-proxy.js +0 -18
- package/.next/standalone/scripts/dev.ts +0 -3
- package/.next/standalone/scripts/install-telemetry.mjs +0 -108
- package/.next/standalone/scripts/launch.ts +0 -83
- package/.next/standalone/scripts/parse-script-args.ts +0 -87
- package/.next/standalone/scripts/postinstall.mjs +0 -121
- package/.next/standalone/scripts/preuninstall.mjs +0 -131
- package/.next/standalone/scripts/publish-aliases.mjs +0 -87
- package/.next/standalone/scripts/start.ts +0 -3
- package/.next/standalone/scripts/sync-hook-events-prompt.md +0 -60
- package/.next/standalone/scripts/translate-docs/cache.ts +0 -62
- package/.next/standalone/scripts/translate-docs/cli.ts +0 -357
- package/.next/standalone/scripts/translate-docs/config.ts +0 -248
- package/.next/standalone/scripts/translate-docs/mdx-translator.ts +0 -153
- package/.next/standalone/scripts/translate-docs/mintlify-nav.ts +0 -107
- package/.next/standalone/scripts/translate-docs/readme-translator.ts +0 -154
- package/.next/standalone/scripts/translate-docs/translator.ts +0 -68
- package/.next/standalone/scripts/translate-docs/types.ts +0 -43
- package/.next/standalone/src/auth/login.ts +0 -104
- package/.next/standalone/src/auth/logout.ts +0 -50
- package/.next/standalone/src/auth/token-store.ts +0 -64
- package/.next/standalone/src/cli-error.ts +0 -18
- package/.next/standalone/src/hooks/builtin-policies.ts +0 -1615
- package/.next/standalone/src/hooks/custom-hooks-loader.ts +0 -205
- package/.next/standalone/src/hooks/custom-hooks-registry.ts +0 -30
- package/.next/standalone/src/hooks/handler.ts +0 -222
- package/.next/standalone/src/hooks/hook-activity-store.ts +0 -349
- package/.next/standalone/src/hooks/hook-logger.ts +0 -133
- package/.next/standalone/src/hooks/hook-telemetry.ts +0 -43
- package/.next/standalone/src/hooks/hooks-config.ts +0 -166
- package/.next/standalone/src/hooks/install-prompt.ts +0 -357
- package/.next/standalone/src/hooks/llm-client.ts +0 -90
- package/.next/standalone/src/hooks/loader-utils.ts +0 -178
- package/.next/standalone/src/hooks/manager.ts +0 -692
- package/.next/standalone/src/hooks/policy-evaluator.ts +0 -224
- package/.next/standalone/src/hooks/policy-helpers.ts +0 -16
- package/.next/standalone/src/hooks/policy-registry.ts +0 -90
- package/.next/standalone/src/hooks/policy-types.ts +0 -77
- package/.next/standalone/src/hooks/types.ts +0 -63
- package/.next/standalone/src/index.ts +0 -19
- package/.next/standalone/src/posthog-key.ts +0 -5
- package/.next/standalone/src/relay/daemon.ts +0 -362
- package/.next/standalone/src/relay/pid.ts +0 -76
- package/.next/standalone/src/relay/queue.ts +0 -225
- package/.next/standalone/tailwind.config.ts +0 -11
- package/.next/standalone/tsconfig.json +0 -42
- package/.next/standalone/vitest.config.e2e.mts +0 -24
- package/.next/standalone/vitest.config.mts +0 -23
- /package/.next/standalone/.next/static/{r-wX0MuAfCjbhJm3phQc8 → Q-y1SELeezrTyQx0E2uqg}/_buildManifest.js +0 -0
- /package/.next/standalone/.next/static/{r-wX0MuAfCjbhJm3phQc8 → Q-y1SELeezrTyQx0E2uqg}/_clientMiddlewareManifest.js +0 -0
- /package/.next/standalone/.next/static/{r-wX0MuAfCjbhJm3phQc8 → Q-y1SELeezrTyQx0E2uqg}/_ssgManifest.js +0 -0
package/dist/cli.mjs
CHANGED
|
@@ -1045,6 +1045,79 @@ function requirePrBeforeStop(ctx) {
|
|
|
1045
1045
|
return allow("Could not check PR status, skipping.");
|
|
1046
1046
|
}
|
|
1047
1047
|
}
|
|
1048
|
+
function requireNoConflictsBeforeStop(ctx) {
|
|
1049
|
+
const cwd = ctx.session?.cwd;
|
|
1050
|
+
if (!cwd)
|
|
1051
|
+
return allow("No working directory available, skipping conflict check.");
|
|
1052
|
+
const branch = getCurrentBranch(cwd);
|
|
1053
|
+
if (!branch || branch === "HEAD")
|
|
1054
|
+
return allow("Detached HEAD, skipping conflict check.");
|
|
1055
|
+
const baseBranch = ctx.params?.baseBranch ?? "main";
|
|
1056
|
+
if (branch === baseBranch) {
|
|
1057
|
+
return allow(`On base branch "${baseBranch}", skipping conflict check.`);
|
|
1058
|
+
}
|
|
1059
|
+
let localSkipped = false;
|
|
1060
|
+
try {
|
|
1061
|
+
execFileSync("git", ["rev-parse", "--verify", `origin/${baseBranch}`], {
|
|
1062
|
+
cwd,
|
|
1063
|
+
encoding: "utf8",
|
|
1064
|
+
stdio: ["pipe", "pipe", "pipe"],
|
|
1065
|
+
timeout: 3000
|
|
1066
|
+
});
|
|
1067
|
+
const ahead = execFileSync("git", ["log", `origin/${baseBranch}..HEAD`, "--oneline"], { cwd, encoding: "utf8", stdio: ["pipe", "pipe", "pipe"], timeout: 5000 }).trim();
|
|
1068
|
+
if (!ahead) {
|
|
1069
|
+
localSkipped = true;
|
|
1070
|
+
} else {
|
|
1071
|
+
execFileSync("git", ["merge-tree", "--write-tree", "--name-only", `origin/${baseBranch}`, "HEAD"], { cwd, encoding: "utf8", stdio: ["pipe", "pipe", "pipe"], timeout: 1e4 });
|
|
1072
|
+
}
|
|
1073
|
+
} catch (err) {
|
|
1074
|
+
const e = err;
|
|
1075
|
+
if (e.status === 1) {
|
|
1076
|
+
const out = (typeof e.stdout === "string" ? e.stdout : e.stdout?.toString("utf8") ?? "").trim();
|
|
1077
|
+
const lines = out.split(`
|
|
1078
|
+
`);
|
|
1079
|
+
const files = [];
|
|
1080
|
+
for (let i = 1;i < lines.length; i++) {
|
|
1081
|
+
const line = lines[i];
|
|
1082
|
+
if (line === "")
|
|
1083
|
+
break;
|
|
1084
|
+
files.push(line);
|
|
1085
|
+
}
|
|
1086
|
+
const fileList = files.length ? files.join(", ") : "one or more files";
|
|
1087
|
+
return deny(`Branch "${branch}" has merge conflicts with ${baseBranch} in: ${fileList}. ` + `Rebase or merge origin/${baseBranch} now and resolve the conflicts.`);
|
|
1088
|
+
}
|
|
1089
|
+
localSkipped = true;
|
|
1090
|
+
}
|
|
1091
|
+
try {
|
|
1092
|
+
execSync("gh --version", { cwd, encoding: "utf8", stdio: ["pipe", "pipe", "pipe"], timeout: 3000 });
|
|
1093
|
+
} catch {
|
|
1094
|
+
return allow(localSkipped ? "Local conflict check skipped and gh CLI not installed, skipping conflict check." : `Branch "${branch}" merges cleanly with ${baseBranch} locally (gh CLI not installed, PR mergeability not verified).`);
|
|
1095
|
+
}
|
|
1096
|
+
let prJson;
|
|
1097
|
+
try {
|
|
1098
|
+
prJson = execSync("gh pr view --json mergeable,number,url", {
|
|
1099
|
+
cwd,
|
|
1100
|
+
encoding: "utf8",
|
|
1101
|
+
stdio: ["pipe", "pipe", "pipe"],
|
|
1102
|
+
timeout: 15000
|
|
1103
|
+
}).trim();
|
|
1104
|
+
} catch {
|
|
1105
|
+
return allow(localSkipped ? "No pull request found for branch, skipping conflict check." : `Branch "${branch}" merges cleanly with ${baseBranch} locally (no PR to verify against).`);
|
|
1106
|
+
}
|
|
1107
|
+
let pr;
|
|
1108
|
+
try {
|
|
1109
|
+
pr = JSON.parse(prJson);
|
|
1110
|
+
} catch {
|
|
1111
|
+
return allow("Could not parse gh pr view output, skipping PR mergeability check.");
|
|
1112
|
+
}
|
|
1113
|
+
if (pr.mergeable === "CONFLICTING") {
|
|
1114
|
+
return deny(`PR #${pr.number} has merge conflicts per GitHub (${pr.url}). ` + `Rebase or merge origin/${baseBranch} now and resolve the conflicts.`);
|
|
1115
|
+
}
|
|
1116
|
+
if (pr.mergeable === "UNKNOWN") {
|
|
1117
|
+
return deny(`GitHub is still computing mergeability for PR #${pr.number} (${pr.url}). ` + `Wait ~10 seconds, then re-check with \`gh pr view --json mergeable\` before attempting to stop again.`);
|
|
1118
|
+
}
|
|
1119
|
+
return allow(`PR #${pr.number} merges cleanly per GitHub.`);
|
|
1120
|
+
}
|
|
1048
1121
|
function requireCiGreenBeforeStop(ctx) {
|
|
1049
1122
|
const cwd = ctx.session?.cwd;
|
|
1050
1123
|
if (!cwd)
|
|
@@ -1502,6 +1575,21 @@ var init_builtin_policies = __esm(() => {
|
|
|
1502
1575
|
}
|
|
1503
1576
|
}
|
|
1504
1577
|
},
|
|
1578
|
+
{
|
|
1579
|
+
name: "require-no-conflicts-before-stop",
|
|
1580
|
+
description: "Require the current branch to merge cleanly with the base branch before Claude stops",
|
|
1581
|
+
fn: requireNoConflictsBeforeStop,
|
|
1582
|
+
match: { events: ["Stop"] },
|
|
1583
|
+
defaultEnabled: false,
|
|
1584
|
+
category: "Workflow",
|
|
1585
|
+
params: {
|
|
1586
|
+
baseBranch: {
|
|
1587
|
+
type: "string",
|
|
1588
|
+
description: "Base branch to check for conflicts against (default: main)",
|
|
1589
|
+
default: "main"
|
|
1590
|
+
}
|
|
1591
|
+
}
|
|
1592
|
+
},
|
|
1505
1593
|
{
|
|
1506
1594
|
name: "require-ci-green-before-stop",
|
|
1507
1595
|
description: "Require CI checks to pass on the current branch before Claude stops",
|
|
@@ -2065,7 +2153,7 @@ var init_hook_activity_store = __esm(() => {
|
|
|
2065
2153
|
});
|
|
2066
2154
|
|
|
2067
2155
|
// package.json
|
|
2068
|
-
var version2 = "0.0.6-beta.
|
|
2156
|
+
var version2 = "0.0.6-beta.5";
|
|
2069
2157
|
var init_package = () => {};
|
|
2070
2158
|
|
|
2071
2159
|
// src/posthog-key.ts
|
|
@@ -4378,7 +4466,7 @@ import { realpathSync as realpathSync2 } from "fs";
|
|
|
4378
4466
|
import { dirname as dirname7, resolve as resolve8 } from "path";
|
|
4379
4467
|
import { fileURLToPath as fileURLToPath2 } from "url";
|
|
4380
4468
|
// package.json
|
|
4381
|
-
var version = "0.0.6-beta.
|
|
4469
|
+
var version = "0.0.6-beta.5";
|
|
4382
4470
|
|
|
4383
4471
|
// bin/failproofai.mjs
|
|
4384
4472
|
if (!process.env.FAILPROOFAI_PACKAGE_ROOT) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "failproofai",
|
|
3
|
-
"version": "0.0.6-beta.
|
|
3
|
+
"version": "0.0.6-beta.5",
|
|
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"
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"predev": "bun run build:cli && bun link",
|
|
23
23
|
"dev": "FAILPROOFAI_TELEMETRY_DISABLED=1 bun scripts/dev.ts --port 8020",
|
|
24
24
|
"build:cli": "bun build --target=node --format=esm --outfile=dist/cli.mjs bin/failproofai.mjs --external posthog-node && node -e \"const fs=require('fs');const c=fs.readFileSync('dist/cli.mjs','utf8');fs.writeFileSync('dist/cli.mjs',c.replace('#!/usr/bin/env bun','#!/usr/bin/env node').replace('// @bun\\n',''))\"",
|
|
25
|
-
"build": "bun build --target=node --format=cjs --outfile=dist/index.js src/index.ts && bun run build:cli && bun --bun next build && node -e \"const {cpSync}=require('fs');cpSync('.next/static','.next/standalone/.next/static',{recursive:true});\"",
|
|
25
|
+
"build": "bun build --target=node --format=cjs --outfile=dist/index.js src/index.ts && bun run build:cli && bun --bun next build && node -e \"const {cpSync}=require('fs');cpSync('.next/static','.next/standalone/.next/static',{recursive:true});\" && node scripts/prune-standalone.mjs",
|
|
26
26
|
"prestart": "bun run build:cli && bun link",
|
|
27
27
|
"start": "FAILPROOFAI_TELEMETRY_DISABLED=1 bun scripts/start.ts",
|
|
28
28
|
"test": "vitest",
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// Prune .next/standalone to shrink the published npm tarball.
|
|
3
|
+
// Safe because (a) images.unoptimized: true in next.config.ts, so sharp never loads,
|
|
4
|
+
// and (b) we only touch .next/standalone/node_modules — server.js and app code untouched.
|
|
5
|
+
|
|
6
|
+
import { readdirSync, rmSync, statSync, unlinkSync } from "node:fs";
|
|
7
|
+
import { dirname, join, resolve } from "node:path";
|
|
8
|
+
import { fileURLToPath } from "node:url";
|
|
9
|
+
|
|
10
|
+
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
11
|
+
const ROOT = resolve(__dirname, "..");
|
|
12
|
+
const STANDALONE = join(ROOT, ".next", "standalone");
|
|
13
|
+
const NM = join(STANDALONE, "node_modules");
|
|
14
|
+
|
|
15
|
+
function exists(p) {
|
|
16
|
+
try { statSync(p); return true; } catch { return false; }
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
function measure(dir) {
|
|
20
|
+
let bytes = 0, files = 0;
|
|
21
|
+
function walk(p) {
|
|
22
|
+
let entries;
|
|
23
|
+
try { entries = readdirSync(p, { withFileTypes: true }); } catch { return; }
|
|
24
|
+
for (const e of entries) {
|
|
25
|
+
const child = join(p, e.name);
|
|
26
|
+
if (e.isDirectory()) walk(child);
|
|
27
|
+
else if (e.isFile()) { bytes += statSync(child).size; files += 1; }
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
walk(dir);
|
|
31
|
+
return { bytes, files };
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
const JUNK_DIRS = new Set([
|
|
35
|
+
"test", "tests", "__tests__",
|
|
36
|
+
"doc", "docs",
|
|
37
|
+
"example", "examples",
|
|
38
|
+
".github", ".vscode", ".idea",
|
|
39
|
+
]);
|
|
40
|
+
|
|
41
|
+
const JUNK_FILE_BASENAMES = new Set([
|
|
42
|
+
".npmignore", ".gitignore", ".gitattributes",
|
|
43
|
+
".eslintrc", ".eslintrc.js", ".eslintrc.json", ".eslintrc.yml",
|
|
44
|
+
".prettierrc", ".prettierrc.js", ".prettierrc.json",
|
|
45
|
+
".editorconfig", ".travis.yml", ".nycrc",
|
|
46
|
+
"AUTHORS", "CONTRIBUTORS", "HISTORY", "HISTORY.md",
|
|
47
|
+
"CHANGELOG", "CHANGELOG.md", "CHANGES", "CHANGES.md",
|
|
48
|
+
]);
|
|
49
|
+
|
|
50
|
+
function isJunkFile(name) {
|
|
51
|
+
const lower = name.toLowerCase();
|
|
52
|
+
if (JUNK_FILE_BASENAMES.has(name) || JUNK_FILE_BASENAMES.has(lower)) return true;
|
|
53
|
+
if (lower.endsWith(".md") || lower.endsWith(".markdown")) return true;
|
|
54
|
+
if (lower.endsWith(".map")) return true;
|
|
55
|
+
if (lower.endsWith(".ts.map")) return true;
|
|
56
|
+
return false;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
function prune(dir) {
|
|
60
|
+
let entries;
|
|
61
|
+
try { entries = readdirSync(dir, { withFileTypes: true }); } catch { return; }
|
|
62
|
+
for (const e of entries) {
|
|
63
|
+
const p = join(dir, e.name);
|
|
64
|
+
if (e.isDirectory()) {
|
|
65
|
+
if (JUNK_DIRS.has(e.name)) {
|
|
66
|
+
rmSync(p, { recursive: true, force: true });
|
|
67
|
+
continue;
|
|
68
|
+
}
|
|
69
|
+
prune(p);
|
|
70
|
+
} else if (e.isFile()) {
|
|
71
|
+
if (isJunkFile(e.name)) {
|
|
72
|
+
try { unlinkSync(p); } catch { /* ignore */ }
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
if (!exists(STANDALONE)) {
|
|
79
|
+
console.error(`[prune-standalone] ${STANDALONE} does not exist — did you run \`next build\`?`);
|
|
80
|
+
process.exit(1);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
const before = measure(STANDALONE);
|
|
84
|
+
|
|
85
|
+
// 1. Drop sharp — image optimization is disabled globally (next.config.ts).
|
|
86
|
+
for (const pkg of ["@img", "sharp"]) {
|
|
87
|
+
rmSync(join(NM, pkg), { recursive: true, force: true });
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
// 2. Strip docs / tests / sourcemaps from remaining node_modules.
|
|
91
|
+
if (exists(NM)) prune(NM);
|
|
92
|
+
|
|
93
|
+
// 3. Remove over-traced project artifacts from the standalone root.
|
|
94
|
+
// Next.js NFT pulls in too much (tracked warning: "whole project was traced
|
|
95
|
+
// unintentionally"). The Next server only actually needs server.js, .next/,
|
|
96
|
+
// node_modules/, package.json, public/, and the compiled app code — the rest
|
|
97
|
+
// is source/dev/docs that the runtime never reads.
|
|
98
|
+
const STANDALONE_ROOT_PRUNE = [
|
|
99
|
+
// Doc / dev directories
|
|
100
|
+
"docs", "examples", "design-docs", "__tests__",
|
|
101
|
+
".claude", ".failproofai", ".github", ".vscode", ".idea",
|
|
102
|
+
// Failproofai CLI artifacts — the dashboard never loads these
|
|
103
|
+
"bin", "dist", "scripts", "src",
|
|
104
|
+
];
|
|
105
|
+
const STANDALONE_ROOT_PRUNE_FILES = [
|
|
106
|
+
// Top-level markdown / licenses / docs
|
|
107
|
+
"README.md", "CHANGELOG.md", "CLAUDE.md", "AGENTS.md", "CONTRIBUTING.md",
|
|
108
|
+
"LICENSE", "Dockerfile.docs",
|
|
109
|
+
// Build / lint / test config (applied at build time, not runtime)
|
|
110
|
+
"tsconfig.json", "eslint.config.mjs", "tailwind.config.ts", "components.json",
|
|
111
|
+
"vitest.config.mts", "vitest.config.e2e.mts",
|
|
112
|
+
// Lockfiles
|
|
113
|
+
"bun.lock", "bun.lockb", "package-lock.json", "yarn.lock",
|
|
114
|
+
];
|
|
115
|
+
for (const d of STANDALONE_ROOT_PRUNE) {
|
|
116
|
+
rmSync(join(STANDALONE, d), { recursive: true, force: true });
|
|
117
|
+
}
|
|
118
|
+
for (const f of STANDALONE_ROOT_PRUNE_FILES) {
|
|
119
|
+
try { unlinkSync(join(STANDALONE, f)); } catch { /* ignore */ }
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
const after = measure(STANDALONE);
|
|
123
|
+
const mb = (b) => (b / (1024 * 1024)).toFixed(2);
|
|
124
|
+
console.log(
|
|
125
|
+
`[prune-standalone] ${before.files} files / ${mb(before.bytes)} MB -> ` +
|
|
126
|
+
`${after.files} files / ${mb(after.bytes)} MB ` +
|
|
127
|
+
`(saved ${before.files - after.files} files / ${mb(before.bytes - after.bytes)} MB)`
|
|
128
|
+
);
|
|
@@ -1185,6 +1185,108 @@ function requirePrBeforeStop(ctx: PolicyContext): PolicyResult {
|
|
|
1185
1185
|
}
|
|
1186
1186
|
}
|
|
1187
1187
|
|
|
1188
|
+
function requireNoConflictsBeforeStop(ctx: PolicyContext): PolicyResult {
|
|
1189
|
+
const cwd = ctx.session?.cwd;
|
|
1190
|
+
if (!cwd) return allow("No working directory available, skipping conflict check.");
|
|
1191
|
+
|
|
1192
|
+
const branch = getCurrentBranch(cwd);
|
|
1193
|
+
if (!branch || branch === "HEAD") return allow("Detached HEAD, skipping conflict check.");
|
|
1194
|
+
|
|
1195
|
+
const baseBranch = (ctx.params?.baseBranch as string) ?? "main";
|
|
1196
|
+
if (branch === baseBranch) {
|
|
1197
|
+
return allow(`On base branch "${baseBranch}", skipping conflict check.`);
|
|
1198
|
+
}
|
|
1199
|
+
|
|
1200
|
+
// -- Layer 1: local git merge-tree --
|
|
1201
|
+
let localSkipped = false;
|
|
1202
|
+
try {
|
|
1203
|
+
execFileSync("git", ["rev-parse", "--verify", `origin/${baseBranch}`], {
|
|
1204
|
+
cwd, encoding: "utf8", stdio: ["pipe", "pipe", "pipe"], timeout: 3000,
|
|
1205
|
+
});
|
|
1206
|
+
|
|
1207
|
+
const ahead = execFileSync(
|
|
1208
|
+
"git", ["log", `origin/${baseBranch}..HEAD`, "--oneline"],
|
|
1209
|
+
{ cwd, encoding: "utf8", stdio: ["pipe", "pipe", "pipe"], timeout: 5000 },
|
|
1210
|
+
).trim();
|
|
1211
|
+
|
|
1212
|
+
if (!ahead) {
|
|
1213
|
+
// Nothing ahead of base — Layer 1 doesn't apply, fall through to Layer 2.
|
|
1214
|
+
localSkipped = true;
|
|
1215
|
+
} else {
|
|
1216
|
+
execFileSync(
|
|
1217
|
+
"git",
|
|
1218
|
+
["merge-tree", "--write-tree", "--name-only", `origin/${baseBranch}`, "HEAD"],
|
|
1219
|
+
{ cwd, encoding: "utf8", stdio: ["pipe", "pipe", "pipe"], timeout: 10000 },
|
|
1220
|
+
);
|
|
1221
|
+
// exit 0 → clean merge, fall through to Layer 2
|
|
1222
|
+
}
|
|
1223
|
+
} catch (err) {
|
|
1224
|
+
const e = err as { status?: number; stdout?: string | Buffer };
|
|
1225
|
+
if (e.status === 1) {
|
|
1226
|
+
// git merge-tree exit 1 = conflicts. stdout: <tree>\n<file>\n<file>\n\n<messages>
|
|
1227
|
+
const out = (typeof e.stdout === "string" ? e.stdout : e.stdout?.toString("utf8") ?? "").trim();
|
|
1228
|
+
const lines = out.split("\n");
|
|
1229
|
+
const files: string[] = [];
|
|
1230
|
+
for (let i = 1; i < lines.length; i++) {
|
|
1231
|
+
const line = lines[i];
|
|
1232
|
+
if (line === "") break;
|
|
1233
|
+
files.push(line);
|
|
1234
|
+
}
|
|
1235
|
+
const fileList = files.length ? files.join(", ") : "one or more files";
|
|
1236
|
+
return deny(
|
|
1237
|
+
`Branch "${branch}" has merge conflicts with ${baseBranch} in: ${fileList}. ` +
|
|
1238
|
+
`Rebase or merge origin/${baseBranch} now and resolve the conflicts.`,
|
|
1239
|
+
);
|
|
1240
|
+
}
|
|
1241
|
+
localSkipped = true;
|
|
1242
|
+
}
|
|
1243
|
+
|
|
1244
|
+
// -- Layer 2: GitHub PR mergeability --
|
|
1245
|
+
try {
|
|
1246
|
+
execSync("gh --version", { cwd, encoding: "utf8", stdio: ["pipe", "pipe", "pipe"], timeout: 3000 });
|
|
1247
|
+
} catch {
|
|
1248
|
+
return allow(
|
|
1249
|
+
localSkipped
|
|
1250
|
+
? "Local conflict check skipped and gh CLI not installed, skipping conflict check."
|
|
1251
|
+
: `Branch "${branch}" merges cleanly with ${baseBranch} locally (gh CLI not installed, PR mergeability not verified).`,
|
|
1252
|
+
);
|
|
1253
|
+
}
|
|
1254
|
+
|
|
1255
|
+
let prJson: string;
|
|
1256
|
+
try {
|
|
1257
|
+
prJson = execSync("gh pr view --json mergeable,number,url", {
|
|
1258
|
+
cwd, encoding: "utf8", stdio: ["pipe", "pipe", "pipe"], timeout: 15000,
|
|
1259
|
+
}).trim();
|
|
1260
|
+
} catch {
|
|
1261
|
+
return allow(
|
|
1262
|
+
localSkipped
|
|
1263
|
+
? "No pull request found for branch, skipping conflict check."
|
|
1264
|
+
: `Branch "${branch}" merges cleanly with ${baseBranch} locally (no PR to verify against).`,
|
|
1265
|
+
);
|
|
1266
|
+
}
|
|
1267
|
+
|
|
1268
|
+
let pr: { mergeable: string; number: number; url: string };
|
|
1269
|
+
try {
|
|
1270
|
+
pr = JSON.parse(prJson);
|
|
1271
|
+
} catch {
|
|
1272
|
+
return allow("Could not parse gh pr view output, skipping PR mergeability check.");
|
|
1273
|
+
}
|
|
1274
|
+
|
|
1275
|
+
if (pr.mergeable === "CONFLICTING") {
|
|
1276
|
+
return deny(
|
|
1277
|
+
`PR #${pr.number} has merge conflicts per GitHub (${pr.url}). ` +
|
|
1278
|
+
`Rebase or merge origin/${baseBranch} now and resolve the conflicts.`,
|
|
1279
|
+
);
|
|
1280
|
+
}
|
|
1281
|
+
if (pr.mergeable === "UNKNOWN") {
|
|
1282
|
+
return deny(
|
|
1283
|
+
`GitHub is still computing mergeability for PR #${pr.number} (${pr.url}). ` +
|
|
1284
|
+
`Wait ~10 seconds, then re-check with \`gh pr view --json mergeable\` before attempting to stop again.`,
|
|
1285
|
+
);
|
|
1286
|
+
}
|
|
1287
|
+
return allow(`PR #${pr.number} merges cleanly per GitHub.`);
|
|
1288
|
+
}
|
|
1289
|
+
|
|
1188
1290
|
function requireCiGreenBeforeStop(ctx: PolicyContext): PolicyResult {
|
|
1189
1291
|
const cwd = ctx.session?.cwd;
|
|
1190
1292
|
if (!cwd) return allow("No working directory available, skipping CI check.");
|
|
@@ -1590,6 +1692,21 @@ export const BUILTIN_POLICIES: BuiltinPolicyDefinition[] = [
|
|
|
1590
1692
|
},
|
|
1591
1693
|
} satisfies PolicyParamsSchema,
|
|
1592
1694
|
},
|
|
1695
|
+
{
|
|
1696
|
+
name: "require-no-conflicts-before-stop",
|
|
1697
|
+
description: "Require the current branch to merge cleanly with the base branch before Claude stops",
|
|
1698
|
+
fn: requireNoConflictsBeforeStop,
|
|
1699
|
+
match: { events: ["Stop"] },
|
|
1700
|
+
defaultEnabled: false,
|
|
1701
|
+
category: "Workflow",
|
|
1702
|
+
params: {
|
|
1703
|
+
baseBranch: {
|
|
1704
|
+
type: "string",
|
|
1705
|
+
description: "Base branch to check for conflicts against (default: main)",
|
|
1706
|
+
default: "main",
|
|
1707
|
+
},
|
|
1708
|
+
} satisfies PolicyParamsSchema,
|
|
1709
|
+
},
|
|
1593
1710
|
{
|
|
1594
1711
|
name: "require-ci-green-before-stop",
|
|
1595
1712
|
description: "Require CI checks to pass on the current branch before Claude stops",
|