imbi-api 2.54.0__tar.gz → 2.55.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 (447) hide show
  1. {imbi_api-2.54.0 → imbi_api-2.55.0}/PKG-INFO +2 -2
  2. {imbi_api-2.54.0 → imbi_api-2.55.0}/pyproject.toml +2 -2
  3. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/endpoints/tickets.py +4 -1
  4. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/endpoints/workflow_runs.py +126 -41
  5. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/lifespans.py +5 -0
  6. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/tickets/store.py +39 -10
  7. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/workflows/__init__.py +9 -2
  8. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/workflows/ticket_trigger.py +23 -9
  9. imbi_api-2.55.0/src/imbi/api/workflows/tickets.py +77 -0
  10. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/endpoints/test_agent_task_harness.py +3 -3
  11. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/endpoints/test_agent_task_log.py +1 -1
  12. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/endpoints/test_agent_task_relations.py +3 -2
  13. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/endpoints/test_agent_tasks.py +25 -5
  14. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/endpoints/test_harness.py +17 -0
  15. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/endpoints/test_workflow_run_history.py +114 -0
  16. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/endpoints/test_workflow_runs.py +320 -4
  17. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/test_task_trigger.py +26 -3
  18. imbi_api-2.55.0/tests/test_workflow_tickets.py +48 -0
  19. {imbi_api-2.54.0 → imbi_api-2.55.0}/.gitignore +0 -0
  20. {imbi_api-2.54.0 → imbi_api-2.55.0}/README.md +0 -0
  21. {imbi_api-2.54.0 → imbi_api-2.55.0}/moon.yml +0 -0
  22. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/README.md +0 -0
  23. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/__init__.py +0 -0
  24. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/agent_tools.py +0 -0
  25. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/app.py +0 -0
  26. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/auth/__init__.py +0 -0
  27. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/auth/agent_api.py +0 -0
  28. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/auth/agent_api_routes.py +0 -0
  29. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/auth/authorization_codes.py +0 -0
  30. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/auth/autonomous.py +0 -0
  31. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/auth/internal_services.py +0 -0
  32. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/auth/local_auth.py +0 -0
  33. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/auth/login_providers.py +0 -0
  34. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/auth/membership.py +0 -0
  35. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/auth/models.py +0 -0
  36. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/auth/oauth_clients.py +0 -0
  37. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/auth/organizations.py +0 -0
  38. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/auth/password.py +0 -0
  39. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/auth/permissions.py +0 -0
  40. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/auth/principals.py +0 -0
  41. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/auth/seed.py +0 -0
  42. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/auth/sessions.py +0 -0
  43. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/auth/tokens.py +0 -0
  44. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/auth/totp.py +0 -0
  45. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/backfill_embeddings.py +0 -0
  46. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/blueprint_attributes.py +0 -0
  47. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/blueprint_compliance.py +0 -0
  48. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/commit_pushed_at_repair.py +0 -0
  49. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/commit_sync/__init__.py +0 -0
  50. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/commit_sync/queue.py +0 -0
  51. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/commit_sync/service.py +0 -0
  52. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/component_facts.py +0 -0
  53. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/cves.py +0 -0
  54. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/deployment_status_repair.py +0 -0
  55. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/deployment_sweeper.py +0 -0
  56. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/deployment_sync/__init__.py +0 -0
  57. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/deployment_sync/queue.py +0 -0
  58. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/deployment_sync/service.py +0 -0
  59. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/documents/__init__.py +0 -0
  60. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/documents/read_sweeper.py +0 -0
  61. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/domain/__init__.py +0 -0
  62. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/domain/models.py +0 -0
  63. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/domain/scoring.py +0 -0
  64. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/drift.py +0 -0
  65. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/email/__init__.py +0 -0
  66. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/email/client.py +0 -0
  67. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/email/dependencies.py +0 -0
  68. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/email/models.py +0 -0
  69. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/email/templates/base.html +0 -0
  70. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/email/templates/base.txt +0 -0
  71. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/email/templates/password_reset.html +0 -0
  72. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/email/templates/password_reset.txt +0 -0
  73. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/email/templates/welcome.html +0 -0
  74. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/email/templates/welcome.txt +0 -0
  75. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/email/templates.py +0 -0
  76. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/endpoints/__init__.py +0 -0
  77. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/endpoints/_credentials.py +0 -0
  78. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/endpoints/_document_events.py +0 -0
  79. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/endpoints/_document_history.py +0 -0
  80. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/endpoints/_document_reads.py +0 -0
  81. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/endpoints/_document_scope.py +0 -0
  82. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/endpoints/_helpers.py +0 -0
  83. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/endpoints/_json_fields.py +0 -0
  84. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/endpoints/_local_time.py +0 -0
  85. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/endpoints/_pagination.py +0 -0
  86. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/endpoints/_request_urls.py +0 -0
  87. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/endpoints/_search_index.py +0 -0
  88. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/endpoints/admin.py +0 -0
  89. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/endpoints/admin_plugins.py +0 -0
  90. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/endpoints/agent_platform.py +0 -0
  91. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/endpoints/agent_usage.py +0 -0
  92. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/endpoints/agents.py +0 -0
  93. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/endpoints/ai_models.py +0 -0
  94. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/endpoints/ai_providers.py +0 -0
  95. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/endpoints/api_keys.py +0 -0
  96. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/endpoints/auth.py +0 -0
  97. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/endpoints/auth_providers.py +0 -0
  98. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/endpoints/blueprints.py +0 -0
  99. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/endpoints/client_credentials.py +0 -0
  100. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/endpoints/comments.py +0 -0
  101. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/endpoints/components.py +0 -0
  102. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/endpoints/cves.py +0 -0
  103. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/endpoints/dashboard.py +0 -0
  104. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/endpoints/document_analytics.py +0 -0
  105. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/endpoints/document_likes.py +0 -0
  106. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/endpoints/document_presence.py +0 -0
  107. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/endpoints/document_templates.py +0 -0
  108. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/endpoints/document_versions.py +0 -0
  109. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/endpoints/documents.py +0 -0
  110. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/endpoints/environments.py +0 -0
  111. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/endpoints/events.py +0 -0
  112. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/endpoints/graph_query.py +0 -0
  113. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/endpoints/harness.py +0 -0
  114. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/endpoints/iggy_connectors.py +0 -0
  115. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/endpoints/integrations.py +0 -0
  116. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/endpoints/link_definitions.py +0 -0
  117. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/endpoints/local_auth.py +0 -0
  118. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/endpoints/maintenance.py +0 -0
  119. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/endpoints/mcp_servers.py +0 -0
  120. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/endpoints/mfa.py +0 -0
  121. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/endpoints/oauth_metadata.py +0 -0
  122. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/endpoints/operations_log.py +0 -0
  123. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/endpoints/organizations.py +0 -0
  124. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/endpoints/plugin_edges.py +0 -0
  125. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/endpoints/plugin_entities.py +0 -0
  126. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/endpoints/plugins.py +0 -0
  127. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/endpoints/project_analysis.py +0 -0
  128. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/endpoints/project_commit_sync.py +0 -0
  129. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/endpoints/project_configuration.py +0 -0
  130. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/endpoints/project_deployments.py +0 -0
  131. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/endpoints/project_incidents.py +0 -0
  132. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/endpoints/project_integrations.py +0 -0
  133. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/endpoints/project_lifecycle.py +0 -0
  134. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/endpoints/project_logs.py +0 -0
  135. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/endpoints/project_plugins.py +0 -0
  136. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/endpoints/project_pr_sync.py +0 -0
  137. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/endpoints/project_types.py +0 -0
  138. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/endpoints/projects.py +0 -0
  139. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/endpoints/prompts.py +0 -0
  140. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/endpoints/pull_requests.py +0 -0
  141. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/endpoints/releases.py +0 -0
  142. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/endpoints/roles.py +0 -0
  143. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/endpoints/sa_api_keys.py +0 -0
  144. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/endpoints/scoring.py +0 -0
  145. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/endpoints/scoring_policies.py +0 -0
  146. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/endpoints/search.py +0 -0
  147. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/endpoints/secret_broker.py +0 -0
  148. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/endpoints/service_accounts.py +0 -0
  149. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/endpoints/status.py +0 -0
  150. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/endpoints/tags.py +0 -0
  151. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/endpoints/teams.py +0 -0
  152. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/endpoints/ticket_harness.py +0 -0
  153. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/endpoints/uploads.py +0 -0
  154. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/endpoints/user_activity.py +0 -0
  155. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/endpoints/users.py +0 -0
  156. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/endpoints/webhooks.py +0 -0
  157. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/endpoints/workflows.py +0 -0
  158. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/entrypoint.py +0 -0
  159. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/graph_ids.py +0 -0
  160. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/graph_sql.py +0 -0
  161. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/harness/__init__.py +0 -0
  162. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/harness/auth.py +0 -0
  163. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/harness/egress.py +0 -0
  164. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/harness/marketplaces.py +0 -0
  165. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/harness/metrics.py +0 -0
  166. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/harness/platform.py +0 -0
  167. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/harness/schemata.toml +0 -0
  168. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/harness/store.py +0 -0
  169. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/harness/sweeper.py +0 -0
  170. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/harness/tokens.py +0 -0
  171. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/identity/__init__.py +0 -0
  172. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/identity/attribution.py +0 -0
  173. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/identity/endpoints.py +0 -0
  174. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/identity/errors.py +0 -0
  175. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/identity/flows.py +0 -0
  176. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/identity/host_integration.py +0 -0
  177. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/identity/models.py +0 -0
  178. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/identity/repository.py +0 -0
  179. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/identity/resolution.py +0 -0
  180. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/identity/state.py +0 -0
  181. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/identity/sweeper.py +0 -0
  182. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/iggy_metrics.py +0 -0
  183. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/llm/__init__.py +0 -0
  184. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/llm/dependencies.py +0 -0
  185. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/llm/generate.py +0 -0
  186. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/llm/tokens.py +0 -0
  187. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/maintenance/__init__.py +0 -0
  188. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/maintenance/log.py +0 -0
  189. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/maintenance/operations.py +0 -0
  190. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/maintenance/registry.py +0 -0
  191. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/maintenance/state.py +0 -0
  192. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/maintenance/worker.py +0 -0
  193. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/mcp_test.py +0 -0
  194. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/middleware/__init__.py +0 -0
  195. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/middleware/rate_limit.py +0 -0
  196. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/model_calls/__init__.py +0 -0
  197. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/model_calls/schemata.toml +0 -0
  198. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/models.py +0 -0
  199. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/openapi.py +0 -0
  200. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/orphan_releases.py +0 -0
  201. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/plugins/__init__.py +0 -0
  202. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/plugins/assignment_writer.py +0 -0
  203. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/plugins/assignments.py +0 -0
  204. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/plugins/credentials.py +0 -0
  205. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/plugins/installer.py +0 -0
  206. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/plugins/lifecycle.py +0 -0
  207. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/plugins/lifecycle_dispatch.py +0 -0
  208. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/plugins/release_dispatch.py +0 -0
  209. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/plugins/reload.py +0 -0
  210. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/plugins/resolution.py +0 -0
  211. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/plugins/schemas.py +0 -0
  212. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/pr_sync/__init__.py +0 -0
  213. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/pr_sync/queue.py +0 -0
  214. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/pr_sync/service.py +0 -0
  215. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/prompts/__init__.py +0 -0
  216. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/prompts/release_notes_system.md +0 -0
  217. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/prompts/seed.py +0 -0
  218. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/py.typed +0 -0
  219. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/relationships.py +0 -0
  220. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/release_promote/__init__.py +0 -0
  221. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/release_promote/queue.py +0 -0
  222. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/release_promote/service.py +0 -0
  223. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/sbom.py +0 -0
  224. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/scoring/__init__.py +0 -0
  225. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/scoring/queue.py +0 -0
  226. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/secret_broker/__init__.py +0 -0
  227. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/secret_broker/audit.py +0 -0
  228. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/secret_broker/broker.py +0 -0
  229. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/secret_broker/identity.py +0 -0
  230. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/secret_broker/providers.py +0 -0
  231. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/secret_broker/schemata.toml +0 -0
  232. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/secret_broker/store.py +0 -0
  233. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/settings.py +0 -0
  234. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/storage/__init__.py +0 -0
  235. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/storage/client.py +0 -0
  236. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/storage/dependencies.py +0 -0
  237. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/storage/thumbnails.py +0 -0
  238. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/storage/validation.py +0 -0
  239. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/tickets/__init__.py +0 -0
  240. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/tickets/log.py +0 -0
  241. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/tickets/schemata.toml +0 -0
  242. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/tickets/sweeper.py +0 -0
  243. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/user_document_orgs.py +0 -0
  244. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/workflows/runs.py +0 -0
  245. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/workflows/runtime_schemata.toml +0 -0
  246. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/workflows/schemata.toml +0 -0
  247. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/workflows/store.py +0 -0
  248. {imbi_api-2.54.0 → imbi_api-2.55.0}/src/imbi/api/workflows/sweeper.py +0 -0
  249. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/__init__.py +0 -0
  250. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/auth/__init__.py +0 -0
  251. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/auth/test_authentication.py +0 -0
  252. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/auth/test_authorization.py +0 -0
  253. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/auth/test_encryption.py +0 -0
  254. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/auth/test_internal_services.py +0 -0
  255. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/auth/test_login_providers.py +0 -0
  256. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/auth/test_membership.py +0 -0
  257. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/auth/test_oauth_server.py +0 -0
  258. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/auth/test_organizations.py +0 -0
  259. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/auth/test_permissions.py +0 -0
  260. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/auth/test_seed.py +0 -0
  261. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/auth/test_sessions.py +0 -0
  262. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/auth/test_totp.py +0 -0
  263. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/clickhouse/__init__.py +0 -0
  264. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/clickhouse/test_client.py +0 -0
  265. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/clickhouse/test_init.py +0 -0
  266. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/clickhouse/test_privacy.py +0 -0
  267. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/email/__init__.py +0 -0
  268. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/email/test_audit_clickhouse.py +0 -0
  269. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/email/test_client.py +0 -0
  270. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/email/test_init.py +0 -0
  271. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/email/test_integration.py +0 -0
  272. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/email/test_models.py +0 -0
  273. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/email/test_templates.py +0 -0
  274. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/endpoints/__init__.py +0 -0
  275. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/endpoints/test_admin.py +0 -0
  276. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/endpoints/test_admin_plugins.py +0 -0
  277. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/endpoints/test_agent_api.py +0 -0
  278. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/endpoints/test_agent_platform.py +0 -0
  279. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/endpoints/test_agent_task_actions.py +0 -0
  280. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/endpoints/test_agent_usage.py +0 -0
  281. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/endpoints/test_agents.py +0 -0
  282. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/endpoints/test_ai_models.py +0 -0
  283. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/endpoints/test_ai_providers.py +0 -0
  284. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/endpoints/test_api_keys.py +0 -0
  285. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/endpoints/test_auth.py +0 -0
  286. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/endpoints/test_auth_providers.py +0 -0
  287. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/endpoints/test_blueprints.py +0 -0
  288. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/endpoints/test_caller_org_slugs.py +0 -0
  289. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/endpoints/test_client_credentials.py +0 -0
  290. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/endpoints/test_comments.py +0 -0
  291. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/endpoints/test_components.py +0 -0
  292. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/endpoints/test_credentials.py +0 -0
  293. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/endpoints/test_cross_org_reads.py +0 -0
  294. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/endpoints/test_cves.py +0 -0
  295. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/endpoints/test_dashboard.py +0 -0
  296. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/endpoints/test_document_analytics.py +0 -0
  297. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/endpoints/test_document_likes.py +0 -0
  298. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/endpoints/test_document_presence.py +0 -0
  299. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/endpoints/test_document_reads.py +0 -0
  300. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/endpoints/test_document_reads_sql.py +0 -0
  301. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/endpoints/test_document_templates.py +0 -0
  302. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/endpoints/test_document_versions.py +0 -0
  303. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/endpoints/test_documents.py +0 -0
  304. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/endpoints/test_environments.py +0 -0
  305. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/endpoints/test_events.py +0 -0
  306. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/endpoints/test_github_app_repository.py +0 -0
  307. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/endpoints/test_graph_query.py +0 -0
  308. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/endpoints/test_harness_egress.py +0 -0
  309. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/endpoints/test_harness_secrets.py +0 -0
  310. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/endpoints/test_iggy_connectors.py +0 -0
  311. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/endpoints/test_init.py +0 -0
  312. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/endpoints/test_integrations.py +0 -0
  313. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/endpoints/test_json_fields.py +0 -0
  314. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/endpoints/test_link_definitions.py +0 -0
  315. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/endpoints/test_local_auth.py +0 -0
  316. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/endpoints/test_maintenance.py +0 -0
  317. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/endpoints/test_mcp_servers.py +0 -0
  318. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/endpoints/test_mfa.py +0 -0
  319. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/endpoints/test_operations_log.py +0 -0
  320. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/endpoints/test_organizations.py +0 -0
  321. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/endpoints/test_pagination.py +0 -0
  322. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/endpoints/test_plugin_label_validation.py +0 -0
  323. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/endpoints/test_plugins.py +0 -0
  324. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/endpoints/test_project_analysis.py +0 -0
  325. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/endpoints/test_project_commit_sync.py +0 -0
  326. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/endpoints/test_project_configuration.py +0 -0
  327. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/endpoints/test_project_deployments.py +0 -0
  328. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/endpoints/test_project_deployments_autonomous.py +0 -0
  329. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/endpoints/test_project_incidents.py +0 -0
  330. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/endpoints/test_project_integrations.py +0 -0
  331. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/endpoints/test_project_lifecycle.py +0 -0
  332. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/endpoints/test_project_logs.py +0 -0
  333. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/endpoints/test_project_plugins.py +0 -0
  334. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/endpoints/test_project_response_surfacing.py +0 -0
  335. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/endpoints/test_project_types.py +0 -0
  336. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/endpoints/test_projects.py +0 -0
  337. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/endpoints/test_projects_helpers.py +0 -0
  338. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/endpoints/test_prompt_decisions.py +0 -0
  339. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/endpoints/test_prompt_generative.py +0 -0
  340. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/endpoints/test_prompts.py +0 -0
  341. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/endpoints/test_pull_requests.py +0 -0
  342. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/endpoints/test_releases.py +0 -0
  343. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/endpoints/test_request_urls.py +0 -0
  344. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/endpoints/test_roles.py +0 -0
  345. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/endpoints/test_sa_api_keys.py +0 -0
  346. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/endpoints/test_scoring.py +0 -0
  347. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/endpoints/test_scoring_policies.py +0 -0
  348. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/endpoints/test_search.py +0 -0
  349. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/endpoints/test_search_index.py +0 -0
  350. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/endpoints/test_secret_broker.py +0 -0
  351. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/endpoints/test_service_accounts.py +0 -0
  352. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/endpoints/test_service_writeback.py +0 -0
  353. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/endpoints/test_shared_identifier.py +0 -0
  354. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/endpoints/test_status.py +0 -0
  355. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/endpoints/test_tags.py +0 -0
  356. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/endpoints/test_teams.py +0 -0
  357. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/endpoints/test_uploads.py +0 -0
  358. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/endpoints/test_user_activity.py +0 -0
  359. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/endpoints/test_users.py +0 -0
  360. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/endpoints/test_webhooks.py +0 -0
  361. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/endpoints/test_workflow_triggers.py +0 -0
  362. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/endpoints/test_workflows.py +0 -0
  363. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/fixtures/marketplaces/claude-code.json +0 -0
  364. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/fixtures/release_a_minus_1/agent_runtime_schemata.toml +0 -0
  365. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/fixtures/release_a_minus_1/harness_schemata.toml +0 -0
  366. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/fixtures/sbom/npm-realistic.json +0 -0
  367. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/fixtures/sbom/pypi-realistic.json +0 -0
  368. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/fixtures/sbom/tiny.json +0 -0
  369. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/identity/__init__.py +0 -0
  370. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/identity/test_endpoints.py +0 -0
  371. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/identity/test_errors.py +0 -0
  372. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/identity/test_flows.py +0 -0
  373. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/identity/test_host_integration.py +0 -0
  374. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/identity/test_repository.py +0 -0
  375. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/identity/test_resolution.py +0 -0
  376. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/identity/test_state.py +0 -0
  377. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/identity/test_sweeper.py +0 -0
  378. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/middleware/test_rate_limit.py +0 -0
  379. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/secret_support.py +0 -0
  380. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/storage/__init__.py +0 -0
  381. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/storage/test_client.py +0 -0
  382. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/storage/test_init.py +0 -0
  383. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/storage/test_thumbnails.py +0 -0
  384. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/storage/test_validation.py +0 -0
  385. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/support.py +0 -0
  386. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/test_agent_platform.py +0 -0
  387. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/test_agent_task_events_e2e.py +0 -0
  388. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/test_agent_tools.py +0 -0
  389. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/test_ai_provider_tokens.py +0 -0
  390. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/test_app.py +0 -0
  391. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/test_assignment_writer.py +0 -0
  392. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/test_auth_settings.py +0 -0
  393. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/test_backfill_embeddings.py +0 -0
  394. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/test_blueprint_attributes.py +0 -0
  395. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/test_blueprint_compliance.py +0 -0
  396. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/test_blueprints.py +0 -0
  397. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/test_clickhouse_project_ids.py +0 -0
  398. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/test_commit_pushed_at_repair.py +0 -0
  399. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/test_commit_sync_queue.py +0 -0
  400. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/test_commit_sync_service.py +0 -0
  401. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/test_component_facts.py +0 -0
  402. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/test_cves.py +0 -0
  403. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/test_deployment_status_repair.py +0 -0
  404. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/test_deployment_sweeper.py +0 -0
  405. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/test_deployment_sync_queue.py +0 -0
  406. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/test_deployment_sync_service.py +0 -0
  407. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/test_drift.py +0 -0
  408. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/test_entrypoint.py +0 -0
  409. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/test_graph_ids.py +0 -0
  410. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/test_graph_sql.py +0 -0
  411. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/test_identity_attribution.py +0 -0
  412. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/test_iggy_metrics.py +0 -0
  413. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/test_init.py +0 -0
  414. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/test_installer.py +0 -0
  415. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/test_lifecycle_dispatch.py +0 -0
  416. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/test_lifespans.py +0 -0
  417. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/test_maintenance_log.py +0 -0
  418. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/test_maintenance_operations.py +0 -0
  419. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/test_maintenance_state.py +0 -0
  420. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/test_maintenance_worker.py +0 -0
  421. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/test_model_calls.py +0 -0
  422. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/test_models.py +0 -0
  423. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/test_openapi.py +0 -0
  424. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/test_orphan_releases.py +0 -0
  425. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/test_plugin_schemas.py +0 -0
  426. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/test_plugins.py +0 -0
  427. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/test_plugins_assignments.py +0 -0
  428. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/test_plugins_credentials.py +0 -0
  429. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/test_pr_sync_queue.py +0 -0
  430. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/test_pr_sync_service.py +0 -0
  431. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/test_projects_drift_ranges.py +0 -0
  432. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/test_prompt_seed.py +0 -0
  433. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/test_pull_request_resync_clickhouse.py +0 -0
  434. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/test_pull_request_reviews_clickhouse.py +0 -0
  435. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/test_pull_requests_pending_deploy.py +0 -0
  436. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/test_release_dispatch.py +0 -0
  437. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/test_release_promote_service.py +0 -0
  438. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/test_sbom.py +0 -0
  439. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/test_scoring_queue.py +0 -0
  440. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/test_scoring_triggers.py +0 -0
  441. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/test_secret_broker.py +0 -0
  442. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/test_secret_github_app.py +0 -0
  443. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/test_secret_identity.py +0 -0
  444. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/test_secret_providers.py +0 -0
  445. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/test_settings.py +0 -0
  446. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/test_tickets_rename.py +0 -0
  447. {imbi_api-2.54.0 → imbi_api-2.55.0}/tests/test_workflow_reconcile.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: imbi-api
3
- Version: 2.54.0
3
+ Version: 2.55.0
4
4
  Summary: Imbi is the open-source service catalog that tracks every service's ownership, deployments, and health, and runs the AI agents and workflows that fix them.
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,7 +20,7 @@ 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,script,sentry,server]==2.54.0
23
+ Requires-Dist: imbi-common[databases,llm,mcp,script,sentry,server]==2.55.0
24
24
  Requires-Dist: jinja2
25
25
  Requires-Dist: jsonpatch>=1.33
26
26
  Requires-Dist: jsonschema>=4.26
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "imbi-api"
3
- version = "2.54.0"
3
+ version = "2.55.0"
4
4
  description = "Imbi is the open-source service catalog that tracks every service's ownership, deployments, and health, and runs the AI agents and workflows that fix them."
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.14"
@@ -29,7 +29,7 @@ dependencies = [
29
29
  "filetype",
30
30
  "httpx>=0.28.1,<1",
31
31
  "idna>=3.18",
32
- "imbi-common[databases,llm,mcp,script,sentry,server]==2.54.0",
32
+ "imbi-common[databases,llm,mcp,script,sentry,server]==2.55.0",
33
33
  "jinja2",
34
34
  "jsonpatch>=1.33",
35
35
  "jsonschema>=4.26",
@@ -172,7 +172,10 @@ class AgentTaskOrigin(pydantic.BaseModel):
172
172
  model_config = pydantic.ConfigDict(extra='allow')
173
173
 
174
174
  #: ``ticket`` and ``ticket_closed`` are the ADR 0028 names of
175
- #: ``task`` and ``task_completed``. Release A writes the old names.
175
+ #: ``task`` and ``task_completed``. Child tickets keep ``task`` and
176
+ #: runs keep ``task_completed`` until release B (see
177
+ #: :data:`imbi.api.tickets.store.CHILD_ORIGIN_KINDS` and
178
+ #: :mod:`imbi.api.workflows.ticket_trigger`).
176
179
  kind: typing.Literal[
177
180
  'human',
178
181
  'schedule',
@@ -31,6 +31,7 @@ Every route needs the caller to be a member of the organization
31
31
  import asyncio
32
32
  import datetime
33
33
  import logging
34
+ import re
34
35
  import typing
35
36
  import uuid
36
37
 
@@ -47,6 +48,7 @@ from imbi.api.auth import organizations, permissions
47
48
  from imbi.api.email import client as email_client
48
49
  from imbi.api.endpoints import project_deployments, tickets
49
50
  from imbi.api.plugins.resolution import ResolvedCapability
51
+ from imbi.api.workflows import tickets as workflow_tickets
50
52
  from imbi.common import graph, lifespan
51
53
  from imbi.common.auth import permissions as common_permissions
52
54
  from imbi.common.plugins.base import DeploymentRun
@@ -55,6 +57,7 @@ from imbi.common.workflows import history, registry, validation, walk
55
57
  from imbi.common.workflows.registry import agent as agent_step
56
58
  from imbi.common.workflows.registry import email as email_step
57
59
  from imbi.common.workflows.registry import slack as slack_step
60
+ from imbi.common.workflows.registry import ticket_closed
58
61
 
59
62
  LOGGER = logging.getLogger(__name__)
60
63
 
@@ -157,7 +160,8 @@ class RunFailure(pydantic.BaseModel):
157
160
 
158
161
  ``task_id``, ``outcome``, ``reason``, and ``summary`` come from the
159
162
  agent task of an ``agent`` step. ``reason`` and ``summary`` are
160
- ``None`` for a caller who cannot read agent tasks.
163
+ ``None`` for a caller who cannot read agent tasks, and ``error``
164
+ has only its code.
161
165
  """
162
166
 
163
167
  node_key: str
@@ -271,7 +275,10 @@ class SlackResult(pydantic.BaseModel):
271
275
  error: str | None = None
272
276
 
273
277
 
274
- class StepAgentTask(pydantic.BaseModel):
278
+ class StepAgentTask(agent_step.TicketAttributes):
279
+ """The attributes of :class:`agent_step.TicketAttributes` are set
280
+ when the task is closed."""
281
+
275
282
  #: The short id, ``T-<n>``.
276
283
  task_id: str
277
284
  status: str
@@ -777,18 +784,72 @@ def _task_key_conflict() -> fastapi.HTTPException:
777
784
  )
778
785
 
779
786
 
780
- def _without_task_content(
781
- step: dict[str, typing.Any],
782
- ) -> dict[str, typing.Any]:
783
- """Remove the agent task content from the output of an agent step."""
784
- if step['node_type'] != 'agent' or not step['output']:
785
- return step
786
- output = {
787
+ def _can_read_tasks(auth: permissions.AuthContext) -> bool:
788
+ return auth.is_admin or common_permissions.holds(
789
+ 'agent_task:read', auth.permissions
790
+ )
791
+
792
+
793
+ def _without_ticket(output: dict[str, typing.Any]) -> dict[str, typing.Any]:
794
+ return {
787
795
  k: v
788
- for k, v in step['output'].items()
789
- if k not in ('reason', 'summary', 'result')
796
+ for k, v in output.items()
797
+ if k not in agent_step.TicketAttributes.model_fields
790
798
  }
791
- return {**step, 'output': output}
799
+
800
+
801
+ _ERROR_CODE = re.compile(r'[a-z][a-z0-9_]*')
802
+
803
+
804
+ def _error_code(error: str | None) -> str | None:
805
+ """Return the code of ``error``: the text before the first ``:`` or
806
+ whitespace. Return ``None`` when that text is not a snake_case code.
807
+ """
808
+ code = re.split(r'[:\s]', error or '', maxsplit=1)[0]
809
+ return code if _ERROR_CODE.fullmatch(code) else None
810
+
811
+
812
+ def _run_for(
813
+ auth: permissions.AuthContext,
814
+ run: dict[str, typing.Any],
815
+ steps: list[dict[str, typing.Any]] | None = None,
816
+ ) -> dict[str, typing.Any]:
817
+ """Return ``run`` without agent task content, for a caller who
818
+ cannot read agent tasks.
819
+
820
+ A run that a closed task started, or that has an agent step, can
821
+ hold task content in any value that a template rendered. For such
822
+ a run, set the dedupe and concurrency keys to ``None``, remove
823
+ the ``input`` and ``output`` of each of ``steps``, and keep only
824
+ the code of the run and step errors. Remove the ticket attributes
825
+ from the payload of a run that a task started. The keys come only
826
+ from the payload (:func:`validation.dedupe_key`), so a list
827
+ without ``steps`` cannot show the content of an agent step. The
828
+ run error can, and a list cannot see the agent steps, so a list
829
+ keeps only the code of the run error of each run.
830
+ """
831
+ found = list(steps or [])
832
+ from_task = run['origin_kind'] in ticket_closed.TYPES
833
+ task_content = from_task or any(s['node_type'] == 'agent' for s in found)
834
+ if _can_read_tasks(auth) or (steps is not None and not task_content):
835
+ return run if steps is None else {**run, 'steps': found}
836
+ hidden = {**run, 'error': _error_code(run['error'])}
837
+ if not task_content:
838
+ return hidden
839
+ hidden |= {'dedupe_key': None, 'concurrency_key': None}
840
+ if from_task:
841
+ hidden['payload'] = _without_ticket(run['payload'])
842
+ if steps is not None:
843
+ hidden['steps'] = [
844
+ {
845
+ **s,
846
+ 'input': None,
847
+ 'output': None,
848
+ 'error': _error_code(s['error']),
849
+ }
850
+ for s in found
851
+ ]
852
+ return hidden
792
853
 
793
854
 
794
855
  def _step_agent_task(
@@ -982,12 +1043,14 @@ async def list_runs(
982
1043
  slug: str,
983
1044
  store: workflows.Store,
984
1045
  runs: workflows.Runs,
985
- _: ReadAuth,
1046
+ auth: ReadAuth,
986
1047
  limit: typing.Annotated[int, fastapi.Query(ge=1, le=200)] = 50,
987
1048
  ) -> list[workflows.Row]:
988
1049
  """Return the runs of a workflow, newest first."""
989
1050
  workflow = await _workflow(store, org_id, slug)
990
- return await runs.list_runs(workflow['id'], limit)
1051
+ return [
1052
+ _run_for(auth, r) for r in await runs.list_runs(workflow['id'], limit)
1053
+ ]
991
1054
 
992
1055
 
993
1056
  @workflow_runs_router.get('/{slug}/runs/{run_id}', response_model=RunDetail)
@@ -1001,9 +1064,11 @@ async def get_run(
1001
1064
  ) -> dict[str, typing.Any]:
1002
1065
  """Return a run with its step records.
1003
1066
 
1004
- The ``reason``, ``summary``, and ``result`` of an agent step's
1005
- output come from the agent task. Only a caller who can read agent
1006
- tasks (``agent_task:read``) gets them.
1067
+ A later step can render agent task content into its ``input`` and
1068
+ ``output``. For a run that a closed task started or that has an
1069
+ agent step, only a caller who can read agent tasks
1070
+ (``agent_task:read``) gets the step ``input`` and ``output``, the
1071
+ dedupe key, and the ticket attributes of the payload.
1007
1072
 
1008
1073
  Raises:
1009
1074
  404: No such workflow or run.
@@ -1012,21 +1077,24 @@ async def get_run(
1012
1077
  """
1013
1078
  workflow = await _workflow(store, org_id, slug)
1014
1079
  row = await _run(runs, workflow, run_id)
1015
- if row['log_archived_at'] is None:
1016
- steps = await runs.steps(run_id)
1017
- else:
1080
+ steps = [] if row['log_archived_at'] else await runs.steps(run_id)
1081
+ if not steps and row['log_archived_at'] is None:
1082
+ # The archive can commit between the two reads and delete the
1083
+ # step rows. Read the run again to get its archive state. Keep
1084
+ # the first row when the run is not archived: the engine can
1085
+ # add a step and set the run error after the step read, and
1086
+ # that error must not go out with a step list that is empty.
1087
+ again = await _run(runs, workflow, run_id)
1088
+ if again['log_archived_at'] is not None:
1089
+ row = again
1090
+ if row['log_archived_at'] is not None:
1018
1091
  try:
1019
1092
  steps = await history.archived_steps(row)
1020
1093
  except Exception as e:
1021
1094
  raise fastapi.HTTPException(
1022
1095
  status_code=503, detail='The run history is not available'
1023
1096
  ) from e
1024
- if not (
1025
- auth.is_admin
1026
- or common_permissions.holds('agent_task:read', auth.permissions)
1027
- ):
1028
- steps = [_without_task_content(s) for s in steps]
1029
- return {**row, 'steps': steps}
1097
+ return _run_for(auth, row, steps)
1030
1098
 
1031
1099
 
1032
1100
  @workflow_runs_router.post(
@@ -1068,7 +1136,7 @@ async def cancel_run(
1068
1136
  raise fastapi.HTTPException(
1069
1137
  status_code=409, detail=f'Run {run_id} is closed'
1070
1138
  )
1071
- return await _run(runs, workflow, run_id)
1139
+ return _run_for(auth, await _run(runs, workflow, run_id))
1072
1140
 
1073
1141
 
1074
1142
  workflow_attention_router = fastapi.APIRouter(
@@ -1081,14 +1149,14 @@ workflow_attention_router = fastapi.APIRouter(
1081
1149
  async def list_attention_runs(
1082
1150
  org_id: OrgId,
1083
1151
  runs: workflows.Runs,
1084
- _: ReadAuth,
1152
+ auth: ReadAuth,
1085
1153
  ) -> list[workflows.Row]:
1086
1154
  """Return the failed runs of the last 7 days and the stuck runs.
1087
1155
 
1088
1156
  A stuck run is open and no engine works on it: see
1089
1157
  :meth:`imbi.api.workflows.RunStore.attention`.
1090
1158
  """
1091
- return await runs.attention(org_id)
1159
+ return [_run_for(auth, r) for r in await runs.attention(org_id)]
1092
1160
 
1093
1161
 
1094
1162
  @workflow_attention_router.get('/', response_model=list[OrgRun])
@@ -1126,11 +1194,12 @@ async def list_org_runs(
1126
1194
  )
1127
1195
  else:
1128
1196
  steps |= from_archive
1129
- task_content = auth.is_admin or common_permissions.holds(
1130
- 'agent_task:read', auth.permissions
1131
- )
1197
+ task_content = _can_read_tasks(auth)
1132
1198
  return [
1133
- {**r, 'failure': _failure(steps.get(str(r['id'])), task_content)}
1199
+ {
1200
+ **_run_for(auth, r),
1201
+ 'failure': _failure(steps.get(str(r['id'])), task_content),
1202
+ }
1134
1203
  for r in found
1135
1204
  ]
1136
1205
 
@@ -1154,7 +1223,7 @@ def _failure(
1154
1223
  'title': step['title'],
1155
1224
  'node_type': step['node_type'],
1156
1225
  'attempt': step['attempt'],
1157
- 'error': step['error'],
1226
+ 'error': step['error'] if task_content else _error_code(step['error']),
1158
1227
  'task_id': output.get('task_id'),
1159
1228
  'outcome': output.get('outcome'),
1160
1229
  'reason': output.get('reason') if task_content else None,
@@ -1428,12 +1497,14 @@ async def send_step_email(
1428
1497
  '/{slug}/runs/{run_id}/steps/{node_id}/slack', response_model=SlackResult
1429
1498
  )
1430
1499
  async def send_step_slack(
1500
+ org_slug: str,
1431
1501
  org_id: OrgId,
1432
1502
  slug: str,
1433
1503
  run_id: uuid.UUID,
1434
1504
  node_id: str,
1435
1505
  store: workflows.Store,
1436
1506
  runs: workflows.Runs,
1507
+ tasks: ticket_store.Store,
1437
1508
  token: SlackToken,
1438
1509
  auth: EngineAuth,
1439
1510
  idempotency_key: IdempotencyKey,
@@ -1444,7 +1515,9 @@ async def send_step_slack(
1444
1515
  404: No such workflow, run, or step.
1445
1516
  409: The step is not a running slack step, or
1446
1517
  ``outcome_unknown``: a call with the key did not finish.
1447
- 422: ``invalid_channel``: the channel is not a Slack channel id.
1518
+ 422: ``invalid_channel``: the channel is not a Slack channel id,
1519
+ or ``ticket_not_found``: the ticket is not a task of the
1520
+ organization.
1448
1521
  502: ``slack_unreachable``: the call to Slack failed, and Slack
1449
1522
  may have posted the message.
1450
1523
  503: ``slack_not_configured``: imbi-api has no bot token.
@@ -1452,6 +1525,9 @@ async def send_step_slack(
1452
1525
  A refusal from Slack is not an error here: the response has its
1453
1526
  code in ``error``, and the engine fails the step.
1454
1527
 
1528
+ A step with a ``ticket`` shows the task below the message (see
1529
+ :func:`workflow_tickets.with_ticket_block`).
1530
+
1455
1531
  """
1456
1532
  step = await _running_step(store, runs, org_id, slug, run_id, node_id)
1457
1533
  if step['node_type'] != 'slack':
@@ -1470,9 +1546,18 @@ async def send_step_slack(
1470
1546
  raise fastapi.HTTPException(
1471
1547
  status_code=422, detail={'error': 'invalid_channel'}
1472
1548
  )
1549
+ # Read before the key is taken too: a failed read posted nothing.
1550
+ text = params.text
1551
+ if params.ticket:
1552
+ task = await tasks.get(org_id, params.ticket)
1553
+ if task is None:
1554
+ raise fastapi.HTTPException(
1555
+ status_code=422, detail={'error': 'ticket_not_found'}
1556
+ )
1557
+ text = workflow_tickets.with_ticket_block(text, task, org_slug)
1473
1558
 
1474
1559
  async def call() -> dict[str, typing.Any]:
1475
- posted = await _post_slack(token, params.channel, params.text)
1560
+ posted = await _post_slack(token, params.channel, text)
1476
1561
  return posted.model_dump()
1477
1562
 
1478
1563
  return await runs.once(
@@ -1626,12 +1711,12 @@ async def step_agent_task(
1626
1711
  or task['agent_id'] != agent_id
1627
1712
  ):
1628
1713
  raise _task_key_conflict()
1629
- summary = (
1630
- await tasks.last_agent_turn(task)
1631
- if task['status'] == 'closed'
1632
- else None
1714
+ if task['status'] != 'closed':
1715
+ return _step_agent_task(task)
1716
+ summary, attributes = await asyncio.gather(
1717
+ tasks.last_agent_turn(task), workflow_tickets.attributes(db, task)
1633
1718
  )
1634
- return _step_agent_task(task, summary)
1719
+ return {**_step_agent_task(task, summary), **attributes}
1635
1720
 
1636
1721
 
1637
1722
  @workflow_runs_router.post(
@@ -67,6 +67,11 @@ async def _on_graph_startup(db: graph.Graph) -> None:
67
67
  graph.set_on_startup(_on_graph_startup)
68
68
 
69
69
 
70
+ def get_graph() -> graph.Graph | None:
71
+ """Return the graph pool, once it is open."""
72
+ return _graph
73
+
74
+
70
75
  @contextlib.asynccontextmanager
71
76
  async def clickhouse_hook() -> abc.AsyncGenerator[None]:
72
77
  """Initialize and manage the ClickHouse connection."""
@@ -47,8 +47,11 @@ LOGGER = logging.getLogger(__name__)
47
47
  SCHEMA = 'tickets'
48
48
 
49
49
  #: The origin kinds of a child ticket, which an agent made from its own
50
- #: ticket. Release A writes ``task`` and reads both; release A+1 writes
51
- #: ``ticket`` (ADR 0028).
50
+ #: ticket. Releases A and A+1 write ``task`` and read both (ADR 0028).
51
+ #: The unique index of idempotency keys includes the origin kind, so a
52
+ #: pod that wrote ``ticket`` while a pod of the previous release wrote
53
+ #: ``task`` for the same key would make two children. The write changes
54
+ #: in release B, with the index.
52
55
  CHILD_ORIGIN_KINDS = ('task', 'ticket')
53
56
 
54
57
  #: The unique index of idempotency keys. It keeps its ADR 0020 name until
@@ -90,7 +93,19 @@ async def run_close_hooks(task: Row) -> None:
90
93
  )
91
94
 
92
95
 
93
- Status = typing.Literal['queued', 'running', 'blocked', 'paused', 'closed']
96
+ #: ``held``, ``open``, and ``in_progress`` are read but not written yet:
97
+ #: a later release writes them (ADR 0028), and this release must read
98
+ #: its rows.
99
+ Status = typing.Literal[
100
+ 'held',
101
+ 'queued',
102
+ 'running',
103
+ 'paused',
104
+ 'open',
105
+ 'in_progress',
106
+ 'blocked',
107
+ 'closed',
108
+ ]
94
109
  Control = typing.Literal['run', 'pause', 'cancel']
95
110
  ActorKind = typing.Literal['human', 'agent', 'subagent', 'system']
96
111
  Channel = typing.Literal['web', 'slack', 'mcp', 'api', 'harness']
@@ -109,10 +124,15 @@ _OPEN_REQUESTS = sql.SQL(
109
124
  Group = typing.Literal['input', 'running', 'paused', 'queued', 'closed']
110
125
 
111
126
  #: The inbox group of task ``t``: ``input`` when it waits on a person
112
- #: (blocked, or not closed with an open request), else its status.
127
+ #: (blocked, or not closed with an open request), else its status. A
128
+ #: ticket that has not started (``held``, ``open``) is ``queued``; a
129
+ #: person ticket in work (``in_progress``) is ``running``.
113
130
  _GROUP = sql.SQL(
114
131
  "CASE WHEN t.status = 'blocked' OR (t.status <> 'closed'"
115
- ' AND EXISTS (SELECT 1 {open})) THEN {input} ELSE t.status::text END'
132
+ ' AND EXISTS (SELECT 1 {open})) THEN {input}'
133
+ " WHEN t.status IN ('held', 'open') THEN 'queued'"
134
+ " WHEN t.status = 'in_progress' THEN 'running'"
135
+ ' ELSE t.status::text END'
116
136
  ).format(open=_OPEN_REQUESTS, input=sql.Literal('input'))
117
137
 
118
138
  #: The order of the tasks in each inbox group: oldest block first (O2)
@@ -557,20 +577,29 @@ class TicketStore:
557
577
  async def find_by_idempotency_key(
558
578
  self, organization_id: str, origin_kind: str, origin_id: str, key: str
559
579
  ) -> Row | None:
560
- """Return the task that the origin principal made with ``key``."""
580
+ """Return the task that the origin principal made with ``key``.
581
+
582
+ A child kind matches every child kind, so a retry finds the child
583
+ that a pod of the previous release wrote as ``task``.
584
+ """
585
+ kinds = (
586
+ list(CHILD_ORIGIN_KINDS)
587
+ if origin_kind in CHILD_ORIGIN_KINDS
588
+ else [origin_kind]
589
+ )
561
590
  async with self._pool.connection() as conn:
562
591
  return await _fetch_one(
563
592
  conn,
564
593
  _SELECT_TASKS
565
- + ' WHERE organization_id = %s AND origin_kind = %s'
594
+ + ' WHERE organization_id = %s AND origin_kind = ANY(%s)'
566
595
  ' AND origin_id = %s AND idempotency_key = %s',
567
- (organization_id, origin_kind, origin_id, key),
596
+ (organization_id, kinds, origin_id, key),
568
597
  )
569
598
 
570
599
  async def create(
571
600
  self, task: NewTask, actor: Actor, event_payload: Row
572
601
  ) -> tuple[Row, bool]:
573
- """Insert ``task`` with its short id and ``task.created`` event.
602
+ """Insert ``task`` with its short id and ``ticket.created`` event.
574
603
 
575
604
  Return the task and ``True``. When a concurrent request made a
576
605
  task with the same idempotency key first, return that task and
@@ -669,7 +698,7 @@ class TicketStore:
669
698
  ],
670
699
  )
671
700
  event = await _append_event(
672
- conn, task_id, 'task.created', event_payload, actor
701
+ conn, task_id, 'ticket.created', event_payload, actor
673
702
  )
674
703
  row = await _fetch_task(conn, task_id)
675
704
  except psycopg.errors.UniqueViolation as err:
@@ -31,7 +31,7 @@ from imbi.api.workflows.store import (
31
31
  WorkflowStore,
32
32
  agent_ids,
33
33
  )
34
- from imbi.common import lifespan, relational
34
+ from imbi.common import graph, lifespan, relational
35
35
  from imbi.common.workflows import runtime
36
36
 
37
37
  SCHEMATA_PATH = pathlib.Path(__file__).parent / 'schemata.toml'
@@ -54,6 +54,13 @@ async def initialize() -> None:
54
54
  await relational.initialize_deleted_organizations()
55
55
 
56
56
 
57
+ def _graph() -> graph.Graph | None:
58
+ # Imported here: imbi.api.lifespans imports this package.
59
+ from imbi.api import lifespans
60
+
61
+ return lifespans.get_graph()
62
+
63
+
57
64
  @contextlib.asynccontextmanager
58
65
  async def store_lifespan() -> abc.AsyncGenerator[WorkflowStore]:
59
66
  """Initialize the schemas, hold the workflow stores open, and sweep."""
@@ -65,7 +72,7 @@ async def store_lifespan() -> abc.AsyncGenerator[WorkflowStore]:
65
72
  _runs = RunStore(pool)
66
73
  definitions = WorkflowStore(pool)
67
74
  tasks = TicketStore(pool)
68
- trigger = ticket_trigger.TaskTrigger(definitions, _runs, tasks)
75
+ trigger = ticket_trigger.TaskTrigger(definitions, _runs, tasks, _graph)
69
76
  task_store.register_close_hook(trigger)
70
77
  stop = asyncio.Event()
71
78
  sweep = asyncio.create_task(
@@ -2,8 +2,11 @@
2
2
 
3
3
  ``task_completed`` is the earlier name of the trigger (ADR 0028). Both
4
4
  start runs. A run and a ticket that this trigger starts still record
5
- the old name as their origin kind, which the previous release reads;
6
- both names are read.
5
+ the old name as their origin kind until release B (R4), and both names
6
+ are read. The unique key of a run includes its origin kind. If this
7
+ release wrote the new name, a sweep of the previous release that
8
+ retries the same outbox row with the old name would start a second
9
+ run.
7
10
 
8
11
  A ticket close hook (:func:`imbi.api.tickets.store.
9
12
  register_close_hook`). It reads the enabled bindings of the active
@@ -26,16 +29,19 @@ delegated child shares.
26
29
 
27
30
  import logging
28
31
  import typing
32
+ from collections import abc
29
33
 
30
34
  from imbi.api.tickets import store as task_store
31
35
  from imbi.api.workflows import runs as runs_module
32
- from imbi.api.workflows import store
36
+ from imbi.api.workflows import store, tickets
37
+ from imbi.common import graph as graph_db
33
38
  from imbi.common.workflows import graph, validation
34
39
  from imbi.common.workflows.registry import ticket_closed
35
40
 
36
41
  LOGGER = logging.getLogger(__name__)
37
42
 
38
- #: The origin kind that this trigger writes.
43
+ #: The origin kind that this trigger writes. It stays the old name until
44
+ #: release B; see the module docstring.
39
45
  KIND = 'task_completed'
40
46
 
41
47
  #: The most runs in one chain of task -> run -> task -> run.
@@ -76,10 +82,14 @@ class TaskTrigger:
76
82
  definitions: store.WorkflowStore,
77
83
  runs: runs_module.RunStore,
78
84
  tasks: task_store.TicketStore,
85
+ db: abc.Callable[[], graph_db.Graph | None],
79
86
  ) -> None:
87
+ """``db`` returns the graph, for the slugs of the task's org and
88
+ agent (:func:`tickets.attributes`)."""
80
89
  self._definitions = definitions
81
90
  self._runs = runs
82
91
  self._tasks = tasks
92
+ self._db = db
83
93
 
84
94
  async def __call__(self, task: store.Row) -> None:
85
95
  """Start a run for each trigger that the closed task matches."""
@@ -92,19 +102,23 @@ class TaskTrigger:
92
102
  )
93
103
  await self._tasks.triggers_started(task['id'])
94
104
  return
95
- payload = {
96
- 'task_id': task['short_id'],
97
- 'agent_id': task['agent_id'],
98
- 'outcome': task['outcome'],
99
- }
100
105
  org = task['organization_id']
101
106
  failed = False
107
+ # Built for the first match only: most closed tasks start no run.
108
+ payload: dict[str, typing.Any] | None = None
102
109
  bindings = await self._definitions.active_bindings(
103
110
  org, ticket_closed.TYPES
104
111
  )
105
112
  for binding in bindings:
106
113
  if not _matches(binding, task):
107
114
  continue
115
+ if payload is None:
116
+ payload = {
117
+ 'task_id': task['short_id'],
118
+ 'agent_id': task['agent_id'],
119
+ 'outcome': task['outcome'],
120
+ **await tickets.attributes(self._db(), task),
121
+ }
108
122
  workflow_id = binding['workflow_id']
109
123
  try:
110
124
  settings = graph.Settings.model_validate(binding['settings'])
@@ -0,0 +1,77 @@
1
+ """The attributes of an agent task (a ticket, ADR 0028) in a workflow.
2
+
3
+ The output of an ``agent`` step, the payload of a ``task_completed``
4
+ trigger, and the ticket block of a ``slack`` step show them.
5
+ """
6
+
7
+ import typing
8
+
9
+ from imbi.api import settings
10
+ from imbi.common import graph
11
+ from imbi.common.workflows.registry import slack
12
+
13
+ _SLUGS_QUERY: typing.LiteralString = """
14
+ MATCH (o:Organization {{id: {org}}})
15
+ OPTIONAL MATCH (a:Agent {{id: {agent}}})-[:BELONGS_TO]->(o)
16
+ RETURN o.slug AS org_slug, a.slug AS agent_slug
17
+ """
18
+
19
+
20
+ def url(org_slug: str, short_id: str) -> str | None:
21
+ """Return the UI link of a task. ``None`` when ``IMBI_UI_URL`` is
22
+ not set."""
23
+ base = settings.get_server_config().ui_url
24
+ return f'{base}/tickets/{org_slug}/{short_id}' if base else None
25
+
26
+
27
+ def project(task: dict[str, typing.Any]) -> str | None:
28
+ """Return the slug of the first project of a task, if any."""
29
+ projects: list[dict[str, str]] = task.get('projects') or []
30
+ return projects[0]['project_slug'] if projects else None
31
+
32
+
33
+ async def attributes(
34
+ db: graph.Graph | None, task: dict[str, typing.Any]
35
+ ) -> dict[str, typing.Any]:
36
+ """Return ``title``, ``url``, ``project``, ``agent`` (the agent
37
+ slug), and ``cost_usd`` of a task. Without ``db``, ``url`` and
38
+ ``agent`` are ``None``."""
39
+ found = (
40
+ await db.execute(
41
+ _SLUGS_QUERY,
42
+ {'org': task['organization_id'], 'agent': task['agent_id']},
43
+ ['org_slug', 'agent_slug'],
44
+ )
45
+ if db is not None
46
+ else []
47
+ )
48
+ row = found[0] if found else {}
49
+ org_slug = graph.parse_agtype(row.get('org_slug'))
50
+ return {
51
+ 'title': task['title'],
52
+ 'url': url(org_slug, task['short_id']) if org_slug else None,
53
+ 'project': project(task),
54
+ 'agent': graph.parse_agtype(row.get('agent_slug')),
55
+ 'cost_usd': float(task['cost_total']),
56
+ }
57
+
58
+
59
+ def with_ticket_block(
60
+ text: str, task: dict[str, typing.Any], org_slug: str
61
+ ) -> str:
62
+ """Return ``text`` with a block that shows ``task``.
63
+
64
+ Each value from the task goes through :func:`slack.escape`, so a
65
+ title cannot add a mention. The text is cut to keep the message in
66
+ :data:`slack.MAX_TEXT`.
67
+ """
68
+ label = slack.escape(f'{task["short_id"]}: {task["title"]}')
69
+ link = url(org_slug, task['short_id'])
70
+ details = [
71
+ f'Status: {task["status"]}',
72
+ f'Outcome: {task["outcome"] or "none"}',
73
+ f'Project: {project(task) or "none"}',
74
+ ]
75
+ heading = f'<{link}|{label}>' if link else label
76
+ block = f'\n\n*{heading}*\n' + slack.escape(' | '.join(details))
77
+ return text[: slack.MAX_TEXT - len(block)] + block