failproofai 0.0.6-beta.0 → 0.0.6-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.next/standalone/.failproofai/policies/review-policies.mjs +112 -0
- 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 +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/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 +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/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 +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/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/chunks/[root-of-the-server]__0g72weg._.js +1 -1
- package/.next/standalone/.next/server/chunks/package_json_[json]_cjs_0z7w.hh._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__092s1ta._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__09icjsf._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0g.lg8b._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0h..k-e._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0okos0k._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0.~fd7s._.js → [root-of-the-server]__0rh.18_._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0w6l33k._.js +6 -6
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0a.nuas._.js → [root-of-the-server]__0~kmh8w._.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 +5 -5
- 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/{0hctoh28rg838.js → 01b~z8f1ws0rk.js} +1 -1
- package/.next/standalone/.next/static/chunks/{0uc0um_uz51m_.js → 03rz6ykw-a2xi.js} +1 -1
- package/.next/standalone/.next/static/chunks/{0teq8wdh3po1n.js → 08t08igdql9yt.js} +1 -1
- package/.next/standalone/.next/static/chunks/09_k80d~cq2wg.js +4 -0
- package/.next/standalone/.next/static/chunks/{0ksdlt_1hucdm.js → 0bvhsa6zva2o..js} +1 -1
- package/.next/standalone/.next/static/chunks/{0.z51twd.0l5z.js → 0gbf4cphy8ksq.js} +1 -1
- package/.next/standalone/.next/static/chunks/{0ul6fk-z.6k-0.js → 0v.yd0kg_ld3r.js} +1 -1
- package/.next/standalone/.next/static/chunks/{0hplx-8c-4vpv.js → 0wlyoif4_kj_t.js} +1 -1
- package/.next/standalone/.next/static/chunks/{09e7drilkf1sn.js → 12simlrcfk3g2.js} +1 -1
- package/.next/standalone/.next/static/chunks/{0maq.q1t.ri85.js → 12~yi9oj8av8p.js} +2 -2
- package/.next/standalone/.next/static/chunks/{turbopack-0r26pc8h0y_-e.js → turbopack-0o7k.hakttp4k.js} +1 -1
- package/.next/standalone/CHANGELOG.md +8 -0
- package/.next/standalone/README.md +2 -2
- package/.next/standalone/bun.lock +43 -85
- package/.next/standalone/dist/cli.mjs +90 -3
- package/.next/standalone/docs/built-in-policies.mdx +37 -0
- package/.next/standalone/docs/custom-policies.mdx +1 -1
- package/.next/standalone/docs/examples.mdx +54 -0
- package/.next/standalone/docs/getting-started.mdx +52 -0
- package/.next/standalone/node_modules/@next/env/package.json +1 -1
- package/.next/standalone/node_modules/next/dist/build/swc/index.js +1 -1
- package/.next/standalone/node_modules/next/dist/compiled/next-server/pages-turbo.runtime.prod.js +7 -7
- package/.next/standalone/node_modules/next/dist/lib/patch-incorrect-lockfile.js +3 -3
- package/.next/standalone/node_modules/next/dist/server/config-schema.js +10 -2
- package/.next/standalone/node_modules/next/dist/server/config.js +1 -1
- package/.next/standalone/node_modules/next/dist/server/dev/hot-reloader-turbopack.js +2 -2
- package/.next/standalone/node_modules/next/dist/server/dev/hot-reloader-webpack.js +1 -1
- package/.next/standalone/node_modules/next/dist/server/lib/app-info-log.js +1 -1
- package/.next/standalone/node_modules/next/dist/server/lib/start-server.js +1 -1
- package/.next/standalone/node_modules/next/dist/server/render.js +27 -20
- package/.next/standalone/node_modules/next/dist/shared/lib/errors/canary-only-config-error.js +1 -1
- package/.next/standalone/node_modules/next/dist/telemetry/anonymous-meta.js +1 -1
- package/.next/standalone/node_modules/next/dist/telemetry/events/swc-load-failure.js +1 -1
- package/.next/standalone/node_modules/next/dist/telemetry/events/version.js +2 -2
- package/.next/standalone/node_modules/next/package.json +15 -15
- package/.next/standalone/package.json +2 -2
- package/.next/standalone/server.js +1 -1
- package/.next/standalone/src/hooks/builtin-policies.ts +101 -0
- package/README.md +2 -2
- package/dist/cli.mjs +90 -3
- package/package.json +2 -2
- package/src/hooks/builtin-policies.ts +101 -0
- package/.next/standalone/.next/static/chunks/0w9lwqy0-v1dk.js +0 -4
- /package/.next/standalone/.next/static/{8mygPGI5bzrtWK36ZYO59 → CkmOT-ZvDN-sVULinGVKT}/_buildManifest.js +0 -0
- /package/.next/standalone/.next/static/{8mygPGI5bzrtWK36ZYO59 → CkmOT-ZvDN-sVULinGVKT}/_clientMiddlewareManifest.js +0 -0
- /package/.next/standalone/.next/static/{8mygPGI5bzrtWK36ZYO59 → CkmOT-ZvDN-sVULinGVKT}/_ssgManifest.js +0 -0
|
@@ -242,6 +242,60 @@ Every team member who has failproofai installed will automatically pick up these
|
|
|
242
242
|
|
|
243
243
|
---
|
|
244
244
|
|
|
245
|
+
## Build an org-wide quality standard with convention policies
|
|
246
|
+
|
|
247
|
+
The most impactful setup: commit `.failproofai/policies/` to your repo with policies tailored to your project. Every team member gets them automatically — no install commands, no config changes.
|
|
248
|
+
|
|
249
|
+
<Steps>
|
|
250
|
+
<Step title="Create the directory and add policies">
|
|
251
|
+
```bash
|
|
252
|
+
mkdir -p .failproofai/policies
|
|
253
|
+
```
|
|
254
|
+
|
|
255
|
+
```js
|
|
256
|
+
// .failproofai/policies/team-policies.mjs
|
|
257
|
+
import { customPolicies, allow, deny, instruct } from "failproofai";
|
|
258
|
+
|
|
259
|
+
// Enforce your team's preferred package manager
|
|
260
|
+
// (or enable the built-in prefer-package-manager policy instead)
|
|
261
|
+
customPolicies.add({
|
|
262
|
+
name: "enforce-bun",
|
|
263
|
+
match: { events: ["PreToolUse"] },
|
|
264
|
+
fn: async (ctx) => {
|
|
265
|
+
if (ctx.toolName !== "Bash") return allow();
|
|
266
|
+
const cmd = String(ctx.toolInput?.command ?? "");
|
|
267
|
+
if (/\bnpm\b/.test(cmd)) return deny("Use bun instead of npm.");
|
|
268
|
+
return allow();
|
|
269
|
+
},
|
|
270
|
+
});
|
|
271
|
+
|
|
272
|
+
// Remind the agent to run tests before committing
|
|
273
|
+
customPolicies.add({
|
|
274
|
+
name: "test-before-commit",
|
|
275
|
+
match: { events: ["PreToolUse"] },
|
|
276
|
+
fn: async (ctx) => {
|
|
277
|
+
if (ctx.toolName !== "Bash") return allow();
|
|
278
|
+
if (/git\s+commit/.test(ctx.toolInput?.command ?? "")) {
|
|
279
|
+
return instruct("Run tests before committing.");
|
|
280
|
+
}
|
|
281
|
+
return allow();
|
|
282
|
+
},
|
|
283
|
+
});
|
|
284
|
+
```
|
|
285
|
+
</Step>
|
|
286
|
+
<Step title="Commit to git">
|
|
287
|
+
```bash
|
|
288
|
+
git add .failproofai/policies/
|
|
289
|
+
git commit -m "Add team quality policies"
|
|
290
|
+
```
|
|
291
|
+
</Step>
|
|
292
|
+
<Step title="Keep improving">
|
|
293
|
+
As your team hits new failure modes, add policies and push. Everyone gets the update on their next `git pull`. These policies become a living quality standard that grows with your team.
|
|
294
|
+
</Step>
|
|
295
|
+
</Steps>
|
|
296
|
+
|
|
297
|
+
---
|
|
298
|
+
|
|
245
299
|
## More examples
|
|
246
300
|
|
|
247
301
|
The [`examples/`](https://github.com/exospherehost/failproofai/tree/main/examples) directory in the repo contains:
|
|
@@ -87,6 +87,58 @@ Policies run in your local process. Nothing is sent to a remote service.
|
|
|
87
87
|
|
|
88
88
|
---
|
|
89
89
|
|
|
90
|
+
## Set up team policies with convention-based policies
|
|
91
|
+
|
|
92
|
+
The fastest way to establish quality standards across your team is the `.failproofai/policies/` convention. Drop policy files into this directory and they're loaded automatically — no flags, no config changes, no install commands.
|
|
93
|
+
|
|
94
|
+
<Steps>
|
|
95
|
+
<Step title="Create the policies directory">
|
|
96
|
+
```bash
|
|
97
|
+
mkdir -p .failproofai/policies
|
|
98
|
+
```
|
|
99
|
+
</Step>
|
|
100
|
+
<Step title="Add policy files">
|
|
101
|
+
Copy the starter examples or write your own:
|
|
102
|
+
|
|
103
|
+
```bash
|
|
104
|
+
cp node_modules/failproofai/examples/convention-policies/*.mjs .failproofai/policies/
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
Or create a new one:
|
|
108
|
+
|
|
109
|
+
```js
|
|
110
|
+
// .failproofai/policies/team-policies.mjs
|
|
111
|
+
import { customPolicies, allow, deny, instruct } from "failproofai";
|
|
112
|
+
|
|
113
|
+
customPolicies.add({
|
|
114
|
+
name: "test-before-commit",
|
|
115
|
+
match: { events: ["PreToolUse"] },
|
|
116
|
+
fn: async (ctx) => {
|
|
117
|
+
if (ctx.toolName !== "Bash") return allow();
|
|
118
|
+
if (/git\s+commit/.test(ctx.toolInput?.command ?? "")) {
|
|
119
|
+
return instruct("Run tests before committing.");
|
|
120
|
+
}
|
|
121
|
+
return allow();
|
|
122
|
+
},
|
|
123
|
+
});
|
|
124
|
+
```
|
|
125
|
+
</Step>
|
|
126
|
+
<Step title="Commit to git">
|
|
127
|
+
```bash
|
|
128
|
+
git add .failproofai/policies/
|
|
129
|
+
git commit -m "Add team quality policies"
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
Every team member who has failproofai installed picks up these policies automatically. No per-developer setup needed.
|
|
133
|
+
</Step>
|
|
134
|
+
</Steps>
|
|
135
|
+
|
|
136
|
+
<Tip>
|
|
137
|
+
Commit `.failproofai/policies/` to your repo so the whole team shares the same standards. As your team discovers new failure modes, add policies and push — everyone gets the update on their next `git pull`. Over time these policies become a living quality standard that keeps improving.
|
|
138
|
+
</Tip>
|
|
139
|
+
|
|
140
|
+
---
|
|
141
|
+
|
|
90
142
|
## Data storage
|
|
91
143
|
|
|
92
144
|
All configuration and logs stay on your machine:
|
|
@@ -134,7 +134,7 @@ var HmrTarget = /*#__PURE__*/ function(HmrTarget) {
|
|
|
134
134
|
HmrTarget["Server"] = "server";
|
|
135
135
|
return HmrTarget;
|
|
136
136
|
}({});
|
|
137
|
-
const nextVersion = "16.2.
|
|
137
|
+
const nextVersion = "16.2.4";
|
|
138
138
|
const ArchName = (0, _os.arch)();
|
|
139
139
|
const PlatformName = (0, _os.platform)();
|
|
140
140
|
function infoLog(...args) {
|