fruxon 2.3.2__tar.gz → 2.3.4__tar.gz

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 (235) hide show
  1. {fruxon-2.3.2 → fruxon-2.3.4}/HISTORY.md +15 -0
  2. {fruxon-2.3.2 → fruxon-2.3.4}/PKG-INFO +3 -3
  3. {fruxon-2.3.2 → fruxon-2.3.4}/README.md +2 -2
  4. {fruxon-2.3.2 → fruxon-2.3.4}/src/fruxon/_version.py +2 -2
  5. {fruxon-2.3.2 → fruxon-2.3.4}/src/fruxon/checks/ledger.py +87 -1
  6. {fruxon-2.3.2 → fruxon-2.3.4}/src/fruxon/cli/auth.py +2 -0
  7. {fruxon-2.3.2 → fruxon-2.3.4}/src/fruxon/cli/integrations_sandbox.py +91 -3
  8. {fruxon-2.3.2 → fruxon-2.3.4}/src/fruxon/cli/triggers.py +18 -1
  9. {fruxon-2.3.2 → fruxon-2.3.4}/src/fruxon/cli/triggers_check.py +3 -0
  10. {fruxon-2.3.2 → fruxon-2.3.4}/src/fruxon/fruxon.py +22 -0
  11. {fruxon-2.3.2 → fruxon-2.3.4}/src/fruxon/models.py +11 -0
  12. {fruxon-2.3.2 → fruxon-2.3.4}/src/fruxon/skills/fruxon-build-agent/SKILL.md +2 -1
  13. {fruxon-2.3.2 → fruxon-2.3.4}/src/fruxon/skills/fruxon-meet/SKILL.md +1 -1
  14. {fruxon-2.3.2 → fruxon-2.3.4}/src/fruxon/ui.py +17 -1
  15. {fruxon-2.3.2 → fruxon-2.3.4}/tests/test_checks_ledger.py +63 -0
  16. {fruxon-2.3.2 → fruxon-2.3.4}/tests/test_integration_sandbox_cli.py +101 -0
  17. {fruxon-2.3.2 → fruxon-2.3.4}/tests/test_triggers.py +66 -0
  18. {fruxon-2.3.2 → fruxon-2.3.4}/tests/test_ui.py +21 -2
  19. {fruxon-2.3.2 → fruxon-2.3.4}/.gitignore +0 -0
  20. {fruxon-2.3.2 → fruxon-2.3.4}/LICENSE +0 -0
  21. {fruxon-2.3.2 → fruxon-2.3.4}/pyproject.toml +0 -0
  22. {fruxon-2.3.2 → fruxon-2.3.4}/src/fruxon/__init__.py +0 -0
  23. {fruxon-2.3.2 → fruxon-2.3.4}/src/fruxon/__main__.py +0 -0
  24. {fruxon-2.3.2 → fruxon-2.3.4}/src/fruxon/_request_id.py +0 -0
  25. {fruxon-2.3.2 → fruxon-2.3.4}/src/fruxon/_ssl.py +0 -0
  26. {fruxon-2.3.2 → fruxon-2.3.4}/src/fruxon/checks/__init__.py +0 -0
  27. {fruxon-2.3.2 → fruxon-2.3.4}/src/fruxon/checks/agent.py +0 -0
  28. {fruxon-2.3.2 → fruxon-2.3.4}/src/fruxon/checks/references.py +0 -0
  29. {fruxon-2.3.2 → fruxon-2.3.4}/src/fruxon/cli/__init__.py +0 -0
  30. {fruxon-2.3.2 → fruxon-2.3.4}/src/fruxon/cli/_crash.py +0 -0
  31. {fruxon-2.3.2 → fruxon-2.3.4}/src/fruxon/cli/_last_failure.py +0 -0
  32. {fruxon-2.3.2 → fruxon-2.3.4}/src/fruxon/cli/_ledger_passes.py +0 -0
  33. {fruxon-2.3.2 → fruxon-2.3.4}/src/fruxon/cli/_plugin_hint.py +0 -0
  34. {fruxon-2.3.2 → fruxon-2.3.4}/src/fruxon/cli/_schema.py +0 -0
  35. {fruxon-2.3.2 → fruxon-2.3.4}/src/fruxon/cli/_shared.py +0 -0
  36. {fruxon-2.3.2 → fruxon-2.3.4}/src/fruxon/cli/_stream.py +0 -0
  37. {fruxon-2.3.2 → fruxon-2.3.4}/src/fruxon/cli/access_requests.py +0 -0
  38. {fruxon-2.3.2 → fruxon-2.3.4}/src/fruxon/cli/agents.py +0 -0
  39. {fruxon-2.3.2 → fruxon-2.3.4}/src/fruxon/cli/agents_approvals.py +0 -0
  40. {fruxon-2.3.2 → fruxon-2.3.4}/src/fruxon/cli/agents_budget.py +0 -0
  41. {fruxon-2.3.2 → fruxon-2.3.4}/src/fruxon/cli/agents_channels.py +0 -0
  42. {fruxon-2.3.2 → fruxon-2.3.4}/src/fruxon/cli/agents_draft.py +0 -0
  43. {fruxon-2.3.2 → fruxon-2.3.4}/src/fruxon/cli/agents_evaluations.py +0 -0
  44. {fruxon-2.3.2 → fruxon-2.3.4}/src/fruxon/cli/agents_executions.py +0 -0
  45. {fruxon-2.3.2 → fruxon-2.3.4}/src/fruxon/cli/agents_improvements.py +0 -0
  46. {fruxon-2.3.2 → fruxon-2.3.4}/src/fruxon/cli/agents_lifecycle.py +0 -0
  47. {fruxon-2.3.2 → fruxon-2.3.4}/src/fruxon/cli/agents_memory.py +0 -0
  48. {fruxon-2.3.2 → fruxon-2.3.4}/src/fruxon/cli/agents_reply_style.py +0 -0
  49. {fruxon-2.3.2 → fruxon-2.3.4}/src/fruxon/cli/agents_revisions.py +0 -0
  50. {fruxon-2.3.2 → fruxon-2.3.4}/src/fruxon/cli/agents_sandbox.py +0 -0
  51. {fruxon-2.3.2 → fruxon-2.3.4}/src/fruxon/cli/agents_sandbox_test.py +0 -0
  52. {fruxon-2.3.2 → fruxon-2.3.4}/src/fruxon/cli/agents_slots.py +0 -0
  53. {fruxon-2.3.2 → fruxon-2.3.4}/src/fruxon/cli/agents_system_blocks.py +0 -0
  54. {fruxon-2.3.2 → fruxon-2.3.4}/src/fruxon/cli/agents_tests.py +0 -0
  55. {fruxon-2.3.2 → fruxon-2.3.4}/src/fruxon/cli/agents_topics.py +0 -0
  56. {fruxon-2.3.2 → fruxon-2.3.4}/src/fruxon/cli/agents_voice_calls.py +0 -0
  57. {fruxon-2.3.2 → fruxon-2.3.4}/src/fruxon/cli/applications.py +0 -0
  58. {fruxon-2.3.2 → fruxon-2.3.4}/src/fruxon/cli/applications_entry_points.py +0 -0
  59. {fruxon-2.3.2 → fruxon-2.3.4}/src/fruxon/cli/assets.py +0 -0
  60. {fruxon-2.3.2 → fruxon-2.3.4}/src/fruxon/cli/capabilities.py +0 -0
  61. {fruxon-2.3.2 → fruxon-2.3.4}/src/fruxon/cli/completion.py +0 -0
  62. {fruxon-2.3.2 → fruxon-2.3.4}/src/fruxon/cli/config.py +0 -0
  63. {fruxon-2.3.2 → fruxon-2.3.4}/src/fruxon/cli/consult_pins.py +0 -0
  64. {fruxon-2.3.2 → fruxon-2.3.4}/src/fruxon/cli/conversation_imports.py +0 -0
  65. {fruxon-2.3.2 → fruxon-2.3.4}/src/fruxon/cli/dash.py +0 -0
  66. {fruxon-2.3.2 → fruxon-2.3.4}/src/fruxon/cli/describe.py +0 -0
  67. {fruxon-2.3.2 → fruxon-2.3.4}/src/fruxon/cli/doctor.py +0 -0
  68. {fruxon-2.3.2 → fruxon-2.3.4}/src/fruxon/cli/environments.py +0 -0
  69. {fruxon-2.3.2 → fruxon-2.3.4}/src/fruxon/cli/escalation_desks.py +0 -0
  70. {fruxon-2.3.2 → fruxon-2.3.4}/src/fruxon/cli/escalation_operators.py +0 -0
  71. {fruxon-2.3.2 → fruxon-2.3.4}/src/fruxon/cli/escalations.py +0 -0
  72. {fruxon-2.3.2 → fruxon-2.3.4}/src/fruxon/cli/examples.py +0 -0
  73. {fruxon-2.3.2 → fruxon-2.3.4}/src/fruxon/cli/feedback.py +0 -0
  74. {fruxon-2.3.2 → fruxon-2.3.4}/src/fruxon/cli/guides.py +0 -0
  75. {fruxon-2.3.2 → fruxon-2.3.4}/src/fruxon/cli/integrations.py +0 -0
  76. {fruxon-2.3.2 → fruxon-2.3.4}/src/fruxon/cli/integrations_webhooks.py +0 -0
  77. {fruxon-2.3.2 → fruxon-2.3.4}/src/fruxon/cli/keys.py +0 -0
  78. {fruxon-2.3.2 → fruxon-2.3.4}/src/fruxon/cli/knowledge_bases.py +0 -0
  79. {fruxon-2.3.2 → fruxon-2.3.4}/src/fruxon/cli/knowledge_documents.py +0 -0
  80. {fruxon-2.3.2 → fruxon-2.3.4}/src/fruxon/cli/knowledge_notices.py +0 -0
  81. {fruxon-2.3.2 → fruxon-2.3.4}/src/fruxon/cli/knowledge_sources.py +0 -0
  82. {fruxon-2.3.2 → fruxon-2.3.4}/src/fruxon/cli/llm_providers.py +0 -0
  83. {fruxon-2.3.2 → fruxon-2.3.4}/src/fruxon/cli/messages.py +0 -0
  84. {fruxon-2.3.2 → fruxon-2.3.4}/src/fruxon/cli/metrics.py +0 -0
  85. {fruxon-2.3.2 → fruxon-2.3.4}/src/fruxon/cli/participants.py +0 -0
  86. {fruxon-2.3.2 → fruxon-2.3.4}/src/fruxon/cli/secrets.py +0 -0
  87. {fruxon-2.3.2 → fruxon-2.3.4}/src/fruxon/cli/skills.py +0 -0
  88. {fruxon-2.3.2 → fruxon-2.3.4}/src/fruxon/cli/storage.py +0 -0
  89. {fruxon-2.3.2 → fruxon-2.3.4}/src/fruxon/cli/tools.py +0 -0
  90. {fruxon-2.3.2 → fruxon-2.3.4}/src/fruxon/cli/triggers_budget.py +0 -0
  91. {fruxon-2.3.2 → fruxon-2.3.4}/src/fruxon/cli/triggers_ledger.py +0 -0
  92. {fruxon-2.3.2 → fruxon-2.3.4}/src/fruxon/cli/triggers_ledger_stage_tests.py +0 -0
  93. {fruxon-2.3.2 → fruxon-2.3.4}/src/fruxon/cli/triggers_questions.py +0 -0
  94. {fruxon-2.3.2 → fruxon-2.3.4}/src/fruxon/cli/triggers_shape.py +0 -0
  95. {fruxon-2.3.2 → fruxon-2.3.4}/src/fruxon/cli/working_hours.py +0 -0
  96. {fruxon-2.3.2 → fruxon-2.3.4}/src/fruxon/cli/workspaces.py +0 -0
  97. {fruxon-2.3.2 → fruxon-2.3.4}/src/fruxon/credentials.py +0 -0
  98. {fruxon-2.3.2 → fruxon-2.3.4}/src/fruxon/device_auth.py +0 -0
  99. {fruxon-2.3.2 → fruxon-2.3.4}/src/fruxon/doctor.py +0 -0
  100. {fruxon-2.3.2 → fruxon-2.3.4}/src/fruxon/exceptions.py +0 -0
  101. {fruxon-2.3.2 → fruxon-2.3.4}/src/fruxon/flow_validation.py +0 -0
  102. {fruxon-2.3.2 → fruxon-2.3.4}/src/fruxon/output.py +0 -0
  103. {fruxon-2.3.2 → fruxon-2.3.4}/src/fruxon/params.py +0 -0
  104. {fruxon-2.3.2 → fruxon-2.3.4}/src/fruxon/sandbox_scenario.py +0 -0
  105. {fruxon-2.3.2 → fruxon-2.3.4}/src/fruxon/skills/__init__.py +0 -0
  106. {fruxon-2.3.2 → fruxon-2.3.4}/src/fruxon/skills/fruxon-agent-mode/SKILL.md +0 -0
  107. {fruxon-2.3.2 → fruxon-2.3.4}/src/fruxon/skills/fruxon-create-integration/SKILL.md +0 -0
  108. {fruxon-2.3.2 → fruxon-2.3.4}/src/fruxon/skills/fruxon-debug-trace/SKILL.md +0 -0
  109. {fruxon-2.3.2 → fruxon-2.3.4}/src/fruxon/skills/fruxon-use-integrations/SKILL.md +0 -0
  110. {fruxon-2.3.2 → fruxon-2.3.4}/src/fruxon/telemetry.py +0 -0
  111. {fruxon-2.3.2 → fruxon-2.3.4}/src/fruxon/tui/__init__.py +0 -0
  112. {fruxon-2.3.2 → fruxon-2.3.4}/src/fruxon/tui/app.py +0 -0
  113. {fruxon-2.3.2 → fruxon-2.3.4}/src/fruxon/tui/demo.py +0 -0
  114. {fruxon-2.3.2 → fruxon-2.3.4}/src/fruxon/tui/links.py +0 -0
  115. {fruxon-2.3.2 → fruxon-2.3.4}/src/fruxon/tui/screens/__init__.py +0 -0
  116. {fruxon-2.3.2 → fruxon-2.3.4}/src/fruxon/tui/screens/agent.py +0 -0
  117. {fruxon-2.3.2 → fruxon-2.3.4}/src/fruxon/tui/screens/base.py +0 -0
  118. {fruxon-2.3.2 → fruxon-2.3.4}/src/fruxon/tui/screens/home.py +0 -0
  119. {fruxon-2.3.2 → fruxon-2.3.4}/src/fruxon/tui/screens/ledger.py +0 -0
  120. {fruxon-2.3.2 → fruxon-2.3.4}/src/fruxon/tui/screens/loader.py +0 -0
  121. {fruxon-2.3.2 → fruxon-2.3.4}/src/fruxon/tui/screens/pickers.py +0 -0
  122. {fruxon-2.3.2 → fruxon-2.3.4}/src/fruxon/tui/screens/trace.py +0 -0
  123. {fruxon-2.3.2 → fruxon-2.3.4}/src/fruxon/tui/source.py +0 -0
  124. {fruxon-2.3.2 → fruxon-2.3.4}/src/fruxon/tui/theme.py +0 -0
  125. {fruxon-2.3.2 → fruxon-2.3.4}/src/fruxon/tui/views.py +0 -0
  126. {fruxon-2.3.2 → fruxon-2.3.4}/src/fruxon/tui/widgets.py +0 -0
  127. {fruxon-2.3.2 → fruxon-2.3.4}/src/fruxon/update_check.py +0 -0
  128. {fruxon-2.3.2 → fruxon-2.3.4}/src/fruxon/validation.py +0 -0
  129. {fruxon-2.3.2 → fruxon-2.3.4}/tests/.test_durations.json +0 -0
  130. {fruxon-2.3.2 → fruxon-2.3.4}/tests/__init__.py +0 -0
  131. {fruxon-2.3.2 → fruxon-2.3.4}/tests/conftest.py +0 -0
  132. {fruxon-2.3.2 → fruxon-2.3.4}/tests/test_actor.py +0 -0
  133. {fruxon-2.3.2 → fruxon-2.3.4}/tests/test_agent_lifecycle.py +0 -0
  134. {fruxon-2.3.2 → fruxon-2.3.4}/tests/test_agent_revisions_list.py +0 -0
  135. {fruxon-2.3.2 → fruxon-2.3.4}/tests/test_agent_slots.py +0 -0
  136. {fruxon-2.3.2 → fruxon-2.3.4}/tests/test_agents_check_cli.py +0 -0
  137. {fruxon-2.3.2 → fruxon-2.3.4}/tests/test_agents_revisions_cli.py +0 -0
  138. {fruxon-2.3.2 → fruxon-2.3.4}/tests/test_agents_sandbox.py +0 -0
  139. {fruxon-2.3.2 → fruxon-2.3.4}/tests/test_applications.py +0 -0
  140. {fruxon-2.3.2 → fruxon-2.3.4}/tests/test_approvals.py +0 -0
  141. {fruxon-2.3.2 → fruxon-2.3.4}/tests/test_assets.py +0 -0
  142. {fruxon-2.3.2 → fruxon-2.3.4}/tests/test_budgets.py +0 -0
  143. {fruxon-2.3.2 → fruxon-2.3.4}/tests/test_capabilities.py +0 -0
  144. {fruxon-2.3.2 → fruxon-2.3.4}/tests/test_channels.py +0 -0
  145. {fruxon-2.3.2 → fruxon-2.3.4}/tests/test_checks_agent.py +0 -0
  146. {fruxon-2.3.2 → fruxon-2.3.4}/tests/test_cli.py +0 -0
  147. {fruxon-2.3.2 → fruxon-2.3.4}/tests/test_cli_base_url_routing.py +0 -0
  148. {fruxon-2.3.2 → fruxon-2.3.4}/tests/test_cli_crash.py +0 -0
  149. {fruxon-2.3.2 → fruxon-2.3.4}/tests/test_cli_feedback.py +0 -0
  150. {fruxon-2.3.2 → fruxon-2.3.4}/tests/test_cli_friction_round2.py +0 -0
  151. {fruxon-2.3.2 → fruxon-2.3.4}/tests/test_cli_friction_round3.py +0 -0
  152. {fruxon-2.3.2 → fruxon-2.3.4}/tests/test_cli_root_flags.py +0 -0
  153. {fruxon-2.3.2 → fruxon-2.3.4}/tests/test_client.py +0 -0
  154. {fruxon-2.3.2 → fruxon-2.3.4}/tests/test_connect_nudge.py +0 -0
  155. {fruxon-2.3.2 → fruxon-2.3.4}/tests/test_consult.py +0 -0
  156. {fruxon-2.3.2 → fruxon-2.3.4}/tests/test_conversation_imports.py +0 -0
  157. {fruxon-2.3.2 → fruxon-2.3.4}/tests/test_credentials.py +0 -0
  158. {fruxon-2.3.2 → fruxon-2.3.4}/tests/test_dash_app.py +0 -0
  159. {fruxon-2.3.2 → fruxon-2.3.4}/tests/test_dash_cli.py +0 -0
  160. {fruxon-2.3.2 → fruxon-2.3.4}/tests/test_dash_client.py +0 -0
  161. {fruxon-2.3.2 → fruxon-2.3.4}/tests/test_dash_links.py +0 -0
  162. {fruxon-2.3.2 → fruxon-2.3.4}/tests/test_dash_source.py +0 -0
  163. {fruxon-2.3.2 → fruxon-2.3.4}/tests/test_describe.py +0 -0
  164. {fruxon-2.3.2 → fruxon-2.3.4}/tests/test_device_auth.py +0 -0
  165. {fruxon-2.3.2 → fruxon-2.3.4}/tests/test_docs_commands_exist.py +0 -0
  166. {fruxon-2.3.2 → fruxon-2.3.4}/tests/test_doctor.py +0 -0
  167. {fruxon-2.3.2 → fruxon-2.3.4}/tests/test_draft_bootstrap.py +0 -0
  168. {fruxon-2.3.2 → fruxon-2.3.4}/tests/test_draft_evaluate_cli.py +0 -0
  169. {fruxon-2.3.2 → fruxon-2.3.4}/tests/test_draft_pull_shape.py +0 -0
  170. {fruxon-2.3.2 → fruxon-2.3.4}/tests/test_draft_run_replay.py +0 -0
  171. {fruxon-2.3.2 → fruxon-2.3.4}/tests/test_draft_validate_cli.py +0 -0
  172. {fruxon-2.3.2 → fruxon-2.3.4}/tests/test_drafts.py +0 -0
  173. {fruxon-2.3.2 → fruxon-2.3.4}/tests/test_entry_points.py +0 -0
  174. {fruxon-2.3.2 → fruxon-2.3.4}/tests/test_environments.py +0 -0
  175. {fruxon-2.3.2 → fruxon-2.3.4}/tests/test_escalation_operators.py +0 -0
  176. {fruxon-2.3.2 → fruxon-2.3.4}/tests/test_escalations.py +0 -0
  177. {fruxon-2.3.2 → fruxon-2.3.4}/tests/test_evaluations.py +0 -0
  178. {fruxon-2.3.2 → fruxon-2.3.4}/tests/test_execution_records.py +0 -0
  179. {fruxon-2.3.2 → fruxon-2.3.4}/tests/test_flow_validation.py +0 -0
  180. {fruxon-2.3.2 → fruxon-2.3.4}/tests/test_fruxon.py +0 -0
  181. {fruxon-2.3.2 → fruxon-2.3.4}/tests/test_guides.py +0 -0
  182. {fruxon-2.3.2 → fruxon-2.3.4}/tests/test_improvements.py +0 -0
  183. {fruxon-2.3.2 → fruxon-2.3.4}/tests/test_integration_configs_write_cli.py +0 -0
  184. {fruxon-2.3.2 → fruxon-2.3.4}/tests/test_integration_triggers_cli.py +0 -0
  185. {fruxon-2.3.2 → fruxon-2.3.4}/tests/test_integrations_authorize_cli.py +0 -0
  186. {fruxon-2.3.2 → fruxon-2.3.4}/tests/test_integrations_connect_cli.py +0 -0
  187. {fruxon-2.3.2 → fruxon-2.3.4}/tests/test_kb_trial_cli.py +0 -0
  188. {fruxon-2.3.2 → fruxon-2.3.4}/tests/test_knowledge_bases.py +0 -0
  189. {fruxon-2.3.2 → fruxon-2.3.4}/tests/test_knowledge_documents.py +0 -0
  190. {fruxon-2.3.2 → fruxon-2.3.4}/tests/test_knowledge_notices.py +0 -0
  191. {fruxon-2.3.2 → fruxon-2.3.4}/tests/test_knowledge_sources.py +0 -0
  192. {fruxon-2.3.2 → fruxon-2.3.4}/tests/test_llm_provider_configs_cli.py +0 -0
  193. {fruxon-2.3.2 → fruxon-2.3.4}/tests/test_llm_providers_connect_cli.py +0 -0
  194. {fruxon-2.3.2 → fruxon-2.3.4}/tests/test_llm_providers_list_cli.py +0 -0
  195. {fruxon-2.3.2 → fruxon-2.3.4}/tests/test_managed_by.py +0 -0
  196. {fruxon-2.3.2 → fruxon-2.3.4}/tests/test_memory.py +0 -0
  197. {fruxon-2.3.2 → fruxon-2.3.4}/tests/test_messages.py +0 -0
  198. {fruxon-2.3.2 → fruxon-2.3.4}/tests/test_metrics.py +0 -0
  199. {fruxon-2.3.2 → fruxon-2.3.4}/tests/test_online_llm_config_refs.py +0 -0
  200. {fruxon-2.3.2 → fruxon-2.3.4}/tests/test_online_prefetch_refs.py +0 -0
  201. {fruxon-2.3.2 → fruxon-2.3.4}/tests/test_online_secret_refs.py +0 -0
  202. {fruxon-2.3.2 → fruxon-2.3.4}/tests/test_output.py +0 -0
  203. {fruxon-2.3.2 → fruxon-2.3.4}/tests/test_params.py +0 -0
  204. {fruxon-2.3.2 → fruxon-2.3.4}/tests/test_participants.py +0 -0
  205. {fruxon-2.3.2 → fruxon-2.3.4}/tests/test_participants_write.py +0 -0
  206. {fruxon-2.3.2 → fruxon-2.3.4}/tests/test_plugin_hint.py +0 -0
  207. {fruxon-2.3.2 → fruxon-2.3.4}/tests/test_project_urls.py +0 -0
  208. {fruxon-2.3.2 → fruxon-2.3.4}/tests/test_reply_style.py +0 -0
  209. {fruxon-2.3.2 → fruxon-2.3.4}/tests/test_request_id.py +0 -0
  210. {fruxon-2.3.2 → fruxon-2.3.4}/tests/test_sandbox_scenario.py +0 -0
  211. {fruxon-2.3.2 → fruxon-2.3.4}/tests/test_schema.py +0 -0
  212. {fruxon-2.3.2 → fruxon-2.3.4}/tests/test_schema_fetch.py +0 -0
  213. {fruxon-2.3.2 → fruxon-2.3.4}/tests/test_secrets.py +0 -0
  214. {fruxon-2.3.2 → fruxon-2.3.4}/tests/test_skills.py +0 -0
  215. {fruxon-2.3.2 → fruxon-2.3.4}/tests/test_ssl.py +0 -0
  216. {fruxon-2.3.2 → fruxon-2.3.4}/tests/test_storage.py +0 -0
  217. {fruxon-2.3.2 → fruxon-2.3.4}/tests/test_system_blocks.py +0 -0
  218. {fruxon-2.3.2 → fruxon-2.3.4}/tests/test_system_blocks_cli.py +0 -0
  219. {fruxon-2.3.2 → fruxon-2.3.4}/tests/test_telemetry.py +0 -0
  220. {fruxon-2.3.2 → fruxon-2.3.4}/tests/test_test_chats.py +0 -0
  221. {fruxon-2.3.2 → fruxon-2.3.4}/tests/test_topics.py +0 -0
  222. {fruxon-2.3.2 → fruxon-2.3.4}/tests/test_trigger_budgets.py +0 -0
  223. {fruxon-2.3.2 → fruxon-2.3.4}/tests/test_triggers_check_cli.py +0 -0
  224. {fruxon-2.3.2 → fruxon-2.3.4}/tests/test_triggers_ledger.py +0 -0
  225. {fruxon-2.3.2 → fruxon-2.3.4}/tests/test_triggers_ledger_batch_views.py +0 -0
  226. {fruxon-2.3.2 → fruxon-2.3.4}/tests/test_triggers_ledger_stage_tests.py +0 -0
  227. {fruxon-2.3.2 → fruxon-2.3.4}/tests/test_triggers_questions.py +0 -0
  228. {fruxon-2.3.2 → fruxon-2.3.4}/tests/test_triggers_shape.py +0 -0
  229. {fruxon-2.3.2 → fruxon-2.3.4}/tests/test_triggers_write.py +0 -0
  230. {fruxon-2.3.2 → fruxon-2.3.4}/tests/test_tui_boundary.py +0 -0
  231. {fruxon-2.3.2 → fruxon-2.3.4}/tests/test_update_check.py +0 -0
  232. {fruxon-2.3.2 → fruxon-2.3.4}/tests/test_validation.py +0 -0
  233. {fruxon-2.3.2 → fruxon-2.3.4}/tests/test_voice_calls.py +0 -0
  234. {fruxon-2.3.2 → fruxon-2.3.4}/tests/test_working_hours_cli.py +0 -0
  235. {fruxon-2.3.2 → fruxon-2.3.4}/tests/test_workspaces_cli.py +0 -0
@@ -1,5 +1,20 @@
1
1
  # History
2
2
 
3
+ ## Unreleased — the simulator's schema, and what only works in the sandbox
4
+
5
+ - **`fruxon integrations configs sandbox schema <integration>`** (F-030): what to seed a simulated config
6
+ with, without reading backend source. Per entity type: the id template, the payload template, `missBehavior`,
7
+ identity and scope params, and the tools that list, read, create, update or delete it; then the
8
+ action-only tools. `--type` keeps one type (an unknown one exits 11). JSON is the server's
9
+ `{integrationId, entityTypes[], actionTools[]}`. **`FruxonClient.get_integration_sandbox_schema`**
10
+ (`GET …/integrations/{integration}/sandbox/schema`). `sandbox import`'s help and its validation hint point at it.
11
+ - **`triggers get`** carries the server's `sandboxOnlyConfigs` and `unreachableContacts` (F-031 / F-032) in
12
+ JSON and prints them as warnings; the typed read used to drop them. `TriggerDetail.sandbox_only_configs`,
13
+ `TriggerDetail.unreachable_contacts`.
14
+ - **`triggers check`** turns an `ok` row into a `warn` when the server lists a gap on it: a stage agent,
15
+ source or event on a SIMULATED config, or an ASK stage / outcome report contact a live page could not
16
+ reach. A gap on a row that already warns or fails lands in a new `Live readiness` row.
17
+
3
18
  ## Unreleased — a stale Claude Code plugin shows up in doctor
4
19
 
5
20
  - **`fruxon doctor`** has a **Claude Code plugin** row (F-034): it finds the installed fruxon plugin (Claude
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: fruxon
3
- Version: 2.3.2
3
+ Version: 2.3.4
4
4
  Summary: The Fruxon SDK is a lightweight Python client for integrating with the Fruxon platform.
5
5
  Project-URL: homepage, https://fruxon.com
6
6
  Project-URL: documentation, https://docs.fruxon.com/guides/cli
@@ -149,7 +149,7 @@ Integrations + tools:
149
149
  | `fruxon integrations authorize <integration>` | `connect` for an OAuth integration (Gmail, Google Sheets, Outlook…): creates a config for its OAuth2 method (auto-detected; `--auth-method` to pick, `--scope` for what to ask, `--config-param` for connection settings, `--config <id>` for an existing config) and prints a credential link. A human opens it, signs in to Fruxon and then to the provider, and the account is connected and the config published, ready for a slot to pin. |
150
150
  | `fruxon integrations configs webhook generate/rotate/apply/inspect/remove <integration> <config>` | The provider webhook a messaging connection receives on (Telegram today) — without one the bot gets nothing. `generate` mints the config's URL and registers it with the provider; `rotate --yes` replaces it; `apply --url -` registers one you hold; `inspect` asks the provider what it has (`registeredToThisConfig`, `lastErrorMessage`); `remove --yes` stops delivery. The URL carries the secret and is printed only with `--show-url` — or when it could not be registered, since it is never returned again. Exits 12 when the provider refuses. |
151
151
  | `fruxon integrations configs create <integration> --simulated` | A config with `sandboxMode: SIMULATED` and no credentials, published in one step: every tool call a sandbox run makes through it is answered from its simulated store. `--file` creates an unpublished draft from a full body instead. |
152
- | `fruxon integrations configs sandbox status/entities/generate/import/reset/snapshot/restore <integration> <config>` | Read and seed a simulated config's store. `generate --type event --prompt … --count N` has a model write entities (the server snapshots first); `import --file` inserts them as written (`payload` may be an object); `snapshot --name` saves a state (no `--name` lists them), `restore` / `reset` are `--yes`-gated. |
152
+ | `fruxon integrations configs sandbox status/entities/generate/import/reset/snapshot/restore <integration> <config>` | Read and seed a simulated config's store. `generate --type event --prompt … --count N` has a model write entities (the server snapshots first); `import --file` inserts them as written (`payload` may be an object), and `fruxon integrations configs sandbox schema <integration>` lists the entity types to write — id and payload templates, the tools that list/read/create/update/delete each, and the action-only tools; `snapshot --name` saves a state (no `--name` lists them), `restore` / `reset` are `--yes`-gated. |
153
153
  | `fruxon integrations connect <integration>` | Create a config for an integration and print a **credential link**: a human opens it and signs in to Fruxon, then types the API key, token or password (Stripe, most REST APIs), and the page tests it and publishes the config; or, for an OAuth integration, signs in to the provider (`--scope` picks what they grant) and the account is connected and the config published. The secret never passes through the terminal or an agent driving the CLI. `--config <id>` fills an existing config, `--param name=value` sets a connection setting, `--no-sign-in` mints a link anyone holding it can fill (for a client without a Fruxon login), `--expires-in-hours` 1–720. Needs `integrations:write` (the default login preset); `--no-sign-in` also needs `workspace:write` (Admin or Owner). |
154
154
  | `fruxon integrations triggers <integration>` | List the event types an integration can fire an agent on — each descriptor's `id` is the `eventType` a trigger listens for, plus the `payloadFields` (dotted paths) a binding's `parameterMappings` can read. Discovery for wiring an inbound-event trigger without guessing. |
155
155
  | `fruxon integrations mcp …` | Inspect and enable the MCP server for an integration. |
@@ -175,7 +175,7 @@ Integrations + tools:
175
175
  | `fruxon triggers ledger funnel/items/cursor/transitions/effects/batches` | The work items a schedule trigger's work shape admitted. `funnel` counts per stage and status (every item is in exactly one cell). `items` is the grid — `--stage`, `--status`, `--ignore-reason`, `--item-key` (client-side; the endpoint has no such filter), each item's `label` (what the Work grid calls the row, as against the provider's opaque `itemKey`), and its accumulated `data`, which is where a stage's declared `produces` keys land. A listing is **one page of 20** that reports how many matched in total — a ledger's healthy state is thousands of rows served ten per request, so an unbounded walk is rate-limited long before the end; `-n` sizes the page and `--all` walks the lot. `--ignore-reason` narrows to the items one exclusion reason set aside — the same filter `redrive-many` selects by, matched whole and case-sensitively, so it is how you read a batch before putting it back. `--where field=value` (or `!=`, repeatable, dotted for a nested field) selects by what a stage wrote into `data` — `--where destination=SKIP` — matched whole and case-sensitively, as text and as the number, boolean or null it spells; the server filters and the CLI re-applies it, so an older server is slower, never wrong. `cursor` is the watermark and its freshness. `transitions` is one item's attempt history; `effects` is what it did to the outside world — an `UNKNOWN` row parks the item until someone settles it. `batches` is what an ASK stage is waiting on a human for — read its `delivery` first, because `UNDELIVERABLE` / `FAILED` mean nobody was asked and nobody will answer while the batch, the count and the stage all look healthy (`QUEUE_ONLY` is not a fault); a WAITING item's `batchId` is the join to it, and the pairing is total, so one `--open-only` listing resolves every waiting row. `batches --answers <batch>` is one question's answers item by item — what the person gave (`given`), what was handed back (`answer`), what the item holds now (`current`), with `mismatch` where the first two differ (a prose reply is every item's `given` at once, `givenIsReply`, and is never compared); a `given` the server did not record is read from the resolving run's sheet read (`givenFrom: "trace"`, `--no-trace` to skip). `batches --transcript <batch>` prints the conversation it was asked in, read under the agent that owns it — the stage's asking agent, not the desk that talks to the person. `funnel` and `items` also carry `cost` (all-in USD) and `runs` — so the funnel says *which stage* the money goes to, not merely how much. An item's `runs` spans every stage it passed through and so is not `stageAttempts`, which resets per stage; a `Cost` of `—` means nothing there has ever been claimed, as against `$0.0000`, which means it ran and was free. Cost is not sortable: the endpoint's `--order-by` allow-list does not carry it. |
176
176
  | `fruxon triggers ledger passes` | Every time the automation fired, newest first — `admitted` (what the door took), `dispatched` (what the pass claimed and sent to work, questions parked on a human included), `completed` (how many of *this pass's* dispatches reached the terminal stage), `runs`, and the pass's all-in USD. `runs` sits **below** `dispatched` while runs are in flight or when a dispatch went to a person rather than a model — that gap is normal, not a lost item. And a pass's `cost` **rises after** it fired, as those runs finish, so a pass read seconds later reports a floor rather than its bill. An `outcome` other than `FIRED` means no sweep happened: `FILTERED` / `COALESCED` are healthy (nothing to do, or folded into a pass already running), `FAILED` / `FILTER_ERROR` are not. A pass counts only what it claimed itself: work claimed **between** passes (an answered question, a finished stage, a re-drive) is a `between` row above the pass it followed, with why it was ready, its runs and cost, and is `betweenPasses` in `-o json`; the totals include it. `-n/--limit` bounds the walk. |
177
177
  | `fruxon triggers ledger spend/spend-series/item-series` | What the automation spent and what happened to its items, over time. `spend` is the **current UTC calendar** day, week (from Monday) or month (`--period`), so a weekly read on a Monday is hours of spend, not seven days — the figure the automation's spend chip shows: item runs, the conversations its questions are held in, and its report, one row per agent and part (`ITEM_RUNS` / `CONVERSATIONS` / `REPORTS` / `OTHER`). It is **not** the funnel's `cost`, which files item runs under the cell each item sits in *now*; the two overlap, so never add them. `spend-series` is the same figure per `day` or `week` over `--since`/`--until` (default the last 30 days), `--by-stage` adding a column per agent and part; it reads live run records, so a window older than the workspace's run history is counted from `countedFromMs` and the CLI says so. `--interval hour` is refused (tokens are priced per day), and a `week` bucket starts on a Thursday, so it does not line up with `spend --period weekly`. `item-series` counts admitted, finished, set aside and dead per `hour`, `day` or `week` — **events, not items**: a re-driven item that finishes again counts twice and an operator's ignore counts as set aside. Both series omit empty buckets; the footer says how many had anything. A server that predates the series reads 404s (exit 11). |
178
- | `fruxon triggers check <trigger>` | Audit whether a work-shape automation can move its items, part by part in the order an item meets them: on and taking items in, the last pass read its source, each PROCESS stage's agent exists with a deployed revision and working credentials and models (a rejected credential's row says how many items failed there since), each ASK stage's contact is declared and bound on the asking agent and its oldest question has not waited past a fifth of its answer window, the outcome note's contact reaches a person, this week's spend against the weekly limit, and how many items died in the last 7 days. `{trigger, overall, checks[]}` like `agents check`; exits 12 only on a hard fail, warnings stay 0. Read-only. |
178
+ | `fruxon triggers check <trigger>` | Audit whether a work-shape automation can move its items, part by part in the order an item meets them: on and taking items in, the last pass read its source, each PROCESS stage's agent exists with a deployed revision and working credentials and models (a rejected credential's row says how many items failed there since), each ASK stage's contact is declared and bound on the asking agent and its oldest question has not waited past a fifth of its answer window, the outcome note's contact reaches a person, this week's spend against the weekly limit, and how many items died in the last 7 days. A SIMULATED config or an unreachable contact the server lists turns that part's row into a warning (works in the sandbox only). `{trigger, overall, checks[]}` like `agents check`; exits 12 only on a hard fail, warnings stay 0. Read-only. |
179
179
  | `fruxon triggers budget list/get/set/delete` | Spend limits on an automation **as a whole** (`--period DAILY/WEEKLY/MONTHLY`, UTC calendar windows), counting every production run it caused whichever agent made it. Once one is enforced they govern its runs, which then meet only these limits and not the agents' own; with none enforced, each stage stops at its agent's own limit. None by default and every one removable. An enforced limit refuses new work at the limit (stage runs, passes, a question's opening, the report) and holds the stages until the window resets, while turns of conversations it already opened still run (up to 110%); `--no-enforce` only alerts the Application's admins. Needs Editor. |
180
180
  | `fruxon triggers ledger redrive/ignore/settle/cancel-batch` | The operator verbs; all confirm and refuse without `--yes` in agent mode. `redrive` returns a DEAD or FAILED item to the queue with its attempts reset — settle any `UNKNOWN` effect first or the next attempt hits the same refusal. `ignore` excludes an item for a **required** reason, which is the only thing separating IGNORED from DEAD later. `settle` answers an effect the platform could not confirm (`--landed` / `--did-not-land` + `--reason`); wrong in the second direction duplicates the write. `cancel-batch` calls off a question — the items go back to READY and a later pass re-batches them. |
181
181
  | `fruxon triggers ledger wake` | End an item's wait at a WAIT stage now, as if its due time had come: an event the stage waits for that already arrived takes `onEvent` with what it carries, otherwise the `onDue` exit applies (on to the next or named stage, or FAIL / DEAD); the history records `OPERATOR_WAKE`. 409 for an item waiting on a question (answer it or `cancel-batch`). `ignore` stops a wait without continuing. `items --waiting-for TIME --order-by wakeAt` lists what waits on time, soonest first; the Detail column says when each wakes and the footer flags any 15 minutes overdue. `items --admitted-via API\|AGENT` lists what was started by hand (`admit`, or an agent's `start_work_item`). |
@@ -115,7 +115,7 @@ Integrations + tools:
115
115
  | `fruxon integrations authorize <integration>` | `connect` for an OAuth integration (Gmail, Google Sheets, Outlook…): creates a config for its OAuth2 method (auto-detected; `--auth-method` to pick, `--scope` for what to ask, `--config-param` for connection settings, `--config <id>` for an existing config) and prints a credential link. A human opens it, signs in to Fruxon and then to the provider, and the account is connected and the config published, ready for a slot to pin. |
116
116
  | `fruxon integrations configs webhook generate/rotate/apply/inspect/remove <integration> <config>` | The provider webhook a messaging connection receives on (Telegram today) — without one the bot gets nothing. `generate` mints the config's URL and registers it with the provider; `rotate --yes` replaces it; `apply --url -` registers one you hold; `inspect` asks the provider what it has (`registeredToThisConfig`, `lastErrorMessage`); `remove --yes` stops delivery. The URL carries the secret and is printed only with `--show-url` — or when it could not be registered, since it is never returned again. Exits 12 when the provider refuses. |
117
117
  | `fruxon integrations configs create <integration> --simulated` | A config with `sandboxMode: SIMULATED` and no credentials, published in one step: every tool call a sandbox run makes through it is answered from its simulated store. `--file` creates an unpublished draft from a full body instead. |
118
- | `fruxon integrations configs sandbox status/entities/generate/import/reset/snapshot/restore <integration> <config>` | Read and seed a simulated config's store. `generate --type event --prompt … --count N` has a model write entities (the server snapshots first); `import --file` inserts them as written (`payload` may be an object); `snapshot --name` saves a state (no `--name` lists them), `restore` / `reset` are `--yes`-gated. |
118
+ | `fruxon integrations configs sandbox status/entities/generate/import/reset/snapshot/restore <integration> <config>` | Read and seed a simulated config's store. `generate --type event --prompt … --count N` has a model write entities (the server snapshots first); `import --file` inserts them as written (`payload` may be an object), and `fruxon integrations configs sandbox schema <integration>` lists the entity types to write — id and payload templates, the tools that list/read/create/update/delete each, and the action-only tools; `snapshot --name` saves a state (no `--name` lists them), `restore` / `reset` are `--yes`-gated. |
119
119
  | `fruxon integrations connect <integration>` | Create a config for an integration and print a **credential link**: a human opens it and signs in to Fruxon, then types the API key, token or password (Stripe, most REST APIs), and the page tests it and publishes the config; or, for an OAuth integration, signs in to the provider (`--scope` picks what they grant) and the account is connected and the config published. The secret never passes through the terminal or an agent driving the CLI. `--config <id>` fills an existing config, `--param name=value` sets a connection setting, `--no-sign-in` mints a link anyone holding it can fill (for a client without a Fruxon login), `--expires-in-hours` 1–720. Needs `integrations:write` (the default login preset); `--no-sign-in` also needs `workspace:write` (Admin or Owner). |
120
120
  | `fruxon integrations triggers <integration>` | List the event types an integration can fire an agent on — each descriptor's `id` is the `eventType` a trigger listens for, plus the `payloadFields` (dotted paths) a binding's `parameterMappings` can read. Discovery for wiring an inbound-event trigger without guessing. |
121
121
  | `fruxon integrations mcp …` | Inspect and enable the MCP server for an integration. |
@@ -141,7 +141,7 @@ Integrations + tools:
141
141
  | `fruxon triggers ledger funnel/items/cursor/transitions/effects/batches` | The work items a schedule trigger's work shape admitted. `funnel` counts per stage and status (every item is in exactly one cell). `items` is the grid — `--stage`, `--status`, `--ignore-reason`, `--item-key` (client-side; the endpoint has no such filter), each item's `label` (what the Work grid calls the row, as against the provider's opaque `itemKey`), and its accumulated `data`, which is where a stage's declared `produces` keys land. A listing is **one page of 20** that reports how many matched in total — a ledger's healthy state is thousands of rows served ten per request, so an unbounded walk is rate-limited long before the end; `-n` sizes the page and `--all` walks the lot. `--ignore-reason` narrows to the items one exclusion reason set aside — the same filter `redrive-many` selects by, matched whole and case-sensitively, so it is how you read a batch before putting it back. `--where field=value` (or `!=`, repeatable, dotted for a nested field) selects by what a stage wrote into `data` — `--where destination=SKIP` — matched whole and case-sensitively, as text and as the number, boolean or null it spells; the server filters and the CLI re-applies it, so an older server is slower, never wrong. `cursor` is the watermark and its freshness. `transitions` is one item's attempt history; `effects` is what it did to the outside world — an `UNKNOWN` row parks the item until someone settles it. `batches` is what an ASK stage is waiting on a human for — read its `delivery` first, because `UNDELIVERABLE` / `FAILED` mean nobody was asked and nobody will answer while the batch, the count and the stage all look healthy (`QUEUE_ONLY` is not a fault); a WAITING item's `batchId` is the join to it, and the pairing is total, so one `--open-only` listing resolves every waiting row. `batches --answers <batch>` is one question's answers item by item — what the person gave (`given`), what was handed back (`answer`), what the item holds now (`current`), with `mismatch` where the first two differ (a prose reply is every item's `given` at once, `givenIsReply`, and is never compared); a `given` the server did not record is read from the resolving run's sheet read (`givenFrom: "trace"`, `--no-trace` to skip). `batches --transcript <batch>` prints the conversation it was asked in, read under the agent that owns it — the stage's asking agent, not the desk that talks to the person. `funnel` and `items` also carry `cost` (all-in USD) and `runs` — so the funnel says *which stage* the money goes to, not merely how much. An item's `runs` spans every stage it passed through and so is not `stageAttempts`, which resets per stage; a `Cost` of `—` means nothing there has ever been claimed, as against `$0.0000`, which means it ran and was free. Cost is not sortable: the endpoint's `--order-by` allow-list does not carry it. |
142
142
  | `fruxon triggers ledger passes` | Every time the automation fired, newest first — `admitted` (what the door took), `dispatched` (what the pass claimed and sent to work, questions parked on a human included), `completed` (how many of *this pass's* dispatches reached the terminal stage), `runs`, and the pass's all-in USD. `runs` sits **below** `dispatched` while runs are in flight or when a dispatch went to a person rather than a model — that gap is normal, not a lost item. And a pass's `cost` **rises after** it fired, as those runs finish, so a pass read seconds later reports a floor rather than its bill. An `outcome` other than `FIRED` means no sweep happened: `FILTERED` / `COALESCED` are healthy (nothing to do, or folded into a pass already running), `FAILED` / `FILTER_ERROR` are not. A pass counts only what it claimed itself: work claimed **between** passes (an answered question, a finished stage, a re-drive) is a `between` row above the pass it followed, with why it was ready, its runs and cost, and is `betweenPasses` in `-o json`; the totals include it. `-n/--limit` bounds the walk. |
143
143
  | `fruxon triggers ledger spend/spend-series/item-series` | What the automation spent and what happened to its items, over time. `spend` is the **current UTC calendar** day, week (from Monday) or month (`--period`), so a weekly read on a Monday is hours of spend, not seven days — the figure the automation's spend chip shows: item runs, the conversations its questions are held in, and its report, one row per agent and part (`ITEM_RUNS` / `CONVERSATIONS` / `REPORTS` / `OTHER`). It is **not** the funnel's `cost`, which files item runs under the cell each item sits in *now*; the two overlap, so never add them. `spend-series` is the same figure per `day` or `week` over `--since`/`--until` (default the last 30 days), `--by-stage` adding a column per agent and part; it reads live run records, so a window older than the workspace's run history is counted from `countedFromMs` and the CLI says so. `--interval hour` is refused (tokens are priced per day), and a `week` bucket starts on a Thursday, so it does not line up with `spend --period weekly`. `item-series` counts admitted, finished, set aside and dead per `hour`, `day` or `week` — **events, not items**: a re-driven item that finishes again counts twice and an operator's ignore counts as set aside. Both series omit empty buckets; the footer says how many had anything. A server that predates the series reads 404s (exit 11). |
144
- | `fruxon triggers check <trigger>` | Audit whether a work-shape automation can move its items, part by part in the order an item meets them: on and taking items in, the last pass read its source, each PROCESS stage's agent exists with a deployed revision and working credentials and models (a rejected credential's row says how many items failed there since), each ASK stage's contact is declared and bound on the asking agent and its oldest question has not waited past a fifth of its answer window, the outcome note's contact reaches a person, this week's spend against the weekly limit, and how many items died in the last 7 days. `{trigger, overall, checks[]}` like `agents check`; exits 12 only on a hard fail, warnings stay 0. Read-only. |
144
+ | `fruxon triggers check <trigger>` | Audit whether a work-shape automation can move its items, part by part in the order an item meets them: on and taking items in, the last pass read its source, each PROCESS stage's agent exists with a deployed revision and working credentials and models (a rejected credential's row says how many items failed there since), each ASK stage's contact is declared and bound on the asking agent and its oldest question has not waited past a fifth of its answer window, the outcome note's contact reaches a person, this week's spend against the weekly limit, and how many items died in the last 7 days. A SIMULATED config or an unreachable contact the server lists turns that part's row into a warning (works in the sandbox only). `{trigger, overall, checks[]}` like `agents check`; exits 12 only on a hard fail, warnings stay 0. Read-only. |
145
145
  | `fruxon triggers budget list/get/set/delete` | Spend limits on an automation **as a whole** (`--period DAILY/WEEKLY/MONTHLY`, UTC calendar windows), counting every production run it caused whichever agent made it. Once one is enforced they govern its runs, which then meet only these limits and not the agents' own; with none enforced, each stage stops at its agent's own limit. None by default and every one removable. An enforced limit refuses new work at the limit (stage runs, passes, a question's opening, the report) and holds the stages until the window resets, while turns of conversations it already opened still run (up to 110%); `--no-enforce` only alerts the Application's admins. Needs Editor. |
146
146
  | `fruxon triggers ledger redrive/ignore/settle/cancel-batch` | The operator verbs; all confirm and refuse without `--yes` in agent mode. `redrive` returns a DEAD or FAILED item to the queue with its attempts reset — settle any `UNKNOWN` effect first or the next attempt hits the same refusal. `ignore` excludes an item for a **required** reason, which is the only thing separating IGNORED from DEAD later. `settle` answers an effect the platform could not confirm (`--landed` / `--did-not-land` + `--reason`); wrong in the second direction duplicates the write. `cancel-batch` calls off a question — the items go back to READY and a later pass re-batches them. |
147
147
  | `fruxon triggers ledger wake` | End an item's wait at a WAIT stage now, as if its due time had come: an event the stage waits for that already arrived takes `onEvent` with what it carries, otherwise the `onDue` exit applies (on to the next or named stage, or FAIL / DEAD); the history records `OPERATOR_WAKE`. 409 for an item waiting on a question (answer it or `cancel-batch`). `ignore` stops a wait without continuing. `items --waiting-for TIME --order-by wakeAt` lists what waits on time, soonest first; the Detail column says when each wakes and the footer flags any 15 minutes overdue. `items --admitted-via API\|AGENT` lists what was started by hand (`admit`, or an agent's `start_work_item`). |
@@ -18,7 +18,7 @@ version_tuple: tuple[int | str, ...]
18
18
  commit_id: str | None
19
19
  __commit_id__: str | None
20
20
 
21
- __version__ = version = '2.3.2'
22
- __version_tuple__ = version_tuple = (2, 3, 2)
21
+ __version__ = version = '2.3.4'
22
+ __version_tuple__ = version_tuple = (2, 3, 4)
23
23
 
24
24
  __commit_id__ = commit_id = None
@@ -17,6 +17,7 @@ Nothing here writes.
17
17
 
18
18
  from __future__ import annotations
19
19
 
20
+ from dataclasses import replace
20
21
  from datetime import datetime
21
22
 
22
23
  from fruxon.checks import CheckReport, CheckResult, shape_get
@@ -109,6 +110,91 @@ def asking_agent(shape: dict) -> str:
109
110
  return ""
110
111
 
111
112
 
113
+ def _phrase(value: object) -> str:
114
+ return str(value or "").lower().replace("_", " ")
115
+
116
+
117
+ def contact_gap_line(contact: dict) -> str:
118
+ """One ``unreachableContacts`` row as a sentence."""
119
+ where = f"stage '{contact['stageId']}'" if contact.get("stageId") else _phrase(contact.get("usedBy"))
120
+ who = contact.get("displayName") or contact.get("participantId") or "?"
121
+ reason = contact.get("reason") or _phrase(contact.get("liveReachability"))
122
+ line = f"{where}: contact '{contact.get('slot') or '?'}' ({who}) can't be reached live"
123
+ return f"{line} — {reason}" if reason else line
124
+
125
+
126
+ def config_gap_line(config: dict) -> str:
127
+ """One ``sandboxOnlyConfigs`` row as a sentence (the server's own message when it sent one)."""
128
+ if config.get("message"):
129
+ return str(config["message"])
130
+ name = config.get("displayName") or config.get("configId") or "?"
131
+ return f"'{name}' is a SIMULATED config: sandbox only, it would fail live"
132
+
133
+
134
+ def live_readiness_lines(detail) -> list[str]:
135
+ """A trigger's ``sandboxOnlyConfigs`` and ``unreachableContacts``, as warnings."""
136
+ configs = getattr(detail, "sandbox_only_configs", None) or []
137
+ contacts = getattr(detail, "unreachable_contacts", None) or []
138
+ return [config_gap_line(c) for c in configs] + [contact_gap_line(c) for c in contacts]
139
+
140
+
141
+ def _row_for(gap: dict) -> str:
142
+ """The check row a live-readiness gap belongs to."""
143
+ used_by = str(gap.get("usedBy") or "").upper()
144
+ if gap.get("stageId") and used_by in ("STAGE_AGENT", "ASK_STAGE"):
145
+ return str(gap["stageId"])
146
+ if used_by in ("SOURCE", "EVENT"):
147
+ return "Source"
148
+ if used_by == "OUTCOME_REPORT":
149
+ return "Outcome report"
150
+ return ""
151
+
152
+
153
+ def _apply_live_gaps(rows: list[CheckResult], detail, trigger: str) -> list[CheckResult]:
154
+ """Turn an ``ok`` row the server found a live-only gap in into a ``warn``.
155
+
156
+ A stage whose agent reads a SIMULATED config works in every sandbox run and
157
+ fails the first live one; an ASK stage bound to a contact with no messaging
158
+ address sends its question nowhere. Both read "ok" from the CLI's own
159
+ reads. A gap on a row that already warns or fails, or on no row, lands in
160
+ a ``Live readiness`` row so it is never dropped.
161
+ """
162
+ gaps: dict[str, list[str]] = {}
163
+ for c in getattr(detail, "sandbox_only_configs", None) or []:
164
+ gaps.setdefault(_row_for(c), []).append(config_gap_line(c))
165
+ for c in getattr(detail, "unreachable_contacts", None) or []:
166
+ gaps.setdefault(_row_for(c), []).append(contact_gap_line(c))
167
+ if not gaps:
168
+ return rows
169
+ out: list[CheckResult] = []
170
+ for row in rows:
171
+ lines = gaps.get(row.title) if row.status in ("ok", "skip") else None
172
+ if lines:
173
+ del gaps[row.title]
174
+ out.append(
175
+ replace(
176
+ row,
177
+ status="warn",
178
+ detail="; ".join(lines),
179
+ hint=row.hint or "Works in the sandbox only — fix it before this runs live.",
180
+ )
181
+ )
182
+ else:
183
+ out.append(row)
184
+ leftover = [line for lines in gaps.values() for line in lines]
185
+ if leftover:
186
+ out.append(
187
+ CheckResult(
188
+ "Live readiness",
189
+ "warn",
190
+ "; ".join(leftover),
191
+ hint=f"fruxon triggers get {trigger} -o json | jq '.sandboxOnlyConfigs, .unreachableContacts'",
192
+ explain="Parts of this automation work in the sandbox but would not live.",
193
+ )
194
+ )
195
+ return out
196
+
197
+
112
198
  def check_ledger(client, trigger: str, *, detail=None, now_ms: int | None = None) -> CheckReport:
113
199
  """Audit whether the automation ``trigger`` can move its items, part by part.
114
200
 
@@ -290,7 +376,7 @@ def check_ledger(client, trigger: str, *, detail=None, now_ms: int | None = None
290
376
  else:
291
377
  add("Dead items", "ok", f"{dead:,} {noun} in the last 7 days" if dead else "none in the last 7 days")
292
378
 
293
- return CheckReport(trigger, tuple(rows))
379
+ return CheckReport(trigger, tuple(_apply_live_gaps(rows, detail, trigger)))
294
380
 
295
381
 
296
382
  def _process_row(client, trigger: str, stage_id: str, agent: str, counts: dict[str, int], now: int) -> CheckResult:
@@ -124,6 +124,8 @@ def login(
124
124
  outside the workspace; a new agent's first publish goes live, but
125
125
  switching a live agent to another revision needs maintainer). The
126
126
  approval page shows the requested level; the user approves or denies.
127
+ No preset carries ``keys:write``, admin included: a token can't mint
128
+ or rotate credentials, so that is done in the dashboard.
127
129
 
128
130
  Signing in adds a workspace and leaves the default alone: other
129
131
  shells and scripts on this machine keep addressing the workspace they
@@ -28,7 +28,7 @@ from rich.markup import escape
28
28
  from fruxon.cli._shared import build_client, confirm_or_die, format_ts, load_json_body
29
29
  from fruxon.cli.integrations import _hint_for_config_error, _resolve_write_output, configs_app
30
30
  from fruxon.exceptions import FruxonError
31
- from fruxon.ui import EXIT_VALIDATION, fail, fail_from_api_error, say_info, say_ok, stderr
31
+ from fruxon.ui import EXIT_NOT_FOUND, EXIT_VALIDATION, fail, fail_from_api_error, say_info, say_ok, stderr
32
32
 
33
33
  sandbox_app = typer.Typer(
34
34
  help="Read and seed a SIMULATED config's sandbox: the entities its tool calls are answered from.",
@@ -152,6 +152,89 @@ def integration_configs_create(
152
152
  )
153
153
 
154
154
 
155
+ _TOOL_ROLES = (
156
+ ("listTools", "list"),
157
+ ("readTools", "read"),
158
+ ("createTools", "create"),
159
+ ("updateTools", "update"),
160
+ ("deleteTools", "delete"),
161
+ )
162
+
163
+
164
+ @sandbox_app.command("schema")
165
+ def sandbox_schema(
166
+ integration: Annotated[str, typer.Argument(help="Integration whose simulated entities to describe.")],
167
+ entity_type: Annotated[str | None, typer.Option("--type", help="Only this entity type.")] = None,
168
+ workspace: _WORKSPACE = None,
169
+ base_url: _BASE_URL = None,
170
+ output: _OUTPUT = None,
171
+ ):
172
+ """What to seed: each entity type's id and payload templates, and the tools that touch it.
173
+
174
+ Per entity type: the id template (`{{seq}}` is a counter), the payload
175
+ template a generated entity follows, what a read of a missing id does
176
+ (`missBehavior`), and which tools list, read, create, update or delete it.
177
+ Action tools touch no entity — the simulator answers them without the store.
178
+ Use it to write `sandbox import` files with the right `entityType` and ids.
179
+ """
180
+ output = _resolve_write_output(output)
181
+ client = build_client(workspace, base_url)
182
+ try:
183
+ schema = client.get_integration_sandbox_schema(integration)
184
+ except FruxonError as e:
185
+ fail_from_api_error(e, hint=_hint_for_schema_error(e))
186
+ types = [t for t in schema.get("entityTypes") or [] if isinstance(t, dict)]
187
+ if entity_type is not None:
188
+ types = [t for t in types if t.get("entityType") == entity_type]
189
+ if not types:
190
+ known = ", ".join(str(t.get("entityType")) for t in schema.get("entityTypes") or [] if isinstance(t, dict))
191
+ fail(
192
+ f"{integration} has no simulated entity type [bold]{escape(entity_type)}[/bold].",
193
+ hint=f"Its types: {known}." if known else "It has no simulated entity types.",
194
+ code=EXIT_NOT_FOUND,
195
+ )
196
+ schema = {**schema, "entityTypes": types}
197
+ if output == "json":
198
+ print(json.dumps(schema, indent=2))
199
+ return
200
+ stderr.print()
201
+ if not types:
202
+ stderr.print(f" [dim]{escape(integration)} declares no simulated entity types[/dim]")
203
+ for t in types:
204
+ stderr.print(f" [bold]{escape(str(t.get('entityType')))}[/bold]")
205
+ if t.get("idTemplate") is None and t.get("payloadTemplate") is None:
206
+ stderr.print(" [dim]no schema — a tool names this type, but nothing describes its shape[/dim]")
207
+ else:
208
+ stderr.print(f" [dim]{'id':<10}[/dim] {escape(str(t.get('idTemplate') or '—'))}")
209
+ if t.get("missBehavior"):
210
+ stderr.print(f" [dim]{'on a miss':<10}[/dim] {escape(str(t['missBehavior']))}")
211
+ for key, label in (("identityParams", "identity"), ("scopeParams", "scope")):
212
+ if t.get(key):
213
+ stderr.print(f" [dim]{label:<10}[/dim] {escape(', '.join(map(str, t[key])))}")
214
+ for key, label in _TOOL_ROLES:
215
+ if t.get(key):
216
+ stderr.print(f" [dim]{label:<10}[/dim] {escape(', '.join(map(str, t[key])))}")
217
+ payload = t.get("payloadTemplate")
218
+ if payload:
219
+ stderr.print(" [dim]payload[/dim]")
220
+ for line in str(payload).splitlines():
221
+ stderr.print(f" {escape(line)}")
222
+ stderr.print()
223
+ actions = schema.get("actionTools") or []
224
+ if actions and entity_type is None:
225
+ stderr.print(" [bold]action tools[/bold] [dim](touch no entity)[/dim]")
226
+ stderr.print(f" {escape(', '.join(map(str, actions)))}")
227
+
228
+
229
+ def _hint_for_schema_error(error: FruxonError) -> str | None:
230
+ from fruxon.exceptions import NotFoundError
231
+ from fruxon.ui import hint_for_forbidden
232
+
233
+ if isinstance(error, NotFoundError):
234
+ return "No such integration — list them with [bold]fruxon integrations list[/bold]."
235
+ return hint_for_forbidden(error)
236
+
237
+
155
238
  @sandbox_app.command("status")
156
239
  def sandbox_status(
157
240
  integration: _INTEGRATION, config_id: _CONFIG, workspace: _WORKSPACE = None, base_url: _BASE_URL = None,
@@ -333,7 +416,10 @@ def _entities_from(raw: object) -> list[dict]:
333
416
  if not isinstance(items, list) or not items:
334
417
  fail(
335
418
  'Expected a non-empty list of entities (or {"entities": [...]}).',
336
- hint="Each is {entityType, entityId, payload, scope?}.",
419
+ hint=(
420
+ "Each is {entityType, entityId, payload, scope?}; "
421
+ "`fruxon integrations configs sandbox schema <integration>` lists the types and id templates."
422
+ ),
337
423
  code=EXIT_VALIDATION,
338
424
  )
339
425
  entities = []
@@ -367,7 +453,9 @@ def sandbox_import(
367
453
  """Insert simulated entities exactly as written.
368
454
 
369
455
  Each entity is `{entityType, entityId, payload, scope?}`; `payload` may be
370
- an object (it is sent as the JSON string the API stores).
456
+ an object (it is sent as the JSON string the API stores). The entity types,
457
+ id templates and payload shapes an integration takes are in
458
+ `fruxon integrations configs sandbox schema <integration>`.
371
459
  """
372
460
  output = _resolve_write_output(output)
373
461
  entities = _entities_from(_read_json(file))
@@ -20,9 +20,10 @@ import json
20
20
  from typing import Annotated
21
21
 
22
22
  import typer
23
+ from rich.markup import escape as _escape
23
24
 
24
25
  from fruxon.checks import shape_get as _shape_get
25
- from fruxon.checks.ledger import describe_wait, describe_wait_event
26
+ from fruxon.checks.ledger import describe_wait, describe_wait_event, live_readiness_lines
26
27
  from fruxon.cli import app
27
28
  from fruxon.cli._shared import build_client, confirm_or_die, format_ts, load_json_body
28
29
  from fruxon.exceptions import FruxonError
@@ -36,6 +37,7 @@ from fruxon.ui import (
36
37
  resolve_output_format,
37
38
  say_info,
38
39
  say_ok,
40
+ say_warn,
39
41
  stderr,
40
42
  )
41
43
 
@@ -222,6 +224,18 @@ def triggers_get(
222
224
  elif fetched.agent_ids:
223
225
  _say_kv("agents", ", ".join(fetched.agent_ids))
224
226
 
227
+ # What works in the sandbox but would not live: a SIMULATED config, or a
228
+ # contact a real page could not reach. Last, so it is the thing left on screen.
229
+ live_gaps = live_readiness_lines(fetched)
230
+ if live_gaps:
231
+ stderr.print()
232
+ for line in live_gaps:
233
+ say_warn(_escape(line))
234
+ say_info(
235
+ f"Full rows: [bold]fruxon triggers get {fetched.id} -o json | "
236
+ "jq '.sandboxOnlyConfigs, .unreachableContacts'[/bold]"
237
+ )
238
+
225
239
 
226
240
  # ─────────────────────────────────────────────────────────────────────────────
227
241
  # create / update / delete / fire / bind / unbind
@@ -1076,6 +1090,9 @@ def _detail_to_dict(t: TriggerDetail) -> dict:
1076
1090
  "outcomeDigest": t.outcome_digest,
1077
1091
  "bindings": [_binding_to_dict(b) for b in t.bindings],
1078
1092
  "managedBy": _managed_by_to_dict(t.managed_by),
1093
+ # Verbatim server rows: what would work in the sandbox but not live.
1094
+ "sandboxOnlyConfigs": t.sandbox_only_configs,
1095
+ "unreachableContacts": t.unreachable_contacts,
1079
1096
  }
1080
1097
 
1081
1098
 
@@ -57,6 +57,9 @@ def triggers_check(
57
57
  • Outcome report — does the note's contact reach a person?
58
58
  • Budget — this week's spend against the weekly limit
59
59
  • Dead items — how many died in the last 7 days
60
+ • Live readiness — a SIMULATED config or an unreachable contact the
61
+ server found turns that part's ``ok`` into ``warn``: it works in the
62
+ sandbox only
60
63
 
61
64
  Read-only. Exits 12 on a hard ``fail`` (a stage that cannot run, a source
62
65
  whose last pass failed, a limit that has stopped the runs); ``warn`` rows
@@ -3382,6 +3382,18 @@ class FruxonClient:
3382
3382
  def _sandbox_url(self, integration: str, config_id: str, action: str = "") -> str:
3383
3383
  return self._integration_url(integration, f"/configs/{config_id}/sandbox{action}")
3384
3384
 
3385
+ def get_integration_sandbox_schema(self, integration: str) -> dict:
3386
+ """What the simulator knows about an integration's entities.
3387
+
3388
+ ``{integrationId, entityTypes: [{entityType, idTemplate?, identityParams,
3389
+ scopeParams, payloadTemplate?, missBehavior?, listTools, readTools,
3390
+ createTools, updateTools, deleteTools}], actionTools}``. A type a tool
3391
+ names but no schema describes has no ``idTemplate`` / ``payloadTemplate``
3392
+ / ``missBehavior``. ``actionTools`` touch no entity.
3393
+ """
3394
+ raw = self._get_json(self._integration_url(integration, "/sandbox/schema"))
3395
+ return raw if isinstance(raw, dict) else {}
3396
+
3385
3397
  def get_config_sandbox(self, integration: str, config_id: str) -> dict:
3386
3398
  """The sandbox's status: ``entityCounts`` by type, ``callCount``, ``lastActivityAt``."""
3387
3399
  raw = self._get_json(self._sandbox_url(integration, config_id))
@@ -8136,6 +8148,11 @@ class FruxonClient:
8136
8148
  response is the only time the raw secret (``token``) crosses
8137
8149
  the wire — store it immediately. Body fields: ``name``,
8138
8150
  ``expirationDays``, ``scopes``, ``preset``, ``type``.
8151
+
8152
+ Only a signed-in person may mint: called with an API token (which
8153
+ is how this client authenticates) the server answers ``403``
8154
+ ``token_cannot_mint``. Mint in the dashboard, or run
8155
+ ``fruxon login`` for a CLI token.
8139
8156
  """
8140
8157
  url = f"{self._base_url}/v1/tenants/{self._workspace}/tokens:generate"
8141
8158
  return self._post_json(url, body)
@@ -8149,6 +8166,9 @@ class FruxonClient:
8149
8166
  ``None``) rotates the secret only. Pass
8150
8167
  ``{preset|scopes|name|expirationDays}`` to narrow / widen
8151
8168
  permissions, rename, or change lifetime in the same call.
8169
+
8170
+ Like :meth:`generate_token`, refused for an API-token caller
8171
+ (``403 token_cannot_mint``): rotate from the dashboard.
8152
8172
  """
8153
8173
  url = f"{self._base_url}/v1/tenants/{self._workspace}/tokens/{token_id}:rotate"
8154
8174
  return self._post_json(url, overrides or {})
@@ -10502,6 +10522,8 @@ def _parse_trigger_detail(data: object) -> TriggerDetail:
10502
10522
  work_shape=work_shape if isinstance(work_shape, dict) else None,
10503
10523
  outcome_digest=digest if isinstance(digest, dict) else None,
10504
10524
  managed_by=_parse_managed_by(data.get("managedBy")),
10525
+ sandbox_only_configs=[c for c in data.get("sandboxOnlyConfigs") or [] if isinstance(c, dict)],
10526
+ unreachable_contacts=[c for c in data.get("unreachableContacts") or [] if isinstance(c, dict)],
10505
10527
  )
10506
10528
 
10507
10529
 
@@ -1409,6 +1409,17 @@ class TriggerDetail:
1409
1409
  #: reads immediately before editing one. See :class:`ManagedBy`.
1410
1410
  managed_by: ManagedBy | None = None
1411
1411
 
1412
+ #: Configs this automation uses that are ``SIMULATED`` — fine in the
1413
+ #: sandbox, a failure live. Raw server rows: ``{configId, integrationId,
1414
+ #: displayName, usedBy (SOURCE|STAGE_AGENT|EVENT), stageId?, agentId?,
1415
+ #: message}``. Empty on a list read or from a server that predates it.
1416
+ sandbox_only_configs: list[dict] = field(default_factory=list)
1417
+
1418
+ #: Contacts this automation asks or reports to that a live page could not
1419
+ #: reach. Raw rows: ``{usedBy (ASK_STAGE|OUTCOME_REPORT), stageId?, agentId?,
1420
+ #: slot, participantId, displayName, liveReachability, reason}``.
1421
+ unreachable_contacts: list[dict] = field(default_factory=list)
1422
+
1412
1423
 
1413
1424
  @dataclass(frozen=True)
1414
1425
  class LedgerItem:
@@ -706,7 +706,8 @@ runs never read it.
706
706
  ```bash
707
707
  # 1. A simulated config, published, no credentials (one step):
708
708
  fruxon integrations configs create google_calendar --simulated -o json # → id
709
- # 2. Seed the store it answers from (or `sandbox import --file entities.json`):
709
+ # 2. Seed the store it answers from (or `sandbox import --file entities.json` — the entity
710
+ # types, id templates and payload shapes it takes: `fruxon integrations configs sandbox schema google_calendar`):
710
711
  fruxon integrations configs sandbox generate google_calendar <config> \
711
712
  --type event --count 15 --prompt "Clinic appointments next week, 20-minute slots, some gaps" \
712
713
  --context ./kb/services-and-hours.md # facts the data must agree with (the agent's KB text)
@@ -70,7 +70,7 @@ fruxon integrations connect <integration> # create a config + mint a link a hum
70
70
  fruxon integrations authorize <integration> # the same, for an integration's OAuth method only
71
71
  fruxon integrations triggers <integration> # event types (+ payload paths) an integration can fire an agent on
72
72
  fruxon integrations configs list / get / update / publish <integration> # saved credentials; update edits the draft, publish makes it live
73
- fruxon integrations configs create <integration> --simulated # no credentials yet: sandbox runs answered from a simulated store (configs sandbox generate/import/…)
73
+ fruxon integrations configs create <integration> --simulated # no credentials yet: sandbox runs answered from a simulated store (configs sandbox schema/generate/import/…)
74
74
  fruxon tools list <integration> / create
75
75
  fruxon assets create/list/get/wait/delete # the indexed RAG assets an agent's assetConfig attaches
76
76
  fruxon assets replace-file <a> --file … # new contents for an uploaded file, same id: agents using it read the new file
@@ -622,7 +622,8 @@ def say_next(*steps: tuple[str, str]) -> None:
622
622
  # secrets:write, triggers:fire, participants:send, ...), pipelines:write/run,
623
623
  # async_operations:write, billing:read, audit:read and the system scopes — and
624
624
  # gets the admin/dashboard fallback. (workspace:delete and billing:write sit
625
- # above even Admin, Owner-only; no CLI command needs them.)
625
+ # above even Admin, Owner-only; no CLI command needs them.) keys:write is the
626
+ # exception: no login carries it, admin included (_DASHBOARD_ONLY_SCOPES).
626
627
  _SMALLEST_PRESET_FOR_SCOPE: dict[str, str] = {
627
628
  # Observer: every :read minus SensitiveReadScopes (billing:read, audit:read).
628
629
  "agents:read": "observer",
@@ -668,6 +669,13 @@ _SMALLEST_PRESET_FOR_SCOPE: dict[str, str] = {
668
669
  }
669
670
 
670
671
 
672
+ # Scopes no `fruxon login` mints, whatever the preset. keys:write: a token can't
673
+ # mint or rotate credentials (the backend answers 403 token_cannot_mint), so on a
674
+ # login token it would buy only revoking, and the backend leaves it off
675
+ # (DeviceAuthorizationService.LoginScopes). A person grants it in the dashboard.
676
+ _DASHBOARD_ONLY_SCOPES = frozenset({"keys:write"})
677
+
678
+
671
679
  def hint_for_forbidden(error: Exception) -> str | None:
672
680
  """Render an actionable hint for a 403.
673
681
 
@@ -701,6 +709,14 @@ def hint_for_forbidden(error: Exception) -> str | None:
701
709
  # The access level is declared by the CLI at login (--preset), not
702
710
  # picked in the browser — point at the smallest preset that carries
703
711
  # the missing scope, so a key missing drafts:write isn't sent to admin.
712
+ if error.required in _DASHBOARD_ONLY_SCOPES:
713
+ escalation = (
714
+ f"No [bold]fruxon login[/bold] carries {error.required}, admin included. "
715
+ "Do this in the Fruxon dashboard, or mint a token with the scope on its API keys page."
716
+ )
717
+ if is_agent_mode():
718
+ escalation += " Under an agent driver, relay this to the user: only they can grant it."
719
+ return f"This key can't [bold]{error.required}[/bold]. Granted: [dim]{granted}[/dim]\n{escalation}"
704
720
  preset = _SMALLEST_PRESET_FOR_SCOPE.get(error.required)
705
721
  if preset is not None:
706
722
  default = " (the default)" if preset == "developer" else ""
@@ -72,6 +72,8 @@ class FakeClient:
72
72
  self.dead = overrides.get("dead", 0)
73
73
  self.failed_here = overrides.get("failed_here", 0)
74
74
  self.broken = set(overrides.get("broken", ()))
75
+ self.sandbox_only = overrides.get("sandbox_only", [])
76
+ self.unreachable = overrides.get("unreachable", [])
75
77
 
76
78
  def get_trigger(self, trigger):
77
79
  return TriggerDetail(
@@ -81,6 +83,8 @@ class FakeClient:
81
83
  active=self.active,
82
84
  work_shape=self.shape,
83
85
  outcome_digest=self.digest,
86
+ sandbox_only_configs=self.sandbox_only,
87
+ unreachable_contacts=self.unreachable,
84
88
  )
85
89
 
86
90
  def get_ledger_funnel(self, trigger):
@@ -351,3 +355,62 @@ def test_wait_descriptions():
351
355
  ("capture", "payload.message_attributes.amount → paid_amount (NUMBER)"),
352
356
  ("only when", "payload.status EQUALS succeeded or payload.currency IN [usd, eur]"),
353
357
  ]
358
+
359
+
360
+ # ── Live readiness (F-031 / F-032): what works in the sandbox only ──────────
361
+
362
+ SIM_CONFIG = {
363
+ "configId": "cfg-1",
364
+ "integrationId": "priority",
365
+ "displayName": "Priority (simulated)",
366
+ "usedBy": "STAGE_AGENT",
367
+ "stageId": "file in ERP",
368
+ "agentId": "erp-filer",
369
+ "message": "Stage 'file in ERP' (agent 'erp-filer') uses 'Priority (simulated)', a SIMULATED config.",
370
+ }
371
+ NO_ADDRESS = {
372
+ "usedBy": "ASK_STAGE",
373
+ "stageId": "approve",
374
+ "agentId": "invoice-reader",
375
+ "slot": "finance-team",
376
+ "participantId": "p-1",
377
+ "displayName": "Dana",
378
+ "liveReachability": "NO_MESSAGING_ADDRESS",
379
+ "reason": "has no messaging address a page can be sent to",
380
+ }
381
+
382
+
383
+ def test_a_simulated_config_turns_its_stage_ok_into_a_warning():
384
+ report = check_ledger(FakeClient(sandbox_only=[SIM_CONFIG]), "trg-1", now_ms=NOW)
385
+ rows = {r.title: r for r in report.checks}
386
+ assert rows["file in ERP"].status == "warn"
387
+ assert "SIMULATED" in rows["file in ERP"].detail
388
+ assert rows["extract"].status == "ok"
389
+ assert report.overall == "warn"
390
+ assert "Live readiness" not in rows
391
+
392
+
393
+ def test_an_unreachable_contact_warns_on_its_ask_stage():
394
+ rows = _rows(FakeClient(unreachable=[NO_ADDRESS]))
395
+ assert rows["approve"].status == "warn"
396
+ assert "finance-team" in rows["approve"].detail and "Dana" in rows["approve"].detail
397
+ assert "no messaging address" in rows["approve"].detail
398
+
399
+
400
+ def test_report_and_source_gaps_land_on_their_rows():
401
+ report_gap = {**NO_ADDRESS, "usedBy": "OUTCOME_REPORT", "stageId": None, "slot": "ops-lead"}
402
+ source_gap = {**SIM_CONFIG, "usedBy": "SOURCE", "stageId": None, "message": "source is simulated"}
403
+ rows = _rows(FakeClient(unreachable=[report_gap], sandbox_only=[source_gap]))
404
+ assert rows["Outcome report"].status == "warn"
405
+ assert rows["Source"].status == "warn" and rows["Source"].detail == "source is simulated"
406
+
407
+
408
+ def test_a_gap_on_a_failing_row_is_kept_in_a_live_readiness_row():
409
+ rows = _rows(FakeClient(rejected={"erp-filer"}, sandbox_only=[SIM_CONFIG]))
410
+ assert rows["file in ERP"].status == "fail"
411
+ assert rows["Live readiness"].status == "warn"
412
+ assert "SIMULATED" in rows["Live readiness"].detail
413
+
414
+
415
+ def test_no_gaps_leave_the_report_unchanged():
416
+ assert "Live readiness" not in _rows(FakeClient())