failproofai 0.0.10 → 0.0.11-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.next/standalone/.next/BUILD_ID +1 -1
- package/.next/standalone/.next/build-manifest.json +7 -7
- package/.next/standalone/.next/prerender-manifest.json +3 -3
- package/.next/standalone/.next/required-server-files.json +1 -1
- package/.next/standalone/.next/server/app/_global-error/page/build-manifest.json +4 -4
- 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 +2 -2
- package/.next/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +7 -7
- package/.next/standalone/.next/server/app/_global-error.segments/_head.segment.rsc +3 -3
- package/.next/standalone/.next/server/app/_global-error.segments/_index.segment.rsc +3 -3
- package/.next/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_not-found/page/build-manifest.json +4 -4
- package/.next/standalone/.next/server/app/_not-found/page/next-font-manifest.json +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/_head.segment.rsc +4 -4
- package/.next/standalone/.next/server/app/_not-found.segments/_index.segment.rsc +10 -10
- package/.next/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/_not-found.segments/_not-found.segment.rsc +3 -3
- package/.next/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
- 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/index.html +1 -1
- package/.next/standalone/.next/server/app/index.rsc +16 -16
- package/.next/standalone/.next/server/app/index.segments/__PAGE__.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/index.segments/_full.segment.rsc +16 -16
- package/.next/standalone/.next/server/app/index.segments/_head.segment.rsc +4 -4
- package/.next/standalone/.next/server/app/index.segments/_index.segment.rsc +10 -10
- package/.next/standalone/.next/server/app/index.segments/_tree.segment.rsc +3 -3
- package/.next/standalone/.next/server/app/page/build-manifest.json +4 -4
- package/.next/standalone/.next/server/app/page/next-font-manifest.json +1 -1
- 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 +4 -4
- package/.next/standalone/.next/server/app/policies/page/next-font-manifest.json +1 -1
- package/.next/standalone/.next/server/app/policies/page/server-reference-manifest.json +8 -8
- package/.next/standalone/.next/server/app/policies/page.js +4 -4
- 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 +4 -4
- package/.next/standalone/.next/server/app/project/[name]/page/next-font-manifest.json +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 +4 -4
- 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 +4 -4
- package/.next/standalone/.next/server/app/project/[name]/session/[sessionId]/page/next-font-manifest.json +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 +4 -4
- 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 +4 -4
- package/.next/standalone/.next/server/app/projects/page/next-font-manifest.json +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 +4 -4
- package/.next/standalone/.next/server/app/projects/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/projects/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0d_ob4n._.js +1 -1
- package/.next/standalone/.next/server/chunks/{[root-of-the-server]__044xt9.._.js → [root-of-the-server]__0fwb7ao._.js} +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0g48iv.._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0j8-xkl._.js +1 -1
- package/.next/standalone/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_0bdfoky.js +1 -1
- package/.next/standalone/.next/server/chunks/node_modules_posthog-node_dist_entrypoints_index_node_mjs_05pz9._._.js +1 -1
- package/.next/standalone/.next/server/chunks/package_json_[json]_cjs_0z7w.hh._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0-wn51s._.js +4 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__01as125._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__098zro9._.js +19 -0
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__02r.cjq._.js → [root-of-the-server]__09v.ljl._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0agrcb8._.js +4 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0b7hkr~._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0ehh6vp._.js +4 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0g8l0tu._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0j4l6hl._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0ye1w50._.js → [root-of-the-server]__0k5n2kz._.js} +3 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0lp08ll._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0n0yaqw._.js +4 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0o21f.o._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0t8juvy._.js +4 -0
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__10xgshr._.js → [root-of-the-server]__0tcyn68._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0ts150~._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0podumr._.js → [root-of-the-server]__0uylufv._.js} +3 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0ymlddl._.js +5 -5
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0~03grs._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/app_0cdqd9w._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/app_global-error_tsx_0xerkr6._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/app_policies_hooks-client_tsx_0q-m0y-._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/lib_utils_ts_068jk73._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/node_modules_0ttbz1~._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/node_modules_next_dist_06u0kr8._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/node_modules_next_dist_0h9llsw._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0a_7sdg.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0ef3uwk.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0j79~gv.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0pbja1x.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0r6o0i2.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_11y81~_.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_12or2kf.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/node_modules_posthog-node_dist_entrypoints_index_node_mjs_0mebn66._.js +1 -1
- package/.next/standalone/.next/server/functions-config-manifest.json +2 -2
- package/.next/standalone/.next/server/middleware-build-manifest.js +7 -7
- package/.next/standalone/.next/server/next-font-manifest.js +1 -1
- package/.next/standalone/.next/server/next-font-manifest.json +6 -6
- 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 +9 -9
- package/.next/standalone/.next/static/chunks/07kpqoo7kuckx.js +6 -0
- package/.next/standalone/.next/static/chunks/0a40sy4tk8ioe.js +1 -0
- package/.next/standalone/.next/static/chunks/{12l2t63hkyo2q.js → 0azb~vy9ds_uy.js} +1 -1
- package/.next/standalone/.next/static/chunks/{0j171xiqge4rv.js → 0bke.~atnsbeb.js} +1 -1
- package/.next/standalone/.next/static/chunks/{0lt8ko3lw.5yt.js → 0bv1oyxspkpkb.js} +1 -1
- package/.next/standalone/.next/static/chunks/{179yytvmam0ug.js → 0dvhi-prcsh3~.js} +1 -1
- package/.next/standalone/.next/static/chunks/0f5p9plm.aqlp.css +2 -0
- package/.next/standalone/.next/static/chunks/0ffvlbgzgnlw7.js +2 -0
- package/.next/standalone/.next/static/chunks/{150i0n26fnvso.js → 0n1n67imq.udf.js} +1 -1
- package/.next/standalone/.next/static/chunks/0spktq7xqab9h.js +1 -0
- package/.next/standalone/.next/static/chunks/{14lii11wmo450.js → 118q3uljozd5z.js} +1 -1
- package/.next/standalone/.next/static/chunks/{0pkl..xgo-qox.js → 11w14gnqzprir.js} +1 -1
- package/.next/standalone/.next/static/chunks/{0rnqmir4cd5p9.js → 17mubwtqwijpu.js} +1 -1
- package/.next/standalone/.next/static/chunks/{turbopack-05z7a19q43zfq.js → turbopack-0nh.aopesgj~5.js} +1 -1
- package/.next/standalone/.next/static/media/4fa387ec64143e14-s.0.qu-9752pffj.woff2 +0 -0
- package/.next/standalone/.next/static/media/5ce348bf30bf5439-s.0ee55_hj9qcer.woff2 +0 -0
- package/.next/standalone/.next/static/media/6306c77e7c8268e4-s.0mao5jbfbduzp.woff2 +0 -0
- package/.next/standalone/.next/static/media/797e433ab948586e-s.p.09zddjkbdep5a.woff2 +0 -0
- package/.next/standalone/.next/static/media/7d817b4c03b0c5f1-s.0uzt.a6d44yda.woff2 +0 -0
- package/.next/standalone/.next/static/media/bbc41e54d2fcbd21-s.0mvwgmnhv29no.woff2 +0 -0
- package/.next/standalone/.next/static/{dAuQps6jUwCz9X1Q5FFOO → tGVQM5SE3NvbVu0gbAJm7}/_clientMiddlewareManifest.js +2 -2
- package/.next/standalone/app/policies/hooks-client.tsx +111 -14
- package/.next/standalone/components/navbar.tsx +1 -1
- package/.next/standalone/components/reach-developers.tsx +2 -2
- package/.next/standalone/lib/claude-sessions.ts +181 -0
- package/.next/standalone/node_modules/@next/env/package.json +1 -1
- package/.next/standalone/node_modules/next/dist/build/static-paths/app.js +2 -1
- package/.next/standalone/node_modules/next/dist/build/swc/index.js +1 -1
- package/.next/standalone/node_modules/next/dist/build/utils.js +2 -1
- package/.next/standalone/node_modules/next/dist/client/components/router-reducer/fetch-server-response.js +2 -2
- package/.next/standalone/node_modules/next/dist/client/components/router-reducer/set-cache-busting-search-param.js +8 -2
- package/.next/standalone/node_modules/next/dist/client/route-params.js +23 -6
- package/.next/standalone/node_modules/next/dist/compiled/next-server/app-page-turbo-experimental.runtime.prod.js +13 -13
- package/.next/standalone/node_modules/next/dist/compiled/next-server/app-page-turbo.runtime.prod.js +11 -11
- package/.next/standalone/node_modules/next/dist/compiled/next-server/app-route-turbo.runtime.prod.js +2 -2
- package/.next/standalone/node_modules/next/dist/compiled/next-server/pages-turbo.runtime.prod.js +10 -10
- package/.next/standalone/node_modules/next/dist/lib/patch-incorrect-lockfile.js +3 -3
- package/.next/standalone/node_modules/next/dist/server/app-render/action-handler.js +3 -6
- package/.next/standalone/node_modules/next/dist/server/app-render/app-render.js +62 -9
- package/.next/standalone/node_modules/next/dist/server/app-render/collect-segment-data.js +16 -0
- package/.next/standalone/node_modules/next/dist/server/app-render/create-component-tree.js +49 -19
- package/.next/standalone/node_modules/next/dist/server/app-render/get-script-nonce-from-header.js +8 -20
- package/.next/standalone/node_modules/next/dist/server/app-render/metadata-insertion/create-server-inserted-metadata.js +8 -7
- package/.next/standalone/node_modules/next/dist/server/app-render/use-flight-response.js +2 -2
- package/.next/standalone/node_modules/next/dist/server/async-storage/work-store.js +2 -1
- package/.next/standalone/node_modules/next/dist/server/base-server.js +13 -5
- 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/dev/static-paths-worker.js +2 -1
- package/.next/standalone/node_modules/next/dist/server/image-optimizer.js +22 -2
- package/.next/standalone/node_modules/next/dist/server/lib/app-info-log.js +1 -1
- package/.next/standalone/node_modules/next/dist/server/lib/is-rsc-request.js +18 -0
- package/.next/standalone/node_modules/next/dist/server/lib/mock-request.js +30 -5
- package/.next/standalone/node_modules/next/dist/server/lib/patch-set-header.js +7 -0
- package/.next/standalone/node_modules/next/dist/server/lib/router-server.js +6 -3
- package/.next/standalone/node_modules/next/dist/server/lib/router-utils/resolve-routes.js +18 -4
- package/.next/standalone/node_modules/next/dist/server/lib/server-ipc/utils.js +3 -1
- package/.next/standalone/node_modules/next/dist/server/lib/start-server.js +1 -1
- package/.next/standalone/node_modules/next/dist/server/next-server.js +1 -1
- package/.next/standalone/node_modules/next/dist/server/request/fallback-params.js +27 -1
- package/.next/standalone/node_modules/next/dist/server/route-modules/app-route/module.js +1 -0
- package/.next/standalone/node_modules/next/dist/server/route-modules/route-module.js +11 -1
- package/.next/standalone/node_modules/next/dist/server/server-utils.js +19 -2
- package/.next/standalone/node_modules/next/dist/server/stream-utils/node-web-streams-helper.js +5 -5
- package/.next/standalone/node_modules/next/dist/server/use-cache/use-cache-wrapper.js +1 -1
- package/.next/standalone/node_modules/next/dist/server/web/adapter.js +4 -1
- package/.next/standalone/node_modules/next/dist/server/web/edge-route-module-wrapper.js +2 -1
- package/.next/standalone/node_modules/next/dist/shared/lib/errors/canary-only-config-error.js +1 -1
- package/.next/standalone/node_modules/next/dist/{server → shared/lib}/htmlescape.js +15 -0
- package/.next/standalone/node_modules/next/dist/shared/lib/router/routes/app.js +13 -1
- package/.next/standalone/node_modules/next/dist/shared/lib/router/utils/cache-busting-search-param.js +56 -10
- package/.next/standalone/node_modules/next/dist/telemetry/anonymous-meta.js +1 -1
- package/.next/standalone/node_modules/next/dist/telemetry/events/swc-load-failure.js +1 -1
- package/.next/standalone/node_modules/next/dist/telemetry/events/version.js +2 -2
- package/.next/standalone/node_modules/next/package.json +15 -15
- package/.next/standalone/node_modules/react/cjs/react.development.js +1 -1
- package/.next/standalone/node_modules/react/cjs/react.production.js +1 -1
- package/.next/standalone/node_modules/react/package.json +1 -1
- package/.next/standalone/node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.js +1 -1
- package/.next/standalone/node_modules/react-dom/cjs/react-dom-server-legacy.node.production.js +1 -1
- package/.next/standalone/node_modules/react-dom/cjs/react-dom-server.browser.production.js +3 -3
- package/.next/standalone/node_modules/react-dom/cjs/react-dom-server.edge.production.js +3 -3
- package/.next/standalone/node_modules/react-dom/cjs/react-dom-server.node.production.js +3 -3
- package/.next/standalone/node_modules/react-dom/cjs/react-dom.production.js +1 -1
- package/.next/standalone/node_modules/react-dom/package.json +2 -2
- package/.next/standalone/package.json +5 -5
- package/.next/standalone/proxy.ts +1 -1
- package/.next/standalone/server.js +1 -1
- package/README.md +4 -4
- package/bin/failproofai.mjs +230 -73
- package/dist/cli.mjs +3028 -1453
- package/lib/claude-sessions.ts +181 -0
- package/package.json +5 -5
- package/scripts/launch.ts +1 -1
- package/scripts/postinstall.mjs +89 -1
- package/src/audit/cache.ts +113 -0
- package/src/audit/cli-adapters/claude.ts +97 -0
- package/src/audit/cli-adapters/codex.ts +56 -0
- package/src/audit/cli-adapters/copilot.ts +51 -0
- package/src/audit/cli-adapters/cursor.ts +51 -0
- package/src/audit/cli-adapters/gemini.ts +51 -0
- package/src/audit/cli-adapters/index.ts +70 -0
- package/src/audit/cli-adapters/opencode.ts +52 -0
- package/src/audit/cli-adapters/pi.ts +51 -0
- package/src/audit/cli-adapters/shared.ts +85 -0
- package/src/audit/detectors/find-from-root.ts +27 -0
- package/src/audit/detectors/git-commit-no-verify.ts +22 -0
- package/src/audit/detectors/index.ts +33 -0
- package/src/audit/detectors/prefer-edit-over-read-cat.ts +31 -0
- package/src/audit/detectors/prefer-edit-over-sed-awk.ts +27 -0
- package/src/audit/detectors/prefer-write-over-heredoc.ts +36 -0
- package/src/audit/detectors/redundant-cd-cwd.ts +28 -0
- package/src/audit/detectors/reread-after-edit.ts +58 -0
- package/src/audit/detectors/sleep-polling-loop.ts +34 -0
- package/src/audit/index.ts +369 -0
- package/src/audit/replay.ts +121 -0
- package/src/audit/report.ts +349 -0
- package/src/audit/telemetry.ts +113 -0
- package/src/audit/types.ts +193 -0
- package/src/hooks/builtin-policies.ts +79 -1
- package/src/hooks/custom-hooks-loader.ts +19 -3
- package/src/hooks/first-run-nudge.ts +146 -0
- package/src/hooks/handler.ts +21 -102
- package/src/hooks/install-prompt.ts +34 -4
- package/src/hooks/manager.ts +72 -5
- package/src/hooks/policy-evaluator.ts +19 -4
- package/src/hooks/policy-registry.ts +1 -1
- package/src/hooks/policy-types.ts +9 -0
- package/src/hooks/tool-name-canonicalize.ts +65 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0609ezh._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__07_-mkc._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__09z7o2x._.js +0 -19
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0_sh2n0._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0e9o9ri._.js +0 -4
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0l6swv1._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0logebz._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0mi5ejy._.js +0 -4
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0odijkc._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0rkxer-._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0rl2kwi._.js +0 -4
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0vg0uey._.js +0 -4
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0x5limi._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__10._f0s._.js +0 -4
- package/.next/standalone/.next/static/chunks/01q52wg_amm60.js +0 -2
- package/.next/standalone/.next/static/chunks/0kqar56yl~41o.js +0 -6
- package/.next/standalone/.next/static/chunks/0ml1.ck_5t36i.js +0 -1
- package/.next/standalone/.next/static/chunks/0zig0fh30t6ou.js +0 -1
- package/.next/standalone/.next/static/chunks/17rm86uz2nd5a.css +0 -2
- package/.next/standalone/.next/static/media/4fa387ec64143e14-s.0q3udbd2bu5yp.woff2 +0 -0
- package/.next/standalone/.next/static/media/797e433ab948586e-s.p.0.q-h669a_dqa.woff2 +0 -0
- package/.next/standalone/.next/static/media/bbc41e54d2fcbd21-s.0gw~uztddq1df.woff2 +0 -0
- package/src/auth/login.ts +0 -104
- package/src/auth/logout.ts +0 -50
- package/src/auth/token-store.ts +0 -64
- package/src/relay/daemon.ts +0 -362
- package/src/relay/pid.ts +0 -76
- package/src/relay/queue.ts +0 -225
- /package/.next/standalone/.next/static/{dAuQps6jUwCz9X1Q5FFOO → tGVQM5SE3NvbVu0gbAJm7}/_buildManifest.js +0 -0
- /package/.next/standalone/.next/static/{dAuQps6jUwCz9X1Q5FFOO → tGVQM5SE3NvbVu0gbAJm7}/_ssgManifest.js +0 -0
package/bin/failproofai.mjs
CHANGED
|
@@ -37,6 +37,23 @@ const args = process.argv.slice(2);
|
|
|
37
37
|
// Normalize 'p' → 'policies' (shorthand alias)
|
|
38
38
|
if (args[0] === "p") args[0] = "policies";
|
|
39
39
|
|
|
40
|
+
// Lightweight telemetry helper for CLI lifecycle events. Lazy-loads to avoid
|
|
41
|
+
// pulling in the hook-telemetry / telemetry-id modules on the fast --hook path.
|
|
42
|
+
let _telemetry;
|
|
43
|
+
let lastSubcommand = null;
|
|
44
|
+
async function track(name, props) {
|
|
45
|
+
try {
|
|
46
|
+
if (!_telemetry) {
|
|
47
|
+
const [t, i] = await Promise.all([
|
|
48
|
+
import("../src/hooks/hook-telemetry"),
|
|
49
|
+
import("../lib/telemetry-id"),
|
|
50
|
+
]);
|
|
51
|
+
_telemetry = { trackHookEvent: t.trackHookEvent, getInstanceId: i.getInstanceId };
|
|
52
|
+
}
|
|
53
|
+
await _telemetry.trackHookEvent(_telemetry.getInstanceId(), name, props);
|
|
54
|
+
} catch {}
|
|
55
|
+
}
|
|
56
|
+
|
|
40
57
|
// --hook <event> [--cli <name>] — called by an agent CLI hook; fast path, outside
|
|
41
58
|
// runCli() because it has its own exit code contract with the calling agent.
|
|
42
59
|
const hookIdx = args.indexOf("--hook");
|
|
@@ -69,25 +86,16 @@ if (hookIdx >= 0) {
|
|
|
69
86
|
process.exit(exitCode);
|
|
70
87
|
} catch (err) {
|
|
71
88
|
const msg = err instanceof Error ? err.message : String(err);
|
|
89
|
+
await track("hook_dispatch_error", {
|
|
90
|
+
event_type: eventType,
|
|
91
|
+
cli,
|
|
92
|
+
error_type: err instanceof Error ? err.name : "unknown",
|
|
93
|
+
});
|
|
72
94
|
console.error(`Unexpected error: ${msg}`);
|
|
73
95
|
process.exit(2);
|
|
74
96
|
}
|
|
75
97
|
}
|
|
76
98
|
|
|
77
|
-
// --relay-daemon — internal: long-running background process started by
|
|
78
|
-
// ensureRelayRunning(). Streams queued events to the server via WebSocket.
|
|
79
|
-
if (args.includes("--relay-daemon")) {
|
|
80
|
-
try {
|
|
81
|
-
const { runDaemon } = await import("../src/relay/daemon");
|
|
82
|
-
await runDaemon();
|
|
83
|
-
process.exit(0);
|
|
84
|
-
} catch (err) {
|
|
85
|
-
const msg = err instanceof Error ? err.message : String(err);
|
|
86
|
-
console.error(`Relay daemon error: ${msg}`);
|
|
87
|
-
process.exit(1);
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
|
|
91
99
|
/**
|
|
92
100
|
* Centralised error handler for all CLI subcommands.
|
|
93
101
|
* CliError → clean message, no stack trace, exit exitCode (1 or 2)
|
|
@@ -95,7 +103,7 @@ if (args.includes("--relay-daemon")) {
|
|
|
95
103
|
*/
|
|
96
104
|
async function runCli() {
|
|
97
105
|
// --help / -h (only when not inside a subcommand that handles its own --help)
|
|
98
|
-
const SUBCOMMANDS = ["policies", "
|
|
106
|
+
const SUBCOMMANDS = ["policies", "audit"];
|
|
99
107
|
if ((args.includes("--help") || args.includes("-h")) && !SUBCOMMANDS.includes(args[0])) {
|
|
100
108
|
const extraArgs = args.filter((a) => a !== "--help" && a !== "-h");
|
|
101
109
|
if (extraArgs.length > 0) {
|
|
@@ -132,11 +140,24 @@ COMMANDS
|
|
|
132
140
|
|
|
133
141
|
policies --help, -h Show this help for the policies command
|
|
134
142
|
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
143
|
+
audit (beta) Scan past agent CLI transcripts and count
|
|
144
|
+
"stupid behaviors" (env-var checks, force
|
|
145
|
+
pushes, redundant cd <cwd>, sleep loops,
|
|
146
|
+
etc.) per policy / audit detector.
|
|
147
|
+
Going live shortly — flags + output may
|
|
148
|
+
still change between beta releases.
|
|
149
|
+
--cli claude|codex|copilot|cursor|opencode|pi|gemini
|
|
150
|
+
Restrict to one or more CLIs (default: all).
|
|
151
|
+
--project <path> Restrict to one cwd (repeatable).
|
|
152
|
+
--since 7d|2026-04-01 Only sessions whose mtime is within window.
|
|
153
|
+
--policy <name> Restrict to one policy/detector (repeatable).
|
|
154
|
+
--limit N Top-N rows in the table (default 20).
|
|
155
|
+
--show-examples Include one example per row.
|
|
156
|
+
--report <path> Markdown report path (default ./failproofai-audit.md).
|
|
157
|
+
--no-report Skip writing the markdown file.
|
|
158
|
+
--json Print JSON to stdout instead of the table.
|
|
159
|
+
--no-cache Bypass the per-transcript cache.
|
|
160
|
+
audit --help, -h Show this help for the audit command
|
|
140
161
|
|
|
141
162
|
--version, -v Print version and exit
|
|
142
163
|
--help, -h Show this help message
|
|
@@ -169,7 +190,7 @@ EXAMPLES
|
|
|
169
190
|
failproofai policies --uninstall --custom
|
|
170
191
|
|
|
171
192
|
LINKS
|
|
172
|
-
⭐ Star us: https://github.com/
|
|
193
|
+
⭐ Star us: https://github.com/failproofai/failproofai
|
|
173
194
|
📖 Docs: https://befailproof.ai
|
|
174
195
|
💬 Slack: https://join.slack.com/t/failproofai/shared_invite/zt-3v63b7k5e-O3NBHmj8X6n9gZSGDx6ggQ
|
|
175
196
|
`.trimStart());
|
|
@@ -250,6 +271,7 @@ EXAMPLES
|
|
|
250
271
|
}
|
|
251
272
|
|
|
252
273
|
if (isInstall) {
|
|
274
|
+
lastSubcommand = "install";
|
|
253
275
|
const { installHooks } = await import("../src/hooks/manager");
|
|
254
276
|
const { resolveTargetClis } = await import("../src/hooks/install-prompt");
|
|
255
277
|
|
|
@@ -337,10 +359,19 @@ EXAMPLES
|
|
|
337
359
|
false,
|
|
338
360
|
cli,
|
|
339
361
|
);
|
|
362
|
+
await track("cli_install_success", {
|
|
363
|
+
scope,
|
|
364
|
+
cli,
|
|
365
|
+
cli_count: cli.length,
|
|
366
|
+
explicit_policies: explicitPolicyNames.length > 0,
|
|
367
|
+
include_beta: includeBeta,
|
|
368
|
+
has_custom_path: !!customPoliciesPath,
|
|
369
|
+
});
|
|
340
370
|
process.exit(0);
|
|
341
371
|
}
|
|
342
372
|
|
|
343
373
|
if (isUninstall) {
|
|
374
|
+
lastSubcommand = "uninstall";
|
|
344
375
|
const { removeHooks } = await import("../src/hooks/manager");
|
|
345
376
|
const { resolveTargetClis } = await import("../src/hooks/install-prompt");
|
|
346
377
|
|
|
@@ -402,6 +433,14 @@ EXAMPLES
|
|
|
402
433
|
undefined,
|
|
403
434
|
{ betaOnly, removeCustomHooks, cli },
|
|
404
435
|
);
|
|
436
|
+
await track("cli_uninstall_success", {
|
|
437
|
+
scope,
|
|
438
|
+
cli,
|
|
439
|
+
cli_count: cli.length,
|
|
440
|
+
beta_only: betaOnly,
|
|
441
|
+
remove_custom_hooks: removeCustomHooks,
|
|
442
|
+
explicit_policies: policyNames.length > 0,
|
|
443
|
+
});
|
|
405
444
|
process.exit(0);
|
|
406
445
|
}
|
|
407
446
|
|
|
@@ -424,75 +463,162 @@ EXAMPLES
|
|
|
424
463
|
);
|
|
425
464
|
}
|
|
426
465
|
|
|
466
|
+
lastSubcommand = "list";
|
|
427
467
|
const { listHooks } = await import("../src/hooks/manager");
|
|
428
468
|
await listHooks();
|
|
469
|
+
await track("cli_list_invoked", {});
|
|
429
470
|
process.exit(0);
|
|
430
471
|
}
|
|
431
472
|
|
|
432
|
-
//
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
process.exit(0);
|
|
437
|
-
}
|
|
473
|
+
// audit — scan past transcripts for "stupid behaviors" caught by builtin
|
|
474
|
+
// policies + a set of audit-only detectors.
|
|
475
|
+
if (args[0] === "audit") {
|
|
476
|
+
const subArgs = args.slice(1);
|
|
438
477
|
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
await logout();
|
|
443
|
-
process.exit(0);
|
|
444
|
-
}
|
|
478
|
+
if (subArgs.includes("--help") || subArgs.includes("-h")) {
|
|
479
|
+
console.log(`
|
|
480
|
+
failproofai audit (beta) — scan past agent transcripts for stupid behaviors
|
|
445
481
|
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
}
|
|
482
|
+
NOTE: This command is in beta. Flags, output format, and the audit-only
|
|
483
|
+
detector catalog may change before the next stable cut. Going live shortly.
|
|
484
|
+
|
|
485
|
+
USAGE
|
|
486
|
+
failproofai audit [options]
|
|
452
487
|
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
488
|
+
OPTIONS
|
|
489
|
+
--cli claude|codex|copilot|cursor|opencode|pi|gemini
|
|
490
|
+
Restrict to one or more CLIs (space-separated or repeated).
|
|
491
|
+
Default: scan all 7.
|
|
492
|
+
--project <path> Restrict to sessions whose cwd matches this path. Repeatable.
|
|
493
|
+
--since 7d|30d|2026-04-01 Only sessions whose mtime is within window.
|
|
494
|
+
--policy <name> Restrict to one policy/detector name. Repeatable.
|
|
495
|
+
--limit N Top-N rows in the table (default 20).
|
|
496
|
+
--show-examples Include one example command per row in the table.
|
|
497
|
+
--report <path> Markdown report path (default: ./failproofai-audit.md).
|
|
498
|
+
--no-report Skip writing the markdown report.
|
|
499
|
+
--json Print JSON to stdout instead of the table.
|
|
500
|
+
--no-cache Bypass the per-transcript result cache.
|
|
501
|
+
--help, -h Show this help
|
|
457
502
|
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
503
|
+
EXAMPLES
|
|
504
|
+
failproofai audit
|
|
505
|
+
failproofai audit --cli claude --since 30d
|
|
506
|
+
failproofai audit --policy protect-env-vars --policy block-force-push
|
|
507
|
+
failproofai audit --json > audit.json
|
|
508
|
+
failproofai audit --project /home/me/myrepo --show-examples
|
|
509
|
+
`.trimStart());
|
|
463
510
|
process.exit(0);
|
|
464
511
|
}
|
|
465
512
|
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
513
|
+
const VALID_CLIS = new Set(["claude", "codex", "copilot", "cursor", "opencode", "pi", "gemini"]);
|
|
514
|
+
/** Consume one or more values for a flag like `--cli a b c`, stopping at
|
|
515
|
+
* the next flag or an unknown token (when an allow-set is supplied).
|
|
516
|
+
* Throws when the flag appears with zero following values — a bare
|
|
517
|
+
* `--cli` would otherwise silently widen the scope to all CLIs. */
|
|
518
|
+
function collectMulti(flag, allowSet) {
|
|
519
|
+
const out = [];
|
|
520
|
+
const consumed = new Set();
|
|
521
|
+
for (let i = 0; i < subArgs.length; i++) {
|
|
522
|
+
if (subArgs[i] !== flag) continue;
|
|
523
|
+
let seenForThisFlag = 0;
|
|
524
|
+
for (let j = i + 1; j < subArgs.length; j++) {
|
|
525
|
+
const v = subArgs[j];
|
|
526
|
+
if (v.startsWith("-")) break;
|
|
527
|
+
if (allowSet && !allowSet.has(v)) break;
|
|
528
|
+
out.push(v);
|
|
529
|
+
consumed.add(j);
|
|
530
|
+
seenForThisFlag++;
|
|
531
|
+
}
|
|
532
|
+
consumed.add(i);
|
|
533
|
+
if (seenForThisFlag === 0) {
|
|
534
|
+
throw new CliError(`Missing value(s) for ${flag}`);
|
|
535
|
+
}
|
|
536
|
+
}
|
|
537
|
+
return { values: out, consumed };
|
|
538
|
+
}
|
|
539
|
+
/** Take the single value following a one-shot flag like `--since 7d`. */
|
|
540
|
+
function takeOne(flag) {
|
|
541
|
+
const i = subArgs.indexOf(flag);
|
|
542
|
+
if (i < 0) return { value: undefined, consumed: new Set() };
|
|
543
|
+
const v = subArgs[i + 1];
|
|
544
|
+
if (v === undefined || v.startsWith("-")) {
|
|
545
|
+
throw new CliError(`Missing value for ${flag}`);
|
|
546
|
+
}
|
|
547
|
+
return { value: v, consumed: new Set([i, i + 1]) };
|
|
548
|
+
}
|
|
549
|
+
|
|
550
|
+
const allConsumed = new Set();
|
|
551
|
+
const cliRes = collectMulti("--cli", VALID_CLIS);
|
|
552
|
+
cliRes.consumed.forEach((i) => allConsumed.add(i));
|
|
553
|
+
const projectRes = collectMulti("--project", null);
|
|
554
|
+
projectRes.consumed.forEach((i) => allConsumed.add(i));
|
|
555
|
+
const policyRes = collectMulti("--policy", null);
|
|
556
|
+
policyRes.consumed.forEach((i) => allConsumed.add(i));
|
|
557
|
+
const sinceRes = takeOne("--since");
|
|
558
|
+
sinceRes.consumed.forEach((i) => allConsumed.add(i));
|
|
559
|
+
const limitRes = takeOne("--limit");
|
|
560
|
+
limitRes.consumed.forEach((i) => allConsumed.add(i));
|
|
561
|
+
const reportRes = takeOne("--report");
|
|
562
|
+
reportRes.consumed.forEach((i) => allConsumed.add(i));
|
|
563
|
+
|
|
564
|
+
const showExamples = subArgs.includes("--show-examples");
|
|
565
|
+
if (showExamples) allConsumed.add(subArgs.indexOf("--show-examples"));
|
|
566
|
+
const noReport = subArgs.includes("--no-report");
|
|
567
|
+
if (noReport) allConsumed.add(subArgs.indexOf("--no-report"));
|
|
568
|
+
const jsonOut = subArgs.includes("--json");
|
|
569
|
+
if (jsonOut) allConsumed.add(subArgs.indexOf("--json"));
|
|
570
|
+
const noCache = subArgs.includes("--no-cache");
|
|
571
|
+
if (noCache) allConsumed.add(subArgs.indexOf("--no-cache"));
|
|
572
|
+
|
|
573
|
+
// Reject unknown flags / positional args.
|
|
574
|
+
for (let i = 0; i < subArgs.length; i++) {
|
|
575
|
+
if (allConsumed.has(i)) continue;
|
|
576
|
+
const arg = subArgs[i];
|
|
577
|
+
throw new CliError(
|
|
578
|
+
`Unexpected argument: ${arg}\nRun \`failproofai audit --help\` for usage.`,
|
|
579
|
+
);
|
|
470
580
|
}
|
|
471
581
|
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
const s = relayStatus();
|
|
478
|
-
if (alive && s.running) {
|
|
479
|
-
console.log(`Relay daemon started (pid ${s.pid})`);
|
|
480
|
-
process.exit(0);
|
|
582
|
+
let parsedLimit;
|
|
583
|
+
if (limitRes.value !== undefined) {
|
|
584
|
+
parsedLimit = parseInt(limitRes.value, 10);
|
|
585
|
+
if (!Number.isInteger(parsedLimit) || parsedLimit <= 0) {
|
|
586
|
+
throw new CliError(`Invalid value for --limit: "${limitRes.value}". Use a positive integer.`);
|
|
481
587
|
}
|
|
482
|
-
|
|
483
|
-
|
|
588
|
+
}
|
|
589
|
+
const opts = {
|
|
590
|
+
clis: cliRes.values.length > 0 ? cliRes.values : undefined,
|
|
591
|
+
projects: projectRes.values.length > 0 ? projectRes.values : undefined,
|
|
592
|
+
policies: policyRes.values.length > 0 ? policyRes.values : undefined,
|
|
593
|
+
since: sinceRes.value,
|
|
594
|
+
limit: parsedLimit,
|
|
595
|
+
showExamples,
|
|
596
|
+
reportPath: reportRes.value ?? "./failproofai-audit.md",
|
|
597
|
+
noReport: noReport || jsonOut, // --json implies --no-report unless explicit --report
|
|
598
|
+
json: jsonOut,
|
|
599
|
+
noCache,
|
|
600
|
+
};
|
|
601
|
+
// Re-enable report when --report was passed alongside --json.
|
|
602
|
+
if (jsonOut && reportRes.value) opts.noReport = false;
|
|
603
|
+
|
|
604
|
+
const { runAudit } = await import("../src/audit");
|
|
605
|
+
const { formatText, formatJson, formatMarkdown } = await import("../src/audit/report");
|
|
606
|
+
const result = await runAudit(opts);
|
|
607
|
+
|
|
608
|
+
if (jsonOut) {
|
|
609
|
+
process.stdout.write(formatJson(result) + "\n");
|
|
610
|
+
} else {
|
|
611
|
+
process.stdout.write(formatText(result, opts));
|
|
484
612
|
}
|
|
485
613
|
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
614
|
+
if (!opts.noReport) {
|
|
615
|
+
const { writeFileSync } = await import("node:fs");
|
|
616
|
+
const { resolve } = await import("node:path");
|
|
617
|
+
const reportPath = resolve(opts.reportPath);
|
|
618
|
+
writeFileSync(reportPath, formatMarkdown(result), "utf-8");
|
|
619
|
+
if (!jsonOut) process.stdout.write(`\nReport written: ${reportPath}\n`);
|
|
620
|
+
}
|
|
490
621
|
|
|
491
|
-
// sync — one-shot flush of pending events to server (fallback for no daemon)
|
|
492
|
-
if (args[0] === "sync") {
|
|
493
|
-
const { runOneShotSync } = await import("../src/relay/daemon");
|
|
494
|
-
const count = await runOneShotSync();
|
|
495
|
-
console.log(`Synced ${count} event${count === 1 ? "" : "s"} to server`);
|
|
496
622
|
process.exit(0);
|
|
497
623
|
}
|
|
498
624
|
|
|
@@ -514,7 +640,7 @@ EXAMPLES
|
|
|
514
640
|
return dp[m][n];
|
|
515
641
|
}
|
|
516
642
|
|
|
517
|
-
const primary = ["--version", "--help", "--hook", "policies", "
|
|
643
|
+
const primary = ["--version", "--help", "--hook", "policies", "audit"];
|
|
518
644
|
const closest = primary.reduce((best, flag) => {
|
|
519
645
|
const dist = levenshtein(unknownFlag, flag);
|
|
520
646
|
return dist < best.dist ? { flag, dist } : best;
|
|
@@ -537,6 +663,17 @@ EXAMPLES
|
|
|
537
663
|
);
|
|
538
664
|
}
|
|
539
665
|
|
|
666
|
+
// First-run nudge — only on truly bare `failproofai` invocations. Best-effort:
|
|
667
|
+
// any thrown error must not block the dashboard from launching.
|
|
668
|
+
if (args.length === 0) {
|
|
669
|
+
try {
|
|
670
|
+
const { maybeRunFirstRunNudge } = await import("../src/hooks/first-run-nudge");
|
|
671
|
+
await maybeRunFirstRunNudge();
|
|
672
|
+
} catch {
|
|
673
|
+
// Nudge is non-critical; fall through to dashboard.
|
|
674
|
+
}
|
|
675
|
+
}
|
|
676
|
+
|
|
540
677
|
// Dashboard launch — always production mode
|
|
541
678
|
const { launch } = await import("../scripts/launch");
|
|
542
679
|
launch("start");
|
|
@@ -550,11 +687,31 @@ try {
|
|
|
550
687
|
await runCli();
|
|
551
688
|
} catch (err) {
|
|
552
689
|
if (err instanceof CliError) {
|
|
690
|
+
if (lastSubcommand === "install") {
|
|
691
|
+
await track("cli_install_failure", { error_type: "cli_error", exit_code: err.exitCode });
|
|
692
|
+
} else if (lastSubcommand === "uninstall") {
|
|
693
|
+
await track("cli_uninstall_failure", { error_type: "cli_error", exit_code: err.exitCode });
|
|
694
|
+
} else {
|
|
695
|
+
await track("cli_parse_error", {
|
|
696
|
+
subcommand: lastSubcommand ?? (args[0] ?? null),
|
|
697
|
+
exit_code: err.exitCode,
|
|
698
|
+
});
|
|
699
|
+
}
|
|
553
700
|
console.error(`Error: ${err.message}`);
|
|
554
701
|
process.exit(err.exitCode);
|
|
555
702
|
}
|
|
556
703
|
// Unexpected internal error — show message only, no stack trace
|
|
557
704
|
const msg = err instanceof Error ? err.message : String(err);
|
|
705
|
+
if (lastSubcommand === "install") {
|
|
706
|
+
await track("cli_install_failure", { error_type: err instanceof Error ? err.name : "unknown" });
|
|
707
|
+
} else if (lastSubcommand === "uninstall") {
|
|
708
|
+
await track("cli_uninstall_failure", { error_type: err instanceof Error ? err.name : "unknown" });
|
|
709
|
+
} else {
|
|
710
|
+
await track("cli_unexpected_error", {
|
|
711
|
+
subcommand: lastSubcommand ?? (args[0] ?? null),
|
|
712
|
+
error_type: err instanceof Error ? err.name : "unknown",
|
|
713
|
+
});
|
|
714
|
+
}
|
|
558
715
|
console.error(`Unexpected error: ${msg}`);
|
|
559
716
|
process.exit(2);
|
|
560
717
|
}
|