fruxon 2.2.5__tar.gz → 2.2.7__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 (219) hide show
  1. {fruxon-2.2.5 → fruxon-2.2.7}/HISTORY.md +25 -0
  2. {fruxon-2.2.5 → fruxon-2.2.7}/PKG-INFO +2 -2
  3. {fruxon-2.2.5 → fruxon-2.2.7}/README.md +1 -1
  4. {fruxon-2.2.5 → fruxon-2.2.7}/src/fruxon/__init__.py +4 -0
  5. {fruxon-2.2.5 → fruxon-2.2.7}/src/fruxon/_version.py +2 -2
  6. fruxon-2.2.7/src/fruxon/cli/_ledger_passes.py +88 -0
  7. {fruxon-2.2.5 → fruxon-2.2.7}/src/fruxon/cli/auth.py +4 -3
  8. {fruxon-2.2.5 → fruxon-2.2.7}/src/fruxon/cli/knowledge_sources.py +21 -3
  9. {fruxon-2.2.5 → fruxon-2.2.7}/src/fruxon/cli/triggers_ledger.py +32 -4
  10. {fruxon-2.2.5 → fruxon-2.2.7}/src/fruxon/fruxon.py +33 -1
  11. {fruxon-2.2.5 → fruxon-2.2.7}/src/fruxon/models.py +47 -1
  12. {fruxon-2.2.5 → fruxon-2.2.7}/src/fruxon/skills/fruxon-debug-trace/SKILL.md +1 -1
  13. {fruxon-2.2.5 → fruxon-2.2.7}/tests/test_knowledge_sources.py +46 -0
  14. {fruxon-2.2.5 → fruxon-2.2.7}/tests/test_triggers_ledger.py +129 -0
  15. {fruxon-2.2.5 → fruxon-2.2.7}/.gitignore +0 -0
  16. {fruxon-2.2.5 → fruxon-2.2.7}/LICENSE +0 -0
  17. {fruxon-2.2.5 → fruxon-2.2.7}/pyproject.toml +0 -0
  18. {fruxon-2.2.5 → fruxon-2.2.7}/src/fruxon/__main__.py +0 -0
  19. {fruxon-2.2.5 → fruxon-2.2.7}/src/fruxon/_ssl.py +0 -0
  20. {fruxon-2.2.5 → fruxon-2.2.7}/src/fruxon/checks/__init__.py +0 -0
  21. {fruxon-2.2.5 → fruxon-2.2.7}/src/fruxon/checks/agent.py +0 -0
  22. {fruxon-2.2.5 → fruxon-2.2.7}/src/fruxon/checks/ledger.py +0 -0
  23. {fruxon-2.2.5 → fruxon-2.2.7}/src/fruxon/checks/references.py +0 -0
  24. {fruxon-2.2.5 → fruxon-2.2.7}/src/fruxon/cli/__init__.py +0 -0
  25. {fruxon-2.2.5 → fruxon-2.2.7}/src/fruxon/cli/_crash.py +0 -0
  26. {fruxon-2.2.5 → fruxon-2.2.7}/src/fruxon/cli/_plugin_hint.py +0 -0
  27. {fruxon-2.2.5 → fruxon-2.2.7}/src/fruxon/cli/_schema.py +0 -0
  28. {fruxon-2.2.5 → fruxon-2.2.7}/src/fruxon/cli/_shared.py +0 -0
  29. {fruxon-2.2.5 → fruxon-2.2.7}/src/fruxon/cli/_stream.py +0 -0
  30. {fruxon-2.2.5 → fruxon-2.2.7}/src/fruxon/cli/agents.py +0 -0
  31. {fruxon-2.2.5 → fruxon-2.2.7}/src/fruxon/cli/agents_approvals.py +0 -0
  32. {fruxon-2.2.5 → fruxon-2.2.7}/src/fruxon/cli/agents_budget.py +0 -0
  33. {fruxon-2.2.5 → fruxon-2.2.7}/src/fruxon/cli/agents_channels.py +0 -0
  34. {fruxon-2.2.5 → fruxon-2.2.7}/src/fruxon/cli/agents_draft.py +0 -0
  35. {fruxon-2.2.5 → fruxon-2.2.7}/src/fruxon/cli/agents_evaluations.py +0 -0
  36. {fruxon-2.2.5 → fruxon-2.2.7}/src/fruxon/cli/agents_executions.py +0 -0
  37. {fruxon-2.2.5 → fruxon-2.2.7}/src/fruxon/cli/agents_improvements.py +0 -0
  38. {fruxon-2.2.5 → fruxon-2.2.7}/src/fruxon/cli/agents_lifecycle.py +0 -0
  39. {fruxon-2.2.5 → fruxon-2.2.7}/src/fruxon/cli/agents_memory.py +0 -0
  40. {fruxon-2.2.5 → fruxon-2.2.7}/src/fruxon/cli/agents_reply_style.py +0 -0
  41. {fruxon-2.2.5 → fruxon-2.2.7}/src/fruxon/cli/agents_revisions.py +0 -0
  42. {fruxon-2.2.5 → fruxon-2.2.7}/src/fruxon/cli/agents_sandbox.py +0 -0
  43. {fruxon-2.2.5 → fruxon-2.2.7}/src/fruxon/cli/agents_sandbox_test.py +0 -0
  44. {fruxon-2.2.5 → fruxon-2.2.7}/src/fruxon/cli/agents_slots.py +0 -0
  45. {fruxon-2.2.5 → fruxon-2.2.7}/src/fruxon/cli/agents_system_blocks.py +0 -0
  46. {fruxon-2.2.5 → fruxon-2.2.7}/src/fruxon/cli/agents_tests.py +0 -0
  47. {fruxon-2.2.5 → fruxon-2.2.7}/src/fruxon/cli/agents_topics.py +0 -0
  48. {fruxon-2.2.5 → fruxon-2.2.7}/src/fruxon/cli/agents_voice_calls.py +0 -0
  49. {fruxon-2.2.5 → fruxon-2.2.7}/src/fruxon/cli/applications.py +0 -0
  50. {fruxon-2.2.5 → fruxon-2.2.7}/src/fruxon/cli/applications_entry_points.py +0 -0
  51. {fruxon-2.2.5 → fruxon-2.2.7}/src/fruxon/cli/assets.py +0 -0
  52. {fruxon-2.2.5 → fruxon-2.2.7}/src/fruxon/cli/capabilities.py +0 -0
  53. {fruxon-2.2.5 → fruxon-2.2.7}/src/fruxon/cli/completion.py +0 -0
  54. {fruxon-2.2.5 → fruxon-2.2.7}/src/fruxon/cli/config.py +0 -0
  55. {fruxon-2.2.5 → fruxon-2.2.7}/src/fruxon/cli/consult_pins.py +0 -0
  56. {fruxon-2.2.5 → fruxon-2.2.7}/src/fruxon/cli/conversation_imports.py +0 -0
  57. {fruxon-2.2.5 → fruxon-2.2.7}/src/fruxon/cli/dash.py +0 -0
  58. {fruxon-2.2.5 → fruxon-2.2.7}/src/fruxon/cli/describe.py +0 -0
  59. {fruxon-2.2.5 → fruxon-2.2.7}/src/fruxon/cli/doctor.py +0 -0
  60. {fruxon-2.2.5 → fruxon-2.2.7}/src/fruxon/cli/environments.py +0 -0
  61. {fruxon-2.2.5 → fruxon-2.2.7}/src/fruxon/cli/escalations.py +0 -0
  62. {fruxon-2.2.5 → fruxon-2.2.7}/src/fruxon/cli/examples.py +0 -0
  63. {fruxon-2.2.5 → fruxon-2.2.7}/src/fruxon/cli/guides.py +0 -0
  64. {fruxon-2.2.5 → fruxon-2.2.7}/src/fruxon/cli/integrations.py +0 -0
  65. {fruxon-2.2.5 → fruxon-2.2.7}/src/fruxon/cli/keys.py +0 -0
  66. {fruxon-2.2.5 → fruxon-2.2.7}/src/fruxon/cli/knowledge_bases.py +0 -0
  67. {fruxon-2.2.5 → fruxon-2.2.7}/src/fruxon/cli/knowledge_documents.py +0 -0
  68. {fruxon-2.2.5 → fruxon-2.2.7}/src/fruxon/cli/knowledge_notices.py +0 -0
  69. {fruxon-2.2.5 → fruxon-2.2.7}/src/fruxon/cli/llm_providers.py +0 -0
  70. {fruxon-2.2.5 → fruxon-2.2.7}/src/fruxon/cli/messages.py +0 -0
  71. {fruxon-2.2.5 → fruxon-2.2.7}/src/fruxon/cli/metrics.py +0 -0
  72. {fruxon-2.2.5 → fruxon-2.2.7}/src/fruxon/cli/participants.py +0 -0
  73. {fruxon-2.2.5 → fruxon-2.2.7}/src/fruxon/cli/pipelines.py +0 -0
  74. {fruxon-2.2.5 → fruxon-2.2.7}/src/fruxon/cli/secrets.py +0 -0
  75. {fruxon-2.2.5 → fruxon-2.2.7}/src/fruxon/cli/skills.py +0 -0
  76. {fruxon-2.2.5 → fruxon-2.2.7}/src/fruxon/cli/storage.py +0 -0
  77. {fruxon-2.2.5 → fruxon-2.2.7}/src/fruxon/cli/tools.py +0 -0
  78. {fruxon-2.2.5 → fruxon-2.2.7}/src/fruxon/cli/triggers.py +0 -0
  79. {fruxon-2.2.5 → fruxon-2.2.7}/src/fruxon/cli/triggers_budget.py +0 -0
  80. {fruxon-2.2.5 → fruxon-2.2.7}/src/fruxon/cli/triggers_check.py +0 -0
  81. {fruxon-2.2.5 → fruxon-2.2.7}/src/fruxon/cli/triggers_ledger_stage_tests.py +0 -0
  82. {fruxon-2.2.5 → fruxon-2.2.7}/src/fruxon/cli/triggers_questions.py +0 -0
  83. {fruxon-2.2.5 → fruxon-2.2.7}/src/fruxon/cli/triggers_shape.py +0 -0
  84. {fruxon-2.2.5 → fruxon-2.2.7}/src/fruxon/cli/workspaces.py +0 -0
  85. {fruxon-2.2.5 → fruxon-2.2.7}/src/fruxon/credentials.py +0 -0
  86. {fruxon-2.2.5 → fruxon-2.2.7}/src/fruxon/device_auth.py +0 -0
  87. {fruxon-2.2.5 → fruxon-2.2.7}/src/fruxon/doctor.py +0 -0
  88. {fruxon-2.2.5 → fruxon-2.2.7}/src/fruxon/exceptions.py +0 -0
  89. {fruxon-2.2.5 → fruxon-2.2.7}/src/fruxon/flow_validation.py +0 -0
  90. {fruxon-2.2.5 → fruxon-2.2.7}/src/fruxon/output.py +0 -0
  91. {fruxon-2.2.5 → fruxon-2.2.7}/src/fruxon/params.py +0 -0
  92. {fruxon-2.2.5 → fruxon-2.2.7}/src/fruxon/sandbox_scenario.py +0 -0
  93. {fruxon-2.2.5 → fruxon-2.2.7}/src/fruxon/skills/__init__.py +0 -0
  94. {fruxon-2.2.5 → fruxon-2.2.7}/src/fruxon/skills/fruxon-agent-mode/SKILL.md +0 -0
  95. {fruxon-2.2.5 → fruxon-2.2.7}/src/fruxon/skills/fruxon-build-agent/SKILL.md +0 -0
  96. {fruxon-2.2.5 → fruxon-2.2.7}/src/fruxon/skills/fruxon-create-integration/SKILL.md +0 -0
  97. {fruxon-2.2.5 → fruxon-2.2.7}/src/fruxon/skills/fruxon-meet/SKILL.md +0 -0
  98. {fruxon-2.2.5 → fruxon-2.2.7}/src/fruxon/skills/fruxon-use-integrations/SKILL.md +0 -0
  99. {fruxon-2.2.5 → fruxon-2.2.7}/src/fruxon/telemetry.py +0 -0
  100. {fruxon-2.2.5 → fruxon-2.2.7}/src/fruxon/tui/__init__.py +0 -0
  101. {fruxon-2.2.5 → fruxon-2.2.7}/src/fruxon/tui/app.py +0 -0
  102. {fruxon-2.2.5 → fruxon-2.2.7}/src/fruxon/tui/demo.py +0 -0
  103. {fruxon-2.2.5 → fruxon-2.2.7}/src/fruxon/tui/links.py +0 -0
  104. {fruxon-2.2.5 → fruxon-2.2.7}/src/fruxon/tui/screens/__init__.py +0 -0
  105. {fruxon-2.2.5 → fruxon-2.2.7}/src/fruxon/tui/screens/agent.py +0 -0
  106. {fruxon-2.2.5 → fruxon-2.2.7}/src/fruxon/tui/screens/base.py +0 -0
  107. {fruxon-2.2.5 → fruxon-2.2.7}/src/fruxon/tui/screens/home.py +0 -0
  108. {fruxon-2.2.5 → fruxon-2.2.7}/src/fruxon/tui/screens/ledger.py +0 -0
  109. {fruxon-2.2.5 → fruxon-2.2.7}/src/fruxon/tui/screens/loader.py +0 -0
  110. {fruxon-2.2.5 → fruxon-2.2.7}/src/fruxon/tui/screens/pickers.py +0 -0
  111. {fruxon-2.2.5 → fruxon-2.2.7}/src/fruxon/tui/screens/trace.py +0 -0
  112. {fruxon-2.2.5 → fruxon-2.2.7}/src/fruxon/tui/source.py +0 -0
  113. {fruxon-2.2.5 → fruxon-2.2.7}/src/fruxon/tui/theme.py +0 -0
  114. {fruxon-2.2.5 → fruxon-2.2.7}/src/fruxon/tui/views.py +0 -0
  115. {fruxon-2.2.5 → fruxon-2.2.7}/src/fruxon/tui/widgets.py +0 -0
  116. {fruxon-2.2.5 → fruxon-2.2.7}/src/fruxon/ui.py +0 -0
  117. {fruxon-2.2.5 → fruxon-2.2.7}/src/fruxon/update_check.py +0 -0
  118. {fruxon-2.2.5 → fruxon-2.2.7}/src/fruxon/validation.py +0 -0
  119. {fruxon-2.2.5 → fruxon-2.2.7}/tests/.test_durations.json +0 -0
  120. {fruxon-2.2.5 → fruxon-2.2.7}/tests/__init__.py +0 -0
  121. {fruxon-2.2.5 → fruxon-2.2.7}/tests/conftest.py +0 -0
  122. {fruxon-2.2.5 → fruxon-2.2.7}/tests/test_actor.py +0 -0
  123. {fruxon-2.2.5 → fruxon-2.2.7}/tests/test_agent_lifecycle.py +0 -0
  124. {fruxon-2.2.5 → fruxon-2.2.7}/tests/test_agent_revisions_list.py +0 -0
  125. {fruxon-2.2.5 → fruxon-2.2.7}/tests/test_agent_slots.py +0 -0
  126. {fruxon-2.2.5 → fruxon-2.2.7}/tests/test_agents_check_cli.py +0 -0
  127. {fruxon-2.2.5 → fruxon-2.2.7}/tests/test_agents_revisions_cli.py +0 -0
  128. {fruxon-2.2.5 → fruxon-2.2.7}/tests/test_agents_sandbox.py +0 -0
  129. {fruxon-2.2.5 → fruxon-2.2.7}/tests/test_applications.py +0 -0
  130. {fruxon-2.2.5 → fruxon-2.2.7}/tests/test_approvals.py +0 -0
  131. {fruxon-2.2.5 → fruxon-2.2.7}/tests/test_assets.py +0 -0
  132. {fruxon-2.2.5 → fruxon-2.2.7}/tests/test_budgets.py +0 -0
  133. {fruxon-2.2.5 → fruxon-2.2.7}/tests/test_capabilities.py +0 -0
  134. {fruxon-2.2.5 → fruxon-2.2.7}/tests/test_channels.py +0 -0
  135. {fruxon-2.2.5 → fruxon-2.2.7}/tests/test_checks_agent.py +0 -0
  136. {fruxon-2.2.5 → fruxon-2.2.7}/tests/test_checks_ledger.py +0 -0
  137. {fruxon-2.2.5 → fruxon-2.2.7}/tests/test_cli.py +0 -0
  138. {fruxon-2.2.5 → fruxon-2.2.7}/tests/test_cli_base_url_routing.py +0 -0
  139. {fruxon-2.2.5 → fruxon-2.2.7}/tests/test_cli_crash.py +0 -0
  140. {fruxon-2.2.5 → fruxon-2.2.7}/tests/test_cli_root_flags.py +0 -0
  141. {fruxon-2.2.5 → fruxon-2.2.7}/tests/test_client.py +0 -0
  142. {fruxon-2.2.5 → fruxon-2.2.7}/tests/test_connect_nudge.py +0 -0
  143. {fruxon-2.2.5 → fruxon-2.2.7}/tests/test_consult.py +0 -0
  144. {fruxon-2.2.5 → fruxon-2.2.7}/tests/test_conversation_imports.py +0 -0
  145. {fruxon-2.2.5 → fruxon-2.2.7}/tests/test_credentials.py +0 -0
  146. {fruxon-2.2.5 → fruxon-2.2.7}/tests/test_dash_app.py +0 -0
  147. {fruxon-2.2.5 → fruxon-2.2.7}/tests/test_dash_cli.py +0 -0
  148. {fruxon-2.2.5 → fruxon-2.2.7}/tests/test_dash_client.py +0 -0
  149. {fruxon-2.2.5 → fruxon-2.2.7}/tests/test_dash_links.py +0 -0
  150. {fruxon-2.2.5 → fruxon-2.2.7}/tests/test_dash_source.py +0 -0
  151. {fruxon-2.2.5 → fruxon-2.2.7}/tests/test_describe.py +0 -0
  152. {fruxon-2.2.5 → fruxon-2.2.7}/tests/test_device_auth.py +0 -0
  153. {fruxon-2.2.5 → fruxon-2.2.7}/tests/test_docs_commands_exist.py +0 -0
  154. {fruxon-2.2.5 → fruxon-2.2.7}/tests/test_doctor.py +0 -0
  155. {fruxon-2.2.5 → fruxon-2.2.7}/tests/test_draft_bootstrap.py +0 -0
  156. {fruxon-2.2.5 → fruxon-2.2.7}/tests/test_draft_evaluate_cli.py +0 -0
  157. {fruxon-2.2.5 → fruxon-2.2.7}/tests/test_draft_pull_shape.py +0 -0
  158. {fruxon-2.2.5 → fruxon-2.2.7}/tests/test_draft_run_replay.py +0 -0
  159. {fruxon-2.2.5 → fruxon-2.2.7}/tests/test_draft_validate_cli.py +0 -0
  160. {fruxon-2.2.5 → fruxon-2.2.7}/tests/test_drafts.py +0 -0
  161. {fruxon-2.2.5 → fruxon-2.2.7}/tests/test_entry_points.py +0 -0
  162. {fruxon-2.2.5 → fruxon-2.2.7}/tests/test_environments.py +0 -0
  163. {fruxon-2.2.5 → fruxon-2.2.7}/tests/test_escalations.py +0 -0
  164. {fruxon-2.2.5 → fruxon-2.2.7}/tests/test_evaluations.py +0 -0
  165. {fruxon-2.2.5 → fruxon-2.2.7}/tests/test_execution_records.py +0 -0
  166. {fruxon-2.2.5 → fruxon-2.2.7}/tests/test_flow_validation.py +0 -0
  167. {fruxon-2.2.5 → fruxon-2.2.7}/tests/test_fruxon.py +0 -0
  168. {fruxon-2.2.5 → fruxon-2.2.7}/tests/test_guides.py +0 -0
  169. {fruxon-2.2.5 → fruxon-2.2.7}/tests/test_improvements.py +0 -0
  170. {fruxon-2.2.5 → fruxon-2.2.7}/tests/test_integration_configs_write_cli.py +0 -0
  171. {fruxon-2.2.5 → fruxon-2.2.7}/tests/test_integration_triggers_cli.py +0 -0
  172. {fruxon-2.2.5 → fruxon-2.2.7}/tests/test_integrations_authorize_cli.py +0 -0
  173. {fruxon-2.2.5 → fruxon-2.2.7}/tests/test_integrations_connect_cli.py +0 -0
  174. {fruxon-2.2.5 → fruxon-2.2.7}/tests/test_kb_trial_cli.py +0 -0
  175. {fruxon-2.2.5 → fruxon-2.2.7}/tests/test_knowledge_bases.py +0 -0
  176. {fruxon-2.2.5 → fruxon-2.2.7}/tests/test_knowledge_documents.py +0 -0
  177. {fruxon-2.2.5 → fruxon-2.2.7}/tests/test_knowledge_notices.py +0 -0
  178. {fruxon-2.2.5 → fruxon-2.2.7}/tests/test_llm_provider_configs_cli.py +0 -0
  179. {fruxon-2.2.5 → fruxon-2.2.7}/tests/test_llm_providers_connect_cli.py +0 -0
  180. {fruxon-2.2.5 → fruxon-2.2.7}/tests/test_managed_by.py +0 -0
  181. {fruxon-2.2.5 → fruxon-2.2.7}/tests/test_memory.py +0 -0
  182. {fruxon-2.2.5 → fruxon-2.2.7}/tests/test_messages.py +0 -0
  183. {fruxon-2.2.5 → fruxon-2.2.7}/tests/test_metrics.py +0 -0
  184. {fruxon-2.2.5 → fruxon-2.2.7}/tests/test_online_llm_config_refs.py +0 -0
  185. {fruxon-2.2.5 → fruxon-2.2.7}/tests/test_online_prefetch_refs.py +0 -0
  186. {fruxon-2.2.5 → fruxon-2.2.7}/tests/test_online_secret_refs.py +0 -0
  187. {fruxon-2.2.5 → fruxon-2.2.7}/tests/test_output.py +0 -0
  188. {fruxon-2.2.5 → fruxon-2.2.7}/tests/test_params.py +0 -0
  189. {fruxon-2.2.5 → fruxon-2.2.7}/tests/test_participants.py +0 -0
  190. {fruxon-2.2.5 → fruxon-2.2.7}/tests/test_participants_write.py +0 -0
  191. {fruxon-2.2.5 → fruxon-2.2.7}/tests/test_pipelines.py +0 -0
  192. {fruxon-2.2.5 → fruxon-2.2.7}/tests/test_plugin_hint.py +0 -0
  193. {fruxon-2.2.5 → fruxon-2.2.7}/tests/test_reply_style.py +0 -0
  194. {fruxon-2.2.5 → fruxon-2.2.7}/tests/test_sandbox_scenario.py +0 -0
  195. {fruxon-2.2.5 → fruxon-2.2.7}/tests/test_schema.py +0 -0
  196. {fruxon-2.2.5 → fruxon-2.2.7}/tests/test_schema_fetch.py +0 -0
  197. {fruxon-2.2.5 → fruxon-2.2.7}/tests/test_secrets.py +0 -0
  198. {fruxon-2.2.5 → fruxon-2.2.7}/tests/test_skills.py +0 -0
  199. {fruxon-2.2.5 → fruxon-2.2.7}/tests/test_ssl.py +0 -0
  200. {fruxon-2.2.5 → fruxon-2.2.7}/tests/test_storage.py +0 -0
  201. {fruxon-2.2.5 → fruxon-2.2.7}/tests/test_system_blocks.py +0 -0
  202. {fruxon-2.2.5 → fruxon-2.2.7}/tests/test_system_blocks_cli.py +0 -0
  203. {fruxon-2.2.5 → fruxon-2.2.7}/tests/test_telemetry.py +0 -0
  204. {fruxon-2.2.5 → fruxon-2.2.7}/tests/test_test_chats.py +0 -0
  205. {fruxon-2.2.5 → fruxon-2.2.7}/tests/test_topics.py +0 -0
  206. {fruxon-2.2.5 → fruxon-2.2.7}/tests/test_trigger_budgets.py +0 -0
  207. {fruxon-2.2.5 → fruxon-2.2.7}/tests/test_triggers.py +0 -0
  208. {fruxon-2.2.5 → fruxon-2.2.7}/tests/test_triggers_check_cli.py +0 -0
  209. {fruxon-2.2.5 → fruxon-2.2.7}/tests/test_triggers_ledger_batch_views.py +0 -0
  210. {fruxon-2.2.5 → fruxon-2.2.7}/tests/test_triggers_ledger_stage_tests.py +0 -0
  211. {fruxon-2.2.5 → fruxon-2.2.7}/tests/test_triggers_questions.py +0 -0
  212. {fruxon-2.2.5 → fruxon-2.2.7}/tests/test_triggers_shape.py +0 -0
  213. {fruxon-2.2.5 → fruxon-2.2.7}/tests/test_triggers_write.py +0 -0
  214. {fruxon-2.2.5 → fruxon-2.2.7}/tests/test_tui_boundary.py +0 -0
  215. {fruxon-2.2.5 → fruxon-2.2.7}/tests/test_ui.py +0 -0
  216. {fruxon-2.2.5 → fruxon-2.2.7}/tests/test_update_check.py +0 -0
  217. {fruxon-2.2.5 → fruxon-2.2.7}/tests/test_validation.py +0 -0
  218. {fruxon-2.2.5 → fruxon-2.2.7}/tests/test_voice_calls.py +0 -0
  219. {fruxon-2.2.5 → fruxon-2.2.7}/tests/test_workspaces_cli.py +0 -0
@@ -1,5 +1,30 @@
1
1
  # History
2
2
 
3
+ ## Unreleased — passes list the work claimed between them
4
+
5
+ - **`fruxon triggers ledger passes`** and **`fruxon knowledge-bases source
6
+ passes`** show what an automation claimed *between* passes on a row of its
7
+ own: a person answering a question, a finished run moving its item on, a
8
+ re-drive. The row sits just above the pass it followed and says why the
9
+ work was ready ("after an answer"), its runs and its cost. The totals
10
+ include it. In `-o json` each pass gains `betweenPasses` (`null` when
11
+ nothing was claimed; `firstClaimedAt`, `lastClaimedAt`, `dispatched`,
12
+ `completed`, `runs`, `cost`, `causes`).
13
+ - `LedgerPass.between_passes` (`LedgerBetweenPasses`, with
14
+ `LedgerBetweenPassesCause`) carries it in the client.
15
+ - Needs fruxon-backend with the split (fruxon-backend#1818). Before it, a pass
16
+ is credited with everything claimed since the previous pass, so a pass that
17
+ found nothing could show the runs an answer started; an older server sends
18
+ no `betweenPasses` and the listing reads as before.
19
+
20
+ ## Unreleased — the developer preset says what it can ship
21
+
22
+ - **`fruxon login --help`** said the default `developer` preset builds, tests
23
+ and runs agents "without deploying live". That wasn't true: publishing a
24
+ new agent's first revision makes it live, and `developer` may publish. The
25
+ help now says so; switching a live agent to another revision still needs
26
+ `maintainer`. Nothing about what the preset grants changed.
27
+
3
28
  ## Unreleased — `integrations authorize` saves the connection it hands out
4
29
 
5
30
  - **`fruxon integrations authorize`** printed the provider's consent URL from
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: fruxon
3
- Version: 2.2.5
3
+ Version: 2.2.7
4
4
  Summary: The Fruxon SDK is a lightweight Python client for integrating with the Fruxon platform.
5
5
  Project-URL: bugs, https://github.com/fruxon-ai/fruxon-sdk/issues
6
6
  Project-URL: changelog, https://github.com/fruxon-ai/fruxon-sdk/blob/main/HISTORY.md
@@ -167,7 +167,7 @@ Integrations + tools:
167
167
  | `fruxon triggers doors` | The pre-configured source doors a work shape can be built on — the **first** question of authoring an automation, and the one `--schema` cannot answer: it tells you a `workShape.door` carries a `doorId`, not which ids exist. Each row is the integration a chosen `integrationConfigId` must belong to, plus the one query field that is genuinely yours (label + example), and `supportsStartFrom` — whether that door's source accepts a lower bound, and so whether a `door.startFrom` horizon does anything there. `door.skipWhen` is the other field that is yours rather than the integration's: a `{match, conditions[]}` filter, same shape as a trigger's event filter, whose matching records are **never admitted** — no item, no stage, no model call. It has to live on the `door` because saving re-expands `source` from it, so the same filter written onto `source` is discarded by the next save. `door.projection` is the third: a list of dotted record paths naming the fields an admitted item **keeps**, with the door's own `defaultProjection` as the suggestion to seed it from — without one an item carries the whole record, into the Work grid and into every stage's prompt on every pass. Read that against the door's `labelPaths` (or, for the sheet and table doors, `labelFieldName` naming the field whose answer picks the label column): those are where an item's title comes from, and a projection that drops one is refused at save time rather than quietly repaired. Read-only and static: a door is a claim that one combination of list tool, identity path and watermark actually works, made in platform code by someone who verified it. An integration with no door is still fully usable — configure `workShape.source` by hand. |
168
168
  | `fruxon triggers preview-shape/test-source` | Dry-run a work shape before saving or activating it; both write nothing. `preview-shape` renders, per stage, the resolved instruction, the whole `user_query` the agent is handed (item payload included), and the JSON schema the stage's declared `produces` keys become — against a real backlog item when you name a trigger. A FORM stage shows its form message and, under it, the `join notice` sent when more items join the open form, both in the stage's own `formClosing` / `formJoinNotice` wording. `--file` takes a draft shape, or just the stages — the same file `set-stages` takes — which it merges into the named trigger's saved shape the way `set-stages` would, so the preview is of what that save would write. `test-source` runs the door's list tool once and says, per record, whether admission would take it, plus the exact arguments the tool was called with (for Gmail, your query with the day-granular `after:` folded in). Records a `door.skipWhen` filter would drop read `FILTERED`, with a footer count — which is where to see what a rule costs before it goes onto a live automation. `--count` pages the whole door instead and answers how much is waiting: the total, how many the filter drops, how many the ledger already holds, how many clear the watermark, and which server ceiling stopped the scan — so `total − filtered − already held` is the work that would actually arrive. Each record prints **as the item will carry it** — narrowed to the shape's `door.projection`, with an `item keeps` line naming the paths that survived, so a field your projection drops and a field the source never sent are not the same silence. `--file` tests a shape being edited — and a draft whose `door.startFrom` (Unix ms) sets a first-run horizon gets a `first run sends` line with the `after:` term that horizon produces, which is the only place to see it: `startFrom` seeds the ledger cursor once, when the ledger is created. |
169
169
  | `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. |
170
- | `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. `-n/--limit` bounds the walk. |
170
+ | `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. |
171
171
  | `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). |
172
172
  | `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. |
173
173
  | `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. |
@@ -132,7 +132,7 @@ Integrations + tools:
132
132
  | `fruxon triggers doors` | The pre-configured source doors a work shape can be built on — the **first** question of authoring an automation, and the one `--schema` cannot answer: it tells you a `workShape.door` carries a `doorId`, not which ids exist. Each row is the integration a chosen `integrationConfigId` must belong to, plus the one query field that is genuinely yours (label + example), and `supportsStartFrom` — whether that door's source accepts a lower bound, and so whether a `door.startFrom` horizon does anything there. `door.skipWhen` is the other field that is yours rather than the integration's: a `{match, conditions[]}` filter, same shape as a trigger's event filter, whose matching records are **never admitted** — no item, no stage, no model call. It has to live on the `door` because saving re-expands `source` from it, so the same filter written onto `source` is discarded by the next save. `door.projection` is the third: a list of dotted record paths naming the fields an admitted item **keeps**, with the door's own `defaultProjection` as the suggestion to seed it from — without one an item carries the whole record, into the Work grid and into every stage's prompt on every pass. Read that against the door's `labelPaths` (or, for the sheet and table doors, `labelFieldName` naming the field whose answer picks the label column): those are where an item's title comes from, and a projection that drops one is refused at save time rather than quietly repaired. Read-only and static: a door is a claim that one combination of list tool, identity path and watermark actually works, made in platform code by someone who verified it. An integration with no door is still fully usable — configure `workShape.source` by hand. |
133
133
  | `fruxon triggers preview-shape/test-source` | Dry-run a work shape before saving or activating it; both write nothing. `preview-shape` renders, per stage, the resolved instruction, the whole `user_query` the agent is handed (item payload included), and the JSON schema the stage's declared `produces` keys become — against a real backlog item when you name a trigger. A FORM stage shows its form message and, under it, the `join notice` sent when more items join the open form, both in the stage's own `formClosing` / `formJoinNotice` wording. `--file` takes a draft shape, or just the stages — the same file `set-stages` takes — which it merges into the named trigger's saved shape the way `set-stages` would, so the preview is of what that save would write. `test-source` runs the door's list tool once and says, per record, whether admission would take it, plus the exact arguments the tool was called with (for Gmail, your query with the day-granular `after:` folded in). Records a `door.skipWhen` filter would drop read `FILTERED`, with a footer count — which is where to see what a rule costs before it goes onto a live automation. `--count` pages the whole door instead and answers how much is waiting: the total, how many the filter drops, how many the ledger already holds, how many clear the watermark, and which server ceiling stopped the scan — so `total − filtered − already held` is the work that would actually arrive. Each record prints **as the item will carry it** — narrowed to the shape's `door.projection`, with an `item keeps` line naming the paths that survived, so a field your projection drops and a field the source never sent are not the same silence. `--file` tests a shape being edited — and a draft whose `door.startFrom` (Unix ms) sets a first-run horizon gets a `first run sends` line with the `after:` term that horizon produces, which is the only place to see it: `startFrom` seeds the ledger cursor once, when the ledger is created. |
134
134
  | `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. |
135
- | `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. `-n/--limit` bounds the walk. |
135
+ | `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. |
136
136
  | `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). |
137
137
  | `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. |
138
138
  | `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. |
@@ -74,6 +74,8 @@ from fruxon.models import (
74
74
  LedgerBatchAnswer,
75
75
  LedgerBatchAnswers,
76
76
  LedgerBatchRun,
77
+ LedgerBetweenPasses,
78
+ LedgerBetweenPassesCause,
77
79
  LedgerCursor,
78
80
  LedgerEffect,
79
81
  LedgerExclusionCell,
@@ -213,6 +215,8 @@ __all__ = [
213
215
  "LedgerBatchAnswer",
214
216
  "LedgerBatchAnswers",
215
217
  "LedgerBatchRun",
218
+ "LedgerBetweenPasses",
219
+ "LedgerBetweenPassesCause",
216
220
  "LedgerCursor",
217
221
  "LedgerAgentSpend",
218
222
  "LedgerItemPoint",
@@ -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.2.5'
22
- __version_tuple__ = version_tuple = (2, 2, 5)
21
+ __version__ = version = '2.2.7'
22
+ __version_tuple__ = version_tuple = (2, 2, 7)
23
23
 
24
24
  __commit_id__ = commit_id = None
@@ -0,0 +1,88 @@
1
+ """Work a ledger claimed between passes, as both passes listings show it.
2
+
3
+ `fruxon triggers ledger passes` and `fruxon knowledge-bases source passes`
4
+ read the same rows. A pass counts only the claims it made itself; what was
5
+ claimed after it and before the next pass (an answered question moving its
6
+ items on, a finished run hastening the next stage, a re-drive) rides on it
7
+ as ``between_passes``. Both listings print that as a row of its own just
8
+ above the pass, and both put it in ``-o json`` the same way, so the two
9
+ helpers here are shared.
10
+ """
11
+
12
+ from __future__ import annotations
13
+
14
+ from fruxon.models import LedgerBetweenPasses, LedgerPass
15
+
16
+ #: The claimed item's last transition before the claim, read as why the work was ready.
17
+ _CAUSE_PHRASES = {
18
+ "RESOLVED": "after an answer",
19
+ "ADVANCED": "after a stage finished",
20
+ "OPERATOR_REDRIVE": "after a re-drive",
21
+ "OPERATOR_WAKE": "after a manual wake",
22
+ "WOKEN": "after a wait ended",
23
+ "ADMITTED": "after an item was started",
24
+ "RECLAIMED": "after a lease ran out",
25
+ }
26
+
27
+ #: Causes that leave an item to be tried again, so a claim after one is a retry.
28
+ _RETRY_CAUSES = frozenset(
29
+ {
30
+ "FAILED",
31
+ "RUN_REFUSED",
32
+ "CONTRACT_VIOLATION",
33
+ "DEAD_AFTER_TOOL_FAILURES",
34
+ "LEASE_EXPIRED",
35
+ "BATCH_EXPIRED",
36
+ "BATCH_CANCELLED",
37
+ "BATCH_CONVERSATION_ENDED",
38
+ "BATCH_JOIN_LOST",
39
+ "WAIT_EXPIRED",
40
+ }
41
+ )
42
+
43
+
44
+ def cause_phrase(cause: str) -> str:
45
+ """``RESOLVED`` → ``after an answer``; a failure cause → ``on a retry``."""
46
+ return _CAUSE_PHRASES.get(cause) or ("on a retry" if cause in _RETRY_CAUSES else "between passes")
47
+
48
+
49
+ def describe_between(between: LedgerBetweenPasses) -> str:
50
+ """One line on why the work became ready, every cause with its count.
51
+
52
+ ``after an answer`` when there is one cause; ``after an answer 5,
53
+ on a retry 2`` when there are several. Plain text, not markup: the
54
+ caller escapes it.
55
+ """
56
+ if not between.causes:
57
+ return "between passes"
58
+ if len(between.causes) == 1:
59
+ return cause_phrase(between.causes[0].cause)
60
+ return ", ".join(f"{cause_phrase(c.cause)} {c.count}" for c in between.causes)
61
+
62
+
63
+ def between_to_dict(between: LedgerBetweenPasses | None) -> dict | None:
64
+ """The ``betweenPasses`` member of a pass in ``-o json``, in the server's own field names."""
65
+ if between is None:
66
+ return None
67
+ return {
68
+ "firstClaimedAt": between.first_claimed_at,
69
+ "lastClaimedAt": between.last_claimed_at,
70
+ "dispatched": between.dispatched,
71
+ "completed": between.completed,
72
+ "runs": between.runs,
73
+ "cost": between.cost,
74
+ "causes": [{"cause": c.cause, "count": c.count} for c in between.causes],
75
+ }
76
+
77
+
78
+ def pass_totals(passes: list[LedgerPass]) -> tuple[int, float, int]:
79
+ """Runs and cost across the passes *and* the work between them, plus the between-pass runs.
80
+
81
+ A pass no longer carries what was claimed between passes, so totalling
82
+ the passes alone would drop that spend.
83
+ """
84
+ between = [p.between_passes for p in passes if p.between_passes is not None]
85
+ between_runs = sum(b.runs for b in between)
86
+ runs = sum(p.runs for p in passes) + between_runs
87
+ cost = sum(p.cost for p in passes) + sum(b.cost for b in between)
88
+ return runs, cost, between_runs
@@ -121,9 +121,10 @@ def login(
121
121
  the same way, and subsequent commands work identically.
122
122
 
123
123
  The minted key's access level is declared here with ``--preset``
124
- (default: developer — build, test, and run agents without deploying
125
- live or reaching outside the workspace). The approval page shows the
126
- requested level; the user approves or denies.
124
+ (default: developer — build, test, and run agents without reaching
125
+ outside the workspace; a new agent's first publish goes live, but
126
+ switching a live agent to another revision needs maintainer). The
127
+ approval page shows the requested level; the user approves or denies.
127
128
 
128
129
  Signing in adds a workspace and leaves the default alone: other
129
130
  shells and scripts on this machine keep addressing the workspace they
@@ -28,6 +28,7 @@ from typing import Annotated
28
28
 
29
29
  import typer
30
30
 
31
+ from fruxon.cli._ledger_passes import between_to_dict, describe_between, pass_totals
31
32
  from fruxon.cli._shared import build_client, confirm_or_die, format_ts, load_json_body
32
33
  from fruxon.cli.knowledge_bases import (
33
34
  _esc,
@@ -508,6 +509,8 @@ def sources_passes(
508
509
  The same rows `triggers ledger passes` shows, and they read the same
509
510
  way: `cost` **rises after** a pass fired, as its dispatched runs finish,
510
511
  so a pass read moments later reports a floor rather than its bill.
512
+ Work claimed between passes is a `between` row just above the pass it
513
+ followed (`betweenPasses` in `-o json`), and the totals include it.
511
514
 
512
515
  Examples:
513
516
  fruxon knowledge-bases source passes <kb> <source>
@@ -536,10 +539,13 @@ def sources_passes(
536
539
  return
537
540
  stderr.print(_passes_table(passes))
538
541
  stderr.print()
539
- stderr.print(
540
- f" [bold]{len(passes)}[/bold] passes · [bold]{sum(p.runs for p in passes)}[/bold] runs "
541
- f"· [bold]${sum(p.cost for p in passes):.4f}[/bold]"
542
+ total_runs, total_cost, between_runs = pass_totals(passes)
543
+ summary = (
544
+ f" [bold]{len(passes)}[/bold] passes · [bold]{total_runs}[/bold] runs · [bold]${total_cost:.4f}[/bold]"
542
545
  )
546
+ if between_runs:
547
+ summary += f" [dim]({between_runs} of those runs between passes)[/dim]"
548
+ stderr.print(summary)
543
549
 
544
550
 
545
551
  @source_app.command("sync")
@@ -1071,6 +1077,7 @@ def _pass_to_dict(p: LedgerPass) -> dict:
1071
1077
  "completed": p.completed,
1072
1078
  "runs": p.runs,
1073
1079
  "cost": p.cost,
1080
+ "betweenPasses": between_to_dict(p.between_passes),
1074
1081
  }
1075
1082
 
1076
1083
 
@@ -1156,6 +1163,17 @@ def _passes_table(passes: list[LedgerPass]):
1156
1163
  table.add_column("Cost", justify="right", no_wrap=True)
1157
1164
  for p in passes:
1158
1165
  colour = {"FAILED": "red", "FILTER_ERROR": "red", "FIRED": "green"}.get(p.outcome, "")
1166
+ # Newest first, and this is the work *after* the pass, so it goes above it.
1167
+ b = p.between_passes
1168
+ if b is not None and b.dispatched > 0:
1169
+ table.add_row(
1170
+ format_ts(b.first_claimed_at),
1171
+ f"[cyan]between[/cyan] [dim]{_esc(describe_between(b))}[/dim]",
1172
+ "[dim]—[/dim]",
1173
+ str(b.dispatched),
1174
+ str(b.completed),
1175
+ f"${b.cost:.4f}" if b.runs else "[dim]—[/dim]",
1176
+ )
1159
1177
  table.add_row(
1160
1178
  format_ts(p.fired_at),
1161
1179
  f"[{colour}]{_esc(p.outcome)}[/{colour}]" if colour else _esc(p.outcome),
@@ -45,6 +45,7 @@ from typing import Annotated
45
45
 
46
46
  import typer
47
47
 
48
+ from fruxon.cli._ledger_passes import between_to_dict, describe_between, pass_totals
48
49
  from fruxon.cli._shared import (
49
50
  build_client,
50
51
  confirm_or_die,
@@ -432,10 +433,17 @@ def ledger_passes(
432
433
  `COALESCED` are healthy (nothing to do, or folded into a pass already
433
434
  running), `FAILED` and `FILTER_ERROR` are not.
434
435
 
436
+ A pass counts only what it claimed itself. Work claimed *between*
437
+ passes — a person answering a question, a finished run moving its item
438
+ to the next stage, a re-drive — gets a `between` row of its own just
439
+ above the pass it followed, with why it was ready, its runs and its
440
+ cost; the totals include it. In `-o json` it is the pass's
441
+ `betweenPasses` (`null` when there was none).
442
+
435
443
  Examples:
436
444
  fruxon triggers ledger passes 4982bcbe…
437
445
  fruxon triggers ledger passes 4982bcbe… -n 10
438
- fruxon triggers ledger passes 4982bcbe… -o json | jq '[.[].cost] | add'
446
+ fruxon triggers ledger passes 4982bcbe… -o json | jq '[.[] | .cost, .betweenPasses.cost // 0] | add'
439
447
  """
440
448
  output = _resolve_output(output)
441
449
  if limit is not None and limit < 1:
@@ -461,13 +469,18 @@ def ledger_passes(
461
469
  return
462
470
  stderr.print(_passes_table(passes))
463
471
  stderr.print()
464
- total_cost = sum(p.cost for p in passes)
465
- total_runs = sum(p.runs for p in passes)
472
+ total_runs, total_cost, between_runs = pass_totals(passes)
466
473
  summary = f" [bold]{len(passes)}[/bold] passes"
467
474
  if total_runs:
468
475
  summary += f" · [bold]{total_runs}[/bold] runs · [bold]{_format_cost(total_cost)}[/bold]"
476
+ if between_runs:
477
+ summary += f" [dim]({between_runs} of those runs between passes)[/dim]"
469
478
  stderr.print(summary)
470
- if any(p.completed < p.dispatched for p in passes):
479
+ if any(
480
+ p.completed < p.dispatched
481
+ or (p.between_passes is not None and p.between_passes.completed < p.between_passes.dispatched)
482
+ for p in passes
483
+ ):
471
484
  say_info(
472
485
  "A pass whose [bold]completed[/bold] trails [bold]dispatched[/bold] is still costing money.",
473
486
  hint="Its [bold]cost[/bold] is a floor until the runs finish — or the gap is items parked on a human "
@@ -3753,6 +3766,20 @@ def _passes_table(passes: list[LedgerPass]):
3753
3766
  "STALE_RELEASED": "yellow",
3754
3767
  }.get(p.outcome, "")
3755
3768
  outcome = f"[{colour}]{_esc(p.outcome)}[/{colour}]" if colour else _esc(p.outcome)
3769
+ # Newest first, and this is the work *after* the pass, so it goes above it.
3770
+ b = p.between_passes
3771
+ if b is not None and b.dispatched > 0:
3772
+ table.add_row(
3773
+ _esc(format_ts(b.first_claimed_at)),
3774
+ "[cyan]between[/cyan]",
3775
+ _esc(b.causes[0].cause) if b.causes else "[dim]—[/dim]",
3776
+ "[dim]—[/dim]",
3777
+ _count_cell(b.dispatched),
3778
+ _count_cell(b.completed),
3779
+ _count_cell(b.runs),
3780
+ _money_cell(b.cost, b.runs),
3781
+ _esc(describe_between(b)),
3782
+ )
3756
3783
  table.add_row(
3757
3784
  _esc(format_ts(p.fired_at)),
3758
3785
  outcome,
@@ -4648,6 +4675,7 @@ def _pass_to_dict(p: LedgerPass) -> dict:
4648
4675
  "completed": p.completed,
4649
4676
  "runs": p.runs,
4650
4677
  "cost": p.cost,
4678
+ "betweenPasses": between_to_dict(p.between_passes),
4651
4679
  }
4652
4680
 
4653
4681
 
@@ -109,6 +109,8 @@ from fruxon.models import (
109
109
  LedgerBatchAnswer,
110
110
  LedgerBatchAnswers,
111
111
  LedgerBatchRun,
112
+ LedgerBetweenPasses,
113
+ LedgerBetweenPassesCause,
112
114
  LedgerCursor,
113
115
  LedgerEffect,
114
116
  LedgerExclusionCell,
@@ -4205,7 +4207,8 @@ class FruxonClient:
4205
4207
 
4206
4208
  The same ``LedgerPass`` rows :meth:`list_ledger_passes` returns, and
4207
4209
  they read the same way — ``cost`` rises after ``fired_at`` as the
4208
- dispatched runs finish.
4210
+ dispatched runs finish, and work claimed between passes is on
4211
+ ``between_passes`` rather than on any pass.
4209
4212
  """
4210
4213
  raw = self._fetch_all_pages(self._sources_url(knowledge_base, f"/{source}/passes"), [], limit=limit)
4211
4214
  passes = [_parse_ledger_pass(p) for p in raw]
@@ -6465,6 +6468,14 @@ class FruxonClient:
6465
6468
  And ``cost`` **rises after** ``fired_at`` as the dispatched runs
6466
6469
  finish, so a pass read seconds after it fired reports a floor
6467
6470
  rather than its final bill.
6471
+
6472
+ A pass counts only the claims it made itself. Work claimed between
6473
+ two passes — an answered question moving its items on, a finished
6474
+ run hastening the next stage, an operator's re-drive — comes back
6475
+ as ``between_passes`` on the pass before it, with its own runs,
6476
+ cost and causes, so totalling spend means adding both. A server
6477
+ that predates the split credits that work to the next pass and
6478
+ sends no ``between_passes``.
6468
6479
  """
6469
6480
  url = self._ledger_url(trigger, "/passes")
6470
6481
  raw = (
@@ -10526,6 +10537,9 @@ def _parse_ledger_pass(data: object) -> LedgerPass:
10526
10537
  never sent it — yields the dataclass defaults instead of raising.
10527
10538
  """
10528
10539
  data = _expect_dict(data, "a ledger-pass object")
10540
+ # Absent from a server that predates it, and null when nothing was
10541
+ # claimed between this pass and the next.
10542
+ between = data.get("betweenPasses")
10529
10543
  return LedgerPass(
10530
10544
  id=str(data.get("id") or ""),
10531
10545
  fired_at=_coerce_int(data.get("firedAt")),
@@ -10537,6 +10551,24 @@ def _parse_ledger_pass(data: object) -> LedgerPass:
10537
10551
  completed=_coerce_int(data.get("completed")),
10538
10552
  runs=_coerce_int(data.get("runs")),
10539
10553
  cost=_coerce_float(data.get("cost")),
10554
+ between_passes=_parse_ledger_between_passes(between) if isinstance(between, dict) else None,
10555
+ )
10556
+
10557
+
10558
+ def _parse_ledger_between_passes(data: dict) -> LedgerBetweenPasses:
10559
+ """Map a raw ``LedgerBetweenPassesResponse`` to :class:`LedgerBetweenPasses`."""
10560
+ return LedgerBetweenPasses(
10561
+ first_claimed_at=_coerce_int(data.get("firstClaimedAt")),
10562
+ last_claimed_at=_coerce_int(data.get("lastClaimedAt")),
10563
+ dispatched=_coerce_int(data.get("dispatched")),
10564
+ completed=_coerce_int(data.get("completed")),
10565
+ runs=_coerce_int(data.get("runs")),
10566
+ cost=_coerce_float(data.get("cost")),
10567
+ causes=[
10568
+ LedgerBetweenPassesCause(cause=str(c.get("cause") or ""), count=_coerce_int(c.get("count")))
10569
+ for c in (data.get("causes") or [])
10570
+ if isinstance(c, dict)
10571
+ ],
10540
10572
  )
10541
10573
 
10542
10574
 
@@ -2445,6 +2445,46 @@ class LedgerExclusionCell:
2445
2445
  count: int
2446
2446
 
2447
2447
 
2448
+ @dataclass(frozen=True)
2449
+ class LedgerBetweenPassesCause:
2450
+ """Why some of the work claimed between two passes became ready.
2451
+
2452
+ ``cause`` is the claimed item's last transition before the claim:
2453
+ ``RESOLVED`` (a person answered its question), ``ADVANCED`` (an
2454
+ earlier stage finished), ``OPERATOR_REDRIVE``, ``OPERATOR_WAKE``,
2455
+ ``WOKEN`` (a wait ended), ``ADMITTED``, a retry cause such as
2456
+ ``FAILED``, or ``RECLAIMED`` (a lease ran out and the work was taken
2457
+ again). ``UNKNOWN`` when the log holds nothing before the claim.
2458
+ """
2459
+
2460
+ cause: str
2461
+ count: int = 0
2462
+
2463
+
2464
+ @dataclass(frozen=True)
2465
+ class LedgerBetweenPasses:
2466
+ """Work the automation claimed after a pass and before the next one.
2467
+
2468
+ Claims made between passes write no fire row of their own: an answered
2469
+ question moving its items on, a finished run hastening the next stage,
2470
+ an operator's re-drive, a wait waking up. The server lists them on the
2471
+ pass *before* them, so no pass is credited with runs it did not start.
2472
+ On the newest pass this covers everything since it, up to now.
2473
+
2474
+ Counted by claim token exactly like a pass, so ``runs`` and ``cost``
2475
+ keep rising as those runs finish.
2476
+ """
2477
+
2478
+ first_claimed_at: int = 0
2479
+ last_claimed_at: int = 0
2480
+ dispatched: int = 0 # items claimed and sent to work between the passes
2481
+ completed: int = 0 # how many of those reached the terminal stage
2482
+ runs: int = 0
2483
+ cost: float = 0.0 # all-in USD; a floor while runs are in flight
2484
+ #: Most frequent first. ``sum(c.count for c in causes) == dispatched``.
2485
+ causes: list[LedgerBetweenPassesCause] = field(default_factory=list)
2486
+
2487
+
2448
2488
  @dataclass(frozen=True)
2449
2489
  class LedgerPass:
2450
2490
  """One attempt the trigger made to move its ledger forward.
@@ -2470,7 +2510,9 @@ class LedgerPass:
2470
2510
  admitted: int = 0 # items the source door admitted during this pass
2471
2511
  #: Items this pass claimed and sent to work. Counts an item parked on
2472
2512
  #: a human question too — dispatching is what the pass did, not what
2473
- #: came back.
2513
+ #: came back. Work claimed *between* passes is not counted here (see
2514
+ #: ``between_passes``); a server that predates that split credits it
2515
+ #: to the next pass instead.
2474
2516
  dispatched: int = 0
2475
2517
  #: How many of **this pass's** dispatches have reached the terminal
2476
2518
  #: stage. Scoped to the pass, so it never counts work an earlier
@@ -2486,6 +2528,10 @@ class LedgerPass:
2486
2528
  #: reports less than it will finally cost, so an early read is a
2487
2529
  #: floor, not the bill.
2488
2530
  cost: float = 0.0
2531
+ #: What was claimed after this pass and before the next one, with its
2532
+ #: runs, cost and why it became ready. ``None`` when nothing was, and
2533
+ #: always ``None`` from a server that predates it.
2534
+ between_passes: LedgerBetweenPasses | None = None
2489
2535
 
2490
2536
 
2491
2537
  @dataclass(frozen=True)
@@ -154,7 +154,7 @@ asking about a consult returns the tree that consult sits in.
154
154
  ## 3. Read the step tree
155
155
 
156
156
  Text output renders the whole tree, one line per step. Under agent mode
157
- (Claude Code, CI) the default is JSON: pass `-o text` for the tree, or
157
+ (Claude Code, Codex, CI) the default is JSON: pass `-o text` for the tree, or
158
158
  `--show-io` / `--show-thinking`, which pick the text tree on their own.
159
159
 
160
160
  ```
@@ -37,6 +37,7 @@ from fruxon.fruxon import (
37
37
  LedgerPass,
38
38
  ManagedResourceLink,
39
39
  )
40
+ from fruxon.models import LedgerBetweenPasses, LedgerBetweenPassesCause
40
41
  from fruxon.ui import EXIT_VALIDATION
41
42
 
42
43
  runner = CliRunner()
@@ -613,6 +614,51 @@ def test_passes_totals_the_spend(monkeypatch):
613
614
  assert "$0.1200" in result.output
614
615
 
615
616
 
617
+ def test_passes_lists_the_work_between_passes_above_the_pass_it_followed(monkeypatch):
618
+ monkeypatch.setenv("COLUMNS", "200")
619
+ _patch(
620
+ monkeypatch,
621
+ _Stub(
622
+ passes=[
623
+ LedgerPass(id="p2", fired_at=1756000000000, source="SCHEDULE", outcome="FIRED"),
624
+ LedgerPass(
625
+ id="p1",
626
+ fired_at=1755990000000,
627
+ source="SCHEDULE",
628
+ outcome="FIRED",
629
+ admitted=3,
630
+ dispatched=3,
631
+ completed=3,
632
+ runs=3,
633
+ cost=0.12,
634
+ between_passes=LedgerBetweenPasses(
635
+ first_claimed_at=1755995000000,
636
+ last_claimed_at=1755995060000,
637
+ dispatched=2,
638
+ completed=2,
639
+ runs=2,
640
+ cost=0.08,
641
+ causes=[LedgerBetweenPassesCause("ADVANCED", 2)],
642
+ ),
643
+ ),
644
+ ]
645
+ ),
646
+ )
647
+ result = runner.invoke(app, ["knowledge-bases", "source", "passes", KB, SRC, "-o", "text"])
648
+ assert result.exit_code == 0, result.output
649
+ lines = result.output.splitlines()
650
+ between = next(i for i, line in enumerate(lines) if "between" in line and "after a stage finished" in line)
651
+ assert "$0.0800" in lines[between]
652
+ assert lines.index(next(line for line in lines if "$0.1200" in line)) > between
653
+ flat = " ".join(result.output.split())
654
+ assert "2 passes · 5 runs · $0.2000 (2 of those runs between passes)" in flat
655
+
656
+ result = runner.invoke(app, ["knowledge-bases", "source", "passes", KB, SRC, "-o", "json"])
657
+ newest, older = json.loads(result.stdout)
658
+ assert newest["betweenPasses"] is None
659
+ assert older["betweenPasses"]["causes"] == [{"cause": "ADVANCED", "count": 2}]
660
+
661
+
616
662
  def test_source_404_names_both_possibilities(monkeypatch):
617
663
  class _Missing(_Stub):
618
664
  def get_knowledge_source(self, kb, s):