bazaar-compute-node 0.2.3__tar.gz → 0.3.0rc1__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 (422) hide show
  1. bazaar_compute_node-0.3.0rc1/LICENSE +202 -0
  2. bazaar_compute_node-0.2.3/README.md → bazaar_compute_node-0.3.0rc1/PKG-INFO +39 -39
  3. bazaar_compute_node-0.3.0rc1/README.md +106 -0
  4. bazaar_compute_node-0.3.0rc1/pyproject.toml +44 -0
  5. bazaar_compute_node-0.3.0rc1/pyproject.toml.orig +41 -0
  6. bazaar_compute_node-0.3.0rc1/src/bazaar_compute_node/__init__.py +24 -0
  7. bazaar_compute_node-0.3.0rc1/src/bazaar_compute_node/__main__.py +3 -0
  8. bazaar_compute_node-0.3.0rc1/src/bazaar_compute_node/boot.py +150 -0
  9. bazaar_compute_node-0.3.0rc1/src/bazaar_compute_node/cli.py +135 -0
  10. bazaar_compute_node-0.3.0rc1/src/bazaar_compute_node/defaults.toml +112 -0
  11. bazaar_compute_node-0.3.0rc1/src/bazaar_compute_node/py.typed +1 -0
  12. bazaar_compute_node-0.2.3/LICENSE +0 -613
  13. bazaar_compute_node-0.2.3/PKG-INFO +0 -153
  14. bazaar_compute_node-0.2.3/pyproject.toml +0 -89
  15. bazaar_compute_node-0.2.3/pyproject.toml.orig +0 -87
  16. bazaar_compute_node-0.2.3/src/bazaar_compute_node/__init__.py +0 -4
  17. bazaar_compute_node-0.2.3/src/bazaar_compute_node/app/__init__.py +0 -1
  18. bazaar_compute_node-0.2.3/src/bazaar_compute_node/app/agent.py +0 -549
  19. bazaar_compute_node-0.2.3/src/bazaar_compute_node/app/agent_management.py +0 -219
  20. bazaar_compute_node-0.2.3/src/bazaar_compute_node/app/application.py +0 -1091
  21. bazaar_compute_node-0.2.3/src/bazaar_compute_node/app/attachments.py +0 -196
  22. bazaar_compute_node-0.2.3/src/bazaar_compute_node/app/command.py +0 -783
  23. bazaar_compute_node-0.2.3/src/bazaar_compute_node/app/config.py +0 -886
  24. bazaar_compute_node-0.2.3/src/bazaar_compute_node/app/health_report.py +0 -90
  25. bazaar_compute_node-0.2.3/src/bazaar_compute_node/app/registry.py +0 -186
  26. bazaar_compute_node-0.2.3/src/bazaar_compute_node/app/resource_dispatch.py +0 -562
  27. bazaar_compute_node-0.2.3/src/bazaar_compute_node/app/server_management.py +0 -140
  28. bazaar_compute_node-0.2.3/src/bazaar_compute_node/app/system_service.py +0 -1025
  29. bazaar_compute_node-0.2.3/src/bazaar_compute_node/app/transport.py +0 -270
  30. bazaar_compute_node-0.2.3/src/bazaar_compute_node/app/upgrade.py +0 -149
  31. bazaar_compute_node-0.2.3/src/bazaar_compute_node/app/usage.py +0 -12
  32. bazaar_compute_node-0.2.3/src/bazaar_compute_node/app/version_check.py +0 -85
  33. bazaar_compute_node-0.2.3/src/bazaar_compute_node/app/windows_pipe.py +0 -475
  34. bazaar_compute_node-0.2.3/src/bazaar_compute_node/app/wrapper.py +0 -95
  35. bazaar_compute_node-0.2.3/src/bazaar_compute_node/bcc.py +0 -9
  36. bazaar_compute_node-0.2.3/src/bazaar_compute_node/cli.py +0 -9
  37. bazaar_compute_node-0.2.3/src/bazaar_compute_node/cmd/__init__.py +0 -0
  38. bazaar_compute_node-0.2.3/src/bazaar_compute_node/cmd/bcc/__init__.py +0 -63
  39. bazaar_compute_node-0.2.3/src/bazaar_compute_node/cmd/bcc/_client.py +0 -86
  40. bazaar_compute_node-0.2.3/src/bazaar_compute_node/cmd/bcc/_format.py +0 -292
  41. bazaar_compute_node-0.2.3/src/bazaar_compute_node/cmd/bcc/inbox.py +0 -22
  42. bazaar_compute_node-0.2.3/src/bazaar_compute_node/cmd/bcc/message.py +0 -219
  43. bazaar_compute_node-0.2.3/src/bazaar_compute_node/cmd/bcc/node.py +0 -50
  44. bazaar_compute_node-0.2.3/src/bazaar_compute_node/cmd/bcc/reminder.py +0 -175
  45. bazaar_compute_node-0.2.3/src/bazaar_compute_node/cmd/bcc/thread.py +0 -31
  46. bazaar_compute_node-0.2.3/src/bazaar_compute_node/cmd/bcn/__init__.py +0 -72
  47. bazaar_compute_node-0.2.3/src/bazaar_compute_node/cmd/bcn/_options.py +0 -94
  48. bazaar_compute_node-0.2.3/src/bazaar_compute_node/cmd/bcn/_runner.py +0 -22
  49. bazaar_compute_node-0.2.3/src/bazaar_compute_node/cmd/bcn/agent.py +0 -125
  50. bazaar_compute_node-0.2.3/src/bazaar_compute_node/cmd/bcn/node.py +0 -225
  51. bazaar_compute_node-0.2.3/src/bazaar_compute_node/cmd/bcn/server.py +0 -48
  52. bazaar_compute_node-0.2.3/src/bazaar_compute_node/cmd/bcn/service.py +0 -63
  53. bazaar_compute_node-0.2.3/src/bazaar_compute_node/contrib/__init__.py +0 -1
  54. bazaar_compute_node-0.2.3/src/bazaar_compute_node/contrib/claude/__init__.py +0 -28
  55. bazaar_compute_node-0.2.3/src/bazaar_compute_node/contrib/claude/approval.py +0 -122
  56. bazaar_compute_node-0.2.3/src/bazaar_compute_node/contrib/claude/client.py +0 -480
  57. bazaar_compute_node-0.2.3/src/bazaar_compute_node/contrib/claude/events.py +0 -676
  58. bazaar_compute_node-0.2.3/src/bazaar_compute_node/contrib/claude/inspect.py +0 -113
  59. bazaar_compute_node-0.2.3/src/bazaar_compute_node/contrib/claude/plugin.py +0 -32
  60. bazaar_compute_node-0.2.3/src/bazaar_compute_node/contrib/claude/process.py +0 -430
  61. bazaar_compute_node-0.2.3/src/bazaar_compute_node/contrib/claude/protocol.py +0 -110
  62. bazaar_compute_node-0.2.3/src/bazaar_compute_node/contrib/claude/runtime.py +0 -742
  63. bazaar_compute_node-0.2.3/src/bazaar_compute_node/contrib/codex/__init__.py +0 -79
  64. bazaar_compute_node-0.2.3/src/bazaar_compute_node/contrib/codex/approval.py +0 -238
  65. bazaar_compute_node-0.2.3/src/bazaar_compute_node/contrib/codex/client.py +0 -549
  66. bazaar_compute_node-0.2.3/src/bazaar_compute_node/contrib/codex/events.py +0 -745
  67. bazaar_compute_node-0.2.3/src/bazaar_compute_node/contrib/codex/inspect.py +0 -112
  68. bazaar_compute_node-0.2.3/src/bazaar_compute_node/contrib/codex/plugin.py +0 -32
  69. bazaar_compute_node-0.2.3/src/bazaar_compute_node/contrib/codex/process.py +0 -664
  70. bazaar_compute_node-0.2.3/src/bazaar_compute_node/contrib/codex/protocol.py +0 -106
  71. bazaar_compute_node-0.2.3/src/bazaar_compute_node/contrib/codex/runtime.py +0 -782
  72. bazaar_compute_node-0.2.3/src/bazaar_compute_node/contrib/lark/__init__.py +0 -1
  73. bazaar_compute_node-0.2.3/src/bazaar_compute_node/contrib/lark/api.py +0 -864
  74. bazaar_compute_node-0.2.3/src/bazaar_compute_node/contrib/lark/approval.py +0 -513
  75. bazaar_compute_node-0.2.3/src/bazaar_compute_node/contrib/lark/attachments.py +0 -637
  76. bazaar_compute_node-0.2.3/src/bazaar_compute_node/contrib/lark/channel.py +0 -1248
  77. bazaar_compute_node-0.2.3/src/bazaar_compute_node/contrib/lark/frame.py +0 -118
  78. bazaar_compute_node-0.2.3/src/bazaar_compute_node/contrib/lark/identity.py +0 -139
  79. bazaar_compute_node-0.2.3/src/bazaar_compute_node/contrib/lark/outbound.py +0 -567
  80. bazaar_compute_node-0.2.3/src/bazaar_compute_node/contrib/lark/plugin.py +0 -51
  81. bazaar_compute_node-0.2.3/src/bazaar_compute_node/contrib/lark/transport.py +0 -828
  82. bazaar_compute_node-0.2.3/src/bazaar_compute_node/contrib/logging/__init__.py +0 -5
  83. bazaar_compute_node-0.2.3/src/bazaar_compute_node/contrib/logging/audit.py +0 -52
  84. bazaar_compute_node-0.2.3/src/bazaar_compute_node/contrib/logging/plugin.py +0 -12
  85. bazaar_compute_node-0.2.3/src/bazaar_compute_node/contrib/server/__init__.py +0 -0
  86. bazaar_compute_node-0.2.3/src/bazaar_compute_node/contrib/server/audit.py +0 -241
  87. bazaar_compute_node-0.2.3/src/bazaar_compute_node/contrib/server/control.py +0 -624
  88. bazaar_compute_node-0.2.3/src/bazaar_compute_node/contrib/server/plugin.py +0 -17
  89. bazaar_compute_node-0.2.3/src/bazaar_compute_node/contrib/sqlite/__init__.py +0 -10
  90. bazaar_compute_node-0.2.3/src/bazaar_compute_node/contrib/sqlite/codec.py +0 -543
  91. bazaar_compute_node-0.2.3/src/bazaar_compute_node/contrib/sqlite/database.py +0 -288
  92. bazaar_compute_node-0.2.3/src/bazaar_compute_node/contrib/sqlite/executor.py +0 -614
  93. bazaar_compute_node-0.2.3/src/bazaar_compute_node/contrib/sqlite/migrations/__init__.py +0 -63
  94. bazaar_compute_node-0.2.3/src/bazaar_compute_node/contrib/sqlite/migrations/model.py +0 -19
  95. bazaar_compute_node-0.2.3/src/bazaar_compute_node/contrib/sqlite/migrations/registry.py +0 -202
  96. bazaar_compute_node-0.2.3/src/bazaar_compute_node/contrib/sqlite/migrations/v01_initial_node_schema.py +0 -354
  97. bazaar_compute_node-0.2.3/src/bazaar_compute_node/contrib/sqlite/migrations/v02_session_mapping_indexes.py +0 -31
  98. bazaar_compute_node-0.2.3/src/bazaar_compute_node/contrib/sqlite/migrations/v03_message_log_indexes.py +0 -23
  99. bazaar_compute_node-0.2.3/src/bazaar_compute_node/contrib/sqlite/migrations/v04_runtime_attempt_facts.py +0 -46
  100. bazaar_compute_node-0.2.3/src/bazaar_compute_node/contrib/sqlite/migrations/v05_inbound_message_references.py +0 -33
  101. bazaar_compute_node-0.2.3/src/bazaar_compute_node/contrib/sqlite/migrations/v06_inbound_message_reference_integrity.py +0 -25
  102. bazaar_compute_node-0.2.3/src/bazaar_compute_node/contrib/sqlite/migrations/v07_inbound_provider_identity.py +0 -24
  103. bazaar_compute_node-0.2.3/src/bazaar_compute_node/contrib/sqlite/migrations/v08_transient_stream_events.py +0 -29
  104. bazaar_compute_node-0.2.3/src/bazaar_compute_node/contrib/sqlite/migrations/v09_remove_runtime_events.py +0 -20
  105. bazaar_compute_node-0.2.3/src/bazaar_compute_node/contrib/sqlite/migrations/v10_add_outbound_attachments.py +0 -17
  106. bazaar_compute_node-0.2.3/src/bazaar_compute_node/contrib/sqlite/migrations/v11_remove_runtime_session_mapping.py +0 -19
  107. bazaar_compute_node-0.2.3/src/bazaar_compute_node/contrib/sqlite/migrations/v12_add_reminders.py +0 -65
  108. bazaar_compute_node-0.2.3/src/bazaar_compute_node/contrib/sqlite/migrations/v13_add_agent_ownership.py +0 -210
  109. bazaar_compute_node-0.2.3/src/bazaar_compute_node/contrib/sqlite/migrations/v14_add_inbox_discovery_indexes.py +0 -19
  110. bazaar_compute_node-0.2.3/src/bazaar_compute_node/contrib/sqlite/migrations/v15_add_handoffs.py +0 -29
  111. bazaar_compute_node-0.2.3/src/bazaar_compute_node/contrib/sqlite/migrations/v16_remove_outbound_drafts.py +0 -112
  112. bazaar_compute_node-0.2.3/src/bazaar_compute_node/contrib/sqlite/migrations/v17_remove_agent_identity_triggers.py +0 -20
  113. bazaar_compute_node-0.2.3/src/bazaar_compute_node/contrib/sqlite/migrations/v18_unify_messages.py +0 -400
  114. bazaar_compute_node-0.2.3/src/bazaar_compute_node/contrib/sqlite/migrations/v19_reminder_system_messages.py +0 -226
  115. bazaar_compute_node-0.2.3/src/bazaar_compute_node/contrib/sqlite/migrations/v20_remove_freshness_persistence.py +0 -162
  116. bazaar_compute_node-0.2.3/src/bazaar_compute_node/contrib/sqlite/migrations/v21_remove_handoffs.py +0 -14
  117. bazaar_compute_node-0.2.3/src/bazaar_compute_node/contrib/sqlite/migrations/v22_readable_targets.py +0 -20
  118. bazaar_compute_node-0.2.3/src/bazaar_compute_node/contrib/sqlite/migrations/v23_persist_sender_identity.py +0 -11
  119. bazaar_compute_node-0.2.3/src/bazaar_compute_node/contrib/sqlite/migrations/v24_persist_sender_display_name.py +0 -11
  120. bazaar_compute_node-0.2.3/src/bazaar_compute_node/contrib/sqlite/migrations/v25_rename_sessions_to_threads.py +0 -37
  121. bazaar_compute_node-0.2.3/src/bazaar_compute_node/contrib/sqlite/migrations/v26_remove_handoff_messages.py +0 -43
  122. bazaar_compute_node-0.2.3/src/bazaar_compute_node/contrib/sqlite/migrations/v27_name_dms_by_the_peer_id.py +0 -160
  123. bazaar_compute_node-0.2.3/src/bazaar_compute_node/contrib/sqlite/migrations/v28_channel_session_identity.py +0 -13
  124. bazaar_compute_node-0.2.3/src/bazaar_compute_node/contrib/sqlite/migrations/v29_backfill_channel_identity.py +0 -29
  125. bazaar_compute_node-0.2.3/src/bazaar_compute_node/contrib/sqlite/migrations/v30_remove_command_id.py +0 -140
  126. bazaar_compute_node-0.2.3/src/bazaar_compute_node/contrib/sqlite/migrations/v31_channel_session_review.py +0 -29
  127. bazaar_compute_node-0.2.3/src/bazaar_compute_node/contrib/sqlite/migrations/v32_message_search.py +0 -44
  128. bazaar_compute_node-0.2.3/src/bazaar_compute_node/contrib/sqlite/plugin.py +0 -17
  129. bazaar_compute_node-0.2.3/src/bazaar_compute_node/contrib/sqlite/reminder_codec.py +0 -33
  130. bazaar_compute_node-0.2.3/src/bazaar_compute_node/contrib/sqlite/repository/__init__.py +0 -5
  131. bazaar_compute_node-0.2.3/src/bazaar_compute_node/contrib/sqlite/repository/base.py +0 -191
  132. bazaar_compute_node-0.2.3/src/bazaar_compute_node/contrib/sqlite/repository/facade.py +0 -199
  133. bazaar_compute_node-0.2.3/src/bazaar_compute_node/contrib/sqlite/repository/messages.py +0 -1119
  134. bazaar_compute_node-0.2.3/src/bazaar_compute_node/contrib/sqlite/repository/reminders.py +0 -359
  135. bazaar_compute_node-0.2.3/src/bazaar_compute_node/contrib/sqlite/repository/search.py +0 -221
  136. bazaar_compute_node-0.2.3/src/bazaar_compute_node/contrib/sqlite/repository/sessions.py +0 -334
  137. bazaar_compute_node-0.2.3/src/bazaar_compute_node/contrib/sqlite/repository/settings.py +0 -29
  138. bazaar_compute_node-0.2.3/src/bazaar_compute_node/contrib/sqlite/storage.py +0 -150
  139. bazaar_compute_node-0.2.3/src/bazaar_compute_node/contrib/telegram/__init__.py +0 -1
  140. bazaar_compute_node-0.2.3/src/bazaar_compute_node/contrib/telegram/api.py +0 -371
  141. bazaar_compute_node-0.2.3/src/bazaar_compute_node/contrib/telegram/approval.py +0 -509
  142. bazaar_compute_node-0.2.3/src/bazaar_compute_node/contrib/telegram/attachments.py +0 -456
  143. bazaar_compute_node-0.2.3/src/bazaar_compute_node/contrib/telegram/channel.py +0 -1177
  144. bazaar_compute_node-0.2.3/src/bazaar_compute_node/contrib/telegram/identity.py +0 -84
  145. bazaar_compute_node-0.2.3/src/bazaar_compute_node/contrib/telegram/markdown.py +0 -358
  146. bazaar_compute_node-0.2.3/src/bazaar_compute_node/contrib/telegram/outbound.py +0 -900
  147. bazaar_compute_node-0.2.3/src/bazaar_compute_node/contrib/telegram/plugin.py +0 -23
  148. bazaar_compute_node-0.2.3/src/bazaar_compute_node/contrib/wecom/__init__.py +0 -1
  149. bazaar_compute_node-0.2.3/src/bazaar_compute_node/contrib/wecom/channel.py +0 -1883
  150. bazaar_compute_node-0.2.3/src/bazaar_compute_node/contrib/wecom/identity.py +0 -71
  151. bazaar_compute_node-0.2.3/src/bazaar_compute_node/contrib/wecom/outbound.py +0 -193
  152. bazaar_compute_node-0.2.3/src/bazaar_compute_node/contrib/wecom/plugin.py +0 -36
  153. bazaar_compute_node-0.2.3/src/bazaar_compute_node/contrib/wecom/topic.py +0 -711
  154. bazaar_compute_node-0.2.3/src/bazaar_compute_node/contrib/wecom/topic_api.py +0 -364
  155. bazaar_compute_node-0.2.3/src/bazaar_compute_node/core/__init__.py +0 -5
  156. bazaar_compute_node-0.2.3/src/bazaar_compute_node/core/actor.py +0 -65
  157. bazaar_compute_node-0.2.3/src/bazaar_compute_node/core/agent.py +0 -77
  158. bazaar_compute_node-0.2.3/src/bazaar_compute_node/core/approval.py +0 -86
  159. bazaar_compute_node-0.2.3/src/bazaar_compute_node/core/audit.py +0 -179
  160. bazaar_compute_node-0.2.3/src/bazaar_compute_node/core/channel.py +0 -610
  161. bazaar_compute_node-0.2.3/src/bazaar_compute_node/core/client.py +0 -30
  162. bazaar_compute_node-0.2.3/src/bazaar_compute_node/core/command.py +0 -341
  163. bazaar_compute_node-0.2.3/src/bazaar_compute_node/core/concurrency.py +0 -29
  164. bazaar_compute_node-0.2.3/src/bazaar_compute_node/core/control.py +0 -128
  165. bazaar_compute_node-0.2.3/src/bazaar_compute_node/core/correlation.py +0 -24
  166. bazaar_compute_node-0.2.3/src/bazaar_compute_node/core/inbox.py +0 -27
  167. bazaar_compute_node-0.2.3/src/bazaar_compute_node/core/instruction.py +0 -56
  168. bazaar_compute_node-0.2.3/src/bazaar_compute_node/core/lifecycle.py +0 -100
  169. bazaar_compute_node-0.2.3/src/bazaar_compute_node/core/models/__init__.py +0 -110
  170. bazaar_compute_node-0.2.3/src/bazaar_compute_node/core/models/entities.py +0 -471
  171. bazaar_compute_node-0.2.3/src/bazaar_compute_node/core/models/events.py +0 -179
  172. bazaar_compute_node-0.2.3/src/bazaar_compute_node/core/models/reminder.py +0 -175
  173. bazaar_compute_node-0.2.3/src/bazaar_compute_node/core/models/reminder_owner.py +0 -28
  174. bazaar_compute_node-0.2.3/src/bazaar_compute_node/core/models/states.py +0 -70
  175. bazaar_compute_node-0.2.3/src/bazaar_compute_node/core/observability.py +0 -46
  176. bazaar_compute_node-0.2.3/src/bazaar_compute_node/core/orchestration/__init__.py +0 -6
  177. bazaar_compute_node-0.2.3/src/bazaar_compute_node/core/orchestration/commands/__init__.py +0 -54
  178. bazaar_compute_node-0.2.3/src/bazaar_compute_node/core/orchestration/commands/base.py +0 -74
  179. bazaar_compute_node-0.2.3/src/bazaar_compute_node/core/orchestration/commands/messages.py +0 -936
  180. bazaar_compute_node-0.2.3/src/bazaar_compute_node/core/orchestration/commands/reminders.py +0 -315
  181. bazaar_compute_node-0.2.3/src/bazaar_compute_node/core/orchestration/commands/review.py +0 -48
  182. bazaar_compute_node-0.2.3/src/bazaar_compute_node/core/orchestration/delivery.py +0 -126
  183. bazaar_compute_node-0.2.3/src/bazaar_compute_node/core/orchestration/error_feedback.py +0 -176
  184. bazaar_compute_node-0.2.3/src/bazaar_compute_node/core/orchestration/orchestrator.py +0 -2005
  185. bazaar_compute_node-0.2.3/src/bazaar_compute_node/core/orchestration/reminder.py +0 -461
  186. bazaar_compute_node-0.2.3/src/bazaar_compute_node/core/orchestration/services.py +0 -30
  187. bazaar_compute_node-0.2.3/src/bazaar_compute_node/core/orchestration/turn.py +0 -1079
  188. bazaar_compute_node-0.2.3/src/bazaar_compute_node/core/orchestration/upgrade_notice.py +0 -25
  189. bazaar_compute_node-0.2.3/src/bazaar_compute_node/core/outcomes.py +0 -89
  190. bazaar_compute_node-0.2.3/src/bazaar_compute_node/core/paths.py +0 -19
  191. bazaar_compute_node-0.2.3/src/bazaar_compute_node/core/reminder.py +0 -283
  192. bazaar_compute_node-0.2.3/src/bazaar_compute_node/core/reminder_schedule.py +0 -304
  193. bazaar_compute_node-0.2.3/src/bazaar_compute_node/core/review.py +0 -48
  194. bazaar_compute_node-0.2.3/src/bazaar_compute_node/core/runtime.py +0 -286
  195. bazaar_compute_node-0.2.3/src/bazaar_compute_node/core/serialize.py +0 -227
  196. bazaar_compute_node-0.2.3/src/bazaar_compute_node/core/storage.py +0 -827
  197. bazaar_compute_node-0.2.3/src/bazaar_compute_node/core/timerwheel.py +0 -342
  198. bazaar_compute_node-0.2.3/src/bazaar_compute_node/core/utils/__init__.py +0 -3
  199. bazaar_compute_node-0.2.3/src/bazaar_compute_node/core/utils/children.py +0 -114
  200. bazaar_compute_node-0.2.3/src/bazaar_compute_node/core/utils/clock.py +0 -15
  201. bazaar_compute_node-0.2.3/src/bazaar_compute_node/core/utils/command.py +0 -75
  202. bazaar_compute_node-0.2.3/src/bazaar_compute_node/core/utils/line_reader.py +0 -37
  203. bazaar_compute_node-0.2.3/src/bazaar_compute_node/core/utils/markdown.py +0 -162
  204. bazaar_compute_node-0.2.3/src/bazaar_compute_node/core/utils/sanitization.py +0 -44
  205. bazaar_compute_node-0.2.3/src/bazaar_compute_node/core/utils/text.py +0 -27
  206. bazaar_compute_node-0.2.3/src/bazaar_compute_node/i18n/__init__.py +0 -8
  207. bazaar_compute_node-0.2.3/src/bazaar_compute_node/i18n/catalog.py +0 -79
  208. bazaar_compute_node-0.2.3/src/bazaar_compute_node/rendering.py +0 -91
  209. bazaar_compute_node-0.2.3/src/bazaar_compute_node/resources/approval_no_person.tpl +0 -1
  210. bazaar_compute_node-0.2.3/src/bazaar_compute_node/resources/bcc/check.tpl +0 -4
  211. bazaar_compute_node-0.2.3/src/bazaar_compute_node/resources/bcc/error.tpl +0 -4
  212. bazaar_compute_node-0.2.3/src/bazaar_compute_node/resources/bcc/inbox_check.tpl +0 -2
  213. bazaar_compute_node-0.2.3/src/bazaar_compute_node/resources/bcc/read.tpl +0 -5
  214. bazaar_compute_node-0.2.3/src/bazaar_compute_node/resources/bcc/reminder_list.tpl +0 -2
  215. bazaar_compute_node-0.2.3/src/bazaar_compute_node/resources/bcc/reminder_mutation.tpl +0 -2
  216. bazaar_compute_node-0.2.3/src/bazaar_compute_node/resources/bcc/reminder_schedule.tpl +0 -2
  217. bazaar_compute_node-0.2.3/src/bazaar_compute_node/resources/bcc/search.tpl +0 -16
  218. bazaar_compute_node-0.2.3/src/bazaar_compute_node/resources/bcc/unfollow.tpl +0 -1
  219. bazaar_compute_node-0.2.3/src/bazaar_compute_node/resources/bcc/upgrade.tpl +0 -2
  220. bazaar_compute_node-0.2.3/src/bazaar_compute_node/resources/bcc/version.tpl +0 -1
  221. bazaar_compute_node-0.2.3/src/bazaar_compute_node/resources/command/attachment_suffix.tpl +0 -1
  222. bazaar_compute_node-0.2.3/src/bazaar_compute_node/resources/command/check_message.tpl +0 -8
  223. bazaar_compute_node-0.2.3/src/bazaar_compute_node/resources/command/freshness_hold.tpl +0 -19
  224. bazaar_compute_node-0.2.3/src/bazaar_compute_node/resources/command/read_message.tpl +0 -1
  225. bazaar_compute_node-0.2.3/src/bazaar_compute_node/resources/command/send_result.tpl +0 -1
  226. bazaar_compute_node-0.2.3/src/bazaar_compute_node/resources/command/sender.tpl +0 -1
  227. bazaar_compute_node-0.2.3/src/bazaar_compute_node/resources/developer_instructions.md +0 -214
  228. bazaar_compute_node-0.2.3/src/bazaar_compute_node/resources/inbox_notice.tpl +0 -5
  229. bazaar_compute_node-0.2.3/src/bazaar_compute_node/resources/locales/en.toml +0 -58
  230. bazaar_compute_node-0.2.3/src/bazaar_compute_node/resources/locales/zh-CN.toml +0 -58
  231. bazaar_compute_node-0.2.3/src/bazaar_compute_node/resources/system_service/launchd.plist +0 -43
  232. bazaar_compute_node-0.2.3/src/bazaar_compute_node/resources/system_service/launchd.sh +0 -13
  233. bazaar_compute_node-0.2.3/src/bazaar_compute_node/resources/system_service/supervisor.py +0 -58
  234. bazaar_compute_node-0.2.3/src/bazaar_compute_node/resources/system_service/systemd.service +0 -19
  235. bazaar_compute_node-0.2.3/src/bazaar_compute_node/resources/system_service/windows.ps1 +0 -102
  236. bazaar_compute_node-0.2.3/src/bazaar_compute_node/resources/system_service/windows.vbs +0 -11
  237. bazaar_compute_node-0.2.3/src/bazaar_compute_node/resources/system_service/windows.xml +0 -39
  238. bazaar_compute_node-0.2.3/src/bazaar_compute_server/__init__.py +0 -4
  239. bazaar_compute_node-0.2.3/src/bazaar_compute_server/access.py +0 -156
  240. bazaar_compute_node-0.2.3/src/bazaar_compute_server/accounts.py +0 -27
  241. bazaar_compute_node-0.2.3/src/bazaar_compute_server/activity.py +0 -250
  242. bazaar_compute_node-0.2.3/src/bazaar_compute_server/app.py +0 -227
  243. bazaar_compute_node-0.2.3/src/bazaar_compute_server/cli.py +0 -68
  244. bazaar_compute_node-0.2.3/src/bazaar_compute_server/clock.py +0 -65
  245. bazaar_compute_node-0.2.3/src/bazaar_compute_server/config.py +0 -119
  246. bazaar_compute_node-0.2.3/src/bazaar_compute_server/configure.py +0 -521
  247. bazaar_compute_node-0.2.3/src/bazaar_compute_server/consumers.py +0 -30
  248. bazaar_compute_node-0.2.3/src/bazaar_compute_server/contacts.py +0 -143
  249. bazaar_compute_node-0.2.3/src/bazaar_compute_server/contrib/__init__.py +0 -0
  250. bazaar_compute_node-0.2.3/src/bazaar_compute_server/contrib/sqlite/__init__.py +0 -0
  251. bazaar_compute_node-0.2.3/src/bazaar_compute_server/contrib/sqlite/migrations/__init__.py +0 -0
  252. bazaar_compute_node-0.2.3/src/bazaar_compute_server/contrib/sqlite/migrations/model.py +0 -19
  253. bazaar_compute_node-0.2.3/src/bazaar_compute_server/contrib/sqlite/migrations/registry.py +0 -122
  254. bazaar_compute_node-0.2.3/src/bazaar_compute_server/contrib/sqlite/migrations/v01_initial_server_schema.py +0 -76
  255. bazaar_compute_node-0.2.3/src/bazaar_compute_server/contrib/sqlite/migrations/v02_refs.py +0 -18
  256. bazaar_compute_node-0.2.3/src/bazaar_compute_server/contrib/sqlite/migrations/v03_roles_oidc.py +0 -51
  257. bazaar_compute_node-0.2.3/src/bazaar_compute_server/contrib/sqlite/migrations/v04_login_order.py +0 -16
  258. bazaar_compute_node-0.2.3/src/bazaar_compute_server/contrib/sqlite/migrations/v05_provider_description.py +0 -11
  259. bazaar_compute_node-0.2.3/src/bazaar_compute_server/contrib/sqlite/migrations/v06_provider_default_role.py +0 -11
  260. bazaar_compute_node-0.2.3/src/bazaar_compute_server/contrib/sqlite/migrations/v07_oidc_session_settings.py +0 -12
  261. bazaar_compute_node-0.2.3/src/bazaar_compute_server/contrib/sqlite/plugin.py +0 -13
  262. bazaar_compute_node-0.2.3/src/bazaar_compute_server/contrib/sqlite/storage.py +0 -1237
  263. bazaar_compute_node-0.2.3/src/bazaar_compute_server/control.py +0 -174
  264. bazaar_compute_node-0.2.3/src/bazaar_compute_server/fleet.py +0 -473
  265. bazaar_compute_node-0.2.3/src/bazaar_compute_server/gate.py +0 -154
  266. bazaar_compute_node-0.2.3/src/bazaar_compute_server/history.py +0 -352
  267. bazaar_compute_node-0.2.3/src/bazaar_compute_server/i18n.py +0 -77
  268. bazaar_compute_node-0.2.3/src/bazaar_compute_server/images.py +0 -157
  269. bazaar_compute_node-0.2.3/src/bazaar_compute_server/markdown.py +0 -86
  270. bazaar_compute_node-0.2.3/src/bazaar_compute_server/pages/__init__.py +0 -153
  271. bazaar_compute_node-0.2.3/src/bazaar_compute_server/pages/accounts.py +0 -92
  272. bazaar_compute_node-0.2.3/src/bazaar_compute_server/pages/agents.py +0 -780
  273. bazaar_compute_node-0.2.3/src/bazaar_compute_server/pages/computers.py +0 -366
  274. bazaar_compute_node-0.2.3/src/bazaar_compute_server/pages/login.py +0 -62
  275. bazaar_compute_node-0.2.3/src/bazaar_compute_server/pages/oidc.py +0 -262
  276. bazaar_compute_node-0.2.3/src/bazaar_compute_server/pages/oidc_login.py +0 -276
  277. bazaar_compute_node-0.2.3/src/bazaar_compute_server/pages/poll.py +0 -82
  278. bazaar_compute_node-0.2.3/src/bazaar_compute_server/pages/profile.py +0 -423
  279. bazaar_compute_node-0.2.3/src/bazaar_compute_server/pages/roles.py +0 -181
  280. bazaar_compute_node-0.2.3/src/bazaar_compute_server/pages/settings.py +0 -111
  281. bazaar_compute_node-0.2.3/src/bazaar_compute_server/pages/shares.py +0 -107
  282. bazaar_compute_node-0.2.3/src/bazaar_compute_server/permissions.py +0 -89
  283. bazaar_compute_node-0.2.3/src/bazaar_compute_server/poll_rendering.py +0 -143
  284. bazaar_compute_node-0.2.3/src/bazaar_compute_server/polling.py +0 -307
  285. bazaar_compute_node-0.2.3/src/bazaar_compute_server/protocol.py +0 -180
  286. bazaar_compute_node-0.2.3/src/bazaar_compute_server/reauth.py +0 -40
  287. bazaar_compute_node-0.2.3/src/bazaar_compute_server/refs.py +0 -99
  288. bazaar_compute_node-0.2.3/src/bazaar_compute_server/registry.py +0 -45
  289. bazaar_compute_node-0.2.3/src/bazaar_compute_server/rendering.py +0 -386
  290. bazaar_compute_node-0.2.3/src/bazaar_compute_server/resources/locales/en.toml +0 -486
  291. bazaar_compute_node-0.2.3/src/bazaar_compute_server/resources/locales/zh-CN.toml +0 -486
  292. bazaar_compute_node-0.2.3/src/bazaar_compute_server/resources/static/THIRD_PARTY.md +0 -34
  293. bazaar_compute_node-0.2.3/src/bazaar_compute_server/resources/static/agent-form.js +0 -219
  294. bazaar_compute_node-0.2.3/src/bazaar_compute_server/resources/static/alpine-3.17.4.min.js +0 -21
  295. bazaar_compute_node-0.2.3/src/bazaar_compute_server/resources/static/alpine-LICENSE.txt +0 -21
  296. bazaar_compute_node-0.2.3/src/bazaar_compute_server/resources/static/alpine-collapse-3.17.4.min.js +0 -1
  297. bazaar_compute_node-0.2.3/src/bazaar_compute_server/resources/static/alpine-collapse-LICENSE.txt +0 -21
  298. bazaar_compute_node-0.2.3/src/bazaar_compute_server/resources/static/alpine-focus-3.17.4.min.js +0 -18
  299. bazaar_compute_node-0.2.3/src/bazaar_compute_server/resources/static/alpine-focus-LICENSE.txt +0 -21
  300. bazaar_compute_node-0.2.3/src/bazaar_compute_server/resources/static/app.css +0 -963
  301. bazaar_compute_node-0.2.3/src/bazaar_compute_server/resources/static/app.webmanifest +0 -24
  302. bazaar_compute_node-0.2.3/src/bazaar_compute_server/resources/static/apple-touch-icon.png +0 -0
  303. bazaar_compute_node-0.2.3/src/bazaar_compute_server/resources/static/components.js +0 -810
  304. bazaar_compute_node-0.2.3/src/bazaar_compute_server/resources/static/favicon.svg +0 -1
  305. bazaar_compute_node-0.2.3/src/bazaar_compute_server/resources/static/htmx-LICENSE.txt +0 -13
  306. bazaar_compute_node-0.2.3/src/bazaar_compute_server/resources/static/htmx.min.js +0 -1
  307. bazaar_compute_node-0.2.3/src/bazaar_compute_server/resources/static/hx-alpine-compat-4.0.0.js +0 -110
  308. bazaar_compute_node-0.2.3/src/bazaar_compute_server/resources/static/icon-192.png +0 -0
  309. bazaar_compute_node-0.2.3/src/bazaar_compute_server/resources/static/icon-512.png +0 -0
  310. bazaar_compute_node-0.2.3/src/bazaar_compute_server/resources/static/poll.js +0 -207
  311. bazaar_compute_node-0.2.3/src/bazaar_compute_server/resources/templates/activity_card.html +0 -13
  312. bazaar_compute_node-0.2.3/src/bazaar_compute_server/resources/templates/agent_contacts_head.html +0 -6
  313. bazaar_compute_node-0.2.3/src/bazaar_compute_server/resources/templates/agent_form.html +0 -136
  314. bazaar_compute_node-0.2.3/src/bazaar_compute_server/resources/templates/agent_kinds.html +0 -2
  315. bazaar_compute_node-0.2.3/src/bazaar_compute_server/resources/templates/agent_list.html +0 -10
  316. bazaar_compute_node-0.2.3/src/bazaar_compute_server/resources/templates/agent_models.html +0 -2
  317. bazaar_compute_node-0.2.3/src/bazaar_compute_server/resources/templates/agent_new.html +0 -41
  318. bazaar_compute_node-0.2.3/src/bazaar_compute_server/resources/templates/agent_profile.html +0 -15
  319. bazaar_compute_node-0.2.3/src/bazaar_compute_server/resources/templates/agent_profile_activity.html +0 -13
  320. bazaar_compute_node-0.2.3/src/bazaar_compute_server/resources/templates/agent_profile_config.html +0 -35
  321. bazaar_compute_node-0.2.3/src/bazaar_compute_server/resources/templates/agent_profile_events.html +0 -14
  322. bazaar_compute_node-0.2.3/src/bazaar_compute_server/resources/templates/agent_profile_files.html +0 -20
  323. bazaar_compute_node-0.2.3/src/bazaar_compute_server/resources/templates/agent_profile_head.html +0 -9
  324. bazaar_compute_node-0.2.3/src/bazaar_compute_server/resources/templates/agent_profile_sharing.html +0 -1
  325. bazaar_compute_node-0.2.3/src/bazaar_compute_server/resources/templates/agent_profile_skills.html +0 -14
  326. bazaar_compute_node-0.2.3/src/bazaar_compute_server/resources/templates/agent_profile_status.html +0 -51
  327. bazaar_compute_node-0.2.3/src/bazaar_compute_server/resources/templates/agent_profile_workspace.html +0 -17
  328. bazaar_compute_node-0.2.3/src/bazaar_compute_server/resources/templates/agent_remove.html +0 -11
  329. bazaar_compute_node-0.2.3/src/bazaar_compute_server/resources/templates/agent_row.html +0 -8
  330. bazaar_compute_node-0.2.3/src/bazaar_compute_server/resources/templates/agent_rows.html +0 -6
  331. bazaar_compute_node-0.2.3/src/bazaar_compute_server/resources/templates/agents.html +0 -31
  332. bazaar_compute_node-0.2.3/src/bazaar_compute_server/resources/templates/board.svg +0 -13
  333. bazaar_compute_node-0.2.3/src/bazaar_compute_server/resources/templates/chat.html +0 -27
  334. bazaar_compute_node-0.2.3/src/bazaar_compute_server/resources/templates/code.html +0 -3
  335. bazaar_compute_node-0.2.3/src/bazaar_compute_server/resources/templates/components.html +0 -131
  336. bazaar_compute_node-0.2.3/src/bazaar_compute_server/resources/templates/computer_detail.html +0 -44
  337. bazaar_compute_node-0.2.3/src/bazaar_compute_server/resources/templates/computer_list.html +0 -5
  338. bazaar_compute_node-0.2.3/src/bazaar_compute_server/resources/templates/computer_row.html +0 -6
  339. bazaar_compute_node-0.2.3/src/bazaar_compute_server/resources/templates/computer_rows.html +0 -5
  340. bazaar_compute_node-0.2.3/src/bazaar_compute_server/resources/templates/computers.html +0 -15
  341. bazaar_compute_node-0.2.3/src/bazaar_compute_server/resources/templates/contact_rows.html +0 -16
  342. bazaar_compute_node-0.2.3/src/bazaar_compute_server/resources/templates/contacts.html +0 -19
  343. bazaar_compute_node-0.2.3/src/bazaar_compute_server/resources/templates/conversation_reminders.html +0 -12
  344. bazaar_compute_node-0.2.3/src/bazaar_compute_server/resources/templates/enrol_form.html +0 -13
  345. bazaar_compute_node-0.2.3/src/bazaar_compute_server/resources/templates/enrolled.html +0 -25
  346. bazaar_compute_node-0.2.3/src/bazaar_compute_server/resources/templates/error.html +0 -11
  347. bazaar_compute_node-0.2.3/src/bazaar_compute_server/resources/templates/history.html +0 -14
  348. bazaar_compute_node-0.2.3/src/bazaar_compute_server/resources/templates/history_end.html +0 -9
  349. bazaar_compute_node-0.2.3/src/bazaar_compute_server/resources/templates/history_rows.html +0 -38
  350. bazaar_compute_node-0.2.3/src/bazaar_compute_server/resources/templates/history_tail.html +0 -2
  351. bazaar_compute_node-0.2.3/src/bazaar_compute_server/resources/templates/icons/alarm-clock.svg +0 -1
  352. bazaar_compute_node-0.2.3/src/bazaar_compute_server/resources/templates/icons/arrow-down.svg +0 -16
  353. bazaar_compute_node-0.2.3/src/bazaar_compute_server/resources/templates/icons/arrow-left.svg +0 -16
  354. bazaar_compute_node-0.2.3/src/bazaar_compute_server/resources/templates/icons/arrow-right.svg +0 -16
  355. bazaar_compute_node-0.2.3/src/bazaar_compute_server/resources/templates/icons/arrow-up.svg +0 -16
  356. bazaar_compute_node-0.2.3/src/bazaar_compute_server/resources/templates/icons/calendar.svg +0 -1
  357. bazaar_compute_node-0.2.3/src/bazaar_compute_server/resources/templates/icons/check.svg +0 -1
  358. bazaar_compute_node-0.2.3/src/bazaar_compute_server/resources/templates/icons/chevron-down.svg +0 -1
  359. bazaar_compute_node-0.2.3/src/bazaar_compute_server/resources/templates/icons/chevron-left.svg +0 -15
  360. bazaar_compute_node-0.2.3/src/bazaar_compute_server/resources/templates/icons/chevron-right.svg +0 -1
  361. bazaar_compute_node-0.2.3/src/bazaar_compute_server/resources/templates/icons/chevron-up.svg +0 -1
  362. bazaar_compute_node-0.2.3/src/bazaar_compute_server/resources/templates/icons/chevrons-down.svg +0 -1
  363. bazaar_compute_node-0.2.3/src/bazaar_compute_server/resources/templates/icons/copy.svg +0 -1
  364. bazaar_compute_node-0.2.3/src/bazaar_compute_server/resources/templates/icons/file.svg +0 -1
  365. bazaar_compute_node-0.2.3/src/bazaar_compute_server/resources/templates/icons/folder.svg +0 -1
  366. bazaar_compute_node-0.2.3/src/bazaar_compute_server/resources/templates/icons/grid-2x2.svg +0 -1
  367. bazaar_compute_node-0.2.3/src/bazaar_compute_server/resources/templates/icons/key-round.svg +0 -1
  368. bazaar_compute_node-0.2.3/src/bazaar_compute_server/resources/templates/icons/languages.svg +0 -1
  369. bazaar_compute_node-0.2.3/src/bazaar_compute_server/resources/templates/icons/lark.svg +0 -1
  370. bazaar_compute_node-0.2.3/src/bazaar_compute_server/resources/templates/icons/loader.svg +0 -22
  371. bazaar_compute_node-0.2.3/src/bazaar_compute_server/resources/templates/icons/log-out.svg +0 -1
  372. bazaar_compute_node-0.2.3/src/bazaar_compute_server/resources/templates/icons/message-circle.svg +0 -1
  373. bazaar_compute_node-0.2.3/src/bazaar_compute_server/resources/templates/icons/message-square-text.svg +0 -1
  374. bazaar_compute_node-0.2.3/src/bazaar_compute_server/resources/templates/icons/monitor.svg +0 -1
  375. bazaar_compute_node-0.2.3/src/bazaar_compute_server/resources/templates/icons/openai.svg +0 -1
  376. bazaar_compute_node-0.2.3/src/bazaar_compute_server/resources/templates/icons/paperclip.svg +0 -1
  377. bazaar_compute_node-0.2.3/src/bazaar_compute_server/resources/templates/icons/pencil.svg +0 -16
  378. bazaar_compute_node-0.2.3/src/bazaar_compute_server/resources/templates/icons/plus.svg +0 -1
  379. bazaar_compute_node-0.2.3/src/bazaar_compute_server/resources/templates/icons/repeat.svg +0 -1
  380. bazaar_compute_node-0.2.3/src/bazaar_compute_server/resources/templates/icons/rotate-cw.svg +0 -1
  381. bazaar_compute_node-0.2.3/src/bazaar_compute_server/resources/templates/icons/search.svg +0 -1
  382. bazaar_compute_node-0.2.3/src/bazaar_compute_server/resources/templates/icons/settings.svg +0 -1
  383. bazaar_compute_node-0.2.3/src/bazaar_compute_server/resources/templates/icons/si-apple.svg +0 -1
  384. bazaar_compute_node-0.2.3/src/bazaar_compute_server/resources/templates/icons/si-claude.svg +0 -1
  385. bazaar_compute_node-0.2.3/src/bazaar_compute_server/resources/templates/icons/si-linux.svg +0 -1
  386. bazaar_compute_node-0.2.3/src/bazaar_compute_server/resources/templates/icons/si-telegram.svg +0 -1
  387. bazaar_compute_node-0.2.3/src/bazaar_compute_server/resources/templates/icons/sun-moon.svg +0 -1
  388. bazaar_compute_node-0.2.3/src/bazaar_compute_server/resources/templates/icons/trash-2.svg +0 -1
  389. bazaar_compute_node-0.2.3/src/bazaar_compute_server/resources/templates/icons/triangle-alert.svg +0 -1
  390. bazaar_compute_node-0.2.3/src/bazaar_compute_server/resources/templates/icons/unplug.svg +0 -1
  391. bazaar_compute_node-0.2.3/src/bazaar_compute_server/resources/templates/icons/user-plus.svg +0 -1
  392. bazaar_compute_node-0.2.3/src/bazaar_compute_server/resources/templates/icons/users.svg +0 -1
  393. bazaar_compute_node-0.2.3/src/bazaar_compute_server/resources/templates/icons/wecom.svg +0 -1
  394. bazaar_compute_node-0.2.3/src/bazaar_compute_server/resources/templates/icons/x.svg +0 -1
  395. bazaar_compute_node-0.2.3/src/bazaar_compute_server/resources/templates/image.html +0 -4
  396. bazaar_compute_node-0.2.3/src/bazaar_compute_server/resources/templates/login.html +0 -45
  397. bazaar_compute_node-0.2.3/src/bazaar_compute_server/resources/templates/login_form.html +0 -6
  398. bazaar_compute_node-0.2.3/src/bazaar_compute_server/resources/templates/password_form.html +0 -8
  399. bazaar_compute_node-0.2.3/src/bazaar_compute_server/resources/templates/presence.html +0 -5
  400. bazaar_compute_node-0.2.3/src/bazaar_compute_server/resources/templates/profile.html +0 -28
  401. bazaar_compute_node-0.2.3/src/bazaar_compute_server/resources/templates/rail.html +0 -9
  402. bazaar_compute_node-0.2.3/src/bazaar_compute_server/resources/templates/remove_ask.html +0 -14
  403. bazaar_compute_node-0.2.3/src/bazaar_compute_server/resources/templates/remove_form.html +0 -10
  404. bazaar_compute_node-0.2.3/src/bazaar_compute_server/resources/templates/review_card.html +0 -22
  405. bazaar_compute_node-0.2.3/src/bazaar_compute_server/resources/templates/scripts.html +0 -8
  406. bazaar_compute_node-0.2.3/src/bazaar_compute_server/resources/templates/search.html +0 -69
  407. bazaar_compute_node-0.2.3/src/bazaar_compute_server/resources/templates/search_results.html +0 -16
  408. bazaar_compute_node-0.2.3/src/bazaar_compute_server/resources/templates/settings.html +0 -25
  409. bazaar_compute_node-0.2.3/src/bazaar_compute_server/resources/templates/settings_accounts.html +0 -36
  410. bazaar_compute_node-0.2.3/src/bazaar_compute_server/resources/templates/settings_appearance.html +0 -13
  411. bazaar_compute_node-0.2.3/src/bazaar_compute_server/resources/templates/settings_oidc.html +0 -60
  412. bazaar_compute_node-0.2.3/src/bazaar_compute_server/resources/templates/settings_roles.html +0 -40
  413. bazaar_compute_node-0.2.3/src/bazaar_compute_server/resources/templates/settings_security.html +0 -1
  414. bazaar_compute_node-0.2.3/src/bazaar_compute_server/resources/templates/shares.html +0 -37
  415. bazaar_compute_node-0.2.3/src/bazaar_compute_server/resources/templates/shell.html +0 -36
  416. bazaar_compute_node-0.2.3/src/bazaar_compute_server/resources/templates/sign.svg +0 -1
  417. bazaar_compute_node-0.2.3/src/bazaar_compute_server/resources/templates/unreachable.html +0 -3
  418. bazaar_compute_node-0.2.3/src/bazaar_compute_server/review.py +0 -125
  419. bazaar_compute_node-0.2.3/src/bazaar_compute_server/search.py +0 -53
  420. bazaar_compute_node-0.2.3/src/bazaar_compute_server/secrets.py +0 -68
  421. bazaar_compute_node-0.2.3/src/bazaar_compute_server/sessions.py +0 -103
  422. bazaar_compute_node-0.2.3/src/bazaar_compute_server/storage.py +0 -336
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
@@ -1,3 +1,20 @@
1
+ Metadata-Version: 2.4
2
+ Name: bazaar-compute-node
3
+ Version: 0.3.0rc1
4
+ Summary: The Bazaar Compute Node Application
5
+ License-Expression: Apache-2.0
6
+ License-File: LICENSE
7
+ Requires-Dist: bazaar-core~=0.3.0rc1
8
+ Requires-Dist: bazaar-contrib-config~=0.3.0rc1
9
+ Requires-Dist: bazaar-contrib-config-filesystem~=0.3.0rc1
10
+ Requires-Dist: bazaar-contrib-config-versions~=0.3.0rc1
11
+ Requires-Dist: bazaar-contrib-manager~=0.3.0rc1
12
+ Requires-Dist: bazaar-contrib-invoke~=0.3.0rc1
13
+ Requires-Dist: click>=8.1.0
14
+ Requires-Python: >=3.15
15
+ Project-URL: Repository, https://github.com/yuchanns/bazaar-compute-node
16
+ Description-Content-Type: text/markdown
17
+
1
18
  # Bazaar Compute Node
2
19
 
3
20
  Bring Your Own Agents to the bazaar, and build with your teams in the open.
@@ -19,56 +36,39 @@ Bring Your Own Agents to the bazaar, and build with your teams in the open.
19
36
 
20
37
  ## Quick Start / 快速开始
21
38
 
22
- Python 3.14+ is required.
39
+ Python 3.15+ is required.
23
40
 
24
- 需要 Python 3.14 或更高版本:
41
+ 需要 Python 3.15 或更高版本:
25
42
 
26
43
  ```sh
27
- # Install / 安装
28
44
  uv tool install bazaar-compute-node
29
- bcn --version
30
-
31
- # Upgrade / 升级
32
- uv tool upgrade bazaar-compute-node
33
-
34
- # Add an Agent / 添加智能体
35
- # allowed_chats lists the chats let in by name: Telegram chat ids (a private
36
- # chat's id is the other side's user id). Others wait to be reviewed on the
37
- # server; with no server and no list, everyone is let in
38
- # allowed_chats 是按名放行的会话:Telegram 的 chat id(私聊的 chat id 就是对方
39
- # 的 user id)。其余的等服务端审核;没接服务端也没写名单时,谁来都放行
45
+ bcn contrib add codex --enable
46
+ bcn contrib add telegram --enable
40
47
  bcn agent add \
41
48
  --name Tifa \
42
49
  --channel telegram \
43
- --runtime codex \
44
- --set channel.token_env=BCN_TELEGRAM_TIFA_TOKEN \
45
- --set channel.allowed_chats=["123456789"]
46
-
47
- # Configure the runtime environment / 配置运行时环境
48
- # Example file content / 示例文件内容:
49
- # BCN_TELEGRAM_TIFA_TOKEN=replace-with-your-token
50
+ --harness codex \
51
+ --set channel.token_env=BCN_TELEGRAM_TIFA_TOKEN
50
52
 
51
- # Register the user-level system service / 注册用户级宿主机服务
52
- bcn system-service install --env-file ~/.config/bcn/runtime.env
53
+ # Set BCN_TELEGRAM_TIFA_TOKEN in the shell, then start the node.
54
+ bcn run
55
+ ```
53
56
 
54
- # Start the registered service / 启动已注册的服务
55
- bcn system-service start
57
+ Contrib packages and enabled entries are saved in `~/.bcn/config.toml`:
56
58
 
57
- # Inspect registration and bcn health / 查看注册状态和 bcn 运行状态
58
- bcn system-service status
59
+ ```toml
60
+ version = "5"
59
61
 
60
- # Restart or stop the registered service / 重启或停止已注册的服务
61
- bcn system-service restart
62
- bcn system-service stop
62
+ [[contribs]]
63
+ package = "bazaar-contrib-logging~=0.3.0rc1"
64
+ [[contribs.enabled]]
65
+ entry = "logging"
66
+ [contribs.enabled.config]
67
+ level = "info"
63
68
  ```
64
69
 
65
- ## Service logs / 服务日志
66
-
67
- ```text
68
- Linux: journalctl --user -u bcn.service -f
69
- macOS: tail -f ~/.bcn/system-service.log
70
- Windows: Get-Content "$env:USERPROFILE\.bcn\system-service.log" -Wait
71
- ```
70
+ Use `bcn --configer-options ./config.toml run` to select another file.
71
+ See [agent commands](contrib/agent-command/README.md) for conversation approval.
72
72
 
73
73
  ## Features / 功能
74
74
 
@@ -114,8 +114,8 @@ Windows: Get-Content "$env:USERPROFILE\.bcn\system-service.log" -Wait
114
114
 
115
115
  ## License / 许可证
116
116
 
117
- This project is licensed under the [AGPLv3](./LICENSE).
118
- 本项目采用 [AGPLv3](./LICENSE) 许可证。
117
+ This project is licensed under the [Apache License 2.0](./LICENSE).
118
+ 本项目采用 [Apache License 2.0](./LICENSE) 许可证。
119
119
 
120
120
  ## Credits / 致谢
121
121
 
@@ -0,0 +1,106 @@
1
+ # Bazaar Compute Node
2
+
3
+ Bring Your Own Agents to the bazaar, and build with your teams in the open.
4
+
5
+ 不必独自建造——带上你的智能体,来集市。
6
+
7
+ <p align="left">
8
+ <a href="https://github.com/yuchanns/bazaar-compute-node/actions"><img
9
+ src="https://github.com/yuchanns/bazaar-compute-node/actions/workflows/release.yml/badge.svg"
10
+ alt="Release"
11
+ /></a>
12
+ <a href="https://pypi.org/project/bazaar-compute-node"><img
13
+ src="https://img.shields.io/pypi/v/bazaar-compute-node.svg"
14
+ alt="Python Package Index"
15
+ /></a>
16
+ </p>
17
+
18
+ **Documentation is coming soon...**
19
+
20
+ ## Quick Start / 快速开始
21
+
22
+ Python 3.15+ is required.
23
+
24
+ 需要 Python 3.15 或更高版本:
25
+
26
+ ```sh
27
+ uv tool install bazaar-compute-node
28
+ bcn contrib add codex --enable
29
+ bcn contrib add telegram --enable
30
+ bcn agent add \
31
+ --name Tifa \
32
+ --channel telegram \
33
+ --harness codex \
34
+ --set channel.token_env=BCN_TELEGRAM_TIFA_TOKEN
35
+
36
+ # Set BCN_TELEGRAM_TIFA_TOKEN in the shell, then start the node.
37
+ bcn run
38
+ ```
39
+
40
+ Contrib packages and enabled entries are saved in `~/.bcn/config.toml`:
41
+
42
+ ```toml
43
+ version = "5"
44
+
45
+ [[contribs]]
46
+ package = "bazaar-contrib-logging~=0.3.0rc1"
47
+ [[contribs.enabled]]
48
+ entry = "logging"
49
+ [contribs.enabled.config]
50
+ level = "info"
51
+ ```
52
+
53
+ Use `bcn --configer-options ./config.toml run` to select another file.
54
+ See [agent commands](contrib/agent-command/README.md) for conversation approval.
55
+
56
+ ## Features / 功能
57
+
58
+ - ✅ Done / 已完成
59
+ - 🚧 Working in progress / 开发中
60
+
61
+ ### Facilities / 通用能力
62
+
63
+ | Status / 状态 | Ability / 能力 |
64
+ | --- | --- |
65
+ | ✅ | Reminders / 定时器 |
66
+ | ✅ | Attachments / 附件 |
67
+ | ✅ | Multi-Agents / 多智能体 |
68
+ | ✅ | Teams / 团队协作 |
69
+
70
+ ### Channels / 渠道
71
+
72
+ | Status / 状态 | Channel / 渠道 |
73
+ | --- | --- |
74
+ | ✅ | WeCom / 企业微信 |
75
+ | ✅ | Telegram |
76
+ | ✅ | Lark / 飞书 |
77
+ | 🚧 | GitHub |
78
+ | 🚧 | GitLab |
79
+
80
+ ### Harnesses
81
+
82
+ | Status / 状态 | Runtime / 运行时 |
83
+ | --- | --- |
84
+ | ✅ | Codex |
85
+ | ✅ | Claude Code |
86
+ | 🚧 | Pi |
87
+ | 🚧 | Hermes Agent |
88
+ | 🚧 | DeepSeek Harness |
89
+
90
+ ### Platforms / 平台
91
+
92
+ | Status / 状态 | Platform / 平台 |
93
+ | --- | --- |
94
+ | ✅ | Windows |
95
+ | ✅ | macOS |
96
+ | ✅ | Linux |
97
+
98
+ ## License / 许可证
99
+
100
+ This project is licensed under the [Apache License 2.0](./LICENSE).
101
+ 本项目采用 [Apache License 2.0](./LICENSE) 许可证。
102
+
103
+ ## Credits / 致谢
104
+
105
+ This project is inspired by [raft.build](https://raft.build).
106
+ 本项目的灵感来自 [raft.build](https://raft.build)。
@@ -0,0 +1,44 @@
1
+ [project]
2
+ name = "bazaar-compute-node"
3
+ version = "0.3.0rc1"
4
+ description = "The Bazaar Compute Node Application"
5
+ readme = "README.md"
6
+ license = "Apache-2.0"
7
+ license-files = ["LICENSE"]
8
+ requires-python = ">=3.15"
9
+ dependencies = [
10
+ "bazaar-core~=0.3.0rc1",
11
+ "bazaar-contrib-config~=0.3.0rc1",
12
+ "bazaar-contrib-config-filesystem~=0.3.0rc1",
13
+ "bazaar-contrib-config-versions~=0.3.0rc1",
14
+ "bazaar-contrib-manager~=0.3.0rc1",
15
+ "bazaar-contrib-invoke~=0.3.0rc1",
16
+ "click>=8.1.0",
17
+ ]
18
+
19
+ [project.urls]
20
+ Repository = "https://github.com/yuchanns/bazaar-compute-node"
21
+
22
+ [project.scripts]
23
+ bcn = "bazaar_compute_node.cli:main"
24
+
25
+ [build-system]
26
+ requires = ["uv_build>=0.13.0,<0.14.0"]
27
+ build-backend = "uv_build"
28
+
29
+ [tool.pytest.ini_options]
30
+ testpaths = ["tests"]
31
+ addopts = "-p no:anyio"
32
+ asyncio_mode = "auto"
33
+ asyncio_default_fixture_loop_scope = "function"
34
+
35
+ [tool.pyright]
36
+ extends = "../pyrightconfig.json"
37
+ include = [
38
+ "src",
39
+ "tests",
40
+ ]
41
+ extraPaths = ["tests/fixtures/contribs/src"]
42
+
43
+ [tool.ruff]
44
+ extend = "../pyproject.toml"
@@ -0,0 +1,41 @@
1
+ [project]
2
+ name = "bazaar-compute-node"
3
+ version = "0.3.0rc1"
4
+ description = "The Bazaar Compute Node Application"
5
+ readme = "README.md"
6
+ license = "Apache-2.0"
7
+ license-files = ["LICENSE"]
8
+ requires-python = ">=3.15"
9
+ dependencies = [
10
+ "bazaar-core~=0.3.0rc1",
11
+ "bazaar-contrib-config~=0.3.0rc1",
12
+ "bazaar-contrib-config-filesystem~=0.3.0rc1",
13
+ "bazaar-contrib-config-versions~=0.3.0rc1",
14
+ "bazaar-contrib-manager~=0.3.0rc1",
15
+ "bazaar-contrib-invoke~=0.3.0rc1",
16
+ "click>=8.1.0",
17
+ ]
18
+
19
+ [project.urls]
20
+ Repository = "https://github.com/yuchanns/bazaar-compute-node"
21
+
22
+ [project.scripts]
23
+ bcn = "bazaar_compute_node.cli:main"
24
+
25
+ [build-system]
26
+ requires = ["uv_build>=0.13.0,<0.14.0"]
27
+ build-backend = "uv_build"
28
+
29
+ [tool.pytest.ini_options]
30
+ testpaths = ["tests"]
31
+ addopts = "-p no:anyio"
32
+ asyncio_mode = "auto"
33
+ asyncio_default_fixture_loop_scope = "function"
34
+
35
+ [tool.pyright]
36
+ extends = "../pyrightconfig.json"
37
+ include = ["src", "tests"]
38
+ extraPaths = ["tests/fixtures/contribs/src"]
39
+
40
+ [tool.ruff]
41
+ extend = "../pyproject.toml"
@@ -0,0 +1,24 @@
1
+ """Application entry into the shared contrib composition framework."""
2
+
3
+ from __future__ import annotations
4
+
5
+ from contextlib import asynccontextmanager
6
+ lazy from collections.abc import AsyncIterator, Awaitable, Callable
7
+
8
+ lazy from bazaar_core import Composition, ContribEntry, ContribHub
9
+
10
+ __all__ = ["run"]
11
+
12
+
13
+ @asynccontextmanager
14
+ async def run(
15
+ bootstrap: Composition,
16
+ load: ContribEntry,
17
+ *,
18
+ prepare: Callable[[ContribHub], Awaitable[None]] | None = None,
19
+ ) -> AsyncIterator[ContribHub]:
20
+ """Run a caller's bootstrap and loader in one concrete instance graph."""
21
+ async with ContribHub().run(bootstrap, load) as hub:
22
+ if prepare is not None:
23
+ await prepare(hub)
24
+ yield hub
@@ -0,0 +1,3 @@
1
+ from .cli import main
2
+
3
+ main()
@@ -0,0 +1,150 @@
1
+ """Node bootstrap inputs, packaged combinations, and concrete input graphs."""
2
+
3
+ from __future__ import annotations
4
+
5
+ from contextlib import asynccontextmanager
6
+ lazy import asyncio
7
+ lazy import tomllib
8
+ lazy from collections.abc import AsyncIterator, Callable, Sequence
9
+ lazy from importlib.resources import files
10
+
11
+ lazy from bazaar_contrib_config import (
12
+ CONFIG_PREPARE,
13
+ CONFIG_STORE,
14
+ CONFIGURATION,
15
+ ConfigDocument,
16
+ ConfigFormatError,
17
+ Configuration,
18
+ ConfigurationEnvironment,
19
+ EnabledContrib,
20
+ configuration,
21
+ )
22
+ lazy from bazaar_contrib_config_versions import VERSIONS
23
+ lazy from bazaar_core import (
24
+ Composition,
25
+ Context,
26
+ Contrib,
27
+ ContribEntry,
28
+ ContribHub,
29
+ ContribSpec,
30
+ load,
31
+ )
32
+
33
+ lazy from . import run
34
+
35
+
36
+ def build(document: ConfigDocument) -> Composition:
37
+ """Load enabled contrib declarations without interpreting their business input."""
38
+ return load(
39
+ [
40
+ ContribSpec(
41
+ contrib=entry.entry,
42
+ config=entry.config,
43
+ location=f"contribs[{index}].enabled[{position}]",
44
+ )
45
+ for index, package in enumerate(document.contribs)
46
+ if package.applies
47
+ for position, entry in enumerate(package.enabled)
48
+ ]
49
+ )
50
+
51
+
52
+ def bootstrap(
53
+ *,
54
+ configer: str = "config-filesystem",
55
+ configer_options: Sequence[str] = (),
56
+ start: Callable[[ConfigDocument], Composition] | None = None,
57
+ ) -> tuple[Composition, ContribEntry]:
58
+ resource = files(__package__)
59
+ definitions = load(
60
+ [
61
+ ContribSpec(
62
+ contrib=configer,
63
+ config={"options": configer_options},
64
+ location="--configer/--configer-options/--config",
65
+ required_offers=[CONFIG_STORE],
66
+ ),
67
+ *VERSIONS,
68
+ ]
69
+ )
70
+ if definitions.diagnostics:
71
+ raise ConfigFormatError(
72
+ "; ".join(
73
+ f"{record.name}: {record.state}" for record in definitions.diagnostics
74
+ )
75
+ )
76
+ defaults = tomllib.loads(resource.joinpath("defaults.toml").read_text())
77
+ return (
78
+ definitions,
79
+ ContribEntry(
80
+ name="node-configuration",
81
+ definition=configuration(
82
+ defaults,
83
+ build,
84
+ environment=ConfigurationEnvironment(
85
+ hub="bazaar_core:ContribHub",
86
+ entries=tuple(
87
+ EnabledContrib(entry=entry.name, config=entry.config)
88
+ for entry in definitions.entries
89
+ ),
90
+ ),
91
+ start=start,
92
+ ),
93
+ location="defaults.toml",
94
+ ),
95
+ )
96
+
97
+
98
+ @asynccontextmanager
99
+ async def node(
100
+ *,
101
+ configer: str = "config-filesystem",
102
+ configer_options: Sequence[str] = (),
103
+ start: Callable[[ConfigDocument], Composition] | None = None,
104
+ ) -> AsyncIterator[ContribHub]:
105
+ """Prepare configured dependencies before selecting business definitions."""
106
+
107
+ configurations: list[Configuration] = []
108
+
109
+ @asynccontextmanager
110
+ async def dependencies(ctx: Context):
111
+ configurations.append(ctx.accept(CONFIGURATION))
112
+ yield
113
+
114
+ def initial(document: ConfigDocument) -> Composition:
115
+ composition = build(document)
116
+ entry = ContribEntry(
117
+ name="node-dependencies",
118
+ definition=Contrib(
119
+ accepts=[CONFIGURATION],
120
+ lifespan=dependencies,
121
+ ),
122
+ )
123
+ return composition.model_copy(
124
+ update={
125
+ "entries": (*composition.entries, entry),
126
+ "roots": (
127
+ entry.name,
128
+ *(
129
+ entry.name
130
+ for entry in composition.entries
131
+ if CONFIG_PREPARE in entry.definition.listen
132
+ ),
133
+ ),
134
+ }
135
+ )
136
+
137
+ entries, loader = await asyncio.to_thread(
138
+ bootstrap,
139
+ configer=configer,
140
+ configer_options=configer_options,
141
+ start=initial,
142
+ )
143
+
144
+ async def prepare(hub: ContribHub) -> None:
145
+ Configuration.check(hub)
146
+ await hub.announce(CONFIG_PREPARE, None)
147
+ await configurations[0].select(start)
148
+
149
+ async with run(entries, loader, prepare=prepare) as hub:
150
+ yield hub