fruxon 2.3.4__tar.gz → 2.3.5__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.
- {fruxon-2.3.4 → fruxon-2.3.5}/HISTORY.md +22 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/PKG-INFO +3 -2
- {fruxon-2.3.4 → fruxon-2.3.5}/README.md +2 -1
- {fruxon-2.3.4 → fruxon-2.3.5}/src/fruxon/__init__.py +2 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/src/fruxon/_version.py +2 -2
- {fruxon-2.3.4 → fruxon-2.3.5}/src/fruxon/checks/agent.py +5 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/src/fruxon/cli/examples.py +8 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/src/fruxon/cli/triggers.py +354 -7
- {fruxon-2.3.4 → fruxon-2.3.5}/src/fruxon/fruxon.py +100 -1
- {fruxon-2.3.4 → fruxon-2.3.5}/src/fruxon/models.py +52 -2
- {fruxon-2.3.4 → fruxon-2.3.5}/src/fruxon/skills/fruxon-build-agent/SKILL.md +2 -2
- {fruxon-2.3.4 → fruxon-2.3.5}/src/fruxon/skills/fruxon-debug-trace/SKILL.md +7 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/src/fruxon/skills/fruxon-meet/SKILL.md +3 -1
- {fruxon-2.3.4 → fruxon-2.3.5}/src/fruxon/ui.py +14 -0
- fruxon-2.3.5/tests/test_triggers_webhook.py +424 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/.gitignore +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/LICENSE +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/pyproject.toml +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/src/fruxon/__main__.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/src/fruxon/_request_id.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/src/fruxon/_ssl.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/src/fruxon/checks/__init__.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/src/fruxon/checks/ledger.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/src/fruxon/checks/references.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/src/fruxon/cli/__init__.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/src/fruxon/cli/_crash.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/src/fruxon/cli/_last_failure.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/src/fruxon/cli/_ledger_passes.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/src/fruxon/cli/_plugin_hint.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/src/fruxon/cli/_schema.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/src/fruxon/cli/_shared.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/src/fruxon/cli/_stream.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/src/fruxon/cli/access_requests.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/src/fruxon/cli/agents.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/src/fruxon/cli/agents_approvals.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/src/fruxon/cli/agents_budget.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/src/fruxon/cli/agents_channels.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/src/fruxon/cli/agents_draft.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/src/fruxon/cli/agents_evaluations.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/src/fruxon/cli/agents_executions.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/src/fruxon/cli/agents_improvements.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/src/fruxon/cli/agents_lifecycle.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/src/fruxon/cli/agents_memory.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/src/fruxon/cli/agents_reply_style.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/src/fruxon/cli/agents_revisions.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/src/fruxon/cli/agents_sandbox.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/src/fruxon/cli/agents_sandbox_test.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/src/fruxon/cli/agents_slots.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/src/fruxon/cli/agents_system_blocks.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/src/fruxon/cli/agents_tests.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/src/fruxon/cli/agents_topics.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/src/fruxon/cli/agents_voice_calls.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/src/fruxon/cli/applications.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/src/fruxon/cli/applications_entry_points.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/src/fruxon/cli/assets.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/src/fruxon/cli/auth.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/src/fruxon/cli/capabilities.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/src/fruxon/cli/completion.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/src/fruxon/cli/config.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/src/fruxon/cli/consult_pins.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/src/fruxon/cli/conversation_imports.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/src/fruxon/cli/dash.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/src/fruxon/cli/describe.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/src/fruxon/cli/doctor.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/src/fruxon/cli/environments.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/src/fruxon/cli/escalation_desks.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/src/fruxon/cli/escalation_operators.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/src/fruxon/cli/escalations.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/src/fruxon/cli/feedback.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/src/fruxon/cli/guides.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/src/fruxon/cli/integrations.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/src/fruxon/cli/integrations_sandbox.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/src/fruxon/cli/integrations_webhooks.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/src/fruxon/cli/keys.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/src/fruxon/cli/knowledge_bases.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/src/fruxon/cli/knowledge_documents.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/src/fruxon/cli/knowledge_notices.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/src/fruxon/cli/knowledge_sources.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/src/fruxon/cli/llm_providers.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/src/fruxon/cli/messages.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/src/fruxon/cli/metrics.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/src/fruxon/cli/participants.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/src/fruxon/cli/secrets.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/src/fruxon/cli/skills.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/src/fruxon/cli/storage.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/src/fruxon/cli/tools.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/src/fruxon/cli/triggers_budget.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/src/fruxon/cli/triggers_check.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/src/fruxon/cli/triggers_ledger.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/src/fruxon/cli/triggers_ledger_stage_tests.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/src/fruxon/cli/triggers_questions.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/src/fruxon/cli/triggers_shape.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/src/fruxon/cli/working_hours.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/src/fruxon/cli/workspaces.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/src/fruxon/credentials.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/src/fruxon/device_auth.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/src/fruxon/doctor.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/src/fruxon/exceptions.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/src/fruxon/flow_validation.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/src/fruxon/output.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/src/fruxon/params.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/src/fruxon/sandbox_scenario.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/src/fruxon/skills/__init__.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/src/fruxon/skills/fruxon-agent-mode/SKILL.md +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/src/fruxon/skills/fruxon-create-integration/SKILL.md +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/src/fruxon/skills/fruxon-use-integrations/SKILL.md +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/src/fruxon/telemetry.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/src/fruxon/tui/__init__.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/src/fruxon/tui/app.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/src/fruxon/tui/demo.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/src/fruxon/tui/links.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/src/fruxon/tui/screens/__init__.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/src/fruxon/tui/screens/agent.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/src/fruxon/tui/screens/base.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/src/fruxon/tui/screens/home.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/src/fruxon/tui/screens/ledger.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/src/fruxon/tui/screens/loader.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/src/fruxon/tui/screens/pickers.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/src/fruxon/tui/screens/trace.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/src/fruxon/tui/source.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/src/fruxon/tui/theme.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/src/fruxon/tui/views.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/src/fruxon/tui/widgets.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/src/fruxon/update_check.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/src/fruxon/validation.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/tests/.test_durations.json +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/tests/__init__.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/tests/conftest.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/tests/test_actor.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/tests/test_agent_lifecycle.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/tests/test_agent_revisions_list.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/tests/test_agent_slots.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/tests/test_agents_check_cli.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/tests/test_agents_revisions_cli.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/tests/test_agents_sandbox.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/tests/test_applications.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/tests/test_approvals.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/tests/test_assets.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/tests/test_budgets.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/tests/test_capabilities.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/tests/test_channels.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/tests/test_checks_agent.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/tests/test_checks_ledger.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/tests/test_cli.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/tests/test_cli_base_url_routing.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/tests/test_cli_crash.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/tests/test_cli_feedback.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/tests/test_cli_friction_round2.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/tests/test_cli_friction_round3.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/tests/test_cli_root_flags.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/tests/test_client.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/tests/test_connect_nudge.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/tests/test_consult.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/tests/test_conversation_imports.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/tests/test_credentials.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/tests/test_dash_app.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/tests/test_dash_cli.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/tests/test_dash_client.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/tests/test_dash_links.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/tests/test_dash_source.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/tests/test_describe.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/tests/test_device_auth.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/tests/test_docs_commands_exist.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/tests/test_doctor.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/tests/test_draft_bootstrap.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/tests/test_draft_evaluate_cli.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/tests/test_draft_pull_shape.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/tests/test_draft_run_replay.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/tests/test_draft_validate_cli.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/tests/test_drafts.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/tests/test_entry_points.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/tests/test_environments.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/tests/test_escalation_operators.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/tests/test_escalations.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/tests/test_evaluations.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/tests/test_execution_records.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/tests/test_flow_validation.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/tests/test_fruxon.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/tests/test_guides.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/tests/test_improvements.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/tests/test_integration_configs_write_cli.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/tests/test_integration_sandbox_cli.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/tests/test_integration_triggers_cli.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/tests/test_integrations_authorize_cli.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/tests/test_integrations_connect_cli.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/tests/test_kb_trial_cli.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/tests/test_knowledge_bases.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/tests/test_knowledge_documents.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/tests/test_knowledge_notices.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/tests/test_knowledge_sources.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/tests/test_llm_provider_configs_cli.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/tests/test_llm_providers_connect_cli.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/tests/test_llm_providers_list_cli.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/tests/test_managed_by.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/tests/test_memory.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/tests/test_messages.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/tests/test_metrics.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/tests/test_online_llm_config_refs.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/tests/test_online_prefetch_refs.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/tests/test_online_secret_refs.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/tests/test_output.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/tests/test_params.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/tests/test_participants.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/tests/test_participants_write.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/tests/test_plugin_hint.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/tests/test_project_urls.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/tests/test_reply_style.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/tests/test_request_id.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/tests/test_sandbox_scenario.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/tests/test_schema.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/tests/test_schema_fetch.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/tests/test_secrets.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/tests/test_skills.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/tests/test_ssl.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/tests/test_storage.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/tests/test_system_blocks.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/tests/test_system_blocks_cli.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/tests/test_telemetry.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/tests/test_test_chats.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/tests/test_topics.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/tests/test_trigger_budgets.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/tests/test_triggers.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/tests/test_triggers_check_cli.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/tests/test_triggers_ledger.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/tests/test_triggers_ledger_batch_views.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/tests/test_triggers_ledger_stage_tests.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/tests/test_triggers_questions.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/tests/test_triggers_shape.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/tests/test_triggers_write.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/tests/test_tui_boundary.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/tests/test_ui.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/tests/test_update_check.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/tests/test_validation.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/tests/test_voice_calls.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/tests/test_working_hours_cli.py +0 -0
- {fruxon-2.3.4 → fruxon-2.3.5}/tests/test_workspaces_cli.py +0 -0
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
# History
|
|
2
2
|
|
|
3
|
+
## Unreleased — webhook triggers
|
|
4
|
+
|
|
5
|
+
- **WEBHOOK triggers** — an outside system (a website form, a CRM, Zapier) POSTs a JSON event to the trigger and
|
|
6
|
+
gets `202` at once, instead of holding a synchronous `{agent}:execute`. **`triggers create --webhook --agent <id>
|
|
7
|
+
[--map PARAM=PATH …] [--name …]`** builds one; a `--file` body with `kind: WEBHOOK` works too. Both are checked
|
|
8
|
+
before the call: no `integrationId` / `integrationConfigId` / `eventType`, no schedule fields, no work shape, at
|
|
9
|
+
least one agent (exit 12). A `filter` on `payload.*` is allowed.
|
|
10
|
+
- **The token is issued in the console, never by the CLI.** Issuing or rotating it mints a credential, which the
|
|
11
|
+
server refuses to every API token (`403 token_cannot_mint`). `create` and `get` say so when a webhook trigger has
|
|
12
|
+
no token; any `token_cannot_mint` 403 now gets a hint pointing at the console instead of scope advice.
|
|
13
|
+
`FruxonAPIError.error_code` reads the body's `error` when it has no `code`. `FruxonClient.issue_trigger_webhook_token`
|
|
14
|
+
exists and documents that refusal.
|
|
15
|
+
- **`triggers list` / `get`** carry `hasWebhookKey` and `webhookTokenPrefix` (on every kind; `false` / `null` off
|
|
16
|
+
WEBHOOK) — never the token. The list table marks a webhook trigger with no token. `Trigger` /
|
|
17
|
+
`TriggerDetail.has_webhook_key`, `.webhook_token_prefix`.
|
|
18
|
+
- **`triggers events <trigger>`** (new): the trigger's fire attempts, newest first, with `source` (SCHEDULE / MANUAL
|
|
19
|
+
/ INTEGRATION_EVENT / WEBHOOK) and `outcome`; `--source`, `-n`, `--before`. `FruxonClient.list_trigger_events`,
|
|
20
|
+
`TriggerFireAttempt`.
|
|
21
|
+
- **`triggers fire --file`** documents the webhook case: the sample is nested under `payload.`, and the fire is the
|
|
22
|
+
operator's test (source MANUAL), not a delivery.
|
|
23
|
+
- **`agents check`** warns, under Trigger inputs, about a bound webhook trigger with no token.
|
|
24
|
+
|
|
3
25
|
## Unreleased — the simulator's schema, and what only works in the sandbox
|
|
4
26
|
|
|
5
27
|
- **`fruxon integrations configs sandbox schema <integration>`** (F-030): what to seed a simulated config
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: fruxon
|
|
3
|
-
Version: 2.3.
|
|
3
|
+
Version: 2.3.5
|
|
4
4
|
Summary: The Fruxon SDK is a lightweight Python client for integrating with the Fruxon platform.
|
|
5
5
|
Project-URL: homepage, https://fruxon.com
|
|
6
6
|
Project-URL: documentation, https://docs.fruxon.com/guides/cli
|
|
@@ -169,7 +169,8 @@ Integrations + tools:
|
|
|
169
169
|
| `fruxon knowledge-bases source list/get/add/update/plan-update/preview/activity/passes/sync/pause/resume/archive/unarchive/fork/delete` | The pipelines that read a customer's history and write articles. `managementMode` decides **who owns the implementation**, which is what the verbs key on: a LINKED source's resources are yours and survive a `delete`, a MANAGED one's agents, automation and ledger go with it — and `fork` flips managed to linked, keeping the history, one-way. **Stopped is the default**: a built source lands paused and `unarchive` returns one paused, so `resume` and `sync` confirm (they start reading someone's history, and dispatched items cost a run each) while `pause` and `archive` do not. `preview` admits nothing and is deliberately not narrowed by the watermark — a caught-up source would otherwise look broken — and reports **floors, not totals**, once a ceiling stopped the scan. `activity` speaks the ledger's vocabulary, so `ready` is backlog rather than motion, and a missing work ledger is reduced health rather than an error. |
|
|
170
170
|
| `fruxon assets search/documents/chunks` | Reproduce and inspect a retrieval. `search` runs the same query an agent's `search_assets` does (`--mode HYBRID/VECTOR/FULL_TEXT`, `--top-k`, fusion weights) — note `score` is on a different scale per mode, and in hybrid the top hit is always 1.0. `documents` lists what the index contains (a `chunkCount` of 0 means that file yielded no indexable text); `chunks` reads one document's chunks in order. The `documentId` these print is the **index's** id, which is what `chunks` takes — on a knowledge base's backing asset it is not the editable document's id, and it changes whenever a document's body is re-indexed. The `fileName` (`<knowledge document id>.md`) is the document a `knowledge_base` tool would edit. |
|
|
171
171
|
| `fruxon metrics list` | Browse the evaluation-metric catalog — the ids an agent's quality check (`judge.metrics[]`) binds, with a default weight each. |
|
|
172
|
-
| `fruxon triggers list/get/create/update/delete/fire/bind/unbind` | Manage triggers — the schedule/event sources that fire agents. `create`/`update` take `--file` (+`--schema`); `create` also takes `--application`, the Application that will own the trigger and must own everything it fires. `bind`/`unbind` wire which agents fire; `fire` runs it now (`--close-gathering` also runs every group a batch stage is gathering). `fire`/`delete`/`unbind` confirm + refuse without `--yes` in agent mode. The control plane for autonomy. `get` returns the full stored `workShape` and every `scheduleTimes` slot, so `get -o json | jq .workShape` produces a body `update --file` can post straight back — a PATCH replaces the whole shape, so edit what you read. Each binding carries its `outputDestination` (where a fired run's reply is delivered, e.g. a Telegram group) verbatim, and text output names it as `delivers to telegram -5129894975 (Daria Group)`; a `bindings` list posted back without it unpins the delivery. |
|
|
172
|
+
| `fruxon triggers list/get/create/update/delete/fire/bind/unbind` | Manage triggers — the schedule/event/webhook sources that fire agents. `create`/`update` take `--file` (+`--schema`); `create` also takes `--application`, the Application that will own the trigger and must own everything it fires. `create --webhook --agent <id> --map email=payload.email` builds a WEBHOOK trigger (an outside system POSTs JSON to it; no integration, event type or schedule; at least one agent). Its token is **issued in the console only**: issuing mints a credential, which the server refuses to every API token (`403 token_cannot_mint`), so the CLI never can. `list`/`get` carry `hasWebhookKey` and `webhookTokenPrefix` (never the token); `fire --file sample.json` tests a webhook trigger's mappings with the body nested under `payload.`. `bind`/`unbind` wire which agents fire; `fire` runs it now (`--close-gathering` also runs every group a batch stage is gathering). `fire`/`delete`/`unbind` confirm + refuse without `--yes` in agent mode. The control plane for autonomy. `get` returns the full stored `workShape` and every `scheduleTimes` slot, so `get -o json | jq .workShape` produces a body `update --file` can post straight back — a PATCH replaces the whole shape, so edit what you read. Each binding carries its `outputDestination` (where a fired run's reply is delivered, e.g. a Telegram group) verbatim, and text output names it as `delivers to telegram -5129894975 (Daria Group)`; a `bindings` list posted back without it unpins the delivery. |
|
|
173
|
+
| `fruxon triggers events <trigger>` | Every attempt to fire the trigger, newest first: `source` (SCHEDULE / MANUAL / INTEGRATION_EVENT / WEBHOOK) and `outcome` (FIRED / FILTERED / FILTER_ERROR / FAILED / …), with the webhook `deliveryId`, the agents fired, the filter condition that dropped it, or why it failed. `--source webhook` keeps one source; `-n` up to 200; `--before <createdAt>` pages. |
|
|
173
174
|
| `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. |
|
|
174
175
|
| `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. |
|
|
175
176
|
| `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,7 +135,8 @@ Integrations + tools:
|
|
|
135
135
|
| `fruxon knowledge-bases source list/get/add/update/plan-update/preview/activity/passes/sync/pause/resume/archive/unarchive/fork/delete` | The pipelines that read a customer's history and write articles. `managementMode` decides **who owns the implementation**, which is what the verbs key on: a LINKED source's resources are yours and survive a `delete`, a MANAGED one's agents, automation and ledger go with it — and `fork` flips managed to linked, keeping the history, one-way. **Stopped is the default**: a built source lands paused and `unarchive` returns one paused, so `resume` and `sync` confirm (they start reading someone's history, and dispatched items cost a run each) while `pause` and `archive` do not. `preview` admits nothing and is deliberately not narrowed by the watermark — a caught-up source would otherwise look broken — and reports **floors, not totals**, once a ceiling stopped the scan. `activity` speaks the ledger's vocabulary, so `ready` is backlog rather than motion, and a missing work ledger is reduced health rather than an error. |
|
|
136
136
|
| `fruxon assets search/documents/chunks` | Reproduce and inspect a retrieval. `search` runs the same query an agent's `search_assets` does (`--mode HYBRID/VECTOR/FULL_TEXT`, `--top-k`, fusion weights) — note `score` is on a different scale per mode, and in hybrid the top hit is always 1.0. `documents` lists what the index contains (a `chunkCount` of 0 means that file yielded no indexable text); `chunks` reads one document's chunks in order. The `documentId` these print is the **index's** id, which is what `chunks` takes — on a knowledge base's backing asset it is not the editable document's id, and it changes whenever a document's body is re-indexed. The `fileName` (`<knowledge document id>.md`) is the document a `knowledge_base` tool would edit. |
|
|
137
137
|
| `fruxon metrics list` | Browse the evaluation-metric catalog — the ids an agent's quality check (`judge.metrics[]`) binds, with a default weight each. |
|
|
138
|
-
| `fruxon triggers list/get/create/update/delete/fire/bind/unbind` | Manage triggers — the schedule/event sources that fire agents. `create`/`update` take `--file` (+`--schema`); `create` also takes `--application`, the Application that will own the trigger and must own everything it fires. `bind`/`unbind` wire which agents fire; `fire` runs it now (`--close-gathering` also runs every group a batch stage is gathering). `fire`/`delete`/`unbind` confirm + refuse without `--yes` in agent mode. The control plane for autonomy. `get` returns the full stored `workShape` and every `scheduleTimes` slot, so `get -o json | jq .workShape` produces a body `update --file` can post straight back — a PATCH replaces the whole shape, so edit what you read. Each binding carries its `outputDestination` (where a fired run's reply is delivered, e.g. a Telegram group) verbatim, and text output names it as `delivers to telegram -5129894975 (Daria Group)`; a `bindings` list posted back without it unpins the delivery. |
|
|
138
|
+
| `fruxon triggers list/get/create/update/delete/fire/bind/unbind` | Manage triggers — the schedule/event/webhook sources that fire agents. `create`/`update` take `--file` (+`--schema`); `create` also takes `--application`, the Application that will own the trigger and must own everything it fires. `create --webhook --agent <id> --map email=payload.email` builds a WEBHOOK trigger (an outside system POSTs JSON to it; no integration, event type or schedule; at least one agent). Its token is **issued in the console only**: issuing mints a credential, which the server refuses to every API token (`403 token_cannot_mint`), so the CLI never can. `list`/`get` carry `hasWebhookKey` and `webhookTokenPrefix` (never the token); `fire --file sample.json` tests a webhook trigger's mappings with the body nested under `payload.`. `bind`/`unbind` wire which agents fire; `fire` runs it now (`--close-gathering` also runs every group a batch stage is gathering). `fire`/`delete`/`unbind` confirm + refuse without `--yes` in agent mode. The control plane for autonomy. `get` returns the full stored `workShape` and every `scheduleTimes` slot, so `get -o json | jq .workShape` produces a body `update --file` can post straight back — a PATCH replaces the whole shape, so edit what you read. Each binding carries its `outputDestination` (where a fired run's reply is delivered, e.g. a Telegram group) verbatim, and text output names it as `delivers to telegram -5129894975 (Daria Group)`; a `bindings` list posted back without it unpins the delivery. |
|
|
139
|
+
| `fruxon triggers events <trigger>` | Every attempt to fire the trigger, newest first: `source` (SCHEDULE / MANUAL / INTEGRATION_EVENT / WEBHOOK) and `outcome` (FIRED / FILTERED / FILTER_ERROR / FAILED / …), with the webhook `deliveryId`, the agents fired, the filter condition that dropped it, or why it failed. `--source webhook` keeps one source; `-n` up to 200; `--before <createdAt>` pages. |
|
|
139
140
|
| `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. |
|
|
140
141
|
| `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. |
|
|
141
142
|
| `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. |
|
|
@@ -133,6 +133,7 @@ from fruxon.models import (
|
|
|
133
133
|
Trigger,
|
|
134
134
|
TriggerBinding,
|
|
135
135
|
TriggerDetail,
|
|
136
|
+
TriggerFireAttempt,
|
|
136
137
|
TriggerParameterMapping,
|
|
137
138
|
TriggerRevision,
|
|
138
139
|
UnhandledEscalation,
|
|
@@ -274,6 +275,7 @@ __all__ = [
|
|
|
274
275
|
"Trigger",
|
|
275
276
|
"TriggerBinding",
|
|
276
277
|
"TriggerDetail",
|
|
278
|
+
"TriggerFireAttempt",
|
|
277
279
|
"TriggerParameterMapping",
|
|
278
280
|
"TriggerRevision",
|
|
279
281
|
"UnhandledEscalation",
|
|
@@ -18,7 +18,7 @@ version_tuple: tuple[int | str, ...]
|
|
|
18
18
|
commit_id: str | None
|
|
19
19
|
__commit_id__: str | None
|
|
20
20
|
|
|
21
|
-
__version__ = version = '2.3.
|
|
22
|
-
__version_tuple__ = version_tuple = (2, 3,
|
|
21
|
+
__version__ = version = '2.3.5'
|
|
22
|
+
__version_tuple__ = version_tuple = (2, 3, 5)
|
|
23
23
|
|
|
24
24
|
__commit_id__ = commit_id = None
|
|
@@ -654,6 +654,11 @@ def check_agent(client, agent: str, *, revision: int | None = None, fetched=None
|
|
|
654
654
|
if missing:
|
|
655
655
|
problems.append(f"{label}: required param(s) {', '.join(missing)} unmapped")
|
|
656
656
|
|
|
657
|
+
# A webhook trigger with no token is wired and can never be called:
|
|
658
|
+
# the token is issued in the console (an API token cannot mint one).
|
|
659
|
+
if str(getattr(detail, "kind", "")).upper() == "WEBHOOK" and not getattr(detail, "has_webhook_key", False):
|
|
660
|
+
problems.append(f"{label}: webhook trigger has no token yet — issue it in the Fruxon console")
|
|
661
|
+
|
|
657
662
|
# eventType validity (the #4 --online check, applied here).
|
|
658
663
|
if getattr(t, "kind", "") == "INTEGRATION_EVENT" and getattr(t, "event_type", ""):
|
|
659
664
|
iid = getattr(t, "integration_id", "")
|
|
@@ -518,6 +518,14 @@ _EXAMPLES: dict[str, list[tuple[str, str]]] = {
|
|
|
518
518
|
"fruxon triggers create --file ./daily_digest.json --application 6f1c…",
|
|
519
519
|
"Create a trigger in an Application (omit --application for the default one)",
|
|
520
520
|
),
|
|
521
|
+
(
|
|
522
|
+
"fruxon triggers create --webhook --agent lead-agent --map email=payload.email --name 'Website leads'",
|
|
523
|
+
"A webhook trigger an outside system POSTs to (issue its token in the console — the CLI can't)",
|
|
524
|
+
),
|
|
525
|
+
(
|
|
526
|
+
"fruxon triggers events 6f1c… --source webhook",
|
|
527
|
+
"What reached a trigger and what became of it — fired, filtered, or why it fired nothing",
|
|
528
|
+
),
|
|
521
529
|
("fruxon triggers bind 6f1c… my-agent", "Wire a trigger to fire an agent (autonomy)"),
|
|
522
530
|
("fruxon triggers fire 6f1c… --yes", "Fire it now (runs the bound agents)"),
|
|
523
531
|
(
|
|
@@ -8,7 +8,7 @@ makes a deployed agent autonomously reachable.
|
|
|
8
8
|
|
|
9
9
|
``list`` / ``get`` read; ``create`` / ``update`` author (``--file`` +
|
|
10
10
|
``--schema``); ``bind`` / ``unbind`` wire which agents a trigger fires;
|
|
11
|
-
``fire`` runs it now; ``delete`` removes it. The run-affecting and
|
|
11
|
+
``fire`` runs it now; ``events`` lists what reached it; ``delete`` removes it. The run-affecting and
|
|
12
12
|
destructive verbs (``fire`` / ``delete`` / ``unbind``) confirm first and,
|
|
13
13
|
under agent mode, refuse without ``--yes``. (Versioned revision history
|
|
14
14
|
and event audit remain dashboard-only.)
|
|
@@ -168,6 +168,8 @@ def triggers_get(
|
|
|
168
168
|
_say_kv("config", fetched.integration_config_id)
|
|
169
169
|
if fetched.event_type:
|
|
170
170
|
_say_kv("event", fetched.event_type)
|
|
171
|
+
if _is_webhook(fetched.kind):
|
|
172
|
+
_say_kv("token", _webhook_token_line(fetched))
|
|
171
173
|
if fetched.last_fired_at is not None:
|
|
172
174
|
_say_kv("last fired", str(fetched.last_fired_at))
|
|
173
175
|
|
|
@@ -224,6 +226,9 @@ def triggers_get(
|
|
|
224
226
|
elif fetched.agent_ids:
|
|
225
227
|
_say_kv("agents", ", ".join(fetched.agent_ids))
|
|
226
228
|
|
|
229
|
+
if _is_webhook(fetched.kind) and not fetched.has_webhook_key:
|
|
230
|
+
_say_webhook_next_steps(fetched.id)
|
|
231
|
+
|
|
227
232
|
# What works in the sandbox but would not live: a SIMULATED config, or a
|
|
228
233
|
# contact a real page could not reach. Last, so it is the thing left on screen.
|
|
229
234
|
live_gaps = live_readiness_lines(fetched)
|
|
@@ -261,15 +266,55 @@ def triggers_create(
|
|
|
261
266
|
help="Application (Guid) that will own the trigger. Overrides `networkId` in the body.",
|
|
262
267
|
),
|
|
263
268
|
] = None,
|
|
269
|
+
webhook: Annotated[
|
|
270
|
+
bool,
|
|
271
|
+
typer.Option(
|
|
272
|
+
"--webhook",
|
|
273
|
+
help="Create a WEBHOOK trigger from flags instead of --file: an outside system POSTs events to it.",
|
|
274
|
+
),
|
|
275
|
+
] = False,
|
|
276
|
+
agent: Annotated[
|
|
277
|
+
list[str] | None,
|
|
278
|
+
typer.Option("--agent", help="With --webhook: an agent the trigger fires. Repeatable; at least one."),
|
|
279
|
+
] = None,
|
|
280
|
+
mapping: Annotated[
|
|
281
|
+
list[str] | None,
|
|
282
|
+
typer.Option(
|
|
283
|
+
"--map",
|
|
284
|
+
help=(
|
|
285
|
+
"With --webhook: PARAM=PATH, filling an agent parameter from the POSTed body "
|
|
286
|
+
"(`email=payload.email`). Applied to every --agent. Repeatable."
|
|
287
|
+
),
|
|
288
|
+
),
|
|
289
|
+
] = None,
|
|
290
|
+
name: Annotated[
|
|
291
|
+
str | None,
|
|
292
|
+
typer.Option("--name", help="With --webhook: the trigger's display name (the server defaults it to Webhook)."),
|
|
293
|
+
] = None,
|
|
264
294
|
output: Annotated[str | None, typer.Option("--output", "-o", help="Output format: text (default), json.")] = None,
|
|
265
295
|
):
|
|
266
|
-
"""Create a trigger in an Application, from a JSON definition.
|
|
296
|
+
"""Create a trigger in an Application, from a JSON definition or, for a webhook, from flags.
|
|
267
297
|
|
|
268
298
|
`--file` is a CreateTriggerRequest: `kind` (SCHEDULE / WEBHOOK /
|
|
269
299
|
INTEGRATION_EVENT), the schedule or event fields, and `agentIds` /
|
|
270
300
|
`bindings` to wire which agents it fires. Pass `--schema` to print the
|
|
271
301
|
body's JSON schema instead of making a request.
|
|
272
302
|
|
|
303
|
+
**Webhook triggers.** A WEBHOOK trigger is fired by an outside system (a
|
|
304
|
+
website form, a CRM, Zapier) POSTing a JSON event to it; the run is
|
|
305
|
+
queued and the caller gets `202` at once. It takes no `integrationId`,
|
|
306
|
+
`integrationConfigId`, `eventType` or schedule fields and needs at least
|
|
307
|
+
one binding; a `filter` on `payload.*` is allowed. Mappings read the
|
|
308
|
+
POSTed body under `payload.` (`payload.email`). `--webhook --agent …
|
|
309
|
+
--map …` builds that body for you.
|
|
310
|
+
|
|
311
|
+
**Its token is issued in the console, not here.** Issuing (or rotating)
|
|
312
|
+
the token the outside system calls with mints a credential, and the
|
|
313
|
+
server refuses that to every API token — so the CLI never can, whatever
|
|
314
|
+
its scopes. Until someone issues it on the trigger's page in the Fruxon
|
|
315
|
+
console, nothing outside can call the trigger; `triggers fire --file`
|
|
316
|
+
tests the mappings meanwhile.
|
|
317
|
+
|
|
273
318
|
**Every trigger is owned by exactly one Application**, and the server
|
|
274
319
|
takes it as part of the address rather than a body field. Pass
|
|
275
320
|
`--application <guid>`; a `networkId` left in the body is used when the
|
|
@@ -281,20 +326,42 @@ def triggers_create(
|
|
|
281
326
|
fruxon triggers create --schema > schema.json
|
|
282
327
|
fruxon triggers create --file ./daily_digest.json --application 6f1c…
|
|
283
328
|
fruxon triggers create --file ./daily_digest.json # default Application
|
|
329
|
+
fruxon triggers create --webhook --agent lead-agent --map email=payload.email \
|
|
330
|
+
--map company=payload.company --name "Website leads" --application 6f1c…
|
|
284
331
|
"""
|
|
285
332
|
from fruxon.cli._schema import print_schema
|
|
286
333
|
|
|
287
334
|
if schema:
|
|
288
335
|
print_schema("CreateTriggerRequest", workspace=workspace, base_url=base_url)
|
|
289
336
|
return
|
|
290
|
-
|
|
337
|
+
flags_given = bool(agent or mapping or name)
|
|
338
|
+
if file and (webhook or flags_given):
|
|
339
|
+
fail(
|
|
340
|
+
"[bold]--file[/bold] cannot be combined with --webhook / --agent / --map / --name.",
|
|
341
|
+
hint="Put everything in the JSON body, or build a webhook trigger from flags alone.",
|
|
342
|
+
code=EXIT_VALIDATION,
|
|
343
|
+
)
|
|
344
|
+
if flags_given and not webhook:
|
|
345
|
+
fail(
|
|
346
|
+
"[bold]--agent[/bold] / [bold]--map[/bold] / [bold]--name[/bold] build a webhook trigger; "
|
|
347
|
+
"pass [bold]--webhook[/bold] too.",
|
|
348
|
+
hint="Other kinds are created from [bold]--file[/bold].",
|
|
349
|
+
code=EXIT_VALIDATION,
|
|
350
|
+
)
|
|
351
|
+
if not file and not webhook:
|
|
291
352
|
fail(
|
|
292
353
|
"Missing required option [bold]--file[/bold].",
|
|
293
|
-
hint="Pass a JSON file,
|
|
354
|
+
hint="Pass a JSON file, [bold]--webhook --agent <id>[/bold] for a webhook trigger, "
|
|
355
|
+
"or [bold]--schema[/bold] to see the shape.",
|
|
294
356
|
code=EXIT_VALIDATION,
|
|
295
357
|
)
|
|
296
358
|
output = _resolve_text_json(output)
|
|
297
|
-
|
|
359
|
+
if webhook:
|
|
360
|
+
body: object = _webhook_body(agent or [], mapping or [], name)
|
|
361
|
+
else:
|
|
362
|
+
body = load_json_body(file, what="a CreateTriggerRequest object (kind, schedule/event fields, agentIds)")
|
|
363
|
+
if isinstance(body, dict):
|
|
364
|
+
_preflight_webhook(body)
|
|
298
365
|
client = build_client(workspace, base_url)
|
|
299
366
|
|
|
300
367
|
# The owner is the route, so it has to be resolved before the call rather
|
|
@@ -325,6 +392,120 @@ def triggers_create(
|
|
|
325
392
|
except FruxonError as e:
|
|
326
393
|
fail_from_api_error(e, hint=_hint_for_create_error(e))
|
|
327
394
|
_render_write(result, output, verb="Created")
|
|
395
|
+
if output == "text" and _is_webhook(result.kind):
|
|
396
|
+
_say_webhook_next_steps(result.id)
|
|
397
|
+
|
|
398
|
+
|
|
399
|
+
# Fields a webhook trigger refuses, with the server's own reason. Checked here so
|
|
400
|
+
# a body written against the schedule or event shape fails before the round trip,
|
|
401
|
+
# naming the field rather than a 400 about the kind.
|
|
402
|
+
_WEBHOOK_EVENT_FIELDS = ("integrationId", "integrationConfigId", "eventType")
|
|
403
|
+
_WEBHOOK_SCHEDULE_FIELDS = (
|
|
404
|
+
"scheduleFrequency",
|
|
405
|
+
"scheduleDay",
|
|
406
|
+
"scheduleDays",
|
|
407
|
+
"scheduleDayOfMonth",
|
|
408
|
+
"scheduleHour",
|
|
409
|
+
"scheduleMinute",
|
|
410
|
+
"scheduleTimes",
|
|
411
|
+
"intervalValue",
|
|
412
|
+
"intervalUnit",
|
|
413
|
+
)
|
|
414
|
+
|
|
415
|
+
|
|
416
|
+
def _is_webhook(kind: object) -> bool:
|
|
417
|
+
return isinstance(kind, str) and kind.strip().upper() == "WEBHOOK"
|
|
418
|
+
|
|
419
|
+
|
|
420
|
+
def _preflight_webhook(body: dict) -> None:
|
|
421
|
+
"""Refuse a WEBHOOK create body the server would refuse, naming the field.
|
|
422
|
+
|
|
423
|
+
Mirrors fruxon-backend ``TriggerService.ValidateWebhookCreate`` and the
|
|
424
|
+
create validator: no event source, no schedule, no work shape, and at
|
|
425
|
+
least one agent. Other kinds pass through untouched.
|
|
426
|
+
"""
|
|
427
|
+
if not _is_webhook(body.get("kind")):
|
|
428
|
+
return
|
|
429
|
+
|
|
430
|
+
def _set(key: str) -> bool:
|
|
431
|
+
value = body.get(key)
|
|
432
|
+
return value not in (None, "", [], {})
|
|
433
|
+
|
|
434
|
+
event = [k for k in _WEBHOOK_EVENT_FIELDS if _set(k)]
|
|
435
|
+
if event:
|
|
436
|
+
fail(
|
|
437
|
+
f"A webhook trigger takes no {', '.join(event)}: it is fired by a POST to its own URL.",
|
|
438
|
+
hint="Drop those fields, or use kind INTEGRATION_EVENT for an integration's events.",
|
|
439
|
+
code=EXIT_VALIDATION,
|
|
440
|
+
)
|
|
441
|
+
schedule = [k for k in _WEBHOOK_SCHEDULE_FIELDS if _set(k)]
|
|
442
|
+
if schedule:
|
|
443
|
+
fail(
|
|
444
|
+
f"A webhook trigger takes no schedule ({', '.join(schedule)}): it fires when it is called.",
|
|
445
|
+
hint="Drop those fields, or use kind SCHEDULE.",
|
|
446
|
+
code=EXIT_VALIDATION,
|
|
447
|
+
)
|
|
448
|
+
if _set("workShape"):
|
|
449
|
+
fail(
|
|
450
|
+
"A webhook trigger cannot carry a work shape.",
|
|
451
|
+
hint="Bind the agents it should fire instead ([bold]bindings[/bold]).",
|
|
452
|
+
code=EXIT_VALIDATION,
|
|
453
|
+
)
|
|
454
|
+
if not _set("bindings") and not _set("agentIds"):
|
|
455
|
+
fail(
|
|
456
|
+
"A webhook trigger needs at least one agent to fire.",
|
|
457
|
+
hint="Add [bold]bindings[/bold] (or [bold]agentIds[/bold]) — with none, every call "
|
|
458
|
+
"would be accepted and fire nothing.",
|
|
459
|
+
code=EXIT_VALIDATION,
|
|
460
|
+
)
|
|
461
|
+
|
|
462
|
+
|
|
463
|
+
def _webhook_body(agents: list[str], mappings: list[str], name: str | None) -> dict:
|
|
464
|
+
"""The CreateTriggerRequest ``--webhook`` stands for.
|
|
465
|
+
|
|
466
|
+
Each ``--map PARAM=PATH`` becomes a ``PAYLOAD_PATH`` mapping, or a
|
|
467
|
+
``TEMPLATE`` one when the value carries ``{{…}}``, on every agent. A
|
|
468
|
+
literal constant is not offered as a flag: it would read the same as a
|
|
469
|
+
path someone mistyped, so it stays a ``--file`` body's job.
|
|
470
|
+
"""
|
|
471
|
+
agent_ids = [a.strip() for a in agents if a.strip()]
|
|
472
|
+
if not agent_ids:
|
|
473
|
+
fail(
|
|
474
|
+
"[bold]--webhook[/bold] needs at least one [bold]--agent[/bold].",
|
|
475
|
+
hint="With none, every call would be accepted and fire nothing.",
|
|
476
|
+
code=EXIT_VALIDATION,
|
|
477
|
+
)
|
|
478
|
+
parsed: list[dict[str, str]] = []
|
|
479
|
+
for raw in mappings:
|
|
480
|
+
param, sep, value = raw.partition("=")
|
|
481
|
+
param, value = param.strip(), value.strip()
|
|
482
|
+
if not sep or not param or not value:
|
|
483
|
+
fail(
|
|
484
|
+
f"Bad [bold]--map[/bold] {_esc(raw)!r}: expected PARAM=PATH.",
|
|
485
|
+
hint="For example [bold]--map email=payload.email[/bold].",
|
|
486
|
+
code=EXIT_VALIDATION,
|
|
487
|
+
)
|
|
488
|
+
parsed.append({"parameterName": param, "kind": "TEMPLATE" if "{{" in value else "PAYLOAD_PATH", "value": value})
|
|
489
|
+
body: dict[str, object] = {
|
|
490
|
+
"kind": "WEBHOOK",
|
|
491
|
+
"bindings": [{"agentId": a, "parameterMappings": [dict(m) for m in parsed]} for a in agent_ids],
|
|
492
|
+
}
|
|
493
|
+
if name and name.strip():
|
|
494
|
+
body["displayName"] = name.strip()
|
|
495
|
+
return body
|
|
496
|
+
|
|
497
|
+
|
|
498
|
+
def _say_webhook_next_steps(trigger_id: str) -> None:
|
|
499
|
+
"""What a new webhook trigger still needs, which the CLI cannot give it."""
|
|
500
|
+
stderr.print()
|
|
501
|
+
say_warn("Nothing outside can call this trigger yet: it has no token.")
|
|
502
|
+
say_info(
|
|
503
|
+
"Issue it on the trigger's page in the Fruxon console — it is shown once, with the URL to POST to.",
|
|
504
|
+
hint=(
|
|
505
|
+
"The CLI can't: issuing a token mints a credential, which the server refuses to every API token. "
|
|
506
|
+
f"Test the mappings meanwhile: [bold]fruxon triggers fire {trigger_id} --file sample.json --yes[/bold]."
|
|
507
|
+
),
|
|
508
|
+
)
|
|
328
509
|
|
|
329
510
|
|
|
330
511
|
@triggers_app.command("update")
|
|
@@ -632,7 +813,14 @@ def triggers_fire(
|
|
|
632
813
|
|
|
633
814
|
Real consequences (cost + side effects), so it confirms first and under
|
|
634
815
|
agent mode refuses without [bold]--yes[/bold]. Pass `--file` to supply a
|
|
635
|
-
sample inbound payload for a WEBHOOK / INTEGRATION_EVENT trigger
|
|
816
|
+
sample inbound payload for a WEBHOOK / INTEGRATION_EVENT trigger; it is
|
|
817
|
+
nested under `payload.`, so `{"email": "dana@acme.com"}` fills a mapping
|
|
818
|
+
that reads `payload.email`. A schedule trigger refuses one.
|
|
819
|
+
|
|
820
|
+
For a WEBHOOK trigger this is the operator's test of the mappings, not a
|
|
821
|
+
delivery: it needs no token, and skips the inbound call's idempotency and
|
|
822
|
+
content filter. It shows up in `triggers events` as source MANUAL; real
|
|
823
|
+
calls show as WEBHOOK.
|
|
636
824
|
|
|
637
825
|
An automation (a schedule trigger carrying a work shape) runs one sweep
|
|
638
826
|
instead, and the three bounds size [bold]that pass only[/bold] — the
|
|
@@ -645,6 +833,7 @@ def triggers_fire(
|
|
|
645
833
|
Examples:
|
|
646
834
|
fruxon triggers fire 6f1c… --yes
|
|
647
835
|
fruxon triggers fire 6f1c… --file ./sample_event.json --yes
|
|
836
|
+
echo '{"email": "dana@acme.com"}' | fruxon triggers fire 6f1c… --file - --yes
|
|
648
837
|
fruxon triggers fire 6f1c… --max-admit 5 --yes
|
|
649
838
|
fruxon triggers fire 6f1c… --max-admit 0 --stage merge --max-dispatch 20 --yes
|
|
650
839
|
fruxon triggers fire 6f1c… --max-admit 0 --stage merge --close-gathering --yes
|
|
@@ -808,6 +997,145 @@ def triggers_unbind(
|
|
|
808
997
|
say_ok(f"Unbound trigger [bold]{trigger}[/bold] from [bold]{agent}[/bold].")
|
|
809
998
|
|
|
810
999
|
|
|
1000
|
+
_EVENT_SOURCES = ("SCHEDULE", "MANUAL", "INTEGRATION_EVENT", "WEBHOOK")
|
|
1001
|
+
|
|
1002
|
+
|
|
1003
|
+
@triggers_app.command("events")
|
|
1004
|
+
def triggers_events(
|
|
1005
|
+
trigger: Annotated[str, typer.Argument(help="Trigger identifier (Guid) whose events to list.")],
|
|
1006
|
+
limit: Annotated[
|
|
1007
|
+
int | None, typer.Option("--limit", "-n", help="Rows to fetch, newest first (server default 50, max 200).")
|
|
1008
|
+
] = None,
|
|
1009
|
+
before: Annotated[
|
|
1010
|
+
int | None,
|
|
1011
|
+
typer.Option("--before", help="Page cursor: the `createdAt` (Unix ms) of the last row of the previous page."),
|
|
1012
|
+
] = None,
|
|
1013
|
+
source: Annotated[
|
|
1014
|
+
str | None,
|
|
1015
|
+
typer.Option(
|
|
1016
|
+
"--source",
|
|
1017
|
+
help="Keep only rows from this source: schedule, manual, integration_event, webhook.",
|
|
1018
|
+
),
|
|
1019
|
+
] = None,
|
|
1020
|
+
workspace: Annotated[str | None, typer.Option("--workspace", help="Workspace identifier override.")] = None,
|
|
1021
|
+
base_url: Annotated[str | None, typer.Option("--base-url", help="API base URL override.")] = None,
|
|
1022
|
+
output: Annotated[str | None, typer.Option("--output", "-o", help="Output format: text (default), json.")] = None,
|
|
1023
|
+
):
|
|
1024
|
+
"""Every time something tried to fire the trigger, and what became of it.
|
|
1025
|
+
|
|
1026
|
+
One row per attempt, newest first: where it came from (`source`:
|
|
1027
|
+
SCHEDULE, MANUAL for `triggers fire`, INTEGRATION_EVENT, or WEBHOOK for an
|
|
1028
|
+
outside system's POST) and what happened (`outcome`: FIRED, FILTERED by
|
|
1029
|
+
the content filter, FILTER_ERROR, FAILED, …). It is how "the agent never
|
|
1030
|
+
ran" is split into "nothing arrived" and "it arrived and was dropped".
|
|
1031
|
+
|
|
1032
|
+
A WEBHOOK row's `deliveryId` is the one the caller got back in its `202`.
|
|
1033
|
+
A call whose body could not fill a binding's mappings is a FAILED row with
|
|
1034
|
+
the reason in `errorMessage`, and fired nothing.
|
|
1035
|
+
|
|
1036
|
+
`--source` filters the page fetched, so `-n 50 --source webhook` can show
|
|
1037
|
+
fewer than 50. Page further with `--before <createdAt of the last row>`.
|
|
1038
|
+
|
|
1039
|
+
Examples:
|
|
1040
|
+
fruxon triggers events 6f1c…
|
|
1041
|
+
fruxon triggers events 6f1c… --source webhook -n 200
|
|
1042
|
+
fruxon triggers events 6f1c… -o json | jq '.[] | select(.outcome != "FIRED")'
|
|
1043
|
+
"""
|
|
1044
|
+
output = _resolve_text_json(output)
|
|
1045
|
+
if limit is not None and not 1 <= limit <= 200:
|
|
1046
|
+
fail("--limit must be 1-200.", code=EXIT_VALIDATION)
|
|
1047
|
+
wanted = source.strip().upper().replace("-", "_") if source else None
|
|
1048
|
+
if wanted is not None and wanted not in _EVENT_SOURCES:
|
|
1049
|
+
fail(
|
|
1050
|
+
f"Unknown source: [bold]{_esc(source or '')}[/bold].",
|
|
1051
|
+
hint="Valid sources: schedule, manual, integration_event, webhook.",
|
|
1052
|
+
code=EXIT_VALIDATION,
|
|
1053
|
+
)
|
|
1054
|
+
|
|
1055
|
+
client = build_client(workspace, base_url)
|
|
1056
|
+
try:
|
|
1057
|
+
events = client.list_trigger_events(trigger, limit=limit, before=before)
|
|
1058
|
+
except FruxonError as e:
|
|
1059
|
+
fail_from_api_error(e, hint=_hint_for_error(e))
|
|
1060
|
+
if wanted is not None:
|
|
1061
|
+
events = [e for e in events if e.source.upper() == wanted]
|
|
1062
|
+
|
|
1063
|
+
if output == "json":
|
|
1064
|
+
print(json.dumps([_event_to_dict(e) for e in events], indent=2))
|
|
1065
|
+
return
|
|
1066
|
+
|
|
1067
|
+
if stderr.is_terminal:
|
|
1068
|
+
print_banner(subtitle=f"trigger · {trigger} · events")
|
|
1069
|
+
stderr.print()
|
|
1070
|
+
if not events:
|
|
1071
|
+
say_info(
|
|
1072
|
+
"Nothing has reached this trigger" + (f" from {wanted}" if wanted else "") + ".",
|
|
1073
|
+
hint="For a webhook trigger, check the caller holds the trigger's token — "
|
|
1074
|
+
"a wrong or missing one is a 404 to the caller and leaves no row here.",
|
|
1075
|
+
)
|
|
1076
|
+
return
|
|
1077
|
+
stderr.print(_events_table(events))
|
|
1078
|
+
|
|
1079
|
+
|
|
1080
|
+
def _event_to_dict(e) -> dict:
|
|
1081
|
+
"""One fire attempt as ``TriggerFireAttemptResponse`` names it."""
|
|
1082
|
+
return {
|
|
1083
|
+
"id": e.id,
|
|
1084
|
+
"triggerId": e.trigger_id,
|
|
1085
|
+
"createdAt": e.created_at,
|
|
1086
|
+
"source": e.source,
|
|
1087
|
+
"outcome": e.outcome,
|
|
1088
|
+
"deliveryId": e.delivery_id or None,
|
|
1089
|
+
"provider": e.provider or None,
|
|
1090
|
+
"integrationConfigId": e.integration_config_id or None,
|
|
1091
|
+
"eventType": e.event_type or None,
|
|
1092
|
+
"firedBindingCount": e.fired_binding_count,
|
|
1093
|
+
"skippedDoubleFireBindingCount": e.skipped_double_fire_binding_count,
|
|
1094
|
+
"firedAgentIds": e.fired_agent_ids,
|
|
1095
|
+
"filteredByConditionIndex": e.filtered_by_condition_index,
|
|
1096
|
+
"filteredByConditionPath": e.filtered_by_condition_path or None,
|
|
1097
|
+
"filteredByConditionActualValue": e.filtered_by_condition_actual_value or None,
|
|
1098
|
+
"errorMessage": e.error_message or None,
|
|
1099
|
+
"payloadSnippet": e.payload_snippet or None,
|
|
1100
|
+
"createdBy": e.created_by or None,
|
|
1101
|
+
"actor": e.actor or None,
|
|
1102
|
+
}
|
|
1103
|
+
|
|
1104
|
+
|
|
1105
|
+
def _event_detail(e) -> str:
|
|
1106
|
+
"""The one thing worth reading about a row, after its outcome."""
|
|
1107
|
+
if e.error_message:
|
|
1108
|
+
return f"[red]{_esc(e.error_message)}[/red]"
|
|
1109
|
+
if e.filtered_by_condition_path:
|
|
1110
|
+
actual = e.filtered_by_condition_actual_value
|
|
1111
|
+
return f"filter: {_esc(e.filtered_by_condition_path)}" + (f" = {_esc(actual)}" if actual else "")
|
|
1112
|
+
if e.fired_agent_ids:
|
|
1113
|
+
return _esc(", ".join(e.fired_agent_ids))
|
|
1114
|
+
return _esc(e.delivery_id) if e.delivery_id else ""
|
|
1115
|
+
|
|
1116
|
+
|
|
1117
|
+
def _events_table(events):
|
|
1118
|
+
from rich.table import Table
|
|
1119
|
+
|
|
1120
|
+
table = Table(show_header=True, header_style="bold", show_edge=False, pad_edge=False, box=None, padding=(0, 1))
|
|
1121
|
+
table.add_column("When", no_wrap=True, style="dim")
|
|
1122
|
+
table.add_column("Source", no_wrap=True)
|
|
1123
|
+
table.add_column("Outcome", no_wrap=True)
|
|
1124
|
+
table.add_column("Fired", no_wrap=True, justify="right")
|
|
1125
|
+
table.add_column("Detail", overflow="fold")
|
|
1126
|
+
for e in events:
|
|
1127
|
+
outcome = e.outcome or "—"
|
|
1128
|
+
style = "green" if outcome == "FIRED" else "red" if outcome in {"FAILED", "FILTER_ERROR"} else "yellow"
|
|
1129
|
+
table.add_row(
|
|
1130
|
+
format_ts(e.created_at) if e.created_at else "",
|
|
1131
|
+
_esc(e.source or "—"),
|
|
1132
|
+
f"[{style}]{_esc(outcome)}[/{style}]",
|
|
1133
|
+
str(e.fired_binding_count),
|
|
1134
|
+
_event_detail(e),
|
|
1135
|
+
)
|
|
1136
|
+
return table
|
|
1137
|
+
|
|
1138
|
+
|
|
811
1139
|
# ─────────────────────────────────────────────────────────────────────────────
|
|
812
1140
|
# helpers
|
|
813
1141
|
# ─────────────────────────────────────────────────────────────────────────────
|
|
@@ -886,6 +1214,7 @@ def _to_dict(t: Trigger) -> dict:
|
|
|
886
1214
|
"eventType": t.event_type,
|
|
887
1215
|
"lastFiredAt": t.last_fired_at,
|
|
888
1216
|
"agentIds": t.agent_ids,
|
|
1217
|
+
**_webhook_fields(t),
|
|
889
1218
|
}
|
|
890
1219
|
# Only on a save. Omitted rather than sent as `[]` on a read, so a script
|
|
891
1220
|
# cannot read "no warnings" out of a call that never computed any.
|
|
@@ -1093,9 +1422,26 @@ def _detail_to_dict(t: TriggerDetail) -> dict:
|
|
|
1093
1422
|
# Verbatim server rows: what would work in the sandbox but not live.
|
|
1094
1423
|
"sandboxOnlyConfigs": t.sandbox_only_configs,
|
|
1095
1424
|
"unreachableContacts": t.unreachable_contacts,
|
|
1425
|
+
**_webhook_fields(t),
|
|
1096
1426
|
}
|
|
1097
1427
|
|
|
1098
1428
|
|
|
1429
|
+
def _webhook_fields(t: Trigger | TriggerDetail) -> dict:
|
|
1430
|
+
"""``hasWebhookKey`` / ``webhookTokenPrefix``, on every kind.
|
|
1431
|
+
|
|
1432
|
+
Always present so a script can test ``.hasWebhookKey`` without first
|
|
1433
|
+
checking the kind; ``false`` / ``null`` on anything but a WEBHOOK trigger.
|
|
1434
|
+
"""
|
|
1435
|
+
return {"hasWebhookKey": t.has_webhook_key, "webhookTokenPrefix": t.webhook_token_prefix or None}
|
|
1436
|
+
|
|
1437
|
+
|
|
1438
|
+
def _webhook_token_line(t: Trigger | TriggerDetail) -> str:
|
|
1439
|
+
"""The token's state for the human views: its prefix when live, else what is missing."""
|
|
1440
|
+
if t.has_webhook_key:
|
|
1441
|
+
return f"{_esc(t.webhook_token_prefix)}… [dim](live)[/dim]" if t.webhook_token_prefix else "live"
|
|
1442
|
+
return "[yellow]none yet[/yellow] [dim]— issue it in the console[/dim]"
|
|
1443
|
+
|
|
1444
|
+
|
|
1099
1445
|
def _destination_summary(client, b: TriggerBinding) -> str:
|
|
1100
1446
|
"""Where a binding's runs reply to, named when the participant resolves.
|
|
1101
1447
|
|
|
@@ -1156,7 +1502,8 @@ def _build_table(triggers: list[Trigger]):
|
|
|
1156
1502
|
for t in triggers:
|
|
1157
1503
|
table.add_row(
|
|
1158
1504
|
t.id,
|
|
1159
|
-
t.kind or "[dim]—[/dim]"
|
|
1505
|
+
(t.kind or "[dim]—[/dim]")
|
|
1506
|
+
+ (" [yellow](no token)[/yellow]" if _is_webhook(t.kind) and not t.has_webhook_key else ""),
|
|
1160
1507
|
t.display_name or "",
|
|
1161
1508
|
"[green]yes[/green]" if t.active else "[dim]no[/dim]",
|
|
1162
1509
|
", ".join(t.agent_ids) if t.agent_ids else "",
|