failproofai 0.0.1-beta.6 → 0.0.1-beta.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.next/standalone/.next/BUILD_ID +1 -1
- package/.next/standalone/.next/build-manifest.json +3 -3
- package/.next/standalone/.next/prerender-manifest.json +3 -3
- package/.next/standalone/.next/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]__02nt~6d._.js +1 -1
- package/.next/standalone/.next/server/chunks/package_json_[json]_cjs_0z7w.hh._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__092s1ta._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__09icjsf._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__10xz9fd._.js → [root-of-the-server]__0cnhb7_._.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]__0osi8nq._.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]__0t6id1-._.js → [root-of-the-server]__0xmjv9e._.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/{0vka59vj~_p84.js → 00qeuetfdsgjk.js} +1 -1
- package/.next/standalone/.next/static/chunks/{1281t-wuuwf5w.js → 07nvevyjq47qo.js} +1 -1
- package/.next/standalone/.next/static/chunks/{0xcw_k6u.z2ji.js → 0b.lzb_keexdb.js} +3 -3
- package/.next/standalone/.next/static/chunks/{13_h4vv__dm-j.js → 0iv-rbjm2j5nc.js} +1 -1
- package/.next/standalone/.next/static/chunks/{0g0lmawbbronf.js → 0jfhld9mk1zm4.js} +1 -1
- package/.next/standalone/.next/static/chunks/{0y.26ewi_d6ao.js → 0jzowkzl-dd6s.js} +1 -1
- package/.next/standalone/.next/static/chunks/{15e_zyvm~z00h.js → 0w4.ug1d.ok15.js} +1 -1
- package/.next/standalone/.next/static/chunks/{096d4k7vsm6js.js → 16_nu40klq96n.js} +1 -1
- package/.next/standalone/bin/failproofai.mjs +131 -65
- package/.next/standalone/components/reach-developers.tsx +11 -1
- package/.next/standalone/package.json +1 -1
- package/.next/standalone/scripts/launch.ts +2 -0
- package/.next/standalone/scripts/postinstall.mjs +1 -1
- package/.next/standalone/src/hooks/install-prompt.ts +2 -2
- package/.next/standalone/src/hooks/manager.ts +5 -5
- package/bin/failproofai.mjs +131 -65
- package/package.json +1 -1
- package/scripts/launch.ts +2 -0
- package/scripts/postinstall.mjs +1 -1
- package/src/hooks/install-prompt.ts +2 -2
- package/src/hooks/manager.ts +5 -5
- /package/.next/standalone/.next/static/{-60bMZ3yrx1LbpOPZF1qZ → H15OMlkQejMvLowzdBldp}/_buildManifest.js +0 -0
- /package/.next/standalone/.next/static/{-60bMZ3yrx1LbpOPZF1qZ → H15OMlkQejMvLowzdBldp}/_clientMiddlewareManifest.js +0 -0
- /package/.next/standalone/.next/static/{-60bMZ3yrx1LbpOPZF1qZ → H15OMlkQejMvLowzdBldp}/_ssgManifest.js +0 -0
|
@@ -326,8 +326,8 @@ export async function installHooks(
|
|
|
326
326
|
console.log();
|
|
327
327
|
console.log(`\x1B[33mWarning: Failproof AI hooks are also installed at ${scopeList}.\x1B[0m`);
|
|
328
328
|
console.log(`Having hooks in multiple scopes may cause duplicate policy evaluation.`);
|
|
329
|
-
console.log(`Use \`failproofai
|
|
330
|
-
console.log(`or \`failproofai
|
|
329
|
+
console.log(`Use \`failproofai policies --uninstall --scope ${duplicates[0]}\` to remove the other installation,`);
|
|
330
|
+
console.log(`or \`failproofai policies\` to see all scopes.`);
|
|
331
331
|
}
|
|
332
332
|
}
|
|
333
333
|
|
|
@@ -528,9 +528,9 @@ export async function listHooks(cwd?: string): Promise<void> {
|
|
|
528
528
|
printBetaSection(printSimpleRow);
|
|
529
529
|
|
|
530
530
|
if (config.enabledPolicies.length > 0) {
|
|
531
|
-
console.log("\n Policies not installed. Run `failproofai --install
|
|
531
|
+
console.log("\n Policies not installed. Run `failproofai policies --install` to activate.");
|
|
532
532
|
} else {
|
|
533
|
-
console.log("\n Run `failproofai --install
|
|
533
|
+
console.log("\n Run `failproofai policies --install` to get started.");
|
|
534
534
|
}
|
|
535
535
|
console.log(" Config: ~/.failproofai/policies-config.json\n");
|
|
536
536
|
} else if (installedScopes.length === 1) {
|
|
@@ -594,7 +594,7 @@ export async function listHooks(cwd?: string): Promise<void> {
|
|
|
594
594
|
const scopeNames = installedScopes.join(", ");
|
|
595
595
|
console.log();
|
|
596
596
|
console.log(`\x1B[33m\u26A0 Hooks in multiple scopes (${scopeNames}).\x1B[0m`);
|
|
597
|
-
console.log(" Consider keeping one. Remove with: failproofai
|
|
597
|
+
console.log(" Consider keeping one. Remove with: failproofai policies --uninstall --scope <scope>\n");
|
|
598
598
|
}
|
|
599
599
|
|
|
600
600
|
// Warn about unknown policyParams keys
|
package/bin/failproofai.mjs
CHANGED
|
@@ -6,9 +6,7 @@
|
|
|
6
6
|
* --hook <event> Hook event from Claude Code (minimal startup latency)
|
|
7
7
|
* --version / -v Print version and exit
|
|
8
8
|
* --help / -h Show usage and exit
|
|
9
|
-
*
|
|
10
|
-
* --remove-policies Remove hooks or disable policies from Claude Code settings
|
|
11
|
-
* --list-policies List available policies and their status
|
|
9
|
+
* policies Manage policies (list / install / uninstall)
|
|
12
10
|
* (default) Launch production dashboard
|
|
13
11
|
*/
|
|
14
12
|
import { realpathSync } from "node:fs";
|
|
@@ -28,8 +26,9 @@ if (!process.env.FAILPROOFAI_PACKAGE_ROOT) {
|
|
|
28
26
|
|
|
29
27
|
const args = process.argv.slice(2);
|
|
30
28
|
|
|
31
|
-
// --help / -h
|
|
32
|
-
|
|
29
|
+
// --help / -h (only when not inside a subcommand that handles its own --help)
|
|
30
|
+
const SUBCOMMANDS = ["policies"];
|
|
31
|
+
if ((args.includes("--help") || args.includes("-h")) && !SUBCOMMANDS.includes(args[0])) {
|
|
33
32
|
console.log(`
|
|
34
33
|
failproofai v${version}
|
|
35
34
|
|
|
@@ -39,28 +38,36 @@ USAGE
|
|
|
39
38
|
COMMANDS
|
|
40
39
|
(no args) Launch the policy dashboard
|
|
41
40
|
|
|
42
|
-
|
|
41
|
+
policies List all available policies and their status
|
|
42
|
+
policies --install, -i Enable policies in Claude Code settings
|
|
43
|
+
[names...] Specific policy names to enable
|
|
43
44
|
--scope user|project|local Config scope to write to (default: user)
|
|
44
45
|
--beta Include beta policies
|
|
45
|
-
--custom <path>
|
|
46
|
+
--custom, -c <path> Path to a JS file of custom policies
|
|
46
47
|
|
|
47
|
-
--
|
|
48
|
+
policies --uninstall, -u Disable policies or remove hooks
|
|
49
|
+
[names...] Specific policy names to disable
|
|
48
50
|
--scope user|project|local|all Config scope to remove from (default: user)
|
|
49
51
|
--beta Remove only beta policies
|
|
50
|
-
--custom
|
|
52
|
+
--custom, -c Clear the customPoliciesPath from config
|
|
51
53
|
|
|
52
|
-
--
|
|
54
|
+
policies --help, -h Show this help for the policies command
|
|
53
55
|
|
|
54
56
|
--version, -v Print version and exit
|
|
55
57
|
--help, -h Show this help message
|
|
56
58
|
|
|
57
59
|
EXAMPLES
|
|
58
|
-
failproofai
|
|
59
|
-
failproofai
|
|
60
|
-
failproofai --install-
|
|
61
|
-
failproofai --
|
|
62
|
-
failproofai
|
|
63
|
-
failproofai --
|
|
60
|
+
failproofai policies
|
|
61
|
+
failproofai policies --install
|
|
62
|
+
failproofai policies --install block-sudo sanitize-api-keys --scope project
|
|
63
|
+
failproofai policies --install --custom ./my-policies.js
|
|
64
|
+
failproofai policies -i -c ./my-policies.js
|
|
65
|
+
failproofai policies --uninstall block-sudo
|
|
66
|
+
failproofai policies --uninstall --custom
|
|
67
|
+
|
|
68
|
+
LINKS
|
|
69
|
+
⭐ Star us: https://github.com/exospherehost/failproofai
|
|
70
|
+
📖 Docs: https://befailproof.ai
|
|
64
71
|
`.trimStart());
|
|
65
72
|
process.exit(0);
|
|
66
73
|
}
|
|
@@ -79,70 +86,121 @@ if (hookIdx >= 0 && args[hookIdx + 1]) {
|
|
|
79
86
|
process.exit(exitCode);
|
|
80
87
|
}
|
|
81
88
|
|
|
82
|
-
// --install
|
|
83
|
-
if (args
|
|
84
|
-
const
|
|
89
|
+
// policies [--install|-i|--uninstall|-u|--help|-h] [names...] [--scope] [--beta] [--custom|-c <path>]
|
|
90
|
+
if (args[0] === "policies") {
|
|
91
|
+
const subArgs = args.slice(1);
|
|
85
92
|
|
|
86
|
-
const
|
|
87
|
-
const
|
|
93
|
+
const isInstall = subArgs.includes("--install") || subArgs.includes("-i");
|
|
94
|
+
const isUninstall = subArgs.includes("--uninstall") || subArgs.includes("-u");
|
|
95
|
+
const isHelp = subArgs.includes("--help") || subArgs.includes("-h");
|
|
88
96
|
|
|
89
|
-
|
|
90
|
-
|
|
97
|
+
if (isHelp) {
|
|
98
|
+
console.log(`
|
|
99
|
+
failproofai policies — manage Failproof AI policies
|
|
91
100
|
|
|
92
|
-
|
|
101
|
+
USAGE
|
|
102
|
+
failproofai policies List all policies and their status
|
|
103
|
+
failproofai policies --install, -i Enable policies
|
|
104
|
+
failproofai policies --uninstall, -u Disable policies or remove hooks
|
|
105
|
+
|
|
106
|
+
OPTIONS (install)
|
|
107
|
+
[names...] Specific policy names to enable (omit for interactive)
|
|
108
|
+
--scope user|project|local Config scope to write to (default: user)
|
|
109
|
+
--beta Include beta policies
|
|
110
|
+
--custom, -c <path> Path to a JS file of custom policies
|
|
111
|
+
(skips interactive prompt; validates file first)
|
|
112
|
+
|
|
113
|
+
OPTIONS (uninstall)
|
|
114
|
+
[names...] Specific policy names to disable (omit to remove hooks)
|
|
115
|
+
--scope user|project|local|all Config scope to remove from (default: user)
|
|
116
|
+
--beta Remove only beta policies
|
|
117
|
+
--custom, -c Clear the customPoliciesPath from config
|
|
93
118
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
119
|
+
EXAMPLES
|
|
120
|
+
failproofai policies
|
|
121
|
+
failproofai policies --install
|
|
122
|
+
failproofai policies --install block-sudo sanitize-api-keys
|
|
123
|
+
failproofai policies --install --custom ./my-policies.js
|
|
124
|
+
failproofai policies -i -c ./my-policies.js
|
|
125
|
+
failproofai policies --uninstall block-sudo
|
|
126
|
+
failproofai policies -u
|
|
127
|
+
failproofai policies --uninstall --custom
|
|
128
|
+
`.trimStart());
|
|
129
|
+
process.exit(0);
|
|
130
|
+
}
|
|
99
131
|
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
scope,
|
|
103
|
-
undefined,
|
|
104
|
-
includeBeta,
|
|
105
|
-
undefined,
|
|
106
|
-
customPoliciesPath,
|
|
107
|
-
);
|
|
108
|
-
process.exit(0);
|
|
109
|
-
}
|
|
132
|
+
if (isInstall) {
|
|
133
|
+
const { installHooks } = await import("../src/hooks/manager");
|
|
110
134
|
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
const { removeHooks } = await import("../src/hooks/manager");
|
|
135
|
+
const scopeIdx = subArgs.indexOf("--scope");
|
|
136
|
+
const scope = scopeIdx >= 0 ? subArgs[scopeIdx + 1] : "user";
|
|
114
137
|
|
|
115
|
-
|
|
116
|
-
|
|
138
|
+
const customIdx = subArgs.includes("--custom") ? subArgs.indexOf("--custom")
|
|
139
|
+
: subArgs.includes("-c") ? subArgs.indexOf("-c")
|
|
140
|
+
: -1;
|
|
141
|
+
const customPoliciesPath = customIdx >= 0 ? subArgs[customIdx + 1] : undefined;
|
|
117
142
|
|
|
118
|
-
|
|
119
|
-
const removeCustomHooks = args.includes("--custom");
|
|
143
|
+
const includeBeta = subArgs.includes("--beta");
|
|
120
144
|
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
.
|
|
124
|
-
|
|
145
|
+
// Collect positional policy names — args that don't start with - and aren't
|
|
146
|
+
// values consumed by --scope or --custom/-c.
|
|
147
|
+
const consumed = new Set([scope, customPoliciesPath].filter(Boolean));
|
|
148
|
+
const flags = new Set(["--install", "-i", "--scope", "--beta", "--custom", "-c"]);
|
|
149
|
+
const explicitPolicyNames = subArgs.filter(
|
|
150
|
+
(a) => !a.startsWith("-") && !flags.has(a) && !consumed.has(a)
|
|
151
|
+
);
|
|
125
152
|
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
153
|
+
// When --custom/-c is present but no explicit policy names, pass [] so
|
|
154
|
+
// installHooks uses the existing enabled policies and skips the interactive
|
|
155
|
+
// prompt — validation of the custom file happens inside installHooks.
|
|
156
|
+
const policyNames =
|
|
157
|
+
explicitPolicyNames.length > 0 ? explicitPolicyNames
|
|
158
|
+
: customPoliciesPath !== undefined ? []
|
|
159
|
+
: undefined;
|
|
160
|
+
|
|
161
|
+
await installHooks(
|
|
162
|
+
policyNames,
|
|
163
|
+
scope,
|
|
164
|
+
undefined,
|
|
165
|
+
includeBeta,
|
|
166
|
+
undefined,
|
|
167
|
+
customPoliciesPath,
|
|
168
|
+
);
|
|
169
|
+
process.exit(0);
|
|
170
|
+
}
|
|
134
171
|
|
|
135
|
-
|
|
136
|
-
|
|
172
|
+
if (isUninstall) {
|
|
173
|
+
const { removeHooks } = await import("../src/hooks/manager");
|
|
174
|
+
|
|
175
|
+
const scopeIdx = subArgs.indexOf("--scope");
|
|
176
|
+
const scope = scopeIdx >= 0 ? subArgs[scopeIdx + 1] : "user";
|
|
177
|
+
|
|
178
|
+
const betaOnly = subArgs.includes("--beta");
|
|
179
|
+
const removeCustomHooks = subArgs.includes("--custom") || subArgs.includes("-c");
|
|
180
|
+
|
|
181
|
+
const consumed = new Set([scope].filter(Boolean));
|
|
182
|
+
const flags = new Set(["--uninstall", "-u", "--scope", "--beta", "--custom", "-c"]);
|
|
183
|
+
const policyNames = subArgs.filter(
|
|
184
|
+
(a) => !a.startsWith("-") && !flags.has(a) && !consumed.has(a)
|
|
185
|
+
);
|
|
186
|
+
|
|
187
|
+
await removeHooks(
|
|
188
|
+
policyNames.length > 0 ? policyNames : undefined,
|
|
189
|
+
scope,
|
|
190
|
+
undefined,
|
|
191
|
+
{ betaOnly, removeCustomHooks },
|
|
192
|
+
);
|
|
193
|
+
process.exit(0);
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
// Default: list policies
|
|
137
197
|
const { listHooks } = await import("../src/hooks/manager");
|
|
138
198
|
await listHooks();
|
|
139
199
|
process.exit(0);
|
|
140
200
|
}
|
|
141
201
|
|
|
142
202
|
// Unknown flag guard — must appear after all known-flag branches
|
|
143
|
-
const knownFlags = ["--version", "-v", "--help", "-h", "--hook"
|
|
144
|
-
"--install-policies", "--remove-policies", "--list-policies",
|
|
145
|
-
"--scope", "--beta", "--custom"];
|
|
203
|
+
const knownFlags = ["--version", "-v", "--help", "-h", "--hook"];
|
|
146
204
|
const unknownFlag = args.find(a => a.startsWith("-") && !knownFlags.includes(a));
|
|
147
205
|
|
|
148
206
|
if (unknownFlag) {
|
|
@@ -159,8 +217,7 @@ if (unknownFlag) {
|
|
|
159
217
|
return dp[m][n];
|
|
160
218
|
}
|
|
161
219
|
|
|
162
|
-
const primary = ["--version", "--help", "--hook", "
|
|
163
|
-
"--remove-policies", "--list-policies"];
|
|
220
|
+
const primary = ["--version", "--help", "--hook", "policies"];
|
|
164
221
|
const closest = primary.reduce((best, flag) => {
|
|
165
222
|
const dist = levenshtein(unknownFlag, flag);
|
|
166
223
|
return dist < best.dist ? { flag, dist } : best;
|
|
@@ -172,6 +229,15 @@ if (unknownFlag) {
|
|
|
172
229
|
process.exit(1);
|
|
173
230
|
}
|
|
174
231
|
|
|
232
|
+
// Unknown subcommand guard (non-flag args that aren't "policies")
|
|
233
|
+
const unknownSubcommand = args.find(a => !a.startsWith("-") && a !== "policies");
|
|
234
|
+
if (unknownSubcommand) {
|
|
235
|
+
console.error(`Unknown command: ${unknownSubcommand}`);
|
|
236
|
+
console.error(`Did you mean: failproofai policies?`);
|
|
237
|
+
console.error(`Run \`failproofai --help\` for usage details.`);
|
|
238
|
+
process.exit(1);
|
|
239
|
+
}
|
|
240
|
+
|
|
175
241
|
// Dashboard launch — always production mode
|
|
176
242
|
const { launch } = await import("../scripts/launch");
|
|
177
243
|
launch("start");
|
package/package.json
CHANGED
package/scripts/launch.ts
CHANGED
|
@@ -20,6 +20,8 @@ export function launch(mode: "dev" | "start"): void {
|
|
|
20
20
|
/_/ \\__,_/_/_/ .___/_/ \\____/\\____/_/ /_/ |_/___/
|
|
21
21
|
/_/ v${version}
|
|
22
22
|
`);
|
|
23
|
+
console.log(` ⭐ Star us: https://github.com/exospherehost/failproofai`);
|
|
24
|
+
console.log(` 📖 Docs: https://befailproof.ai\n`);
|
|
23
25
|
|
|
24
26
|
let claudeProjectsPath = parsedPath;
|
|
25
27
|
|
package/scripts/postinstall.mjs
CHANGED
|
@@ -87,7 +87,7 @@ function printHooksWarning() {
|
|
|
87
87
|
console.log(
|
|
88
88
|
`\n[failproofai] Warning: hooks config exists with enabled policies, but hooks are not registered in Claude Code settings.\n` +
|
|
89
89
|
` To re-register hooks, run:\n` +
|
|
90
|
-
` failproofai
|
|
90
|
+
` failproofai policies --uninstall && failproofai policies --install\n`
|
|
91
91
|
);
|
|
92
92
|
}
|
|
93
93
|
|
|
@@ -263,11 +263,11 @@ export async function promptPolicySelection(
|
|
|
263
263
|
);
|
|
264
264
|
lines.push("");
|
|
265
265
|
lines.push(
|
|
266
|
-
" \x1B[2mTip:
|
|
266
|
+
" \x1B[2mTip: `policies` for a flat list \u00b7 `policies --install <name\u2026>` to skip prompt\x1B[0m",
|
|
267
267
|
);
|
|
268
268
|
if (!includeBeta) {
|
|
269
269
|
lines.push(
|
|
270
|
-
" \x1B[2mTip: --install
|
|
270
|
+
" \x1B[2mTip: `policies --install --beta` to include beta policies\x1B[0m",
|
|
271
271
|
);
|
|
272
272
|
}
|
|
273
273
|
|
package/src/hooks/manager.ts
CHANGED
|
@@ -326,8 +326,8 @@ export async function installHooks(
|
|
|
326
326
|
console.log();
|
|
327
327
|
console.log(`\x1B[33mWarning: Failproof AI hooks are also installed at ${scopeList}.\x1B[0m`);
|
|
328
328
|
console.log(`Having hooks in multiple scopes may cause duplicate policy evaluation.`);
|
|
329
|
-
console.log(`Use \`failproofai
|
|
330
|
-
console.log(`or \`failproofai
|
|
329
|
+
console.log(`Use \`failproofai policies --uninstall --scope ${duplicates[0]}\` to remove the other installation,`);
|
|
330
|
+
console.log(`or \`failproofai policies\` to see all scopes.`);
|
|
331
331
|
}
|
|
332
332
|
}
|
|
333
333
|
|
|
@@ -528,9 +528,9 @@ export async function listHooks(cwd?: string): Promise<void> {
|
|
|
528
528
|
printBetaSection(printSimpleRow);
|
|
529
529
|
|
|
530
530
|
if (config.enabledPolicies.length > 0) {
|
|
531
|
-
console.log("\n Policies not installed. Run `failproofai --install
|
|
531
|
+
console.log("\n Policies not installed. Run `failproofai policies --install` to activate.");
|
|
532
532
|
} else {
|
|
533
|
-
console.log("\n Run `failproofai --install
|
|
533
|
+
console.log("\n Run `failproofai policies --install` to get started.");
|
|
534
534
|
}
|
|
535
535
|
console.log(" Config: ~/.failproofai/policies-config.json\n");
|
|
536
536
|
} else if (installedScopes.length === 1) {
|
|
@@ -594,7 +594,7 @@ export async function listHooks(cwd?: string): Promise<void> {
|
|
|
594
594
|
const scopeNames = installedScopes.join(", ");
|
|
595
595
|
console.log();
|
|
596
596
|
console.log(`\x1B[33m\u26A0 Hooks in multiple scopes (${scopeNames}).\x1B[0m`);
|
|
597
|
-
console.log(" Consider keeping one. Remove with: failproofai
|
|
597
|
+
console.log(" Consider keeping one. Remove with: failproofai policies --uninstall --scope <scope>\n");
|
|
598
598
|
}
|
|
599
599
|
|
|
600
600
|
// Warn about unknown policyParams keys
|
|
File without changes
|
|
File without changes
|
|
File without changes
|