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.
Files changed (474) hide show
  1. {lightfall-0.1.1 → lightfall-0.2.0}/PKG-INFO +30 -30
  2. {lightfall-0.1.1 → lightfall-0.2.0}/README.md +25 -28
  3. {lightfall-0.1.1 → lightfall-0.2.0}/pyproject.toml +29 -8
  4. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/_version.py +2 -2
  5. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/acquire/__init__.py +0 -5
  6. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/acquire/engine/base.py +148 -81
  7. lightfall-0.2.0/src/lightfall/acquire/engine/bluesky.py +612 -0
  8. lightfall-0.2.0/src/lightfall/acquire/engine/console_proxy.py +101 -0
  9. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/acquire/engine/mock.py +22 -5
  10. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/acquire/engine/protocol.py +16 -5
  11. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/acquire/engine/waiting_hook.py +22 -11
  12. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/acquire/plans/adaptive.py +4 -2
  13. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/acquire/plans/lightfall_plans.py +13 -3
  14. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/acquire/plans/registry.py +0 -1
  15. lightfall-0.2.0/src/lightfall/agents/__init__.py +24 -0
  16. lightfall-0.2.0/src/lightfall/agents/assembly.py +188 -0
  17. lightfall-0.2.0/src/lightfall/agents/builtin/.gitkeep +0 -0
  18. lightfall-0.2.0/src/lightfall/agents/builtin/lightfall-dev.md +66 -0
  19. lightfall-0.2.0/src/lightfall/agents/builtin/lightfall.md +84 -0
  20. lightfall-0.2.0/src/lightfall/agents/builtin/observer.md +16 -0
  21. lightfall-0.2.0/src/lightfall/agents/bus.py +126 -0
  22. lightfall-0.2.0/src/lightfall/agents/bus_tools.py +192 -0
  23. lightfall-0.2.0/src/lightfall/agents/drafts.py +337 -0
  24. lightfall-0.2.0/src/lightfall/agents/registry.py +148 -0
  25. lightfall-0.2.0/src/lightfall/agents/skill_tools.py +149 -0
  26. lightfall-0.2.0/src/lightfall/agents/skills_store.py +201 -0
  27. lightfall-0.2.0/src/lightfall/agents/spec.py +123 -0
  28. lightfall-0.2.0/src/lightfall/auth/provider_registry.py +52 -0
  29. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/auth/providers/base.py +9 -0
  30. lightfall-0.2.0/src/lightfall/auth/providers/builtin_plugins.py +212 -0
  31. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/auth/providers/keycloak.py +40 -3
  32. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/auth/service_key.py +15 -2
  33. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/auth/session.py +76 -2
  34. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/claude/_internal/worker.py +41 -218
  35. lightfall-0.2.0/src/lightfall/claude/_session_assembly.py +89 -0
  36. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/claude/agent.py +325 -57
  37. lightfall-0.2.0/src/lightfall/claude/bus_endpoint.py +245 -0
  38. lightfall-0.2.0/src/lightfall/claude/cockpit.py +70 -0
  39. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/claude/lightfall_core_tools.py +2 -2
  40. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/claude/permission_manager.py +1 -1
  41. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/claude/tools/interaction.py +2 -1
  42. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/claude/tools/screenshot.py +36 -24
  43. lightfall-0.2.0/src/lightfall/claude/transcript.py +37 -0
  44. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/claude/widget.py +460 -16
  45. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/claude/widgets/permission_request.py +5 -3
  46. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/claude/widgets/task_card.py +4 -2
  47. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/core/application.py +85 -145
  48. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/devices/__init__.py +0 -6
  49. lightfall-0.2.0/src/lightfall/devices/async_connect.py +77 -0
  50. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/devices/backends/bcs.py +124 -3
  51. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/devices/backends/happi.py +221 -147
  52. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/devices/backends/mock.py +62 -9
  53. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/devices/base.py +45 -0
  54. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/devices/catalog.py +206 -26
  55. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/devices/connection_manager.py +131 -181
  56. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/epics/widgets/areadetector/controls.py +3 -2
  57. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/epics/widgets/motor.py +5 -4
  58. lightfall-0.2.0/src/lightfall/ipc/local_server.py +175 -0
  59. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ipc/service.py +246 -15
  60. lightfall-0.2.0/src/lightfall/logbook/__init__.py +27 -0
  61. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/logbook/client.py +207 -21
  62. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/logbook/entry_widget.py +108 -50
  63. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/logbook/fragment_widgets.py +7 -4
  64. lightfall-0.2.0/src/lightfall/logbook/live_updates.py +125 -0
  65. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/logbook/style.py +29 -10
  66. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/main.py +303 -188
  67. lightfall-0.2.0/src/lightfall/monitor/__init__.py +0 -0
  68. lightfall-0.2.0/src/lightfall/monitor/advisor.py +148 -0
  69. lightfall-0.2.0/src/lightfall/monitor/buffer.py +72 -0
  70. lightfall-0.2.0/src/lightfall/monitor/context_provider.py +47 -0
  71. lightfall-0.2.0/src/lightfall/monitor/data_window.py +42 -0
  72. lightfall-0.2.0/src/lightfall/monitor/feed.py +29 -0
  73. lightfall-0.2.0/src/lightfall/monitor/feeds/__init__.py +0 -0
  74. lightfall-0.2.0/src/lightfall/monitor/feeds/acquisition_health.py +73 -0
  75. lightfall-0.2.0/src/lightfall/monitor/models.py +118 -0
  76. lightfall-0.2.0/src/lightfall/monitor/monitor_plugin.py +64 -0
  77. lightfall-0.2.0/src/lightfall/monitor/rate_limiter.py +20 -0
  78. lightfall-0.2.0/src/lightfall/monitor/registry.py +82 -0
  79. lightfall-0.2.0/src/lightfall/monitor/scheduler.py +219 -0
  80. lightfall-0.2.0/src/lightfall/monitor/service.py +200 -0
  81. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/plugins/__init__.py +8 -2
  82. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/plugins/agents/__init__.py +3 -3
  83. lightfall-0.2.0/src/lightfall/plugins/agents/alignment.py +56 -0
  84. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/plugins/agents/autonomous_experiment/plugin.py +3 -7
  85. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/plugins/agents/current_esaf.py +2 -66
  86. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/plugins/agents/device_tools.py +2 -2
  87. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/plugins/agents/engine_tools.py +464 -83
  88. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/plugins/agents/ipython_tools.py +2 -2
  89. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/plugins/agents/panel_builder.py +6 -54
  90. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/plugins/agents/panel_design.py +5 -33
  91. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/plugins/agents/plan_design.py +5 -31
  92. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/plugins/agents/plan_tools.py +39 -2
  93. lightfall-0.2.0/src/lightfall/plugins/agents/scan_planning.py +56 -0
  94. lightfall-0.2.0/src/lightfall/plugins/auth_provider_plugin.py +84 -0
  95. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/plugins/builtin_manifest.py +92 -23
  96. lightfall-0.2.0/src/lightfall/plugins/device_backend_plugin.py +35 -0
  97. lightfall-0.2.0/src/lightfall/plugins/happi_database_plugin.py +79 -0
  98. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/plugins/loader.py +76 -8
  99. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/plugins/panel_plugin.py +5 -5
  100. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/plugins/statusbar_plugin.py +34 -0
  101. lightfall-0.1.1/src/lightfall/plugins/agent_plugin.py → lightfall-0.2.0/src/lightfall/plugins/tool_plugin.py +45 -13
  102. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/plugins/user_plugins.py +6 -6
  103. lightfall-0.2.0/src/lightfall/plugins/visualization_plugin.py +70 -0
  104. lightfall-0.2.0/src/lightfall/remote/__init__.py +1 -0
  105. lightfall-0.2.0/src/lightfall/remote/protocol.py +42 -0
  106. lightfall-0.2.0/src/lightfall/remote/service.py +681 -0
  107. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/services/als_beam_status.py +35 -1
  108. lightfall-0.2.0/src/lightfall/services/caproxy_lease_service.py +355 -0
  109. lightfall-0.2.0/src/lightfall/services/shussebora_monitor.py +204 -0
  110. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/services/threaded_tiled_writer.py +9 -1
  111. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/services/tiled_service.py +80 -7
  112. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/services/tiled_writer_patch.py +15 -0
  113. lightfall-0.2.0/src/lightfall/skills/builtin/alignment/SKILL.md +38 -0
  114. lightfall-0.2.0/src/lightfall/skills/builtin/autonomous_experiment/SKILL.md +164 -0
  115. lightfall-0.2.0/src/lightfall/skills/builtin/current_esaf/SKILL.md +59 -0
  116. lightfall-0.2.0/src/lightfall/skills/builtin/panel_builder/SKILL.md +48 -0
  117. lightfall-0.2.0/src/lightfall/skills/builtin/panel_design/SKILL.md +19 -0
  118. {lightfall-0.1.1/src/lightfall/plugins/agents → lightfall-0.2.0/src/lightfall/skills/builtin}/panel_design/references/panel_design.md +218 -2
  119. lightfall-0.2.0/src/lightfall/skills/builtin/plan_design/SKILL.md +15 -0
  120. lightfall-0.2.0/src/lightfall/skills/builtin/scan_planning/SKILL.md +45 -0
  121. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/annotations.py +18 -9
  122. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/dialogs/__init__.py +2 -0
  123. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/dialogs/about_dialog.py +5 -4
  124. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/dialogs/bug_report_dialog.py +4 -1
  125. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/dialogs/export_dialog.py +6 -2
  126. lightfall-0.2.0/src/lightfall/ui/dialogs/lease_request_dialog.py +246 -0
  127. lightfall-0.2.0/src/lightfall/ui/dialogs/login_dialog.py +517 -0
  128. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/dialogs/oauth_browser_dialog.py +2 -1
  129. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/docking/icon_sidebar.py +144 -42
  130. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/docking/manager.py +407 -28
  131. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/docking/state.py +19 -1
  132. lightfall-0.2.0/src/lightfall/ui/docking/theme.py +613 -0
  133. lightfall-0.2.0/src/lightfall/ui/docking/widget.py +383 -0
  134. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/mainwindow.py +134 -45
  135. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/models/device_selection.py +4 -2
  136. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/models/device_tree.py +53 -3
  137. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/panels/__init__.py +3 -1
  138. lightfall-0.2.0/src/lightfall/ui/panels/agent_editor/__init__.py +0 -0
  139. lightfall-0.2.0/src/lightfall/ui/panels/agent_editor/models.py +304 -0
  140. lightfall-0.2.0/src/lightfall/ui/panels/agent_editor/panel.py +700 -0
  141. lightfall-0.2.0/src/lightfall/ui/panels/agent_editor/plugin.py +21 -0
  142. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/panels/base.py +159 -0
  143. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/panels/bluesky_panel.py +39 -22
  144. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/panels/claude/__init__.py +2 -2
  145. lightfall-0.2.0/src/lightfall/ui/panels/claude/agent_picker.py +64 -0
  146. lightfall-0.2.0/src/lightfall/ui/panels/claude/agent_session_tab.py +491 -0
  147. 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
  148. lightfall-0.2.0/src/lightfall/ui/panels/claude_panel.py +1290 -0
  149. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/panels/documents_panel.py +39 -0
  150. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/panels/ipython_panel.py +83 -53
  151. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/panels/logbook_entries_panel.py +27 -11
  152. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/panels/logbook_panel.py +87 -20
  153. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/panels/logging_panel.py +53 -38
  154. lightfall-0.2.0/src/lightfall/ui/panels/monitor_panel.py +62 -0
  155. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/panels/pipeline_triggers_panel.py +1 -0
  156. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/panels/plugins/__init__.py +2 -0
  157. lightfall-0.2.0/src/lightfall/ui/panels/plugins/monitor_panel_plugin.py +20 -0
  158. lightfall-0.2.0/src/lightfall/ui/panels/plugins/shussebora_plugin.py +28 -0
  159. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/panels/queue.py +5 -4
  160. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/panels/registry.py +2 -2
  161. lightfall-0.2.0/src/lightfall/ui/panels/shussebora_panel.py +275 -0
  162. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/panels/synoptic/editors.py +2 -1
  163. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/panels/tiled_browser_panel.py +86 -52
  164. lightfall-0.2.0/src/lightfall/ui/panels/visualization_panel.py +847 -0
  165. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/preferences/builtin.py +111 -31
  166. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/preferences/claude_settings.py +178 -6
  167. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/preferences/dialog.py +19 -2
  168. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/preferences/ipc_settings.py +109 -35
  169. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/preferences/login_settings.py +2 -1
  170. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/preferences/manager.py +31 -2
  171. lightfall-0.2.0/src/lightfall/ui/preferences/monitor_settings.py +520 -0
  172. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/preferences/proxy_settings.py +2 -1
  173. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/preferences/tiled_settings.py +34 -2
  174. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/preferences/tool_settings.py +15 -15
  175. lightfall-0.2.0/src/lightfall/ui/resources/logo.png +0 -0
  176. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/statusbar/plugins/__init__.py +6 -7
  177. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/statusbar/plugins/als_beam_status.py +9 -3
  178. lightfall-0.2.0/src/lightfall/ui/statusbar/plugins/caproxy_lease_status.py +233 -0
  179. lightfall-0.2.0/src/lightfall/ui/statusbar/plugins/nats_status.py +193 -0
  180. lightfall-0.2.0/src/lightfall/ui/statusbar/plugins/shussebora_status.py +162 -0
  181. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/statusbar/plugins/thread_status.py +4 -4
  182. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/statusbar/plugins/tiled_status.py +61 -18
  183. lightfall-0.2.0/src/lightfall/ui/statusbar/plugins/user_status.py +153 -0
  184. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/theater/manager.py +10 -2
  185. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/theater/proxy.py +15 -2
  186. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/theme/__init__.py +9 -1
  187. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/theme/builtin.py +59 -337
  188. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/theme/manager.py +127 -4
  189. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/tutorial.py +12 -11
  190. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/widgets/__init__.py +0 -5
  191. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/widgets/camera/base.py +58 -36
  192. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/widgets/camera/image_view.py +46 -11
  193. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/widgets/compact_motor.py +18 -11
  194. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/widgets/device_control.py +2 -1
  195. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/widgets/device_selector.py +1 -0
  196. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/widgets/device_tree_tab.py +29 -0
  197. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/widgets/document_stream.py +11 -31
  198. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/widgets/motor_control.py +8 -7
  199. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/widgets/observers/image_view.py +6 -11
  200. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/widgets/plan_config.py +2 -1
  201. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/widgets/plan_selector.py +4 -1
  202. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/widgets/runengine_control.py +63 -136
  203. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/widgets/signal_control.py +18 -8
  204. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/widgets/tiled_filter_widget.py +0 -29
  205. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/widgets/warning_banner.py +2 -1
  206. lightfall-0.2.0/src/lightfall/utils/caproto_shutdown.py +90 -0
  207. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/utils/sentry.py +61 -12
  208. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/utils/threads.py +88 -22
  209. lightfall-0.2.0/src/lightfall/utils/tiled_helpers.py +222 -0
  210. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/visualization/__init__.py +0 -13
  211. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/visualization/base_visualization.py +9 -0
  212. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/visualization/fitting/__init__.py +2 -0
  213. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/visualization/fitting/fitters.py +70 -0
  214. lightfall-0.2.0/src/lightfall/visualization/reduction_engine.py +104 -0
  215. lightfall-0.2.0/src/lightfall/visualization/reductions.py +173 -0
  216. lightfall-0.2.0/src/lightfall/visualization/scan_geometry.py +58 -0
  217. lightfall-0.2.0/src/lightfall/visualization/stream_bridge.py +48 -0
  218. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/visualization/theme.py +10 -74
  219. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/visualization/widgets/adaptive/heatmap.py +20 -6
  220. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/visualization/widgets/heatmap.py +5 -3
  221. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/visualization/widgets/image_stack.py +99 -27
  222. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/visualization/widgets/image_view_toolbar.py +57 -3
  223. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/visualization/widgets/lazy_image_view.py +51 -10
  224. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/visualization/widgets/plot_1d.py +3 -2
  225. lightfall-0.2.0/src/lightfall/visualization/widgets/scan_viewer.py +500 -0
  226. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/visualization/widgets/scatter.py +2 -1
  227. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/visualization/widgets/table.py +2 -1
  228. lightfall-0.1.1/src/lightfall/acquire/device_wrapper.py +0 -416
  229. lightfall-0.1.1/src/lightfall/acquire/engine/bluesky.py +0 -358
  230. lightfall-0.1.1/src/lightfall/acquire/plans/example_plans.py +0 -995
  231. lightfall-0.1.1/src/lightfall/acquire/plans/standard_plans.py +0 -186
  232. lightfall-0.1.1/src/lightfall/claude/_session_assembly.py +0 -124
  233. lightfall-0.1.1/src/lightfall/devices/monitoring.py +0 -442
  234. lightfall-0.1.1/src/lightfall/logbook/__init__.py +0 -46
  235. lightfall-0.1.1/src/lightfall/logbook/action_dialog.py +0 -207
  236. lightfall-0.1.1/src/lightfall/logbook/block_mapper.py +0 -562
  237. lightfall-0.1.1/src/lightfall/logbook/converter.py +0 -273
  238. lightfall-0.1.1/src/lightfall/logbook/editors/__init__.py +0 -19
  239. lightfall-0.1.1/src/lightfall/logbook/editors/highlighter.py +0 -305
  240. lightfall-0.1.1/src/lightfall/logbook/editors/markdown_editor.py +0 -319
  241. lightfall-0.1.1/src/lightfall/logbook/editors/richtext_editor.py +0 -1397
  242. lightfall-0.1.1/src/lightfall/logbook/position_mapper.py +0 -320
  243. lightfall-0.1.1/src/lightfall/logbook/protection.py +0 -402
  244. lightfall-0.1.1/src/lightfall/logbook/visual_protection.py +0 -330
  245. lightfall-0.1.1/src/lightfall/logbook/widget.py +0 -680
  246. lightfall-0.1.1/src/lightfall/plugins/agents/alignment.py +0 -94
  247. lightfall-0.1.1/src/lightfall/plugins/agents/scan_planning.py +0 -101
  248. lightfall-0.1.1/src/lightfall/project/__init__.py +0 -37
  249. lightfall-0.1.1/src/lightfall/project/model.py +0 -375
  250. lightfall-0.1.1/src/lightfall/project/service.py +0 -427
  251. lightfall-0.1.1/src/lightfall/project/welcome.py +0 -106
  252. lightfall-0.1.1/src/lightfall/ui/dialogs/login_dialog.py +0 -756
  253. lightfall-0.1.1/src/lightfall/ui/docking/theme.py +0 -399
  254. lightfall-0.1.1/src/lightfall/ui/docking/widget.py +0 -214
  255. lightfall-0.1.1/src/lightfall/ui/panels/claude_panel.py +0 -887
  256. lightfall-0.1.1/src/lightfall/ui/panels/visualization_panel.py +0 -508
  257. lightfall-0.1.1/src/lightfall/ui/preferences/skill_settings.py +0 -28
  258. lightfall-0.1.1/src/lightfall/ui/resources/logo.png +0 -0
  259. lightfall-0.1.1/src/lightfall/ui/statusbar/plugins/auth_status.py +0 -116
  260. lightfall-0.1.1/src/lightfall/ui/statusbar/plugins/connection_status.py +0 -100
  261. lightfall-0.1.1/src/lightfall/ui/statusbar/plugins/user_status.py +0 -84
  262. lightfall-0.1.1/src/lightfall/ui/widgets/tiled_status.py +0 -149
  263. lightfall-0.1.1/src/lightfall/utils/tiled_helpers.py +0 -96
  264. lightfall-0.1.1/src/lightfall/visualization/memory.py +0 -392
  265. lightfall-0.1.1/src/lightfall/visualization/motor_mixin.py +0 -524
  266. {lightfall-0.1.1 → lightfall-0.2.0}/.gitignore +0 -0
  267. {lightfall-0.1.1 → lightfall-0.2.0}/LEGAL.md +0 -0
  268. {lightfall-0.1.1 → lightfall-0.2.0}/LICENSE.md +0 -0
  269. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/__init__.py +0 -0
  270. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/__main__.py +0 -0
  271. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/acquire/buffer.py +0 -0
  272. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/acquire/engine/__init__.py +0 -0
  273. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/acquire/engine/plugins/__init__.py +0 -0
  274. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/acquire/engine/plugins/bluesky_plugin.py +0 -0
  275. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/acquire/engine/plugins/mock_plugin.py +0 -0
  276. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/acquire/engine/registry.py +0 -0
  277. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/acquire/engine/state.py +0 -0
  278. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/acquire/nats_bridge.py +0 -0
  279. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/acquire/plan_ui.py +0 -0
  280. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/acquire/plans/__init__.py +0 -0
  281. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/acquire/plans/user_plans.py +0 -0
  282. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/acquire/runengine.py +0 -0
  283. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/acquire/signals.py +0 -0
  284. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/acquire/triggers/__init__.py +0 -0
  285. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/acquire/triggers/base.py +0 -0
  286. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/acquire/triggers/filter.py +0 -0
  287. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/acquire/triggers/manager.py +0 -0
  288. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/acquire/triggers/manual.py +0 -0
  289. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/acquire/triggers/run_end.py +0 -0
  290. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/acquire/triggers/run_start.py +0 -0
  291. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/auth/__init__.py +0 -0
  292. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/auth/policy.py +0 -0
  293. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/auth/providers/__init__.py +0 -0
  294. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/auth/providers/local.py +0 -0
  295. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/auth/providers/pam.py +0 -0
  296. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/auth/service_key_auth.py +0 -0
  297. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/claude/__init__.py +0 -0
  298. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/claude/_internal/__init__.py +0 -0
  299. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/claude/_internal/serialization.py +0 -0
  300. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/claude/_internal/threading.py +0 -0
  301. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/claude/markdown.py +0 -0
  302. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/claude/tools/__init__.py +0 -0
  303. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/claude/tools/controller.py +0 -0
  304. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/claude/tools/introspection.py +0 -0
  305. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/claude/tools/logs.py +0 -0
  306. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/claude/widgets/__init__.py +0 -0
  307. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/claude/widgets/question_request.py +0 -0
  308. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/config/__init__.py +0 -0
  309. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/config/layers.py +0 -0
  310. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/config/manager.py +0 -0
  311. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/config/schema.py +0 -0
  312. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/core/__init__.py +0 -0
  313. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/core/services.py +0 -0
  314. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/devices/backends/__init__.py +0 -0
  315. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/devices/model.py +0 -0
  316. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/devices/sim/__init__.py +0 -0
  317. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/devices/sim/areadetector.py +0 -0
  318. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/devices/sim/generators.py +0 -0
  319. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/devices/sim/plugins.py +0 -0
  320. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/epics/__init__.py +0 -0
  321. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/epics/ca/__init__.py +0 -0
  322. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/epics/ca/context.py +0 -0
  323. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/epics/ca/pv.py +0 -0
  324. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/epics/widgets/__init__.py +0 -0
  325. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/epics/widgets/areadetector/__init__.py +0 -0
  326. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/epics/widgets/areadetector/areadetector.py +0 -0
  327. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/epics/widgets/areadetector/image_view.py +0 -0
  328. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/epics/widgets/auto.py +0 -0
  329. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/epics/widgets/base.py +0 -0
  330. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/epics/widgets/checkbox.py +0 -0
  331. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/epics/widgets/combobox.py +0 -0
  332. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/epics/widgets/label.py +0 -0
  333. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/epics/widgets/lineedit.py +0 -0
  334. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/epics/widgets/ophyd_base.py +0 -0
  335. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/epics/widgets/ophyd_combobox.py +0 -0
  336. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/epics/widgets/ophyd_label.py +0 -0
  337. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/epics/widgets/ophyd_lineedit.py +0 -0
  338. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/epics/widgets/ophyd_spinbox.py +0 -0
  339. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/epics/widgets/slider.py +0 -0
  340. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/epics/widgets/status_indicator.py +0 -0
  341. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/epics/widgets/style.py +0 -0
  342. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/exporter/__init__.py +0 -0
  343. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/exporter/cli.py +0 -0
  344. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/exporter/converters/__init__.py +0 -0
  345. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/exporter/converters/base.py +0 -0
  346. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/exporter/converters/noop.py +0 -0
  347. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/exporter/converters/nxsas.py +0 -0
  348. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/exporter/service.py +0 -0
  349. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/exporter/tiled_utils.py +0 -0
  350. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ipc/__init__.py +0 -0
  351. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ipc/trust.py +0 -0
  352. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/logbook/action_logger.py +0 -0
  353. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/logbook/event_listener.py +0 -0
  354. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/logbook/url.py +0 -0
  355. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/pipelines/__init__.py +0 -0
  356. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/pipelines/client.py +0 -0
  357. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/plugins/agents/_mcp_helpers.py +0 -0
  358. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/plugins/agents/autonomous_experiment/__init__.py +0 -0
  359. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/plugins/agents/autonomous_experiment/nats_tools.py +0 -0
  360. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/plugins/agents/autonomous_experiment/prompts.py +0 -0
  361. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/plugins/controller_plugin.py +0 -0
  362. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/plugins/engine_plugin.py +0 -0
  363. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/plugins/errors.py +0 -0
  364. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/plugins/info.py +0 -0
  365. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/plugins/manifest.py +0 -0
  366. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/plugins/plan_plugin.py +0 -0
  367. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/plugins/registry.py +0 -0
  368. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/plugins/settings_plugin.py +0 -0
  369. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/plugins/theme_plugin.py +0 -0
  370. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/plugins/types.py +0 -0
  371. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/resources/__init__.py +0 -0
  372. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/resources/images/__init__.py +0 -0
  373. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/resources/images/icon.ico +0 -0
  374. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/resources/images/icon.png +0 -0
  375. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/resources/images/logo.png +0 -0
  376. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/services/__init__.py +0 -0
  377. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/services/_alshub_client.py +0 -0
  378. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/services/access_stamper.py +0 -0
  379. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/services/ca_tunnel.py +0 -0
  380. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/services/tiled_auth.py +0 -0
  381. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/settings/__init__.py +0 -0
  382. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/settings/image_helpers.py +0 -0
  383. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/settings/user_settings_client.py +0 -0
  384. {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
  385. {lightfall-0.1.1/src/lightfall/plugins/agents → lightfall-0.2.0/src/lightfall/skills/builtin}/plan_design/references/plan_design.md +0 -0
  386. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/__init__.py +0 -0
  387. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/common/__init__.py +0 -0
  388. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/dialogs/add_trigger_dialog.py +0 -0
  389. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/dialogs/base.py +0 -0
  390. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/dialogs/create_plan_dialog.py +0 -0
  391. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/dialogs/device_edit_dialog.py +0 -0
  392. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/dialogs/go_to_position_dialog.py +0 -0
  393. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/dialogs/run_pipeline_dialog.py +0 -0
  394. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/dialogs/sample_metadata_dialog.py +0 -0
  395. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/docking/__init__.py +0 -0
  396. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/events.py +0 -0
  397. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/models/__init__.py +0 -0
  398. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/models/thread_model.py +0 -0
  399. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/models/tiled_model.py +0 -0
  400. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/panels/device_panel.py +0 -0
  401. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/panels/pipeline_jobs_panel.py +0 -0
  402. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/panels/plugins/bluesky_plugin.py +0 -0
  403. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/panels/plugins/claude_plugin.py +0 -0
  404. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/panels/plugins/device_plugin.py +0 -0
  405. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/panels/plugins/documents_plugin.py +0 -0
  406. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/panels/plugins/ipython_plugin.py +0 -0
  407. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/panels/plugins/logbook_entries_plugin.py +0 -0
  408. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/panels/plugins/logbook_plugin.py +0 -0
  409. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/panels/plugins/logging_plugin.py +0 -0
  410. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/panels/plugins/pipeline_jobs_plugin.py +0 -0
  411. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/panels/plugins/pipeline_triggers_plugin.py +0 -0
  412. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/panels/plugins/queue_plugin.py +0 -0
  413. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/panels/plugins/synoptic_plugin.py +0 -0
  414. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/panels/plugins/threads_plugin.py +0 -0
  415. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/panels/plugins/tiled_browser_plugin.py +0 -0
  416. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/panels/plugins/visualization_plugin.py +0 -0
  417. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/panels/synoptic/__init__.py +0 -0
  418. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/panels/synoptic/items.py +0 -0
  419. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/panels/synoptic/models.py +0 -0
  420. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/panels/synoptic/panel.py +0 -0
  421. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/panels/synoptic/serialization.py +0 -0
  422. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/panels/synoptic/view.py +0 -0
  423. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/panels/threads_panel.py +0 -0
  424. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/preferences/__init__.py +0 -0
  425. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/preferences/backend.py +0 -0
  426. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/preferences/device_settings.py +0 -0
  427. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/preferences/editor_settings.py +0 -0
  428. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/preferences/logbook_settings.py +0 -0
  429. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/preferences/plugin_settings.py +0 -0
  430. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/preferences/user_portable_backend.py +0 -0
  431. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/preferences/user_profile_settings.py +0 -0
  432. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/preferences/visualization_settings.py +0 -0
  433. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/resources/__init__.py +0 -0
  434. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/statusbar/__init__.py +0 -0
  435. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/statusbar/manager.py +0 -0
  436. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/theater/__init__.py +0 -0
  437. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/theater/overlay.py +0 -0
  438. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/theme/registry.py +0 -0
  439. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/toast.py +0 -0
  440. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/widgets/base_control.py +0 -0
  441. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/widgets/camera/__init__.py +0 -0
  442. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/widgets/camera/dark_frames.py +0 -0
  443. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/widgets/camera/panels/__init__.py +0 -0
  444. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/widgets/camera/panels/cooler.py +0 -0
  445. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/widgets/camera/panels/temperature.py +0 -0
  446. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/widgets/camera/plan_based.py +0 -0
  447. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/widgets/controller_matcher.py +0 -0
  448. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/widgets/controller_registry.py +0 -0
  449. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/widgets/favorites_tab.py +0 -0
  450. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/widgets/observers/__init__.py +0 -0
  451. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/widgets/observers/camera.py +0 -0
  452. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/widgets/plan_edit_dialog.py +0 -0
  453. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/widgets/profile_avatar.py +0 -0
  454. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/widgets/queue_view.py +0 -0
  455. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/ui/widgets/skill_trigger_button.py +0 -0
  456. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/utils/__init__.py +0 -0
  457. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/utils/crash_diagnostics.py +0 -0
  458. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/utils/data_migration.py +0 -0
  459. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/utils/editor_launcher.py +0 -0
  460. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/utils/error_collector.py +0 -0
  461. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/utils/git_tracker.py +0 -0
  462. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/utils/log_buffer.py +0 -0
  463. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/utils/logging.py +0 -0
  464. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/utils/module_resolver.py +0 -0
  465. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/visualization/base.py +0 -0
  466. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/visualization/fitting/base.py +0 -0
  467. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/visualization/fitting/panel.py +0 -0
  468. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/visualization/pg.py +0 -0
  469. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/visualization/registry.py +0 -0
  470. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/visualization/spec.py +0 -0
  471. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/visualization/widgets/__init__.py +0 -0
  472. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/visualization/widgets/adaptive/__init__.py +0 -0
  473. {lightfall-0.1.1 → lightfall-0.2.0}/src/lightfall/visualization/widgets/adaptive/plot.py +0 -0
  474. {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.1.1
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.82
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
+ [![PyPI version](https://img.shields.io/pypi/v/lightfall.svg)](https://pypi.org/project/lightfall/)
72
+ [![Python versions](https://img.shields.io/pypi/pyversions/lightfall.svg)](https://pypi.org/project/lightfall/)
68
73
  [![CI](https://github.com/als-controls/lightfall/actions/workflows/ci.yml/badge.svg)](https://github.com/als-controls/lightfall/actions/workflows/ci.yml)
69
74
  [![Docs](https://github.com/als-controls/lightfall/actions/workflows/docs.yml/badge.svg)](https://als-controls.github.io/lightfall/)
70
- [![Python](https://img.shields.io/badge/python-3.11%20%7C%203.12-blue.svg)](https://github.com/als-controls/lightfall/blob/master/pyproject.toml)
71
75
  [![License: BSD-3-Clause](https://img.shields.io/badge/license-BSD--3--Clause-blue.svg)](LICENSE.md)
72
- [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.20545717.svg)](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
- ncs/
207
- ├── src/ncs/
208
- │ ├── acquire/ # Data acquisition engine
209
- │ ├── auth/ # Authentication & authorization
210
- │ ├── config/ # Configuration management
211
- │ ├── core/ # Core application classes
212
- │ ├── devices/ # Device catalog & backends
213
- │ ├── plugins/ # Plugin system
214
- │ ├── services/ # Application services (Tiled, etc.)
215
- │ ├── ui/ # User interface
216
- │ │ ├── panels/ # Panel implementations
217
- │ │ ├── widgets/ # Reusable widgets
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/ # Theming system
220
- │ └── utils/ # Utilities
221
- └── tests/ # Test suite
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
+ [![PyPI version](https://img.shields.io/pypi/v/lightfall.svg)](https://pypi.org/project/lightfall/)
5
+ [![Python versions](https://img.shields.io/pypi/pyversions/lightfall.svg)](https://pypi.org/project/lightfall/)
4
6
  [![CI](https://github.com/als-controls/lightfall/actions/workflows/ci.yml/badge.svg)](https://github.com/als-controls/lightfall/actions/workflows/ci.yml)
5
7
  [![Docs](https://github.com/als-controls/lightfall/actions/workflows/docs.yml/badge.svg)](https://als-controls.github.io/lightfall/)
6
- [![Python](https://img.shields.io/badge/python-3.11%20%7C%203.12-blue.svg)](https://github.com/als-controls/lightfall/blob/master/pyproject.toml)
7
8
  [![License: BSD-3-Clause](https://img.shields.io/badge/license-BSD--3--Clause-blue.svg)](LICENSE.md)
8
- [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.20545717.svg)](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
- ncs/
143
- ├── src/ncs/
144
- │ ├── acquire/ # Data acquisition engine
145
- │ ├── auth/ # Authentication & authorization
146
- │ ├── config/ # Configuration management
147
- │ ├── core/ # Core application classes
148
- │ ├── devices/ # Device catalog & backends
149
- │ ├── plugins/ # Plugin system
150
- │ ├── services/ # Application services (Tiled, etc.)
151
- │ ├── ui/ # User interface
152
- │ │ ├── panels/ # Panel implementations
153
- │ │ ├── widgets/ # Reusable widgets
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/ # Theming system
156
- │ └── utils/ # Utilities
157
- └── tests/ # Test suite
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.82",
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
- # NOTE: the BCS device backend requires bcsophyd-zmq, which lives on ALS
74
- # GitLab and cannot be expressed as a PyPI extra (direct-URL dependencies are
75
- # rejected on upload). ALS-internal users: see "BCS backend" in the README.
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
- [tool.hatch.build.targets.wheel.force-include]
120
- "src/lightfall/ui/resources/logo.png" = "lightfall/ui/resources/logo.png"
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.82",
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.1.1'
22
- __version_tuple__ = version_tuple = (0, 1, 1)
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
- return self._queue.qsize()
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._queue.put(item)
199
- self._queue_items.append(item)
200
- self._queue_items.sort(key=lambda x: x.priority)
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
- count = 0
245
- while True:
246
- try:
247
- self._queue.get_nowait()
248
- count += 1
249
- except Empty:
250
- break
251
- self._queue_items.clear()
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
- return list(self._queue_items)
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
- for item in self._queue_items:
283
- if item.id == procedure_id:
284
- return item
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
- # Find the item in our tracking list
297
- item_to_remove = None
298
- for item in self._queue_items:
299
- if item.id == procedure_id:
300
- item_to_remove = item
301
- break
302
-
303
- if item_to_remove is None:
304
- logger.warning(f"[{self._name}] Procedure {procedure_id[:8]} not found in queue")
305
- return False
306
-
307
- # Remove from tracking list
308
- self._queue_items.remove(item_to_remove)
309
-
310
- # Rebuild the priority queue without this item
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
- # Find the item in our tracking list
328
- for item in self._queue_items:
329
- if item.id == procedure_id:
330
- old_priority = item.priority
331
- # Create new item with updated priority (dataclass is frozen by order=True)
332
- # We need to modify the object directly since we're using it in a list
333
- object.__setattr__(item, "priority", new_priority)
334
-
335
- # Re-sort the tracking list
336
- self._queue_items.sort(key=lambda x: x.priority)
337
-
338
- # Rebuild the priority queue
339
- self._rebuild_priority_queue()
340
-
341
- logger.debug(
342
- f"[{self._name}] Updated priority for {procedure_id[:8]}: "
343
- f"{old_priority} -> {new_priority}"
344
- )
345
- self.sigQueueChanged.emit()
346
- return True
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
- # Drain the old queue
357
- while True:
358
- try:
359
- self._queue.get_nowait()
360
- except Empty:
361
- break
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
- # Re-add all items
364
- for item in self._queue_items:
365
- self._queue.put(item)
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
- try:
377
- item = self._queue.get_nowait()
378
- # Remove from tracking list
379
- if item in self._queue_items:
380
- self._queue_items.remove(item)
381
- self._current_procedure = item
382
- self.sigQueueChanged.emit()
383
- return item
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._queue.empty():
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) -> None:
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 = "") -> None:
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) -> None:
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()")