fruxon 2.2.1__tar.gz → 2.2.2__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 (217) hide show
  1. {fruxon-2.2.1 → fruxon-2.2.2}/HISTORY.md +22 -0
  2. {fruxon-2.2.1 → fruxon-2.2.2}/PKG-INFO +3 -3
  3. {fruxon-2.2.1 → fruxon-2.2.2}/README.md +2 -2
  4. {fruxon-2.2.1 → fruxon-2.2.2}/src/fruxon/_version.py +2 -2
  5. {fruxon-2.2.1 → fruxon-2.2.2}/src/fruxon/cli/examples.py +4 -4
  6. {fruxon-2.2.1 → fruxon-2.2.2}/src/fruxon/cli/integrations.py +199 -138
  7. {fruxon-2.2.1 → fruxon-2.2.2}/src/fruxon/fruxon.py +35 -11
  8. {fruxon-2.2.1 → fruxon-2.2.2}/src/fruxon/skills/fruxon-build-agent/SKILL.md +9 -8
  9. {fruxon-2.2.1 → fruxon-2.2.2}/src/fruxon/skills/fruxon-create-integration/SKILL.md +6 -2
  10. {fruxon-2.2.1 → fruxon-2.2.2}/src/fruxon/skills/fruxon-meet/SKILL.md +2 -2
  11. fruxon-2.2.2/tests/test_integrations_authorize_cli.py +287 -0
  12. {fruxon-2.2.1 → fruxon-2.2.2}/tests/test_integrations_connect_cli.py +69 -10
  13. fruxon-2.2.1/tests/test_integrations_authorize_cli.py +0 -163
  14. {fruxon-2.2.1 → fruxon-2.2.2}/.gitignore +0 -0
  15. {fruxon-2.2.1 → fruxon-2.2.2}/LICENSE +0 -0
  16. {fruxon-2.2.1 → fruxon-2.2.2}/pyproject.toml +0 -0
  17. {fruxon-2.2.1 → fruxon-2.2.2}/src/fruxon/__init__.py +0 -0
  18. {fruxon-2.2.1 → fruxon-2.2.2}/src/fruxon/__main__.py +0 -0
  19. {fruxon-2.2.1 → fruxon-2.2.2}/src/fruxon/_ssl.py +0 -0
  20. {fruxon-2.2.1 → fruxon-2.2.2}/src/fruxon/checks/__init__.py +0 -0
  21. {fruxon-2.2.1 → fruxon-2.2.2}/src/fruxon/checks/agent.py +0 -0
  22. {fruxon-2.2.1 → fruxon-2.2.2}/src/fruxon/checks/ledger.py +0 -0
  23. {fruxon-2.2.1 → fruxon-2.2.2}/src/fruxon/checks/references.py +0 -0
  24. {fruxon-2.2.1 → fruxon-2.2.2}/src/fruxon/cli/__init__.py +0 -0
  25. {fruxon-2.2.1 → fruxon-2.2.2}/src/fruxon/cli/_crash.py +0 -0
  26. {fruxon-2.2.1 → fruxon-2.2.2}/src/fruxon/cli/_schema.py +0 -0
  27. {fruxon-2.2.1 → fruxon-2.2.2}/src/fruxon/cli/_shared.py +0 -0
  28. {fruxon-2.2.1 → fruxon-2.2.2}/src/fruxon/cli/_stream.py +0 -0
  29. {fruxon-2.2.1 → fruxon-2.2.2}/src/fruxon/cli/agents.py +0 -0
  30. {fruxon-2.2.1 → fruxon-2.2.2}/src/fruxon/cli/agents_approvals.py +0 -0
  31. {fruxon-2.2.1 → fruxon-2.2.2}/src/fruxon/cli/agents_budget.py +0 -0
  32. {fruxon-2.2.1 → fruxon-2.2.2}/src/fruxon/cli/agents_channels.py +0 -0
  33. {fruxon-2.2.1 → fruxon-2.2.2}/src/fruxon/cli/agents_draft.py +0 -0
  34. {fruxon-2.2.1 → fruxon-2.2.2}/src/fruxon/cli/agents_evaluations.py +0 -0
  35. {fruxon-2.2.1 → fruxon-2.2.2}/src/fruxon/cli/agents_executions.py +0 -0
  36. {fruxon-2.2.1 → fruxon-2.2.2}/src/fruxon/cli/agents_improvements.py +0 -0
  37. {fruxon-2.2.1 → fruxon-2.2.2}/src/fruxon/cli/agents_lifecycle.py +0 -0
  38. {fruxon-2.2.1 → fruxon-2.2.2}/src/fruxon/cli/agents_memory.py +0 -0
  39. {fruxon-2.2.1 → fruxon-2.2.2}/src/fruxon/cli/agents_reply_style.py +0 -0
  40. {fruxon-2.2.1 → fruxon-2.2.2}/src/fruxon/cli/agents_revisions.py +0 -0
  41. {fruxon-2.2.1 → fruxon-2.2.2}/src/fruxon/cli/agents_sandbox.py +0 -0
  42. {fruxon-2.2.1 → fruxon-2.2.2}/src/fruxon/cli/agents_sandbox_test.py +0 -0
  43. {fruxon-2.2.1 → fruxon-2.2.2}/src/fruxon/cli/agents_slots.py +0 -0
  44. {fruxon-2.2.1 → fruxon-2.2.2}/src/fruxon/cli/agents_system_blocks.py +0 -0
  45. {fruxon-2.2.1 → fruxon-2.2.2}/src/fruxon/cli/agents_tests.py +0 -0
  46. {fruxon-2.2.1 → fruxon-2.2.2}/src/fruxon/cli/agents_topics.py +0 -0
  47. {fruxon-2.2.1 → fruxon-2.2.2}/src/fruxon/cli/agents_voice_calls.py +0 -0
  48. {fruxon-2.2.1 → fruxon-2.2.2}/src/fruxon/cli/applications.py +0 -0
  49. {fruxon-2.2.1 → fruxon-2.2.2}/src/fruxon/cli/applications_entry_points.py +0 -0
  50. {fruxon-2.2.1 → fruxon-2.2.2}/src/fruxon/cli/assets.py +0 -0
  51. {fruxon-2.2.1 → fruxon-2.2.2}/src/fruxon/cli/auth.py +0 -0
  52. {fruxon-2.2.1 → fruxon-2.2.2}/src/fruxon/cli/capabilities.py +0 -0
  53. {fruxon-2.2.1 → fruxon-2.2.2}/src/fruxon/cli/completion.py +0 -0
  54. {fruxon-2.2.1 → fruxon-2.2.2}/src/fruxon/cli/config.py +0 -0
  55. {fruxon-2.2.1 → fruxon-2.2.2}/src/fruxon/cli/consult_pins.py +0 -0
  56. {fruxon-2.2.1 → fruxon-2.2.2}/src/fruxon/cli/conversation_imports.py +0 -0
  57. {fruxon-2.2.1 → fruxon-2.2.2}/src/fruxon/cli/dash.py +0 -0
  58. {fruxon-2.2.1 → fruxon-2.2.2}/src/fruxon/cli/describe.py +0 -0
  59. {fruxon-2.2.1 → fruxon-2.2.2}/src/fruxon/cli/doctor.py +0 -0
  60. {fruxon-2.2.1 → fruxon-2.2.2}/src/fruxon/cli/environments.py +0 -0
  61. {fruxon-2.2.1 → fruxon-2.2.2}/src/fruxon/cli/escalations.py +0 -0
  62. {fruxon-2.2.1 → fruxon-2.2.2}/src/fruxon/cli/guides.py +0 -0
  63. {fruxon-2.2.1 → fruxon-2.2.2}/src/fruxon/cli/keys.py +0 -0
  64. {fruxon-2.2.1 → fruxon-2.2.2}/src/fruxon/cli/knowledge_bases.py +0 -0
  65. {fruxon-2.2.1 → fruxon-2.2.2}/src/fruxon/cli/knowledge_documents.py +0 -0
  66. {fruxon-2.2.1 → fruxon-2.2.2}/src/fruxon/cli/knowledge_notices.py +0 -0
  67. {fruxon-2.2.1 → fruxon-2.2.2}/src/fruxon/cli/knowledge_sources.py +0 -0
  68. {fruxon-2.2.1 → fruxon-2.2.2}/src/fruxon/cli/llm_providers.py +0 -0
  69. {fruxon-2.2.1 → fruxon-2.2.2}/src/fruxon/cli/messages.py +0 -0
  70. {fruxon-2.2.1 → fruxon-2.2.2}/src/fruxon/cli/metrics.py +0 -0
  71. {fruxon-2.2.1 → fruxon-2.2.2}/src/fruxon/cli/participants.py +0 -0
  72. {fruxon-2.2.1 → fruxon-2.2.2}/src/fruxon/cli/pipelines.py +0 -0
  73. {fruxon-2.2.1 → fruxon-2.2.2}/src/fruxon/cli/secrets.py +0 -0
  74. {fruxon-2.2.1 → fruxon-2.2.2}/src/fruxon/cli/skills.py +0 -0
  75. {fruxon-2.2.1 → fruxon-2.2.2}/src/fruxon/cli/storage.py +0 -0
  76. {fruxon-2.2.1 → fruxon-2.2.2}/src/fruxon/cli/tools.py +0 -0
  77. {fruxon-2.2.1 → fruxon-2.2.2}/src/fruxon/cli/triggers.py +0 -0
  78. {fruxon-2.2.1 → fruxon-2.2.2}/src/fruxon/cli/triggers_budget.py +0 -0
  79. {fruxon-2.2.1 → fruxon-2.2.2}/src/fruxon/cli/triggers_check.py +0 -0
  80. {fruxon-2.2.1 → fruxon-2.2.2}/src/fruxon/cli/triggers_ledger.py +0 -0
  81. {fruxon-2.2.1 → fruxon-2.2.2}/src/fruxon/cli/triggers_ledger_stage_tests.py +0 -0
  82. {fruxon-2.2.1 → fruxon-2.2.2}/src/fruxon/cli/triggers_questions.py +0 -0
  83. {fruxon-2.2.1 → fruxon-2.2.2}/src/fruxon/cli/triggers_shape.py +0 -0
  84. {fruxon-2.2.1 → fruxon-2.2.2}/src/fruxon/cli/workspaces.py +0 -0
  85. {fruxon-2.2.1 → fruxon-2.2.2}/src/fruxon/credentials.py +0 -0
  86. {fruxon-2.2.1 → fruxon-2.2.2}/src/fruxon/device_auth.py +0 -0
  87. {fruxon-2.2.1 → fruxon-2.2.2}/src/fruxon/doctor.py +0 -0
  88. {fruxon-2.2.1 → fruxon-2.2.2}/src/fruxon/exceptions.py +0 -0
  89. {fruxon-2.2.1 → fruxon-2.2.2}/src/fruxon/flow_validation.py +0 -0
  90. {fruxon-2.2.1 → fruxon-2.2.2}/src/fruxon/models.py +0 -0
  91. {fruxon-2.2.1 → fruxon-2.2.2}/src/fruxon/output.py +0 -0
  92. {fruxon-2.2.1 → fruxon-2.2.2}/src/fruxon/params.py +0 -0
  93. {fruxon-2.2.1 → fruxon-2.2.2}/src/fruxon/sandbox_scenario.py +0 -0
  94. {fruxon-2.2.1 → fruxon-2.2.2}/src/fruxon/skills/__init__.py +0 -0
  95. {fruxon-2.2.1 → fruxon-2.2.2}/src/fruxon/skills/fruxon-agent-mode/SKILL.md +0 -0
  96. {fruxon-2.2.1 → fruxon-2.2.2}/src/fruxon/skills/fruxon-debug-trace/SKILL.md +0 -0
  97. {fruxon-2.2.1 → fruxon-2.2.2}/src/fruxon/skills/fruxon-use-integrations/SKILL.md +0 -0
  98. {fruxon-2.2.1 → fruxon-2.2.2}/src/fruxon/telemetry.py +0 -0
  99. {fruxon-2.2.1 → fruxon-2.2.2}/src/fruxon/tui/__init__.py +0 -0
  100. {fruxon-2.2.1 → fruxon-2.2.2}/src/fruxon/tui/app.py +0 -0
  101. {fruxon-2.2.1 → fruxon-2.2.2}/src/fruxon/tui/demo.py +0 -0
  102. {fruxon-2.2.1 → fruxon-2.2.2}/src/fruxon/tui/links.py +0 -0
  103. {fruxon-2.2.1 → fruxon-2.2.2}/src/fruxon/tui/screens/__init__.py +0 -0
  104. {fruxon-2.2.1 → fruxon-2.2.2}/src/fruxon/tui/screens/agent.py +0 -0
  105. {fruxon-2.2.1 → fruxon-2.2.2}/src/fruxon/tui/screens/base.py +0 -0
  106. {fruxon-2.2.1 → fruxon-2.2.2}/src/fruxon/tui/screens/home.py +0 -0
  107. {fruxon-2.2.1 → fruxon-2.2.2}/src/fruxon/tui/screens/ledger.py +0 -0
  108. {fruxon-2.2.1 → fruxon-2.2.2}/src/fruxon/tui/screens/loader.py +0 -0
  109. {fruxon-2.2.1 → fruxon-2.2.2}/src/fruxon/tui/screens/pickers.py +0 -0
  110. {fruxon-2.2.1 → fruxon-2.2.2}/src/fruxon/tui/screens/trace.py +0 -0
  111. {fruxon-2.2.1 → fruxon-2.2.2}/src/fruxon/tui/source.py +0 -0
  112. {fruxon-2.2.1 → fruxon-2.2.2}/src/fruxon/tui/theme.py +0 -0
  113. {fruxon-2.2.1 → fruxon-2.2.2}/src/fruxon/tui/views.py +0 -0
  114. {fruxon-2.2.1 → fruxon-2.2.2}/src/fruxon/tui/widgets.py +0 -0
  115. {fruxon-2.2.1 → fruxon-2.2.2}/src/fruxon/ui.py +0 -0
  116. {fruxon-2.2.1 → fruxon-2.2.2}/src/fruxon/update_check.py +0 -0
  117. {fruxon-2.2.1 → fruxon-2.2.2}/src/fruxon/validation.py +0 -0
  118. {fruxon-2.2.1 → fruxon-2.2.2}/tests/.test_durations.json +0 -0
  119. {fruxon-2.2.1 → fruxon-2.2.2}/tests/__init__.py +0 -0
  120. {fruxon-2.2.1 → fruxon-2.2.2}/tests/conftest.py +0 -0
  121. {fruxon-2.2.1 → fruxon-2.2.2}/tests/test_actor.py +0 -0
  122. {fruxon-2.2.1 → fruxon-2.2.2}/tests/test_agent_lifecycle.py +0 -0
  123. {fruxon-2.2.1 → fruxon-2.2.2}/tests/test_agent_revisions_list.py +0 -0
  124. {fruxon-2.2.1 → fruxon-2.2.2}/tests/test_agent_slots.py +0 -0
  125. {fruxon-2.2.1 → fruxon-2.2.2}/tests/test_agents_check_cli.py +0 -0
  126. {fruxon-2.2.1 → fruxon-2.2.2}/tests/test_agents_revisions_cli.py +0 -0
  127. {fruxon-2.2.1 → fruxon-2.2.2}/tests/test_agents_sandbox.py +0 -0
  128. {fruxon-2.2.1 → fruxon-2.2.2}/tests/test_applications.py +0 -0
  129. {fruxon-2.2.1 → fruxon-2.2.2}/tests/test_approvals.py +0 -0
  130. {fruxon-2.2.1 → fruxon-2.2.2}/tests/test_assets.py +0 -0
  131. {fruxon-2.2.1 → fruxon-2.2.2}/tests/test_budgets.py +0 -0
  132. {fruxon-2.2.1 → fruxon-2.2.2}/tests/test_capabilities.py +0 -0
  133. {fruxon-2.2.1 → fruxon-2.2.2}/tests/test_channels.py +0 -0
  134. {fruxon-2.2.1 → fruxon-2.2.2}/tests/test_checks_agent.py +0 -0
  135. {fruxon-2.2.1 → fruxon-2.2.2}/tests/test_checks_ledger.py +0 -0
  136. {fruxon-2.2.1 → fruxon-2.2.2}/tests/test_cli.py +0 -0
  137. {fruxon-2.2.1 → fruxon-2.2.2}/tests/test_cli_base_url_routing.py +0 -0
  138. {fruxon-2.2.1 → fruxon-2.2.2}/tests/test_cli_crash.py +0 -0
  139. {fruxon-2.2.1 → fruxon-2.2.2}/tests/test_cli_root_flags.py +0 -0
  140. {fruxon-2.2.1 → fruxon-2.2.2}/tests/test_client.py +0 -0
  141. {fruxon-2.2.1 → fruxon-2.2.2}/tests/test_connect_nudge.py +0 -0
  142. {fruxon-2.2.1 → fruxon-2.2.2}/tests/test_consult.py +0 -0
  143. {fruxon-2.2.1 → fruxon-2.2.2}/tests/test_conversation_imports.py +0 -0
  144. {fruxon-2.2.1 → fruxon-2.2.2}/tests/test_credentials.py +0 -0
  145. {fruxon-2.2.1 → fruxon-2.2.2}/tests/test_dash_app.py +0 -0
  146. {fruxon-2.2.1 → fruxon-2.2.2}/tests/test_dash_cli.py +0 -0
  147. {fruxon-2.2.1 → fruxon-2.2.2}/tests/test_dash_client.py +0 -0
  148. {fruxon-2.2.1 → fruxon-2.2.2}/tests/test_dash_links.py +0 -0
  149. {fruxon-2.2.1 → fruxon-2.2.2}/tests/test_dash_source.py +0 -0
  150. {fruxon-2.2.1 → fruxon-2.2.2}/tests/test_describe.py +0 -0
  151. {fruxon-2.2.1 → fruxon-2.2.2}/tests/test_device_auth.py +0 -0
  152. {fruxon-2.2.1 → fruxon-2.2.2}/tests/test_docs_commands_exist.py +0 -0
  153. {fruxon-2.2.1 → fruxon-2.2.2}/tests/test_doctor.py +0 -0
  154. {fruxon-2.2.1 → fruxon-2.2.2}/tests/test_draft_bootstrap.py +0 -0
  155. {fruxon-2.2.1 → fruxon-2.2.2}/tests/test_draft_evaluate_cli.py +0 -0
  156. {fruxon-2.2.1 → fruxon-2.2.2}/tests/test_draft_pull_shape.py +0 -0
  157. {fruxon-2.2.1 → fruxon-2.2.2}/tests/test_draft_run_replay.py +0 -0
  158. {fruxon-2.2.1 → fruxon-2.2.2}/tests/test_draft_validate_cli.py +0 -0
  159. {fruxon-2.2.1 → fruxon-2.2.2}/tests/test_drafts.py +0 -0
  160. {fruxon-2.2.1 → fruxon-2.2.2}/tests/test_entry_points.py +0 -0
  161. {fruxon-2.2.1 → fruxon-2.2.2}/tests/test_environments.py +0 -0
  162. {fruxon-2.2.1 → fruxon-2.2.2}/tests/test_escalations.py +0 -0
  163. {fruxon-2.2.1 → fruxon-2.2.2}/tests/test_evaluations.py +0 -0
  164. {fruxon-2.2.1 → fruxon-2.2.2}/tests/test_execution_records.py +0 -0
  165. {fruxon-2.2.1 → fruxon-2.2.2}/tests/test_flow_validation.py +0 -0
  166. {fruxon-2.2.1 → fruxon-2.2.2}/tests/test_fruxon.py +0 -0
  167. {fruxon-2.2.1 → fruxon-2.2.2}/tests/test_guides.py +0 -0
  168. {fruxon-2.2.1 → fruxon-2.2.2}/tests/test_improvements.py +0 -0
  169. {fruxon-2.2.1 → fruxon-2.2.2}/tests/test_integration_configs_write_cli.py +0 -0
  170. {fruxon-2.2.1 → fruxon-2.2.2}/tests/test_integration_triggers_cli.py +0 -0
  171. {fruxon-2.2.1 → fruxon-2.2.2}/tests/test_kb_trial_cli.py +0 -0
  172. {fruxon-2.2.1 → fruxon-2.2.2}/tests/test_knowledge_bases.py +0 -0
  173. {fruxon-2.2.1 → fruxon-2.2.2}/tests/test_knowledge_documents.py +0 -0
  174. {fruxon-2.2.1 → fruxon-2.2.2}/tests/test_knowledge_notices.py +0 -0
  175. {fruxon-2.2.1 → fruxon-2.2.2}/tests/test_knowledge_sources.py +0 -0
  176. {fruxon-2.2.1 → fruxon-2.2.2}/tests/test_llm_provider_configs_cli.py +0 -0
  177. {fruxon-2.2.1 → fruxon-2.2.2}/tests/test_llm_providers_connect_cli.py +0 -0
  178. {fruxon-2.2.1 → fruxon-2.2.2}/tests/test_managed_by.py +0 -0
  179. {fruxon-2.2.1 → fruxon-2.2.2}/tests/test_memory.py +0 -0
  180. {fruxon-2.2.1 → fruxon-2.2.2}/tests/test_messages.py +0 -0
  181. {fruxon-2.2.1 → fruxon-2.2.2}/tests/test_metrics.py +0 -0
  182. {fruxon-2.2.1 → fruxon-2.2.2}/tests/test_online_llm_config_refs.py +0 -0
  183. {fruxon-2.2.1 → fruxon-2.2.2}/tests/test_online_prefetch_refs.py +0 -0
  184. {fruxon-2.2.1 → fruxon-2.2.2}/tests/test_online_secret_refs.py +0 -0
  185. {fruxon-2.2.1 → fruxon-2.2.2}/tests/test_output.py +0 -0
  186. {fruxon-2.2.1 → fruxon-2.2.2}/tests/test_params.py +0 -0
  187. {fruxon-2.2.1 → fruxon-2.2.2}/tests/test_participants.py +0 -0
  188. {fruxon-2.2.1 → fruxon-2.2.2}/tests/test_participants_write.py +0 -0
  189. {fruxon-2.2.1 → fruxon-2.2.2}/tests/test_pipelines.py +0 -0
  190. {fruxon-2.2.1 → fruxon-2.2.2}/tests/test_reply_style.py +0 -0
  191. {fruxon-2.2.1 → fruxon-2.2.2}/tests/test_sandbox_scenario.py +0 -0
  192. {fruxon-2.2.1 → fruxon-2.2.2}/tests/test_schema.py +0 -0
  193. {fruxon-2.2.1 → fruxon-2.2.2}/tests/test_schema_fetch.py +0 -0
  194. {fruxon-2.2.1 → fruxon-2.2.2}/tests/test_secrets.py +0 -0
  195. {fruxon-2.2.1 → fruxon-2.2.2}/tests/test_skills.py +0 -0
  196. {fruxon-2.2.1 → fruxon-2.2.2}/tests/test_ssl.py +0 -0
  197. {fruxon-2.2.1 → fruxon-2.2.2}/tests/test_storage.py +0 -0
  198. {fruxon-2.2.1 → fruxon-2.2.2}/tests/test_system_blocks.py +0 -0
  199. {fruxon-2.2.1 → fruxon-2.2.2}/tests/test_system_blocks_cli.py +0 -0
  200. {fruxon-2.2.1 → fruxon-2.2.2}/tests/test_telemetry.py +0 -0
  201. {fruxon-2.2.1 → fruxon-2.2.2}/tests/test_test_chats.py +0 -0
  202. {fruxon-2.2.1 → fruxon-2.2.2}/tests/test_topics.py +0 -0
  203. {fruxon-2.2.1 → fruxon-2.2.2}/tests/test_trigger_budgets.py +0 -0
  204. {fruxon-2.2.1 → fruxon-2.2.2}/tests/test_triggers.py +0 -0
  205. {fruxon-2.2.1 → fruxon-2.2.2}/tests/test_triggers_check_cli.py +0 -0
  206. {fruxon-2.2.1 → fruxon-2.2.2}/tests/test_triggers_ledger.py +0 -0
  207. {fruxon-2.2.1 → fruxon-2.2.2}/tests/test_triggers_ledger_batch_views.py +0 -0
  208. {fruxon-2.2.1 → fruxon-2.2.2}/tests/test_triggers_ledger_stage_tests.py +0 -0
  209. {fruxon-2.2.1 → fruxon-2.2.2}/tests/test_triggers_questions.py +0 -0
  210. {fruxon-2.2.1 → fruxon-2.2.2}/tests/test_triggers_shape.py +0 -0
  211. {fruxon-2.2.1 → fruxon-2.2.2}/tests/test_triggers_write.py +0 -0
  212. {fruxon-2.2.1 → fruxon-2.2.2}/tests/test_tui_boundary.py +0 -0
  213. {fruxon-2.2.1 → fruxon-2.2.2}/tests/test_ui.py +0 -0
  214. {fruxon-2.2.1 → fruxon-2.2.2}/tests/test_update_check.py +0 -0
  215. {fruxon-2.2.1 → fruxon-2.2.2}/tests/test_validation.py +0 -0
  216. {fruxon-2.2.1 → fruxon-2.2.2}/tests/test_voice_calls.py +0 -0
  217. {fruxon-2.2.1 → fruxon-2.2.2}/tests/test_workspaces_cli.py +0 -0
@@ -1,5 +1,27 @@
1
1
  # History
2
2
 
3
+ ## Unreleased — `integrations authorize` saves the connection it hands out
4
+
5
+ - **`fruxon integrations authorize`** printed the provider's consent URL from
6
+ `:authorize`. That flow hands the account back only to the dashboard page
7
+ that opened it, so an account consented to through the CLI was never saved:
8
+ no config was created, and the tokens were swept an hour later. It now
9
+ creates a config for the integration's OAuth2 method (or takes
10
+ `--config <id>`) and prints a credential link: whoever opens it signs in to
11
+ Fruxon, then to the provider, and the account is connected and the config
12
+ published. `--scope` rides on the link; `--config-param` sets the new
13
+ config's connection settings; `--return-url` is ignored. The JSON keeps
14
+ `authMethod` and `authorizationUrl` (now the link) and adds `configId`,
15
+ `createdConfig`, `requestId`, `url`, `mode` and `expiresAt`. Needs a server
16
+ with OAuth credential links (fruxon-backend, 2026-10-30).
17
+ - **`fruxon integrations connect`** links OAuth integrations too, with
18
+ `--scope` (repeatable) for what to ask; a scope also picks the OAuth method
19
+ when the integration takes a typed credential as well. An integration that
20
+ declares both now needs `--auth-method` unless `--scope` is given.
21
+ - `FruxonClient.create_credential_link` takes `scopes`.
22
+ `FruxonClient.authorize_integration` is deprecated (`DeprecationWarning`):
23
+ an API client's flow never saves, and servers now refuse API keys there.
24
+
3
25
  ## Unreleased — `chat_user` is deprecated: the server ignores it
4
26
 
5
27
  - `execute`, `stream` and `stream_text` no longer send `chat_user` (as
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: fruxon
3
- Version: 2.2.1
3
+ Version: 2.2.2
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
@@ -143,8 +143,8 @@ Integrations + tools:
143
143
  | --- | --- |
144
144
  | `fruxon integrations list/get/create/update/verify/open` | Manage external integrations — the connections agents draw tools from. `create`/`update`/`verify` take a `--file` JSON body; `open` opens the dashboard. |
145
145
  | `fruxon integrations configs list/get/update/publish` | The per-integration auth/config records. `update --file` patches a config's draft (only the fields sent; `{"egressCountry": ""}` clears an egress pin) and prints it with secrets masked; `publish` makes the draft the revision tool calls resolve, asks first (`--yes` in agent mode), and prints the new revision's `id` and `version`, never the credentials. |
146
- | `fruxon integrations authorize <integration>` | Mint an application-level OAuth authorization URL to **connect** an integration — auto-detects its OAuth2 method (`--auth-method` to pick, `--scope`/`--config-param` to tune). OAuth needs a browser consent step, so the CLI hands you the link; a human clicks it, and the connection is saved as a tenant config a slot can pin. |
147
- | `fruxon integrations connect <integration>` | Create a config for an API-key, token or password integration (Stripe, most REST APIs) and print a **credential link**: a human opens it, signs in to Fruxon, types the credential, and the page tests it and publishes the config. 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). |
146
+ | `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. |
147
+ | `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). |
148
148
  | `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. |
149
149
  | `fruxon integrations mcp …` | Inspect and enable the MCP server for an integration. |
150
150
  | `fruxon tools list/get/create/update/delete/run` | Manage the tools inside an integration. Integration-scoped. `get` and `run` select the tool with `--tool`; `run` executes it outside any agent — real credentials, real result — with `-p key=value`, and `-c` naming the config that supplies credentials. The tenant list API hides internal `knowledge_base` / `assets` tools; `tools list` recovers them by ID and lists them like any other (`--no-include-internal` for the raw server answer). |
@@ -108,8 +108,8 @@ Integrations + tools:
108
108
  | --- | --- |
109
109
  | `fruxon integrations list/get/create/update/verify/open` | Manage external integrations — the connections agents draw tools from. `create`/`update`/`verify` take a `--file` JSON body; `open` opens the dashboard. |
110
110
  | `fruxon integrations configs list/get/update/publish` | The per-integration auth/config records. `update --file` patches a config's draft (only the fields sent; `{"egressCountry": ""}` clears an egress pin) and prints it with secrets masked; `publish` makes the draft the revision tool calls resolve, asks first (`--yes` in agent mode), and prints the new revision's `id` and `version`, never the credentials. |
111
- | `fruxon integrations authorize <integration>` | Mint an application-level OAuth authorization URL to **connect** an integration — auto-detects its OAuth2 method (`--auth-method` to pick, `--scope`/`--config-param` to tune). OAuth needs a browser consent step, so the CLI hands you the link; a human clicks it, and the connection is saved as a tenant config a slot can pin. |
112
- | `fruxon integrations connect <integration>` | Create a config for an API-key, token or password integration (Stripe, most REST APIs) and print a **credential link**: a human opens it, signs in to Fruxon, types the credential, and the page tests it and publishes the config. 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). |
111
+ | `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. |
112
+ | `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). |
113
113
  | `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. |
114
114
  | `fruxon integrations mcp …` | Inspect and enable the MCP server for an integration. |
115
115
  | `fruxon tools list/get/create/update/delete/run` | Manage the tools inside an integration. Integration-scoped. `get` and `run` select the tool with `--tool`; `run` executes it outside any agent — real credentials, real result — with `-p key=value`, and `-c` naming the config that supplies credentials. The tenant list API hides internal `knowledge_base` / `assets` tools; `tools list` recovers them by ID and lists them like any other (`--no-include-internal` for the raw server answer). |
@@ -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.1'
22
- __version_tuple__ = version_tuple = (2, 2, 1)
21
+ __version__ = version = '2.2.2'
22
+ __version_tuple__ = version_tuple = (2, 2, 2)
23
23
 
24
24
  __commit_id__ = commit_id = None
@@ -708,14 +708,14 @@ _EXAMPLES: dict[str, list[tuple[str, str]]] = {
708
708
  ],
709
709
  "integrations": [
710
710
  ("fruxon integrations list", "Browse connected services"),
711
- (
712
- "fruxon integrations authorize google_sheets",
713
- "Mint an OAuth connect link to hand a human (auto-detects the method)",
714
- ),
715
711
  (
716
712
  "fruxon integrations connect stripe",
717
713
  "Create a config and mint a link a human fills its API key in; the secret never reaches the CLI",
718
714
  ),
715
+ (
716
+ "fruxon integrations connect google_gmail --scope https://www.googleapis.com/auth/gmail.modify",
717
+ "Same for OAuth: whoever opens the link signs in, and the account is connected and the config published",
718
+ ),
719
719
  ("fruxon integrations triggers gmail", "Discover the event types + payload paths a trigger can wire to"),
720
720
  ("fruxon integrations create -f config.json", "Wire up a new external service"),
721
721
  ("fruxon integrations open my-integration", "Open the dashboard config page"),
@@ -560,17 +560,22 @@ def integrations_authorize(
560
560
  ] = None,
561
561
  scope: Annotated[
562
562
  list[str] | None,
563
- typer.Option("--scope", help="OAuth scope to request (repeatable). Omit to use the method's defaults."),
563
+ typer.Option("--scope", help="OAuth scope to request (repeatable). Omit for the method's recommended scopes."),
564
564
  ] = None,
565
565
  config_param: Annotated[
566
566
  list[str] | None,
567
567
  typer.Option(
568
- "--config-param", help="key=value for URL placeholder resolution (repeatable, e.g. instance URL)."
568
+ "--config-param",
569
+ help="key=value connection setting for the new config (repeatable, e.g. instanceUrl=https://…).",
569
570
  ),
570
571
  ] = None,
572
+ config_id: Annotated[
573
+ str | None,
574
+ typer.Option("--config", help="Connect the account to this existing config instead of creating a config."),
575
+ ] = None,
571
576
  return_url: Annotated[
572
577
  str | None,
573
- typer.Option("--return-url", help="Relative path (must start with /) the success page links back to."),
578
+ typer.Option("--return-url", hidden=True, help="Ignored: the link's page confirms the connection itself."),
574
579
  ] = None,
575
580
  workspace: Annotated[str | None, typer.Option("--workspace", help="Workspace identifier override.")] = None,
576
581
  base_url: Annotated[str | None, typer.Option("--base-url", help="API base URL override.")] = None,
@@ -579,14 +584,21 @@ def integrations_authorize(
579
584
  typer.Option("--output", "-o", help="Output format: text (default), json."),
580
585
  ] = None,
581
586
  ):
582
- """Mint an OAuth link to connect an integration — hand it to a human to click.
583
-
584
- OAuth needs a browser consent step no headless client can complete, so the
585
- CLI does the next best thing: it generates the provider authorization URL.
586
- A human opens it, authorizes, and the connection is saved as a tenant
587
- config that every agent referencing it shares — after which a slot's
588
- `tenantConfigId` resolves (see `fruxon agents draft validate --online` /
589
- `fruxon agents check`).
587
+ """Mint a link a human opens to connect an integration's account through OAuth.
588
+
589
+ OAuth needs a browser consent step no headless client can complete, so
590
+ the CLI hands over a link instead. It creates a config for the
591
+ integration's OAuth method (or takes [bold]--config <id>[/bold]) and prints
592
+ a link to a Fruxon page: whoever opens it signs in to Fruxon, then to the
593
+ provider, and the account they grant becomes the config's connection and
594
+ the config is published. A slot's `tenantConfigId` can then pin it (see
595
+ `fruxon agents draft validate --online` / `fruxon agents check`). Until
596
+ the link is used nothing is connected: hand it to the human and wait.
597
+
598
+ The same as [bold]fruxon integrations connect[/bold] for an OAuth
599
+ integration; `connect` also takes [bold]--no-sign-in[/bold], --for, --note,
600
+ --expires-in-hours and --name. The link opens only for a member of this
601
+ workspace signed in to Fruxon whose role may set up integrations.
590
602
 
591
603
  Auto-detects the integration's application-level OAuth2 auth method; pass
592
604
  `--auth-method <id>` if it declares more than one (the error lists them).
@@ -599,96 +611,43 @@ def integrations_authorize(
599
611
  output = resolve_output_format(output, human_default="text", agent_default="json")
600
612
  if output not in {"text", "json"}:
601
613
  fail(f"Unknown output format: [bold]{output}[/bold]", hint="Valid formats: text, json.", code=EXIT_VALIDATION)
602
-
603
- config_parameters: dict[str, str] = {}
604
- for pair in config_param or []:
605
- if "=" not in pair:
606
- fail(
607
- f"Invalid --config-param [bold]{pair}[/bold] — expected key=value.",
608
- hint="e.g. --config-param instanceUrl=https://acme.my.salesforce.com",
609
- code=EXIT_VALIDATION,
610
- )
611
- key, _, value = pair.partition("=")
612
- config_parameters[key] = value
613
-
614
- client = build_client(workspace, base_url)
615
-
616
- # Resolve which auth method to authorize.
617
- method_id = auth_method
618
- if method_id is None:
619
- try:
620
- methods = client.list_integration_auth_methods(integration)
621
- except FruxonError as e:
622
- fail_from_api_error(e, hint=_hint_for_error(e))
623
- oauth = [
624
- m
625
- for m in methods
626
- if str(m.get("type", "")).upper() == "O_AUTH2"
627
- and "APPLICATION" in {str(level).upper() for level in (m.get("supportedLevels") or [])}
628
- ]
629
- if not oauth:
630
- fail(
631
- f"[bold]{integration}[/bold] declares no application-level OAuth2 auth method to authorize.",
632
- hint=(
633
- "Pass [bold]--auth-method <id>[/bold] explicitly, or connect this integration in the dashboard. "
634
- f"Declared methods: {', '.join(str(m.get('id')) for m in methods) or '(none)'}."
635
- ),
636
- code=EXIT_VALIDATION,
637
- )
638
- if len(oauth) > 1:
639
- listed = ", ".join(f"{m.get('id')} ({m.get('displayName') or m.get('type')})" for m in oauth)
640
- fail(
641
- f"[bold]{integration}[/bold] declares multiple OAuth2 methods — pick one with --auth-method.",
642
- hint=f"Methods: {listed}.",
643
- code=EXIT_VALIDATION,
644
- )
645
- method_id = str(oauth[0].get("id"))
646
-
647
- body: dict[str, object] = {"integrationAuthMetadataId": method_id}
648
- if scope:
649
- body["scopes"] = list(scope)
650
- if config_parameters:
651
- body["configParameters"] = config_parameters
652
- if return_url:
653
- body["returnUrl"] = return_url
654
-
655
- try:
656
- result = client.authorize_integration(integration, body)
657
- except FruxonError as e:
658
- fail_from_api_error(e, hint=_hint_for_error(e))
659
-
660
- url = result.get("authorizationUrl", "")
661
-
662
- if output == "json":
663
- print(json.dumps({"integration": integration, "authMethod": method_id, "authorizationUrl": url}, indent=2))
664
- return
665
-
666
- if stderr.is_terminal:
667
- print_banner(subtitle=f"connect · {integration}")
668
- stderr.print()
669
- say_ok(f"Open this link to connect [bold]{integration}[/bold] (auth method [dim]{method_id}[/dim]):")
670
- stderr.print()
671
- print(url)
672
- stderr.print()
673
- stderr.print(
674
- " [dim]A human authorizes in the browser; the connection is then saved as a tenant config "
675
- "that agents reference via a slot's tenantConfigId.[/dim]"
614
+ if return_url is not None:
615
+ say_warn("--return-url is ignored: the link's page confirms the connection itself.")
616
+
617
+ _connect(
618
+ integration,
619
+ config_id=config_id,
620
+ name=None,
621
+ auth_method=auth_method,
622
+ parameters=_parse_key_values(config_param, flag="--config-param", example="instanceUrl=https://…"),
623
+ scopes=list(scope or []),
624
+ sign_in=True,
625
+ for_email=None,
626
+ note=None,
627
+ expires_in_hours=None,
628
+ workspace=workspace,
629
+ base_url=base_url,
630
+ output=output,
631
+ signs_in_only=True,
676
632
  )
677
633
 
678
634
 
679
635
  # ─────────────────────────────────────────────────────────────────────────────
680
- # connect — a credential link for an API key, token or password
636
+ # connect — a credential link: an API key, token or password, or an OAuth sign-in
681
637
  # ─────────────────────────────────────────────────────────────────────────────
682
638
 
683
- # What a credential link can take: the page renders a form for these, never an OAuth consent.
639
+ # What a credential link's page takes typed in: it renders a form for these.
684
640
  _LINKABLE_CREDENTIAL_TYPES = {"API_KEY", "BEARER_TOKEN", "BASIC_AUTH"}
685
641
 
642
+ # What it sends whoever opens it to sign in to instead: the provider's consent screen.
643
+ _SIGN_IN_TYPE = "O_AUTH2"
644
+
686
645
  _MAX_LINK_HOURS = 720
687
646
 
688
647
 
689
648
  @integrations_app.command("connect")
690
649
  def integrations_connect(
691
- integration: Annotated[str, typer.Argument(help="Integration to connect (e.g. stripe).")],
650
+ integration: Annotated[str, typer.Argument(help="Integration to connect (e.g. stripe, google_gmail).")],
692
651
  config_id: Annotated[
693
652
  str | None,
694
653
  typer.Option("--config", help="Fill this existing config's credentials instead of creating a config."),
@@ -711,6 +670,16 @@ def integrations_connect(
711
670
  help="key=value non-secret connection setting for the new config (repeatable, e.g. subdomain=acme).",
712
671
  ),
713
672
  ] = None,
673
+ scope: Annotated[
674
+ list[str] | None,
675
+ typer.Option(
676
+ "--scope",
677
+ help=(
678
+ "OAuth only: a scope whoever signs in is asked to grant (repeatable). "
679
+ "Omit for the method's recommended scopes."
680
+ ),
681
+ ),
682
+ ] = None,
714
683
  sign_in: Annotated[
715
684
  bool,
716
685
  typer.Option(
@@ -742,15 +711,19 @@ def integrations_connect(
742
711
  typer.Option("--output", "-o", help="Output format: text (default for humans), json (default in agent mode)."),
743
712
  ] = None,
744
713
  ):
745
- """Mint a link a human opens to fill in an integration's credentials.
746
-
747
- For an API key, a bearer token or a username and password. Creates a
748
- config for the integration (or takes [bold]--config <id>[/bold]) and prints
749
- a link to a Fruxon page. Whoever opens it types the credential there; the
750
- page tests it against the service and publishes the config, which a slot's
751
- `tenantConfigId` can then pin. The values never pass through this
752
- terminal, nor through an AI agent driving the CLI: hand the link to the
753
- human, never ask them for the secret.
714
+ """Mint a link a human opens to connect an integration: they type its credential or sign in to it.
715
+
716
+ Creates a config for the integration (or takes [bold]--config <id>[/bold])
717
+ and prints a link to a Fruxon page. For an API key, a bearer token or a
718
+ username and password, whoever opens it types the credential there; the
719
+ page tests it against the service and publishes the config. For an
720
+ integration that signs in through OAuth (Gmail, Google Sheets, Outlook…),
721
+ they sign in to the provider instead, granting the [bold]--scope[/bold]s
722
+ asked for, and the account they grant is connected and the config
723
+ published. Either way a slot's `tenantConfigId` can then pin the config,
724
+ and the values never pass through this terminal, nor through an AI agent
725
+ driving the CLI: hand the link to the human, never ask them for the
726
+ secret. Nothing is connected until the link is used.
754
727
 
755
728
  The link opens only for a member of this workspace signed in to Fruxon
756
729
  whose role may set up integrations, so holding it proves nothing and it is
@@ -758,30 +731,72 @@ def integrations_connect(
758
731
  holds it can fill, for a client or partner without a Fruxon login: send
759
732
  that one privately. A new link for a config replaces the one sent before.
760
733
 
761
- OAuth integrations connect through [bold]fruxon integrations authorize[/bold]
762
- instead. Needs the `integrations:write` scope (the default login preset
763
- has it); a [bold]--no-sign-in[/bold] link also needs `workspace:write`, which
764
- only Admin and Owner hold.
734
+ Needs the `integrations:write` scope (the default login preset has it); a
735
+ [bold]--no-sign-in[/bold] link also needs `workspace:write`, which only
736
+ Admin and Owner hold.
765
737
 
766
738
  Examples:
767
739
  fruxon integrations connect stripe
768
740
  fruxon integrations connect zendesk --param subdomain=acme
741
+ fruxon integrations connect google_gmail --scope https://www.googleapis.com/auth/gmail.modify
769
742
  fruxon integrations connect stripe --config <config-id>
770
743
  fruxon integrations connect stripe --no-sign-in --for cfo@client.com --expires-in-hours 48
771
744
  """
772
- output = _resolve_write_output(output)
773
- parameters = _parse_key_values(param, flag="--param", example="subdomain=acme")
745
+ _connect(
746
+ integration,
747
+ config_id=config_id,
748
+ name=name,
749
+ auth_method=auth_method,
750
+ parameters=_parse_key_values(param, flag="--param", example="subdomain=acme"),
751
+ scopes=list(scope or []),
752
+ sign_in=sign_in,
753
+ for_email=for_email,
754
+ note=note,
755
+ expires_in_hours=expires_in_hours,
756
+ workspace=workspace,
757
+ base_url=base_url,
758
+ output=_resolve_write_output(output),
759
+ signs_in_only=False,
760
+ )
761
+
762
+
763
+ def _connect(
764
+ integration: str,
765
+ *,
766
+ config_id: str | None,
767
+ name: str | None,
768
+ auth_method: str | None,
769
+ parameters: dict[str, str],
770
+ scopes: list[str],
771
+ sign_in: bool,
772
+ for_email: str | None,
773
+ note: str | None,
774
+ expires_in_hours: int | None,
775
+ workspace: str | None,
776
+ base_url: str | None,
777
+ output: str,
778
+ signs_in_only: bool,
779
+ ) -> None:
780
+ """Mint the link `connect` and `authorize` print, creating its config first unless one is named.
781
+
782
+ ``signs_in_only`` is `authorize`: an OAuth method only, and its JSON keeps the
783
+ ``authMethod`` / ``authorizationUrl`` keys scripts written against it read.
784
+ """
774
785
  if config_id is not None and (name is not None or auth_method is not None or parameters):
786
+ flags = "--auth-method and --config-param" if signs_in_only else "--name, --auth-method and --param"
775
787
  fail(
776
- "--name, --auth-method and --param set up a new config; --config fills one that exists.",
788
+ f"{flags} set up a new config; --config fills one that exists.",
777
789
  hint="Drop [bold]--config[/bold] to create a config, or drop the others to fill the existing one.",
778
790
  code=EXIT_VALIDATION,
779
791
  )
780
792
 
781
793
  client = build_client(workspace, base_url)
782
794
  created = config_id is None
795
+ method: dict | None = None
783
796
  if config_id is None:
784
- config_id = _create_linkable_config(client, integration, name, auth_method, parameters)
797
+ config_id, method = _create_linkable_config(
798
+ client, integration, name, auth_method, parameters, signs_in_only=signs_in_only, scoped=bool(scopes)
799
+ )
785
800
 
786
801
  try:
787
802
  link = client.create_credential_link(
@@ -791,6 +806,7 @@ def integrations_connect(
791
806
  intended_for_email=for_email,
792
807
  note=note,
793
808
  ttl_hours=expires_in_hours,
809
+ scopes=scopes or None,
794
810
  )
795
811
  except FruxonError as e:
796
812
  leftover = _delete_new_config(client, integration, config_id) if created else None
@@ -807,14 +823,21 @@ def integrations_connect(
807
823
  "mode": link.get("mode"),
808
824
  "expiresAt": link.get("expiresAt"),
809
825
  }
826
+ if signs_in_only:
827
+ record["authMethod"] = str(method.get("id")) if method else None
828
+ record["authorizationUrl"] = url
810
829
  print(json.dumps(record, indent=2))
811
830
  return
812
831
 
832
+ signs_in = signs_in_only or bool(scopes) or (method is not None and _credential_type(method) == _SIGN_IN_TYPE)
813
833
  if stderr.is_terminal:
814
834
  print_banner(subtitle=f"connect · {integration}")
815
835
  stderr.print()
816
836
  what = f"a new config [dim]{config_id}[/dim]" if created else f"config [dim]{config_id}[/dim]"
817
- say_ok(f"Open this link to fill in the [bold]{escape(integration)}[/bold] credentials for {what}:")
837
+ if signs_in:
838
+ say_ok(f"Open this link to sign in to [bold]{escape(integration)}[/bold] and connect the account to {what}:")
839
+ else:
840
+ say_ok(f"Open this link to fill in the [bold]{escape(integration)}[/bold] credentials for {what}:")
818
841
  stderr.print()
819
842
  print(url)
820
843
  stderr.print()
@@ -824,16 +847,33 @@ def integrations_connect(
824
847
  else "Whoever holds it can fill it in: send it privately."
825
848
  )
826
849
  stderr.print(f" [dim]{who} Works until {format_ts(link.get('expiresAt'))} UTC.[/dim]")
850
+ done = "Once they sign in" if signs_in else "Once filled"
827
851
  stderr.print(
828
- " [dim]Once filled, the config is published: pin it with a slot's tenantConfigId "
852
+ f" [dim]{done}, the config is published: pin it with a slot's tenantConfigId "
829
853
  f"(fruxon integrations configs get {integration} {config_id}).[/dim]"
830
854
  )
831
855
 
832
856
 
857
+ def _credential_type(method: dict) -> str:
858
+ # A custom method names the standard shape its credential is entered in, as the backend's
859
+ # EffectiveCredentialType does (e.g. an email + password it exchanges for a session token).
860
+ return str(method.get("userCredentialAuthType") or method.get("type") or "").upper()
861
+
862
+
833
863
  def _create_linkable_config(
834
- client, integration: str, name: str | None, auth_method: str | None, parameters: dict[str, str]
835
- ) -> str:
836
- """Create the unpublished config a credential link fills; return its id. Exits on anything it can't link."""
864
+ client,
865
+ integration: str,
866
+ name: str | None,
867
+ auth_method: str | None,
868
+ parameters: dict[str, str],
869
+ *,
870
+ signs_in_only: bool,
871
+ scoped: bool,
872
+ ) -> tuple[str, dict]:
873
+ """Create the unpublished config a credential link fills; return its id and auth method.
874
+
875
+ Exits on anything it can't link or create.
876
+ """
837
877
  try:
838
878
  meta = client.get_integration(integration)
839
879
  except FruxonError as e:
@@ -841,7 +881,7 @@ def _create_linkable_config(
841
881
 
842
882
  config_metadata = meta.config_metadata if isinstance(meta.config_metadata, dict) else {}
843
883
  methods = [m for m in config_metadata.get("authMetadata") or [] if isinstance(m, dict)]
844
- method = _linkable_method(integration, methods, auth_method)
884
+ method = _linkable_method(integration, methods, auth_method, signs_in_only=signs_in_only, scoped=scoped)
845
885
  _check_connection_parameters(integration, config_metadata.get("parametersMetadata"), parameters)
846
886
 
847
887
  body = {
@@ -853,24 +893,48 @@ def _create_linkable_config(
853
893
  config = client.create_integration_config(integration, body)
854
894
  except FruxonError as e:
855
895
  fail_from_api_error(e, hint=_hint_for_config_error(e, integration))
856
- return str(config.get("id"))
896
+ return str(config.get("id")), method
857
897
 
858
898
 
859
- def _linkable_method(integration: str, methods: list[dict], auth_method: str | None) -> dict:
860
- """The application-level API key / token / password method the new config uses, or exit saying why not."""
899
+ def _linkable_method(
900
+ integration: str, methods: list[dict], auth_method: str | None, *, signs_in_only: bool, scoped: bool
901
+ ) -> dict:
902
+ """The application-level method the new config uses, or exit saying why not.
861
903
 
862
- def credential_type(m: dict) -> str:
863
- # A custom method names the standard shape its credential is entered in, as the backend's
864
- # EffectiveCredentialType does (e.g. an email + password it exchanges for a session token).
865
- return str(m.get("userCredentialAuthType") or m.get("type") or "").upper()
904
+ One whose credential the link's page takes typed in (an API key, a token, a
905
+ username and password), or one whoever opens the link signs in to (OAuth):
906
+ only the latter for `authorize` (``signs_in_only``) and when a scope was
907
+ asked for (``scoped``), which only a sign-in grants.
908
+ """
909
+ oauth_only = signs_in_only or scoped
866
910
 
867
911
  def application_level(m: dict) -> bool:
868
912
  return "APPLICATION" in {str(level).upper() for level in (m.get("supportedLevels") or [])}
869
913
 
870
- def oauth_hint() -> str | None:
871
- if any(credential_type(m) == "O_AUTH2" and application_level(m) for m in methods):
872
- return f"It signs in through OAuth: run [bold]fruxon integrations authorize {integration}[/bold]."
873
- return None
914
+ def signs_in(m: dict) -> bool:
915
+ return _credential_type(m) == _SIGN_IN_TYPE
916
+
917
+ def typed(m: dict) -> bool:
918
+ return _credential_type(m) in _LINKABLE_CREDENTIAL_TYPES
919
+
920
+ def linkable(m: dict) -> bool:
921
+ return application_level(m) and (signs_in(m) or (typed(m) and not oauth_only))
922
+
923
+ what = (
924
+ "OAuth sign-in the workspace shares"
925
+ if oauth_only
926
+ else "API key, token, password or OAuth sign-in the workspace shares"
927
+ )
928
+
929
+ def hint_for(refused: list[dict]) -> str:
930
+ if any(application_level(m) and typed(m) for m in refused):
931
+ # Refused only because a sign-in was asked for: a link can still ask for it typed in.
932
+ unscoped = ", with no --scope" if scoped else ""
933
+ command = f"fruxon integrations connect {integration}"
934
+ return f"It takes a credential typed in: run [bold]{command}[/bold]{unscoped}."
935
+ if any(not application_level(m) for m in refused):
936
+ return "Each person connects it with their own account, so there is nothing to link."
937
+ return "Connect it from the dashboard."
874
938
 
875
939
  if auth_method is not None:
876
940
  chosen = next((m for m in methods if str(m.get("id")) == auth_method), None)
@@ -881,30 +945,30 @@ def _linkable_method(integration: str, methods: list[dict], auth_method: str | N
881
945
  hint=f"Declared methods: {declared}.",
882
946
  code=EXIT_VALIDATION,
883
947
  )
884
- if credential_type(chosen) not in _LINKABLE_CREDENTIAL_TYPES or not application_level(chosen):
948
+ if not linkable(chosen):
885
949
  fail(
886
- f"Auth method [bold]{auth_method}[/bold] is not an API key, token or password the workspace shares, "
887
- "so a link can't fill it.",
888
- hint=oauth_hint() or "Connect it from the dashboard.",
950
+ f"Auth method [bold]{auth_method}[/bold] is not an {what}, so a link can't connect it.",
951
+ hint=hint_for([chosen]),
889
952
  code=EXIT_VALIDATION,
890
953
  )
891
954
  return chosen
892
955
 
893
- linkable = [m for m in methods if credential_type(m) in _LINKABLE_CREDENTIAL_TYPES and application_level(m)]
894
- if not linkable:
956
+ candidates = [m for m in methods if linkable(m)]
957
+ if not candidates:
895
958
  fail(
896
- f"[bold]{integration}[/bold] takes no API key, token or password a link can fill.",
897
- hint=oauth_hint() or "Connect it from the dashboard.",
959
+ f"[bold]{integration}[/bold] takes no {what}.",
960
+ hint=hint_for(methods),
898
961
  code=EXIT_VALIDATION,
899
962
  )
900
- if len(linkable) > 1:
901
- listed = ", ".join(f"{m.get('id')} ({m.get('displayName') or m.get('type')})" for m in linkable)
963
+ if len(candidates) > 1:
964
+ listed = ", ".join(f"{m.get('id')} ({m.get('displayName') or m.get('type')})" for m in candidates)
902
965
  fail(
903
- f"[bold]{integration}[/bold] declares more than one method a link can fill — pick one with --auth-method.",
966
+ f"[bold]{integration}[/bold] declares more than one method a link can connect — "
967
+ "pick one with --auth-method.",
904
968
  hint=f"Methods: {listed}.",
905
969
  code=EXIT_VALIDATION,
906
970
  )
907
- return linkable[0]
971
+ return candidates[0]
908
972
 
909
973
 
910
974
  def _check_connection_parameters(integration: str, declared: object, parameters: dict[str, str]) -> None:
@@ -949,10 +1013,7 @@ def _hint_for_link_error(error: FruxonError, integration: str, leftover: str | N
949
1013
 
950
1014
  hint = _hint_for_config_error(error, integration)
951
1015
  if isinstance(error, FruxonAPIError) and error.error_code == "not_linkable":
952
- hint = (
953
- "Connect it from the dashboard, or with "
954
- f"[bold]fruxon integrations authorize {integration}[/bold] for OAuth."
955
- )
1016
+ hint = "Connect it from the dashboard."
956
1017
  if leftover is not None:
957
1018
  cleanup = f"The config it created, {leftover}, is still there: delete it from the dashboard."
958
1019
  hint = f"{hint} {cleanup}" if hint else cleanup