failproofai 0.0.6-beta.0 → 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.
Files changed (191) hide show
  1. package/.next/standalone/.failproofai/policies/review-policies.mjs +113 -0
  2. package/.next/standalone/.next/BUILD_ID +1 -1
  3. package/.next/standalone/.next/build-manifest.json +5 -5
  4. package/.next/standalone/.next/prerender-manifest.json +3 -3
  5. package/.next/standalone/.next/required-server-files.json +1 -1
  6. package/.next/standalone/.next/server/app/_global-error/page/build-manifest.json +2 -2
  7. package/.next/standalone/.next/server/app/_global-error/page/server-reference-manifest.json +1 -1
  8. package/.next/standalone/.next/server/app/_global-error/page.js.nft.json +1 -1
  9. package/.next/standalone/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
  10. package/.next/standalone/.next/server/app/_global-error.html +1 -1
  11. package/.next/standalone/.next/server/app/_global-error.rsc +7 -7
  12. package/.next/standalone/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +2 -2
  13. package/.next/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +7 -7
  14. package/.next/standalone/.next/server/app/_global-error.segments/_head.segment.rsc +3 -3
  15. package/.next/standalone/.next/server/app/_global-error.segments/_index.segment.rsc +3 -3
  16. package/.next/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  17. package/.next/standalone/.next/server/app/_not-found/page/build-manifest.json +2 -2
  18. package/.next/standalone/.next/server/app/_not-found/page/server-reference-manifest.json +1 -1
  19. package/.next/standalone/.next/server/app/_not-found/page.js.nft.json +1 -1
  20. package/.next/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  21. package/.next/standalone/.next/server/app/_not-found.html +2 -2
  22. package/.next/standalone/.next/server/app/_not-found.rsc +15 -15
  23. package/.next/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +15 -15
  24. package/.next/standalone/.next/server/app/_not-found.segments/_head.segment.rsc +4 -4
  25. package/.next/standalone/.next/server/app/_not-found.segments/_index.segment.rsc +10 -10
  26. package/.next/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +2 -2
  27. package/.next/standalone/.next/server/app/_not-found.segments/_not-found.segment.rsc +3 -3
  28. package/.next/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
  29. package/.next/standalone/.next/server/app/index.html +1 -1
  30. package/.next/standalone/.next/server/app/index.rsc +15 -15
  31. package/.next/standalone/.next/server/app/index.segments/__PAGE__.segment.rsc +2 -2
  32. package/.next/standalone/.next/server/app/index.segments/_full.segment.rsc +15 -15
  33. package/.next/standalone/.next/server/app/index.segments/_head.segment.rsc +4 -4
  34. package/.next/standalone/.next/server/app/index.segments/_index.segment.rsc +10 -10
  35. package/.next/standalone/.next/server/app/index.segments/_tree.segment.rsc +1 -1
  36. package/.next/standalone/.next/server/app/page/build-manifest.json +2 -2
  37. package/.next/standalone/.next/server/app/page/server-reference-manifest.json +1 -1
  38. package/.next/standalone/.next/server/app/page.js.nft.json +1 -1
  39. package/.next/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
  40. package/.next/standalone/.next/server/app/policies/page/build-manifest.json +2 -2
  41. package/.next/standalone/.next/server/app/policies/page/server-reference-manifest.json +8 -8
  42. package/.next/standalone/.next/server/app/policies/page.js.nft.json +1 -1
  43. package/.next/standalone/.next/server/app/policies/page_client-reference-manifest.js +1 -1
  44. package/.next/standalone/.next/server/app/project/[name]/page/build-manifest.json +2 -2
  45. package/.next/standalone/.next/server/app/project/[name]/page/server-reference-manifest.json +1 -1
  46. package/.next/standalone/.next/server/app/project/[name]/page.js.nft.json +1 -1
  47. package/.next/standalone/.next/server/app/project/[name]/page_client-reference-manifest.js +1 -1
  48. package/.next/standalone/.next/server/app/project/[name]/session/[sessionId]/page/build-manifest.json +2 -2
  49. package/.next/standalone/.next/server/app/project/[name]/session/[sessionId]/page/react-loadable-manifest.json +2 -2
  50. package/.next/standalone/.next/server/app/project/[name]/session/[sessionId]/page/server-reference-manifest.json +2 -2
  51. package/.next/standalone/.next/server/app/project/[name]/session/[sessionId]/page.js.nft.json +1 -1
  52. package/.next/standalone/.next/server/app/project/[name]/session/[sessionId]/page_client-reference-manifest.js +1 -1
  53. package/.next/standalone/.next/server/app/projects/page/build-manifest.json +2 -2
  54. package/.next/standalone/.next/server/app/projects/page/server-reference-manifest.json +1 -1
  55. package/.next/standalone/.next/server/app/projects/page.js.nft.json +1 -1
  56. package/.next/standalone/.next/server/app/projects/page_client-reference-manifest.js +1 -1
  57. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0g72weg._.js +1 -1
  58. package/.next/standalone/.next/server/chunks/package_json_[json]_cjs_0z7w.hh._.js +1 -1
  59. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0a.nuas._.js → [root-of-the-server]__05akje6._.js} +2 -2
  60. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__092s1ta._.js +2 -2
  61. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__09icjsf._.js +2 -2
  62. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0g.lg8b._.js +2 -2
  63. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0h..k-e._.js +2 -2
  64. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0.~fd7s._.js → [root-of-the-server]__0i5kvry._.js} +2 -2
  65. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0okos0k._.js +2 -2
  66. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0w6l33k._.js +6 -6
  67. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__11pa2ra._.js +2 -2
  68. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__12t-wym._.js +2 -2
  69. package/.next/standalone/.next/server/chunks/ssr/_10lm7or._.js +2 -2
  70. package/.next/standalone/.next/server/chunks/ssr/app_global-error_tsx_0xerkr6._.js +1 -1
  71. package/.next/standalone/.next/server/chunks/ssr/app_policies_hooks-client_tsx_0q-m0y-._.js +1 -1
  72. package/.next/standalone/.next/server/middleware-build-manifest.js +5 -5
  73. package/.next/standalone/.next/server/pages/404.html +2 -2
  74. package/.next/standalone/.next/server/pages/500.html +1 -1
  75. package/.next/standalone/.next/server/server-reference-manifest.js +1 -1
  76. package/.next/standalone/.next/server/server-reference-manifest.json +9 -9
  77. package/.next/standalone/.next/static/chunks/{0teq8wdh3po1n.js → 00j0rr7rh8ef8.js} +1 -1
  78. package/.next/standalone/.next/static/chunks/{0maq.q1t.ri85.js → 05j1px0r8yzh6.js} +2 -2
  79. package/.next/standalone/.next/static/chunks/0badv41uxa56..js +4 -0
  80. package/.next/standalone/.next/static/chunks/{0hplx-8c-4vpv.js → 0ijk_kek9_wyx.js} +1 -1
  81. package/.next/standalone/.next/static/chunks/{0uc0um_uz51m_.js → 0npb~873.wvg3.js} +1 -1
  82. package/.next/standalone/.next/static/chunks/{0hctoh28rg838.js → 0xpl.oscrakvx.js} +1 -1
  83. package/.next/standalone/.next/static/chunks/{0.z51twd.0l5z.js → 1052sguyd-.ka.js} +1 -1
  84. package/.next/standalone/.next/static/chunks/{09e7drilkf1sn.js → 12simlrcfk3g2.js} +1 -1
  85. package/.next/standalone/.next/static/chunks/{0ul6fk-z.6k-0.js → 14cl9poem30dq.js} +1 -1
  86. package/.next/standalone/.next/static/chunks/{turbopack-0r26pc8h0y_-e.js → turbopack-0o7k.hakttp4k.js} +1 -1
  87. package/.next/standalone/CHANGELOG.md +19 -0
  88. package/.next/standalone/README.md +2 -2
  89. package/.next/standalone/bun.lock +43 -85
  90. package/.next/standalone/dist/cli.mjs +91 -4
  91. package/.next/standalone/docs/ar/built-in-policies.mdx +124 -87
  92. package/.next/standalone/docs/ar/custom-policies.mdx +72 -72
  93. package/.next/standalone/docs/ar/examples.mdx +86 -33
  94. package/.next/standalone/docs/ar/getting-started.mdx +82 -29
  95. package/.next/standalone/docs/built-in-policies.mdx +38 -1
  96. package/.next/standalone/docs/custom-policies.mdx +1 -1
  97. package/.next/standalone/docs/de/built-in-policies.mdx +93 -56
  98. package/.next/standalone/docs/de/custom-policies.mdx +56 -56
  99. package/.next/standalone/docs/de/examples.mdx +72 -18
  100. package/.next/standalone/docs/de/getting-started.mdx +72 -20
  101. package/.next/standalone/docs/es/built-in-policies.mdx +115 -78
  102. package/.next/standalone/docs/es/custom-policies.mdx +55 -55
  103. package/.next/standalone/docs/es/examples.mdx +73 -19
  104. package/.next/standalone/docs/es/getting-started.mdx +72 -20
  105. package/.next/standalone/docs/examples.mdx +54 -0
  106. package/.next/standalone/docs/fr/built-in-policies.mdx +83 -46
  107. package/.next/standalone/docs/fr/custom-policies.mdx +51 -51
  108. package/.next/standalone/docs/fr/examples.mdx +78 -24
  109. package/.next/standalone/docs/fr/getting-started.mdx +65 -13
  110. package/.next/standalone/docs/getting-started.mdx +52 -0
  111. package/.next/standalone/docs/he/built-in-policies.mdx +156 -117
  112. package/.next/standalone/docs/he/custom-policies.mdx +75 -75
  113. package/.next/standalone/docs/he/examples.mdx +87 -33
  114. package/.next/standalone/docs/he/getting-started.mdx +84 -33
  115. package/.next/standalone/docs/hi/built-in-policies.mdx +101 -60
  116. package/.next/standalone/docs/hi/custom-policies.mdx +71 -70
  117. package/.next/standalone/docs/hi/examples.mdx +90 -36
  118. package/.next/standalone/docs/hi/getting-started.mdx +80 -27
  119. package/.next/standalone/docs/i18n/README.ar.md +69 -69
  120. package/.next/standalone/docs/i18n/README.de.md +46 -46
  121. package/.next/standalone/docs/i18n/README.es.md +42 -42
  122. package/.next/standalone/docs/i18n/README.fr.md +39 -39
  123. package/.next/standalone/docs/i18n/README.he.md +83 -83
  124. package/.next/standalone/docs/i18n/README.hi.md +69 -69
  125. package/.next/standalone/docs/i18n/README.it.md +72 -72
  126. package/.next/standalone/docs/i18n/README.ja.md +71 -71
  127. package/.next/standalone/docs/i18n/README.ko.md +52 -52
  128. package/.next/standalone/docs/i18n/README.pt-br.md +44 -44
  129. package/.next/standalone/docs/i18n/README.ru.md +66 -66
  130. package/.next/standalone/docs/i18n/README.tr.md +82 -83
  131. package/.next/standalone/docs/i18n/README.vi.md +70 -71
  132. package/.next/standalone/docs/i18n/README.zh.md +51 -51
  133. package/.next/standalone/docs/it/built-in-policies.mdx +118 -81
  134. package/.next/standalone/docs/it/custom-policies.mdx +69 -69
  135. package/.next/standalone/docs/it/examples.mdx +93 -39
  136. package/.next/standalone/docs/it/getting-started.mdx +73 -21
  137. package/.next/standalone/docs/ja/built-in-policies.mdx +98 -61
  138. package/.next/standalone/docs/ja/custom-policies.mdx +71 -71
  139. package/.next/standalone/docs/ja/examples.mdx +76 -22
  140. package/.next/standalone/docs/ja/getting-started.mdx +65 -13
  141. package/.next/standalone/docs/ko/built-in-policies.mdx +137 -100
  142. package/.next/standalone/docs/ko/custom-policies.mdx +67 -67
  143. package/.next/standalone/docs/ko/examples.mdx +87 -33
  144. package/.next/standalone/docs/ko/getting-started.mdx +61 -9
  145. package/.next/standalone/docs/pt-br/built-in-policies.mdx +94 -57
  146. package/.next/standalone/docs/pt-br/custom-policies.mdx +56 -56
  147. package/.next/standalone/docs/pt-br/examples.mdx +78 -24
  148. package/.next/standalone/docs/pt-br/getting-started.mdx +64 -12
  149. package/.next/standalone/docs/ru/built-in-policies.mdx +142 -105
  150. package/.next/standalone/docs/ru/custom-policies.mdx +82 -81
  151. package/.next/standalone/docs/ru/examples.mdx +77 -22
  152. package/.next/standalone/docs/ru/getting-started.mdx +74 -22
  153. package/.next/standalone/docs/tr/built-in-policies.mdx +104 -67
  154. package/.next/standalone/docs/tr/custom-policies.mdx +59 -60
  155. package/.next/standalone/docs/tr/examples.mdx +97 -42
  156. package/.next/standalone/docs/tr/getting-started.mdx +75 -23
  157. package/.next/standalone/docs/vi/built-in-policies.mdx +110 -72
  158. package/.next/standalone/docs/vi/custom-policies.mdx +68 -68
  159. package/.next/standalone/docs/vi/examples.mdx +93 -38
  160. package/.next/standalone/docs/vi/getting-started.mdx +74 -22
  161. package/.next/standalone/docs/zh/built-in-policies.mdx +132 -95
  162. package/.next/standalone/docs/zh/custom-policies.mdx +49 -49
  163. package/.next/standalone/docs/zh/examples.mdx +90 -36
  164. package/.next/standalone/docs/zh/getting-started.mdx +73 -21
  165. package/.next/standalone/node_modules/@next/env/package.json +1 -1
  166. package/.next/standalone/node_modules/next/dist/build/swc/index.js +1 -1
  167. package/.next/standalone/node_modules/next/dist/compiled/next-server/pages-turbo.runtime.prod.js +7 -7
  168. package/.next/standalone/node_modules/next/dist/lib/patch-incorrect-lockfile.js +3 -3
  169. package/.next/standalone/node_modules/next/dist/server/config-schema.js +10 -2
  170. package/.next/standalone/node_modules/next/dist/server/config.js +1 -1
  171. package/.next/standalone/node_modules/next/dist/server/dev/hot-reloader-turbopack.js +2 -2
  172. package/.next/standalone/node_modules/next/dist/server/dev/hot-reloader-webpack.js +1 -1
  173. package/.next/standalone/node_modules/next/dist/server/lib/app-info-log.js +1 -1
  174. package/.next/standalone/node_modules/next/dist/server/lib/start-server.js +1 -1
  175. package/.next/standalone/node_modules/next/dist/server/render.js +27 -20
  176. package/.next/standalone/node_modules/next/dist/shared/lib/errors/canary-only-config-error.js +1 -1
  177. package/.next/standalone/node_modules/next/dist/telemetry/anonymous-meta.js +1 -1
  178. package/.next/standalone/node_modules/next/dist/telemetry/events/swc-load-failure.js +1 -1
  179. package/.next/standalone/node_modules/next/dist/telemetry/events/version.js +2 -2
  180. package/.next/standalone/node_modules/next/package.json +15 -15
  181. package/.next/standalone/package.json +2 -2
  182. package/.next/standalone/server.js +1 -1
  183. package/.next/standalone/src/hooks/builtin-policies.ts +106 -1
  184. package/README.md +2 -2
  185. package/dist/cli.mjs +91 -4
  186. package/package.json +2 -2
  187. package/src/hooks/builtin-policies.ts +106 -1
  188. package/.next/standalone/.next/static/chunks/0w9lwqy0-v1dk.js +0 -4
  189. /package/.next/standalone/.next/static/{8mygPGI5bzrtWK36ZYO59 → A9pNTZdoYJTVyPAYwQMx5}/_buildManifest.js +0 -0
  190. /package/.next/standalone/.next/static/{8mygPGI5bzrtWK36ZYO59 → A9pNTZdoYJTVyPAYwQMx5}/_clientMiddlewareManifest.js +0 -0
  191. /package/.next/standalone/.next/static/{8mygPGI5bzrtWK36ZYO59 → A9pNTZdoYJTVyPAYwQMx5}/_ssgManifest.js +0 -0
@@ -2,17 +2,17 @@
2
2
 
3
3
  ---
4
4
  title: उदाहरण
5
- description: "Claude Code और Agents SDK के लिए hooks सेट अप करना"
5
+ description: "Claude Code और Agents SDK के लिए hooks को सेट अप करने का तरीका"
6
6
  icon: book-open
7
7
  ---
8
8
 
9
- सामान्य परिस्थितियों के लिए तुरंत उपयोग के लिए तैयार उदाहरण। प्रत्येक दिखाता है कि कैसे इंस्टॉल करें और क्या उम्मीद करें।
9
+ सामान्य परिस्थितियों के लिए तुरंत उपयोग के लिए तैयार उदाहरण। प्रत्येक उदाहरण दिखाता है कि इंस्टॉल कैसे करें और क्या उम्मीद करें।
10
10
 
11
11
  ---
12
12
 
13
13
  ## Claude Code के लिए hooks सेट अप करना
14
14
 
15
- Failproof AI Claude Code के साथ अपनी [hooks system](https://docs.anthropic.com/en/docs/claude-code/hooks) के माध्यम से एकीकृत होता है। जब आप `failproofai policies --install` चलाते हैं, तो यह Claude Code के `settings.json` में hook commands को रजिस्टर करता है जो हर tool call पर चलते हैं।
15
+ Failproof AI, Claude Code के साथ अपने [hooks system](https://docs.anthropic.com/en/docs/claude-code/hooks) के माध्यम से एकीकृत होता है। जब आप `failproofai policies --install` चलाते हैं, तो यह Claude Code के `settings.json` में hook commands को रजिस्टर करता है जो हर tool call पर फायर होते हैं।
16
16
 
17
17
  <Steps>
18
18
  <Step title="failproofai इंस्टॉल करें">
@@ -20,24 +20,24 @@ Failproof AI Claude Code के साथ अपनी [hooks system](https://do
20
20
  npm install -g failproofai
21
21
  ```
22
22
  </Step>
23
- <Step title="सभी built-in policies सक्षम करें">
23
+ <Step title="सभी बिल्ट-इन policies को सक्षम करें">
24
24
  ```bash
25
25
  failproofai policies --install
26
26
  ```
27
27
  </Step>
28
- <Step title="verify करें कि hooks रजिस्टर हैं">
28
+ <Step title="सत्यापित करें कि hooks रजिस्टर हैं">
29
29
  ```bash
30
30
  cat ~/.claude/settings.json | grep failproofai
31
31
  ```
32
32
 
33
- आपको `PreToolUse`, `PostToolUse`, `Notification`, और `Stop` events के लिए hook entries दिखाई देने चाहिए।
33
+ आपको `PreToolUse`, `PostToolUse`, `Notification`, और `Stop` events के लिए hook entries दिखनी चाहिए।
34
34
  </Step>
35
35
  <Step title="Claude Code चलाएं">
36
36
  ```bash
37
37
  claude
38
38
  ```
39
39
 
40
- अब policies हर tool call पर स्वचालित रूप से चलती हैं। Claude से `sudo rm -rf /` चलाने के लिए कहने का प्रयास करें - यह block हो जाएगा।
40
+ Policies अब हर tool call पर स्वचालित रूप से चलती हैं। Claude से `sudo rm -rf /` चलाने के लिए कहने का प्रयास करें - यह अवरुद्ध होगा।
41
41
  </Step>
42
42
  </Steps>
43
43
 
@@ -45,23 +45,23 @@ Failproof AI Claude Code के साथ अपनी [hooks system](https://do
45
45
 
46
46
  ## Agents SDK के लिए hooks सेट अप करना
47
47
 
48
- यदि आप [Agents SDK](https://docs.anthropic.com/en/docs/agents-sdk) के साथ निर्माण कर रहे हैं, तो आप प्रोग्राम के माध्यम से उसी hook system का उपयोग कर सकते हैं।
48
+ यदि आप [Agents SDK](https://docs.anthropic.com/en/docs/agents-sdk) के साथ निर्माण कर रहे हैं, तो आप समान hook system को प्रोग्रामेटिक रूप से उपयोग कर सकते हैं।
49
49
 
50
50
  <Steps>
51
- <Step title="अपनी project में failproofai इंस्टॉल करें">
51
+ <Step title="अपने प्रोजेक्ट में failproofai इंस्टॉल करें">
52
52
  ```bash
53
53
  npm install failproofai
54
54
  ```
55
55
  </Step>
56
- <Step title="अपने agent में hooks configure करें">
57
- अपने agent process को बनाते समय hook commands pass करें। hooks Claude Code की तरह ही चलते हैं - stdin/stdout JSON के माध्यम से:
56
+ <Step title="अपने agent में hooks कॉन्फ़िगर करें">
57
+ अपने agent process को बनाते समय hook commands को पास करें। Hooks उसी तरह फायर होते हैं जैसे Claude Code में - stdin/stdout JSON के माध्यम से:
58
58
 
59
59
  ```bash
60
- failproofai --hook PreToolUse # हर tool से पहले call होता है
61
- failproofai --hook PostToolUse # हर tool के बाद call होता है
60
+ failproofai --hook PreToolUse # हर tool से पहले कहा जाता है
61
+ failproofai --hook PostToolUse # हर tool के बाद कहा जाता है
62
62
  ```
63
63
  </Step>
64
- <Step title="अपने agent के लिए एक custom policy लिखें">
64
+ <Step title="अपने agent के लिए एक कस्टम policy लिखें">
65
65
  ```javascript
66
66
  import { customPolicies, allow, deny } from "failproofai";
67
67
 
@@ -79,7 +79,7 @@ Failproof AI Claude Code के साथ अपनी [hooks system](https://do
79
79
  });
80
80
  ```
81
81
  </Step>
82
- <Step title="custom policy इंस्टॉल करें">
82
+ <Step title="कस्टम policy इंस्टॉल करें">
83
83
  ```bash
84
84
  failproofai policies --install --custom ./my-agent-policies.js
85
85
  ```
@@ -88,37 +88,37 @@ Failproof AI Claude Code के साथ अपनी [hooks system](https://do
88
88
 
89
89
  ---
90
90
 
91
- ## विनाशकारी commands को block करें
91
+ ## विनाशकारी commands को ब्लॉक करें
92
92
 
93
- सबसे सामान्य सेटअप - agents को अपरिवर्तनीय क्षति से रोकें।
93
+ सबसे सामान्य सेटअप - agents को अपरिवर्तनीय नुकसान करने से रोकें।
94
94
 
95
95
  ```bash
96
96
  failproofai policies --install block-sudo block-rm-rf block-force-push block-curl-pipe-sh
97
97
  ```
98
98
 
99
99
  यह क्या करता है:
100
- - `block-sudo` - सभी `sudo` commands को block करता है
101
- - `block-rm-rf` - recursive file deletion को block करता है
102
- - `block-force-push` - `git push --force` को block करता है
103
- - `block-curl-pipe-sh` - remote scripts को shell में piping करने को block करता है
100
+ - `block-sudo` - सभी `sudo` commands को ब्लॉक करता है
101
+ - `block-rm-rf` - recursive file deletion को ब्लॉक करता है
102
+ - `block-force-push` - `git push --force` को ब्लॉक करता है
103
+ - `block-curl-pipe-sh` - remote scripts को shell में pipe करने को ब्लॉक करता है
104
104
 
105
105
  ---
106
106
 
107
- ## secret leakage को रोकें
107
+ ## गुप्त जानकारी का लीक होना रोकें
108
108
 
109
- Agents को tool output में credentials को देखने या लीक करने से रोकें।
109
+ Agents को tool output में credentials देखने या लीक करने से रोकें।
110
110
 
111
111
  ```bash
112
112
  failproofai policies --install sanitize-api-keys sanitize-jwt sanitize-connection-strings sanitize-bearer-tokens
113
113
  ```
114
114
 
115
- ये `PostToolUse` पर चलते हैं - एक tool चलने के बाद, वे output को agent के सामने आने से पहले साफ कर देते हैं।
115
+ ये `PostToolUse` पर फायर होते हैं - एक tool चलने के बाद, ये agent को देखने से पहले output को साफ करते हैं।
116
116
 
117
117
  ---
118
118
 
119
- ## जब agents को ध्यान देने की आवश्यकता हो तो Slack alerts प्राप्त करें
119
+ ## जब agents को ध्यान की आवश्यकता हो तो Slack alerts प्राप्त करें
120
120
 
121
- Notification hook का उपयोग करके idle alerts को Slack में भेजें।
121
+ notification hook का उपयोग करके idle alerts को Slack पर फॉरवर्ड करें।
122
122
 
123
123
  ```javascript
124
124
  import { customPolicies, allow, instruct } from "failproofai";
@@ -144,7 +144,7 @@ customPolicies.add({
144
144
  signal: AbortSignal.timeout(5000),
145
145
  });
146
146
  } catch {
147
- // Slack अगर पहुंचने योग्य नहीं है तो कभी भी agent को block न करें
147
+ // अगर Slack अनुपलब्ध है तो agent को कभी ब्लॉक न करें
148
148
  }
149
149
 
150
150
  return allow();
@@ -152,7 +152,7 @@ customPolicies.add({
152
152
  });
153
153
  ```
154
154
 
155
- इंस्टॉल करें:
155
+ इसे इंस्टॉल करें:
156
156
 
157
157
  ```bash
158
158
  SLACK_WEBHOOK_URL=https://hooks.slack.com/... failproofai policies --install --custom ./slack-alerts.js
@@ -162,7 +162,7 @@ SLACK_WEBHOOK_URL=https://hooks.slack.com/... failproofai policies --install --c
162
162
 
163
163
  ## Agents को एक branch पर रखें
164
164
 
165
- Agents को branches को switch करने या protected ones में push करने से रोकें।
165
+ Agents को branches स्विच करने या protected ones पर push करने से रोकें।
166
166
 
167
167
  ```javascript
168
168
  import { customPolicies, allow, deny } from "failproofai";
@@ -184,9 +184,9 @@ customPolicies.add({
184
184
 
185
185
  ---
186
186
 
187
- ## Commits से पहले tests की आवश्यकता करें
187
+ ## Commits से पहले tests की आवश्यकता है
188
188
 
189
- Agents को commit करने से पहले tests चलाने की याद दिलाएं।
189
+ Agents को commit करने से पहले tests चलाने के लिए याद दिलाएं।
190
190
 
191
191
  ```javascript
192
192
  import { customPolicies, allow, instruct } from "failproofai";
@@ -208,9 +208,9 @@ customPolicies.add({
208
208
 
209
209
  ---
210
210
 
211
- ## एक production repo को lock down करें
211
+ ## Production repo को लॉक डाउन करें
212
212
 
213
- एक project-level config को commit करें ताकि आपकी टीम के हर developer को समान policies मिलें।
213
+ एक project-level config commit करें ताकि आपकी team का हर developer समान policies प्राप्त करे।
214
214
 
215
215
  अपने repo में `.failproofai/policies-config.json` बनाएं:
216
216
 
@@ -240,16 +240,70 @@ git add .failproofai/policies-config.json
240
240
  git commit -m "Add failproofai team policies"
241
241
  ```
242
242
 
243
- जिस भी टीम member के पास failproofai installed है वह स्वचालित रूप से ये rules को pick up करेगा।
243
+ हर team member जिसके पास failproofai इंस्टॉल है, ये नियम स्वचालित रूप से ले लेंगे।
244
+
245
+ ---
246
+
247
+ ## Convention policies के साथ एक org-wide quality standard बनाएं
248
+
249
+ सबसे प्रभावशाली सेटअप: अपने repo में `.failproofai/policies/` को commit करें जिसमें आपके प्रोजेक्ट के लिए तैयार किए गए policies हों। हर team member को ये स्वचालित रूप से मिल जाते हैं — कोई install commands नहीं, कोई config changes नहीं।
250
+
251
+ <Steps>
252
+ <Step title="directory बनाएं और policies जोड़ें">
253
+ ```bash
254
+ mkdir -p .failproofai/policies
255
+ ```
256
+
257
+ ```js
258
+ // .failproofai/policies/team-policies.mjs
259
+ import { customPolicies, allow, deny, instruct } from "failproofai";
260
+
261
+ // अपनी team की पसंदीदा package manager को लागू करें
262
+ // (या इसके बजाय बिल्ट-इन prefer-package-manager policy को सक्षम करें)
263
+ customPolicies.add({
264
+ name: "enforce-bun",
265
+ match: { events: ["PreToolUse"] },
266
+ fn: async (ctx) => {
267
+ if (ctx.toolName !== "Bash") return allow();
268
+ const cmd = String(ctx.toolInput?.command ?? "");
269
+ if (/\bnpm\b/.test(cmd)) return deny("Use bun instead of npm.");
270
+ return allow();
271
+ },
272
+ });
273
+
274
+ // Agent को commit करने से पहले tests चलाने की याद दिलाएं
275
+ customPolicies.add({
276
+ name: "test-before-commit",
277
+ match: { events: ["PreToolUse"] },
278
+ fn: async (ctx) => {
279
+ if (ctx.toolName !== "Bash") return allow();
280
+ if (/git\s+commit/.test(ctx.toolInput?.command ?? "")) {
281
+ return instruct("Run tests before committing.");
282
+ }
283
+ return allow();
284
+ },
285
+ });
286
+ ```
287
+ </Step>
288
+ <Step title="Git में commit करें">
289
+ ```bash
290
+ git add .failproofai/policies/
291
+ git commit -m "Add team quality policies"
292
+ ```
293
+ </Step>
294
+ <Step title="सुधार जारी रखें">
295
+ जब आपकी team को नई असफलताओं का सामना हो, तो policies जोड़ें और push करें। हर कोई अपने अगले `git pull` पर अपडेट प्राप्त करेगा। ये policies एक जीवंत quality standard बन जाते हैं जो आपकी team के साथ बढ़ता है।
296
+ </Step>
297
+ </Steps>
244
298
 
245
299
  ---
246
300
 
247
301
  ## अधिक उदाहरण
248
302
 
249
- Repo में [`examples/`](https://github.com/exospherehost/failproofai/tree/main/examples) directory में शामिल हैं:
303
+ Repo में [`examples/`](https://github.com/exospherehost/failproofai/tree/main/examples) directory में शामिल है:
250
304
 
251
305
  | File | यह क्या दिखाता है |
252
306
  |------|---------------|
253
- | `policies-basic.js` | Starter policies - production writes, force-push, piped scripts को block करें |
307
+ | `policies-basic.js` | Starter policies - production writes, force-push, piped scripts को ब्लॉक करें |
254
308
  | `policies-notification.js` | Idle notifications और session end के लिए Slack alerts |
255
309
  | `policies-advanced/index.js` | Transitive imports, async hooks, PostToolUse output scrubbing, Stop event handling |
@@ -1,13 +1,14 @@
1
1
  ---
2
+ ---
2
3
  title: शुरुआत करें
3
- description: "failproofai इंस्टॉल करें, policies सक्षम करें, और अपने agents को विश्वसनीयता से चलाएं"
4
+ description: "failproofai को इंस्टॉल करें, policies को सक्षम करें, और अपने agents को विश्वसनीयता से चलाएं"
4
5
  icon: rocket
5
6
  ---
6
7
 
7
8
  ## आवश्यकताएं
8
9
 
9
10
  - **Node.js** >= 20.9.0
10
- - **Bun** >= 1.3.0 (वैकल्पिक - केवल स्रोत से बनाने के लिए आवश्यक)
11
+ - **Bun** >= 1.3.0 (वैकल्पिक - केवल स्रोत से बिल्ड करने के लिए आवश्यक)
11
12
 
12
13
  ---
13
14
 
@@ -30,74 +31,126 @@ bun add -g failproofai
30
31
  ## त्वरित शुरुआत
31
32
 
32
33
  <Steps>
33
- <Step title="Policies सक्षम करें">
34
- Policies ऐसे नियम हैं जो हर agent tool call से पहले और बाद में चलते हैं। ये विनाशकारी कमांड, गुप्त लीकेज, और अन्य विफलता मोड को नुकसान पहुंचाने से पहले पकड़ते हैं।
34
+ <Step title="Policies को सक्षम करें">
35
+ Policies ऐसे नियम हैं जो हर agent tool call से पहले और बाद में चलते हैं। वे विनाशकारी commands, secret leakage, और अन्य failure modes को नुकसान पहुंचाने से पहले रोक देते हैं।
35
36
 
36
37
  ```bash
37
38
  failproofai policies --install
38
39
  ```
39
40
 
40
- यह Claude Code की `settings.json` में hook entries लिखता है। आप एकल project के लिए या विशिष्ट policies चुनकर भी इंस्टॉल कर सकते हैं:
41
+ यह Claude Code के `settings.json` में hook entries लिखता है। आप एक single project के लिए भी इंस्टॉल कर सकते हैं या specific policies चुन सकते हैं:
41
42
 
42
43
  ```bash
43
44
  failproofai policies --install --scope project
44
45
  failproofai policies --install block-sudo block-rm-rf sanitize-api-keys
45
46
  ```
46
47
  </Step>
47
- <Step title="सत्यापन करें">
48
+ <Step title="सत्यापित करें">
48
49
  ```bash
49
50
  failproofai policies
50
51
  ```
51
52
 
52
- प्रत्येक policy दिखाता है कि वह सक्षम है या नहीं, और कोई भी कॉन्फ़िगर किए गए पैरामीटर।
53
+ हर policy दिखाता है, चाहे वह सक्षम हो, और कोई भी configured parameters।
53
54
  </Step>
54
55
  <Step title="डैशबोर्ड लॉन्च करें">
55
56
  ```bash
56
57
  failproofai
57
58
  ```
58
59
 
59
- `http://localhost:8020` पर एक स्थानीय डैशबोर्ड खोलता है जहां आप sessions ब्राउज़ कर सकते हैं, tool calls का निरीक्षण कर सकते हैं, और policies प्रबंधित कर सकते हैं।
60
+ `http://localhost:8020` पर एक local dashboard खोलता है जहां आप sessions को browse कर सकते हैं, tool calls का inspection कर सकते हैं, और policies को manage कर सकते हैं।
60
61
  </Step>
61
62
  <Step title="अपने agent को चलाएं">
62
- Claude Code को सामान्य तरीके से शुरू करें। यदि agent कुछ जोखिम भरा करने का प्रयास करता है, तो failproofai इसे स्वचालित रूप से रोक देता है। इसे unattended चलने दें और डैशबोर्ड में देखें कि क्या हुआ।
63
+ Claude Code को सामान्य तरीके से शुरू करें। यदि agent कुछ जोखिम भरा करने की कोशिश करता है, तो failproofai इसे स्वचालित रूप से रोक देता है। इसे unattended चलने दें और डैशबोर्ड में देखें कि क्या हुआ।
63
64
  </Step>
64
65
  </Steps>
65
66
 
66
67
  ---
67
68
 
68
- ## Policies कैसे काम करती हैं
69
+ ## Policies कैसे काम करते हैं
69
70
 
70
- हर बार जब एक agent एक tool चलाता है, Claude Code failproofai को एक subprocess के रूप में कॉल करता है:
71
+ हर बार जब कोई agent एक tool चलाता है, Claude Code failproofai को एक subprocess के रूप में कॉल करता है:
71
72
 
72
73
  ```text
73
- Claude Code → failproofai --hook PreToolUse → stdin JSON पढ़ता है
74
- policies का मूल्यांकन करता है
75
- stdout के लिए निर्णय लिखता है
74
+ Claude Code → failproofai --hook PreToolUse → stdin JSON को पढ़ता है
75
+ policies का मूल्यांकन करता है
76
+ निर्णय को stdout में लिखता है
76
77
  ```
77
78
 
78
- प्रत्येक policy तीन निर्णयों में से एक देता है:
79
+ प्रत्येक policy तीन निर्णयों में से एक लौटाता है:
79
80
 
80
81
  - **allow** - agent सामान्य रूप से आगे बढ़ता है
81
- - **deny** - कार्रवाई को ब्लॉक किया जाता है, agent को बताया जाता है कि क्यों
82
- - **instruct** - agent के prompt में अतिरिक्त context जोड़ा जाता है
82
+ - **deny** - action को ब्लॉक किया जाता है, agent को कारण बताया जाता है
83
+ - **instruct** - agent के prompt में extra context जोड़ा जाता है
83
84
 
84
85
  <Note>
85
- Policies आपकी स्थानीय प्रक्रिया में चलती हैं। कुछ भी किसी दूरस्थ सेवा को नहीं भेजा जाता है।
86
+ Policies आपकी local process में चलती हैं। कोई भी चीज़ remote service को नहीं भेजी जाती है।
86
87
  </Note>
87
88
 
88
89
  ---
89
90
 
90
- ## डेटा स्टोरेज
91
+ ## Convention-based policies के साथ team policies सेट अप करें
92
+
93
+ अपनी पूरी team में quality standards स्थापित करने का सबसे तेज़ तरीका `.failproofai/policies/` convention है। इस directory में policy files drop करें और वे स्वचालित रूप से load हो जाती हैं — कोई flags नहीं, कोई config changes नहीं, कोई install commands नहीं।
94
+
95
+ <Steps>
96
+ <Step title="Policies directory बनाएं">
97
+ ```bash
98
+ mkdir -p .failproofai/policies
99
+ ```
100
+ </Step>
101
+ <Step title="Policy files जोड़ें">
102
+ Starter examples को copy करें या अपने खुद के लिखें:
103
+
104
+ ```bash
105
+ cp node_modules/failproofai/examples/convention-policies/*.mjs .failproofai/policies/
106
+ ```
107
+
108
+ या एक नया बनाएं:
109
+
110
+ ```js
111
+ // .failproofai/policies/team-policies.mjs
112
+ import { customPolicies, allow, deny, instruct } from "failproofai";
113
+
114
+ customPolicies.add({
115
+ name: "test-before-commit",
116
+ match: { events: ["PreToolUse"] },
117
+ fn: async (ctx) => {
118
+ if (ctx.toolName !== "Bash") return allow();
119
+ if (/git\s+commit/.test(ctx.toolInput?.command ?? "")) {
120
+ return instruct("Run tests before committing.");
121
+ }
122
+ return allow();
123
+ },
124
+ });
125
+ ```
126
+ </Step>
127
+ <Step title="Git में commit करें">
128
+ ```bash
129
+ git add .failproofai/policies/
130
+ git commit -m "Add team quality policies"
131
+ ```
132
+
133
+ हर team member जिसके पास failproofai installed है, ये policies स्वचालित रूप से pick up कर लेता है। कोई per-developer setup की आवश्यकता नहीं है।
134
+ </Step>
135
+ </Steps>
136
+
137
+ <Tip>
138
+ `.failproofai/policies/` को अपने repo में commit करें ताकि पूरी team एक ही standards साझा करे। जैसे-जैसे आपकी team नई failure modes discover करती है, policies जोड़ें और push करें — हर किसी को अपने अगले `git pull` पर update मिलेगा। समय के साथ ये policies एक living quality standard बन जाती हैं जो लगातार improve होती हैं।
139
+ </Tip>
140
+
141
+ ---
142
+
143
+ ## डेटा storage
91
144
 
92
- सभी configuration और logs आपकी मशीन पर रहते हैं:
145
+ सभी configuration और logs आपकी machine पर रहते हैं:
93
146
 
94
- | पाथ | यह क्या संग्रहीत करता है |
147
+ | Path | क्या store करता है |
95
148
  |------|----------------|
96
149
  | `~/.failproofai/policies-config.json` | Global policy config |
97
150
  | `~/.failproofai/hook-activity.jsonl` | Hook execution history |
98
- | `~/.failproofai/hook.log` | Custom hook errors के लिए डीबग log |
151
+ | `~/.failproofai/hook.log` | Custom hook errors के लिए debug log |
99
152
  | `.failproofai/policies-config.json` | Per-project config (committed) |
100
- | `.failproofai/policies-config.local.json` | व्यक्तिगत overrides (gitignored) |
153
+ | `.failproofai/policies-config.local.json` | Personal overrides (gitignored) |
101
154
 
102
155
  ---
103
156
 
@@ -107,7 +160,7 @@ Policies आपकी स्थानीय प्रक्रिया मे
107
160
  failproofai policies --uninstall
108
161
  ```
109
162
 
110
- `~/.claude/settings.json` से hook entries को हटाता है। `~/.failproofai/` में config files रखी जाती हैं।
163
+ `~/.claude/settings.json` से hook entries को हटाता है। `~/.failproofai/` में config files रहती हैं।
111
164
 
112
165
  ---
113
166
 
@@ -120,15 +173,15 @@ failproofai policies --uninstall
120
173
  </Card>
121
174
 
122
175
  <Card title="Built-in policies" icon="shield" href="/hi/built-in-policies">
123
- सभी 26 policies के साथ parameters
176
+ सभी 26 policies with parameters
124
177
  </Card>
125
178
 
126
179
  <Card title="Custom policies" icon="code" href="/hi/custom-policies">
127
- JavaScript में अपनी policies लिखें
180
+ JavaScript में अपनी खुद की policies लिखें
128
181
  </Card>
129
182
 
130
183
  <Card title="Agent monitor" icon="chart-line" href="/hi/dashboard">
131
- Sessions की निगरानी करें और policy activity की समीक्षा करें
184
+ Sessions को monitor करें और policy activity की समीक्षा करें
132
185
  </Card>
133
186
 
134
187
  </CardGroup>