failproofai 0.0.6-beta.1 → 0.0.6-beta.2
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/.failproofai/policies/review-policies.mjs +4 -3
- 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]__0~kmh8w._.js → [root-of-the-server]__05akje6._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__092s1ta._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__09icjsf._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__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]__0rh.18_._.js → [root-of-the-server]__0i5kvry._.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/_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/{08t08igdql9yt.js → 00j0rr7rh8ef8.js} +1 -1
- package/.next/standalone/.next/static/chunks/{12~yi9oj8av8p.js → 05j1px0r8yzh6.js} +2 -2
- package/.next/standalone/.next/static/chunks/{09_k80d~cq2wg.js → 0badv41uxa56..js} +1 -1
- package/.next/standalone/.next/static/chunks/{0wlyoif4_kj_t.js → 0ijk_kek9_wyx.js} +1 -1
- package/.next/standalone/.next/static/chunks/{0bvhsa6zva2o..js → 0ksdlt_1hucdm.js} +1 -1
- package/.next/standalone/.next/static/chunks/{03rz6ykw-a2xi.js → 0npb~873.wvg3.js} +1 -1
- package/.next/standalone/.next/static/chunks/{01b~z8f1ws0rk.js → 0xpl.oscrakvx.js} +1 -1
- package/.next/standalone/.next/static/chunks/{0gbf4cphy8ksq.js → 1052sguyd-.ka.js} +1 -1
- package/.next/standalone/.next/static/chunks/{0v.yd0kg_ld3r.js → 14cl9poem30dq.js} +1 -1
- package/.next/standalone/CHANGELOG.md +11 -0
- package/.next/standalone/dist/cli.mjs +3 -3
- package/.next/standalone/docs/ar/built-in-policies.mdx +124 -87
- package/.next/standalone/docs/ar/custom-policies.mdx +72 -72
- package/.next/standalone/docs/ar/examples.mdx +86 -33
- package/.next/standalone/docs/ar/getting-started.mdx +82 -29
- package/.next/standalone/docs/built-in-policies.mdx +1 -1
- package/.next/standalone/docs/de/built-in-policies.mdx +93 -56
- package/.next/standalone/docs/de/custom-policies.mdx +56 -56
- package/.next/standalone/docs/de/examples.mdx +72 -18
- package/.next/standalone/docs/de/getting-started.mdx +72 -20
- package/.next/standalone/docs/es/built-in-policies.mdx +115 -78
- package/.next/standalone/docs/es/custom-policies.mdx +55 -55
- package/.next/standalone/docs/es/examples.mdx +73 -19
- package/.next/standalone/docs/es/getting-started.mdx +72 -20
- package/.next/standalone/docs/fr/built-in-policies.mdx +83 -46
- package/.next/standalone/docs/fr/custom-policies.mdx +51 -51
- package/.next/standalone/docs/fr/examples.mdx +78 -24
- package/.next/standalone/docs/fr/getting-started.mdx +65 -13
- package/.next/standalone/docs/he/built-in-policies.mdx +156 -117
- package/.next/standalone/docs/he/custom-policies.mdx +75 -75
- package/.next/standalone/docs/he/examples.mdx +87 -33
- package/.next/standalone/docs/he/getting-started.mdx +84 -33
- package/.next/standalone/docs/hi/built-in-policies.mdx +101 -60
- package/.next/standalone/docs/hi/custom-policies.mdx +71 -70
- package/.next/standalone/docs/hi/examples.mdx +90 -36
- package/.next/standalone/docs/hi/getting-started.mdx +80 -27
- package/.next/standalone/docs/i18n/README.ar.md +69 -69
- package/.next/standalone/docs/i18n/README.de.md +46 -46
- package/.next/standalone/docs/i18n/README.es.md +42 -42
- package/.next/standalone/docs/i18n/README.fr.md +39 -39
- package/.next/standalone/docs/i18n/README.he.md +83 -83
- package/.next/standalone/docs/i18n/README.hi.md +69 -69
- package/.next/standalone/docs/i18n/README.it.md +72 -72
- package/.next/standalone/docs/i18n/README.ja.md +71 -71
- package/.next/standalone/docs/i18n/README.ko.md +52 -52
- package/.next/standalone/docs/i18n/README.pt-br.md +44 -44
- package/.next/standalone/docs/i18n/README.ru.md +66 -66
- package/.next/standalone/docs/i18n/README.tr.md +82 -83
- package/.next/standalone/docs/i18n/README.vi.md +70 -71
- package/.next/standalone/docs/i18n/README.zh.md +51 -51
- package/.next/standalone/docs/it/built-in-policies.mdx +118 -81
- package/.next/standalone/docs/it/custom-policies.mdx +69 -69
- package/.next/standalone/docs/it/examples.mdx +93 -39
- package/.next/standalone/docs/it/getting-started.mdx +73 -21
- package/.next/standalone/docs/ja/built-in-policies.mdx +98 -61
- package/.next/standalone/docs/ja/custom-policies.mdx +71 -71
- package/.next/standalone/docs/ja/examples.mdx +76 -22
- package/.next/standalone/docs/ja/getting-started.mdx +65 -13
- package/.next/standalone/docs/ko/built-in-policies.mdx +137 -100
- package/.next/standalone/docs/ko/custom-policies.mdx +67 -67
- package/.next/standalone/docs/ko/examples.mdx +87 -33
- package/.next/standalone/docs/ko/getting-started.mdx +61 -9
- package/.next/standalone/docs/pt-br/built-in-policies.mdx +94 -57
- package/.next/standalone/docs/pt-br/custom-policies.mdx +56 -56
- package/.next/standalone/docs/pt-br/examples.mdx +78 -24
- package/.next/standalone/docs/pt-br/getting-started.mdx +64 -12
- package/.next/standalone/docs/ru/built-in-policies.mdx +142 -105
- package/.next/standalone/docs/ru/custom-policies.mdx +82 -81
- package/.next/standalone/docs/ru/examples.mdx +77 -22
- package/.next/standalone/docs/ru/getting-started.mdx +74 -22
- package/.next/standalone/docs/tr/built-in-policies.mdx +104 -67
- package/.next/standalone/docs/tr/custom-policies.mdx +59 -60
- package/.next/standalone/docs/tr/examples.mdx +97 -42
- package/.next/standalone/docs/tr/getting-started.mdx +75 -23
- package/.next/standalone/docs/vi/built-in-policies.mdx +110 -72
- package/.next/standalone/docs/vi/custom-policies.mdx +68 -68
- package/.next/standalone/docs/vi/examples.mdx +93 -38
- package/.next/standalone/docs/vi/getting-started.mdx +74 -22
- package/.next/standalone/docs/zh/built-in-policies.mdx +132 -95
- package/.next/standalone/docs/zh/custom-policies.mdx +49 -49
- package/.next/standalone/docs/zh/examples.mdx +90 -36
- package/.next/standalone/docs/zh/getting-started.mdx +73 -21
- package/.next/standalone/package.json +1 -1
- package/.next/standalone/server.js +1 -1
- package/.next/standalone/src/hooks/builtin-policies.ts +5 -1
- package/dist/cli.mjs +3 -3
- package/package.json +1 -1
- package/src/hooks/builtin-policies.ts +5 -1
- /package/.next/standalone/.next/static/{CkmOT-ZvDN-sVULinGVKT → A9pNTZdoYJTVyPAYwQMx5}/_buildManifest.js +0 -0
- /package/.next/standalone/.next/static/{CkmOT-ZvDN-sVULinGVKT → A9pNTZdoYJTVyPAYwQMx5}/_clientMiddlewareManifest.js +0 -0
- /package/.next/standalone/.next/static/{CkmOT-ZvDN-sVULinGVKT → A9pNTZdoYJTVyPAYwQMx5}/_ssgManifest.js +0 -0
|
@@ -1,10 +1,12 @@
|
|
|
1
|
+
---
|
|
2
|
+
|
|
1
3
|
---
|
|
2
4
|
title: Built-in Policies
|
|
3
|
-
description: "सभी 30 built-in policies जो agent failure modes को
|
|
5
|
+
description: "सभी 30 built-in policies जो agent failure modes को पकड़ते हैं"
|
|
4
6
|
icon: shield
|
|
5
7
|
---
|
|
6
8
|
|
|
7
|
-
failproofai 30 built-in policies
|
|
9
|
+
failproofai के साथ 30 built-in policies आती हैं जो common agent failure modes को पकड़ते हैं। प्रत्येक policy एक specific hook event type और tool name पर fire होती है। नौ policies parameters स्वीकार करती हैं जो आपको code लिखे बिना उनके behavior को tune करने देते हैं। चार workflow policies एक commit → push → PR → CI pipeline को enforce करती हैं इससे पहले कि Claude stop हो।
|
|
8
10
|
|
|
9
11
|
---
|
|
10
12
|
|
|
@@ -21,37 +23,38 @@ Policies को categories में grouped किया गया है:
|
|
|
21
23
|
| [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
24
|
| [Database](#database) | warn-destructive-sql, warn-schema-alteration | PreToolUse |
|
|
23
25
|
| [Warnings](#warnings) | warn-large-file-write, warn-package-publish, warn-background-process, warn-global-package-install | PreToolUse |
|
|
26
|
+
| [Package managers](#package-managers) | prefer-package-manager | PreToolUse |
|
|
24
27
|
| [Workflow](#workflow) | require-commit-before-stop, require-push-before-stop, require-pr-before-stop, require-ci-green-before-stop | Stop |
|
|
25
28
|
|
|
26
|
-
- **`block-`** — agent को
|
|
29
|
+
- **`block-`** — agent को आगे बढ़ने से रोकता है।
|
|
27
30
|
- **`warn-`** — agent को additional context देता है ताकि वह self-correct कर सके।
|
|
28
|
-
- **`sanitize-`** — tool output से sensitive data को scrub करता
|
|
29
|
-
- **`require-`** —
|
|
31
|
+
- **`sanitize-`** — agent को देखने से पहले tool output से sensitive data को scrub करता है।
|
|
32
|
+
- **`require-`** — जब तक conditions पूरी न हों Stop event को block करता है।
|
|
30
33
|
|
|
31
34
|
---
|
|
32
35
|
|
|
33
36
|
<Tip>
|
|
34
|
-
हर policy `policyParams` में एक optional `hint` field को support करती है।
|
|
37
|
+
हर policy `policyParams` में एक optional `hint` field को support करती है। hint को deny या instruct message में append किया जाता है जो Claude देखता है, जिससे policy code को modify किए बिना actionable guidance मिलती है। Built-in, custom, और convention policies के साथ काम करता है। विवरण के लिए [Configuration → hint](/hi/configuration#hint-cross-cutting) देखें।
|
|
35
38
|
</Tip>
|
|
36
39
|
|
|
37
40
|
---
|
|
38
41
|
|
|
39
42
|
## Dangerous commands
|
|
40
43
|
|
|
41
|
-
Agents को उन operations से रोकें जो undo
|
|
44
|
+
Agents को उन operations चलाने से रोकें जो undo करना मुश्किल हैं या host system को damage कर सकते हैं।
|
|
42
45
|
|
|
43
46
|
### `block-sudo`
|
|
44
47
|
|
|
45
48
|
**Event:** PreToolUse (Bash)
|
|
46
49
|
**Default:** किसी भी `sudo` command को deny करता है।
|
|
47
50
|
|
|
48
|
-
|
|
51
|
+
उन invocations को block करता है जिनमें `sudo` keyword शामिल है। Pattern matching parsed command tokens पर की जाती है, raw string पर नहीं, shell operator injection के माध्यम से bypass को prevent करने के लिए।
|
|
49
52
|
|
|
50
53
|
**Parameters:**
|
|
51
54
|
|
|
52
55
|
| Param | Type | Default | Description |
|
|
53
56
|
|-------|------|---------|-------------|
|
|
54
|
-
| `allowPatterns` | `string[]` | `[]` | Exact command prefixes जो permitted हैं। प्रत्येक entry को parsed argv tokens के
|
|
57
|
+
| `allowPatterns` | `string[]` | `[]` | Exact command prefixes जो permitted हैं। प्रत्येक entry को parsed argv tokens के विरुद्ध match किया जाता है। |
|
|
55
58
|
|
|
56
59
|
**Example:**
|
|
57
60
|
|
|
@@ -65,10 +68,10 @@ Invocations को block करता है जिनमें `sudo` keyword
|
|
|
65
68
|
}
|
|
66
69
|
```
|
|
67
70
|
|
|
68
|
-
इस config के साथ, `sudo systemctl status nginx`
|
|
71
|
+
इस config के साथ, `sudo systemctl status nginx` allowed है, लेकिन `sudo rm /etc/hosts` denied है।
|
|
69
72
|
|
|
70
73
|
<Note>
|
|
71
|
-
Patterns को raw command string
|
|
74
|
+
Patterns को raw command string के विरुद्ध नहीं, parsed tokens के विरुद्ध match किया जाता है। यह appended shell operators के माध्यम से bypass को prevent करता है (उदाहरण के लिए `sudo systemctl status x; rm -rf /` `sudo systemctl status *` से match नहीं करता)।
|
|
72
75
|
</Note>
|
|
73
76
|
|
|
74
77
|
---
|
|
@@ -82,7 +85,7 @@ Patterns को raw command string पर नहीं, parsed tokens के aga
|
|
|
82
85
|
|
|
83
86
|
| Param | Type | Default | Description |
|
|
84
87
|
|-------|------|---------|-------------|
|
|
85
|
-
| `allowPaths` | `string[]` | `[]` | Paths जो recursively delete करने के लिए safe हैं (
|
|
88
|
+
| `allowPaths` | `string[]` | `[]` | Paths जो recursively delete करने के लिए safe हैं (उदाहरण के लिए `/tmp`)। |
|
|
86
89
|
|
|
87
90
|
**Example:**
|
|
88
91
|
|
|
@@ -110,7 +113,7 @@ Patterns को raw command string पर नहीं, parsed tokens के aga
|
|
|
110
113
|
### `block-failproofai-commands`
|
|
111
114
|
|
|
112
115
|
**Event:** PreToolUse (Bash)
|
|
113
|
-
**Default:** उन commands को deny करता है जो failproofai को uninstall या disable करेंगे (
|
|
116
|
+
**Default:** उन commands को deny करता है जो failproofai को uninstall या disable करेंगे (उदाहरण के लिए `npm uninstall failproofai`, `failproofai policies --uninstall`)।
|
|
114
117
|
|
|
115
118
|
कोई parameters नहीं।
|
|
116
119
|
|
|
@@ -118,12 +121,12 @@ Patterns को raw command string पर नहीं, parsed tokens के aga
|
|
|
118
121
|
|
|
119
122
|
## Secrets (sanitizers)
|
|
120
123
|
|
|
121
|
-
Agents को अपने context या output में
|
|
124
|
+
Agents को credentials को अपने context या output में leak करने से रोकें। Sanitizer policies **PostToolUse** events पर fire होती हैं। जब Claude एक Bash command चलाता है, एक file को read करता है, या कोई भी tool को call करता है, ये policies output को inspect करते हैं इससे पहले कि यह Claude को return किया जाए। अगर एक secret pattern detect होता है, तो policy एक deny decision return करता है जो output को pass back होने से prevent करता है।
|
|
122
125
|
|
|
123
126
|
### `sanitize-jwt`
|
|
124
127
|
|
|
125
|
-
**Event:** PostToolUse (
|
|
126
|
-
**Default:** JWT tokens को redact करता है (तीन base64url segments
|
|
128
|
+
**Event:** PostToolUse (all tools)
|
|
129
|
+
**Default:** JWT tokens को redact करता है (तीन base64url segments `.` से separated)।
|
|
127
130
|
|
|
128
131
|
कोई parameters नहीं।
|
|
129
132
|
|
|
@@ -131,14 +134,14 @@ Agents को अपने context या output में credentials leak क
|
|
|
131
134
|
|
|
132
135
|
### `sanitize-api-keys`
|
|
133
136
|
|
|
134
|
-
**Event:** PostToolUse (
|
|
137
|
+
**Event:** PostToolUse (all tools)
|
|
135
138
|
**Default:** Common API key formats को redact करता है: Anthropic (`sk-ant-`), OpenAI (`sk-`), GitHub PATs (`ghp_`), AWS access keys (`AKIA`), Stripe keys (`sk_live_`, `sk_test_`), और Google API keys (`AIza`)।
|
|
136
139
|
|
|
137
140
|
**Parameters:**
|
|
138
141
|
|
|
139
142
|
| Param | Type | Default | Description |
|
|
140
143
|
|-------|------|---------|-------------|
|
|
141
|
-
| `additionalPatterns` | `{ regex: string; label: string }[]` | `[]` | Additional regex patterns
|
|
144
|
+
| `additionalPatterns` | `{ regex: string; label: string }[]` | `[]` | Additional regex patterns जो secrets के रूप में treat किए जाएं। |
|
|
142
145
|
|
|
143
146
|
**Example:**
|
|
144
147
|
|
|
@@ -159,8 +162,8 @@ Agents को अपने context या output में credentials leak क
|
|
|
159
162
|
|
|
160
163
|
### `sanitize-connection-strings`
|
|
161
164
|
|
|
162
|
-
**Event:** PostToolUse (
|
|
163
|
-
**Default:** Database connection strings को redact करता है जिनमें embedded credentials
|
|
165
|
+
**Event:** PostToolUse (all tools)
|
|
166
|
+
**Default:** Database connection strings को redact करता है जिनमें embedded credentials हैं (उदाहरण के लिए `postgresql://user:password@host/db`)।
|
|
164
167
|
|
|
165
168
|
कोई parameters नहीं।
|
|
166
169
|
|
|
@@ -168,7 +171,7 @@ Agents को अपने context या output में credentials leak क
|
|
|
168
171
|
|
|
169
172
|
### `sanitize-private-key-content`
|
|
170
173
|
|
|
171
|
-
**Event:** PostToolUse (
|
|
174
|
+
**Event:** PostToolUse (all tools)
|
|
172
175
|
**Default:** PEM blocks को redact करता है (`-----BEGIN PRIVATE KEY-----`, `-----BEGIN RSA PRIVATE KEY-----`, आदि)।
|
|
173
176
|
|
|
174
177
|
कोई parameters नहीं।
|
|
@@ -177,8 +180,8 @@ Agents को अपने context या output में credentials leak क
|
|
|
177
180
|
|
|
178
181
|
### `sanitize-bearer-tokens`
|
|
179
182
|
|
|
180
|
-
**Event:** PostToolUse (
|
|
181
|
-
**Default:** `Authorization: Bearer <token>` headers को redact करता है जहां token 20 या उससे
|
|
183
|
+
**Event:** PostToolUse (all tools)
|
|
184
|
+
**Default:** `Authorization: Bearer <token>` headers को redact करता है जहां token 20 या उससे अधिक characters का हो।
|
|
182
185
|
|
|
183
186
|
कोई parameters नहीं।
|
|
184
187
|
|
|
@@ -186,14 +189,14 @@ Agents को अपने context या output में credentials leak क
|
|
|
186
189
|
|
|
187
190
|
## Environment
|
|
188
191
|
|
|
189
|
-
Agents द्वारा sensitive environment configuration को read या expose
|
|
192
|
+
Agents द्वारा sensitive environment configuration को read या expose होने से protect करें।
|
|
190
193
|
|
|
191
194
|
### `block-env-files`
|
|
192
195
|
|
|
193
196
|
**Event:** PreToolUse (Bash, Read)
|
|
194
|
-
**Default:** `.env` files को read करने को deny करता है
|
|
197
|
+
**Default:** `.env` files को read करने को deny करता है `cat .env` के माध्यम से, Read tool calls जहां file path `.env` हो, आदि।
|
|
195
198
|
|
|
196
|
-
`.envrc` या अन्य environment-adjacent files को block नहीं करता
|
|
199
|
+
`.envrc` या अन्य environment-adjacent files को block नहीं करता - केवल उन files को जो exactly `.env` नाम के हों।
|
|
197
200
|
|
|
198
201
|
कोई parameters नहीं।
|
|
199
202
|
|
|
@@ -210,7 +213,7 @@ Agents द्वारा sensitive environment configuration को read या
|
|
|
210
213
|
|
|
211
214
|
## File access
|
|
212
215
|
|
|
213
|
-
Agents को project boundaries के अंदर काम करने और sensitive files से दूर
|
|
216
|
+
Agents को project boundaries के अंदर काम करने और sensitive files से दूर रखें।
|
|
214
217
|
|
|
215
218
|
### `block-read-outside-cwd`
|
|
216
219
|
|
|
@@ -240,13 +243,13 @@ Agents को project boundaries के अंदर काम करने औ
|
|
|
240
243
|
### `block-secrets-write`
|
|
241
244
|
|
|
242
245
|
**Event:** PreToolUse (Write, Edit)
|
|
243
|
-
**Default:**
|
|
246
|
+
**Default:** उन common files में writes को deny करता है जो private keys और certificates के लिए उपयोग किए जाते हैं: `id_rsa`, `id_ed25519`, `*.key`, `*.pem`, `*.p12`, `*.pfx`।
|
|
244
247
|
|
|
245
248
|
**Parameters:**
|
|
246
249
|
|
|
247
250
|
| Param | Type | Default | Description |
|
|
248
251
|
|-------|------|---------|-------------|
|
|
249
|
-
| `additionalPatterns` | `string[]` | `[]` | Additional filename patterns (glob-style)
|
|
252
|
+
| `additionalPatterns` | `string[]` | `[]` | Additional filename patterns (glob-style) जो block करने हैं। |
|
|
250
253
|
|
|
251
254
|
**Example:**
|
|
252
255
|
|
|
@@ -264,7 +267,7 @@ Agents को project boundaries के अंदर काम करने औ
|
|
|
264
267
|
|
|
265
268
|
## Git
|
|
266
269
|
|
|
267
|
-
Accidental pushes, force-pushes, और branch mistakes को
|
|
270
|
+
Accidental pushes, force-pushes, और branch mistakes को prevent करें जो undo करना मुश्किल है।
|
|
268
271
|
|
|
269
272
|
### `block-push-master`
|
|
270
273
|
|
|
@@ -275,7 +278,7 @@ Accidental pushes, force-pushes, और branch mistakes को रोकें
|
|
|
275
278
|
|
|
276
279
|
| Param | Type | Default | Description |
|
|
277
280
|
|-------|------|---------|-------------|
|
|
278
|
-
| `protectedBranches` | `string[]` | `["main", "master"]` | Branch names
|
|
281
|
+
| `protectedBranches` | `string[]` | `["main", "master"]` | Branch names जो directly push नहीं किए जा सकते। |
|
|
279
282
|
|
|
280
283
|
**Example:**
|
|
281
284
|
|
|
@@ -290,7 +293,7 @@ Accidental pushes, force-pushes, और branch mistakes को रोकें
|
|
|
290
293
|
```
|
|
291
294
|
|
|
292
295
|
<Tip>
|
|
293
|
-
सभी branches में
|
|
296
|
+
सभी branches में pushing को allow करने के लिए (इस policy को `enabledPolicies` से remove किए बिना effectively disable करने के लिए), `protectedBranches: []` set करें।
|
|
294
297
|
</Tip>
|
|
295
298
|
|
|
296
299
|
---
|
|
@@ -304,7 +307,7 @@ Accidental pushes, force-pushes, और branch mistakes को रोकें
|
|
|
304
307
|
|
|
305
308
|
| Param | Type | Default | Description |
|
|
306
309
|
|-------|------|---------|-------------|
|
|
307
|
-
| `protectedBranches` | `string[]` | `["main", "master"]` | Branch names
|
|
310
|
+
| `protectedBranches` | `string[]` | `["main", "master"]` | Branch names जो directly checkout नहीं किए जा सकते। |
|
|
308
311
|
|
|
309
312
|
---
|
|
310
313
|
|
|
@@ -313,13 +316,13 @@ Accidental pushes, force-pushes, और branch mistakes को रोकें
|
|
|
313
316
|
**Event:** PreToolUse (Bash)
|
|
314
317
|
**Default:** `git push --force` और `git push -f` को deny करता है।
|
|
315
318
|
|
|
316
|
-
कोई policy-specific parameters नहीं।
|
|
319
|
+
कोई policy-specific parameters नहीं। Alternatives suggest करने के लिए cross-cutting [`hint`](/hi/configuration#hint-cross-cutting) का उपयोग करें:
|
|
317
320
|
|
|
318
321
|
```json
|
|
319
322
|
{
|
|
320
323
|
"policyParams": {
|
|
321
324
|
"block-force-push": {
|
|
322
|
-
"hint": "अपने current HEAD से एक
|
|
325
|
+
"hint": "अपने current HEAD से एक नया branch create करें (उदाहरण के लिए `git checkout -b <new-branch>`) और उसे push करें।"
|
|
323
326
|
}
|
|
324
327
|
}
|
|
325
328
|
}
|
|
@@ -330,7 +333,7 @@ Accidental pushes, force-pushes, और branch mistakes को रोकें
|
|
|
330
333
|
### `warn-git-amend`
|
|
331
334
|
|
|
332
335
|
**Event:** PreToolUse (Bash)
|
|
333
|
-
**Default:** Claude को carefully proceed करने के लिए instruct करता है जब `git commit --amend`
|
|
336
|
+
**Default:** Claude को carefully proceed करने के लिए instruct करता है जब `git commit --amend` चला रहा हो। Command को block नहीं करता।
|
|
334
337
|
|
|
335
338
|
कोई parameters नहीं।
|
|
336
339
|
|
|
@@ -339,7 +342,7 @@ Accidental pushes, force-pushes, और branch mistakes को रोकें
|
|
|
339
342
|
### `warn-git-stash-drop`
|
|
340
343
|
|
|
341
344
|
**Event:** PreToolUse (Bash)
|
|
342
|
-
**Default:** Claude को confirm करने के लिए instruct करता
|
|
345
|
+
**Default:** Claude को `git stash drop` चलाने से पहले confirm करने के लिए instruct करता है। Command को block नहीं करता।
|
|
343
346
|
|
|
344
347
|
कोई parameters नहीं।
|
|
345
348
|
|
|
@@ -348,7 +351,7 @@ Accidental pushes, force-pushes, और branch mistakes को रोकें
|
|
|
348
351
|
### `warn-all-files-staged`
|
|
349
352
|
|
|
350
353
|
**Event:** PreToolUse (Bash)
|
|
351
|
-
**Default:** Claude को review करने के लिए instruct करता है कि वह क्या stage कर रहा है जब `git add -A` या `git add .`
|
|
354
|
+
**Default:** Claude को review करने के लिए instruct करता है कि वह क्या stage कर रहा है जब `git add -A` या `git add .` चलाता है। Command को block नहीं करता।
|
|
352
355
|
|
|
353
356
|
कोई parameters नहीं।
|
|
354
357
|
|
|
@@ -356,12 +359,12 @@ Accidental pushes, force-pushes, और branch mistakes को रोकें
|
|
|
356
359
|
|
|
357
360
|
## Database
|
|
358
361
|
|
|
359
|
-
|
|
362
|
+
Database के विरुद्ध execute होने से पहले destructive SQL operations को catch करें।
|
|
360
363
|
|
|
361
364
|
### `warn-destructive-sql`
|
|
362
365
|
|
|
363
366
|
**Event:** PreToolUse (Bash)
|
|
364
|
-
**Default:** Claude को confirm करने के लिए instruct करता है `DROP TABLE`, `DROP DATABASE`, या `
|
|
367
|
+
**Default:** Claude को confirm करने के लिए instruct करता है `DROP TABLE`, `DROP DATABASE`, या `WHERE` clause के बिना `DELETE` containing SQL चलाने से पहले।
|
|
365
368
|
|
|
366
369
|
कोई parameters नहीं।
|
|
367
370
|
|
|
@@ -370,7 +373,7 @@ Destructive SQL operations को execute होने से पहले catch
|
|
|
370
373
|
### `warn-schema-alteration`
|
|
371
374
|
|
|
372
375
|
**Event:** PreToolUse (Bash)
|
|
373
|
-
**Default:** Claude को confirm करने के लिए instruct करता
|
|
376
|
+
**Default:** Claude को `ALTER TABLE` statements चलाने से पहले confirm करने के लिए instruct करता है।
|
|
374
377
|
|
|
375
378
|
कोई parameters नहीं।
|
|
376
379
|
|
|
@@ -383,13 +386,13 @@ Agents को potentially risky लेकिन non-destructive operations स
|
|
|
383
386
|
### `warn-large-file-write`
|
|
384
387
|
|
|
385
388
|
**Event:** PreToolUse (Write)
|
|
386
|
-
**Default:** Claude को
|
|
389
|
+
**Default:** Claude को 1024 KB से बड़ी files write करने से पहले confirm करने के लिए instruct करता है।
|
|
387
390
|
|
|
388
391
|
**Parameters:**
|
|
389
392
|
|
|
390
393
|
| Param | Type | Default | Description |
|
|
391
394
|
|-------|------|---------|-------------|
|
|
392
|
-
| `thresholdKb` | `number` | `1024` | File size threshold kilobytes में
|
|
395
|
+
| `thresholdKb` | `number` | `1024` | File size threshold kilobytes में जिससे ऊपर एक warning issue किया जाता है। |
|
|
393
396
|
|
|
394
397
|
**Example:**
|
|
395
398
|
|
|
@@ -404,7 +407,7 @@ Agents को potentially risky लेकिन non-destructive operations स
|
|
|
404
407
|
```
|
|
405
408
|
|
|
406
409
|
<Note>
|
|
407
|
-
Hook handler payloads पर 1 MB stdin limit
|
|
410
|
+
Hook handler payloads पर 1 MB stdin limit enforce करता है। इस policy को small content के साथ test करने के लिए, `thresholdKb` को एक value set करें जो 1024 से बहुत कम हो।
|
|
408
411
|
</Note>
|
|
409
412
|
|
|
410
413
|
---
|
|
@@ -412,7 +415,7 @@ Hook handler payloads पर 1 MB stdin limit को enforce करता है
|
|
|
412
415
|
### `warn-package-publish`
|
|
413
416
|
|
|
414
417
|
**Event:** PreToolUse (Bash)
|
|
415
|
-
**Default:** Claude को confirm करने के लिए instruct करता
|
|
418
|
+
**Default:** Claude को `npm publish` चलाने से पहले confirm करने के लिए instruct करता है।
|
|
416
419
|
|
|
417
420
|
कोई parameters नहीं।
|
|
418
421
|
|
|
@@ -421,7 +424,7 @@ Hook handler payloads पर 1 MB stdin limit को enforce करता है
|
|
|
421
424
|
### `warn-background-process`
|
|
422
425
|
|
|
423
426
|
**Event:** PreToolUse (Bash)
|
|
424
|
-
**Default:** Claude को careful रहने के लिए instruct करता है जब `nohup`, `&`, `disown`, या `screen` के
|
|
427
|
+
**Default:** Claude को careful रहने के लिए instruct करता है जब `nohup`, `&`, `disown`, या `screen` के via background processes launch कर रहा हो।
|
|
425
428
|
|
|
426
429
|
कोई parameters नहीं।
|
|
427
430
|
|
|
@@ -430,20 +433,56 @@ Hook handler payloads पर 1 MB stdin limit को enforce करता है
|
|
|
430
433
|
### `warn-global-package-install`
|
|
431
434
|
|
|
432
435
|
**Event:** PreToolUse (Bash)
|
|
433
|
-
**Default:** Claude को
|
|
436
|
+
**Default:** Claude को `npm install -g`, `yarn global add`, या virtual environment के बिना `pip install` चलाने से पहले confirm करने के लिए instruct करता है।
|
|
434
437
|
|
|
435
438
|
कोई parameters नहीं।
|
|
436
439
|
|
|
437
440
|
---
|
|
438
441
|
|
|
442
|
+
## Package managers
|
|
443
|
+
|
|
444
|
+
Enforce करें कि agent किस package manager को use करने के लिए allowed है।
|
|
445
|
+
|
|
446
|
+
### `prefer-package-manager`
|
|
447
|
+
|
|
448
|
+
**Event:** PreToolUse (Bash)
|
|
449
|
+
**Default:** Disabled। जब enabled हो, तो `allowed` list में न होने वाली किसी भी package manager command को block करता है और Claude को एक allowed manager का उपयोग करके command को rewrite करने के लिए कहता है।
|
|
450
|
+
|
|
451
|
+
Detects: pip, pip3, python -m pip, npm, npx, yarn, pnpm, pnpx, bun, bunx, uv, poetry, pipenv, conda, cargo।
|
|
452
|
+
|
|
453
|
+
| Parameter | Type | Default | Description |
|
|
454
|
+
|-----------|------|---------|-------------|
|
|
455
|
+
| `allowed` | string[] | `[]` | Allowed package manager names। इस list में न होने वाले किसी भी detected manager को block किया जाता है। जब empty हो, तो policy एक no-op है। |
|
|
456
|
+
| `blocked` | string[] | `[]` | Built-in list के beyond additional manager names को block करने के लिए (उदाहरण के लिए `['pdm', 'pipx']`)। |
|
|
457
|
+
|
|
458
|
+
Built-in block list cover करता है: pip, pip3, npm, npx, yarn, pnpm, pnpx, bun, bunx, uv, poetry, pipenv, conda, cargo। इस list में न होने वाले managers को append करने के लिए `blocked` का उपयोग करें।
|
|
459
|
+
|
|
460
|
+
**Example configuration:**
|
|
461
|
+
|
|
462
|
+
```json
|
|
463
|
+
{
|
|
464
|
+
"enabledPolicies": ["prefer-package-manager"],
|
|
465
|
+
"policyParams": {
|
|
466
|
+
"prefer-package-manager": {
|
|
467
|
+
"allowed": ["uv", "bun"],
|
|
468
|
+
"blocked": ["pdm", "pipx"]
|
|
469
|
+
}
|
|
470
|
+
}
|
|
471
|
+
}
|
|
472
|
+
```
|
|
473
|
+
|
|
474
|
+
इस config के साथ, `pip install flask` और `pdm install flask` दोनों denied हैं Claude को `uv` या `bun` का उपयोग करने के लिए कहने वाले एक message के साथ। `uv pip install flask` जैसे commands allowed हैं क्योंकि `uv` allowlist में है और पहले check किया जाता है।
|
|
475
|
+
|
|
476
|
+
---
|
|
477
|
+
|
|
439
478
|
## AI behavior
|
|
440
479
|
|
|
441
480
|
Detect करें जब agents stuck हो जाएं या unexpectedly behave करें।
|
|
442
481
|
|
|
443
482
|
### `warn-repeated-tool-calls`
|
|
444
483
|
|
|
445
|
-
**Event:** PreToolUse (
|
|
446
|
-
**Default:** Claude को reconsider करने के लिए instruct करता है जब same tool को 3+
|
|
484
|
+
**Event:** PreToolUse (all tools)
|
|
485
|
+
**Default:** Claude को reconsider करने के लिए instruct करता है जब same tool को 3+ बार identical parameters के साथ call किया जाता है - एक common sign कि agent एक loop में stuck है।
|
|
447
486
|
|
|
448
487
|
कोई parameters नहीं।
|
|
449
488
|
|
|
@@ -451,14 +490,14 @@ Detect करें जब agents stuck हो जाएं या unexpectedly
|
|
|
451
490
|
|
|
452
491
|
## Workflow
|
|
453
492
|
|
|
454
|
-
एक disciplined end-of-session workflow को enforce करें। ये policies **Stop** event पर fire होती हैं और
|
|
493
|
+
एक disciplined end-of-session workflow को enforce करें। ये policies **Stop** event पर fire होती हैं और जब तक प्रत्येक condition पूरी न हो Claude को stop करने से deny करती हैं। वे एक natural dependency chain follow करती हैं: commit → push → PR → CI। अगर एक policy deny करती है, तो chain में later policies को skip किया जाता है (deny short-circuits)।
|
|
455
494
|
|
|
456
|
-
सभी workflow policies **fail-open** हैं: अगर required tool available नहीं है (
|
|
495
|
+
सभी workflow policies **fail-open** हैं: अगर required tool available नहीं है (उदाहरण के लिए `gh` installed नहीं है, no git remote), तो policy allow करती है एक informational message के साथ जो explain करता है कि check को क्यों skip किया गया था।
|
|
457
496
|
|
|
458
497
|
### `require-commit-before-stop`
|
|
459
498
|
|
|
460
499
|
**Event:** Stop
|
|
461
|
-
**Default:** Uncommitted changes (modified, staged, या untracked files) होने पर
|
|
500
|
+
**Default:** Uncommitted changes (modified, staged, या untracked files) होने पर stop करने को deny करता है। Working directory clean होने पर एक informational message return करता है।
|
|
462
501
|
|
|
463
502
|
कोई parameters नहीं।
|
|
464
503
|
|
|
@@ -467,7 +506,7 @@ Detect करें जब agents stuck हो जाएं या unexpectedly
|
|
|
467
506
|
### `require-push-before-stop`
|
|
468
507
|
|
|
469
508
|
**Event:** Stop
|
|
470
|
-
**Default:** Unpushed commits होने
|
|
509
|
+
**Default:** Unpushed commits होने या current branch के पास no remote tracking branch होने पर stop करने को deny करता है। `git push -u` suggest करता है एक tracking branch create करने के लिए अगर जरूरत हो। अगर कोई remote configured न हो तो fail open करता है।
|
|
471
510
|
|
|
472
511
|
**Parameters:**
|
|
473
512
|
|
|
@@ -492,13 +531,14 @@ Detect करें जब agents stuck हो जाएं या unexpectedly
|
|
|
492
531
|
### `require-pr-before-stop`
|
|
493
532
|
|
|
494
533
|
**Event:** Stop
|
|
495
|
-
**Default:** जब current branch के लिए कोई pull request exist
|
|
534
|
+
**Default:** जब current branch के लिए कोई pull request exist नहीं करता, या जब existing PR closed/merged हो, तो stop करने को deny करता है। Claude को `gh pr create` के साथ PR create करने के लिए instruct करता है।
|
|
496
535
|
|
|
497
536
|
कोई parameters नहीं।
|
|
498
537
|
|
|
499
538
|
<Note>
|
|
500
|
-
इस policy को [GitHub CLI](https://cli.github.com/) (`gh`)
|
|
501
|
-
|
|
539
|
+
इस policy को [GitHub CLI](https://cli.github.com/) (`gh`) install और authenticated होना required है।
|
|
540
|
+
एक personal access token के साथ `gh auth login` चलाएं जिसके पास pull requests तक read access के लिए `repo` scope हो।
|
|
541
|
+
अगर `gh` install नहीं है या authenticated नहीं है, तो policy fail open करती है और reason को Claude को report करती है।
|
|
502
542
|
</Note>
|
|
503
543
|
|
|
504
544
|
---
|
|
@@ -506,13 +546,14 @@ Detect करें जब agents stuck हो जाएं या unexpectedly
|
|
|
506
546
|
### `require-ci-green-before-stop`
|
|
507
547
|
|
|
508
548
|
**Event:** Stop
|
|
509
|
-
**Default:** जब CI checks current branch पर failing या still running
|
|
549
|
+
**Default:** जब CI checks current branch पर failing या still running हों, तो stop करने को deny करता है। GitHub Actions workflow runs और third-party bot checks दोनों को check करता है (उदाहरण के लिए CodeRabbit, SonarCloud, Codecov)। `skipped` conclusions को success के रूप में treat करता है। सभी checks pass होने पर एक informational message return करता है।
|
|
510
550
|
|
|
511
551
|
कोई parameters नहीं।
|
|
512
552
|
|
|
513
553
|
<Note>
|
|
514
|
-
इस policy को [GitHub CLI](https://cli.github.com/) (`gh`)
|
|
515
|
-
|
|
554
|
+
इस policy को [GitHub CLI](https://cli.github.com/) (`gh`) install और authenticated होना required है।
|
|
555
|
+
एक personal access token के साथ `gh auth login` चलाएं जिसके पास Actions workflow runs और Checks API तक read access के लिए `repo` scope हो।
|
|
556
|
+
अगर `gh` install नहीं है या authenticated नहीं है, तो policy fail open करती है और reason को Claude को report करती है।
|
|
516
557
|
</Note>
|
|
517
558
|
|
|
518
559
|
---
|
|
@@ -532,4 +573,4 @@ Detect करें जब agents stuck हो जाएं या unexpectedly
|
|
|
532
573
|
}
|
|
533
574
|
```
|
|
534
575
|
|
|
535
|
-
|
|
576
|
+
`enabledPolicies` में listed न होने वाली policies run नहीं होती हैं, भले ही उनके लिए `policyParams` entries exist हों।
|