imbi-api 2.69.0__tar.gz → 2.70.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.69.0 → imbi_api-2.70.0}/PKG-INFO +2 -2
- {imbi_api-2.69.0 → imbi_api-2.70.0}/pyproject.toml +2 -2
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/auth/seed.py +17 -2
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/clickhouse_orgs.py +35 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/endpoints/organizations.py +16 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/endpoints/prompts.py +39 -3
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/endpoints/workflow_runs.py +5 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/maintenance/operations.py +55 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/maintenance/registry.py +42 -0
- imbi_api-2.70.0/src/imbi/api/org_purge.py +112 -0
- imbi_api-2.70.0/src/imbi/api/orphan_purge.py +128 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/settings.py +30 -1
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/auth/test_seed.py +6 -3
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/endpoints/test_prompt_generative.py +31 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/endpoints/test_workflow_run_workflow.py +45 -0
- imbi_api-2.70.0/tests/test_org_purge.py +160 -0
- imbi_api-2.70.0/tests/test_orphan_purge.py +166 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/.gitignore +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/README.md +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/moon.yml +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/README.md +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/__init__.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/agent_tools.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/ai_catalog_orgs.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/app.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/auth/__init__.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/auth/agent_api.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/auth/agent_api_routes.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/auth/authorization_codes.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/auth/autonomous.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/auth/internal_services.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/auth/local_auth.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/auth/login_providers.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/auth/membership.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/auth/models.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/auth/oauth_clients.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/auth/organizations.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/auth/password.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/auth/permissions.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/auth/principals.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/auth/sessions.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/auth/tokens.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/auth/totp.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/blueprint_attributes.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/blueprint_compliance.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/blueprint_sections.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/blueprint_values.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/commit_sync/__init__.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/commit_sync/queue.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/commit_sync/service.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/component_facts.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/component_governance_orgs.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/conversation_orgs.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/cves.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/deployment_sweeper.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/deployment_sync/__init__.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/deployment_sync/queue.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/deployment_sync/service.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/document_orgs.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/documents/__init__.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/documents/read_sweeper.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/domain/__init__.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/domain/models.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/domain/scoring.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/drift.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/drift_classifier.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/email/__init__.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/email/client.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/email/dependencies.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/email/models.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/email/templates/base.html +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/email/templates/base.txt +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/email/templates/password_reset.html +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/email/templates/password_reset.txt +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/email/templates/welcome.html +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/email/templates/welcome.txt +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/email/templates.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/endpoints/__init__.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/endpoints/_credentials.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/endpoints/_document_events.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/endpoints/_document_history.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/endpoints/_document_reads.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/endpoints/_document_scope.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/endpoints/_helpers.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/endpoints/_json_fields.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/endpoints/_local_time.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/endpoints/_pagination.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/endpoints/_request_urls.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/endpoints/_search_index.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/endpoints/admin.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/endpoints/admin_plugins.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/endpoints/agent_platform.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/endpoints/agent_usage.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/endpoints/agents.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/endpoints/ai_model_defaults.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/endpoints/ai_models.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/endpoints/ai_providers.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/endpoints/ai_proxy.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/endpoints/api_keys.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/endpoints/auth.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/endpoints/auth_providers.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/endpoints/blueprints.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/endpoints/client_credentials.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/endpoints/comments.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/endpoints/components.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/endpoints/cves.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/endpoints/dashboard.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/endpoints/document_analytics.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/endpoints/document_likes.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/endpoints/document_presence.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/endpoints/document_templates.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/endpoints/document_versions.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/endpoints/documents.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/endpoints/environments.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/endpoints/events.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/endpoints/graph_query.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/endpoints/harness.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/endpoints/iggy_connectors.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/endpoints/integration_workflow_steps.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/endpoints/integrations.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/endpoints/link_definitions.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/endpoints/local_auth.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/endpoints/maintenance.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/endpoints/mcp_servers.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/endpoints/mfa.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/endpoints/oauth_metadata.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/endpoints/operations_log.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/endpoints/plugin_edges.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/endpoints/plugin_entities.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/endpoints/plugins.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/endpoints/project_analysis.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/endpoints/project_commit_sync.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/endpoints/project_configuration.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/endpoints/project_deployments.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/endpoints/project_incidents.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/endpoints/project_integrations.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/endpoints/project_lifecycle.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/endpoints/project_logs.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/endpoints/project_plugins.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/endpoints/project_pr_sync.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/endpoints/project_stars.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/endpoints/project_types.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/endpoints/projects.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/endpoints/pull_requests.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/endpoints/release_periods.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/endpoints/releases.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/endpoints/roles.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/endpoints/sa_api_keys.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/endpoints/scoring.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/endpoints/scoring_policies.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/endpoints/search.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/endpoints/secret_broker.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/endpoints/service_accounts.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/endpoints/status.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/endpoints/tags.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/endpoints/teams.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/endpoints/ticket_harness.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/endpoints/tickets.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/endpoints/uploads.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/endpoints/user_activity.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/endpoints/users.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/endpoints/webhooks.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/endpoints/workflows.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/entrypoint.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/graph_sql.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/harness/__init__.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/harness/auth.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/harness/egress.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/harness/marketplaces.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/harness/metrics.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/harness/platform.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/harness/schemata.toml +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/harness/store.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/harness/sweeper.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/harness/tokens.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/identity/__init__.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/identity/attribution.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/identity/endpoints.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/identity/errors.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/identity/flows.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/identity/host_integration.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/identity/models.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/identity/repository.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/identity/resolution.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/identity/state.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/identity/sweeper.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/iggy_metrics.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/lifespans.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/llm/__init__.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/llm/dependencies.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/llm/generate.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/llm/prompted.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/llm/tokens.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/maintenance/__init__.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/maintenance/log.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/maintenance/state.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/maintenance/worker.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/mcp_server_orgs.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/mcp_test.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/middleware/__init__.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/middleware/rate_limit.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/model_calls/__init__.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/model_calls/schemata.toml +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/models.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/openapi.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/orphan_releases.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/plugins/__init__.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/plugins/assignment_writer.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/plugins/assignments.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/plugins/credentials.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/plugins/installer.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/plugins/lifecycle.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/plugins/lifecycle_dispatch.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/plugins/release_dispatch.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/plugins/reload.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/plugins/resolution.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/plugins/schemas.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/pr_sync/__init__.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/pr_sync/queue.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/pr_sync/service.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/preferences/__init__.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/preferences/schemata.toml +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/prompt_orgs.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/prompts/__init__.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/prompts/release_notes_system.md +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/prompts/seed.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/py.typed +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/relationships.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/release_periods.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/release_promote/__init__.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/release_promote/queue.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/release_promote/service.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/sbom.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/scoring/__init__.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/scoring/queue.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/secret_broker/__init__.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/secret_broker/audit.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/secret_broker/broker.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/secret_broker/identity.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/secret_broker/model_key.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/secret_broker/providers.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/secret_broker/schemata.toml +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/secret_broker/store.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/storage/__init__.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/storage/client.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/storage/dependencies.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/storage/thumbnails.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/storage/validation.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/tags.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/teams.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/tickets/__init__.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/tickets/announce.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/tickets/code_channel.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/tickets/custom_fields.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/tickets/handoffs.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/tickets/log.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/tickets/schemata.toml +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/tickets/store.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/tickets/sweeper.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/workflows/__init__.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/workflows/deployment_trigger.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/workflows/manual.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/workflows/plugin_calls.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/workflows/runs.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/workflows/runtime_schemata.toml +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/workflows/schemata.toml +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/workflows/store.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/workflows/sweeper.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/workflows/ticket_steps.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/workflows/ticket_trigger.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/src/imbi/api/workflows/tickets.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/__init__.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/auth/__init__.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/auth/test_authentication.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/auth/test_authorization.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/auth/test_encryption.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/auth/test_internal_services.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/auth/test_login_providers.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/auth/test_membership.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/auth/test_oauth_server.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/auth/test_organizations.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/auth/test_permissions.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/auth/test_sessions.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/auth/test_totp.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/clickhouse/__init__.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/clickhouse/test_client.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/clickhouse/test_init.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/clickhouse/test_privacy.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/email/__init__.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/email/test_audit_clickhouse.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/email/test_client.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/email/test_init.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/email/test_integration.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/email/test_models.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/email/test_templates.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/endpoints/__init__.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/endpoints/test_admin.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/endpoints/test_admin_plugins.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/endpoints/test_agent_api.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/endpoints/test_agent_platform.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/endpoints/test_agent_task_actions.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/endpoints/test_agent_task_harness.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/endpoints/test_agent_task_log.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/endpoints/test_agent_task_relations.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/endpoints/test_agent_tasks.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/endpoints/test_agent_usage.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/endpoints/test_agents.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/endpoints/test_ai_model_defaults.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/endpoints/test_ai_models.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/endpoints/test_ai_providers.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/endpoints/test_ai_proxy.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/endpoints/test_api_keys.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/endpoints/test_auth.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/endpoints/test_auth_providers.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/endpoints/test_blueprints.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/endpoints/test_caller_org_slugs.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/endpoints/test_client_credentials.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/endpoints/test_comments.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/endpoints/test_comments_attention.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/endpoints/test_components.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/endpoints/test_components_graph.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/endpoints/test_credentials.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/endpoints/test_cross_org_reads.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/endpoints/test_cves.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/endpoints/test_dashboard.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/endpoints/test_document_analytics.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/endpoints/test_document_likes.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/endpoints/test_document_presence.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/endpoints/test_document_reads.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/endpoints/test_document_reads_sql.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/endpoints/test_document_templates.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/endpoints/test_document_versions.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/endpoints/test_documents.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/endpoints/test_environments.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/endpoints/test_events.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/endpoints/test_github_app_repository.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/endpoints/test_graph_query.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/endpoints/test_harness.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/endpoints/test_harness_egress.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/endpoints/test_harness_secrets.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/endpoints/test_iggy_connectors.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/endpoints/test_init.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/endpoints/test_integration_workflow_steps.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/endpoints/test_integration_workflow_steps_choices.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/endpoints/test_integrations.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/endpoints/test_json_fields.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/endpoints/test_link_definitions.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/endpoints/test_local_auth.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/endpoints/test_maintenance.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/endpoints/test_mcp_servers.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/endpoints/test_mfa.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/endpoints/test_operations_log.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/endpoints/test_organizations.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/endpoints/test_pagination.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/endpoints/test_person_tickets.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/endpoints/test_plugin_label_validation.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/endpoints/test_plugins.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/endpoints/test_project_analysis.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/endpoints/test_project_commit_sync.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/endpoints/test_project_configuration.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/endpoints/test_project_deployments.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/endpoints/test_project_deployments_autonomous.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/endpoints/test_project_incidents.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/endpoints/test_project_integrations.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/endpoints/test_project_lifecycle.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/endpoints/test_project_logs.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/endpoints/test_project_plugins.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/endpoints/test_project_response_surfacing.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/endpoints/test_project_stars.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/endpoints/test_project_types.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/endpoints/test_projects.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/endpoints/test_projects_bulk_graph.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/endpoints/test_projects_helpers.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/endpoints/test_prompt_decisions.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/endpoints/test_prompts.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/endpoints/test_pull_requests.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/endpoints/test_release_periods_graph.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/endpoints/test_releases.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/endpoints/test_request_urls.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/endpoints/test_roles.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/endpoints/test_sa_api_keys.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/endpoints/test_scoring.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/endpoints/test_scoring_policies.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/endpoints/test_search.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/endpoints/test_search_index.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/endpoints/test_secret_broker.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/endpoints/test_service_accounts.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/endpoints/test_service_writeback.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/endpoints/test_shared_identifier.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/endpoints/test_status.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/endpoints/test_tags.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/endpoints/test_teams.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/endpoints/test_ticket_agent_activity.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/endpoints/test_ticket_attributes.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/endpoints/test_ticket_custom_fields.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/endpoints/test_ticket_handoff.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/endpoints/test_ticket_links.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/endpoints/test_ticket_reopen.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/endpoints/test_ticket_slack_channel.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/endpoints/test_ticket_units.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/endpoints/test_ticket_waiting.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/endpoints/test_uploads.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/endpoints/test_user_activity.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/endpoints/test_user_preferences.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/endpoints/test_users.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/endpoints/test_webhooks.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/endpoints/test_workflow_create_ticket.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/endpoints/test_workflow_run_history.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/endpoints/test_workflow_runs.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/endpoints/test_workflow_ticket_steps.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/endpoints/test_workflow_triggers.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/endpoints/test_workflows.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/fixtures/marketplaces/claude-code.json +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/fixtures/release_2_58/harness_schemata.toml +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/fixtures/release_2_58/tickets_schemata.toml +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/fixtures/release_a/harness_schemata.toml +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/fixtures/release_a/tickets_schemata.toml +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/fixtures/release_a_minus_1/agent_runtime_schemata.toml +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/fixtures/release_a_minus_1/harness_schemata.toml +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/fixtures/release_b/harness_schemata.toml +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/fixtures/release_b/tickets_schemata.toml +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/fixtures/release_b1/harness_schemata.toml +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/fixtures/release_b1/tickets_schemata.toml +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/fixtures/sbom/npm-realistic.json +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/fixtures/sbom/pypi-realistic.json +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/fixtures/sbom/tiny.json +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/identity/__init__.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/identity/test_endpoints.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/identity/test_errors.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/identity/test_flows.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/identity/test_host_integration.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/identity/test_repository.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/identity/test_resolution.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/identity/test_state.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/identity/test_sweeper.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/marketplace_support.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/middleware/test_rate_limit.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/secret_support.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/storage/__init__.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/storage/test_client.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/storage/test_init.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/storage/test_thumbnails.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/storage/test_validation.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/support.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/test_agent_platform.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/test_agent_task_events_e2e.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/test_agent_tools.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/test_ai_catalog_orgs.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/test_ai_provider_tokens.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/test_app.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/test_assignment_writer.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/test_auth_settings.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/test_blueprint_attributes.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/test_blueprint_compliance.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/test_blueprint_values.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/test_blueprints.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/test_clickhouse_orgs.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/test_clickhouse_project_ids.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/test_commit_sync_queue.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/test_commit_sync_service.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/test_component_facts.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/test_cves.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/test_dashboard_org_reads.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/test_deployment_array_drop.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/test_deployment_recorded_trigger.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/test_deployment_sweeper.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/test_deployment_sync_queue.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/test_deployment_sync_service.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/test_document_org_scope.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/test_document_orgs.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/test_drift.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/test_drift_classifier.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/test_entrypoint.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/test_graph_sql.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/test_identity_attribution.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/test_iggy_metrics.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/test_init.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/test_installer.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/test_lifecycle_dispatch.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/test_lifespans.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/test_maintenance_log.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/test_maintenance_operations.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/test_maintenance_state.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/test_maintenance_worker.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/test_mcp_server_orgs.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/test_model_calls.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/test_models.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/test_openapi.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/test_orphan_releases.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/test_plugin_schemas.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/test_plugins.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/test_plugins_assignments.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/test_plugins_credentials.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/test_pr_sync_queue.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/test_pr_sync_service.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/test_projects_drift_ranges.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/test_prompt_orgs.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/test_prompt_seed.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/test_prompted.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/test_pull_request_resync_clickhouse.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/test_pull_request_reviews_clickhouse.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/test_pull_requests_pending_deploy.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/test_release_dispatch.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/test_release_promote_service.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/test_sbom.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/test_scoring_queue.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/test_scoring_triggers.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/test_secret_broker.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/test_secret_github_app.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/test_secret_identity.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/test_secret_mcp_credential.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/test_secret_providers.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/test_settings.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/test_tags.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/test_ticket_state_trigger.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/test_tickets_rename.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.0}/tests/test_workflow_reconcile.py +0 -0
- {imbi_api-2.69.0 → imbi_api-2.70.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.70.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.70.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.70.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.70.0",
|
|
34
34
|
"jinja2",
|
|
35
35
|
"jsonpatch>=1.33",
|
|
36
36
|
"jsonschema>=4.26",
|
|
@@ -688,6 +688,18 @@ STANDARD_PERMISSIONS: list[tuple[str, str, str, str]] = [
|
|
|
688
688
|
'maintenance:plugin-step-calls-prune',
|
|
689
689
|
'Start the plugin-step-calls-prune maintenance operation',
|
|
690
690
|
),
|
|
691
|
+
(
|
|
692
|
+
'admin:maintenance:org-purge',
|
|
693
|
+
'admin',
|
|
694
|
+
'maintenance:org-purge',
|
|
695
|
+
'Start the org-purge maintenance operation',
|
|
696
|
+
),
|
|
697
|
+
(
|
|
698
|
+
'admin:maintenance:orphan-purge',
|
|
699
|
+
'admin',
|
|
700
|
+
'maintenance:orphan-purge',
|
|
701
|
+
'Start the orphan-purge maintenance operation',
|
|
702
|
+
),
|
|
691
703
|
(
|
|
692
704
|
'admin:maintenance:deployment-sweep',
|
|
693
705
|
'admin',
|
|
@@ -1105,11 +1117,14 @@ DEFAULT_ROLES: list[tuple[str, str, str, int, list[str], bool]] = [
|
|
|
1105
1117
|
# start any operation, including the purges.
|
|
1106
1118
|
'admin:maintenance:marketplace-sync',
|
|
1107
1119
|
# The cve-sync, ai-model-calls-prune,
|
|
1108
|
-
# plugin-step-calls-prune,
|
|
1109
|
-
# drift-classify system tasks, for
|
|
1120
|
+
# plugin-step-calls-prune, org-purge, orphan-purge,
|
|
1121
|
+
# deployment-sweep, and drift-classify system tasks, for
|
|
1122
|
+
# the same reason.
|
|
1110
1123
|
'admin:maintenance:cve-sync',
|
|
1111
1124
|
'admin:maintenance:ai-model-calls-prune',
|
|
1112
1125
|
'admin:maintenance:plugin-step-calls-prune',
|
|
1126
|
+
'admin:maintenance:org-purge',
|
|
1127
|
+
'admin:maintenance:orphan-purge',
|
|
1113
1128
|
'admin:maintenance:deployment-sweep',
|
|
1114
1129
|
'admin:maintenance:drift-classify',
|
|
1115
1130
|
'agent:read',
|
|
@@ -32,6 +32,41 @@ TABLES: tuple[str, ...] = (
|
|
|
32
32
|
#: 131072 bytes, and an id array of this size is about 50 KB.
|
|
33
33
|
CHUNK = 2000
|
|
34
34
|
|
|
35
|
+
#: ClickHouse refuses a lightweight delete on these tables, so their
|
|
36
|
+
#: deletes are mutations.
|
|
37
|
+
_NO_LIGHTWEIGHT_DELETE = frozenset({'score_latest_org_data'})
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
async def delete_rows(
|
|
41
|
+
table: str, where: str, params: dict[str, typing.Any]
|
|
42
|
+
) -> int:
|
|
43
|
+
"""Delete the rows of ``imbi.<table>`` that match ``where``; return
|
|
44
|
+
the count.
|
|
45
|
+
|
|
46
|
+
A lightweight delete (it marks the rows, and merges remove them)
|
|
47
|
+
where ClickHouse allows one. It waits for every replica. A table
|
|
48
|
+
with no matching rows gets no delete, so a re-run costs only the
|
|
49
|
+
count.
|
|
50
|
+
"""
|
|
51
|
+
rows = await clickhouse.query(
|
|
52
|
+
f'SELECT count() AS c FROM imbi.{table} WHERE {where}', # noqa: S608
|
|
53
|
+
params,
|
|
54
|
+
)
|
|
55
|
+
count = int(rows[0]['c']) if rows else 0
|
|
56
|
+
if count:
|
|
57
|
+
statement = (
|
|
58
|
+
f'ALTER TABLE imbi.{table} DELETE'
|
|
59
|
+
if table in _NO_LIGHTWEIGHT_DELETE
|
|
60
|
+
else f'DELETE FROM imbi.{table}' # noqa: S608
|
|
61
|
+
)
|
|
62
|
+
await clickhouse.command(
|
|
63
|
+
f'{statement} WHERE {where} SETTINGS mutations_sync = 2,'
|
|
64
|
+
' lightweight_deletes_sync = 2',
|
|
65
|
+
params,
|
|
66
|
+
)
|
|
67
|
+
return count
|
|
68
|
+
|
|
69
|
+
|
|
35
70
|
_PROJECTS: typing.LiteralString = (
|
|
36
71
|
'MATCH (p:Project)-[:OWNED_BY]->(:Team)-[:BELONGS_TO]->(o:Organization)'
|
|
37
72
|
' WHERE o.id IS NOT NULL RETURN p.id AS project_id, o.id AS org_id'
|
|
@@ -1023,6 +1023,22 @@ async def delete_organization(
|
|
|
1023
1023
|
Its memberships, agent tasks, workflow runs, plugin step calls,
|
|
1024
1024
|
AI model calls, ``workflows/<org>.*`` and ``agents/<org>.*``
|
|
1025
1025
|
prompts, secret grants, and settled secret resolutions go with it.
|
|
1026
|
+
Its ClickHouse rows stay for ``IMBI_PURGE_GRACE_DAYS``;
|
|
1027
|
+
then the ``org-purge`` maintenance operation deletes them. It
|
|
1028
|
+
deletes only rows that have the organization ID, in the tables of
|
|
1029
|
+
``imbi.api.org_purge.TABLES`` and ``score_latest_org_data``. A row
|
|
1030
|
+
with no organization ID, and a table with no organization column
|
|
1031
|
+
(``document_versions``, the release components,
|
|
1032
|
+
``scheduler_runs``), stay. One exception: in
|
|
1033
|
+
``score_latest_org_data`` it deletes all rows of each project whose
|
|
1034
|
+
latest score is of the organization, also the aggregate states of
|
|
1035
|
+
that project for other or empty organization IDs. A row that
|
|
1036
|
+
arrives after the run that finds no rows of the organization
|
|
1037
|
+
stays. The ``orphan-purge`` operation later deletes the rows of
|
|
1038
|
+
deleted projects and documents in its tables, also
|
|
1039
|
+
``document_versions``, the release components, and rows with no
|
|
1040
|
+
organization ID. It does not delete a row with no project or
|
|
1041
|
+
document ID.
|
|
1026
1042
|
|
|
1027
1043
|
Parameters:
|
|
1028
1044
|
slug: Organization slug to delete.
|
|
@@ -18,10 +18,12 @@ a convention only.
|
|
|
18
18
|
|
|
19
19
|
import asyncio
|
|
20
20
|
import datetime
|
|
21
|
+
import functools
|
|
21
22
|
import hashlib
|
|
22
23
|
import json
|
|
23
24
|
import logging
|
|
24
25
|
import re
|
|
26
|
+
import time
|
|
25
27
|
import typing
|
|
26
28
|
import uuid
|
|
27
29
|
|
|
@@ -42,7 +44,13 @@ from imbi.common import patch as json_patch
|
|
|
42
44
|
from imbi.common.auth import permissions as common_permissions
|
|
43
45
|
from imbi.common.auth.encryption import decrypt_config_value
|
|
44
46
|
from imbi.common.graph import cypher as graph_cypher
|
|
45
|
-
from imbi.common.llm import
|
|
47
|
+
from imbi.common.llm import (
|
|
48
|
+
drivers,
|
|
49
|
+
generate,
|
|
50
|
+
observability,
|
|
51
|
+
spend,
|
|
52
|
+
typesafe,
|
|
53
|
+
)
|
|
46
54
|
from imbi.common.llm import resolve as llm_resolve
|
|
47
55
|
from imbi.common.prompts import rendering
|
|
48
56
|
from imbi.common.prompts import resolve as prompt_resolve
|
|
@@ -2126,11 +2134,13 @@ async def _run_generative(
|
|
|
2126
2134
|
project_id=provider.project_id,
|
|
2127
2135
|
timeout=CALL_TIMEOUT,
|
|
2128
2136
|
)
|
|
2137
|
+
context = _key_context(idempotency_key)
|
|
2138
|
+
messages = [m.model_dump() for m in rendered.messages]
|
|
2129
2139
|
row, new = await calls.start(
|
|
2130
2140
|
{
|
|
2131
2141
|
'organization_id': org_id,
|
|
2132
2142
|
'principal': auth.principal_name,
|
|
2133
|
-
**
|
|
2143
|
+
**context,
|
|
2134
2144
|
'idempotency_key': idempotency_key,
|
|
2135
2145
|
'prompt_ref': ref,
|
|
2136
2146
|
'prompt_version': version.n if data.ref is not None else None,
|
|
@@ -2140,13 +2150,27 @@ async def _run_generative(
|
|
|
2140
2150
|
'ai_model_id': model.id,
|
|
2141
2151
|
'driver': provider.driver,
|
|
2142
2152
|
'system': rendered.system,
|
|
2143
|
-
'messages':
|
|
2153
|
+
'messages': messages,
|
|
2144
2154
|
'output_schema': agent.output_schema(data.output_fields),
|
|
2145
2155
|
},
|
|
2146
2156
|
STALE_AFTER,
|
|
2147
2157
|
)
|
|
2148
2158
|
if not new:
|
|
2149
2159
|
return _repeat(row)
|
|
2160
|
+
# One trace per call; the session is the workflow run, and a
|
|
2161
|
+
# preview has no session.
|
|
2162
|
+
observe = functools.partial(
|
|
2163
|
+
observability.capture_generation,
|
|
2164
|
+
auth.principal_name,
|
|
2165
|
+
str(row['id']),
|
|
2166
|
+
context['run_id'],
|
|
2167
|
+
span_name=ref,
|
|
2168
|
+
provider=provider.driver,
|
|
2169
|
+
model=model_id,
|
|
2170
|
+
system=rendered.system,
|
|
2171
|
+
messages=messages,
|
|
2172
|
+
)
|
|
2173
|
+
started = time.monotonic()
|
|
2150
2174
|
dispatched = asyncio.Event()
|
|
2151
2175
|
try:
|
|
2152
2176
|
async with asyncio.timeout(CALL_DEADLINE):
|
|
@@ -2162,10 +2186,13 @@ async def _run_generative(
|
|
|
2162
2186
|
else 'credentials_unavailable'
|
|
2163
2187
|
)
|
|
2164
2188
|
await calls.finish(row['id'], 'failed', error=code)
|
|
2189
|
+
observe(latency=time.monotonic() - started, error=code)
|
|
2165
2190
|
raise _call_error(code) from None
|
|
2166
2191
|
except generate.GenerateError as e:
|
|
2167
2192
|
await calls.finish(row['id'], 'failed', error=e.code)
|
|
2193
|
+
observe(latency=time.monotonic() - started, error=e.code)
|
|
2168
2194
|
raise _call_error(e.code) from None
|
|
2195
|
+
latency = time.monotonic() - started
|
|
2169
2196
|
usage = dict(answer.usage)
|
|
2170
2197
|
cost = spend.call_cost(model, usage)
|
|
2171
2198
|
await calls.finish(
|
|
@@ -2177,6 +2204,15 @@ async def _run_generative(
|
|
|
2177
2204
|
cost_usd=cost,
|
|
2178
2205
|
provider_request_id=answer.request_id,
|
|
2179
2206
|
)
|
|
2207
|
+
observe(
|
|
2208
|
+
latency=latency,
|
|
2209
|
+
text=answer.text,
|
|
2210
|
+
result=answer.result,
|
|
2211
|
+
input_tokens=answer.usage['input_tokens'],
|
|
2212
|
+
output_tokens=answer.usage['output_tokens'],
|
|
2213
|
+
cache_read_tokens=answer.usage.get('cache_read_tokens'),
|
|
2214
|
+
cost_usd=None if cost is None else float(cost),
|
|
2215
|
+
)
|
|
2180
2216
|
LOGGER.info(
|
|
2181
2217
|
'Ran generative prompt %s with %s for %s',
|
|
2182
2218
|
ref,
|
|
@@ -2602,6 +2602,10 @@ async def _start_child(
|
|
|
2602
2602
|
"""Start the child run of a ``run_workflow`` step, as the activator
|
|
2603
2603
|
of the parent run.
|
|
2604
2604
|
|
|
2605
|
+
The engine starts it, not a person, so a child run that repeats the
|
|
2606
|
+
target's dedupe key within the window is written ``skipped``, with
|
|
2607
|
+
``duplicate_of``, as a webhook run is.
|
|
2608
|
+
|
|
2605
2609
|
Raises:
|
|
2606
2610
|
HTTPException: An error of :data:`_CHILD_REFUSALS`.
|
|
2607
2611
|
|
|
@@ -2661,6 +2665,7 @@ async def _start_child(
|
|
|
2661
2665
|
activated_by=target['activated_by'],
|
|
2662
2666
|
dedupe_key=validation.dedupe_key(settings, payload),
|
|
2663
2667
|
dedupe_window_seconds=settings.dedupe_window_seconds,
|
|
2668
|
+
skip_duplicate=True,
|
|
2664
2669
|
),
|
|
2665
2670
|
ticket_trigger.MAX_LINEAGE_RUNS,
|
|
2666
2671
|
)
|
|
@@ -1400,6 +1400,61 @@ async def execute_plugin_step_calls_prune(
|
|
|
1400
1400
|
return 'succeeded'
|
|
1401
1401
|
|
|
1402
1402
|
|
|
1403
|
+
async def enumerate_org_purge(db: graph.Graph) -> list[str]:
|
|
1404
|
+
"""The deleted organizations whose grace period ended, not purged."""
|
|
1405
|
+
from imbi.api import org_purge, settings
|
|
1406
|
+
|
|
1407
|
+
grace_days = settings.get_purge_settings().grace_days
|
|
1408
|
+
return await org_purge.due(db, grace_days)
|
|
1409
|
+
|
|
1410
|
+
|
|
1411
|
+
async def execute_org_purge(
|
|
1412
|
+
db: graph.Graph,
|
|
1413
|
+
client: valkey.Valkey,
|
|
1414
|
+
item_id: str,
|
|
1415
|
+
*,
|
|
1416
|
+
ctx: log.MaintenanceContext,
|
|
1417
|
+
) -> ExecuteOutcome:
|
|
1418
|
+
"""Delete the ClickHouse rows of one deleted organization.
|
|
1419
|
+
|
|
1420
|
+
The organization stays due until a run finds no rows of it, so rows
|
|
1421
|
+
that the ClickHouse sink writes after a run go on the next run.
|
|
1422
|
+
"""
|
|
1423
|
+
from imbi.api import org_purge
|
|
1424
|
+
|
|
1425
|
+
deleted = await org_purge.purge(item_id)
|
|
1426
|
+
if not deleted:
|
|
1427
|
+
await org_purge.mark_purged(db, item_id)
|
|
1428
|
+
ctx.log.record(
|
|
1429
|
+
'succeeded',
|
|
1430
|
+
'org-purge',
|
|
1431
|
+
f'Deleted {deleted} analytics rows of deleted organization {item_id}',
|
|
1432
|
+
deleted=deleted,
|
|
1433
|
+
)
|
|
1434
|
+
return 'succeeded'
|
|
1435
|
+
|
|
1436
|
+
|
|
1437
|
+
async def execute_orphan_purge(
|
|
1438
|
+
db: graph.Graph,
|
|
1439
|
+
client: valkey.Valkey,
|
|
1440
|
+
item_id: str,
|
|
1441
|
+
*,
|
|
1442
|
+
ctx: log.MaintenanceContext,
|
|
1443
|
+
) -> ExecuteOutcome:
|
|
1444
|
+
"""Delete the ClickHouse rows of deleted projects and documents."""
|
|
1445
|
+
from imbi.api import orphan_purge, settings
|
|
1446
|
+
|
|
1447
|
+
grace_days = settings.get_purge_settings().grace_days
|
|
1448
|
+
deleted = await orphan_purge.purge(db, grace_days)
|
|
1449
|
+
ctx.log.record(
|
|
1450
|
+
'succeeded',
|
|
1451
|
+
'orphan-purge',
|
|
1452
|
+
f'Deleted {deleted} analytics rows of deleted projects and documents',
|
|
1453
|
+
deleted=deleted,
|
|
1454
|
+
)
|
|
1455
|
+
return 'succeeded'
|
|
1456
|
+
|
|
1457
|
+
|
|
1403
1458
|
#: Deployments were once JSON entries in this array property. They are
|
|
1404
1459
|
#: ``Deployment`` nodes now, and nothing reads the array. The edges
|
|
1405
1460
|
#: stay: :mod:`imbi.api.orphan_releases` counts them.
|
|
@@ -41,6 +41,8 @@ MaintenanceSlug = typing.Literal[
|
|
|
41
41
|
'cve-sync',
|
|
42
42
|
'ai-model-calls-prune',
|
|
43
43
|
'plugin-step-calls-prune',
|
|
44
|
+
'org-purge',
|
|
45
|
+
'orphan-purge',
|
|
44
46
|
'mcp-server-org-backfill',
|
|
45
47
|
'prompt-org-backfill',
|
|
46
48
|
'conversation-org-backfill',
|
|
@@ -384,6 +386,46 @@ OPERATIONS: dict[MaintenanceSlug, OperationDefinition] = {
|
|
|
384
386
|
execute=operations.execute_plugin_step_calls_prune,
|
|
385
387
|
items_are_projects=False,
|
|
386
388
|
),
|
|
389
|
+
OperationDefinition(
|
|
390
|
+
slug='org-purge',
|
|
391
|
+
label='Purge Deleted Organizations',
|
|
392
|
+
description=(
|
|
393
|
+
'Delete the analytics data (ClickHouse rows, audit rows '
|
|
394
|
+
'included) of each organization deleted more than '
|
|
395
|
+
'IMBI_PURGE_GRACE_DAYS days ago (default 30). '
|
|
396
|
+
'It finds rows by organization ID, so a row with no '
|
|
397
|
+
'organization ID stays. One exception: it deletes the '
|
|
398
|
+
'latest scores of each project whose latest score is of '
|
|
399
|
+
'the organization, also those with another or no '
|
|
400
|
+
'organization ID. An organization stays due until '
|
|
401
|
+
'a run finds no rows of it, so rows that arrive late go '
|
|
402
|
+
'on the next run. A row that arrives after the run that '
|
|
403
|
+
'finds no rows stays. Safe to re-run. The scheduler runs '
|
|
404
|
+
'this daily at 03:15 UTC.'
|
|
405
|
+
),
|
|
406
|
+
pause_key=None,
|
|
407
|
+
enumerate=operations.enumerate_org_purge,
|
|
408
|
+
execute=operations.execute_org_purge,
|
|
409
|
+
items_are_projects=False,
|
|
410
|
+
),
|
|
411
|
+
OperationDefinition(
|
|
412
|
+
slug='orphan-purge',
|
|
413
|
+
label='Purge Deleted Projects and Documents',
|
|
414
|
+
description=(
|
|
415
|
+
'Find the deleted projects and documents that still have '
|
|
416
|
+
'analytics rows in ClickHouse (project events, pull '
|
|
417
|
+
'requests, commits, scores, operations log, release '
|
|
418
|
+
'components; document versions and reads), and delete '
|
|
419
|
+
'those rows IMBI_PURGE_GRACE_DAYS days '
|
|
420
|
+
'(default 30) after the first run that found them. Rows '
|
|
421
|
+
'with no organization ID are included. Safe to re-run. '
|
|
422
|
+
'The scheduler runs this daily at 03:30 UTC.'
|
|
423
|
+
),
|
|
424
|
+
pause_key=None,
|
|
425
|
+
enumerate=operations.enumerate_one_run,
|
|
426
|
+
execute=operations.execute_orphan_purge,
|
|
427
|
+
items_are_projects=False,
|
|
428
|
+
),
|
|
387
429
|
OperationDefinition(
|
|
388
430
|
slug='mcp-server-org-backfill',
|
|
389
431
|
label='Link MCP Servers to an Organization',
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
"""Purge the analytics data of deleted organizations.
|
|
2
|
+
|
|
3
|
+
An organization delete removes the graph and relational rows at once
|
|
4
|
+
and records the delete in ``organizations.deleted``. The ClickHouse
|
|
5
|
+
rows of the organization stay for ``IMBI_PURGE_GRACE_DAYS``.
|
|
6
|
+
Then the ``org-purge`` maintenance operation deletes them. It sets
|
|
7
|
+
``purged_at`` only on a run that finds no rows, so rows that the sink
|
|
8
|
+
writes late are deleted on the next run. A run that finds no rows does
|
|
9
|
+
not prove that the sink has drained: a row that arrives after the run
|
|
10
|
+
that sets ``purged_at`` stays.
|
|
11
|
+
|
|
12
|
+
The purge finds rows by organization ID only, so a new organization
|
|
13
|
+
with the slug of a deleted one keeps its rows. It does not find a row
|
|
14
|
+
with no organization ID (written before the column, or with no
|
|
15
|
+
organization), or a table with no organization column
|
|
16
|
+
(``document_versions``, the release components, ``scheduler_runs``).
|
|
17
|
+
In ``score_latest_org_data`` it deletes all rows of each project whose
|
|
18
|
+
latest score is of the organization, also the aggregate states of that
|
|
19
|
+
project for other or empty organization IDs.
|
|
20
|
+
"""
|
|
21
|
+
|
|
22
|
+
import typing
|
|
23
|
+
|
|
24
|
+
from imbi.api import clickhouse_orgs
|
|
25
|
+
from imbi.common import clickhouse, graph
|
|
26
|
+
|
|
27
|
+
#: Each table with rows of one organization, and its organization column.
|
|
28
|
+
TABLES: tuple[tuple[str, str], ...] = (
|
|
29
|
+
('events', 'organization_id'),
|
|
30
|
+
('operations_log', 'organization_id'),
|
|
31
|
+
('pull_requests', 'organization_id'),
|
|
32
|
+
('pull_request_reviews', 'organization_id'),
|
|
33
|
+
('pull_request_review_requests', 'organization_id'),
|
|
34
|
+
('score_history', 'organization_id'),
|
|
35
|
+
('commits', 'organization_id'),
|
|
36
|
+
('commit_drift', 'organization_id'),
|
|
37
|
+
('tags', 'organization_id'),
|
|
38
|
+
('maintenance_log', 'organization_id'),
|
|
39
|
+
('email_audit', 'organization_id'),
|
|
40
|
+
('ticket_events', 'organization_id'),
|
|
41
|
+
('agent_usage', 'organization_id'),
|
|
42
|
+
('workflow_run_events', 'organization_id'),
|
|
43
|
+
('workflow_runs', 'organization_id'),
|
|
44
|
+
('secret_audit_events', 'organization_id'),
|
|
45
|
+
('document_read_events', 'org_id'),
|
|
46
|
+
('document_read_sessions', 'org_id'),
|
|
47
|
+
)
|
|
48
|
+
|
|
49
|
+
_DUE: typing.LiteralString = (
|
|
50
|
+
'SELECT organization_id FROM organizations.deleted'
|
|
51
|
+
' WHERE purged_at IS NULL'
|
|
52
|
+
" AND deleted_at <= NOW() - %s * INTERVAL '1 day'"
|
|
53
|
+
' ORDER BY deleted_at'
|
|
54
|
+
)
|
|
55
|
+
_MARK_PURGED: typing.LiteralString = (
|
|
56
|
+
'UPDATE organizations.deleted SET purged_at = NOW()'
|
|
57
|
+
' WHERE organization_id = %s AND purged_at IS NULL'
|
|
58
|
+
)
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
async def due(db: graph.Graph, grace_days: int) -> list[str]:
|
|
62
|
+
"""Return the IDs of the organizations deleted ``grace_days`` or
|
|
63
|
+
more days ago and not purged yet, oldest delete first."""
|
|
64
|
+
async with db.pool.connection() as conn:
|
|
65
|
+
cursor = await conn.execute(_DUE, (grace_days,))
|
|
66
|
+
return [str(row[0]) for row in await cursor.fetchall()]
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
async def mark_purged(db: graph.Graph, org_id: str) -> None:
|
|
70
|
+
"""Set ``purged_at``, so that the next run skips the organization."""
|
|
71
|
+
async with db.pool.connection() as conn:
|
|
72
|
+
await conn.execute(_MARK_PURGED, (org_id,))
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
async def purge(org_id: str) -> int:
|
|
76
|
+
"""Delete the ClickHouse rows of the organization; return the count.
|
|
77
|
+
|
|
78
|
+
If a delete fails, the deletes before it stay done, and the next
|
|
79
|
+
run continues.
|
|
80
|
+
"""
|
|
81
|
+
deleted = 0
|
|
82
|
+
for table, column in TABLES:
|
|
83
|
+
deleted += await clickhouse_orgs.delete_rows(
|
|
84
|
+
table, f'{column} = {{org_id:String}}', {'org_id': org_id}
|
|
85
|
+
)
|
|
86
|
+
# After ``score_history``: the populate step of the schemata copies
|
|
87
|
+
# ``score_history`` into ``score_latest_org_data`` again.
|
|
88
|
+
return deleted + await _purge_score_latest(org_id)
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
async def _purge_score_latest(org_id: str) -> int:
|
|
92
|
+
"""Delete the latest score of each project whose latest score row
|
|
93
|
+
is of the organization.
|
|
94
|
+
|
|
95
|
+
``score_latest_org_data`` holds aggregate states by project, so its
|
|
96
|
+
rows are found through the ``score_latest`` view. A project whose
|
|
97
|
+
latest row is of another organization keeps its state.
|
|
98
|
+
"""
|
|
99
|
+
rows = await clickhouse.query(
|
|
100
|
+
'SELECT project_id FROM imbi.score_latest'
|
|
101
|
+
' WHERE organization_id = {org_id:String}',
|
|
102
|
+
{'org_id': org_id},
|
|
103
|
+
)
|
|
104
|
+
ids = [str(row['project_id']) for row in rows]
|
|
105
|
+
chunk = clickhouse_orgs.CHUNK
|
|
106
|
+
for start in range(0, len(ids), chunk):
|
|
107
|
+
await clickhouse_orgs.delete_rows(
|
|
108
|
+
'score_latest_org_data',
|
|
109
|
+
'has({ids:Array(String)}, project_id)',
|
|
110
|
+
{'ids': ids[start : start + chunk]},
|
|
111
|
+
)
|
|
112
|
+
return len(ids)
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
"""Purge the ClickHouse rows of deleted projects and documents.
|
|
2
|
+
|
|
3
|
+
A project or document delete removes only the graph nodes. Its
|
|
4
|
+
ClickHouse rows stay. The ``orphan-purge`` maintenance operation finds
|
|
5
|
+
the project and document IDs that ClickHouse has and the graph does
|
|
6
|
+
not, and records each one in ``organizations.orphans`` when it first
|
|
7
|
+
finds it. When an ID was found ``IMBI_PURGE_GRACE_DAYS``
|
|
8
|
+
or more days ago, and the graph still does not have it, the operation
|
|
9
|
+
deletes its rows. So the grace period starts at the first run after the
|
|
10
|
+
delete, not at the delete. It also reaches the rows that the
|
|
11
|
+
organization purge cannot: rows with no organization ID, and rows of
|
|
12
|
+
projects deleted before this operation existed.
|
|
13
|
+
|
|
14
|
+
A row with an empty ``project_id`` or ``document_id`` is not an orphan.
|
|
15
|
+
The ticket, agent usage, and secret audit rows have a ``project_id``
|
|
16
|
+
but belong to a ticket or an organization, so they stay.
|
|
17
|
+
"""
|
|
18
|
+
|
|
19
|
+
import typing
|
|
20
|
+
|
|
21
|
+
from imbi.api import clickhouse_orgs
|
|
22
|
+
from imbi.common import clickhouse, graph
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
class Kind(typing.NamedTuple):
|
|
26
|
+
name: str
|
|
27
|
+
#: Every ID of the graph nodes of this kind.
|
|
28
|
+
live: typing.LiteralString
|
|
29
|
+
#: The IDs in ``{ids}`` that a graph node of this kind has.
|
|
30
|
+
still_live: typing.LiteralString
|
|
31
|
+
column: str
|
|
32
|
+
tables: tuple[str, ...]
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
KINDS: tuple[Kind, ...] = (
|
|
36
|
+
Kind(
|
|
37
|
+
'project',
|
|
38
|
+
'MATCH (n:Project) RETURN n.id AS id',
|
|
39
|
+
'MATCH (n:Project) WHERE n.id IN {ids} RETURN n.id AS id',
|
|
40
|
+
'project_id',
|
|
41
|
+
(
|
|
42
|
+
*clickhouse_orgs.TABLES,
|
|
43
|
+
'operations_log',
|
|
44
|
+
'score_latest_org_data',
|
|
45
|
+
'release_components',
|
|
46
|
+
'release_component_batches',
|
|
47
|
+
),
|
|
48
|
+
),
|
|
49
|
+
Kind(
|
|
50
|
+
'document',
|
|
51
|
+
'MATCH (n:Document) RETURN n.id AS id',
|
|
52
|
+
'MATCH (n:Document) WHERE n.id IN {ids} RETURN n.id AS id',
|
|
53
|
+
'document_id',
|
|
54
|
+
(
|
|
55
|
+
'document_versions',
|
|
56
|
+
'document_read_events',
|
|
57
|
+
'document_read_sessions',
|
|
58
|
+
),
|
|
59
|
+
),
|
|
60
|
+
)
|
|
61
|
+
|
|
62
|
+
_RECORD: typing.LiteralString = (
|
|
63
|
+
'INSERT INTO organizations.orphans (kind, item_id)'
|
|
64
|
+
' SELECT %s, unnest(%s::text[]) ON CONFLICT DO NOTHING'
|
|
65
|
+
)
|
|
66
|
+
#: An ID that this run did not find was purged, or is live again.
|
|
67
|
+
_FORGET: typing.LiteralString = (
|
|
68
|
+
'DELETE FROM organizations.orphans'
|
|
69
|
+
' WHERE kind = %s AND NOT item_id = ANY(%s)'
|
|
70
|
+
)
|
|
71
|
+
_DUE: typing.LiteralString = (
|
|
72
|
+
'SELECT item_id FROM organizations.orphans'
|
|
73
|
+
" WHERE kind = %s AND found_at <= NOW() - %s * INTERVAL '1 day'"
|
|
74
|
+
)
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
async def purge(db: graph.Graph, grace_days: int) -> int:
|
|
78
|
+
"""Record the orphans, delete the rows of the due ones, and return
|
|
79
|
+
the count of rows deleted."""
|
|
80
|
+
deleted = 0
|
|
81
|
+
for kind in KINDS:
|
|
82
|
+
deleted += await _purge_kind(db, kind, grace_days)
|
|
83
|
+
return deleted
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
async def _purge_kind(db: graph.Graph, kind: Kind, grace_days: int) -> int:
|
|
87
|
+
# ClickHouse first, then the graph: a node made after the ClickHouse
|
|
88
|
+
# read has no ID in it, so it cannot show as an orphan.
|
|
89
|
+
# ponytail: each run scans the keys of all history. If it gets slow,
|
|
90
|
+
# record the delete on the project and document delete paths, and
|
|
91
|
+
# keep this scan as a one-time backfill.
|
|
92
|
+
union = ' UNION DISTINCT '.join(
|
|
93
|
+
f'SELECT {kind.column} AS id FROM imbi.{table}' # noqa: S608
|
|
94
|
+
f" WHERE {kind.column} != ''"
|
|
95
|
+
for table in kind.tables
|
|
96
|
+
)
|
|
97
|
+
rows = await clickhouse.query(f'SELECT DISTINCT id FROM ({union})') # noqa: S608
|
|
98
|
+
found = {str(row['id']) for row in rows}
|
|
99
|
+
if found:
|
|
100
|
+
live = await db.execute(kind.live, {}, ['id'])
|
|
101
|
+
found -= {str(graph.parse_agtype(row['id'])) for row in live}
|
|
102
|
+
ids = sorted(found)
|
|
103
|
+
async with db.pool.connection() as conn:
|
|
104
|
+
await conn.execute(_FORGET, (kind.name, ids))
|
|
105
|
+
await conn.execute(_RECORD, (kind.name, ids))
|
|
106
|
+
cursor = await conn.execute(_DUE, (kind.name, grace_days))
|
|
107
|
+
due = sorted(str(row[0]) for row in await cursor.fetchall())
|
|
108
|
+
deleted = 0
|
|
109
|
+
chunk = clickhouse_orgs.CHUNK
|
|
110
|
+
for start in range(0, len(due), chunk):
|
|
111
|
+
deleted += await _delete(db, kind, due[start : start + chunk])
|
|
112
|
+
return deleted
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
async def _delete(db: graph.Graph, kind: Kind, ids: list[str]) -> int:
|
|
116
|
+
# A second graph read just before the delete, so that one wrong
|
|
117
|
+
# read cannot delete the rows of a live node.
|
|
118
|
+
live = await db.execute(kind.still_live, {'ids': ids}, ['id'])
|
|
119
|
+
ids = sorted(set(ids) - {str(graph.parse_agtype(r['id'])) for r in live})
|
|
120
|
+
if not ids:
|
|
121
|
+
return 0
|
|
122
|
+
where = f'has({{ids:Array(String)}}, {kind.column})'
|
|
123
|
+
deleted = 0
|
|
124
|
+
for table in kind.tables:
|
|
125
|
+
deleted += await clickhouse_orgs.delete_rows(
|
|
126
|
+
table, where, {'ids': ids}
|
|
127
|
+
)
|
|
128
|
+
return deleted
|
|
@@ -394,6 +394,25 @@ class DriftClassifier(pydantic_settings.BaseSettings):
|
|
|
394
394
|
)
|
|
395
395
|
|
|
396
396
|
|
|
397
|
+
class Purge(pydantic_settings.BaseSettings):
|
|
398
|
+
"""The purge of the data of deleted organizations, projects, and
|
|
399
|
+
documents."""
|
|
400
|
+
|
|
401
|
+
model_config = settings.base_settings_config(env_prefix='IMBI_PURGE_')
|
|
402
|
+
|
|
403
|
+
grace_days: int = pydantic.Field(
|
|
404
|
+
default=30,
|
|
405
|
+
ge=0,
|
|
406
|
+
description=(
|
|
407
|
+
'Days that the analytics data of a deleted organization stays '
|
|
408
|
+
'before the `org-purge` maintenance operation deletes it. The '
|
|
409
|
+
'`orphan-purge` operation uses the same days for deleted '
|
|
410
|
+
'projects and documents, from the first run that finds them. '
|
|
411
|
+
'See [Maintenance](../admin/maintenance.md).'
|
|
412
|
+
),
|
|
413
|
+
)
|
|
414
|
+
|
|
415
|
+
|
|
397
416
|
# Module-level singletons for extended settings
|
|
398
417
|
_auth_settings: Auth | None = None
|
|
399
418
|
_server_config: ServerConfig | None = None
|
|
@@ -405,6 +424,7 @@ _anthropic_settings: llm.AnthropicSettings | None = None
|
|
|
405
424
|
_harness_egress_proxy: HarnessEgressProxy | None = None
|
|
406
425
|
_slack_settings: Slack | None = None
|
|
407
426
|
_drift_classifier: DriftClassifier | None = None
|
|
427
|
+
_purge: Purge | None = None
|
|
408
428
|
|
|
409
429
|
|
|
410
430
|
def get_auth_settings() -> Auth:
|
|
@@ -491,6 +511,14 @@ def get_drift_classifier_settings() -> DriftClassifier:
|
|
|
491
511
|
return _drift_classifier
|
|
492
512
|
|
|
493
513
|
|
|
514
|
+
def get_purge_settings() -> Purge:
|
|
515
|
+
"""Get the singleton Purge settings instance."""
|
|
516
|
+
global _purge
|
|
517
|
+
if _purge is None:
|
|
518
|
+
_purge = Purge()
|
|
519
|
+
return _purge
|
|
520
|
+
|
|
521
|
+
|
|
494
522
|
def get_harness_egress_proxy() -> HarnessEgressProxy:
|
|
495
523
|
"""Get the singleton HarnessEgressProxy settings instance."""
|
|
496
524
|
global _harness_egress_proxy
|
|
@@ -508,7 +536,7 @@ def clear_caches() -> None:
|
|
|
508
536
|
global _auth_settings, _server_config, _storage_settings
|
|
509
537
|
global _internal_services, _iggy_connectors, _ai_providers
|
|
510
538
|
global _harness_egress_proxy, _slack_settings, _anthropic_settings
|
|
511
|
-
global _drift_classifier
|
|
539
|
+
global _drift_classifier, _purge
|
|
512
540
|
_auth_settings = None
|
|
513
541
|
_server_config = None
|
|
514
542
|
_storage_settings = None
|
|
@@ -519,6 +547,7 @@ def clear_caches() -> None:
|
|
|
519
547
|
_slack_settings = None
|
|
520
548
|
_anthropic_settings = None
|
|
521
549
|
_drift_classifier = None
|
|
550
|
+
_purge = None
|
|
522
551
|
|
|
523
552
|
|
|
524
553
|
def oauth_callback_url(provider_slug: str, base_url: str | None = None) -> str:
|