failproofai 0.0.9 → 0.0.10-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/.cursor/hooks.json +47 -0
- package/.next/standalone/.gemini/settings.json +147 -0
- 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 +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 +1 -1
- package/.next/standalone/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/_not-found.html +2 -2
- package/.next/standalone/.next/server/app/_not-found.rsc +17 -17
- package/.next/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +17 -17
- package/.next/standalone/.next/server/app/_not-found.segments/_head.segment.rsc +4 -4
- package/.next/standalone/.next/server/app/_not-found.segments/_index.segment.rsc +11 -11
- package/.next/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/_not-found.segments/_not-found.segment.rsc +3 -3
- package/.next/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/api/download/[project]/[session]/route.js +2 -1
- package/.next/standalone/.next/server/app/api/download/[project]/[session]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/index.html +1 -1
- package/.next/standalone/.next/server/app/index.rsc +16 -16
- package/.next/standalone/.next/server/app/index.segments/__PAGE__.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/index.segments/_full.segment.rsc +16 -16
- package/.next/standalone/.next/server/app/index.segments/_head.segment.rsc +4 -4
- package/.next/standalone/.next/server/app/index.segments/_index.segment.rsc +11 -11
- package/.next/standalone/.next/server/app/index.segments/_tree.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/page/server-reference-manifest.json +1 -1
- package/.next/standalone/.next/server/app/page.js +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 +1 -1
- 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 +2 -2
- 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 +5 -5
- 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 +2 -2
- 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]__0.~nmr9._.js +3 -0
- package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0yspgjy._.js → [root-of-the-server]__010i6f5._.js} +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__08px0ym._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0b57.gk._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0dtn9lr._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0kjo7d_._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0vlhtkc._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0wu7fr7._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0yfq1yr._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0z4c5dj._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0zso~62._.js +3 -0
- 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-2wr.c._.js +4 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0.~m-w2._.js +4 -0
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__09icjsf._.js → [root-of-the-server]__0709m8.._.js} +3 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0bz245.._.js +4 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0dl0kgt._.js +4 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0gmhxyo._.js +4 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0mup1hi._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0ohb3gc._.js +4 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0qbpe_v._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0s~gy6y._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0t5l7a5._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0ymlddl._.js +152 -6
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0_b7pgn._.js → [root-of-the-server]__0ymn496._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__01g_w_e._.js → [root-of-the-server]__10h.ggz._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/_03d7qyt._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/{_07a1g.3._.js → _0zx~s__._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/_10lm7or._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/app_0cdqd9w._.js +1 -1
- 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 +2 -2
- package/.next/standalone/.next/server/chunks/ssr/lib_codex-projects_ts_0eosib~._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/lib_copilot-projects_ts_0r8xkn8._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/lib_cursor-projects_ts_0qt1scg._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/lib_gemini-projects_ts_0sl~yqr._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/lib_opencode-projects_ts_0op9gyp._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/lib_pi-projects_ts_103tsh1._.js +3 -0
- 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/{0n-_j_6fo6jex.js → 00ay03h8bq4b~.js} +2 -2
- package/.next/standalone/.next/static/chunks/{11kt_9zaooda3.js → 0agmlhk5ml7x5.js} +1 -1
- package/.next/standalone/.next/static/chunks/0bi2r.m~yokoo.js +1 -0
- package/.next/standalone/.next/static/chunks/{095l4hc7-h.~~.js → 0en4v5k2nnxks.js} +1 -1
- package/.next/standalone/.next/static/chunks/0q5bmqop--9yk.js +1 -0
- package/.next/standalone/.next/static/chunks/{0756i.7omnnl6.js → 0s6nux54y~l~r.js} +1 -1
- package/.next/standalone/.next/static/chunks/{0t~iusm_fxoao.js → 0tpse0wu2wwo0.js} +1 -1
- package/.next/standalone/.next/static/chunks/12po2vpc-4_c1.css +1 -0
- package/.next/standalone/.next/static/chunks/{0u-ys71jc4y68.js → 1400rtd5ywbt..js} +2 -2
- package/.next/standalone/.next/static/chunks/{09ose_165ra4d.js → 14lmf8boay-zu.js} +1 -1
- package/.next/standalone/.next/static/chunks/{0pr7k36o_.du1.js → 17htukxga7bil.js} +1 -1
- package/.next/standalone/.opencode/opencode.json +4 -0
- package/.next/standalone/.opencode/plugins/failproofai.mjs +131 -0
- package/.next/standalone/.pi/settings.json +5 -0
- package/.next/standalone/app/components/cli-badge.tsx +7 -11
- package/.next/standalone/app/components/project-list.tsx +32 -4
- package/.next/standalone/app/policies/hooks-client.tsx +31 -15
- package/.next/standalone/app/project/[name]/page.tsx +52 -16
- package/.next/standalone/app/project/[name]/session/[sessionId]/page.tsx +92 -15
- package/.next/standalone/assets/logos/copilot-dark.svg +1 -0
- package/.next/standalone/assets/logos/copilot-light.svg +1 -0
- package/.next/standalone/assets/logos/cursor-dark.svg +1 -0
- package/.next/standalone/assets/logos/cursor-light.svg +1 -0
- package/.next/standalone/assets/logos/gemini-dark.svg +13 -0
- package/.next/standalone/assets/logos/gemini-light.svg +13 -0
- package/.next/standalone/assets/logos/opencode-dark.svg +1 -0
- package/.next/standalone/assets/logos/opencode-light.svg +1 -0
- package/.next/standalone/assets/logos/pi-dark.svg +7 -0
- package/.next/standalone/assets/logos/pi-light.svg +7 -0
- package/.next/standalone/lib/cli-registry.ts +107 -0
- package/.next/standalone/lib/codex-projects.ts +3 -3
- package/.next/standalone/lib/copilot-projects.ts +224 -0
- package/.next/standalone/lib/copilot-sessions.ts +395 -0
- package/.next/standalone/lib/cursor-projects.ts +312 -0
- package/.next/standalone/lib/cursor-sessions.ts +467 -0
- package/.next/standalone/lib/gemini-projects.ts +203 -0
- package/.next/standalone/lib/gemini-sessions.ts +365 -0
- package/.next/standalone/lib/opencode-projects.ts +232 -0
- package/.next/standalone/lib/opencode-sessions.ts +237 -0
- package/.next/standalone/lib/pi-projects.ts +230 -0
- package/.next/standalone/lib/pi-sessions.ts +325 -0
- package/.next/standalone/lib/projects.ts +67 -31
- package/.next/standalone/next.config.ts +5 -4
- package/.next/standalone/package.json +2 -1
- package/.next/standalone/pi-extension/index.ts +373 -0
- package/.next/standalone/pi-extension/package.json +12 -0
- package/.next/standalone/server.js +1 -1
- package/README.md +37 -3
- package/bin/failproofai.mjs +61 -21
- package/dist/cli.mjs +2248 -246
- package/lib/cli-registry.ts +107 -0
- package/lib/codex-projects.ts +3 -3
- package/lib/copilot-projects.ts +224 -0
- package/lib/copilot-sessions.ts +395 -0
- package/lib/cursor-projects.ts +312 -0
- package/lib/cursor-sessions.ts +467 -0
- package/lib/gemini-projects.ts +203 -0
- package/lib/gemini-sessions.ts +365 -0
- package/lib/opencode-projects.ts +232 -0
- package/lib/opencode-sessions.ts +237 -0
- package/lib/pi-projects.ts +230 -0
- package/lib/pi-sessions.ts +325 -0
- package/lib/projects.ts +67 -31
- package/package.json +2 -1
- package/pi-extension/index.ts +373 -0
- package/pi-extension/package.json +12 -0
- package/scripts/translate-docs/mdx-translator.ts +56 -2
- package/scripts/translate-docs/translator.ts +1 -1
- package/src/hooks/builtin-policies.ts +84 -14
- package/src/hooks/handler.ts +67 -5
- package/src/hooks/install-prompt.ts +33 -10
- package/src/hooks/integrations.ts +1007 -6
- package/src/hooks/policy-evaluator.ts +299 -3
- package/src/hooks/resolve-permission-mode.ts +23 -0
- package/src/hooks/types.ts +307 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0g72weg._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0su~k6f._.js +0 -3
- package/.next/standalone/.next/server/chunks/lib_codex-projects_ts_07qqk1g._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__01743wx._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__092s1ta._.js +0 -4
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0g.lg8b._.js +0 -4
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0gs6wz4._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0h..k-e._.js +0 -4
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0it81ys._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0u4a9jq._.js +0 -4
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__11pa2ra._.js +0 -4
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__12.h2mg._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__12t-wym._.js +0 -4
- package/.next/standalone/.next/server/chunks/ssr/_04w00cm._.js +0 -3
- package/.next/standalone/.next/static/chunks/0.rk1iwdt1d7c.css +0 -1
- package/.next/standalone/.next/static/chunks/06x4-d1~o-opr.js +0 -1
- package/.next/standalone/.next/static/chunks/0n~s0gafwnp2y.js +0 -1
- /package/.next/standalone/.next/static/{A_Ax17P33facL0OmIwFXj → 68TLSFdjAQYIulNHfP0QY}/_buildManifest.js +0 -0
- /package/.next/standalone/.next/static/{A_Ax17P33facL0OmIwFXj → 68TLSFdjAQYIulNHfP0QY}/_clientMiddlewareManifest.js +0 -0
- /package/.next/standalone/.next/static/{A_Ax17P33facL0OmIwFXj → 68TLSFdjAQYIulNHfP0QY}/_ssgManifest.js +0 -0
package/bin/failproofai.mjs
CHANGED
|
@@ -43,7 +43,7 @@ const hookIdx = args.indexOf("--hook");
|
|
|
43
43
|
if (hookIdx >= 0) {
|
|
44
44
|
if (!args[hookIdx + 1]) {
|
|
45
45
|
console.error("Error: Missing event type after --hook");
|
|
46
|
-
console.error("Usage: failproofai --hook <event> [--cli <claude|codex>]");
|
|
46
|
+
console.error("Usage: failproofai --hook <event> [--cli <claude|codex|copilot|cursor|opencode|pi|gemini>]");
|
|
47
47
|
process.exit(1);
|
|
48
48
|
}
|
|
49
49
|
const eventType = args[hookIdx + 1];
|
|
@@ -51,7 +51,18 @@ if (hookIdx >= 0) {
|
|
|
51
51
|
const cliArg = cliIdx >= 0 ? args[cliIdx + 1] : undefined;
|
|
52
52
|
// Default cli=claude preserves back-compat for hooks installed before
|
|
53
53
|
// multi-CLI support landed.
|
|
54
|
-
const cli =
|
|
54
|
+
const cli =
|
|
55
|
+
cliArg && (
|
|
56
|
+
cliArg === "claude"
|
|
57
|
+
|| cliArg === "codex"
|
|
58
|
+
|| cliArg === "copilot"
|
|
59
|
+
|| cliArg === "cursor"
|
|
60
|
+
|| cliArg === "opencode"
|
|
61
|
+
|| cliArg === "pi"
|
|
62
|
+
|| cliArg === "gemini"
|
|
63
|
+
)
|
|
64
|
+
? cliArg
|
|
65
|
+
: "claude";
|
|
55
66
|
try {
|
|
56
67
|
const { handleHookEvent } = await import("../src/hooks/handler");
|
|
57
68
|
const exitCode = await handleHookEvent(eventType, cli);
|
|
@@ -102,17 +113,19 @@ COMMANDS
|
|
|
102
113
|
policies, p List all available policies and their status
|
|
103
114
|
policies --install, -i Enable policies in agent CLI settings
|
|
104
115
|
[names...] Specific policy names to enable
|
|
105
|
-
--cli claude|codex
|
|
106
|
-
(
|
|
116
|
+
--cli claude|codex|copilot|cursor|opencode|pi|gemini
|
|
117
|
+
Agent CLI(s) to install for; space-separated
|
|
118
|
+
(e.g. --cli claude codex copilot cursor opencode pi gemini) or repeated.
|
|
107
119
|
Default: detect installed CLIs and prompt.
|
|
108
120
|
--scope user|project|local Config scope to write to (default: user)
|
|
109
|
-
(Codex
|
|
121
|
+
(Codex / Copilot / Cursor / OpenCode / Pi / Gemini support user|project only)
|
|
110
122
|
--beta Include beta policies
|
|
111
123
|
--custom, -c <path> Path to a JS file of custom policies
|
|
112
124
|
|
|
113
125
|
policies --uninstall, -u Disable policies or remove hooks
|
|
114
126
|
[names...] Specific policy names to disable
|
|
115
|
-
--cli claude|codex
|
|
127
|
+
--cli claude|codex|copilot|cursor|opencode|pi|gemini
|
|
128
|
+
Agent CLI(s) to uninstall from
|
|
116
129
|
--scope user|project|local|all Config scope to remove from (default: user)
|
|
117
130
|
--beta Remove only beta policies
|
|
118
131
|
--custom, -c Clear the customPoliciesPath from config
|
|
@@ -138,11 +151,21 @@ EXAMPLES
|
|
|
138
151
|
failproofai policies --install
|
|
139
152
|
failproofai policies --install block-sudo sanitize-api-keys --scope project
|
|
140
153
|
failproofai policies --install --cli codex --scope project
|
|
141
|
-
failproofai policies --install --cli
|
|
154
|
+
failproofai policies --install --cli copilot --scope project
|
|
155
|
+
failproofai policies --install --cli cursor --scope project
|
|
156
|
+
failproofai policies --install --cli opencode --scope project
|
|
157
|
+
failproofai policies --install --cli pi --scope project
|
|
158
|
+
failproofai policies --install --cli gemini --scope project
|
|
159
|
+
failproofai policies --install --cli claude codex copilot cursor opencode pi gemini
|
|
142
160
|
failproofai policies --install --custom ./my-policies.js
|
|
143
161
|
failproofai policies -i -c ./my-policies.js
|
|
144
162
|
failproofai policies --uninstall block-sudo
|
|
145
163
|
failproofai policies --uninstall --cli codex
|
|
164
|
+
failproofai policies --uninstall --cli copilot
|
|
165
|
+
failproofai policies --uninstall --cli cursor
|
|
166
|
+
failproofai policies --uninstall --cli opencode
|
|
167
|
+
failproofai policies --uninstall --cli pi
|
|
168
|
+
failproofai policies --uninstall --cli gemini
|
|
146
169
|
failproofai policies --uninstall --custom
|
|
147
170
|
|
|
148
171
|
LINKS
|
|
@@ -182,19 +205,21 @@ USAGE
|
|
|
182
205
|
|
|
183
206
|
OPTIONS (install)
|
|
184
207
|
[names...] Specific policy names to enable (omit for interactive)
|
|
185
|
-
--cli claude|codex
|
|
186
|
-
(
|
|
187
|
-
|
|
188
|
-
|
|
208
|
+
--cli claude|codex|copilot|cursor|opencode|pi|gemini
|
|
209
|
+
Agent CLI(s) to install for; space-separated
|
|
210
|
+
(e.g. --cli claude codex copilot cursor opencode pi gemini) or repeated.
|
|
211
|
+
Omit to detect installed CLIs and prompt (or
|
|
212
|
+
auto-pick if only one is found).
|
|
189
213
|
--scope user|project|local Config scope to write to (default: user)
|
|
190
|
-
(Codex
|
|
214
|
+
(Codex / Copilot / Cursor / OpenCode / Pi / Gemini support user|project only)
|
|
191
215
|
--beta Include beta policies
|
|
192
216
|
--custom, -c <path> Path to a JS file of custom policies
|
|
193
217
|
(skips interactive prompt; validates file first)
|
|
194
218
|
|
|
195
219
|
OPTIONS (uninstall)
|
|
196
220
|
[names...] Specific policy names to disable (omit to remove hooks)
|
|
197
|
-
--cli claude|codex
|
|
221
|
+
--cli claude|codex|copilot|cursor|opencode|pi|gemini
|
|
222
|
+
Agent CLI(s) to uninstall from
|
|
198
223
|
--scope user|project|local|all Config scope to remove from (default: user)
|
|
199
224
|
--beta Remove only beta policies
|
|
200
225
|
--custom, -c Clear the customPoliciesPath from config
|
|
@@ -204,11 +229,20 @@ EXAMPLES
|
|
|
204
229
|
failproofai policies --install
|
|
205
230
|
failproofai policies --install block-sudo sanitize-api-keys
|
|
206
231
|
failproofai policies --install --cli codex --scope project
|
|
207
|
-
failproofai policies --install --cli
|
|
232
|
+
failproofai policies --install --cli copilot --scope project
|
|
233
|
+
failproofai policies --install --cli cursor --scope project
|
|
234
|
+
failproofai policies --install --cli opencode --scope project
|
|
235
|
+
failproofai policies --install --cli pi --scope project
|
|
236
|
+
failproofai policies --install --cli gemini --scope project
|
|
237
|
+
failproofai policies --install --cli claude codex copilot cursor opencode pi gemini
|
|
208
238
|
failproofai policies --install --custom ./my-policies.js
|
|
209
239
|
failproofai policies -i -c ./my-policies.js
|
|
210
240
|
failproofai policies --uninstall block-sudo
|
|
211
241
|
failproofai policies --uninstall --cli codex
|
|
242
|
+
failproofai policies --uninstall --cli copilot
|
|
243
|
+
failproofai policies --uninstall --cli cursor
|
|
244
|
+
failproofai policies --uninstall --cli opencode
|
|
245
|
+
failproofai policies --uninstall --cli pi
|
|
212
246
|
failproofai policies -u
|
|
213
247
|
failproofai policies --uninstall --custom
|
|
214
248
|
`.trimStart());
|
|
@@ -237,10 +271,10 @@ EXAMPLES
|
|
|
237
271
|
}
|
|
238
272
|
|
|
239
273
|
// --cli accepts one or more space-separated values, optionally repeated:
|
|
240
|
-
// --cli claude codex
|
|
274
|
+
// --cli claude codex copilot
|
|
241
275
|
// --cli claude --cli codex
|
|
242
276
|
// Values are consumed greedily until the next flag or end of argv.
|
|
243
|
-
const VALID_CLIS = new Set(["claude", "codex"]);
|
|
277
|
+
const VALID_CLIS = new Set(["claude", "codex", "copilot", "cursor", "opencode", "pi", "gemini"]);
|
|
244
278
|
const cliFlagValues = [];
|
|
245
279
|
const cliConsumedIdxs = new Set();
|
|
246
280
|
const cliFlagIdxs = subArgs.map((a, i) => (a === "--cli" ? i : -1)).filter((i) => i >= 0);
|
|
@@ -257,7 +291,7 @@ EXAMPLES
|
|
|
257
291
|
consumed++;
|
|
258
292
|
}
|
|
259
293
|
if (consumed === 0) {
|
|
260
|
-
throw new CliError("Missing value(s) for --cli. Usage: --cli claude codex (or any subset)");
|
|
294
|
+
throw new CliError("Missing value(s) for --cli. Usage: --cli claude codex copilot cursor opencode pi gemini (or any subset)");
|
|
261
295
|
}
|
|
262
296
|
}
|
|
263
297
|
|
|
@@ -288,7 +322,10 @@ EXAMPLES
|
|
|
288
322
|
: customPoliciesPath !== undefined ? []
|
|
289
323
|
: undefined;
|
|
290
324
|
|
|
291
|
-
const cli = await resolveTargetClis(
|
|
325
|
+
const cli = await resolveTargetClis(
|
|
326
|
+
cliFlagValues.length > 0 ? cliFlagValues : undefined,
|
|
327
|
+
"install",
|
|
328
|
+
);
|
|
292
329
|
|
|
293
330
|
await installHooks(
|
|
294
331
|
policyNames,
|
|
@@ -317,7 +354,7 @@ EXAMPLES
|
|
|
317
354
|
}
|
|
318
355
|
|
|
319
356
|
// --cli accepts one or more space-separated values; same parser as install.
|
|
320
|
-
const VALID_CLIS = new Set(["claude", "codex"]);
|
|
357
|
+
const VALID_CLIS = new Set(["claude", "codex", "copilot", "cursor", "opencode", "pi", "gemini"]);
|
|
321
358
|
const cliFlagValues = [];
|
|
322
359
|
const cliConsumedIdxs = new Set();
|
|
323
360
|
const cliFlagIdxs = subArgs.map((a, i) => (a === "--cli" ? i : -1)).filter((i) => i >= 0);
|
|
@@ -334,7 +371,7 @@ EXAMPLES
|
|
|
334
371
|
consumed++;
|
|
335
372
|
}
|
|
336
373
|
if (consumed === 0) {
|
|
337
|
-
throw new CliError("Missing value(s) for --cli. Usage: --cli claude codex (or any subset)");
|
|
374
|
+
throw new CliError("Missing value(s) for --cli. Usage: --cli claude codex copilot cursor opencode pi gemini (or any subset)");
|
|
338
375
|
}
|
|
339
376
|
}
|
|
340
377
|
|
|
@@ -354,7 +391,10 @@ EXAMPLES
|
|
|
354
391
|
(a, idx) => !a.startsWith("-") && !consumedIdxs.has(idx)
|
|
355
392
|
);
|
|
356
393
|
|
|
357
|
-
const cli = await resolveTargetClis(
|
|
394
|
+
const cli = await resolveTargetClis(
|
|
395
|
+
cliFlagValues.length > 0 ? cliFlagValues : undefined,
|
|
396
|
+
"uninstall",
|
|
397
|
+
);
|
|
358
398
|
|
|
359
399
|
await removeHooks(
|
|
360
400
|
policyNames.length > 0 ? policyNames : undefined,
|