hugpy-server 0.2.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (250) hide show
  1. hugpy_server-0.2.2/BUILD_CONSOLE.md +61 -0
  2. hugpy_server-0.2.2/LICENSE +41 -0
  3. hugpy_server-0.2.2/PKG-INFO +79 -0
  4. hugpy_server-0.2.2/README.md +27 -0
  5. hugpy_server-0.2.2/console_manifest.json +30 -0
  6. hugpy_server-0.2.2/docs/api-routes.md +419 -0
  7. hugpy_server-0.2.2/docs/frontends.md +286 -0
  8. hugpy_server-0.2.2/pyproject.toml +92 -0
  9. hugpy_server-0.2.2/setup.cfg +4 -0
  10. hugpy_server-0.2.2/src/hugpy_server/__init__.py +27 -0
  11. hugpy_server-0.2.2/src/hugpy_server/app/__init__.py +8 -0
  12. hugpy_server-0.2.2/src/hugpy_server/app/auth_common.py +53 -0
  13. hugpy_server-0.2.2/src/hugpy_server/app/endpoints_explorer.py +420 -0
  14. hugpy_server-0.2.2/src/hugpy_server/app/endpoints_view.py +75 -0
  15. hugpy_server-0.2.2/src/hugpy_server/app/functions/__init__.py +0 -0
  16. hugpy_server-0.2.2/src/hugpy_server/app/functions/chat/__init__.py +0 -0
  17. hugpy_server-0.2.2/src/hugpy_server/app/functions/chat/streaming.py +407 -0
  18. hugpy_server-0.2.2/src/hugpy_server/app/functions/chat/task_selection.py +5 -0
  19. hugpy_server-0.2.2/src/hugpy_server/app/functions/imports/__init__.py +0 -0
  20. hugpy_server-0.2.2/src/hugpy_server/app/functions/imports/options/__init__.py +0 -0
  21. hugpy_server-0.2.2/src/hugpy_server/app/functions/imports/options/install.py +77 -0
  22. hugpy_server-0.2.2/src/hugpy_server/app/functions/imports/options/search.py +25 -0
  23. hugpy_server-0.2.2/src/hugpy_server/app/functions/imports/utils/__init__.py +0 -0
  24. hugpy_server-0.2.2/src/hugpy_server/app/functions/imports/utils/api_keys.py +318 -0
  25. hugpy_server-0.2.2/src/hugpy_server/app/functions/imports/utils/constants.py +34 -0
  26. hugpy_server-0.2.2/src/hugpy_server/app/functions/imports/utils/discord_bindings.py +697 -0
  27. hugpy_server-0.2.2/src/hugpy_server/app/functions/imports/utils/install_links.py +402 -0
  28. hugpy_server-0.2.2/src/hugpy_server/app/functions/imports/utils/key_store.py +26 -0
  29. hugpy_server-0.2.2/src/hugpy_server/app/functions/imports/utils/video_share_keys.py +163 -0
  30. hugpy_server-0.2.2/src/hugpy_server/app/help_agent.py +800 -0
  31. hugpy_server-0.2.2/src/hugpy_server/app/keeper_line.py +105 -0
  32. hugpy_server-0.2.2/src/hugpy_server/app/member_auth.py +149 -0
  33. hugpy_server-0.2.2/src/hugpy_server/app/operator_auth.py +743 -0
  34. hugpy_server-0.2.2/src/hugpy_server/app/routes/__init__.py +30 -0
  35. hugpy_server-0.2.2/src/hugpy_server/app/routes/agent_routes.py +1672 -0
  36. hugpy_server-0.2.2/src/hugpy_server/app/routes/auth_proxy_routes.py +156 -0
  37. hugpy_server-0.2.2/src/hugpy_server/app/routes/chat_routes.py +11 -0
  38. hugpy_server-0.2.2/src/hugpy_server/app/routes/comms_routes.py +405 -0
  39. hugpy_server-0.2.2/src/hugpy_server/app/routes/discord_routes.py +944 -0
  40. hugpy_server-0.2.2/src/hugpy_server/app/routes/eviction_routes.py +259 -0
  41. hugpy_server-0.2.2/src/hugpy_server/app/routes/fleet_doctrine_routes.py +192 -0
  42. hugpy_server-0.2.2/src/hugpy_server/app/routes/fleet_routes.py +109 -0
  43. hugpy_server-0.2.2/src/hugpy_server/app/routes/group_routes.py +53 -0
  44. hugpy_server-0.2.2/src/hugpy_server/app/routes/help_routes.py +232 -0
  45. hugpy_server-0.2.2/src/hugpy_server/app/routes/installer_assets/__init__.py +0 -0
  46. hugpy_server-0.2.2/src/hugpy_server/app/routes/installer_assets/console-install-link.sh +80 -0
  47. hugpy_server-0.2.2/src/hugpy_server/app/routes/installer_assets/console-install.sh +241 -0
  48. hugpy_server-0.2.2/src/hugpy_server/app/routes/installer_assets/generate_icons.py +66 -0
  49. hugpy_server-0.2.2/src/hugpy_server/app/routes/installer_assets/hugpy-icon.ico +0 -0
  50. hugpy_server-0.2.2/src/hugpy_server/app/routes/installer_assets/hugpy-icon.png +0 -0
  51. hugpy_server-0.2.2/src/hugpy_server/app/routes/installer_assets/station-fix.sh +249 -0
  52. hugpy_server-0.2.2/src/hugpy_server/app/routes/interim_routes.py +148 -0
  53. hugpy_server-0.2.2/src/hugpy_server/app/routes/keeper_help_routes.py +279 -0
  54. hugpy_server-0.2.2/src/hugpy_server/app/routes/llm_storage_routes.py +921 -0
  55. hugpy_server-0.2.2/src/hugpy_server/app/routes/messages_helpers.py +516 -0
  56. hugpy_server-0.2.2/src/hugpy_server/app/routes/messages_routes.py +393 -0
  57. hugpy_server-0.2.2/src/hugpy_server/app/routes/metrics_routes.py +776 -0
  58. hugpy_server-0.2.2/src/hugpy_server/app/routes/ml_routes.py +348 -0
  59. hugpy_server-0.2.2/src/hugpy_server/app/routes/model_group_routes.py +527 -0
  60. hugpy_server-0.2.2/src/hugpy_server/app/routes/model_status_routes.py +1477 -0
  61. hugpy_server-0.2.2/src/hugpy_server/app/routes/oracle_routes.py +697 -0
  62. hugpy_server-0.2.2/src/hugpy_server/app/routes/phone_brick_routes.py +345 -0
  63. hugpy_server-0.2.2/src/hugpy_server/app/routes/prompt_routes.py +120 -0
  64. hugpy_server-0.2.2/src/hugpy_server/app/routes/pypi_routes.py +204 -0
  65. hugpy_server-0.2.2/src/hugpy_server/app/routes/review_routes.py +1460 -0
  66. hugpy_server-0.2.2/src/hugpy_server/app/routes/script_first_routes.py +338 -0
  67. hugpy_server-0.2.2/src/hugpy_server/app/routes/search_routes.py +657 -0
  68. hugpy_server-0.2.2/src/hugpy_server/app/routes/upload_routes.py +297 -0
  69. hugpy_server-0.2.2/src/hugpy_server/app/routes/v1_helpers.py +552 -0
  70. hugpy_server-0.2.2/src/hugpy_server/app/routes/v1_routes.py +1016 -0
  71. hugpy_server-0.2.2/src/hugpy_server/app/routes/video_assist_media.py +325 -0
  72. hugpy_server-0.2.2/src/hugpy_server/app/routes/video_coordination.py +187 -0
  73. hugpy_server-0.2.2/src/hugpy_server/app/routes/video_routes.py +6430 -0
  74. hugpy_server-0.2.2/src/hugpy_server/app/routes/welcome_routes.py +129 -0
  75. hugpy_server-0.2.2/src/hugpy_server/app/routes/worker_routes.py +6032 -0
  76. hugpy_server-0.2.2/src/hugpy_server/app/transfer_ledger.py +260 -0
  77. hugpy_server-0.2.2/src/hugpy_server/app/video_auth.py +189 -0
  78. hugpy_server-0.2.2/src/hugpy_server/console_dist/SOURCE_HASH.json +5 -0
  79. hugpy_server-0.2.2/src/hugpy_server/console_dist/assets/hugpy-mark.005dbad6b15491649f17.png +0 -0
  80. hugpy_server-0.2.2/src/hugpy_server/console_dist/assets/hugpy.75b0380a164d2f2c08e9.png +0 -0
  81. hugpy_server-0.2.2/src/hugpy_server/console_dist/assets/main.104407f5168deaa67a89.js +2 -0
  82. hugpy_server-0.2.2/src/hugpy_server/console_dist/assets/main.104407f5168deaa67a89.js.LICENSE.txt +39 -0
  83. hugpy_server-0.2.2/src/hugpy_server/console_dist/fleet/assets/index--EAYlp9c.css +1 -0
  84. hugpy_server-0.2.2/src/hugpy_server/console_dist/fleet/assets/index-BEA6Z6Eq.js +66 -0
  85. hugpy_server-0.2.2/src/hugpy_server/console_dist/fleet/index.html +71 -0
  86. hugpy_server-0.2.2/src/hugpy_server/console_dist/hugpy-favicon-hex.svg +60 -0
  87. hugpy_server-0.2.2/src/hugpy_server/console_dist/index.html +53 -0
  88. hugpy_server-0.2.2/src/hugpy_server/console_dist/media/assets/hugpy-mark-BXktFcOQ.png +0 -0
  89. hugpy_server-0.2.2/src/hugpy_server/console_dist/media/assets/index-Bfe0XM6M.css +1 -0
  90. hugpy_server-0.2.2/src/hugpy_server/console_dist/media/assets/index-DPfu7_M1.js +262 -0
  91. hugpy_server-0.2.2/src/hugpy_server/console_dist/media/index.html +102 -0
  92. hugpy_server-0.2.2/src/hugpy_server/console_dist/video/assets/hugpy-mark-BXktFcOQ.png +0 -0
  93. hugpy_server-0.2.2/src/hugpy_server/console_dist/video/assets/index-1i-4svLp.css +1 -0
  94. hugpy_server-0.2.2/src/hugpy_server/console_dist/video/assets/index-CHczeEma.js +4190 -0
  95. hugpy_server-0.2.2/src/hugpy_server/console_dist/video/index.html +71 -0
  96. hugpy_server-0.2.2/src/hugpy_server/py.typed +0 -0
  97. hugpy_server-0.2.2/src/hugpy_server/state.py +33 -0
  98. hugpy_server-0.2.2/src/hugpy_server/wiring.py +222 -0
  99. hugpy_server-0.2.2/src/hugpy_server/wsgi_app.py +713 -0
  100. hugpy_server-0.2.2/src/hugpy_server.egg-info/PKG-INFO +79 -0
  101. hugpy_server-0.2.2/src/hugpy_server.egg-info/SOURCES.txt +248 -0
  102. hugpy_server-0.2.2/src/hugpy_server.egg-info/dependency_links.txt +1 -0
  103. hugpy_server-0.2.2/src/hugpy_server.egg-info/entry_points.txt +2 -0
  104. hugpy_server-0.2.2/src/hugpy_server.egg-info/requires.txt +31 -0
  105. hugpy_server-0.2.2/src/hugpy_server.egg-info/scm_file_list.json +244 -0
  106. hugpy_server-0.2.2/src/hugpy_server.egg-info/scm_version.json +8 -0
  107. hugpy_server-0.2.2/src/hugpy_server.egg-info/top_level.txt +1 -0
  108. hugpy_server-0.2.2/tests/conftest.py +285 -0
  109. hugpy_server-0.2.2/tests/integration/test_alloc_modes_stack.py +196 -0
  110. hugpy_server-0.2.2/tests/integration/test_authoritative_cancel_and_orphan_expiry.py +241 -0
  111. hugpy_server-0.2.2/tests/integration/test_auto_block_infeasible.py +375 -0
  112. hugpy_server-0.2.2/tests/integration/test_chat_role_alternation_v1_seam.py +84 -0
  113. hugpy_server-0.2.2/tests/integration/test_chat_task_selection.py +24 -0
  114. hugpy_server-0.2.2/tests/integration/test_cold_hold.py +526 -0
  115. hugpy_server-0.2.2/tests/integration/test_cold_hold_cap.py +751 -0
  116. hugpy_server-0.2.2/tests/integration/test_comfy_id_lock.py +280 -0
  117. hugpy_server-0.2.2/tests/integration/test_comms.py +160 -0
  118. hugpy_server-0.2.2/tests/integration/test_comms_wiring.py +171 -0
  119. hugpy_server-0.2.2/tests/integration/test_fleet_alloc_defaults.py +569 -0
  120. hugpy_server-0.2.2/tests/integration/test_fleet_doctrine.py +834 -0
  121. hugpy_server-0.2.2/tests/integration/test_fleet_evict_model.py +424 -0
  122. hugpy_server-0.2.2/tests/integration/test_fleet_pool_guard_eviction_stream.py +95 -0
  123. hugpy_server-0.2.2/tests/integration/test_fleet_templates.py +356 -0
  124. hugpy_server-0.2.2/tests/integration/test_id_lock_route_default_geometry.py +30 -0
  125. hugpy_server-0.2.2/tests/integration/test_identity_cleanup_prompt_persist.py +158 -0
  126. hugpy_server-0.2.2/tests/integration/test_identity_cleanup_prompt_route.py +209 -0
  127. hugpy_server-0.2.2/tests/integration/test_identity_from_video.py +565 -0
  128. hugpy_server-0.2.2/tests/integration/test_identity_mesh_vram_retry.py +58 -0
  129. hugpy_server-0.2.2/tests/integration/test_identity_pose_stage.py +485 -0
  130. hugpy_server-0.2.2/tests/integration/test_identity_profiles.py +711 -0
  131. hugpy_server-0.2.2/tests/integration/test_identity_profiles_from_groups.py +246 -0
  132. hugpy_server-0.2.2/tests/integration/test_identity_render_relay.py +694 -0
  133. hugpy_server-0.2.2/tests/integration/test_identity_version_routes.py +273 -0
  134. hugpy_server-0.2.2/tests/integration/test_identity_versions.py +410 -0
  135. hugpy_server-0.2.2/tests/integration/test_identity_video_extract_relay.py +662 -0
  136. hugpy_server-0.2.2/tests/integration/test_identity_views.py +536 -0
  137. hugpy_server-0.2.2/tests/integration/test_identity_vision_setting.py +366 -0
  138. hugpy_server-0.2.2/tests/integration/test_job_progress_bridge.py +444 -0
  139. hugpy_server-0.2.2/tests/integration/test_live_activity.py +56 -0
  140. hugpy_server-0.2.2/tests/integration/test_media_control_plane.py +192 -0
  141. hugpy_server-0.2.2/tests/integration/test_messages_seam.py +258 -0
  142. hugpy_server-0.2.2/tests/integration/test_mlt_render.py +358 -0
  143. hugpy_server-0.2.2/tests/integration/test_model_block.py +290 -0
  144. hugpy_server-0.2.2/tests/integration/test_model_groups_provider.py +192 -0
  145. hugpy_server-0.2.2/tests/integration/test_model_physical_state.py +1299 -0
  146. hugpy_server-0.2.2/tests/integration/test_model_status_cache.py +663 -0
  147. hugpy_server-0.2.2/tests/integration/test_movie_capability_pin.py +376 -0
  148. hugpy_server-0.2.2/tests/integration/test_movie_views.py +448 -0
  149. hugpy_server-0.2.2/tests/integration/test_no_local_serving.py +174 -0
  150. hugpy_server-0.2.2/tests/integration/test_no_makeroom_v1_seam.py +21 -0
  151. hugpy_server-0.2.2/tests/integration/test_no_think_video_routes.py +49 -0
  152. hugpy_server-0.2.2/tests/integration/test_ops_media_comfy_assets.py +16 -0
  153. hugpy_server-0.2.2/tests/integration/test_pid_attribution.py +92 -0
  154. hugpy_server-0.2.2/tests/integration/test_placement_gpu_budgets.py +61 -0
  155. hugpy_server-0.2.2/tests/integration/test_prompt_intent.py +277 -0
  156. hugpy_server-0.2.2/tests/integration/test_registry_sources_boot_rewalk.py +169 -0
  157. hugpy_server-0.2.2/tests/integration/test_store_reconcile.py +328 -0
  158. hugpy_server-0.2.2/tests/integration/test_studio_assist_log_routes.py +217 -0
  159. hugpy_server-0.2.2/tests/integration/test_studio_clip_archive.py +349 -0
  160. hugpy_server-0.2.2/tests/integration/test_studio_clip_serve.py +315 -0
  161. hugpy_server-0.2.2/tests/integration/test_studio_enhance.py +647 -0
  162. hugpy_server-0.2.2/tests/integration/test_studio_id_lock.py +472 -0
  163. hugpy_server-0.2.2/tests/integration/test_studio_lock_templates.py +194 -0
  164. hugpy_server-0.2.2/tests/integration/test_studio_model_pin.py +227 -0
  165. hugpy_server-0.2.2/tests/integration/test_studio_movie.py +369 -0
  166. hugpy_server-0.2.2/tests/integration/test_studio_movie_id_cut.py +525 -0
  167. hugpy_server-0.2.2/tests/integration/test_studio_movie_sessions.py +615 -0
  168. hugpy_server-0.2.2/tests/integration/test_studio_movie_vace.py +481 -0
  169. hugpy_server-0.2.2/tests/integration/test_studio_offload.py +826 -0
  170. hugpy_server-0.2.2/tests/integration/test_studio_placement_registry.py +149 -0
  171. hugpy_server-0.2.2/tests/integration/test_studio_presets_route.py +319 -0
  172. hugpy_server-0.2.2/tests/integration/test_studio_project_thread.py +250 -0
  173. hugpy_server-0.2.2/tests/integration/test_studio_source_video.py +474 -0
  174. hugpy_server-0.2.2/tests/integration/test_studio_tier_presets.py +163 -0
  175. hugpy_server-0.2.2/tests/integration/test_studio_vace.py +358 -0
  176. hugpy_server-0.2.2/tests/integration/test_summarizer_placement.py +334 -0
  177. hugpy_server-0.2.2/tests/integration/test_v1_seam.py +423 -0
  178. hugpy_server-0.2.2/tests/integration/test_video_jobs_listing.py +340 -0
  179. hugpy_server-0.2.2/tests/integration/test_video_presets_route.py +583 -0
  180. hugpy_server-0.2.2/tests/integration/test_video_share.py +235 -0
  181. hugpy_server-0.2.2/tests/integration/test_video_to_editor.py +415 -0
  182. hugpy_server-0.2.2/tests/integration/test_worker_fit_moe.py +169 -0
  183. hugpy_server-0.2.2/tests/integration/test_worker_fit_per_device.py +107 -0
  184. hugpy_server-0.2.2/tests/integration/worker_store_isolation.py +47 -0
  185. hugpy_server-0.2.2/tests/test_agent_nodes.py +748 -0
  186. hugpy_server-0.2.2/tests/test_app_factory.py +120 -0
  187. hugpy_server-0.2.2/tests/test_assist_media_pretext.py +314 -0
  188. hugpy_server-0.2.2/tests/test_benchmark_restart.py +318 -0
  189. hugpy_server-0.2.2/tests/test_block_propagation.py +107 -0
  190. hugpy_server-0.2.2/tests/test_build_console.py +218 -0
  191. hugpy_server-0.2.2/tests/test_build_identity_routes.py +53 -0
  192. hugpy_server-0.2.2/tests/test_bulk_alloc_route.py +418 -0
  193. hugpy_server-0.2.2/tests/test_bulk_residency_route.py +149 -0
  194. hugpy_server-0.2.2/tests/test_calibration.py +269 -0
  195. hugpy_server-0.2.2/tests/test_central_transfer_budget_gate.py +165 -0
  196. hugpy_server-0.2.2/tests/test_central_transfer_cap.py +305 -0
  197. hugpy_server-0.2.2/tests/test_comms_options.py +157 -0
  198. hugpy_server-0.2.2/tests/test_compute_actions.py +273 -0
  199. hugpy_server-0.2.2/tests/test_download_progress.py +189 -0
  200. hugpy_server-0.2.2/tests/test_eviction_telemetry.py +711 -0
  201. hugpy_server-0.2.2/tests/test_explicit_max_gpu_persists.py +218 -0
  202. hugpy_server-0.2.2/tests/test_fleet_distribution_routes.py +180 -0
  203. hugpy_server-0.2.2/tests/test_flex_central_mirror.py +62 -0
  204. hugpy_server-0.2.2/tests/test_gate_everywhere_and_auto_reap.py +328 -0
  205. hugpy_server-0.2.2/tests/test_help_agent.py +334 -0
  206. hugpy_server-0.2.2/tests/test_hf_token_auth.py +174 -0
  207. hugpy_server-0.2.2/tests/test_import_policy.py +107 -0
  208. hugpy_server-0.2.2/tests/test_install_extras.py +124 -0
  209. hugpy_server-0.2.2/tests/test_install_links.py +1048 -0
  210. hugpy_server-0.2.2/tests/test_install_options_skip_projectors.py +27 -0
  211. hugpy_server-0.2.2/tests/test_load_fail_metrics.py +133 -0
  212. hugpy_server-0.2.2/tests/test_manifest_gguf_election.py +92 -0
  213. hugpy_server-0.2.2/tests/test_member_tier.py +600 -0
  214. hugpy_server-0.2.2/tests/test_model_metadata_cache.py +526 -0
  215. hugpy_server-0.2.2/tests/test_model_metrics2_filters.py +90 -0
  216. hugpy_server-0.2.2/tests/test_model_status_routes.py +413 -0
  217. hugpy_server-0.2.2/tests/test_no_think_hard_switch.py +286 -0
  218. hugpy_server-0.2.2/tests/test_oracle_catalog.py +836 -0
  219. hugpy_server-0.2.2/tests/test_oracle_evaluation.py +772 -0
  220. hugpy_server-0.2.2/tests/test_oracle_route.py +1148 -0
  221. hugpy_server-0.2.2/tests/test_oracle_selection_producers.py +230 -0
  222. hugpy_server-0.2.2/tests/test_pin_and_weights_gate.py +155 -0
  223. hugpy_server-0.2.2/tests/test_placement_observe.py +238 -0
  224. hugpy_server-0.2.2/tests/test_prompt_spread.py +484 -0
  225. hugpy_server-0.2.2/tests/test_reap_approve_route.py +97 -0
  226. hugpy_server-0.2.2/tests/test_reconcile_deduce_fit.py +17 -0
  227. hugpy_server-0.2.2/tests/test_relay_retry.py +110 -0
  228. hugpy_server-0.2.2/tests/test_review_ingest.py +479 -0
  229. hugpy_server-0.2.2/tests/test_script_first_routes.py +653 -0
  230. hugpy_server-0.2.2/tests/test_single_format_select.py +316 -0
  231. hugpy_server-0.2.2/tests/test_slot_relaunch_route.py +186 -0
  232. hugpy_server-0.2.2/tests/test_studio_autofit.py +433 -0
  233. hugpy_server-0.2.2/tests/test_studio_floor.py +74 -0
  234. hugpy_server-0.2.2/tests/test_studio_tester.py +269 -0
  235. hugpy_server-0.2.2/tests/test_transfer_ledger.py +144 -0
  236. hugpy_server-0.2.2/tests/test_v1_caller_attribution.py +55 -0
  237. hugpy_server-0.2.2/tests/test_v1_image_parts.py +48 -0
  238. hugpy_server-0.2.2/tests/test_video_gate.py +166 -0
  239. hugpy_server-0.2.2/tests/test_walk_listing_skip.py +113 -0
  240. hugpy_server-0.2.2/tests/test_wiring.py +90 -0
  241. hugpy_server-0.2.2/tests/test_worker_aggregate.py +548 -0
  242. hugpy_server-0.2.2/tests/test_worker_boot_prewarm.py +161 -0
  243. hugpy_server-0.2.2/tests/test_worker_constraints_route.py +124 -0
  244. hugpy_server-0.2.2/tests/test_worker_fetch_route.py +104 -0
  245. hugpy_server-0.2.2/tests/test_worker_memory_forget.py +99 -0
  246. hugpy_server-0.2.2/tests/test_worker_preference_polite.py +717 -0
  247. hugpy_server-0.2.2/tests/test_worker_transfer_auth_range.py +221 -0
  248. hugpy_server-0.2.2/tests/test_worker_wildcard.py +124 -0
  249. hugpy_server-0.2.2/tests/test_workers_load_spill.py +244 -0
  250. hugpy_server-0.2.2/tools/build_console.py +352 -0
@@ -0,0 +1,61 @@
1
+ # Building the console bundles
2
+
3
+ `hugpy_server` serves the React applications as **package data**:
4
+ `src/hugpy_server/console_dist/` is mounted by `hugpy_server.wsgi_app.mount_console`
5
+ and resolved at runtime through `importlib.resources`, so a plain
6
+ `pip install hugpy-server && hugpy-serve` includes the UI. The Python package
7
+ never runs `npm`; the bundles are built from the workspace `react/` tree and
8
+ copied in before the wheel is built.
9
+
10
+ | React package (under `react/`) | Mount | Copy `dist/` to |
11
+ |---|---|---|
12
+ | `ui` (`@hugpy/ui`) | `/` | `console_dist/` |
13
+ | `agents_ui` (`@hugpy/agents-ui`) | `/fleet` | `console_dist/fleet/` |
14
+ | `media_intelligence_ui` | `/media` | `console_dist/media/` |
15
+ | `video_intelligence_ui` | `/video` | `console_dist/video/` |
16
+
17
+ `ui_shared` is a library consumed by the four builds; it has no mount.
18
+
19
+ ## Steps
20
+
21
+ The table above lives in `console_manifest.json` (mount -> React package dir,
22
+ npm name, pinned published version, copy target under `console_dist/`).
23
+ `tools/build_console.py` (stdlib only) reads it. From this package directory:
24
+
25
+ ```bash
26
+ python tools/build_console.py --from-source # npm ci + npm run build in react/<pkg>, copy dist/
27
+ python tools/build_console.py --from-npm # npm pack <npm>@<pinned version>, copy its dist/
28
+ python tools/build_console.py --from-source --only /fleet # one mount; repeat --only for more
29
+ python tools/build_console.py --check # which mounts are present, index.html per mount
30
+ ```
31
+
32
+ * Only the selected mounts are replaced. Rebuilding `/` clears the root files
33
+ but never `fleet/`, `media/` or `video/`, and it does not copy the arm copies
34
+ that ui's `postbuild` puts in `ui/dist/<arm>/` (each arm has its own mount).
35
+ * `--from-source` installs with `npm ci --workspaces=false` (`npm install` when a
36
+ package has no lockfile) because `react/` is an npm workspace root without a
37
+ root lockfile. `--skip-install` reuses the existing `node_modules`.
38
+ * `--from-npm` needs a release whose tarball includes `dist/`. `"dist"` was added
39
+ to `files` after the currently pinned versions were published (ui 0.3.0,
40
+ agents-ui 0.3.0, media-intelligence-ui 0.3.0, video-intelligence-ui 0.3.2),
41
+ so those versions stop with a clear error. Bump the pins in the manifest
42
+ after the next tag-published release (`react/README.md`).
43
+ * `--check` exits 1 when a selected mount has no `index.html`. `--console-dist`
44
+ and `--react-root` override the manifest paths (tests use a temp dir).
45
+
46
+ Then build the wheel (`python -m build --wheel` inside `py/services/hugpy_server`).
47
+ `pyproject.toml` lists `console_dist/**/*` as package data, so every file under
48
+ it ships.
49
+
50
+ ## Runtime rules
51
+
52
+ * A mount only exists when its `index.html` exists. With no `console_dist/index.html`
53
+ at all the server runs API-only and every non-API path is a plain 404.
54
+ * Deep links under an arm (`/video/foo`) fall back to that arm's own
55
+ `index.html`; an arm that is not shipped falls back to the console root SPA.
56
+ * `HUGPY_UI_DIST=/path/to/dist` (env or `.env`) overrides the packaged bundle
57
+ for development against a live webpack build.
58
+ * The video arm's `index.html` carries the `window.__HUGPY_MEDIA_BASE__` marker;
59
+ the server rewrites it when `HUGPY_DEMO_MEDIA_DIR` / `HUGPY_DEMO_MEDIA_BASE`
60
+ is configured (`wsgi_app._video_index_response`).
61
+ * `/studio` redirects (302) into the video arm.
@@ -0,0 +1,41 @@
1
+ hugpy — Source-Available License
2
+
3
+ Copyright (c) 2026 putkoff (hugpy.ai). All rights reserved.
4
+
5
+ Permission is granted, free of charge, to use this software ("hugpy") for
6
+ personal and non-commercial purposes, and for time-limited commercial
7
+ evaluation, subject to the following conditions:
8
+
9
+ 1. Non-commercial use means use by an individual for personal purposes, or
10
+ use by a non-profit or educational institution for its own internal
11
+ purposes. Any use by, for, or on behalf of a for-profit business or in
12
+ connection with revenue-generating activity is commercial use — including
13
+ internal business use, use in producing goods or services, and use on
14
+ paid engagements.
15
+
16
+ 2. Commercial use requires a commercial license from the copyright holder.
17
+ Exception: a business may evaluate the software internally for up to
18
+ thirty (30) days free of charge; continued use after that requires a
19
+ commercial license.
20
+
21
+ 3. Redistribution of this software, in source or binary form, modified or
22
+ unmodified, is not permitted without prior written permission from the
23
+ copyright holder. Downloading the software from an official distribution
24
+ channel (PyPI, npm, hugpy.ai) is not redistribution.
25
+
26
+ 4. Modification for personal use or internal evaluation is permitted;
27
+ distribution of modified versions is not.
28
+
29
+ 5. This notice must be retained in all copies or substantial portions of
30
+ the software.
31
+
32
+ 6. Any use outside these terms automatically terminates this license.
33
+
34
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
35
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
36
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
37
+ COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY ARISING
38
+ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
39
+ IN THE SOFTWARE.
40
+
41
+ For commercial licensing or redistribution permission: https://hugpy.ai
@@ -0,0 +1,79 @@
1
+ Metadata-Version: 2.4
2
+ Name: hugpy-server
3
+ Version: 0.2.2
4
+ Summary: Hugpy server: the Flask composition root with routes, auth, SSE, API keys and the built web console; wires fleet placement, task plugins and oracle hooks
5
+ Author-email: putkoff <support@hugpy.ai>
6
+ License-Expression: LicenseRef-Proprietary
7
+ Project-URL: Homepage, https://hugpy.ai
8
+ Project-URL: Documentation, https://github.com/hugpy/hugpy/blob/main/py/services/hugpy_server/README.md
9
+ Project-URL: Repository, https://github.com/hugpy/hugpy
10
+ Project-URL: Source, https://github.com/hugpy/hugpy/tree/main/py/services/hugpy_server
11
+ Project-URL: Issues, https://github.com/hugpy/hugpy/issues
12
+ Project-URL: Changelog, https://github.com/hugpy/hugpy/releases
13
+ Project-URL: Architecture, https://github.com/hugpy/hugpy/blob/main/PARTITION.md
14
+ Keywords: hugpy,llm,self-hosted,openai-compatible,flask,api-server,console
15
+ Classifier: Development Status :: 3 - Alpha
16
+ Classifier: Intended Audience :: Developers
17
+ Classifier: Operating System :: OS Independent
18
+ Classifier: Programming Language :: Python :: 3
19
+ Classifier: Programming Language :: Python :: 3 :: Only
20
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
21
+ Classifier: Environment :: Web Environment
22
+ Classifier: Framework :: Flask
23
+ Classifier: Topic :: Internet :: WWW/HTTP :: WSGI :: Application
24
+ Requires-Python: >=3.10
25
+ Description-Content-Type: text/markdown
26
+ License-File: LICENSE
27
+ Requires-Dist: hugpy-platform
28
+ Requires-Dist: hugpy-control
29
+ Requires-Dist: hugpy-storage
30
+ Requires-Dist: hugpy-engine
31
+ Requires-Dist: hugpy-media
32
+ Requires-Dist: hugpy-video
33
+ Requires-Dist: hugpy-oracle
34
+ Requires-Dist: hugpy-fleet
35
+ Requires-Dist: hugpy-curation
36
+ Requires-Dist: flask>=3
37
+ Requires-Dist: werkzeug>=3
38
+ Requires-Dist: abstract-flask
39
+ Requires-Dist: pydantic>=2
40
+ Requires-Dist: requests
41
+ Requires-Dist: huggingface_hub
42
+ Requires-Dist: gunicorn; sys_platform != "win32"
43
+ Requires-Dist: waitress; sys_platform == "win32"
44
+ Provides-Extra: test
45
+ Requires-Dist: pytest>=8; extra == "test"
46
+ Requires-Dist: pytest-timeout; extra == "test"
47
+ Provides-Extra: discord
48
+ Requires-Dist: hugpy-discord; extra == "discord"
49
+ Provides-Extra: ops
50
+ Requires-Dist: hugpy-ops; extra == "ops"
51
+ Dynamic: license-file
52
+
53
+ # hugpy-server
54
+
55
+ `hugpy_server` — the Flask composition root of the Hugpy ecosystem, extracted
56
+ from `abstract_hugpy_dev`. Ownership and allowed dependencies are declared in
57
+ `py/partition.toml`; see `PARTITION.md` at the workspace root.
58
+
59
+ * `hugpy_server.wsgi_app.create_app()` / `get_hugpy_flask()` build the app:
60
+ every route blueprint, the `/api` dual mounts, the operator/member/video
61
+ gates and the packaged React console (`console_dist/`, see
62
+ `BUILD_CONSOLE.md`).
63
+ * `hugpy_server.wiring.install_all()` installs every cross-package seam listed
64
+ in `py/WIRING.md` (fleet placement into the engine, oracle providers, task
65
+ plugins, catalog bridge, oracle video hooks, curation providers, storage
66
+ footprint selector, HF-token listener, control bus, eviction sink). The
67
+ report lands at `app.extensions["hugpy_wiring"]`.
68
+ * `hugpy-serve` (`hugpy_server.wsgi_app:main`) serves with gunicorn on POSIX,
69
+ waitress on Windows, and the Flask dev server as the last resort.
70
+ * Server-owned state (API keys, video share keys, Discord bindings, install
71
+ links) lives under `hugpy_server.state.server_state_dir()`
72
+ (`HUGPY_SERVER_STATE_DIR`, else the platform's `PROJECTS_HOME`).
73
+
74
+ Allowed Python dependencies inside the ecosystem: hugpy_platform, hugpy_control,
75
+ hugpy_storage, hugpy_engine, hugpy_media, hugpy_video, hugpy_oracle, hugpy_fleet,
76
+ hugpy_curation (optional, lazy: hugpy_discord, hugpy_ops).
77
+
78
+ Tests: `cd py/services/hugpy_server && ../../.venv/bin/python -m pytest -q --timeout=120`
79
+ (`tests/integration/` holds the multi-package tests moved from the monolith).
@@ -0,0 +1,27 @@
1
+ # hugpy-server
2
+
3
+ `hugpy_server` — the Flask composition root of the Hugpy ecosystem, extracted
4
+ from `abstract_hugpy_dev`. Ownership and allowed dependencies are declared in
5
+ `py/partition.toml`; see `PARTITION.md` at the workspace root.
6
+
7
+ * `hugpy_server.wsgi_app.create_app()` / `get_hugpy_flask()` build the app:
8
+ every route blueprint, the `/api` dual mounts, the operator/member/video
9
+ gates and the packaged React console (`console_dist/`, see
10
+ `BUILD_CONSOLE.md`).
11
+ * `hugpy_server.wiring.install_all()` installs every cross-package seam listed
12
+ in `py/WIRING.md` (fleet placement into the engine, oracle providers, task
13
+ plugins, catalog bridge, oracle video hooks, curation providers, storage
14
+ footprint selector, HF-token listener, control bus, eviction sink). The
15
+ report lands at `app.extensions["hugpy_wiring"]`.
16
+ * `hugpy-serve` (`hugpy_server.wsgi_app:main`) serves with gunicorn on POSIX,
17
+ waitress on Windows, and the Flask dev server as the last resort.
18
+ * Server-owned state (API keys, video share keys, Discord bindings, install
19
+ links) lives under `hugpy_server.state.server_state_dir()`
20
+ (`HUGPY_SERVER_STATE_DIR`, else the platform's `PROJECTS_HOME`).
21
+
22
+ Allowed Python dependencies inside the ecosystem: hugpy_platform, hugpy_control,
23
+ hugpy_storage, hugpy_engine, hugpy_media, hugpy_video, hugpy_oracle, hugpy_fleet,
24
+ hugpy_curation (optional, lazy: hugpy_discord, hugpy_ops).
25
+
26
+ Tests: `cd py/services/hugpy_server && ../../.venv/bin/python -m pytest -q --timeout=120`
27
+ (`tests/integration/` holds the multi-package tests moved from the monolith).
@@ -0,0 +1,30 @@
1
+ {
2
+ "react_root": "../../../react",
3
+ "console_dist": "src/hugpy_server/console_dist",
4
+ "mounts": {
5
+ "/": {
6
+ "package_dir": "ui",
7
+ "npm": "@hugpy/ui",
8
+ "version": "0.3.0",
9
+ "target": ""
10
+ },
11
+ "/fleet": {
12
+ "package_dir": "agents_ui",
13
+ "npm": "@hugpy/agents-ui",
14
+ "version": "0.3.0",
15
+ "target": "fleet"
16
+ },
17
+ "/media": {
18
+ "package_dir": "media_intelligence_ui",
19
+ "npm": "@hugpy/media-intelligence-ui",
20
+ "version": "0.3.0",
21
+ "target": "media"
22
+ },
23
+ "/video": {
24
+ "package_dir": "video_intelligence_ui",
25
+ "npm": "@hugpy/video-intelligence-ui",
26
+ "version": "0.3.2",
27
+ "target": "video"
28
+ }
29
+ }
30
+ }