failproofai 0.0.2 → 0.0.3
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/.claude/settings.json +316 -0
- package/.next/standalone/.failproofai/policies/workflow-policies.mjs +62 -0
- package/.next/standalone/.failproofai/policies-config.json +39 -0
- package/.next/standalone/.next/BUILD_ID +1 -1
- package/.next/standalone/.next/build-manifest.json +5 -5
- package/.next/standalone/.next/prerender-manifest.json +3 -3
- package/.next/standalone/.next/required-server-files.json +3 -1
- package/.next/standalone/.next/server/app/_global-error/page/build-manifest.json +2 -2
- package/.next/standalone/.next/server/app/_global-error/page/server-reference-manifest.json +1 -1
- package/.next/standalone/.next/server/app/_global-error/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/_global-error.html +1 -1
- package/.next/standalone/.next/server/app/_global-error.rsc +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/build-manifest.json +2 -2
- package/.next/standalone/.next/server/app/_not-found/page/server-reference-manifest.json +1 -1
- package/.next/standalone/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/_not-found.html +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/build-manifest.json +2 -2
- package/.next/standalone/.next/server/app/page/server-reference-manifest.json +1 -1
- package/.next/standalone/.next/server/app/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/policies/page/build-manifest.json +2 -2
- package/.next/standalone/.next/server/app/policies/page/server-reference-manifest.json +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/build-manifest.json +2 -2
- package/.next/standalone/.next/server/app/project/[name]/page/server-reference-manifest.json +1 -1
- package/.next/standalone/.next/server/app/project/[name]/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/project/[name]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/project/[name]/session/[sessionId]/page/build-manifest.json +2 -2
- package/.next/standalone/.next/server/app/project/[name]/session/[sessionId]/page/react-loadable-manifest.json +2 -2
- package/.next/standalone/.next/server/app/project/[name]/session/[sessionId]/page/server-reference-manifest.json +2 -2
- package/.next/standalone/.next/server/app/project/[name]/session/[sessionId]/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/project/[name]/session/[sessionId]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/projects/page/build-manifest.json +2 -2
- package/.next/standalone/.next/server/app/projects/page/server-reference-manifest.json +1 -1
- package/.next/standalone/.next/server/app/projects/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/projects/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0g72weg._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0kjo7d_._.js +1 -1
- package/.next/standalone/.next/server/chunks/node_modules_posthog-node_dist_entrypoints_index_node_mjs_05pz9._._.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]__12kr5~_._.js → [root-of-the-server]__03kiqd5._.js} +2 -2
- 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]__0qo8503._.js → [root-of-the-server]__0bo8s~-._.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]__0w6l33k._.js +9 -9
- 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/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0a_7sdg.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0ef3uwk.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0j79~gv.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0pbja1x.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0r6o0i2.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_11y81~_.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_12or2kf.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/node_modules_posthog-node_dist_entrypoints_index_node_mjs_0mebn66._.js +1 -1
- package/.next/standalone/.next/server/middleware-build-manifest.js +5 -5
- 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/{0x-625~1vx1lu.js → 02t9.s735hqyq.js} +1 -1
- package/.next/standalone/.next/static/chunks/{0ov60i6md~37t.js → 03oepxbqx6o8~.js} +2 -2
- package/.next/standalone/.next/static/chunks/{031pa5~qfzt~_.js → 09e7drilkf1sn.js} +1 -1
- package/.next/standalone/.next/static/chunks/{0y~0creqvl5wx.js → 0cwft44dh9bww.js} +1 -1
- package/.next/standalone/.next/static/chunks/{06og.7e9nkpjh.js → 0e2uz2g026ckb.js} +1 -1
- package/.next/standalone/.next/static/chunks/0gu_a.a80ritd.css +1 -0
- package/.next/standalone/.next/static/chunks/{15wf7x-e.8ia3.js → 0h5kbvg~.xf.v.js} +1 -1
- package/.next/standalone/.next/static/chunks/{0_4y_t03jn2nq.js → 0od..umlku4bb.js} +1 -1
- package/.next/standalone/.next/static/chunks/{0cvffh-pbsv5u.js → 0xbwzy4dl87-0.js} +1 -1
- package/.next/standalone/.next/static/chunks/{0c_ljlxa._4lc.js → 18cl6wups7ouq.js} +2 -2
- package/.next/standalone/.next/static/chunks/{turbopack-0uc5y~g6h.n7-.js → turbopack-0r26pc8h0y_-e.js} +1 -1
- package/.next/standalone/CHANGELOG.md +103 -0
- package/.next/standalone/CLAUDE.md +28 -0
- package/.next/standalone/Dockerfile.docs +12 -0
- package/.next/standalone/README.md +95 -49
- package/.next/standalone/app/components/session-hooks-panel.tsx +14 -1
- package/.next/standalone/app/policies/hooks-client.tsx +14 -1
- package/.next/standalone/bin/failproofai.mjs +5 -0
- package/.next/standalone/bun.lock +76 -63
- package/.next/standalone/components/navbar.tsx +5 -0
- package/.next/standalone/dist/cli.mjs +539 -90
- package/.next/standalone/dist/index.js +2 -2
- package/.next/standalone/docs/ar/architecture.mdx +333 -0
- package/.next/standalone/docs/ar/built-in-policies.mdx +566 -0
- package/.next/standalone/docs/ar/cli/dashboard.mdx +28 -0
- package/.next/standalone/docs/ar/cli/environment-variables.mdx +34 -0
- package/.next/standalone/docs/ar/cli/hook.mdx +31 -0
- package/.next/standalone/docs/ar/cli/install-policies.mdx +49 -0
- package/.next/standalone/docs/ar/cli/list-policies.mdx +31 -0
- package/.next/standalone/docs/ar/cli/remove-policies.mdx +45 -0
- package/.next/standalone/docs/ar/cli/version.mdx +13 -0
- package/.next/standalone/docs/ar/configuration.mdx +223 -0
- package/.next/standalone/docs/ar/custom-policies.mdx +359 -0
- package/.next/standalone/docs/ar/dashboard.mdx +142 -0
- package/.next/standalone/docs/ar/examples.mdx +254 -0
- package/.next/standalone/docs/ar/for-agents.mdx +39 -0
- package/.next/standalone/docs/ar/getting-started.mdx +134 -0
- package/.next/standalone/docs/ar/introduction.mdx +58 -0
- package/.next/standalone/docs/ar/package-aliases.mdx +82 -0
- package/.next/standalone/docs/ar/testing.mdx +261 -0
- package/.next/standalone/docs/{architecture.md → architecture.mdx} +40 -23
- package/.next/standalone/docs/{built-in-policies.md → built-in-policies.mdx} +151 -13
- package/.next/standalone/docs/cli/dashboard.mdx +28 -0
- package/.next/standalone/docs/cli/environment-variables.mdx +34 -0
- package/.next/standalone/docs/cli/hook.mdx +30 -0
- package/.next/standalone/docs/cli/install-policies.mdx +48 -0
- package/.next/standalone/docs/cli/list-policies.mdx +31 -0
- package/.next/standalone/docs/cli/remove-policies.mdx +44 -0
- package/.next/standalone/docs/cli/version.mdx +12 -0
- package/.next/standalone/docs/{configuration.md → configuration.mdx} +62 -16
- package/.next/standalone/docs/custom-policies.mdx +357 -0
- package/.next/standalone/docs/{dashboard.md → dashboard.mdx} +26 -29
- package/.next/standalone/docs/de/architecture.mdx +332 -0
- package/.next/standalone/docs/de/built-in-policies.mdx +564 -0
- package/.next/standalone/docs/de/cli/dashboard.mdx +28 -0
- package/.next/standalone/docs/de/cli/environment-variables.mdx +34 -0
- package/.next/standalone/docs/de/cli/hook.mdx +30 -0
- package/.next/standalone/docs/de/cli/install-policies.mdx +48 -0
- package/.next/standalone/docs/de/cli/list-policies.mdx +31 -0
- package/.next/standalone/docs/de/cli/remove-policies.mdx +44 -0
- package/.next/standalone/docs/de/cli/version.mdx +12 -0
- package/.next/standalone/docs/de/configuration.mdx +222 -0
- package/.next/standalone/docs/de/custom-policies.mdx +357 -0
- package/.next/standalone/docs/de/dashboard.mdx +142 -0
- package/.next/standalone/docs/de/examples.mdx +253 -0
- package/.next/standalone/docs/de/for-agents.mdx +38 -0
- package/.next/standalone/docs/de/getting-started.mdx +134 -0
- package/.next/standalone/docs/de/introduction.mdx +57 -0
- package/.next/standalone/docs/de/package-aliases.mdx +82 -0
- package/.next/standalone/docs/de/testing.mdx +260 -0
- package/.next/standalone/docs/docs.json +938 -24
- package/.next/standalone/docs/es/architecture.mdx +332 -0
- package/.next/standalone/docs/es/built-in-policies.mdx +564 -0
- package/.next/standalone/docs/es/cli/dashboard.mdx +28 -0
- package/.next/standalone/docs/es/cli/environment-variables.mdx +34 -0
- package/.next/standalone/docs/es/cli/hook.mdx +30 -0
- package/.next/standalone/docs/es/cli/install-policies.mdx +48 -0
- package/.next/standalone/docs/es/cli/list-policies.mdx +31 -0
- package/.next/standalone/docs/es/cli/remove-policies.mdx +44 -0
- package/.next/standalone/docs/es/cli/version.mdx +12 -0
- package/.next/standalone/docs/es/configuration.mdx +222 -0
- package/.next/standalone/docs/es/custom-policies.mdx +357 -0
- package/.next/standalone/docs/es/dashboard.mdx +142 -0
- package/.next/standalone/docs/es/examples.mdx +253 -0
- package/.next/standalone/docs/es/for-agents.mdx +38 -0
- package/.next/standalone/docs/es/getting-started.mdx +134 -0
- package/.next/standalone/docs/es/introduction.mdx +57 -0
- package/.next/standalone/docs/es/package-aliases.mdx +82 -0
- package/.next/standalone/docs/es/testing.mdx +260 -0
- package/.next/standalone/docs/examples.mdx +253 -0
- package/.next/standalone/docs/for-agents.mdx +38 -0
- package/.next/standalone/docs/fr/architecture.mdx +332 -0
- package/.next/standalone/docs/fr/built-in-policies.mdx +564 -0
- package/.next/standalone/docs/fr/cli/dashboard.mdx +28 -0
- package/.next/standalone/docs/fr/cli/environment-variables.mdx +34 -0
- package/.next/standalone/docs/fr/cli/hook.mdx +30 -0
- package/.next/standalone/docs/fr/cli/install-policies.mdx +48 -0
- package/.next/standalone/docs/fr/cli/list-policies.mdx +31 -0
- package/.next/standalone/docs/fr/cli/remove-policies.mdx +44 -0
- package/.next/standalone/docs/fr/cli/version.mdx +12 -0
- package/.next/standalone/docs/fr/configuration.mdx +222 -0
- package/.next/standalone/docs/fr/custom-policies.mdx +357 -0
- package/.next/standalone/docs/fr/dashboard.mdx +142 -0
- package/.next/standalone/docs/fr/examples.mdx +253 -0
- package/.next/standalone/docs/fr/for-agents.mdx +38 -0
- package/.next/standalone/docs/fr/getting-started.mdx +134 -0
- package/.next/standalone/docs/fr/introduction.mdx +57 -0
- package/.next/standalone/docs/fr/package-aliases.mdx +82 -0
- package/.next/standalone/docs/fr/testing.mdx +260 -0
- package/.next/standalone/docs/getting-started.mdx +134 -0
- package/.next/standalone/docs/he/architecture.mdx +333 -0
- package/.next/standalone/docs/he/built-in-policies.mdx +564 -0
- package/.next/standalone/docs/he/cli/dashboard.mdx +28 -0
- package/.next/standalone/docs/he/cli/environment-variables.mdx +34 -0
- package/.next/standalone/docs/he/cli/hook.mdx +30 -0
- package/.next/standalone/docs/he/cli/install-policies.mdx +48 -0
- package/.next/standalone/docs/he/cli/list-policies.mdx +32 -0
- package/.next/standalone/docs/he/cli/remove-policies.mdx +44 -0
- package/.next/standalone/docs/he/cli/version.mdx +12 -0
- package/.next/standalone/docs/he/configuration.mdx +222 -0
- package/.next/standalone/docs/he/custom-policies.mdx +357 -0
- package/.next/standalone/docs/he/dashboard.mdx +142 -0
- package/.next/standalone/docs/he/examples.mdx +253 -0
- package/.next/standalone/docs/he/for-agents.mdx +38 -0
- package/.next/standalone/docs/he/getting-started.mdx +135 -0
- package/.next/standalone/docs/he/introduction.mdx +57 -0
- package/.next/standalone/docs/he/package-aliases.mdx +82 -0
- package/.next/standalone/docs/he/testing.mdx +260 -0
- package/.next/standalone/docs/hi/architecture.mdx +334 -0
- package/.next/standalone/docs/hi/built-in-policies.mdx +564 -0
- package/.next/standalone/docs/hi/cli/dashboard.mdx +28 -0
- package/.next/standalone/docs/hi/cli/environment-variables.mdx +34 -0
- package/.next/standalone/docs/hi/cli/hook.mdx +30 -0
- package/.next/standalone/docs/hi/cli/install-policies.mdx +48 -0
- package/.next/standalone/docs/hi/cli/list-policies.mdx +31 -0
- package/.next/standalone/docs/hi/cli/remove-policies.mdx +44 -0
- package/.next/standalone/docs/hi/cli/version.mdx +12 -0
- package/.next/standalone/docs/hi/configuration.mdx +222 -0
- package/.next/standalone/docs/hi/custom-policies.mdx +357 -0
- package/.next/standalone/docs/hi/dashboard.mdx +142 -0
- package/.next/standalone/docs/hi/examples.mdx +255 -0
- package/.next/standalone/docs/hi/for-agents.mdx +38 -0
- package/.next/standalone/docs/hi/getting-started.mdx +134 -0
- package/.next/standalone/docs/hi/introduction.mdx +57 -0
- package/.next/standalone/docs/hi/package-aliases.mdx +82 -0
- package/.next/standalone/docs/hi/testing.mdx +260 -0
- package/.next/standalone/docs/i18n/README.ar.md +312 -0
- package/.next/standalone/docs/i18n/README.de.md +307 -0
- package/.next/standalone/docs/i18n/README.es.md +307 -0
- package/.next/standalone/docs/i18n/README.fr.md +307 -0
- package/.next/standalone/docs/i18n/README.he.md +312 -0
- package/.next/standalone/docs/i18n/README.hi.md +307 -0
- package/.next/standalone/docs/i18n/README.it.md +307 -0
- package/.next/standalone/docs/i18n/README.ja.md +307 -0
- package/.next/standalone/docs/i18n/README.ko.md +307 -0
- package/.next/standalone/docs/i18n/README.pt-br.md +307 -0
- package/.next/standalone/docs/i18n/README.ru.md +308 -0
- package/.next/standalone/docs/i18n/README.tr.md +308 -0
- package/.next/standalone/docs/i18n/README.vi.md +308 -0
- package/.next/standalone/docs/i18n/README.zh.md +307 -0
- package/.next/standalone/docs/introduction.mdx +57 -0
- package/.next/standalone/docs/it/architecture.mdx +333 -0
- package/.next/standalone/docs/it/built-in-policies.mdx +564 -0
- package/.next/standalone/docs/it/cli/dashboard.mdx +28 -0
- package/.next/standalone/docs/it/cli/environment-variables.mdx +34 -0
- package/.next/standalone/docs/it/cli/hook.mdx +30 -0
- package/.next/standalone/docs/it/cli/install-policies.mdx +48 -0
- package/.next/standalone/docs/it/cli/list-policies.mdx +31 -0
- package/.next/standalone/docs/it/cli/remove-policies.mdx +44 -0
- package/.next/standalone/docs/it/cli/version.mdx +12 -0
- package/.next/standalone/docs/it/configuration.mdx +223 -0
- package/.next/standalone/docs/it/custom-policies.mdx +358 -0
- package/.next/standalone/docs/it/dashboard.mdx +142 -0
- package/.next/standalone/docs/it/examples.mdx +253 -0
- package/.next/standalone/docs/it/for-agents.mdx +38 -0
- package/.next/standalone/docs/it/getting-started.mdx +134 -0
- package/.next/standalone/docs/it/introduction.mdx +57 -0
- package/.next/standalone/docs/it/package-aliases.mdx +82 -0
- package/.next/standalone/docs/it/testing.mdx +260 -0
- package/.next/standalone/docs/ja/architecture.mdx +332 -0
- package/.next/standalone/docs/ja/built-in-policies.mdx +562 -0
- package/.next/standalone/docs/ja/cli/dashboard.mdx +28 -0
- package/.next/standalone/docs/ja/cli/environment-variables.mdx +34 -0
- package/.next/standalone/docs/ja/cli/hook.mdx +30 -0
- package/.next/standalone/docs/ja/cli/install-policies.mdx +48 -0
- package/.next/standalone/docs/ja/cli/list-policies.mdx +31 -0
- package/.next/standalone/docs/ja/cli/remove-policies.mdx +44 -0
- package/.next/standalone/docs/ja/cli/version.mdx +12 -0
- package/.next/standalone/docs/ja/configuration.mdx +222 -0
- package/.next/standalone/docs/ja/custom-policies.mdx +357 -0
- package/.next/standalone/docs/ja/dashboard.mdx +142 -0
- package/.next/standalone/docs/ja/examples.mdx +253 -0
- package/.next/standalone/docs/ja/for-agents.mdx +38 -0
- package/.next/standalone/docs/ja/getting-started.mdx +134 -0
- package/.next/standalone/docs/ja/introduction.mdx +57 -0
- package/.next/standalone/docs/ja/package-aliases.mdx +82 -0
- package/.next/standalone/docs/ja/testing.mdx +260 -0
- package/.next/standalone/docs/ko/architecture.mdx +332 -0
- package/.next/standalone/docs/ko/built-in-policies.mdx +562 -0
- package/.next/standalone/docs/ko/cli/dashboard.mdx +28 -0
- package/.next/standalone/docs/ko/cli/environment-variables.mdx +34 -0
- package/.next/standalone/docs/ko/cli/hook.mdx +30 -0
- package/.next/standalone/docs/ko/cli/install-policies.mdx +48 -0
- package/.next/standalone/docs/ko/cli/list-policies.mdx +31 -0
- package/.next/standalone/docs/ko/cli/remove-policies.mdx +44 -0
- package/.next/standalone/docs/ko/cli/version.mdx +12 -0
- package/.next/standalone/docs/ko/configuration.mdx +222 -0
- package/.next/standalone/docs/ko/custom-policies.mdx +357 -0
- package/.next/standalone/docs/ko/dashboard.mdx +142 -0
- package/.next/standalone/docs/ko/examples.mdx +253 -0
- package/.next/standalone/docs/ko/for-agents.mdx +38 -0
- package/.next/standalone/docs/ko/getting-started.mdx +134 -0
- package/.next/standalone/docs/ko/introduction.mdx +57 -0
- package/.next/standalone/docs/ko/package-aliases.mdx +82 -0
- package/.next/standalone/docs/ko/testing.mdx +260 -0
- package/.next/standalone/docs/logo/dark.svg +21 -0
- package/.next/standalone/docs/logo/light.svg +21 -0
- package/.next/standalone/docs/{package-aliases.md → package-aliases.mdx} +5 -5
- package/.next/standalone/docs/pt-br/architecture.mdx +332 -0
- package/.next/standalone/docs/pt-br/built-in-policies.mdx +564 -0
- package/.next/standalone/docs/pt-br/cli/dashboard.mdx +28 -0
- package/.next/standalone/docs/pt-br/cli/environment-variables.mdx +34 -0
- package/.next/standalone/docs/pt-br/cli/hook.mdx +30 -0
- package/.next/standalone/docs/pt-br/cli/install-policies.mdx +48 -0
- package/.next/standalone/docs/pt-br/cli/list-policies.mdx +31 -0
- package/.next/standalone/docs/pt-br/cli/remove-policies.mdx +44 -0
- package/.next/standalone/docs/pt-br/cli/version.mdx +12 -0
- package/.next/standalone/docs/pt-br/configuration.mdx +222 -0
- package/.next/standalone/docs/pt-br/custom-policies.mdx +357 -0
- package/.next/standalone/docs/pt-br/dashboard.mdx +142 -0
- package/.next/standalone/docs/pt-br/examples.mdx +253 -0
- package/.next/standalone/docs/pt-br/for-agents.mdx +38 -0
- package/.next/standalone/docs/pt-br/getting-started.mdx +134 -0
- package/.next/standalone/docs/pt-br/introduction.mdx +57 -0
- package/.next/standalone/docs/pt-br/package-aliases.mdx +82 -0
- package/.next/standalone/docs/pt-br/testing.mdx +260 -0
- package/.next/standalone/docs/ru/architecture.mdx +334 -0
- package/.next/standalone/docs/ru/built-in-policies.mdx +562 -0
- package/.next/standalone/docs/ru/cli/dashboard.mdx +28 -0
- package/.next/standalone/docs/ru/cli/environment-variables.mdx +34 -0
- package/.next/standalone/docs/ru/cli/hook.mdx +30 -0
- package/.next/standalone/docs/ru/cli/install-policies.mdx +48 -0
- package/.next/standalone/docs/ru/cli/list-policies.mdx +32 -0
- package/.next/standalone/docs/ru/cli/remove-policies.mdx +44 -0
- package/.next/standalone/docs/ru/cli/version.mdx +12 -0
- package/.next/standalone/docs/ru/configuration.mdx +223 -0
- package/.next/standalone/docs/ru/custom-policies.mdx +357 -0
- package/.next/standalone/docs/ru/dashboard.mdx +142 -0
- package/.next/standalone/docs/ru/examples.mdx +254 -0
- package/.next/standalone/docs/ru/for-agents.mdx +38 -0
- package/.next/standalone/docs/ru/getting-started.mdx +134 -0
- package/.next/standalone/docs/ru/introduction.mdx +57 -0
- package/.next/standalone/docs/ru/package-aliases.mdx +82 -0
- package/.next/standalone/docs/ru/testing.mdx +260 -0
- package/.next/standalone/docs/{testing.md → testing.mdx} +11 -11
- package/.next/standalone/docs/tr/architecture.mdx +333 -0
- package/.next/standalone/docs/tr/built-in-policies.mdx +562 -0
- package/.next/standalone/docs/tr/cli/dashboard.mdx +28 -0
- package/.next/standalone/docs/tr/cli/environment-variables.mdx +34 -0
- package/.next/standalone/docs/tr/cli/hook.mdx +30 -0
- package/.next/standalone/docs/tr/cli/install-policies.mdx +48 -0
- package/.next/standalone/docs/tr/cli/list-policies.mdx +31 -0
- package/.next/standalone/docs/tr/cli/remove-policies.mdx +45 -0
- package/.next/standalone/docs/tr/cli/version.mdx +12 -0
- package/.next/standalone/docs/tr/configuration.mdx +223 -0
- package/.next/standalone/docs/tr/custom-policies.mdx +357 -0
- package/.next/standalone/docs/tr/dashboard.mdx +142 -0
- package/.next/standalone/docs/tr/examples.mdx +253 -0
- package/.next/standalone/docs/tr/for-agents.mdx +38 -0
- package/.next/standalone/docs/tr/getting-started.mdx +134 -0
- package/.next/standalone/docs/tr/introduction.mdx +57 -0
- package/.next/standalone/docs/tr/package-aliases.mdx +82 -0
- package/.next/standalone/docs/tr/testing.mdx +260 -0
- package/.next/standalone/docs/vi/architecture.mdx +333 -0
- package/.next/standalone/docs/vi/built-in-policies.mdx +564 -0
- package/.next/standalone/docs/vi/cli/dashboard.mdx +28 -0
- package/.next/standalone/docs/vi/cli/environment-variables.mdx +34 -0
- package/.next/standalone/docs/vi/cli/hook.mdx +30 -0
- package/.next/standalone/docs/vi/cli/install-policies.mdx +48 -0
- package/.next/standalone/docs/vi/cli/list-policies.mdx +31 -0
- package/.next/standalone/docs/vi/cli/remove-policies.mdx +44 -0
- package/.next/standalone/docs/vi/cli/version.mdx +13 -0
- package/.next/standalone/docs/vi/configuration.mdx +222 -0
- package/.next/standalone/docs/vi/custom-policies.mdx +357 -0
- package/.next/standalone/docs/vi/dashboard.mdx +142 -0
- package/.next/standalone/docs/vi/examples.mdx +253 -0
- package/.next/standalone/docs/vi/for-agents.mdx +38 -0
- package/.next/standalone/docs/vi/getting-started.mdx +134 -0
- package/.next/standalone/docs/vi/introduction.mdx +57 -0
- package/.next/standalone/docs/vi/package-aliases.mdx +82 -0
- package/.next/standalone/docs/vi/testing.mdx +260 -0
- package/.next/standalone/docs/zh/architecture.mdx +332 -0
- package/.next/standalone/docs/zh/built-in-policies.mdx +562 -0
- package/.next/standalone/docs/zh/cli/dashboard.mdx +28 -0
- package/.next/standalone/docs/zh/cli/environment-variables.mdx +34 -0
- package/.next/standalone/docs/zh/cli/hook.mdx +30 -0
- package/.next/standalone/docs/zh/cli/install-policies.mdx +48 -0
- package/.next/standalone/docs/zh/cli/list-policies.mdx +31 -0
- package/.next/standalone/docs/zh/cli/remove-policies.mdx +44 -0
- package/.next/standalone/docs/zh/cli/version.mdx +12 -0
- package/.next/standalone/docs/zh/configuration.mdx +222 -0
- package/.next/standalone/docs/zh/custom-policies.mdx +357 -0
- package/.next/standalone/docs/zh/dashboard.mdx +142 -0
- package/.next/standalone/docs/zh/examples.mdx +253 -0
- package/.next/standalone/docs/zh/for-agents.mdx +38 -0
- package/.next/standalone/docs/zh/getting-started.mdx +134 -0
- package/.next/standalone/docs/zh/introduction.mdx +57 -0
- package/.next/standalone/docs/zh/package-aliases.mdx +82 -0
- package/.next/standalone/docs/zh/testing.mdx +260 -0
- package/.next/standalone/examples/convention-policies/security-policies.mjs +40 -0
- package/.next/standalone/examples/convention-policies/workflow-policies.mjs +41 -0
- package/.next/standalone/next.config.ts +5 -3
- package/.next/standalone/node_modules/@next/env/package.json +1 -1
- package/.next/standalone/node_modules/next/dist/build/swc/index.js +1 -1
- package/.next/standalone/node_modules/next/dist/compiled/jsonwebtoken/index.js +2 -2
- package/.next/standalone/node_modules/next/dist/compiled/next-server/app-page-turbo-experimental.runtime.prod.js +1 -1
- package/.next/standalone/node_modules/next/dist/compiled/next-server/app-page-turbo.runtime.prod.js +1 -1
- package/.next/standalone/node_modules/next/dist/compiled/next-server/pages-turbo.runtime.prod.js +1 -1
- package/.next/standalone/node_modules/next/dist/lib/patch-incorrect-lockfile.js +3 -3
- package/.next/standalone/node_modules/next/dist/server/config.js +1 -1
- package/.next/standalone/node_modules/next/dist/server/dev/hot-reloader-turbopack.js +7 -2
- package/.next/standalone/node_modules/next/dist/server/dev/hot-reloader-webpack.js +1 -1
- package/.next/standalone/node_modules/next/dist/server/lib/app-info-log.js +1 -1
- package/.next/standalone/node_modules/next/dist/server/lib/start-server.js +1 -1
- package/.next/standalone/node_modules/next/dist/server/render.js +20 -19
- package/.next/standalone/node_modules/next/dist/shared/lib/errors/canary-only-config-error.js +1 -1
- package/.next/standalone/node_modules/next/dist/telemetry/anonymous-meta.js +1 -1
- package/.next/standalone/node_modules/next/dist/telemetry/events/swc-load-failure.js +1 -1
- package/.next/standalone/node_modules/next/dist/telemetry/events/version.js +2 -2
- package/.next/standalone/node_modules/next/package.json +15 -15
- package/.next/standalone/node_modules/react/cjs/react.development.js +1 -1
- package/.next/standalone/node_modules/react/cjs/react.production.js +1 -1
- package/.next/standalone/node_modules/react/package.json +1 -1
- package/.next/standalone/node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.js +1 -1
- package/.next/standalone/node_modules/react-dom/cjs/react-dom-server-legacy.node.production.js +1 -1
- package/.next/standalone/node_modules/react-dom/cjs/react-dom-server.browser.production.js +3 -3
- package/.next/standalone/node_modules/react-dom/cjs/react-dom-server.edge.production.js +3 -3
- package/.next/standalone/node_modules/react-dom/cjs/react-dom-server.node.production.js +3 -3
- package/.next/standalone/node_modules/react-dom/cjs/react-dom.production.js +1 -1
- package/.next/standalone/node_modules/react-dom/package.json +2 -2
- package/.next/standalone/package.json +13 -10
- package/.next/standalone/scripts/translate-docs/cache.ts +62 -0
- package/.next/standalone/scripts/translate-docs/cli.ts +357 -0
- package/.next/standalone/scripts/translate-docs/config.ts +248 -0
- package/.next/standalone/scripts/translate-docs/mdx-translator.ts +153 -0
- package/.next/standalone/scripts/translate-docs/mintlify-nav.ts +107 -0
- package/.next/standalone/scripts/translate-docs/readme-translator.ts +154 -0
- package/.next/standalone/scripts/translate-docs/translator.ts +68 -0
- package/.next/standalone/scripts/translate-docs/types.ts +43 -0
- package/.next/standalone/server.js +1 -1
- package/.next/standalone/skills-lock.json +10 -0
- package/.next/standalone/src/hooks/builtin-policies.ts +405 -25
- package/.next/standalone/src/hooks/custom-hooks-loader.ts +165 -21
- package/.next/standalone/src/hooks/handler.ts +33 -6
- package/.next/standalone/src/hooks/hook-activity-store.ts +6 -1
- package/.next/standalone/src/hooks/hooks-config.ts +47 -2
- package/.next/standalone/src/hooks/llm-client.ts +2 -2
- package/.next/standalone/src/hooks/loader-utils.ts +4 -4
- package/.next/standalone/src/hooks/manager.ts +67 -16
- package/.next/standalone/src/hooks/policy-evaluator.ts +58 -19
- package/.next/standalone/src/hooks/policy-helpers.ts +2 -2
- package/.next/standalone/vitest.config.e2e.mts +3 -0
- package/.next/standalone/vitest.config.mts +3 -0
- package/README.md +95 -49
- package/bin/failproofai.mjs +5 -0
- package/dist/cli.mjs +539 -90
- package/dist/index.js +2 -2
- package/package.json +13 -10
- package/scripts/translate-docs/cache.ts +62 -0
- package/scripts/translate-docs/cli.ts +357 -0
- package/scripts/translate-docs/config.ts +248 -0
- package/scripts/translate-docs/mdx-translator.ts +153 -0
- package/scripts/translate-docs/mintlify-nav.ts +107 -0
- package/scripts/translate-docs/readme-translator.ts +154 -0
- package/scripts/translate-docs/translator.ts +68 -0
- package/scripts/translate-docs/types.ts +43 -0
- package/src/hooks/builtin-policies.ts +405 -25
- package/src/hooks/custom-hooks-loader.ts +165 -21
- package/src/hooks/handler.ts +33 -6
- package/src/hooks/hook-activity-store.ts +6 -1
- package/src/hooks/hooks-config.ts +47 -2
- package/src/hooks/llm-client.ts +2 -2
- package/src/hooks/loader-utils.ts +4 -4
- package/src/hooks/manager.ts +67 -16
- package/src/hooks/policy-evaluator.ts +58 -19
- package/src/hooks/policy-helpers.ts +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__02nt~6d._.js +0 -3
- package/.next/standalone/.next/static/chunks/15jpradyu_531.css +0 -1
- package/.next/standalone/docs/cli-reference.md +0 -175
- package/.next/standalone/docs/custom-hooks.md +0 -261
- package/.next/standalone/docs/getting-started.md +0 -128
- package/.next/standalone/docs/introduction.md +0 -47
- /package/.next/standalone/.next/static/{WS-OQSqL1Lp1w_obXfjvl → En9eEShUkUjgeYbY9v6Gy}/_buildManifest.js +0 -0
- /package/.next/standalone/.next/static/{WS-OQSqL1Lp1w_obXfjvl → En9eEShUkUjgeYbY9v6Gy}/_clientMiddlewareManifest.js +0 -0
- /package/.next/standalone/.next/static/{WS-OQSqL1Lp1w_obXfjvl → En9eEShUkUjgeYbY9v6Gy}/_ssgManifest.js +0 -0
|
@@ -0,0 +1,562 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Встроенные политики
|
|
3
|
+
description: "Все 30 встроенных политик, которые ловят распространённые сбои агентов"
|
|
4
|
+
icon: shield
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
failproofai поставляется с 30 встроенными политиками, которые ловят распространённые сбои агентов. Каждая политика срабатывает на определённый тип события hook и имя инструмента. Девять политик принимают параметры, которые позволяют вам настраивать их поведение без написания кода. Четыре бета-политики рабочего потока обеспечивают выполнение конвейера commit → push → PR → CI перед остановкой Claude.
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## Обзор
|
|
12
|
+
|
|
13
|
+
Политики сгруппированы по категориям:
|
|
14
|
+
|
|
15
|
+
| Категория | Политики | Тип hook |
|
|
16
|
+
|----------|----------|-----------|
|
|
17
|
+
| [Опасные команды](#опасные-команды) | block-sudo, block-rm-rf, block-curl-pipe-sh, block-failproofai-commands | PreToolUse |
|
|
18
|
+
| [Секреты (санитайзеры)](#секреты-санитайзеры) | sanitize-jwt, sanitize-api-keys, sanitize-connection-strings, sanitize-private-key-content, sanitize-bearer-tokens | PostToolUse |
|
|
19
|
+
| [Окружение](#окружение) | block-env-files, protect-env-vars | PreToolUse |
|
|
20
|
+
| [Доступ к файлам](#доступ-к-файлам) | block-read-outside-cwd, block-secrets-write | PreToolUse |
|
|
21
|
+
| [Git](#git) | block-push-master, block-work-on-main, block-force-push, warn-git-amend, warn-git-stash-drop, warn-all-files-staged | PreToolUse |
|
|
22
|
+
| [База данных](#база-данных) | warn-destructive-sql, warn-schema-alteration | PreToolUse |
|
|
23
|
+
| [Предупреждения](#предупреждения) | warn-large-file-write, warn-package-publish, warn-background-process, warn-global-package-install | PreToolUse |
|
|
24
|
+
| [Рабочий поток (beta)](#рабочий-поток-beta) | require-commit-before-stop, require-push-before-stop, require-pr-before-stop, require-ci-green-before-stop | Stop |
|
|
25
|
+
|
|
26
|
+
- **`block-`** — остановить агента от выполнения действия.
|
|
27
|
+
- **`warn-`** — предоставить агенту дополнительный контекст, чтобы он мог себя исправить.
|
|
28
|
+
- **`sanitize-`** — удалить чувствительные данные из вывода инструмента перед тем, как агент их увидит.
|
|
29
|
+
- **`require-`** — заблокировать событие Stop до выполнения условий.
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
<Tip>
|
|
34
|
+
Каждая политика поддерживает необязательное поле `hint` в `policyParams`. Подсказка добавляется к сообщению deny или instruct, которое видит Claude, предоставляя практические рекомендации без изменения кода политики. Работает со встроенными, пользовательскими и конвенциональными политиками. См. [Configuration → hint](/ru/configuration#hint-cross-cutting) для подробностей.
|
|
35
|
+
</Tip>
|
|
36
|
+
|
|
37
|
+
---
|
|
38
|
+
|
|
39
|
+
## Опасные команды
|
|
40
|
+
|
|
41
|
+
Предотвратите запуск агентами операций, которые сложно отменить или которые могут повредить хост-систему.
|
|
42
|
+
|
|
43
|
+
### `block-sudo`
|
|
44
|
+
|
|
45
|
+
**Событие:** PreToolUse (Bash)
|
|
46
|
+
**По умолчанию:** Запрещает любую команду `sudo`.
|
|
47
|
+
|
|
48
|
+
Блокирует вызовы, содержащие ключевое слово `sudo`. Сопоставление паттернов выполняется на разобранных токенах команды, а не на исходной строке, чтобы предотвратить обход через инъекцию оператора shell.
|
|
49
|
+
|
|
50
|
+
**Параметры:**
|
|
51
|
+
|
|
52
|
+
| Параметр | Тип | По умолчанию | Описание |
|
|
53
|
+
|-------|------|---------|-------------|
|
|
54
|
+
| `allowPatterns` | `string[]` | `[]` | Точные префиксы команд, которые разрешены. Каждая запись сопоставляется с разобранными токенами argv. |
|
|
55
|
+
|
|
56
|
+
**Пример:**
|
|
57
|
+
|
|
58
|
+
```json
|
|
59
|
+
{
|
|
60
|
+
"policyParams": {
|
|
61
|
+
"block-sudo": {
|
|
62
|
+
"allowPatterns": ["sudo systemctl status", "sudo journalctl"]
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
С этой конфигурацией `sudo systemctl status nginx` разрешена, но `sudo rm /etc/hosts` запрещена.
|
|
69
|
+
|
|
70
|
+
<Note>
|
|
71
|
+
Паттерны сопоставляются с разобранными токенами, а не с исходной строкой команды. Это предотвращает обход через добавленные операторы shell (например, `sudo systemctl status x; rm -rf /` не совпадает с `sudo systemctl status *`).
|
|
72
|
+
</Note>
|
|
73
|
+
|
|
74
|
+
---
|
|
75
|
+
|
|
76
|
+
### `block-rm-rf`
|
|
77
|
+
|
|
78
|
+
**Событие:** PreToolUse (Bash)
|
|
79
|
+
**По умолчанию:** Запрещает `rm -rf`, `rm -fr` и подобные формы рекурсивного удаления.
|
|
80
|
+
|
|
81
|
+
**Параметры:**
|
|
82
|
+
|
|
83
|
+
| Параметр | Тип | По умолчанию | Описание |
|
|
84
|
+
|-------|------|---------|-------------|
|
|
85
|
+
| `allowPaths` | `string[]` | `[]` | Пути, которые безопасно рекурсивно удалять (например, `/tmp`). |
|
|
86
|
+
|
|
87
|
+
**Пример:**
|
|
88
|
+
|
|
89
|
+
```json
|
|
90
|
+
{
|
|
91
|
+
"policyParams": {
|
|
92
|
+
"block-rm-rf": {
|
|
93
|
+
"allowPaths": ["/tmp", "/var/cache"]
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
---
|
|
100
|
+
|
|
101
|
+
### `block-curl-pipe-sh`
|
|
102
|
+
|
|
103
|
+
**Событие:** PreToolUse (Bash)
|
|
104
|
+
**По умолчанию:** Запрещает `curl <url> | bash`, `curl <url> | sh`, `wget <url> | bash` и подобные паттерны.
|
|
105
|
+
|
|
106
|
+
Нет параметров.
|
|
107
|
+
|
|
108
|
+
---
|
|
109
|
+
|
|
110
|
+
### `block-failproofai-commands`
|
|
111
|
+
|
|
112
|
+
**Событие:** PreToolUse (Bash)
|
|
113
|
+
**По умолчанию:** Запрещает команды, которые бы деинсталлировали или отключили failproofai (например, `npm uninstall failproofai`, `failproofai policies --uninstall`).
|
|
114
|
+
|
|
115
|
+
Нет параметров.
|
|
116
|
+
|
|
117
|
+
---
|
|
118
|
+
|
|
119
|
+
## Секреты (санитайзеры)
|
|
120
|
+
|
|
121
|
+
Предотвратите утечку учётных данных агентами в их контекст или вывод. Политики-санитайзеры срабатывают на событиях **PostToolUse**. Когда Claude запускает команду Bash, читает файл или вызывает любой инструмент, эти политики проверяют вывод перед тем, как он возвращается Claude. Если обнаружен паттерн секрета, политика возвращает решение deny, которое предотвращает передачу вывода обратно.
|
|
122
|
+
|
|
123
|
+
### `sanitize-jwt`
|
|
124
|
+
|
|
125
|
+
**Событие:** PostToolUse (все инструменты)
|
|
126
|
+
**По умолчанию:** Скрывает JWT-токены (три base64url сегмента, разделённые `.`).
|
|
127
|
+
|
|
128
|
+
Нет параметров.
|
|
129
|
+
|
|
130
|
+
---
|
|
131
|
+
|
|
132
|
+
### `sanitize-api-keys`
|
|
133
|
+
|
|
134
|
+
**Событие:** PostToolUse (все инструменты)
|
|
135
|
+
**По умолчанию:** Скрывает распространённые форматы API-ключей: Anthropic (`sk-ant-`), OpenAI (`sk-`), GitHub PATs (`ghp_`), AWS access keys (`AKIA`), Stripe keys (`sk_live_`, `sk_test_`) и Google API keys (`AIza`).
|
|
136
|
+
|
|
137
|
+
**Параметры:**
|
|
138
|
+
|
|
139
|
+
| Параметр | Тип | По умолчанию | Описание |
|
|
140
|
+
|-------|------|---------|-------------|
|
|
141
|
+
| `additionalPatterns` | `{ regex: string; label: string }[]` | `[]` | Дополнительные regex-паттерны для рассмотрения в качестве секретов. |
|
|
142
|
+
|
|
143
|
+
**Пример:**
|
|
144
|
+
|
|
145
|
+
```json
|
|
146
|
+
{
|
|
147
|
+
"policyParams": {
|
|
148
|
+
"sanitize-api-keys": {
|
|
149
|
+
"additionalPatterns": [
|
|
150
|
+
{ "regex": "myco_[A-Za-z0-9]{32}", "label": "MyCo internal API key" },
|
|
151
|
+
{ "regex": "pat_[0-9a-f]{40}", "label": "Internal PAT" }
|
|
152
|
+
]
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
---
|
|
159
|
+
|
|
160
|
+
### `sanitize-connection-strings`
|
|
161
|
+
|
|
162
|
+
**Событие:** PostToolUse (все инструменты)
|
|
163
|
+
**По умолчанию:** Скрывает строки подключения к БД, которые содержат встроенные учётные данные (например, `postgresql://user:password@host/db`).
|
|
164
|
+
|
|
165
|
+
Нет параметров.
|
|
166
|
+
|
|
167
|
+
---
|
|
168
|
+
|
|
169
|
+
### `sanitize-private-key-content`
|
|
170
|
+
|
|
171
|
+
**Событие:** PostToolUse (все инструменты)
|
|
172
|
+
**По умолчанию:** Скрывает PEM блоки (`-----BEGIN PRIVATE KEY-----`, `-----BEGIN RSA PRIVATE KEY-----` и т.д.).
|
|
173
|
+
|
|
174
|
+
Нет параметров.
|
|
175
|
+
|
|
176
|
+
---
|
|
177
|
+
|
|
178
|
+
### `sanitize-bearer-tokens`
|
|
179
|
+
|
|
180
|
+
**Событие:** PostToolUse (все инструменты)
|
|
181
|
+
**По умолчанию:** Скрывает заголовки `Authorization: Bearer <token>`, где токен содержит 20 или более символов.
|
|
182
|
+
|
|
183
|
+
Нет параметров.
|
|
184
|
+
|
|
185
|
+
---
|
|
186
|
+
|
|
187
|
+
## Окружение
|
|
188
|
+
|
|
189
|
+
Защитите чувствительную конфигурацию окружения от чтения или раскрытия агентами.
|
|
190
|
+
|
|
191
|
+
### `block-env-files`
|
|
192
|
+
|
|
193
|
+
**Событие:** PreToolUse (Bash, Read)
|
|
194
|
+
**По умолчанию:** Запрещает чтение файлов `.env` через `cat .env`, вызовы инструмента Read с `.env` в качестве пути файла и т.д.
|
|
195
|
+
|
|
196
|
+
Не блокирует `.envrc` или другие файлы, связанные с окружением — только файлы с именем ровно `.env`.
|
|
197
|
+
|
|
198
|
+
Нет параметров.
|
|
199
|
+
|
|
200
|
+
---
|
|
201
|
+
|
|
202
|
+
### `protect-env-vars`
|
|
203
|
+
|
|
204
|
+
**Событие:** PreToolUse (Bash)
|
|
205
|
+
**По умолчанию:** Запрещает команды, которые выводят переменные окружения: `printenv`, `env`, `echo $VAR`.
|
|
206
|
+
|
|
207
|
+
Нет параметров.
|
|
208
|
+
|
|
209
|
+
---
|
|
210
|
+
|
|
211
|
+
## Доступ к файлам
|
|
212
|
+
|
|
213
|
+
Держите агентов в пределах проекта и вдали от чувствительных файлов.
|
|
214
|
+
|
|
215
|
+
### `block-read-outside-cwd`
|
|
216
|
+
|
|
217
|
+
**Событие:** PreToolUse (Read, Bash)
|
|
218
|
+
**По умолчанию:** Запрещает чтение файлов вне текущей рабочей директории (корень проекта).
|
|
219
|
+
|
|
220
|
+
**Параметры:**
|
|
221
|
+
|
|
222
|
+
| Параметр | Тип | По умолчанию | Описание |
|
|
223
|
+
|-------|------|---------|-------------|
|
|
224
|
+
| `allowPaths` | `string[]` | `[]` | Абсолютные префиксы путей, которые разрешены даже если вне cwd. |
|
|
225
|
+
|
|
226
|
+
**Пример:**
|
|
227
|
+
|
|
228
|
+
```json
|
|
229
|
+
{
|
|
230
|
+
"policyParams": {
|
|
231
|
+
"block-read-outside-cwd": {
|
|
232
|
+
"allowPaths": ["/shared/data", "/opt/company/config"]
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
```
|
|
237
|
+
|
|
238
|
+
---
|
|
239
|
+
|
|
240
|
+
### `block-secrets-write`
|
|
241
|
+
|
|
242
|
+
**Событие:** PreToolUse (Write, Edit)
|
|
243
|
+
**По умолчанию:** Запрещает запись в файлы, обычно используемые для приватных ключей и сертификатов: `id_rsa`, `id_ed25519`, `*.key`, `*.pem`, `*.p12`, `*.pfx`.
|
|
244
|
+
|
|
245
|
+
**Параметры:**
|
|
246
|
+
|
|
247
|
+
| Параметр | Тип | По умолчанию | Описание |
|
|
248
|
+
|-------|------|---------|-------------|
|
|
249
|
+
| `additionalPatterns` | `string[]` | `[]` | Дополнительные паттерны имён файлов (в стиле glob) для блокировки. |
|
|
250
|
+
|
|
251
|
+
**Пример:**
|
|
252
|
+
|
|
253
|
+
```json
|
|
254
|
+
{
|
|
255
|
+
"policyParams": {
|
|
256
|
+
"block-secrets-write": {
|
|
257
|
+
"additionalPatterns": [".token", ".secret"]
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
```
|
|
262
|
+
|
|
263
|
+
---
|
|
264
|
+
|
|
265
|
+
## Git
|
|
266
|
+
|
|
267
|
+
Предотвратите случайные push'и, force-push'и и ошибки ветвей, которые сложно отменить.
|
|
268
|
+
|
|
269
|
+
### `block-push-master`
|
|
270
|
+
|
|
271
|
+
**Событие:** PreToolUse (Bash)
|
|
272
|
+
**По умолчанию:** Запрещает `git push origin main` и `git push origin master`.
|
|
273
|
+
|
|
274
|
+
**Параметры:**
|
|
275
|
+
|
|
276
|
+
| Параметр | Тип | По умолчанию | Описание |
|
|
277
|
+
|-------|------|---------|-------------|
|
|
278
|
+
| `protectedBranches` | `string[]` | `["main", "master"]` | Имена ветвей, которые не могут быть pushed напрямую. |
|
|
279
|
+
|
|
280
|
+
**Пример:**
|
|
281
|
+
|
|
282
|
+
```json
|
|
283
|
+
{
|
|
284
|
+
"policyParams": {
|
|
285
|
+
"block-push-master": {
|
|
286
|
+
"protectedBranches": ["main", "master", "release", "prod"]
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
```
|
|
291
|
+
|
|
292
|
+
<Tip>
|
|
293
|
+
Чтобы разрешить push'и на все ветви (фактически отключив эту политику без удаления её из `enabledPolicies`), установите `protectedBranches: []`.
|
|
294
|
+
</Tip>
|
|
295
|
+
|
|
296
|
+
---
|
|
297
|
+
|
|
298
|
+
### `block-work-on-main`
|
|
299
|
+
|
|
300
|
+
**Событие:** PreToolUse (Bash)
|
|
301
|
+
**По умолчанию:** Запрещает прямой checkout ветвей `main` или `master`.
|
|
302
|
+
|
|
303
|
+
**Параметры:**
|
|
304
|
+
|
|
305
|
+
| Параметр | Тип | По умолчанию | Описание |
|
|
306
|
+
|-------|------|---------|-------------|
|
|
307
|
+
| `protectedBranches` | `string[]` | `["main", "master"]` | Имена ветвей, которые не могут быть checked out напрямую. |
|
|
308
|
+
|
|
309
|
+
---
|
|
310
|
+
|
|
311
|
+
### `block-force-push`
|
|
312
|
+
|
|
313
|
+
**Событие:** PreToolUse (Bash)
|
|
314
|
+
**По умолчанию:** Запрещает `git push --force` и `git push -f`.
|
|
315
|
+
|
|
316
|
+
Нет специфичных для политики параметров. Используйте кросс-функциональную [`hint`](/ru/configuration#hint-cross-cutting) для предложения альтернатив:
|
|
317
|
+
|
|
318
|
+
```json
|
|
319
|
+
{
|
|
320
|
+
"policyParams": {
|
|
321
|
+
"block-force-push": {
|
|
322
|
+
"hint": "Создайте новую ветвь из текущего HEAD (например, `git checkout -b <new-branch>`) и вместо этого push'ьте её."
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
```
|
|
327
|
+
|
|
328
|
+
---
|
|
329
|
+
|
|
330
|
+
### `warn-git-amend`
|
|
331
|
+
|
|
332
|
+
**Событие:** PreToolUse (Bash)
|
|
333
|
+
**По умолчанию:** Инструктирует Claude действовать осторожно при запуске `git commit --amend`. Не блокирует команду.
|
|
334
|
+
|
|
335
|
+
Нет параметров.
|
|
336
|
+
|
|
337
|
+
---
|
|
338
|
+
|
|
339
|
+
### `warn-git-stash-drop`
|
|
340
|
+
|
|
341
|
+
**Событие:** PreToolUse (Bash)
|
|
342
|
+
**По умолчанию:** Инструктирует Claude подтвердить перед запуском `git stash drop`. Не блокирует команду.
|
|
343
|
+
|
|
344
|
+
Нет параметров.
|
|
345
|
+
|
|
346
|
+
---
|
|
347
|
+
|
|
348
|
+
### `warn-all-files-staged`
|
|
349
|
+
|
|
350
|
+
**Событие:** PreToolUse (Bash)
|
|
351
|
+
**По умолчанию:** Инструктирует Claude проверить, что он staging'ует при запуске `git add -A` или `git add .`. Не блокирует команду.
|
|
352
|
+
|
|
353
|
+
Нет параметров.
|
|
354
|
+
|
|
355
|
+
---
|
|
356
|
+
|
|
357
|
+
## База данных
|
|
358
|
+
|
|
359
|
+
Поймайте деструктивные SQL-операции перед выполнением их против вашей БД.
|
|
360
|
+
|
|
361
|
+
### `warn-destructive-sql`
|
|
362
|
+
|
|
363
|
+
**Событие:** PreToolUse (Bash)
|
|
364
|
+
**По умолчанию:** Инструктирует Claude подтвердить перед запуском SQL, содержащего `DROP TABLE`, `DROP DATABASE` или `DELETE` без `WHERE` клаузулы.
|
|
365
|
+
|
|
366
|
+
Нет параметров.
|
|
367
|
+
|
|
368
|
+
---
|
|
369
|
+
|
|
370
|
+
### `warn-schema-alteration`
|
|
371
|
+
|
|
372
|
+
**Событие:** PreToolUse (Bash)
|
|
373
|
+
**По умолчанию:** Инструктирует Claude подтвердить перед запуском `ALTER TABLE` statements.
|
|
374
|
+
|
|
375
|
+
Нет параметров.
|
|
376
|
+
|
|
377
|
+
---
|
|
378
|
+
|
|
379
|
+
## Предупреждения
|
|
380
|
+
|
|
381
|
+
Предоставьте агентам дополнительный контекст перед потенциально рискованными, но неразрушительными операциями.
|
|
382
|
+
|
|
383
|
+
### `warn-large-file-write`
|
|
384
|
+
|
|
385
|
+
**Событие:** PreToolUse (Write)
|
|
386
|
+
**По умолчанию:** Инструктирует Claude подтвердить перед записью файлов больше 1024 KB.
|
|
387
|
+
|
|
388
|
+
**Параметры:**
|
|
389
|
+
|
|
390
|
+
| Параметр | Тип | По умолчанию | Описание |
|
|
391
|
+
|-------|------|---------|-------------|
|
|
392
|
+
| `thresholdKb` | `number` | `1024` | Порог размера файла в килобайтах, выше которого выдаётся предупреждение. |
|
|
393
|
+
|
|
394
|
+
**Пример:**
|
|
395
|
+
|
|
396
|
+
```json
|
|
397
|
+
{
|
|
398
|
+
"policyParams": {
|
|
399
|
+
"warn-large-file-write": {
|
|
400
|
+
"thresholdKb": 256
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
}
|
|
404
|
+
```
|
|
405
|
+
|
|
406
|
+
<Note>
|
|
407
|
+
Обработчик hook усиливает ограничение на stdin в 1 MB для payload'ей. Чтобы протестировать эту политику с малым содержимым, установите `thresholdKb` на значение намного ниже 1024.
|
|
408
|
+
</Note>
|
|
409
|
+
|
|
410
|
+
---
|
|
411
|
+
|
|
412
|
+
### `warn-package-publish`
|
|
413
|
+
|
|
414
|
+
**Событие:** PreToolUse (Bash)
|
|
415
|
+
**По умолчанию:** Инструктирует Claude подтвердить перед запуском `npm publish`.
|
|
416
|
+
|
|
417
|
+
Нет параметров.
|
|
418
|
+
|
|
419
|
+
---
|
|
420
|
+
|
|
421
|
+
### `warn-background-process`
|
|
422
|
+
|
|
423
|
+
**Событие:** PreToolUse (Bash)
|
|
424
|
+
**По умолчанию:** Инструктирует Claude быть осторожным при запуске фоновых процессов через `nohup`, `&`, `disown` или `screen`.
|
|
425
|
+
|
|
426
|
+
Нет параметров.
|
|
427
|
+
|
|
428
|
+
---
|
|
429
|
+
|
|
430
|
+
### `warn-global-package-install`
|
|
431
|
+
|
|
432
|
+
**Событие:** PreToolUse (Bash)
|
|
433
|
+
**По умолчанию:** Инструктирует Claude подтвердить перед запуском `npm install -g`, `yarn global add` или `pip install` без виртуального окружения.
|
|
434
|
+
|
|
435
|
+
Нет параметров.
|
|
436
|
+
|
|
437
|
+
---
|
|
438
|
+
|
|
439
|
+
## Поведение AI
|
|
440
|
+
|
|
441
|
+
Обнаружьте, когда агенты застревают или ведут себя неожиданно.
|
|
442
|
+
|
|
443
|
+
### `warn-repeated-tool-calls`
|
|
444
|
+
|
|
445
|
+
**Событие:** PreToolUse (все инструменты)
|
|
446
|
+
**По умолчанию:** Инструктирует Claude пересмотреть, когда один и тот же инструмент вызывается 3+ раза с идентичными параметрами — распространённый признак того, что агент застрял в цикле.
|
|
447
|
+
|
|
448
|
+
Нет параметров.
|
|
449
|
+
|
|
450
|
+
---
|
|
451
|
+
|
|
452
|
+
## Рабочий поток (beta)
|
|
453
|
+
|
|
454
|
+
Усильте дисциплинированный рабочий поток конца сессии. Эти политики срабатывают на событие **Stop** и запрещают Claude остановиться до выполнения каждого условия. Они следуют естественной цепочке зависимостей: commit → push → PR → CI. Если политика запрещает, последующие политики в цепочке пропускаются (deny коротко-замыкает).
|
|
455
|
+
|
|
456
|
+
Все политики рабочего потока **fail-open**: если требуемый инструмент не доступен (например, `gh` не установлен, нет удалённого git репозитория), политика разрешает с информационным сообщением, объясняющим причину пропуска проверки.
|
|
457
|
+
|
|
458
|
+
### `require-commit-before-stop`
|
|
459
|
+
|
|
460
|
+
**Событие:** Stop
|
|
461
|
+
**По умолчанию:** Запрещает остановку, когда есть незакоммитные изменения (изменённые, staged или неотследённые файлы). Возвращает информационное сообщение, когда рабочая директория чистая.
|
|
462
|
+
|
|
463
|
+
Нет параметров.
|
|
464
|
+
|
|
465
|
+
---
|
|
466
|
+
|
|
467
|
+
### `require-push-before-stop`
|
|
468
|
+
|
|
469
|
+
**Событие:** Stop
|
|
470
|
+
**По умолчанию:** Запрещает остановку, когда есть unpushed коммиты или когда текущая ветвь не имеет удалённой ветви для отслеживания. Предлагает `git push -u` для создания ветви отслеживания при необходимости. Fail open если нет настроенного удалённого репозитория.
|
|
471
|
+
|
|
472
|
+
**Параметры:**
|
|
473
|
+
|
|
474
|
+
| Параметр | Тип | По умолчанию | Описание |
|
|
475
|
+
|-------|------|---------|-------------|
|
|
476
|
+
| `remote` | `string` | `"origin"` | Имя удалённого репозитория для push'а. |
|
|
477
|
+
|
|
478
|
+
**Пример:**
|
|
479
|
+
|
|
480
|
+
```json
|
|
481
|
+
{
|
|
482
|
+
"policyParams": {
|
|
483
|
+
"require-push-before-stop": {
|
|
484
|
+
"remote": "upstream"
|
|
485
|
+
}
|
|
486
|
+
}
|
|
487
|
+
}
|
|
488
|
+
```
|
|
489
|
+
|
|
490
|
+
---
|
|
491
|
+
|
|
492
|
+
### `require-pr-before-stop`
|
|
493
|
+
|
|
494
|
+
**Событие:** Stop
|
|
495
|
+
**По умолчанию:** Запрещает остановку, когда не существует pull request'а для текущей ветви или когда существующий PR закрыт/merged. Инструктирует Claude создать PR с `gh pr create`.
|
|
496
|
+
|
|
497
|
+
Нет параметров.
|
|
498
|
+
|
|
499
|
+
<Note>
|
|
500
|
+
Эта политика требует установленного и аутентифицированного [GitHub CLI](https://cli.github.com/) (`gh`).
|
|
501
|
+
Запустите `gh auth login` с персональным токеном доступа, имеющим область `repo` для чтения pull request'ов. Если `gh` не установлен или не аутентифицирован, политика fail open и сообщит причину Claude.
|
|
502
|
+
</Note>
|
|
503
|
+
|
|
504
|
+
---
|
|
505
|
+
|
|
506
|
+
### `require-ci-green-before-stop`
|
|
507
|
+
|
|
508
|
+
**Событие:** Stop
|
|
509
|
+
**По умолчанию:** Запрещает остановку, когда CI проверки падают или всё ещё выполняются на текущей ветви. Проверяет как GitHub Actions workflow runs, так и проверки сторонних ботов (например, CodeRabbit, SonarCloud, Codecov). Рассматривает заключения `skipped` как успех. Возвращает информационное сообщение когда все проверки проходят.
|
|
510
|
+
|
|
511
|
+
Нет параметров.
|
|
512
|
+
|
|
513
|
+
<Note>
|
|
514
|
+
Эта политика требует установленного и аутентифицированного [GitHub CLI](https://cli.github.com/) (`gh`).
|
|
515
|
+
Запустите `gh auth login` с персональным токеном доступа, имеющим область `repo` для чтения Actions workflow runs и Checks API. Если `gh` не установлен или не аутентифицирован, политика fail open и сообщит причину Claude.
|
|
516
|
+
</Note>
|
|
517
|
+
|
|
518
|
+
---
|
|
519
|
+
|
|
520
|
+
## Бета-политики
|
|
521
|
+
|
|
522
|
+
Некоторые политики помечены `beta` и не устанавливаются по умолчанию. Бета-политики могут иметь шероховатости или генерировать ложные срабатывания. Они переходят в стабильное состояние в будущих релизах.
|
|
523
|
+
|
|
524
|
+
**Текущие бета-политики:**
|
|
525
|
+
|
|
526
|
+
- `require-commit-before-stop` — закоммитьте все изменения перед остановкой
|
|
527
|
+
- `require-push-before-stop` — push'ьте все коммиты на удалённый репозиторий
|
|
528
|
+
- `require-pr-before-stop` — убедитесь, что PR существует для ветви
|
|
529
|
+
- `require-ci-green-before-stop` — все CI проверки должны пройти
|
|
530
|
+
|
|
531
|
+
Вместе они усиливают рабочий поток **commit → push → PR → CI**.
|
|
532
|
+
|
|
533
|
+
Для установки всех бета-политик:
|
|
534
|
+
|
|
535
|
+
```bash
|
|
536
|
+
failproofai policies --install --beta
|
|
537
|
+
```
|
|
538
|
+
|
|
539
|
+
Или установите конкретные политики рабочего потока:
|
|
540
|
+
|
|
541
|
+
```bash
|
|
542
|
+
failproofai policies --install require-commit-before-stop require-push-before-stop require-pr-before-stop require-ci-green-before-stop
|
|
543
|
+
```
|
|
544
|
+
|
|
545
|
+
Запустите `failproofai policies` для просмотра того, какие политики имеют флаг beta.
|
|
546
|
+
|
|
547
|
+
---
|
|
548
|
+
|
|
549
|
+
## Отключение отдельных политик
|
|
550
|
+
|
|
551
|
+
Удалите конкретную политику из `enabledPolicies` в вашей конфигурации или переключите её в табе Policies на панели управления.
|
|
552
|
+
|
|
553
|
+
```json
|
|
554
|
+
{
|
|
555
|
+
"enabledPolicies": [
|
|
556
|
+
"block-rm-rf",
|
|
557
|
+
"sanitize-api-keys"
|
|
558
|
+
]
|
|
559
|
+
}
|
|
560
|
+
```
|
|
561
|
+
|
|
562
|
+
Политики, не перечисленные в `enabledPolicies`, не запускаются, даже если для них существуют записи `policyParams`.
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Просмотр сеансов
|
|
3
|
+
description: "Запустите панель управления для просмотра сеансов агентов и управления политиками"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
```bash
|
|
7
|
+
failproofai
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
Запускает веб-панель управления по адресу `http://localhost:8020`.
|
|
11
|
+
|
|
12
|
+
## Параметры
|
|
13
|
+
|
|
14
|
+
| Флаг | Описание |
|
|
15
|
+
|------|---------|
|
|
16
|
+
| `--port <number>` | Порт для прослушивания (по умолчанию: `8020`) |
|
|
17
|
+
| `--projects-path <path>` | Переопределить расположение папок проектов Claude Code |
|
|
18
|
+
| `--allowed-origins <origins>` | Список хостов/IP-адресов через запятую, которым разрешен доступ к ресурсам разработки |
|
|
19
|
+
|
|
20
|
+
## Примеры
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
# Запуск на другом порту
|
|
24
|
+
failproofai --port 9000
|
|
25
|
+
|
|
26
|
+
# Использование пользовательского пути проектов
|
|
27
|
+
failproofai --projects-path ~/my-claude-projects
|
|
28
|
+
```
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Переменные окружения
|
|
3
|
+
description: "Настройка поведения failproofai с помощью переменных окружения"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
## Dashboard
|
|
7
|
+
|
|
8
|
+
| Переменная | Описание |
|
|
9
|
+
|----------|-------------|
|
|
10
|
+
| `PORT` | Порт панели управления (по умолчанию: `8020`) |
|
|
11
|
+
| `CLAUDE_PROJECTS_PATH` | Переопределить расположение папок проектов Claude Code |
|
|
12
|
+
| `FAILPROOFAI_DISABLE_PAGES=policies,projects` | Список страниц панели управления для скрытия, разделённый запятыми |
|
|
13
|
+
| `FAILPROOFAI_ALLOWED_DEV_ORIGINS` | Хосты/IP-адреса, которым разрешён доступ к ресурсам для разработки. То же самое, что `--allowed-origins`. |
|
|
14
|
+
|
|
15
|
+
## Логирование
|
|
16
|
+
|
|
17
|
+
| Переменная | Описание |
|
|
18
|
+
|----------|-------------|
|
|
19
|
+
| `FAILPROOFAI_LOG_LEVEL=info\|warn\|error` | Уровень логирования сервера (по умолчанию: `warn`) |
|
|
20
|
+
| `FAILPROOFAI_HOOK_LOG_FILE` | Пользовательский путь файла логов хуков или `true` для стандартного пути (`~/.failproofai/logs/hooks.log`) |
|
|
21
|
+
|
|
22
|
+
## Телеметрия
|
|
23
|
+
|
|
24
|
+
| Переменная | Описание |
|
|
25
|
+
|----------|-------------|
|
|
26
|
+
| `FAILPROOFAI_TELEMETRY_DISABLED=1` | Отключить анонимную телеметрию использования |
|
|
27
|
+
|
|
28
|
+
## LLM (для оценки политик)
|
|
29
|
+
|
|
30
|
+
| Переменная | Описание |
|
|
31
|
+
|----------|-------------|
|
|
32
|
+
| `FAILPROOFAI_LLM_BASE_URL` | Endpoint API LLM (по умолчанию: `https://api.openai.com/v1`) |
|
|
33
|
+
| `FAILPROOFAI_LLM_API_KEY` | API ключ для политик на базе LLM |
|
|
34
|
+
| `FAILPROOFAI_LLM_MODEL` | Имя модели (по умолчанию: `gpt-4o-mini`) |
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Обработчик хука (внутренний)
|
|
3
|
+
description: "Подпроцесс, который вызывает Claude Code при каждом событии инструмента"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
```bash
|
|
7
|
+
failproofai --hook <EventType>
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
Это команда, зарегистрированная в `settings.json` Claude Code через `failproofai policies --install`. Обычно вы не вызываете её напрямую.
|
|
11
|
+
|
|
12
|
+
Читает JSON-полезную нагрузку из stdin, вычисляет все включённые политики и выходит с кодом, указывающим на решение:
|
|
13
|
+
|
|
14
|
+
| Код выхода | Решение | Эффект |
|
|
15
|
+
|-----------|---------|--------|
|
|
16
|
+
| `0` | `allow` | Разрешить действие |
|
|
17
|
+
| `1` | `deny` | Заблокировать действие — Claude видит причину отказа |
|
|
18
|
+
| `2` | `instruct` | Внедрить руководство в контекст Claude |
|
|
19
|
+
|
|
20
|
+
### Поддерживаемые типы событий
|
|
21
|
+
|
|
22
|
+
| Категория | События |
|
|
23
|
+
|-----------|---------|
|
|
24
|
+
| **Выполнение инструментов** | `PreToolUse`, `PostToolUse`, `PostToolUseFailure`, `PermissionRequest`, `PermissionDenied` |
|
|
25
|
+
| **Жизненный цикл сеанса** | `SessionStart`, `SessionEnd`, `Stop`, `StopFailure` |
|
|
26
|
+
| **Взаимодействие пользователя** | `UserPromptSubmit`, `Notification`, `Elicitation`, `ElicitationResult` |
|
|
27
|
+
| **Подагенты и задачи** | `SubagentStart`, `SubagentStop`, `TaskCreated`, `TaskCompleted`, `TeammateIdle` |
|
|
28
|
+
| **Конфигурация** | `InstructionsLoaded`, `ConfigChange`, `CwdChanged` |
|
|
29
|
+
| **Файловая система** | `FileChanged`, `WorktreeCreate`, `WorktreeRemove` |
|
|
30
|
+
| **Контекст** | `PreCompact`, `PostCompact` |
|