failproofai 1.0.13-beta.3 → 1.0.14
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 +44 -44
- 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 +6 -6
- 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 +2 -3
- package/.next/standalone/.next/server/app/_global-error/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/_global-error.html +1 -1
- package/.next/standalone/.next/server/app/_global-error.rsc +2 -2
- package/.next/standalone/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_not-found/page/build-manifest.json +6 -6
- 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 +3 -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 +6 -6
- package/.next/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +6 -6
- package/.next/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +5 -5
- package/.next/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/api/audit/invite/route.js +3 -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 +22 -23
- 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 +2 -3
- 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 +4 -5
- 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 -5
- 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 +4 -5
- 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 -4
- 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 +2 -3
- 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 +6 -6
- package/.next/standalone/.next/server/app/audit/page/server-reference-manifest.json +2 -2
- package/.next/standalone/.next/server/app/audit/page.js +5 -6
- package/.next/standalone/.next/server/app/audit/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/audit/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/index.html +1 -1
- package/.next/standalone/.next/server/app/index.rsc +6 -6
- package/.next/standalone/.next/server/app/index.segments/__PAGE__.segment.rsc +5 -5
- package/.next/standalone/.next/server/app/index.segments/_full.segment.rsc +6 -6
- package/.next/standalone/.next/server/app/index.segments/_tree.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/page/build-manifest.json +6 -6
- package/.next/standalone/.next/server/app/page/server-reference-manifest.json +1 -1
- package/.next/standalone/.next/server/app/page.js +4 -5
- 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 +6 -6
- package/.next/standalone/.next/server/app/policies/page/server-reference-manifest.json +14 -14
- package/.next/standalone/.next/server/app/policies/page.js +4 -5
- 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 +6 -6
- 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 +20 -21
- 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 +6 -6
- 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 +8 -9
- 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 +6 -6
- package/.next/standalone/.next/server/app/projects/page/server-reference-manifest.json +1 -1
- package/.next/standalone/.next/server/app/projects/page.js +6 -7
- package/.next/standalone/.next/server/app/projects/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/projects/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/settings/page/build-manifest.json +6 -6
- package/.next/standalone/.next/server/app/settings/page/server-reference-manifest.json +8 -8
- package/.next/standalone/.next/server/app/settings/page.js +3 -4
- 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/{[root-of-the-server]__1a2d0ewycsp6k._.js → [externals]__0h0p9dmv_e7r7._.js} +2 -2
- package/.next/standalone/.next/server/chunks/{[root-of-the-server]__1am_1tz0o0aqz._.js → [externals]__1_407huhlmj1m._.js} +2 -2
- package/.next/standalone/.next/server/chunks/{[root-of-the-server]__031qp1lkow_kc._.js → [externals]__1rlxpymm37wel._.js} +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__03s1za0hn71yp._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__048f1wnr8pysf._.js +63 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__07a0sa6fuw5_b._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0l-oi4gdtmlo5._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0spt0kv8azrpl._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0yvyp5b7jmlc4._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__145vo_drnuvas._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__1lh8c0mmhdrbj._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__1oclamblhzhrf._.js +7 -7
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__1qjnp3fa0e5g3._.js +3 -0
- package/.next/standalone/.next/server/chunks/[turbopack]_runtime.js +7 -9
- package/.next/standalone/.next/server/chunks/_02sa8fcu9_9xo._.js +1 -1
- package/.next/standalone/.next/server/chunks/_09dz7xva4ce_2._.js +18 -18
- package/.next/standalone/.next/server/chunks/_0hf5q4xzyg40j._.js +1 -1
- package/.next/standalone/.next/server/chunks/_0tovk6q0miud6._.js +1 -1
- package/.next/standalone/.next/server/chunks/_0trp3ycqv17cl._.js +1 -1
- package/.next/standalone/.next/server/chunks/_1-2owkp-1_987._.js +1 -1
- package/.next/standalone/.next/server/chunks/_13ltj8a9z92o8._.js +1 -1
- package/.next/standalone/.next/server/chunks/_15k37au70vjvg._.js +1 -1
- package/.next/standalone/.next/server/chunks/_18rfu4__wjhwb._.js +1 -1
- package/.next/standalone/.next/server/chunks/_19011-u44143j._.js +1 -1
- package/.next/standalone/.next/server/chunks/_1ek68lnh2daur._.js +2 -2
- package/.next/standalone/.next/server/chunks/_1fz8m31sndkcu._.js +1 -1
- package/.next/standalone/.next/server/chunks/_1ogwigfb0163w._.js +1 -1
- package/.next/standalone/.next/server/chunks/_1vslkoe35wok6._.js +1 -1
- package/.next/standalone/.next/server/chunks/lib_11qmqmccehybz._.js +1 -1
- package/.next/standalone/.next/server/chunks/lib_1sezqnatvr8j-._.js +1 -1
- package/.next/standalone/.next/server/chunks/node_modules_posthog-node_dist_entrypoints_index_node_mjs_01r25oigsgz07._.js +1 -2
- package/.next/standalone/.next/server/chunks/node_modules_posthog-node_dist_entrypoints_index_node_mjs_09z9-p77cu37y._.js +1 -2
- package/.next/standalone/.next/server/chunks/package_json_[json]_cjs_1nxcc4vkpxxu7._.js +1 -1
- package/.next/standalone/.next/server/chunks/src_hooks_0_em82s16zfym._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[externals]__0ilfh9mfnzsth._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/[externals]__0ohnuzsaozaca._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__097i34ct1o88x._.js → [externals]__12qr51qgrrt6o._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__021vebe-4il8s._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__08ch3staq3ejw._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0bigvy9xmv2ka._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0evgy902m9h5e._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0ezoipo-r7_5k._.js +14 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0h1jw32uvrhh0._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0h86bl2qf0k_o._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0pia5h3p8re4c._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__10v5cyxvj64j4._.js → [root-of-the-server]__0tfnj3v_mp6rv._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1-9s1nsw-5q8o._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1-ey9fgesfbc0._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__15bi9em2xe0x2._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__15usvs-ms-0hf._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__16gb3_92zvk5x._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1avi2kypusyb_._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__20dt376-socef._.js → [root-of-the-server]__1e00l_e_8r_-g._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1mc9-zlnh656_._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1ob2uzmms1adf._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1r7drlqli-ado._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0ed1zh4scn7-k._.js → [root-of-the-server]__1tq3x9i_3_860._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1utel1l1-u64v._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1vofkb2oq7p7e._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1vxwetblyf8vp._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1xwr4hi-on27i._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__2158020r_amn9._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[turbopack]_runtime.js +7 -9
- package/.next/standalone/.next/server/chunks/ssr/_0-f9uotv7v2n9._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_00e4_rvim31u_._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_0bseae9u7g98r._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_0eoura3_9gjb-._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/_0kqw2_f1ywmpo._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_0mouhaflye1ro._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_0ouu886szh6yj._.js +10 -10
- package/.next/standalone/.next/server/chunks/ssr/_0p1cb69sml__f._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/_0pedwblqdoh58._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_0tfqha481f033._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/_1_ozgifqv1ssi._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_1a516zcgtqius._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_1ddpc5gj57uuf._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_1djqs9i27e4kg._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_1ew6ra24vt-ij._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_1or8gixmrpv5i._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_1s8zk-upxzp00._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_1u9tpla2o6utw._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_1v4_ul3sj2lq_._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_1y3xzro8ca8t6._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_20hn4gn87nsjc._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_next-internal_server_app_policies_page_actions_1sp2-yo5_vm5f.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/app_087bt9wus25zs._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/app_0trz6ik19xz5_._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/app_1fvisnppn1unv._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/app_209u41o446my6._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/app_actions_get-scheduled-audit_ts_0ei9snixb5fd-._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/app_audit_0hku_y73ischw._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/app_audit__components_audit-dashboard_tsx_0p9ud47q0xq5w._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/app_global-error_tsx_1kp6l3x33jqb6._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/app_policies_hooks-client_tsx_19dqvpcz0uxur._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/app_settings_02tf1h47jmhhd._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/lib_16jvhmthj_k3a._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/node_modules_05vgn62--7c5e._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/node_modules_0dad4au22rq0p._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/node_modules_0gxlxpuufujz9._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/node_modules_0ptcnmeaxvd_a._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{node_modules_html-to-image_es_index_1p-is71j0j7fb.js → node_modules_html-to-image_es_index_0r9i9nq3-ei-l.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/node_modules_next_0bz67659f5z-3._.js +4 -4
- package/.next/standalone/.next/server/chunks/ssr/node_modules_next_dist_0-amwqbrge23p._.js +6 -0
- package/.next/standalone/.next/server/chunks/ssr/node_modules_next_dist_0ocrceo0c9psx._.js +4 -4
- package/.next/standalone/.next/server/chunks/ssr/node_modules_next_dist_1alv566ojmz5j._.js +4 -4
- package/.next/standalone/.next/server/chunks/ssr/node_modules_next_dist_1et9oq9q9-y3v._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/node_modules_next_dist_1khq67j4vo9y4._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/node_modules_next_dist_client_components_0wpq8j32_ibz4._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/node_modules_next_dist_shared_lib_0ftnv26hg1lry._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/node_modules_posthog-node_dist_entrypoints_index_node_mjs_0dagmbznysrc2._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/node_modules_posthog-node_dist_entrypoints_index_node_mjs_11bnuznb72p7z._.js +1 -2
- package/.next/standalone/.next/server/chunks/ssr/package_json_[json]_cjs_013tntikdft59._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/src_hooks_0-q0ummbuhlg5._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/src_hooks_06kzv9ddabn3_._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/src_hooks_0agdmptetetdt._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/src_hooks_0g194syq7r7ql._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/src_hooks_0mdwgjisv4fub._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/src_hooks_1cv9_c4l1tzrm._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/src_hooks_1kx9e0dx_1-8o._.js +1 -1
- package/.next/standalone/.next/server/middleware-build-manifest.js +44 -44
- package/.next/standalone/.next/server/pages/404.html +1 -1
- package/.next/standalone/.next/server/pages/500.html +1 -1
- package/.next/standalone/.next/server/preview-props.json +3 -3
- package/.next/standalone/.next/server/server-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/server-reference-manifest.json +23 -23
- package/.next/standalone/.next/static/chunks/0tiuj32d-qcy3.js +1 -0
- package/.next/standalone/.next/static/chunks/0ztuix-ip2oiv.js +1 -0
- package/.next/standalone/.next/static/chunks/{0h7mkux811w5b.js → 107jrtkeylnrv.js} +1 -1
- package/.next/standalone/.next/static/chunks/110hwwc6agsr8.js +1 -0
- package/.next/standalone/.next/static/chunks/19e9khxgv8fb8.js +1 -0
- package/.next/standalone/.next/static/chunks/1dudxmlwx2n3q.js +1 -0
- package/.next/standalone/.next/static/chunks/1i9zuw01f0ogt.js +22 -0
- package/.next/standalone/.next/static/chunks/2codb6nb412m9.js +1 -0
- package/.next/standalone/.next/static/chunks/2hqfk_jgesiw2.js +1 -0
- package/.next/standalone/.next/static/chunks/2k6xp6kdy7lmd.js +1 -0
- package/.next/standalone/.next/static/chunks/2maurwweshrsj.js +1 -0
- package/.next/standalone/.next/static/chunks/2wh64znsc_mo2.js +1 -0
- package/.next/standalone/.next/static/chunks/2wye36b3mbzpa.js +31 -0
- package/.next/standalone/.next/static/chunks/{2sthn8c56n9m_.js → 2zlfhyqvlvf7o.js} +1 -1
- package/.next/standalone/.next/static/chunks/3hk5y4kny2ktd.js +1 -0
- package/.next/standalone/.next/static/chunks/3i_9ugyh1q1o1.js +1 -0
- package/.next/standalone/.next/static/chunks/3o30fiw7llng3.js +1 -0
- package/.next/standalone/.next/static/chunks/3v49ogp389dun.js +1 -0
- package/.next/standalone/.next/static/chunks/41ujrab732qi3.css +2 -0
- package/.next/standalone/.next/static/chunks/435eshlryosz1.js +1 -0
- package/.next/standalone/.next/static/chunks/436g_rqa42mr7.js +1 -0
- package/.next/standalone/.next/static/chunks/436nql0jk__xy.js +1 -0
- package/.next/standalone/.next/static/chunks/{turbopack-3-ry682tkyiqk.js → turbopack-2u1d16houkiyo.js} +1 -1
- package/.next/standalone/SECURITY.md +19 -4
- package/.next/standalone/fp-cloud-cli/CHANGELOG.md +13 -3
- package/.next/standalone/fp-cloud-cli/README.md +14 -7
- package/.next/standalone/fp-cloud-cli/fp_cli/_version.py +1 -1
- package/.next/standalone/fp-cloud-cli/fp_cli/app.py +2 -8
- package/.next/standalone/fp-cloud-cli/fp_cli/auth.py +325 -3
- package/.next/standalone/fp-cloud-cli/fp_cli/cloud_output.py +3 -3
- package/.next/standalone/fp-cloud-cli/fp_cli/commands/account_cmds.py +1 -11
- package/.next/standalone/fp-cloud-cli/fp_cli/commands/auth_cmds.py +218 -51
- package/.next/standalone/fp-cloud-cli/fp_cli/commands/orgs_cmds.py +1 -1
- package/.next/standalone/fp-cloud-cli/fp_cli/output.py +112 -135
- package/.next/standalone/fp-cloud-cli/fp_cli/permissions.py +10 -1
- package/.next/standalone/fp-cloud-cli/fp_cli/select.py +85 -6
- package/.next/standalone/fp-cloud-cli/fp_cli/theme.py +21 -21
- package/.next/standalone/fp-cloud-cli/pyproject.toml +1 -1
- package/.next/standalone/fp-cloud-cli/skill/SKILL.md +4 -4
- package/.next/standalone/fp-cloud-cli/skill/references/commands.md +4 -4
- package/.next/standalone/fp-cloud-cli/tests/fake_cloud_smoke.py +2 -2
- package/.next/standalone/fp-cloud-cli/tests/test_browser_login.py +943 -0
- package/.next/standalone/fp-cloud-cli/tests/test_cloud_account.py +0 -2
- package/.next/standalone/fp-cloud-cli/tests/test_cloud_agent.py +4 -8
- package/.next/standalone/fp-cloud-cli/tests/test_cloud_human_views.py +0 -4
- package/.next/standalone/fp-cloud-cli/tests/test_commands.py +3 -3
- package/.next/standalone/fp-cloud-cli/tests/test_dashboards_agent.py +3 -3
- package/.next/standalone/fp-cloud-cli/tests/test_facets.py +1 -1
- package/.next/standalone/fp-cloud-cli/tests/test_keys_queries.py +19 -2
- package/.next/standalone/fp-cloud-cli/tests/test_operator.py +1 -1
- package/.next/standalone/fp-cloud-cli/tests/test_orgs.py +1 -1
- package/.next/standalone/fp-cloud-cli/tests/test_output.py +19 -19
- package/.next/standalone/fp-cloud-cli/tests/test_round4_behaviour.py +3 -2
- package/.next/standalone/fp-cloud-cli/tests/test_screen_language.py +86 -25
- package/.next/standalone/fp-cloud-cli/tests/test_whoami.py +1 -1
- package/.next/standalone/fp-cloud-cli/uv.lock +200 -13
- 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/fast-jwt/index.js +3 -0
- package/.next/standalone/node_modules/next/dist/compiled/fast-jwt/package.json +1 -0
- package/.next/standalone/node_modules/next/dist/compiled/next-server/app-page-turbo-experimental.runtime.prod.js +23 -23
- package/.next/standalone/node_modules/next/dist/compiled/next-server/app-page-turbo.runtime.prod.js +23 -23
- package/.next/standalone/node_modules/next/dist/compiled/next-server/app-route-turbo.runtime.prod.js +1 -1
- package/.next/standalone/node_modules/next/dist/compiled/next-server/pages-turbo.runtime.prod.js +7 -7
- package/.next/standalone/node_modules/next/dist/lib/patch-incorrect-lockfile.js +3 -3
- package/.next/standalone/node_modules/next/dist/server/api-utils/node/api-resolver.js +8 -5
- package/.next/standalone/node_modules/next/dist/server/api-utils/node/try-get-preview-data.js +8 -2
- package/.next/standalone/node_modules/next/dist/server/app-render/app-render.js +52 -14
- package/.next/standalone/node_modules/next/dist/server/app-render/async-local-storage.js +1 -1
- package/.next/standalone/node_modules/next/dist/server/app-render/get-script-nonce-from-header.js +19 -3
- package/.next/standalone/node_modules/next/dist/server/app-render/turbopack-bootstrap-script.js +50 -0
- package/.next/standalone/node_modules/next/dist/server/base-server.js +8 -0
- 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 +59 -10
- package/.next/standalone/node_modules/next/dist/server/dev/hot-reloader-webpack.js +1 -1
- package/.next/standalone/node_modules/next/dist/server/dev/turbopack-utils.js +15 -0
- package/.next/standalone/node_modules/next/dist/server/image-optimizer/detect-content-type.js +24 -20
- package/.next/standalone/node_modules/next/dist/server/lib/app-info-log.js +1 -1
- package/.next/standalone/node_modules/next/dist/server/lib/dev-bundler-service.js +3 -0
- package/.next/standalone/node_modules/next/dist/server/lib/router-server.js +1 -1
- package/.next/standalone/node_modules/next/dist/server/lib/start-server.js +1 -1
- package/.next/standalone/node_modules/next/dist/server/lib/trace/tracer.js +1 -1
- package/.next/standalone/node_modules/next/dist/server/next-server.js +10 -2
- package/.next/standalone/node_modules/next/dist/server/render.js +2 -2
- package/.next/standalone/node_modules/next/dist/server/route-modules/app-page/parse-request-headers.js +1 -2
- package/.next/standalone/node_modules/next/dist/server/send-response.js +12 -0
- package/.next/standalone/node_modules/next/dist/server/use-cache/use-cache-wrapper.js +69 -6
- package/.next/standalone/node_modules/next/dist/server/web/adapter.js +5 -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 +13 -12
- package/.next/standalone/sdk/python/skill/SKILL.md +5 -0
- package/.next/standalone/sdk/python/uv.lock +83 -51
- package/.next/standalone/sdk/typescript/CHANGELOG.md +48 -5
- package/.next/standalone/sdk/typescript/integration/fixtures/langchain-dup-core/package-lock.json +0 -9
- package/.next/standalone/sdk/typescript/integration/fixtures/langchain-dup-core/package.json +2 -1
- package/.next/standalone/sdk/typescript/integration/fixtures/llamaindex-0.11/package-lock.json +72 -44
- package/.next/standalone/sdk/typescript/integration/fixtures/llamaindex-0.11/package.json +2 -1
- package/.next/standalone/sdk/typescript/integration/fixtures/llamaindex-0.12/package-lock.json +72 -44
- package/.next/standalone/sdk/typescript/integration/fixtures/llamaindex-0.12/package.json +3 -0
- package/.next/standalone/sdk/typescript/integration/fixtures/mastra-0/package-lock.json +18 -332
- package/.next/standalone/sdk/typescript/integration/fixtures/mastra-0/package.json +4 -2
- package/.next/standalone/sdk/typescript/integration/fixtures/mastra-1/package-lock.json +925 -296
- package/.next/standalone/sdk/typescript/integration/fixtures/mastra-1/package.json +3 -8
- package/.next/standalone/sdk/typescript/integration/fixtures/nextjs/package-lock.json +279 -277
- package/.next/standalone/sdk/typescript/integration/fixtures/nextjs/package.json +2 -2
- package/.next/standalone/sdk/typescript/package-lock.json +31 -61
- package/.next/standalone/sdk/typescript/package.json +3 -0
- package/.next/standalone/server.js +1 -1
- package/dist/cli.mjs +443 -245
- package/dist/worker.mjs +30 -2
- package/hermes-plugin/plugin.yaml +1 -1
- package/openclaw-plugin/daemon-client.js +254 -0
- package/openclaw-plugin/hooks.js +187 -0
- package/openclaw-plugin/index.js +17 -211
- package/package.json +13 -12
- package/src/hooks/antigravity-path-guard.ts +73 -0
- package/src/hooks/daemon-service.ts +188 -18
- package/src/hooks/delivery-health.ts +11 -1
- package/src/hooks/enforcement-capability.ts +1 -1
- package/src/hooks/handler.ts +24 -0
- package/src/hooks/integrations.ts +5 -2
- package/src/hooks/shell-quote.ts +9 -0
- package/src/hooks/uninstall-cli.ts +30 -8
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__038kwryp970nh._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__08atcie7jzswm._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0car70pylmvor._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__1j6kfp0vzu5rw._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__1l0ayum_hqqsw._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__1o9rznwc0w7og._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__1v1-l-83czzsr._.js +0 -63
- package/.next/standalone/.next/server/chunks/node_modules_@opentelemetry_api_build_esm_index_0oo58a7rymoxh.js +0 -3
- package/.next/standalone/.next/server/chunks/node_modules_@opentelemetry_api_build_esm_index_1jp9ij0_ddtgk.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__070rqh7scntiu._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__075uro8t92s0_._.js +0 -14
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0alpzjn3450sr._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0aup10z2o8zc1._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0bioghlkjf7s7._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0nhm28v58ty9z._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0vse4qi496ol-._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__190xwrr5zrfi3._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1guwlpkyurdn9._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1k96jctukf65_._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1sj-wn2jp6va5._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/_1tcvpgd7hugnx._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/node_modules_@opentelemetry_api_build_esm_index_0ntwr8lzj6p2i.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/node_modules_next_dist_0janj0i6dqko7._.js +0 -6
- package/.next/standalone/.next/static/chunks/095l2av-xsus2.js +0 -1
- package/.next/standalone/.next/static/chunks/1024g0jaymm46.js +0 -1
- package/.next/standalone/.next/static/chunks/165ezyyx0j1ft.js +0 -22
- package/.next/standalone/.next/static/chunks/19l5hbzn475am.js +0 -1
- package/.next/standalone/.next/static/chunks/1s__s2o5zcfcy.js +0 -1
- package/.next/standalone/.next/static/chunks/1uxq_gbvdti30.js +0 -1
- package/.next/standalone/.next/static/chunks/26c4gmdpsthv6.css +0 -2
- package/.next/standalone/.next/static/chunks/2_sj5ssr_m_wm.js +0 -1
- package/.next/standalone/.next/static/chunks/2ojf3r8g4tn7s.js +0 -1
- package/.next/standalone/.next/static/chunks/2tjfp9dirxnku.js +0 -1
- package/.next/standalone/.next/static/chunks/2zyrjasvbmwpq.js +0 -1
- package/.next/standalone/.next/static/chunks/31fan-ze541d1.js +0 -1
- package/.next/standalone/.next/static/chunks/32s3y34p0t2pe.js +0 -1
- package/.next/standalone/.next/static/chunks/36re0fegaocq-.js +0 -1
- package/.next/standalone/.next/static/chunks/3eonfpk9jyceg.js +0 -1
- package/.next/standalone/.next/static/chunks/3fhk60ouw_ae6.js +0 -1
- package/.next/standalone/.next/static/chunks/3m9g1l6-yh0s3.js +0 -1
- package/.next/standalone/.next/static/chunks/3uaguc-tbu_ik.js +0 -1
- package/.next/standalone/.next/static/chunks/3xgxl1s_in776.js +0 -31
- package/.next/standalone/.next/static/chunks/3zwff_ax3hust.js +0 -1
- package/.next/standalone/node_modules/next/dist/compiled/jsonwebtoken/index.js +0 -11
- package/.next/standalone/node_modules/next/dist/compiled/jsonwebtoken/package.json +0 -1
- package/.next/standalone/node_modules/next/dist/lib/semver-noop.js +0 -18
- /package/.next/standalone/.next/static/{fHR90vZ5ls7d-K8cH9hxe → -iBiSmrLiylRKLAg77zlQ}/_buildManifest.js +0 -0
- /package/.next/standalone/.next/static/{fHR90vZ5ls7d-K8cH9hxe → -iBiSmrLiylRKLAg77zlQ}/_clientMiddlewareManifest.js +0 -0
- /package/.next/standalone/.next/static/{fHR90vZ5ls7d-K8cH9hxe → -iBiSmrLiylRKLAg77zlQ}/_ssgManifest.js +0 -0
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
|
+
import itertools
|
|
6
|
+
import time
|
|
5
7
|
from dataclasses import asdict
|
|
6
8
|
from typing import List, Optional, Tuple
|
|
7
9
|
|
|
@@ -23,7 +25,7 @@ from .._context import (
|
|
|
23
25
|
resolved_base_url,
|
|
24
26
|
)
|
|
25
27
|
from ..client import ClientContext, get_session_user, org_is_accessible
|
|
26
|
-
from ..errors import ApiError, AuthError
|
|
28
|
+
from ..errors import ApiError, AuthError, NetworkError
|
|
27
29
|
|
|
28
30
|
|
|
29
31
|
def _resolve_login_org(
|
|
@@ -106,40 +108,187 @@ def _looks_like_email(value: str) -> bool:
|
|
|
106
108
|
return "@" in s and " " not in s and "." in s.rsplit("@", 1)[-1] and len(s) >= 5
|
|
107
109
|
|
|
108
110
|
|
|
111
|
+
_LINK_OPENING = "opening your browser — if nothing appears, open this link:"
|
|
112
|
+
_LINK_ANYWHERE = "open this link on any device to authorize:"
|
|
113
|
+
_NO_BROWSER_LOGIN = "this Cloud has no browser login yet — using an emailed code"
|
|
114
|
+
_NO_LINK_NOW = "couldn't get a link right now — using an emailed code"
|
|
115
|
+
_LINK_ENDED = {
|
|
116
|
+
"denied": "not authorized",
|
|
117
|
+
"expired": "that link expired",
|
|
118
|
+
"claimed": "that link was already used",
|
|
119
|
+
}
|
|
120
|
+
_SPINNER = "⠋⠙⠹⠸⠼⠴⠦⠧⠇⠏"
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
def _offer_link(url: str) -> None:
|
|
124
|
+
"""The link goes on screen before any browser opens, so one that never appears strands
|
|
125
|
+
nobody. Over SSH or with no display it is the whole offer, and works from any device."""
|
|
126
|
+
opening = auth.can_open_browser()
|
|
127
|
+
output.print_unwrapped(_LINK_OPENING if opening else _LINK_ANYWHERE)
|
|
128
|
+
output.print_unwrapped(url)
|
|
129
|
+
if opening:
|
|
130
|
+
auth.open_url(url)
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
def _browser_login_in_box(state: AppState, base: str, box: selectmod.LoginBox):
|
|
134
|
+
"""Link → approval → session, inside the box. Returns ``(token, expires_in, user)``, or ``None``
|
|
135
|
+
with a note saying why when there's no link to offer. Tab raises ``SwitchSignIn``, and ``box.link`` keeps the
|
|
136
|
+
link for coming back: asking for another each time would spend the rate limit and open another
|
|
137
|
+
tab, and an approval given in the meantime would be lost."""
|
|
138
|
+
options = {"timeout": state.timeout, "verify": not state.insecure}
|
|
139
|
+
frames = itertools.cycle(_SPINNER)
|
|
140
|
+
|
|
141
|
+
def tick(left: float, offline: bool) -> None:
|
|
142
|
+
minutes, seconds = divmod(int(left), 60)
|
|
143
|
+
doing = "reconnecting" if offline else "waiting for you to authorize"
|
|
144
|
+
box.waiting(f"{next(frames)} {doing} · {minutes}:{seconds:02d}", "tab use email · esc cancel")
|
|
145
|
+
if box.wait_key(0.1) == "\t":
|
|
146
|
+
raise selectmod.SwitchSignIn()
|
|
147
|
+
|
|
148
|
+
try:
|
|
149
|
+
while True:
|
|
150
|
+
if box.link is not None:
|
|
151
|
+
box.show_link(_LINK_ANYWHERE, box.link.verification_url)
|
|
152
|
+
else:
|
|
153
|
+
box.working("asking for a link…")
|
|
154
|
+
try:
|
|
155
|
+
box.link = auth.start_browser_login(base, **options)
|
|
156
|
+
except (ApiError, NetworkError):
|
|
157
|
+
# The link is only the default. A rate limit or an outage of this one route
|
|
158
|
+
# must not stand between a person and the emailed code.
|
|
159
|
+
box.note(_NO_LINK_NOW)
|
|
160
|
+
return None
|
|
161
|
+
if box.link is None:
|
|
162
|
+
box.note(_NO_BROWSER_LOGIN)
|
|
163
|
+
return None
|
|
164
|
+
# The link goes on screen before any browser opens, so one that never appears
|
|
165
|
+
# strands nobody. Over SSH or with no display it is the whole offer.
|
|
166
|
+
opening = auth.can_open_browser()
|
|
167
|
+
box.show_link(_LINK_OPENING if opening else _LINK_ANYWHERE, box.link.verification_url)
|
|
168
|
+
if opening:
|
|
169
|
+
auth.open_url(box.link.verification_url)
|
|
170
|
+
# ponytail: Esc during a stalled poll waits out its 10s timeout (Ctrl-C doesn't);
|
|
171
|
+
# polling on a thread would fix that if it ever matters.
|
|
172
|
+
outcome = auth.await_browser_approval(base, box.link, tick=tick, **options)
|
|
173
|
+
# A key pressed during the last poll is still waiting to be read. Esc and Tab mean no
|
|
174
|
+
# session, and this is the last moment that can be honoured: the claim creates it.
|
|
175
|
+
# Anything else was pressed at a screen that's gone, and must not answer the next
|
|
176
|
+
# one: Enter would take a new link with "not authorized" on screen for no time.
|
|
177
|
+
# `is not None`: the first byte of a non-ASCII character reads as "".
|
|
178
|
+
left_for_email = False
|
|
179
|
+
while (key := box.wait_key(0)) is not None:
|
|
180
|
+
left_for_email = left_for_email or key == "\t"
|
|
181
|
+
if outcome == "approved":
|
|
182
|
+
if left_for_email:
|
|
183
|
+
raise selectmod.SwitchSignIn()
|
|
184
|
+
box.working("finishing sign-in…")
|
|
185
|
+
return auth.claim_browser_login(base, box.link.poll_secret, **options)
|
|
186
|
+
box.link = None
|
|
187
|
+
box.link_ended(_LINK_ENDED.get(outcome, "that link can't be used any more"))
|
|
188
|
+
except KeyboardInterrupt: # Ctrl-C during a request, outside `wait_key`
|
|
189
|
+
raise selectmod.LoginCancelled()
|
|
190
|
+
|
|
191
|
+
|
|
192
|
+
def _browser_login_plain(state: AppState, base: str):
|
|
193
|
+
"""The same, for a terminal with no raw mode (Windows). ``None`` when this Cloud has
|
|
194
|
+
no browser login. A link that ends ends the login: `fp login` is one command away."""
|
|
195
|
+
options = {"timeout": state.timeout, "verify": not state.insecure}
|
|
196
|
+
try:
|
|
197
|
+
login = auth.start_browser_login(base, **options)
|
|
198
|
+
except (ApiError, NetworkError): # as in the box: the link is not the only way in
|
|
199
|
+
output.info(_NO_LINK_NOW)
|
|
200
|
+
return None
|
|
201
|
+
if login is None:
|
|
202
|
+
output.info(_NO_BROWSER_LOGIN)
|
|
203
|
+
return None
|
|
204
|
+
_offer_link(login.verification_url)
|
|
205
|
+
output.info("waiting for you to authorize — ctrl-c to cancel")
|
|
206
|
+
was_offline = False
|
|
207
|
+
|
|
208
|
+
def tick(_left: float, offline: bool) -> None:
|
|
209
|
+
nonlocal was_offline
|
|
210
|
+
if offline and not was_offline:
|
|
211
|
+
output.info("reconnecting…")
|
|
212
|
+
elif was_offline and not offline:
|
|
213
|
+
output.info("back online — still waiting for you to authorize")
|
|
214
|
+
was_offline = offline
|
|
215
|
+
time.sleep(0.25)
|
|
216
|
+
|
|
217
|
+
outcome = auth.await_browser_approval(base, login, tick=tick, **options)
|
|
218
|
+
if outcome == "approved":
|
|
219
|
+
if was_offline:
|
|
220
|
+
output.info("back online")
|
|
221
|
+
return auth.claim_browser_login(base, login.poll_secret, **options)
|
|
222
|
+
raise AuthError(
|
|
223
|
+
f"{_LINK_ENDED.get(outcome, 'That link cannot be used any more')}.".capitalize(),
|
|
224
|
+
hint="run fp login for a new link",
|
|
225
|
+
)
|
|
226
|
+
|
|
227
|
+
|
|
228
|
+
def _email_code_in_box(state: AppState, base: str, box: selectmod.LoginBox, email_opt: Optional[str],
|
|
229
|
+
*, typed: str = "", tab: bool = False):
|
|
230
|
+
"""Email → code → verify, inside the box. Returns ``(token, expires_in, user)``. With ``tab``,
|
|
231
|
+
Tab at the email raises ``SwitchSignIn``; ``typed`` is what the field starts with."""
|
|
232
|
+
# email
|
|
233
|
+
if email_opt:
|
|
234
|
+
email = email_opt
|
|
235
|
+
box.note("email", email)
|
|
236
|
+
else:
|
|
237
|
+
keys = "enter send a code · tab SSO · esc cancel" if tab else "enter send a code · esc cancel"
|
|
238
|
+
email = box.text_step("email", helper=keys, validate=_looks_like_email,
|
|
239
|
+
error_msg="that doesn't look like an email", value=typed, tab=tab)
|
|
240
|
+
# send the code
|
|
241
|
+
box.working("sending a code…")
|
|
242
|
+
auth.request_otp(base, email, timeout=state.timeout, verify=not state.insecure)
|
|
243
|
+
box.note("code sent")
|
|
244
|
+
# code → verify. A wrong/expired code is reported cleanly INSIDE the box (not a raw
|
|
245
|
+
# HTTP 500) with a relogin hint, then we exit — re-run `fp login` for a fresh code.
|
|
246
|
+
code = box.text_step("code", helper="enter the 6-digit code", slots=6, collapse=False)
|
|
247
|
+
box.working("verifying…")
|
|
248
|
+
try:
|
|
249
|
+
token, expires_in, user = auth.verify_otp(
|
|
250
|
+
base, email, code.strip(), timeout=state.timeout, verify=not state.insecure
|
|
251
|
+
)
|
|
252
|
+
except AuthError:
|
|
253
|
+
box.fail("that code didn't match or has expired", "sign in again with fp login")
|
|
254
|
+
raise typer.Exit(code=4)
|
|
255
|
+
except ApiError as exc: # e.g. too many attempts (429)
|
|
256
|
+
box.fail(exc.message, "try fp login again in a bit")
|
|
257
|
+
raise typer.Exit(code=exc.exit_code)
|
|
258
|
+
box.note("code") # collapse to `✓ code` — never echo the value
|
|
259
|
+
return token, expires_in, {**user, "email": user.get("email") or email}
|
|
260
|
+
|
|
261
|
+
|
|
262
|
+
def _sign_in_in_box(state: AppState, base: str, box: selectmod.LoginBox, email_opt: Optional[str]):
|
|
263
|
+
"""Start on a browser link, with Tab to an emailed code and back. Returns ``(method, creds)``."""
|
|
264
|
+
if email_opt:
|
|
265
|
+
return "email", _email_code_in_box(state, base, box, email_opt)
|
|
266
|
+
typed = ""
|
|
267
|
+
while True:
|
|
268
|
+
try:
|
|
269
|
+
creds = _browser_login_in_box(state, base, box)
|
|
270
|
+
except selectmod.SwitchSignIn:
|
|
271
|
+
try:
|
|
272
|
+
return "email", _email_code_in_box(state, base, box, None, typed=typed, tab=True)
|
|
273
|
+
except selectmod.SwitchSignIn as switch:
|
|
274
|
+
typed = switch.typed
|
|
275
|
+
continue
|
|
276
|
+
if creds:
|
|
277
|
+
return "browser", creds
|
|
278
|
+
return "email", _email_code_in_box(state, base, box, None, typed=typed)
|
|
279
|
+
|
|
280
|
+
|
|
109
281
|
def _login_interactive(state: AppState, base: str, email_opt: Optional[str], org_opt: Optional[str]) -> None:
|
|
110
|
-
"""The single-box interactive login (real TTY only): one redrawn-in-place panel —
|
|
111
|
-
(org picker) → signed-in. Mirrors the non-interactive orchestration below; only the
|
|
112
|
-
Network/auth errors propagate (terminal restored on the way out) to the standard red
|
|
282
|
+
"""The single-box interactive login (real TTY only): one redrawn-in-place panel — browser link
|
|
283
|
+
or email code → (org picker) → signed-in. Mirrors the non-interactive orchestration below; only the
|
|
284
|
+
UI differs. Network/auth errors propagate (terminal restored on the way out) to the standard red
|
|
285
|
+
error box."""
|
|
113
286
|
saved = state.config.org
|
|
114
287
|
persisted = False
|
|
288
|
+
|
|
115
289
|
with selectmod.LoginBox() as box:
|
|
116
290
|
try:
|
|
117
|
-
|
|
118
|
-
if email_opt:
|
|
119
|
-
email = email_opt
|
|
120
|
-
box.note("email", email)
|
|
121
|
-
else:
|
|
122
|
-
email = box.text_step("email", validate=_looks_like_email,
|
|
123
|
-
error_msg="that doesn't look like an email")
|
|
124
|
-
# send the code
|
|
125
|
-
box.working("sending a code…")
|
|
126
|
-
auth.request_otp(base, email, timeout=state.timeout, verify=not state.insecure)
|
|
127
|
-
box.note("code sent")
|
|
128
|
-
# code → verify. A wrong/expired code is reported cleanly INSIDE the box (not a raw
|
|
129
|
-
# HTTP 500) with a relogin hint, then we exit — re-run `fp login` for a fresh code.
|
|
130
|
-
code = box.text_step("code", helper="enter the 6-digit code", slots=6, collapse=False)
|
|
131
|
-
box.working("verifying…")
|
|
132
|
-
try:
|
|
133
|
-
token, expires_in, user = auth.verify_otp(
|
|
134
|
-
base, email, code.strip(), timeout=state.timeout, verify=not state.insecure
|
|
135
|
-
)
|
|
136
|
-
except AuthError:
|
|
137
|
-
box.fail("that code didn't match or has expired", "sign in again with fp login")
|
|
138
|
-
raise typer.Exit(code=4)
|
|
139
|
-
except ApiError as exc: # e.g. too many attempts (429)
|
|
140
|
-
box.fail(exc.message, "try fp login again in a bit")
|
|
141
|
-
raise typer.Exit(code=exc.exit_code)
|
|
142
|
-
box.note("code") # collapse to `✓ code` — never echo the value
|
|
291
|
+
method, (token, expires_in, user) = _sign_in_in_box(state, base, box, email_opt)
|
|
143
292
|
# persist first (so we can read authoritative memberships), then resolve the org
|
|
144
293
|
auth.persist_session(state.config, base, token, expires_in, user, insecure=state.insecure)
|
|
145
294
|
persisted = True
|
|
@@ -181,32 +330,35 @@ def _login_interactive(state: AppState, base: str, email_opt: Optional[str], org
|
|
|
181
330
|
chosen = slugs[0] if slugs else None # single/none → named only in the final block
|
|
182
331
|
state.config.org = chosen
|
|
183
332
|
cfgmod.save_config(state.config)
|
|
184
|
-
analytics.capture("logged_in") # also count the interactive (real-TTY) login path
|
|
185
|
-
|
|
186
|
-
box.finish(who, chosen)
|
|
333
|
+
analytics.capture("logged_in", {"method": method}) # also count the interactive (real-TTY) login path
|
|
334
|
+
box.finish(user.get("email"), chosen)
|
|
187
335
|
except selectmod.LoginCancelled:
|
|
188
336
|
box.cancel(persisted) # calm close inside the same frame
|
|
189
337
|
|
|
190
338
|
|
|
191
339
|
def login(
|
|
192
340
|
ctx: typer.Context,
|
|
193
|
-
email: Optional[str] = typer.Option(None, "--email", "-e", help="
|
|
341
|
+
email: Optional[str] = typer.Option(None, "--email", "-e", help="Send the sign-in code to this email, without asking for it."),
|
|
194
342
|
org: Optional[str] = typer.Option(None, "--org", help="Org/tenant slug to sign in to — skips the picker. Must be one you can access."),
|
|
195
343
|
force: bool = typer.Option(False, "--force", help="Re-authenticate even if you already have a valid session."),
|
|
196
344
|
) -> None:
|
|
197
|
-
"""Sign in to the dashboard with an emailed one-time code.
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
345
|
+
"""Sign in to the dashboard, from a browser or with an emailed one-time code.
|
|
346
|
+
|
|
347
|
+
On a terminal it starts on a link, to sign in with your browser or SSO. It opens your browser
|
|
348
|
+
(over SSH or with no display it just shows the link, which works from any device); authorize
|
|
349
|
+
there and the terminal finishes on its own. Press **Tab** for a 6-digit code by email instead,
|
|
350
|
+
which is also what `--email`, `--json` and anything without a terminal use. A Cloud without
|
|
351
|
+
browser login uses the code by itself.
|
|
352
|
+
The session is saved to `~/.failproofai/fpcli/cli-auth.json` (mode 0600) and lasts ~24h — just
|
|
201
353
|
re-run `login` when it expires. Already signed in? `login` shows who you are and exits 0
|
|
202
354
|
without prompting; pass `--force` to re-authenticate anyway.
|
|
203
355
|
|
|
204
356
|
The active org is chosen here and saved for later commands. With one org it's picked
|
|
205
|
-
automatically; with several you choose from a list once
|
|
357
|
+
automatically; with several you choose from a list once you're signed in (your last-used
|
|
206
358
|
org is the Enter-to-keep default), or pass `--org <slug>` to skip the picker. Switch it later
|
|
207
359
|
with `fp orgs switch <slug>`.
|
|
208
360
|
|
|
209
|
-
|
|
361
|
+
The prompts are skippable: `--email` / `--org` provide the values up front, otherwise you're
|
|
210
362
|
asked interactively. First time, set the dashboard URL with the global `--base-url` (saved for
|
|
211
363
|
next time); add the global `--insecure` for a self-signed/internal dashboard.
|
|
212
364
|
|
|
@@ -216,9 +368,9 @@ def login(
|
|
|
216
368
|
|
|
217
369
|
Examples:
|
|
218
370
|
|
|
219
|
-
* `fp login` — fully interactive:
|
|
371
|
+
* `fp login` — fully interactive: browser or email code, then the org picker
|
|
220
372
|
* `fp --base-url https://fp.example.com login` — first time: set the dashboard URL, then sign in interactively
|
|
221
|
-
* `fp login --email you@example.com --org acme` — skip
|
|
373
|
+
* `fp login --email you@example.com --org acme` — skip the menu and the picker (email code + org up front)
|
|
222
374
|
* `fp --base-url https://dash.internal --insecure login` — self-signed / internal dashboard
|
|
223
375
|
"""
|
|
224
376
|
state: AppState = ctx.obj
|
|
@@ -284,14 +436,29 @@ def login(
|
|
|
284
436
|
_login_interactive(state, base, email, org)
|
|
285
437
|
return
|
|
286
438
|
output.auth_header()
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
439
|
+
method = "email"
|
|
440
|
+
creds = None
|
|
441
|
+
# A terminal this can't draw the box on (Windows). Pipes, CI and `--json` skip this, and so
|
|
442
|
+
# does a redirected stderr: the link and the waiting would go to that file, out of sight.
|
|
443
|
+
if not state.json and not email and selectmod.stdin_is_tty() and selectmod.stderr_is_tty():
|
|
444
|
+
email = str(output.prompt("email, or just press enter for a browser link", default="")).strip()
|
|
445
|
+
if not email:
|
|
446
|
+
try:
|
|
447
|
+
creds = _browser_login_plain(state, base)
|
|
448
|
+
except KeyboardInterrupt:
|
|
449
|
+
output.info("cancelled — not signed in")
|
|
450
|
+
return
|
|
451
|
+
method = "browser" if creds else "email"
|
|
452
|
+
if creds is None:
|
|
453
|
+
if not email:
|
|
454
|
+
email = output.prompt("email")
|
|
455
|
+
auth.request_otp(base, email, timeout=state.timeout, verify=not state.insecure)
|
|
456
|
+
output.code_sent(email)
|
|
457
|
+
code = output.prompt("code")
|
|
458
|
+
creds = auth.verify_otp(
|
|
459
|
+
base, email, str(code).strip(), timeout=state.timeout, verify=not state.insecure
|
|
460
|
+
)
|
|
461
|
+
token, expires_in, user = creds
|
|
295
462
|
# Persist the token first so we can query the session for authoritative memberships:
|
|
296
463
|
# the OTP-verify payload is slim (no memberships / is_instance_admin) — only
|
|
297
464
|
# GET /api/auth/session returns them.
|
|
@@ -354,7 +521,7 @@ def login(
|
|
|
354
521
|
f"{slugs[0]}`) or `fp orgs switch <slug>`.")
|
|
355
522
|
raise typer.Exit(code=2)
|
|
356
523
|
|
|
357
|
-
analytics.capture("logged_in") #
|
|
524
|
+
analytics.capture("logged_in", {"method": method}) # no email/id/org value
|
|
358
525
|
if state.json:
|
|
359
526
|
output.emit_json(
|
|
360
527
|
{"logged_in": True, "email": who, "org": chosen, "expires_in_secs": expires_in}
|
|
@@ -227,7 +227,7 @@ def org_switch(
|
|
|
227
227
|
"""Switch the active org/tenant — pass a slug, or omit it to pick one interactively.
|
|
228
228
|
|
|
229
229
|
`fp orgs switch acme` switches straight to `acme`. `fp orgs switch` with no slug
|
|
230
|
-
opens an arrow-key picker (↑↓ to move,
|
|
230
|
+
opens an arrow-key picker (↑↓ to move, enter to select, esc to cancel) starting on your current
|
|
231
231
|
org; if you belong to exactly one org there's nothing to switch to. Either way the result is
|
|
232
232
|
a boxed `switched org` card, and the choice is persisted to
|
|
233
233
|
`~/.failproofai/fpcli/cli-auth.json` so later
|