failproofai 1.0.12-beta.1 → 1.0.12

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.
Files changed (236) hide show
  1. package/.next/standalone/.next/BUILD_ID +1 -1
  2. package/.next/standalone/.next/build-manifest.json +3 -3
  3. package/.next/standalone/.next/prerender-manifest.json +4 -4
  4. package/.next/standalone/.next/required-server-files.json +1 -1
  5. package/.next/standalone/.next/server/app/_global-error/page/server-reference-manifest.json +1 -1
  6. package/.next/standalone/.next/server/app/_global-error/page.js.nft.json +1 -1
  7. package/.next/standalone/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
  8. package/.next/standalone/.next/server/app/_global-error.html +1 -1
  9. package/.next/standalone/.next/server/app/_global-error.rsc +2 -2
  10. package/.next/standalone/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +2 -2
  11. package/.next/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +2 -2
  12. package/.next/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  13. package/.next/standalone/.next/server/app/_not-found/page/server-reference-manifest.json +1 -1
  14. package/.next/standalone/.next/server/app/_not-found/page.js.nft.json +1 -1
  15. package/.next/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  16. package/.next/standalone/.next/server/app/_not-found.html +1 -1
  17. package/.next/standalone/.next/server/app/_not-found.rsc +3 -3
  18. package/.next/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +3 -3
  19. package/.next/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +2 -2
  20. package/.next/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
  21. package/.next/standalone/.next/server/app/api/audit/invite/route.js.nft.json +1 -1
  22. package/.next/standalone/.next/server/app/api/audit/run/route.js.nft.json +1 -1
  23. package/.next/standalone/.next/server/app/api/audit/status/route.js.nft.json +1 -1
  24. package/.next/standalone/.next/server/app/api/auth/login-request/route.js.nft.json +1 -1
  25. package/.next/standalone/.next/server/app/api/auth/login-verify/route.js.nft.json +1 -1
  26. package/.next/standalone/.next/server/app/api/auth/logout/route.js.nft.json +1 -1
  27. package/.next/standalone/.next/server/app/api/auth/status/route.js.nft.json +1 -1
  28. package/.next/standalone/.next/server/app/api/download/[project]/[session]/route.js.nft.json +1 -1
  29. package/.next/standalone/.next/server/app/audit/page/server-reference-manifest.json +2 -2
  30. package/.next/standalone/.next/server/app/audit/page.js.nft.json +1 -1
  31. package/.next/standalone/.next/server/app/audit/page_client-reference-manifest.js +1 -1
  32. package/.next/standalone/.next/server/app/index.html +1 -1
  33. package/.next/standalone/.next/server/app/index.rsc +3 -3
  34. package/.next/standalone/.next/server/app/index.segments/__PAGE__.segment.rsc +2 -2
  35. package/.next/standalone/.next/server/app/index.segments/_full.segment.rsc +3 -3
  36. package/.next/standalone/.next/server/app/index.segments/_tree.segment.rsc +1 -1
  37. package/.next/standalone/.next/server/app/page/server-reference-manifest.json +1 -1
  38. package/.next/standalone/.next/server/app/page.js.nft.json +1 -1
  39. package/.next/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
  40. package/.next/standalone/.next/server/app/policies/page/server-reference-manifest.json +14 -14
  41. package/.next/standalone/.next/server/app/policies/page.js +2 -2
  42. package/.next/standalone/.next/server/app/policies/page.js.nft.json +1 -1
  43. package/.next/standalone/.next/server/app/policies/page_client-reference-manifest.js +1 -1
  44. package/.next/standalone/.next/server/app/project/[name]/page/server-reference-manifest.json +1 -1
  45. package/.next/standalone/.next/server/app/project/[name]/page.js.nft.json +1 -1
  46. package/.next/standalone/.next/server/app/project/[name]/page_client-reference-manifest.js +1 -1
  47. package/.next/standalone/.next/server/app/project/[name]/session/[sessionId]/page/react-loadable-manifest.json +2 -2
  48. package/.next/standalone/.next/server/app/project/[name]/session/[sessionId]/page/server-reference-manifest.json +2 -2
  49. package/.next/standalone/.next/server/app/project/[name]/session/[sessionId]/page.js.nft.json +1 -1
  50. package/.next/standalone/.next/server/app/project/[name]/session/[sessionId]/page_client-reference-manifest.js +1 -1
  51. package/.next/standalone/.next/server/app/projects/page/server-reference-manifest.json +1 -1
  52. package/.next/standalone/.next/server/app/projects/page.js.nft.json +1 -1
  53. package/.next/standalone/.next/server/app/projects/page_client-reference-manifest.js +1 -1
  54. package/.next/standalone/.next/server/app/settings/page/server-reference-manifest.json +8 -8
  55. package/.next/standalone/.next/server/app/settings/page.js.nft.json +1 -1
  56. package/.next/standalone/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  57. package/.next/standalone/.next/server/chunks/_0tovk6q0miud6._.js +1 -1
  58. package/.next/standalone/.next/server/chunks/_0trp3ycqv17cl._.js +1 -1
  59. package/.next/standalone/.next/server/chunks/_1ek68lnh2daur._.js +2 -2
  60. package/.next/standalone/.next/server/chunks/package_json_[json]_cjs_1nxcc4vkpxxu7._.js +1 -1
  61. package/.next/standalone/.next/server/chunks/src_hooks_0_em82s16zfym._.js +1 -1
  62. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__08ch3staq3ejw._.js +1 -1
  63. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0bigvy9xmv2ka._.js +1 -1
  64. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0h86bl2qf0k_o._.js +1 -1
  65. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0pia5h3p8re4c._.js +1 -1
  66. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1-ey9fgesfbc0._.js +1 -1
  67. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__15usvs-ms-0hf._.js +1 -1
  68. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__167mipqmjprq5._.js +3 -0
  69. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__16gb3_92zvk5x._.js +1 -1
  70. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1avi2kypusyb_._.js +1 -1
  71. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1r7drlqli-ado._.js +1 -1
  72. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0b78b0j8iyv6l._.js → [root-of-the-server]__1vofkb2oq7p7e._.js} +1 -1
  73. package/.next/standalone/.next/server/chunks/ssr/_0eoura3_9gjb-._.js +1 -1
  74. package/.next/standalone/.next/server/chunks/ssr/{_1a3tubds7s7ow._.js → _0ouu886szh6yj._.js} +4 -4
  75. package/.next/standalone/.next/server/chunks/ssr/_0pedwblqdoh58._.js +1 -1
  76. package/.next/standalone/.next/server/chunks/ssr/_1d98fyfrcaqhy._.js +3 -0
  77. package/.next/standalone/.next/server/chunks/ssr/_1djqs9i27e4kg._.js +1 -1
  78. package/.next/standalone/.next/server/chunks/ssr/_next-internal_server_app_policies_page_actions_1sp2-yo5_vm5f.js +2 -2
  79. package/.next/standalone/.next/server/chunks/ssr/app_actions_get-scheduled-audit_ts_0ei9snixb5fd-._.js +1 -1
  80. package/.next/standalone/.next/server/chunks/ssr/app_audit__components_audit-dashboard_tsx_0p9ud47q0xq5w._.js +1 -1
  81. package/.next/standalone/.next/server/chunks/ssr/app_global-error_tsx_1kp6l3x33jqb6._.js +1 -1
  82. package/.next/standalone/.next/server/chunks/ssr/app_policies_hooks-client_tsx_19dqvpcz0uxur._.js +2 -2
  83. package/.next/standalone/.next/server/chunks/ssr/app_settings_02tf1h47jmhhd._.js +1 -1
  84. package/.next/standalone/.next/server/chunks/ssr/{node_modules_html-to-image_es_index_1i8oid1gc7s1f.js → node_modules_html-to-image_es_index_0tqc05n832v7a.js} +1 -1
  85. package/.next/standalone/.next/server/chunks/ssr/package_json_[json]_cjs_013tntikdft59._.js +1 -1
  86. package/.next/standalone/.next/server/chunks/ssr/src_hooks_0agdmptetetdt._.js +1 -1
  87. package/.next/standalone/.next/server/chunks/ssr/src_hooks_0mdwgjisv4fub._.js +1 -1
  88. package/.next/standalone/.next/server/chunks/ssr/src_hooks_fp-config_ts_04t589gp4p60j._.js +1 -1
  89. package/.next/standalone/.next/server/chunks/ssr/src_hooks_pack-cli_ts_0t7me658zqmh_._.js +1 -1
  90. package/.next/standalone/.next/server/middleware-build-manifest.js +3 -3
  91. package/.next/standalone/.next/server/pages/404.html +1 -1
  92. package/.next/standalone/.next/server/pages/500.html +1 -1
  93. package/.next/standalone/.next/server/preview-props.json +3 -3
  94. package/.next/standalone/.next/server/server-reference-manifest.js +1 -1
  95. package/.next/standalone/.next/server/server-reference-manifest.json +23 -23
  96. package/.next/standalone/.next/static/chunks/{1b32-afqacaen.js → 0el9n3h9_zp5m.js} +1 -1
  97. package/.next/standalone/.next/static/chunks/0k7g_8x3o6gd-.js +1 -0
  98. package/.next/standalone/.next/static/chunks/{42e8zab314654.js → 0umzct31duk5g.js} +1 -1
  99. package/.next/standalone/.next/static/chunks/{24w3x2da9sk49.js → 0wobqgosirs8p.js} +1 -1
  100. package/.next/standalone/.next/static/chunks/12rug3jilwqzs.js +1 -0
  101. package/.next/standalone/.next/static/chunks/{2-tf6_7u623kd.js → 1kduj74-715jh.js} +1 -1
  102. package/.next/standalone/.next/static/chunks/2701amhrbsbot.js +1 -0
  103. package/.next/standalone/.next/static/chunks/{18433qz-8njv3.js → 27cavoc8paelg.js} +1 -1
  104. package/.next/standalone/.next/static/chunks/{0_zfad4co-t2z.js → 2ve23a7keupjw.js} +1 -1
  105. package/.next/standalone/.next/static/chunks/3bv6xaoitjpnh.js +6 -0
  106. package/.next/standalone/app/actions/update-jev-config.ts +5 -3
  107. package/.next/standalone/app/settings/jev-panel.tsx +1 -1
  108. package/.next/standalone/fp-cloud-cli/CHANGELOG.md +28 -18
  109. package/.next/standalone/fp-cloud-cli/README.md +127 -9
  110. package/.next/standalone/fp-cloud-cli/fp_cli/app.py +15 -1
  111. package/.next/standalone/fp-cloud-cli/fp_cli/client.py +199 -34
  112. package/.next/standalone/fp-cloud-cli/fp_cli/cloud_output.py +523 -0
  113. package/.next/standalone/fp-cloud-cli/fp_cli/commands/_cloud.py +45 -0
  114. package/.next/standalone/fp-cloud-cli/fp_cli/commands/_write.py +3 -1
  115. package/.next/standalone/fp-cloud-cli/fp_cli/commands/account_cmds.py +171 -0
  116. package/.next/standalone/fp-cloud-cli/fp_cli/commands/agent_cmds.py +80 -7
  117. package/.next/standalone/fp-cloud-cli/fp_cli/commands/alerts_cmds.py +23 -0
  118. package/.next/standalone/fp-cloud-cli/fp_cli/commands/audits_cmds.py +2 -0
  119. package/.next/standalone/fp-cloud-cli/fp_cli/commands/contracts_cmds.py +67 -0
  120. package/.next/standalone/fp-cloud-cli/fp_cli/commands/dashboards_cmds.py +159 -0
  121. package/.next/standalone/fp-cloud-cli/fp_cli/commands/evaluators_cmds.py +380 -0
  122. package/.next/standalone/fp-cloud-cli/fp_cli/commands/events_cmds.py +14 -1
  123. package/.next/standalone/fp-cloud-cli/fp_cli/commands/fleet_cmds.py +12 -216
  124. package/.next/standalone/fp-cloud-cli/fp_cli/commands/incidents_cmds.py +82 -6
  125. package/.next/standalone/fp-cloud-cli/fp_cli/commands/list_cmds.py +4 -1
  126. package/.next/standalone/fp-cloud-cli/fp_cli/commands/orgs_cmds.py +17 -0
  127. package/.next/standalone/fp-cloud-cli/fp_cli/commands/policies_cmds.py +143 -1
  128. package/.next/standalone/fp-cloud-cli/fp_cli/commands/queries_cmds.py +70 -0
  129. package/.next/standalone/fp-cloud-cli/fp_cli/commands/sentiment_cmds.py +49 -0
  130. package/.next/standalone/fp-cloud-cli/fp_cli/commands/sessions_cmds.py +95 -1
  131. package/.next/standalone/fp-cloud-cli/fp_cli/commands/settings_cmds.py +2 -0
  132. package/.next/standalone/fp-cloud-cli/fp_cli/commands/usage_cmds.py +21 -1
  133. package/.next/standalone/fp-cloud-cli/fp_cli/commands/users_cmds.py +14 -0
  134. package/.next/standalone/fp-cloud-cli/fp_cli/enforcement.py +7 -53
  135. package/.next/standalone/fp-cloud-cli/fp_cli/errors.py +3 -0
  136. package/.next/standalone/fp-cloud-cli/fp_cli/evaluator_spec.py +266 -0
  137. package/.next/standalone/fp-cloud-cli/fp_cli/output.py +189 -152
  138. package/.next/standalone/fp-cloud-cli/fp_cli/theme.py +21 -24
  139. package/.next/standalone/fp-cloud-cli/skill/SKILL.md +124 -23
  140. package/.next/standalone/fp-cloud-cli/skill/agents/openai.yaml +2 -1
  141. package/.next/standalone/fp-cloud-cli/skill/references/commands.md +173 -22
  142. package/.next/standalone/fp-cloud-cli/tests/fake_cloud_smoke.py +312 -0
  143. package/.next/standalone/fp-cloud-cli/tests/test_cloud_account.py +125 -0
  144. package/.next/standalone/fp-cloud-cli/tests/test_cloud_agent.py +253 -0
  145. package/.next/standalone/fp-cloud-cli/tests/test_cloud_human_views.py +287 -0
  146. package/.next/standalone/fp-cloud-cli/tests/test_cloud_jev.py +32 -197
  147. package/.next/standalone/fp-cloud-cli/tests/test_cloud_observability.py +116 -0
  148. package/.next/standalone/fp-cloud-cli/tests/test_cloud_transport.py +141 -0
  149. package/.next/standalone/fp-cloud-cli/tests/test_commands.py +3 -3
  150. package/.next/standalone/fp-cloud-cli/tests/test_dashboards_agent.py +3 -3
  151. package/.next/standalone/fp-cloud-cli/tests/test_evaluator_authoring.py +449 -0
  152. package/.next/standalone/fp-cloud-cli/tests/test_facets.py +1 -1
  153. package/.next/standalone/fp-cloud-cli/tests/test_help_table_coverage.py +15 -0
  154. package/.next/standalone/fp-cloud-cli/tests/test_operator.py +1 -1
  155. package/.next/standalone/fp-cloud-cli/tests/test_orgs.py +1 -1
  156. package/.next/standalone/fp-cloud-cli/tests/test_output.py +37 -37
  157. package/.next/standalone/fp-cloud-cli/tests/test_round4_behaviour.py +144 -0
  158. package/.next/standalone/fp-cloud-cli/tests/test_screen_language.py +80 -0
  159. package/.next/standalone/fp-cloud-cli/tests/test_session_reevaluate.py +33 -0
  160. package/.next/standalone/fp-cloud-cli/tests/test_staging_parity.py +198 -0
  161. package/.next/standalone/fp-cloud-cli/tests/test_whoami.py +1 -1
  162. package/.next/standalone/hermes-plugin/__init__.py +11 -0
  163. package/.next/standalone/hermes-plugin/plugin.yaml +1 -1
  164. package/.next/standalone/package.json +11 -10
  165. package/.next/standalone/sdk/python/uv.lock +31 -8
  166. package/.next/standalone/sdk/typescript/integration/fixtures/ai-4/package-lock.json +68 -176
  167. package/.next/standalone/sdk/typescript/integration/fixtures/ai-4/package.json +2 -2
  168. package/.next/standalone/sdk/typescript/integration/fixtures/ai-5/package-lock.json +4 -4
  169. package/.next/standalone/sdk/typescript/integration/fixtures/ai-5/package.json +1 -1
  170. package/.next/standalone/sdk/typescript/integration/fixtures/ai-6/package-lock.json +7 -7
  171. package/.next/standalone/sdk/typescript/integration/fixtures/ai-6/package.json +1 -1
  172. package/.next/standalone/sdk/typescript/integration/fixtures/ai-7/package-lock.json +7 -7
  173. package/.next/standalone/sdk/typescript/integration/fixtures/ai-7/package.json +1 -1
  174. package/.next/standalone/sdk/typescript/integration/fixtures/langchain-0.3/package-lock.json +98 -115
  175. package/.next/standalone/sdk/typescript/integration/fixtures/langchain-0.3/package.json +3 -3
  176. package/.next/standalone/sdk/typescript/integration/fixtures/langchain-1/package-lock.json +4 -4
  177. package/.next/standalone/sdk/typescript/integration/fixtures/langchain-1/package.json +1 -1
  178. package/.next/standalone/sdk/typescript/integration/fixtures/langchain-dup-core/package-lock.json +4 -4
  179. package/.next/standalone/sdk/typescript/integration/fixtures/langchain-dup-core/package.json +1 -1
  180. package/.next/standalone/sdk/typescript/integration/fixtures/llamaindex-0.11/package-lock.json +149 -171
  181. package/.next/standalone/sdk/typescript/integration/fixtures/llamaindex-0.11/package.json +2 -2
  182. package/.next/standalone/sdk/typescript/integration/fixtures/llamaindex-0.12/package-lock.json +4 -4
  183. package/.next/standalone/sdk/typescript/integration/fixtures/llamaindex-0.12/package.json +1 -1
  184. package/.next/standalone/sdk/typescript/integration/fixtures/mastra-0/package-lock.json +25 -25
  185. package/.next/standalone/sdk/typescript/integration/fixtures/mastra-0/package.json +1 -1
  186. package/.next/standalone/sdk/typescript/integration/fixtures/mastra-1/package-lock.json +7 -7
  187. package/.next/standalone/sdk/typescript/integration/fixtures/mastra-1/package.json +1 -1
  188. package/.next/standalone/sdk/typescript/integration/fixtures/nextjs/package-lock.json +10 -10
  189. package/.next/standalone/sdk/typescript/integration/fixtures/nextjs/package.json +1 -1
  190. package/.next/standalone/sdk/typescript/integration/fixtures/runtimes/package-lock.json +7 -7
  191. package/.next/standalone/sdk/typescript/integration/fixtures/runtimes/package.json +1 -1
  192. package/.next/standalone/server.js +1 -1
  193. package/dist/cli.mjs +1760 -638
  194. package/dist/worker.mjs +426 -76
  195. package/hermes-plugin/__init__.py +11 -0
  196. package/hermes-plugin/plugin.yaml +1 -1
  197. package/package.json +11 -10
  198. package/src/audit/open-browser.ts +24 -7
  199. package/src/hooks/agent-roster.ts +9 -1
  200. package/src/hooks/agent-skill.ts +206 -0
  201. package/src/hooks/cloud-connection.ts +27 -51
  202. package/src/hooks/cloud-introspect.ts +5 -2
  203. package/src/hooks/cloud-login.ts +248 -0
  204. package/src/hooks/cloud-managed-policies.ts +54 -4
  205. package/src/hooks/codex-system-hooks.ts +10 -4
  206. package/src/hooks/config-status.ts +9 -3
  207. package/src/hooks/configure-wizard.ts +356 -32
  208. package/src/hooks/delivery-health.ts +47 -2
  209. package/src/hooks/effective-reviewers.ts +14 -0
  210. package/src/hooks/fp-config.ts +19 -0
  211. package/src/hooks/fp-home.ts +1 -1
  212. package/src/hooks/handler.ts +43 -5
  213. package/src/hooks/hook-activity-store.ts +7 -1
  214. package/src/hooks/integrations.ts +18 -3
  215. package/src/hooks/jev-activity.ts +117 -1
  216. package/src/hooks/jev-cli.ts +7 -9
  217. package/src/hooks/manager.ts +80 -46
  218. package/src/hooks/policy-evaluator.ts +17 -0
  219. package/src/hooks/policy-reviewability.ts +4 -2
  220. package/src/hooks/semantic/cloud-jev.ts +219 -28
  221. package/src/hooks/semantic/combine.ts +26 -1
  222. package/src/hooks/semantic/intent.ts +127 -24
  223. package/src/hooks/semantic/jev-client.ts +1 -1
  224. package/src/hooks/semantic/jev-config.ts +6 -27
  225. package/src/hooks/semantic/jev-review.ts +111 -4
  226. package/src/hooks/tui.ts +280 -0
  227. package/src/hooks/uninstall-cli.ts +12 -1
  228. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0588st-tpiuia._.js +0 -3
  229. package/.next/standalone/.next/server/chunks/ssr/_128ebxr83nk6g._.js +0 -3
  230. package/.next/standalone/.next/static/chunks/0jutamwqz8pg5.js +0 -1
  231. package/.next/standalone/.next/static/chunks/114hbolvrv94e.js +0 -1
  232. package/.next/standalone/.next/static/chunks/1p-hsi58i-6h0.js +0 -6
  233. package/.next/standalone/.next/static/chunks/3-pku9qwv1yfu.js +0 -1
  234. /package/.next/standalone/.next/static/{xq8UgF5yFxty1VWxY2hyn → D7LY1YSrw96ZxKSpxxrFw}/_buildManifest.js +0 -0
  235. /package/.next/standalone/.next/static/{xq8UgF5yFxty1VWxY2hyn → D7LY1YSrw96ZxKSpxxrFw}/_clientMiddlewareManifest.js +0 -0
  236. /package/.next/standalone/.next/static/{xq8UgF5yFxty1VWxY2hyn → D7LY1YSrw96ZxKSpxxrFw}/_ssgManifest.js +0 -0
@@ -10,7 +10,7 @@
10
10
  * `writeJsonAtomically` the CLI's `jev setup` calls, with the same
11
11
  * `{ mode: 0o600, dirMode: 0o700 }`, after the same `validateJevConfig` the
12
12
  * loader itself runs. Nothing here re-states a rule that lives in
13
- * `jev-config.ts`: not the URL scheme, not "plain http only in observe mode",
13
+ * `jev-config.ts`: not the URL scheme, not "plain http to loopback only",
14
14
  * not "cloudflare needs an account id". A second copy of those rules is how the
15
15
  * dashboard ends up writing a file the hooks then refuse — the exact failure
16
16
  * mode this module exists to avoid.
@@ -101,6 +101,7 @@ import { chmodSync, existsSync, statSync, unlinkSync } from "node:fs";
101
101
  import { dirname } from "node:path";
102
102
  import { headers } from "next/headers";
103
103
  import { writeJsonAtomically } from "@/lib/atomic-write";
104
+ import { CLOUD_MANAGED_JEV_MODE, cloudManagesJevMode } from "@/src/hooks/fp-config";
104
105
  import {
105
106
  hostnameFromHostHeader,
106
107
  isLoopbackHostname,
@@ -475,8 +476,8 @@ export async function saveJevConfigAction(input: JevConfigInput): Promise<JevWri
475
476
  * endpoint and the provider are exactly what they were. It is written the way
476
477
  * every other write here is (`writeJsonAtomically`, 0600, owner-only
477
478
  * directory), after the loader's own validator has checked the result with
478
- * stand-ins in the key slots, so `enforce` is refused where the loader would
479
- * refuse it (plain http to localhost) rather than written and then ignored.
479
+ * stand-ins in the key slots, so a mode the loader would refuse is refused
480
+ * here rather than written and then ignored.
480
481
  *
481
482
  * Refused for a file the loader calls too open: someone else may have written
482
483
  * the endpoint it names, and re-saving it at 0600 would start trusting that
@@ -489,6 +490,7 @@ export async function setJevModeAction(requested: string): Promise<JevWriteResul
489
490
  if (mode === null) {
490
491
  return { ok: false, problem: 'mode must be "off", "observe" or "enforce".' };
491
492
  }
493
+ if (cloudManagesJevMode()) return { ok: false, problem: CLOUD_MANAGED_JEV_MODE };
492
494
 
493
495
  const existingFile = readJevConfigFileForUpdate();
494
496
  if (existingFile === null) {
@@ -45,7 +45,7 @@
45
45
  * and a save leaves whatever is stored alone.
46
46
  *
47
47
  * Client-side validation here is a convenience only. Every rule — the URL
48
- * scheme, plain http being refused outside observe mode, cloudflare's account id
48
+ * scheme (plain http to loopback only), cloudflare's account id
49
49
  * — is enforced server-side by the same `validateJevConfig` the loader runs.
50
50
  *
51
51
  * ## FailproofAI Cloud
@@ -4,30 +4,30 @@
4
4
 
5
5
  ### Added
6
6
 
7
+ - Hosted evaluator authoring for code, LLM judge and Jev: create/deploy, AI draft specs, dry-run, labels, toggles, instances, schema, jobs and backfill.
8
+ - Dashboards and tiles; session overview/export/history/re-evaluate; latency and sentiment; query composition/export; alert recipients/issues and agent contracts.
9
+ - Policy author/backtest/candidacy, assistant artifact tables, fail-closed interactive write approvals, and agent-curated home briefs.
10
+ - Organization creation, permission-set roles, member deletion/defaults, usage windows, offers/trial, model context windows, OTEL and Slack controls.
11
+ - `fp policies backtest` covers every policy kind: a published `jev`/`both` policy, or `--semantic checks.json` (with or without a source file), runs the dashboard's every-kind backtest — a free estimate by default, `--run [--sample N]` to spend Jev allowance. New `--kind --semantic --hours --agent-id --env --run --sample`; a regex file or id still uses the module backtest.
12
+ - `fp policies author --kind regex|jev|both` asks the assistant for Jev checks or a hybrid policy.
13
+ - `fp issues list|count` take the inbox filters (`--agent-id --env --machine --source --audit-id --assignee --archived --search --since`, and `count --alert-id`); new `fp issues facets` lists the values they can take.
14
+ - `fp sessions import FILE...` imports Claude Code transcripts, Codex rollouts or event JSONL (`--format --env --dry-run`), as the dashboard's import dialog does.
15
+ - `fp list trigger_events`, `fp list eval_envs` and `fp list metric_keys`.
7
16
  - `fp fleet deploy --target POLICY=INTEGRATION[/agt_ID]` scopes a machine's assignment; repeat the flag to include multiple alternatives. `--all-agents POLICY` explicitly clears its scope. Deploy plans, show, history, rollback and JSON readback retain assignment targets.
8
17
  - `fp policies publish <id> --kind regex|jev|both [--source f.mjs] [--semantic f.json]`: a
9
18
  FailproofAI Cloud policy can carry Jev checks — `jev` (declarations only, no JavaScript) or
10
19
  `both` (JavaScript reviewable by exactly its own checks; the server derives the authority).
11
20
  The kind follows from what is given when `--kind` is omitted, and a kind that contradicts its
12
21
  inputs is exit 2 before anything is sent. The positional source still works.
13
- - `fp fleet deploy … --jev-mode off|observe|enforce|local` sets the machine's Jev mode from
14
- FailproofAI Cloud (overriding the machine's own; `local` hands it back). Omitted, the request
15
- carries no `jevMode` and the mode is unchanged; `--jev-mode` alone is a valid deploy. An
16
- `observe` effect on a `jev` policy is refused (exit 2) — Jev is observed through the mode.
17
- - `fp fleet jev-mode <machine…|--all> <mode>` changes only the Jev mode, through its own
18
- route (`PUT /api/enforcement/deployments/{id}/jev-mode`), never the policy set — and
19
- `fp fleet deploy --jev-mode` with no change to the set now uses it too. A deploy is a full
20
- replace of the set the CLI read, which leaves out disabled policies' assignments, so a
21
- mode change sent as a deploy deleted them and reverted concurrent edits.
22
- - `fp fleet rollback` says which Jev mode it restores (`jev mode <now> → <then>`, and
23
- `jevModeBefore` in `--json`); `fp fleet history` shows each generation's Jev mode and marks a
24
- mode-only generation as a change.
25
- - The `--jev-mode` and `fleet jev-mode` help says what `enforce` does: Jev's checks block calls
26
- as well as clearing what they review, machine-wide (installed packs' checks included); an
27
- `observe` effect on a `both` policy withholds its Jev checks.
28
- - The `fleet deploy`, `fleet jev-mode` and `policies publish` help says Jev checks run on
29
- FailproofAI Cloud and nothing is installed on the machine, and `fleet show`/`fleet jev-mode`
30
- name the reasons a machine with a mode cannot ask (`jev_unconfigured`, `transcripts_disabled`)
22
+ - No Jev mode is set by hand: FailproofAI Cloud derives a machine's Jev mode from what is
23
+ deployed to it (on while a `jev`/`both` policy is, off otherwise), so `fp fleet deploy` has
24
+ no `--jev-mode` and there is no `fp fleet jev-mode`. An `observe` effect applies to `jev`
25
+ and `both` policies like any other: their checks are recorded and decide nothing.
26
+ - `fp fleet rollback` says when the Jev mode differs (`jev mode <now> → <then>`, and
27
+ `jevModeBefore` in `--json`); `fp fleet history` shows each generation's Jev mode.
28
+ - The `fleet deploy` and `policies publish` help says Jev checks run on
29
+ FailproofAI Cloud and nothing is installed on the machine, and `fleet show`
30
+ names the reasons a machine with a mode cannot ask (`jev_unconfigured`, `transcripts_disabled`)
31
31
  and the `jev_budget` report.
32
32
  - `fp policies list/show` print each version's kind and Jev check names (`show` also the
33
33
  declarations); `fp fleet list/show` print the machine's Jev mode and the policy errors it
@@ -50,6 +50,9 @@
50
50
 
51
51
  ### Changed
52
52
 
53
+ - New Cloud API families work in key mode; unsupported session-only commands deny before HTTP and unknown-route 404s exit 6 with an availability message.
54
+ - Shared screens use the mint/pink wordmark and grey labels, without boxes/rules or shortened ids; existing JSON contracts are unchanged.
55
+ - The agent skill, command reference, README and Cloud CLI docs include end-to-end evaluator workflows. No version bump or release is performed.
53
56
  - `fp policies publish`'s refusal of Jev fields in the JavaScript now says where Jev checks go:
54
57
  the policy's own declarations, `--kind both --semantic checks.json`.
55
58
  - `fp guardrails summary` shows how many machines run Jev in each mode, reading the summary's
@@ -65,6 +68,13 @@
65
68
 
66
69
  ### Fixed
67
70
 
71
+ - Remove the unused colour-keyed permission rank, document full-id rendering, emit UTC `Z` timestamps for deploy backfills, and report approval-answer failures without a traceback while restoring the terminal (#885).
72
+ - Reject natural-language binary judge steps, distinguish unknown routes from missing records on 404, normalize standalone backfill ranges to UTC `Z`, expose all subcommands in help, and render artifact headers before titles with consistent session-only wording (#885).
73
+ - New Cloud commands use deliberate human summaries/tables and actionable empty states at 80/140 columns without raw response blobs. Evaluator previews display before writes and require explicit `--force` after failures; plan/claim deny key mode, deploy specs can omit the positional key, and older settings-route 404s degrade clearly. Existing JSON payloads stay unchanged (#885).
74
+ - `fp evaluators deploy` keeps the previous version's condition and labels unless `--condition`/`--label` change them, so a new version no longer silently widens to every session (#885).
75
+ - Evaluation backfill covers code, LLM judge and Jev evaluators, as FailproofAI Cloud now does: `fp evaluators deploy --backfill` no longer refuses judge/Jev, and both commands warn that judge/Jev backfills spend model budget instead of saying they are skipped.
76
+ - `fp usage windows` says it needs an API key (the dashboard has no session route for it) instead of reporting the route as unavailable.
77
+ - `fp issues close --help` no longer claims exit 9 for an issue that already ended: it is exit 1, as it always was, and it names `fp audits dismiss` rather than a command that does not exist.
68
78
  - `fp fleet history` keeps `gen`, `when` and `jev` visible at 80 columns (rollback needs `gen`): the policy list is shortened, then dropped, and `change` wraps first.
69
79
  - `fp fleet show` and `fp fleet history` name an exact-profile target by the profile label the machine reports (`claude/.claude-work`, with the `agt_…` id kept in `show`), falling back to the bare id.
70
80
 
@@ -144,19 +144,17 @@ earlier version is), `jev` (Jev checks only, from a JSON file of declarations
144
144
  each exactly a failproofai pack manifest's semantic entry), or `both`
145
145
  (JavaScript whose verdict its own Jev checks may clear, deployed as one).
146
146
  Jev checks run on FailproofAI Cloud; nothing is installed on the machine.
147
- `--jev-mode` sets a machine's Jev mode from FailproofAI Cloud, overriding the
148
- machine's own; omit it and the mode is left alone. Under `observe` or `enforce`
149
- the machine sends each checked tool call to FailproofAI Cloud, which asks the
150
- checks deployed to it. The mode is the machine's, so it covers installed packs'
151
- checks too, and in `enforce` Jev's checks **block** calls as well as clearing
152
- the regex verdicts they review. `fp fleet jev-mode` changes only the mode, and
153
- never rewrites a machine's policy set.
147
+ While a `jev` or `both` policy is deployed to a machine, FailproofAI Cloud
148
+ turns Jev on there and the machine sends each checked tool call to it; with
149
+ none, Jev is off. There is no Jev mode to set: trial a policy with `:observe`
150
+ (its checks are recorded, never applied), then deploy it as `enforce`, where
151
+ Jev's checks **block** calls as well as clearing the regex verdicts they
152
+ review.
154
153
 
155
154
  ```bash
156
155
  fp policies publish prod-db-intent --kind jev --semantic ./checks.json
157
156
  fp policies publish no-prod-db --kind both --source ./rule.mjs --semantic ./checks.json
158
- fp fleet deploy ci-runner-01 --add prod-db-intent --jev-mode observe
159
- fp fleet jev-mode --all enforce # the mode alone, every machine with a deployment
157
+ fp fleet deploy ci-runner-01 --add prod-db-intent:observe
160
158
  fp fleet show ci-runner-01 # its Jev mode, and any policy errors it reported
161
159
  ```
162
160
 
@@ -213,6 +211,126 @@ These commands are **session-only** (`fp login`). They are absent from the
213
211
  versioned API an API key authenticates against, so `--api-key` exits 2 with the
214
212
  reason rather than failing at the request.
215
213
 
214
+ ## Author an evaluator
215
+
216
+ `fp evaluators` authors hosted definitions; `fp evals` continues to read results.
217
+ Creation enables a definition by default. Check `fp evaluators instances` first:
218
+ Cloud needs an enabled managed instance. Writes need `evaluations:trigger`;
219
+ session dry-runs and `evaluators schema` also need `events:read`.
220
+
221
+ Write `error_free.py` as a restricted Python expression (no imports or functions):
222
+
223
+ ```python
224
+ EvalResult(score=Score(1.0 if session.count("error") == 0 else 0.0), reasoning="Error-free session")
225
+ ```
226
+
227
+ ```bash
228
+ fp --json evaluators create --key error_free --name "Error free" --code error_free.py \
229
+ --result-kind score --dry-run-on run-001
230
+ fp --json evaluators dry-run --code error_free.py --session run-001
231
+ fp --json evaluators deploy error_free --code error_free.py --version 2 --dry-run-on run-001
232
+ fp --json evaluators list --key error_free --all
233
+ ```
234
+
235
+ LLM judge (Cloud selects the model; judge dry-runs are refused):
236
+
237
+ ```bash
238
+ fp --json evaluators create --key relevance --name Relevance --judge \
239
+ --criteria "Grade how directly the answer addresses the request" --threshold 0.7
240
+ fp --json evaluators deploy relevance --version 2 --judge \
241
+ --criteria "Grade relevance and completeness" --threshold 0.8
242
+ fp --json sessions re-evaluate run-001
243
+ fp --json sessions history run-001
244
+ ```
245
+
246
+ Jev binary or graded rubric:
247
+
248
+ ```bash
249
+ fp --json evaluators create --key resolved --name Resolved --jev noul \
250
+ --instructions "Was the request resolved?" --true "Resolved" --false "Unresolved"
251
+ fp --json evaluators dry-run --jev noul --instructions "Was the request resolved?" \
252
+ --true "Resolved" --false "Unresolved" --session run-001
253
+ fp --json evaluators deploy resolved --version 2 --jev score \
254
+ --instructions "Grade resolution quality" \
255
+ --level "Unresolved" --level "Partly resolved" --level "Fully resolved"
256
+ ```
257
+
258
+ Jev dry-runs spend model budget. Rubrics need 3–5 distinct levels, worst first.
259
+ Thresholds are 0–1; judge/Jev always return a score. `deploy` creates the new
260
+ immutable version before disabling older enabled versions. If disabling fails,
261
+ the CLI names the published id; inspect `list --all` and recover explicitly.
262
+ `--backfill 7d` works for every kind (judge/Jev spend model budget); `evaluators backfill --from T --to T` accepts ≤90 days and `--dry-run` counts the work first.
263
+
264
+ Human output shows each `--dry-run-on` session's outcome before creation or
265
+ deployment. Any failed run stops the write; after reviewing the failure, an
266
+ explicit `--force` overrides this guard. Existing `--json` response shapes stay
267
+ unchanged.
268
+
269
+ AI drafting is session-only and writes an API spec that create/deploy accept:
270
+
271
+ ```bash
272
+ fp login
273
+ fp --json evaluators draft "Measure error-free sessions with code" --kind code --out evaluator.json
274
+ # Review the spec, especially eval_key and evaluator_source, before enabling it.
275
+ fp --json evaluators create --file evaluator.json --dry-run-on run-001
276
+ fp --json evaluators dry-run --file evaluator.json
277
+ ```
278
+
279
+ Spec fields: `eval_key`, `display_name`, `eval_version`, `result_kind`, `labels`,
280
+ `condition_source`, `evaluator_source`, `timeout_seconds`. Judge/Jev sources are
281
+ JSON envelope **strings**, not nested objects. `--file` is exclusive with discrete
282
+ spec flags; deploy may override a file's version. Files written by the CLI are
283
+ created exclusively, so existing files are never silently replaced.
284
+ See [the command reference](skill/references/commands.md#author-an-evaluator).
285
+
286
+ ## Dashboard parity
287
+
288
+ ```text
289
+ fp dashboards list|show|create|update|delete
290
+ fp dashboards tiles <id> list|add|update|remove|layout
291
+ fp sessions show|export|history|re-evaluate <id>
292
+ fp events latency
293
+ fp sentiment summary|messages|sessions|session <id>
294
+ fp query compose "question" [--run] # session
295
+ fp query export [<id>] [--sql SQL] --format csv|json [--out FILE]
296
+ fp alerts recipients
297
+ fp alerts issues <id> [--create --title ... --summary ...]
298
+ fp audits contracts list|show|create|update
299
+ fp policies author "intent"|backtest <file-or-id>|candidacy --issue <id> # session
300
+ fp agent brief [--range 24h|7d] # session
301
+ fp orgs create --name N [--slug S] # session
302
+ fp roles list|show|create|update|delete
303
+ fp users delete <id>
304
+ fp users defaults
305
+ fp usage windows
306
+ fp plan # session
307
+ fp plan claim <offer> # session
308
+ fp settings context-windows list|set <model> <tokens>|delete <model>
309
+ fp otel status|enable|disable
310
+ fp slack status|disconnect # session
311
+ ```
312
+
313
+ `fp agent ask` runs artifact SQL through the permission-gated query runner and
314
+ renders tables/stats. It prompts before approving a write on a terminal.
315
+ Scripts and `--json` **decline** unless you explicitly pass `--approve`.
316
+ Normal create/update commands keep their existing non-interactive confirmation
317
+ behavior; assistant approvals are a separate safety boundary.
318
+
319
+ All new commands accept the global `--json` before the command. Session-only
320
+ commands fail before HTTP in API-key mode, with exit 2 and a `fp login` hint.
321
+ Unknown-route 404s exit 6 with “not available on this FailproofAI Cloud yet”.
322
+ Missing-record 404s also exit 6 but report that the record was not found.
323
+ `plan` and `plan claim` require a signed-in person and deny API-key mode before
324
+ HTTP with the standard `fp login` message.
325
+ Human screens use the mint/pink wordmark, grey labels, open tables and full ids;
326
+ existing JSON shapes are unchanged.
327
+
328
+ Human commands show summaries, tables and wrapped text rather than response
329
+ objects. Use global `--json` for raw API results. For `sessions export` or
330
+ `query export --format json`, use `--out FILE` to save the JSON; without either
331
+ option, the terminal shows a readable session or query view. CSV exports remain
332
+ plain CSV for piping.
333
+
216
334
  ## Configuration
217
335
 
218
336
  | Setting | Flag | Env var | Default |
@@ -17,12 +17,15 @@ from . import orgs as orgsmod
17
17
  from ._context import AppState
18
18
  from ._version import __version__
19
19
  from .commands import (
20
+ account_cmds,
20
21
  agent_cmds,
21
22
  alerts_cmds,
22
23
  audits_cmds,
23
24
  auth_cmds,
25
+ dashboards_cmds,
24
26
  errors_cmds,
25
27
  evals_cmds,
28
+ evaluators_cmds,
26
29
  events_cmds,
27
30
  fleet_cmds,
28
31
  guardrails_cmds,
@@ -33,6 +36,7 @@ from .commands import (
33
36
  policies_cmds,
34
37
  queries_cmds,
35
38
  sessions_cmds,
39
+ sentiment_cmds,
36
40
  settings_cmds,
37
41
  usage_cmds,
38
42
  users_cmds,
@@ -128,6 +132,12 @@ app = typer.Typer(
128
132
  # function Typer calls for this; falls back silently if its internals change.
129
133
  try: # pragma: no cover - exercised via real command output, not unit assertions
130
134
  import typer.rich_utils as _rich_utils
135
+ # Keep generated subcommand help on the same shared screen primitives.
136
+ _rich_utils.Panel = output.Panel
137
+ _rich_utils.Table = output.Table
138
+ _rich_utils.STYLE_OPTION = output.theme.PINK
139
+ _rich_utils.STYLE_COMMANDS_TABLE_FIRST_COLUMN = output.theme.PINK
140
+ _rich_utils.STYLE_OPTION_ENVVAR = output.theme.LABEL
131
141
 
132
142
  import re as _re
133
143
 
@@ -327,7 +337,7 @@ def main(
327
337
  "must be a positive number of seconds.", param_hint="--timeout"
328
338
  )
329
339
  cfg = cfgmod.load_config()
330
- output.configure(no_color=no_color, quiet=quiet, json=json_output)
340
+ output.configure(no_color=no_color, quiet=quiet, json=json_output, context=ctx.invoked_subcommand or "Cloud")
331
341
  # Resolve the credential BEFORE telemetry starts: the distinct-id depends on it.
332
342
  # `get_parameter_source` is what separates a flag from its env var — the values
333
343
  # alone cannot, and the precedence rules differ between the two (see resolve_auth).
@@ -452,6 +462,9 @@ orgs_cmds.register(app)
452
462
  events_cmds.register(app)
453
463
  sessions_cmds.register(app)
454
464
  evals_cmds.register(app)
465
+ evaluators_cmds.register(app)
466
+ dashboards_cmds.register(app)
467
+ sentiment_cmds.register(app)
455
468
  errors_cmds.register(app)
456
469
  usage_cmds.register(app)
457
470
  list_cmds.register(app)
@@ -466,6 +479,7 @@ agent_cmds.register(app)
466
479
  policies_cmds.register(app)
467
480
  fleet_cmds.register(app)
468
481
  guardrails_cmds.register(app)
482
+ account_cmds.register(app)
469
483
 
470
484
 
471
485
  def _elapsed_ms(start: float) -> int: