akgentic-infra 1.3.3__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 (255) hide show
  1. akgentic_infra-1.3.3/.env.example +31 -0
  2. akgentic_infra-1.3.3/.github/workflows/ci.yml +230 -0
  3. akgentic_infra-1.3.3/.github/workflows/release.yml +69 -0
  4. akgentic_infra-1.3.3/.gitignore +30 -0
  5. akgentic_infra-1.3.3/LICENSE +661 -0
  6. akgentic_infra-1.3.3/PKG-INFO +554 -0
  7. akgentic_infra-1.3.3/README.md +511 -0
  8. akgentic_infra-1.3.3/USAGE-GUIDE.md +322 -0
  9. akgentic_infra-1.3.3/channels.yaml +6 -0
  10. akgentic_infra-1.3.3/examples/README.md +50 -0
  11. akgentic_infra-1.3.3/pyproject.toml +115 -0
  12. akgentic_infra-1.3.3/src/akgentic/__init__.py +3 -0
  13. akgentic_infra-1.3.3/src/akgentic/infra/__init__.py +117 -0
  14. akgentic_infra-1.3.3/src/akgentic/infra/adapters/__init__.py +48 -0
  15. akgentic_infra-1.3.3/src/akgentic/infra/adapters/community/__init__.py +35 -0
  16. akgentic_infra-1.3.3/src/akgentic/infra/adapters/community/local_event_stream.py +231 -0
  17. akgentic_infra-1.3.3/src/akgentic/infra/adapters/community/local_ingestion.py +94 -0
  18. akgentic_infra-1.3.3/src/akgentic/infra/adapters/community/local_placement.py +69 -0
  19. akgentic_infra-1.3.3/src/akgentic/infra/adapters/community/local_runtime_cache.py +81 -0
  20. akgentic_infra-1.3.3/src/akgentic/infra/adapters/community/local_team_handle.py +61 -0
  21. akgentic_infra-1.3.3/src/akgentic/infra/adapters/community/local_worker_handle.py +68 -0
  22. akgentic_infra-1.3.3/src/akgentic/infra/adapters/community/no_auth.py +24 -0
  23. akgentic_infra-1.3.3/src/akgentic/infra/adapters/community/null_channel_registry.py +23 -0
  24. akgentic_infra-1.3.3/src/akgentic/infra/adapters/community/yaml_channel_registry.py +79 -0
  25. akgentic_infra-1.3.3/src/akgentic/infra/adapters/shared/__init__.py +36 -0
  26. akgentic_infra-1.3.3/src/akgentic/infra/adapters/shared/channel_dispatcher.py +94 -0
  27. akgentic_infra-1.3.3/src/akgentic/infra/adapters/shared/channel_parser_registry.py +113 -0
  28. akgentic_infra-1.3.3/src/akgentic/infra/adapters/shared/event_stream_subscriber.py +101 -0
  29. akgentic_infra-1.3.3/src/akgentic/infra/adapters/shared/null_event_stream.py +43 -0
  30. akgentic_infra-1.3.3/src/akgentic/infra/adapters/shared/runtime_cache_eviction_subscriber.py +84 -0
  31. akgentic_infra-1.3.3/src/akgentic/infra/adapters/shared/telegram_adapter.py +103 -0
  32. akgentic_infra-1.3.3/src/akgentic/infra/adapters/shared/telegram_parser.py +91 -0
  33. akgentic_infra-1.3.3/src/akgentic/infra/adapters/shared/telemetry_subscriber.py +194 -0
  34. akgentic_infra-1.3.3/src/akgentic/infra/cli/__init__.py +5 -0
  35. akgentic_infra-1.3.3/src/akgentic/infra/cli/auth/__init__.py +72 -0
  36. akgentic_infra-1.3.3/src/akgentic/infra/cli/auth/cache.py +183 -0
  37. akgentic_infra-1.3.3/src/akgentic/infra/cli/auth/oidc.py +335 -0
  38. akgentic_infra-1.3.3/src/akgentic/infra/cli/auth/token_provider.py +330 -0
  39. akgentic_infra-1.3.3/src/akgentic/infra/cli/client.py +424 -0
  40. akgentic_infra-1.3.3/src/akgentic/infra/cli/commands/__init__.py +16 -0
  41. akgentic_infra-1.3.3/src/akgentic/infra/cli/commands/catalog.py +239 -0
  42. akgentic_infra-1.3.3/src/akgentic/infra/cli/commands/channel.py +106 -0
  43. akgentic_infra-1.3.3/src/akgentic/infra/cli/commands/login.py +131 -0
  44. akgentic_infra-1.3.3/src/akgentic/infra/cli/commands/logout.py +71 -0
  45. akgentic_infra-1.3.3/src/akgentic/infra/cli/config/__init__.py +34 -0
  46. akgentic_infra-1.3.3/src/akgentic/infra/cli/config/profile.py +226 -0
  47. akgentic_infra-1.3.3/src/akgentic/infra/cli/connection.py +160 -0
  48. akgentic_infra-1.3.3/src/akgentic/infra/cli/event_router.py +215 -0
  49. akgentic_infra-1.3.3/src/akgentic/infra/cli/formatters.py +77 -0
  50. akgentic_infra-1.3.3/src/akgentic/infra/cli/http/__init__.py +28 -0
  51. akgentic_infra-1.3.3/src/akgentic/infra/cli/http/auto_auth.py +243 -0
  52. akgentic_infra-1.3.3/src/akgentic/infra/cli/http/client.py +153 -0
  53. akgentic_infra-1.3.3/src/akgentic/infra/cli/http/errors.py +77 -0
  54. akgentic_infra-1.3.3/src/akgentic/infra/cli/main.py +481 -0
  55. akgentic_infra-1.3.3/src/akgentic/infra/cli/renderers.py +171 -0
  56. akgentic_infra-1.3.3/src/akgentic/infra/cli/repl.py +314 -0
  57. akgentic_infra-1.3.3/src/akgentic/infra/cli/repl_commands.py +467 -0
  58. akgentic_infra-1.3.3/src/akgentic/infra/cli/team_selector.py +152 -0
  59. akgentic_infra-1.3.3/src/akgentic/infra/cli/tui/__init__.py +1 -0
  60. akgentic_infra-1.3.3/src/akgentic/infra/cli/tui/app.py +434 -0
  61. akgentic_infra-1.3.3/src/akgentic/infra/cli/tui/colors.py +25 -0
  62. akgentic_infra-1.3.3/src/akgentic/infra/cli/tui/command_adapter.py +528 -0
  63. akgentic_infra-1.3.3/src/akgentic/infra/cli/tui/messages.py +15 -0
  64. akgentic_infra-1.3.3/src/akgentic/infra/cli/tui/screens/__init__.py +6 -0
  65. akgentic_infra-1.3.3/src/akgentic/infra/cli/tui/screens/chat.py +46 -0
  66. akgentic_infra-1.3.3/src/akgentic/infra/cli/tui/screens/team_select.py +343 -0
  67. akgentic_infra-1.3.3/src/akgentic/infra/cli/tui/styles/chat.tcss +76 -0
  68. akgentic_infra-1.3.3/src/akgentic/infra/cli/tui/styles/team_select.tcss +45 -0
  69. akgentic_infra-1.3.3/src/akgentic/infra/cli/tui/widgets/__init__.py +28 -0
  70. akgentic_infra-1.3.3/src/akgentic/infra/cli/tui/widgets/agent_message.py +56 -0
  71. akgentic_infra-1.3.3/src/akgentic/infra/cli/tui/widgets/chat_input.py +192 -0
  72. akgentic_infra-1.3.3/src/akgentic/infra/cli/tui/widgets/command_palette.py +90 -0
  73. akgentic_infra-1.3.3/src/akgentic/infra/cli/tui/widgets/error.py +26 -0
  74. akgentic_infra-1.3.3/src/akgentic/infra/cli/tui/widgets/hint_bar.py +34 -0
  75. akgentic_infra-1.3.3/src/akgentic/infra/cli/tui/widgets/human_input.py +30 -0
  76. akgentic_infra-1.3.3/src/akgentic/infra/cli/tui/widgets/scroll_indicator.py +50 -0
  77. akgentic_infra-1.3.3/src/akgentic/infra/cli/tui/widgets/status_header.py +73 -0
  78. akgentic_infra-1.3.3/src/akgentic/infra/cli/tui/widgets/system_message.py +41 -0
  79. akgentic_infra-1.3.3/src/akgentic/infra/cli/tui/widgets/thinking.py +50 -0
  80. akgentic_infra-1.3.3/src/akgentic/infra/cli/tui/widgets/tool_call.py +84 -0
  81. akgentic_infra-1.3.3/src/akgentic/infra/cli/ws_client.py +122 -0
  82. akgentic_infra-1.3.3/src/akgentic/infra/protocols/__init__.py +39 -0
  83. akgentic_infra-1.3.3/src/akgentic/infra/protocols/auth.py +36 -0
  84. akgentic_infra-1.3.3/src/akgentic/infra/protocols/channels.py +199 -0
  85. akgentic_infra-1.3.3/src/akgentic/infra/protocols/event_stream.py +90 -0
  86. akgentic_infra-1.3.3/src/akgentic/infra/protocols/health.py +36 -0
  87. akgentic_infra-1.3.3/src/akgentic/infra/protocols/placement.py +59 -0
  88. akgentic_infra-1.3.3/src/akgentic/infra/protocols/recovery.py +39 -0
  89. akgentic_infra-1.3.3/src/akgentic/infra/protocols/runtime_cache.py +66 -0
  90. akgentic_infra-1.3.3/src/akgentic/infra/protocols/team_handle.py +99 -0
  91. akgentic_infra-1.3.3/src/akgentic/infra/protocols/worker_handle.py +87 -0
  92. akgentic_infra-1.3.3/src/akgentic/infra/py.typed +2 -0
  93. akgentic_infra-1.3.3/src/akgentic/infra/server/__init__.py +33 -0
  94. akgentic_infra-1.3.3/src/akgentic/infra/server/app.py +184 -0
  95. akgentic_infra-1.3.3/src/akgentic/infra/server/auth.py +28 -0
  96. akgentic_infra-1.3.3/src/akgentic/infra/server/deps.py +74 -0
  97. akgentic_infra-1.3.3/src/akgentic/infra/server/logging_config.py +53 -0
  98. akgentic_infra-1.3.3/src/akgentic/infra/server/models.py +136 -0
  99. akgentic_infra-1.3.3/src/akgentic/infra/server/routes/__init__.py +1 -0
  100. akgentic_infra-1.3.3/src/akgentic/infra/server/routes/_message_payload.py +54 -0
  101. akgentic_infra-1.3.3/src/akgentic/infra/server/routes/admin_catalog.py +313 -0
  102. akgentic_infra-1.3.3/src/akgentic/infra/server/routes/frontend_adapter/__init__.py +183 -0
  103. akgentic_infra-1.3.3/src/akgentic/infra/server/routes/frontend_adapter/angular_v1/__init__.py +57 -0
  104. akgentic_infra-1.3.3/src/akgentic/infra/server/routes/frontend_adapter/angular_v1/_helpers.py +56 -0
  105. akgentic_infra-1.3.3/src/akgentic/infra/server/routes/frontend_adapter/angular_v1/models.py +131 -0
  106. akgentic_infra-1.3.3/src/akgentic/infra/server/routes/frontend_adapter/angular_v1/router.py +530 -0
  107. akgentic_infra-1.3.3/src/akgentic/infra/server/routes/frontend_adapter/angular_v1/ws.py +221 -0
  108. akgentic_infra-1.3.3/src/akgentic/infra/server/routes/readiness.py +42 -0
  109. akgentic_infra-1.3.3/src/akgentic/infra/server/routes/teams.py +280 -0
  110. akgentic_infra-1.3.3/src/akgentic/infra/server/routes/webhook.py +101 -0
  111. akgentic_infra-1.3.3/src/akgentic/infra/server/routes/workspace.py +109 -0
  112. akgentic_infra-1.3.3/src/akgentic/infra/server/routes/ws.py +362 -0
  113. akgentic_infra-1.3.3/src/akgentic/infra/server/services/__init__.py +1 -0
  114. akgentic_infra-1.3.3/src/akgentic/infra/server/services/team_service.py +296 -0
  115. akgentic_infra-1.3.3/src/akgentic/infra/server/settings.py +113 -0
  116. akgentic_infra-1.3.3/src/akgentic/infra/wiring.py +148 -0
  117. akgentic_infra-1.3.3/src/akgentic/infra/worker/__init__.py +14 -0
  118. akgentic_infra-1.3.3/src/akgentic/infra/worker/deps.py +36 -0
  119. akgentic_infra-1.3.3/src/akgentic/infra/worker/routes/__init__.py +0 -0
  120. akgentic_infra-1.3.3/src/akgentic/infra/worker/routes/readiness.py +40 -0
  121. akgentic_infra-1.3.3/src/akgentic/infra/worker/routes/teams.py +295 -0
  122. akgentic_infra-1.3.3/src/akgentic/infra/worker/settings.py +69 -0
  123. akgentic_infra-1.3.3/tests/__init__.py +1 -0
  124. akgentic_infra-1.3.3/tests/adapters/__init__.py +0 -0
  125. akgentic_infra-1.3.3/tests/adapters/community/__init__.py +0 -0
  126. akgentic_infra-1.3.3/tests/adapters/community/test_local_ingestion.py +92 -0
  127. akgentic_infra-1.3.3/tests/adapters/community/test_local_placement.py +93 -0
  128. akgentic_infra-1.3.3/tests/adapters/community/test_local_runtime_cache.py +163 -0
  129. akgentic_infra-1.3.3/tests/adapters/community/test_local_team_handle.py +134 -0
  130. akgentic_infra-1.3.3/tests/adapters/community/test_local_worker_handle.py +138 -0
  131. akgentic_infra-1.3.3/tests/adapters/community/test_no_auth.py +49 -0
  132. akgentic_infra-1.3.3/tests/adapters/community/test_null_channel_registry.py +32 -0
  133. akgentic_infra-1.3.3/tests/adapters/community/test_yaml_channel_registry.py +158 -0
  134. akgentic_infra-1.3.3/tests/adapters/shared/__init__.py +0 -0
  135. akgentic_infra-1.3.3/tests/adapters/shared/test_channel_dispatcher.py +377 -0
  136. akgentic_infra-1.3.3/tests/adapters/shared/test_channel_parser_registry.py +401 -0
  137. akgentic_infra-1.3.3/tests/adapters/shared/test_event_stream_subscriber.py +242 -0
  138. akgentic_infra-1.3.3/tests/adapters/shared/test_runtime_cache_eviction_subscriber.py +146 -0
  139. akgentic_infra-1.3.3/tests/adapters/shared/test_telegram_adapter.py +169 -0
  140. akgentic_infra-1.3.3/tests/adapters/shared/test_telegram_integration.py +198 -0
  141. akgentic_infra-1.3.3/tests/adapters/shared/test_telegram_parser.py +149 -0
  142. akgentic_infra-1.3.3/tests/adapters/shared/test_telemetry_restore.py +70 -0
  143. akgentic_infra-1.3.3/tests/adapters/shared/test_telemetry_subscriber.py +297 -0
  144. akgentic_infra-1.3.3/tests/cli/__init__.py +0 -0
  145. akgentic_infra-1.3.3/tests/cli/auth/__init__.py +0 -0
  146. akgentic_infra-1.3.3/tests/cli/auth/test_cache.py +131 -0
  147. akgentic_infra-1.3.3/tests/cli/auth/test_oidc.py +705 -0
  148. akgentic_infra-1.3.3/tests/cli/auth/test_token_provider.py +276 -0
  149. akgentic_infra-1.3.3/tests/cli/commands/__init__.py +1 -0
  150. akgentic_infra-1.3.3/tests/cli/commands/test_catalog.py +734 -0
  151. akgentic_infra-1.3.3/tests/cli/commands/test_channel_reload.py +374 -0
  152. akgentic_infra-1.3.3/tests/cli/commands/test_login.py +275 -0
  153. akgentic_infra-1.3.3/tests/cli/commands/test_logout.py +151 -0
  154. akgentic_infra-1.3.3/tests/cli/commands/test_naming_collision.py +48 -0
  155. akgentic_infra-1.3.3/tests/cli/config/__init__.py +0 -0
  156. akgentic_infra-1.3.3/tests/cli/config/test_profile.py +323 -0
  157. akgentic_infra-1.3.3/tests/cli/conftest.py +142 -0
  158. akgentic_infra-1.3.3/tests/cli/debug_tui.py +597 -0
  159. akgentic_infra-1.3.3/tests/cli/http/__init__.py +0 -0
  160. akgentic_infra-1.3.3/tests/cli/http/test_auto_auth.py +435 -0
  161. akgentic_infra-1.3.3/tests/cli/http/test_client.py +310 -0
  162. akgentic_infra-1.3.3/tests/cli/test_callback.py +436 -0
  163. akgentic_infra-1.3.3/tests/cli/test_callback_no_config_regression.py +316 -0
  164. akgentic_infra-1.3.3/tests/cli/test_cli_client.py +398 -0
  165. akgentic_infra-1.3.3/tests/cli/test_cli_commands.py +261 -0
  166. akgentic_infra-1.3.3/tests/cli/test_cli_commands_insession.py +1114 -0
  167. akgentic_infra-1.3.3/tests/cli/test_cli_connection.py +358 -0
  168. akgentic_infra-1.3.3/tests/cli/test_cli_event_router.py +344 -0
  169. akgentic_infra-1.3.3/tests/cli/test_cli_formatters.py +116 -0
  170. akgentic_infra-1.3.3/tests/cli/test_cli_main.py +112 -0
  171. akgentic_infra-1.3.3/tests/cli/test_cli_renderers.py +132 -0
  172. akgentic_infra-1.3.3/tests/cli/test_cli_repl.py +771 -0
  173. akgentic_infra-1.3.3/tests/cli/test_cli_team_selector.py +288 -0
  174. akgentic_infra-1.3.3/tests/cli/test_cli_ws_client.py +262 -0
  175. akgentic_infra-1.3.3/tests/cli/test_tui_commands.py +638 -0
  176. akgentic_infra-1.3.3/tests/cli/test_tui_input.py +491 -0
  177. akgentic_infra-1.3.3/tests/cli/test_tui_layout.py +188 -0
  178. akgentic_infra-1.3.3/tests/cli/test_tui_streaming.py +787 -0
  179. akgentic_infra-1.3.3/tests/cli/test_tui_team_select.py +357 -0
  180. akgentic_infra-1.3.3/tests/cli/test_tui_widgets.py +205 -0
  181. akgentic_infra-1.3.3/tests/conftest.py +172 -0
  182. akgentic_infra-1.3.3/tests/e2e/__init__.py +0 -0
  183. akgentic_infra-1.3.3/tests/e2e/conftest.py +171 -0
  184. akgentic_infra-1.3.3/tests/e2e/test_cli.py +222 -0
  185. akgentic_infra-1.3.3/tests/e2e/test_rest_api.py +247 -0
  186. akgentic_infra-1.3.3/tests/e2e/test_v1_frontend.py +277 -0
  187. akgentic_infra-1.3.3/tests/e2e/test_websocket.py +234 -0
  188. akgentic_infra-1.3.3/tests/fixtures/README.md +78 -0
  189. akgentic_infra-1.3.3/tests/fixtures/__init__.py +0 -0
  190. akgentic_infra-1.3.3/tests/fixtures/events.py +256 -0
  191. akgentic_infra-1.3.3/tests/fixtures/models.py +50 -0
  192. akgentic_infra-1.3.3/tests/fixtures/test_fixture_factories.py +283 -0
  193. akgentic_infra-1.3.3/tests/frontend_adapter/__init__.py +0 -0
  194. akgentic_infra-1.3.3/tests/frontend_adapter/conftest.py +40 -0
  195. akgentic_infra-1.3.3/tests/frontend_adapter/test_angular_v1_adapter.py +205 -0
  196. akgentic_infra-1.3.3/tests/frontend_adapter/test_angular_v1_ws.py +611 -0
  197. akgentic_infra-1.3.3/tests/frontend_adapter/test_frontend_adapter.py +332 -0
  198. akgentic_infra-1.3.3/tests/frontend_adapter/test_v1_ws_classify.py +76 -0
  199. akgentic_infra-1.3.3/tests/integration/__init__.py +3 -0
  200. akgentic_infra-1.3.3/tests/integration/_helpers.py +226 -0
  201. akgentic_infra-1.3.3/tests/integration/conftest.py +403 -0
  202. akgentic_infra-1.3.3/tests/integration/test_adr003_tier_agnostic.py +386 -0
  203. akgentic_infra-1.3.3/tests/integration/test_adr004_v1_compat.py +384 -0
  204. akgentic_infra-1.3.3/tests/integration/test_catalog.py +52 -0
  205. akgentic_infra-1.3.3/tests/integration/test_channels.py +273 -0
  206. akgentic_infra-1.3.3/tests/integration/test_cli.py +444 -0
  207. akgentic_infra-1.3.3/tests/integration/test_event_stream_lifecycle.py +174 -0
  208. akgentic_infra-1.3.3/tests/integration/test_events.py +106 -0
  209. akgentic_infra-1.3.3/tests/integration/test_frontend_adapter.py +249 -0
  210. akgentic_infra-1.3.3/tests/integration/test_readiness_integration.py +61 -0
  211. akgentic_infra-1.3.3/tests/integration/test_repl_commands.py +423 -0
  212. akgentic_infra-1.3.3/tests/integration/test_repl_e2e.py +543 -0
  213. akgentic_infra-1.3.3/tests/integration/test_smoke.py +277 -0
  214. akgentic_infra-1.3.3/tests/integration/test_spec_catalog.py +136 -0
  215. akgentic_infra-1.3.3/tests/integration/test_spec_channels.py +58 -0
  216. akgentic_infra-1.3.3/tests/integration/test_spec_compliance.py +187 -0
  217. akgentic_infra-1.3.3/tests/integration/test_spec_frontend.py +172 -0
  218. akgentic_infra-1.3.3/tests/integration/test_team_lifecycle.py +182 -0
  219. akgentic_infra-1.3.3/tests/integration/test_v1_adapter.py +539 -0
  220. akgentic_infra-1.3.3/tests/integration/test_websocket.py +104 -0
  221. akgentic_infra-1.3.3/tests/server/__init__.py +0 -0
  222. akgentic_infra-1.3.3/tests/server/conftest.py +39 -0
  223. akgentic_infra-1.3.3/tests/server/models/__init__.py +0 -0
  224. akgentic_infra-1.3.3/tests/server/models/conftest.py +4 -0
  225. akgentic_infra-1.3.3/tests/server/models/test_server_models.py +163 -0
  226. akgentic_infra-1.3.3/tests/server/models/test_server_settings.py +420 -0
  227. akgentic_infra-1.3.3/tests/server/routes/__init__.py +0 -0
  228. akgentic_infra-1.3.3/tests/server/routes/conftest.py +5 -0
  229. akgentic_infra-1.3.3/tests/server/routes/test_admin_catalog.py +633 -0
  230. akgentic_infra-1.3.3/tests/server/routes/test_readiness.py +68 -0
  231. akgentic_infra-1.3.3/tests/server/routes/test_team_action_routes.py +582 -0
  232. akgentic_infra-1.3.3/tests/server/routes/test_team_routes.py +122 -0
  233. akgentic_infra-1.3.3/tests/server/routes/test_v1_state_update_routes.py +51 -0
  234. akgentic_infra-1.3.3/tests/server/routes/test_webhook_route.py +382 -0
  235. akgentic_infra-1.3.3/tests/server/routes/test_websocket_route.py +369 -0
  236. akgentic_infra-1.3.3/tests/server/routes/test_workspace_routes.py +144 -0
  237. akgentic_infra-1.3.3/tests/server/services/__init__.py +0 -0
  238. akgentic_infra-1.3.3/tests/server/services/conftest.py +5 -0
  239. akgentic_infra-1.3.3/tests/server/services/test_team_action_service.py +301 -0
  240. akgentic_infra-1.3.3/tests/server/services/test_team_service.py +273 -0
  241. akgentic_infra-1.3.3/tests/server/test_lifespan.py +143 -0
  242. akgentic_infra-1.3.3/tests/server/test_ws_streaming.py +278 -0
  243. akgentic_infra-1.3.3/tests/test_app.py +70 -0
  244. akgentic_infra-1.3.3/tests/test_deps.py +93 -0
  245. akgentic_infra-1.3.3/tests/test_event_stream_protocol.py +312 -0
  246. akgentic_infra-1.3.3/tests/test_local_event_stream.py +316 -0
  247. akgentic_infra-1.3.3/tests/test_logging_config.py +69 -0
  248. akgentic_infra-1.3.3/tests/test_protocols.py +850 -0
  249. akgentic_infra-1.3.3/tests/test_public_api.py +89 -0
  250. akgentic_infra-1.3.3/tests/test_wiring.py +256 -0
  251. akgentic_infra-1.3.3/tests/worker/__init__.py +0 -0
  252. akgentic_infra-1.3.3/tests/worker/test_routes_teams.py +482 -0
  253. akgentic_infra-1.3.3/tests/worker/test_worker_deps.py +67 -0
  254. akgentic_infra-1.3.3/tests/worker/test_worker_init_public_surface.py +59 -0
  255. akgentic_infra-1.3.3/tests/worker/test_worker_settings.py +114 -0
@@ -0,0 +1,31 @@
1
+ # akgentic-infra — Environment Variables
2
+ # Copy to .env and fill in values
3
+
4
+ # --- Server Settings (all tiers) ---
5
+ # AKGENTIC_HOST=0.0.0.0
6
+ # AKGENTIC_PORT=8000
7
+ # AKGENTIC_CORS_ORIGINS=["*"]
8
+ # AKGENTIC_FRONTEND_ADAPTER=
9
+
10
+ # --- Community Settings ---
11
+ # AKGENTIC_WORKSPACES_ROOT=workspaces
12
+ # AKGENTIC_EVENT_STORE_PATH=data/event_store
13
+ # AKGENTIC_CATALOG_PATH=data/catalog
14
+ # AKGENTIC_CHANNEL_REGISTRY_PATH= # Path to channel registry YAML; disabled when unset
15
+
16
+ # --- LLM Provider Keys (at least one required for agents to function) ---
17
+ OPENAI_API_KEY=
18
+ # ANTHROPIC_API_KEY=
19
+ # AZURE_OPENAI_ENDPOINT=
20
+ # AZURE_OPENAI_API_KEY=
21
+ # MISTRAL_API_KEY=
22
+ # GOOGLE_API_KEY=
23
+ # NVIDIA_API_KEY=
24
+ # NVIDIA_BASE_URL=
25
+
26
+ # --- Tool Provider Keys (optional) ---
27
+ # TAVILY_API_KEY= # Required for Tavily web search tool
28
+
29
+ # --- Observability (optional) ---
30
+ # LOGFIRE_TOKEN=
31
+ # LOGFIRE_SEND_TO_LOGFIRE= # Controls whether telemetry is sent
@@ -0,0 +1,230 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ pull_request:
6
+ branches: [version-1.3.x]
7
+ workflow_dispatch:
8
+
9
+ env:
10
+ NO_COLOR: "1"
11
+ # Release channel for akgentic-* dependencies. This is the 1.3.x maintenance
12
+ # line, so siblings are built from their own version-1.3.x branches into the
13
+ # local wheelhouse — never from master, whose APIs have moved on.
14
+ RELEASE_BRANCH: version-1.3.x
15
+ # Transitive closure of akgentic-* dependencies, space-separated. uv resolves
16
+ # the graph from the wheelhouse, so order does not matter.
17
+ AKGENTIC_DEPS: "akgentic-core akgentic-llm akgentic-tool akgentic-team akgentic-agent akgentic-catalog"
18
+
19
+ jobs:
20
+ lint:
21
+ runs-on: ubuntu-latest
22
+ steps:
23
+ - name: Checkout akgentic-infra
24
+ uses: actions/checkout@v6
25
+ with:
26
+ # full history so the test/* branch guard can diff against the
27
+ # maintenance-line tip
28
+ fetch-depth: 0
29
+
30
+ - name: Install uv
31
+ uses: astral-sh/setup-uv@v8.1.0
32
+ with:
33
+ version: "latest"
34
+
35
+ - name: Set up Python 3.12
36
+ run: uv python install 3.12
37
+
38
+ # Build every akgentic-* dependency from RELEASE_BRANCH into a local
39
+ # wheelhouse. uv pip install --find-links then resolves them from there;
40
+ # all other (PyPI) deps still come from the default index.
41
+ - name: Build akgentic-* dependency wheelhouse
42
+ run: |
43
+ mkdir -p wheelhouse
44
+ for dep in ${AKGENTIC_DEPS}; do
45
+ echo "::group::build ${dep} @ ${RELEASE_BRANCH}"
46
+ git clone --depth 1 --branch "${RELEASE_BRANCH}" \
47
+ "https://github.com/b12consulting/${dep}.git" "/tmp/${dep}"
48
+ uv build --wheel --out-dir wheelhouse "/tmp/${dep}"
49
+ echo "::endgroup::"
50
+ done
51
+ ls -1 wheelhouse
52
+
53
+ - name: Create virtual environment
54
+ run: uv venv
55
+
56
+ - name: Install dependencies
57
+ run: uv pip install --find-links wheelhouse -e ".[dev]"
58
+
59
+ # --no-sync: run in the wheelhouse-built venv without re-resolving from a
60
+ # lockfile (there is no project lockfile in this install model).
61
+ - name: Type checking
62
+ run: uv run --no-sync mypy src/
63
+
64
+ - name: Linting
65
+ run: uv run --no-sync ruff check src/
66
+
67
+ - name: Enforce no MagicMock in integration and e2e tests
68
+ run: |
69
+ if grep -r "MagicMock" tests/integration/ --include='*.py' -l | grep -v '/test_cli\.py$'; then
70
+ echo "::error::MagicMock found in integration tests — integration tests must not use mocks"
71
+ exit 1
72
+ fi
73
+ if grep -r "MagicMock" tests/e2e/ --include='*.py' -l 2>/dev/null; then
74
+ echo "::error::MagicMock found in e2e tests — e2e tests must not use mocks"
75
+ exit 1
76
+ fi
77
+
78
+ - name: Enforce zero src/ changes on test branches
79
+ if: startsWith(github.head_ref || github.ref_name, 'test/')
80
+ run: |
81
+ changed=$(git diff origin/version-1.3.x --name-only -- src/ || true)
82
+ if [ -n "$changed" ]; then
83
+ echo "::error::src/ changes detected on a test/* branch — test branches must not modify production code"
84
+ echo "$changed"
85
+ exit 1
86
+ fi
87
+
88
+ unit-tests:
89
+ runs-on: ubuntu-latest
90
+ steps:
91
+ - name: Checkout akgentic-infra
92
+ uses: actions/checkout@v6
93
+
94
+ - name: Install uv
95
+ uses: astral-sh/setup-uv@v8.1.0
96
+ with:
97
+ version: "latest"
98
+
99
+ - name: Set up Python 3.12
100
+ run: uv python install 3.12
101
+
102
+ - name: Build akgentic-* dependency wheelhouse
103
+ run: |
104
+ mkdir -p wheelhouse
105
+ for dep in ${AKGENTIC_DEPS}; do
106
+ echo "::group::build ${dep} @ ${RELEASE_BRANCH}"
107
+ git clone --depth 1 --branch "${RELEASE_BRANCH}" \
108
+ "https://github.com/b12consulting/${dep}.git" "/tmp/${dep}"
109
+ uv build --wheel --out-dir wheelhouse "/tmp/${dep}"
110
+ echo "::endgroup::"
111
+ done
112
+
113
+ - name: Create virtual environment
114
+ run: uv venv
115
+
116
+ - name: Install dependencies
117
+ run: uv pip install --find-links wheelhouse -e ".[dev]"
118
+
119
+ - name: Run unit tests with coverage
120
+ run: >
121
+ uv run --no-sync pytest tests/
122
+ --ignore=tests/integration/
123
+ --ignore=tests/e2e/
124
+ --cov=akgentic.infra
125
+ --cov-report=term-missing
126
+ --cov-report=json:coverage.json
127
+ --cov-fail-under=80
128
+
129
+ - name: Update coverage badge
130
+ if: github.ref_name == 'master' && github.event_name == 'push'
131
+ run: |
132
+ COVERAGE=$(python -c "import json; print(int(json.load(open('coverage.json'))['totals']['percent_covered_display']))")
133
+ if [ "$COVERAGE" -ge 90 ]; then COLOR="brightgreen"
134
+ elif [ "$COVERAGE" -ge 80 ]; then COLOR="green"
135
+ elif [ "$COVERAGE" -ge 70 ]; then COLOR="yellow"
136
+ else COLOR="red"; fi
137
+ echo "{\"schemaVersion\":1,\"label\":\"coverage\",\"message\":\"${COVERAGE}%\",\"color\":\"${COLOR}\"}" > badge.json
138
+ gh gist edit d0b84268aa19a7460fe186dbf23e500d -f coverage.json badge.json
139
+ env:
140
+ GH_TOKEN: ${{ secrets.GH_PAT }}
141
+
142
+ integration-tests:
143
+ if: false # temporarily disabled — deadlock under pytest-cov, investigating
144
+ runs-on: ubuntu-latest
145
+ steps:
146
+ - name: Checkout akgentic-infra
147
+ uses: actions/checkout@v6
148
+
149
+ - name: Install uv
150
+ uses: astral-sh/setup-uv@v8.1.0
151
+ with:
152
+ version: "latest"
153
+
154
+ - name: Set up Python 3.12
155
+ run: uv python install 3.12
156
+
157
+ - name: Build akgentic-* dependency wheelhouse
158
+ run: |
159
+ mkdir -p wheelhouse
160
+ for dep in ${AKGENTIC_DEPS}; do
161
+ git clone --depth 1 --branch "${RELEASE_BRANCH}" \
162
+ "https://github.com/b12consulting/${dep}.git" "/tmp/${dep}"
163
+ uv build --wheel --out-dir wheelhouse "/tmp/${dep}"
164
+ done
165
+
166
+ - name: Create virtual environment
167
+ run: uv venv
168
+
169
+ - name: Install dependencies
170
+ run: uv pip install --find-links wheelhouse -e ".[dev]"
171
+
172
+ # --cov-fail-under=0 overrides pyproject.toml fail_under=90
173
+ # so integration coverage is reported without a gate.
174
+ - name: Run integration tests
175
+ run: >
176
+ uv run --no-sync pytest tests/integration/ -v
177
+ -o "addopts="
178
+ --cov=akgentic.infra
179
+ --cov-report=term-missing
180
+ --cov-fail-under=0
181
+
182
+ # Optional job — not required for PR merge. Succeeds (skipped) when
183
+ # OPENAI_API_KEY is absent; runs real-LLM integration tests when present.
184
+ integration-llm:
185
+ runs-on: ubuntu-latest
186
+ env:
187
+ OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
188
+ steps:
189
+ - name: Check for API key
190
+ if: env.OPENAI_API_KEY == ''
191
+ run: |
192
+ echo "::notice::OPENAI_API_KEY not available — skipping LLM integration tests"
193
+
194
+ - name: Checkout akgentic-infra
195
+ if: env.OPENAI_API_KEY != ''
196
+ uses: actions/checkout@v6
197
+
198
+ - name: Install uv
199
+ if: env.OPENAI_API_KEY != ''
200
+ uses: astral-sh/setup-uv@v8.1.0
201
+ with:
202
+ version: "latest"
203
+
204
+ - name: Set up Python 3.12
205
+ if: env.OPENAI_API_KEY != ''
206
+ run: uv python install 3.12
207
+
208
+ - name: Build akgentic-* dependency wheelhouse
209
+ if: env.OPENAI_API_KEY != ''
210
+ run: |
211
+ mkdir -p wheelhouse
212
+ for dep in ${AKGENTIC_DEPS}; do
213
+ git clone --depth 1 --branch "${RELEASE_BRANCH}" \
214
+ "https://github.com/b12consulting/${dep}.git" "/tmp/${dep}"
215
+ uv build --wheel --out-dir wheelhouse "/tmp/${dep}"
216
+ done
217
+
218
+ - name: Create virtual environment
219
+ if: env.OPENAI_API_KEY != ''
220
+ run: uv venv
221
+
222
+ - name: Install dependencies
223
+ if: env.OPENAI_API_KEY != ''
224
+ run: uv pip install --find-links wheelhouse -e ".[dev]"
225
+
226
+ - name: Run integration tests with real LLM
227
+ if: env.OPENAI_API_KEY != ''
228
+ run: >
229
+ uv run --no-sync pytest tests/integration/ -v
230
+ -o "addopts="
@@ -0,0 +1,69 @@
1
+ name: Release
2
+
3
+ # Manual release: reads version from pyproject.toml on master, tags master HEAD,
4
+ # builds the wheel, and creates a GitHub Release with the wheel attached.
5
+ #
6
+ # Bumping the version is a separate maintainer action via a normal PR. This
7
+ # workflow does NOT push commits to master — branch protection blocks that.
8
+ # The release flow is therefore two-step:
9
+ # 1. Open a "chore: bump version to X.Y.Z" PR; merge it.
10
+ # 2. Trigger this workflow from the Actions tab.
11
+
12
+ on:
13
+ workflow_dispatch:
14
+
15
+ jobs:
16
+ release:
17
+ runs-on: ubuntu-latest
18
+ permissions:
19
+ contents: write
20
+ steps:
21
+ - name: Checkout master
22
+ uses: actions/checkout@v6
23
+ with:
24
+ ref: master
25
+ fetch-depth: 0
26
+
27
+ - name: Install uv
28
+ uses: astral-sh/setup-uv@v8.1.0
29
+ with:
30
+ version: "latest"
31
+
32
+ - name: Set up Python 3.12
33
+ run: uv python install 3.12
34
+
35
+ - name: Read version from pyproject.toml
36
+ id: version
37
+ run: |
38
+ VERSION=$(grep -E '^version = ' pyproject.toml | sed -E 's/version = "(.*)"/\1/')
39
+ echo "Releasing version: $VERSION"
40
+ echo "version=$VERSION" >> "$GITHUB_OUTPUT"
41
+
42
+ - name: Verify tag does not already exist
43
+ env:
44
+ VERSION: ${{ steps.version.outputs.version }}
45
+ run: |
46
+ if git rev-parse "v$VERSION" >/dev/null 2>&1; then
47
+ echo "::error::Tag v$VERSION already exists. Bump the version in pyproject.toml first."
48
+ exit 1
49
+ fi
50
+
51
+ - name: Tag master HEAD
52
+ env:
53
+ VERSION: ${{ steps.version.outputs.version }}
54
+ run: |
55
+ git config user.name "github-actions[bot]"
56
+ git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
57
+ git tag "v$VERSION"
58
+ git push origin "v$VERSION"
59
+
60
+ - name: Build wheel
61
+ run: uv build --wheel --out-dir dist/
62
+
63
+ - name: Create GitHub Release
64
+ uses: softprops/action-gh-release@v2
65
+ with:
66
+ tag_name: "v${{ steps.version.outputs.version }}"
67
+ name: "v${{ steps.version.outputs.version }}"
68
+ files: dist/*.whl
69
+ generate_release_notes: true
@@ -0,0 +1,30 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+
6
+ # Distribution / packaging
7
+ dist/
8
+ build/
9
+ *.egg-info/
10
+ **/settings.local.json
11
+
12
+ # Testing
13
+ .pytest_cache/
14
+ .coverage
15
+ htmlcov/
16
+
17
+ # Type checking
18
+ .mypy_cache/
19
+ .dmypy.json
20
+
21
+ # Virtual environments
22
+ .venv/
23
+ venv/
24
+
25
+ # Environment
26
+ .env
27
+
28
+ # IDE
29
+ .vscode/
30
+ .idea/