imbi-api 2.48.0__tar.gz → 2.50.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (440) hide show
  1. {imbi_api-2.48.0 → imbi_api-2.50.0}/PKG-INFO +3 -2
  2. {imbi_api-2.48.0 → imbi_api-2.50.0}/pyproject.toml +3 -2
  3. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/agent_tasks/__init__.py +1 -0
  4. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/agent_tasks/log.py +6 -4
  5. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/agent_tasks/schemata.toml +18 -0
  6. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/agent_tasks/store.py +72 -26
  7. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/agent_tools.py +30 -2
  8. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/app.py +103 -4
  9. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/auth/agent_api.py +1 -0
  10. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/auth/agent_api_routes.py +4 -0
  11. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/auth/autonomous.py +34 -0
  12. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/auth/internal_services.py +11 -10
  13. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/auth/organizations.py +7 -1
  14. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/auth/seed.py +34 -5
  15. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/commit_pushed_at_repair.py +2 -2
  16. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/commit_sync/queue.py +7 -3
  17. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/component_facts.py +14 -11
  18. imbi_api-2.50.0/src/imbi/api/cves.py +410 -0
  19. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/deployment_sync/queue.py +7 -3
  20. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/drift.py +23 -8
  21. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/endpoints/__init__.py +2 -0
  22. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/endpoints/_helpers.py +162 -24
  23. imbi_api-2.50.0/src/imbi/api/endpoints/_local_time.py +56 -0
  24. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/endpoints/agent_task_harness.py +57 -0
  25. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/endpoints/agent_tasks.py +16 -4
  26. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/endpoints/agent_usage.py +24 -12
  27. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/endpoints/agents.py +30 -6
  28. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/endpoints/auth.py +4 -1
  29. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/endpoints/components.py +69 -18
  30. imbi_api-2.50.0/src/imbi/api/endpoints/cves.py +33 -0
  31. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/endpoints/dashboard.py +11 -10
  32. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/endpoints/harness.py +19 -10
  33. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/endpoints/maintenance.py +40 -1
  34. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/endpoints/organizations.py +127 -5
  35. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/endpoints/project_configuration.py +8 -3
  36. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/endpoints/project_deployments.py +142 -60
  37. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/endpoints/projects.py +95 -21
  38. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/endpoints/releases.py +106 -57
  39. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/endpoints/secret_broker.py +24 -21
  40. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/endpoints/status.py +8 -1
  41. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/endpoints/webhooks.py +43 -3
  42. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/endpoints/workflow_runs.py +267 -7
  43. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/endpoints/workflows.py +24 -8
  44. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/harness/__init__.py +14 -0
  45. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/harness/auth.py +5 -2
  46. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/harness/platform.py +33 -4
  47. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/harness/store.py +16 -0
  48. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/maintenance/operations.py +92 -0
  49. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/maintenance/registry.py +32 -0
  50. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/maintenance/worker.py +11 -1
  51. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/openapi.py +31 -0
  52. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/plugins/__init__.py +28 -0
  53. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/plugins/lifecycle_dispatch.py +92 -0
  54. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/secret_broker/__init__.py +1 -0
  55. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/secret_broker/store.py +91 -16
  56. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/settings.py +3 -0
  57. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/workflows/__init__.py +12 -5
  58. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/workflows/runs.py +303 -7
  59. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/workflows/runtime_schemata.toml +11 -0
  60. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/workflows/store.py +24 -3
  61. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/workflows/sweeper.py +35 -3
  62. imbi_api-2.50.0/src/imbi/api/workflows/task_trigger.py +134 -0
  63. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/auth/test_organizations.py +79 -0
  64. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/auth/test_seed.py +13 -3
  65. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/endpoints/test_agent_task_harness.py +128 -0
  66. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/endpoints/test_agent_tasks.py +47 -1
  67. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/endpoints/test_agent_usage.py +30 -0
  68. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/endpoints/test_agents.py +100 -0
  69. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/endpoints/test_ai_providers.py +28 -0
  70. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/endpoints/test_auth.py +18 -6
  71. imbi_api-2.50.0/tests/endpoints/test_caller_org_slugs.py +29 -0
  72. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/endpoints/test_components.py +108 -2
  73. imbi_api-2.50.0/tests/endpoints/test_cves.py +66 -0
  74. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/endpoints/test_dashboard.py +35 -0
  75. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/endpoints/test_harness.py +32 -0
  76. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/endpoints/test_maintenance.py +19 -0
  77. imbi_api-2.50.0/tests/endpoints/test_organizations.py +968 -0
  78. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/endpoints/test_project_configuration.py +32 -0
  79. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/endpoints/test_project_deployments.py +113 -7
  80. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/endpoints/test_projects.py +198 -0
  81. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/endpoints/test_releases.py +130 -7
  82. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/endpoints/test_secret_broker.py +93 -1
  83. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/endpoints/test_service_writeback.py +26 -9
  84. imbi_api-2.50.0/tests/endpoints/test_shared_identifier.py +147 -0
  85. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/endpoints/test_status.py +13 -0
  86. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/endpoints/test_webhooks.py +5 -0
  87. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/endpoints/test_workflow_run_history.py +41 -0
  88. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/endpoints/test_workflow_runs.py +548 -0
  89. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/endpoints/test_workflow_triggers.py +263 -1
  90. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/endpoints/test_workflows.py +59 -0
  91. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/support.py +10 -0
  92. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/test_agent_platform.py +56 -0
  93. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/test_agent_tools.py +30 -0
  94. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/test_app.py +89 -0
  95. imbi_api-2.50.0/tests/test_clickhouse_project_ids.py +232 -0
  96. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/test_commit_pushed_at_repair.py +5 -3
  97. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/test_commit_sync_queue.py +23 -1
  98. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/test_component_facts.py +1 -1
  99. imbi_api-2.50.0/tests/test_cves.py +453 -0
  100. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/test_deployment_sync_queue.py +23 -1
  101. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/test_drift.py +30 -2
  102. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/test_lifecycle_dispatch.py +115 -1
  103. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/test_maintenance_operations.py +59 -0
  104. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/test_maintenance_worker.py +22 -1
  105. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/test_openapi.py +28 -0
  106. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/test_projects_drift_ranges.py +3 -3
  107. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/test_secret_github_app.py +14 -7
  108. imbi_api-2.50.0/tests/test_task_trigger.py +285 -0
  109. imbi_api-2.50.0/tests/test_workflow_reconcile.py +40 -0
  110. imbi_api-2.48.0/tests/endpoints/test_organizations.py +0 -511
  111. imbi_api-2.48.0/tests/test_clickhouse_project_ids.py +0 -40
  112. imbi_api-2.48.0/tests/test_workflow_reconcile.py +0 -19
  113. {imbi_api-2.48.0 → imbi_api-2.50.0}/.gitignore +0 -0
  114. {imbi_api-2.48.0 → imbi_api-2.50.0}/README.md +0 -0
  115. {imbi_api-2.48.0 → imbi_api-2.50.0}/moon.yml +0 -0
  116. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/README.md +0 -0
  117. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/__init__.py +0 -0
  118. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/agent_tasks/sweeper.py +0 -0
  119. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/auth/__init__.py +0 -0
  120. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/auth/authorization_codes.py +0 -0
  121. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/auth/local_auth.py +0 -0
  122. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/auth/login_providers.py +0 -0
  123. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/auth/membership.py +0 -0
  124. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/auth/models.py +0 -0
  125. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/auth/oauth_clients.py +0 -0
  126. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/auth/password.py +0 -0
  127. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/auth/permissions.py +0 -0
  128. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/auth/principals.py +0 -0
  129. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/auth/sessions.py +0 -0
  130. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/auth/tokens.py +0 -0
  131. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/auth/totp.py +0 -0
  132. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/backfill_embeddings.py +0 -0
  133. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/blueprint_attributes.py +0 -0
  134. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/blueprint_compliance.py +0 -0
  135. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/commit_sync/__init__.py +0 -0
  136. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/commit_sync/service.py +0 -0
  137. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/deployment_status_repair.py +0 -0
  138. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/deployment_sweeper.py +0 -0
  139. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/deployment_sync/__init__.py +0 -0
  140. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/deployment_sync/service.py +0 -0
  141. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/documents/__init__.py +0 -0
  142. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/documents/read_sweeper.py +0 -0
  143. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/domain/__init__.py +0 -0
  144. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/domain/models.py +0 -0
  145. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/domain/scoring.py +0 -0
  146. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/email/__init__.py +0 -0
  147. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/email/client.py +0 -0
  148. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/email/dependencies.py +0 -0
  149. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/email/models.py +0 -0
  150. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/email/templates/base.html +0 -0
  151. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/email/templates/base.txt +0 -0
  152. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/email/templates/password_reset.html +0 -0
  153. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/email/templates/password_reset.txt +0 -0
  154. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/email/templates/welcome.html +0 -0
  155. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/email/templates/welcome.txt +0 -0
  156. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/email/templates.py +0 -0
  157. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/endpoints/_credentials.py +0 -0
  158. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/endpoints/_document_events.py +0 -0
  159. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/endpoints/_document_history.py +0 -0
  160. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/endpoints/_document_reads.py +0 -0
  161. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/endpoints/_document_scope.py +0 -0
  162. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/endpoints/_json_fields.py +0 -0
  163. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/endpoints/_pagination.py +0 -0
  164. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/endpoints/_request_urls.py +0 -0
  165. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/endpoints/_search_index.py +0 -0
  166. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/endpoints/admin.py +0 -0
  167. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/endpoints/admin_plugins.py +0 -0
  168. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/endpoints/agent_platform.py +0 -0
  169. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/endpoints/ai_models.py +0 -0
  170. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/endpoints/ai_providers.py +0 -0
  171. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/endpoints/api_keys.py +0 -0
  172. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/endpoints/auth_providers.py +0 -0
  173. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/endpoints/blueprints.py +0 -0
  174. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/endpoints/client_credentials.py +0 -0
  175. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/endpoints/comments.py +0 -0
  176. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/endpoints/document_analytics.py +0 -0
  177. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/endpoints/document_likes.py +0 -0
  178. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/endpoints/document_presence.py +0 -0
  179. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/endpoints/document_templates.py +0 -0
  180. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/endpoints/document_versions.py +0 -0
  181. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/endpoints/documents.py +0 -0
  182. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/endpoints/environments.py +0 -0
  183. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/endpoints/events.py +0 -0
  184. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/endpoints/graph_query.py +0 -0
  185. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/endpoints/iggy_connectors.py +0 -0
  186. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/endpoints/integrations.py +0 -0
  187. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/endpoints/link_definitions.py +0 -0
  188. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/endpoints/local_auth.py +0 -0
  189. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/endpoints/mcp_servers.py +0 -0
  190. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/endpoints/mfa.py +0 -0
  191. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/endpoints/oauth_metadata.py +0 -0
  192. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/endpoints/operations_log.py +0 -0
  193. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/endpoints/plugin_edges.py +0 -0
  194. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/endpoints/plugin_entities.py +0 -0
  195. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/endpoints/plugins.py +0 -0
  196. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/endpoints/project_analysis.py +0 -0
  197. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/endpoints/project_commit_sync.py +0 -0
  198. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/endpoints/project_incidents.py +0 -0
  199. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/endpoints/project_integrations.py +0 -0
  200. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/endpoints/project_lifecycle.py +0 -0
  201. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/endpoints/project_logs.py +0 -0
  202. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/endpoints/project_plugins.py +0 -0
  203. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/endpoints/project_pr_sync.py +0 -0
  204. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/endpoints/project_types.py +0 -0
  205. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/endpoints/prompts.py +0 -0
  206. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/endpoints/pull_requests.py +0 -0
  207. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/endpoints/roles.py +0 -0
  208. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/endpoints/sa_api_keys.py +0 -0
  209. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/endpoints/scoring.py +0 -0
  210. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/endpoints/scoring_policies.py +0 -0
  211. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/endpoints/search.py +0 -0
  212. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/endpoints/service_accounts.py +0 -0
  213. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/endpoints/tags.py +0 -0
  214. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/endpoints/teams.py +0 -0
  215. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/endpoints/uploads.py +0 -0
  216. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/endpoints/user_activity.py +0 -0
  217. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/endpoints/users.py +0 -0
  218. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/entrypoint.py +0 -0
  219. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/graph_ids.py +0 -0
  220. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/graph_sql.py +0 -0
  221. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/harness/egress.py +0 -0
  222. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/harness/marketplaces.py +0 -0
  223. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/harness/metrics.py +0 -0
  224. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/harness/schemata.toml +0 -0
  225. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/harness/sweeper.py +0 -0
  226. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/harness/tokens.py +0 -0
  227. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/identity/__init__.py +0 -0
  228. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/identity/attribution.py +0 -0
  229. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/identity/endpoints.py +0 -0
  230. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/identity/errors.py +0 -0
  231. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/identity/flows.py +0 -0
  232. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/identity/host_integration.py +0 -0
  233. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/identity/models.py +0 -0
  234. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/identity/repository.py +0 -0
  235. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/identity/resolution.py +0 -0
  236. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/identity/state.py +0 -0
  237. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/identity/sweeper.py +0 -0
  238. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/iggy_metrics.py +0 -0
  239. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/lifespans.py +0 -0
  240. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/llm/__init__.py +0 -0
  241. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/llm/dependencies.py +0 -0
  242. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/llm/tokens.py +0 -0
  243. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/maintenance/__init__.py +0 -0
  244. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/maintenance/log.py +0 -0
  245. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/maintenance/state.py +0 -0
  246. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/mcp_test.py +0 -0
  247. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/middleware/__init__.py +0 -0
  248. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/middleware/rate_limit.py +0 -0
  249. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/models.py +0 -0
  250. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/orphan_releases.py +0 -0
  251. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/plugins/assignment_writer.py +0 -0
  252. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/plugins/assignments.py +0 -0
  253. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/plugins/credentials.py +0 -0
  254. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/plugins/installer.py +0 -0
  255. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/plugins/lifecycle.py +0 -0
  256. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/plugins/release_dispatch.py +0 -0
  257. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/plugins/reload.py +0 -0
  258. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/plugins/resolution.py +0 -0
  259. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/plugins/schemas.py +0 -0
  260. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/pr_sync/__init__.py +0 -0
  261. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/pr_sync/queue.py +0 -0
  262. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/pr_sync/service.py +0 -0
  263. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/prompts/__init__.py +0 -0
  264. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/prompts/release_notes_system.md +0 -0
  265. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/prompts/seed.py +0 -0
  266. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/py.typed +0 -0
  267. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/relationships.py +0 -0
  268. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/release_promote/__init__.py +0 -0
  269. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/release_promote/queue.py +0 -0
  270. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/release_promote/service.py +0 -0
  271. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/sbom.py +0 -0
  272. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/scoring/__init__.py +0 -0
  273. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/scoring/queue.py +0 -0
  274. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/secret_broker/audit.py +0 -0
  275. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/secret_broker/broker.py +0 -0
  276. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/secret_broker/identity.py +0 -0
  277. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/secret_broker/providers.py +0 -0
  278. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/secret_broker/schemata.toml +0 -0
  279. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/storage/__init__.py +0 -0
  280. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/storage/client.py +0 -0
  281. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/storage/dependencies.py +0 -0
  282. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/storage/thumbnails.py +0 -0
  283. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/storage/validation.py +0 -0
  284. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/user_document_orgs.py +0 -0
  285. {imbi_api-2.48.0 → imbi_api-2.50.0}/src/imbi/api/workflows/schemata.toml +0 -0
  286. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/__init__.py +0 -0
  287. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/auth/__init__.py +0 -0
  288. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/auth/test_authentication.py +0 -0
  289. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/auth/test_authorization.py +0 -0
  290. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/auth/test_encryption.py +0 -0
  291. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/auth/test_internal_services.py +0 -0
  292. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/auth/test_login_providers.py +0 -0
  293. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/auth/test_membership.py +0 -0
  294. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/auth/test_oauth_server.py +0 -0
  295. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/auth/test_permissions.py +0 -0
  296. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/auth/test_sessions.py +0 -0
  297. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/auth/test_totp.py +0 -0
  298. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/clickhouse/__init__.py +0 -0
  299. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/clickhouse/test_client.py +0 -0
  300. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/clickhouse/test_init.py +0 -0
  301. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/clickhouse/test_privacy.py +0 -0
  302. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/email/__init__.py +0 -0
  303. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/email/test_audit_clickhouse.py +0 -0
  304. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/email/test_client.py +0 -0
  305. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/email/test_init.py +0 -0
  306. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/email/test_integration.py +0 -0
  307. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/email/test_models.py +0 -0
  308. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/email/test_templates.py +0 -0
  309. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/endpoints/__init__.py +0 -0
  310. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/endpoints/test_admin.py +0 -0
  311. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/endpoints/test_admin_plugins.py +0 -0
  312. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/endpoints/test_agent_api.py +0 -0
  313. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/endpoints/test_agent_platform.py +0 -0
  314. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/endpoints/test_agent_task_actions.py +0 -0
  315. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/endpoints/test_agent_task_log.py +0 -0
  316. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/endpoints/test_agent_task_relations.py +0 -0
  317. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/endpoints/test_ai_models.py +0 -0
  318. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/endpoints/test_api_keys.py +0 -0
  319. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/endpoints/test_auth_providers.py +0 -0
  320. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/endpoints/test_blueprints.py +0 -0
  321. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/endpoints/test_client_credentials.py +0 -0
  322. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/endpoints/test_comments.py +0 -0
  323. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/endpoints/test_credentials.py +0 -0
  324. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/endpoints/test_cross_org_reads.py +0 -0
  325. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/endpoints/test_document_analytics.py +0 -0
  326. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/endpoints/test_document_likes.py +0 -0
  327. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/endpoints/test_document_presence.py +0 -0
  328. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/endpoints/test_document_reads.py +0 -0
  329. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/endpoints/test_document_reads_sql.py +0 -0
  330. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/endpoints/test_document_templates.py +0 -0
  331. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/endpoints/test_document_versions.py +0 -0
  332. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/endpoints/test_documents.py +0 -0
  333. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/endpoints/test_environments.py +0 -0
  334. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/endpoints/test_events.py +0 -0
  335. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/endpoints/test_github_app_repository.py +0 -0
  336. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/endpoints/test_graph_query.py +0 -0
  337. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/endpoints/test_harness_egress.py +0 -0
  338. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/endpoints/test_harness_secrets.py +0 -0
  339. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/endpoints/test_iggy_connectors.py +0 -0
  340. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/endpoints/test_init.py +0 -0
  341. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/endpoints/test_integrations.py +0 -0
  342. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/endpoints/test_json_fields.py +0 -0
  343. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/endpoints/test_link_definitions.py +0 -0
  344. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/endpoints/test_local_auth.py +0 -0
  345. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/endpoints/test_mcp_servers.py +0 -0
  346. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/endpoints/test_mfa.py +0 -0
  347. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/endpoints/test_operations_log.py +0 -0
  348. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/endpoints/test_pagination.py +0 -0
  349. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/endpoints/test_plugin_label_validation.py +0 -0
  350. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/endpoints/test_plugins.py +0 -0
  351. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/endpoints/test_project_analysis.py +0 -0
  352. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/endpoints/test_project_commit_sync.py +0 -0
  353. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/endpoints/test_project_deployments_autonomous.py +0 -0
  354. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/endpoints/test_project_incidents.py +0 -0
  355. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/endpoints/test_project_integrations.py +0 -0
  356. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/endpoints/test_project_lifecycle.py +0 -0
  357. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/endpoints/test_project_logs.py +0 -0
  358. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/endpoints/test_project_plugins.py +0 -0
  359. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/endpoints/test_project_response_surfacing.py +0 -0
  360. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/endpoints/test_project_types.py +0 -0
  361. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/endpoints/test_projects_helpers.py +0 -0
  362. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/endpoints/test_prompt_decisions.py +0 -0
  363. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/endpoints/test_prompts.py +0 -0
  364. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/endpoints/test_pull_requests.py +0 -0
  365. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/endpoints/test_request_urls.py +0 -0
  366. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/endpoints/test_roles.py +0 -0
  367. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/endpoints/test_sa_api_keys.py +0 -0
  368. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/endpoints/test_scoring.py +0 -0
  369. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/endpoints/test_scoring_policies.py +0 -0
  370. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/endpoints/test_search.py +0 -0
  371. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/endpoints/test_search_index.py +0 -0
  372. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/endpoints/test_service_accounts.py +0 -0
  373. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/endpoints/test_tags.py +0 -0
  374. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/endpoints/test_teams.py +0 -0
  375. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/endpoints/test_uploads.py +0 -0
  376. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/endpoints/test_user_activity.py +0 -0
  377. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/endpoints/test_users.py +0 -0
  378. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/fixtures/marketplaces/claude-code.json +0 -0
  379. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/fixtures/sbom/npm-realistic.json +0 -0
  380. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/fixtures/sbom/pypi-realistic.json +0 -0
  381. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/fixtures/sbom/tiny.json +0 -0
  382. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/identity/__init__.py +0 -0
  383. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/identity/test_endpoints.py +0 -0
  384. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/identity/test_errors.py +0 -0
  385. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/identity/test_flows.py +0 -0
  386. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/identity/test_host_integration.py +0 -0
  387. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/identity/test_repository.py +0 -0
  388. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/identity/test_resolution.py +0 -0
  389. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/identity/test_state.py +0 -0
  390. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/identity/test_sweeper.py +0 -0
  391. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/middleware/test_rate_limit.py +0 -0
  392. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/secret_support.py +0 -0
  393. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/storage/__init__.py +0 -0
  394. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/storage/test_client.py +0 -0
  395. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/storage/test_init.py +0 -0
  396. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/storage/test_thumbnails.py +0 -0
  397. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/storage/test_validation.py +0 -0
  398. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/test_agent_task_events_e2e.py +0 -0
  399. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/test_ai_provider_tokens.py +0 -0
  400. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/test_assignment_writer.py +0 -0
  401. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/test_auth_settings.py +0 -0
  402. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/test_backfill_embeddings.py +0 -0
  403. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/test_blueprint_attributes.py +0 -0
  404. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/test_blueprint_compliance.py +0 -0
  405. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/test_blueprints.py +0 -0
  406. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/test_commit_sync_service.py +0 -0
  407. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/test_deployment_status_repair.py +0 -0
  408. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/test_deployment_sweeper.py +0 -0
  409. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/test_deployment_sync_service.py +0 -0
  410. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/test_entrypoint.py +0 -0
  411. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/test_graph_ids.py +0 -0
  412. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/test_graph_sql.py +0 -0
  413. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/test_identity_attribution.py +0 -0
  414. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/test_iggy_metrics.py +0 -0
  415. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/test_init.py +0 -0
  416. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/test_installer.py +0 -0
  417. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/test_lifespans.py +0 -0
  418. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/test_maintenance_log.py +0 -0
  419. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/test_maintenance_state.py +0 -0
  420. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/test_models.py +0 -0
  421. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/test_orphan_releases.py +0 -0
  422. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/test_plugin_schemas.py +0 -0
  423. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/test_plugins.py +0 -0
  424. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/test_plugins_assignments.py +0 -0
  425. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/test_plugins_credentials.py +0 -0
  426. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/test_pr_sync_queue.py +0 -0
  427. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/test_pr_sync_service.py +0 -0
  428. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/test_prompt_seed.py +0 -0
  429. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/test_pull_request_resync_clickhouse.py +0 -0
  430. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/test_pull_request_reviews_clickhouse.py +0 -0
  431. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/test_pull_requests_pending_deploy.py +0 -0
  432. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/test_release_dispatch.py +0 -0
  433. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/test_release_promote_service.py +0 -0
  434. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/test_sbom.py +0 -0
  435. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/test_scoring_queue.py +0 -0
  436. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/test_scoring_triggers.py +0 -0
  437. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/test_secret_broker.py +0 -0
  438. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/test_secret_identity.py +0 -0
  439. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/test_secret_providers.py +0 -0
  440. {imbi_api-2.48.0 → imbi_api-2.50.0}/tests/test_settings.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: imbi-api
3
- Version: 2.48.0
3
+ Version: 2.50.0
4
4
  Summary: Imbi is a DevOps Service Management Platform designed to provide an efficient way to manage a large environment that contains many services and applications.
5
5
  Author-email: Alex Campbell <alexc@aweber.com>, Dave Shawley <daves@aweber.com>, "Gavin M. Roy" <gavinr@aweber.com>
6
6
  License-Expression: BSD-3-Clause
@@ -20,9 +20,10 @@ Requires-Dist: fastapi
20
20
  Requires-Dist: filetype
21
21
  Requires-Dist: httpx<1,>=0.28.1
22
22
  Requires-Dist: idna>=3.18
23
- Requires-Dist: imbi-common[databases,llm,mcp,sentry,server]==2.48.0
23
+ Requires-Dist: imbi-common[databases,llm,mcp,sentry,server]==2.50.0
24
24
  Requires-Dist: jinja2
25
25
  Requires-Dist: jsonpatch>=1.33
26
+ Requires-Dist: jsonschema>=4.26
26
27
  Requires-Dist: limits<6,>=5
27
28
  Requires-Dist: mcp>=1.26.0
28
29
  Requires-Dist: nanoid>=2.0.0
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "imbi-api"
3
- version = "2.48.0"
3
+ version = "2.50.0"
4
4
  description = "Imbi is a DevOps Service Management Platform designed to provide an efficient way to manage a large environment that contains many services and applications."
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.14"
@@ -29,9 +29,10 @@ dependencies = [
29
29
  "filetype",
30
30
  "httpx>=0.28.1,<1",
31
31
  "idna>=3.18",
32
- "imbi-common[databases,llm,mcp,sentry,server]==2.48.0",
32
+ "imbi-common[databases,llm,mcp,sentry,server]==2.50.0",
33
33
  "jinja2",
34
34
  "jsonpatch>=1.33",
35
+ "jsonschema>=4.26",
35
36
  "limits>=5,<6",
36
37
  "mcp>=1.26.0",
37
38
  "nanoid>=2.0.0",
@@ -58,6 +58,7 @@ async def initialize() -> None:
58
58
  relational.load_schemata(SCHEMATA_PATH),
59
59
  f'imbi.api.initialize.{SCHEMA}',
60
60
  )
61
+ await relational.initialize_deleted_organizations()
61
62
 
62
63
 
63
64
  def create_pool() -> Pool:
@@ -60,7 +60,7 @@ _EVENT_COUNTS_QUERY = """
60
60
  SELECT task_id, uniqExact(seq) AS events, max(seq) AS max_seq
61
61
  FROM imbi.agent_task_events
62
62
  WHERE organization_id = {organization_id:String}
63
- AND task_id IN {task_ids:Array(String)}
63
+ AND task_id IN (SELECT id FROM task_ids)
64
64
  GROUP BY task_id
65
65
  """
66
66
 
@@ -68,7 +68,7 @@ _USAGE_COUNTS_QUERY = """
68
68
  SELECT task_id, uniqExact(report_id) AS reports
69
69
  FROM imbi.agent_usage
70
70
  WHERE organization_id = {organization_id:String}
71
- AND task_id IN {task_ids:Array(String)}
71
+ AND task_id IN (SELECT id FROM task_ids)
72
72
  GROUP BY task_id
73
73
  """
74
74
 
@@ -272,7 +272,8 @@ async def event_counts(
272
272
  """Return ``(distinct seqs, max seq)`` in ClickHouse, by task id."""
273
273
  rows = await clickhouse.query(
274
274
  _EVENT_COUNTS_QUERY,
275
- {'organization_id': organization_id, 'task_ids': task_ids},
275
+ {'organization_id': organization_id},
276
+ tables={'task_ids': task_ids},
276
277
  )
277
278
  return {
278
279
  row['task_id']: (int(row['events']), int(row['max_seq']))
@@ -286,7 +287,8 @@ async def usage_counts(
286
287
  """Return the number of distinct usage reports in ClickHouse."""
287
288
  rows = await clickhouse.query(
288
289
  _USAGE_COUNTS_QUERY,
289
- {'organization_id': organization_id, 'task_ids': task_ids},
290
+ {'organization_id': organization_id},
291
+ tables={'task_ids': task_ids},
290
292
  )
291
293
  return {row['task_id']: int(row['reports']) for row in rows}
292
294
 
@@ -68,6 +68,10 @@ platform_config_version = "INTEGER"
68
68
  # the email of that person. The dashboard does not show it then.
69
69
  acknowledged_at = "TIMESTAMP WITH TIME ZONE"
70
70
  acknowledged_by = "TEXT"
71
+ # The JSON Schema of the structured output that the agent must return,
72
+ # and the output that it returned. NULL when the task asks for none.
73
+ output_schema = "JSONB"
74
+ structured_output = "JSONB"
71
75
 
72
76
  [tables.primary_key]
73
77
  columns = ["id"]
@@ -292,3 +296,17 @@ added_at = "TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW()"
292
296
 
293
297
  [tables.primary_key]
294
298
  columns = ["organization_id", "task_id", "project_id"]
299
+
300
+ # One row per closed task whose workflow `task_completed` triggers have
301
+ # not all started their runs. The transaction that closes the task
302
+ # writes the row. The trigger deletes it after it starts the runs; the
303
+ # workflow sweep calls the trigger again for each row that stays.
304
+ [[tables]]
305
+ name = "trigger_outbox"
306
+
307
+ [tables.columns]
308
+ task_id = "UUID NOT NULL REFERENCES agent_runtime.tasks (id) ON DELETE CASCADE"
309
+ created_at = "TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW()"
310
+
311
+ [tables.primary_key]
312
+ columns = ["task_id"]
@@ -33,6 +33,8 @@ from psycopg import rows, sql
33
33
  from psycopg.types import json as pg_json
34
34
 
35
35
  from imbi.api.agent_tasks import log
36
+ from imbi.common import relational
37
+ from imbi.common.workflows.registry import agent as agent_step
36
38
 
37
39
  type Pool = psycopg_pool.AsyncConnectionPool[
38
40
  psycopg.AsyncConnection[typing.Any]
@@ -63,7 +65,7 @@ def unregister_close_hook(hook: CloseHook) -> None:
63
65
  _close_hooks.remove(hook)
64
66
 
65
67
 
66
- async def _run_close_hooks(task: Row) -> None:
68
+ async def run_close_hooks(task: Row) -> None:
67
69
  """Call every close hook. A failure is logged; the task stays
68
70
  closed."""
69
71
  for hook in list(_close_hooks):
@@ -82,24 +84,7 @@ Status = typing.Literal['queued', 'running', 'blocked', 'paused', 'closed']
82
84
  Control = typing.Literal['run', 'pause', 'cancel']
83
85
  ActorKind = typing.Literal['human', 'agent', 'subagent', 'system']
84
86
  Channel = typing.Literal['web', 'slack', 'mcp', 'api', 'harness']
85
- #: The closed F5 set of terminal outcomes.
86
- Outcome = typing.Literal[
87
- 'done_acted',
88
- 'done_nothing_to_act_on',
89
- 'no_reason_to_run',
90
- 'partial_capped',
91
- 'suppressed_duplicate',
92
- 'superseded',
93
- 'cancelled_by_human',
94
- 'interrupted_by_operator',
95
- 'failed_at_gate',
96
- 'failed_external',
97
- 'unmapped_subject',
98
- 'exceeded_ceiling',
99
- 'unhandled_no_actor',
100
- 'request_expired',
101
- 'refused_rate_ceiling',
102
- ]
87
+ Outcome = agent_step.Outcome
103
88
 
104
89
  #: The open requests of the task ``t`` that a person can still resolve.
105
90
  #: A task that is not closed and has one waits on a person (O1), also
@@ -247,6 +232,9 @@ class NewTask:
247
232
  #: The root task of the chain of a child task. ``None`` makes the
248
233
  #: task the root of its own chain.
249
234
  chain_id: uuid.UUID | None = None
235
+ #: The JSON Schema of the structured output that the agent must
236
+ #: return. ``None``: the task asks for none.
237
+ output_schema: Row | None = None
250
238
 
251
239
 
252
240
  @dataclasses.dataclass(frozen=True)
@@ -379,8 +367,19 @@ class _Write:
379
367
  return row
380
368
 
381
369
  async def update(self, changes: Row) -> Row:
382
- """Change columns of the task and keep the new row."""
370
+ """Change columns of the task and keep the new row.
371
+
372
+ A change that closes the task also writes its ``trigger_outbox``
373
+ row, so its ``task_completed`` runs start even when the close
374
+ hook fails.
375
+ """
383
376
  self.task = await _update_task(self.conn, self.task['id'], changes)
377
+ if changes.get('status') == 'closed':
378
+ await self.conn.execute(
379
+ 'INSERT INTO agent_runtime.trigger_outbox (task_id)'
380
+ ' VALUES (%s)',
381
+ (self.task['id'],),
382
+ )
384
383
  return self.task
385
384
 
386
385
 
@@ -449,7 +448,7 @@ class TaskStore:
449
448
  await log.publish(write.task, write.events, write.ledger)
450
449
  # The lock refuses a closed task, so this write closed it.
451
450
  if write.task['status'] == 'closed':
452
- await _run_close_hooks(write.task)
451
+ await run_close_hooks(write.task)
453
452
 
454
453
  async def move_legacy_projects(self) -> int:
455
454
  """Move the old single project of each task (``tasks.project_id``)
@@ -504,6 +503,9 @@ class TaskStore:
504
503
  task_id = uuid.uuid4()
505
504
  try:
506
505
  async with self._pool.connection() as conn, conn.transaction():
506
+ await relational.lock_organization_shared(
507
+ conn, task.organization_id
508
+ )
507
509
  if task.origin_kind == 'task':
508
510
  # The lock conflicts with the lock in delete, so a
509
511
  # parent cannot go while its child is made.
@@ -521,9 +523,9 @@ class TaskStore:
521
523
  ' service_account_id, title,'
522
524
  ' description, origin_kind, origin_id, origin,'
523
525
  ' idempotency_key, owner, budget, chain_id,'
524
- ' platform_config_version) VALUES (%s,'
526
+ ' output_schema, platform_config_version) VALUES (%s,'
525
527
  ' %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s,'
526
- ' %s, %s, %s, (SELECT max(version)'
528
+ ' %s, %s, %s, %s, (SELECT max(version)'
527
529
  ' FROM harness.platform_configs'
528
530
  ' WHERE organization_id = %s))',
529
531
  (
@@ -543,6 +545,7 @@ class TaskStore:
543
545
  task.owner,
544
546
  task.budget,
545
547
  task.chain_id or task_id,
548
+ _jsonb(task.output_schema),
546
549
  task.organization_id,
547
550
  ),
548
551
  )
@@ -617,6 +620,16 @@ class TaskStore:
617
620
  (organization_id, short_id),
618
621
  )
619
622
 
623
+ async def chain_root(self, task: Row) -> Row | None:
624
+ """Return the root task of the chain of ``task`` (ADR 0022)."""
625
+ chain_id = task['chain_id'] or task['id']
626
+ if chain_id == task['id']:
627
+ return task
628
+ async with self._pool.connection() as conn:
629
+ return await _fetch_one(
630
+ conn, _SELECT_TASKS + ' WHERE t.id = %s', (chain_id,)
631
+ )
632
+
620
633
  async def search(
621
634
  self,
622
635
  organization_id: str,
@@ -746,6 +759,26 @@ class TaskStore:
746
759
  return await log.last_archived_agent_turn(task)
747
760
  return None if body is None else str(body)
748
761
 
762
+ async def pending_triggers(self) -> list[Row]:
763
+ """Return the closed tasks that have a ``trigger_outbox`` row."""
764
+ async with (
765
+ self._pool.connection() as conn,
766
+ conn.cursor(row_factory=rows.dict_row) as cursor,
767
+ ):
768
+ await cursor.execute(
769
+ _SELECT_TASKS + ' JOIN agent_runtime.trigger_outbox AS o'
770
+ ' ON o.task_id = t.id ORDER BY o.created_at'
771
+ )
772
+ return await cursor.fetchall()
773
+
774
+ async def triggers_started(self, task_id: uuid.UUID) -> None:
775
+ """Delete the ``trigger_outbox`` row of a task."""
776
+ async with self._pool.connection() as conn:
777
+ await conn.execute(
778
+ 'DELETE FROM agent_runtime.trigger_outbox WHERE task_id = %s',
779
+ (task_id,),
780
+ )
781
+
749
782
  async def unarchived(self) -> list[Row]:
750
783
  """Return the tasks whose log is not archived, by organization.
751
784
 
@@ -832,7 +865,8 @@ class TaskStore:
832
865
  TaskNotFound: No such task.
833
866
  TaskOpen: The task, or a child or chain task, is not closed,
834
867
  the log of the task is not archived, its harness chain
835
- is not done, or it has open secret resolutions.
868
+ is not done, it has open secret resolutions, or it or a
869
+ task in its chain has a ``trigger_outbox`` row.
836
870
 
837
871
  """
838
872
  async with self._pool.connection() as conn, conn.transaction():
@@ -863,14 +897,19 @@ class TaskStore:
863
897
  raise TaskOpen(short_id)
864
898
  # The lease sweep still needs the chain row of a root that
865
899
  # waits for its fencers, and Broker.sweep joins the open
866
- # resolutions of a failed close hook to the task.
900
+ # resolutions of a failed close hook to the task. A pending
901
+ # trigger_outbox row of the task, or of a task in the chain
902
+ # of a root, needs the root for its depth (task_trigger).
867
903
  cursor = await conn.execute(
868
904
  'SELECT 1 FROM harness.chains WHERE root_task_id = %s'
869
905
  " AND state IN ('running', 'fencing', 'stuck')"
870
906
  ' UNION ALL SELECT 1 FROM secrets.resolutions'
871
907
  " WHERE task_id = %s AND state IN ('pending', 'active')"
908
+ ' UNION ALL SELECT 1 FROM agent_runtime.trigger_outbox AS o'
909
+ ' JOIN agent_runtime.tasks AS c ON c.id = o.task_id'
910
+ ' WHERE c.id = %s OR c.chain_id = %s'
872
911
  ' LIMIT 1',
873
- (task['id'], task['id']),
912
+ (task['id'], task['id'], task['id'], task['id']),
874
913
  )
875
914
  if await cursor.fetchone() is not None:
876
915
  raise TaskOpen(short_id)
@@ -1855,9 +1894,12 @@ class TaskStore:
1855
1894
  outcome: Outcome,
1856
1895
  reason: str | None,
1857
1896
  actor: Actor,
1897
+ structured_output: Row | None = None,
1858
1898
  ) -> Row:
1859
1899
  """Close the task with ``outcome``; see :func:`_close`.
1860
1900
 
1901
+ Keep the ``structured_output`` that the agent returned, if any.
1902
+
1861
1903
  Raises:
1862
1904
  TaskNotFound: No such task.
1863
1905
  TaskClosed: The task is closed.
@@ -1865,6 +1907,10 @@ class TaskStore:
1865
1907
  """
1866
1908
  async with self._write(organization_id, short_id) as write:
1867
1909
  await _close(write, outcome, reason, actor)
1910
+ if structured_output is not None:
1911
+ await write.update(
1912
+ {'structured_output': _jsonb(structured_output)}
1913
+ )
1868
1914
  return write.task
1869
1915
 
1870
1916
 
@@ -13,6 +13,11 @@ the response or to the cache. The catalog is kept in Valkey for
13
13
 
14
14
  A tool key is ``imbi.<tool name>``. An agent stores its tool
15
15
  configuration by this key.
16
+
17
+ The catalog also lists the opt-in Claude Code built-in tools in
18
+ ``builtin_tools``, as ``builtin.<tool name>``. They are off for each
19
+ agent until its tool map has the key. They do not come from the
20
+ OpenAPI document, so a catalog error does not change them.
16
21
  """
17
22
 
18
23
  import asyncio
@@ -28,6 +33,7 @@ from mcp import types as mcp_types
28
33
  from valkey import asyncio as valkey
29
34
 
30
35
  from imbi.common import mcp as common_mcp
36
+ from imbi.common import models
31
37
 
32
38
  LOGGER = logging.getLogger(__name__)
33
39
 
@@ -45,19 +51,37 @@ ErrorCode = typing.Literal['unreachable', 'timeout', 'auth_failed']
45
51
 
46
52
 
47
53
  class AgentCatalogTool(pydantic.BaseModel):
48
- #: ``imbi.<tool name>``.
54
+ #: ``imbi.<tool name>`` or ``builtin.<tool name>``.
49
55
  key: str
50
56
  name: str
51
57
  description: str | None = None
52
58
  capability: Capability
53
59
 
54
60
 
61
+ #: The catalog entries of the opt-in built-in tools, by name.
62
+ BUILTIN_CATALOG = tuple(
63
+ AgentCatalogTool(
64
+ key=tool.key,
65
+ name=tool.name,
66
+ description=tool.description,
67
+ capability=tool.capability,
68
+ )
69
+ for tool in sorted(
70
+ models.OPT_IN_BUILTIN_TOOLS.values(), key=lambda t: t.name
71
+ )
72
+ )
73
+
74
+
55
75
  class AgentToolCatalog(pydantic.BaseModel):
56
76
  #: A kept copy in another form, for example the grouped form of an
57
77
  #: earlier release, does not validate, so it is listed again.
58
78
  model_config = pydantic.ConfigDict(extra='forbid')
59
79
 
60
80
  tools: list[AgentCatalogTool] = []
81
+ #: The opt-in Claude Code built-in tools.
82
+ builtin_tools: list[AgentCatalogTool] = pydantic.Field(
83
+ default_factory=lambda: list(BUILTIN_CATALOG)
84
+ )
61
85
  #: Set when the tools could not be listed.
62
86
  error: ErrorCode | None = None
63
87
  generated_at: datetime.datetime
@@ -189,7 +213,11 @@ async def get_catalog(
189
213
  cached = None
190
214
  if cached is not None:
191
215
  try:
192
- return AgentToolCatalog.model_validate_json(cached)
216
+ # The built-in tools come from this release, not the
217
+ # kept copy.
218
+ return AgentToolCatalog.model_validate_json(cached).model_copy(
219
+ update={'builtin_tools': list(BUILTIN_CATALOG)}
220
+ )
193
221
  except pydantic.ValidationError:
194
222
  LOGGER.debug('discarding malformed tool catalog cache entry')
195
223
  catalog = await build_catalog(spec())
@@ -1,6 +1,9 @@
1
1
  import logging
2
+ import math
3
+ import time
2
4
 
3
5
  import fastapi
6
+ import httpx
4
7
  from fastapi import responses
5
8
  from fastapi.middleware import cors
6
9
  from uvicorn.middleware import proxy_headers
@@ -11,6 +14,7 @@ from imbi.api import (
11
14
  harness,
12
15
  lifespans,
13
16
  openapi,
17
+ plugins,
14
18
  secret_broker,
15
19
  settings,
16
20
  version,
@@ -20,10 +24,12 @@ from imbi.api.auth import agent_api
20
24
  from imbi.api.middleware import rate_limit
21
25
  from imbi.common import (
22
26
  access_log,
27
+ body_limit,
23
28
  graph,
24
29
  lifespan,
25
30
  metrics,
26
31
  posthog,
32
+ relational,
27
33
  sentry,
28
34
  valkey,
29
35
  )
@@ -31,6 +37,8 @@ from imbi.common.auth import permissions as common_permissions
31
37
  from imbi.common.plugins.errors import (
32
38
  PluginCredentialsMissing,
33
39
  PluginInstallationMissing,
40
+ PluginRateLimited,
41
+ PluginUnavailableError,
34
42
  )
35
43
  from imbi.common.prompts import pool as prompt_pool
36
44
 
@@ -80,6 +88,17 @@ def create_app() -> fastapi.FastAPI:
80
88
  )
81
89
 
82
90
  server_config = settings.get_server_config()
91
+ # Innermost, so that CORS and the access log wrap its 413. The
92
+ # upload limit adds room for the multipart framing.
93
+ app.add_middleware(
94
+ body_limit.BodyLimitMiddleware,
95
+ limit=server_config.max_request_body_bytes,
96
+ path_limits={
97
+ f'{server_config.api_prefix}/uploads': (
98
+ settings.get_storage_settings().max_file_size + 1024 * 1024
99
+ )
100
+ },
101
+ )
83
102
  # Quiet both the unprefixed and ``/api``-prefixed status route
84
103
  # because the served path depends on IMBI_API_URL at startup;
85
104
  # listing both keeps the middleware deployment-agnostic.
@@ -124,19 +143,21 @@ def create_app() -> fastapi.FastAPI:
124
143
  # on the repository. A terminal 403 rather than a 5xx: consuming
125
144
  # clients retry 5xx on the assumption that it is transient, and an
126
145
  # uninstalled App will still be uninstalled on the retry. The
127
- # discriminated ``detail.error`` is what an autonomous caller
128
- # branches on so it can log the cause instead of spinning.
146
+ # discriminated ``detail.error`` (``app_not_installed``, or
147
+ # ``identity_access_denied`` for a user identity with no grant) is
148
+ # what an autonomous caller branches on so it can log the cause
149
+ # instead of spinning.
129
150
  @app.exception_handler(PluginInstallationMissing)
130
151
  async def _plugin_installation_missing( # pyright: ignore[reportUnusedFunction]
131
152
  _request: fastapi.Request,
132
153
  exc: PluginInstallationMissing,
133
154
  ) -> responses.JSONResponse:
134
- LOGGER.warning('Plugin installation missing: %s', exc)
155
+ LOGGER.warning('Plugin grant missing (%s): %s', exc.error_code, exc)
135
156
  return responses.JSONResponse(
136
157
  status_code=403,
137
158
  content={
138
159
  'detail': {
139
- 'error': 'app_not_installed',
160
+ 'error': exc.error_code,
140
161
  'message': str(exc),
141
162
  'owner_repo': exc.owner_repo,
142
163
  'integration_slug': exc.integration_slug,
@@ -144,6 +165,84 @@ def create_app() -> fastapi.FastAPI:
144
165
  },
145
166
  )
146
167
 
168
+ # An upstream host (GitHub, AWS, ...) refused a plugin call and the
169
+ # endpoint did not map the refusal itself. Answer with the nearest
170
+ # status instead of a 500: the request or ref is bad (422), the
171
+ # credential has no access (403), the host rate limits us (503 with
172
+ # Retry-After), or the host failed (502).
173
+ @app.exception_handler(httpx.HTTPStatusError)
174
+ async def _upstream_status_error( # pyright: ignore[reportUnusedFunction]
175
+ _request: fastapi.Request,
176
+ exc: httpx.HTTPStatusError,
177
+ ) -> responses.JSONResponse:
178
+ upstream = exc.response.status_code
179
+ LOGGER.warning(
180
+ 'Upstream %s %s answered HTTP %s',
181
+ exc.request.method,
182
+ exc.request.url,
183
+ upstream,
184
+ )
185
+ headers: dict[str, str] = {}
186
+ rate_limited = upstream == 429 or (
187
+ upstream == 403
188
+ and (
189
+ exc.response.headers.get('x-ratelimit-remaining') == '0'
190
+ or 'retry-after' in exc.response.headers
191
+ )
192
+ )
193
+ if upstream in (404, 422):
194
+ status = 422
195
+ elif rate_limited:
196
+ status = 503
197
+ headers['Retry-After'] = plugins.host_retry_after(exc.response)
198
+ elif upstream == 403:
199
+ status = 403
200
+ else:
201
+ status = 502
202
+ return responses.JSONResponse(
203
+ status_code=status,
204
+ content={
205
+ 'detail': f'The upstream service answered HTTP {upstream}'
206
+ },
207
+ headers=headers,
208
+ )
209
+
210
+ # The endpoint found the organization, but a delete committed before
211
+ # the store write took its lock (relational.lock_organization_shared).
212
+ @app.exception_handler(relational.OrganizationDeleted)
213
+ async def _organization_deleted( # pyright: ignore[reportUnusedFunction]
214
+ _request: fastapi.Request,
215
+ exc: relational.OrganizationDeleted,
216
+ ) -> responses.JSONResponse:
217
+ return responses.JSONResponse(
218
+ status_code=404, content={'detail': str(exc)}
219
+ )
220
+
221
+ @app.exception_handler(PluginUnavailableError)
222
+ async def _plugin_unavailable( # pyright: ignore[reportUnusedFunction]
223
+ _request: fastapi.Request,
224
+ exc: PluginUnavailableError,
225
+ ) -> responses.JSONResponse:
226
+ LOGGER.warning('Plugin unavailable: %s', exc)
227
+ return responses.JSONResponse(
228
+ status_code=503,
229
+ content={'detail': str(exc)},
230
+ headers={'Retry-After': '5'},
231
+ )
232
+
233
+ @app.exception_handler(PluginRateLimited)
234
+ async def _plugin_rate_limited( # pyright: ignore[reportUnusedFunction]
235
+ _request: fastapi.Request,
236
+ exc: PluginRateLimited,
237
+ ) -> responses.JSONResponse:
238
+ LOGGER.warning('Plugin rate limited: %s', exc)
239
+ wait = max(1, math.ceil(exc.retry_at - time.time()))
240
+ return responses.JSONResponse(
241
+ status_code=503,
242
+ content={'detail': str(exc)},
243
+ headers={'Retry-After': str(wait)},
244
+ )
245
+
147
246
  # Phase 5: Setup rate limiting middleware
148
247
  rate_limit.setup_rate_limiting(app)
149
248
 
@@ -82,6 +82,7 @@ GLOBAL_SAFE: dict[str, str] = {
82
82
  'GET /blueprints/': 'global schema configuration',
83
83
  'GET /blueprints/{type}': 'global schema configuration',
84
84
  'GET /blueprints/{type}/{slug}': 'global schema configuration',
85
+ 'GET /cves/{cve_id}': 'a public CVE List record: no organization data',
85
86
  'GET /scoring/policies/': 'global scoring configuration',
86
87
  'GET /scoring/policies/{slug}': 'global scoring configuration',
87
88
  'GET /plugins/{slug}/manifest': 'a plugin manifest: no organization data',
@@ -33,6 +33,7 @@ ALLOWED_ROUTES: frozenset[str] = frozenset(
33
33
  'GET /blueprints/',
34
34
  'GET /blueprints/{type}',
35
35
  'GET /blueprints/{type}/{slug}',
36
+ 'GET /cves/{cve_id}',
36
37
  'GET /operations-log/plugin-templates',
37
38
  'GET /organizations/{org_slug}/agent-marketplaces/',
38
39
  'GET /organizations/{org_slug}/agent-platform-config/',
@@ -133,6 +134,7 @@ ALLOWED_ROUTES: frozenset[str] = frozenset(
133
134
  'GET /organizations/{org_slug}/webhooks/',
134
135
  'GET /organizations/{org_slug}/webhooks/{webhook}',
135
136
  'GET /organizations/{org_slug}/workflow-runs/attention',
137
+ 'GET /organizations/{org_slug}/workflow-runs/side-effects',
136
138
  'GET /organizations/{org_slug}/workflow-step-types/',
137
139
  'GET /organizations/{org_slug}/workflows/',
138
140
  'GET /organizations/{org_slug}/workflows/{slug}',
@@ -294,6 +296,8 @@ REFUSED_ROUTES: frozenset[str] = frozenset(
294
296
  'POST /organizations/{org_slug}/workflows/{slug}/runs/{run_id}/steps/{node_id}/agent-task',
295
297
  'POST /organizations/{org_slug}/workflows/{slug}/runs/{run_id}/steps/{node_id}/agent-task/cancel',
296
298
  'POST /organizations/{org_slug}/workflows/{slug}/runs/{run_id}/steps/{node_id}/email',
299
+ 'GET /organizations/{org_slug}/workflow-runs/side-effects/deployments',
300
+ 'POST /organizations/{org_slug}/workflow-runs/side-effects/resolve',
297
301
  'POST /organizations/{org_slug}/workflows/{slug}/test-runs',
298
302
  'PUT /organizations/{org_slug}/workflows/{slug}',
299
303
  # Global configuration writes: they change every organization (and are also governance). Component and component release status and advisories are global marks by design.
@@ -153,6 +153,7 @@ async def require_organization_membership(
153
153
  ['slug'],
154
154
  )
155
155
  if rows:
156
+ await _require_accountable_member(db, auth, org_slug)
156
157
  return
157
158
  LOGGER.warning(
158
159
  'Refusing principal %s on organization %s: not a member',
@@ -169,6 +170,39 @@ async def require_organization_membership(
169
170
  )
170
171
 
171
172
 
173
+ async def _require_accountable_member(
174
+ db: graph.Graph, auth: permissions.AuthContext, org_slug: str
175
+ ) -> None:
176
+ """Refuse a scheduler request whose accountable principal is not a
177
+ member of ``org_slug``.
178
+
179
+ Without this, a person could reach an organization through the
180
+ memberships of the scheduler's service account. A member with a role
181
+ that grants nothing is refused too, which fails closed.
182
+ """
183
+ if auth.on_behalf_of is None:
184
+ return
185
+ if await permissions.load_principal_permissions(
186
+ db, *auth.on_behalf_of, org_slug=org_slug
187
+ ):
188
+ return
189
+ key = auth.on_behalf_of[2]
190
+ LOGGER.warning(
191
+ 'Refusing a scheduled task request on organization %s: %s, '
192
+ 'accountable for it, is not a member',
193
+ org_slug,
194
+ key,
195
+ )
196
+ raise forbidden(
197
+ 'organization_forbidden',
198
+ (
199
+ f'{key!r}, accountable for this scheduled task, is not a '
200
+ f'member of organization {org_slug!r}.'
201
+ ),
202
+ org_slug=org_slug,
203
+ )
204
+
205
+
172
206
  def require_environment_autonomous(
173
207
  auth: permissions.AuthContext,
174
208
  *,