failproofai 1.0.2-beta.0 → 1.0.2-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/.next/BUILD_ID +1 -1
- package/.next/standalone/.next/build-manifest.json +5 -5
- 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/build-manifest.json +2 -2
- 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 +6 -6
- package/.next/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +7 -7
- package/.next/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_not-found/page/build-manifest.json +2 -2
- 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 +1 -1
- package/.next/standalone/.next/server/app/_not-found.rsc +14 -14
- package/.next/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +14 -14
- package/.next/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +13 -13
- package/.next/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/api/audit/invite/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/audit/run/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/audit/status/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/auth/login-request/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/auth/login-verify/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/auth/logout/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/auth/status/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/download/[project]/[session]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/audit/page/build-manifest.json +2 -2
- package/.next/standalone/.next/server/app/audit/page/server-reference-manifest.json +2 -2
- package/.next/standalone/.next/server/app/audit/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/audit/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/index.html +1 -1
- package/.next/standalone/.next/server/app/index.rsc +14 -14
- package/.next/standalone/.next/server/app/index.segments/__PAGE__.segment.rsc +13 -13
- package/.next/standalone/.next/server/app/index.segments/_full.segment.rsc +14 -14
- package/.next/standalone/.next/server/app/index.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/page/build-manifest.json +2 -2
- 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/build-manifest.json +2 -2
- package/.next/standalone/.next/server/app/policies/page/server-reference-manifest.json +14 -14
- 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/build-manifest.json +2 -2
- 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/build-manifest.json +2 -2
- 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/build-manifest.json +2 -2
- 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/app/settings/page/build-manifest.json +2 -2
- package/.next/standalone/.next/server/app/settings/page/server-reference-manifest.json +4 -4
- package/.next/standalone/.next/server/app/settings/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/settings/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0o07qi9._.js +1 -1
- package/.next/standalone/.next/server/chunks/_0tovk6q._.js +1 -1
- package/.next/standalone/.next/server/chunks/_0trp3yc._.js +1 -1
- package/.next/standalone/.next/server/chunks/package_json_[json]_cjs_1nxcc4v._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__013jr2b._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__01wy8d-._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__02npjtd._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__07gm3zl._.js +14 -14
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__090sxxw._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0da85px._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0ftmoxc._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0oa1lav._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0p-5p8u._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0s740oi._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1p2otjt._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/_08x1r5t._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_0wb8osu._.js +23 -0
- package/.next/standalone/.next/server/chunks/ssr/{_12l4a_k._.js → _1oggjel._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_1u8-lu2._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_1zopuov._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/app_audit__components_audit-dashboard_tsx_0p9ud47._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/app_global-error_tsx_1kp6l3x._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/app_policies_hooks-client_tsx_19dqvpc._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/app_settings_settings-client_tsx_20lq-mq._.js +1 -1
- package/.next/standalone/.next/server/middleware-build-manifest.js +5 -5
- package/.next/standalone/.next/server/pages/404.html +1 -1
- 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 +19 -19
- package/.next/standalone/.next/static/chunks/{3y54nw0i7dsjl.js → 0nnbtp0w4sxrr.js} +1 -1
- package/.next/standalone/.next/static/chunks/{0sa9v5mhc8861.js → 0ykd_go4oahan.js} +1 -1
- package/.next/standalone/.next/static/chunks/{0eqky-7n7dgdm.js → 140ip21rqmelt.js} +1 -1
- package/.next/standalone/.next/static/chunks/{2i2yt3hzjredm.js → 1da5a_a-3btas.js} +1 -1
- package/.next/standalone/.next/static/chunks/{1oml7c7env4-g.js → 1fac8krph-zgp.js} +1 -1
- package/.next/standalone/.next/static/chunks/{2hs7ycvsav7v2.js → 1nzy5jc_vf9e0.js} +1 -1
- package/.next/standalone/.next/static/chunks/{1sl2xmn9inx3y.js → 1yw71gn8vqco1.js} +1 -1
- package/.next/standalone/.next/static/chunks/{1nuqytbta44af.js → 29eh4k77otcw6.js} +1 -1
- package/.next/standalone/.next/static/chunks/{2aawsjld9ied_.js → 2axi5ehjbld9h.js} +1 -1
- package/.next/standalone/.next/static/chunks/{2gn7ut4svofm2.js → 2fzxl7n717pbc.js} +1 -1
- package/.next/standalone/.next/static/chunks/{35xg6retpe6rp.js → 3jjmdqqzem21x.js} +1 -1
- package/.next/standalone/.next/static/chunks/{turbopack-3kjgdgwci4tqf.js → turbopack-2vqpa-dts1gy4.js} +1 -1
- package/.next/standalone/app/actions/pack-actions.ts +21 -11
- package/.next/standalone/app/policies/hooks-client.tsx +3 -4
- package/.next/standalone/fp-cloud-cli/fp_cli/_version.py +1 -1
- package/.next/standalone/package.json +10 -11
- package/.next/standalone/sdk/python/failproofai_sdk/_version.py +1 -1
- package/.next/standalone/server.js +1 -1
- package/bin/failproofai.mjs +455 -316
- package/dist/cli.mjs +2374 -1873
- package/dist/worker.mjs +3 -13
- package/package.json +10 -11
- package/src/hooks/configure-wizard.ts +67 -444
- package/src/hooks/fp-reset.ts +10 -19
- package/src/hooks/handler.ts +2 -2
- package/src/hooks/manager.ts +58 -24
- package/src/hooks/pack-cli.ts +488 -43
- package/src/hooks/pack-failclosed.ts +1 -1
- package/src/hooks/pack-manifest.ts +14 -6
- package/src/hooks/pack-store.ts +89 -128
- package/src/hooks/tui.ts +150 -48
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0zig5sv._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/_00e9tnf._.js +0 -23
- package/policy-pack/SHA256SUMS +0 -2
- package/policy-pack/failproofai-pack.json +0 -732
- package/policy-pack/failproofai-pack.mjs +0 -2017
- package/src/hooks/policy-presets.ts +0 -137
- /package/.next/standalone/.next/static/{nwbyWT06Ud0XdXOrVJyvS → A7czO1PZdTcNzLGa_H1sm}/_buildManifest.js +0 -0
- /package/.next/standalone/.next/static/{nwbyWT06Ud0XdXOrVJyvS → A7czO1PZdTcNzLGa_H1sm}/_clientMiddlewareManifest.js +0 -0
- /package/.next/standalone/.next/static/{nwbyWT06Ud0XdXOrVJyvS → A7czO1PZdTcNzLGa_H1sm}/_ssgManifest.js +0 -0
|
@@ -1,137 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Curated policy bundles for the `failproofai config` wizard.
|
|
3
|
-
*
|
|
4
|
-
* Presets are resolved against BUILTIN_POLICIES by category (+ optional extras)
|
|
5
|
-
* so that adding a new builtin to an existing category automatically flows into
|
|
6
|
-
* the matching preset — the wizard stays in sync with the policy catalog with no
|
|
7
|
-
* manual list maintenance. Order here is the order shown in the wizard (before
|
|
8
|
-
* the "Everything" and "Custom…" entries).
|
|
9
|
-
*/
|
|
10
|
-
import { BUILTIN_POLICIES } from "./builtin-policies";
|
|
11
|
-
|
|
12
|
-
export interface PolicyPreset {
|
|
13
|
-
id: string;
|
|
14
|
-
label: string;
|
|
15
|
-
description: string;
|
|
16
|
-
/** Categories whose (non-beta) policies are included in this preset. */
|
|
17
|
-
categories: string[];
|
|
18
|
-
/** Extra policy names to include beyond the category members. */
|
|
19
|
-
extra?: string[];
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
export const POLICY_PRESETS: PolicyPreset[] = [
|
|
23
|
-
{
|
|
24
|
-
id: "secrets",
|
|
25
|
-
label: "Secrets & data",
|
|
26
|
-
description:
|
|
27
|
-
"Redact secrets in tool output, block .env & secret-file writes, keep reads inside the repo",
|
|
28
|
-
categories: ["Sanitize", "Environment"],
|
|
29
|
-
extra: ["block-secrets-write"],
|
|
30
|
-
},
|
|
31
|
-
{
|
|
32
|
-
id: "git",
|
|
33
|
-
label: "Git safety",
|
|
34
|
-
description: "Block force-push & pushes to main, warn on history-rewriting git ops",
|
|
35
|
-
categories: ["Git"],
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
id: "ship",
|
|
39
|
-
label: "Ship discipline",
|
|
40
|
-
description:
|
|
41
|
-
"Don't let the agent finish until changes are committed, pushed, PR'd and CI is green",
|
|
42
|
-
categories: ["Workflow"],
|
|
43
|
-
},
|
|
44
|
-
{
|
|
45
|
-
id: "infra",
|
|
46
|
-
label: "Cloud & infra",
|
|
47
|
-
description: "Block kubectl / terraform / aws / gcloud / az / helm / gh pipeline commands",
|
|
48
|
-
categories: ["Infra Commands"],
|
|
49
|
-
},
|
|
50
|
-
];
|
|
51
|
-
|
|
52
|
-
/** Resolve a preset id to the concrete list of non-beta builtin policy names it
|
|
53
|
-
* enables. (Beta policies are wizard-excluded by design; reintroduce an
|
|
54
|
-
* includeBeta flag here if a `--beta` wizard path ever lands.) */
|
|
55
|
-
export function resolvePreset(id: string): string[] {
|
|
56
|
-
const preset = POLICY_PRESETS.find((p) => p.id === id);
|
|
57
|
-
if (!preset) return [];
|
|
58
|
-
const cats = new Set(preset.categories);
|
|
59
|
-
const fromCategories = BUILTIN_POLICIES.filter(
|
|
60
|
-
(p) => !p.beta && cats.has(p.category),
|
|
61
|
-
).map((p) => p.name);
|
|
62
|
-
const extras = (preset.extra ?? []).filter((name) =>
|
|
63
|
-
BUILTIN_POLICIES.some((p) => p.name === name && !p.beta),
|
|
64
|
-
);
|
|
65
|
-
return [...new Set([...fromCategories, ...extras])];
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
/** Every non-beta builtin policy (the "Everything" option). */
|
|
69
|
-
export function resolveEverything(): string[] {
|
|
70
|
-
return BUILTIN_POLICIES.filter((p) => !p.beta).map((p) => p.name);
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
/**
|
|
74
|
-
* What "Recommended" turns on — the set someone gets for pressing Enter once.
|
|
75
|
-
*
|
|
76
|
-
* WRITTEN OUT, not derived. `defaultEnabled` is the seed for the *policy list*
|
|
77
|
-
* prompt and answers a narrower question ("tick this by default in a list of
|
|
78
|
-
* 40"); this answers "what should guard a machine whose owner did not want to
|
|
79
|
-
* choose". They overlap heavily and are not the same promise, and deriving one
|
|
80
|
-
* from the other would silently change this set every time somebody flipped a
|
|
81
|
-
* flag on an unrelated policy. `recommendedCoversEveryDefault()` keeps them
|
|
82
|
-
* from drifting APART without anyone noticing.
|
|
83
|
-
*
|
|
84
|
-
* Nothing here needs configuring to be useful and nothing here has a common
|
|
85
|
-
* false positive — that is the bar for being in this list, because the person
|
|
86
|
-
* who chose Recommended is the person least equipped to debug a bad deny.
|
|
87
|
-
*
|
|
88
|
-
* Deliberately EXCLUDED, and why:
|
|
89
|
-
* • Workflow (`require-*-before-stop`) — refuses to let the agent finish
|
|
90
|
-
* until CI is green. A defensible choice, never a default one, and it does
|
|
91
|
-
* not fire at all on hermes or goose (see enforcement-capability.ts).
|
|
92
|
-
* • Infra Commands — blocking kubectl/terraform/aws breaks the day job of
|
|
93
|
-
* anyone doing infra. That is what the "Cloud & infra" bundle is for.
|
|
94
|
-
* • block-read-outside-cwd — agents legitimately read outside the repo.
|
|
95
|
-
* • block-work-on-main — plenty of people work on main on purpose.
|
|
96
|
-
* • the warn-* family — non-blocking and cheap, but ten warnings is noise,
|
|
97
|
-
* and a warning nobody reads is worse than one that was never shown.
|
|
98
|
-
*/
|
|
99
|
-
export const RECOMMENDED_POLICIES: readonly string[] = [
|
|
100
|
-
// Secrets never reach the model, and never reach disk.
|
|
101
|
-
"sanitize-jwt",
|
|
102
|
-
"sanitize-api-keys",
|
|
103
|
-
"sanitize-connection-strings",
|
|
104
|
-
"sanitize-private-key-content",
|
|
105
|
-
"sanitize-bearer-tokens",
|
|
106
|
-
"protect-env-vars",
|
|
107
|
-
"block-env-files",
|
|
108
|
-
"block-secrets-write",
|
|
109
|
-
// The agent cannot disable its own guardrails. `block-failproofai-commands`
|
|
110
|
-
// is `alwaysOn` and registers with or without this entry; it is listed anyway
|
|
111
|
-
// so Recommended reads as the complete set rather than quietly omitting the
|
|
112
|
-
// most important line in it.
|
|
113
|
-
"block-failproofai-commands",
|
|
114
|
-
// Commands that are unrecoverable when they are wrong.
|
|
115
|
-
"block-sudo",
|
|
116
|
-
"block-curl-pipe-sh",
|
|
117
|
-
"block-rm-rf",
|
|
118
|
-
// Git history stays recoverable. `--force-with-lease` is still allowed.
|
|
119
|
-
"block-push-master",
|
|
120
|
-
"block-force-push",
|
|
121
|
-
];
|
|
122
|
-
|
|
123
|
-
/**
|
|
124
|
-
* Every `defaultEnabled` policy that Recommended does NOT include.
|
|
125
|
-
*
|
|
126
|
-
* Empty today, and a test asserts it stays that way. The point is the day
|
|
127
|
-
* someone adds a new default-on builtin: Recommended is a separate list and
|
|
128
|
-
* would silently not include it, so a machine set up by pressing Enter would
|
|
129
|
-
* be guarded LESS than one set up through the policy list — the kind of gap
|
|
130
|
-
* that is invisible until somebody is standing in it.
|
|
131
|
-
*/
|
|
132
|
-
export function defaultsMissingFromRecommended(): string[] {
|
|
133
|
-
const recommended = new Set(RECOMMENDED_POLICIES);
|
|
134
|
-
return BUILTIN_POLICIES.filter((p) => p.defaultEnabled && !p.beta && !recommended.has(p.name)).map(
|
|
135
|
-
(p) => p.name,
|
|
136
|
-
);
|
|
137
|
-
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|