failproofai 1.0.13-beta.1 → 1.0.13-beta.3
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/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.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 +2 -2
- 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 +2 -2
- 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 +1 -1
- package/.next/standalone/.next/server/app/_not-found.rsc +3 -3
- package/.next/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +3 -3
- 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/_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/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 +3 -3
- package/.next/standalone/.next/server/app/index.segments/__PAGE__.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/index.segments/_full.segment.rsc +3 -3
- 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 +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/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/app/settings/page/server-reference-manifest.json +8 -8
- 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/_0tovk6q0miud6._.js +1 -1
- package/.next/standalone/.next/server/chunks/_0trp3ycqv17cl._.js +1 -1
- package/.next/standalone/.next/server/chunks/package_json_[json]_cjs_1nxcc4vkpxxu7._.js +1 -1
- package/.next/standalone/.next/server/chunks/src_hooks_0_em82s16zfym._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0mhtkwwx1pxcq._.js → [root-of-the-server]__070rqh7scntiu._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__08ch3staq3ejw._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0bigvy9xmv2ka._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0h86bl2qf0k_o._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0pia5h3p8re4c._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1-ey9fgesfbc0._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__15usvs-ms-0hf._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__16gb3_92zvk5x._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1avi2kypusyb_._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1r7drlqli-ado._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_0eoura3_9gjb-._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_0ouu886szh6yj._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_0pedwblqdoh58._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_1djqs9i27e4kg._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{_0bc4f4quq6w47._.js → _1tcvpgd7hugnx._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/_next-internal_server_app_policies_page_actions_1sp2-yo5_vm5f.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/app_actions_get-scheduled-audit_ts_0ei9snixb5fd-._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/app_audit__components_audit-dashboard_tsx_0p9ud47q0xq5w._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/app_global-error_tsx_1kp6l3x33jqb6._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/app_policies_hooks-client_tsx_19dqvpcz0uxur._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/app_settings_02tf1h47jmhhd._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{node_modules_html-to-image_es_index_1jwgv0pf-gy96.js → node_modules_html-to-image_es_index_1p-is71j0j7fb.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/package_json_[json]_cjs_013tntikdft59._.js +1 -1
- package/.next/standalone/.next/server/middleware-build-manifest.js +3 -3
- 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/preview-props.json +3 -3
- package/.next/standalone/.next/server/server-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/server-reference-manifest.json +23 -23
- package/.next/standalone/.next/static/chunks/{0cbom4-ijx_a_.js → 095l2av-xsus2.js} +1 -1
- package/.next/standalone/.next/static/chunks/{2d-u90dt4-8rd.js → 0h7mkux811w5b.js} +1 -1
- package/.next/standalone/.next/static/chunks/{2zc7lg-jq353g.js → 19l5hbzn475am.js} +1 -1
- package/.next/standalone/.next/static/chunks/{38u_i3j5funpi.js → 1s__s2o5zcfcy.js} +1 -1
- package/.next/standalone/.next/static/chunks/{18-icoqze51kl.js → 1uxq_gbvdti30.js} +1 -1
- package/.next/standalone/.next/static/chunks/{3vzut6zpdrvtx.js → 2sthn8c56n9m_.js} +1 -1
- package/.next/standalone/.next/static/chunks/{3symuj7t4js-c.js → 3eonfpk9jyceg.js} +1 -1
- package/.next/standalone/.next/static/chunks/{2n-bzb7pxe7hu.js → 3m9g1l6-yh0s3.js} +1 -1
- package/.next/standalone/.next/static/chunks/{33djjf12bhcsv.js → 3uaguc-tbu_ik.js} +1 -1
- package/.next/standalone/.next/static/chunks/{0u5weo5jdn2s8.js → 3zwff_ax3hust.js} +1 -1
- package/.next/standalone/hermes-plugin/plugin.yaml +1 -1
- package/.next/standalone/package.json +9 -9
- package/.next/standalone/sdk/python/uv.lock +3 -3
- package/.next/standalone/server.js +1 -1
- package/dist/cli.mjs +14 -14
- package/dist/worker.mjs +5 -4
- package/hermes-plugin/plugin.yaml +1 -1
- package/openclaw-plugin/index.js +211 -17
- package/package.json +9 -9
- package/src/hooks/enforcement-capability.ts +1 -1
- package/src/hooks/integrations.ts +2 -5
- package/src/hooks/types.ts +20 -17
- package/openclaw-plugin/daemon-client.js +0 -254
- package/openclaw-plugin/hooks.js +0 -187
- /package/.next/standalone/.next/static/{1n2dyfTQb0MDajeqlipJy → fHR90vZ5ls7d-K8cH9hxe}/_buildManifest.js +0 -0
- /package/.next/standalone/.next/static/{1n2dyfTQb0MDajeqlipJy → fHR90vZ5ls7d-K8cH9hxe}/_clientMiddlewareManifest.js +0 -0
- /package/.next/standalone/.next/static/{1n2dyfTQb0MDajeqlipJy → fHR90vZ5ls7d-K8cH9hxe}/_ssgManifest.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{"use strict";(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,
|
|
1
|
+
(()=>{"use strict";(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,67382,e=>{var a=e.i(95187);let t=(0,a.createServerReference)("6015b3dc8961095b5310a3f12d453cd8f41e1a0ea5",a.callServer,void 0,a.findSourceMapURL,"searchHookActivityAction");e.s(["f",0,t])},73520,e=>{var a=e.i(43476),t=e.i(24071),r=e.i(67927);e.s(["f",0,function({currentPage:e,totalPages:s,onPageChange:n}){if(s<=1)return null;let l=e=>`px-3 py-2 text-sm rounded-md transition-colors flex items-center gap-1 bg-muted text-muted-foreground ${e?"opacity-50 cursor-not-allowed":"hover:bg-muted/80"}`;return(0,a.jsxs)("div",{className:"flex items-center justify-center gap-2 py-4",children:[(0,a.jsxs)("button",{onClick:()=>n(e-1),disabled:1===e,className:l(1===e),"aria-label":"Previous page",children:[(0,a.jsx)(t.f,{className:"w-4 h-4"}),(0,a.jsx)("span",{className:"hidden sm:inline",children:"Previous"})]}),(0,a.jsx)("div",{className:"flex items-center gap-1",children:(()=>{if(s<=7)return Array.from({length:s},(e,a)=>a+1);let a=[1],t=Math.max(2,e-1),r=Math.min(s-1,e+1);e<=3&&(r=Math.min(5,s-1)),e>=s-2&&(t=Math.max(2,s-4)),t>2&&a.push("ellipsis-start");for(let e=t;e<=r;e++)a.push(e);return r<s-1&&a.push("ellipsis-end"),a.push(s),a})().map(t=>"string"==typeof t?(0,a.jsx)("span",{className:"px-2 text-muted-foreground",children:"..."},t):(0,a.jsx)("button",{onClick:()=>n(t),className:`min-w-[2.5rem] px-3 py-2 text-sm rounded-md transition-colors ${e===t?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground hover:bg-muted/80"}`,"aria-label":`Page ${t}`,"aria-current":e===t?"page":void 0,children:t},t))}),(0,a.jsxs)("button",{onClick:()=>n(e+1),disabled:e===s,className:l(e===s),"aria-label":"Next page",children:[(0,a.jsx)("span",{className:"hidden sm:inline",children:"Next"}),(0,a.jsx)(r.f,{className:"w-4 h-4"})]})]})}])},34713,e=>{e.s(["M",0,function(e){if(e<1e3)return`${e}ms`;let a=Math.round(e/100);if(a<600)return`${(a/10).toFixed(1)}s`;let t=Math.round(e/1e3);if(t<3600){let e=Math.floor(t/60);return`${e}m ${t%60}s`}let r=Math.round(e/6e4),s=Math.floor(r/60);return`${s}h ${r%60}m`},"g",0,function(e){let a=Date.now()-e;return a<6e4?`${Math.max(1,Math.floor(a/1e3))}s ago`:a<36e5?`${Math.floor(a/6e4)}m ago`:a<864e5?`${Math.floor(a/36e5)}h ago`:`${Math.floor(a/864e5)}d ago`}])},24071,e=>{var a=e.i(56420);let t={name:"chevron-left",size:24,node:[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]};t.node;let r=(0,a.f)(t);e.s(["f",0,r],24071)},67927,e=>{var a=e.i(56420);let t={name:"chevron-right",size:24,node:[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]};t.node;let r=(0,a.f)(t);e.s(["f",0,r],67927)},16306,e=>{var a=e.i(56420);let t={name:"shield-alert",size:24,node:[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]]};t.node;let r=(0,a.f)(t);e.s(["f",0,r],16306)},84026,29407,e=>{var a=e.i(56420);let t={name:"shield-check",size:24,node:[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]};t.node;let r=(0,a.f)(t);e.s(["f",0,r],84026);let s={name:"shield-x",size:24,node:[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m14.5 9.5-5 5",key:"17q4r4"}],["path",{d:"m9.5 9.5 5 5",key:"18nt4w"}]],aliases:["shield-close"]};s.node;let n=(0,a.f)(s);e.s(["f",0,n],29407)},82954,e=>{var a=e.i(56420);let t={name:"shield",size:24,node:[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]]};t.node;let r=(0,a.f)(t);e.s(["f",0,r],82954)}])})();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "failproofai",
|
|
3
|
-
"version": "1.0.13-beta.
|
|
3
|
+
"version": "1.0.13-beta.3",
|
|
4
4
|
"description": "Observability and enforcement for AI agent harnesses. 40 built-in policies hooked into 12 of them — Claude Code, Codex, Cursor, Hermes, OpenClaw and more — blocking the tool call before it runs. Local dashboard included, no account needed.",
|
|
5
5
|
"bin": {
|
|
6
6
|
"failproofai": "./dist/cli.mjs",
|
|
@@ -126,15 +126,15 @@
|
|
|
126
126
|
"browserslist": "4.28.8"
|
|
127
127
|
},
|
|
128
128
|
"optionalDependencies": {
|
|
129
|
-
"@failproofai/failproofaid-linux-x64": "1.0.13-beta.
|
|
130
|
-
"@failproofai/failproofaid-linux-arm64": "1.0.13-beta.
|
|
131
|
-
"@failproofai/failproofaid-darwin-x64": "1.0.13-beta.
|
|
132
|
-
"@failproofai/failproofaid-darwin-arm64": "1.0.13-beta.
|
|
129
|
+
"@failproofai/failproofaid-linux-x64": "1.0.13-beta.3",
|
|
130
|
+
"@failproofai/failproofaid-linux-arm64": "1.0.13-beta.3",
|
|
131
|
+
"@failproofai/failproofaid-darwin-x64": "1.0.13-beta.3",
|
|
132
|
+
"@failproofai/failproofaid-darwin-arm64": "1.0.13-beta.3"
|
|
133
133
|
},
|
|
134
134
|
"failproofaidBinaries": {
|
|
135
|
-
"linux-x64": "
|
|
136
|
-
"linux-arm64": "
|
|
137
|
-
"darwin-x64": "
|
|
138
|
-
"darwin-arm64": "
|
|
135
|
+
"linux-x64": "86f8b544b95d33b3464c916dff72e1a1436340d98c480dc8f83d1696dda1e5fe",
|
|
136
|
+
"linux-arm64": "d09376e5608e1379c247087386473f4ff1fcaa264022e570cc00f2cbb66b09fb",
|
|
137
|
+
"darwin-x64": "95f485247270fef7f4676e383ec586e339451c87dcd0480e1a12d721a62bec4b",
|
|
138
|
+
"darwin-arm64": "f8c0d43dba6d78facb00a0a265c188238e50223aedab2c17b3e66c202edacf5d"
|
|
139
139
|
}
|
|
140
140
|
}
|
|
@@ -2534,7 +2534,7 @@ wheels = [
|
|
|
2534
2534
|
|
|
2535
2535
|
[[package]]
|
|
2536
2536
|
name = "nltk"
|
|
2537
|
-
version = "3.10.
|
|
2537
|
+
version = "3.10.3"
|
|
2538
2538
|
source = { registry = "https://pypi.org/simple" }
|
|
2539
2539
|
dependencies = [
|
|
2540
2540
|
{ name = "click" },
|
|
@@ -2543,9 +2543,9 @@ dependencies = [
|
|
|
2543
2543
|
{ name = "regex" },
|
|
2544
2544
|
{ name = "tqdm" },
|
|
2545
2545
|
]
|
|
2546
|
-
sdist = { url = "https://files.pythonhosted.org/packages/
|
|
2546
|
+
sdist = { url = "https://files.pythonhosted.org/packages/e0/e6/fe51d2bb1a3b446f59c5c8165999a9fee208bc346af90a7cbf7657bc0d75/nltk-3.10.3.tar.gz", hash = "sha256:bb9327a461c3811c2fa4900e03840401f2126adfb30c0072827c433bd2444ea4", size = 5137152, upload-time = "2026-08-12T23:46:37.258Z" }
|
|
2547
2547
|
wheels = [
|
|
2548
|
-
{ url = "https://files.pythonhosted.org/packages/
|
|
2548
|
+
{ url = "https://files.pythonhosted.org/packages/b6/6d/ebd2af4640b12168fdf0cb74b6118df2f32a2f62ec7e0c06fbfd80706639/nltk-3.10.3-py3-none-any.whl", hash = "sha256:ff9598a8e20518ee0d557745890cc4435b9578489e2dcbc69c4f81fa060caf7c", size = 1798643, upload-time = "2026-08-12T23:44:13.478Z" },
|
|
2549
2549
|
]
|
|
2550
2550
|
|
|
2551
2551
|
[[package]]
|
|
@@ -9,7 +9,7 @@ const currentPort = parseInt(process.env.PORT, 10) || 3000
|
|
|
9
9
|
const hostname = process.env.HOSTNAME || '0.0.0.0'
|
|
10
10
|
|
|
11
11
|
let keepAliveTimeout = parseInt(process.env.KEEP_ALIVE_TIMEOUT, 10)
|
|
12
|
-
const nextConfig = {"env":{"NEXT_PUBLIC_APP_VERSION":"1.0.13-beta.
|
|
12
|
+
const nextConfig = {"env":{"NEXT_PUBLIC_APP_VERSION":"1.0.13-beta.3"},"typescript":{"ignoreBuildErrors":false},"typedRoutes":false,"distDir":"./.next","cleanDistDir":true,"assetPrefix":"","cacheMaxMemorySize":52428800,"configOrigin":"next.config.ts","useFileSystemPublicRoutes":true,"generateEtags":true,"pageExtensions":["tsx","ts","jsx","js"],"instrumentationClientInject":[],"poweredByHeader":true,"compress":true,"images":{"deviceSizes":[640,750,828,1080,1200,1920,2048,3840],"imageSizes":[32,48,64,96,128,256,384],"path":"/_next/image","loader":"default","loaderFile":"","domains":[],"disableStaticImages":false,"minimumCacheTTL":14400,"formats":["image/webp"],"maximumRedirects":3,"maximumResponseBody":50000000,"dangerouslyAllowLocalIP":false,"dangerouslyAllowSVG":false,"contentSecurityPolicy":"script-src 'none'; frame-src 'none'; sandbox;","contentDispositionType":"attachment","localPatterns":[{"pathname":"**","search":""}],"remotePatterns":[],"qualities":[75],"unoptimized":true,"customCacheHandler":false},"devIndicators":{"position":"bottom-left"},"onDemandEntries":{"maxInactiveAge":60000,"pagesBufferLength":5},"basePath":"","sassOptions":{},"trailingSlash":false,"i18n":null,"productionBrowserSourceMaps":false,"excludeDefaultMomentLocales":true,"reactProductionProfiling":false,"reactStrictMode":null,"reactMaxHeadersLength":6000,"httpAgentOptions":{"keepAlive":true},"logging":{"serverFunctions":true,"browserToTerminal":"warn"},"compiler":{},"expireTime":31536000,"staticPageGenerationTimeout":60,"output":"standalone","modularizeImports":{"@mui/icons-material":{"transform":"@mui/icons-material/{{member}}"},"lodash":{"transform":"lodash/{{member}}"}},"outputFileTracingRoot":"/home/runner/work/failproofai/failproofai","enablePrerenderSourceMaps":true,"cacheComponents":false,"cacheLife":{"default":{"stale":300,"revalidate":900,"expire":4294967294},"seconds":{"stale":30,"revalidate":1,"expire":60},"minutes":{"stale":300,"revalidate":60,"expire":3600},"hours":{"stale":300,"revalidate":3600,"expire":86400},"days":{"stale":300,"revalidate":86400,"expire":604800},"weeks":{"stale":300,"revalidate":604800,"expire":2592000},"max":{"stale":300,"revalidate":2592000,"expire":31536000}},"cacheHandlers":{},"deprecated":{},"experimental":{"agentUpgrade":"security","agentFeedback":false,"coldCacheBadge":false,"collapseAdapterRoutes":true,"devValidationWorker":true,"useSkewCookie":false,"cssChunking":true,"multiZoneDraftMode":false,"appNavFailHandling":false,"parallelRouteMetadata":false,"prerenderEarlyExit":true,"serverMinification":true,"linkNoTouchStart":false,"caseSensitiveRoutes":false,"cachedNavigations":false,"dynamicOnHover":false,"reactBrowserBailout":true,"useOffline":false,"varyParams":true,"optimisticRouting":true,"concurrentRouterQueue":false,"instrumentationClientRouterTransitionEvents":false,"prefetchInlining":{"maxSize":2048,"maxBundleSize":10240},"preloadEntriesOnStart":true,"clientRouterFilter":true,"clientRouterFilterRedirects":false,"fetchCacheKeyPrefix":"","proxyPrefetch":"flexible","optimisticClientCache":true,"manualClientBasePath":false,"cpus":3,"memoryBasedWorkersCount":false,"imgOptConcurrency":null,"imgOptOperationCache":null,"imgOptTimeoutInSeconds":7,"imgOptMaxInputPixels":268402689,"imgOptSequentialRead":null,"imgOptMozjpeg":true,"isrFlushToDisk":true,"workerThreads":false,"optimizeCss":false,"nextScriptWorkers":false,"scrollRestoration":false,"externalDir":false,"devMemoryThresholdRestart":true,"disableOptimizedLoading":false,"gzipSize":true,"craCompat":false,"esmExternals":true,"fullySpecified":false,"swcTraceProfiling":false,"forceSwcTransforms":false,"requestInsights":false,"largePageDataBytes":128000,"typedEnv":false,"parallelServerCompiles":false,"parallelServerBuildTraces":false,"ppr":false,"authInterrupts":false,"webpackMemoryOptimizations":false,"optimizeServerReact":true,"strictRouteTypes":false,"useTypeScriptCli":true,"removeUncaughtErrorAndRejectionListeners":false,"validateRSCRequestHeaders":true,"staleTimes":{"dynamic":0,"static":300},"reactDebugChannel":true,"serverComponentsHmrCache":true,"serverComponentsHmrCancellation":false,"staticGenerationMaxConcurrency":8,"staticGenerationMinPagesPerWorker":25,"transitionIndicator":false,"gestureTransition":false,"inlineCss":false,"useCache":false,"useCacheStaticRootParamTracking":false,"globalNotFound":false,"explicitParallelRouteChildren":true,"strictRouteMatching":true,"browserDebugInfoInTerminal":"warn","lockDistDir":true,"disableResumeDataCacheCompression":false,"proxyClientMaxBodySize":10485760,"hideLogsAfterAbort":false,"mcpServer":true,"exposeRuntimeErrorsToHMR":false,"turbopackFileSystemCacheForDev":true,"turbopackFileSystemCacheForBuild":true,"turbopackStaleOutputMaxAge":604800000,"turbopackInferModuleSideEffects":true,"turbopackPluginRuntimeStrategy":"childProcesses","turbopackSharedRuntime":true,"turbopackMemoryEvictionMode":"auto","optimizePackageImports":["lucide-react","date-fns","lodash-es","ramda","antd","react-bootstrap","ahooks","@ant-design/icons","@headlessui/react","@headlessui-float/react","@heroicons/react/20/solid","@heroicons/react/24/solid","@heroicons/react/24/outline","@visx/visx","@tremor/react","rxjs","@mui/material","@mui/icons-material","recharts","react-use","effect","@effect/schema","@effect/platform","@effect/platform-node","@effect/platform-browser","@effect/platform-bun","@effect/sql","@effect/sql-mssql","@effect/sql-mysql2","@effect/sql-pg","@effect/sql-sqlite-node","@effect/sql-sqlite-bun","@effect/sql-sqlite-wasm","@effect/sql-sqlite-react-native","@effect/rpc","@effect/rpc-http","@effect/typeclass","@effect/experimental","@effect/opentelemetry","@material-ui/core","@material-ui/icons","@tabler/icons-react","mui-core","react-icons/ai","react-icons/bi","react-icons/bs","react-icons/cg","react-icons/ci","react-icons/di","react-icons/fa","react-icons/fa6","react-icons/fc","react-icons/fi","react-icons/gi","react-icons/go","react-icons/gr","react-icons/hi","react-icons/hi2","react-icons/im","react-icons/io","react-icons/io5","react-icons/lia","react-icons/lib","react-icons/lu","react-icons/md","react-icons/pi","react-icons/ri","react-icons/rx","react-icons/si","react-icons/sl","react-icons/tb","react-icons/tfi","react-icons/ti","react-icons/vsc","react-icons/wi"],"useCacheTimeout":54,"instantInsights":{"validationLevel":"warning"},"trustHostHeader":false,"isExperimentalCompile":false},"htmlLimitedBots":"[\\w-]+-Google|Google-[\\w-]+|Chrome-Lighthouse|Slurp|DuckDuckBot|baiduspider|yandex|sogou|bitlybot|tumblr|vkShare|quora link preview|redditbot|ia_archiver|Bingbot|BingPreview|applebot|facebookexternalhit|facebookcatalog|Twitterbot|LinkedInBot|Slackbot|Discordbot|WhatsApp|SkypeUriPreview|Yeti|googleweblight","bundlePagesRouterDependencies":false,"configFileName":"next.config.ts","outputFileTracingExcludes":{"*":["node_modules/@img/**","node_modules/sharp/**"]},"turbopack":{"root":"/home/runner/work/failproofai/failproofai"},"repoRoot":"/home/runner/work/failproofai/failproofai","distDirRoot":".next"}
|
|
13
13
|
|
|
14
14
|
process.env.__NEXT_PRIVATE_STANDALONE_CONFIG = JSON.stringify(nextConfig)
|
|
15
15
|
|
package/dist/cli.mjs
CHANGED
|
@@ -29,7 +29,7 @@ var __esm = (fn, res, err) => () => {
|
|
|
29
29
|
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
30
30
|
|
|
31
31
|
// package.json
|
|
32
|
-
var version2 = "1.0.13-beta.
|
|
32
|
+
var version2 = "1.0.13-beta.3", package_default;
|
|
33
33
|
var init_package = __esm(() => {
|
|
34
34
|
package_default = {
|
|
35
35
|
name: "failproofai",
|
|
@@ -159,16 +159,16 @@ var init_package = __esm(() => {
|
|
|
159
159
|
browserslist: "4.28.8"
|
|
160
160
|
},
|
|
161
161
|
optionalDependencies: {
|
|
162
|
-
"@failproofai/failproofaid-linux-x64": "1.0.13-beta.
|
|
163
|
-
"@failproofai/failproofaid-linux-arm64": "1.0.13-beta.
|
|
164
|
-
"@failproofai/failproofaid-darwin-x64": "1.0.13-beta.
|
|
165
|
-
"@failproofai/failproofaid-darwin-arm64": "1.0.13-beta.
|
|
162
|
+
"@failproofai/failproofaid-linux-x64": "1.0.13-beta.3",
|
|
163
|
+
"@failproofai/failproofaid-linux-arm64": "1.0.13-beta.3",
|
|
164
|
+
"@failproofai/failproofaid-darwin-x64": "1.0.13-beta.3",
|
|
165
|
+
"@failproofai/failproofaid-darwin-arm64": "1.0.13-beta.3"
|
|
166
166
|
},
|
|
167
167
|
failproofaidBinaries: {
|
|
168
|
-
"linux-x64": "
|
|
169
|
-
"linux-arm64": "
|
|
170
|
-
"darwin-x64": "
|
|
171
|
-
"darwin-arm64": "
|
|
168
|
+
"linux-x64": "86f8b544b95d33b3464c916dff72e1a1436340d98c480dc8f83d1696dda1e5fe",
|
|
169
|
+
"linux-arm64": "d09376e5608e1379c247087386473f4ff1fcaa264022e570cc00f2cbb66b09fb",
|
|
170
|
+
"darwin-x64": "95f485247270fef7f4676e383ec586e339451c87dcd0480e1a12d721a62bec4b",
|
|
171
|
+
"darwin-arm64": "f8c0d43dba6d78facb00a0a265c188238e50223aedab2c17b3e66c202edacf5d"
|
|
172
172
|
}
|
|
173
173
|
};
|
|
174
174
|
});
|
|
@@ -1550,6 +1550,7 @@ var init_types = __esm(() => {
|
|
|
1550
1550
|
ANTIGRAVITY_TOOL_MAP = {
|
|
1551
1551
|
run_command: "Bash",
|
|
1552
1552
|
write_to_file: "Write",
|
|
1553
|
+
write_file: "Write",
|
|
1553
1554
|
read_file: "Read",
|
|
1554
1555
|
view_file: "Read",
|
|
1555
1556
|
edit_file: "Edit",
|
|
@@ -1562,9 +1563,9 @@ var init_types = __esm(() => {
|
|
|
1562
1563
|
};
|
|
1563
1564
|
ANTIGRAVITY_TOOL_INPUT_MAP = {
|
|
1564
1565
|
Bash: { CommandLine: "command", Cwd: "cwd" },
|
|
1565
|
-
Write: { TargetFile: "file_path", CodeContent: "content" },
|
|
1566
|
-
Edit: { TargetFile: "file_path" },
|
|
1567
|
-
Read: { TargetFile: "file_path", AbsolutePath: "file_path", File: "file_path" }
|
|
1566
|
+
Write: { Path: "file_path", Content: "content", TargetFile: "file_path", CodeContent: "content" },
|
|
1567
|
+
Edit: { Path: "file_path", Target: "old_string", Replacement: "new_string", TargetFile: "file_path" },
|
|
1568
|
+
Read: { Path: "file_path", TargetFile: "file_path", AbsolutePath: "file_path", File: "file_path" }
|
|
1568
1569
|
};
|
|
1569
1570
|
GOOSE_HOOK_SCOPES = ["user", "project"];
|
|
1570
1571
|
GOOSE_HOOK_EVENT_TYPES = [
|
|
@@ -16336,7 +16337,6 @@ var init_integrations = __esm(() => {
|
|
|
16336
16337
|
openclaw = {
|
|
16337
16338
|
id: "openclaw",
|
|
16338
16339
|
displayName: "OpenClaw",
|
|
16339
|
-
requiresHealthyDaemon: true,
|
|
16340
16340
|
scopes: OPENCLAW_HOOK_SCOPES,
|
|
16341
16341
|
eventTypes: OPENCLAW_HOOK_EVENT_TYPES,
|
|
16342
16342
|
getSettingsPath() {
|
|
@@ -53075,7 +53075,7 @@ import { realpathSync as realpathSync9 } from "fs";
|
|
|
53075
53075
|
import { dirname as dirname34, resolve as resolve47 } from "path";
|
|
53076
53076
|
import { fileURLToPath as fileURLToPath4 } from "url";
|
|
53077
53077
|
// package.json
|
|
53078
|
-
var version = "1.0.13-beta.
|
|
53078
|
+
var version = "1.0.13-beta.3";
|
|
53079
53079
|
|
|
53080
53080
|
// bin/failproofai.mjs
|
|
53081
53081
|
if (!process.env.FAILPROOFAI_PACKAGE_ROOT) {
|
package/dist/worker.mjs
CHANGED
|
@@ -209,6 +209,7 @@ var init_types = __esm(() => {
|
|
|
209
209
|
ANTIGRAVITY_TOOL_MAP = {
|
|
210
210
|
run_command: "Bash",
|
|
211
211
|
write_to_file: "Write",
|
|
212
|
+
write_file: "Write",
|
|
212
213
|
read_file: "Read",
|
|
213
214
|
view_file: "Read",
|
|
214
215
|
edit_file: "Edit",
|
|
@@ -221,9 +222,9 @@ var init_types = __esm(() => {
|
|
|
221
222
|
};
|
|
222
223
|
ANTIGRAVITY_TOOL_INPUT_MAP = {
|
|
223
224
|
Bash: { CommandLine: "command", Cwd: "cwd" },
|
|
224
|
-
Write: { TargetFile: "file_path", CodeContent: "content" },
|
|
225
|
-
Edit: { TargetFile: "file_path" },
|
|
226
|
-
Read: { TargetFile: "file_path", AbsolutePath: "file_path", File: "file_path" }
|
|
225
|
+
Write: { Path: "file_path", Content: "content", TargetFile: "file_path", CodeContent: "content" },
|
|
226
|
+
Edit: { Path: "file_path", Target: "old_string", Replacement: "new_string", TargetFile: "file_path" },
|
|
227
|
+
Read: { Path: "file_path", TargetFile: "file_path", AbsolutePath: "file_path", File: "file_path" }
|
|
227
228
|
};
|
|
228
229
|
GOOSE_TOOL_MAP = {
|
|
229
230
|
shell: "Bash",
|
|
@@ -1166,7 +1167,7 @@ function instruct(reason) {
|
|
|
1166
1167
|
}
|
|
1167
1168
|
|
|
1168
1169
|
// package.json
|
|
1169
|
-
var version = "1.0.13-beta.
|
|
1170
|
+
var version = "1.0.13-beta.3";
|
|
1170
1171
|
var init_package = () => {};
|
|
1171
1172
|
|
|
1172
1173
|
// src/hooks/agent-targets.ts
|
package/openclaw-plugin/index.js
CHANGED
|
@@ -4,36 +4,230 @@
|
|
|
4
4
|
* Loaded in-process by the gateway (registered via `plugins.load.paths` +
|
|
5
5
|
* `plugins.entries.failproofai` in ~/.openclaw/openclaw.json). It subscribes to
|
|
6
6
|
* OpenClaw's typed PLUGIN hooks — the only surface that can block; OpenClaw's
|
|
7
|
-
* file-based "internal hooks" are observation-only — and
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
* from the same session/policy are allowed for a short window.
|
|
7
|
+
* file-based "internal hooks" are observation-only — and forwards each to the
|
|
8
|
+
* failproofai binary as `failproofai --hook <event> --cli openclaw`. failproofai
|
|
9
|
+
* prints a flat `{permission, reason}` verdict on stdout; this shim maps it to
|
|
10
|
+
* each hook's native return shape. On before_tool_call, an `instruct` verdict
|
|
11
|
+
* uses a one-shot blockReason as OpenClaw's model-visible instruction channel;
|
|
12
|
+
* retries from the same session/policy are allowed for a short window.
|
|
14
13
|
*
|
|
15
14
|
* Marker comment for failproofai's installer detection (do not remove):
|
|
16
15
|
* __failproofai_hook__: true
|
|
17
16
|
*
|
|
18
|
-
* Design notes:
|
|
19
|
-
* •
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
17
|
+
* Design notes (verified live against openclaw v2026.7.1):
|
|
18
|
+
* • ASYNC spawn, never spawnSync — the gateway is a long-running multi-channel
|
|
19
|
+
* process; a synchronous spawn on every hook would stall every channel.
|
|
20
|
+
* 30s guard timer; fail-open on any error (never block on infra failure).
|
|
21
|
+
* • Raw forwarding — we send the raw tool name / params and a Claude-shaped
|
|
22
|
+
* stdin (params→tool_input, toolName→tool_name, transcriptPath→
|
|
23
|
+
* transcript_path, stopHookActive→stop_hook_active, sessionKey→session_id).
|
|
24
|
+
* The binary canonicalizes via OPENCLAW_* maps (single source of truth); the
|
|
25
|
+
* shim ships NO inline maps (unlike the OpenCode/Pi shims).
|
|
26
26
|
* • No top-level `await` — OpenClaw's plugin loader rejects it; all async work
|
|
27
27
|
* happens inside register()'s handlers.
|
|
28
|
+
*
|
|
29
|
+
* Binary resolution mirrors pi-extension/index.ts: prefer the bundled
|
|
30
|
+
* dist/cli.mjs (node-compatible), fall back to bin/failproofai.mjs with bun for
|
|
31
|
+
* dev; honor FAILPROOFAI_BINARY_OVERRIDE. Paths resolve relative to this file
|
|
32
|
+
* via import.meta.url (the gateway spawns plugins with an undefined cwd).
|
|
28
33
|
*/
|
|
29
34
|
import { definePluginEntry } from "openclaw/plugin-sdk/plugin-entry";
|
|
30
|
-
import {
|
|
35
|
+
import { spawn } from "node:child_process";
|
|
36
|
+
import { existsSync } from "node:fs";
|
|
37
|
+
import { resolve, dirname } from "node:path";
|
|
38
|
+
import { fileURLToPath } from "node:url";
|
|
39
|
+
import { createInstructRetryGate, mapBeforeToolVerdict } from "./instruct-retry-gate.js";
|
|
40
|
+
import { createWorkspaceContext } from "./workspace-context.js";
|
|
41
|
+
|
|
42
|
+
const HERE = dirname(fileURLToPath(import.meta.url));
|
|
43
|
+
const DIST_BIN = resolve(HERE, "..", "dist", "cli.mjs");
|
|
44
|
+
const SRC_BIN = resolve(HERE, "..", "bin", "failproofai.mjs");
|
|
45
|
+
const instructRetryGate = createInstructRetryGate();
|
|
46
|
+
const workspaceContext = createWorkspaceContext();
|
|
47
|
+
|
|
48
|
+
function resolveSpawn() {
|
|
49
|
+
if (process.env.FAILPROOFAI_BINARY_OVERRIDE) {
|
|
50
|
+
return { cmd: "node", args: [process.env.FAILPROOFAI_BINARY_OVERRIDE] };
|
|
51
|
+
}
|
|
52
|
+
if (existsSync(DIST_BIN)) {
|
|
53
|
+
return { cmd: "node", args: [DIST_BIN] };
|
|
54
|
+
}
|
|
55
|
+
return { cmd: "bun", args: [SRC_BIN] };
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
function debug(msg) {
|
|
59
|
+
if (process.env.FAILPROOFAI_OPENCLAW_DEBUG === "1") {
|
|
60
|
+
process.stderr.write(`[failproofai-openclaw-shim] ${msg}\n`);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Spawn `failproofai --hook <rawEvent> --cli openclaw`, write the JSON payload
|
|
66
|
+
* to stdin, and resolve the parsed flat `{permission, reason}` verdict. Async +
|
|
67
|
+
* fail-open: any spawn/parse error or timeout resolves to `{permission:"allow"}`
|
|
68
|
+
* so a failproofai fault never blocks the gateway.
|
|
69
|
+
*/
|
|
70
|
+
function callPolicy(rawEvent, payload) {
|
|
71
|
+
return new Promise((done) => {
|
|
72
|
+
const { cmd, args } = resolveSpawn();
|
|
73
|
+
let child;
|
|
74
|
+
try {
|
|
75
|
+
child = spawn(cmd, [...args, "--hook", rawEvent, "--cli", "openclaw"], {
|
|
76
|
+
stdio: ["pipe", "pipe", "pipe"],
|
|
77
|
+
});
|
|
78
|
+
} catch (err) {
|
|
79
|
+
debug(`spawn threw: ${err && err.message ? err.message : String(err)}`);
|
|
80
|
+
done({ permission: "allow" });
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
let out = "";
|
|
84
|
+
let settled = false;
|
|
85
|
+
const finish = (verdict) => {
|
|
86
|
+
if (settled) return;
|
|
87
|
+
settled = true;
|
|
88
|
+
clearTimeout(timer);
|
|
89
|
+
done(verdict);
|
|
90
|
+
};
|
|
91
|
+
const timer = setTimeout(() => {
|
|
92
|
+
debug(`timeout on ${rawEvent}; killing child`);
|
|
93
|
+
try { child.kill(); } catch { /* ignore */ }
|
|
94
|
+
finish({ permission: "allow" });
|
|
95
|
+
}, 30_000);
|
|
96
|
+
child.stdout.on("data", (d) => { out += d; });
|
|
97
|
+
child.on("error", (err) => {
|
|
98
|
+
debug(`child error: ${err && err.message ? err.message : String(err)}`);
|
|
99
|
+
finish({ permission: "allow" });
|
|
100
|
+
});
|
|
101
|
+
child.on("close", () => {
|
|
102
|
+
const stdout = out.trim();
|
|
103
|
+
if (!stdout) { finish({ permission: "allow" }); return; }
|
|
104
|
+
try {
|
|
105
|
+
finish(JSON.parse(stdout));
|
|
106
|
+
} catch (err) {
|
|
107
|
+
debug(`parse error: ${err && err.message ? err.message : String(err)}`);
|
|
108
|
+
finish({ permission: "allow" });
|
|
109
|
+
}
|
|
110
|
+
});
|
|
111
|
+
try {
|
|
112
|
+
child.stdin.end(JSON.stringify(payload));
|
|
113
|
+
} catch (err) {
|
|
114
|
+
debug(`stdin write failed: ${err && err.message ? err.message : String(err)}`);
|
|
115
|
+
finish({ permission: "allow" });
|
|
116
|
+
}
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
/** Claude-shaped stdin base. Extra keys are ignored by the binary's payload
|
|
121
|
+
* parser; they're forwarded for future use / activity attribution. */
|
|
122
|
+
function baseMeta(payload, ctx, config) {
|
|
123
|
+
const p = payload || {};
|
|
124
|
+
const c = ctx || {};
|
|
125
|
+
return {
|
|
126
|
+
session_id: c.sessionId ?? p.sessionId ?? c.sessionKey ?? p.sessionKey,
|
|
127
|
+
cwd: workspaceContext.resolveWorkspace(p, c, config) ?? process.cwd(),
|
|
128
|
+
transcript_path: p.transcriptPath,
|
|
129
|
+
stop_hook_active: p.stopHookActive === true,
|
|
130
|
+
openclaw: {
|
|
131
|
+
agentId: c.agentId,
|
|
132
|
+
sessionKey: c.sessionKey ?? p.sessionKey,
|
|
133
|
+
runId: c.runId ?? p.runId,
|
|
134
|
+
provider: p.provider,
|
|
135
|
+
model: p.model,
|
|
136
|
+
},
|
|
137
|
+
};
|
|
138
|
+
}
|
|
31
139
|
|
|
32
140
|
export default definePluginEntry({
|
|
33
141
|
id: "failproofai",
|
|
34
142
|
name: "failproofai",
|
|
35
143
|
description: "Real-time policy enforcement for OpenClaw by failproofai",
|
|
36
144
|
register(api) {
|
|
37
|
-
|
|
145
|
+
// before_tool_call → PreToolUse. Deny always blocks. Instruct blocks the
|
|
146
|
+
// first matching attempt only, using blockReason to give the model the
|
|
147
|
+
// instruction, then permits retries from that session/policy for 5 minutes.
|
|
148
|
+
api.on(
|
|
149
|
+
"before_tool_call",
|
|
150
|
+
async (payload, ctx) => {
|
|
151
|
+
const p = payload || {};
|
|
152
|
+
const verdict = await callPolicy("before_tool_call", {
|
|
153
|
+
...baseMeta(payload, ctx, api.config),
|
|
154
|
+
tool_name: p.toolName,
|
|
155
|
+
tool_input: p.params,
|
|
156
|
+
hook_event_name: "before_tool_call",
|
|
157
|
+
});
|
|
158
|
+
return mapBeforeToolVerdict(verdict, payload, ctx, instructRetryGate);
|
|
159
|
+
},
|
|
160
|
+
{ priority: 100, timeoutMs: 60_000 },
|
|
161
|
+
);
|
|
162
|
+
|
|
163
|
+
// before_agent_run → UserPromptSubmit. Deny: return {outcome:"block", reason}.
|
|
164
|
+
api.on(
|
|
165
|
+
"before_agent_run",
|
|
166
|
+
async (payload, ctx) => {
|
|
167
|
+
const p = payload || {};
|
|
168
|
+
workspaceContext.remember(payload, ctx);
|
|
169
|
+
const verdict = await callPolicy("before_agent_run", {
|
|
170
|
+
...baseMeta(payload, ctx, api.config),
|
|
171
|
+
prompt: p.prompt,
|
|
172
|
+
hook_event_name: "before_agent_run",
|
|
173
|
+
});
|
|
174
|
+
if (verdict.permission === "deny") {
|
|
175
|
+
return { outcome: "block", reason: verdict.reason || "Blocked by failproofai" };
|
|
176
|
+
}
|
|
177
|
+
return undefined;
|
|
178
|
+
},
|
|
179
|
+
{ priority: 100, timeoutMs: 60_000 },
|
|
180
|
+
);
|
|
181
|
+
|
|
182
|
+
// before_agent_finalize → Stop. The real turn-end gate: a deny becomes a
|
|
183
|
+
// revise so the agent runs another pass. The evaluator supplies the
|
|
184
|
+
// MANDATORY ACTION wording; the payload's stop_hook_active guards the
|
|
185
|
+
// require-*-before-stop builtins against infinite loops.
|
|
186
|
+
api.on(
|
|
187
|
+
"before_agent_finalize",
|
|
188
|
+
async (payload, ctx) => {
|
|
189
|
+
const verdict = await callPolicy("before_agent_finalize", {
|
|
190
|
+
...baseMeta(payload, ctx, api.config),
|
|
191
|
+
hook_event_name: "before_agent_finalize",
|
|
192
|
+
});
|
|
193
|
+
if (verdict.permission === "deny") {
|
|
194
|
+
return { action: "revise", reason: verdict.reason || "Action required by failproofai" };
|
|
195
|
+
}
|
|
196
|
+
return undefined;
|
|
197
|
+
},
|
|
198
|
+
{ priority: 100, timeoutMs: 60_000 },
|
|
199
|
+
);
|
|
200
|
+
|
|
201
|
+
// Observation hooks — await so activity ordering is stable, ignore verdict.
|
|
202
|
+
// after_tool_call → PostToolUse; session_start/end → SessionStart/End;
|
|
203
|
+
// subagent_ended → SubagentStop (obs only); before_compaction → PreCompact.
|
|
204
|
+
for (const ev of [
|
|
205
|
+
"after_tool_call",
|
|
206
|
+
"session_start",
|
|
207
|
+
"session_end",
|
|
208
|
+
"subagent_ended",
|
|
209
|
+
"before_compaction",
|
|
210
|
+
]) {
|
|
211
|
+
api.on(
|
|
212
|
+
ev,
|
|
213
|
+
async (payload, ctx) => {
|
|
214
|
+
const p = payload || {};
|
|
215
|
+
await callPolicy(ev, {
|
|
216
|
+
...baseMeta(payload, ctx, api.config),
|
|
217
|
+
tool_name: p.toolName,
|
|
218
|
+
tool_input: p.params,
|
|
219
|
+
tool_response: p.result,
|
|
220
|
+
reason: p.reason,
|
|
221
|
+
hook_event_name: ev,
|
|
222
|
+
});
|
|
223
|
+
if (ev === "session_end") {
|
|
224
|
+
instructRetryGate.clear(payload, ctx);
|
|
225
|
+
workspaceContext.clear(payload, ctx);
|
|
226
|
+
}
|
|
227
|
+
return undefined;
|
|
228
|
+
},
|
|
229
|
+
{ priority: 100, timeoutMs: 60_000 },
|
|
230
|
+
);
|
|
231
|
+
}
|
|
38
232
|
},
|
|
39
233
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "failproofai",
|
|
3
|
-
"version": "1.0.13-beta.
|
|
3
|
+
"version": "1.0.13-beta.3",
|
|
4
4
|
"description": "Observability and enforcement for AI agent harnesses. 40 built-in policies hooked into 12 of them — Claude Code, Codex, Cursor, Hermes, OpenClaw and more — blocking the tool call before it runs. Local dashboard included, no account needed.",
|
|
5
5
|
"bin": {
|
|
6
6
|
"failproofai": "./dist/cli.mjs",
|
|
@@ -126,15 +126,15 @@
|
|
|
126
126
|
"browserslist": "4.28.8"
|
|
127
127
|
},
|
|
128
128
|
"optionalDependencies": {
|
|
129
|
-
"@failproofai/failproofaid-linux-x64": "1.0.13-beta.
|
|
130
|
-
"@failproofai/failproofaid-linux-arm64": "1.0.13-beta.
|
|
131
|
-
"@failproofai/failproofaid-darwin-x64": "1.0.13-beta.
|
|
132
|
-
"@failproofai/failproofaid-darwin-arm64": "1.0.13-beta.
|
|
129
|
+
"@failproofai/failproofaid-linux-x64": "1.0.13-beta.3",
|
|
130
|
+
"@failproofai/failproofaid-linux-arm64": "1.0.13-beta.3",
|
|
131
|
+
"@failproofai/failproofaid-darwin-x64": "1.0.13-beta.3",
|
|
132
|
+
"@failproofai/failproofaid-darwin-arm64": "1.0.13-beta.3"
|
|
133
133
|
},
|
|
134
134
|
"failproofaidBinaries": {
|
|
135
|
-
"linux-x64": "
|
|
136
|
-
"linux-arm64": "
|
|
137
|
-
"darwin-x64": "
|
|
138
|
-
"darwin-arm64": "
|
|
135
|
+
"linux-x64": "86f8b544b95d33b3464c916dff72e1a1436340d98c480dc8f83d1696dda1e5fe",
|
|
136
|
+
"linux-arm64": "d09376e5608e1379c247087386473f4ff1fcaa264022e570cc00f2cbb66b09fb",
|
|
137
|
+
"darwin-x64": "95f485247270fef7f4676e383ec586e339451c87dcd0480e1a12d721a62bec4b",
|
|
138
|
+
"darwin-arm64": "f8c0d43dba6d78facb00a0a265c188238e50223aedab2c17b3e66c202edacf5d"
|
|
139
139
|
}
|
|
140
140
|
}
|
|
@@ -182,7 +182,7 @@ export const ENFORCEMENT_CAPABILITY: Record<
|
|
|
182
182
|
|
|
183
183
|
// ── openclaw ──────────────────────────────────────────────────────────────
|
|
184
184
|
// openclaw/openclaw @f8ed8ecf (v2026.7.2) + our own shipped shim
|
|
185
|
-
// openclaw-plugin/
|
|
185
|
+
// openclaw-plugin/index.js, which returns undefined for 5 of the 8 hooks.
|
|
186
186
|
openclaw: {
|
|
187
187
|
PreToolUse: "block", // before_tool_call -> shim returns {block:true, blockReason}
|
|
188
188
|
UserPromptSubmit: "block", // before_agent_run -> shim returns {outcome:"block", reason}
|
|
@@ -2277,10 +2277,8 @@ export function unhookedHermesProfiles(): string[] {
|
|
|
2277
2277
|
// OpenClaw is a self-hosted assistant gateway. Enforcement is via its in-process
|
|
2278
2278
|
// PLUGIN hooks (file-based "internal hooks" are observation-only), so failproofai
|
|
2279
2279
|
// ships a static plugin package (`openclaw-plugin/`, like Pi's pi-extension) that
|
|
2280
|
-
//
|
|
2281
|
-
//
|
|
2282
|
-
// OpenClaw ≥ 2026.9.6 loads plugins from a copy that holds only the plugin dir.
|
|
2283
|
-
// Install registers the plugin in every profile's `openclaw.json` (JSON):
|
|
2280
|
+
// async-spawns the binary and maps verdicts back. Install registers the plugin in
|
|
2281
|
+
// every profile's `openclaw.json` (JSON):
|
|
2284
2282
|
// • plugins.load.paths[] → the shipped openclaw-plugin dir (absolute path)
|
|
2285
2283
|
// • plugins.entries.failproofai = { enabled: true, hooks: { allowConversationAccess: true } }
|
|
2286
2284
|
// (allowConversationAccess is required for the raw-conversation hooks
|
|
@@ -2320,7 +2318,6 @@ function isFailproofaiOpenClawPath(p: unknown): boolean {
|
|
|
2320
2318
|
export const openclaw: Integration = {
|
|
2321
2319
|
id: "openclaw",
|
|
2322
2320
|
displayName: "OpenClaw",
|
|
2323
|
-
requiresHealthyDaemon: true,
|
|
2324
2321
|
scopes: OPENCLAW_HOOK_SCOPES,
|
|
2325
2322
|
eventTypes: OPENCLAW_HOOK_EVENT_TYPES,
|
|
2326
2323
|
|
package/src/hooks/types.ts
CHANGED
|
@@ -863,16 +863,19 @@ export const ANTIGRAVITY_EVENT_MAP: Record<AntigravityHookEventType, HookEventTy
|
|
|
863
863
|
/**
|
|
864
864
|
* Antigravity's tool names → Claude PascalCase canonical names so existing
|
|
865
865
|
* builtin policies (which match `toolName === "Bash"`, etc.) fire unchanged.
|
|
866
|
-
* Tool names VERIFIED against
|
|
867
|
-
*
|
|
868
|
-
*
|
|
869
|
-
*
|
|
870
|
-
*
|
|
871
|
-
*
|
|
866
|
+
* Tool names VERIFIED against live recorder-hook captures, and they have moved
|
|
867
|
+
* once: agy 1.4.9 and 1.4.12 deliver `read_file`/`write_file`/`edit_file`, with
|
|
868
|
+
* listing and search reached through `read_file` on a directory and `run_command`.
|
|
869
|
+
* Earlier builds delivered `view_file`/`write_to_file`/`replace_file_content`/
|
|
870
|
+
* `list_dir`/`find_by_name`/`grep_search`; those stay mapped for installs that
|
|
871
|
+
* have not updated. A file tool missing here is not an error anywhere: every
|
|
872
|
+
* policy matching on the canonical name silently allows it. Unknown tools pass
|
|
873
|
+
* through via the `?? raw` fallback.
|
|
872
874
|
*/
|
|
873
875
|
export const ANTIGRAVITY_TOOL_MAP: Record<string, string> = {
|
|
874
876
|
run_command: "Bash",
|
|
875
877
|
write_to_file: "Write",
|
|
878
|
+
write_file: "Write",
|
|
876
879
|
read_file: "Read",
|
|
877
880
|
view_file: "Read",
|
|
878
881
|
edit_file: "Edit",
|
|
@@ -886,20 +889,20 @@ export const ANTIGRAVITY_TOOL_MAP: Record<string, string> = {
|
|
|
886
889
|
|
|
887
890
|
/**
|
|
888
891
|
* Antigravity tool args are PascalCase. Keyed by the CANONICAL tool name
|
|
889
|
-
* (canonicalizeToolInput runs after canonicalizeToolName). VERIFIED live
|
|
890
|
-
* `run_command` delivers `CommandLine
|
|
891
|
-
*
|
|
892
|
-
*
|
|
893
|
-
* `
|
|
894
|
-
*
|
|
895
|
-
*
|
|
896
|
-
*
|
|
892
|
+
* (canonicalizeToolInput runs after canonicalizeToolName). VERIFIED live against
|
|
893
|
+
* agy 1.4.12: `run_command` delivers `CommandLine`; `read_file` delivers `Path`;
|
|
894
|
+
* `write_file` delivers `Path`/`Content`; `edit_file` delivers
|
|
895
|
+
* `Path`/`Target`/`Replacement`. Earlier builds delivered `AbsolutePath` on
|
|
896
|
+
* `view_file` and `TargetFile`/`CodeContent` on `write_to_file`, kept because
|
|
897
|
+
* extra keys are harmless (only remapped when present). Without these entries
|
|
898
|
+
* the path/content builtins, and the always-on guard over failproofai's own
|
|
899
|
+
* state, never see a `file_path` and silently allow the call.
|
|
897
900
|
*/
|
|
898
901
|
export const ANTIGRAVITY_TOOL_INPUT_MAP: Record<string, Record<string, string>> = {
|
|
899
902
|
Bash: { CommandLine: "command", Cwd: "cwd" },
|
|
900
|
-
Write: { TargetFile: "file_path", CodeContent: "content" },
|
|
901
|
-
Edit: { TargetFile: "file_path" },
|
|
902
|
-
Read: { TargetFile: "file_path", AbsolutePath: "file_path", File: "file_path" },
|
|
903
|
+
Write: { Path: "file_path", Content: "content", TargetFile: "file_path", CodeContent: "content" },
|
|
904
|
+
Edit: { Path: "file_path", Target: "old_string", Replacement: "new_string", TargetFile: "file_path" },
|
|
905
|
+
Read: { Path: "file_path", TargetFile: "file_path", AbsolutePath: "file_path", File: "file_path" },
|
|
903
906
|
};
|
|
904
907
|
|
|
905
908
|
// ── Goose (codename goose, Block) ────────────────────────────────────────────
|