failproofai 1.0.7-beta.1 → 1.0.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 +4 -4
- 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 +4 -4
- 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/server-reference-manifest.json +1 -1
- package/.next/standalone/.next/server/app/_not-found/page.js +4 -4
- 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 +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/_not-found/__PAGE__.segment.rsc +14 -14
- package/.next/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
- 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 +7 -8
- 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 +5 -7
- 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 +15 -15
- package/.next/standalone/.next/server/app/index.segments/__PAGE__.segment.rsc +14 -14
- package/.next/standalone/.next/server/app/index.segments/_full.segment.rsc +15 -15
- package/.next/standalone/.next/server/app/index.segments/_tree.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/page/server-reference-manifest.json +1 -1
- package/.next/standalone/.next/server/app/page.js +6 -6
- 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 +11 -13
- 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 +7 -8
- 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 +7 -7
- 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 +6 -7
- 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 -41
- package/.next/standalone/.next/server/app/settings/page.js +9 -12
- 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/{[externals]__1j-zsg5._.js → [externals]__1_bftcl._.js} +1 -1
- package/.next/standalone/.next/server/chunks/{[externals]__19_pzeq._.js → [externals]__1msfs-h._.js} +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0o07qi9._.js +1 -1
- package/.next/standalone/.next/server/chunks/{[root-of-the-server]__1bf34x4._.js → [root-of-the-server]__1_r2rbg._.js} +7 -5
- package/.next/standalone/.next/server/chunks/_09dz7xv._.js +21 -21
- 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/{_1q5i8mb._.js → _1c3k-8x._.js} +2 -2
- package/.next/standalone/.next/server/chunks/_1ek68ln._.js +16 -16
- package/.next/standalone/.next/server/chunks/node_modules_posthog-node_dist_entrypoints_index_node_mjs_09z9-p7._.js +1 -1
- package/.next/standalone/.next/server/chunks/package_json_[json]_cjs_1nxcc4v._.js +1 -1
- package/.next/standalone/.next/server/chunks/src_hooks_0iu54mz._.js +3 -0
- package/.next/standalone/.next/server/chunks/src_hooks_custom-hooks-loader_ts_0lnb3n3._.js +2 -4
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0-_ki57._.js +4 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__013jr2b._.js +4 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__01wy8d-._.js +4 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__02npjtd._.js +4 -0
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0yxwl6j._.js → [root-of-the-server]__0bd3mje._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0cg-bgc._.js +5 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0cpu_mj._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__1mf3zp6._.js → [root-of-the-server]__0cxe_2_._.js} +3 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0da85px._.js +4 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0ftmoxc._.js +4 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0p-5p8u._.js +4 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0u3w0ll._.js +22 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__17d_ffl._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__19d9tgz._.js +5 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1ctpynv._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1jiwfsj._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1p2otjt._.js +4 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1phc187._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/_06imw3p._.js +5 -0
- package/.next/standalone/.next/server/chunks/ssr/_08x1r5t._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{_1w_5l7t._.js → _0h_douw._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{_214wgrp._.js → _1-i_gzc._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{_0bn2oo8._.js → _166t73i._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{_1q46vxx._.js → _1_qswah._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{_1gb0ifp._.js → _1es2j7i._.js} +5 -5
- package/.next/standalone/.next/server/chunks/ssr/_1u8-lu2._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/_1zopuov._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_next-internal_server_app_policies_page_actions_1sp2-yo.js +2 -2
- 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 +2 -2
- package/.next/standalone/.next/server/chunks/ssr/app_settings_settings-client_tsx_20lq-mq._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/{node_modules_next_dist_18_d8l1._.js → node_modules_next_dist_0drixxt._.js} +4 -4
- package/.next/standalone/.next/server/chunks/ssr/src_hooks_1cv9_c4._.js +10 -0
- package/.next/standalone/.next/server/chunks/ssr/src_hooks_builtin-policies_ts_09j2ndl._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/src_hooks_fp-home_ts_0je3xkv._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/src_hooks_pack-cli_ts_0t7me65._.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/server-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/server-reference-manifest.json +23 -56
- package/.next/standalone/.next/static/chunks/094xgi4owxaqf.js +1 -0
- package/.next/standalone/.next/static/chunks/0__8a7m868fvf.js +1 -0
- package/.next/standalone/.next/static/chunks/{12tvm75t5ffui.js → 0o6qlkgubtoex.js} +1 -1
- package/.next/standalone/.next/static/chunks/13i7-9is-vhys.js +1 -0
- package/.next/standalone/.next/static/chunks/1rz20_pz828f3.js +6 -0
- package/.next/standalone/.next/static/chunks/2k9f4tyv04809.css +1 -0
- package/.next/standalone/.next/static/chunks/{0vmd180qfntfb.js → 2klitrtzpaoe0.js} +1 -1
- package/.next/standalone/.next/static/chunks/{258668t68du6b.js → 2mdh397ghgnvv.js} +1 -1
- package/.next/standalone/.next/static/chunks/2rshywgeqsyzk.css +2 -0
- package/.next/standalone/.next/static/chunks/3pzx4chkhko9k.js +1 -0
- package/.next/standalone/.next/static/chunks/{0qrbdkv9qmvli.js → 3rh5o7e16irrm.js} +1 -1
- package/.next/standalone/.next/static/chunks/{29fql3nbnfc9q.js → 43ufqrz8qo3h-.js} +1 -1
- package/.next/standalone/SECURITY.md +53 -0
- package/.next/standalone/app/actions/pack-actions.ts +0 -12
- package/.next/standalone/app/policies/hooks-client.tsx +0 -9
- package/.next/standalone/app/settings/page.tsx +1 -20
- package/.next/standalone/app/settings/settings-client.tsx +1 -27
- package/.next/standalone/app/settings/settings.css +0 -79
- package/.next/standalone/package.json +9 -9
- package/.next/standalone/sdk/python/skill/SKILL.md +60 -14
- package/.next/standalone/sdk/python/skill/agents/openai.yaml +2 -1
- package/.next/standalone/sdk/python/skill/references/evaluator.md +255 -0
- package/.next/standalone/sdk/python/skill/references/events.md +17 -8
- package/.next/standalone/sdk/python/skill/references/frameworks.md +3 -0
- package/.next/standalone/sdk/python/skill/references/install.md +3 -0
- package/.next/standalone/sdk/python/skill/references/integration.md +6 -2
- package/.next/standalone/sdk/python/skill/references/typescript.md +568 -0
- package/.next/standalone/sdk/typescript/CHANGELOG.md +133 -0
- package/.next/standalone/sdk/typescript/LICENSE +42 -0
- package/.next/standalone/sdk/typescript/README.md +552 -0
- package/.next/standalone/sdk/typescript/eslint.config.mjs +59 -0
- package/.next/standalone/sdk/typescript/examples/research-agent.ts +197 -0
- package/.next/standalone/sdk/typescript/integration/ai.test.ts +920 -0
- package/.next/standalone/sdk/typescript/integration/fixtures/ai-4/agent.ts +337 -0
- package/.next/standalone/sdk/typescript/integration/fixtures/ai-4/package-lock.json +261 -0
- package/.next/standalone/sdk/typescript/integration/fixtures/ai-4/package.json +16 -0
- package/.next/standalone/sdk/typescript/integration/fixtures/ai-4/surfaces.ts +605 -0
- package/.next/standalone/sdk/typescript/integration/fixtures/ai-4/tsconfig.json +12 -0
- package/.next/standalone/sdk/typescript/integration/fixtures/ai-4/tsconfig.surfaces.json +4 -0
- package/.next/standalone/sdk/typescript/integration/fixtures/ai-5/agent.ts +342 -0
- package/.next/standalone/sdk/typescript/integration/fixtures/ai-5/package-lock.json +156 -0
- package/.next/standalone/sdk/typescript/integration/fixtures/ai-5/package.json +16 -0
- package/.next/standalone/sdk/typescript/integration/fixtures/ai-5/surfaces.ts +628 -0
- package/.next/standalone/sdk/typescript/integration/fixtures/ai-5/tsconfig.json +12 -0
- package/.next/standalone/sdk/typescript/integration/fixtures/ai-5/tsconfig.surfaces.json +4 -0
- package/.next/standalone/sdk/typescript/integration/fixtures/ai-6/agent.ts +346 -0
- package/.next/standalone/sdk/typescript/integration/fixtures/ai-6/package-lock.json +156 -0
- package/.next/standalone/sdk/typescript/integration/fixtures/ai-6/package.json +13 -0
- package/.next/standalone/sdk/typescript/integration/fixtures/ai-6/surfaces.ts +651 -0
- package/.next/standalone/sdk/typescript/integration/fixtures/ai-6/tsconfig.json +12 -0
- package/.next/standalone/sdk/typescript/integration/fixtures/ai-6/tsconfig.surfaces.json +4 -0
- package/.next/standalone/sdk/typescript/integration/fixtures/ai-7/agent.ts +350 -0
- package/.next/standalone/sdk/typescript/integration/fixtures/ai-7/package-lock.json +153 -0
- package/.next/standalone/sdk/typescript/integration/fixtures/ai-7/package.json +13 -0
- package/.next/standalone/sdk/typescript/integration/fixtures/ai-7/surfaces.ts +651 -0
- package/.next/standalone/sdk/typescript/integration/fixtures/ai-7/tsconfig.json +12 -0
- package/.next/standalone/sdk/typescript/integration/fixtures/ai-7/tsconfig.surfaces.json +4 -0
- package/.next/standalone/sdk/typescript/integration/fixtures/langchain-0.3/agent.ts +623 -0
- package/.next/standalone/sdk/typescript/integration/fixtures/langchain-0.3/package-lock.json +344 -0
- package/.next/standalone/sdk/typescript/integration/fixtures/langchain-0.3/package.json +19 -0
- package/.next/standalone/sdk/typescript/integration/fixtures/langchain-0.3/tsconfig.json +12 -0
- package/.next/standalone/sdk/typescript/integration/fixtures/langchain-1/agent-v1.ts +99 -0
- package/.next/standalone/sdk/typescript/integration/fixtures/langchain-1/agent.ts +623 -0
- package/.next/standalone/sdk/typescript/integration/fixtures/langchain-1/package-lock.json +336 -0
- package/.next/standalone/sdk/typescript/integration/fixtures/langchain-1/package.json +15 -0
- package/.next/standalone/sdk/typescript/integration/fixtures/langchain-1/tsconfig.json +12 -0
- package/.next/standalone/sdk/typescript/integration/fixtures/langchain-dup-core/agent.ts +96 -0
- package/.next/standalone/sdk/typescript/integration/fixtures/langchain-dup-core/package-lock.json +441 -0
- package/.next/standalone/sdk/typescript/integration/fixtures/langchain-dup-core/package.json +19 -0
- package/.next/standalone/sdk/typescript/integration/fixtures/langchain-dup-core/tsconfig.json +12 -0
- package/.next/standalone/sdk/typescript/integration/fixtures/langchain-dup-core/vendor/lc-weather-provider/index.cjs +53 -0
- package/.next/standalone/sdk/typescript/integration/fixtures/langchain-dup-core/vendor/lc-weather-provider/index.mjs +55 -0
- package/.next/standalone/sdk/typescript/integration/fixtures/langchain-dup-core/vendor/lc-weather-provider/package.json +18 -0
- package/.next/standalone/sdk/typescript/integration/fixtures/llamaindex-0.11/agent.ts +659 -0
- package/.next/standalone/sdk/typescript/integration/fixtures/llamaindex-0.11/package-lock.json +635 -0
- package/.next/standalone/sdk/typescript/integration/fixtures/llamaindex-0.11/package.json +15 -0
- package/.next/standalone/sdk/typescript/integration/fixtures/llamaindex-0.11/tsconfig.json +12 -0
- package/.next/standalone/sdk/typescript/integration/fixtures/llamaindex-0.12/agent.ts +659 -0
- package/.next/standalone/sdk/typescript/integration/fixtures/llamaindex-0.12/package-lock.json +553 -0
- package/.next/standalone/sdk/typescript/integration/fixtures/llamaindex-0.12/package.json +15 -0
- package/.next/standalone/sdk/typescript/integration/fixtures/llamaindex-0.12/tsconfig.json +12 -0
- package/.next/standalone/sdk/typescript/integration/fixtures/mastra-0/agent.ts +877 -0
- package/.next/standalone/sdk/typescript/integration/fixtures/mastra-0/mcp-server.mjs +66 -0
- package/.next/standalone/sdk/typescript/integration/fixtures/mastra-0/package-lock.json +6797 -0
- package/.next/standalone/sdk/typescript/integration/fixtures/mastra-0/package.json +24 -0
- package/.next/standalone/sdk/typescript/integration/fixtures/mastra-0/tsconfig.json +12 -0
- package/.next/standalone/sdk/typescript/integration/fixtures/mastra-1/agent.ts +872 -0
- package/.next/standalone/sdk/typescript/integration/fixtures/mastra-1/mcp-server.mjs +66 -0
- package/.next/standalone/sdk/typescript/integration/fixtures/mastra-1/package-lock.json +2540 -0
- package/.next/standalone/sdk/typescript/integration/fixtures/mastra-1/package.json +15 -0
- package/.next/standalone/sdk/typescript/integration/fixtures/mastra-1/tsconfig.json +12 -0
- package/.next/standalone/sdk/typescript/integration/fixtures/nextjs/app/actions.ts +18 -0
- package/.next/standalone/sdk/typescript/integration/fixtures/nextjs/app/api/ai/route.ts +42 -0
- package/.next/standalone/sdk/typescript/integration/fixtures/nextjs/app/api/edge/route.ts +29 -0
- package/.next/standalone/sdk/typescript/integration/fixtures/nextjs/app/api/langgraph/route.ts +21 -0
- package/.next/standalone/sdk/typescript/integration/fixtures/nextjs/app/api/llamaindex/route.ts +11 -0
- package/.next/standalone/sdk/typescript/integration/fixtures/nextjs/app/api/mastra/route.ts +19 -0
- package/.next/standalone/sdk/typescript/integration/fixtures/nextjs/app/api/status/route.ts +7 -0
- package/.next/standalone/sdk/typescript/integration/fixtures/nextjs/app/layout.tsx +9 -0
- package/.next/standalone/sdk/typescript/integration/fixtures/nextjs/app/page.tsx +15 -0
- package/.next/standalone/sdk/typescript/integration/fixtures/nextjs/instrumentation.ts +15 -0
- package/.next/standalone/sdk/typescript/integration/fixtures/nextjs/lib/ai.ts +61 -0
- package/.next/standalone/sdk/typescript/integration/fixtures/nextjs/lib/langgraph.ts +68 -0
- package/.next/standalone/sdk/typescript/integration/fixtures/nextjs/lib/llamaindex.ts +98 -0
- package/.next/standalone/sdk/typescript/integration/fixtures/nextjs/lib/mastra.ts +90 -0
- package/.next/standalone/sdk/typescript/integration/fixtures/nextjs/next.config.ts +52 -0
- package/.next/standalone/sdk/typescript/integration/fixtures/nextjs/package-lock.json +4343 -0
- package/.next/standalone/sdk/typescript/integration/fixtures/nextjs/package.json +28 -0
- package/.next/standalone/sdk/typescript/integration/fixtures/runtimes/agent.ts +51 -0
- package/.next/standalone/sdk/typescript/integration/fixtures/runtimes/deno-npm.ts +76 -0
- package/.next/standalone/sdk/typescript/integration/fixtures/runtimes/package-lock.json +484 -0
- package/.next/standalone/sdk/typescript/integration/fixtures/runtimes/package.json +15 -0
- package/.next/standalone/sdk/typescript/integration/fixtures/types/agent.ts +79 -0
- package/.next/standalone/sdk/typescript/integration/fixtures/types/package-lock.json +740 -0
- package/.next/standalone/sdk/typescript/integration/fixtures/types/package.json +11 -0
- package/.next/standalone/sdk/typescript/integration/fixtures/vanilla/agent.ts +197 -0
- package/.next/standalone/sdk/typescript/integration/fixtures/vanilla/package-lock.json +70 -0
- package/.next/standalone/sdk/typescript/integration/fixtures/vanilla/package.json +12 -0
- package/.next/standalone/sdk/typescript/integration/fixtures/vanilla/tsconfig.json +12 -0
- package/.next/standalone/sdk/typescript/integration/global-setup.ts +29 -0
- package/.next/standalone/sdk/typescript/integration/harness.ts +451 -0
- package/.next/standalone/sdk/typescript/integration/langchain.test.ts +682 -0
- package/.next/standalone/sdk/typescript/integration/llamaindex.test.ts +709 -0
- package/.next/standalone/sdk/typescript/integration/mastra-coverage.test.ts +386 -0
- package/.next/standalone/sdk/typescript/integration/mastra.test.ts +311 -0
- package/.next/standalone/sdk/typescript/integration/nextjs.test.ts +341 -0
- package/.next/standalone/sdk/typescript/integration/runtime-parity.ts +180 -0
- package/.next/standalone/sdk/typescript/integration/runtimes.bun.test.ts +15 -0
- package/.next/standalone/sdk/typescript/integration/runtimes.core.test.ts +113 -0
- package/.next/standalone/sdk/typescript/integration/runtimes.deno.test.ts +19 -0
- package/.next/standalone/sdk/typescript/integration/types.test.ts +141 -0
- package/.next/standalone/sdk/typescript/integration/vanilla.test.ts +255 -0
- package/.next/standalone/sdk/typescript/package-lock.json +2640 -0
- package/.next/standalone/sdk/typescript/package.json +401 -0
- package/.next/standalone/sdk/typescript/scripts/finalize-build.mjs +123 -0
- package/.next/standalone/sdk/typescript/scripts/release.mjs +177 -0
- package/.next/standalone/sdk/typescript/src/clock.ts +58 -0
- package/.next/standalone/sdk/typescript/src/context.ts +214 -0
- package/.next/standalone/sdk/typescript/src/edge/adapter.ts +18 -0
- package/.next/standalone/sdk/typescript/src/edge/ai.ts +116 -0
- package/.next/standalone/sdk/typescript/src/edge/index.ts +238 -0
- package/.next/standalone/sdk/typescript/src/edge/langchain.ts +18 -0
- package/.next/standalone/sdk/typescript/src/edge/llamaindex.ts +12 -0
- package/.next/standalone/sdk/typescript/src/edge/mastra.ts +17 -0
- package/.next/standalone/sdk/typescript/src/edge/notice.ts +33 -0
- package/.next/standalone/sdk/typescript/src/environment.ts +75 -0
- package/.next/standalone/sdk/typescript/src/evaluator/authoring.ts +480 -0
- package/.next/standalone/sdk/typescript/src/evaluator/cli.ts +96 -0
- package/.next/standalone/sdk/typescript/src/evaluator/client.ts +421 -0
- package/.next/standalone/sdk/typescript/src/evaluator/expression.ts +1292 -0
- package/.next/standalone/sdk/typescript/src/evaluator/index.ts +144 -0
- package/.next/standalone/sdk/typescript/src/evaluator/protocol.ts +747 -0
- package/.next/standalone/sdk/typescript/src/evaluator/runtime.ts +930 -0
- package/.next/standalone/sdk/typescript/src/evaluator/sandbox-worker.ts +171 -0
- package/.next/standalone/sdk/typescript/src/evaluator/source-limits.ts +27 -0
- package/.next/standalone/sdk/typescript/src/evaluator/source.ts +509 -0
- package/.next/standalone/sdk/typescript/src/events.ts +879 -0
- package/.next/standalone/sdk/typescript/src/exit.ts +117 -0
- package/.next/standalone/sdk/typescript/src/index.ts +186 -0
- package/.next/standalone/sdk/typescript/src/integrations/ai.ts +1566 -0
- package/.next/standalone/sdk/typescript/src/integrations/compat.ts +322 -0
- package/.next/standalone/sdk/typescript/src/integrations/core.ts +1321 -0
- package/.next/standalone/sdk/typescript/src/integrations/index.ts +355 -0
- package/.next/standalone/sdk/typescript/src/integrations/langchain.ts +2340 -0
- package/.next/standalone/sdk/typescript/src/integrations/llamaindex.ts +2111 -0
- package/.next/standalone/sdk/typescript/src/integrations/mastra.ts +1802 -0
- package/.next/standalone/sdk/typescript/src/logger.ts +98 -0
- package/.next/standalone/sdk/typescript/src/next.ts +115 -0
- package/.next/standalone/sdk/typescript/src/node-require.ts +446 -0
- package/.next/standalone/sdk/typescript/src/redact.ts +305 -0
- package/.next/standalone/sdk/typescript/src/resolver.ts +120 -0
- package/.next/standalone/sdk/typescript/src/runtime.ts +29 -0
- package/.next/standalone/sdk/typescript/src/schema.ts +410 -0
- package/.next/standalone/sdk/typescript/src/scopes.ts +701 -0
- package/.next/standalone/sdk/typescript/src/shared.ts +33 -0
- package/.next/standalone/sdk/typescript/src/version.ts +5 -0
- package/.next/standalone/sdk/typescript/src/writer.ts +934 -0
- package/.next/standalone/sdk/typescript/test/adapters.test.ts +397 -0
- package/.next/standalone/sdk/typescript/test/ai.test.ts +1076 -0
- package/.next/standalone/sdk/typescript/test/copies.test.ts +204 -0
- package/.next/standalone/sdk/typescript/test/edge.test.ts +183 -0
- package/.next/standalone/sdk/typescript/test/evaluator-client.test.ts +234 -0
- package/.next/standalone/sdk/typescript/test/evaluator-protocol.test.ts +225 -0
- package/.next/standalone/sdk/typescript/test/events.test.ts +193 -0
- package/.next/standalone/sdk/typescript/test/expression.test.ts +181 -0
- package/.next/standalone/sdk/typescript/test/global-setup.ts +26 -0
- package/.next/standalone/sdk/typescript/test/helpers.ts +130 -0
- package/.next/standalone/sdk/typescript/test/integrations.test.ts +369 -0
- package/.next/standalone/sdk/typescript/test/langchain-copies.test.ts +204 -0
- package/.next/standalone/sdk/typescript/test/langchain.test.ts +999 -0
- package/.next/standalone/sdk/typescript/test/llamaindex.test.ts +1760 -0
- package/.next/standalone/sdk/typescript/test/mastra-coverage.test.ts +501 -0
- package/.next/standalone/sdk/typescript/test/mastra-lifecycle.test.ts +479 -0
- package/.next/standalone/sdk/typescript/test/mastra.test.ts +285 -0
- package/.next/standalone/sdk/typescript/test/next.test.ts +109 -0
- package/.next/standalone/sdk/typescript/test/packaging.test.ts +312 -0
- package/.next/standalone/sdk/typescript/test/redaction.test.ts +171 -0
- package/.next/standalone/sdk/typescript/test/runtimes.test.ts +101 -0
- package/.next/standalone/sdk/typescript/test/sandbox.test.ts +189 -0
- package/.next/standalone/sdk/typescript/test/scopes.test.ts +271 -0
- package/.next/standalone/sdk/typescript/test/setup.ts +19 -0
- package/.next/standalone/sdk/typescript/test/skill-snippets.test.ts +73 -0
- package/.next/standalone/sdk/typescript/test/spool-contract.test.ts +124 -0
- package/.next/standalone/sdk/typescript/test/tracker-bounds.test.ts +191 -0
- package/.next/standalone/sdk/typescript/test/wire-format.test.ts +214 -0
- package/.next/standalone/sdk/typescript/test/writer.test.ts +407 -0
- package/.next/standalone/sdk/typescript/tsconfig.build.json +15 -0
- package/.next/standalone/sdk/typescript/tsconfig.cjs.json +19 -0
- package/.next/standalone/sdk/typescript/tsconfig.json +28 -0
- package/.next/standalone/sdk/typescript/vitest.config.ts +33 -0
- package/.next/standalone/sdk/typescript/vitest.integration.config.ts +23 -0
- package/.next/standalone/server.js +1 -1
- package/bin/failproofai.mjs +2 -115
- package/dist/cli.mjs +6538 -13686
- package/dist/index.js +1 -19
- package/dist/worker.mjs +2085 -8012
- package/package.json +9 -9
- package/pi-extension/index.ts +0 -11
- package/scripts/build-policy-pack.mjs +2 -39
- package/src/hooks/builtin-policies.ts +3 -21
- package/src/hooks/cloud-enrollment-cli.ts +1 -1
- package/src/hooks/cloud-managed-policies.ts +0 -22
- package/src/hooks/custom-hooks-loader.ts +7 -45
- package/src/hooks/custom-hooks-registry.ts +1 -45
- package/src/hooks/first-run-gate.ts +0 -5
- package/src/hooks/fp-home.ts +0 -23
- package/src/hooks/handler.ts +6 -265
- package/src/hooks/hook-activity-store.ts +1 -105
- package/src/hooks/hook-telemetry.ts +0 -41
- package/src/hooks/loader-utils.ts +0 -6
- package/src/hooks/pack-cli.ts +17 -278
- package/src/hooks/pack-manifest.ts +7 -479
- package/src/hooks/pack-store.ts +10 -156
- package/src/hooks/policy-catalog.ts +0 -65
- package/src/hooks/policy-evaluator.ts +796 -940
- package/src/hooks/policy-registry.ts +0 -25
- package/src/hooks/policy-types.ts +0 -126
- package/src/hooks/worker-server.ts +26 -119
- package/src/index.ts +0 -6
- package/.next/standalone/.next/server/chunks/src_hooks_01frwmb._.js +0 -5
- package/.next/standalone/.next/server/chunks/src_hooks_18qtd42._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__01bmjsj._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__04usis8._.js +0 -4
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__056wjo4._.js +0 -4
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__059yza8._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0eip4_k._.js +0 -22
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0n0xg95._.js +0 -4
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0qcb0mg._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0qxnccm._.js +0 -5
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0rwtwpm._.js +0 -4
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0s_yomn._.js +0 -4
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0soxz2z._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0yrsbd_._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__11mayhe._.js +0 -4
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__13d-wb6._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1dinjii._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1pprgri._.js +0 -4
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1q4p5b8._.js +0 -4
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1qiz0e4._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/_042cgl1._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/_0bqoto4._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/_0uyu3jf._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/_1feuvhb._.js +0 -5
- package/.next/standalone/.next/server/chunks/ssr/app_actions_get-scheduled-audit_ts_0ei9sni._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/app_settings_02tf1h4._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/node_modules_next_dist_0w6mzq5._.js +0 -151
- package/.next/standalone/.next/server/chunks/ssr/src_hooks_095a_79._.js +0 -5
- package/.next/standalone/.next/server/chunks/ssr/src_hooks_15t8kqj._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/src_hooks_18k8rl0._.js +0 -12
- package/.next/standalone/.next/server/chunks/ssr/src_hooks_1fm2w5z._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/src_hooks_1j0zy3v._.js +0 -3
- package/.next/standalone/.next/static/chunks/0cd-_8-c-m1ea.js +0 -6
- package/.next/standalone/.next/static/chunks/0uldbut9y2-e8.js +0 -1
- package/.next/standalone/.next/static/chunks/1u5zsejmgrir_.js +0 -1
- package/.next/standalone/.next/static/chunks/285spx855h_3r.css +0 -2
- package/.next/standalone/.next/static/chunks/2qv4hshejedtx.css +0 -1
- package/.next/standalone/.next/static/chunks/2vkvu9-opa_1z.js +0 -1
- package/.next/standalone/.next/static/chunks/37lhv7wa3ywt6.js +0 -1
- package/.next/standalone/app/actions/get-jev-config.ts +0 -409
- package/.next/standalone/app/actions/update-jev-config.ts +0 -420
- package/.next/standalone/app/components/jev-notices.tsx +0 -96
- package/.next/standalone/app/settings/jev-panel.tsx +0 -469
- package/src/hooks/effective-reviewers.ts +0 -79
- package/src/hooks/jev-activity.ts +0 -385
- package/src/hooks/jev-cli.ts +0 -1193
- package/src/hooks/policy-authority.ts +0 -333
- package/src/hooks/policy-reviewability.ts +0 -229
- package/src/hooks/semantic/combine.ts +0 -541
- package/src/hooks/semantic/compile.ts +0 -176
- package/src/hooks/semantic/decide.ts +0 -392
- package/src/hooks/semantic/envelope.ts +0 -1296
- package/src/hooks/semantic/evaluator.ts +0 -547
- package/src/hooks/semantic/facts.ts +0 -292
- package/src/hooks/semantic/intent.ts +0 -1190
- package/src/hooks/semantic/jev-client.ts +0 -643
- package/src/hooks/semantic/jev-config.ts +0 -594
- package/src/hooks/semantic/jev-review.ts +0 -374
- package/src/hooks/semantic/jev-stats.ts +0 -289
- package/src/hooks/semantic/jev-throttle.ts +0 -421
- package/src/hooks/semantic/pack-policies.ts +0 -251
- package/src/hooks/semantic/policies.ts +0 -596
- package/src/hooks/semantic/precondition-names.ts +0 -60
- package/src/hooks/semantic/preconditions.ts +0 -58
- package/src/hooks/semantic/redact.ts +0 -2910
- package/src/hooks/semantic/types.ts +0 -145
- package/src/hooks/semver-precedence.ts +0 -128
- /package/.next/standalone/.next/static/{T8YAYM9h_64fKv705vug7 → PgeWCHmyVbjRznv2VO7KF}/_buildManifest.js +0 -0
- /package/.next/standalone/.next/static/{T8YAYM9h_64fKv705vug7 → PgeWCHmyVbjRznv2VO7KF}/_clientMiddlewareManifest.js +0 -0
- /package/.next/standalone/.next/static/{T8YAYM9h_64fKv705vug7 → PgeWCHmyVbjRznv2VO7KF}/_ssgManifest.js +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "failproofai",
|
|
3
|
-
"version": "1.0.7
|
|
3
|
+
"version": "1.0.7",
|
|
4
4
|
"description": "Observability and enforcement for AI agent harnesses. 39 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",
|
|
@@ -122,15 +122,15 @@
|
|
|
122
122
|
"browserslist": "4.28.8"
|
|
123
123
|
},
|
|
124
124
|
"optionalDependencies": {
|
|
125
|
-
"@failproofai/failproofaid-linux-x64": "1.0.7
|
|
126
|
-
"@failproofai/failproofaid-linux-arm64": "1.0.7
|
|
127
|
-
"@failproofai/failproofaid-darwin-x64": "1.0.7
|
|
128
|
-
"@failproofai/failproofaid-darwin-arm64": "1.0.7
|
|
125
|
+
"@failproofai/failproofaid-linux-x64": "1.0.7",
|
|
126
|
+
"@failproofai/failproofaid-linux-arm64": "1.0.7",
|
|
127
|
+
"@failproofai/failproofaid-darwin-x64": "1.0.7",
|
|
128
|
+
"@failproofai/failproofaid-darwin-arm64": "1.0.7"
|
|
129
129
|
},
|
|
130
130
|
"failproofaidBinaries": {
|
|
131
|
-
"linux-x64": "
|
|
132
|
-
"linux-arm64": "
|
|
133
|
-
"darwin-x64": "
|
|
134
|
-
"darwin-arm64": "
|
|
131
|
+
"linux-x64": "65acfcabaa4dda6d37d2958d4100c366a85f17c68d2250de6126e2717ca773e6",
|
|
132
|
+
"linux-arm64": "cece883f87d53034003be8f0f293aa89bd0e69306d6032e17b3eb91f230b3ce2",
|
|
133
|
+
"darwin-x64": "565aa3d560a05dd76e2eb843ddbad593d2d8df94c963bdeb1c7e2a8a3816d0c5",
|
|
134
|
+
"darwin-arm64": "2b41601b53e77a31439e92d8be9be6b9872e3d4ad7e8664ff89cd2be4ed6c44d"
|
|
135
135
|
}
|
|
136
136
|
}
|
package/pi-extension/index.ts
CHANGED
|
@@ -404,17 +404,6 @@ export default function failproofaiBridge(pi: PiExtensionApi) {
|
|
|
404
404
|
session_id: resolveSessionId(e.sessionId, resolveCwd(e.cwd)),
|
|
405
405
|
cwd: resolveCwd(e.cwd),
|
|
406
406
|
hook_event_name: "UserPromptSubmit",
|
|
407
|
-
// "interactive" | "rpc" | "extension": which channel the input came
|
|
408
|
-
// through, and the only mark Pi gives about who wrote the prompt. It
|
|
409
|
-
// names the channel, not the author — `pi -p "<text>"` reports
|
|
410
|
-
// `interactive` exactly as a person typing does — so the Jev evaluator
|
|
411
|
-
// uses it only in the direction it is reliable in (`piMachineTurn`,
|
|
412
|
-
// src/hooks/semantic/intent.ts): `extension`, another extension's
|
|
413
|
-
// `sendUserMessage()` whose text can be model-written or repo-derived,
|
|
414
|
-
// is refused, while `interactive`, `rpc` and an absent value are all
|
|
415
|
-
// recorded as the human's request. Policies read it too, and a later Pi
|
|
416
|
-
// build may say more here.
|
|
417
|
-
input_source: e.source,
|
|
418
407
|
});
|
|
419
408
|
if (decision.block) {
|
|
420
409
|
console.error(`[failproofai] prompt blocked: ${decision.reason ?? "blocked by policy"}`);
|
|
@@ -31,24 +31,6 @@
|
|
|
31
31
|
* that stops an agent disabling failproofai, it ships compiled in, and
|
|
32
32
|
* `pack-manifest.ts` REFUSES any pack that declares `alwaysOn`. A pack containing
|
|
33
33
|
* it would be rejected by our own loader — correctly.
|
|
34
|
-
*
|
|
35
|
-
* **Every policy states its authority** — whether Jev may clear its verdict —
|
|
36
|
-
* as the registry would resolve it (`manifestAuthority`), not as a copy of
|
|
37
|
-
* whatever the catalog happened to spell. A machine running this pack reads
|
|
38
|
-
* authority from the MANIFEST, so a field left off here is a policy that is
|
|
39
|
-
* silently hard everywhere it is installed. The entry passes the same fields to
|
|
40
|
-
* `customPolicies.add`, so a manifest rebuilt from the entry (`failproofai
|
|
41
|
-
* publish`) says the same thing.
|
|
42
|
-
*
|
|
43
|
-
* **It emits no `semantic` array, deliberately.** A pack that declares one
|
|
44
|
-
* REPLACES this build's compiled-in semantic set wholesale
|
|
45
|
-
* (`semantic/pack-policies.ts`), and this pack is the dress rehearsal for the
|
|
46
|
-
* regex floor leaving the package — not for Jev's question set leaving it. So
|
|
47
|
-
* the 39 builtins travel and the 16 semantic policies stay compiled in, which
|
|
48
|
-
* also keeps `manifestAuthority` below judging `reviewedBy` against the right
|
|
49
|
-
* list: the builtin reviewer names, which is what a machine installing this pack
|
|
50
|
-
* will still be running. The separate `FailproofAI/jev-policies` pack is where
|
|
51
|
-
* the semantic half ships, and it declares its own `minCliVersion`.
|
|
52
34
|
*/
|
|
53
35
|
import { execFileSync } from "node:child_process";
|
|
54
36
|
import { createHash } from "node:crypto";
|
|
@@ -58,7 +40,6 @@ import { fileURLToPath } from "node:url";
|
|
|
58
40
|
// The one place the pack's id is decided. Imported rather than restated — see
|
|
59
41
|
// PACK_ID below for what restating it cost.
|
|
60
42
|
import { CORE_SOURCE } from "../src/hooks/pack-store.ts";
|
|
61
|
-
import { manifestAuthority } from "../src/hooks/policy-authority.ts";
|
|
62
43
|
|
|
63
44
|
const ROOT = resolve(dirname(fileURLToPath(import.meta.url)), "..");
|
|
64
45
|
// `--out <dir>` lets the conformance test generate into a temp directory rather
|
|
@@ -114,9 +95,6 @@ for (const policy of BUILTIN_POLICIES) {
|
|
|
114
95
|
defaultEnabled: policy.defaultEnabled === true,
|
|
115
96
|
match: policy.match,
|
|
116
97
|
fn: policy.fn,
|
|
117
|
-
// Whether Jev may clear it; see the note on authority at the top.
|
|
118
|
-
...(policy.authority !== undefined ? { authority: policy.authority } : {}),
|
|
119
|
-
...(policy.reviewedBy !== undefined ? { reviewedBy: policy.reviewedBy } : {}),
|
|
120
98
|
});
|
|
121
99
|
}
|
|
122
100
|
`;
|
|
@@ -142,20 +120,7 @@ try {
|
|
|
142
120
|
// validates these with the loader's own rules, so a shape the loader would
|
|
143
121
|
// refuse fails this build rather than shipping.
|
|
144
122
|
const { POLICY_CATALOG } = await import(join(ROOT, "src/hooks/policy-catalog.ts"));
|
|
145
|
-
const policies = POLICY_CATALOG.filter((p) => !p.alwaysOn).map((p) => {
|
|
146
|
-
// Throws on a declaration the registry would quietly downgrade: in the
|
|
147
|
-
// catalog that is a typo or a renamed semantic policy, and publishing it
|
|
148
|
-
// would turn a reviewed decision into an unannounced hard one. The fields
|
|
149
|
-
// come from the same call, so the check cannot be skipped without the
|
|
150
|
-
// manifest losing its authority too.
|
|
151
|
-
const resolved = manifestAuthority(p);
|
|
152
|
-
// Spread first so every field keeps its catalog position; only the two
|
|
153
|
-
// authority fields are replaced by their resolved values.
|
|
154
|
-
const entry = { ...p, authority: resolved.authority };
|
|
155
|
-
if (resolved.reviewedBy) entry.reviewedBy = resolved.reviewedBy;
|
|
156
|
-
else delete entry.reviewedBy;
|
|
157
|
-
return entry;
|
|
158
|
-
});
|
|
123
|
+
const policies = POLICY_CATALOG.filter((p) => !p.alwaysOn).map((p) => ({ ...p }));
|
|
159
124
|
|
|
160
125
|
const manifest = JSON.stringify(
|
|
161
126
|
{ id: PACK_ID, version, effect: "enforce", policies },
|
|
@@ -173,10 +138,8 @@ writeFileSync(
|
|
|
173
138
|
);
|
|
174
139
|
|
|
175
140
|
const omitted = POLICY_CATALOG.filter((p) => p.alwaysOn).map((p) => p.name);
|
|
176
|
-
const reviewable = policies.filter((p) => p.authority === "reviewable").length;
|
|
177
141
|
console.log(
|
|
178
|
-
`[policy-pack] ${PACK_ID}@${version} — ${policies.length} policies ` +
|
|
179
|
-
`(${reviewable} reviewable by Jev, ${policies.length - reviewable} hard), ` +
|
|
142
|
+
`[policy-pack] ${PACK_ID}@${version} — ${policies.length} policies, ` +
|
|
180
143
|
`${(entryBytes.length / 1024).toFixed(1)} KB entry` +
|
|
181
144
|
(omitted.length ? `; omitted alwaysOn: ${omitted.join(", ")}` : ""),
|
|
182
145
|
);
|
|
@@ -2215,29 +2215,17 @@ const READ_LIKE_CMDS =
|
|
|
2215
2215
|
* separator characters that appear in compound argv tokens (':' for Docker
|
|
2216
2216
|
* volume mounts and PATH-like lists, '=' for env var assignments) so that a
|
|
2217
2217
|
* suffix like '/dashboard.mdx' in 'docs/STAR/dashboard.mdx' or '/docs' in
|
|
2218
|
-
* '-v HOST_DIR:/docs' is not misread as a standalone absolute path.
|
|
2219
|
-
* that list too, so a match cannot START on the second slash of a protocol
|
|
2220
|
-
* separator: 'http://localhost:3000/x' used to yield '/localhost:3000/x'.
|
|
2221
|
-
* A match that starts on the FIRST slash is untouched, so '//etc/passwd' —
|
|
2222
|
-
* a real, working spelling of /etc/passwd — is still extracted and still
|
|
2223
|
-
* resolves to /etc/passwd.
|
|
2224
|
-
*
|
|
2225
|
-
* Runs of slashes with nothing else ('//', '///') are dropped: those are a
|
|
2226
|
-
* line-comment marker, not a directory. They used to resolve to the filesystem
|
|
2227
|
-
* root, which denied any read-like command carrying a '// …' comment — a
|
|
2228
|
-
* heredoc writing a TypeScript file into the project, say. A lone '/' is the
|
|
2229
|
-
* root and is kept.
|
|
2218
|
+
* '-v HOST_DIR:/docs' is not misread as a standalone absolute path.
|
|
2230
2219
|
*/
|
|
2231
2220
|
function extractAbsolutePaths(command: string): string[] {
|
|
2232
2221
|
const paths: string[] = [];
|
|
2233
|
-
const pathRe = /(?<![a-zA-Z0-9_
|
|
2222
|
+
const pathRe = /(?<![a-zA-Z0-9_.\-~\\*?:=])(?:~\/[^\s;|&"'()\[\]{}]*|~(?=\s|$|[;|&"'()\[\]{}])|\/[^\s;|&"'()\[\]{}]*)/g;
|
|
2234
2223
|
|
|
2235
2224
|
function addPaths(s: string): void {
|
|
2236
2225
|
pathRe.lastIndex = 0;
|
|
2237
2226
|
let m: RegExpExecArray | null;
|
|
2238
2227
|
while ((m = pathRe.exec(s)) !== null) {
|
|
2239
2228
|
let p = m[0];
|
|
2240
|
-
if (/^\/{2,}$/.test(p)) continue; // a `//` comment marker, not the root
|
|
2241
2229
|
if (p === "~") p = homedir();
|
|
2242
2230
|
else if (p.startsWith("~/")) p = join(homedir(), p.slice(2));
|
|
2243
2231
|
paths.push(p);
|
|
@@ -3190,13 +3178,7 @@ export function registerBuiltinPolicies(enabledNames: string[]): void {
|
|
|
3190
3178
|
// A guard against the agent disabling failproofai that any of those can
|
|
3191
3179
|
// switch off is not a guard.
|
|
3192
3180
|
if (policy.alwaysOn || enabledSet.has(normalizePolicyName(policy.name))) {
|
|
3193
|
-
|
|
3194
|
-
// resolves to hard even if its catalog entry ever said otherwise.
|
|
3195
|
-
registerPolicy(policy.name, policy.description, policy.fn, policy.match, 0, policy.params, {
|
|
3196
|
-
authority: policy.authority,
|
|
3197
|
-
reviewedBy: policy.reviewedBy,
|
|
3198
|
-
alwaysOn: policy.alwaysOn,
|
|
3199
|
-
});
|
|
3181
|
+
registerPolicy(policy.name, policy.description, policy.fn, policy.match, 0, policy.params);
|
|
3200
3182
|
}
|
|
3201
3183
|
}
|
|
3202
3184
|
}
|
|
@@ -377,7 +377,7 @@ export function versionStatusLines(): string[] {
|
|
|
377
377
|
const daemon = recorded?.daemon ?? "not installed";
|
|
378
378
|
return [
|
|
379
379
|
`CLI ${cliVersion} · daemon ${daemon}${skew ? " (STALE)" : ""} · layout ${recorded?.layout ?? "-"}`,
|
|
380
|
-
...(skew ? [" Run `failproofai
|
|
380
|
+
...(skew ? [" Run `failproofai config` to update the daemon."] : []),
|
|
381
381
|
];
|
|
382
382
|
}
|
|
383
383
|
|
|
@@ -8,8 +8,6 @@ import { createHash } from "node:crypto";
|
|
|
8
8
|
import { existsSync, readFileSync, realpathSync, rmSync } from "node:fs";
|
|
9
9
|
import { isAbsolute, relative, resolve } from "node:path";
|
|
10
10
|
import { cloudPoliciesDir } from "./fp-home";
|
|
11
|
-
import { authorityFieldsOf } from "./policy-authority";
|
|
12
|
-
import type { PolicyAuthority } from "./policy-types";
|
|
13
11
|
|
|
14
12
|
/**
|
|
15
13
|
* Active-manifest schema versions this reader accepts.
|
|
@@ -46,19 +44,6 @@ export interface CloudManagedPolicyArtifact {
|
|
|
46
44
|
sha256: string;
|
|
47
45
|
path: string;
|
|
48
46
|
deployment: number;
|
|
49
|
-
/**
|
|
50
|
-
* Whether Jev may clear this policy's verdict once it is configured, as the
|
|
51
|
-
* ASSIGNMENT declares it — code inside the artifact cannot grant itself this.
|
|
52
|
-
* Absent means `hard`, which is what keeps Jev from weakening central
|
|
53
|
-
* enforcement by default: a cloud policy is only ever reviewable because
|
|
54
|
-
* whoever deployed it said so. Applies to every hook the artifact registers.
|
|
55
|
-
*
|
|
56
|
-
* Read and validated here; the daemon has to carry it into `active.json`
|
|
57
|
-
* (`ActivePolicy` in `cloud_policies.rs`) before a deployment can set it.
|
|
58
|
-
*/
|
|
59
|
-
authority?: PolicyAuthority;
|
|
60
|
-
/** The semantic policies that must all be asked and none answer `deny`; see `authority`. */
|
|
61
|
-
reviewedBy?: string[];
|
|
62
47
|
}
|
|
63
48
|
|
|
64
49
|
interface ActiveManifest {
|
|
@@ -70,8 +55,6 @@ interface ActiveManifest {
|
|
|
70
55
|
effect?: string;
|
|
71
56
|
sha256: string;
|
|
72
57
|
path: string;
|
|
73
|
-
authority?: unknown;
|
|
74
|
-
reviewedBy?: unknown;
|
|
75
58
|
}>;
|
|
76
59
|
}
|
|
77
60
|
|
|
@@ -223,11 +206,6 @@ export function readActiveCloudManagedPolicies(): CloudManagedPolicyArtifact[] {
|
|
|
223
206
|
sha256: policy.sha256,
|
|
224
207
|
path,
|
|
225
208
|
deployment: manifest.deployment,
|
|
226
|
-
// Unlike `effect`, a malformed authority is dropped rather than refused:
|
|
227
|
-
// dropping it makes this policy `hard`, the default that keeps enforcing,
|
|
228
|
-
// while refusing would take the whole deployment down over an optional
|
|
229
|
-
// field. Absent stays absent.
|
|
230
|
-
...authorityFieldsOf(policy as unknown as Record<string, unknown>),
|
|
231
209
|
};
|
|
232
210
|
});
|
|
233
211
|
}
|
|
@@ -33,7 +33,6 @@ import type { CustomHook, PolicyCatalogEntry } from "./policy-types";
|
|
|
33
33
|
import type { CloudManagedPolicyArtifact } from "./cloud-managed-policies";
|
|
34
34
|
import type { ResolvedPack } from "./pack-manifest";
|
|
35
35
|
import { customPoliciesDir, shimsDir } from "./fp-home";
|
|
36
|
-
import { warnAuthority, withMergedAuthority } from "./policy-authority";
|
|
37
36
|
|
|
38
37
|
const LOADING_KEY = "__FAILPROOFAI_LOADING_HOOKS__";
|
|
39
38
|
|
|
@@ -449,19 +448,9 @@ export async function loadAllCustomHooks(
|
|
|
449
448
|
`cloud-managed policies ${existing.id} and ${policy.id} have identical source, so they share ` +
|
|
450
449
|
`one artifact and load as one policy; enforcing it if either asks to enforce`,
|
|
451
450
|
);
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
// declaration let the order of active.json decide, so a team's reviewable
|
|
455
|
-
// assignment could clear what an org-wide hard one enforces.
|
|
456
|
-
const winner = existing.effect !== "enforce" && policy.effect === "enforce" ? policy : existing;
|
|
457
|
-
const { merged, overruled } = withMergedAuthority(winner, [existing, policy]);
|
|
458
|
-
if (overruled) {
|
|
459
|
-
warnAuthority(
|
|
460
|
-
`cloud-managed policies ${existing.id} and ${policy.id} share one artifact and do not all declare it ` +
|
|
461
|
-
`reviewable, so it stays hard`,
|
|
462
|
-
);
|
|
451
|
+
if (existing.effect !== "enforce" && policy.effect === "enforce") {
|
|
452
|
+
cloudManagedByPath.set(key, policy);
|
|
463
453
|
}
|
|
464
|
-
cloudManagedByPath.set(key, merged);
|
|
465
454
|
}
|
|
466
455
|
|
|
467
456
|
// Installed packs, keyed by artifact path — the same content-addressing, and
|
|
@@ -493,34 +482,14 @@ export async function loadAllCustomHooks(
|
|
|
493
482
|
*
|
|
494
483
|
* Winner precedence on a name both declare, because the merged record carries
|
|
495
484
|
* the winner's id and version and there is no merging two different defaults.
|
|
496
|
-
*
|
|
497
|
-
* Except AUTHORITY, which resolves toward hard like the effect resolves toward
|
|
498
|
-
* enforce (`withMergedAuthority`): a name is reviewable only if every pack
|
|
499
|
-
* behind the artifact declares it reviewable. A pack whose manifest does not
|
|
500
|
-
* list the name at all counts as hard — its copy of the artifact registers
|
|
501
|
-
* the policy all the same, undeclared, and an undeclared pack policy is hard.
|
|
502
|
-
* Winner precedence here would let one pack's manifest make another pack's
|
|
503
|
-
* policy reviewable, which is the one thing a manifest may never do.
|
|
504
485
|
*/
|
|
505
486
|
const unionCatalog = (
|
|
506
487
|
winner: PolicyCatalogEntry[],
|
|
507
488
|
other: PolicyCatalogEntry[],
|
|
508
|
-
):
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
const r = withMergedAuthority(entry, [entry, peer ?? {}]);
|
|
513
|
-
if (r.overruled) overruled.push(entry.name);
|
|
514
|
-
return r.merged;
|
|
515
|
-
};
|
|
516
|
-
return {
|
|
517
|
-
policies: [
|
|
518
|
-
...winner.map((w) => harden(w, other.find((p) => p.name === w.name))),
|
|
519
|
-
...other.filter((p) => !winner.some((w) => w.name === p.name)).map((p) => harden(p, undefined)),
|
|
520
|
-
],
|
|
521
|
-
overruled,
|
|
522
|
-
};
|
|
523
|
-
};
|
|
489
|
+
): PolicyCatalogEntry[] => [
|
|
490
|
+
...winner,
|
|
491
|
+
...other.filter((p) => !winner.some((w) => w.name === p.name)),
|
|
492
|
+
];
|
|
524
493
|
|
|
525
494
|
const packByPath = new Map<string, ResolvedPack>();
|
|
526
495
|
/**
|
|
@@ -566,19 +535,12 @@ export async function loadAllCustomHooks(
|
|
|
566
535
|
// being intersected away.
|
|
567
536
|
const winner = existing.effect !== "enforce" && pack.effect === "enforce" ? pack : existing;
|
|
568
537
|
const other = winner === existing ? pack : existing;
|
|
569
|
-
const catalog = unionCatalog(winner.policies, other.policies);
|
|
570
538
|
packByPath.set(key, {
|
|
571
539
|
...winner,
|
|
572
|
-
policies:
|
|
540
|
+
policies: unionCatalog(winner.policies, other.policies),
|
|
573
541
|
enabled: unionSelection(winner.enabled, other.enabled),
|
|
574
542
|
clis: unionSelection(winner.clis, other.clis),
|
|
575
543
|
});
|
|
576
|
-
if (catalog.overruled.length > 0) {
|
|
577
|
-
warnAuthority(
|
|
578
|
-
`packs ${existing.id} and ${pack.id} share one artifact and do not all declare ` +
|
|
579
|
-
`${catalog.overruled.join(", ")} reviewable, so ${catalog.overruled.length === 1 ? "it stays" : "they stay"} hard`,
|
|
580
|
-
);
|
|
581
|
-
}
|
|
582
544
|
}
|
|
583
545
|
|
|
584
546
|
// 1. Explicit custom policy paths. Accept a string for callers/configs using
|
|
@@ -4,14 +4,9 @@
|
|
|
4
4
|
* from 'failproofai') and the hook handler (which reads from this file) share the
|
|
5
5
|
* same in-process state when running within the same Node.js process.
|
|
6
6
|
*/
|
|
7
|
-
import type { CustomHook
|
|
7
|
+
import type { CustomHook } from "./policy-types";
|
|
8
8
|
|
|
9
9
|
const REGISTRY_KEY = "__failproofai_custom_hooks__";
|
|
10
|
-
/**
|
|
11
|
-
* Beside the hook registry, on the same key namespace and cleared by the same
|
|
12
|
-
* call — the two are one registration pass and a build step reads both.
|
|
13
|
-
*/
|
|
14
|
-
const SEMANTIC_KEY = "__failproofai_semantic_policies__";
|
|
15
10
|
|
|
16
11
|
function getRegistry(): CustomHook[] {
|
|
17
12
|
const g = globalThis as Record<string, unknown>;
|
|
@@ -19,56 +14,17 @@ function getRegistry(): CustomHook[] {
|
|
|
19
14
|
return g[REGISTRY_KEY] as CustomHook[];
|
|
20
15
|
}
|
|
21
16
|
|
|
22
|
-
function getSemanticRegistry(): SemanticPolicyDeclaration[] {
|
|
23
|
-
const g = globalThis as Record<string, unknown>;
|
|
24
|
-
if (!Array.isArray(g[SEMANTIC_KEY])) g[SEMANTIC_KEY] = [];
|
|
25
|
-
return g[SEMANTIC_KEY] as SemanticPolicyDeclaration[];
|
|
26
|
-
}
|
|
27
|
-
|
|
28
17
|
export const customPolicies = {
|
|
29
18
|
add(hook: CustomHook): void {
|
|
30
19
|
getRegistry().push(hook);
|
|
31
20
|
},
|
|
32
21
|
};
|
|
33
22
|
|
|
34
|
-
/**
|
|
35
|
-
* Register a semantic (Jev) policy — a question set for the classifier, read by
|
|
36
|
-
* `failproofai publish` and emitted as the pack manifest's `semantic` array.
|
|
37
|
-
*
|
|
38
|
-
* A SEPARATE namespace from `customPolicies`, deliberately, rather than a
|
|
39
|
-
* `customPolicies.addSemantic`. A semantic policy has no `fn` and no `match`,
|
|
40
|
-
* and nothing about it ever executes on a user's machine: what installs is the
|
|
41
|
-
* declaration in the manifest, and the artifact's call here matters only at
|
|
42
|
-
* build time. Putting it behind the object whose entries return
|
|
43
|
-
* `allow()`/`deny()` invites exactly the shape confusion the manifest parser
|
|
44
|
-
* would then have to catch — a function on a semantic entry, a probe list on a
|
|
45
|
-
* regex one — and both mistakes would be silent until somebody read a manifest.
|
|
46
|
-
*
|
|
47
|
-
* Nothing is validated here. `parsePackSemanticPolicy` in `pack-manifest.ts`
|
|
48
|
-
* owns every rule, and it is applied at BUILD time (where the author can still
|
|
49
|
-
* fix it) and again at load time (where the bytes may have come from anywhere).
|
|
50
|
-
* Validating a third time in the setter would be a third copy of the rules.
|
|
51
|
-
*/
|
|
52
|
-
export const semanticPolicies = {
|
|
53
|
-
add(policy: SemanticPolicyDeclaration): void {
|
|
54
|
-
getSemanticRegistry().push(policy);
|
|
55
|
-
},
|
|
56
|
-
};
|
|
57
|
-
|
|
58
23
|
export function getCustomHooks(): CustomHook[] {
|
|
59
24
|
return getRegistry();
|
|
60
25
|
}
|
|
61
26
|
|
|
62
|
-
export function getSemanticRegistrations(): SemanticPolicyDeclaration[] {
|
|
63
|
-
return getSemanticRegistry();
|
|
64
|
-
}
|
|
65
|
-
|
|
66
27
|
export function clearCustomHooks(): void {
|
|
67
28
|
const g = globalThis as Record<string, unknown>;
|
|
68
29
|
g[REGISTRY_KEY] = [];
|
|
69
|
-
// Both maps, on one call. A loader that cleared only the hooks would carry
|
|
70
|
-
// one entry file's semantic policies into the next file's build — and since
|
|
71
|
-
// the semantic half is read after the load rather than during it, the extras
|
|
72
|
-
// would be published under the wrong pack with nothing to notice.
|
|
73
|
-
g[SEMANTIC_KEY] = [];
|
|
74
30
|
}
|
|
@@ -35,11 +35,6 @@ export const FIRST_RUN_EXEMPT_SUBCOMMANDS: readonly string[] = [
|
|
|
35
35
|
// Same reason: a backfill is an explicit instruction about an already-set-up
|
|
36
36
|
// machine, and interrupting it to offer setup answers a question nobody asked.
|
|
37
37
|
"backfill",
|
|
38
|
-
// `jev setup` is configuration in its own right, and `jev status` / `test` /
|
|
39
|
-
// `remove` inspect or undo it. It is also the command most likely to be
|
|
40
|
-
// scripted with a key on stdin — a wizard in front of it would read that key
|
|
41
|
-
// as the answer to its first question.
|
|
42
|
-
"jev",
|
|
43
38
|
];
|
|
44
39
|
|
|
45
40
|
export function shouldOfferFirstRun(args: readonly string[]): boolean {
|
package/src/hooks/fp-home.ts
CHANGED
|
@@ -51,7 +51,6 @@
|
|
|
51
51
|
* VERSION layout / cli / daemon versions
|
|
52
52
|
* config.json 0644 non-secret: mode, daemon, collector prefs
|
|
53
53
|
* credentials.json 0600 every token
|
|
54
|
-
* jev.json 0600 the customer's own Jev endpoint + key (BYOK opt-in)
|
|
55
54
|
* policies-config.json the builtin enable/disable set + params
|
|
56
55
|
* bin/ downloaded daemon binaries, one per version
|
|
57
56
|
* policies/ every policy: the user's *.mjs sit directly here
|
|
@@ -149,14 +148,6 @@ export const configFile = (home?: string) => atHome(home, "config.json");
|
|
|
149
148
|
*/
|
|
150
149
|
export const credentialsFile = (home?: string) => atHome(home, "credentials.json");
|
|
151
150
|
|
|
152
|
-
/**
|
|
153
|
-
* The customer's own Jev endpoint and key (BYOK), owner-only. Its presence is
|
|
154
|
-
* the whole opt-in to the two-tier evaluator: absent, hooks run the regex
|
|
155
|
-
* engine exactly as before. GLOBAL only — a repository can never set it. See
|
|
156
|
-
* `src/hooks/semantic/jev-config.ts`.
|
|
157
|
-
*/
|
|
158
|
-
export const jevConfigFile = (home?: string) => atHome(home, "jev.json");
|
|
159
|
-
|
|
160
151
|
// ── Daemon binaries ──────────────────────────────────────────────────────────
|
|
161
152
|
|
|
162
153
|
export const binDir = (home?: string) => atHome(home, "bin");
|
|
@@ -398,12 +389,6 @@ export const failedDir = (home?: string) => resolve(stateDir(home), "failed");
|
|
|
398
389
|
export const collectorHealthFile = (home?: string) => resolve(stateDir(home), "collector-health.json");
|
|
399
390
|
/** Per-session enforcement pauses, keyed by a hash of the session id. */
|
|
400
391
|
export const sessionPauseDir = () => resolve(stateDir(), "sessions");
|
|
401
|
-
/**
|
|
402
|
-
* The semantic (Jev) evaluator's local state: `sessions/<id>.json` holds the
|
|
403
|
-
* human prompts recorded at `UserPromptSubmit`, and `verdicts.jsonl` one row
|
|
404
|
-
* per semantic evaluation. Written only when a Jev config (BYOK) is present.
|
|
405
|
-
*/
|
|
406
|
-
export const semanticDir = () => resolve(stateDir(), "semantic");
|
|
407
392
|
/**
|
|
408
393
|
* When the scheduled audit last ran, and when the next one is due.
|
|
409
394
|
*
|
|
@@ -569,9 +554,6 @@ export const HOME_CLASSES: readonly { path: (home?: string) => string; class: Da
|
|
|
569
554
|
// policy silently — it keeps enforcing whatever it last had, reports healthy,
|
|
570
555
|
// and never reconciles again. Nothing re-derives a token.
|
|
571
556
|
{ path: credentialsFile, class: "user-typed" },
|
|
572
|
-
// The Jev BYOK config. A person typed the key; nothing regenerates it, and
|
|
573
|
-
// losing it silently turns the two-tier evaluator off.
|
|
574
|
-
{ path: jevConfigFile, class: "user-typed" },
|
|
575
557
|
// Holds `daemon.configured` (the flag that makes the machine fail closed),
|
|
576
558
|
// the collector preferences, `[audit] auto`, the telemetry opt-out, and
|
|
577
559
|
// `collector.sources.*.extra_paths` — the entire output of `harness add-path`.
|
|
@@ -660,11 +642,6 @@ export const HOME_CLASSES: readonly { path: (home?: string) => string; class: Da
|
|
|
660
642
|
{ path: codexSessionPathsFile, class: "derived" },
|
|
661
643
|
{ path: shimsDir, class: "derived" },
|
|
662
644
|
{ path: sessionPauseDir, class: "derived" },
|
|
663
|
-
// Recorded prompts (a six-hour window that only ever lets Jev clear a
|
|
664
|
-
// reviewable policy) and a local diagnostic log of semantic verdicts that is
|
|
665
|
-
// never shipped. Losing either costs a clear and some history, never
|
|
666
|
-
// enforcement.
|
|
667
|
-
{ path: semanticDir, class: "derived" },
|
|
668
645
|
{ path: logsDir, class: "derived" },
|
|
669
646
|
{ path: lastVersionFile, class: "derived" },
|
|
670
647
|
{ path: launcherMarker, class: "derived" },
|