fruxon 2.2.9__tar.gz → 2.2.10__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.2.9 → fruxon-2.2.10}/HISTORY.md +27 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/PKG-INFO +3 -2
- {fruxon-2.2.9 → fruxon-2.2.10}/README.md +2 -1
- {fruxon-2.2.9 → fruxon-2.2.10}/src/fruxon/_version.py +2 -2
- {fruxon-2.2.9 → fruxon-2.2.10}/src/fruxon/cli/__init__.py +1 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/src/fruxon/cli/assets.py +110 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/src/fruxon/cli/escalation_desks.py +14 -2
- fruxon-2.2.10/src/fruxon/cli/escalation_operators.py +277 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/src/fruxon/cli/escalations.py +30 -1
- {fruxon-2.2.9 → fruxon-2.2.10}/src/fruxon/cli/examples.py +4 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/src/fruxon/fruxon.py +98 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/src/fruxon/skills/fruxon-build-agent/SKILL.md +5 -2
- {fruxon-2.2.9 → fruxon-2.2.10}/src/fruxon/skills/fruxon-meet/SKILL.md +2 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/tests/test_assets.py +109 -0
- fruxon-2.2.10/tests/test_escalation_operators.py +274 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/.gitignore +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/LICENSE +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/pyproject.toml +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/src/fruxon/__init__.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/src/fruxon/__main__.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/src/fruxon/_request_id.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/src/fruxon/_ssl.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/src/fruxon/checks/__init__.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/src/fruxon/checks/agent.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/src/fruxon/checks/ledger.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/src/fruxon/checks/references.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/src/fruxon/cli/_crash.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/src/fruxon/cli/_last_failure.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/src/fruxon/cli/_ledger_passes.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/src/fruxon/cli/_plugin_hint.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/src/fruxon/cli/_schema.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/src/fruxon/cli/_shared.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/src/fruxon/cli/_stream.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/src/fruxon/cli/agents.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/src/fruxon/cli/agents_approvals.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/src/fruxon/cli/agents_budget.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/src/fruxon/cli/agents_channels.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/src/fruxon/cli/agents_draft.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/src/fruxon/cli/agents_evaluations.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/src/fruxon/cli/agents_executions.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/src/fruxon/cli/agents_improvements.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/src/fruxon/cli/agents_lifecycle.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/src/fruxon/cli/agents_memory.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/src/fruxon/cli/agents_reply_style.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/src/fruxon/cli/agents_revisions.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/src/fruxon/cli/agents_sandbox.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/src/fruxon/cli/agents_sandbox_test.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/src/fruxon/cli/agents_slots.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/src/fruxon/cli/agents_system_blocks.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/src/fruxon/cli/agents_tests.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/src/fruxon/cli/agents_topics.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/src/fruxon/cli/agents_voice_calls.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/src/fruxon/cli/applications.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/src/fruxon/cli/applications_entry_points.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/src/fruxon/cli/auth.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/src/fruxon/cli/capabilities.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/src/fruxon/cli/completion.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/src/fruxon/cli/config.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/src/fruxon/cli/consult_pins.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/src/fruxon/cli/conversation_imports.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/src/fruxon/cli/dash.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/src/fruxon/cli/describe.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/src/fruxon/cli/doctor.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/src/fruxon/cli/environments.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/src/fruxon/cli/feedback.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/src/fruxon/cli/guides.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/src/fruxon/cli/integrations.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/src/fruxon/cli/integrations_sandbox.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/src/fruxon/cli/keys.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/src/fruxon/cli/knowledge_bases.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/src/fruxon/cli/knowledge_documents.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/src/fruxon/cli/knowledge_notices.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/src/fruxon/cli/knowledge_sources.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/src/fruxon/cli/llm_providers.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/src/fruxon/cli/messages.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/src/fruxon/cli/metrics.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/src/fruxon/cli/participants.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/src/fruxon/cli/pipelines.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/src/fruxon/cli/secrets.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/src/fruxon/cli/skills.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/src/fruxon/cli/storage.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/src/fruxon/cli/tools.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/src/fruxon/cli/triggers.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/src/fruxon/cli/triggers_budget.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/src/fruxon/cli/triggers_check.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/src/fruxon/cli/triggers_ledger.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/src/fruxon/cli/triggers_ledger_stage_tests.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/src/fruxon/cli/triggers_questions.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/src/fruxon/cli/triggers_shape.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/src/fruxon/cli/working_hours.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/src/fruxon/cli/workspaces.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/src/fruxon/credentials.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/src/fruxon/device_auth.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/src/fruxon/doctor.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/src/fruxon/exceptions.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/src/fruxon/flow_validation.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/src/fruxon/models.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/src/fruxon/output.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/src/fruxon/params.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/src/fruxon/sandbox_scenario.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/src/fruxon/skills/__init__.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/src/fruxon/skills/fruxon-agent-mode/SKILL.md +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/src/fruxon/skills/fruxon-create-integration/SKILL.md +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/src/fruxon/skills/fruxon-debug-trace/SKILL.md +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/src/fruxon/skills/fruxon-use-integrations/SKILL.md +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/src/fruxon/telemetry.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/src/fruxon/tui/__init__.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/src/fruxon/tui/app.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/src/fruxon/tui/demo.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/src/fruxon/tui/links.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/src/fruxon/tui/screens/__init__.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/src/fruxon/tui/screens/agent.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/src/fruxon/tui/screens/base.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/src/fruxon/tui/screens/home.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/src/fruxon/tui/screens/ledger.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/src/fruxon/tui/screens/loader.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/src/fruxon/tui/screens/pickers.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/src/fruxon/tui/screens/trace.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/src/fruxon/tui/source.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/src/fruxon/tui/theme.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/src/fruxon/tui/views.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/src/fruxon/tui/widgets.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/src/fruxon/ui.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/src/fruxon/update_check.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/src/fruxon/validation.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/tests/.test_durations.json +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/tests/__init__.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/tests/conftest.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/tests/test_actor.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/tests/test_agent_lifecycle.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/tests/test_agent_revisions_list.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/tests/test_agent_slots.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/tests/test_agents_check_cli.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/tests/test_agents_revisions_cli.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/tests/test_agents_sandbox.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/tests/test_applications.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/tests/test_approvals.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/tests/test_budgets.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/tests/test_capabilities.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/tests/test_channels.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/tests/test_checks_agent.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/tests/test_checks_ledger.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/tests/test_cli.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/tests/test_cli_base_url_routing.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/tests/test_cli_crash.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/tests/test_cli_feedback.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/tests/test_cli_friction_round2.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/tests/test_cli_root_flags.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/tests/test_client.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/tests/test_connect_nudge.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/tests/test_consult.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/tests/test_conversation_imports.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/tests/test_credentials.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/tests/test_dash_app.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/tests/test_dash_cli.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/tests/test_dash_client.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/tests/test_dash_links.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/tests/test_dash_source.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/tests/test_describe.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/tests/test_device_auth.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/tests/test_docs_commands_exist.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/tests/test_doctor.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/tests/test_draft_bootstrap.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/tests/test_draft_evaluate_cli.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/tests/test_draft_pull_shape.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/tests/test_draft_run_replay.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/tests/test_draft_validate_cli.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/tests/test_drafts.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/tests/test_entry_points.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/tests/test_environments.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/tests/test_escalations.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/tests/test_evaluations.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/tests/test_execution_records.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/tests/test_flow_validation.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/tests/test_fruxon.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/tests/test_guides.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/tests/test_improvements.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/tests/test_integration_configs_write_cli.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/tests/test_integration_sandbox_cli.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/tests/test_integration_triggers_cli.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/tests/test_integrations_authorize_cli.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/tests/test_integrations_connect_cli.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/tests/test_kb_trial_cli.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/tests/test_knowledge_bases.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/tests/test_knowledge_documents.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/tests/test_knowledge_notices.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/tests/test_knowledge_sources.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/tests/test_llm_provider_configs_cli.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/tests/test_llm_providers_connect_cli.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/tests/test_llm_providers_list_cli.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/tests/test_managed_by.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/tests/test_memory.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/tests/test_messages.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/tests/test_metrics.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/tests/test_online_llm_config_refs.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/tests/test_online_prefetch_refs.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/tests/test_online_secret_refs.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/tests/test_output.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/tests/test_params.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/tests/test_participants.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/tests/test_participants_write.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/tests/test_pipelines.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/tests/test_plugin_hint.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/tests/test_project_urls.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/tests/test_reply_style.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/tests/test_request_id.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/tests/test_sandbox_scenario.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/tests/test_schema.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/tests/test_schema_fetch.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/tests/test_secrets.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/tests/test_skills.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/tests/test_ssl.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/tests/test_storage.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/tests/test_system_blocks.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/tests/test_system_blocks_cli.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/tests/test_telemetry.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/tests/test_test_chats.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/tests/test_topics.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/tests/test_trigger_budgets.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/tests/test_triggers.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/tests/test_triggers_check_cli.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/tests/test_triggers_ledger.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/tests/test_triggers_ledger_batch_views.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/tests/test_triggers_ledger_stage_tests.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/tests/test_triggers_questions.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/tests/test_triggers_shape.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/tests/test_triggers_write.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/tests/test_tui_boundary.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/tests/test_ui.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/tests/test_update_check.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/tests/test_validation.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/tests/test_voice_calls.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/tests/test_working_hours_cli.py +0 -0
- {fruxon-2.2.9 → fruxon-2.2.10}/tests/test_workspaces_cli.py +0 -0
|
@@ -1,5 +1,32 @@
|
|
|
1
1
|
# History
|
|
2
2
|
|
|
3
|
+
## Unreleased — Application operators from the CLI
|
|
4
|
+
|
|
5
|
+
- **`fruxon escalations operators list|candidates|add|remove`**: make a participant an operator of an
|
|
6
|
+
Application, so an escalation desk can name them. `desks create --operator` and `set-policy
|
|
7
|
+
--operator` only accept active operators, and adding one used to need the dashboard (Application →
|
|
8
|
+
People). `candidates [--search …] [--limit …]` shows the server's verdict per person: `ELIGIBLE`,
|
|
9
|
+
`PROMOTABLE` (not yet classified — `add` marks them internal) or `INELIGIBLE` with a reason. `add`
|
|
10
|
+
is idempotent and re-activates a disabled operator; a customer is a 400 (EXIT 12) whose hint names
|
|
11
|
+
`candidates`. `remove` confirms and needs `--yes` in agent mode (EXIT 16). `--agent` / `--application`
|
|
12
|
+
resolve the Application as `desks` does. **`FruxonClient.list_application_operators`**,
|
|
13
|
+
**`get_application_operator`**, **`list_application_operator_candidates`**,
|
|
14
|
+
**`add_application_operator`**, **`remove_application_operator`**.
|
|
15
|
+
- **`desks create` / `set-policy`** refused with "Operators […] are not active operators of network …"
|
|
16
|
+
now hint the exact `fruxon escalations operators add <ids> --application <id>` command.
|
|
17
|
+
|
|
18
|
+
## Unreleased — replace an uploaded file asset's contents
|
|
19
|
+
|
|
20
|
+
- **`fruxon assets replace-file <asset> --file <path>`** gives an uploaded-file asset new contents
|
|
21
|
+
under the same id, so agents, step scopes and prompts that use it read the new file. `--wait`
|
|
22
|
+
blocks on the re-index (`--timeout`, default 300 s); search answers from the previous file until it
|
|
23
|
+
finishes and keeps it if the new file can't be indexed. Confirms, and refuses without `--yes` in
|
|
24
|
+
agent mode (EXIT 16): the previous file is no longer offered for download. `-o json` returns the
|
|
25
|
+
server's `{asset, longOperation}` plus `reindexing` and `waited`; `-o id` prints the asset id. A 409
|
|
26
|
+
(indexing running) names `fruxon assets wait`; a 400 names `fruxon assets supported-types`.
|
|
27
|
+
**`FruxonClient.replace_asset_file(asset, path)`** (`POST /assets/{asset}:replaceFile`). Needs the
|
|
28
|
+
backend's endpoint (fruxon-backend #1846).
|
|
29
|
+
|
|
3
30
|
## Unreleased — escalation desks, reply-style schema, deploy output
|
|
4
31
|
|
|
5
32
|
- **`fruxon escalations desks list|create|attach|detach`**: an Application with no escalation desk
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: fruxon
|
|
3
|
-
Version: 2.2.
|
|
3
|
+
Version: 2.2.10
|
|
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
|
|
@@ -103,6 +103,7 @@ Execution:
|
|
|
103
103
|
| `fruxon agents topics list/search/get/messages/sessions <agent>` + `fruxon agents inbox <agent>` | Read the conversation spine — the agent's topics (threads), one topic's transcript, its episodes, and its inbox (what it's focused on). `list`/`search` filter server-side by `--state`/`--participant`/`--query`. Read-only. Each message carries `author` — a human colleague's turn is stored as `ASSISTANT` on purpose, so `role` alone cannot tell their reply from the agent's; `HUMAN_OPERATOR` can. A message the runtime *withheld* is in no transcript at all — see `fruxon messages list`. `sessions` explains a fresh, blind session: a topic outlives its sessions, and `endCause` on the previous one (`CONSOLE_ALREADY_RESOLVED` — a human closed it in the provider's console) is why the next started with no history. |
|
|
104
104
|
| `fruxon escalations list/history/unhandled/policy/ack` | What happened when an agent handed a conversation to a person. `list` is the queue (live takeovers + degraded escalations nobody was reachable for); `unhandled` is the append-only ledger under it. **`history` is the record of closed console-routed takeovers** — those leave the queue, so `list --status ALL` answers `[]` about a conversation a human worked for half an hour. Read `humanObservedAt` before believing a `RESOLVED`: null means nobody was ever seen picking it up. `policy <agent>` resolves who the *next* escalation would reach — an empty ladder under `NATIVE_HANDOFF` is correct, the console supplies the human — and names the desk it went through. `set-policy <agent>` changes that desk: `--operator` (repeatable, one tier; `--strategy`), `--working-hours <schedule|none>`, `--default-reason`, `--entry-point` for a channel's desk. It reads the desk and PUTs it back with only those changed, for every agent on the desk (`participants:write`). |
|
|
105
105
|
| `fruxon escalations desks list/create/attach/detach` | An Application's escalation desks. `create --name … [--mode BRIDGE\|NATIVE_HANDOFF] [--operator …] [--working-hours …] [--attach other\|<entry-point>]` makes one and attaches it; `attach <desk> other <entry-point>…` / `detach other <entry-point>…` move hand-off between desks. `other` is conversations through no channel (operator desks only). `--agent` picks the agent's Application, `--application` names one. |
|
|
106
|
+
| `fruxon escalations operators list/candidates/add/remove` | An Application's human operators — the only people a desk's `--operator` ladder accepts. `candidates [--search …]` shows who can be added (`ELIGIBLE`, `PROMOTABLE` = marked internal on add, `INELIGIBLE`); `add <participant>…`; `remove <participant>… --yes`. Same `--agent` / `--application` as `desks`. |
|
|
106
107
|
| `fruxon working-hours list/get/create/update/delete` | Working-hours schedules: a time zone, a week (`--hours "sun-thu 08:00-20:00"`, repeatable; a day not named is closed), dated closures (`--closed 2026-12-25`), or `--file` with the full body. A schedule governs the escalation hand-off once a desk uses it (`escalations set-policy --working-hours`); what the agent says about opening hours stays in its prompt. `participants:read` / `participants:write`. |
|
|
107
108
|
| `fruxon messages list` | The channel ledger — including inbound an agent was never shown. A **withheld** message (a human owns the chat in the source console, or admission refused the sender) never becomes a conversation turn, so it is in no transcript and the thread reads as a customer being ignored. `--delivery WITHHELD_PENDING` lists the ones nothing has ever acted on; nothing drains them. |
|
|
108
109
|
| `fruxon agents sandbox open/turn/fire/resolve-input/stream/answer/close <session>` | Drive an agent-network sandbox end-to-end without real channels — send turns as participants, test-fire triggers, and watch the run (`--wait` on `turn` / `fire` follows it to the end; `stream` shows only what happens after it connects; NDJSON in agent mode). Sandbox **captures the reply and hard-blocks every real send**; `--await` makes consult/approval gates suspend so they can be resolved (`answer` for consults, `approvals respond` for approvals). `--draft` runs your unpublished draft instead of the deployed revision (`sandbox draft <session>` says which); `--confirm-writes` holds every create/update/delete tool call for approval, because sandbox does **not** block integration writes; a write that did not run (rejected, expired, or one the run could not pause for) shows on `stream` as `refused`. |
|
|
@@ -157,7 +158,7 @@ Integrations + tools:
|
|
|
157
158
|
| `fruxon llm-providers connect <provider>` / `link-status` | Create a config for an LLM provider and print a **credential link**: a human opens it, signs in to Fruxon, types the API key (or access keys, or service account key), and the page tests it with the provider and publishes the config an agent pins as `provider.tenantConfigId`. The key never passes through the terminal or an agent driving the CLI. `--config <id>` fills an existing config, `--param name=value` sets a non-secret setting such as Bedrock's `region`, `--no-sign-in` mints a link anyone holding it can fill (Admin or Owner). `link-status <provider> <config> <request> [--wait]` says when it was filled. |
|
|
158
159
|
| `fruxon llm-providers configs list/get/test/publish` | The workspace's saved LLM credentials — the `provider.tenantConfigId` an agent pins. `get` shows the draft (secrets masked), the published revision and last known health. `test` probes the draft on every provider surface that shares the credential (or just one, given that surface's provider id), one line per failing surface, exit 12 on failure (`llm_providers:test`). `publish` ships the draft as a new revision that every agent on the config switches to — it confirms, needs `--yes` in agent mode, and does not wait on a passing test (`llm_providers:write`). |
|
|
159
160
|
| `fruxon llm-providers configs complete <provider> <config> --model M` | One completion on a saved config's published revision, with no agent, session or execution — to see whether a model follows a prompt or a system block's instruction. `--system` (text, `@file`, `-`; repeatable), `-m [user:\|assistant:]TEXT` (repeatable) or `--messages chat.json`, `--temperature`, `--max-tokens` (server cap 8192), `--param k=v`. The reply goes to stdout, the model, finish reason, tokens and latency to stderr (`llm_providers:test`). Fruxon-hosted providers are refused. |
|
|
160
|
-
| `fruxon assets create/list/get/wait/operations/delete` | Manage knowledge-base (RAG) assets an agent can query — upload local files, wait for async ingestion, inspect operations, and use the ids for `assetConfig.assetIds`. `delete`
|
|
161
|
+
| `fruxon assets create/list/get/wait/operations/replace-file/delete` | Manage knowledge-base (RAG) assets an agent can query — upload local files, wait for async ingestion, inspect operations, and use the ids for `assetConfig.assetIds`. `replace-file <asset> --file …` gives an uploaded-file asset new contents under the same id (`--wait` blocks on the re-index; search keeps the previous file until it finishes). `replace-file` and `delete` confirm + refuse without `--yes` in agent mode. |
|
|
161
162
|
| `fruxon knowledge-bases list/get/create/update/publish/archive/delete` | The authored, reviewable corpus behind a `manual_knowledge` asset — **not** the asset itself, which is what gets searched (`get` prints the asset id as `backingAssetId`). **`publish` is the step that makes any of it findable**: only `PUBLISHED` documents travel in a snapshot, and only publishing the *base* moves one, so a base full of finished articles answers nothing until it runs. It returns on *acceptance*, not searchability — RAG ingests afterwards, so a pending publish state is normal. `list` hides archived bases, which keep answering for agents already attached to them; `delete` is refused while an agent revision still attaches one, and `archive` is the reversible path. |
|
|
162
163
|
| `fruxon knowledge-bases usage <kb>` | Whether agents actually use the base: searches per hour, day or week (`--interval`), the passage tokens each search handed the agent, how many found nothing (split from searches that **could not fully search** it — index missing or still building, a phrasing failed), and which agents searched (up to 20 you can open, the rest counted together). `--origin test` counts test runs instead of production. Retrieved tokens are counted by the search index, so what the model read can be less when a large result is trimmed or offloaded. Searches are recorded from 15 October 2026 and kept 90 days at most, so a window reaching further back says where counting began rather than showing empty days. A 404 is a wrong id or a backend that predates the read. |
|
|
163
164
|
| `fruxon knowledge-bases notices/notice/post-notice/edit-notice/extend-notice/withdraw-notice` | Time-boxed notices on a base — an outage being fixed, a known bug, a closure. **Not documents**: never indexed or published, so every agent attaching the base is given each active notice whole from its next turn. `post-notice --valid-for 4h` (or `--until`) — every notice ends, at most 30 days after it was posted, and a base holds ten active ones (409 `notice_limit` / `notice_too_long`, each with its remedy). The body is Markdown, at most 1,200 characters, best as four headings: *What is happening*, *Applies when*, *Tell the customer*, *Do not*. A time without an offset is read in the notice's zone (`--time-zone`, else this machine's), which is also the zone agents tell customers the end in. `withdraw-notice` tells each conversation that was given it, on its next turn, that it ended; it confirms, and needs `--yes` in agent mode. An ended notice is not extended: `post-notice --from <id>` posts it again as a new one. |
|
|
@@ -69,6 +69,7 @@ Execution:
|
|
|
69
69
|
| `fruxon agents topics list/search/get/messages/sessions <agent>` + `fruxon agents inbox <agent>` | Read the conversation spine — the agent's topics (threads), one topic's transcript, its episodes, and its inbox (what it's focused on). `list`/`search` filter server-side by `--state`/`--participant`/`--query`. Read-only. Each message carries `author` — a human colleague's turn is stored as `ASSISTANT` on purpose, so `role` alone cannot tell their reply from the agent's; `HUMAN_OPERATOR` can. A message the runtime *withheld* is in no transcript at all — see `fruxon messages list`. `sessions` explains a fresh, blind session: a topic outlives its sessions, and `endCause` on the previous one (`CONSOLE_ALREADY_RESOLVED` — a human closed it in the provider's console) is why the next started with no history. |
|
|
70
70
|
| `fruxon escalations list/history/unhandled/policy/ack` | What happened when an agent handed a conversation to a person. `list` is the queue (live takeovers + degraded escalations nobody was reachable for); `unhandled` is the append-only ledger under it. **`history` is the record of closed console-routed takeovers** — those leave the queue, so `list --status ALL` answers `[]` about a conversation a human worked for half an hour. Read `humanObservedAt` before believing a `RESOLVED`: null means nobody was ever seen picking it up. `policy <agent>` resolves who the *next* escalation would reach — an empty ladder under `NATIVE_HANDOFF` is correct, the console supplies the human — and names the desk it went through. `set-policy <agent>` changes that desk: `--operator` (repeatable, one tier; `--strategy`), `--working-hours <schedule|none>`, `--default-reason`, `--entry-point` for a channel's desk. It reads the desk and PUTs it back with only those changed, for every agent on the desk (`participants:write`). |
|
|
71
71
|
| `fruxon escalations desks list/create/attach/detach` | An Application's escalation desks. `create --name … [--mode BRIDGE\|NATIVE_HANDOFF] [--operator …] [--working-hours …] [--attach other\|<entry-point>]` makes one and attaches it; `attach <desk> other <entry-point>…` / `detach other <entry-point>…` move hand-off between desks. `other` is conversations through no channel (operator desks only). `--agent` picks the agent's Application, `--application` names one. |
|
|
72
|
+
| `fruxon escalations operators list/candidates/add/remove` | An Application's human operators — the only people a desk's `--operator` ladder accepts. `candidates [--search …]` shows who can be added (`ELIGIBLE`, `PROMOTABLE` = marked internal on add, `INELIGIBLE`); `add <participant>…`; `remove <participant>… --yes`. Same `--agent` / `--application` as `desks`. |
|
|
72
73
|
| `fruxon working-hours list/get/create/update/delete` | Working-hours schedules: a time zone, a week (`--hours "sun-thu 08:00-20:00"`, repeatable; a day not named is closed), dated closures (`--closed 2026-12-25`), or `--file` with the full body. A schedule governs the escalation hand-off once a desk uses it (`escalations set-policy --working-hours`); what the agent says about opening hours stays in its prompt. `participants:read` / `participants:write`. |
|
|
73
74
|
| `fruxon messages list` | The channel ledger — including inbound an agent was never shown. A **withheld** message (a human owns the chat in the source console, or admission refused the sender) never becomes a conversation turn, so it is in no transcript and the thread reads as a customer being ignored. `--delivery WITHHELD_PENDING` lists the ones nothing has ever acted on; nothing drains them. |
|
|
74
75
|
| `fruxon agents sandbox open/turn/fire/resolve-input/stream/answer/close <session>` | Drive an agent-network sandbox end-to-end without real channels — send turns as participants, test-fire triggers, and watch the run (`--wait` on `turn` / `fire` follows it to the end; `stream` shows only what happens after it connects; NDJSON in agent mode). Sandbox **captures the reply and hard-blocks every real send**; `--await` makes consult/approval gates suspend so they can be resolved (`answer` for consults, `approvals respond` for approvals). `--draft` runs your unpublished draft instead of the deployed revision (`sandbox draft <session>` says which); `--confirm-writes` holds every create/update/delete tool call for approval, because sandbox does **not** block integration writes; a write that did not run (rejected, expired, or one the run could not pause for) shows on `stream` as `refused`. |
|
|
@@ -123,7 +124,7 @@ Integrations + tools:
|
|
|
123
124
|
| `fruxon llm-providers connect <provider>` / `link-status` | Create a config for an LLM provider and print a **credential link**: a human opens it, signs in to Fruxon, types the API key (or access keys, or service account key), and the page tests it with the provider and publishes the config an agent pins as `provider.tenantConfigId`. The key never passes through the terminal or an agent driving the CLI. `--config <id>` fills an existing config, `--param name=value` sets a non-secret setting such as Bedrock's `region`, `--no-sign-in` mints a link anyone holding it can fill (Admin or Owner). `link-status <provider> <config> <request> [--wait]` says when it was filled. |
|
|
124
125
|
| `fruxon llm-providers configs list/get/test/publish` | The workspace's saved LLM credentials — the `provider.tenantConfigId` an agent pins. `get` shows the draft (secrets masked), the published revision and last known health. `test` probes the draft on every provider surface that shares the credential (or just one, given that surface's provider id), one line per failing surface, exit 12 on failure (`llm_providers:test`). `publish` ships the draft as a new revision that every agent on the config switches to — it confirms, needs `--yes` in agent mode, and does not wait on a passing test (`llm_providers:write`). |
|
|
125
126
|
| `fruxon llm-providers configs complete <provider> <config> --model M` | One completion on a saved config's published revision, with no agent, session or execution — to see whether a model follows a prompt or a system block's instruction. `--system` (text, `@file`, `-`; repeatable), `-m [user:\|assistant:]TEXT` (repeatable) or `--messages chat.json`, `--temperature`, `--max-tokens` (server cap 8192), `--param k=v`. The reply goes to stdout, the model, finish reason, tokens and latency to stderr (`llm_providers:test`). Fruxon-hosted providers are refused. |
|
|
126
|
-
| `fruxon assets create/list/get/wait/operations/delete` | Manage knowledge-base (RAG) assets an agent can query — upload local files, wait for async ingestion, inspect operations, and use the ids for `assetConfig.assetIds`. `delete`
|
|
127
|
+
| `fruxon assets create/list/get/wait/operations/replace-file/delete` | Manage knowledge-base (RAG) assets an agent can query — upload local files, wait for async ingestion, inspect operations, and use the ids for `assetConfig.assetIds`. `replace-file <asset> --file …` gives an uploaded-file asset new contents under the same id (`--wait` blocks on the re-index; search keeps the previous file until it finishes). `replace-file` and `delete` confirm + refuse without `--yes` in agent mode. |
|
|
127
128
|
| `fruxon knowledge-bases list/get/create/update/publish/archive/delete` | The authored, reviewable corpus behind a `manual_knowledge` asset — **not** the asset itself, which is what gets searched (`get` prints the asset id as `backingAssetId`). **`publish` is the step that makes any of it findable**: only `PUBLISHED` documents travel in a snapshot, and only publishing the *base* moves one, so a base full of finished articles answers nothing until it runs. It returns on *acceptance*, not searchability — RAG ingests afterwards, so a pending publish state is normal. `list` hides archived bases, which keep answering for agents already attached to them; `delete` is refused while an agent revision still attaches one, and `archive` is the reversible path. |
|
|
128
129
|
| `fruxon knowledge-bases usage <kb>` | Whether agents actually use the base: searches per hour, day or week (`--interval`), the passage tokens each search handed the agent, how many found nothing (split from searches that **could not fully search** it — index missing or still building, a phrasing failed), and which agents searched (up to 20 you can open, the rest counted together). `--origin test` counts test runs instead of production. Retrieved tokens are counted by the search index, so what the model read can be less when a large result is trimmed or offloaded. Searches are recorded from 15 October 2026 and kept 90 days at most, so a window reaching further back says where counting began rather than showing empty days. A 404 is a wrong id or a backend that predates the read. |
|
|
129
130
|
| `fruxon knowledge-bases notices/notice/post-notice/edit-notice/extend-notice/withdraw-notice` | Time-boxed notices on a base — an outage being fixed, a known bug, a closure. **Not documents**: never indexed or published, so every agent attaching the base is given each active notice whole from its next turn. `post-notice --valid-for 4h` (or `--until`) — every notice ends, at most 30 days after it was posted, and a base holds ten active ones (409 `notice_limit` / `notice_too_long`, each with its remedy). The body is Markdown, at most 1,200 characters, best as four headings: *What is happening*, *Applies when*, *Tell the customer*, *Do not*. A time without an offset is read in the notice's zone (`--time-zone`, else this machine's), which is also the zone agents tell customers the end in. `withdraw-notice` tells each conversation that was given it, on its next turn, that it ended; it confirms, and needs `--yes` in agent mode. An ended notice is not extended: `post-notice --from <id>` posts it again as a new one. |
|
|
@@ -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.
|
|
22
|
-
__version_tuple__ = version_tuple = (2, 2,
|
|
21
|
+
__version__ = version = '2.2.10'
|
|
22
|
+
__version_tuple__ = version_tuple = (2, 2, 10)
|
|
23
23
|
|
|
24
24
|
__commit_id__ = commit_id = None
|
|
@@ -795,6 +795,7 @@ from fruxon.cli import describe as _describe # noqa: E402, F401
|
|
|
795
795
|
from fruxon.cli import doctor as _doctor # noqa: E402, F401
|
|
796
796
|
from fruxon.cli import environments as _environments # noqa: E402, F401
|
|
797
797
|
from fruxon.cli import escalation_desks as _escalation_desks # noqa: E402, F401
|
|
798
|
+
from fruxon.cli import escalation_operators as _escalation_operators # noqa: E402, F401
|
|
798
799
|
from fruxon.cli import escalations as _escalations # noqa: E402, F401
|
|
799
800
|
from fruxon.cli import examples as _examples # noqa: E402, F401
|
|
800
801
|
from fruxon.cli import feedback as _feedback # noqa: E402, F401
|
|
@@ -253,6 +253,102 @@ def assets_create(
|
|
|
253
253
|
_say_kv("wait", f"fruxon assets wait {asset_id}")
|
|
254
254
|
|
|
255
255
|
|
|
256
|
+
@assets_app.command("replace-file")
|
|
257
|
+
def assets_replace_file(
|
|
258
|
+
asset: Annotated[str, typer.Argument(help="Identifier of an uploaded-file asset.")],
|
|
259
|
+
file_path: Annotated[
|
|
260
|
+
Path,
|
|
261
|
+
typer.Option("--file", "-f", exists=True, dir_okay=False, readable=True, help="Local file to replace it with."),
|
|
262
|
+
],
|
|
263
|
+
wait: Annotated[bool, typer.Option("--wait", help="Block until the re-index finishes.")] = False,
|
|
264
|
+
timeout: Annotated[float, typer.Option("--timeout", help="Seconds --wait waits before timing out.")] = 300.0,
|
|
265
|
+
yes: Annotated[
|
|
266
|
+
bool,
|
|
267
|
+
typer.Option("--yes", "-y", help="Skip confirmation. REQUIRED under agent mode (CLAUDECODE / CI)."),
|
|
268
|
+
] = False,
|
|
269
|
+
workspace: Annotated[str | None, typer.Option("--workspace", help="Workspace identifier override.")] = None,
|
|
270
|
+
base_url: Annotated[str | None, typer.Option("--base-url", help="API base URL override.")] = None,
|
|
271
|
+
output: Annotated[
|
|
272
|
+
str | None,
|
|
273
|
+
typer.Option("--output", "-o", help="Output format: text (default), json, id."),
|
|
274
|
+
] = None,
|
|
275
|
+
):
|
|
276
|
+
"""Replace the file behind an uploaded-file asset; the asset keeps its id.
|
|
277
|
+
|
|
278
|
+
Agents and prompts that use the asset read the new file. For an indexed
|
|
279
|
+
asset this starts a re-index: search answers from the previous file until
|
|
280
|
+
it finishes, and keeps it if the new file can't be indexed. The previous
|
|
281
|
+
file is no longer offered for download, so confirm first.
|
|
282
|
+
|
|
283
|
+
Examples:
|
|
284
|
+
fruxon assets replace-file $ASSET_ID --file ./faq.md --yes --wait
|
|
285
|
+
fruxon assets replace-file $ASSET_ID --file ./faq.md --yes -o json
|
|
286
|
+
"""
|
|
287
|
+
output = resolve_output_format(output, human_default="text", agent_default="json")
|
|
288
|
+
if output not in {"text", "json", "id"}:
|
|
289
|
+
fail(
|
|
290
|
+
f"Unknown output format: [bold]{output}[/bold]",
|
|
291
|
+
hint="Valid formats: text, json, id.",
|
|
292
|
+
code=EXIT_VALIDATION,
|
|
293
|
+
)
|
|
294
|
+
if wait and timeout <= 0:
|
|
295
|
+
fail("Timeout must be positive.", code=EXIT_VALIDATION)
|
|
296
|
+
|
|
297
|
+
require_yes_in_agent_mode(yes, action=f"replace the file of asset {asset}")
|
|
298
|
+
if not yes and not typer.confirm(
|
|
299
|
+
f"Replace the file of asset {asset} with {file_path.name}? "
|
|
300
|
+
"The current file won't be offered for download afterwards.",
|
|
301
|
+
default=False,
|
|
302
|
+
):
|
|
303
|
+
say_info("Cancelled.")
|
|
304
|
+
return
|
|
305
|
+
|
|
306
|
+
client = build_client(workspace, base_url)
|
|
307
|
+
try:
|
|
308
|
+
if stderr.is_terminal and output == "text":
|
|
309
|
+
with stderr.status(f"[bold]Uploading [cyan]{file_path.name}[/cyan]…[/bold]"):
|
|
310
|
+
response = client.replace_asset_file(asset, file_path)
|
|
311
|
+
else:
|
|
312
|
+
response = client.replace_asset_file(asset, file_path)
|
|
313
|
+
except FruxonError as e:
|
|
314
|
+
fail_from_api_error(e, hint=_hint_for_replace_error(e, asset))
|
|
315
|
+
|
|
316
|
+
operation = response.get("longOperation") if isinstance(response.get("longOperation"), dict) else {}
|
|
317
|
+
reindexing = bool(operation) and _operation_status(operation).lower() != "done"
|
|
318
|
+
waited = None
|
|
319
|
+
if wait and reindexing:
|
|
320
|
+
try:
|
|
321
|
+
if stderr.is_terminal and output == "text":
|
|
322
|
+
with stderr.status(f"[bold]Re-indexing [cyan]{asset}[/cyan]…[/bold]"):
|
|
323
|
+
waited = client.wait_for_asset(asset, operation=_operation_id(operation) or None, timeout_s=timeout)
|
|
324
|
+
else:
|
|
325
|
+
waited = client.wait_for_asset(asset, operation=_operation_id(operation) or None, timeout_s=timeout)
|
|
326
|
+
except TimeoutError as e:
|
|
327
|
+
fail(str(e), hint=f"The file was replaced. Keep waiting with [bold]fruxon assets wait {asset}[/bold].")
|
|
328
|
+
except FruxonError as e:
|
|
329
|
+
fail_from_api_error(
|
|
330
|
+
e,
|
|
331
|
+
hint=(
|
|
332
|
+
"The file was replaced, but the new one didn't index; search still answers from the previous "
|
|
333
|
+
f"file. Inspect with [bold]fruxon assets operations {asset}[/bold]."
|
|
334
|
+
),
|
|
335
|
+
)
|
|
336
|
+
|
|
337
|
+
asset_id = _asset_id_from_response(response) or asset
|
|
338
|
+
if output == "id":
|
|
339
|
+
print(asset_id)
|
|
340
|
+
return
|
|
341
|
+
if output == "json":
|
|
342
|
+
print(json.dumps({**response, "reindexing": reindexing, "waited": waited}, indent=2))
|
|
343
|
+
return
|
|
344
|
+
|
|
345
|
+
say_ok(f"Replaced the file of asset [bold]{asset_id}[/bold] with [bold]{file_path.name}[/bold].")
|
|
346
|
+
if waited is not None:
|
|
347
|
+
say_ok("Re-index complete.")
|
|
348
|
+
elif reindexing:
|
|
349
|
+
_say_kv("wait", f"fruxon assets wait {asset_id}")
|
|
350
|
+
|
|
351
|
+
|
|
256
352
|
@assets_app.command("wait")
|
|
257
353
|
def assets_wait(
|
|
258
354
|
asset: Annotated[str, typer.Argument(help="Asset identifier to wait for.")],
|
|
@@ -593,6 +689,20 @@ def _hint_for_error(error: FruxonError) -> str | None:
|
|
|
593
689
|
return None
|
|
594
690
|
|
|
595
691
|
|
|
692
|
+
def _hint_for_replace_error(error: FruxonError, asset: str) -> str | None:
|
|
693
|
+
"""The two refusals a replace has of its own, before the asset-wide hints."""
|
|
694
|
+
from fruxon.exceptions import FruxonAPIError
|
|
695
|
+
|
|
696
|
+
if isinstance(error, FruxonAPIError) and error.status == 409:
|
|
697
|
+
return f"Indexing is running. Wait with [bold]fruxon assets wait {asset}[/bold], then replace the file again."
|
|
698
|
+
if isinstance(error, FruxonAPIError) and error.status == 400:
|
|
699
|
+
return (
|
|
700
|
+
"Only an uploaded-file asset can be replaced, and an indexed one only with a type "
|
|
701
|
+
"[bold]fruxon assets supported-types[/bold] lists."
|
|
702
|
+
)
|
|
703
|
+
return _hint_for_error(error)
|
|
704
|
+
|
|
705
|
+
|
|
596
706
|
def _hint_for_chunks_error(error: FruxonError, asset: str) -> str | None:
|
|
597
707
|
"""Like :func:`_hint_for_error`, but ``assets chunks`` takes two ids —
|
|
598
708
|
a 404 is just as likely to mean the document id as the asset id, so
|
|
@@ -21,7 +21,7 @@ from typing import Annotated
|
|
|
21
21
|
import typer
|
|
22
22
|
|
|
23
23
|
from fruxon.cli._shared import build_client
|
|
24
|
-
from fruxon.cli.escalations import escalations_app
|
|
24
|
+
from fruxon.cli.escalations import escalations_app, hint_for_inactive_operators
|
|
25
25
|
from fruxon.exceptions import FruxonError
|
|
26
26
|
from fruxon.fruxon import FruxonClient
|
|
27
27
|
from fruxon.ui import (
|
|
@@ -104,6 +104,9 @@ def _resolve_application(client: FruxonClient, agent: str | None, application: s
|
|
|
104
104
|
def _hint_for_desk_error(error: FruxonError) -> str | None:
|
|
105
105
|
from fruxon.exceptions import ForbiddenError
|
|
106
106
|
|
|
107
|
+
inactive = hint_for_inactive_operators(error)
|
|
108
|
+
if inactive:
|
|
109
|
+
return inactive
|
|
107
110
|
if isinstance(error, ForbiddenError):
|
|
108
111
|
return (
|
|
109
112
|
"Desks need [bold]participants:read[/bold] to read and [bold]participants:write[/bold] plus "
|
|
@@ -197,7 +200,13 @@ def desks_create(
|
|
|
197
200
|
] = "BRIDGE",
|
|
198
201
|
operator: Annotated[
|
|
199
202
|
list[str] | None,
|
|
200
|
-
typer.Option(
|
|
203
|
+
typer.Option(
|
|
204
|
+
"--operator",
|
|
205
|
+
help=(
|
|
206
|
+
"Operator participant id (fruxon escalations operators list), in preference order. "
|
|
207
|
+
"Repeatable; BRIDGE only."
|
|
208
|
+
),
|
|
209
|
+
),
|
|
201
210
|
] = None,
|
|
202
211
|
strategy: Annotated[
|
|
203
212
|
str | None,
|
|
@@ -227,6 +236,8 @@ def desks_create(
|
|
|
227
236
|
|
|
228
237
|
An operator desk (`BRIDGE`) relays the conversation to the `--operator`
|
|
229
238
|
ladder; with no operators, nobody is paged and the escalation degrades.
|
|
239
|
+
Each `--operator` must already be an operator of the Application
|
|
240
|
+
(`fruxon escalations operators add <participant-id>`).
|
|
230
241
|
A console desk (`NATIVE_HANDOFF`) hands the chat to the channel's own
|
|
231
242
|
console and has no ladder. The kind cannot change later.
|
|
232
243
|
|
|
@@ -239,6 +250,7 @@ def desks_create(
|
|
|
239
250
|
Needs `participants:write` and Editor on the Application.
|
|
240
251
|
|
|
241
252
|
Examples:
|
|
253
|
+
fruxon escalations operators add <participant> --agent front-desk
|
|
242
254
|
fruxon escalations desks create --agent front-desk --name "Front desk" --operator <participant> --attach other
|
|
243
255
|
fruxon escalations desks create --agent front-desk --name "Telegram" --operator p1 --operator p2 \\
|
|
244
256
|
--strategy ROUND_ROBIN --working-hours <schedule-id> --attach <telegram-entry-point>
|
|
@@ -0,0 +1,277 @@
|
|
|
1
|
+
"""``fruxon escalations operators`` — the people an Application's desks may page.
|
|
2
|
+
|
|
3
|
+
An escalation desk's ladder names operator participants, and the server only
|
|
4
|
+
accepts ones that are **active operators** of the desk's Application. This
|
|
5
|
+
is the dashboard's Application → People → Human Operators list:
|
|
6
|
+
|
|
7
|
+
- ``list`` — who is an operator, and whether they would be paged right now
|
|
8
|
+
(``ACTIVE`` and ``AVAILABLE``).
|
|
9
|
+
- ``candidates`` — who could be added, with the server's verdict:
|
|
10
|
+
``ELIGIBLE`` (an internal person), ``PROMOTABLE`` (a person not yet marked
|
|
11
|
+
internal or external — adding them marks them internal) or ``INELIGIBLE``.
|
|
12
|
+
- ``add`` / ``remove`` — change the list. It applies immediately.
|
|
13
|
+
|
|
14
|
+
Only an internal, curated person who is not disabled can be an operator; a
|
|
15
|
+
customer never can. The id everywhere is the participant id
|
|
16
|
+
(``fruxon participants list``), the same one ``desks create --operator``
|
|
17
|
+
takes.
|
|
18
|
+
"""
|
|
19
|
+
|
|
20
|
+
from __future__ import annotations
|
|
21
|
+
|
|
22
|
+
import json
|
|
23
|
+
from typing import Annotated
|
|
24
|
+
|
|
25
|
+
import typer
|
|
26
|
+
|
|
27
|
+
from fruxon.cli._shared import build_client, confirm_or_die
|
|
28
|
+
from fruxon.cli.escalation_desks import (
|
|
29
|
+
_AGENT,
|
|
30
|
+
_APPLICATION,
|
|
31
|
+
_BASE_URL,
|
|
32
|
+
_OUTPUT,
|
|
33
|
+
_WORKSPACE,
|
|
34
|
+
_resolve_application,
|
|
35
|
+
_resolve_output,
|
|
36
|
+
)
|
|
37
|
+
from fruxon.cli.escalations import escalations_app
|
|
38
|
+
from fruxon.exceptions import FruxonError
|
|
39
|
+
from fruxon.ui import fail_from_api_error, say_info, say_ok, stderr
|
|
40
|
+
|
|
41
|
+
operators_app = typer.Typer(
|
|
42
|
+
help="An Application's human operators — the people its escalation desks may page.",
|
|
43
|
+
no_args_is_help=True,
|
|
44
|
+
)
|
|
45
|
+
escalations_app.add_typer(operators_app, name="operators")
|
|
46
|
+
|
|
47
|
+
# What NetworkOperatorIneligibilityReason codes mean, in the dashboard's words.
|
|
48
|
+
_REASON = {
|
|
49
|
+
"NOT_PERSON": "a group or AI peer — only a person can take over",
|
|
50
|
+
"NOT_CURATED": "not a curated directory person",
|
|
51
|
+
"DISABLED": "disabled in the directory",
|
|
52
|
+
"EXTERNAL": "a customer or external contact",
|
|
53
|
+
"UNCLASSIFIED": "not classified internal or external",
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
def _hint_for_operator_error(error: FruxonError, application: str) -> str | None:
|
|
58
|
+
from fruxon.exceptions import ForbiddenError, NotFoundError, ValidationError
|
|
59
|
+
|
|
60
|
+
if isinstance(error, ValidationError):
|
|
61
|
+
return (
|
|
62
|
+
"Only an internal, curated person who is not disabled can be an operator; a customer never can. "
|
|
63
|
+
f"See who can be added: [bold]fruxon escalations operators candidates --application {application}[/bold]"
|
|
64
|
+
)
|
|
65
|
+
if isinstance(error, NotFoundError):
|
|
66
|
+
return f"Check the ids with [bold]fruxon escalations operators list --application {application}[/bold]."
|
|
67
|
+
if isinstance(error, ForbiddenError):
|
|
68
|
+
return (
|
|
69
|
+
"Operators need [bold]participants:read[/bold] to read and [bold]participants:write[/bold] plus "
|
|
70
|
+
"Editor on the Application to change. Check with [bold]fruxon applications list[/bold]."
|
|
71
|
+
)
|
|
72
|
+
return None
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
def _paged(op: dict) -> str:
|
|
76
|
+
"""Would an escalation reach this operator right now?"""
|
|
77
|
+
status = (op.get("status") or "").upper()
|
|
78
|
+
presence = (op.get("presence") or "").upper()
|
|
79
|
+
if status == "DISABLED":
|
|
80
|
+
return "[red]disabled[/red]"
|
|
81
|
+
if presence == "AWAY":
|
|
82
|
+
note = op.get("presenceNote")
|
|
83
|
+
return "[yellow]away[/yellow]" + (f" [dim]({note})[/dim]" if note else "")
|
|
84
|
+
return "[green]active[/green]"
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
def _render(op: dict) -> None:
|
|
88
|
+
name = op.get("displayName") or op.get("participantId")
|
|
89
|
+
busy = op.get("activeConversationCount") or 0
|
|
90
|
+
line = f" [bold]{name}[/bold] [dim]{op.get('participantId')}[/dim] {_paged(op)}"
|
|
91
|
+
if busy:
|
|
92
|
+
line += f" [dim]· on {busy} conversation(s)[/dim]"
|
|
93
|
+
stderr.print(line)
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
@operators_app.command("list")
|
|
97
|
+
def operators_list(
|
|
98
|
+
agent: _AGENT = None,
|
|
99
|
+
application: _APPLICATION = None,
|
|
100
|
+
workspace: _WORKSPACE = None,
|
|
101
|
+
base_url: _BASE_URL = None,
|
|
102
|
+
output: _OUTPUT = None,
|
|
103
|
+
):
|
|
104
|
+
"""List an Application's operators, and whether each would be paged now.
|
|
105
|
+
|
|
106
|
+
An operator is paged only when `ACTIVE` and `AVAILABLE`; a disabled or
|
|
107
|
+
away one is skipped and the desk's ladder falls through.
|
|
108
|
+
|
|
109
|
+
Examples:
|
|
110
|
+
fruxon escalations operators list --agent front-desk
|
|
111
|
+
fruxon escalations operators list --application <id> -o json | jq '.[] | {participantId, displayName, status}'
|
|
112
|
+
"""
|
|
113
|
+
output = _resolve_output(output)
|
|
114
|
+
client = build_client(workspace, base_url)
|
|
115
|
+
network = _resolve_application(client, agent, application)
|
|
116
|
+
try:
|
|
117
|
+
operators = client.list_application_operators(network)
|
|
118
|
+
except FruxonError as e:
|
|
119
|
+
fail_from_api_error(e, hint=_hint_for_operator_error(e, network))
|
|
120
|
+
if output == "json":
|
|
121
|
+
print(json.dumps(operators, indent=2))
|
|
122
|
+
return
|
|
123
|
+
if not operators:
|
|
124
|
+
say_info(
|
|
125
|
+
"This Application has no operators, so its escalation desks have nobody to page.",
|
|
126
|
+
hint=f"fruxon escalations operators candidates --application {network}",
|
|
127
|
+
)
|
|
128
|
+
return
|
|
129
|
+
stderr.print()
|
|
130
|
+
for op in operators:
|
|
131
|
+
_render(op)
|
|
132
|
+
stderr.print()
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
@operators_app.command("candidates")
|
|
136
|
+
def operators_candidates(
|
|
137
|
+
search: Annotated[str | None, typer.Option("--search", "-s", help="Filter by display name (substring).")] = None,
|
|
138
|
+
limit: Annotated[int, typer.Option("--limit", help="At most this many rows.", min=1)] = 50,
|
|
139
|
+
agent: _AGENT = None,
|
|
140
|
+
application: _APPLICATION = None,
|
|
141
|
+
workspace: _WORKSPACE = None,
|
|
142
|
+
base_url: _BASE_URL = None,
|
|
143
|
+
output: _OUTPUT = None,
|
|
144
|
+
):
|
|
145
|
+
"""List people who could be added as operators, with the server's verdict.
|
|
146
|
+
|
|
147
|
+
`ELIGIBLE` — an internal person; `add` takes them as they are.
|
|
148
|
+
`PROMOTABLE` — a person not yet marked internal or external; `add` marks
|
|
149
|
+
them internal first. `INELIGIBLE` — cannot be added (`ineligibleReason`
|
|
150
|
+
says why). Existing operators, customers and disabled people are left
|
|
151
|
+
out. `servedHere` only says the person is also served by this
|
|
152
|
+
Application; it does not stop them being an operator.
|
|
153
|
+
|
|
154
|
+
Examples:
|
|
155
|
+
fruxon escalations operators candidates --agent front-desk
|
|
156
|
+
fruxon escalations operators candidates --application <id> --search dana -o json
|
|
157
|
+
"""
|
|
158
|
+
output = _resolve_output(output)
|
|
159
|
+
client = build_client(workspace, base_url)
|
|
160
|
+
network = _resolve_application(client, agent, application)
|
|
161
|
+
try:
|
|
162
|
+
candidates = client.list_application_operator_candidates(network, query=search, limit=limit)
|
|
163
|
+
except FruxonError as e:
|
|
164
|
+
fail_from_api_error(e, hint=_hint_for_operator_error(e, network))
|
|
165
|
+
if output == "json":
|
|
166
|
+
print(json.dumps(candidates, indent=2))
|
|
167
|
+
return
|
|
168
|
+
if not candidates:
|
|
169
|
+
say_info(
|
|
170
|
+
"Nobody else can be added as an operator" + (f" matching [bold]{search}[/bold]." if search else "."),
|
|
171
|
+
hint="An operator is an internal person in the directory (fruxon participants list).",
|
|
172
|
+
)
|
|
173
|
+
return
|
|
174
|
+
stderr.print()
|
|
175
|
+
for c in candidates:
|
|
176
|
+
status = (c.get("status") or "").upper()
|
|
177
|
+
if status == "ELIGIBLE":
|
|
178
|
+
verdict = "[green]eligible[/green]"
|
|
179
|
+
elif status == "PROMOTABLE":
|
|
180
|
+
verdict = "[yellow]eligible — adding marks them internal[/yellow]"
|
|
181
|
+
else:
|
|
182
|
+
reason = (c.get("ineligibleReason") or "").upper()
|
|
183
|
+
verdict = f"[red]ineligible[/red] [dim]({_REASON.get(reason, reason.lower() or 'no reason given')})[/dim]"
|
|
184
|
+
served = " [dim]· also served here[/dim]" if c.get("servedHere") else ""
|
|
185
|
+
name = c.get("displayName") or "—"
|
|
186
|
+
stderr.print(f" [bold]{name}[/bold] [dim]{c.get('participantId')}[/dim] {verdict}{served}")
|
|
187
|
+
stderr.print()
|
|
188
|
+
say_info("Add one with", hint=f"fruxon escalations operators add <participant-id> --application {network}")
|
|
189
|
+
|
|
190
|
+
|
|
191
|
+
@operators_app.command("add")
|
|
192
|
+
def operators_add(
|
|
193
|
+
participants: Annotated[
|
|
194
|
+
list[str], typer.Argument(help="Participant id(s) to make operators (fruxon escalations operators candidates).")
|
|
195
|
+
],
|
|
196
|
+
agent: _AGENT = None,
|
|
197
|
+
application: _APPLICATION = None,
|
|
198
|
+
workspace: _WORKSPACE = None,
|
|
199
|
+
base_url: _BASE_URL = None,
|
|
200
|
+
output: _OUTPUT = None,
|
|
201
|
+
):
|
|
202
|
+
"""Make people operators of an Application, so its desks can page them.
|
|
203
|
+
|
|
204
|
+
Each must be an internal, curated person who is not disabled; a customer
|
|
205
|
+
never can be. A person not yet marked internal or external (`PROMOTABLE`
|
|
206
|
+
in `candidates`) is marked internal. Adding someone who is already an
|
|
207
|
+
operator re-activates them, so a rerun is safe. Applies immediately.
|
|
208
|
+
|
|
209
|
+
Needs `participants:write` and Editor on the Application.
|
|
210
|
+
|
|
211
|
+
Examples:
|
|
212
|
+
fruxon escalations operators add <participant-id> --agent front-desk
|
|
213
|
+
fruxon escalations operators add p1 p2 --application <id>
|
|
214
|
+
"""
|
|
215
|
+
output = _resolve_output(output)
|
|
216
|
+
client = build_client(workspace, base_url)
|
|
217
|
+
network = _resolve_application(client, agent, application)
|
|
218
|
+
added: list[dict] = []
|
|
219
|
+
for participant in participants:
|
|
220
|
+
try:
|
|
221
|
+
added.append(client.add_application_operator(network, participant))
|
|
222
|
+
except FruxonError as e:
|
|
223
|
+
fail_from_api_error(e, hint=_hint_for_operator_error(e, network))
|
|
224
|
+
if output == "json":
|
|
225
|
+
print(json.dumps(added, indent=2))
|
|
226
|
+
return
|
|
227
|
+
stderr.print()
|
|
228
|
+
say_ok(f"Added {len(added)} operator(s) to the Application ([dim]{network}[/dim]).")
|
|
229
|
+
for op in added:
|
|
230
|
+
_render(op)
|
|
231
|
+
stderr.print()
|
|
232
|
+
say_info(
|
|
233
|
+
"Put them on a desk with",
|
|
234
|
+
hint=f"fruxon escalations desks create --application {network} --name <name> "
|
|
235
|
+
+ " ".join(f"--operator {p}" for p in participants)
|
|
236
|
+
+ " --attach other",
|
|
237
|
+
)
|
|
238
|
+
|
|
239
|
+
|
|
240
|
+
@operators_app.command("remove")
|
|
241
|
+
def operators_remove(
|
|
242
|
+
participants: Annotated[list[str], typer.Argument(help="Operator participant id(s) to remove.")],
|
|
243
|
+
yes: Annotated[bool, typer.Option("--yes", "-y", help="Skip the confirmation prompt.")] = False,
|
|
244
|
+
agent: _AGENT = None,
|
|
245
|
+
application: _APPLICATION = None,
|
|
246
|
+
workspace: _WORKSPACE = None,
|
|
247
|
+
base_url: _BASE_URL = None,
|
|
248
|
+
output: _OUTPUT = None,
|
|
249
|
+
):
|
|
250
|
+
"""Stop people being operators of an Application.
|
|
251
|
+
|
|
252
|
+
Desks that still list them skip them when they page, so a desk whose
|
|
253
|
+
only operator is removed reaches nobody. Applies immediately.
|
|
254
|
+
|
|
255
|
+
Needs `participants:write` and Editor on the Application.
|
|
256
|
+
|
|
257
|
+
Examples:
|
|
258
|
+
fruxon escalations operators remove <participant-id> --agent front-desk --yes
|
|
259
|
+
"""
|
|
260
|
+
output = _resolve_output(output)
|
|
261
|
+
client = build_client(workspace, base_url)
|
|
262
|
+
network = _resolve_application(client, agent, application)
|
|
263
|
+
confirm_or_die(
|
|
264
|
+
f"Remove {len(participants)} operator(s) from the Application? Desks that list them will skip them.",
|
|
265
|
+
yes=yes,
|
|
266
|
+
action="remove operators",
|
|
267
|
+
)
|
|
268
|
+
for participant in participants:
|
|
269
|
+
try:
|
|
270
|
+
client.remove_application_operator(network, participant)
|
|
271
|
+
except FruxonError as e:
|
|
272
|
+
fail_from_api_error(e, hint=_hint_for_operator_error(e, network))
|
|
273
|
+
if output == "json":
|
|
274
|
+
print(json.dumps({"applicationId": network, "removed": participants}, indent=2))
|
|
275
|
+
return
|
|
276
|
+
stderr.print()
|
|
277
|
+
say_ok(f"Removed {', '.join(participants)} from the Application's operators.")
|
|
@@ -32,6 +32,7 @@ an agent's next escalation would reach.
|
|
|
32
32
|
from __future__ import annotations
|
|
33
33
|
|
|
34
34
|
import json
|
|
35
|
+
import re
|
|
35
36
|
from datetime import datetime, timezone
|
|
36
37
|
from typing import Annotated
|
|
37
38
|
|
|
@@ -765,7 +766,7 @@ def escalations_set_policy(
|
|
|
765
766
|
try:
|
|
766
767
|
updated = client.replace_escalation_desk(network, desk_id, body)
|
|
767
768
|
except FruxonError as e:
|
|
768
|
-
fail_from_api_error(e, hint=_hint_for_scope(e))
|
|
769
|
+
fail_from_api_error(e, hint=hint_for_inactive_operators(e, network) or _hint_for_scope(e))
|
|
769
770
|
|
|
770
771
|
if output == "json":
|
|
771
772
|
print(json.dumps(updated, indent=2))
|
|
@@ -818,6 +819,34 @@ def escalations_ack(
|
|
|
818
819
|
say_ok(f"Acknowledged [bold]{event}[/bold] — it is off the queue.")
|
|
819
820
|
|
|
820
821
|
|
|
822
|
+
# The backend's 400 when a desk names someone who is not an active operator of
|
|
823
|
+
# its Application (EscalationDeskService.ValidateOperatorsAsync). It says to
|
|
824
|
+
# "add them as internal operators" without saying how; this maps it to the
|
|
825
|
+
# command that does.
|
|
826
|
+
_INACTIVE_OPERATORS = re.compile(
|
|
827
|
+
r"Operators \[(?P<ids>[^\]]*)\] are not active operators of network (?P<network>[0-9A-Za-z-]+)"
|
|
828
|
+
)
|
|
829
|
+
|
|
830
|
+
|
|
831
|
+
def hint_for_inactive_operators(error: FruxonError, application: str | None = None) -> str | None:
|
|
832
|
+
"""The command that fixes a desk write rejected for naming non-operators.
|
|
833
|
+
|
|
834
|
+
``None`` unless ``error`` is that rejection. The ids and the Application
|
|
835
|
+
are read back from the server's message so the hint is copy-pasteable;
|
|
836
|
+
``application`` covers a message whose wording drifted.
|
|
837
|
+
"""
|
|
838
|
+
match = _INACTIVE_OPERATORS.search(str(error))
|
|
839
|
+
if not match:
|
|
840
|
+
return None
|
|
841
|
+
ids = " ".join(p.strip() for p in match.group("ids").split(",") if p.strip()) or "<participant-id>"
|
|
842
|
+
network = match.group("network") or application or "<application-id>"
|
|
843
|
+
return (
|
|
844
|
+
f"A desk can only page operators of its Application. Add them first: "
|
|
845
|
+
f"[bold]fruxon escalations operators add {ids} --application {network}[/bold] "
|
|
846
|
+
f"(see who can be added: fruxon escalations operators candidates --application {network})."
|
|
847
|
+
)
|
|
848
|
+
|
|
849
|
+
|
|
821
850
|
def _hint_for_scope(error: FruxonError) -> str | None:
|
|
822
851
|
from fruxon.exceptions import ForbiddenError
|
|
823
852
|
|
|
@@ -134,6 +134,10 @@ _EXAMPLES: dict[str, list[tuple[str, str]]] = {
|
|
|
134
134
|
"assets": [
|
|
135
135
|
("fruxon assets create --file ./handbook.pdf -o id", "Upload a local file and print the new asset id"),
|
|
136
136
|
("fruxon assets wait $ASSET_ID --timeout 300", "Block until ingestion is terminal/queryable"),
|
|
137
|
+
(
|
|
138
|
+
"fruxon assets replace-file $ASSET_ID --file ./faq.md --yes --wait",
|
|
139
|
+
"New contents for an uploaded file — same id, so agents using it read the new file",
|
|
140
|
+
),
|
|
137
141
|
("fruxon assets operations $ASSET_ID", "Inspect ingestion progress/history"),
|
|
138
142
|
("fruxon assets list", "Browse the indexed assets an agent's assetConfig can attach"),
|
|
139
143
|
("fruxon assets list --output id", "Just the ids — pipe-safe"),
|