failproofai 0.0.6-beta.2 → 0.0.6-beta.4
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]__0i5kvry._.js → [root-of-the-server]__0om-5pe._.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]__05akje6._.js → [root-of-the-server]__111.vxi._.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/chunks/ssr/node_modules_posthog-node_dist_entrypoints_index_node_mjs_0mebn66._.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/{05j1px0r8yzh6.js → 02dqjyv6_9mhq.js} +2 -2
- package/.next/standalone/.next/static/chunks/{14cl9poem30dq.js → 070orfsl6.xal.js} +1 -1
- package/.next/standalone/.next/static/chunks/0mir9jdxn35~s.css +1 -0
- package/.next/standalone/.next/static/chunks/{00j0rr7rh8ef8.js → 0o547jv-k_k35.js} +1 -1
- package/.next/standalone/.next/static/chunks/{0ijk_kek9_wyx.js → 0pk2h2.mjxy.m.js} +1 -1
- package/.next/standalone/.next/static/chunks/{0xpl.oscrakvx.js → 0rcwkbh24w38b.js} +1 -1
- package/.next/standalone/.next/static/chunks/{1052sguyd-.ka.js → 140xx_tfr~lm_.js} +1 -1
- package/.next/standalone/.next/static/chunks/{0npb~873.wvg3.js → 169_e4dq~1~b6.js} +1 -1
- package/.next/standalone/.next/static/chunks/{0badv41uxa56..js → 17ne4p.1sw1jy.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/bin/failproofai.mjs +91 -4
- package/dist/cli.mjs +1155 -54
- package/package.json +2 -2
- package/scripts/prune-standalone.mjs +128 -0
- package/src/auth/login.ts +104 -0
- package/src/auth/logout.ts +50 -0
- package/src/auth/token-store.ts +64 -0
- package/src/hooks/builtin-policies.ts +22 -20
- package/src/hooks/handler.ts +35 -15
- package/src/relay/daemon.ts +362 -0
- package/src/relay/pid.ts +76 -0
- package/src/relay/queue.ts +225 -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/AGENTS.md +0 -80
- package/.next/standalone/CHANGELOG.md +0 -151
- 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 -352
- package/.next/standalone/bun.lock +0 -1119
- package/.next/standalone/components.json +0 -23
- package/.next/standalone/dist/cli.mjs +0 -3595
- 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 -574
- 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 -576
- 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 -575
- 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 -572
- 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/cli-error.ts +0 -18
- package/.next/standalone/src/hooks/builtin-policies.ts +0 -1613
- 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 -202
- 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/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/{A9pNTZdoYJTVyPAYwQMx5 → wOkJXoch1UmRAmyIuKZWc}/_buildManifest.js +0 -0
- /package/.next/standalone/.next/static/{A9pNTZdoYJTVyPAYwQMx5 → wOkJXoch1UmRAmyIuKZWc}/_clientMiddlewareManifest.js +0 -0
- /package/.next/standalone/.next/static/{A9pNTZdoYJTVyPAYwQMx5 → wOkJXoch1UmRAmyIuKZWc}/_ssgManifest.js +0 -0
|
@@ -1,307 +0,0 @@
|
|
|
1
|
-
> **⚠️** This is an auto-generated translation. For the latest version, see the [English README](../../README.md). Community corrections welcome!
|
|
2
|
-
|
|
3
|
-
[🇺🇸 English](../../README.md) | [🇨🇳 简体中文](README.zh.md) | [🇯🇵 日本語](README.ja.md) | [🇰🇷 한국어](README.ko.md) | [🇪🇸 Español](README.es.md) | **🇧🇷 Português** | [🇩🇪 Deutsch](README.de.md) | [🇫🇷 Français](README.fr.md) | [🇷🇺 Русский](README.ru.md) | [🇮🇳 हिन्दी](README.hi.md) | [🇹🇷 Türkçe](README.tr.md) | [🇻🇳 Tiếng Việt](README.vi.md) | [🇮🇹 Italiano](README.it.md) | [🇸🇦 العربية](README.ar.md) | [🇮🇱 עברית](README.he.md)
|
|
4
|
-
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
```
|
|
8
|
-
______ _ __ ____ ___ ____
|
|
9
|
-
/ ____/___ _(_) /___ _________ ____ / __/ / | / _/
|
|
10
|
-
/ /_ / __ `/ / / __ \/ ___/ __ \/ __ \/ /_ / /| | / /
|
|
11
|
-
/ __/ / /_/ / / / /_/ / / / /_/ / /_/ / __/ / ___ |_/ /
|
|
12
|
-
/_/ \__,_/_/_/ .___/_/ \____/\____/_/ /_/ |_/___/
|
|
13
|
-
/_/
|
|
14
|
-
```
|
|
15
|
-
|
|
16
|
-
# Failproof AI
|
|
17
|
-
|
|
18
|
-
[](https://befailproof.ai)
|
|
19
|
-
[](https://www.npmjs.com/package/failproofai)
|
|
20
|
-
[](LICENSE)
|
|
21
|
-
[](https://github.com/exospherehost/failproofai/actions)
|
|
22
|
-
[](https://join.slack.com/t/failproofai/shared_invite/zt-3v63b7k5e-O3NBHmj8X6n9gZSGDx6ggQ)
|
|
23
|
-
|
|
24
|
-
**Traduções**: [简体中文](docs/i18n/README.zh.md) | [日本語](docs/i18n/README.ja.md) | [한국어](docs/i18n/README.ko.md) | [Español](docs/i18n/README.es.md) | [Português](docs/i18n/README.pt-br.md) | [Deutsch](docs/i18n/README.de.md) | [Français](docs/i18n/README.fr.md) | [Русский](docs/i18n/README.ru.md) | [हिन्दी](docs/i18n/README.hi.md) | [Türkçe](docs/i18n/README.tr.md) | [Tiếng Việt](docs/i18n/README.vi.md) | [Italiano](docs/i18n/README.it.md) | [العربية](docs/i18n/README.ar.md) | [עברית](docs/i18n/README.he.md)
|
|
25
|
-
|
|
26
|
-
A maneira mais fácil de gerenciar políticas que mantêm seus agentes de IA confiáveis, focados nas tarefas e operando de forma autônoma — para **Claude Code** e o **Agents SDK**.
|
|
27
|
-
|
|
28
|
-
- **30 Políticas Integradas** - Identifique modos de falha comuns de agentes logo de cara. Bloqueie comandos destrutivos, evite vazamento de segredos, mantenha os agentes dentro dos limites do projeto, detecte loops e muito mais.
|
|
29
|
-
- **Políticas Personalizadas** - Escreva suas próprias regras de confiabilidade em JavaScript. Use a API `allow`/`deny`/`instruct` para aplicar convenções, evitar desvios, controlar operações ou integrar com sistemas externos.
|
|
30
|
-
- **Configuração Simples** - Ajuste qualquer política sem escrever código. Defina listas de permissão, branches protegidas e limites por projeto ou globalmente. Três escopos de configuração são mesclados automaticamente.
|
|
31
|
-
- **Monitor de Agentes** - Veja o que seus agentes fizeram enquanto você estava ausente. Navegue pelas sessões, inspecione cada chamada de ferramenta e revise exatamente onde as políticas foram acionadas.
|
|
32
|
-
|
|
33
|
-
Tudo roda localmente — nenhum dado sai da sua máquina.
|
|
34
|
-
|
|
35
|
-
---
|
|
36
|
-
|
|
37
|
-
## Requisitos
|
|
38
|
-
|
|
39
|
-
- Node.js >= 20.9.0
|
|
40
|
-
- Bun >= 1.3.0 (opcional — necessário apenas para desenvolvimento / compilação a partir do código-fonte)
|
|
41
|
-
|
|
42
|
-
---
|
|
43
|
-
|
|
44
|
-
## Instalação
|
|
45
|
-
|
|
46
|
-
```bash
|
|
47
|
-
npm install -g failproofai
|
|
48
|
-
# ou
|
|
49
|
-
bun add -g failproofai
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
---
|
|
53
|
-
|
|
54
|
-
## Início rápido
|
|
55
|
-
|
|
56
|
-
### 1. Habilite as políticas globalmente
|
|
57
|
-
|
|
58
|
-
```bash
|
|
59
|
-
failproofai policies --install
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
Grava entradas de hook em `~/.claude/settings.json`. A partir de agora, Claude Code invocará o failproofai antes e depois de cada chamada de ferramenta.
|
|
63
|
-
|
|
64
|
-
### 2. Inicie o painel
|
|
65
|
-
|
|
66
|
-
```bash
|
|
67
|
-
failproofai
|
|
68
|
-
```
|
|
69
|
-
|
|
70
|
-
Abre `http://localhost:8020` — navegue pelas sessões, inspecione logs e gerencie políticas.
|
|
71
|
-
|
|
72
|
-
### 3. Verifique o que está ativo
|
|
73
|
-
|
|
74
|
-
```bash
|
|
75
|
-
failproofai policies
|
|
76
|
-
```
|
|
77
|
-
|
|
78
|
-
---
|
|
79
|
-
|
|
80
|
-
## Instalação de políticas
|
|
81
|
-
|
|
82
|
-
### Escopos
|
|
83
|
-
|
|
84
|
-
| Escopo | Comando | Onde grava |
|
|
85
|
-
|--------|---------|------------|
|
|
86
|
-
| Global (padrão) | `failproofai policies --install` | `~/.claude/settings.json` |
|
|
87
|
-
| Projeto | `failproofai policies --install --scope project` | `.claude/settings.json` |
|
|
88
|
-
| Local | `failproofai policies --install --scope local` | `.claude/settings.local.json` |
|
|
89
|
-
|
|
90
|
-
### Instalar políticas específicas
|
|
91
|
-
|
|
92
|
-
```bash
|
|
93
|
-
failproofai policies --install block-sudo block-rm-rf sanitize-api-keys
|
|
94
|
-
```
|
|
95
|
-
|
|
96
|
-
### Remover políticas
|
|
97
|
-
|
|
98
|
-
```bash
|
|
99
|
-
failproofai policies --uninstall
|
|
100
|
-
# ou para um escopo específico:
|
|
101
|
-
failproofai policies --uninstall --scope project
|
|
102
|
-
```
|
|
103
|
-
|
|
104
|
-
---
|
|
105
|
-
|
|
106
|
-
## Configuração
|
|
107
|
-
|
|
108
|
-
A configuração de políticas fica em `~/.failproofai/policies-config.json` (global) ou `.failproofai/policies-config.json` no seu projeto (por projeto).
|
|
109
|
-
|
|
110
|
-
```json
|
|
111
|
-
{
|
|
112
|
-
"enabledPolicies": [
|
|
113
|
-
"block-sudo",
|
|
114
|
-
"block-rm-rf",
|
|
115
|
-
"sanitize-api-keys",
|
|
116
|
-
"block-push-master",
|
|
117
|
-
"block-env-files",
|
|
118
|
-
"block-read-outside-cwd"
|
|
119
|
-
],
|
|
120
|
-
"policyParams": {
|
|
121
|
-
"block-sudo": {
|
|
122
|
-
"allowPatterns": ["sudo systemctl status", "sudo journalctl"],
|
|
123
|
-
"hint": "Use apt-get directly without sudo."
|
|
124
|
-
},
|
|
125
|
-
"block-push-master": {
|
|
126
|
-
"protectedBranches": ["main", "release", "prod"],
|
|
127
|
-
"hint": "Try creating a fresh branch instead."
|
|
128
|
-
},
|
|
129
|
-
"sanitize-api-keys": {
|
|
130
|
-
"additionalPatterns": [
|
|
131
|
-
{ "regex": "myco_[A-Za-z0-9]{32}", "label": "MyCo API key" }
|
|
132
|
-
]
|
|
133
|
-
},
|
|
134
|
-
"warn-large-file-write": {
|
|
135
|
-
"thresholdKb": 512
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
```
|
|
140
|
-
|
|
141
|
-
**Três escopos de configuração** são mesclados automaticamente (projeto → local → global). Consulte [docs/configuration.mdx](docs/configuration.mdx) para as regras completas de mesclagem.
|
|
142
|
-
|
|
143
|
-
---
|
|
144
|
-
|
|
145
|
-
## Políticas integradas
|
|
146
|
-
|
|
147
|
-
| Política | Descrição | Configurável |
|
|
148
|
-
|----------|-----------|:---:|
|
|
149
|
-
| `block-sudo` | Impede que agentes executem comandos de sistema privilegiados | `allowPatterns` |
|
|
150
|
-
| `block-rm-rf` | Previne exclusão recursiva acidental de arquivos | `allowPaths` |
|
|
151
|
-
| `block-curl-pipe-sh` | Impede que agentes redirecionem scripts não confiáveis para o shell | |
|
|
152
|
-
| `block-failproofai-commands` | Previne a auto-desinstalação | |
|
|
153
|
-
| `sanitize-jwt` | Evita que tokens JWT vazem para o contexto do agente | |
|
|
154
|
-
| `sanitize-api-keys` | Evita que chaves de API vazem para o contexto do agente | `additionalPatterns` |
|
|
155
|
-
| `sanitize-connection-strings` | Evita que credenciais de banco de dados vazem para o contexto do agente | |
|
|
156
|
-
| `sanitize-private-key-content` | Remove blocos de chave privada PEM da saída | |
|
|
157
|
-
| `sanitize-bearer-tokens` | Remove tokens Authorization Bearer da saída | |
|
|
158
|
-
| `block-env-files` | Impede que agentes leiam arquivos .env | |
|
|
159
|
-
| `protect-env-vars` | Previne que agentes exibam variáveis de ambiente | |
|
|
160
|
-
| `block-read-outside-cwd` | Mantém os agentes dentro dos limites do projeto | `allowPaths` |
|
|
161
|
-
| `block-secrets-write` | Previne gravações em arquivos de chave privada e certificados | `additionalPatterns` |
|
|
162
|
-
| `block-push-master` | Previne pushes acidentais para main/master | `protectedBranches` |
|
|
163
|
-
| `block-work-on-main` | Mantém os agentes fora de branches protegidas | `protectedBranches` |
|
|
164
|
-
| `block-force-push` | Previne `git push --force` | |
|
|
165
|
-
| `warn-git-amend` | Lembra os agentes antes de emendar commits | |
|
|
166
|
-
| `warn-git-stash-drop` | Lembra os agentes antes de descartar stashes | |
|
|
167
|
-
| `warn-all-files-staged` | Detecta `git add -A` acidental | |
|
|
168
|
-
| `warn-destructive-sql` | Detecta comandos DROP/DELETE SQL antes da execução | |
|
|
169
|
-
| `warn-schema-alteration` | Detecta ALTER TABLE antes da execução | |
|
|
170
|
-
| `warn-large-file-write` | Detecta gravações de arquivos inesperadamente grandes | `thresholdKb` |
|
|
171
|
-
| `warn-package-publish` | Detecta `npm publish` acidental | |
|
|
172
|
-
| `warn-background-process` | Detecta inicializações não intencionais de processos em segundo plano | |
|
|
173
|
-
| `warn-global-package-install` | Detecta instalações não intencionais de pacotes globais | |
|
|
174
|
-
| …e mais | | |
|
|
175
|
-
|
|
176
|
-
Detalhes completos das políticas e referência de parâmetros: [docs/built-in-policies.mdx](docs/built-in-policies.mdx)
|
|
177
|
-
|
|
178
|
-
---
|
|
179
|
-
|
|
180
|
-
## Políticas personalizadas
|
|
181
|
-
|
|
182
|
-
Escreva suas próprias políticas para manter os agentes confiáveis e focados nas tarefas:
|
|
183
|
-
|
|
184
|
-
```js
|
|
185
|
-
import { customPolicies, allow, deny, instruct } from "failproofai";
|
|
186
|
-
|
|
187
|
-
customPolicies.add({
|
|
188
|
-
name: "no-production-writes",
|
|
189
|
-
description: "Block writes to paths containing 'production'",
|
|
190
|
-
match: { events: ["PreToolUse"] },
|
|
191
|
-
fn: async (ctx) => {
|
|
192
|
-
if (!["Write", "Edit"].includes(ctx.toolName ?? "")) return allow();
|
|
193
|
-
const path = ctx.toolInput?.file_path ?? "";
|
|
194
|
-
if (path.includes("production")) return deny("Writes to production paths are blocked");
|
|
195
|
-
return allow();
|
|
196
|
-
},
|
|
197
|
-
});
|
|
198
|
-
```
|
|
199
|
-
|
|
200
|
-
Instale com:
|
|
201
|
-
|
|
202
|
-
```bash
|
|
203
|
-
failproofai policies --install --custom ./my-policies.js
|
|
204
|
-
```
|
|
205
|
-
|
|
206
|
-
### Auxiliares de decisão
|
|
207
|
-
|
|
208
|
-
| Função | Efeito |
|
|
209
|
-
|--------|--------|
|
|
210
|
-
| `allow()` | Permite a operação |
|
|
211
|
-
| `allow(message)` | Permite e envia contexto informativo para Claude |
|
|
212
|
-
| `deny(message)` | Bloqueia a operação; mensagem exibida para Claude |
|
|
213
|
-
| `instruct(message)` | Adiciona contexto ao prompt de Claude; não bloqueia |
|
|
214
|
-
|
|
215
|
-
### Objeto de contexto (`ctx`)
|
|
216
|
-
|
|
217
|
-
| Campo | Tipo | Descrição |
|
|
218
|
-
|-------|------|-----------|
|
|
219
|
-
| `eventType` | `string` | `"PreToolUse"`, `"PostToolUse"`, `"Notification"`, `"Stop"` |
|
|
220
|
-
| `toolName` | `string` | Ferramenta sendo chamada (`"Bash"`, `"Write"`, `"Read"`, …) |
|
|
221
|
-
| `toolInput` | `object` | Parâmetros de entrada da ferramenta |
|
|
222
|
-
| `payload` | `object` | Payload completo do evento bruto |
|
|
223
|
-
| `session.cwd` | `string` | Diretório de trabalho da sessão do Claude Code |
|
|
224
|
-
| `session.sessionId` | `string` | Identificador da sessão |
|
|
225
|
-
| `session.transcriptPath` | `string` | Caminho para o arquivo de transcrição da sessão |
|
|
226
|
-
|
|
227
|
-
Hooks personalizados suportam importações locais transitivas, async/await e acesso a `process.env`. Erros são fail-open (registrados em `~/.failproofai/hook.log`; as políticas integradas continuam funcionando). Consulte [docs/custom-hooks.mdx](docs/custom-hooks.mdx) para o guia completo.
|
|
228
|
-
|
|
229
|
-
### Políticas baseadas em convenção
|
|
230
|
-
|
|
231
|
-
Coloque arquivos `*policies.{js,mjs,ts}` em `.failproofai/policies/` e eles serão carregados automaticamente — sem flags ou alterações de configuração. Faça commit do diretório no git e todos os membros da equipe recebem automaticamente os mesmos padrões de qualidade.
|
|
232
|
-
|
|
233
|
-
```text
|
|
234
|
-
# Nível de projeto — commitado no git, compartilhado com a equipe
|
|
235
|
-
.failproofai/policies/security-policies.mjs
|
|
236
|
-
.failproofai/policies/workflow-policies.mjs
|
|
237
|
-
|
|
238
|
-
# Nível do usuário — pessoal, aplica-se a todos os projetos
|
|
239
|
-
~/.failproofai/policies/my-policies.mjs
|
|
240
|
-
```
|
|
241
|
-
|
|
242
|
-
Ambos os níveis são carregados (união). Os arquivos são carregados em ordem alfabética dentro de cada diretório. Use o prefixo `01-`, `02-`, etc. para controlar a ordem. À medida que sua equipe descobre novos modos de falha, adicione uma política e faça push — todos receberão a atualização no próximo pull. Veja [examples/convention-policies/](examples/convention-policies/) para exemplos prontos para uso.
|
|
243
|
-
|
|
244
|
-
---
|
|
245
|
-
|
|
246
|
-
## Telemetria
|
|
247
|
-
|
|
248
|
-
Failproof AI coleta telemetria de uso anônima via PostHog para entender o uso de recursos. Nenhum conteúdo de sessão, nome de arquivo, entrada de ferramenta ou informação pessoal é enviado.
|
|
249
|
-
|
|
250
|
-
Para desativar:
|
|
251
|
-
|
|
252
|
-
```bash
|
|
253
|
-
FAILPROOFAI_TELEMETRY_DISABLED=1 failproofai
|
|
254
|
-
```
|
|
255
|
-
|
|
256
|
-
---
|
|
257
|
-
|
|
258
|
-
## Documentação
|
|
259
|
-
|
|
260
|
-
| Guia | Descrição |
|
|
261
|
-
|------|-----------|
|
|
262
|
-
| [Primeiros Passos](docs/getting-started.mdx) | Instalação e primeiros passos |
|
|
263
|
-
| [Políticas Integradas](docs/built-in-policies.mdx) | Todas as 30 políticas integradas com parâmetros |
|
|
264
|
-
| [Políticas Personalizadas](docs/custom-policies.mdx) | Escreva suas próprias políticas |
|
|
265
|
-
| [Configuração](docs/configuration.mdx) | Formato do arquivo de configuração e mesclagem de escopos |
|
|
266
|
-
| [Painel](docs/dashboard.mdx) | Monitore sessões e revise a atividade das políticas |
|
|
267
|
-
| [Arquitetura](docs/architecture.mdx) | Como o sistema de hooks funciona |
|
|
268
|
-
| [Testes](docs/testing.mdx) | Executando testes e escrevendo novos |
|
|
269
|
-
|
|
270
|
-
### Execute a documentação localmente
|
|
271
|
-
|
|
272
|
-
```bash
|
|
273
|
-
docker build -f Dockerfile.docs -t failproofai-docs .
|
|
274
|
-
docker run --rm -p 3000:3000 failproofai-docs
|
|
275
|
-
```
|
|
276
|
-
|
|
277
|
-
Abre o site de documentação Mintlify em `http://localhost:3000`. O container detecta alterações se você montar o diretório de docs:
|
|
278
|
-
|
|
279
|
-
```bash
|
|
280
|
-
docker run --rm -p 3000:3000 -v $(pwd)/docs:/app/docs failproofai-docs
|
|
281
|
-
```
|
|
282
|
-
|
|
283
|
-
---
|
|
284
|
-
|
|
285
|
-
## Nota para contribuidores do failproofai
|
|
286
|
-
|
|
287
|
-
O arquivo `.claude/settings.json` deste repositório usa `bun ./bin/failproofai.mjs --hook <EventType>` em vez do comando padrão `npx -y failproofai`. Isso ocorre porque executar `npx -y failproofai` dentro do próprio projeto failproofai cria um conflito de auto-referência.
|
|
288
|
-
|
|
289
|
-
Para todos os outros repositórios, a abordagem recomendada é `npx -y failproofai`, instalada via:
|
|
290
|
-
|
|
291
|
-
```bash
|
|
292
|
-
failproofai policies --install --scope project
|
|
293
|
-
```
|
|
294
|
-
|
|
295
|
-
## Contribuindo
|
|
296
|
-
|
|
297
|
-
Consulte [CONTRIBUTING.md](CONTRIBUTING.md).
|
|
298
|
-
|
|
299
|
-
---
|
|
300
|
-
|
|
301
|
-
## Licença
|
|
302
|
-
|
|
303
|
-
Consulte [LICENSE](LICENSE).
|
|
304
|
-
|
|
305
|
-
---
|
|
306
|
-
|
|
307
|
-
Desenvolvido e mantido pela **ExosphereHost: Reliability Research Lab for Your Agents**. Ajudamos empresas e startups a melhorar a confiabilidade de seus agentes de IA por meio de nossos próprios agentes, softwares e expertise. Saiba mais em [exosphere.host](https://exosphere.host).
|
|
@@ -1,308 +0,0 @@
|
|
|
1
|
-
> **⚠️** This is an auto-generated translation. For the latest version, see the [English README](../../README.md). Community corrections welcome!
|
|
2
|
-
|
|
3
|
-
[🇺🇸 English](../../README.md) | [🇨🇳 简体中文](README.zh.md) | [🇯🇵 日本語](README.ja.md) | [🇰🇷 한국어](README.ko.md) | [🇪🇸 Español](README.es.md) | [🇧🇷 Português](README.pt-br.md) | [🇩🇪 Deutsch](README.de.md) | [🇫🇷 Français](README.fr.md) | **🇷🇺 Русский** | [🇮🇳 हिन्दी](README.hi.md) | [🇹🇷 Türkçe](README.tr.md) | [🇻🇳 Tiếng Việt](README.vi.md) | [🇮🇹 Italiano](README.it.md) | [🇸🇦 العربية](README.ar.md) | [🇮🇱 עברית](README.he.md)
|
|
4
|
-
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
```
|
|
8
|
-
______ _ __ ____ ___ ____
|
|
9
|
-
/ ____/___ _(_) /___ _________ ____ / __/ / | / _/
|
|
10
|
-
/ /_ / __ `/ / / __ \/ ___/ __ \/ __ \/ /_ / /| | / /
|
|
11
|
-
/ __/ / /_/ / / / /_/ / / / /_/ / /_/ / __/ / ___ |_/ /
|
|
12
|
-
/_/ \__,_/_/_/ .___/_/ \____/\____/_/ /_/ |_/___/
|
|
13
|
-
/_/
|
|
14
|
-
```
|
|
15
|
-
|
|
16
|
-
# Failproof AI
|
|
17
|
-
|
|
18
|
-
[](https://befailproof.ai)
|
|
19
|
-
[](https://www.npmjs.com/package/failproofai)
|
|
20
|
-
[](LICENSE)
|
|
21
|
-
[](https://github.com/exospherehost/failproofai/actions)
|
|
22
|
-
[](https://join.slack.com/t/failproofai/shared_invite/zt-3v63b7k5e-O3NBHmj8X6n9gZSGDx6ggQ)
|
|
23
|
-
|
|
24
|
-
**Переводы**: [简体中文](docs/i18n/README.zh.md) | [日本語](docs/i18n/README.ja.md) | [한국어](docs/i18n/README.ko.md) | [Español](docs/i18n/README.es.md) | [Português](docs/i18n/README.pt-br.md) | [Deutsch](docs/i18n/README.de.md) | [Français](docs/i18n/README.fr.md) | [Русский](docs/i18n/README.ru.md) | [हिन्दी](docs/i18n/README.hi.md) | [Türkçe](docs/i18n/README.tr.md) | [Tiếng Việt](docs/i18n/README.vi.md) | [Italiano](docs/i18n/README.it.md) | [العربية](docs/i18n/README.ar.md) | [עברית](docs/i18n/README.he.md)
|
|
25
|
-
|
|
26
|
-
Самый простой способ управления политиками, которые делают ваши ИИ-агенты надежными, сосредоточенными на задачах и работающими автономно — для **Claude Code** и **Agents SDK**.
|
|
27
|
-
|
|
28
|
-
- **30 встроенных политик** — предотвращайте распространённые режимы отказа агентов из коробки. Блокируйте деструктивные команды, предотвращайте утечку секретов, держите агентов в границах проекта, обнаруживайте циклы и многое другое.
|
|
29
|
-
- **Пользовательские политики** — напишите свои собственные правила надежности на JavaScript. Используйте API `allow`/`deny`/`instruct` для соблюдения соглашений, предотвращения дрейфа, ограничения операций или интеграции с внешними системами.
|
|
30
|
-
- **Простая конфигурация** — настраивайте любую политику без написания кода. Устанавливайте списки разрешений, защищённые ветки, пороги для каждого проекта или глобально. Конфигурация с тремя областями объединяется автоматически.
|
|
31
|
-
- **Монитор агентов** — смотрите, что делали ваши агенты во время вашего отсутствия. Просматривайте сессии, проверяйте каждый вызов инструмента и видите, где именно срабатывали политики.
|
|
32
|
-
|
|
33
|
-
Всё работает локально — никакие данные не покидают вашу машину.
|
|
34
|
-
|
|
35
|
-
---
|
|
36
|
-
|
|
37
|
-
## Требования
|
|
38
|
-
|
|
39
|
-
- Node.js >= 20.9.0
|
|
40
|
-
- Bun >= 1.3.0 (опционально — требуется только для разработки / сборки из источника)
|
|
41
|
-
|
|
42
|
-
---
|
|
43
|
-
|
|
44
|
-
## Установка
|
|
45
|
-
|
|
46
|
-
```bash
|
|
47
|
-
npm install -g failproofai
|
|
48
|
-
# или
|
|
49
|
-
bun add -g failproofai
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
---
|
|
53
|
-
|
|
54
|
-
## Быстрый старт
|
|
55
|
-
|
|
56
|
-
### 1. Включите политики глобально
|
|
57
|
-
|
|
58
|
-
```bash
|
|
59
|
-
failproofai policies --install
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
Записывает записи хука в `~/.claude/settings.json`. Claude Code теперь будет вызывать failproofai до и после каждого вызова инструмента.
|
|
63
|
-
|
|
64
|
-
### 2. Запустите панель мониторинга
|
|
65
|
-
|
|
66
|
-
```bash
|
|
67
|
-
failproofai
|
|
68
|
-
```
|
|
69
|
-
|
|
70
|
-
Открывает `http://localhost:8020` — просматривайте сессии, проверяйте логи, управляйте политиками.
|
|
71
|
-
|
|
72
|
-
### 3. Проверьте, что активно
|
|
73
|
-
|
|
74
|
-
```bash
|
|
75
|
-
failproofai policies
|
|
76
|
-
```
|
|
77
|
-
|
|
78
|
-
---
|
|
79
|
-
|
|
80
|
-
## Установка политик
|
|
81
|
-
|
|
82
|
-
### Области действия
|
|
83
|
-
|
|
84
|
-
| Область | Команда | Куда записывается |
|
|
85
|
-
|--------|---------|-----------------|
|
|
86
|
-
| Глобальная (по умолчанию) | `failproofai policies --install` | `~/.claude/settings.json` |
|
|
87
|
-
| Проект | `failproofai policies --install --scope project` | `.claude/settings.json` |
|
|
88
|
-
| Локальная | `failproofai policies --install --scope local` | `.claude/settings.local.json` |
|
|
89
|
-
|
|
90
|
-
### Установка конкретных политик
|
|
91
|
-
|
|
92
|
-
```bash
|
|
93
|
-
failproofai policies --install block-sudo block-rm-rf sanitize-api-keys
|
|
94
|
-
```
|
|
95
|
-
|
|
96
|
-
### Удаление политик
|
|
97
|
-
|
|
98
|
-
```bash
|
|
99
|
-
failproofai policies --uninstall
|
|
100
|
-
# или для конкретной области:
|
|
101
|
-
failproofai policies --uninstall --scope project
|
|
102
|
-
```
|
|
103
|
-
|
|
104
|
-
---
|
|
105
|
-
|
|
106
|
-
## Конфигурация
|
|
107
|
-
|
|
108
|
-
Конфигурация политик находится в `~/.failproofai/policies-config.json` (глобально) или `.failproofai/policies-config.json` в вашем проекте (для каждого проекта).
|
|
109
|
-
|
|
110
|
-
```json
|
|
111
|
-
{
|
|
112
|
-
"enabledPolicies": [
|
|
113
|
-
"block-sudo",
|
|
114
|
-
"block-rm-rf",
|
|
115
|
-
"sanitize-api-keys",
|
|
116
|
-
"block-push-master",
|
|
117
|
-
"block-env-files",
|
|
118
|
-
"block-read-outside-cwd"
|
|
119
|
-
],
|
|
120
|
-
"policyParams": {
|
|
121
|
-
"block-sudo": {
|
|
122
|
-
"allowPatterns": ["sudo systemctl status", "sudo journalctl"],
|
|
123
|
-
"hint": "Используйте apt-get напрямую без sudo."
|
|
124
|
-
},
|
|
125
|
-
"block-push-master": {
|
|
126
|
-
"protectedBranches": ["main", "release", "prod"],
|
|
127
|
-
"hint": "Попробуйте создать свежую ветку вместо этого."
|
|
128
|
-
},
|
|
129
|
-
"sanitize-api-keys": {
|
|
130
|
-
"additionalPatterns": [
|
|
131
|
-
{ "regex": "myco_[A-Za-z0-9]{32}", "label": "MyCo API key" }
|
|
132
|
-
]
|
|
133
|
-
},
|
|
134
|
-
"warn-large-file-write": {
|
|
135
|
-
"thresholdKb": 512
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
```
|
|
140
|
-
|
|
141
|
-
**Три области конфигурации** объединяются автоматически (проект → локальная → глобальная). Полные правила объединения см. в [docs/configuration.mdx](docs/configuration.mdx).
|
|
142
|
-
|
|
143
|
-
---
|
|
144
|
-
|
|
145
|
-
## Встроенные политики
|
|
146
|
-
|
|
147
|
-
| Политика | Описание | Настраивается |
|
|
148
|
-
|--------|-------------|:---:|
|
|
149
|
-
| `block-sudo` | Предотвратить запуск привилегированных системных команд агентами | `allowPatterns` |
|
|
150
|
-
| `block-rm-rf` | Предотвратить случайное рекурсивное удаление файлов | `allowPaths` |
|
|
151
|
-
| `block-curl-pipe-sh` | Предотвратить передачу ненадежных скриптов в оболочку | |
|
|
152
|
-
| `block-failproofai-commands` | Предотвратить самоудаление | |
|
|
153
|
-
| `sanitize-jwt` | Предотвратить утечку JWT-токенов в контекст агента | |
|
|
154
|
-
| `sanitize-api-keys` | Предотвратить утечку ключей API в контекст агента | `additionalPatterns` |
|
|
155
|
-
| `sanitize-connection-strings` | Предотвратить утечку учётных данных БД в контекст агента | |
|
|
156
|
-
| `sanitize-private-key-content` | Скрыть блоки приватных ключей PEM из вывода | |
|
|
157
|
-
| `sanitize-bearer-tokens` | Скрыть токены Bearer авторизации из вывода | |
|
|
158
|
-
| `block-env-files` | Предотвратить чтение файлов .env | |
|
|
159
|
-
| `protect-env-vars` | Предотвратить вывод переменных окружения агентом | |
|
|
160
|
-
| `block-read-outside-cwd` | Держать агентов в границах проекта | `allowPaths` |
|
|
161
|
-
| `block-secrets-write` | Предотвратить запись в файлы приватных ключей и сертификатов | `additionalPatterns` |
|
|
162
|
-
| `block-push-master` | Предотвратить случайные отправки в main/master | `protectedBranches` |
|
|
163
|
-
| `block-work-on-main` | Держать агентов подальше от защищённых веток | `protectedBranches` |
|
|
164
|
-
| `block-force-push` | Предотвратить `git push --force` | |
|
|
165
|
-
| `warn-git-amend` | Напомнить агентам перед изменением коммитов | |
|
|
166
|
-
| `warn-git-stash-drop` | Напомнить агентам перед удалением временных сохранений | |
|
|
167
|
-
| `warn-all-files-staged` | Поймать случайный `git add -A` | |
|
|
168
|
-
| `warn-destructive-sql` | Поймать DROP/DELETE SQL перед выполнением | |
|
|
169
|
-
| `warn-schema-alteration` | Поймать ALTER TABLE перед выполнением | |
|
|
170
|
-
| `warn-large-file-write` | Поймать неожиданно большие записи файлов | `thresholdKb` |
|
|
171
|
-
| `warn-package-publish` | Поймать случайный `npm publish` | |
|
|
172
|
-
| `warn-background-process` | Поймать ненамеренные запуски фоновых процессов | |
|
|
173
|
-
| `warn-global-package-install` | Поймать ненамеренные глобальные установки пакетов | |
|
|
174
|
-
| …и другие | | |
|
|
175
|
-
|
|
176
|
-
Полные детали политик и справка по параметрам: [docs/built-in-policies.mdx](docs/built-in-policies.mdx)
|
|
177
|
-
|
|
178
|
-
---
|
|
179
|
-
|
|
180
|
-
## Пользовательские политики
|
|
181
|
-
|
|
182
|
-
Напишите свои собственные политики, чтобы агенты были надёжными и сосредоточенными на задачах:
|
|
183
|
-
|
|
184
|
-
```js
|
|
185
|
-
import { customPolicies, allow, deny, instruct } from "failproofai";
|
|
186
|
-
|
|
187
|
-
customPolicies.add({
|
|
188
|
-
name: "no-production-writes",
|
|
189
|
-
description: "Блокировать запись в пути, содержащие 'production'",
|
|
190
|
-
match: { events: ["PreToolUse"] },
|
|
191
|
-
fn: async (ctx) => {
|
|
192
|
-
if (!["Write", "Edit"].includes(ctx.toolName ?? "")) return allow();
|
|
193
|
-
const path = ctx.toolInput?.file_path ?? "";
|
|
194
|
-
if (path.includes("production")) return deny("Запись в пути production заблокирована");
|
|
195
|
-
return allow();
|
|
196
|
-
},
|
|
197
|
-
});
|
|
198
|
-
```
|
|
199
|
-
|
|
200
|
-
Установите с помощью:
|
|
201
|
-
|
|
202
|
-
```bash
|
|
203
|
-
failproofai policies --install --custom ./my-policies.js
|
|
204
|
-
```
|
|
205
|
-
|
|
206
|
-
### Вспомогательные функции принятия решений
|
|
207
|
-
|
|
208
|
-
| Функция | Эффект |
|
|
209
|
-
|----------|--------|
|
|
210
|
-
| `allow()` | Разрешить операцию |
|
|
211
|
-
| `allow(message)` | Разрешить и отправить информационный контекст Claude |
|
|
212
|
-
| `deny(message)` | Заблокировать операцию; сообщение показано Claude |
|
|
213
|
-
| `instruct(message)` | Добавить контекст в подсказку Claude; не блокирует |
|
|
214
|
-
|
|
215
|
-
### Объект контекста (`ctx`)
|
|
216
|
-
|
|
217
|
-
| Поле | Тип | Описание |
|
|
218
|
-
|-------|------|-------------|
|
|
219
|
-
| `eventType` | `string` | `"PreToolUse"`, `"PostToolUse"`, `"Notification"`, `"Stop"` |
|
|
220
|
-
| `toolName` | `string` | Вызываемый инструмент (`"Bash"`, `"Write"`, `"Read"`, …) |
|
|
221
|
-
| `toolInput` | `object` | Параметры входа инструмента |
|
|
222
|
-
| `payload` | `object` | Полная исходная полезная нагрузка события |
|
|
223
|
-
| `session.cwd` | `string` | Рабочий каталог сессии Claude Code |
|
|
224
|
-
| `session.sessionId` | `string` | Идентификатор сессии |
|
|
225
|
-
| `session.transcriptPath` | `string` | Путь к файлу стенограммы сессии |
|
|
226
|
-
|
|
227
|
-
Пользовательские хуки поддерживают переходные локальные импорты, async/await и доступ к `process.env`. Ошибки перекрываются открытыми (логируются в `~/.failproofai/hook.log`, встроенные политики продолжают работу). Полное руководство см. в [docs/custom-hooks.mdx](docs/custom-hooks.mdx).
|
|
228
|
-
|
|
229
|
-
### Политики на основе соглашений
|
|
230
|
-
|
|
231
|
-
Поместите файлы `*policies.{js,mjs,ts}` в `.failproofai/policies/` и они будут автоматически загружены — никаких флагов или изменений конфигурации не требуется. Фиксируйте каталог в git и каждый члена команды получит одинаковые стандарты качества автоматически.
|
|
232
|
-
|
|
233
|
-
```text
|
|
234
|
-
# Уровень проекта — зафиксировано в git, общее для команды
|
|
235
|
-
.failproofai/policies/security-policies.mjs
|
|
236
|
-
.failproofai/policies/workflow-policies.mjs
|
|
237
|
-
|
|
238
|
-
# Уровень пользователя — личное, применяется ко всем проектам
|
|
239
|
-
~/.failproofai/policies/my-policies.mjs
|
|
240
|
-
```
|
|
241
|
-
|
|
242
|
-
Оба уровня загружаются (объединение). Файлы загружаются в алфавитном порядке в каждом каталоге. Используйте префиксы `01-`, `02-` и т.д. для управления порядком. По мере того, как ваша команда открывает новые режимы отказа, добавьте политику и отправьте — все получат обновление при следующем pull. См. [examples/convention-policies/](examples/convention-policies/) для готовых к использованию примеров.
|
|
243
|
-
|
|
244
|
-
---
|
|
245
|
-
|
|
246
|
-
## Телеметрия
|
|
247
|
-
|
|
248
|
-
Failproof AI собирает анонимную телеметрию использования через PostHog, чтобы понять использование функций. Содержимое сессии, имена файлов, входные параметры инструментов или личная информация никогда не отправляются.
|
|
249
|
-
|
|
250
|
-
Отключите её:
|
|
251
|
-
|
|
252
|
-
```bash
|
|
253
|
-
FAILPROOFAI_TELEMETRY_DISABLED=1 failproofai
|
|
254
|
-
```
|
|
255
|
-
|
|
256
|
-
---
|
|
257
|
-
|
|
258
|
-
## Документация
|
|
259
|
-
|
|
260
|
-
| Руководство | Описание |
|
|
261
|
-
|-------|-------------|
|
|
262
|
-
| [Getting Started](docs/getting-started.mdx) | Установка и первые шаги |
|
|
263
|
-
| [Built-in Policies](docs/built-in-policies.mdx) | Все 30 встроенных политик с параметрами |
|
|
264
|
-
| [Custom Policies](docs/custom-policies.mdx) | Напишите свои собственные политики |
|
|
265
|
-
| [Configuration](docs/configuration.mdx) | Формат файла конфигурации и объединение областей |
|
|
266
|
-
| [Dashboard](docs/dashboard.mdx) | Мониторинг сессий и проверка активности политик |
|
|
267
|
-
| [Architecture](docs/architecture.mdx) | Как работает система хуков |
|
|
268
|
-
| [Testing](docs/testing.mdx) | Запуск тестов и написание новых |
|
|
269
|
-
|
|
270
|
-
### Запустите документацию локально
|
|
271
|
-
|
|
272
|
-
```bash
|
|
273
|
-
docker build -f Dockerfile.docs -t failproofai-docs .
|
|
274
|
-
docker run --rm -p 3000:3000 failproofai-docs
|
|
275
|
-
```
|
|
276
|
-
|
|
277
|
-
Открывает сайт документации Mintlify на `http://localhost:3000`. Контейнер отслеживает изменения, если вы монтируете каталог документации:
|
|
278
|
-
|
|
279
|
-
```bash
|
|
280
|
-
docker run --rm -p 3000:3000 -v $(pwd)/docs:/app/docs failproofai-docs
|
|
281
|
-
```
|
|
282
|
-
|
|
283
|
-
---
|
|
284
|
-
|
|
285
|
-
## Примечание для участников failproofai
|
|
286
|
-
|
|
287
|
-
`.claude/settings.json` этого репо использует `bun ./bin/failproofai.mjs --hook <EventType>` вместо стандартной команды `npx -y failproofai`. Это потому, что запуск `npx -y failproofai` внутри самого проекта failproofai создаёт конфликт самоссылки.
|
|
288
|
-
|
|
289
|
-
Для всех остальных репо рекомендуемый подход — `npx -y failproofai`, установленный через:
|
|
290
|
-
|
|
291
|
-
```bash
|
|
292
|
-
failproofai policies --install --scope project
|
|
293
|
-
```
|
|
294
|
-
|
|
295
|
-
## Вклад
|
|
296
|
-
|
|
297
|
-
См. [CONTRIBUTING.md](CONTRIBUTING.md).
|
|
298
|
-
|
|
299
|
-
---
|
|
300
|
-
|
|
301
|
-
## Лицензия
|
|
302
|
-
|
|
303
|
-
См. [LICENSE](LICENSE).
|
|
304
|
-
|
|
305
|
-
---
|
|
306
|
-
|
|
307
|
-
Разработано и поддерживается **ExosphereHost: Reliability Research Lab for Your Agents**. Мы помогаем предприятиям и стартапам улучшить надежность своих ИИ-агентов благодаря нашим собственным агентам, программному обеспечению и опыту. Узнайте больше на [exosphere.host](https://exosphere.host).
|
|
308
|
-
```
|