failproofai 1.0.10 → 1.0.11-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.next/standalone/.next/BUILD_ID +1 -1
- package/.next/standalone/.next/build-manifest.json +6 -6
- 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/build-manifest.json +3 -3
- package/.next/standalone/.next/server/app/_global-error/page/server-reference-manifest.json +1 -1
- package/.next/standalone/.next/server/app/_global-error/page.js +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.meta +8 -0
- package/.next/standalone/.next/server/app/_global-error.rsc +7 -7
- package/.next/standalone/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +6 -6
- package/.next/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +7 -7
- package/.next/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_not-found/page/build-manifest.json +3 -3
- 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.meta +8 -0
- package/.next/standalone/.next/server/app/_not-found.rsc +14 -14
- package/.next/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +14 -14
- package/.next/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +13 -13
- package/.next/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/api/audit/invite/route.js +4 -4
- 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 +4 -4
- 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 +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 +2 -2
- 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 +4 -4
- 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 +3 -3
- 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 +3 -3
- 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 +1 -1
- package/.next/standalone/.next/server/app/api/download/[project]/[session]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/audit/page/build-manifest.json +3 -3
- package/.next/standalone/.next/server/app/audit/page/server-reference-manifest.json +2 -2
- package/.next/standalone/.next/server/app/audit/page.js +4 -4
- 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.meta +8 -0
- package/.next/standalone/.next/server/app/index.rsc +14 -14
- package/.next/standalone/.next/server/app/index.segments/__PAGE__.segment.rsc +13 -13
- package/.next/standalone/.next/server/app/index.segments/_full.segment.rsc +14 -14
- package/.next/standalone/.next/server/app/index.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/page/build-manifest.json +3 -3
- package/.next/standalone/.next/server/app/page/server-reference-manifest.json +1 -1
- package/.next/standalone/.next/server/app/page.js +4 -4
- package/.next/standalone/.next/server/app/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/policies/page/build-manifest.json +3 -3
- package/.next/standalone/.next/server/app/policies/page/server-reference-manifest.json +14 -14
- package/.next/standalone/.next/server/app/policies/page.js +8 -8
- package/.next/standalone/.next/server/app/policies/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/policies/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/project/[name]/page/build-manifest.json +3 -3
- 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 +5 -5
- package/.next/standalone/.next/server/app/project/[name]/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/project/[name]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/project/[name]/session/[sessionId]/page/build-manifest.json +3 -3
- 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 +5 -5
- package/.next/standalone/.next/server/app/project/[name]/session/[sessionId]/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/project/[name]/session/[sessionId]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/projects/page/build-manifest.json +3 -3
- package/.next/standalone/.next/server/app/projects/page/server-reference-manifest.json +1 -1
- package/.next/standalone/.next/server/app/projects/page.js +5 -5
- package/.next/standalone/.next/server/app/projects/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/projects/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/settings/page/build-manifest.json +3 -3
- package/.next/standalone/.next/server/app/settings/page/server-reference-manifest.json +8 -8
- package/.next/standalone/.next/server/app/settings/page.js +9 -9
- 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]__0qxhecv._.js → [externals]__0d7i9ea._.js} +2 -2
- package/.next/standalone/.next/server/chunks/{[externals]__0sg9-3p._.js → [externals]__0hjaw70._.js} +1 -1
- package/.next/standalone/.next/server/chunks/[externals]__1_9ze9b._.js +3 -0
- package/.next/standalone/.next/server/chunks/[externals]__1oenfmn._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__08dchfu._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0ga9hs7._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0l3yhx4._.js +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0moxohc._.js +22 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0o07qi9._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0z2ll-a._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__1adacul._.js +11 -11
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__1autwno._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__1v25n-6._.js +3 -0
- package/.next/standalone/.next/server/chunks/_09dz7xv._.js +1 -1
- package/.next/standalone/.next/server/chunks/_0tovk6q._.js +1 -1
- package/.next/standalone/.next/server/chunks/_0trp3yc._.js +1 -1
- package/.next/standalone/.next/server/chunks/_1ek68ln._.js +2 -2
- package/.next/standalone/.next/server/chunks/_1fz8m31._.js +1 -1
- package/.next/standalone/.next/server/chunks/_1jrv3hg._.js +3 -0
- package/.next/standalone/.next/server/chunks/_1nx8fim._.js +3 -0
- package/.next/standalone/.next/server/chunks/_1ogwigf._.js +1 -1
- package/.next/standalone/.next/server/chunks/{_1q5i8mb._.js → _1q27azx._.js} +2 -2
- package/.next/standalone/.next/server/chunks/lib_telemetry_ts_0dctyyw._.js +1 -1
- package/.next/standalone/.next/server/chunks/{node_modules_posthog-node_dist_entrypoints_index_node_mjs_0el6rg8._.js → node_modules_posthog-node_dist_entrypoints_index_node_mjs_0ol5pa3._.js} +2 -2
- package/.next/standalone/.next/server/chunks/{node_modules_posthog-node_dist_entrypoints_index_node_mjs_04op_ou._.js → node_modules_posthog-node_dist_entrypoints_index_node_mjs_1rqmk27._.js} +2 -2
- package/.next/standalone/.next/server/chunks/{node_modules_posthog-node_dist_entrypoints_index_node_mjs_0dr20uz._.js → node_modules_posthog-node_dist_entrypoints_index_node_mjs_1w7tiq4._.js} +2 -2
- package/.next/standalone/.next/server/chunks/package_json_[json]_cjs_1nxcc4v._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0oqrl71._.js → [root-of-the-server]__042u-jn._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__04usis8._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__1-bm5zf._.js → [root-of-the-server]__0502lat._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0_gn5iz._.js +4 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0f765xr._.js +4 -0
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__01bmjsj._.js → [root-of-the-server]__0h38gzz._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0hoaz1g._.js +4 -0
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__1ouobn4._.js → [root-of-the-server]__0mxmwtx._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__19evfi8._.js → [root-of-the-server]__0uescqv._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__13d-wb6._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1484zv2._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__1mf3zp6._.js → [root-of-the-server]__19dutr7._.js} +4 -4
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__1u6sn69._.js → [root-of-the-server]__1ab4ifb._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1fbrk56._.js +4 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1pprgri._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1um4yxn._.js +4 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1wb4yt2._.js +4 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1y3n3cn._.js +4 -0
- package/.next/standalone/.next/server/chunks/ssr/_08x1r5t._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_0bqoto4._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{_0yq5_3a._.js → _1ffxwxz._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_1gb0ifp._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{_042cgl1._.js → _1o95rf0._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{_1zopuov._.js → _1thr5rf._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{_16pa9ht._.js → _1v1o2ya._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/_next-internal_server_app_policies_page_actions_1sp2-yo.js +12 -14
- package/.next/standalone/.next/server/chunks/ssr/app_actions_get-scheduled-audit_ts_0ei9sni._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/app_audit__components_audit-dashboard_tsx_0p9ud47._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/app_global-error_tsx_1kp6l3x._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/app_policies_hooks-client_tsx_19dqvpc._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/app_settings_02tf1h4._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/node_modules_1hl81y4._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/node_modules_next_dist_0nkkbfv._.js +6 -0
- package/.next/standalone/.next/server/chunks/ssr/src_hooks_fp-config_ts_04t589g._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/src_hooks_fp-home_ts_0je3xkv._.js +1 -1
- package/.next/standalone/.next/server/middleware-build-manifest.js +6 -6
- package/.next/standalone/.next/server/middleware.js +1 -1
- 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 -23
- package/.next/standalone/.next/static/chunks/08tmc_7n-rba1.js +1 -0
- package/.next/standalone/.next/static/chunks/{3mjfvng11xnoo.js → 09tlrmucn6oq3.js} +1 -1
- package/.next/standalone/.next/static/chunks/{078dofaxvjgpd.js → 0i69k917myh7b.js} +1 -1
- package/.next/standalone/.next/static/chunks/{03h3b-uomi7_d.js → 0u_nhsujkactp.js} +1 -1
- package/.next/standalone/.next/static/chunks/{2j92xul6y24_v.js → 0zp51hzx62i-u.js} +1 -1
- package/.next/standalone/.next/static/chunks/{3u1s8dsqiean5.js → 1fz7q0gtnmeod.js} +1 -1
- package/.next/standalone/.next/static/chunks/{3ob2161ap37ul.js → 1j75le8wln-26.js} +1 -1
- package/.next/standalone/.next/static/chunks/{2kj826h1w9r47.js → 1z4km7tw0_50h.js} +1 -1
- package/.next/standalone/.next/static/chunks/{1fqukzzowjflt.js → 239ay_80-xr8z.js} +1 -1
- package/.next/standalone/.next/static/chunks/{3nkc2jlgyygda.js → 2c9pc5xco6rnu.js} +1 -1
- package/.next/standalone/.next/static/chunks/{3i8rg2fv9nd6e.js → 3n46e45atic-m.js} +1 -1
- package/.next/standalone/.next/static/chunks/{0542cuk_va8g1.js → 3sg07wnn969xq.js} +1 -1
- package/.next/standalone/.next/static/chunks/{turbopack-11dn2pegmg9_9.js → turbopack-1opxka4dtjbc5.js} +1 -1
- package/.next/standalone/app/actions/install-hooks-web.ts +10 -2
- package/.next/standalone/hermes-plugin/plugin.yaml +1 -1
- package/.next/standalone/node_modules/@next/env/package.json +1 -1
- package/.next/standalone/node_modules/next/dist/build/swc/index.js +1 -1
- package/.next/standalone/node_modules/next/dist/compiled/hash.js/sha256/256.js +1 -0
- package/.next/standalone/node_modules/next/dist/compiled/hash.js/sha256/package.json +1 -0
- package/.next/standalone/node_modules/next/dist/compiled/next-server/app-page-turbo-experimental.runtime.prod.js +17 -17
- package/.next/standalone/node_modules/next/dist/compiled/next-server/app-page-turbo.runtime.prod.js +18 -18
- package/.next/standalone/node_modules/next/dist/compiled/next-server/app-route-turbo.runtime.prod.js +3 -3
- package/.next/standalone/node_modules/next/dist/compiled/next-server/pages-turbo.runtime.prod.js +13 -13
- package/.next/standalone/node_modules/next/dist/lib/patch-incorrect-lockfile.js +3 -3
- package/.next/standalone/node_modules/next/dist/server/base-server.js +1 -2
- package/.next/standalone/node_modules/next/dist/server/config.js +1 -1
- package/.next/standalone/node_modules/next/dist/server/dev/hot-reloader-turbopack.js +2 -2
- package/.next/standalone/node_modules/next/dist/server/dev/hot-reloader-webpack.js +1 -1
- package/.next/standalone/node_modules/next/dist/server/image-optimizer.js +265 -53
- package/.next/standalone/node_modules/next/dist/server/lib/app-info-log.js +1 -1
- package/.next/standalone/node_modules/next/dist/server/lib/incremental-cache/file-system-cache.js +177 -19
- package/.next/standalone/node_modules/next/dist/server/lib/incremental-cache/index.js +36 -17
- package/.next/standalone/node_modules/next/dist/server/lib/incremental-cache/shared-cache-controls.external.js +14 -6
- package/.next/standalone/node_modules/next/dist/server/lib/match-next-data-pathname.js +3 -1
- package/.next/standalone/node_modules/next/dist/server/lib/node-fs-methods.js +14 -0
- package/.next/standalone/node_modules/next/dist/server/lib/route-cache-key.js +77 -0
- package/.next/standalone/node_modules/next/dist/server/lib/router-utils/block-cross-site-dev.js +9 -11
- package/.next/standalone/node_modules/next/dist/server/lib/start-server.js +1 -1
- package/.next/standalone/node_modules/next/dist/server/mcp/get-mcp-middleware.js +4 -2
- package/.next/standalone/node_modules/next/dist/server/next-server.js +7 -3
- package/.next/standalone/node_modules/next/dist/server/response-cache/index.js +32 -16
- package/.next/standalone/node_modules/next/dist/server/route-matcher-providers/app-page-route-matcher-provider.js +2 -2
- package/.next/standalone/node_modules/next/dist/server/route-modules/pages/pages-handler.js +6 -1
- package/.next/standalone/node_modules/next/dist/server/route-modules/route-module.js +9 -2
- package/.next/standalone/node_modules/next/dist/server/use-cache/use-cache-wrapper.js +30 -29
- package/.next/standalone/node_modules/next/dist/shared/lib/router/utils/app-paths.js +18 -1
- package/.next/standalone/node_modules/next/dist/telemetry/anonymous-meta.js +1 -1
- package/.next/standalone/node_modules/next/dist/telemetry/events/swc-load-failure.js +1 -1
- package/.next/standalone/node_modules/next/dist/telemetry/events/version.js +2 -2
- package/.next/standalone/node_modules/next/package.json +10 -10
- package/.next/standalone/package.json +14 -11
- package/.next/standalone/sdk/python/README.md +41 -0
- package/.next/standalone/sdk/python/docs/README.md +1 -0
- package/.next/standalone/sdk/python/docs/otel/README.md +36 -0
- package/.next/standalone/sdk/python/docs/otel/examples/agent_trace.py +30 -0
- package/.next/standalone/sdk/python/docs/otel/examples/quickstart.py +22 -0
- package/.next/standalone/sdk/python/failproofai_sdk/__init__.py +8 -0
- package/.next/standalone/sdk/python/failproofai_sdk/integrations/__init__.py +3 -0
- package/.next/standalone/sdk/python/failproofai_sdk/integrations/otel.py +189 -0
- package/.next/standalone/sdk/python/pyproject.toml +2 -1
- package/.next/standalone/sdk/python/tests/test_docs.py +16 -3
- package/.next/standalone/sdk/python/tests/test_integrations.py +1 -1
- package/.next/standalone/sdk/python/tests/test_otel.py +147 -0
- package/.next/standalone/sdk/python/tests/test_zero_dependencies.py +4 -1
- package/.next/standalone/sdk/python/uv.lock +258 -147
- package/.next/standalone/sdk/typescript/README.md +43 -0
- package/.next/standalone/sdk/typescript/integration/ai.test.ts +9 -2
- package/.next/standalone/sdk/typescript/package-lock.json +57 -5
- package/.next/standalone/sdk/typescript/package.json +2 -0
- package/.next/standalone/sdk/typescript/src/edge/index.ts +9 -0
- package/.next/standalone/sdk/typescript/src/index.ts +2 -0
- package/.next/standalone/sdk/typescript/src/integrations/index.ts +4 -1
- package/.next/standalone/sdk/typescript/src/integrations/otel.ts +204 -0
- package/.next/standalone/sdk/typescript/test/integrations.test.ts +1 -1
- package/.next/standalone/sdk/typescript/test/otel.test.ts +125 -0
- package/.next/standalone/server.js +1 -1
- package/bin/failproofai.mjs +653 -1077
- package/dist/cli.mjs +8174 -3930
- package/dist/worker.mjs +170 -62
- package/hermes-plugin/plugin.yaml +1 -1
- package/package.json +14 -11
- package/scripts/launch-facts.ts +157 -0
- package/scripts/launch-ready.ts +228 -0
- package/scripts/launch-screen.ts +202 -0
- package/scripts/launch.ts +106 -49
- package/scripts/skew-log-filter.ts +42 -0
- package/src/audit/cli-login.ts +39 -59
- package/src/audit/cli.ts +308 -228
- package/src/audit/index.ts +45 -2
- package/src/audit/schedule-cli.ts +83 -120
- package/src/audit/types.ts +31 -0
- package/src/hooks/agent-selection.ts +155 -0
- package/src/hooks/backfill-cli.ts +151 -137
- package/src/hooks/backfill-request.ts +149 -0
- package/src/hooks/cloud-connection.ts +1 -1
- package/src/hooks/cloud-enrollment-cli.ts +78 -28
- package/src/hooks/cloud-introspect.ts +3 -0
- package/src/hooks/collector-config.ts +10 -1
- package/src/hooks/config-status.ts +606 -0
- package/src/hooks/configure-wizard.ts +915 -989
- package/src/hooks/daemon-service.ts +16 -6
- package/src/hooks/did-you-mean.ts +185 -0
- package/src/hooks/flush-cli.ts +33 -7
- package/src/hooks/fp-config.ts +96 -0
- package/src/hooks/fp-home.ts +11 -0
- package/src/hooks/fp-reset.ts +102 -95
- package/src/hooks/handler.ts +4 -0
- package/src/hooks/harness-cli.ts +87 -138
- package/src/hooks/install-prompt.ts +38 -477
- package/src/hooks/integrations.ts +1 -1
- package/src/hooks/jev-cli.ts +183 -196
- package/src/hooks/manager.ts +554 -358
- package/src/hooks/onboarding-attempt.ts +11 -9
- package/src/hooks/otel-cli.ts +344 -0
- package/src/hooks/otel-output.ts +24 -0
- package/src/hooks/otel-writers.ts +225 -0
- package/src/hooks/pack-cli.ts +219 -204
- package/src/hooks/report-body.ts +50 -0
- package/src/hooks/safe-config-write.ts +4 -2
- package/src/hooks/session-pause-cli.ts +93 -73
- package/src/hooks/tui.ts +849 -389
- package/src/hooks/uninstall-cli.ts +136 -149
- package/src/hooks/untraced-note.ts +52 -0
- package/.next/standalone/.next/server/chunks/[externals]__19_pzeq._.js +0 -3
- package/.next/standalone/.next/server/chunks/[externals]__20kzpkf._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__01eqny5._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__05ja_05._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0igxt32._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0zyc_nm._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__1ttrwnd._.js +0 -22
- package/.next/standalone/.next/server/chunks/_0bs-v8p._.js +0 -3
- package/.next/standalone/.next/server/chunks/_185gyk9._.js +0 -3
- 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]__0n0xg95._.js +0 -4
- 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]__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]__15578wp._.js +0 -4
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1m_svbe._.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/node_modules_next_dist_1n3w9lb._.js +0 -6
- package/.next/standalone/.next/static/chunks/1lyg_puttohbc.js +0 -1
- /package/.next/standalone/.next/static/{ECs8__hcNabYV58WfDh-3 → UZKCiP4Q2TeU8zOB-h9Xj}/_buildManifest.js +0 -0
- /package/.next/standalone/.next/static/{ECs8__hcNabYV58WfDh-3 → UZKCiP4Q2TeU8zOB-h9Xj}/_clientMiddlewareManifest.js +0 -0
- /package/.next/standalone/.next/static/{ECs8__hcNabYV58WfDh-3 → UZKCiP4Q2TeU8zOB-h9Xj}/_ssgManifest.js +0 -0
package/dist/worker.mjs
CHANGED
|
@@ -1165,7 +1165,7 @@ function instruct(reason) {
|
|
|
1165
1165
|
}
|
|
1166
1166
|
|
|
1167
1167
|
// package.json
|
|
1168
|
-
var version = "1.0.
|
|
1168
|
+
var version = "1.0.11-beta.1";
|
|
1169
1169
|
var init_package = () => {};
|
|
1170
1170
|
|
|
1171
1171
|
// src/hooks/policy-types.ts
|
|
@@ -4476,6 +4476,35 @@ function readSources(raw) {
|
|
|
4476
4476
|
}
|
|
4477
4477
|
return Object.keys(out).length > 0 ? out : undefined;
|
|
4478
4478
|
}
|
|
4479
|
+
function readAgentSessions(raw) {
|
|
4480
|
+
if (!raw || typeof raw !== "object" || Array.isArray(raw))
|
|
4481
|
+
return;
|
|
4482
|
+
const agents = Object.fromEntries(Object.entries(raw).flatMap(([agent, settings]) => {
|
|
4483
|
+
if (!settings || typeof settings !== "object" || Array.isArray(settings))
|
|
4484
|
+
return [];
|
|
4485
|
+
const sessions = settings.sessions;
|
|
4486
|
+
return typeof sessions === "boolean" ? [[agent, { sessions }]] : [];
|
|
4487
|
+
}));
|
|
4488
|
+
return Object.keys(agents).length ? agents : undefined;
|
|
4489
|
+
}
|
|
4490
|
+
function readOtlpSettings(raw) {
|
|
4491
|
+
if (!raw || typeof raw !== "object" || Array.isArray(raw))
|
|
4492
|
+
return;
|
|
4493
|
+
const settings = raw;
|
|
4494
|
+
return {
|
|
4495
|
+
enabled: settings.enabled === true,
|
|
4496
|
+
...typeof settings.port === "number" && Number.isInteger(settings.port) ? { port: settings.port } : {}
|
|
4497
|
+
};
|
|
4498
|
+
}
|
|
4499
|
+
function readAgents(raw) {
|
|
4500
|
+
if (!raw || typeof raw !== "object" || Array.isArray(raw))
|
|
4501
|
+
return;
|
|
4502
|
+
const ids = (v) => Array.isArray(v) ? [...new Set(v.filter((e) => typeof e === "string" && e.trim() !== ""))] : [];
|
|
4503
|
+
const table = raw;
|
|
4504
|
+
if (!Array.isArray(table.selected))
|
|
4505
|
+
return;
|
|
4506
|
+
return { selected: ids(table.selected), seen: ids(table.seen) };
|
|
4507
|
+
}
|
|
4479
4508
|
function readConfig() {
|
|
4480
4509
|
try {
|
|
4481
4510
|
const parsed = JSON.parse(readFileSync4(configFile(), "utf8"));
|
|
@@ -4501,17 +4530,23 @@ function projectConfig(parsed) {
|
|
|
4501
4530
|
redact: collector.redact === "off" ? "off" : "minimal",
|
|
4502
4531
|
environment: typeof collector.environment === "string" ? collector.environment : "local",
|
|
4503
4532
|
machineId: typeof collector.machine_id === "string" ? collector.machine_id : undefined,
|
|
4504
|
-
sources: readSources(collector.sources)
|
|
4533
|
+
sources: readSources(collector.sources),
|
|
4534
|
+
agents: readAgentSessions(collector.agents),
|
|
4535
|
+
otlp: readOtlpSettings(collector.otlp)
|
|
4505
4536
|
},
|
|
4506
4537
|
telemetry: { enabled: telemetry.enabled !== false },
|
|
4507
4538
|
audit: {
|
|
4508
4539
|
auto: audit.auto === true,
|
|
4509
4540
|
intervalDays: readIntervalDays(audit.interval_days),
|
|
4510
4541
|
reportsConsentedAt: typeof audit.reports_consented_at === "number" && Number.isFinite(audit.reports_consented_at) ? audit.reports_consented_at : undefined
|
|
4511
|
-
}
|
|
4542
|
+
},
|
|
4543
|
+
agents: readAgents(parsed.agents)
|
|
4512
4544
|
};
|
|
4513
4545
|
}
|
|
4514
4546
|
}
|
|
4547
|
+
function isAgentTraced(id, config = readConfig()) {
|
|
4548
|
+
return !config.agents || config.agents.selected.includes(id);
|
|
4549
|
+
}
|
|
4515
4550
|
function projectCredentials(parsed) {
|
|
4516
4551
|
{
|
|
4517
4552
|
const cloud = parsed.cloud;
|
|
@@ -11375,10 +11410,46 @@ var init_pack_failclosed = __esm(() => {
|
|
|
11375
11410
|
});
|
|
11376
11411
|
|
|
11377
11412
|
// lib/atomic-write.ts
|
|
11413
|
+
import {
|
|
11414
|
+
chmodSync as chmodSync2,
|
|
11415
|
+
existsSync as existsSync16,
|
|
11416
|
+
mkdirSync as mkdirSync6,
|
|
11417
|
+
renameSync as renameSync3,
|
|
11418
|
+
rmSync as rmSync2,
|
|
11419
|
+
statSync as statSync14,
|
|
11420
|
+
writeFileSync as writeFileSync5
|
|
11421
|
+
} from "node:fs";
|
|
11422
|
+
import { dirname as dirname6 } from "node:path";
|
|
11423
|
+
import { randomBytes } from "node:crypto";
|
|
11424
|
+
function writeJsonAtomically(filePath, value, opts = {}) {
|
|
11425
|
+
const mode = opts.mode ?? 384;
|
|
11426
|
+
const dirMode = opts.dirMode ?? 448;
|
|
11427
|
+
const dir = dirname6(filePath);
|
|
11428
|
+
if (!existsSync16(dir))
|
|
11429
|
+
mkdirSync6(dir, { recursive: true, mode: dirMode });
|
|
11430
|
+
const tmp = `${filePath}.${process.pid}.${randomBytes(6).toString("hex")}.tmp`;
|
|
11431
|
+
try {
|
|
11432
|
+
writeFileSync5(tmp, JSON.stringify(value, null, 2), { mode });
|
|
11433
|
+
try {
|
|
11434
|
+
if ((statSync14(tmp).mode & 63) !== 0)
|
|
11435
|
+
chmodSync2(tmp, mode);
|
|
11436
|
+
} catch {}
|
|
11437
|
+
renameSync3(tmp, filePath);
|
|
11438
|
+
try {
|
|
11439
|
+
if ((statSync14(filePath).mode & 63) !== 0)
|
|
11440
|
+
chmodSync2(filePath, mode);
|
|
11441
|
+
} catch {}
|
|
11442
|
+
} catch (err) {
|
|
11443
|
+
try {
|
|
11444
|
+
rmSync2(tmp, { force: true });
|
|
11445
|
+
} catch {}
|
|
11446
|
+
throw err;
|
|
11447
|
+
}
|
|
11448
|
+
}
|
|
11378
11449
|
var init_atomic_write = () => {};
|
|
11379
11450
|
|
|
11380
11451
|
// src/hooks/session-pause.ts
|
|
11381
|
-
import { existsSync as
|
|
11452
|
+
import { existsSync as existsSync17, mkdirSync as mkdirSync7, readdirSync as readdirSync11, readFileSync as readFileSync13, rmSync as rmSync3 } from "node:fs";
|
|
11382
11453
|
import { createHash as createHash5 } from "node:crypto";
|
|
11383
11454
|
import { join as join28, resolve as resolve13 } from "node:path";
|
|
11384
11455
|
function pauseStateDir() {
|
|
@@ -11418,7 +11489,7 @@ function readActivePause(sessionId, now = Date.now()) {
|
|
|
11418
11489
|
return null;
|
|
11419
11490
|
try {
|
|
11420
11491
|
const path = pauseFilePath(sessionId);
|
|
11421
|
-
if (!
|
|
11492
|
+
if (!existsSync17(path))
|
|
11422
11493
|
return null;
|
|
11423
11494
|
const stored = parseStored(JSON.parse(readFileSync13(path, "utf8")));
|
|
11424
11495
|
if (!stored)
|
|
@@ -11459,15 +11530,15 @@ var init_daemon_service = __esm(() => {
|
|
|
11459
11530
|
// src/hooks/fp-reset.ts
|
|
11460
11531
|
import {
|
|
11461
11532
|
copyFileSync,
|
|
11462
|
-
existsSync as
|
|
11463
|
-
mkdirSync as
|
|
11533
|
+
existsSync as existsSync18,
|
|
11534
|
+
mkdirSync as mkdirSync8,
|
|
11464
11535
|
readFileSync as readFileSync14,
|
|
11465
11536
|
readdirSync as readdirSync12,
|
|
11466
|
-
renameSync as
|
|
11467
|
-
rmSync as
|
|
11537
|
+
renameSync as renameSync4,
|
|
11538
|
+
rmSync as rmSync4,
|
|
11468
11539
|
rmdirSync,
|
|
11469
|
-
statSync as
|
|
11470
|
-
writeFileSync as
|
|
11540
|
+
statSync as statSync15,
|
|
11541
|
+
writeFileSync as writeFileSync6
|
|
11471
11542
|
} from "node:fs";
|
|
11472
11543
|
function layoutWarningForHook() {
|
|
11473
11544
|
const state = detectLayout();
|
|
@@ -11476,7 +11547,7 @@ function layoutWarningForHook() {
|
|
|
11476
11547
|
if (state.kind === "future") {
|
|
11477
11548
|
return `[failproofai] this directory was written by a newer version (layout ${state.found} vs ${LAYOUT_VERSION}) — policies are NOT being enforced. ` + `Upgrade failproofai.`;
|
|
11478
11549
|
}
|
|
11479
|
-
if (
|
|
11550
|
+
if (existsSync18(globalPolicyConfigFile()))
|
|
11480
11551
|
return null;
|
|
11481
11552
|
return `[failproofai] setup predates this version — global policies are NOT being enforced. ` + `Run \`failproofai config\` to re-create it.`;
|
|
11482
11553
|
}
|
|
@@ -11487,9 +11558,44 @@ var init_fp_reset = __esm(() => {
|
|
|
11487
11558
|
init_daemon_service();
|
|
11488
11559
|
});
|
|
11489
11560
|
|
|
11561
|
+
// src/hooks/untraced-note.ts
|
|
11562
|
+
import { existsSync as existsSync19, readFileSync as readFileSync15 } from "node:fs";
|
|
11563
|
+
import { join as join29 } from "node:path";
|
|
11564
|
+
function untracedNotePath(home) {
|
|
11565
|
+
return join29(stateDir(home), "untraced-notes.json");
|
|
11566
|
+
}
|
|
11567
|
+
function noteUntracedAgent(cli, sessionId, config) {
|
|
11568
|
+
try {
|
|
11569
|
+
if (isAgentTraced(cli, config ?? readConfig()))
|
|
11570
|
+
return false;
|
|
11571
|
+
const key = `${cli}:${sessionId ?? "no-session"}`;
|
|
11572
|
+
const path = untracedNotePath();
|
|
11573
|
+
let seen = [];
|
|
11574
|
+
if (existsSync19(path)) {
|
|
11575
|
+
const parsed = JSON.parse(readFileSync15(path, "utf8"));
|
|
11576
|
+
if (Array.isArray(parsed))
|
|
11577
|
+
seen = parsed.filter((k) => typeof k === "string");
|
|
11578
|
+
}
|
|
11579
|
+
if (seen.includes(key))
|
|
11580
|
+
return false;
|
|
11581
|
+
writeJsonAtomically(path, [...seen, key].slice(-UNTRACED_NOTE_KEEP));
|
|
11582
|
+
hookLogInfo(`${cli} is not one of the agents failproofai config traces, but a hook for it fired` + `${sessionId ? ` (session ${sessionId})` : ""}. Its calls are evaluated as usual: a hook somebody installed keeps enforcing.`);
|
|
11583
|
+
return true;
|
|
11584
|
+
} catch {
|
|
11585
|
+
return false;
|
|
11586
|
+
}
|
|
11587
|
+
}
|
|
11588
|
+
var UNTRACED_NOTE_KEEP = 200;
|
|
11589
|
+
var init_untraced_note = __esm(() => {
|
|
11590
|
+
init_atomic_write();
|
|
11591
|
+
init_fp_config();
|
|
11592
|
+
init_fp_home();
|
|
11593
|
+
init_hook_logger();
|
|
11594
|
+
});
|
|
11595
|
+
|
|
11490
11596
|
// src/hooks/semantic/jev-config.ts
|
|
11491
|
-
import { closeSync as closeSync2, constants as fsConstants2, fstatSync as fstatSync2, openSync as openSync2, readSync as readSync2, statSync as
|
|
11492
|
-
import { dirname as
|
|
11597
|
+
import { closeSync as closeSync2, constants as fsConstants2, fstatSync as fstatSync2, openSync as openSync2, readSync as readSync2, statSync as statSync16 } from "node:fs";
|
|
11598
|
+
import { dirname as dirname7 } from "node:path";
|
|
11493
11599
|
function parseJevMode(raw) {
|
|
11494
11600
|
return raw === "off" || raw === "observe" || raw === "enforce" ? raw : null;
|
|
11495
11601
|
}
|
|
@@ -11720,7 +11826,7 @@ function looseConfigDirMode(path) {
|
|
|
11720
11826
|
if (!modesAreMeaningful())
|
|
11721
11827
|
return null;
|
|
11722
11828
|
try {
|
|
11723
|
-
const mode =
|
|
11829
|
+
const mode = statSync16(dirname7(path)).mode & 511;
|
|
11724
11830
|
return (mode & DIR_WRITABLE_BY_OTHERS2) !== 0 ? mode : null;
|
|
11725
11831
|
} catch {
|
|
11726
11832
|
return null;
|
|
@@ -11781,8 +11887,8 @@ function inspectJevConfig() {
|
|
|
11781
11887
|
path,
|
|
11782
11888
|
mode,
|
|
11783
11889
|
reason: "too-open",
|
|
11784
|
-
problem: `its directory ${
|
|
11785
|
-
fix: `chmod 700 ${
|
|
11890
|
+
problem: `its directory ${dirname7(path)} is ${dirMode.toString(8).padStart(4, "0")} — other users can write there, ` + `so they can put their own config in its place; it must be owner-only (chmod 700 ${dirname7(path)})`,
|
|
11891
|
+
fix: `chmod 700 ${dirname7(path)}`
|
|
11786
11892
|
};
|
|
11787
11893
|
}
|
|
11788
11894
|
if (st.size > MAX_CONFIG_BYTES)
|
|
@@ -11904,9 +12010,9 @@ var init_jev_config = __esm(() => {
|
|
|
11904
12010
|
});
|
|
11905
12011
|
|
|
11906
12012
|
// src/hooks/semantic/facts.ts
|
|
11907
|
-
import { existsSync as
|
|
12013
|
+
import { existsSync as existsSync20, readFileSync as readFileSync16, statSync as statSync17 } from "node:fs";
|
|
11908
12014
|
import { homedir as homedir20 } from "node:os";
|
|
11909
|
-
import { dirname as
|
|
12015
|
+
import { dirname as dirname8, isAbsolute as isAbsolute3, resolve as resolve14 } from "node:path";
|
|
11910
12016
|
function classifyTool(toolName) {
|
|
11911
12017
|
if (SHELL_TOOLS.has(toolName))
|
|
11912
12018
|
return { toolClass: "shell", toolIsKnown: true };
|
|
@@ -12131,9 +12237,9 @@ function findGitDir(start) {
|
|
|
12131
12237
|
let dir = start;
|
|
12132
12238
|
for (let i = 0;i < 40; i++) {
|
|
12133
12239
|
const candidate = resolve14(dir, ".git");
|
|
12134
|
-
if (
|
|
12240
|
+
if (existsSync20(candidate))
|
|
12135
12241
|
return candidate;
|
|
12136
|
-
const parent =
|
|
12242
|
+
const parent = dirname8(dir);
|
|
12137
12243
|
if (parent === dir)
|
|
12138
12244
|
return null;
|
|
12139
12245
|
dir = parent;
|
|
@@ -12144,7 +12250,7 @@ function findProjectRoot(cwd) {
|
|
|
12144
12250
|
if (!cwd)
|
|
12145
12251
|
return null;
|
|
12146
12252
|
const gitDir = findGitDir(cwd);
|
|
12147
|
-
return gitDir ?
|
|
12253
|
+
return gitDir ? dirname8(gitDir) : cwd;
|
|
12148
12254
|
}
|
|
12149
12255
|
function readCurrentBranch(cwd) {
|
|
12150
12256
|
if (!cwd)
|
|
@@ -12154,14 +12260,14 @@ function readCurrentBranch(cwd) {
|
|
|
12154
12260
|
if (!gitPath)
|
|
12155
12261
|
return null;
|
|
12156
12262
|
let headFile = resolve14(gitPath, "HEAD");
|
|
12157
|
-
if (
|
|
12158
|
-
const pointer =
|
|
12263
|
+
if (statSync17(gitPath).isFile()) {
|
|
12264
|
+
const pointer = readFileSync16(gitPath, "utf8").trim();
|
|
12159
12265
|
const m = /^gitdir:\s*(.+)$/.exec(pointer);
|
|
12160
12266
|
if (!m)
|
|
12161
12267
|
return null;
|
|
12162
|
-
headFile = resolve14(
|
|
12268
|
+
headFile = resolve14(dirname8(gitPath), m[1], "HEAD");
|
|
12163
12269
|
}
|
|
12164
|
-
const head =
|
|
12270
|
+
const head = readFileSync16(headFile, "utf8").trim();
|
|
12165
12271
|
const ref = /^ref:\s*refs\/heads\/(.+)$/.exec(head);
|
|
12166
12272
|
return ref ? ref[1] : null;
|
|
12167
12273
|
} catch {
|
|
@@ -14703,19 +14809,19 @@ __export(exports_intent, {
|
|
|
14703
14809
|
readIntent: () => readIntent
|
|
14704
14810
|
});
|
|
14705
14811
|
import {
|
|
14706
|
-
chmodSync as
|
|
14812
|
+
chmodSync as chmodSync3,
|
|
14707
14813
|
closeSync as closeSync3,
|
|
14708
|
-
mkdirSync as
|
|
14814
|
+
mkdirSync as mkdirSync9,
|
|
14709
14815
|
openSync as openSync3,
|
|
14710
14816
|
readdirSync as readdirSync13,
|
|
14711
|
-
readFileSync as
|
|
14817
|
+
readFileSync as readFileSync17,
|
|
14712
14818
|
readSync as readSync3,
|
|
14713
|
-
renameSync as
|
|
14714
|
-
statSync as
|
|
14819
|
+
renameSync as renameSync5,
|
|
14820
|
+
statSync as statSync18,
|
|
14715
14821
|
unlinkSync as unlinkSync2,
|
|
14716
|
-
writeFileSync as
|
|
14822
|
+
writeFileSync as writeFileSync7
|
|
14717
14823
|
} from "node:fs";
|
|
14718
|
-
import { dirname as
|
|
14824
|
+
import { dirname as dirname9, resolve as resolve15 } from "node:path";
|
|
14719
14825
|
function modesAreMeaningful2() {
|
|
14720
14826
|
return process.platform !== "win32";
|
|
14721
14827
|
}
|
|
@@ -14727,7 +14833,7 @@ function storeDirChain() {
|
|
|
14727
14833
|
chain.push(dir);
|
|
14728
14834
|
if (dir === home)
|
|
14729
14835
|
break;
|
|
14730
|
-
const parent =
|
|
14836
|
+
const parent = dirname9(dir);
|
|
14731
14837
|
if (parent === dir)
|
|
14732
14838
|
break;
|
|
14733
14839
|
dir = parent;
|
|
@@ -14740,15 +14846,15 @@ function looseIntentStoreDir() {
|
|
|
14740
14846
|
for (const dir of storeDirChain()) {
|
|
14741
14847
|
let mode;
|
|
14742
14848
|
try {
|
|
14743
|
-
mode =
|
|
14849
|
+
mode = statSync18(dir).mode & 511;
|
|
14744
14850
|
} catch {
|
|
14745
14851
|
continue;
|
|
14746
14852
|
}
|
|
14747
14853
|
if ((mode & DIR_WRITABLE_BY_OTHERS3) === 0)
|
|
14748
14854
|
continue;
|
|
14749
14855
|
try {
|
|
14750
|
-
|
|
14751
|
-
if ((
|
|
14856
|
+
chmodSync3(dir, mode & ~DIR_WRITABLE_BY_OTHERS3);
|
|
14857
|
+
if ((statSync18(dir).mode & DIR_WRITABLE_BY_OTHERS3) !== 0)
|
|
14752
14858
|
return dir;
|
|
14753
14859
|
} catch {
|
|
14754
14860
|
return dir;
|
|
@@ -14758,7 +14864,7 @@ function looseIntentStoreDir() {
|
|
|
14758
14864
|
}
|
|
14759
14865
|
function readIntentFile(sessionId) {
|
|
14760
14866
|
try {
|
|
14761
|
-
const parsed = JSON.parse(
|
|
14867
|
+
const parsed = JSON.parse(readFileSync17(intentFile(sessionId), "utf8"));
|
|
14762
14868
|
return Array.isArray(parsed?.prompts) ? parsed : { prompts: [] };
|
|
14763
14869
|
} catch {
|
|
14764
14870
|
return { prompts: [] };
|
|
@@ -14771,12 +14877,12 @@ function appendPrompt(sessionId, entry) {
|
|
|
14771
14877
|
const kept = last && last.text === entry.text ? file.prompts.slice(0, -1) : file.prompts;
|
|
14772
14878
|
file.prompts = [...kept, entry].slice(-MAX_RECORDED_PROMPTS);
|
|
14773
14879
|
const dir = sessionsDir();
|
|
14774
|
-
|
|
14880
|
+
mkdirSync9(dir, { recursive: true, mode: 448 });
|
|
14775
14881
|
const target = intentFile(sessionId);
|
|
14776
14882
|
const isNew = !fileExists2(target);
|
|
14777
14883
|
const tmp = `${target}.${process.pid}.tmp`;
|
|
14778
|
-
|
|
14779
|
-
|
|
14884
|
+
writeFileSync7(tmp, JSON.stringify(file), { mode: 384 });
|
|
14885
|
+
renameSync5(tmp, target);
|
|
14780
14886
|
if (isNew)
|
|
14781
14887
|
pruneExpiredSessions(entry.at);
|
|
14782
14888
|
return true;
|
|
@@ -14786,7 +14892,7 @@ function appendPrompt(sessionId, entry) {
|
|
|
14786
14892
|
}
|
|
14787
14893
|
function fileExists2(path) {
|
|
14788
14894
|
try {
|
|
14789
|
-
|
|
14895
|
+
statSync18(path);
|
|
14790
14896
|
return true;
|
|
14791
14897
|
} catch {
|
|
14792
14898
|
return false;
|
|
@@ -14801,7 +14907,7 @@ function pruneExpiredSessions(now = Date.now()) {
|
|
|
14801
14907
|
continue;
|
|
14802
14908
|
const path = resolve15(dir, name);
|
|
14803
14909
|
try {
|
|
14804
|
-
const st =
|
|
14910
|
+
const st = statSync18(path);
|
|
14805
14911
|
if (st.isFile() && now - st.mtimeMs > INTENT_MAX_AGE_MS) {
|
|
14806
14912
|
unlinkSync2(path);
|
|
14807
14913
|
removed++;
|
|
@@ -15110,7 +15216,7 @@ function visitLinesBackwards(transcriptPath, maxBytes, visit) {
|
|
|
15110
15216
|
return;
|
|
15111
15217
|
let fd;
|
|
15112
15218
|
try {
|
|
15113
|
-
const st =
|
|
15219
|
+
const st = statSync18(path);
|
|
15114
15220
|
if (!st.isFile() || st.size === 0)
|
|
15115
15221
|
return;
|
|
15116
15222
|
fd = openSync3(path, "r");
|
|
@@ -15768,7 +15874,7 @@ var init_pack_policies = __esm(() => {
|
|
|
15768
15874
|
|
|
15769
15875
|
// src/hooks/semantic/evaluator.ts
|
|
15770
15876
|
import { createHash as createHash6 } from "node:crypto";
|
|
15771
|
-
import { appendFileSync as appendFileSync3, mkdirSync as
|
|
15877
|
+
import { appendFileSync as appendFileSync3, mkdirSync as mkdirSync10, renameSync as renameSync6, statSync as statSync19 } from "node:fs";
|
|
15772
15878
|
import { resolve as resolve16 } from "node:path";
|
|
15773
15879
|
function storeCut(message) {
|
|
15774
15880
|
return typeof message === "string" && message.length >= MAX_USER_MESSAGE_CHARS - STORE_CUT_SLACK && OMISSION_MARK.test(message);
|
|
@@ -15940,10 +16046,10 @@ function verdictLogRow(input, outcome, meta) {
|
|
|
15940
16046
|
function appendVerdictLog(row) {
|
|
15941
16047
|
try {
|
|
15942
16048
|
const file = verdictLogFile();
|
|
15943
|
-
|
|
16049
|
+
mkdirSync10(semanticDir(), { recursive: true, mode: 448 });
|
|
15944
16050
|
try {
|
|
15945
|
-
if (
|
|
15946
|
-
|
|
16051
|
+
if (statSync19(file).size > VERDICT_LOG_MAX_BYTES)
|
|
16052
|
+
renameSync6(file, `${file}.1`);
|
|
15947
16053
|
} catch {}
|
|
15948
16054
|
appendFileSync3(file, JSON.stringify(row) + `
|
|
15949
16055
|
`, { mode: 384 });
|
|
@@ -16173,7 +16279,7 @@ var init_jev_throttle = __esm(() => {
|
|
|
16173
16279
|
});
|
|
16174
16280
|
|
|
16175
16281
|
// src/hooks/semantic/session-root.ts
|
|
16176
|
-
import { mkdirSync as
|
|
16282
|
+
import { mkdirSync as mkdirSync11, readdirSync as readdirSync14, readFileSync as readFileSync18, statSync as statSync20, unlinkSync as unlinkSync3, writeFileSync as writeFileSync8 } from "node:fs";
|
|
16177
16283
|
import { isAbsolute as isAbsolute4, resolve as resolve17 } from "node:path";
|
|
16178
16284
|
function validRoot(v) {
|
|
16179
16285
|
return typeof v === "string" && isAbsolute4(v) && resolve17(v) === v && v !== "/";
|
|
@@ -16184,7 +16290,7 @@ function storeIsOurs() {
|
|
|
16184
16290
|
if (looseIntentStoreDir() !== null)
|
|
16185
16291
|
return false;
|
|
16186
16292
|
try {
|
|
16187
|
-
const mode =
|
|
16293
|
+
const mode = statSync20(rootsDir()).mode & 511;
|
|
16188
16294
|
return (mode & DIR_WRITABLE_BY_OTHERS4) === 0;
|
|
16189
16295
|
} catch {
|
|
16190
16296
|
return true;
|
|
@@ -16192,7 +16298,7 @@ function storeIsOurs() {
|
|
|
16192
16298
|
}
|
|
16193
16299
|
function readPinned(sessionId) {
|
|
16194
16300
|
try {
|
|
16195
|
-
const parsed = JSON.parse(
|
|
16301
|
+
const parsed = JSON.parse(readFileSync18(rootFile(sessionId), "utf8"));
|
|
16196
16302
|
return validRoot(parsed?.root) ? parsed.root : null;
|
|
16197
16303
|
} catch {
|
|
16198
16304
|
return null;
|
|
@@ -16207,7 +16313,7 @@ function pruneSessionRoots(now = Date.now()) {
|
|
|
16207
16313
|
continue;
|
|
16208
16314
|
const path = resolve17(dir, name);
|
|
16209
16315
|
try {
|
|
16210
|
-
const st =
|
|
16316
|
+
const st = statSync20(path);
|
|
16211
16317
|
if (st.isFile() && now - st.mtimeMs > SESSION_ROOT_MAX_AGE_MS) {
|
|
16212
16318
|
unlinkSync3(path);
|
|
16213
16319
|
removed++;
|
|
@@ -16231,8 +16337,8 @@ function sessionProjectRoot(sessionId, cwd, now = Date.now()) {
|
|
|
16231
16337
|
return pinned;
|
|
16232
16338
|
if (!validRoot(live))
|
|
16233
16339
|
return live;
|
|
16234
|
-
|
|
16235
|
-
|
|
16340
|
+
mkdirSync11(rootsDir(), { recursive: true, mode: 448 });
|
|
16341
|
+
writeFileSync8(rootFile(sessionId), JSON.stringify({ root: live, at: now }), { mode: 384, flag: "wx" });
|
|
16236
16342
|
pruneSessionRoots(now);
|
|
16237
16343
|
} catch {}
|
|
16238
16344
|
return live;
|
|
@@ -16557,7 +16663,7 @@ var init_enforcement_capability = __esm(() => {
|
|
|
16557
16663
|
});
|
|
16558
16664
|
|
|
16559
16665
|
// src/hooks/handler.ts
|
|
16560
|
-
import { existsSync as
|
|
16666
|
+
import { existsSync as existsSync21 } from "node:fs";
|
|
16561
16667
|
function canonicalizeEventType(raw, cli) {
|
|
16562
16668
|
if (cli === "codex") {
|
|
16563
16669
|
const mapped = CODEX_EVENT_MAP[raw];
|
|
@@ -16617,7 +16723,7 @@ function jevForcedOff(opts) {
|
|
|
16617
16723
|
}
|
|
16618
16724
|
async function readJevConfig() {
|
|
16619
16725
|
try {
|
|
16620
|
-
if (!
|
|
16726
|
+
if (!existsSync21(jevConfigFile()))
|
|
16621
16727
|
return null;
|
|
16622
16728
|
await Promise.resolve().then(() => init_jev_config());
|
|
16623
16729
|
const config = loadJevConfig();
|
|
@@ -16735,6 +16841,7 @@ async function evaluateHookEvent(eventType, cli = "claude", stdinPayload, opts)
|
|
|
16735
16841
|
parsed.tool_input = canonicalInput;
|
|
16736
16842
|
}
|
|
16737
16843
|
const sessionId = parsed.session_id;
|
|
16844
|
+
noteUntracedAgent(cli, sessionId);
|
|
16738
16845
|
const session = {
|
|
16739
16846
|
sessionId,
|
|
16740
16847
|
transcriptPath: resolveTranscriptPath(cli, parsed, sessionId),
|
|
@@ -17055,12 +17162,13 @@ var init_handler = __esm(() => {
|
|
|
17055
17162
|
init_session_pause();
|
|
17056
17163
|
init_fp_home();
|
|
17057
17164
|
init_fp_reset();
|
|
17165
|
+
init_untraced_note();
|
|
17058
17166
|
JEV_GATE_EVENTS = new Set(["PreToolUse", "PermissionRequest"]);
|
|
17059
17167
|
});
|
|
17060
17168
|
|
|
17061
17169
|
// src/hooks/worker-server.ts
|
|
17062
17170
|
import { createConnection, createServer } from "node:net";
|
|
17063
|
-
import { existsSync as
|
|
17171
|
+
import { existsSync as existsSync22, unlinkSync as unlinkSync4 } from "node:fs";
|
|
17064
17172
|
function isWorkerHookRequest(msg) {
|
|
17065
17173
|
if (!msg || typeof msg !== "object")
|
|
17066
17174
|
return false;
|
|
@@ -17226,14 +17334,14 @@ function requestExistingWorkerShutdown(socketPath) {
|
|
|
17226
17334
|
function startWorkerServer(socketPath, shutdown) {
|
|
17227
17335
|
const server = createServer((socket) => handleConnection(socket, shutdown ?? (() => server.close())));
|
|
17228
17336
|
const listen = () => {
|
|
17229
|
-
if (
|
|
17337
|
+
if (existsSync22(socketPath)) {
|
|
17230
17338
|
try {
|
|
17231
17339
|
unlinkSync4(socketPath);
|
|
17232
17340
|
} catch {}
|
|
17233
17341
|
}
|
|
17234
17342
|
server.listen(socketPath);
|
|
17235
17343
|
};
|
|
17236
|
-
if (!
|
|
17344
|
+
if (!existsSync22(socketPath))
|
|
17237
17345
|
listen();
|
|
17238
17346
|
else
|
|
17239
17347
|
requestExistingWorkerShutdown(socketPath).then(listen, (err) => server.emit("error", err));
|
|
@@ -17249,13 +17357,13 @@ var init_worker_server = __esm(() => {
|
|
|
17249
17357
|
|
|
17250
17358
|
// bin/failproofai-worker.mjs
|
|
17251
17359
|
import { realpathSync as realpathSync2 } from "node:fs";
|
|
17252
|
-
import { dirname as
|
|
17360
|
+
import { dirname as dirname10, resolve as resolve18 } from "node:path";
|
|
17253
17361
|
import { fileURLToPath } from "node:url";
|
|
17254
17362
|
if (!process.env.FAILPROOFAI_PACKAGE_ROOT) {
|
|
17255
|
-
process.env.FAILPROOFAI_PACKAGE_ROOT = resolve18(
|
|
17363
|
+
process.env.FAILPROOFAI_PACKAGE_ROOT = resolve18(dirname10(realpathSync2(fileURLToPath(import.meta.url))), "..");
|
|
17256
17364
|
}
|
|
17257
17365
|
if (!process.env.FAILPROOFAI_DIST_PATH) {
|
|
17258
|
-
process.env.FAILPROOFAI_DIST_PATH = resolve18(
|
|
17366
|
+
process.env.FAILPROOFAI_DIST_PATH = resolve18(dirname10(realpathSync2(fileURLToPath(import.meta.url))), "..", "dist");
|
|
17259
17367
|
}
|
|
17260
17368
|
var socketPath = process.env.FAILPROOFAI_WORKER_SOCKET;
|
|
17261
17369
|
if (!socketPath) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "failproofai",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.11-beta.1",
|
|
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",
|
|
@@ -97,7 +97,7 @@
|
|
|
97
97
|
"eslint-config-next": "^16.3.2",
|
|
98
98
|
"jsdom": "^30.0.1",
|
|
99
99
|
"lucide-react": "^1.33.0",
|
|
100
|
-
"next": "^16.3.
|
|
100
|
+
"next": "^16.3.8",
|
|
101
101
|
"react": "^19.2.4",
|
|
102
102
|
"react-dom": "^19.2.4",
|
|
103
103
|
"tailwind-merge": "^3.4.0",
|
|
@@ -107,7 +107,9 @@
|
|
|
107
107
|
},
|
|
108
108
|
"dependencies": {
|
|
109
109
|
"html-to-image": "^1.11.13",
|
|
110
|
+
"jsonc-parser": "^3.3.1",
|
|
110
111
|
"posthog-node": "^5.50.0",
|
|
112
|
+
"smol-toml": "^1.9.1",
|
|
111
113
|
"sql.js": "^1.14.1",
|
|
112
114
|
"yaml": "^2.9.0"
|
|
113
115
|
},
|
|
@@ -118,19 +120,20 @@
|
|
|
118
120
|
"vite": "8.0.16",
|
|
119
121
|
"undici": "7.29.1",
|
|
120
122
|
"brace-expansion": "5.0.12",
|
|
121
|
-
"sharp": "0.35.
|
|
123
|
+
"sharp": "0.35.5",
|
|
124
|
+
"source-map-js": "1.2.2",
|
|
122
125
|
"browserslist": "4.28.8"
|
|
123
126
|
},
|
|
124
127
|
"optionalDependencies": {
|
|
125
|
-
"@failproofai/failproofaid-linux-x64": "1.0.
|
|
126
|
-
"@failproofai/failproofaid-linux-arm64": "1.0.
|
|
127
|
-
"@failproofai/failproofaid-darwin-x64": "1.0.
|
|
128
|
-
"@failproofai/failproofaid-darwin-arm64": "1.0.
|
|
128
|
+
"@failproofai/failproofaid-linux-x64": "1.0.11-beta.1",
|
|
129
|
+
"@failproofai/failproofaid-linux-arm64": "1.0.11-beta.1",
|
|
130
|
+
"@failproofai/failproofaid-darwin-x64": "1.0.11-beta.1",
|
|
131
|
+
"@failproofai/failproofaid-darwin-arm64": "1.0.11-beta.1"
|
|
129
132
|
},
|
|
130
133
|
"failproofaidBinaries": {
|
|
131
|
-
"linux-x64": "
|
|
132
|
-
"linux-arm64": "
|
|
133
|
-
"darwin-x64": "
|
|
134
|
-
"darwin-arm64": "
|
|
134
|
+
"linux-x64": "8c405390edd1903df01cc9746403bd5a5dcdc985511b761a8c7e8333bfb6b925",
|
|
135
|
+
"linux-arm64": "d9fdd3a71accbe821d57d97493c852d21b2e04a6f112c1c78b38b4cddf86b5b1",
|
|
136
|
+
"darwin-x64": "b656e31d55755b39c7fb830724fc4c47d20909ee1a582cbf1b0cf747e255b223",
|
|
137
|
+
"darwin-arm64": "71fc96dfd0d09b9021d99b6da7060b211b36723b4317d4c05459ac5bf481342b"
|
|
135
138
|
}
|
|
136
139
|
}
|