imbi-api 2.67.0__tar.gz → 2.69.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.
- {imbi_api-2.67.0 → imbi_api-2.69.0}/PKG-INFO +2 -2
- {imbi_api-2.67.0 → imbi_api-2.69.0}/pyproject.toml +2 -2
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/agent_tools.py +1 -1
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/auth/agent_api.py +15 -22
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/auth/agent_api_routes.py +29 -6
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/auth/organizations.py +133 -8
- imbi_api-2.69.0/src/imbi/api/clickhouse_orgs.py +135 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/commit_sync/service.py +2 -1
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/document_orgs.py +35 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/drift.py +9 -1
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/drift_classifier.py +1 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/email/__init__.py +2 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/email/models.py +3 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/endpoints/__init__.py +0 -4
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/endpoints/_document_events.py +2 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/endpoints/_document_reads.py +45 -14
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/endpoints/_document_scope.py +14 -15
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/endpoints/_helpers.py +17 -4
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/endpoints/agent_platform.py +0 -2
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/endpoints/agent_usage.py +0 -1
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/endpoints/agents.py +0 -1
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/endpoints/ai_model_defaults.py +0 -1
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/endpoints/ai_models.py +31 -3
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/endpoints/ai_providers.py +0 -1
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/endpoints/auth.py +20 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/endpoints/comments.py +27 -34
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/endpoints/dashboard.py +12 -7
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/endpoints/document_analytics.py +42 -19
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/endpoints/document_likes.py +18 -6
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/endpoints/document_presence.py +14 -13
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/endpoints/documents.py +87 -9
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/endpoints/harness.py +61 -12
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/endpoints/integration_workflow_steps.py +0 -1
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/endpoints/mcp_servers.py +0 -1
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/endpoints/operations_log.py +0 -1
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/endpoints/organizations.py +185 -171
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/endpoints/project_deployments.py +68 -12
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/endpoints/project_integrations.py +0 -1
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/endpoints/project_plugins.py +0 -1
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/endpoints/project_types.py +11 -5
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/endpoints/projects.py +24 -9
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/endpoints/prompts.py +124 -198
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/endpoints/pull_requests.py +11 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/endpoints/releases.py +12 -2
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/endpoints/scoring.py +24 -16
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/endpoints/search.py +13 -24
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/endpoints/secret_broker.py +0 -6
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/endpoints/tickets.py +176 -9
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/endpoints/user_activity.py +133 -96
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/endpoints/workflow_runs.py +954 -168
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/endpoints/workflows.py +238 -19
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/maintenance/log.py +4 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/maintenance/operations.py +43 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/maintenance/registry.py +48 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/maintenance/worker.py +6 -3
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/mcp_test.py +6 -1
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/plugins/lifecycle_dispatch.py +18 -4
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/plugins/release_dispatch.py +7 -2
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/pr_sync/service.py +2 -1
- imbi_api-2.69.0/src/imbi/api/prompt_orgs.py +197 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/prompts/release_notes_system.md +6 -1
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/release_promote/service.py +5 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/scoring/queue.py +12 -1
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/secret_broker/broker.py +126 -49
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/secret_broker/schemata.toml +6 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/tickets/__init__.py +21 -7
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/tickets/announce.py +16 -7
- imbi_api-2.69.0/src/imbi/api/tickets/code_channel.py +208 -0
- imbi_api-2.69.0/src/imbi/api/tickets/handoffs.py +272 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/tickets/log.py +5 -1
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/tickets/schemata.toml +50 -3
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/tickets/store.py +603 -55
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/workflows/__init__.py +23 -5
- imbi_api-2.69.0/src/imbi/api/workflows/deployment_trigger.py +607 -0
- imbi_api-2.69.0/src/imbi/api/workflows/manual.py +187 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/workflows/runs.py +239 -32
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/workflows/runtime_schemata.toml +59 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/workflows/schemata.toml +49 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/workflows/store.py +49 -8
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/workflows/sweeper.py +43 -4
- imbi_api-2.69.0/src/imbi/api/workflows/ticket_steps.py +1017 -0
- imbi_api-2.69.0/src/imbi/api/workflows/ticket_trigger.py +456 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/auth/test_organizations.py +181 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/endpoints/test_agent_api.py +20 -10
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/endpoints/test_agent_task_actions.py +39 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/endpoints/test_agent_task_harness.py +24 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/endpoints/test_agent_task_log.py +29 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/endpoints/test_agent_tasks.py +47 -7
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/endpoints/test_agents.py +2 -4
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/endpoints/test_ai_models.py +40 -2
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/endpoints/test_ai_providers.py +1 -3
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/endpoints/test_auth.py +55 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/endpoints/test_comments.py +4 -8
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/endpoints/test_comments_attention.py +2 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/endpoints/test_components.py +1 -8
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/endpoints/test_cross_org_reads.py +139 -14
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/endpoints/test_document_presence.py +6 -2
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/endpoints/test_document_reads.py +16 -4
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/endpoints/test_document_reads_sql.py +203 -6
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/endpoints/test_documents.py +0 -4
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/endpoints/test_events.py +1 -4
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/endpoints/test_harness.py +72 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/endpoints/test_harness_secrets.py +8 -1
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/endpoints/test_mcp_servers.py +3 -7
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/endpoints/test_operations_log.py +1 -6
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/endpoints/test_organizations.py +22 -8
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/endpoints/test_project_analysis.py +4 -10
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/endpoints/test_project_configuration.py +1 -4
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/endpoints/test_project_deployments.py +193 -39
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/endpoints/test_project_deployments_autonomous.py +7 -4
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/endpoints/test_project_incidents.py +1 -4
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/endpoints/test_project_integrations.py +1 -4
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/endpoints/test_project_lifecycle.py +1 -4
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/endpoints/test_project_stars.py +1 -4
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/endpoints/test_project_types.py +13 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/endpoints/test_projects.py +24 -15
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/endpoints/test_prompt_decisions.py +0 -1
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/endpoints/test_prompt_generative.py +39 -61
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/endpoints/test_prompts.py +164 -228
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/endpoints/test_pull_requests.py +0 -4
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/endpoints/test_releases.py +47 -4
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/endpoints/test_scoring.py +44 -29
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/endpoints/test_search.py +31 -58
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/endpoints/test_ticket_handoff.py +355 -1
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/endpoints/test_ticket_reopen.py +54 -0
- imbi_api-2.69.0/tests/endpoints/test_ticket_slack_channel.py +253 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/endpoints/test_user_activity.py +14 -9
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/endpoints/test_webhooks.py +0 -7
- imbi_api-2.69.0/tests/endpoints/test_workflow_create_ticket.py +498 -0
- imbi_api-2.69.0/tests/endpoints/test_workflow_run_workflow.py +1110 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/endpoints/test_workflow_runs.py +907 -50
- imbi_api-2.69.0/tests/endpoints/test_workflow_ticket_steps.py +1805 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/endpoints/test_workflows.py +389 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/support.py +29 -2
- imbi_api-2.69.0/tests/test_clickhouse_orgs.py +192 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/test_cves.py +3 -1
- imbi_api-2.69.0/tests/test_dashboard_org_reads.py +74 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/test_deployment_array_drop.py +3 -1
- imbi_api-2.69.0/tests/test_deployment_recorded_trigger.py +806 -0
- imbi_api-2.69.0/tests/test_document_org_scope.py +196 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/test_document_orgs.py +22 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/test_drift.py +24 -5
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/test_lifecycle_dispatch.py +17 -14
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/test_maintenance_log.py +13 -2
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/test_maintenance_operations.py +3 -1
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/test_maintenance_worker.py +3 -2
- imbi_api-2.69.0/tests/test_prompt_orgs.py +258 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/test_release_promote_service.py +21 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/test_secret_broker.py +204 -10
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/test_ticket_state_trigger.py +318 -3
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/test_workflow_reconcile.py +12 -0
- imbi_api-2.67.0/src/imbi/api/prompt_orgs.py +0 -96
- imbi_api-2.67.0/src/imbi/api/workflows/ticket_trigger.py +0 -266
- imbi_api-2.67.0/tests/test_prompt_orgs.py +0 -82
- {imbi_api-2.67.0 → imbi_api-2.69.0}/.gitignore +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/README.md +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/moon.yml +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/README.md +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/__init__.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/ai_catalog_orgs.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/app.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/auth/__init__.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/auth/authorization_codes.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/auth/autonomous.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/auth/internal_services.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/auth/local_auth.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/auth/login_providers.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/auth/membership.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/auth/models.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/auth/oauth_clients.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/auth/password.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/auth/permissions.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/auth/principals.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/auth/seed.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/auth/sessions.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/auth/tokens.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/auth/totp.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/blueprint_attributes.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/blueprint_compliance.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/blueprint_sections.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/blueprint_values.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/commit_sync/__init__.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/commit_sync/queue.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/component_facts.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/component_governance_orgs.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/conversation_orgs.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/cves.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/deployment_sweeper.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/deployment_sync/__init__.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/deployment_sync/queue.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/deployment_sync/service.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/documents/__init__.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/documents/read_sweeper.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/domain/__init__.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/domain/models.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/domain/scoring.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/email/client.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/email/dependencies.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/email/templates/base.html +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/email/templates/base.txt +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/email/templates/password_reset.html +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/email/templates/password_reset.txt +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/email/templates/welcome.html +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/email/templates/welcome.txt +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/email/templates.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/endpoints/_credentials.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/endpoints/_document_history.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/endpoints/_json_fields.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/endpoints/_local_time.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/endpoints/_pagination.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/endpoints/_request_urls.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/endpoints/_search_index.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/endpoints/admin.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/endpoints/admin_plugins.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/endpoints/ai_proxy.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/endpoints/api_keys.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/endpoints/auth_providers.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/endpoints/blueprints.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/endpoints/client_credentials.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/endpoints/components.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/endpoints/cves.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/endpoints/document_templates.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/endpoints/document_versions.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/endpoints/environments.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/endpoints/events.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/endpoints/graph_query.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/endpoints/iggy_connectors.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/endpoints/integrations.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/endpoints/link_definitions.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/endpoints/local_auth.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/endpoints/maintenance.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/endpoints/mfa.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/endpoints/oauth_metadata.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/endpoints/plugin_edges.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/endpoints/plugin_entities.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/endpoints/plugins.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/endpoints/project_analysis.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/endpoints/project_commit_sync.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/endpoints/project_configuration.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/endpoints/project_incidents.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/endpoints/project_lifecycle.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/endpoints/project_logs.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/endpoints/project_pr_sync.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/endpoints/project_stars.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/endpoints/release_periods.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/endpoints/roles.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/endpoints/sa_api_keys.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/endpoints/scoring_policies.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/endpoints/service_accounts.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/endpoints/status.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/endpoints/tags.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/endpoints/teams.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/endpoints/ticket_harness.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/endpoints/uploads.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/endpoints/users.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/endpoints/webhooks.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/entrypoint.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/graph_sql.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/harness/__init__.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/harness/auth.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/harness/egress.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/harness/marketplaces.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/harness/metrics.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/harness/platform.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/harness/schemata.toml +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/harness/store.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/harness/sweeper.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/harness/tokens.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/identity/__init__.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/identity/attribution.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/identity/endpoints.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/identity/errors.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/identity/flows.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/identity/host_integration.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/identity/models.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/identity/repository.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/identity/resolution.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/identity/state.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/identity/sweeper.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/iggy_metrics.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/lifespans.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/llm/__init__.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/llm/dependencies.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/llm/generate.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/llm/prompted.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/llm/tokens.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/maintenance/__init__.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/maintenance/state.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/mcp_server_orgs.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/middleware/__init__.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/middleware/rate_limit.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/model_calls/__init__.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/model_calls/schemata.toml +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/models.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/openapi.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/orphan_releases.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/plugins/__init__.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/plugins/assignment_writer.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/plugins/assignments.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/plugins/credentials.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/plugins/installer.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/plugins/lifecycle.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/plugins/reload.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/plugins/resolution.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/plugins/schemas.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/pr_sync/__init__.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/pr_sync/queue.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/preferences/__init__.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/preferences/schemata.toml +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/prompts/__init__.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/prompts/seed.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/py.typed +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/relationships.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/release_periods.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/release_promote/__init__.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/release_promote/queue.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/sbom.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/scoring/__init__.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/secret_broker/__init__.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/secret_broker/audit.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/secret_broker/identity.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/secret_broker/model_key.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/secret_broker/providers.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/secret_broker/store.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/settings.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/storage/__init__.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/storage/client.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/storage/dependencies.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/storage/thumbnails.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/storage/validation.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/tags.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/teams.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/tickets/custom_fields.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/tickets/sweeper.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/workflows/plugin_calls.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/src/imbi/api/workflows/tickets.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/__init__.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/auth/__init__.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/auth/test_authentication.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/auth/test_authorization.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/auth/test_encryption.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/auth/test_internal_services.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/auth/test_login_providers.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/auth/test_membership.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/auth/test_oauth_server.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/auth/test_permissions.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/auth/test_seed.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/auth/test_sessions.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/auth/test_totp.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/clickhouse/__init__.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/clickhouse/test_client.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/clickhouse/test_init.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/clickhouse/test_privacy.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/email/__init__.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/email/test_audit_clickhouse.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/email/test_client.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/email/test_init.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/email/test_integration.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/email/test_models.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/email/test_templates.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/endpoints/__init__.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/endpoints/test_admin.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/endpoints/test_admin_plugins.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/endpoints/test_agent_platform.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/endpoints/test_agent_task_relations.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/endpoints/test_agent_usage.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/endpoints/test_ai_model_defaults.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/endpoints/test_ai_proxy.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/endpoints/test_api_keys.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/endpoints/test_auth_providers.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/endpoints/test_blueprints.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/endpoints/test_caller_org_slugs.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/endpoints/test_client_credentials.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/endpoints/test_components_graph.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/endpoints/test_credentials.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/endpoints/test_cves.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/endpoints/test_dashboard.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/endpoints/test_document_analytics.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/endpoints/test_document_likes.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/endpoints/test_document_templates.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/endpoints/test_document_versions.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/endpoints/test_environments.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/endpoints/test_github_app_repository.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/endpoints/test_graph_query.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/endpoints/test_harness_egress.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/endpoints/test_iggy_connectors.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/endpoints/test_init.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/endpoints/test_integration_workflow_steps.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/endpoints/test_integration_workflow_steps_choices.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/endpoints/test_integrations.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/endpoints/test_json_fields.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/endpoints/test_link_definitions.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/endpoints/test_local_auth.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/endpoints/test_maintenance.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/endpoints/test_mfa.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/endpoints/test_pagination.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/endpoints/test_person_tickets.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/endpoints/test_plugin_label_validation.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/endpoints/test_plugins.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/endpoints/test_project_commit_sync.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/endpoints/test_project_logs.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/endpoints/test_project_plugins.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/endpoints/test_project_response_surfacing.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/endpoints/test_projects_bulk_graph.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/endpoints/test_projects_helpers.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/endpoints/test_release_periods_graph.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/endpoints/test_request_urls.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/endpoints/test_roles.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/endpoints/test_sa_api_keys.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/endpoints/test_scoring_policies.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/endpoints/test_search_index.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/endpoints/test_secret_broker.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/endpoints/test_service_accounts.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/endpoints/test_service_writeback.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/endpoints/test_shared_identifier.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/endpoints/test_status.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/endpoints/test_tags.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/endpoints/test_teams.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/endpoints/test_ticket_agent_activity.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/endpoints/test_ticket_attributes.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/endpoints/test_ticket_custom_fields.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/endpoints/test_ticket_links.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/endpoints/test_ticket_units.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/endpoints/test_ticket_waiting.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/endpoints/test_uploads.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/endpoints/test_user_preferences.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/endpoints/test_users.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/endpoints/test_workflow_run_history.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/endpoints/test_workflow_triggers.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/fixtures/marketplaces/claude-code.json +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/fixtures/release_2_58/harness_schemata.toml +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/fixtures/release_2_58/tickets_schemata.toml +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/fixtures/release_a/harness_schemata.toml +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/fixtures/release_a/tickets_schemata.toml +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/fixtures/release_a_minus_1/agent_runtime_schemata.toml +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/fixtures/release_a_minus_1/harness_schemata.toml +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/fixtures/release_b/harness_schemata.toml +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/fixtures/release_b/tickets_schemata.toml +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/fixtures/release_b1/harness_schemata.toml +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/fixtures/release_b1/tickets_schemata.toml +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/fixtures/sbom/npm-realistic.json +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/fixtures/sbom/pypi-realistic.json +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/fixtures/sbom/tiny.json +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/identity/__init__.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/identity/test_endpoints.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/identity/test_errors.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/identity/test_flows.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/identity/test_host_integration.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/identity/test_repository.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/identity/test_resolution.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/identity/test_state.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/identity/test_sweeper.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/marketplace_support.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/middleware/test_rate_limit.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/secret_support.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/storage/__init__.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/storage/test_client.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/storage/test_init.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/storage/test_thumbnails.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/storage/test_validation.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/test_agent_platform.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/test_agent_task_events_e2e.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/test_agent_tools.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/test_ai_catalog_orgs.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/test_ai_provider_tokens.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/test_app.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/test_assignment_writer.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/test_auth_settings.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/test_blueprint_attributes.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/test_blueprint_compliance.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/test_blueprint_values.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/test_blueprints.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/test_clickhouse_project_ids.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/test_commit_sync_queue.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/test_commit_sync_service.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/test_component_facts.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/test_deployment_sweeper.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/test_deployment_sync_queue.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/test_deployment_sync_service.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/test_drift_classifier.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/test_entrypoint.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/test_graph_sql.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/test_identity_attribution.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/test_iggy_metrics.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/test_init.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/test_installer.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/test_lifespans.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/test_maintenance_state.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/test_mcp_server_orgs.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/test_model_calls.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/test_models.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/test_openapi.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/test_orphan_releases.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/test_plugin_schemas.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/test_plugins.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/test_plugins_assignments.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/test_plugins_credentials.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/test_pr_sync_queue.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/test_pr_sync_service.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/test_projects_drift_ranges.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/test_prompt_seed.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/test_prompted.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/test_pull_request_resync_clickhouse.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/test_pull_request_reviews_clickhouse.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/test_pull_requests_pending_deploy.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/test_release_dispatch.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/test_sbom.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/test_scoring_queue.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/test_scoring_triggers.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/test_secret_github_app.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/test_secret_identity.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/test_secret_mcp_credential.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/test_secret_providers.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/test_settings.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/test_tags.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/test_tickets_rename.py +0 -0
- {imbi_api-2.67.0 → imbi_api-2.69.0}/tests/test_workflow_tickets.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: imbi-api
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.69.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
|
|
@@ -21,7 +21,7 @@ Requires-Dist: filetype
|
|
|
21
21
|
Requires-Dist: httpx2>=2.16.2
|
|
22
22
|
Requires-Dist: httpx<1,>=0.28.1
|
|
23
23
|
Requires-Dist: idna>=3.18
|
|
24
|
-
Requires-Dist: imbi-common[databases,llm,mcp,script,sentry,server]==2.
|
|
24
|
+
Requires-Dist: imbi-common[databases,llm,mcp,script,sentry,server]==2.69.0
|
|
25
25
|
Requires-Dist: jinja2
|
|
26
26
|
Requires-Dist: jsonpatch>=1.33
|
|
27
27
|
Requires-Dist: jsonschema>=4.26
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "imbi-api"
|
|
3
|
-
version = "2.
|
|
3
|
+
version = "2.69.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"
|
|
@@ -30,7 +30,7 @@ dependencies = [
|
|
|
30
30
|
"httpx>=0.28.1,<1",
|
|
31
31
|
"httpx2>=2.16.2",
|
|
32
32
|
"idna>=3.18",
|
|
33
|
-
"imbi-common[databases,llm,mcp,script,sentry,server]==2.
|
|
33
|
+
"imbi-common[databases,llm,mcp,script,sentry,server]==2.69.0",
|
|
34
34
|
"jinja2",
|
|
35
35
|
"jsonpatch>=1.33",
|
|
36
36
|
"jsonschema>=4.26",
|
|
@@ -142,7 +142,7 @@ def index(app: fastapi.FastAPI) -> None:
|
|
|
142
142
|
for route in app.routes
|
|
143
143
|
if isinstance(route, fastapi.routing.APIRoute)
|
|
144
144
|
for method in route.methods
|
|
145
|
-
if keys.get((route.endpoint, method)) in DEFAULT_ROUTES
|
|
145
|
+
if keys.get((route.endpoint, route.path, method)) in DEFAULT_ROUTES
|
|
146
146
|
)
|
|
147
147
|
|
|
148
148
|
|
|
@@ -19,8 +19,8 @@ route and refuses it:
|
|
|
19
19
|
(:mod:`imbi.api.auth.agent_api_routes`) or refused above; a test
|
|
20
20
|
fails on an unclassified route, so a new route needs a decision;
|
|
21
21
|
- for an organization that is not the token's: the ``org_slug`` (or,
|
|
22
|
-
on the organization routes, ``slug``) path parameter
|
|
23
|
-
|
|
22
|
+
on the organization routes, ``slug``) path parameter must be the
|
|
23
|
+
token's ``org_slug`` claim. A
|
|
24
24
|
``project_id`` path parameter must name a project of that
|
|
25
25
|
organization (404 otherwise): some project routes do not check that
|
|
26
26
|
the project is in the path's organization. An allowed route with no
|
|
@@ -98,16 +98,6 @@ GLOBAL_SAFE: dict[str, str] = {
|
|
|
98
98
|
'GET /status': 'service status',
|
|
99
99
|
'GET /users/me': 'the caller itself',
|
|
100
100
|
'GET /users/me/permissions': 'the caller itself',
|
|
101
|
-
'GET /scores/history-by-team': (
|
|
102
|
-
'the required org query parameter is checked'
|
|
103
|
-
),
|
|
104
|
-
'GET /scores/history-feed': (
|
|
105
|
-
'the required org query parameter is checked'
|
|
106
|
-
),
|
|
107
|
-
'GET /scores/monthly-improvement': (
|
|
108
|
-
'the required org query parameter is checked'
|
|
109
|
-
),
|
|
110
|
-
'GET /scores/rollup': 'the required org query parameter is checked',
|
|
111
101
|
}
|
|
112
102
|
|
|
113
103
|
_PROJECT_IN_ORG: typing.LiteralString = """
|
|
@@ -131,15 +121,18 @@ def refused(module: str, method: str, key: str | None = None) -> bool:
|
|
|
131
121
|
|
|
132
122
|
def route_keys(
|
|
133
123
|
app: fastapi.FastAPI, prefix: str
|
|
134
|
-
) -> dict[tuple[typing.Any, str], str]:
|
|
135
|
-
"""``(endpoint, method)`` to ``"METHOD /template"`` (the
|
|
136
|
-
without the API prefix) for every mounted API route.
|
|
137
|
-
|
|
124
|
+
) -> dict[tuple[typing.Any, str, str], str]:
|
|
125
|
+
"""``(endpoint, path, method)`` to ``"METHOD /template"`` (the
|
|
126
|
+
template without the API prefix) for every mounted API route. The
|
|
127
|
+
path is in the key because routes can share one endpoint."""
|
|
128
|
+
keys: dict[tuple[typing.Any, str, str], str] = {}
|
|
138
129
|
for route in app.routes:
|
|
139
130
|
if isinstance(route, routing.APIRoute):
|
|
140
131
|
template = route.path.removeprefix(prefix) or '/'
|
|
141
132
|
for method in route.methods:
|
|
142
|
-
keys[(route.endpoint, method)] =
|
|
133
|
+
keys[(route.endpoint, route.path, method)] = (
|
|
134
|
+
f'{method} {template}'
|
|
135
|
+
)
|
|
143
136
|
return keys
|
|
144
137
|
|
|
145
138
|
|
|
@@ -213,15 +206,14 @@ async def _require_org(
|
|
|
213
206
|
org_slug: str,
|
|
214
207
|
error: str,
|
|
215
208
|
) -> None:
|
|
216
|
-
"""The path
|
|
217
|
-
|
|
209
|
+
"""The path organization must be ``org_slug``, and a path project
|
|
210
|
+
must be in it."""
|
|
218
211
|
params = request.path_params
|
|
219
212
|
for slug in (
|
|
220
213
|
params.get('org_slug'),
|
|
221
214
|
params.get('slug')
|
|
222
215
|
if module == 'imbi.api.endpoints.organizations'
|
|
223
216
|
else None,
|
|
224
|
-
request.query_params.get('org'),
|
|
225
217
|
):
|
|
226
218
|
if slug is not None and slug != org_slug:
|
|
227
219
|
raise _forbidden(
|
|
@@ -256,10 +248,11 @@ async def guard(
|
|
|
256
248
|
return
|
|
257
249
|
endpoint = request.scope.get('endpoint')
|
|
258
250
|
module = str(getattr(endpoint, '__module__', ''))
|
|
259
|
-
keys: dict[tuple[typing.Any, str], str] = getattr(
|
|
251
|
+
keys: dict[tuple[typing.Any, str, str], str] = getattr(
|
|
260
252
|
request.app.state, 'agent_api_routes', {}
|
|
261
253
|
)
|
|
262
|
-
|
|
254
|
+
path = getattr(request.scope.get('route'), 'path', '')
|
|
255
|
+
key = keys.get((endpoint, path, request.method))
|
|
263
256
|
org_slug: str | None
|
|
264
257
|
if core.is_agent_api_token(token):
|
|
265
258
|
error = 'agent_api_forbidden'
|
|
@@ -17,6 +17,7 @@ ALLOWED_ROUTES: frozenset[str] = frozenset(
|
|
|
17
17
|
'DELETE /organizations/{org_slug}/document-templates/{slug}',
|
|
18
18
|
'DELETE /organizations/{org_slug}/documents/{document_id}',
|
|
19
19
|
'DELETE /organizations/{org_slug}/documents/{document_id}/comments/{thread_id}/comments/{comment_id}',
|
|
20
|
+
'DELETE /organizations/{org_slug}/projects/{project_id}/documents/{document_id}/comments/{thread_id}/comments/{comment_id}',
|
|
20
21
|
'DELETE /organizations/{org_slug}/documents/{document_id}/editing',
|
|
21
22
|
'DELETE /organizations/{org_slug}/documents/{document_id}/like',
|
|
22
23
|
'DELETE /organizations/{org_slug}/environments/{slug}',
|
|
@@ -73,6 +74,7 @@ ALLOWED_ROUTES: frozenset[str] = frozenset(
|
|
|
73
74
|
'GET /organizations/{org_slug}/documents/{document_id}/analytics',
|
|
74
75
|
'GET /organizations/{org_slug}/documents/{document_id}/analytics/readers',
|
|
75
76
|
'GET /organizations/{org_slug}/documents/{document_id}/comments',
|
|
77
|
+
'GET /organizations/{org_slug}/projects/{project_id}/documents/{document_id}/comments',
|
|
76
78
|
'GET /organizations/{org_slug}/documents/{document_id}/editing',
|
|
77
79
|
'GET /organizations/{org_slug}/documents/{document_id}/likes',
|
|
78
80
|
'GET /organizations/{org_slug}/documents/{document_id}/versions',
|
|
@@ -138,13 +140,15 @@ ALLOWED_ROUTES: frozenset[str] = frozenset(
|
|
|
138
140
|
'GET /organizations/{org_slug}/projects/{project_id}/score/trend',
|
|
139
141
|
'GET /organizations/{org_slug}/projects/{project_id}/services/',
|
|
140
142
|
# The prompts the organization uses: its own and the defaults.
|
|
141
|
-
# The routes of one prompt share their handlers with
|
|
142
|
-
# /prompts/..., so they have the keys of those routes.
|
|
143
143
|
'GET /organizations/{org_slug}/prompts/',
|
|
144
144
|
'GET /organizations/{org_slug}/pull-requests/',
|
|
145
145
|
'GET /organizations/{org_slug}/pull-requests/activity',
|
|
146
146
|
'GET /organizations/{org_slug}/pull-requests/pending-deploy',
|
|
147
147
|
'GET /organizations/{org_slug}/reports/problem-packages',
|
|
148
|
+
'GET /organizations/{org_slug}/scores/history-by-team',
|
|
149
|
+
'GET /organizations/{org_slug}/scores/history-feed',
|
|
150
|
+
'GET /organizations/{org_slug}/scores/monthly-improvement',
|
|
151
|
+
'GET /organizations/{org_slug}/scores/rollup',
|
|
148
152
|
'GET /organizations/{org_slug}/search',
|
|
149
153
|
'GET /organizations/{org_slug}/tags/',
|
|
150
154
|
'GET /organizations/{org_slug}/tags/{tag_slug}',
|
|
@@ -168,10 +172,6 @@ ALLOWED_ROUTES: frozenset[str] = frozenset(
|
|
|
168
172
|
'GET /organizations/{slug}',
|
|
169
173
|
'GET /organizations/{slug}/members',
|
|
170
174
|
'GET /plugins/{slug}/manifest',
|
|
171
|
-
'GET /scores/history-by-team',
|
|
172
|
-
'GET /scores/history-feed',
|
|
173
|
-
'GET /scores/monthly-improvement',
|
|
174
|
-
'GET /scores/rollup',
|
|
175
175
|
'GET /scoring/policies/',
|
|
176
176
|
'GET /scoring/policies/{slug}',
|
|
177
177
|
'GET /status',
|
|
@@ -180,7 +180,9 @@ ALLOWED_ROUTES: frozenset[str] = frozenset(
|
|
|
180
180
|
'PATCH /organizations/{org_slug}/document-templates/{slug}',
|
|
181
181
|
'PATCH /organizations/{org_slug}/documents/{document_id}',
|
|
182
182
|
'PATCH /organizations/{org_slug}/documents/{document_id}/comments/{thread_id}',
|
|
183
|
+
'PATCH /organizations/{org_slug}/projects/{project_id}/documents/{document_id}/comments/{thread_id}',
|
|
183
184
|
'PATCH /organizations/{org_slug}/documents/{document_id}/comments/{thread_id}/comments/{comment_id}',
|
|
185
|
+
'PATCH /organizations/{org_slug}/projects/{project_id}/documents/{document_id}/comments/{thread_id}/comments/{comment_id}',
|
|
184
186
|
'PATCH /organizations/{org_slug}/environments/{slug}',
|
|
185
187
|
'PATCH /organizations/{org_slug}/link-definitions/{slug}',
|
|
186
188
|
'PATCH /organizations/{org_slug}/project-types/{slug}',
|
|
@@ -194,8 +196,11 @@ ALLOWED_ROUTES: frozenset[str] = frozenset(
|
|
|
194
196
|
'POST /organizations/{org_slug}/operations-log/',
|
|
195
197
|
'POST /organizations/{org_slug}/document-templates/',
|
|
196
198
|
'POST /organizations/{org_slug}/documents/{document_id}/comments',
|
|
199
|
+
'POST /organizations/{org_slug}/projects/{project_id}/documents/{document_id}/comments',
|
|
197
200
|
'POST /organizations/{org_slug}/documents/{document_id}/comments/{thread_id}/comments',
|
|
201
|
+
'POST /organizations/{org_slug}/projects/{project_id}/documents/{document_id}/comments/{thread_id}/comments',
|
|
198
202
|
'POST /organizations/{org_slug}/documents/{document_id}/comments/{thread_id}/comments/{comment_id}/acknowledge',
|
|
203
|
+
'POST /organizations/{org_slug}/projects/{project_id}/documents/{document_id}/comments/{thread_id}/comments/{comment_id}/acknowledge',
|
|
199
204
|
'POST /organizations/{org_slug}/documents/{document_id}/read-events',
|
|
200
205
|
'POST /organizations/{org_slug}/documents/{document_id}/versions/{version}/restore',
|
|
201
206
|
'POST /organizations/{org_slug}/environments/',
|
|
@@ -274,6 +279,16 @@ REFUSED_ROUTES: frozenset[str] = frozenset(
|
|
|
274
279
|
'POST /organizations/{org_slug}/prompts/',
|
|
275
280
|
'POST /organizations/{org_slug}/prompts/run',
|
|
276
281
|
'POST /organizations/{org_slug}/prompts/{namespace}/{slug}/override',
|
|
282
|
+
'DELETE /organizations/{org_slug}/prompts/{namespace}/{slug}',
|
|
283
|
+
'DELETE /organizations/{org_slug}/prompts/{namespace}/{slug}/labels/{label}',
|
|
284
|
+
'GET /organizations/{org_slug}/prompts/resolve',
|
|
285
|
+
'GET /organizations/{org_slug}/prompts/{namespace}/{slug}',
|
|
286
|
+
'GET /organizations/{org_slug}/prompts/{namespace}/{slug}/versions',
|
|
287
|
+
'GET /organizations/{org_slug}/prompts/{namespace}/{slug}/versions/{n}',
|
|
288
|
+
'POST /organizations/{org_slug}/prompts/{namespace}/{slug}/versions',
|
|
289
|
+
'PUT /organizations/{org_slug}/prompts/{namespace}/{slug}/default-label',
|
|
290
|
+
'PUT /organizations/{org_slug}/prompts/{namespace}/{slug}/labels/{label}',
|
|
291
|
+
'PUT /organizations/{org_slug}/prompts/{namespace}/{slug}/versions/{n}/evaluation',
|
|
277
292
|
'POST /prompts/',
|
|
278
293
|
'POST /prompts/{namespace}/{slug}/versions',
|
|
279
294
|
'PUT /organizations/{org_slug}/agent-platform-config/',
|
|
@@ -293,6 +308,7 @@ REFUSED_ROUTES: frozenset[str] = frozenset(
|
|
|
293
308
|
'DELETE /organizations/{org_slug}/tickets/{short_id}/links',
|
|
294
309
|
'DELETE /organizations/{org_slug}/tickets/{short_id}/projects/{project_id}',
|
|
295
310
|
'DELETE /organizations/{org_slug}/tickets/{short_id}/requires/{prerequisite}',
|
|
311
|
+
'DELETE /organizations/{org_slug}/tickets/{short_id}/slack-channel',
|
|
296
312
|
'PATCH /organizations/{org_slug}/tickets/{short_id}',
|
|
297
313
|
'POST /organizations/{org_slug}/tickets/',
|
|
298
314
|
'POST /organizations/{org_slug}/tickets/subject',
|
|
@@ -309,10 +325,12 @@ REFUSED_ROUTES: frozenset[str] = frozenset(
|
|
|
309
325
|
'POST /organizations/{org_slug}/tickets/{short_id}/requests/{request_id}/resolve',
|
|
310
326
|
'POST /organizations/{org_slug}/tickets/{short_id}/resume',
|
|
311
327
|
'POST /organizations/{org_slug}/tickets/{short_id}/retry',
|
|
328
|
+
'POST /organizations/{org_slug}/tickets/{short_id}/slack-channel/start',
|
|
312
329
|
'POST /organizations/{org_slug}/tickets/{short_id}/status',
|
|
313
330
|
'PUT /organizations/{org_slug}/tickets/{short_id}/parent',
|
|
314
331
|
'PUT /organizations/{org_slug}/tickets/{short_id}/projects/{project_id}',
|
|
315
332
|
'PUT /organizations/{org_slug}/tickets/{short_id}/requires/{prerequisite}',
|
|
333
|
+
'PUT /organizations/{org_slug}/tickets/{short_id}/slack-channel',
|
|
316
334
|
# Credentials and data outside Imbi: integrations, project integration assignments, webhooks, project configuration stores (values:fetch and history:fetch return secret values)
|
|
317
335
|
'DELETE /organizations/{org_slug}/integrations/{slug}',
|
|
318
336
|
'DELETE /organizations/{org_slug}/projects/{project_id}/configuration/{key:path}',
|
|
@@ -350,9 +368,14 @@ REFUSED_ROUTES: frozenset[str] = frozenset(
|
|
|
350
368
|
'POST /organizations/{org_slug}/workflows/{slug}/runs/{run_id}/steps/{node_id}/agent-task',
|
|
351
369
|
'POST /organizations/{org_slug}/workflows/{slug}/runs/{run_id}/steps/{node_id}/agent-task/cancel',
|
|
352
370
|
'POST /organizations/{org_slug}/workflows/{slug}/runs/{run_id}/steps/{node_id}/assign-ticket',
|
|
371
|
+
'POST /organizations/{org_slug}/workflows/{slug}/runs/{run_id}/steps/{node_id}/create-ticket',
|
|
353
372
|
'POST /organizations/{org_slug}/workflows/{slug}/runs/{run_id}/steps/{node_id}/email',
|
|
373
|
+
'POST /organizations/{org_slug}/workflows/{slug}/runs/{run_id}/steps/{node_id}/get-ticket',
|
|
354
374
|
'POST /organizations/{org_slug}/workflows/{slug}/runs/{run_id}/steps/{node_id}/retry',
|
|
375
|
+
'POST /organizations/{org_slug}/workflows/{slug}/runs/{run_id}/steps/{node_id}/run-workflow',
|
|
376
|
+
'POST /organizations/{org_slug}/workflows/{slug}/runs/{run_id}/steps/{node_id}/run-workflow/cancel',
|
|
355
377
|
'POST /organizations/{org_slug}/workflows/{slug}/runs/{run_id}/steps/{node_id}/slack',
|
|
378
|
+
'POST /organizations/{org_slug}/workflows/{slug}/runs/{run_id}/steps/{node_id}/update-ticket',
|
|
356
379
|
'GET /organizations/{org_slug}/workflow-runs/side-effects/deployments',
|
|
357
380
|
'POST /organizations/{org_slug}/workflow-runs/side-effects/resolve',
|
|
358
381
|
'POST /organizations/{org_slug}/workflows/{slug}/test-runs',
|
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
"""Membership of the organization in the request path.
|
|
2
2
|
|
|
3
|
-
Most permissions are not scoped to an organization.
|
|
4
|
-
``/organizations/{org_slug}/...``
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
``
|
|
9
|
-
|
|
3
|
+
Most permissions are not scoped to an organization. Most routers
|
|
4
|
+
mounted at ``/organizations/{org_slug}/...`` are in ``org_router``
|
|
5
|
+
(:mod:`imbi.api.endpoints.organizations`), which has
|
|
6
|
+
:func:`member_org_id` as a router dependency, so that a caller can
|
|
7
|
+
only use the routes of an organization that they are a member of
|
|
8
|
+
(``MEMBER_OF``). Three mounts are outside it and add their own check:
|
|
9
|
+
the document presence and document analytics routers use
|
|
10
|
+
:func:`member_org_id` on a direct mount, and the ticket harness router
|
|
11
|
+
uses ``harness_member_org_id`` on a direct mount. A
|
|
12
|
+
caller that is not a member gets ``403 organization_forbidden``, as in
|
|
13
|
+
:mod:`imbi.api.auth.autonomous`. There is no admin bypass.
|
|
10
14
|
|
|
11
15
|
A member's permissions on these routes are those of their role in that
|
|
12
16
|
organization only (issue #455): :func:`check_member` narrows
|
|
@@ -16,13 +20,16 @@ the route's own, so each ``require_permission`` check sees the narrowed
|
|
|
16
20
|
set.
|
|
17
21
|
"""
|
|
18
22
|
|
|
23
|
+
import hashlib
|
|
19
24
|
import logging
|
|
25
|
+
import time
|
|
20
26
|
import typing
|
|
21
27
|
|
|
22
28
|
import fastapi
|
|
29
|
+
import pydantic
|
|
23
30
|
|
|
24
31
|
from imbi.api.auth import autonomous, permissions
|
|
25
|
-
from imbi.common import graph
|
|
32
|
+
from imbi.common import graph, valkey
|
|
26
33
|
from imbi.common.auth import permissions as common_permissions
|
|
27
34
|
|
|
28
35
|
LOGGER = logging.getLogger(__name__)
|
|
@@ -34,6 +41,21 @@ OPTIONAL MATCH (u:User {{email: {email}}})-[:MEMBER_OF]->(o)
|
|
|
34
41
|
RETURN o.id AS id, u IS NOT NULL AS member
|
|
35
42
|
"""
|
|
36
43
|
|
|
44
|
+
#: How long :func:`cached_member_org_id` keeps a positive result.
|
|
45
|
+
#: A user who is removed from an organization, or whose role changes,
|
|
46
|
+
#: can keep the old access on these routes for this long.
|
|
47
|
+
MEMBER_CACHE_TTL_SECONDS = 30
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
class _CachedMembership(pydantic.BaseModel):
|
|
51
|
+
"""A :func:`cached_member_org_id` entry in Valkey."""
|
|
52
|
+
|
|
53
|
+
org_id: typing.Annotated[str, pydantic.Field(min_length=1)]
|
|
54
|
+
permissions: list[str]
|
|
55
|
+
#: Wall-clock (``time.time()``) end of the entry. The Valkey expiry
|
|
56
|
+
#: starts when the write arrives, so a slow write can outlive it.
|
|
57
|
+
expires_at: float
|
|
58
|
+
|
|
37
59
|
|
|
38
60
|
def organization_id(value: object, slug: str) -> str:
|
|
39
61
|
"""The id of an organization node, parsed.
|
|
@@ -103,6 +125,109 @@ async def member_org_id(
|
|
|
103
125
|
return await check_member(org_slug, db, auth)
|
|
104
126
|
|
|
105
127
|
|
|
128
|
+
async def cached_member_org_id(
|
|
129
|
+
org_slug: str,
|
|
130
|
+
db: graph.Pool,
|
|
131
|
+
auth: typing.Annotated[
|
|
132
|
+
permissions.AuthContext, fastapi.Depends(permissions.get_current_user)
|
|
133
|
+
],
|
|
134
|
+
) -> str:
|
|
135
|
+
""":func:`member_org_id` that keeps a positive result for a user in
|
|
136
|
+
Valkey for :data:`MEMBER_CACHE_TTL_SECONDS`. A refusal is not kept.
|
|
137
|
+
|
|
138
|
+
Only for the document heartbeat routes, which a client calls every
|
|
139
|
+
few seconds (issue #1112). A removed or changed member keeps the old
|
|
140
|
+
access for the TTL, so use it only on routes that read data or
|
|
141
|
+
record the caller's own activity.
|
|
142
|
+
|
|
143
|
+
Raises:
|
|
144
|
+
403: The caller is not a member of the organization.
|
|
145
|
+
404: No such organization.
|
|
146
|
+
|
|
147
|
+
"""
|
|
148
|
+
key = _member_cache_key(org_slug, auth)
|
|
149
|
+
client = None
|
|
150
|
+
if key is not None:
|
|
151
|
+
try:
|
|
152
|
+
client = valkey.get_client()
|
|
153
|
+
cached = await client.get(key)
|
|
154
|
+
except Exception: # noqa: BLE001
|
|
155
|
+
LOGGER.debug('membership cache read failed', exc_info=True)
|
|
156
|
+
client = cached = None
|
|
157
|
+
if cached is not None:
|
|
158
|
+
try:
|
|
159
|
+
entry = _CachedMembership.model_validate_json(cached)
|
|
160
|
+
except pydantic.ValidationError:
|
|
161
|
+
LOGGER.debug('discarding malformed membership cache entry')
|
|
162
|
+
else:
|
|
163
|
+
if time.time() < entry.expires_at:
|
|
164
|
+
auth.permissions = set(entry.permissions)
|
|
165
|
+
return entry.org_id
|
|
166
|
+
# The TTL counts from the graph read, so a slow read or write does
|
|
167
|
+
# not make the entry live longer than the TTL after it.
|
|
168
|
+
expires_at = time.time() + MEMBER_CACHE_TTL_SECONDS
|
|
169
|
+
org_id = await check_member(org_slug, db, auth)
|
|
170
|
+
ttl_ms = int((expires_at - time.time()) * 1000)
|
|
171
|
+
if client is not None and key is not None and ttl_ms > 0:
|
|
172
|
+
try:
|
|
173
|
+
await client.set(
|
|
174
|
+
key,
|
|
175
|
+
_CachedMembership(
|
|
176
|
+
org_id=org_id,
|
|
177
|
+
permissions=sorted(auth.permissions),
|
|
178
|
+
expires_at=expires_at,
|
|
179
|
+
).model_dump_json(),
|
|
180
|
+
px=ttl_ms,
|
|
181
|
+
)
|
|
182
|
+
except Exception: # noqa: BLE001
|
|
183
|
+
LOGGER.debug('membership cache write failed', exc_info=True)
|
|
184
|
+
return org_id
|
|
185
|
+
|
|
186
|
+
|
|
187
|
+
def _member_cache_key(
|
|
188
|
+
org_slug: str, auth: permissions.AuthContext
|
|
189
|
+
) -> str | None:
|
|
190
|
+
"""The cache key of a membership result, or ``None`` when the
|
|
191
|
+
result is not cached.
|
|
192
|
+
|
|
193
|
+
The key has the permissions before :func:`check_member` narrows
|
|
194
|
+
them, because an API key with fewer scopes gets fewer permissions.
|
|
195
|
+
Only users are cached: a service account, or a request on behalf of
|
|
196
|
+
another principal, has more checks than the key holds.
|
|
197
|
+
"""
|
|
198
|
+
if auth.user is None or auth.on_behalf_of is not None:
|
|
199
|
+
return None
|
|
200
|
+
scopes = hashlib.sha256(
|
|
201
|
+
'\n'.join(sorted(auth.permissions)).encode()
|
|
202
|
+
).hexdigest()[:16]
|
|
203
|
+
return f'imbi:org-member:{org_slug}:{auth.user.email}:{scopes}'
|
|
204
|
+
|
|
205
|
+
|
|
206
|
+
async def forget_member_cache(org_slug: str) -> None:
|
|
207
|
+
"""Remove the cached membership results of ``org_slug``.
|
|
208
|
+
|
|
209
|
+
Call this when an organization is deleted or its slug changes, so
|
|
210
|
+
that a new organization with the slug does not accept a member of
|
|
211
|
+
the old one. ponytail: a check that read the graph before the
|
|
212
|
+
change can still write an entry after this; it expires after
|
|
213
|
+
:data:`MEMBER_CACHE_TTL_SECONDS`.
|
|
214
|
+
"""
|
|
215
|
+
try:
|
|
216
|
+
client = valkey.get_client()
|
|
217
|
+
keys: list[bytes | str] = [
|
|
218
|
+
key # pyright: ignore[reportUnknownVariableType]
|
|
219
|
+
async for key in client.scan_iter( # pyright: ignore[reportUnknownMemberType,reportUnknownVariableType]
|
|
220
|
+
match=f'imbi:org-member:{org_slug}:*'
|
|
221
|
+
)
|
|
222
|
+
]
|
|
223
|
+
if keys:
|
|
224
|
+
await client.delete(*keys)
|
|
225
|
+
except Exception: # noqa: BLE001
|
|
226
|
+
LOGGER.warning(
|
|
227
|
+
'membership cache purge for %r failed', org_slug, exc_info=True
|
|
228
|
+
)
|
|
229
|
+
|
|
230
|
+
|
|
106
231
|
async def check_member(
|
|
107
232
|
org_slug: str, db: graph.Graph, auth: permissions.AuthContext
|
|
108
233
|
) -> str:
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
"""Fill the organization in on ClickHouse rows written before they had it.
|
|
2
|
+
|
|
3
|
+
The ``clickhouse-org-backfill`` maintenance operation runs
|
|
4
|
+
:func:`backfill` after the upgrade that added ``organization_id``. A row
|
|
5
|
+
gets the id of the organization that owns its project now. A row whose
|
|
6
|
+
project is gone, or that has no project, keeps ``''``. :func:`fill` is
|
|
7
|
+
also what ``document-clickhouse-org-backfill`` uses.
|
|
8
|
+
"""
|
|
9
|
+
|
|
10
|
+
import logging
|
|
11
|
+
import typing
|
|
12
|
+
|
|
13
|
+
from imbi.common import clickhouse, graph
|
|
14
|
+
|
|
15
|
+
LOGGER = logging.getLogger(__name__)
|
|
16
|
+
|
|
17
|
+
#: The tables that key on ``project_id``. ``email_audit`` is not here:
|
|
18
|
+
#: its rows have no project.
|
|
19
|
+
TABLES: tuple[str, ...] = (
|
|
20
|
+
'events',
|
|
21
|
+
'pull_requests',
|
|
22
|
+
'pull_request_reviews',
|
|
23
|
+
'pull_request_review_requests',
|
|
24
|
+
'score_history',
|
|
25
|
+
'commits',
|
|
26
|
+
'commit_drift',
|
|
27
|
+
'tags',
|
|
28
|
+
'maintenance_log',
|
|
29
|
+
)
|
|
30
|
+
|
|
31
|
+
#: Keys per mutation. ClickHouse rejects a bound parameter longer than
|
|
32
|
+
#: 131072 bytes, and an id array of this size is about 50 KB.
|
|
33
|
+
CHUNK = 2000
|
|
34
|
+
|
|
35
|
+
_PROJECTS: typing.LiteralString = (
|
|
36
|
+
'MATCH (p:Project)-[:OWNED_BY]->(:Team)-[:BELONGS_TO]->(o:Organization)'
|
|
37
|
+
' WHERE o.id IS NOT NULL RETURN p.id AS project_id, o.id AS org_id'
|
|
38
|
+
)
|
|
39
|
+
|
|
40
|
+
#: Rebuilds the state of each project in ``score_latest_org_data`` from
|
|
41
|
+
#: ``score_history``. The same statement is the
|
|
42
|
+
#: ``score_latest_org_data_populate`` step of the schemata. It runs
|
|
43
|
+
#: again here after ``score_history`` is filled in, because a mutation
|
|
44
|
+
#: does not go through the materialized view. Every state is ``argMax``
|
|
45
|
+
#: or ``max``, so a row that the view or an earlier run wrote does not
|
|
46
|
+
#: change the result.
|
|
47
|
+
SCORE_LATEST_POPULATE = (
|
|
48
|
+
'INSERT INTO imbi.score_latest_org_data'
|
|
49
|
+
' SELECT project_id, argMaxState(score, timestamp),'
|
|
50
|
+
' maxState(timestamp),'
|
|
51
|
+
' argMaxState(organization_id, (timestamp, organization_id))'
|
|
52
|
+
' FROM imbi.score_history GROUP BY project_id'
|
|
53
|
+
)
|
|
54
|
+
|
|
55
|
+
#: A workflow email is the only email to an organization, and every
|
|
56
|
+
#: workflow email written after the upgrade has its organization. So a
|
|
57
|
+
#: workflow row without one is from before the upgrade, and its
|
|
58
|
+
#: organization cannot be found. A welcome or password reset email is
|
|
59
|
+
#: to a user and keeps ``''`` before and after the upgrade, so those
|
|
60
|
+
#: rows are not deleted.
|
|
61
|
+
_EMAIL_COUNT = (
|
|
62
|
+
'SELECT count() AS c FROM imbi.email_audit'
|
|
63
|
+
" WHERE organization_id = '' AND template_name = 'workflow'"
|
|
64
|
+
)
|
|
65
|
+
_EMAIL_DELETE = (
|
|
66
|
+
'ALTER TABLE imbi.email_audit DELETE'
|
|
67
|
+
" WHERE organization_id = '' AND template_name = 'workflow'"
|
|
68
|
+
' SETTINGS mutations_sync = 2'
|
|
69
|
+
)
|
|
70
|
+
|
|
71
|
+
_WHERE = "{column} = '' AND has({{keys:Array(String)}}, {key})"
|
|
72
|
+
_COUNT = 'SELECT count() AS c FROM imbi.{table} WHERE {where}'
|
|
73
|
+
_FILL = (
|
|
74
|
+
'ALTER TABLE imbi.{table} UPDATE {column} = transform('
|
|
75
|
+
"{key}, {{keys:Array(String)}}, {{values:Array(String)}}, '')"
|
|
76
|
+
' WHERE ' + _WHERE + ' SETTINGS mutations_sync = 2'
|
|
77
|
+
)
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
async def fill(
|
|
81
|
+
table: str, column: str, key: str, pairs: list[tuple[str, str]]
|
|
82
|
+
) -> int:
|
|
83
|
+
"""Set ``column`` from ``key`` by the ``(key, value)`` pairs on the
|
|
84
|
+
rows where it is ``''``; return the count of rows changed.
|
|
85
|
+
|
|
86
|
+
Two parallel arrays, not a Map: the driver sends a dict parameter
|
|
87
|
+
as JSON, which ClickHouse cannot parse as a Map. ``mutations_sync =
|
|
88
|
+
2`` waits until every replica has the change, so the next chunk and
|
|
89
|
+
the next run see it. Only rows with no value match, so a re-run
|
|
90
|
+
changes nothing that an earlier run filled in.
|
|
91
|
+
"""
|
|
92
|
+
names = {'table': table, 'column': column, 'key': key}
|
|
93
|
+
count = _COUNT.format(table=table, where=_WHERE.format(**names))
|
|
94
|
+
changed = 0
|
|
95
|
+
for start in range(0, len(pairs), CHUNK):
|
|
96
|
+
chunk = pairs[start : start + CHUNK]
|
|
97
|
+
params = {
|
|
98
|
+
'keys': [k for k, _ in chunk],
|
|
99
|
+
'values': [v for _, v in chunk],
|
|
100
|
+
}
|
|
101
|
+
rows = await clickhouse.query(count, params)
|
|
102
|
+
missing = int(rows[0]['c']) if rows else 0
|
|
103
|
+
if missing:
|
|
104
|
+
await clickhouse.command(_FILL.format(**names), params)
|
|
105
|
+
changed += missing
|
|
106
|
+
return changed
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
async def backfill(db: graph.Graph) -> int:
|
|
110
|
+
"""Fill ``organization_id`` in on the project rows that have none,
|
|
111
|
+
rebuild ``score_latest_org_data``, and delete the workflow email
|
|
112
|
+
rows that have none; return the count of rows changed."""
|
|
113
|
+
records = await db.execute(_PROJECTS, {}, ['project_id', 'org_id'])
|
|
114
|
+
pairs = [
|
|
115
|
+
(
|
|
116
|
+
str(graph.parse_agtype(r['project_id'])),
|
|
117
|
+
str(graph.parse_agtype(r['org_id'])),
|
|
118
|
+
)
|
|
119
|
+
for r in records
|
|
120
|
+
]
|
|
121
|
+
changed = 0
|
|
122
|
+
for table in TABLES:
|
|
123
|
+
changed += await fill(table, 'organization_id', 'project_id', pairs)
|
|
124
|
+
await clickhouse.command(SCORE_LATEST_POPULATE)
|
|
125
|
+
rows = await clickhouse.query(_EMAIL_COUNT)
|
|
126
|
+
deleted = int(rows[0]['c']) if rows else 0
|
|
127
|
+
if deleted:
|
|
128
|
+
await clickhouse.command(_EMAIL_DELETE)
|
|
129
|
+
changed += deleted
|
|
130
|
+
if changed:
|
|
131
|
+
LOGGER.info(
|
|
132
|
+
'Filled organization_id in on or deleted %d ClickHouse rows',
|
|
133
|
+
changed,
|
|
134
|
+
)
|
|
135
|
+
return changed
|
|
@@ -78,7 +78,7 @@ async def _build_context(
|
|
|
78
78
|
# never pulls the endpoints package at import time.
|
|
79
79
|
from imbi.api.endpoints import _helpers
|
|
80
80
|
|
|
81
|
-
project_slug, team_slug = await _helpers.
|
|
81
|
+
project_slug, team_slug, org_id = await _helpers.lookup_project_owner(
|
|
82
82
|
db, project_id
|
|
83
83
|
)
|
|
84
84
|
project_links = await _helpers.lookup_project_links(db, project_id)
|
|
@@ -96,6 +96,7 @@ async def _build_context(
|
|
|
96
96
|
project_id=project_id,
|
|
97
97
|
project_slug=project_slug,
|
|
98
98
|
org_slug=org_slug,
|
|
99
|
+
org_id=org_id,
|
|
99
100
|
team_slug=team_slug,
|
|
100
101
|
project_links=project_links,
|
|
101
102
|
project_type_slugs=project_type_slugs,
|
|
@@ -16,6 +16,7 @@ organizations) is logged and keeps no edge: no organization shows it.
|
|
|
16
16
|
import logging
|
|
17
17
|
import typing
|
|
18
18
|
|
|
19
|
+
from imbi.api import clickhouse_orgs
|
|
19
20
|
from imbi.common import graph
|
|
20
21
|
|
|
21
22
|
LOGGER = logging.getLogger(__name__)
|
|
@@ -64,3 +65,37 @@ async def backfill(db: graph.Graph) -> int:
|
|
|
64
65
|
if linked:
|
|
65
66
|
LOGGER.info('Linked %d documents to an organization', linked)
|
|
66
67
|
return linked
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
# The ClickHouse read rows written before they had ``org_id``, matched
|
|
71
|
+
# on their org slug (see :func:`imbi.api.clickhouse_orgs.fill`).
|
|
72
|
+
_READ_TABLES: tuple[str, ...] = (
|
|
73
|
+
'document_read_events',
|
|
74
|
+
'document_read_sessions',
|
|
75
|
+
)
|
|
76
|
+
_ORGS: typing.LiteralString = (
|
|
77
|
+
'MATCH (o:Organization) WHERE o.id IS NOT NULL'
|
|
78
|
+
' RETURN o.slug AS slug, o.id AS id'
|
|
79
|
+
)
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
async def clickhouse_backfill(db: graph.Graph) -> int:
|
|
83
|
+
"""Fill ``org_id`` in on the document read rows in ClickHouse that
|
|
84
|
+
have none, from their org slug; return the count of rows changed.
|
|
85
|
+
|
|
86
|
+
A row of an organization that no longer has its slug keeps no
|
|
87
|
+
``org_id``.
|
|
88
|
+
"""
|
|
89
|
+
records = await db.execute(_ORGS, {}, ['slug', 'id'])
|
|
90
|
+
pairs = [
|
|
91
|
+
(str(graph.parse_agtype(r['slug'])), str(graph.parse_agtype(r['id'])))
|
|
92
|
+
for r in records
|
|
93
|
+
]
|
|
94
|
+
changed = 0
|
|
95
|
+
for table in _READ_TABLES:
|
|
96
|
+
changed += await clickhouse_orgs.fill(
|
|
97
|
+
table, 'org_id', 'org_slug', pairs
|
|
98
|
+
)
|
|
99
|
+
if changed:
|
|
100
|
+
LOGGER.info('Filled org_id in on %d document read rows', changed)
|
|
101
|
+
return changed
|
|
@@ -170,6 +170,7 @@ async def record_verdicts(
|
|
|
170
170
|
*,
|
|
171
171
|
source: str = 'note',
|
|
172
172
|
recorded_at: collections.abc.Mapping[str, datetime.datetime] | None = None,
|
|
173
|
+
organization_id: str,
|
|
173
174
|
) -> int | None:
|
|
174
175
|
"""Persist per-commit verdicts, one publish for the whole batch.
|
|
175
176
|
|
|
@@ -205,6 +206,7 @@ async def record_verdicts(
|
|
|
205
206
|
'drift_detected': verdict.drift_detected,
|
|
206
207
|
'paths': verdict.paths,
|
|
207
208
|
'recorded_at': stamps.get(sha.lower(), now),
|
|
209
|
+
'organization_id': organization_id,
|
|
208
210
|
}
|
|
209
211
|
if source != 'note':
|
|
210
212
|
row['source'] = source
|
|
@@ -383,6 +385,7 @@ async def apply_notes_diff(
|
|
|
383
385
|
await record_verdicts(
|
|
384
386
|
project_id,
|
|
385
387
|
{sha: parse_note_verdict(body) for sha, body in changed.items()},
|
|
388
|
+
organization_id=ctx.org_id,
|
|
386
389
|
)
|
|
387
390
|
updated = 0
|
|
388
391
|
for full_sha, body in changed.items():
|
|
@@ -482,6 +485,7 @@ async def backfill_verdicts(
|
|
|
482
485
|
recorded = await record_verdicts(
|
|
483
486
|
project_id,
|
|
484
487
|
{sha: parse_note_verdict(body) for sha, body in listing.notes.items()},
|
|
488
|
+
organization_id=ctx.org_id,
|
|
485
489
|
)
|
|
486
490
|
if recorded is None:
|
|
487
491
|
# Raised rather than returned as zero: the caller cannot tell a
|
|
@@ -769,7 +773,11 @@ async def resync_verdicts(
|
|
|
769
773
|
for sha, verdict in verdicts.items()
|
|
770
774
|
if sha.lower() not in raced
|
|
771
775
|
}
|
|
772
|
-
recorded = await record_verdicts(
|
|
776
|
+
recorded = await record_verdicts(
|
|
777
|
+
project_id,
|
|
778
|
+
verdicts,
|
|
779
|
+
organization_id=ctx.org_id,
|
|
780
|
+
)
|
|
773
781
|
if recorded is None:
|
|
774
782
|
raise RuntimeError(
|
|
775
783
|
f'could not store drift verdicts for project {project_id}'
|