failproofai 0.0.6-beta.3 → 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]__0kyh86x._.js → [root-of-the-server]__0om-5pe._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0w6l33k._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__096k.db._.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/{01pmw1-asbek~.js → 02dqjyv6_9mhq.js} +2 -2
- package/.next/standalone/.next/static/chunks/{051m32nx~n5yr.js → 070orfsl6.xal.js} +1 -1
- package/.next/standalone/.next/static/chunks/0mir9jdxn35~s.css +1 -0
- package/.next/standalone/.next/static/chunks/{0mazj-p-~2kc6.js → 0o547jv-k_k35.js} +1 -1
- package/.next/standalone/.next/static/chunks/0pk2h2.mjxy.m.js +6 -0
- package/.next/standalone/.next/static/chunks/{0l-mu4okl-cj1.js → 0rcwkbh24w38b.js} +1 -1
- package/.next/standalone/.next/static/chunks/{0-dm_9a6nsc2l.js → 140xx_tfr~lm_.js} +1 -1
- package/.next/standalone/.next/static/chunks/{156zca6aewyr-.js → 169_e4dq~1~b6.js} +1 -1
- package/.next/standalone/.next/static/chunks/{0a-yctdwn368y.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/dist/cli.mjs +2 -2
- package/package.json +2 -2
- package/scripts/prune-standalone.mjs +128 -0
- package/.next/standalone/.claude/settings.json +0 -316
- package/.next/standalone/.failproofai/policies/review-policies.mjs +0 -113
- package/.next/standalone/.failproofai/policies/workflow-policies.mjs +0 -63
- package/.next/standalone/.failproofai/policies-config.json +0 -39
- package/.next/standalone/.next/static/chunks/0gu_a.a80ritd.css +0 -1
- package/.next/standalone/.next/static/chunks/0qakntsrpc~1j.js +0 -6
- package/.next/standalone/AGENTS.md +0 -80
- package/.next/standalone/CHANGELOG.md +0 -158
- package/.next/standalone/CLAUDE.md +0 -165
- package/.next/standalone/CONTRIBUTING.md +0 -76
- package/.next/standalone/Dockerfile.docs +0 -12
- package/.next/standalone/LICENSE +0 -42
- package/.next/standalone/README.md +0 -301
- package/.next/standalone/bin/failproofai.mjs +0 -439
- package/.next/standalone/bun.lock +0 -1119
- package/.next/standalone/components.json +0 -23
- package/.next/standalone/dist/cli.mjs +0 -4696
- package/.next/standalone/dist/index.js +0 -80
- package/.next/standalone/docs/ar/architecture.mdx +0 -334
- package/.next/standalone/docs/ar/built-in-policies.mdx +0 -574
- package/.next/standalone/docs/ar/cli/dashboard.mdx +0 -28
- package/.next/standalone/docs/ar/cli/environment-variables.mdx +0 -34
- package/.next/standalone/docs/ar/cli/hook.mdx +0 -31
- package/.next/standalone/docs/ar/cli/install-policies.mdx +0 -48
- package/.next/standalone/docs/ar/cli/list-policies.mdx +0 -31
- package/.next/standalone/docs/ar/cli/remove-policies.mdx +0 -43
- package/.next/standalone/docs/ar/cli/version.mdx +0 -13
- package/.next/standalone/docs/ar/configuration.mdx +0 -223
- package/.next/standalone/docs/ar/custom-policies.mdx +0 -354
- package/.next/standalone/docs/ar/dashboard.mdx +0 -142
- package/.next/standalone/docs/ar/examples.mdx +0 -307
- package/.next/standalone/docs/ar/for-agents.mdx +0 -39
- package/.next/standalone/docs/ar/getting-started.mdx +0 -187
- package/.next/standalone/docs/ar/introduction.mdx +0 -58
- package/.next/standalone/docs/ar/package-aliases.mdx +0 -82
- package/.next/standalone/docs/ar/testing.mdx +0 -261
- package/.next/standalone/docs/architecture.mdx +0 -332
- package/.next/standalone/docs/built-in-policies.mdx +0 -574
- package/.next/standalone/docs/cli/dashboard.mdx +0 -28
- package/.next/standalone/docs/cli/environment-variables.mdx +0 -34
- package/.next/standalone/docs/cli/hook.mdx +0 -30
- package/.next/standalone/docs/cli/install-policies.mdx +0 -47
- package/.next/standalone/docs/cli/list-policies.mdx +0 -31
- package/.next/standalone/docs/cli/remove-policies.mdx +0 -43
- package/.next/standalone/docs/cli/version.mdx +0 -12
- package/.next/standalone/docs/configuration.mdx +0 -222
- package/.next/standalone/docs/custom-policies.mdx +0 -353
- package/.next/standalone/docs/dashboard.mdx +0 -142
- package/.next/standalone/docs/de/architecture.mdx +0 -332
- package/.next/standalone/docs/de/built-in-policies.mdx +0 -574
- package/.next/standalone/docs/de/cli/dashboard.mdx +0 -28
- package/.next/standalone/docs/de/cli/environment-variables.mdx +0 -34
- package/.next/standalone/docs/de/cli/hook.mdx +0 -30
- package/.next/standalone/docs/de/cli/install-policies.mdx +0 -47
- package/.next/standalone/docs/de/cli/list-policies.mdx +0 -31
- package/.next/standalone/docs/de/cli/remove-policies.mdx +0 -43
- package/.next/standalone/docs/de/cli/version.mdx +0 -12
- package/.next/standalone/docs/de/configuration.mdx +0 -222
- package/.next/standalone/docs/de/custom-policies.mdx +0 -353
- package/.next/standalone/docs/de/dashboard.mdx +0 -142
- package/.next/standalone/docs/de/examples.mdx +0 -307
- package/.next/standalone/docs/de/for-agents.mdx +0 -38
- package/.next/standalone/docs/de/getting-started.mdx +0 -186
- package/.next/standalone/docs/de/introduction.mdx +0 -57
- package/.next/standalone/docs/de/package-aliases.mdx +0 -82
- package/.next/standalone/docs/de/testing.mdx +0 -260
- package/.next/standalone/docs/docs.json +0 -1002
- package/.next/standalone/docs/es/architecture.mdx +0 -332
- package/.next/standalone/docs/es/built-in-policies.mdx +0 -574
- package/.next/standalone/docs/es/cli/dashboard.mdx +0 -28
- package/.next/standalone/docs/es/cli/environment-variables.mdx +0 -34
- package/.next/standalone/docs/es/cli/hook.mdx +0 -30
- package/.next/standalone/docs/es/cli/install-policies.mdx +0 -47
- package/.next/standalone/docs/es/cli/list-policies.mdx +0 -31
- package/.next/standalone/docs/es/cli/remove-policies.mdx +0 -43
- package/.next/standalone/docs/es/cli/version.mdx +0 -12
- package/.next/standalone/docs/es/configuration.mdx +0 -222
- package/.next/standalone/docs/es/custom-policies.mdx +0 -353
- package/.next/standalone/docs/es/dashboard.mdx +0 -142
- package/.next/standalone/docs/es/examples.mdx +0 -307
- package/.next/standalone/docs/es/for-agents.mdx +0 -38
- package/.next/standalone/docs/es/getting-started.mdx +0 -186
- package/.next/standalone/docs/es/introduction.mdx +0 -57
- package/.next/standalone/docs/es/package-aliases.mdx +0 -82
- package/.next/standalone/docs/es/testing.mdx +0 -260
- package/.next/standalone/docs/examples.mdx +0 -307
- package/.next/standalone/docs/favicon.ico +0 -0
- package/.next/standalone/docs/for-agents.mdx +0 -38
- package/.next/standalone/docs/fr/architecture.mdx +0 -332
- package/.next/standalone/docs/fr/built-in-policies.mdx +0 -574
- package/.next/standalone/docs/fr/cli/dashboard.mdx +0 -28
- package/.next/standalone/docs/fr/cli/environment-variables.mdx +0 -34
- package/.next/standalone/docs/fr/cli/hook.mdx +0 -30
- package/.next/standalone/docs/fr/cli/install-policies.mdx +0 -47
- package/.next/standalone/docs/fr/cli/list-policies.mdx +0 -31
- package/.next/standalone/docs/fr/cli/remove-policies.mdx +0 -43
- package/.next/standalone/docs/fr/cli/version.mdx +0 -12
- package/.next/standalone/docs/fr/configuration.mdx +0 -222
- package/.next/standalone/docs/fr/custom-policies.mdx +0 -353
- package/.next/standalone/docs/fr/dashboard.mdx +0 -142
- package/.next/standalone/docs/fr/examples.mdx +0 -307
- package/.next/standalone/docs/fr/for-agents.mdx +0 -38
- package/.next/standalone/docs/fr/getting-started.mdx +0 -186
- package/.next/standalone/docs/fr/introduction.mdx +0 -57
- package/.next/standalone/docs/fr/package-aliases.mdx +0 -82
- package/.next/standalone/docs/fr/testing.mdx +0 -260
- package/.next/standalone/docs/getting-started.mdx +0 -186
- package/.next/standalone/docs/he/architecture.mdx +0 -333
- package/.next/standalone/docs/he/built-in-policies.mdx +0 -575
- package/.next/standalone/docs/he/cli/dashboard.mdx +0 -28
- package/.next/standalone/docs/he/cli/environment-variables.mdx +0 -34
- package/.next/standalone/docs/he/cli/hook.mdx +0 -30
- package/.next/standalone/docs/he/cli/install-policies.mdx +0 -47
- package/.next/standalone/docs/he/cli/list-policies.mdx +0 -32
- package/.next/standalone/docs/he/cli/remove-policies.mdx +0 -43
- package/.next/standalone/docs/he/cli/version.mdx +0 -12
- package/.next/standalone/docs/he/configuration.mdx +0 -223
- package/.next/standalone/docs/he/custom-policies.mdx +0 -353
- package/.next/standalone/docs/he/dashboard.mdx +0 -142
- package/.next/standalone/docs/he/examples.mdx +0 -307
- package/.next/standalone/docs/he/for-agents.mdx +0 -38
- package/.next/standalone/docs/he/getting-started.mdx +0 -186
- package/.next/standalone/docs/he/introduction.mdx +0 -57
- package/.next/standalone/docs/he/package-aliases.mdx +0 -82
- package/.next/standalone/docs/he/testing.mdx +0 -260
- package/.next/standalone/docs/hi/architecture.mdx +0 -334
- package/.next/standalone/docs/hi/built-in-policies.mdx +0 -572
- package/.next/standalone/docs/hi/cli/dashboard.mdx +0 -28
- package/.next/standalone/docs/hi/cli/environment-variables.mdx +0 -34
- package/.next/standalone/docs/hi/cli/hook.mdx +0 -30
- package/.next/standalone/docs/hi/cli/install-policies.mdx +0 -47
- package/.next/standalone/docs/hi/cli/list-policies.mdx +0 -31
- package/.next/standalone/docs/hi/cli/remove-policies.mdx +0 -43
- package/.next/standalone/docs/hi/cli/version.mdx +0 -12
- package/.next/standalone/docs/hi/configuration.mdx +0 -222
- package/.next/standalone/docs/hi/custom-policies.mdx +0 -354
- package/.next/standalone/docs/hi/dashboard.mdx +0 -142
- package/.next/standalone/docs/hi/examples.mdx +0 -309
- package/.next/standalone/docs/hi/for-agents.mdx +0 -38
- package/.next/standalone/docs/hi/getting-started.mdx +0 -187
- package/.next/standalone/docs/hi/introduction.mdx +0 -57
- package/.next/standalone/docs/hi/package-aliases.mdx +0 -82
- package/.next/standalone/docs/hi/testing.mdx +0 -260
- package/.next/standalone/docs/i18n/README.ar.md +0 -312
- package/.next/standalone/docs/i18n/README.de.md +0 -307
- package/.next/standalone/docs/i18n/README.es.md +0 -307
- package/.next/standalone/docs/i18n/README.fr.md +0 -307
- package/.next/standalone/docs/i18n/README.he.md +0 -312
- package/.next/standalone/docs/i18n/README.hi.md +0 -307
- package/.next/standalone/docs/i18n/README.it.md +0 -307
- package/.next/standalone/docs/i18n/README.ja.md +0 -307
- package/.next/standalone/docs/i18n/README.ko.md +0 -307
- package/.next/standalone/docs/i18n/README.pt-br.md +0 -307
- package/.next/standalone/docs/i18n/README.ru.md +0 -308
- package/.next/standalone/docs/i18n/README.tr.md +0 -307
- package/.next/standalone/docs/i18n/README.vi.md +0 -307
- package/.next/standalone/docs/i18n/README.zh.md +0 -307
- package/.next/standalone/docs/introduction.mdx +0 -57
- package/.next/standalone/docs/it/architecture.mdx +0 -334
- package/.next/standalone/docs/it/built-in-policies.mdx +0 -574
- package/.next/standalone/docs/it/cli/dashboard.mdx +0 -28
- package/.next/standalone/docs/it/cli/environment-variables.mdx +0 -34
- package/.next/standalone/docs/it/cli/hook.mdx +0 -30
- package/.next/standalone/docs/it/cli/install-policies.mdx +0 -47
- package/.next/standalone/docs/it/cli/list-policies.mdx +0 -31
- package/.next/standalone/docs/it/cli/remove-policies.mdx +0 -43
- package/.next/standalone/docs/it/cli/version.mdx +0 -12
- package/.next/standalone/docs/it/configuration.mdx +0 -222
- package/.next/standalone/docs/it/custom-policies.mdx +0 -353
- package/.next/standalone/docs/it/dashboard.mdx +0 -142
- package/.next/standalone/docs/it/examples.mdx +0 -307
- package/.next/standalone/docs/it/for-agents.mdx +0 -38
- package/.next/standalone/docs/it/getting-started.mdx +0 -186
- package/.next/standalone/docs/it/introduction.mdx +0 -57
- package/.next/standalone/docs/it/package-aliases.mdx +0 -82
- package/.next/standalone/docs/it/testing.mdx +0 -260
- package/.next/standalone/docs/ja/architecture.mdx +0 -332
- package/.next/standalone/docs/ja/built-in-policies.mdx +0 -572
- package/.next/standalone/docs/ja/cli/dashboard.mdx +0 -28
- package/.next/standalone/docs/ja/cli/environment-variables.mdx +0 -34
- package/.next/standalone/docs/ja/cli/hook.mdx +0 -30
- package/.next/standalone/docs/ja/cli/install-policies.mdx +0 -47
- package/.next/standalone/docs/ja/cli/list-policies.mdx +0 -31
- package/.next/standalone/docs/ja/cli/remove-policies.mdx +0 -43
- package/.next/standalone/docs/ja/cli/version.mdx +0 -12
- package/.next/standalone/docs/ja/configuration.mdx +0 -222
- package/.next/standalone/docs/ja/custom-policies.mdx +0 -353
- package/.next/standalone/docs/ja/dashboard.mdx +0 -142
- package/.next/standalone/docs/ja/examples.mdx +0 -307
- package/.next/standalone/docs/ja/for-agents.mdx +0 -38
- package/.next/standalone/docs/ja/getting-started.mdx +0 -186
- package/.next/standalone/docs/ja/introduction.mdx +0 -57
- package/.next/standalone/docs/ja/package-aliases.mdx +0 -82
- package/.next/standalone/docs/ja/testing.mdx +0 -260
- package/.next/standalone/docs/ko/architecture.mdx +0 -332
- package/.next/standalone/docs/ko/built-in-policies.mdx +0 -572
- package/.next/standalone/docs/ko/cli/dashboard.mdx +0 -28
- package/.next/standalone/docs/ko/cli/environment-variables.mdx +0 -34
- package/.next/standalone/docs/ko/cli/hook.mdx +0 -30
- package/.next/standalone/docs/ko/cli/install-policies.mdx +0 -47
- package/.next/standalone/docs/ko/cli/list-policies.mdx +0 -31
- package/.next/standalone/docs/ko/cli/remove-policies.mdx +0 -43
- package/.next/standalone/docs/ko/cli/version.mdx +0 -12
- package/.next/standalone/docs/ko/configuration.mdx +0 -222
- package/.next/standalone/docs/ko/custom-policies.mdx +0 -353
- package/.next/standalone/docs/ko/dashboard.mdx +0 -142
- package/.next/standalone/docs/ko/examples.mdx +0 -307
- package/.next/standalone/docs/ko/for-agents.mdx +0 -38
- package/.next/standalone/docs/ko/getting-started.mdx +0 -186
- package/.next/standalone/docs/ko/introduction.mdx +0 -57
- package/.next/standalone/docs/ko/package-aliases.mdx +0 -82
- package/.next/standalone/docs/ko/testing.mdx +0 -260
- package/.next/standalone/docs/logo/dark.svg +0 -21
- package/.next/standalone/docs/logo/exosphere-dark.png +0 -0
- package/.next/standalone/docs/logo/exosphere-light.png +0 -0
- package/.next/standalone/docs/logo/light.svg +0 -21
- package/.next/standalone/docs/package-aliases.mdx +0 -82
- package/.next/standalone/docs/pt-br/architecture.mdx +0 -332
- package/.next/standalone/docs/pt-br/built-in-policies.mdx +0 -574
- package/.next/standalone/docs/pt-br/cli/dashboard.mdx +0 -28
- package/.next/standalone/docs/pt-br/cli/environment-variables.mdx +0 -34
- package/.next/standalone/docs/pt-br/cli/hook.mdx +0 -30
- package/.next/standalone/docs/pt-br/cli/install-policies.mdx +0 -47
- package/.next/standalone/docs/pt-br/cli/list-policies.mdx +0 -31
- package/.next/standalone/docs/pt-br/cli/remove-policies.mdx +0 -43
- package/.next/standalone/docs/pt-br/cli/version.mdx +0 -12
- package/.next/standalone/docs/pt-br/configuration.mdx +0 -222
- package/.next/standalone/docs/pt-br/custom-policies.mdx +0 -353
- package/.next/standalone/docs/pt-br/dashboard.mdx +0 -142
- package/.next/standalone/docs/pt-br/examples.mdx +0 -307
- package/.next/standalone/docs/pt-br/for-agents.mdx +0 -38
- package/.next/standalone/docs/pt-br/getting-started.mdx +0 -186
- package/.next/standalone/docs/pt-br/introduction.mdx +0 -57
- package/.next/standalone/docs/pt-br/package-aliases.mdx +0 -82
- package/.next/standalone/docs/pt-br/testing.mdx +0 -260
- package/.next/standalone/docs/ru/architecture.mdx +0 -333
- package/.next/standalone/docs/ru/built-in-policies.mdx +0 -574
- package/.next/standalone/docs/ru/cli/dashboard.mdx +0 -28
- package/.next/standalone/docs/ru/cli/environment-variables.mdx +0 -34
- package/.next/standalone/docs/ru/cli/hook.mdx +0 -30
- package/.next/standalone/docs/ru/cli/install-policies.mdx +0 -48
- package/.next/standalone/docs/ru/cli/list-policies.mdx +0 -32
- package/.next/standalone/docs/ru/cli/remove-policies.mdx +0 -43
- package/.next/standalone/docs/ru/cli/version.mdx +0 -12
- package/.next/standalone/docs/ru/configuration.mdx +0 -222
- package/.next/standalone/docs/ru/custom-policies.mdx +0 -354
- package/.next/standalone/docs/ru/dashboard.mdx +0 -142
- package/.next/standalone/docs/ru/examples.mdx +0 -309
- package/.next/standalone/docs/ru/for-agents.mdx +0 -38
- package/.next/standalone/docs/ru/getting-started.mdx +0 -186
- package/.next/standalone/docs/ru/introduction.mdx +0 -57
- package/.next/standalone/docs/ru/package-aliases.mdx +0 -82
- package/.next/standalone/docs/ru/testing.mdx +0 -260
- package/.next/standalone/docs/testing.mdx +0 -260
- package/.next/standalone/docs/tr/architecture.mdx +0 -333
- package/.next/standalone/docs/tr/built-in-policies.mdx +0 -574
- package/.next/standalone/docs/tr/cli/dashboard.mdx +0 -28
- package/.next/standalone/docs/tr/cli/environment-variables.mdx +0 -34
- package/.next/standalone/docs/tr/cli/hook.mdx +0 -30
- package/.next/standalone/docs/tr/cli/install-policies.mdx +0 -47
- package/.next/standalone/docs/tr/cli/list-policies.mdx +0 -31
- package/.next/standalone/docs/tr/cli/remove-policies.mdx +0 -44
- package/.next/standalone/docs/tr/cli/version.mdx +0 -12
- package/.next/standalone/docs/tr/configuration.mdx +0 -222
- package/.next/standalone/docs/tr/custom-policies.mdx +0 -353
- package/.next/standalone/docs/tr/dashboard.mdx +0 -142
- package/.next/standalone/docs/tr/examples.mdx +0 -308
- package/.next/standalone/docs/tr/for-agents.mdx +0 -38
- package/.next/standalone/docs/tr/getting-started.mdx +0 -186
- package/.next/standalone/docs/tr/introduction.mdx +0 -57
- package/.next/standalone/docs/tr/package-aliases.mdx +0 -82
- package/.next/standalone/docs/tr/testing.mdx +0 -260
- package/.next/standalone/docs/vi/architecture.mdx +0 -334
- package/.next/standalone/docs/vi/built-in-policies.mdx +0 -572
- package/.next/standalone/docs/vi/cli/dashboard.mdx +0 -28
- package/.next/standalone/docs/vi/cli/environment-variables.mdx +0 -34
- package/.next/standalone/docs/vi/cli/hook.mdx +0 -30
- package/.next/standalone/docs/vi/cli/install-policies.mdx +0 -47
- package/.next/standalone/docs/vi/cli/list-policies.mdx +0 -31
- package/.next/standalone/docs/vi/cli/remove-policies.mdx +0 -43
- package/.next/standalone/docs/vi/cli/version.mdx +0 -13
- package/.next/standalone/docs/vi/configuration.mdx +0 -222
- package/.next/standalone/docs/vi/custom-policies.mdx +0 -353
- package/.next/standalone/docs/vi/dashboard.mdx +0 -142
- package/.next/standalone/docs/vi/examples.mdx +0 -308
- package/.next/standalone/docs/vi/for-agents.mdx +0 -38
- package/.next/standalone/docs/vi/getting-started.mdx +0 -186
- package/.next/standalone/docs/vi/introduction.mdx +0 -57
- package/.next/standalone/docs/vi/package-aliases.mdx +0 -82
- package/.next/standalone/docs/vi/testing.mdx +0 -260
- package/.next/standalone/docs/zh/architecture.mdx +0 -332
- package/.next/standalone/docs/zh/built-in-policies.mdx +0 -570
- package/.next/standalone/docs/zh/cli/dashboard.mdx +0 -28
- package/.next/standalone/docs/zh/cli/environment-variables.mdx +0 -34
- package/.next/standalone/docs/zh/cli/hook.mdx +0 -30
- package/.next/standalone/docs/zh/cli/install-policies.mdx +0 -47
- package/.next/standalone/docs/zh/cli/list-policies.mdx +0 -31
- package/.next/standalone/docs/zh/cli/remove-policies.mdx +0 -43
- package/.next/standalone/docs/zh/cli/version.mdx +0 -12
- package/.next/standalone/docs/zh/configuration.mdx +0 -222
- package/.next/standalone/docs/zh/custom-policies.mdx +0 -353
- package/.next/standalone/docs/zh/dashboard.mdx +0 -142
- package/.next/standalone/docs/zh/examples.mdx +0 -307
- package/.next/standalone/docs/zh/for-agents.mdx +0 -38
- package/.next/standalone/docs/zh/getting-started.mdx +0 -186
- package/.next/standalone/docs/zh/introduction.mdx +0 -57
- package/.next/standalone/docs/zh/package-aliases.mdx +0 -82
- package/.next/standalone/docs/zh/testing.mdx +0 -260
- package/.next/standalone/eslint.config.mjs +0 -15
- package/.next/standalone/examples/convention-policies/security-policies.mjs +0 -40
- package/.next/standalone/examples/convention-policies/workflow-policies.mjs +0 -41
- package/.next/standalone/examples/policies-advanced/index.js +0 -103
- package/.next/standalone/examples/policies-advanced/utils.js +0 -35
- package/.next/standalone/examples/policies-basic.js +0 -77
- package/.next/standalone/examples/policies-notification.js +0 -104
- package/.next/standalone/node_modules/@img/colour/color.cjs +0 -1594
- package/.next/standalone/node_modules/@img/colour/index.cjs +0 -1
- package/.next/standalone/node_modules/@img/colour/package.json +0 -45
- package/.next/standalone/node_modules/@img/sharp-libvips-linux-x64/README.md +0 -46
- package/.next/standalone/node_modules/@img/sharp-libvips-linux-x64/lib/glib-2.0/include/glibconfig.h +0 -221
- package/.next/standalone/node_modules/@img/sharp-libvips-linux-x64/lib/index.js +0 -1
- package/.next/standalone/node_modules/@img/sharp-libvips-linux-x64/lib/libvips-cpp.so.8.17.3 +0 -0
- package/.next/standalone/node_modules/@img/sharp-libvips-linux-x64/package.json +0 -42
- package/.next/standalone/node_modules/@img/sharp-libvips-linux-x64/versions.json +0 -30
- package/.next/standalone/node_modules/@img/sharp-libvips-linuxmusl-x64/README.md +0 -46
- package/.next/standalone/node_modules/@img/sharp-libvips-linuxmusl-x64/lib/glib-2.0/include/glibconfig.h +0 -221
- package/.next/standalone/node_modules/@img/sharp-libvips-linuxmusl-x64/lib/index.js +0 -1
- package/.next/standalone/node_modules/@img/sharp-libvips-linuxmusl-x64/lib/libvips-cpp.so.8.17.3 +0 -0
- package/.next/standalone/node_modules/@img/sharp-libvips-linuxmusl-x64/package.json +0 -42
- package/.next/standalone/node_modules/@img/sharp-libvips-linuxmusl-x64/versions.json +0 -30
- package/.next/standalone/node_modules/@img/sharp-linux-x64/lib/sharp-linux-x64.node +0 -0
- package/.next/standalone/node_modules/@img/sharp-linux-x64/package.json +0 -46
- package/.next/standalone/node_modules/@img/sharp-linuxmusl-x64/lib/sharp-linuxmusl-x64.node +0 -0
- package/.next/standalone/node_modules/@img/sharp-linuxmusl-x64/package.json +0 -46
- package/.next/standalone/node_modules/detect-libc/lib/detect-libc.js +0 -313
- package/.next/standalone/node_modules/detect-libc/lib/elf.js +0 -39
- package/.next/standalone/node_modules/detect-libc/lib/filesystem.js +0 -51
- package/.next/standalone/node_modules/detect-libc/lib/process.js +0 -24
- package/.next/standalone/node_modules/detect-libc/package.json +0 -44
- package/.next/standalone/node_modules/sharp/lib/channel.js +0 -177
- package/.next/standalone/node_modules/sharp/lib/colour.js +0 -195
- package/.next/standalone/node_modules/sharp/lib/composite.js +0 -212
- package/.next/standalone/node_modules/sharp/lib/constructor.js +0 -499
- package/.next/standalone/node_modules/sharp/lib/index.js +0 -16
- package/.next/standalone/node_modules/sharp/lib/input.js +0 -809
- package/.next/standalone/node_modules/sharp/lib/is.js +0 -143
- package/.next/standalone/node_modules/sharp/lib/libvips.js +0 -207
- package/.next/standalone/node_modules/sharp/lib/operation.js +0 -1016
- package/.next/standalone/node_modules/sharp/lib/output.js +0 -1666
- package/.next/standalone/node_modules/sharp/lib/resize.js +0 -595
- package/.next/standalone/node_modules/sharp/lib/sharp.js +0 -121
- package/.next/standalone/node_modules/sharp/lib/utility.js +0 -291
- package/.next/standalone/node_modules/sharp/node_modules/semver/classes/comparator.js +0 -143
- package/.next/standalone/node_modules/sharp/node_modules/semver/classes/range.js +0 -557
- package/.next/standalone/node_modules/sharp/node_modules/semver/classes/semver.js +0 -333
- package/.next/standalone/node_modules/sharp/node_modules/semver/functions/cmp.js +0 -54
- package/.next/standalone/node_modules/sharp/node_modules/semver/functions/coerce.js +0 -62
- package/.next/standalone/node_modules/sharp/node_modules/semver/functions/compare.js +0 -7
- package/.next/standalone/node_modules/sharp/node_modules/semver/functions/eq.js +0 -5
- package/.next/standalone/node_modules/sharp/node_modules/semver/functions/gt.js +0 -5
- package/.next/standalone/node_modules/sharp/node_modules/semver/functions/gte.js +0 -5
- package/.next/standalone/node_modules/sharp/node_modules/semver/functions/lt.js +0 -5
- package/.next/standalone/node_modules/sharp/node_modules/semver/functions/lte.js +0 -5
- package/.next/standalone/node_modules/sharp/node_modules/semver/functions/neq.js +0 -5
- package/.next/standalone/node_modules/sharp/node_modules/semver/functions/parse.js +0 -18
- package/.next/standalone/node_modules/sharp/node_modules/semver/functions/satisfies.js +0 -12
- package/.next/standalone/node_modules/sharp/node_modules/semver/internal/constants.js +0 -37
- package/.next/standalone/node_modules/sharp/node_modules/semver/internal/debug.js +0 -11
- package/.next/standalone/node_modules/sharp/node_modules/semver/internal/identifiers.js +0 -29
- package/.next/standalone/node_modules/sharp/node_modules/semver/internal/lrucache.js +0 -42
- package/.next/standalone/node_modules/sharp/node_modules/semver/internal/parse-options.js +0 -17
- package/.next/standalone/node_modules/sharp/node_modules/semver/internal/re.js +0 -223
- package/.next/standalone/node_modules/sharp/node_modules/semver/package.json +0 -78
- package/.next/standalone/node_modules/sharp/package.json +0 -202
- package/.next/standalone/scripts/alias-proxy.js +0 -18
- package/.next/standalone/scripts/dev.ts +0 -3
- package/.next/standalone/scripts/install-telemetry.mjs +0 -108
- package/.next/standalone/scripts/launch.ts +0 -83
- package/.next/standalone/scripts/parse-script-args.ts +0 -87
- package/.next/standalone/scripts/postinstall.mjs +0 -121
- package/.next/standalone/scripts/preuninstall.mjs +0 -131
- package/.next/standalone/scripts/publish-aliases.mjs +0 -87
- package/.next/standalone/scripts/start.ts +0 -3
- package/.next/standalone/scripts/sync-hook-events-prompt.md +0 -60
- package/.next/standalone/scripts/translate-docs/cache.ts +0 -62
- package/.next/standalone/scripts/translate-docs/cli.ts +0 -357
- package/.next/standalone/scripts/translate-docs/config.ts +0 -248
- package/.next/standalone/scripts/translate-docs/mdx-translator.ts +0 -153
- package/.next/standalone/scripts/translate-docs/mintlify-nav.ts +0 -107
- package/.next/standalone/scripts/translate-docs/readme-translator.ts +0 -154
- package/.next/standalone/scripts/translate-docs/translator.ts +0 -68
- package/.next/standalone/scripts/translate-docs/types.ts +0 -43
- package/.next/standalone/src/auth/login.ts +0 -104
- package/.next/standalone/src/auth/logout.ts +0 -50
- package/.next/standalone/src/auth/token-store.ts +0 -64
- package/.next/standalone/src/cli-error.ts +0 -18
- package/.next/standalone/src/hooks/builtin-policies.ts +0 -1615
- package/.next/standalone/src/hooks/custom-hooks-loader.ts +0 -205
- package/.next/standalone/src/hooks/custom-hooks-registry.ts +0 -30
- package/.next/standalone/src/hooks/handler.ts +0 -222
- package/.next/standalone/src/hooks/hook-activity-store.ts +0 -349
- package/.next/standalone/src/hooks/hook-logger.ts +0 -133
- package/.next/standalone/src/hooks/hook-telemetry.ts +0 -43
- package/.next/standalone/src/hooks/hooks-config.ts +0 -166
- package/.next/standalone/src/hooks/install-prompt.ts +0 -357
- package/.next/standalone/src/hooks/llm-client.ts +0 -90
- package/.next/standalone/src/hooks/loader-utils.ts +0 -178
- package/.next/standalone/src/hooks/manager.ts +0 -692
- package/.next/standalone/src/hooks/policy-evaluator.ts +0 -224
- package/.next/standalone/src/hooks/policy-helpers.ts +0 -16
- package/.next/standalone/src/hooks/policy-registry.ts +0 -90
- package/.next/standalone/src/hooks/policy-types.ts +0 -77
- package/.next/standalone/src/hooks/types.ts +0 -63
- package/.next/standalone/src/index.ts +0 -19
- package/.next/standalone/src/posthog-key.ts +0 -5
- package/.next/standalone/src/relay/daemon.ts +0 -362
- package/.next/standalone/src/relay/pid.ts +0 -76
- package/.next/standalone/src/relay/queue.ts +0 -225
- package/.next/standalone/tailwind.config.ts +0 -11
- package/.next/standalone/tsconfig.json +0 -42
- package/.next/standalone/vitest.config.e2e.mts +0 -24
- package/.next/standalone/vitest.config.mts +0 -23
- /package/.next/standalone/.next/static/{r-wX0MuAfCjbhJm3phQc8 → wOkJXoch1UmRAmyIuKZWc}/_buildManifest.js +0 -0
- /package/.next/standalone/.next/static/{r-wX0MuAfCjbhJm3phQc8 → wOkJXoch1UmRAmyIuKZWc}/_clientMiddlewareManifest.js +0 -0
- /package/.next/standalone/.next/static/{r-wX0MuAfCjbhJm3phQc8 → wOkJXoch1UmRAmyIuKZWc}/_ssgManifest.js +0 -0
|
@@ -1,353 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: Chính sách tùy chỉnh
|
|
3
|
-
description: "Viết các quy tắc của riêng bạn bằng JavaScript - thực thi quy ước, ngăn chặn sự trôi dạt, phát hiện lỗi, tích hợp với các hệ thống bên ngoài"
|
|
4
|
-
icon: code
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
Chính sách tùy chỉnh cho phép bạn viết các quy tắc cho bất kỳ hành vi nào của agent: thực thi quy ước dự án, ngăn chặn sự trôi dạt, kiểm soát các hoạt động tàn phá, phát hiện agent bị mắc kẹt, hoặc tích hợp với Slack, quy trình phê duyệt, và nhiều hơn nữa. Chúng sử dụng cùng một hệ thống hook event và các quyết định `allow`, `deny`, `instruct` như các chính sách tích hợp.
|
|
8
|
-
|
|
9
|
-
---
|
|
10
|
-
|
|
11
|
-
## Ví dụ nhanh
|
|
12
|
-
|
|
13
|
-
```js
|
|
14
|
-
// my-policies.js
|
|
15
|
-
import { customPolicies, allow, deny, instruct } from "failproofai";
|
|
16
|
-
|
|
17
|
-
customPolicies.add({
|
|
18
|
-
name: "no-production-writes",
|
|
19
|
-
description: "Block writes to paths containing 'production'",
|
|
20
|
-
match: { events: ["PreToolUse"] },
|
|
21
|
-
fn: async (ctx) => {
|
|
22
|
-
if (ctx.toolName !== "Write" && ctx.toolName !== "Edit") return allow();
|
|
23
|
-
const path = ctx.toolInput?.file_path ?? "";
|
|
24
|
-
if (path.includes("production")) {
|
|
25
|
-
return deny("Writes to production paths are blocked");
|
|
26
|
-
}
|
|
27
|
-
return allow();
|
|
28
|
-
},
|
|
29
|
-
});
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
Cài đặt nó:
|
|
33
|
-
|
|
34
|
-
```bash
|
|
35
|
-
failproofai policies --install --custom ./my-policies.js
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
---
|
|
39
|
-
|
|
40
|
-
## Hai cách để tải chính sách tùy chỉnh
|
|
41
|
-
|
|
42
|
-
### Tùy chọn 1: Dựa trên quy ước (được khuyến nghị)
|
|
43
|
-
|
|
44
|
-
Thả các tệp `*policies.{js,mjs,ts}` vào `.failproofai/policies/` và chúng sẽ được tải tự động — không cần cờ hoặc thay đổi cấu hình. Điều này hoạt động giống như git hooks: thả một tệp, nó sẽ hoạt động.
|
|
45
|
-
|
|
46
|
-
```
|
|
47
|
-
# Cấp độ dự án — được commit vào git, chia sẻ với nhóm
|
|
48
|
-
.failproofai/policies/security-policies.mjs
|
|
49
|
-
.failproofai/policies/workflow-policies.mjs
|
|
50
|
-
|
|
51
|
-
# Cấp độ người dùng — cá nhân, áp dụng cho tất cả các dự án
|
|
52
|
-
~/.failproofai/policies/my-policies.mjs
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
**Cách nó hoạt động:**
|
|
56
|
-
- Cả thư mục dự án và thư mục người dùng đều được quét (kết hợp — không phải first-scope-wins)
|
|
57
|
-
- Các tệp được tải theo thứ tự bảng chữ cái trong mỗi thư mục. Sử dụng tiền tố `01-`, `02-` để kiểm soát thứ tự
|
|
58
|
-
- Chỉ các tệp khớp với `*policies.{js,mjs,ts}` được tải; các tệp khác bị bỏ qua
|
|
59
|
-
- Mỗi tệp được tải độc lập (fail-open cho mỗi tệp)
|
|
60
|
-
- Hoạt động cùng với các chính sách `--custom` rõ ràng và chính sách tích hợp
|
|
61
|
-
|
|
62
|
-
<Tip>
|
|
63
|
-
Chính sách quy ước là cách dễ nhất để xây dựng một tiêu chuẩn chất lượng cho tổ chức của bạn. Commit `.failproofai/policies/` vào git và mỗi thành viên nhóm sẽ tự động nhận được các quy tắc tương tự — không cần thiết lập trên mỗi nhà phát triển. Khi nhóm của bạn khám phá ra các chế độ lỗi mới, hãy thêm một chính sách và push. Theo thời gian, những quy tắc này trở thành một tiêu chuẩn chất lượng sống động liên tục cải thiện với mỗi đóng góp.
|
|
64
|
-
</Tip>
|
|
65
|
-
|
|
66
|
-
### Tùy chọn 2: Đường dẫn tệp rõ ràng
|
|
67
|
-
|
|
68
|
-
```bash
|
|
69
|
-
# Cài đặt với một tệp chính sách tùy chỉnh
|
|
70
|
-
failproofai policies --install --custom ./my-policies.js
|
|
71
|
-
|
|
72
|
-
# Thay thế đường dẫn tệp chính sách
|
|
73
|
-
failproofai policies --install --custom ./new-policies.js
|
|
74
|
-
|
|
75
|
-
# Xóa đường dẫn chính sách tùy chỉnh khỏi cấu hình
|
|
76
|
-
failproofai policies --uninstall --custom
|
|
77
|
-
```
|
|
78
|
-
|
|
79
|
-
Đường dẫn tuyệt đối đã giải quyết được lưu trữ trong `policies-config.json` dưới dạng `customPoliciesPath`. Tệp được tải mới trên mỗi hook event - không có bộ nhớ đệm giữa các sự kiện.
|
|
80
|
-
|
|
81
|
-
### Sử dụng cả hai cùng nhau
|
|
82
|
-
|
|
83
|
-
Chính sách quy ước và tệp `--custom` rõ ràng có thể coexist. Thứ tự tải:
|
|
84
|
-
|
|
85
|
-
1. Tệp `customPoliciesPath` rõ ràng (nếu được cấu hình)
|
|
86
|
-
2. Tệp quy ước dự án (`{cwd}/.failproofai/policies/`, theo thứ tự bảng chữ cái)
|
|
87
|
-
3. Tệp quy ước người dùng (`~/.failproofai/policies/`, theo thứ tự bảng chữ cái)
|
|
88
|
-
|
|
89
|
-
---
|
|
90
|
-
|
|
91
|
-
## API
|
|
92
|
-
|
|
93
|
-
### Import
|
|
94
|
-
|
|
95
|
-
```js
|
|
96
|
-
import { customPolicies, allow, deny, instruct } from "failproofai";
|
|
97
|
-
```
|
|
98
|
-
|
|
99
|
-
### `customPolicies.add(hook)`
|
|
100
|
-
|
|
101
|
-
Đăng ký một chính sách. Gọi hàm này bao nhiêu lần tùy ý cho nhiều chính sách trong cùng một tệp.
|
|
102
|
-
|
|
103
|
-
```ts
|
|
104
|
-
customPolicies.add({
|
|
105
|
-
name: string; // required - unique identifier
|
|
106
|
-
description?: string; // shown in `failproofai policies` output
|
|
107
|
-
match?: { events?: HookEventType[] }; // filter by event type; omit to match all
|
|
108
|
-
fn: (ctx: PolicyContext) => PolicyResult | Promise<PolicyResult>;
|
|
109
|
-
});
|
|
110
|
-
```
|
|
111
|
-
|
|
112
|
-
### Các trợ giúp quyết định
|
|
113
|
-
|
|
114
|
-
| Hàm | Tác dụng | Sử dụng khi |
|
|
115
|
-
|----------|--------|----------|
|
|
116
|
-
| `allow()` | Cho phép hoạt động im lặng | Hành động là an toàn, không cần tin nhắn |
|
|
117
|
-
| `deny(message)` | Chặn hoạt động | Agent không nên thực hiện hành động này |
|
|
118
|
-
| `instruct(message)` | Thêm ngữ cảnh mà không chặn | Cung cấp cho agent ngữ cảnh bổ sung để giữ đúng hướng |
|
|
119
|
-
|
|
120
|
-
`deny(message)` - tin nhắn xuất hiện cho Claude với tiền tố `"Blocked by failproofai:"`. Một `deny` duy nhất sẽ ngắn mạch tất cả đánh giá tiếp theo.
|
|
121
|
-
|
|
122
|
-
`instruct(message)` - tin nhắn được thêm vào ngữ cảnh của Claude cho lệnh gọi công cụ hiện tại. Tất cả các tin nhắn `instruct` được tích lũy và cung cấp cùng nhau.
|
|
123
|
-
|
|
124
|
-
<Tip>
|
|
125
|
-
Bạn có thể thêm hướng dẫn bổ sung vào bất kỳ tin nhắn `deny` hoặc `instruct` nào bằng cách thêm trường `hint` trong `policyParams` — không cần thay đổi mã. Điều này hoạt động với chính sách tùy chỉnh (`custom/`), quy ước dự án (`.failproofai-project/`), và quy ước người dùng (`.failproofai-user/`) cũng vậy. Xem [Configuration → hint](/vi/configuration#hint-cross-cutting) để biết thêm chi tiết.
|
|
126
|
-
</Tip>
|
|
127
|
-
|
|
128
|
-
### Tin nhắn cho phép thông tin
|
|
129
|
-
|
|
130
|
-
`allow(message)` cho phép hoạt động **và** gửi một tin nhắn thông tin trở lại Claude. Tin nhắn được cung cấp dưới dạng `additionalContext` trong phản hồi stdout của trình xử lý hook — cơ chế tương tự được sử dụng bởi `instruct`, nhưng về mặt ngữ nghĩa khác: nó là một cập nhật trạng thái, không phải một cảnh báo.
|
|
131
|
-
|
|
132
|
-
| Hàm | Tác dụng | Sử dụng khi |
|
|
133
|
-
|----------|--------|----------|
|
|
134
|
-
| `allow(message)` | Cho phép và gửi ngữ cảnh cho Claude | Xác nhận một kiểm tra đã vượt qua, hoặc giải thích tại sao một kiểm tra bị bỏ qua |
|
|
135
|
-
|
|
136
|
-
Các trường hợp sử dụng:
|
|
137
|
-
- **Xác nhận trạng thái:** `allow("All CI checks passed.")` — cho Claude biết mọi thứ đều ổn
|
|
138
|
-
- **Giải thích fail-open:** `allow("GitHub CLI not installed, skipping CI check.")` — cho Claude biết tại sao một kiểm tra bị bỏ qua để nó có bối cảnh đầy đủ
|
|
139
|
-
- **Nhiều tin nhắn tích lũy:** nếu nhiều chính sách mỗi cái trả về `allow(message)`, tất cả các tin nhắn được kết hợp với ngắt dòng và cung cấp cùng nhau
|
|
140
|
-
|
|
141
|
-
```js
|
|
142
|
-
customPolicies.add({
|
|
143
|
-
name: "confirm-branch-status",
|
|
144
|
-
match: { events: ["Stop"] },
|
|
145
|
-
fn: async (ctx) => {
|
|
146
|
-
const cwd = ctx.session?.cwd;
|
|
147
|
-
if (!cwd) return allow("No working directory, skipping branch check.");
|
|
148
|
-
|
|
149
|
-
// ... check branch status ...
|
|
150
|
-
if (allPushed) {
|
|
151
|
-
return allow("Branch is up to date with remote.");
|
|
152
|
-
}
|
|
153
|
-
return deny("Unpushed changes detected.");
|
|
154
|
-
},
|
|
155
|
-
});
|
|
156
|
-
```
|
|
157
|
-
|
|
158
|
-
### Các trường `PolicyContext`
|
|
159
|
-
|
|
160
|
-
| Trường | Loại | Mô tả |
|
|
161
|
-
|-------|------|-------------|
|
|
162
|
-
| `eventType` | `string` | `"PreToolUse"`, `"PostToolUse"`, `"Notification"`, `"Stop"` |
|
|
163
|
-
| `toolName` | `string \| undefined` | Công cụ đang được gọi (ví dụ `"Bash"`, `"Write"`, `"Read"`) |
|
|
164
|
-
| `toolInput` | `Record<string, unknown> \| undefined` | Các tham số đầu vào của công cụ |
|
|
165
|
-
| `payload` | `Record<string, unknown>` | Tải trọng sự kiện thô đầy đủ từ Claude Code |
|
|
166
|
-
| `session` | `SessionMetadata \| undefined` | Ngữ cảnh phiên làm việc (xem bên dưới) |
|
|
167
|
-
|
|
168
|
-
### Các trường `SessionMetadata`
|
|
169
|
-
|
|
170
|
-
| Trường | Loại | Mô tả |
|
|
171
|
-
|-------|------|-------------|
|
|
172
|
-
| `sessionId` | `string` | Định danh phiên làm việc Claude Code |
|
|
173
|
-
| `cwd` | `string` | Thư mục làm việc của phiên Claude Code |
|
|
174
|
-
| `transcriptPath` | `string` | Đường dẫn đến tệp bảng điểm JSONL của phiên |
|
|
175
|
-
|
|
176
|
-
### Các loại sự kiện
|
|
177
|
-
|
|
178
|
-
| Sự kiện | Khi nó kích hoạt | Nội dung `toolInput` |
|
|
179
|
-
|-------|--------------|----------------------|
|
|
180
|
-
| `PreToolUse` | Trước khi Claude chạy công cụ | Đầu vào của công cụ (ví dụ `{ command: "..." }` cho Bash) |
|
|
181
|
-
| `PostToolUse` | Sau khi công cụ hoàn thành | Đầu vào của công cụ + `tool_result` (kết quả) |
|
|
182
|
-
| `Notification` | Khi Claude gửi thông báo | `{ message: "...", notification_type: "idle" \| "permission_prompt" \| ... }` - hooks phải luôn trả về `allow()`, chúng không thể chặn thông báo |
|
|
183
|
-
| `Stop` | Khi phiên Claude kết thúc | Rỗng |
|
|
184
|
-
|
|
185
|
-
---
|
|
186
|
-
|
|
187
|
-
## Thứ tự đánh giá
|
|
188
|
-
|
|
189
|
-
Chính sách được đánh giá theo thứ tự này:
|
|
190
|
-
|
|
191
|
-
1. Chính sách tích hợp (theo thứ tự định nghĩa)
|
|
192
|
-
2. Chính sách tùy chỉnh rõ ràng từ `customPoliciesPath` (theo thứ tự `.add()`)
|
|
193
|
-
3. Chính sách quy ước từ dự án `.failproofai/policies/` (tệp theo thứ tự bảng chữ cái, thứ tự `.add()` bên trong)
|
|
194
|
-
4. Chính sách quy ước từ người dùng `~/.failproofai/policies/` (tệp theo thứ tự bảng chữ cái, thứ tự `.add()` bên trong)
|
|
195
|
-
|
|
196
|
-
<Note>
|
|
197
|
-
`deny` đầu tiên sẽ ngắn mạch tất cả các chính sách tiếp theo. Tất cả các tin nhắn `instruct` được tích lũy và cung cấp cùng nhau.
|
|
198
|
-
</Note>
|
|
199
|
-
|
|
200
|
-
---
|
|
201
|
-
|
|
202
|
-
## Imports truyền bá
|
|
203
|
-
|
|
204
|
-
Các tệp chính sách tùy chỉnh có thể import các mô-đun cục bộ sử dụng đường dẫn tương đối:
|
|
205
|
-
|
|
206
|
-
```js
|
|
207
|
-
// my-policies.js
|
|
208
|
-
import { isBlockedPath } from "./utils.js";
|
|
209
|
-
import { checkApproval } from "./approval-client.js";
|
|
210
|
-
|
|
211
|
-
customPolicies.add({
|
|
212
|
-
name: "approval-gate",
|
|
213
|
-
fn: async (ctx) => {
|
|
214
|
-
if (ctx.toolName !== "Bash") return allow();
|
|
215
|
-
const approved = await checkApproval(ctx.toolInput?.command, ctx.session?.sessionId);
|
|
216
|
-
return approved ? allow() : deny("Approval required for this command");
|
|
217
|
-
},
|
|
218
|
-
});
|
|
219
|
-
```
|
|
220
|
-
|
|
221
|
-
Tất cả các nhập tương đối có thể đạt được từ tệp mục nhập đều được giải quyết. Điều này được thực hiện bằng cách viết lại các nhập `from "failproofai"` thành đường dẫn dist thực tế và tạo các tệp `.mjs` tạm thời để đảm bảo khả năng tương thích ESM.
|
|
222
|
-
|
|
223
|
-
---
|
|
224
|
-
|
|
225
|
-
## Lọc theo loại sự kiện
|
|
226
|
-
|
|
227
|
-
Sử dụng `match.events` để giới hạn khi nào một chính sách kích hoạt:
|
|
228
|
-
|
|
229
|
-
```js
|
|
230
|
-
customPolicies.add({
|
|
231
|
-
name: "require-summary-on-stop",
|
|
232
|
-
match: { events: ["Stop"] },
|
|
233
|
-
fn: async (ctx) => {
|
|
234
|
-
// Only fires when the session ends
|
|
235
|
-
// ctx.session.transcriptPath contains the full session log
|
|
236
|
-
return allow();
|
|
237
|
-
},
|
|
238
|
-
});
|
|
239
|
-
```
|
|
240
|
-
|
|
241
|
-
Bỏ qua `match` hoàn toàn để kích hoạt trên mọi loại sự kiện.
|
|
242
|
-
|
|
243
|
-
---
|
|
244
|
-
|
|
245
|
-
## Xử lý lỗi và chế độ hỏng
|
|
246
|
-
|
|
247
|
-
Chính sách tùy chỉnh **fail-open**: lỗi không bao giờ chặn chính sách tích hợp hoặc làm hỏng trình xử lý hook.
|
|
248
|
-
|
|
249
|
-
| Lỗi | Hành vi |
|
|
250
|
-
|---------|----------|
|
|
251
|
-
| `customPoliciesPath` không được đặt | Không có chính sách tùy chỉnh rõ ràng chạy; chính sách quy ước và tích hợp tiếp tục bình thường |
|
|
252
|
-
| Tệp không tìm thấy | Cảnh báo được ghi vào `~/.failproofai/hook.log`; tích hợp tiếp tục |
|
|
253
|
-
| Lỗi Syntax/import (rõ ràng) | Lỗi được ghi vào `~/.failproofai/hook.log`; chính sách tùy chỉnh rõ ràng bị bỏ qua |
|
|
254
|
-
| Lỗi Syntax/import (quy ước) | Lỗi được ghi; tệp đó bị bỏ qua, các tệp quy ước khác vẫn tải |
|
|
255
|
-
| `fn` ném khi chạy | Lỗi được ghi; hook đó được coi là `allow`; các hook khác tiếp tục |
|
|
256
|
-
| `fn` mất quá lâu hơn 10 giây | Timeout được ghi; được coi là `allow` |
|
|
257
|
-
| Thư mục quy ước bị thiếu | Không có chính sách quy ước chạy; không có lỗi |
|
|
258
|
-
|
|
259
|
-
<Tip>
|
|
260
|
-
Để gỡ lỗi lỗi chính sách tùy chỉnh, hãy theo dõi tệp nhật ký:
|
|
261
|
-
|
|
262
|
-
```bash
|
|
263
|
-
tail -f ~/.failproofai/hook.log
|
|
264
|
-
```
|
|
265
|
-
</Tip>
|
|
266
|
-
|
|
267
|
-
---
|
|
268
|
-
|
|
269
|
-
## Ví dụ đầy đủ: nhiều chính sách
|
|
270
|
-
|
|
271
|
-
```js
|
|
272
|
-
// my-policies.js
|
|
273
|
-
import { customPolicies, allow, deny, instruct } from "failproofai";
|
|
274
|
-
|
|
275
|
-
// Prevent agent from writing to secrets/ directory
|
|
276
|
-
customPolicies.add({
|
|
277
|
-
name: "block-secrets-dir",
|
|
278
|
-
description: "Prevent agent from writing to secrets/ directory",
|
|
279
|
-
match: { events: ["PreToolUse"] },
|
|
280
|
-
fn: async (ctx) => {
|
|
281
|
-
if (!["Write", "Edit"].includes(ctx.toolName ?? "")) return allow();
|
|
282
|
-
const path = ctx.toolInput?.file_path ?? "";
|
|
283
|
-
if (path.includes("secrets/")) return deny("Writing to secrets/ is not permitted");
|
|
284
|
-
return allow();
|
|
285
|
-
},
|
|
286
|
-
});
|
|
287
|
-
|
|
288
|
-
// Keep the agent on track: verify tests before committing
|
|
289
|
-
customPolicies.add({
|
|
290
|
-
name: "remind-test-before-commit",
|
|
291
|
-
description: "Keep the agent on track: verify tests pass before committing",
|
|
292
|
-
match: { events: ["PreToolUse"] },
|
|
293
|
-
fn: async (ctx) => {
|
|
294
|
-
if (ctx.toolName !== "Bash") return allow();
|
|
295
|
-
const cmd = ctx.toolInput?.command ?? "";
|
|
296
|
-
if (/git\s+commit/.test(cmd)) {
|
|
297
|
-
return instruct("Verify all tests pass before committing. Run `bun test` if you haven't already.");
|
|
298
|
-
}
|
|
299
|
-
return allow();
|
|
300
|
-
},
|
|
301
|
-
});
|
|
302
|
-
|
|
303
|
-
// Prevent unplanned dependency changes during freeze
|
|
304
|
-
customPolicies.add({
|
|
305
|
-
name: "dependency-freeze",
|
|
306
|
-
description: "Prevent unplanned dependency changes during freeze period",
|
|
307
|
-
match: { events: ["PreToolUse"] },
|
|
308
|
-
fn: async (ctx) => {
|
|
309
|
-
if (ctx.toolName !== "Bash") return allow();
|
|
310
|
-
const cmd = ctx.toolInput?.command ?? "";
|
|
311
|
-
const isInstall = /^(npm install|yarn add|bun add|pnpm add)\s+\S/.test(cmd);
|
|
312
|
-
if (isInstall && process.env.DEPENDENCY_FREEZE === "1") {
|
|
313
|
-
return deny("Package installs are frozen. Unset DEPENDENCY_FREEZE to allow.");
|
|
314
|
-
}
|
|
315
|
-
return allow();
|
|
316
|
-
},
|
|
317
|
-
});
|
|
318
|
-
|
|
319
|
-
export { customPolicies };
|
|
320
|
-
```
|
|
321
|
-
|
|
322
|
-
---
|
|
323
|
-
|
|
324
|
-
## Ví dụ
|
|
325
|
-
|
|
326
|
-
Thư mục `examples/` chứa các tệp chính sách sẵn sàng chạy:
|
|
327
|
-
|
|
328
|
-
| Tệp | Nội dung |
|
|
329
|
-
|------|----------|
|
|
330
|
-
| `examples/policies-basic.js` | Năm chính sách khởi động bao gồm các chế độ lỗi agent phổ biến |
|
|
331
|
-
| `examples/policies-advanced/index.js` | Các mẫu nâng cao: nhập truyền bá, lệnh gọi async, scrubbing đầu ra, và hook kết thúc phiên |
|
|
332
|
-
| `examples/convention-policies/security-policies.mjs` | Chính sách bảo mật dựa trên quy ước (chặn ghi .env, ngăn viết lại lịch sử git) |
|
|
333
|
-
| `examples/convention-policies/workflow-policies.mjs` | Chính sách quy trình công việc dựa trên quy ước (nhắc nhở kiểm tra, tệp ghi kiểm toán) |
|
|
334
|
-
|
|
335
|
-
### Sử dụng các ví dụ tệp rõ ràng
|
|
336
|
-
|
|
337
|
-
```bash
|
|
338
|
-
failproofai policies --install --custom ./examples/policies-basic.js
|
|
339
|
-
```
|
|
340
|
-
|
|
341
|
-
### Sử dụng các ví dụ dựa trên quy ước
|
|
342
|
-
|
|
343
|
-
```bash
|
|
344
|
-
# Copy to project level
|
|
345
|
-
mkdir -p .failproofai/policies
|
|
346
|
-
cp examples/convention-policies/*.mjs .failproofai/policies/
|
|
347
|
-
|
|
348
|
-
# Or copy to user level
|
|
349
|
-
mkdir -p ~/.failproofai/policies
|
|
350
|
-
cp examples/convention-policies/*.mjs ~/.failproofai/policies/
|
|
351
|
-
```
|
|
352
|
-
|
|
353
|
-
Không cần lệnh cài đặt — các tệp được nhận diện tự động trên hook event tiếp theo.
|
|
@@ -1,142 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: Dashboard
|
|
3
|
-
description: "Giám sát các phiên làm việc của agent, xem xét các lệnh gọi công cụ và quản lý chính sách"
|
|
4
|
-
icon: chart-line
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
Dashboard failproofai là một ứng dụng web cục bộ để giám sát các phiên làm việc của agent AI và quản lý chính sách. Xem những gì các agent của bạn đã làm khi bạn vắng mặt.
|
|
8
|
-
|
|
9
|
-
---
|
|
10
|
-
|
|
11
|
-
## Khởi động dashboard
|
|
12
|
-
|
|
13
|
-
```bash
|
|
14
|
-
failproofai
|
|
15
|
-
```
|
|
16
|
-
|
|
17
|
-
Mở tại `http://localhost:8020`.
|
|
18
|
-
|
|
19
|
-
Dashboard đọc trực tiếp từ hệ thống tập tin - các thư mục dự án Claude Code của bạn và các tệp cấu hình failproofai. Không có dữ liệu nào được ghi vào dịch vụ từ xa.
|
|
20
|
-
|
|
21
|
-
---
|
|
22
|
-
|
|
23
|
-
## Các trang
|
|
24
|
-
|
|
25
|
-
### Projects
|
|
26
|
-
|
|
27
|
-
Liệt kê tất cả các dự án Claude Code được tìm thấy trên máy của bạn. Các dự án được phát hiện từ `~/.claude/projects/` (hoặc đường dẫn được đặt bởi `CLAUDE_PROJECTS_PATH`).
|
|
28
|
-
|
|
29
|
-
Mỗi dự án hiển thị:
|
|
30
|
-
- Tên dự án (được lấy từ đường dẫn thư mục)
|
|
31
|
-
- Số lượng phiên làm việc
|
|
32
|
-
- Ngày hoạt động phiên làm việc gần nhất
|
|
33
|
-
|
|
34
|
-
Nhấp vào một dự án để xem các phiên làm việc của nó.
|
|
35
|
-
|
|
36
|
-
### Sessions
|
|
37
|
-
|
|
38
|
-
Liệt kê tất cả các phiên làm việc trong một dự án. Mỗi phiên làm việc hiển thị:
|
|
39
|
-
- ID phiên làm việc
|
|
40
|
-
- Dấu thời gian bắt đầu và kết thúc
|
|
41
|
-
- Số lượng lệnh gọi công cụ
|
|
42
|
-
- Số lượng hoạt động hook (các chính sách đã được kích hoạt)
|
|
43
|
-
|
|
44
|
-
Sử dụng bộ lọc phạm vi ngày và tìm kiếm ID phiên làm việc để thu hẹp danh sách. Các phiên làm việc được chia thành các trang.
|
|
45
|
-
|
|
46
|
-
Nhấp vào một phiên làm việc để mở trình xem phiên làm việc.
|
|
47
|
-
|
|
48
|
-
### Session viewer
|
|
49
|
-
|
|
50
|
-
Trình xem phiên làm việc trả lời câu hỏi chính cho các agent tự động hóa: agent đã làm gì và có ở đúng hướng không? Nó hiển thị một dòng thời gian của mọi thứ đã xảy ra trong một phiên làm việc:
|
|
51
|
-
|
|
52
|
-
- **Messages** - Các phản hồi văn bản của Claude và các lời nhắc từ người dùng
|
|
53
|
-
- **Tool calls** - Mọi công cụ mà Claude đã gọi, kèm theo đầu vào và đầu ra của nó
|
|
54
|
-
- **Policy activity** - Đối với mỗi lệnh gọi công cụ, các chính sách nào đã được kích hoạt và quyết định nào mà chúng trả về
|
|
55
|
-
|
|
56
|
-
Thanh thống kê ở phía trên cùng hiển thị thời lượng phiên làm việc, tổng số lệnh gọi công cụ và tóm tắt quyết định hook (số lượng allow / deny / instruct).
|
|
57
|
-
|
|
58
|
-
Bạn có thể xuất phiên làm việc dưới dạng tệp ZIP hoặc JSONL bằng nút tải xuống.
|
|
59
|
-
|
|
60
|
-
### Policies
|
|
61
|
-
|
|
62
|
-
Một trang có hai tab để quản lý chính sách và xem xét hoạt động.
|
|
63
|
-
|
|
64
|
-
<Tabs>
|
|
65
|
-
<Tab title="Policies tab">
|
|
66
|
-
- Bật hoặc tắt các chính sách riêng lẻ bằng một cú nhấp chuột (ghi vào `~/.failproofai/policies-config.json`)
|
|
67
|
-
- Mở rộng một chính sách để cấu hình các tham số của nó (đối với các chính sách hỗ trợ `policyParams`)
|
|
68
|
-
- Cài đặt hoặc xóa hook cho một phạm vi nhất định
|
|
69
|
-
- Đặt đường dẫn tệp chính sách tùy chỉnh
|
|
70
|
-
</Tab>
|
|
71
|
-
<Tab title="Activity tab">
|
|
72
|
-
- Lịch sử đầy đủ được chia trang của mọi sự kiện hook đã được kích hoạt trên tất cả các phiên làm việc
|
|
73
|
-
- Tìm kiếm theo tên chính sách, ID phiên làm việc, tên công cụ hoặc quyết định
|
|
74
|
-
- Mỗi hàng hiển thị: dấu thời gian, tên chính sách, quyết định, tên công cụ, ID phiên làm việc và lý do cho các quyết định deny/instruct
|
|
75
|
-
</Tab>
|
|
76
|
-
</Tabs>
|
|
77
|
-
|
|
78
|
-
---
|
|
79
|
-
|
|
80
|
-
## Tự động làm mới
|
|
81
|
-
|
|
82
|
-
Dashboard có một công tắc tự động làm mới trong thanh điều hướng trên cùng. Khi được bật, trang hiện tại được làm mới định kỳ để hiển thị các phiên làm việc và hoạt động chính sách mới khi chúng xuất hiện. Thiết yếu để giám sát các phiên làm việc của agent tự động hóa chạy lâu dài.
|
|
83
|
-
|
|
84
|
-
---
|
|
85
|
-
|
|
86
|
-
## Vô hiệu hóa các trang
|
|
87
|
-
|
|
88
|
-
Nếu bạn chỉ cần một số phần của dashboard, hãy đặt `FAILPROOFAI_DISABLE_PAGES` thành một danh sách tên trang được phân tách bằng dấu phẩy:
|
|
89
|
-
|
|
90
|
-
```bash
|
|
91
|
-
FAILPROOFAI_DISABLE_PAGES=policies failproofai
|
|
92
|
-
```
|
|
93
|
-
|
|
94
|
-
Các giá trị hợp lệ: `policies`, `projects`.
|
|
95
|
-
|
|
96
|
-
---
|
|
97
|
-
|
|
98
|
-
## Chủ đề
|
|
99
|
-
|
|
100
|
-
Dashboard hỗ trợ chế độ sáng và chế độ tối. Chuyển đổi qua nút trong thanh điều hướng. Tùy chọn được lưu trữ trong bộ nhớ cục bộ của trình duyệt của bạn.
|
|
101
|
-
|
|
102
|
-
---
|
|
103
|
-
|
|
104
|
-
## Cấu hình đường dẫn dự án
|
|
105
|
-
|
|
106
|
-
Theo mặc định, dashboard đọc từ thư mục dự án Claude Code tiêu chuẩn. Ghi đè nó cho các thiết lập tùy chỉnh:
|
|
107
|
-
|
|
108
|
-
```bash
|
|
109
|
-
CLAUDE_PROJECTS_PATH=/custom/path/to/projects failproofai
|
|
110
|
-
```
|
|
111
|
-
|
|
112
|
-
---
|
|
113
|
-
|
|
114
|
-
## Truy cập từ máy chủ không phải localhost
|
|
115
|
-
|
|
116
|
-
Khi chạy dashboard ở **chế độ phát triển** (`npm run dev`) và truy cập nó từ tên máy chủ khác ngoài `localhost` - ví dụ như một miền tùy chỉnh, IP từ xa hoặc URL được đường hầm - bạn có thể thấy cảnh báo như:
|
|
117
|
-
|
|
118
|
-
```text
|
|
119
|
-
⚠ Blocked cross-origin request to Next.js dev resource /_next/webpack-hmr from "dashboard.example.com".
|
|
120
|
-
```
|
|
121
|
-
|
|
122
|
-
Đây là Next.js chặn quyền truy cập cross-origin vào websocket HMR (hot module reload) của nó, đây là một tính năng chỉ cho phát triển. Để cho phép máy chủ của bạn, hãy sử dụng cờ `--allowed-origins`:
|
|
123
|
-
|
|
124
|
-
```bash
|
|
125
|
-
npm run dev -- --allowed-origins dashboard.example.com
|
|
126
|
-
```
|
|
127
|
-
|
|
128
|
-
Để có nhiều máy chủ hoặc IP, hãy chuyển một danh sách được phân tách bằng dấu phẩy:
|
|
129
|
-
|
|
130
|
-
```bash
|
|
131
|
-
npm run dev -- --allowed-origins dashboard.example.com,192.168.1.5
|
|
132
|
-
```
|
|
133
|
-
|
|
134
|
-
Bạn cũng có thể đặt biến môi trường `FAILPROOFAI_ALLOWED_DEV_ORIGINS`:
|
|
135
|
-
|
|
136
|
-
```bash
|
|
137
|
-
FAILPROOFAI_ALLOWED_DEV_ORIGINS=dashboard.example.com npm run dev
|
|
138
|
-
```
|
|
139
|
-
|
|
140
|
-
<Note>
|
|
141
|
-
Điều này chỉ áp dụng cho chế độ phát triển. Khi chạy `failproofai` (chế độ production), không có websocket HMR và không có vấn đề tài nguyên phát triển cross-origin.
|
|
142
|
-
</Note>
|