failproofai 0.0.3 → 0.0.4-beta.0
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 +1 -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 +15 -15
- package/.next/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +15 -15
- 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 +10 -10
- 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 +1 -1
- package/.next/standalone/.next/server/app/index.html +1 -1
- package/.next/standalone/.next/server/app/index.rsc +15 -15
- package/.next/standalone/.next/server/app/index.segments/__PAGE__.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/index.segments/_full.segment.rsc +15 -15
- package/.next/standalone/.next/server/app/index.segments/_head.segment.rsc +4 -4
- package/.next/standalone/.next/server/app/index.segments/_index.segment.rsc +10 -10
- package/.next/standalone/.next/server/app/index.segments/_tree.segment.rsc +1 -1
- 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]__0bo8s~-._.js → [root-of-the-server]__0jqus-j._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0okos0k._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0w6l33k._.js +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/{[root-of-the-server]__03kiqd5._.js → [root-of-the-server]__131id~1._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/_10lm7or._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/app_global-error_tsx_0xerkr6._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/app_policies_hooks-client_tsx_0q-m0y-._.js +1 -1
- package/.next/standalone/.next/server/middleware-build-manifest.js +3 -3
- package/.next/standalone/.next/server/pages/404.html +2 -2
- package/.next/standalone/.next/server/pages/500.html +1 -1
- package/.next/standalone/.next/server/server-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/server-reference-manifest.json +9 -9
- package/.next/standalone/.next/static/chunks/{0cwft44dh9bww.js → 045lpk_isd5np.js} +1 -1
- package/.next/standalone/.next/static/chunks/{0xbwzy4dl87-0.js → 065qrrpfkts8s.js} +1 -1
- package/.next/standalone/.next/static/chunks/{0h5kbvg~.xf.v.js → 0je_~y72wv~~2.js} +1 -1
- package/.next/standalone/.next/static/chunks/{02t9.s735hqyq.js → 0rqcttnl9u32c.js} +1 -1
- package/.next/standalone/.next/static/chunks/{03oepxbqx6o8~.js → 0v2-.v07.zb9u.js} +2 -2
- package/.next/standalone/.next/static/chunks/{0e2uz2g026ckb.js → 0yye9-w._6rz~.js} +1 -1
- package/.next/standalone/.next/static/chunks/{0od..umlku4bb.js → 15proylk5ye2k.js} +1 -1
- package/.next/standalone/.next/static/chunks/174boqk9e~20i.js +6 -0
- package/.next/standalone/CHANGELOG.md +5 -0
- package/.next/standalone/dist/cli.mjs +4 -8
- package/.next/standalone/docs/ar/built-in-policies.mdx +100 -129
- package/.next/standalone/docs/ar/cli/install-policies.mdx +10 -11
- package/.next/standalone/docs/ar/cli/remove-policies.mdx +10 -12
- package/.next/standalone/docs/built-in-policies.mdx +3 -30
- package/.next/standalone/docs/cli/install-policies.mdx +0 -1
- package/.next/standalone/docs/cli/remove-policies.mdx +0 -1
- package/.next/standalone/docs/de/built-in-policies.mdx +65 -92
- package/.next/standalone/docs/de/cli/install-policies.mdx +3 -4
- package/.next/standalone/docs/de/cli/remove-policies.mdx +3 -4
- package/.next/standalone/docs/docs.json +5 -0
- package/.next/standalone/docs/es/built-in-policies.mdx +66 -93
- package/.next/standalone/docs/es/cli/install-policies.mdx +4 -5
- package/.next/standalone/docs/es/cli/remove-policies.mdx +4 -5
- package/.next/standalone/docs/fr/built-in-policies.mdx +83 -110
- package/.next/standalone/docs/fr/cli/install-policies.mdx +11 -12
- package/.next/standalone/docs/fr/cli/remove-policies.mdx +2 -3
- package/.next/standalone/docs/he/built-in-policies.mdx +131 -160
- package/.next/standalone/docs/he/cli/install-policies.mdx +14 -15
- package/.next/standalone/docs/he/cli/remove-policies.mdx +13 -14
- package/.next/standalone/docs/hi/built-in-policies.mdx +168 -197
- package/.next/standalone/docs/hi/cli/install-policies.mdx +10 -11
- package/.next/standalone/docs/hi/cli/remove-policies.mdx +13 -14
- package/.next/standalone/docs/it/built-in-policies.mdx +83 -110
- package/.next/standalone/docs/it/cli/install-policies.mdx +12 -13
- package/.next/standalone/docs/it/cli/remove-policies.mdx +5 -6
- package/.next/standalone/docs/ja/built-in-policies.mdx +119 -146
- package/.next/standalone/docs/ja/cli/install-policies.mdx +12 -13
- package/.next/standalone/docs/ja/cli/remove-policies.mdx +8 -9
- package/.next/standalone/docs/ko/built-in-policies.mdx +80 -107
- package/.next/standalone/docs/ko/cli/install-policies.mdx +10 -11
- package/.next/standalone/docs/ko/cli/remove-policies.mdx +2 -3
- package/.next/standalone/docs/pt-br/built-in-policies.mdx +46 -73
- package/.next/standalone/docs/pt-br/cli/install-policies.mdx +5 -6
- package/.next/standalone/docs/pt-br/cli/remove-policies.mdx +11 -12
- package/.next/standalone/docs/ru/built-in-policies.mdx +107 -132
- package/.next/standalone/docs/ru/cli/install-policies.mdx +10 -10
- package/.next/standalone/docs/ru/cli/remove-policies.mdx +13 -14
- package/.next/standalone/docs/tr/built-in-policies.mdx +106 -131
- package/.next/standalone/docs/tr/cli/install-policies.mdx +14 -15
- package/.next/standalone/docs/tr/cli/remove-policies.mdx +7 -8
- package/.next/standalone/docs/vi/built-in-policies.mdx +73 -100
- package/.next/standalone/docs/vi/cli/install-policies.mdx +17 -18
- package/.next/standalone/docs/vi/cli/remove-policies.mdx +11 -12
- package/.next/standalone/docs/zh/built-in-policies.mdx +77 -104
- package/.next/standalone/docs/zh/cli/install-policies.mdx +4 -5
- package/.next/standalone/docs/zh/cli/remove-policies.mdx +8 -9
- package/.next/standalone/package.json +1 -1
- package/.next/standalone/server.js +1 -1
- package/.next/standalone/src/hooks/builtin-policies.ts +0 -4
- package/dist/cli.mjs +4 -8
- package/package.json +1 -1
- package/src/hooks/builtin-policies.ts +0 -4
- package/.next/standalone/.next/static/chunks/18cl6wups7ouq.js +0 -6
- /package/.next/standalone/.next/static/{En9eEShUkUjgeYbY9v6Gy → WRbDp8A_ORPof197CezOZ}/_buildManifest.js +0 -0
- /package/.next/standalone/.next/static/{En9eEShUkUjgeYbY9v6Gy → WRbDp8A_ORPof197CezOZ}/_clientMiddlewareManifest.js +0 -0
- /package/.next/standalone/.next/static/{En9eEShUkUjgeYbY9v6Gy → WRbDp8A_ORPof197CezOZ}/_ssgManifest.js +0 -0
|
@@ -1,57 +1,57 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: 内置策略
|
|
3
|
-
description: "
|
|
3
|
+
description: "涵盖常见代理失败模式的全部 30 条内置策略"
|
|
4
4
|
icon: shield
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
failproofai 内置了 30
|
|
7
|
+
failproofai 内置了 30 条策略,用于捕获常见的代理失败模式。每条策略针对特定的钩子事件类型和工具名称触发。其中 9 条策略支持参数配置,无需编写代码即可调整行为。4 条工作流策略会在 Claude 停止前强制执行提交 → 推送 → PR → CI 的完整流程。
|
|
8
8
|
|
|
9
9
|
---
|
|
10
10
|
|
|
11
11
|
## 概览
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
策略按类别分组:
|
|
14
14
|
|
|
15
15
|
| 类别 | 策略 | 钩子类型 |
|
|
16
|
-
|
|
16
|
+
|------|------|----------|
|
|
17
17
|
| [危险命令](#dangerous-commands) | block-sudo, block-rm-rf, block-curl-pipe-sh, block-failproofai-commands | PreToolUse |
|
|
18
|
-
| [
|
|
19
|
-
| [
|
|
18
|
+
| [密钥(净化器)](#secrets-sanitizers) | sanitize-jwt, sanitize-api-keys, sanitize-connection-strings, sanitize-private-key-content, sanitize-bearer-tokens | PostToolUse |
|
|
19
|
+
| [环境](#environment) | block-env-files, protect-env-vars | PreToolUse |
|
|
20
20
|
| [文件访问](#file-access) | block-read-outside-cwd, block-secrets-write | PreToolUse |
|
|
21
21
|
| [Git](#git) | block-push-master, block-work-on-main, block-force-push, warn-git-amend, warn-git-stash-drop, warn-all-files-staged | PreToolUse |
|
|
22
22
|
| [数据库](#database) | warn-destructive-sql, warn-schema-alteration | PreToolUse |
|
|
23
23
|
| [警告](#warnings) | warn-large-file-write, warn-package-publish, warn-background-process, warn-global-package-install | PreToolUse |
|
|
24
|
-
| [
|
|
24
|
+
| [工作流](#workflow) | require-commit-before-stop, require-push-before-stop, require-pr-before-stop, require-ci-green-before-stop | Stop |
|
|
25
25
|
|
|
26
|
-
- **`block-`** —
|
|
27
|
-
- **`warn-`** —
|
|
28
|
-
- **`sanitize-`** —
|
|
29
|
-
- **`require-`** —
|
|
26
|
+
- **`block-`** — 阻止代理继续执行。
|
|
27
|
+
- **`warn-`** — 为代理提供额外上下文,使其能够自我纠正。
|
|
28
|
+
- **`sanitize-`** — 在代理查看工具输出前,清除其中的敏感数据。
|
|
29
|
+
- **`require-`** — 在条件满足之前阻止 Stop 事件。
|
|
30
30
|
|
|
31
31
|
---
|
|
32
32
|
|
|
33
33
|
<Tip>
|
|
34
|
-
每条策略均支持在 `policyParams`
|
|
34
|
+
每条策略均支持在 `policyParams` 中设置可选的 `hint` 字段。该提示会附加到 Claude 收到的 deny 或 instruct 消息中,提供可操作的指导,无需修改策略代码。适用于内置策略、自定义策略和约定策略。详见[配置 → hint](/zh/configuration#hint-cross-cutting)。
|
|
35
35
|
</Tip>
|
|
36
36
|
|
|
37
37
|
---
|
|
38
38
|
|
|
39
39
|
## 危险命令
|
|
40
40
|
|
|
41
|
-
|
|
41
|
+
防止代理执行难以撤销或可能损害宿主系统的操作。
|
|
42
42
|
|
|
43
43
|
### `block-sudo`
|
|
44
44
|
|
|
45
45
|
**事件:** PreToolUse (Bash)
|
|
46
46
|
**默认行为:** 拒绝任何包含 `sudo` 的命令。
|
|
47
47
|
|
|
48
|
-
|
|
48
|
+
拦截包含 `sudo` 关键字的调用。模式匹配基于解析后的命令标记(token),而非原始字符串,以防止通过 shell 运算符注入绕过检测。
|
|
49
49
|
|
|
50
50
|
**参数:**
|
|
51
51
|
|
|
52
52
|
| 参数 | 类型 | 默认值 | 说明 |
|
|
53
53
|
|------|------|--------|------|
|
|
54
|
-
| `allowPatterns` | `string[]` | `[]` |
|
|
54
|
+
| `allowPatterns` | `string[]` | `[]` | 允许通过的命令前缀(精确匹配)。每个条目与解析后的 argv 标记进行匹配。 |
|
|
55
55
|
|
|
56
56
|
**示例:**
|
|
57
57
|
|
|
@@ -65,10 +65,10 @@ failproofai 内置了 30 条策略,用于捕获常见的智能体失败模式
|
|
|
65
65
|
}
|
|
66
66
|
```
|
|
67
67
|
|
|
68
|
-
|
|
68
|
+
使用此配置,`sudo systemctl status nginx` 将被允许,但 `sudo rm /etc/hosts` 将被拒绝。
|
|
69
69
|
|
|
70
70
|
<Note>
|
|
71
|
-
|
|
71
|
+
模式匹配基于解析后的标记,而非原始命令字符串。这可防止通过追加 shell 运算符进行绕过(例如 `sudo systemctl status x; rm -rf /` 不会匹配 `sudo systemctl status *`)。
|
|
72
72
|
</Note>
|
|
73
73
|
|
|
74
74
|
---
|
|
@@ -116,14 +116,14 @@ failproofai 内置了 30 条策略,用于捕获常见的智能体失败模式
|
|
|
116
116
|
|
|
117
117
|
---
|
|
118
118
|
|
|
119
|
-
##
|
|
119
|
+
## 密钥(净化器)
|
|
120
120
|
|
|
121
|
-
|
|
121
|
+
防止代理将凭据泄露到其上下文或输出中。净化器策略在 **PostToolUse** 事件上触发。当 Claude 执行 Bash 命令、读取文件或调用任何工具时,这些策略会在输出返回给 Claude 之前对其进行检查。若检测到密钥模式,策略将返回拒绝决定,阻止输出被传回。
|
|
122
122
|
|
|
123
123
|
### `sanitize-jwt`
|
|
124
124
|
|
|
125
125
|
**事件:** PostToolUse(所有工具)
|
|
126
|
-
**默认行为:** 清除 JWT
|
|
126
|
+
**默认行为:** 清除 JWT 令牌(三段由 `.` 分隔的 base64url 编码内容)。
|
|
127
127
|
|
|
128
128
|
无参数。
|
|
129
129
|
|
|
@@ -138,7 +138,7 @@ failproofai 内置了 30 条策略,用于捕获常见的智能体失败模式
|
|
|
138
138
|
|
|
139
139
|
| 参数 | 类型 | 默认值 | 说明 |
|
|
140
140
|
|------|------|--------|------|
|
|
141
|
-
| `additionalPatterns` | `{ regex: string; label: string }[]` | `[]` |
|
|
141
|
+
| `additionalPatterns` | `{ regex: string; label: string }[]` | `[]` | 额外需要视为密钥的正则表达式模式。 |
|
|
142
142
|
|
|
143
143
|
**示例:**
|
|
144
144
|
|
|
@@ -160,7 +160,7 @@ failproofai 内置了 30 条策略,用于捕获常见的智能体失败模式
|
|
|
160
160
|
### `sanitize-connection-strings`
|
|
161
161
|
|
|
162
162
|
**事件:** PostToolUse(所有工具)
|
|
163
|
-
**默认行为:**
|
|
163
|
+
**默认行为:** 清除包含内嵌凭据的数据库连接字符串(例如 `postgresql://user:password@host/db`)。
|
|
164
164
|
|
|
165
165
|
无参数。
|
|
166
166
|
|
|
@@ -178,22 +178,22 @@ failproofai 内置了 30 条策略,用于捕获常见的智能体失败模式
|
|
|
178
178
|
### `sanitize-bearer-tokens`
|
|
179
179
|
|
|
180
180
|
**事件:** PostToolUse(所有工具)
|
|
181
|
-
**默认行为:**
|
|
181
|
+
**默认行为:** 清除 `Authorization: Bearer <token>` 请求头中长度达到 20 个字符或以上的令牌。
|
|
182
182
|
|
|
183
183
|
无参数。
|
|
184
184
|
|
|
185
185
|
---
|
|
186
186
|
|
|
187
|
-
##
|
|
187
|
+
## 环境
|
|
188
188
|
|
|
189
|
-
|
|
189
|
+
防止代理读取或暴露敏感的环境配置。
|
|
190
190
|
|
|
191
191
|
### `block-env-files`
|
|
192
192
|
|
|
193
|
-
**事件:** PreToolUse
|
|
194
|
-
**默认行为:** 拒绝通过 `cat .env
|
|
193
|
+
**事件:** PreToolUse(Bash、Read)
|
|
194
|
+
**默认行为:** 拒绝通过 `cat .env`、以 `.env` 为文件路径的 `Read` 工具调用等方式读取 `.env` 文件。
|
|
195
195
|
|
|
196
|
-
|
|
196
|
+
不会拦截 `.envrc` 或其他与环境相关的文件,仅针对精确命名为 `.env` 的文件。
|
|
197
197
|
|
|
198
198
|
无参数。
|
|
199
199
|
|
|
@@ -201,7 +201,7 @@ failproofai 内置了 30 条策略,用于捕获常见的智能体失败模式
|
|
|
201
201
|
|
|
202
202
|
### `protect-env-vars`
|
|
203
203
|
|
|
204
|
-
**事件:** PreToolUse
|
|
204
|
+
**事件:** PreToolUse(Bash)
|
|
205
205
|
**默认行为:** 拒绝打印环境变量的命令:`printenv`、`env`、`echo $VAR`。
|
|
206
206
|
|
|
207
207
|
无参数。
|
|
@@ -210,18 +210,18 @@ failproofai 内置了 30 条策略,用于捕获常见的智能体失败模式
|
|
|
210
210
|
|
|
211
211
|
## 文件访问
|
|
212
212
|
|
|
213
|
-
|
|
213
|
+
将代理的操作范围限制在项目目录内,并远离敏感文件。
|
|
214
214
|
|
|
215
215
|
### `block-read-outside-cwd`
|
|
216
216
|
|
|
217
|
-
**事件:** PreToolUse
|
|
217
|
+
**事件:** PreToolUse(Read、Bash)
|
|
218
218
|
**默认行为:** 拒绝读取当前工作目录(项目根目录)以外的文件。
|
|
219
219
|
|
|
220
220
|
**参数:**
|
|
221
221
|
|
|
222
222
|
| 参数 | 类型 | 默认值 | 说明 |
|
|
223
223
|
|------|------|--------|------|
|
|
224
|
-
| `allowPaths` | `string[]` | `[]` |
|
|
224
|
+
| `allowPaths` | `string[]` | `[]` | 即使在工作目录之外也允许访问的绝对路径前缀。 |
|
|
225
225
|
|
|
226
226
|
**示例:**
|
|
227
227
|
|
|
@@ -239,14 +239,14 @@ failproofai 内置了 30 条策略,用于捕获常见的智能体失败模式
|
|
|
239
239
|
|
|
240
240
|
### `block-secrets-write`
|
|
241
241
|
|
|
242
|
-
**事件:** PreToolUse
|
|
243
|
-
**默认行为:**
|
|
242
|
+
**事件:** PreToolUse(Write、Edit)
|
|
243
|
+
**默认行为:** 拒绝写入常用于私钥和证书的文件:`id_rsa`、`id_ed25519`、`*.key`、`*.pem`、`*.p12`、`*.pfx`。
|
|
244
244
|
|
|
245
245
|
**参数:**
|
|
246
246
|
|
|
247
247
|
| 参数 | 类型 | 默认值 | 说明 |
|
|
248
248
|
|------|------|--------|------|
|
|
249
|
-
| `additionalPatterns` | `string[]` | `[]` |
|
|
249
|
+
| `additionalPatterns` | `string[]` | `[]` | 额外需要阻止的文件名模式(glob 风格)。 |
|
|
250
250
|
|
|
251
251
|
**示例:**
|
|
252
252
|
|
|
@@ -268,7 +268,7 @@ failproofai 内置了 30 条策略,用于捕获常见的智能体失败模式
|
|
|
268
268
|
|
|
269
269
|
### `block-push-master`
|
|
270
270
|
|
|
271
|
-
**事件:** PreToolUse
|
|
271
|
+
**事件:** PreToolUse(Bash)
|
|
272
272
|
**默认行为:** 拒绝 `git push origin main` 和 `git push origin master`。
|
|
273
273
|
|
|
274
274
|
**参数:**
|
|
@@ -290,30 +290,30 @@ failproofai 内置了 30 条策略,用于捕获常见的智能体失败模式
|
|
|
290
290
|
```
|
|
291
291
|
|
|
292
292
|
<Tip>
|
|
293
|
-
若要允许推送到所有分支(即在不从 `enabledPolicies`
|
|
293
|
+
若要允许推送到所有分支(即在不从 `enabledPolicies` 中移除该策略的情况下禁用它),请将 `protectedBranches` 设为 `[]`。
|
|
294
294
|
</Tip>
|
|
295
295
|
|
|
296
296
|
---
|
|
297
297
|
|
|
298
298
|
### `block-work-on-main`
|
|
299
299
|
|
|
300
|
-
**事件:** PreToolUse
|
|
301
|
-
**默认行为:**
|
|
300
|
+
**事件:** PreToolUse(Bash)
|
|
301
|
+
**默认行为:** 拒绝直接切换到 `main` 或 `master` 分支。
|
|
302
302
|
|
|
303
303
|
**参数:**
|
|
304
304
|
|
|
305
305
|
| 参数 | 类型 | 默认值 | 说明 |
|
|
306
306
|
|------|------|--------|------|
|
|
307
|
-
| `protectedBranches` | `string[]` | `["main", "master"]` |
|
|
307
|
+
| `protectedBranches` | `string[]` | `["main", "master"]` | 不允许直接切换的分支名称。 |
|
|
308
308
|
|
|
309
309
|
---
|
|
310
310
|
|
|
311
311
|
### `block-force-push`
|
|
312
312
|
|
|
313
|
-
**事件:** PreToolUse
|
|
313
|
+
**事件:** PreToolUse(Bash)
|
|
314
314
|
**默认行为:** 拒绝 `git push --force` 和 `git push -f`。
|
|
315
315
|
|
|
316
|
-
|
|
316
|
+
无策略专属参数。可使用通用 [`hint`](/zh/configuration#hint-cross-cutting) 建议替代方案:
|
|
317
317
|
|
|
318
318
|
```json
|
|
319
319
|
{
|
|
@@ -329,8 +329,8 @@ failproofai 内置了 30 条策略,用于捕获常见的智能体失败模式
|
|
|
329
329
|
|
|
330
330
|
### `warn-git-amend`
|
|
331
331
|
|
|
332
|
-
**事件:** PreToolUse
|
|
333
|
-
**默认行为:**
|
|
332
|
+
**事件:** PreToolUse(Bash)
|
|
333
|
+
**默认行为:** 在运行 `git commit --amend` 时指示 Claude 谨慎操作。不会阻止命令执行。
|
|
334
334
|
|
|
335
335
|
无参数。
|
|
336
336
|
|
|
@@ -338,8 +338,8 @@ failproofai 内置了 30 条策略,用于捕获常见的智能体失败模式
|
|
|
338
338
|
|
|
339
339
|
### `warn-git-stash-drop`
|
|
340
340
|
|
|
341
|
-
**事件:** PreToolUse
|
|
342
|
-
**默认行为:**
|
|
341
|
+
**事件:** PreToolUse(Bash)
|
|
342
|
+
**默认行为:** 在运行 `git stash drop` 前指示 Claude 进行确认。不会阻止命令执行。
|
|
343
343
|
|
|
344
344
|
无参数。
|
|
345
345
|
|
|
@@ -347,8 +347,8 @@ failproofai 内置了 30 条策略,用于捕获常见的智能体失败模式
|
|
|
347
347
|
|
|
348
348
|
### `warn-all-files-staged`
|
|
349
349
|
|
|
350
|
-
**事件:** PreToolUse
|
|
351
|
-
**默认行为:**
|
|
350
|
+
**事件:** PreToolUse(Bash)
|
|
351
|
+
**默认行为:** 在运行 `git add -A` 或 `git add .` 时指示 Claude 检查所暂存的内容。不会阻止命令执行。
|
|
352
352
|
|
|
353
353
|
无参数。
|
|
354
354
|
|
|
@@ -356,12 +356,12 @@ failproofai 内置了 30 条策略,用于捕获常见的智能体失败模式
|
|
|
356
356
|
|
|
357
357
|
## 数据库
|
|
358
358
|
|
|
359
|
-
在破坏性 SQL
|
|
359
|
+
在破坏性 SQL 操作执行之前进行拦截。
|
|
360
360
|
|
|
361
361
|
### `warn-destructive-sql`
|
|
362
362
|
|
|
363
|
-
**事件:** PreToolUse
|
|
364
|
-
**默认行为:**
|
|
363
|
+
**事件:** PreToolUse(Bash)
|
|
364
|
+
**默认行为:** 在运行包含 `DROP TABLE`、`DROP DATABASE` 或不带 `WHERE` 子句的 `DELETE` 的 SQL 语句之前,指示 Claude 进行确认。
|
|
365
365
|
|
|
366
366
|
无参数。
|
|
367
367
|
|
|
@@ -369,8 +369,8 @@ failproofai 内置了 30 条策略,用于捕获常见的智能体失败模式
|
|
|
369
369
|
|
|
370
370
|
### `warn-schema-alteration`
|
|
371
371
|
|
|
372
|
-
**事件:** PreToolUse
|
|
373
|
-
**默认行为:**
|
|
372
|
+
**事件:** PreToolUse(Bash)
|
|
373
|
+
**默认行为:** 在运行 `ALTER TABLE` 语句之前,指示 Claude 进行确认。
|
|
374
374
|
|
|
375
375
|
无参数。
|
|
376
376
|
|
|
@@ -378,12 +378,12 @@ failproofai 内置了 30 条策略,用于捕获常见的智能体失败模式
|
|
|
378
378
|
|
|
379
379
|
## 警告
|
|
380
380
|
|
|
381
|
-
|
|
381
|
+
在执行潜在风险但非破坏性的操作之前,为代理提供额外的上下文信息。
|
|
382
382
|
|
|
383
383
|
### `warn-large-file-write`
|
|
384
384
|
|
|
385
|
-
**事件:** PreToolUse
|
|
386
|
-
**默认行为:**
|
|
385
|
+
**事件:** PreToolUse(Write)
|
|
386
|
+
**默认行为:** 在写入超过 1024 KB 的文件之前,指示 Claude 进行确认。
|
|
387
387
|
|
|
388
388
|
**参数:**
|
|
389
389
|
|
|
@@ -404,15 +404,15 @@ failproofai 内置了 30 条策略,用于捕获常见的智能体失败模式
|
|
|
404
404
|
```
|
|
405
405
|
|
|
406
406
|
<Note>
|
|
407
|
-
|
|
407
|
+
钩子处理程序对载荷的 stdin 大小限制为 1 MB。若要使用较小的内容测试此策略,请将 `thresholdKb` 设置为远低于 1024 的值。
|
|
408
408
|
</Note>
|
|
409
409
|
|
|
410
410
|
---
|
|
411
411
|
|
|
412
412
|
### `warn-package-publish`
|
|
413
413
|
|
|
414
|
-
**事件:** PreToolUse
|
|
415
|
-
**默认行为:**
|
|
414
|
+
**事件:** PreToolUse(Bash)
|
|
415
|
+
**默认行为:** 在运行 `npm publish` 之前,指示 Claude 进行确认。
|
|
416
416
|
|
|
417
417
|
无参数。
|
|
418
418
|
|
|
@@ -420,8 +420,8 @@ failproofai 内置了 30 条策略,用于捕获常见的智能体失败模式
|
|
|
420
420
|
|
|
421
421
|
### `warn-background-process`
|
|
422
422
|
|
|
423
|
-
**事件:** PreToolUse
|
|
424
|
-
**默认行为:**
|
|
423
|
+
**事件:** PreToolUse(Bash)
|
|
424
|
+
**默认行为:** 在通过 `nohup`、`&`、`disown` 或 `screen` 启动后台进程时,指示 Claude 谨慎操作。
|
|
425
425
|
|
|
426
426
|
无参数。
|
|
427
427
|
|
|
@@ -429,8 +429,8 @@ failproofai 内置了 30 条策略,用于捕获常见的智能体失败模式
|
|
|
429
429
|
|
|
430
430
|
### `warn-global-package-install`
|
|
431
431
|
|
|
432
|
-
**事件:** PreToolUse
|
|
433
|
-
**默认行为:**
|
|
432
|
+
**事件:** PreToolUse(Bash)
|
|
433
|
+
**默认行为:** 在运行 `npm install -g`、`yarn global add` 或未在虚拟环境中执行的 `pip install` 之前,指示 Claude 进行确认。
|
|
434
434
|
|
|
435
435
|
无参数。
|
|
436
436
|
|
|
@@ -438,27 +438,27 @@ failproofai 内置了 30 条策略,用于捕获常见的智能体失败模式
|
|
|
438
438
|
|
|
439
439
|
## AI 行为
|
|
440
440
|
|
|
441
|
-
|
|
441
|
+
检测代理卡住或行为异常的情况。
|
|
442
442
|
|
|
443
443
|
### `warn-repeated-tool-calls`
|
|
444
444
|
|
|
445
445
|
**事件:** PreToolUse(所有工具)
|
|
446
|
-
**默认行为:**
|
|
446
|
+
**默认行为:** 当同一工具以相同参数被调用 3 次或以上时,指示 Claude 重新考量——这通常是代理陷入循环的常见信号。
|
|
447
447
|
|
|
448
448
|
无参数。
|
|
449
449
|
|
|
450
450
|
---
|
|
451
451
|
|
|
452
|
-
##
|
|
452
|
+
## 工作流
|
|
453
453
|
|
|
454
|
-
|
|
454
|
+
强制执行严格的会话结束工作流。这些策略在 **Stop** 事件上触发,并阻止 Claude 在每个条件满足之前停止。它们遵循自然的依赖链:提交 → 推送 → PR → CI。若某条策略拒绝,链中后续策略将被跳过(拒绝短路机制)。
|
|
455
455
|
|
|
456
|
-
|
|
456
|
+
所有工作流策略均为**失败开放(fail-open)**模式:若所需工具不可用(例如 `gh` 未安装、无 git 远程仓库),策略将允许通过,并附上说明检查被跳过原因的提示信息。
|
|
457
457
|
|
|
458
458
|
### `require-commit-before-stop`
|
|
459
459
|
|
|
460
460
|
**事件:** Stop
|
|
461
|
-
**默认行为:**
|
|
461
|
+
**默认行为:** 当存在未提交的更改(已修改、已暂存或未跟踪的文件)时,拒绝停止。当工作目录干净时,返回提示信息。
|
|
462
462
|
|
|
463
463
|
无参数。
|
|
464
464
|
|
|
@@ -467,13 +467,13 @@ failproofai 内置了 30 条策略,用于捕获常见的智能体失败模式
|
|
|
467
467
|
### `require-push-before-stop`
|
|
468
468
|
|
|
469
469
|
**事件:** Stop
|
|
470
|
-
**默认行为:**
|
|
470
|
+
**默认行为:** 当存在未推送的提交或当前分支没有远程跟踪分支时,拒绝停止。若需要,建议使用 `git push -u` 创建跟踪分支。若未配置远程仓库,则以开放方式失败。
|
|
471
471
|
|
|
472
472
|
**参数:**
|
|
473
473
|
|
|
474
474
|
| 参数 | 类型 | 默认值 | 说明 |
|
|
475
475
|
|------|------|--------|------|
|
|
476
|
-
| `remote` | `string` | `"origin"` |
|
|
476
|
+
| `remote` | `string` | `"origin"` | 推送的目标远程仓库名称。 |
|
|
477
477
|
|
|
478
478
|
**示例:**
|
|
479
479
|
|
|
@@ -492,13 +492,13 @@ failproofai 内置了 30 条策略,用于捕获常见的智能体失败模式
|
|
|
492
492
|
### `require-pr-before-stop`
|
|
493
493
|
|
|
494
494
|
**事件:** Stop
|
|
495
|
-
**默认行为:**
|
|
495
|
+
**默认行为:** 当当前分支不存在拉取请求,或已有 PR 处于关闭/已合并状态时,拒绝停止。指示 Claude 使用 `gh pr create` 创建 PR。
|
|
496
496
|
|
|
497
497
|
无参数。
|
|
498
498
|
|
|
499
499
|
<Note>
|
|
500
500
|
此策略需要安装并完成身份验证的 [GitHub CLI](https://cli.github.com/)(`gh`)。
|
|
501
|
-
|
|
501
|
+
请使用具有 `repo` 权限范围(用于读取拉取请求)的个人访问令牌运行 `gh auth login`。若 `gh` 未安装或未完成身份验证,策略将以开放方式失败,并向 Claude 报告原因。
|
|
502
502
|
</Note>
|
|
503
503
|
|
|
504
504
|
---
|
|
@@ -506,49 +506,22 @@ failproofai 内置了 30 条策略,用于捕获常见的智能体失败模式
|
|
|
506
506
|
### `require-ci-green-before-stop`
|
|
507
507
|
|
|
508
508
|
**事件:** Stop
|
|
509
|
-
**默认行为:** 当当前分支的 CI 检查失败或仍在运行时,拒绝停止。同时检查 GitHub Actions
|
|
509
|
+
**默认行为:** 当当前分支的 CI 检查失败或仍在运行时,拒绝停止。同时检查 GitHub Actions 工作流运行和第三方机器人检查(例如 CodeRabbit、SonarCloud、Codecov)。将 `skipped` 结论视为成功。当所有检查通过时,返回提示信息。
|
|
510
510
|
|
|
511
511
|
无参数。
|
|
512
512
|
|
|
513
513
|
<Note>
|
|
514
514
|
此策略需要安装并完成身份验证的 [GitHub CLI](https://cli.github.com/)(`gh`)。
|
|
515
|
-
|
|
515
|
+
请使用具有 `repo` 权限范围(用于读取 Actions 工作流运行和 Checks API)的个人访问令牌运行 `gh auth login`。若 `gh` 未安装或未完成身份验证,策略将以开放方式失败,并向 Claude 报告原因。
|
|
516
516
|
</Note>
|
|
517
517
|
|
|
518
518
|
---
|
|
519
519
|
|
|
520
|
-
## Beta 策略
|
|
521
|
-
|
|
522
|
-
部分策略标记为 `beta`,默认不安装。Beta 策略可能存在一定的不稳定性或误报情况,将在后续版本中升级为稳定版。
|
|
523
|
-
|
|
524
|
-
**当前 beta 策略:**
|
|
525
|
-
|
|
526
|
-
- `require-commit-before-stop` — 停止前提交所有变更
|
|
527
|
-
- `require-push-before-stop` — 将所有提交推送到远程仓库
|
|
528
|
-
- `require-pr-before-stop` — 确保分支存在对应的 PR
|
|
529
|
-
- `require-ci-green-before-stop` — 所有 CI 检查必须通过
|
|
530
|
-
|
|
531
|
-
这四条策略共同强制执行 **提交 → 推送 → PR → CI** 工作流。
|
|
532
|
-
|
|
533
|
-
安装所有 beta 策略:
|
|
534
|
-
|
|
535
|
-
```bash
|
|
536
|
-
failproofai policies --install --beta
|
|
537
|
-
```
|
|
538
|
-
|
|
539
|
-
或安装指定的工作流策略:
|
|
540
|
-
|
|
541
|
-
```bash
|
|
542
|
-
failproofai policies --install require-commit-before-stop require-push-before-stop require-pr-before-stop require-ci-green-before-stop
|
|
543
|
-
```
|
|
544
|
-
|
|
545
|
-
运行 `failproofai policies` 可查看哪些策略带有 beta 标识。
|
|
546
|
-
|
|
547
520
|
---
|
|
548
521
|
|
|
549
522
|
## 禁用单条策略
|
|
550
523
|
|
|
551
|
-
|
|
524
|
+
在配置文件的 `enabledPolicies` 中移除特定策略,或在控制台的「策略」选项卡中将其关闭。
|
|
552
525
|
|
|
553
526
|
```json
|
|
554
527
|
{
|
|
@@ -559,4 +532,4 @@ failproofai policies --install require-commit-before-stop require-push-before-st
|
|
|
559
532
|
}
|
|
560
533
|
```
|
|
561
534
|
|
|
562
|
-
未在 `enabledPolicies` 中列出的策略不会运行,即使 `policyParams`
|
|
535
|
+
未在 `enabledPolicies` 中列出的策略不会运行,即使 `policyParams` 中存在对应条目也不例外。
|
|
@@ -19,15 +19,14 @@ failproofai policies --install [policy-names...] [options]
|
|
|
19
19
|
| `--scope project` | 安装到当前目录的 `.claude/settings.json` |
|
|
20
20
|
| `--scope local` | 安装到当前目录的 `.claude/settings.local.json` |
|
|
21
21
|
| `--custom <path>` / `-c` | 包含自定义钩子策略的 JS 文件路径 |
|
|
22
|
-
| `--beta` | 包含测试版策略 |
|
|
23
22
|
|
|
24
|
-
##
|
|
23
|
+
## 行为
|
|
25
24
|
|
|
26
25
|
- **不指定策略名称** - 打开交互式提示以选择策略
|
|
27
|
-
- **指定具体名称** -
|
|
26
|
+
- **指定具体名称** - 启用对应策略(追加到已启用的策略之上)
|
|
28
27
|
- **`all`** - 启用所有可用策略
|
|
29
28
|
|
|
30
|
-
|
|
29
|
+
安装操作为追加模式:再次运行 `--install` 只会添加新策略,不会移除已有策略。
|
|
31
30
|
|
|
32
31
|
## 示例
|
|
33
32
|
|
|
@@ -45,4 +44,4 @@ failproofai policies --install all
|
|
|
45
44
|
failproofai policies --install --custom ./my-policies.js
|
|
46
45
|
```
|
|
47
46
|
|
|
48
|
-
|
|
47
|
+
提供 `--custom <path>` 时,文件将立即被验证 - 它必须至少调用一次 `customPolicies.add()`。解析后的路径将以 `customPoliciesPath` 的形式保存到 `policies-config.json` 中。
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: 卸载策略
|
|
3
|
-
description: "从 Claude Code
|
|
3
|
+
description: "从 Claude Code 的设置中移除钩子条目"
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
```bash
|
|
7
7
|
failproofai policies --uninstall [policy-names...] [options]
|
|
8
8
|
```
|
|
9
9
|
|
|
10
|
-
从 Claude Code 的 `settings.json` 中移除 failproofai
|
|
10
|
+
从 Claude Code 的 `settings.json` 中移除 failproofai 钩子条目。
|
|
11
11
|
|
|
12
12
|
别名:`failproofai p -u`
|
|
13
13
|
|
|
@@ -18,25 +18,24 @@ failproofai policies --uninstall [policy-names...] [options]
|
|
|
18
18
|
| `--scope user` | 从全局设置中移除(默认) |
|
|
19
19
|
| `--scope project` | 从项目设置中移除 |
|
|
20
20
|
| `--scope local` | 从本地设置中移除 |
|
|
21
|
-
| `--scope all` |
|
|
21
|
+
| `--scope all` | 从所有作用域中一次性移除 |
|
|
22
22
|
| `--custom` / `-c` | 从配置中清除 `customPoliciesPath` |
|
|
23
|
-
| `--beta` | 仅从配置中移除 beta 策略 |
|
|
24
23
|
|
|
25
24
|
## 行为说明
|
|
26
25
|
|
|
27
|
-
-
|
|
28
|
-
- **指定具体名称** —
|
|
26
|
+
- **未指定策略名称** — 从设置文件中移除所有 failproofai 钩子条目
|
|
27
|
+
- **指定具体名称** — 禁用对应策略,但保留已安装的钩子
|
|
29
28
|
|
|
30
29
|
## 示例
|
|
31
30
|
|
|
32
31
|
```bash
|
|
33
|
-
#
|
|
32
|
+
# 全局移除所有钩子
|
|
34
33
|
failproofai policies --uninstall
|
|
35
34
|
|
|
36
|
-
#
|
|
35
|
+
# 禁用特定策略(保留已安装的钩子)
|
|
37
36
|
failproofai policies --uninstall block-sudo
|
|
38
37
|
|
|
39
|
-
#
|
|
38
|
+
# 从所有作用域中移除钩子
|
|
40
39
|
failproofai policies --uninstall --scope all
|
|
41
40
|
|
|
42
41
|
# 清除自定义策略路径
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "failproofai",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.4-beta.0",
|
|
4
4
|
"description": "The easiest way to manage policies that keep your AI agents reliable, on-task, and running autonomously — for Claude Code & the Agents SDK",
|
|
5
5
|
"bin": {
|
|
6
6
|
"failproofai": "./dist/cli.mjs"
|
|
@@ -9,7 +9,7 @@ const currentPort = parseInt(process.env.PORT, 10) || 3000
|
|
|
9
9
|
const hostname = process.env.HOSTNAME || '0.0.0.0'
|
|
10
10
|
|
|
11
11
|
let keepAliveTimeout = parseInt(process.env.KEEP_ALIVE_TIMEOUT, 10)
|
|
12
|
-
const nextConfig = {"env":{"NEXT_PUBLIC_APP_VERSION":"0.0.
|
|
12
|
+
const nextConfig = {"env":{"NEXT_PUBLIC_APP_VERSION":"0.0.4-beta.0"},"typescript":{"ignoreBuildErrors":false},"typedRoutes":false,"distDir":"./.next","cleanDistDir":true,"assetPrefix":"","cacheMaxMemorySize":52428800,"configOrigin":"next.config.ts","useFileSystemPublicRoutes":true,"generateEtags":true,"pageExtensions":["tsx","ts","jsx","js"],"poweredByHeader":true,"compress":true,"images":{"deviceSizes":[640,750,828,1080,1200,1920,2048,3840],"imageSizes":[32,48,64,96,128,256,384],"path":"/_next/image","loader":"default","loaderFile":"","domains":[],"disableStaticImages":false,"minimumCacheTTL":14400,"formats":["image/webp"],"maximumRedirects":3,"maximumResponseBody":50000000,"dangerouslyAllowLocalIP":false,"dangerouslyAllowSVG":false,"contentSecurityPolicy":"script-src 'none'; frame-src 'none'; sandbox;","contentDispositionType":"attachment","localPatterns":[{"pathname":"**","search":""}],"remotePatterns":[],"qualities":[75],"unoptimized":true,"customCacheHandler":false},"devIndicators":{"position":"bottom-left"},"onDemandEntries":{"maxInactiveAge":60000,"pagesBufferLength":5},"basePath":"","sassOptions":{},"trailingSlash":false,"i18n":null,"productionBrowserSourceMaps":false,"excludeDefaultMomentLocales":true,"reactProductionProfiling":false,"reactStrictMode":null,"reactMaxHeadersLength":6000,"httpAgentOptions":{"keepAlive":true},"logging":{"serverFunctions":true,"browserToTerminal":"warn"},"compiler":{},"expireTime":31536000,"staticPageGenerationTimeout":60,"output":"standalone","modularizeImports":{"@mui/icons-material":{"transform":"@mui/icons-material/{{member}}"},"lodash":{"transform":"lodash/{{member}}"}},"outputFileTracingRoot":"/home/runner/work/failproofai/failproofai","cacheComponents":false,"cacheLife":{"default":{"stale":300,"revalidate":900,"expire":4294967294},"seconds":{"stale":30,"revalidate":1,"expire":60},"minutes":{"stale":300,"revalidate":60,"expire":3600},"hours":{"stale":300,"revalidate":3600,"expire":86400},"days":{"stale":300,"revalidate":86400,"expire":604800},"weeks":{"stale":300,"revalidate":604800,"expire":2592000},"max":{"stale":300,"revalidate":2592000,"expire":31536000}},"cacheHandlers":{},"experimental":{"appNewScrollHandler":false,"useSkewCookie":false,"cssChunking":true,"multiZoneDraftMode":false,"appNavFailHandling":false,"prerenderEarlyExit":true,"serverMinification":true,"linkNoTouchStart":false,"caseSensitiveRoutes":false,"cachedNavigations":false,"partialFallbacks":false,"dynamicOnHover":false,"varyParams":false,"prefetchInlining":false,"preloadEntriesOnStart":true,"clientRouterFilter":true,"clientRouterFilterRedirects":false,"fetchCacheKeyPrefix":"","proxyPrefetch":"flexible","optimisticClientCache":true,"manualClientBasePath":false,"cpus":3,"memoryBasedWorkersCount":false,"imgOptConcurrency":null,"imgOptTimeoutInSeconds":7,"imgOptMaxInputPixels":268402689,"imgOptSequentialRead":null,"imgOptSkipMetadata":null,"isrFlushToDisk":true,"workerThreads":false,"optimizeCss":false,"nextScriptWorkers":false,"scrollRestoration":false,"externalDir":false,"disableOptimizedLoading":false,"gzipSize":true,"craCompat":false,"esmExternals":true,"fullySpecified":false,"swcTraceProfiling":false,"forceSwcTransforms":false,"largePageDataBytes":128000,"typedEnv":false,"parallelServerCompiles":false,"parallelServerBuildTraces":false,"ppr":false,"authInterrupts":false,"webpackMemoryOptimizations":false,"optimizeServerReact":true,"strictRouteTypes":false,"viewTransition":false,"removeUncaughtErrorAndRejectionListeners":false,"validateRSCRequestHeaders":false,"staleTimes":{"dynamic":0,"static":300},"reactDebugChannel":true,"serverComponentsHmrCache":true,"staticGenerationMaxConcurrency":8,"staticGenerationMinPagesPerWorker":25,"transitionIndicator":false,"gestureTransition":false,"inlineCss":false,"useCache":false,"globalNotFound":false,"browserDebugInfoInTerminal":"warn","lockDistDir":true,"proxyClientMaxBodySize":10485760,"hideLogsAfterAbort":false,"mcpServer":true,"turbopackFileSystemCacheForDev":true,"turbopackFileSystemCacheForBuild":false,"turbopackInferModuleSideEffects":true,"turbopackPluginRuntimeStrategy":"childProcesses","optimizePackageImports":["lucide-react","date-fns","lodash-es","ramda","antd","react-bootstrap","ahooks","@ant-design/icons","@headlessui/react","@headlessui-float/react","@heroicons/react/20/solid","@heroicons/react/24/solid","@heroicons/react/24/outline","@visx/visx","@tremor/react","rxjs","@mui/material","@mui/icons-material","recharts","react-use","effect","@effect/schema","@effect/platform","@effect/platform-node","@effect/platform-browser","@effect/platform-bun","@effect/sql","@effect/sql-mssql","@effect/sql-mysql2","@effect/sql-pg","@effect/sql-sqlite-node","@effect/sql-sqlite-bun","@effect/sql-sqlite-wasm","@effect/sql-sqlite-react-native","@effect/rpc","@effect/rpc-http","@effect/typeclass","@effect/experimental","@effect/opentelemetry","@material-ui/core","@material-ui/icons","@tabler/icons-react","mui-core","react-icons/ai","react-icons/bi","react-icons/bs","react-icons/cg","react-icons/ci","react-icons/di","react-icons/fa","react-icons/fa6","react-icons/fc","react-icons/fi","react-icons/gi","react-icons/go","react-icons/gr","react-icons/hi","react-icons/hi2","react-icons/im","react-icons/io","react-icons/io5","react-icons/lia","react-icons/lib","react-icons/lu","react-icons/md","react-icons/pi","react-icons/ri","react-icons/rx","react-icons/si","react-icons/sl","react-icons/tb","react-icons/tfi","react-icons/ti","react-icons/vsc","react-icons/wi"],"trustHostHeader":false,"isExperimentalCompile":false},"htmlLimitedBots":"[\\w-]+-Google|Google-[\\w-]+|Chrome-Lighthouse|Slurp|DuckDuckBot|baiduspider|yandex|sogou|bitlybot|tumblr|vkShare|quora link preview|redditbot|ia_archiver|Bingbot|BingPreview|applebot|facebookexternalhit|facebookcatalog|Twitterbot|LinkedInBot|Slackbot|Discordbot|WhatsApp|SkypeUriPreview|Yeti|googleweblight","bundlePagesRouterDependencies":false,"configFileName":"next.config.ts","turbopack":{"root":"/home/runner/work/failproofai/failproofai"},"distDirRoot":".next"}
|
|
13
13
|
|
|
14
14
|
process.env.__NEXT_PRIVATE_STANDALONE_CONFIG = JSON.stringify(nextConfig)
|
|
15
15
|
|
|
@@ -1385,7 +1385,6 @@ export const BUILTIN_POLICIES: BuiltinPolicyDefinition[] = [
|
|
|
1385
1385
|
match: { events: ["Stop"] },
|
|
1386
1386
|
defaultEnabled: false,
|
|
1387
1387
|
category: "Workflow",
|
|
1388
|
-
beta: true,
|
|
1389
1388
|
},
|
|
1390
1389
|
{
|
|
1391
1390
|
name: "require-push-before-stop",
|
|
@@ -1394,7 +1393,6 @@ export const BUILTIN_POLICIES: BuiltinPolicyDefinition[] = [
|
|
|
1394
1393
|
match: { events: ["Stop"] },
|
|
1395
1394
|
defaultEnabled: false,
|
|
1396
1395
|
category: "Workflow",
|
|
1397
|
-
beta: true,
|
|
1398
1396
|
params: {
|
|
1399
1397
|
remote: {
|
|
1400
1398
|
type: "string",
|
|
@@ -1415,7 +1413,6 @@ export const BUILTIN_POLICIES: BuiltinPolicyDefinition[] = [
|
|
|
1415
1413
|
match: { events: ["Stop"] },
|
|
1416
1414
|
defaultEnabled: false,
|
|
1417
1415
|
category: "Workflow",
|
|
1418
|
-
beta: true,
|
|
1419
1416
|
params: {
|
|
1420
1417
|
baseBranch: {
|
|
1421
1418
|
type: "string",
|
|
@@ -1431,7 +1428,6 @@ export const BUILTIN_POLICIES: BuiltinPolicyDefinition[] = [
|
|
|
1431
1428
|
match: { events: ["Stop"] },
|
|
1432
1429
|
defaultEnabled: false,
|
|
1433
1430
|
category: "Workflow",
|
|
1434
|
-
beta: true,
|
|
1435
1431
|
},
|
|
1436
1432
|
];
|
|
1437
1433
|
|