lightfall 0.1.1__tar.gz → 0.2.0__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.
- {lightfall-0.1.1 → lightfall-0.2.0}/PKG-INFO +30 -30
- {lightfall-0.1.1 → lightfall-0.2.0}/README.md +25 -28
- {lightfall-0.1.1 → lightfall-0.2.0}/pyproject.toml +29 -8
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/_version.py +2 -2
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/acquire/__init__.py +0 -5
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/acquire/engine/base.py +148 -81
- lightfall-0.2.0/src/lightfall/acquire/engine/bluesky.py +612 -0
- lightfall-0.2.0/src/lightfall/acquire/engine/console_proxy.py +101 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/acquire/engine/mock.py +22 -5
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/acquire/engine/protocol.py +16 -5
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/acquire/engine/waiting_hook.py +22 -11
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/acquire/plans/adaptive.py +4 -2
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/acquire/plans/lightfall_plans.py +13 -3
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/acquire/plans/registry.py +0 -1
- lightfall-0.2.0/src/lightfall/agents/__init__.py +24 -0
- lightfall-0.2.0/src/lightfall/agents/assembly.py +188 -0
- lightfall-0.2.0/src/lightfall/agents/builtin/.gitkeep +0 -0
- lightfall-0.2.0/src/lightfall/agents/builtin/lightfall-dev.md +66 -0
- lightfall-0.2.0/src/lightfall/agents/builtin/lightfall.md +84 -0
- lightfall-0.2.0/src/lightfall/agents/builtin/observer.md +16 -0
- lightfall-0.2.0/src/lightfall/agents/bus.py +126 -0
- lightfall-0.2.0/src/lightfall/agents/bus_tools.py +192 -0
- lightfall-0.2.0/src/lightfall/agents/drafts.py +337 -0
- lightfall-0.2.0/src/lightfall/agents/registry.py +148 -0
- lightfall-0.2.0/src/lightfall/agents/skill_tools.py +149 -0
- lightfall-0.2.0/src/lightfall/agents/skills_store.py +201 -0
- lightfall-0.2.0/src/lightfall/agents/spec.py +123 -0
- lightfall-0.2.0/src/lightfall/auth/provider_registry.py +52 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/auth/providers/base.py +9 -0
- lightfall-0.2.0/src/lightfall/auth/providers/builtin_plugins.py +212 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/auth/providers/keycloak.py +40 -3
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/auth/service_key.py +15 -2
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/auth/session.py +76 -2
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/claude/_internal/worker.py +41 -218
- lightfall-0.2.0/src/lightfall/claude/_session_assembly.py +89 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/claude/agent.py +325 -57
- lightfall-0.2.0/src/lightfall/claude/bus_endpoint.py +245 -0
- lightfall-0.2.0/src/lightfall/claude/cockpit.py +70 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/claude/lightfall_core_tools.py +2 -2
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/claude/permission_manager.py +1 -1
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/claude/tools/interaction.py +2 -1
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/claude/tools/screenshot.py +36 -24
- lightfall-0.2.0/src/lightfall/claude/transcript.py +37 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/claude/widget.py +460 -16
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/claude/widgets/permission_request.py +5 -3
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/claude/widgets/task_card.py +4 -2
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/core/application.py +85 -145
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/devices/__init__.py +0 -6
- lightfall-0.2.0/src/lightfall/devices/async_connect.py +77 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/devices/backends/bcs.py +124 -3
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/devices/backends/happi.py +221 -147
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/devices/backends/mock.py +62 -9
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/devices/base.py +45 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/devices/catalog.py +206 -26
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/devices/connection_manager.py +131 -181
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/epics/widgets/areadetector/controls.py +3 -2
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/epics/widgets/motor.py +5 -4
- lightfall-0.2.0/src/lightfall/ipc/local_server.py +175 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ipc/service.py +246 -15
- lightfall-0.2.0/src/lightfall/logbook/__init__.py +27 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/logbook/client.py +207 -21
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/logbook/entry_widget.py +108 -50
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/logbook/fragment_widgets.py +7 -4
- lightfall-0.2.0/src/lightfall/logbook/live_updates.py +125 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/logbook/style.py +29 -10
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/main.py +303 -188
- lightfall-0.2.0/src/lightfall/monitor/__init__.py +0 -0
- lightfall-0.2.0/src/lightfall/monitor/advisor.py +148 -0
- lightfall-0.2.0/src/lightfall/monitor/buffer.py +72 -0
- lightfall-0.2.0/src/lightfall/monitor/context_provider.py +47 -0
- lightfall-0.2.0/src/lightfall/monitor/data_window.py +42 -0
- lightfall-0.2.0/src/lightfall/monitor/feed.py +29 -0
- lightfall-0.2.0/src/lightfall/monitor/feeds/__init__.py +0 -0
- lightfall-0.2.0/src/lightfall/monitor/feeds/acquisition_health.py +73 -0
- lightfall-0.2.0/src/lightfall/monitor/models.py +118 -0
- lightfall-0.2.0/src/lightfall/monitor/monitor_plugin.py +64 -0
- lightfall-0.2.0/src/lightfall/monitor/rate_limiter.py +20 -0
- lightfall-0.2.0/src/lightfall/monitor/registry.py +82 -0
- lightfall-0.2.0/src/lightfall/monitor/scheduler.py +219 -0
- lightfall-0.2.0/src/lightfall/monitor/service.py +200 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/plugins/__init__.py +8 -2
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/plugins/agents/__init__.py +3 -3
- lightfall-0.2.0/src/lightfall/plugins/agents/alignment.py +56 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/plugins/agents/autonomous_experiment/plugin.py +3 -7
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/plugins/agents/current_esaf.py +2 -66
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/plugins/agents/device_tools.py +2 -2
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/plugins/agents/engine_tools.py +464 -83
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/plugins/agents/ipython_tools.py +2 -2
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/plugins/agents/panel_builder.py +6 -54
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/plugins/agents/panel_design.py +5 -33
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/plugins/agents/plan_design.py +5 -31
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/plugins/agents/plan_tools.py +39 -2
- lightfall-0.2.0/src/lightfall/plugins/agents/scan_planning.py +56 -0
- lightfall-0.2.0/src/lightfall/plugins/auth_provider_plugin.py +84 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/plugins/builtin_manifest.py +92 -23
- lightfall-0.2.0/src/lightfall/plugins/device_backend_plugin.py +35 -0
- lightfall-0.2.0/src/lightfall/plugins/happi_database_plugin.py +79 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/plugins/loader.py +76 -8
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/plugins/panel_plugin.py +5 -5
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/plugins/statusbar_plugin.py +34 -0
- lightfall-0.1.1/src/lightfall/plugins/agent_plugin.py → lightfall-0.2.0/src/lightfall/plugins/tool_plugin.py +45 -13
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/plugins/user_plugins.py +6 -6
- lightfall-0.2.0/src/lightfall/plugins/visualization_plugin.py +70 -0
- lightfall-0.2.0/src/lightfall/remote/__init__.py +1 -0
- lightfall-0.2.0/src/lightfall/remote/protocol.py +42 -0
- lightfall-0.2.0/src/lightfall/remote/service.py +681 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/services/als_beam_status.py +35 -1
- lightfall-0.2.0/src/lightfall/services/caproxy_lease_service.py +355 -0
- lightfall-0.2.0/src/lightfall/services/shussebora_monitor.py +204 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/services/threaded_tiled_writer.py +9 -1
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/services/tiled_service.py +80 -7
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/services/tiled_writer_patch.py +15 -0
- lightfall-0.2.0/src/lightfall/skills/builtin/alignment/SKILL.md +38 -0
- lightfall-0.2.0/src/lightfall/skills/builtin/autonomous_experiment/SKILL.md +164 -0
- lightfall-0.2.0/src/lightfall/skills/builtin/current_esaf/SKILL.md +59 -0
- lightfall-0.2.0/src/lightfall/skills/builtin/panel_builder/SKILL.md +48 -0
- lightfall-0.2.0/src/lightfall/skills/builtin/panel_design/SKILL.md +19 -0
- {lightfall-0.1.1/src/lightfall/plugins/agents → lightfall-0.2.0/src/lightfall/skills/builtin}/panel_design/references/panel_design.md +218 -2
- lightfall-0.2.0/src/lightfall/skills/builtin/plan_design/SKILL.md +15 -0
- lightfall-0.2.0/src/lightfall/skills/builtin/scan_planning/SKILL.md +45 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/annotations.py +18 -9
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/dialogs/__init__.py +2 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/dialogs/about_dialog.py +5 -4
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/dialogs/bug_report_dialog.py +4 -1
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/dialogs/export_dialog.py +6 -2
- lightfall-0.2.0/src/lightfall/ui/dialogs/lease_request_dialog.py +246 -0
- lightfall-0.2.0/src/lightfall/ui/dialogs/login_dialog.py +517 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/dialogs/oauth_browser_dialog.py +2 -1
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/docking/icon_sidebar.py +144 -42
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/docking/manager.py +407 -28
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/docking/state.py +19 -1
- lightfall-0.2.0/src/lightfall/ui/docking/theme.py +613 -0
- lightfall-0.2.0/src/lightfall/ui/docking/widget.py +383 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/mainwindow.py +134 -45
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/models/device_selection.py +4 -2
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/models/device_tree.py +53 -3
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/panels/__init__.py +3 -1
- lightfall-0.2.0/src/lightfall/ui/panels/agent_editor/__init__.py +0 -0
- lightfall-0.2.0/src/lightfall/ui/panels/agent_editor/models.py +304 -0
- lightfall-0.2.0/src/lightfall/ui/panels/agent_editor/panel.py +700 -0
- lightfall-0.2.0/src/lightfall/ui/panels/agent_editor/plugin.py +21 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/panels/base.py +159 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/panels/bluesky_panel.py +39 -22
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/panels/claude/__init__.py +2 -2
- lightfall-0.2.0/src/lightfall/ui/panels/claude/agent_picker.py +64 -0
- lightfall-0.2.0/src/lightfall/ui/panels/claude/agent_session_tab.py +491 -0
- lightfall-0.1.1/src/lightfall/ui/panels/claude/agent_registry.py → lightfall-0.2.0/src/lightfall/ui/panels/claude/tool_registry.py +13 -13
- lightfall-0.2.0/src/lightfall/ui/panels/claude_panel.py +1290 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/panels/documents_panel.py +39 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/panels/ipython_panel.py +83 -53
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/panels/logbook_entries_panel.py +27 -11
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/panels/logbook_panel.py +87 -20
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/panels/logging_panel.py +53 -38
- lightfall-0.2.0/src/lightfall/ui/panels/monitor_panel.py +62 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/panels/pipeline_triggers_panel.py +1 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/panels/plugins/__init__.py +2 -0
- lightfall-0.2.0/src/lightfall/ui/panels/plugins/monitor_panel_plugin.py +20 -0
- lightfall-0.2.0/src/lightfall/ui/panels/plugins/shussebora_plugin.py +28 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/panels/queue.py +5 -4
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/panels/registry.py +2 -2
- lightfall-0.2.0/src/lightfall/ui/panels/shussebora_panel.py +275 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/panels/synoptic/editors.py +2 -1
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/panels/tiled_browser_panel.py +86 -52
- lightfall-0.2.0/src/lightfall/ui/panels/visualization_panel.py +847 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/preferences/builtin.py +111 -31
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/preferences/claude_settings.py +178 -6
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/preferences/dialog.py +19 -2
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/preferences/ipc_settings.py +109 -35
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/preferences/login_settings.py +2 -1
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/preferences/manager.py +31 -2
- lightfall-0.2.0/src/lightfall/ui/preferences/monitor_settings.py +520 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/preferences/proxy_settings.py +2 -1
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/preferences/tiled_settings.py +34 -2
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/preferences/tool_settings.py +15 -15
- lightfall-0.2.0/src/lightfall/ui/resources/logo.png +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/statusbar/plugins/__init__.py +6 -7
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/statusbar/plugins/als_beam_status.py +9 -3
- lightfall-0.2.0/src/lightfall/ui/statusbar/plugins/caproxy_lease_status.py +233 -0
- lightfall-0.2.0/src/lightfall/ui/statusbar/plugins/nats_status.py +193 -0
- lightfall-0.2.0/src/lightfall/ui/statusbar/plugins/shussebora_status.py +162 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/statusbar/plugins/thread_status.py +4 -4
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/statusbar/plugins/tiled_status.py +61 -18
- lightfall-0.2.0/src/lightfall/ui/statusbar/plugins/user_status.py +153 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/theater/manager.py +10 -2
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/theater/proxy.py +15 -2
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/theme/__init__.py +9 -1
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/theme/builtin.py +59 -337
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/theme/manager.py +127 -4
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/tutorial.py +12 -11
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/widgets/__init__.py +0 -5
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/widgets/camera/base.py +58 -36
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/widgets/camera/image_view.py +46 -11
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/widgets/compact_motor.py +18 -11
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/widgets/device_control.py +2 -1
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/widgets/device_selector.py +1 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/widgets/device_tree_tab.py +29 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/widgets/document_stream.py +11 -31
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/widgets/motor_control.py +8 -7
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/widgets/observers/image_view.py +6 -11
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/widgets/plan_config.py +2 -1
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/widgets/plan_selector.py +4 -1
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/widgets/runengine_control.py +63 -136
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/widgets/signal_control.py +18 -8
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/widgets/tiled_filter_widget.py +0 -29
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/widgets/warning_banner.py +2 -1
- lightfall-0.2.0/src/lightfall/utils/caproto_shutdown.py +90 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/utils/sentry.py +61 -12
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/utils/threads.py +88 -22
- lightfall-0.2.0/src/lightfall/utils/tiled_helpers.py +222 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/visualization/__init__.py +0 -13
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/visualization/base_visualization.py +9 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/visualization/fitting/__init__.py +2 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/visualization/fitting/fitters.py +70 -0
- lightfall-0.2.0/src/lightfall/visualization/reduction_engine.py +104 -0
- lightfall-0.2.0/src/lightfall/visualization/reductions.py +173 -0
- lightfall-0.2.0/src/lightfall/visualization/scan_geometry.py +58 -0
- lightfall-0.2.0/src/lightfall/visualization/stream_bridge.py +48 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/visualization/theme.py +10 -74
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/visualization/widgets/adaptive/heatmap.py +20 -6
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/visualization/widgets/heatmap.py +5 -3
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/visualization/widgets/image_stack.py +99 -27
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/visualization/widgets/image_view_toolbar.py +57 -3
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/visualization/widgets/lazy_image_view.py +51 -10
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/visualization/widgets/plot_1d.py +3 -2
- lightfall-0.2.0/src/lightfall/visualization/widgets/scan_viewer.py +500 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/visualization/widgets/scatter.py +2 -1
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/visualization/widgets/table.py +2 -1
- lightfall-0.1.1/src/lightfall/acquire/device_wrapper.py +0 -416
- lightfall-0.1.1/src/lightfall/acquire/engine/bluesky.py +0 -358
- lightfall-0.1.1/src/lightfall/acquire/plans/example_plans.py +0 -995
- lightfall-0.1.1/src/lightfall/acquire/plans/standard_plans.py +0 -186
- lightfall-0.1.1/src/lightfall/claude/_session_assembly.py +0 -124
- lightfall-0.1.1/src/lightfall/devices/monitoring.py +0 -442
- lightfall-0.1.1/src/lightfall/logbook/__init__.py +0 -46
- lightfall-0.1.1/src/lightfall/logbook/action_dialog.py +0 -207
- lightfall-0.1.1/src/lightfall/logbook/block_mapper.py +0 -562
- lightfall-0.1.1/src/lightfall/logbook/converter.py +0 -273
- lightfall-0.1.1/src/lightfall/logbook/editors/__init__.py +0 -19
- lightfall-0.1.1/src/lightfall/logbook/editors/highlighter.py +0 -305
- lightfall-0.1.1/src/lightfall/logbook/editors/markdown_editor.py +0 -319
- lightfall-0.1.1/src/lightfall/logbook/editors/richtext_editor.py +0 -1397
- lightfall-0.1.1/src/lightfall/logbook/position_mapper.py +0 -320
- lightfall-0.1.1/src/lightfall/logbook/protection.py +0 -402
- lightfall-0.1.1/src/lightfall/logbook/visual_protection.py +0 -330
- lightfall-0.1.1/src/lightfall/logbook/widget.py +0 -680
- lightfall-0.1.1/src/lightfall/plugins/agents/alignment.py +0 -94
- lightfall-0.1.1/src/lightfall/plugins/agents/scan_planning.py +0 -101
- lightfall-0.1.1/src/lightfall/project/__init__.py +0 -37
- lightfall-0.1.1/src/lightfall/project/model.py +0 -375
- lightfall-0.1.1/src/lightfall/project/service.py +0 -427
- lightfall-0.1.1/src/lightfall/project/welcome.py +0 -106
- lightfall-0.1.1/src/lightfall/ui/dialogs/login_dialog.py +0 -756
- lightfall-0.1.1/src/lightfall/ui/docking/theme.py +0 -399
- lightfall-0.1.1/src/lightfall/ui/docking/widget.py +0 -214
- lightfall-0.1.1/src/lightfall/ui/panels/claude_panel.py +0 -887
- lightfall-0.1.1/src/lightfall/ui/panels/visualization_panel.py +0 -508
- lightfall-0.1.1/src/lightfall/ui/preferences/skill_settings.py +0 -28
- lightfall-0.1.1/src/lightfall/ui/resources/logo.png +0 -0
- lightfall-0.1.1/src/lightfall/ui/statusbar/plugins/auth_status.py +0 -116
- lightfall-0.1.1/src/lightfall/ui/statusbar/plugins/connection_status.py +0 -100
- lightfall-0.1.1/src/lightfall/ui/statusbar/plugins/user_status.py +0 -84
- lightfall-0.1.1/src/lightfall/ui/widgets/tiled_status.py +0 -149
- lightfall-0.1.1/src/lightfall/utils/tiled_helpers.py +0 -96
- lightfall-0.1.1/src/lightfall/visualization/memory.py +0 -392
- lightfall-0.1.1/src/lightfall/visualization/motor_mixin.py +0 -524
- {lightfall-0.1.1 → lightfall-0.2.0}/.gitignore +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/LEGAL.md +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/LICENSE.md +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/__init__.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/__main__.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/acquire/buffer.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/acquire/engine/__init__.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/acquire/engine/plugins/__init__.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/acquire/engine/plugins/bluesky_plugin.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/acquire/engine/plugins/mock_plugin.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/acquire/engine/registry.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/acquire/engine/state.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/acquire/nats_bridge.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/acquire/plan_ui.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/acquire/plans/__init__.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/acquire/plans/user_plans.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/acquire/runengine.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/acquire/signals.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/acquire/triggers/__init__.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/acquire/triggers/base.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/acquire/triggers/filter.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/acquire/triggers/manager.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/acquire/triggers/manual.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/acquire/triggers/run_end.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/acquire/triggers/run_start.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/auth/__init__.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/auth/policy.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/auth/providers/__init__.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/auth/providers/local.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/auth/providers/pam.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/auth/service_key_auth.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/claude/__init__.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/claude/_internal/__init__.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/claude/_internal/serialization.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/claude/_internal/threading.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/claude/markdown.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/claude/tools/__init__.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/claude/tools/controller.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/claude/tools/introspection.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/claude/tools/logs.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/claude/widgets/__init__.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/claude/widgets/question_request.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/config/__init__.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/config/layers.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/config/manager.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/config/schema.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/core/__init__.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/core/services.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/devices/backends/__init__.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/devices/model.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/devices/sim/__init__.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/devices/sim/areadetector.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/devices/sim/generators.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/devices/sim/plugins.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/epics/__init__.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/epics/ca/__init__.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/epics/ca/context.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/epics/ca/pv.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/epics/widgets/__init__.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/epics/widgets/areadetector/__init__.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/epics/widgets/areadetector/areadetector.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/epics/widgets/areadetector/image_view.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/epics/widgets/auto.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/epics/widgets/base.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/epics/widgets/checkbox.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/epics/widgets/combobox.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/epics/widgets/label.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/epics/widgets/lineedit.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/epics/widgets/ophyd_base.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/epics/widgets/ophyd_combobox.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/epics/widgets/ophyd_label.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/epics/widgets/ophyd_lineedit.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/epics/widgets/ophyd_spinbox.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/epics/widgets/slider.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/epics/widgets/status_indicator.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/epics/widgets/style.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/exporter/__init__.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/exporter/cli.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/exporter/converters/__init__.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/exporter/converters/base.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/exporter/converters/noop.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/exporter/converters/nxsas.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/exporter/service.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/exporter/tiled_utils.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ipc/__init__.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ipc/trust.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/logbook/action_logger.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/logbook/event_listener.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/logbook/url.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/pipelines/__init__.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/pipelines/client.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/plugins/agents/_mcp_helpers.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/plugins/agents/autonomous_experiment/__init__.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/plugins/agents/autonomous_experiment/nats_tools.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/plugins/agents/autonomous_experiment/prompts.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/plugins/controller_plugin.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/plugins/engine_plugin.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/plugins/errors.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/plugins/info.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/plugins/manifest.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/plugins/plan_plugin.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/plugins/registry.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/plugins/settings_plugin.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/plugins/theme_plugin.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/plugins/types.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/resources/__init__.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/resources/images/__init__.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/resources/images/icon.ico +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/resources/images/icon.png +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/resources/images/logo.png +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/services/__init__.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/services/_alshub_client.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/services/access_stamper.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/services/ca_tunnel.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/services/tiled_auth.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/settings/__init__.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/settings/image_helpers.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/settings/user_settings_client.py +0 -0
- {lightfall-0.1.1/src/lightfall/plugins/agents → lightfall-0.2.0/src/lightfall/skills/builtin}/panel_design/references/cross_panel_patterns.md +0 -0
- {lightfall-0.1.1/src/lightfall/plugins/agents → lightfall-0.2.0/src/lightfall/skills/builtin}/plan_design/references/plan_design.md +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/__init__.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/common/__init__.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/dialogs/add_trigger_dialog.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/dialogs/base.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/dialogs/create_plan_dialog.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/dialogs/device_edit_dialog.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/dialogs/go_to_position_dialog.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/dialogs/run_pipeline_dialog.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/dialogs/sample_metadata_dialog.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/docking/__init__.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/events.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/models/__init__.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/models/thread_model.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/models/tiled_model.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/panels/device_panel.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/panels/pipeline_jobs_panel.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/panels/plugins/bluesky_plugin.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/panels/plugins/claude_plugin.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/panels/plugins/device_plugin.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/panels/plugins/documents_plugin.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/panels/plugins/ipython_plugin.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/panels/plugins/logbook_entries_plugin.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/panels/plugins/logbook_plugin.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/panels/plugins/logging_plugin.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/panels/plugins/pipeline_jobs_plugin.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/panels/plugins/pipeline_triggers_plugin.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/panels/plugins/queue_plugin.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/panels/plugins/synoptic_plugin.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/panels/plugins/threads_plugin.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/panels/plugins/tiled_browser_plugin.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/panels/plugins/visualization_plugin.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/panels/synoptic/__init__.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/panels/synoptic/items.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/panels/synoptic/models.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/panels/synoptic/panel.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/panels/synoptic/serialization.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/panels/synoptic/view.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/panels/threads_panel.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/preferences/__init__.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/preferences/backend.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/preferences/device_settings.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/preferences/editor_settings.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/preferences/logbook_settings.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/preferences/plugin_settings.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/preferences/user_portable_backend.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/preferences/user_profile_settings.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/preferences/visualization_settings.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/resources/__init__.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/statusbar/__init__.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/statusbar/manager.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/theater/__init__.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/theater/overlay.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/theme/registry.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/toast.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/widgets/base_control.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/widgets/camera/__init__.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/widgets/camera/dark_frames.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/widgets/camera/panels/__init__.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/widgets/camera/panels/cooler.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/widgets/camera/panels/temperature.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/widgets/camera/plan_based.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/widgets/controller_matcher.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/widgets/controller_registry.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/widgets/favorites_tab.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/widgets/observers/__init__.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/widgets/observers/camera.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/widgets/plan_edit_dialog.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/widgets/profile_avatar.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/widgets/queue_view.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/widgets/skill_trigger_button.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/utils/__init__.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/utils/crash_diagnostics.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/utils/data_migration.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/utils/editor_launcher.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/utils/error_collector.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/utils/git_tracker.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/utils/log_buffer.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/utils/logging.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/utils/module_resolver.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/visualization/base.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/visualization/fitting/base.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/visualization/fitting/panel.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/visualization/pg.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/visualization/registry.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/visualization/spec.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/visualization/widgets/__init__.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/visualization/widgets/adaptive/__init__.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/visualization/widgets/adaptive/plot.py +0 -0
- {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/visualization/widgets/time_axis.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: lightfall
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.2.0
|
|
4
4
|
Summary: Lightfall - control system for the ALS facility
|
|
5
5
|
Project-URL: Homepage, https://github.com/als-controls/lightfall
|
|
6
6
|
Project-URL: Documentation, https://als-controls.github.io/lightfall
|
|
@@ -25,7 +25,7 @@ Requires-Dist: aiohttp>=3.8
|
|
|
25
25
|
Requires-Dist: bluesky-tiled-plugins>=2.0
|
|
26
26
|
Requires-Dist: bluesky>=1.10
|
|
27
27
|
Requires-Dist: caproto>=1.1
|
|
28
|
-
Requires-Dist: claude-agent-sdk>=0.2.
|
|
28
|
+
Requires-Dist: claude-agent-sdk>=0.2.93
|
|
29
29
|
Requires-Dist: h5py>=3.0
|
|
30
30
|
Requires-Dist: happi>=2.0
|
|
31
31
|
Requires-Dist: httpx[socks]>=0.27
|
|
@@ -46,6 +46,7 @@ Requires-Dist: qtawesome>=1.3
|
|
|
46
46
|
Requires-Dist: qtconsole>=5.5
|
|
47
47
|
Requires-Dist: scipy>=1.11
|
|
48
48
|
Requires-Dist: sentry-sdk[loguru]>=2.0
|
|
49
|
+
Requires-Dist: sqlalchemy>=2.0
|
|
49
50
|
Requires-Dist: tiled[client]>=0.2.5
|
|
50
51
|
Provides-Extra: dev
|
|
51
52
|
Requires-Dist: mypy>=1.8; extra == 'dev'
|
|
@@ -60,16 +61,18 @@ Provides-Extra: docs
|
|
|
60
61
|
Requires-Dist: myst-parser>=2.0; extra == 'docs'
|
|
61
62
|
Requires-Dist: sphinx-immaterial>=0.12; extra == 'docs'
|
|
62
63
|
Requires-Dist: sphinx<9.0,>=7.0; extra == 'docs'
|
|
64
|
+
Provides-Extra: local-nats
|
|
65
|
+
Requires-Dist: nats-server-bin>=2.14; extra == 'local-nats'
|
|
63
66
|
Description-Content-Type: text/markdown
|
|
64
67
|
|
|
65
68
|
# Lightfall
|
|
66
69
|
|
|
67
70
|
<!-- badges:start -->
|
|
71
|
+
[](https://pypi.org/project/lightfall/)
|
|
72
|
+
[](https://pypi.org/project/lightfall/)
|
|
68
73
|
[](https://github.com/als-controls/lightfall/actions/workflows/ci.yml)
|
|
69
74
|
[](https://als-controls.github.io/lightfall/)
|
|
70
|
-
[](https://github.com/als-controls/lightfall/blob/master/pyproject.toml)
|
|
71
75
|
[](LICENSE.md)
|
|
72
|
-
[](https://doi.org/10.5281/zenodo.20545717)
|
|
73
76
|
<!-- badges:end -->
|
|
74
77
|
|
|
75
78
|
A modern, unified control system for synchrotron lightsource facilities that provides facility-wide consistency with beamline-specific customization.
|
|
@@ -117,17 +120,6 @@ Lightfall is designed for the Advanced Light Source (ALS) facility, providing:
|
|
|
117
120
|
pip install lightfall
|
|
118
121
|
```
|
|
119
122
|
|
|
120
|
-
### BCS backend (ALS-internal)
|
|
121
|
-
|
|
122
|
-
The BCS device backend requires `bcsophyd-zmq`, which is distributed from ALS
|
|
123
|
-
GitLab rather than PyPI:
|
|
124
|
-
|
|
125
|
-
```bash
|
|
126
|
-
pip install "bcsophyd @ git+https://git.als.lbl.gov/bcs/bluesky/bcsophyd-zmq"
|
|
127
|
-
```
|
|
128
|
-
|
|
129
|
-
Without it, Lightfall runs normally; only the BCS backend is unavailable.
|
|
130
|
-
|
|
131
123
|
### Development Installation
|
|
132
124
|
|
|
133
125
|
```bash
|
|
@@ -203,21 +195,29 @@ mypy src
|
|
|
203
195
|
## Project Structure
|
|
204
196
|
|
|
205
197
|
```
|
|
206
|
-
|
|
207
|
-
├── src/
|
|
208
|
-
│ ├── acquire/
|
|
209
|
-
│ ├── auth/
|
|
210
|
-
│ ├──
|
|
211
|
-
│ ├──
|
|
212
|
-
│ ├──
|
|
213
|
-
│ ├──
|
|
214
|
-
│ ├──
|
|
215
|
-
│ ├──
|
|
216
|
-
│
|
|
217
|
-
│
|
|
198
|
+
lightfall/
|
|
199
|
+
├── src/lightfall/
|
|
200
|
+
│ ├── acquire/ # Data acquisition engine (Bluesky RunEngine, plans)
|
|
201
|
+
│ ├── auth/ # Authentication & authorization
|
|
202
|
+
│ ├── claude/ # Embedded Claude agent integration
|
|
203
|
+
│ ├── config/ # Configuration management
|
|
204
|
+
│ ├── core/ # Core application classes
|
|
205
|
+
│ ├── devices/ # Device catalog & backends
|
|
206
|
+
│ ├── epics/ # EPICS (caproto) widgets & helpers
|
|
207
|
+
│ ├── exporter/ # Data exporter CLI
|
|
208
|
+
│ ├── ipc/ # Inter-process communication (NATS)
|
|
209
|
+
│ ├── logbook/ # Logbook client
|
|
210
|
+
│ ├── pipelines/ # Pipeline client
|
|
211
|
+
│ ├── plugins/ # Plugin system
|
|
212
|
+
│ ├── services/ # Application services (Tiled, CA tunnel, etc.)
|
|
213
|
+
│ ├── settings/ # User-portable settings client
|
|
214
|
+
│ ├── ui/ # User interface
|
|
215
|
+
│ │ ├── panels/ # Panel implementations
|
|
216
|
+
│ │ ├── widgets/ # Reusable widgets
|
|
218
217
|
│ │ ├── preferences/ # Settings UI
|
|
219
|
-
│ │ └── theme/
|
|
220
|
-
│
|
|
221
|
-
└──
|
|
218
|
+
│ │ └── theme/ # Theming system
|
|
219
|
+
│ ├── utils/ # Utilities
|
|
220
|
+
│ └── visualization/ # Plotting & live visualization
|
|
221
|
+
└── tests/ # Test suite
|
|
222
222
|
```
|
|
223
223
|
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
# Lightfall
|
|
2
2
|
|
|
3
3
|
<!-- badges:start -->
|
|
4
|
+
[](https://pypi.org/project/lightfall/)
|
|
5
|
+
[](https://pypi.org/project/lightfall/)
|
|
4
6
|
[](https://github.com/als-controls/lightfall/actions/workflows/ci.yml)
|
|
5
7
|
[](https://als-controls.github.io/lightfall/)
|
|
6
|
-
[](https://github.com/als-controls/lightfall/blob/master/pyproject.toml)
|
|
7
8
|
[](LICENSE.md)
|
|
8
|
-
[](https://doi.org/10.5281/zenodo.20545717)
|
|
9
9
|
<!-- badges:end -->
|
|
10
10
|
|
|
11
11
|
A modern, unified control system for synchrotron lightsource facilities that provides facility-wide consistency with beamline-specific customization.
|
|
@@ -53,17 +53,6 @@ Lightfall is designed for the Advanced Light Source (ALS) facility, providing:
|
|
|
53
53
|
pip install lightfall
|
|
54
54
|
```
|
|
55
55
|
|
|
56
|
-
### BCS backend (ALS-internal)
|
|
57
|
-
|
|
58
|
-
The BCS device backend requires `bcsophyd-zmq`, which is distributed from ALS
|
|
59
|
-
GitLab rather than PyPI:
|
|
60
|
-
|
|
61
|
-
```bash
|
|
62
|
-
pip install "bcsophyd @ git+https://git.als.lbl.gov/bcs/bluesky/bcsophyd-zmq"
|
|
63
|
-
```
|
|
64
|
-
|
|
65
|
-
Without it, Lightfall runs normally; only the BCS backend is unavailable.
|
|
66
|
-
|
|
67
56
|
### Development Installation
|
|
68
57
|
|
|
69
58
|
```bash
|
|
@@ -139,21 +128,29 @@ mypy src
|
|
|
139
128
|
## Project Structure
|
|
140
129
|
|
|
141
130
|
```
|
|
142
|
-
|
|
143
|
-
├── src/
|
|
144
|
-
│ ├── acquire/
|
|
145
|
-
│ ├── auth/
|
|
146
|
-
│ ├──
|
|
147
|
-
│ ├──
|
|
148
|
-
│ ├──
|
|
149
|
-
│ ├──
|
|
150
|
-
│ ├──
|
|
151
|
-
│ ├──
|
|
152
|
-
│
|
|
153
|
-
│
|
|
131
|
+
lightfall/
|
|
132
|
+
├── src/lightfall/
|
|
133
|
+
│ ├── acquire/ # Data acquisition engine (Bluesky RunEngine, plans)
|
|
134
|
+
│ ├── auth/ # Authentication & authorization
|
|
135
|
+
│ ├── claude/ # Embedded Claude agent integration
|
|
136
|
+
│ ├── config/ # Configuration management
|
|
137
|
+
│ ├── core/ # Core application classes
|
|
138
|
+
│ ├── devices/ # Device catalog & backends
|
|
139
|
+
│ ├── epics/ # EPICS (caproto) widgets & helpers
|
|
140
|
+
│ ├── exporter/ # Data exporter CLI
|
|
141
|
+
│ ├── ipc/ # Inter-process communication (NATS)
|
|
142
|
+
│ ├── logbook/ # Logbook client
|
|
143
|
+
│ ├── pipelines/ # Pipeline client
|
|
144
|
+
│ ├── plugins/ # Plugin system
|
|
145
|
+
│ ├── services/ # Application services (Tiled, CA tunnel, etc.)
|
|
146
|
+
│ ├── settings/ # User-portable settings client
|
|
147
|
+
│ ├── ui/ # User interface
|
|
148
|
+
│ │ ├── panels/ # Panel implementations
|
|
149
|
+
│ │ ├── widgets/ # Reusable widgets
|
|
154
150
|
│ │ ├── preferences/ # Settings UI
|
|
155
|
-
│ │ └── theme/
|
|
156
|
-
│
|
|
157
|
-
└──
|
|
151
|
+
│ │ └── theme/ # Theming system
|
|
152
|
+
│ ├── utils/ # Utilities
|
|
153
|
+
│ └── visualization/ # Plotting & live visualization
|
|
154
|
+
└── tests/ # Test suite
|
|
158
155
|
```
|
|
159
156
|
|
|
@@ -56,6 +56,11 @@ dependencies = [
|
|
|
56
56
|
# tiled
|
|
57
57
|
"tiled[client]>=0.2.5",
|
|
58
58
|
"bluesky-tiled-plugins>=2.0",
|
|
59
|
+
# bluesky-tiled-plugins>=2.0 imports tiled.storage, which imports
|
|
60
|
+
# sqlalchemy at module top level. sqlalchemy ships only with tiled's
|
|
61
|
+
# [server] extra (via alembic), not [client], so it must be declared
|
|
62
|
+
# explicitly or a client-only install fails to import lightfall.services.
|
|
63
|
+
"sqlalchemy>=2.0",
|
|
59
64
|
# networking / proxy support
|
|
60
65
|
"httpx[socks]>=0.27",
|
|
61
66
|
"aiohttp>=3.8",
|
|
@@ -64,15 +69,18 @@ dependencies = [
|
|
|
64
69
|
# ipython
|
|
65
70
|
"qtconsole>=5.5",
|
|
66
71
|
"ipykernel>=6.0",
|
|
67
|
-
"claude-agent-sdk>=0.2.
|
|
72
|
+
"claude-agent-sdk>=0.2.93",
|
|
68
73
|
"happi>=2.0",
|
|
69
74
|
"nats-py>=2.0",
|
|
70
75
|
]
|
|
71
76
|
|
|
72
77
|
[project.optional-dependencies]
|
|
73
|
-
#
|
|
74
|
-
#
|
|
75
|
-
#
|
|
78
|
+
# Bundles a nats-server binary so the optional local-broker feature works
|
|
79
|
+
# without a system install. The feature is gated on detecting a nats-server
|
|
80
|
+
# executable at runtime, so this extra is not required.
|
|
81
|
+
local-nats = [
|
|
82
|
+
"nats-server-bin>=2.14",
|
|
83
|
+
]
|
|
76
84
|
dev = [
|
|
77
85
|
"pytest>=8.0",
|
|
78
86
|
"pytest-cov>=4.0",
|
|
@@ -115,9 +123,10 @@ include = [
|
|
|
115
123
|
|
|
116
124
|
[tool.hatch.build.targets.wheel]
|
|
117
125
|
packages = ["src/lightfall"]
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
126
|
+
# No force-include table here: everything under src/lightfall (logo.png, skills/,
|
|
127
|
+
# agents/builtin/) is tracked and already picked up by `packages`. Force-including
|
|
128
|
+
# those paths made hatchling add each file twice and hard-failed the wheel build
|
|
129
|
+
# ("A second file is being added to the wheel archive at the same path").
|
|
121
130
|
|
|
122
131
|
[tool.ruff]
|
|
123
132
|
line-length = 100
|
|
@@ -208,12 +217,24 @@ requires = [
|
|
|
208
217
|
# Async/HTTP
|
|
209
218
|
"aiohttp>=3.8",
|
|
210
219
|
"aiohttp-socks>=0.8",
|
|
220
|
+
"httpx[socks]>=0.27",
|
|
221
|
+
"PySocks>=1.7",
|
|
222
|
+
"nats-py>=2.0",
|
|
223
|
+
|
|
224
|
+
# EPICS
|
|
225
|
+
"caproto>=1.1",
|
|
226
|
+
# see [project].dependencies for why netifaces is excluded on macOS
|
|
227
|
+
"netifaces>=0.11; sys_platform != 'darwin'",
|
|
211
228
|
|
|
212
229
|
# Data acquisition
|
|
213
230
|
"bluesky>=1.10",
|
|
214
231
|
"ophyd>=1.7",
|
|
232
|
+
"happi>=2.0",
|
|
233
|
+
"h5py>=3.0",
|
|
215
234
|
"tiled[client]>=0.2.5",
|
|
216
235
|
"bluesky-tiled-plugins>=2.0",
|
|
236
|
+
# see [project].dependencies for why sqlalchemy must be declared explicitly
|
|
237
|
+
"sqlalchemy>=2.0",
|
|
217
238
|
|
|
218
239
|
# IPython integration
|
|
219
240
|
"qtconsole>=5.5",
|
|
@@ -232,7 +253,7 @@ requires = [
|
|
|
232
253
|
"cryptography>=41.0",
|
|
233
254
|
"bidict>=0.23",
|
|
234
255
|
|
|
235
|
-
"claude-agent-sdk>=0.2.
|
|
256
|
+
"claude-agent-sdk>=0.2.93",
|
|
236
257
|
]
|
|
237
258
|
|
|
238
259
|
[tool.briefcase.app.lightfall.macOS]
|
|
@@ -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 = '0.
|
|
22
|
-
__version_tuple__ = version_tuple = (0,
|
|
21
|
+
__version__ = version = '0.2.0'
|
|
22
|
+
__version_tuple__ = version_tuple = (0, 2, 0)
|
|
23
23
|
|
|
24
24
|
__commit_id__ = commit_id = None
|
|
@@ -9,14 +9,12 @@ Components:
|
|
|
9
9
|
- BlueskyEngine: Bluesky RunEngine wrapper (also available as QRunEngine)
|
|
10
10
|
- MockEngine: Simple mock engine for testing
|
|
11
11
|
- get_engine: Singleton accessor for the default engine
|
|
12
|
-
- LFDevice: Generic wrapper adding metadata/policy to ophyd devices
|
|
13
12
|
- SignalConfiguration: UI model for signal selection
|
|
14
13
|
- LiveDataBuffer: Thread-safe document streaming to Qt
|
|
15
14
|
- PlanRegistry: Central registry of available plans
|
|
16
15
|
"""
|
|
17
16
|
|
|
18
17
|
from lightfall.acquire.buffer import LiveDataBuffer
|
|
19
|
-
from lightfall.acquire.device_wrapper import LFDevice, wrap_device
|
|
20
18
|
from lightfall.acquire.engine import (
|
|
21
19
|
BaseEngine,
|
|
22
20
|
BlueskyEngine,
|
|
@@ -61,9 +59,6 @@ __all__ = [
|
|
|
61
59
|
# Backward compatibility
|
|
62
60
|
"QRunEngine",
|
|
63
61
|
"get_run_engine",
|
|
64
|
-
# Device wrapper
|
|
65
|
-
"LFDevice",
|
|
66
|
-
"wrap_device",
|
|
67
62
|
# Signals
|
|
68
63
|
"SignalConfiguration",
|
|
69
64
|
"SignalDefinition",
|
|
@@ -5,6 +5,7 @@ Provides a base class with common functionality for engines.
|
|
|
5
5
|
|
|
6
6
|
from __future__ import annotations
|
|
7
7
|
|
|
8
|
+
import threading
|
|
8
9
|
import uuid
|
|
9
10
|
from collections.abc import Callable
|
|
10
11
|
from dataclasses import dataclass, field
|
|
@@ -81,6 +82,11 @@ class BaseEngine(QObject):
|
|
|
81
82
|
sigReady = Signal()
|
|
82
83
|
sigStateChanged = Signal(str)
|
|
83
84
|
sigQueueChanged = Signal() # Emitted when queue items are added/removed/reordered
|
|
85
|
+
# Emitted when a specific submitted procedure terminates, carrying its
|
|
86
|
+
# submit() id and the error that ended it (None on success/abort). Unlike
|
|
87
|
+
# the broad sigFinish/sigAbort/sigException, this lets a caller correlate
|
|
88
|
+
# completion with the exact procedure it submitted.
|
|
89
|
+
sigProcedureFinished = Signal(str, object) # (procedure_id, error_or_None)
|
|
84
90
|
|
|
85
91
|
def __init__(
|
|
86
92
|
self, name: str = "engine", *, toast_notifications: bool = True, **kwargs: Any
|
|
@@ -98,6 +104,11 @@ class BaseEngine(QObject):
|
|
|
98
104
|
self._state = EngineState.IDLE
|
|
99
105
|
self._queue: PriorityQueue[PrioritizedProcedure] = PriorityQueue()
|
|
100
106
|
self._queue_items: list[PrioritizedProcedure] = [] # Parallel list for management
|
|
107
|
+
# Guards every compound operation on _queue + _queue_items. Worker
|
|
108
|
+
# threads must NOT hold it while blocking on _queue.get(); instead
|
|
109
|
+
# they claim popped items via _claim_queued_item, which re-validates
|
|
110
|
+
# membership under the lock.
|
|
111
|
+
self._queue_lock = threading.RLock()
|
|
101
112
|
self._current_procedure: PrioritizedProcedure | None = None # Currently running
|
|
102
113
|
self._subscribers: dict[int, Callable[[str, dict], Any]] = {}
|
|
103
114
|
self._next_token = 0
|
|
@@ -139,8 +150,14 @@ class BaseEngine(QObject):
|
|
|
139
150
|
|
|
140
151
|
@property
|
|
141
152
|
def queue_size(self) -> int:
|
|
142
|
-
"""Number of procedures waiting in the queue.
|
|
143
|
-
|
|
153
|
+
"""Number of procedures waiting in the queue.
|
|
154
|
+
|
|
155
|
+
Counts the tracking list rather than the PriorityQueue — the queue
|
|
156
|
+
can transiently hold stale duplicates left behind by a rebuild that
|
|
157
|
+
raced a worker pop (they are skipped, never executed).
|
|
158
|
+
"""
|
|
159
|
+
with self._queue_lock:
|
|
160
|
+
return len(self._queue_items)
|
|
144
161
|
|
|
145
162
|
@property
|
|
146
163
|
def toast_notifications(self) -> bool:
|
|
@@ -195,9 +212,10 @@ class BaseEngine(QObject):
|
|
|
195
212
|
return None
|
|
196
213
|
|
|
197
214
|
item = PrioritizedProcedure(priority, procedure, kwargs, name=name)
|
|
198
|
-
self.
|
|
199
|
-
|
|
200
|
-
|
|
215
|
+
with self._queue_lock:
|
|
216
|
+
self._queue.put(item)
|
|
217
|
+
self._queue_items.append(item)
|
|
218
|
+
self._queue_items.sort(key=lambda x: x.priority)
|
|
201
219
|
logger.debug(f"[{self._name}] Queued '{name}' with priority {priority}, id={item.id[:8]}")
|
|
202
220
|
self.sigQueueChanged.emit()
|
|
203
221
|
return item.id
|
|
@@ -222,16 +240,20 @@ class BaseEngine(QObject):
|
|
|
222
240
|
return str(procedure.func.__name__)
|
|
223
241
|
return "procedure"
|
|
224
242
|
|
|
225
|
-
def __call__(self, *args: Any, **kwargs: Any) -> None:
|
|
243
|
+
def __call__(self, *args: Any, **kwargs: Any) -> str | None:
|
|
226
244
|
"""Convenience method for submit().
|
|
227
245
|
|
|
228
246
|
If a single positional argument is provided, it's used as the procedure.
|
|
229
247
|
Otherwise, all args are bundled as the procedure.
|
|
248
|
+
|
|
249
|
+
Returns:
|
|
250
|
+
The submitted procedure's id (as from :py:meth:`submit`), or None
|
|
251
|
+
if a pre-submit hook cancelled it.
|
|
230
252
|
"""
|
|
231
253
|
skip_pre_submit = kwargs.pop("skip_pre_submit", False)
|
|
232
254
|
if args:
|
|
233
255
|
procedure = args[0] if len(args) == 1 else args
|
|
234
|
-
self.submit(procedure, skip_pre_submit=skip_pre_submit, **kwargs)
|
|
256
|
+
return self.submit(procedure, skip_pre_submit=skip_pre_submit, **kwargs)
|
|
235
257
|
else:
|
|
236
258
|
raise ValueError("No procedure provided")
|
|
237
259
|
|
|
@@ -241,14 +263,14 @@ class BaseEngine(QObject):
|
|
|
241
263
|
Returns:
|
|
242
264
|
Number of procedures removed.
|
|
243
265
|
"""
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
266
|
+
with self._queue_lock:
|
|
267
|
+
while True:
|
|
268
|
+
try:
|
|
269
|
+
self._queue.get_nowait()
|
|
270
|
+
except Empty:
|
|
271
|
+
break
|
|
272
|
+
count = len(self._queue_items)
|
|
273
|
+
self._queue_items.clear()
|
|
252
274
|
if count:
|
|
253
275
|
logger.info(f"[{self._name}] Cleared {count} procedures from queue")
|
|
254
276
|
self.sigQueueChanged.emit()
|
|
@@ -260,7 +282,8 @@ class BaseEngine(QObject):
|
|
|
260
282
|
Returns:
|
|
261
283
|
List of queued procedures sorted by priority.
|
|
262
284
|
"""
|
|
263
|
-
|
|
285
|
+
with self._queue_lock:
|
|
286
|
+
return list(self._queue_items)
|
|
264
287
|
|
|
265
288
|
def get_current_procedure(self) -> PrioritizedProcedure | None:
|
|
266
289
|
"""Get the currently running procedure, if any.
|
|
@@ -279,9 +302,10 @@ class BaseEngine(QObject):
|
|
|
279
302
|
Returns:
|
|
280
303
|
The procedure if found, None otherwise.
|
|
281
304
|
"""
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
305
|
+
with self._queue_lock:
|
|
306
|
+
for item in self._queue_items:
|
|
307
|
+
if item.id == procedure_id:
|
|
308
|
+
return item
|
|
285
309
|
return None
|
|
286
310
|
|
|
287
311
|
def remove_from_queue(self, procedure_id: str) -> bool:
|
|
@@ -291,24 +315,24 @@ class BaseEngine(QObject):
|
|
|
291
315
|
procedure_id: The ID of the procedure to remove.
|
|
292
316
|
|
|
293
317
|
Returns:
|
|
294
|
-
True if the procedure was found and removed.
|
|
318
|
+
True if the procedure was found and removed. False if it was not
|
|
319
|
+
queued — including when it already started executing.
|
|
295
320
|
"""
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
self._rebuild_priority_queue()
|
|
321
|
+
with self._queue_lock:
|
|
322
|
+
# PrioritizedProcedure.__eq__ compares only priority, so the
|
|
323
|
+
# removal must be by index, not list.remove().
|
|
324
|
+
index = next(
|
|
325
|
+
(i for i, item in enumerate(self._queue_items) if item.id == procedure_id),
|
|
326
|
+
None,
|
|
327
|
+
)
|
|
328
|
+
if index is None:
|
|
329
|
+
logger.warning(f"[{self._name}] Procedure {procedure_id[:8]} not found in queue")
|
|
330
|
+
return False
|
|
331
|
+
|
|
332
|
+
del self._queue_items[index]
|
|
333
|
+
|
|
334
|
+
# Rebuild the priority queue without this item
|
|
335
|
+
self._rebuild_priority_queue()
|
|
312
336
|
|
|
313
337
|
logger.info(f"[{self._name}] Removed procedure {procedure_id[:8]} from queue")
|
|
314
338
|
self.sigQueueChanged.emit()
|
|
@@ -324,26 +348,26 @@ class BaseEngine(QObject):
|
|
|
324
348
|
Returns:
|
|
325
349
|
True if the procedure was found and updated.
|
|
326
350
|
"""
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
351
|
+
with self._queue_lock:
|
|
352
|
+
for item in self._queue_items:
|
|
353
|
+
if item.id == procedure_id:
|
|
354
|
+
old_priority = item.priority
|
|
355
|
+
# Create new item with updated priority (dataclass is frozen by order=True)
|
|
356
|
+
# We need to modify the object directly since we're using it in a list
|
|
357
|
+
object.__setattr__(item, "priority", new_priority)
|
|
358
|
+
|
|
359
|
+
# Re-sort the tracking list
|
|
360
|
+
self._queue_items.sort(key=lambda x: x.priority)
|
|
361
|
+
|
|
362
|
+
# Rebuild the priority queue
|
|
363
|
+
self._rebuild_priority_queue()
|
|
364
|
+
|
|
365
|
+
logger.debug(
|
|
366
|
+
f"[{self._name}] Updated priority for {procedure_id[:8]}: "
|
|
367
|
+
f"{old_priority} -> {new_priority}"
|
|
368
|
+
)
|
|
369
|
+
self.sigQueueChanged.emit()
|
|
370
|
+
return True
|
|
347
371
|
|
|
348
372
|
logger.warning(f"[{self._name}] Procedure {procedure_id[:8]} not found in queue")
|
|
349
373
|
return False
|
|
@@ -351,38 +375,72 @@ class BaseEngine(QObject):
|
|
|
351
375
|
def _rebuild_priority_queue(self) -> None:
|
|
352
376
|
"""Rebuild the PriorityQueue from the tracking list.
|
|
353
377
|
|
|
354
|
-
Called after removing items or updating priorities.
|
|
378
|
+
Called after removing items or updating priorities. Caller must hold
|
|
379
|
+
``_queue_lock`` (taken re-entrantly here as well). A worker blocked in
|
|
380
|
+
``_queue.get()`` may steal an entry mid-drain; because it re-validates
|
|
381
|
+
via ``_claim_queued_item`` before executing, the worst case is a stale
|
|
382
|
+
duplicate in the queue, never a lost or doubly-executed item.
|
|
355
383
|
"""
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
384
|
+
with self._queue_lock:
|
|
385
|
+
# Drain the old queue
|
|
386
|
+
while True:
|
|
387
|
+
try:
|
|
388
|
+
self._queue.get_nowait()
|
|
389
|
+
except Empty:
|
|
390
|
+
break
|
|
391
|
+
|
|
392
|
+
# Re-add all items
|
|
393
|
+
for item in self._queue_items:
|
|
394
|
+
self._queue.put(item)
|
|
395
|
+
|
|
396
|
+
def _claim_queued_item(self, item: PrioritizedProcedure) -> bool:
|
|
397
|
+
"""Atomically claim an item popped from the priority queue.
|
|
398
|
+
|
|
399
|
+
Worker threads block on ``_queue.get()`` without holding
|
|
400
|
+
``_queue_lock``, so by the time they hold the item it may have been
|
|
401
|
+
removed via ``remove_from_queue``/``clear_queue``, or be a stale
|
|
402
|
+
duplicate re-queued by ``_rebuild_priority_queue``. Only an item
|
|
403
|
+
still present in the tracking list may execute; claiming untracks
|
|
404
|
+
it and sets it as the current procedure in one locked step.
|
|
362
405
|
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
406
|
+
Args:
|
|
407
|
+
item: The procedure popped from ``_queue``.
|
|
408
|
+
|
|
409
|
+
Returns:
|
|
410
|
+
True if the item was claimed and may execute; False if it must
|
|
411
|
+
be skipped.
|
|
412
|
+
"""
|
|
413
|
+
with self._queue_lock:
|
|
414
|
+
# Identity, not equality: __eq__ compares only priority.
|
|
415
|
+
index = next(
|
|
416
|
+
(i for i, queued in enumerate(self._queue_items) if queued is item),
|
|
417
|
+
None,
|
|
418
|
+
)
|
|
419
|
+
if index is None:
|
|
420
|
+
return False
|
|
421
|
+
del self._queue_items[index]
|
|
422
|
+
self._current_procedure = item
|
|
423
|
+
self.sigQueueChanged.emit()
|
|
424
|
+
return True
|
|
366
425
|
|
|
367
426
|
def _pop_next_procedure(self) -> PrioritizedProcedure | None:
|
|
368
427
|
"""Pop the next procedure from the queue.
|
|
369
428
|
|
|
370
429
|
Also removes from tracking list and sets as current.
|
|
371
|
-
Called by subclasses when starting execution.
|
|
430
|
+
Called by subclasses when starting execution. Stale duplicates left
|
|
431
|
+
behind by a queue rebuild are skipped.
|
|
372
432
|
|
|
373
433
|
Returns:
|
|
374
434
|
The next procedure to execute, or None if queue is empty.
|
|
375
435
|
"""
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
self.
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
except Empty:
|
|
385
|
-
return None
|
|
436
|
+
while True:
|
|
437
|
+
try:
|
|
438
|
+
item = self._queue.get_nowait()
|
|
439
|
+
except Empty:
|
|
440
|
+
return None
|
|
441
|
+
if self._claim_queued_item(item):
|
|
442
|
+
return item
|
|
443
|
+
self._queue.task_done()
|
|
386
444
|
|
|
387
445
|
def _clear_current_procedure(self) -> None:
|
|
388
446
|
"""Clear the current procedure reference.
|
|
@@ -503,7 +561,7 @@ class BaseEngine(QObject):
|
|
|
503
561
|
|
|
504
562
|
def _check_if_ready(self, *args: Any) -> None:
|
|
505
563
|
"""Check if queue is empty and emit sigReady if so."""
|
|
506
|
-
if self._state == EngineState.IDLE and self.
|
|
564
|
+
if self._state == EngineState.IDLE and self.queue_size == 0:
|
|
507
565
|
self.sigReady.emit()
|
|
508
566
|
|
|
509
567
|
# === Toast Notification Handlers ===
|
|
@@ -562,26 +620,35 @@ class BaseEngine(QObject):
|
|
|
562
620
|
"""
|
|
563
621
|
raise NotImplementedError("Subclasses must implement resume()")
|
|
564
622
|
|
|
565
|
-
def stop(self) ->
|
|
623
|
+
def stop(self) -> bool:
|
|
566
624
|
"""Request graceful stop at next safe point.
|
|
567
625
|
|
|
568
626
|
Subclasses must override this method.
|
|
627
|
+
|
|
628
|
+
Returns:
|
|
629
|
+
True if a stop was actually dispatched.
|
|
569
630
|
"""
|
|
570
631
|
raise NotImplementedError("Subclasses must implement stop()")
|
|
571
632
|
|
|
572
|
-
def abort(self, reason: str = "") ->
|
|
633
|
+
def abort(self, reason: str = "") -> bool:
|
|
573
634
|
"""Abort execution immediately.
|
|
574
635
|
|
|
575
636
|
Subclasses must override this method.
|
|
576
637
|
|
|
577
638
|
Args:
|
|
578
639
|
reason: Optional reason for the abort.
|
|
640
|
+
|
|
641
|
+
Returns:
|
|
642
|
+
True if an abort was actually dispatched.
|
|
579
643
|
"""
|
|
580
644
|
raise NotImplementedError("Subclasses must implement abort()")
|
|
581
645
|
|
|
582
|
-
def halt(self) ->
|
|
646
|
+
def halt(self) -> bool:
|
|
583
647
|
"""Emergency halt - immediately terminate execution.
|
|
584
648
|
|
|
585
649
|
Subclasses must override this method.
|
|
650
|
+
|
|
651
|
+
Returns:
|
|
652
|
+
True if a halt was actually dispatched.
|
|
586
653
|
"""
|
|
587
654
|
raise NotImplementedError("Subclasses must implement halt()")
|